From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15267 invoked by alias); 29 Sep 2012 18:04:59 -0000 Received: (qmail 15244 invoked by uid 48); 29 Sep 2012 18:04:57 -0000 From: "hjl.tools at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug backtrace/14646] New: [x32] backtrace doesn't work before main Date: Sat, 29 Sep 2012 18:04:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: backtrace X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail 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: 2012-q3/txt/msg00435.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14646 Bug #: 14646 Summary: [x32] backtrace doesn't work before main Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: backtrace AssignedTo: unassigned@sourceware.org ReportedBy: hjl.tools@gmail.com Classification: Unclassified On Linux/x32 with glibc compiled with GCC 4.7.2, I got [hjl@gnu-tools-1 tmp]$ cat x.c int main () { return 0; } [hjl@gnu-tools-1 tmp]$ gcc -mx32 -g x.c [hjl@gnu-tools-1 tmp]$ gdb a.out GNU gdb (GDB) 7.5.50.20120925-cvs Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /tmp/a.out...done. (gdb) b __init_misc Function "__init_misc" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (__init_misc) pending. (gdb) r Starting program: /tmp/a.out Breakpoint 1, 0xf7b1cbc0 in __init_misc () from /libx32/libc.so.6 (gdb) bt #0 0xf7b1cbc0 in __init_misc () from /libx32/libc.so.6 #1 0xf7a45b96 in _init () from /libx32/libc.so.6 #2 0x00000004 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) Linux/x86-64 works much better: [hjl@gnu-tools-1 tmp]$ gcc -g x.c -o 64 [hjl@gnu-tools-1 tmp]$ gdb 64 GNU gdb (GDB) 7.5.50.20120925-cvs Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /tmp/64...done. (gdb) b __init_misc Function "__init_misc" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (__init_misc) pending. (gdb) r Starting program: /tmp/64 Breakpoint 1, 0x00000035978f1540 in __init_misc () from /lib64/libc.so.6 (gdb) bt #0 0x00000035978f1540 in __init_misc () from /lib64/libc.so.6 #1 0x0000003597821519 in _init () from /lib64/libc.so.6 #2 0x000000359740f850 in call_init.part.0 () from /lib64/ld-linux-x86-64.so.2 #3 0x000000359740f950 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2 #4 0x000000359740152a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 #5 0x0000000000000001 in ?? () #6 0x00007fffffffe386 in ?? () #7 0x0000000000000000 in ?? () (gdb) -- 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.