public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Debug formats on Linux
@ 2000-10-30 11:21 mrs
  2000-10-31  8:44 ` Joseph S. Myers
  0 siblings, 1 reply; 25+ messages in thread
From: mrs @ 2000-10-30 11:21 UTC (permalink / raw)
  To: jsm28, toon; +Cc: gcc, mark

> Date: Sun, 29 Oct 2000 13:36:18 +0100
> From: Toon Moene <toon@moene.indiv.nluug.nl>
> To: "Joseph S. Myers" <jsm28@cam.ac.uk>
> CC: Mark Mitchell <mark@codesourcery.com>, gcc@gcc.gnu.org

> Joseph S. Myers wrote:

> > FAIL: g77.f-torture/compile/20000511-2.f,  -O3 -g
> > FAIL: g77.f-torture/compile/20000629-1.f,  -O3 -g
> > FAIL: g77.f-torture/compile/980310-3.f,  -O3 -g
> > FAIL: g77.f-torture/compile/980310-4.f,  -O3 -g
> > FAIL: g77.f-torture/compile/980310-7.f,  -O3 -g
> > FAIL: g77.f-torture/execute/19981119-0.f compilation,  -O3 -g
> > FAIL: g77.f-torture/execute/auto0.f compilation,  -O3 -g
> > FAIL: g77.f-torture/execute/auto1.f compilation,  -O3 -g
> > (all ICE at dwarf2out.c:8114 (add_bound_info))

> > These can be tested without the patch by compiling the individual
> > testcases with -gdwarf-2 -O3; perhaps someone understanding Fortran
> > and g77 could look at why those Fortran cases crash and whether the
> > problem is with the Fortran front end or in the DWARF2 support.

Please try the below patch, and if it makes things work better...
we can try and get it in.

Doing diffs in dwarf2out.c.~1~:
*** dwarf2out.c.~1~	Mon Oct 30 11:16:19 2000
--- dwarf2out.c	Mon Oct 30 11:17:23 2000
*************** add_bound_info (subrange_die, bound_attr
*** 8106,8111 ****
--- 8106,8112 ----
      case VAR_DECL:
      case COMPONENT_REF:
      case COND_EXPR:
+     case INDIRECT_REF:
        /* ??? These types of bounds can be created by the Ada front end,
  	 and it isn't clear how to emit debug info for them.  */
        break;
--------------

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: Debug formats on Linux
@ 2000-11-05  4:27 Robert Dewar
  2000-11-05  7:41 ` Tim Prince
  0 siblings, 1 reply; 25+ messages in thread
From: Robert Dewar @ 2000-11-05  4:27 UTC (permalink / raw)
  To: Richard.Zidlicky, jfm2; +Cc: gcc

<<sure, I never use -O3 for my own programs - it is much better to use
the inline keyword where apropriate and -funroll-loops where it helps.
>>

Our experience with Ada, where the extensive use of pragma Inline is
encouraged and expected, is that -O3 often increases execution time,
or increases space with no appreciable time gain, so we recommend
against its use.

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: Debug formats on Linux
@ 2000-10-28 16:11 Robert Dewar
  2000-10-29 11:53 ` Daniel Berlin
  0 siblings, 1 reply; 25+ messages in thread
From: Robert Dewar @ 2000-10-28 16:11 UTC (permalink / raw)
  To: dberlin, dewar; +Cc: gcc, jsm28, mark

<<No, they have a lot of duplicate info, and there are still
optimizations we don't pull off that we should (like factoring
location lists and putting them in .debug_loc, factoring strings and
putting them in .debug_str.)
BTW, this is what -feliminate-dwarf2-dups does, is eliminate the duplicates
Of course we still get killed by the overhead of so many labels.
Once we have a linker we can actually eliminate dwarf2 in, dwarf2 will
be as small as stabs, if not smaller.

It certainly has the capability to me much smaller than stabs.
>>

Ah OK! Your definition of "proper" was pretty extensive :-)

Yes, indeed if all duplication is removed, things should be much better.
It is not so easy to remove the duplicate information in the linker. Dwarf 2
was not exactly designed to facilitate this, but it certainlyis a major need.

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: Debug formats on Linux
@ 2000-10-28 11:25 Robert Dewar
  2000-10-28 15:36 ` Daniel Berlin
  0 siblings, 1 reply; 25+ messages in thread
From: Robert Dewar @ 2000-10-28 11:25 UTC (permalink / raw)
  To: dberlin, dewar; +Cc: gcc, jsm28, mark

