gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] Re: Bad news debugging on Solaris/Sparc


From: John O Goyo
Subject: [Gm2] Re: Bad news debugging on Solaris/Sparc
Date: Mon, 13 Aug 2007 12:15:23 -0400
User-agent: Thunderbird 1.5.0.10 (X11/20070221)

Greetings:

Gaius Mulley wrote:
John O Goyo <address@hidden> writes:

The problem is that one cannot debug binaries built with gm2 with gdb
under Solaris/Sparc.  (I do not know about Solaris/Intel.)  Source can
be compiled and linked with "-g", and run without incident but the
resulting binary has more than one ".debug_str" section (as noted by
elfdump).  When the resulting binary is loaded into GDB, the latter
proclaims that "DW_FORM_strp pointing outside of .debug_str" and
nothing works -- source cannot be viewed and breakpoints cannot be
set.  It seems that GDB expects only one such section and takes the
first such as the unique section.  Thus anything that points beyond
the said section cannot be resolved.  (I learned the cause via some
judicial surfing.)

I found several bug reports on this submitted to GDB.  The GDB
maintainers do not regard this behaviour as incorrect.  They regard
such binaries as broken (despite noting that Sun's debugger handles
multiple sections within a single binary).

However, C binaries built with the corresponding gcc compiler can be
debugged without incident.  I do not know when gm2's behaviour
changed.  I am investigating.

john

Hi John,

it might be interesting to generate assembler files from a tiny C
program and also the equivalent tiny M2 program and compare the two.
If they are similar then perhaps examine the linking stage - in
particular any options passed to ld (collect).  Finally when M2 links
an application it always creates an archive representing the import
tree and links the mod_init.o against this archive.

First, I went back to the tarball on the GM2 website and built that. I found that I can debug binaries built with said version. However, that uses stabs to record debugging information.

Second, I followed your suggestion. (I will send you the results directly to avoid sending files to the list.) Minor differences aside, the M2 file defines a ".debug_str" section but the C file does not.

I am still investigating...

Sincerely,
john


regards,
Gaius







reply via email to

[Prev in Thread] Current Thread [Next in Thread]