Opened 16 years ago

Last modified 10 years ago

#16102 new defect

gcc43 4.3.1_1 - No port for GDB and Apple GDB fails to debug mp-gcc43 executables

Reported by: thomas@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: gdb Cc: mww@…, TimothyC.Lee@…, mkae (Marko Käning), cooljeanius (Eric Gallager)
Port: gcc43

Description (last modified by alakazam@…)

I haven't found any port for GDB, and while the Apple GDB (Leopard) debugs correctly executables produced by the Apple version of GCC, it can't debug executables produced by the version of GCC 4.3 found in MacPorts.

Attachments (1)

GDBBug (52.0 KB) - added by thomas@… 16 years ago.
Error log

Download all attachments as: .zip

Change History (14)

Changed 16 years ago by thomas@…

Attachment: GDBBug added

Error log

comment:1 Changed 16 years ago by thomas@…

Sorry, the error log formatting in the ticket is a bit awkward :-) See the attached file. Thanks !

comment:2 Changed 15 years ago by TimothyC.Lee@…

Cc: TimothyC.Lee@… added

Cc Me!

comment:3 Changed 15 years ago by alakazam@…

Description: modified (diff)
Keywords: gdb added
Port: gcc43 added
Summary: gcc42 4.3.1_1 - No port for GDB and Apple GDB fails to debug mp-gcc43 executablesgcc43 4.3.1_1 - No port for GDB and Apple GDB fails to debug mp-gcc43 executables

comment:4 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:5 Changed 14 years ago by jmroot (Joshua Root)

There's a gdb port now, does that work?

comment:6 Changed 13 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:7 Changed 13 years ago by mkae (Marko Käning)

When trying to debug aqbanking5 and gwenhywfar4 in their debug variants I notice that the problem still persists:

See e.g. this:

warning: Could not find object file "/opt/macports-test/var/macports/build/_Users_marko_WC_MacPorts_ports_devel_gwenhywfar4/work/gwenhywfar-4.0.5/src/.libs/libgwenhywfar.lax/libgui.a/progressdata.o" - no debug information available for "progressdata.c".

or

warning: Could not find object file "/opt/macports-test/var/macports/build/_Users_marko_WC_MacPorts_ports_devel_aqbanking5/work/aqbanking-5.0.3/src/libs/aqbanking/.libs/libaqbanking.lax/libjobs.a/jobgetbalance.o" - no debug information available for "jobgetbalance.c".

Any idea how I could enable gdb to correctly debug the dylibs?

comment:8 Changed 13 years ago by mkae (Marko Käning)

Sorry, just noticed that I was using the Apple gdb. So, please, disregard the above post!

comment:9 Changed 13 years ago by mkae (Marko Käning)

Hmmm, now I do use the FSF's gdb

[ MP-devel ] :~ marko$ fsf-gdb aqhbci-tool4
GNU gdb (GDB) 7.1
Copyright (C) 2010 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-apple-darwin10.6.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/macports-test/bin/aqhbci-tool4...done.
(gdb) run getaccounts -u 5534900016
Starting program: /opt/macports-test/bin/aqhbci-tool4 getaccounts -u 5534900016
unable to read unknown load command 0x1a
warning: `/opt/macports-test/var/macports/build/_Users_marko_WC_MacPorts_ports_devel_aqbanking5/work/aqbanking-5.0.3/src/plugins/backends/aqhbci/plugin/.libs/libaqhbci.lax/libaqhbci_dlgs.a/dlg_choose_usertype.o': can't open to read symbols: No such file or directory.
.
.
.
warning: `/opt/macports-test/var/macports/build/_Users_marko_WC_MacPorts_ports_devel_gwenhywfar4/work/gwenhywfar-4.0.5/src/.libs/libgwenhywfar.lax/libsio.a/syncio_tls.o': can't open to read symbols: No such file or directory.
Segmentation fault
[ MP-devel ] :~ marko$ 

and there is a segfault at the end. Looks like gdb itself segfaulted. :-( Watch also this entry:

unable to read unknown load command 0x1a

comment:10 Changed 13 years ago by mkae (Marko Käning)

I've found this http://gcc.gnu.org/ml/gcc/2008-10/msg00083.html to be linked to this issue.

comment:11 Changed 12 years ago by neil_mayhew@…

The things mentioned here are still problems with gcc46 and gdb (7.3), but there are really two separate problems:

  1. gdb segfaults on reading symbols from the program file.
  2. gcc has faulty debugging information in its shared libraries (eg libstdc++) which causes annoying messages when using the system gdb to debug programs built with the MacPorts gcc.

Problem 2 is a gcc issue, of course, to do with how gcc is built, and should be filed as an issue against gcc46.

Although problem 1 is a gdb issue, the title of this one really doesn't reflect what's happening, so there needs to be a new issue for that too.

comment:12 in reply to:  11 Changed 12 years ago by neil_mayhew@…

Replying to neil_mayhew@…:

Although problem 1 is a gdb issue, the title of this one really doesn't reflect what's happening, so there needs to be a new issue for that too.

It already exists: #31140

comment:13 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.