What's the state of gcc source level debugging?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

What's the state of gcc source level debugging?

Steven Levine
Hi,

My latest Seamonkey trunk build decided it wanted to die at

 XPCONECT.DLL 0001:0002f880

so I decided this was an opportunity to see what, if anything idebug could
show me.  I quickly discovered that configure.in was not capable of
telling ilink to generate debug data, so I applied to following to resolve
this

Index: configure.in
===================================================================
RCS file: /cvsroot/mozilla/configure.in,v
retrieving revision 1.1556
diff -w -u -r1.1556 configure.in
--- configure.in 22 Nov 2005 17:20:24 -0000 1.1556
+++ configure.in 23 Nov 2005 05:33:38 -0000
@@ -1905,6 +1905,9 @@
         FILTER='emxexp -o'
         LDFLAGS='-Zmap'
         MOZ_DEBUG_FLAGS="-g -fno-inline"
+ #shl
+        MOZ_DEBUG_LDFLAGS="-Zlinker /DE"
+ #shl
         MOZ_OPTIMIZE_FLAGS="-O2 -s"
         MOZ_OPTIMIZE_LDFLAGS="-Zlinker /EXEPACK:2 -Zlinker /PACKCODE
-Zlinker /PACKDATA"
         MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwdgt$(MOZ_WIDGET_TOOLKIT)'

This produced is debug data, but apparently no source line debug data.  Am
I missing a configuration option, or is our gcc not yet capable of this?

Thanks,

Steven

--
--------------------------------------------------------------------------------------------
Steven Levine <[hidden email]>  MR2/ICE 2.67 #10183
Warp4.something/14.100c_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

_______________________________________________
Mozilla-os2 mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-os2
Reply | Threaded
Open this post in threaded view
|

Re: What's the state of gcc source level debugging?

Peter Weilbacher
Steven Levine wrote:

> My latest Seamonkey trunk build decided it wanted to die at
>
>  XPCONECT.DLL 0001:0002f880
>
> so I decided this was an opportunity to see what, if anything idebug could
> show me.
[...]
> This produced is debug data, but apparently no source line debug data.  Am
> I missing a configuration option, or is our gcc not yet capable of this?

You need --enable-debug and --disable-optimize in your .mozconfig. That
gives you all the debug data you need (and more) but I found IDebug to
be somewhat unstable, ICSDebug from VAC++ 3.08 was better.

Did you have any time to work on ExceptQ? This would have been the
perfect opportunity to try it out. :-)
--
Cheers, Peter.
                                               Please reply in newsgroup
    Unofficial Mozilla builds: http://weilbacher.org/Mozilla/builds.html
    Steve's Warpzilla Tips: http://www.os2bbs.com/os2news/Warpzilla.html
_______________________________________________
Mozilla-os2 mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-os2
Reply | Threaded
Open this post in threaded view
|

Re: What's the state of gcc source level debugging?

Ilya Zakharevich
In reply to this post by Steven Levine
[A complimentary Cc of this posting was NOT [per weedlist] sent to
Steven Levine
<[hidden email]>], who wrote in article <43840104$1$fgrir53$[hidden email]>:

> RCS file: /cvsroot/mozilla/configure.in,v
> retrieving revision 1.1556
> diff -w -u -r1.1556 configure.in
> --- configure.in 22 Nov 2005 17:20:24 -0000 1.1556
> +++ configure.in 23 Nov 2005 05:33:38 -0000
> @@ -1905,6 +1905,9 @@
>          FILTER='emxexp -o'
>          LDFLAGS='-Zmap'
>          MOZ_DEBUG_FLAGS="-g -fno-inline"
> + #shl
> +        MOZ_DEBUG_LDFLAGS="-Zlinker /DE"
> + #shl
>          MOZ_OPTIMIZE_FLAGS="-O2 -s"
>          MOZ_OPTIMIZE_LDFLAGS="-Zlinker /EXEPACK:2 -Zlinker /PACKCODE
> -Zlinker /PACKDATA"
>          MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwdgt$(MOZ_WIDGET_TOOLKIT)'

