From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Andreas Jaeger Cc: Jiri Smid , gdb-patches@sources.redhat.com Subject: Re: Misc; Was: [RFA]: x86_64 target files Date: Fri, 31 Aug 2001 10:39:00 -0000 Message-id: <3B8FCBC0.2050007@cygnus.com> References: <3B738589.4050605@cygnus.com> <3B8E5021.2070209@cygnus.com> <3B8ED1EB.4070605@cygnus.com> X-SW-Source: 2001-08/msg00322.html > Andrew Cagney writes: > > >>> >>> I can try to take care of this in binutils. You suggest something >>> like get_arm_regnames in opcodes/arm-dis.c I guess? > >> >> Yes, but having looked at the interface, it isn't the most elegant. > > > Do you have a better idea for an interface? No. (Just to be clear. The ``fix'', what ever it is, requires an interface change to OPCODES. I don't think it is reasonable for me to make the x86-64 tdep file approval dependant on such an external interface change. Hence me suggestion to Jiri that a PR recording the problem be filed and hence the code remain as is.) I've only got a gut feeling. The x86-64 makes for a second target (and if we add in the x86m at least a third) that wants a mechanism for controlling the opcodes assembler. GDB can certainly keep adding hooks to OPCODES, however, I think it might be time to consider a more generic interface - that way GDB developers only need to do this once. Looking at include/dis-asm.h, `struct disassemble_info' already contains dissassembler_options. A simplistic(1) aproach might be to add the command: (gdb) set disassembler where was mindlessly assigned to dissassembler_options. There are plenty of variations on this and probably other better ideas. Enjoy, Andrew (1) And my simplistic suggestion is certainly not as simple as it looks :-/ : getting GDB to detect / report a invalid option at the time it is set instead of used; getting GDB to handle this in a multi-arch environment (an open problem - avoided so far by people using ``set