This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Expansing macro-definitions in Gas using Gdb
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Pierre Habraken <Pierre dot Habraken at imag dot fr>
- Cc: binutils at sources dot redhat dot com, gdb at sources dot redhat dot com
- Date: Wed, 28 Aug 2002 08:51:30 -0400
- Subject: Re: Expansing macro-definitions in Gas using Gdb
- References: <3D6CC5AB.C4CA2B1E@imag.fr>
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