@labath, I'm trying to copy the logic from Linux here but for some reason unsupported regsets are now reported as 'unknown' instead of not all. Any clue what I'm doing wrong?
Details
Diff Detail
Event Timeline
Hmm, if I add GetUserRegisterCount() override, then registers start disappearing. Except that wrong registers disappear.
My guess is that this is because of the extra debug registers that you're exposing. You'll notice that Get(User)RegisterSetCount returns just a number, and this means that it is not really possible to selectively disable register sets -- all you can do is disable the ones that come last.
We ran into a similar problem on arm with @omjavaid.
For the time being, we may be able to work around this by making the debug registers come earlier in the list (after ensuring they work on linux). Or we could hide them on BSDs as well...
Register sets are stored in statically which means we have to honor the order as @labath pointed out. Ideally register sets array should be a dynamic list with all currently available registerset inserted in the list.