This is the mail archive of the gdb-prs@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: breakpoints/1135: Debugging with macro


The following reply was made to PR breakpoints/1135; it has been noted by GNATS.

From: Daniel Jacobowitz <drow at mvista dot com>
To: sana at stl dot sarov dot ru
Cc: gdb-gnats at sources dot redhat dot com, miwako dot tokugawa at intel dot com
Subject: Re: breakpoints/1135: Debugging with macro
Date: Tue, 11 Mar 2003 08:53:18 -0500

 On Tue, Mar 11, 2003 at 10:27:31AM -0000, sana at stl dot sarov dot ru wrote:
 > 
 > >Number:         1135
 > >Category:       breakpoints
 > >Synopsis:       Debugging with macro
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       high
 > >Responsible:    unassigned
 > >State:          open
 > >Class:          change-request
 > >Submitter-Id:   net
 > >Arrival-Date:   Tue Mar 11 10:28:00 UTC 2003
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     sana at stl dot sarov dot ru
 > >Release:        unknown-1.0
 > >Organization:
 > >Environment:
 > GDB 5.3
 > >Description:
 > Regression test is:
 > 
 >         #define f() x
 >         #define g   y
 >         #define h(a,b) a##b
 >         int main() {
 >             int xy = 7;
 >             return xy;
 >         }
 > 
 > 
 > Debugger's output is:
 > 
 > This GDB was configured as "i686-pc-linux-gnu"...
 > (gdb) b 12
 > Breakpoint 1 at 0x8048ac4: file macro_07.c, line 12.
 > (gdb) r
 > Starting program: /home1/sana/trackers/macro/test/macro_07.exe 
 > 
 > Breakpoint 1, main () at macro_07.c:12
 > 12         return xy;
 > (gdb) p x/**/y
 > No symbol "x" in current context.
 
 GDB doesn't implement this.  I don't really see why it should either. 
 
 > (gdb) p f()y  
 > No symbol "x" in current context.
 > (gdb) p f()g
 > No symbol "x" in current context.
 > 
 > It looks like that it is not correct.
 > Command should be 'p xy' in all cases.
 
 Eh?  Try those in a C compiler.  () does not do token pasting.
 
 > GDB has problems with "single identifier tokens".
 > >How-To-Repeat:
 > 
 > >Fix:
 > 
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 > 
 
 -- 
 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]