gm2
[Top][All Lists]
Advanced

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

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


From: Gaius Mulley
Subject: Re: [Gm2] Bad news debugging on Solaris/Sparc
Date: Thu, 09 Aug 2007 16:57:42 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

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.

regards,
Gaius





reply via email to

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