From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18870 invoked by alias); 8 Feb 2013 02:12:35 -0000 Received: (qmail 18839 invoked by uid 48); 8 Feb 2013 02:12:33 -0000 From: "ppluzhnikov at google dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/15121] New: x/a broken for addresses in shared libraries Date: Fri, 08 Feb 2013 02:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ppluzhnikov at google dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2013-q1/txt/msg00214.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15121 Bug #: 15121 Summary: x/a broken for addresses in shared libraries Product: gdb Version: unknown Status: NEW Severity: normal Priority: P2 Component: gdb AssignedTo: unassigned@sourceware.org ReportedBy: ppluzhnikov@google.com Classification: Unclassified x/a used to print symbol name regardless of whether the address was in main executable or a shared library. It no longer does. I noticed that around 7.4 release, confirmed in 7.5.50.20130208-cvs. Test: // t.c int main () { return bar (); } // foo.c #include int foo () { abort (); } int baz () { return foo (); } int bar () { return baz (); } gcc -m32 -g -fPIC -shared -o foo.so foo.c gcc -m32 -g t.c ./foo.so gdb ./a.out (gdb) run Starting program: /tmp/a.out Program received signal SIGABRT, Aborted. 0xf7fdb430 in __kernel_vsyscall () (gdb) bt #0 0xf7fdb430 in __kernel_vsyscall () #1 0xf7e3b1df in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 0xf7e3e825 in __GI_abort () at abort.c:91 #3 0xf7fd64d3 in foo () at foo.c:5 #4 0xf7fd64ea in baz () at foo.c:10 #5 0xf7fd6507 in bar () at foo.c:15 #6 0x080484af in main () at t.c:3 (gdb) fr 3 #3 0xf7fd64d3 in foo () at foo.c:5 5 abort (); (gdb) x/2a $ebp 0xffffc708: 0xffffc718 0xf7fd64ea << why no symbol? (gdb) up #4 0xf7fd64ea in baz () at foo.c:10 10 return foo (); (gdb) x/2a $ebp 0xffffc718: 0xffffc728 0xf7fd6507 << why no symbol? (gdb) up #5 0xf7fd6507 in bar () at foo.c:15 15 return baz (); (gdb) x/2a $ebp 0xffffc728: 0xffffc738 0x80484af << symbol ok (gdb) GDB clearly knows what 0xf7fd64ea and 0xf7fd6507 are: (gdb) p/a 0xf7fd64ea $2 = 0xf7fd64ea (gdb) p/a 0xf7fd6507 $3 = 0xf7fd6507 -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.