[MacPorts] #26450: gdb does not work for debugging gcc45 C++ programs

MacPorts noreply at macports.org
Tue Aug 23 23:56:50 PDT 2011


#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@…):

 I think that this ticket really describes 2 things.

 First is that you cannot really use mp-g++-4.5. See
 http://lists.macosforge.org/pipermail/macports-dev/2011-June/014877.html

 That accounts at least for one of the errors I experienced during my first
 tests.

 Second is that mainline GNU gdb apparently does not work for OSX as a
 target.

 Using gdb 7.3 to trace through a hello world in C++ gives for me:


 (gdb) b main

 Breakpoint 1 at 0x1000009c9: file ostringstream.cpp, line 6.

 (gdb) r

 Starting program: a.out

 BFD: unable to read unknown load command 0x24

 BFD: unable to read unknown load command 0x26

 Error in re-setting breakpoint 1: Cannot access memory at address
 0x1000009bd


 I get similar results when trying a C program, also of "hello world"
 complexity.

 As far as I can see gdb is dead for OSX as a target. Since lldb works
 quite well for OSX targets that's not too bad.

 Maybe the port should be marked as "broken".

-- 
Ticket URL: <https://trac.macports.org/ticket/26450#comment:8>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list