<<Actually, this isn't true at all.
Proper DWARF2 is much smaller than stabs.
>>

That's really interesting, it is not what we have seen at all from any
of the DWARF2 gcc ports we have worked with, we have seen absolutely
HUGE increases in executable size. Perhaps these do not generate "proper"
DWARF2 :-)

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: Debug formats on Linux
@ 2000-10-28  4:13 Robert Dewar
  2000-10-28 10:09 ` Daniel Berlin
  2000-10-30 18:00 ` Jeffrey A Law
  0 siblings, 2 replies; 25+ messages in thread
From: Robert Dewar @ 2000-10-28  4:13 UTC (permalink / raw)
  To: jsm28, mark; +Cc: gcc

<<> I suspect that every new GCC platform will use DWARF2.  (I think that
> IA64-Linux uses it.)
>>

One would hope that Stabs will still be usable on most platforms, since
this representation is so much more space efficient than DWARF2. 

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: Debug formats on Linux
@ 2000-10-27 17:39 John Wehle
  0 siblings, 0 replies; 25+ messages in thread
From: John Wehle @ 2000-10-27 17:39 UTC (permalink / raw)
  To: jsm28; +Cc: gcc

> It has also been mentioned, though I can't find the relevant messages
> right now, that DWARF2 debugging info would allow debugging to work with
> -fomit-frame-pointer on systems where it presently doesn't.  If this is
> the case, and if GDB has or gets the support for this, that would seem a
> reason to change (and -fomit-frame-pointer could then be turned on at -O
> or -O2 for such systems if beneficial, e.g. x86-linux).

I look at the issue during late 1998 and was told that GDB didn't
currently support using DWARF2 for this.  I contributed GDB patches
to support debugging x86 functions where the frame pointer had been
eliminated which worked by parsing the prologue in January of 1999.
Unfortunately the patches never really got reviewed due to the GDB
people being busy with other things.  I was told in March of 2000
(which was the last time I checked on its status) that a more powerful
approach was in the works.

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 25+ messages in thread
* -g and -ggdb
@ 1997-12-05 16:52 Mark Mitchell
  2000-10-27 16:48 ` Debug formats on Linux Joseph S. Myers
  0 siblings, 1 reply; 25+ messages in thread
From: Mark Mitchell @ 1997-12-05 16:52 UTC (permalink / raw)
  To: egcs

Why doesn't -g generate DWARF2 output on Linux?  I'd think that -g
should be synonymous with -ggdb on systems (like Linux) where the
usual debugger is gdb, but this does not seem to be so.  The
documentation for -g produces debugging information in the operating
system's "native format".  Any thoughts?  I'd be happy to fix this, if
we have consensus on what to do.  My proposal:

  o Make the "native format" on Linux whatever -ggdb generates.

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2000-11-05  9:52 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-30 11:21 Debug formats on Linux mrs
2000-10-31  8:44 ` Joseph S. Myers
  -- strict thread matches above, loose matches on Subject: below --
2000-11-05  4:27 Robert Dewar
2000-11-05  7:41 ` Tim Prince
2000-10-28 16:11 Robert Dewar
2000-10-29 11:53 ` Daniel Berlin
2000-10-28 11:25 Robert Dewar
2000-10-28 15:36 ` Daniel Berlin
2000-10-28  4:13 Robert Dewar
2000-10-28 10:09 ` Daniel Berlin
2000-10-30 18:00 ` Jeffrey A Law
2000-10-27 17:39 John Wehle
1997-12-05 16:52 -g and -ggdb Mark Mitchell
2000-10-27 16:48 ` Debug formats on Linux Joseph S. Myers
2000-10-27 16:59   ` Mark Mitchell
2000-10-28  3:59     ` Joseph S. Myers
2000-10-28 10:08       ` Daniel Berlin
2000-10-29  7:02       ` Toon Moene
2000-10-27 17:03   ` jfm2
2000-10-30  9:36     ` Michael Meissner
2000-10-30 12:06       ` jfm2
2000-11-02 11:35     ` Richard Zidlicky
2000-11-02 13:19       ` jfm2
     [not found]         ` <20001103004041.B499@sirizidl.dialin.rrze.uni-erlangen.de>
2000-11-02 23:40           ` jfm2
2000-11-05  4:08             ` Richard Zidlicky
2000-11-05  9:52               ` jfm2

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).