This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/9807] New: _SDA_BASE_+_SDA2_BASE_ not valid for symbols resolving
- From: "jan dot kratochvil at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 2 Feb 2009 14:26:47 -0000
- Subject: [Bug symtab/9807] New: _SDA_BASE_+_SDA2_BASE_ not valid for symbols resolving
- Reply-to: sourceware-bugzilla at sourceware dot org
GDB testsuite reported a regression on:
gdb.mi/mi2-disassemble.exp: data-disassemble range assembly mixed
It was due to unfortunate prelink address and a bogus _SDA_BASE_ address:
[Nr] Name Type Addr Off Size ES Flg Lk Inf
Al
[21] .bss NOBITS 00028a60 018960 000030 00 WA 0 0
4
0x00028a60 + 0x000030 == 0x28a90
[18] .sdata PROGBITS 00028530 018530 000430 00 WA 0 0
8
Symbol table '.symtab' contains 723 entries:
600: 00030530 0 OBJECT LOCAL DEFAULT 18 _SDA_BASE_
0x30530 > 0x28a90 - symbol being behind the end of file.
In fact it should not be out of the range of its section number 18.
Steps to Reproduce:
Prelink /lib/ld.so.1 to 0x0ffd0000
cat >cmd <<EOH
# 0x1000053c is $pc after `start'
info line *0x1000053c
start
info line *0x1000053c
q
EOH
gdb -nx -x ./cmd gdb-6.3.0.0-1.160.el4.src/gdb-6.3/gdb/testsuite/gdb.mi/basics
Actual results:
Line 54 of "./gdb.mi/basics.c" starts at address 0x1000053c <main+20> and ends
at 0x10000558 <main+48>.
Breakpoint 1 at 0x1000053c: file ./gdb.mi/basics.c, line 54.
main () at ./gdb.mi/basics.c:54
54 callee1 (2, "A string argument.", 3.5);
Line 54 of "./gdb.mi/basics.c" is at address 0x1000053c <main+20> but contains
no code.
Expected results:
Line 54 of "./gdb.mi/basics.c" starts at address 0x1000053c <main+20> and ends
at 0x10000558 <main+48>.
Breakpoint 1 at 0x1000053c: file ./gdb.mi/basics.c, line 54.
main () at ./gdb.mi/basics.c:54
54 callee1 (2, "A string argument.", 3.5);
Line 54 of "./gdb.mi/basics.c" starts at address 0x1000053c <main+20> and ends
at 0x10000558 <main+48>.
Additional info:
The problem affects only debugging (GDB) as _SDA_BASE_ is just in `.symtab'.
Comment From Roland McGrath 2009-01-25 14:57:03 EDT
_SDA_BASE_ is a special-case symbol on ppc. elflint does have checks for
symbols being out of their section bounds, but there are machine-dependent
special exceptions. _SDA_BASE_ is set to .sdata+0x8000 because it's used for
ppc insns where there is a -0x8000 bias applied to constants (or something like
that). Also _SDA2_BASE_ is .sdata2+0x8000.
->
_SDA_BASE_ and _SDA2_BASE_ should be ignored for addresses resolving.
--
Summary: _SDA_BASE_+_SDA2_BASE_ not valid for symbols resolving
Product: gdb
Version: unknown
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: symtab
AssignedTo: unassigned at sourceware dot org
ReportedBy: jan dot kratochvil at redhat dot com
CC: gdb-prs at sourceware dot org
GCC host triplet: ppc-unknown-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=9807
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.