qRegisterInfo and large gaps

I’ve got a simulator with a gdbserver interface that defines one set of registers starting at 0,with a few small gaps, and another set starting at 100, with a large gap between the end of the 1st set and the start of the 2nd. On an upcoming device it will add a 3rd set, again with a large gap.

We currently implement the gaps as dummy registers in qRegisterInfo. We have 38 dummy registers and ~100 real registers. The number of dummy registers will only grow in the future.

I propose a new key:value pair in qRegisterInfo. regnum: would set the register number to the number specified. In ProcessGDBRemote::BuildDynamicRegisterInfo(), a new index would be used for the loop. reg_num would start and 0 and use (previous value +1) if regnum wasn’t specified, or would use the value specified.

If the qRegisterInfo3 has regnum:10, register numbers would look like this:

0 1 2 16 17 18 …