[PATCH, updated] Add support for setting disassembler-options in GDB for POWER, ARM and S390

Peter Bergner bergner@vnet.ibm.com
Mon Feb 13 17:08:00 GMT 2017


One additional question for you.  In the unpatched sources,
opcodes/arm-dis.c seems to prefer GCC register set names via:

   /* Default to GCC register name set.  */
   static unsigned int regname_selected = 1;

...while gdb/arm-tdep.c seems to want STD register set names via:

   /* Disassembly style to use. Default to "std" register names.  */
   static const char *disassembly_style;

...and...

   /* Sync the opcode insn printer with our register viewer.  */
   parse_arm_disassembler_option ("reg-names-std");

...and...

       /* When we find the default names, tell the disassembler to use
          them.  */
       if (!strcmp (setname, "std"))
         {
           disassembly_style = setname;
           set_arm_regname_option (i);
         }

The way this is coded, reg-names-gcc will be used as the default when
we disassemble arm instructions using objdump, while GDB will default
to using reg-names-std.  Is this intentional?

Peter



More information about the Binutils mailing list