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/1052: GDB 5.3 (macro supporting) - macro value is string without quotes.


>Number:         1052
>Category:       breakpoints
>Synopsis:       GDB 5.3 (macro supporting) - macro value is string without quotes.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 12 08:38:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     sana@stl.sarov.ru
>Release:        unknown-1.0
>Organization:
>Environment:
32-bit and 64-bit Linux, GDB 5.3
>Description:
GDB 5.3 supports work with section .debug_macinfo.
During testing it has been found out that GDB 5.3 has problem with printing of macro symbols whose value is string without quotes.
But it is usual parctice to use such values.

tets.c:

#define PREFIX    small 
main()
{
int PREFIX_i = 10, PREFIX_j;

PREFIX_j = abs(PREFIX_i);
return;
}


GDB's output for this test is:

This GDB was configured as "i686-pc-linux-gnu"...
(gdb) b main
Breakpoint 1 at 0x8048aef: file test2.c, line 4.
(gdb) r
Starting program: /home1/sana/macro/tr/a.out 

Breakpoint 1, main () at test2.c:4
4       int PREFIX_i = 10, PREFIX_j;
(gdb) p PREFIX
No symbol "small" in current context.
(gdb) 


Section .debug_macinfo (readelf's dump):

DW_MACINFO_define - lineno : 0 macro : __SIGNED_CHARS__ 1
DW_MACINFO_define - lineno : 0 macro : __DATE__ "Feb 12 2003"
DW_MACINFO_define - lineno : 0 macro : __TIME__ "10:22:26"
DW_MACINFO_define - lineno : 0 macro : __STDC__ 1
DW_MACINFO_define - lineno : 0 macro : __STDC_VERSION__ 199901L
DW_MACINFO_define - lineno : 0 macro : __STDC_HOSTED__ 1
DW_MACINFO_define - lineno : 0 macro : __EDG__ 1
DW_MACINFO_define - lineno : 0 macro : __EDG_VERSION__ 300
DW_MACINFO_define - lineno : 0 macro : __VERSION__ "Intel(R) C++ gcc 3.0 mode"
DW_MACINFO_define - lineno : 0 macro : __HONOR_STD 1
DW_MACINFO_define - lineno : 0 macro : __ICC 800
DW_MACINFO_define - lineno : 0 macro : __INTEL_COMPILER 800
DW_MACINFO_define - lineno : 0 macro : _M_IX86 700
DW_MACINFO_define - lineno : 0 macro : __ELF__ 1
DW_MACINFO_define - lineno : 0 macro : __PTRDIFF_TYPE__ int
DW_MACINFO_define - lineno : 0 macro : __SIZE_TYPE__ unsigned
DW_MACINFO_define - lineno : 0 macro : __WCHAR_TYPE__ long int
DW_MACINFO_define - lineno : 0 macro : __WINT_TYPE__ unsigned int
DW_MACINFO_define - lineno : 0 macro : __QMSPP_ 1
DW_MACINFO_define - lineno : 0 macro : __extension__ 
DW_MACINFO_define - lineno : 0 macro : __GXX_ABI_VERSION 102DW_MACINFO_define - lineno : 0 macro : __USER_LABEL_PREFIX__ 
DW_MACINFO_define - lineno : 0 macro : __unix__ 1
DW_MACINFO_define - lineno : 0 macro : __unix 1
DW_MACINFO_define - lineno : 0 macro : __linux__ 1
DW_MACINFO_define - lineno : 0 macro : __linux 1
DW_MACINFO_define - lineno : 0 macro : __gnu_linux__ 1
DW_MACINFO_define - lineno : 0 macro : unix 1
DW_MACINFO_define - lineno : 0 macro : linux 1
DW_MACINFO_define - lineno : 0 macro : __i386 1
DW_MACINFO_define - lineno : 0 macro : __i386__ 1
DW_MACINFO_define - lineno : 0 macro : i386 1
DW_MACINFO_start_file - lineno: 0 filenum: 1
DW_MACINFO_define - lineno : 1 macro : PREFIX small

>How-To-Repeat:
Unfortunately current Intel compiler does not generate debug information for macros. But this feature will be included in compiler 8.0.
>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]