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]

gdb/329: stack tracing and breakpoints don't work properly if no debugging symbols



>Number:         329
>Category:       gdb
>Synopsis:       stack tracing and breakpoints don't work properly if no debugging symbols
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 02 13:38:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     don@sandvine.com
>Release:        5.1.1
>Organization:
>Environment:
target=mips-wrs-vxworks
cross from cygwin
>Description:
vxWorks target image is comprised of many source files. Some are compiled with -g, some are not.

If I take a symbol which is not compiled with -g (e.g. printf), and from the gdb shell put a breakpoint, I get an incorrect address for the breakpoint.

The error seems to come from linespec.c:1212, in the decode_line_1(). It looks up the symbol with lookup_minimal_symbol(), which is correct, and it gets
a correct result. It then calls find_pc_sect_line(), which returns an incorrect address (from some other module with -g on). This address is then used for the breakpoint.



>How-To-Repeat:
Build an image with a file without -g. Put a breakpoint on a function in this non-g file, check that the address matches expected.
>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]