[PATCH, RFC] Add support for choosing disassembler cpu in GDB for POWER.
Thu Oct 6 09:52:00 GMT 2016
How do you envision this command working if you consider
--enable-targets=all? How would we make it work with other architectures?
Consider combined debuggers. The fact that the default is explicitly
"power9" seems will make generalizing the command awkward?
If we made the default be "", and then had a per-arch default,
maybe it'd work?
But, I suspect that if need to explicitly set one disassembler cpu
when debugging a frame of $arch1, and explicitly set another disassembler
cpu when debugging a frame of $arch2, you'll end up with lots of
juggling. And that juggling is only possible if you only consider
explicit disassembling. Things like "set disassemble-next-line" makes
that impossible, since it's gdb that decides when to disassemble.
Maybe we should instead make the command be "set powerpc disassembler-cpu", or
generally, "set $arch disassembler-cpu". We have "set arm disassembler"
But if we could have a single generic command, that'd be of course better.
It's worth it to think about how it'd work at the user-interface level,
even if we don't make any other arch use it right away.
More information about the Binutils