This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: expanding c-macros in gdb
- From: Daniel Berlin <dan at cgsoftware dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: Eli Zaretskii <eliz at is dot elta dot co dot il>, "Howind Axel, Externer Dienstleister" <Axel dot Howind at fja dot com>, "'gdb at sources dot redhat dot com'" <gdb at sources dot redhat dot com>
- Date: Wed, 5 Dec 2001 12:26:58 -0500 (EST)
- Subject: Re: expanding c-macros in gdb
On Wed, 5 Dec 2001, Daniel Jacobowitz wrote:
> On Wed, Dec 05, 2001 at 01:42:25PM +0200, Eli Zaretskii wrote:
> >
> > On Wed, 5 Dec 2001, Howind Axel, Externer Dienstleister wrote:
> >
> > > Is there a way to make gdb understand that the command
> > > print REFP_XYZ(a).abc is the same as print xyz_ptr->s_xyz.r_xyz[i].xyz.abc?
> > >
> > > I have read in the gcc manual that compiling with -g3 stores information
> > > about all defined macros, so that "Some debuggers support macro
> > > expansion when you use `-g3'."
> > > This does not seem to work with gdb (gcc 2.95.2, gdb 5.0, on HP-UX 10.20).
> >
> > Try compiling with -gdwarf-2 or -gstabs+ instead of -g3. Perhaps that
> > would help (I have no idea whether DWARF2 is supported on HP-UX).
>
> It doesn't (yet). At least -gdwarf-2 -g3 saves the necessary
> information, we just don't use it.
>
> Hopefully I'll have time to tackle this when I'm finished with v3.
It's pretty simple, just need to integrate cpplib with the c-parser.
>
> --
> Daniel Jacobowitz Carnegie Mellon University
> MontaVista Software Debian GNU/Linux Developer
>