This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH, RFC] Add support for choosing disassembler cpu in GDB for POWER.
On 10/28/2016 02:47 PM, Peter Bergner wrote:
> On 10/27/16 4:40 AM, Pedro Alves wrote:
>> I couldn't quite get why you need so much power specific parsing
>> code in ppc-tdep.c, though. What would be necessary to be able to
>> move most of that set/show handling to the common code?
>
> Working on that now.
>
>
>> I also wonder if you really want to stick with
>> "set powerpc disassembler <cpu>" instead of
>> "set powerpc disassembler-options <options>".
>>
>> I.e., I wonder about making the power one defined exactly like:
>>
>> "like 'set disassembler-options', but sets power disassembler
>> options even if the current arch is not power."
>
> Once we move all of this code to generic code, do we really
> even need the arch specific command?
>
Maybe not. Where are the per-arch settings stored?
Consider a multi-arch/combined gdb. If I do:
(gdb) thread 1.1 # PPC
(gdb) set disassembler-options power9
(gdb) thread 2.1 # ARM
(gdb) set disassembler-options reg-names-gcc
(gdb) thread 1.1 # PPC
(gdb) show disassembler-options
and the last "show" still remembers I had chosen
power9, then I'm happy without the arch specific command.
Maybe it doesn't even make sense to consider this
setting per-arch. Maybe per-inferior would be better.
Thanks,
Pedro Alves