This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug backtrace/16451] New: abort() on 64-bit mac causes backtrace to fail


https://sourceware.org/bugzilla/show_bug.cgi?id=16451

            Bug ID: 16451
           Summary: abort() on 64-bit mac causes backtrace to fail
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: backtrace
          Assignee: unassigned at sourceware dot org
          Reporter: pmelsted at gmail dot com

Overview: when debugging programs that end with call to abort() the backtrace
fails

Steps to reproduce:
Minimal program to reproduce

// test.cpp
#include <iostream>
#include <cassert>
int main()
{
  int i = 42;
  std::cout << "Hello World!" << i << std::endl;
  assert(0); // this also happens with abort() which assert(0) winds up calling
}

/usr/local/bin/g++-4.8 -g -c test.cpp -o test.o
/usr/local/bin/g++-4.8 -g test.o -o test       
/usr/local/bin/gdb --args test
Starting program: /Users/pmelsted/tmp/test/test 
Hello World!42

Program received signal SIGABRT, Aborted.
0x00007fff8b4ab866 in ?? ()
(gdb) bt full
Python Exception <type 'exceptions.ImportError'> No module named frames: 
#0  0x00007fff8b4ab866 in ?? ()
No symbol table info available.
#1  0x00007fff892c635c in ?? ()
No symbol table info available.
#2  0x0000000000000000 in ?? ()
No symbol table info available.

Expected results:
This works if we compile for 32-bit with -m32 flag on g++.
The stacktrace becomes

(gdb) bt full
Python Exception <type 'exceptions.ImportError'> No module named frames: 
#0  0x9b462952 in ?? ()
No symbol table info available.
#1  0x9ad3a340 in ?? ()
No symbol table info available.
#2  0x000021f4 in main () at test.cpp:8
        i = 42

Build date and Hardware:
Verified this for 7.6 and most recend build
GNU gdb (GDB) 7.7.50.20140114-cvs, mac OSX 10.9.1

Additional information:
http://stackoverflow.com/questions/20909547/missing-call-stack-frame-with-assert-for-gdb-7-6-on-mac

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]