#26450: gdb does not work for debugging gcc45 C++ programs --------------------------------+------------------------------------------- Reporter: bumens@… | Owner: dweber@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: gdb --------------------------------+------------------------------------------- Comment(by tvb377@…): Some tests with gcc45+gdb72: With a helloworld-like test {{{ #include <iostream> #include <string> int main(int argc, char ** argv) { std::cout << "Wie gehts denn so?" << std::endl; std::string bla = "Ganz gut!"; std::cout << bla << std::endl; return 0; } }}} I notice: {{{ b main r -->Program received signal SIGSEGV, Segmentation fault. 0x0000000100045d73 in std::basic_ostream<char, std::char_traits<char>
::sentry::sentry(std::basic_ostream<char, std::char_traits<char> >&) () from /opt/local/lib/gcc45/libstdc++.6.dylib }}}
There can be more failures produced like {{{ b 7 r Breakpoint 1, main (argc=1, argv=0x1000002d8) at tst.cpp:7 7 std::string bla = "Ganz gut!"; (gdb) n 0x00007fff5fc0d500 in ?? () (gdb) n Cannot find bounds of current function }}} or with a different program I also get {{{ Breakpoint 3, main (argc=Could not find the frame base for "main(int, char**)". }}} -- Ticket URL: <http://trac.macports.org/ticket/26450#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS