New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #16102 (new defect)

Opened 5 years ago

Last modified 15 months ago

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@…, mk@…
Port: gcc43

Description (last modified by alakazam@…) (diff)

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

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

Change History

Changed 5 years ago by thomas@…

Error log

comment:1 Changed 5 years ago by thomas@…

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

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

  • Cc TimothyC.Lee@… added

Cc Me!

comment:3 Changed 4 years ago by alakazam@…

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

comment:4 Changed 4 years ago by anonymous

  • Milestone Port Bugs deleted

Milestone Port Bugs deleted

comment:5 Changed 3 years ago by jmr@…

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

comment:6 Changed 2 years ago by mk@…

  • Cc mk@… added

Cc Me!

comment:7 Changed 2 years ago by mk@…

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 2 years ago by mk@…

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

comment:9 Changed 2 years ago by mk@…

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 2 years ago by mk@…

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

comment:11 follow-up: ↓ 12 Changed 15 months 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 15 months 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

Note: See TracTickets for help on using tickets.