Expansing macro-definitions in Gas using Gdb

Daniel Jacobowitz drow@mvista.com
Wed Aug 28 05:50:00 GMT 2002


On Wed, Aug 28, 2002 at 02:44:27PM +0200, Pierre Habraken wrote:
> Hello,
> 
> I would like to be able to display the value of #defined constants
> (C macro-definitions) #included in assembly language modules.
> The source files of these modules have suffix ".S" and are assembled
> using gcc.
> Using latest snapshots of gdb, it is possible to expand
> macro-definitions included in C source files compiled with gcc.
> However this does not appear to work for assembly source files.
> Is it possible to force gas (or gcc) to put the required data into the
> object file ?

Not really.  If you use a C file and asm("") constructs, you can get
the macros; otherwise, you can probably get them by linking a dummy .c
file in your project which includes all of the headers.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb mailing list