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]

breakpoints/1135: Debugging with macro


>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) 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.
GDB has problems with "single identifier tokens".
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]