For Perl I use

 -Zlinker /li

to get line info in .map files.  Maybe this is needed for your
purposes too?

Hope this helps,
Ilya
_______________________________________________
Mozilla-os2 mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-os2
Reply | Threaded
Open this post in threaded view
|

Re: What's the state of gcc source level debugging?

Steven Levine
In reply to this post by Peter Weilbacher
In <[hidden email]>, on 11/23/2005
   at 10:33 AM, Peter Weilbacher <[hidden email]> said:

>You need --enable-debug and --disable-optimize in your .mozconfig.  That
>gives you all the debug data you need (and more)

I didn't want to build with full debug and was attempting to use
--enable-debug-info-modules to be selective.  The patch is needed to make
this option work correctly, but I supplied the wrong flag.  This patch

Index: configure.in
===================================================================
RCS file: /cvsroot/mozilla/configure.in,v
retrieving revision 1.1556
diff -w -u -r1.1556 configure.in
--- configure.in 22 Nov 2005 17:20:24 -0000 1.1556
+++ configure.in 24 Nov 2005 04:06:22 -0000
@@ -1905,6 +1905,9 @@
         FILTER='emxexp -o'
         LDFLAGS='-Zmap'
         MOZ_DEBUG_FLAGS="-g -fno-inline"
+ #shl
+        MOZ_DEBUG_LDFLAGS="-g"
+ #shl
         MOZ_OPTIMIZE_FLAGS="-O2 -s"
         MOZ_OPTIMIZE_LDFLAGS="-Zlinker /EXEPACK:2 -Zlinker /PACKCODE
-Zlinker /PACKDATA"
         MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwdgt$(MOZ_WIDGET_TOOLKIT)'

gets usable debug data and a per module basis.  I'll create a bug for this
so it can get reviewed.

Of course, whatever the problem was is now gone and seamonkey again starts
up correctly.  This is probably the result of a cvs update.

I still have a need for debug data because I seem to have a problem with
the Java plugin.  About plugins shows the expected content, but I can not
open the Java console.  I recall reading something to the effect that
Seamonkey have problems with the Java plugin, but I can't find a reference
for this.

>but I found IDebug to be
>somewhat unstable, ICSDebug from VAC++ 3.08 was better.

I've got my debug environment setup so I can choose whichever seems to
work better.  I should checkout OpenWatcom 1.4.  Michal and I discussed
HLL debug support and I'm not sure this got implemented.

>Did you have any time to work on ExceptQ? This would have been the
>perfect opportunity to try it out. :-)

I've been pretty well slammed with other tasks.  I've got some work in
progress, but nothing that others can use.  I need to straigthen out the
32-bit detect logic.  The original code decides that the stack and code is
16-bit more often than it should.  I'm also hoping to replace the CodeView
support with HLL support which will allow much more use display of the
stack contents.

Thanks,

Steven

--
--------------------------------------------------------------------------------------------
Steven Levine <[hidden email]>  MR2/ICE 2.67 #10183
Warp4.something/14.100c_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

_______________________________________________
Mozilla-os2 mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-os2
Reply | Threaded
Open this post in threaded view
|

Re: What's the state of gcc source level debugging?

Steven Levine
In reply to this post by Ilya Zakharevich
In <dm2oae$[hidden email]>, on 11/23/2005
   at 09:52 PM, Ilya Zakharevich <[hidden email]> said:

>For Perl I use

> -Zlinker /li

>to get line info in .map files.  Maybe this is needed for your purposes
>too?

That might have helped, but getting the -g into the options seems to have
produced the desired results.

Thanks,

Steven

--
--------------------------------------------------------------------------------------------
Steven Levine <[hidden email]>  MR2/ICE 2.67 #10183
Warp4.something/14.100c_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

_______________________________________________
Mozilla-os2 mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-os2