Moduli space and wall-crossing formulae in higher-rank gauge theories