Re: GDB and Macros
- From: Artie Gold <artiegold@xxxxxxxxxxxxx>
- Date: Thu, 29 Dec 2005 12:49:38 -0600
mtm992003@xxxxxxxxx wrote:
I am currently debugging a program on Redhat AS 3.0 that has gdb version 5.3.90-0.20030710.40rh that has functions as macros. For example:
#define PLENGTH ( X ) status.timeout = X
You realize, of course, that the syntax above means that `PLENGTH' will be replaced by `( X ) status.timeout = X'? (You need to lose the space between the macro name and its parameter list.)
However I can't get gdb to step into that function. Is there any way to do this?
Assuming that's a typo above, there's no function to step into. By the time the compiler `sees' code, macro substitution has already occurred.
I would recommend having a look at the output of `gcc -E <sourcefile name>' to see the results of preprocessing.
HTH, --ag -- Artie Gold -- Austin, Texas http://goldsays.blogspot.com (new post 8/5) http://www.cafepress.com/goldsays "If you have nothing to hide, you're not trying!" .
- References:
- GDB and Macros
- From: mtm992003@xxxxxxxxx
- GDB and Macros
- Prev by Date: inetd and time/udp and ipalias
- Next by Date: Re: glibc 2.2 vs 2.3 issue back again
- Previous by thread: GDB and Macros
- Next by thread: inetd and time/udp and ipalias
- Index(es):
Relevant Pages
|