public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug backtrace/14646] New: [x32] backtrace doesn't work before main
@ 2012-09-29 18:04 hjl.tools at gmail dot com
  2012-09-29 23:25 ` [Bug backtrace/14646] " hjl.tools at gmail dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2012-09-29 18:04 UTC (permalink / raw)
  To: gdb-prs


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 <http://gnu.org/licenses/gpl.html>
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:
<http://www.gnu.org/software/gdb/bugs/>...
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 <http://gnu.org/licenses/gpl.html>
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:
<http://www.gnu.org/software/gdb/bugs/>...
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.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-11-10  0:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-29 18:04 [Bug backtrace/14646] New: [x32] backtrace doesn't work before main hjl.tools at gmail dot com
2012-09-29 23:25 ` [Bug backtrace/14646] " hjl.tools at gmail dot com
2012-09-30 21:16 ` hjl.tools at gmail dot com
2012-10-01 16:13 ` jan.kratochvil at redhat dot com
2012-10-01 16:31 ` [Bug backtrace/14646] [x32] backtrace doesn't work hjl.tools at gmail dot com
2012-10-01 16:55 ` jan.kratochvil at redhat dot com
2012-10-01 17:14 ` hjl.tools at gmail dot com
2012-10-01 17:20 ` jan.kratochvil at redhat dot com
2012-10-01 17:33 ` hjl.tools at gmail dot com
2012-10-01 17:59 ` jan.kratochvil at redhat dot com
2012-10-01 18:42 ` hjl.tools at gmail dot com
2012-10-15 20:37 ` cvs-commit at gcc dot gnu.org
2012-11-10  0:50 ` cvs-commit at gcc dot gnu.org
2012-11-10  0:52 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).