This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: source with inlined assembly


On Sat, Jun 28, 2003 at 11:01:59AM -0400, Bob Rossi wrote:
> Hi,
> 
> I am investigating the best way to show the user assembly code via my
> front end called cgdb. It appears that there is a disassemble function
> that will get the assembly code. 
> 
> Is there any way to nicely show to the user the source with the assembly
> inlined between the source lines? Can I ask gdb for the assembly for 1
> source line of code? Then can I ask it the assembly for every source
> line of code in a file?
> 
> What is the mechanism for doing this with a front end? I really want to
> stay away from parsing the output of the disassemble command to try to
> guess which assembly lines go with the source code.
> 
> Also, if up till now there is only a disassemble function and this
> doesn't supply a front end with what I am asking for, does this seem
> like a good feature to add to the mi command set?

Please look at the GDB/MI manual, at the "-data-disassemble" command. 
It should be exactly what you're looking for.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]