Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [rfa/doc] correct info about best C++ compilers/debug formats
@ 2003-02-03 21:21 Michael Elizabeth Chastain
  2003-02-04  6:16 ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Michael Elizabeth Chastain @ 2003-02-03 21:21 UTC (permalink / raw)
  To: carlton; +Cc: drow, eliz, gdb-patches

It's beautiful.  I tested it, too: I built gdb and 'makeinfo' worked fine.

Recommended for approval.

Michael C

===

2003-02-03  David Carlton  <carlton@math.stanford.edu>

	* gdb.texinfo (C@t{++}): Recommend DWARF2, then stabs+.
	(Variables): Recommend stabs+ and DWARF2.
	(C plus plus expressions): Correct info about
	compiler versions, debug formats.
	PR symtab/874.


^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [rfa/doc] correct info about best C++ compilers/debug formats
@ 2003-02-04 14:41 Michael Elizabeth Chastain
  0 siblings, 0 replies; 18+ messages in thread
From: Michael Elizabeth Chastain @ 2003-02-04 14:41 UTC (permalink / raw)
  To: eliz; +Cc: carlton, drow, gdb-patches

Hi Eli,

> Let me explain myself: I'm grateful that you did _any_ testing at all; it 
> should have been my job, except that I don't have time to do anything 
> these days except read the patches and approve them.

We all do what we can and somehow the releases come out.

It looks like I need texinfo, tetex, and info in my baseline software.
I will go spruce up my baseline.

For chasing the cross-references, I can do this by hand for
a while.  And then maybe write testsuite/info.doc with some
'expect' automation, running on 'info' rather than gdb!

Michael C


^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [rfa/doc] correct info about best C++ compilers/debug formats
@ 2003-02-04  6:24 Michael Elizabeth Chastain
  2003-02-04  8:08 ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Michael Elizabeth Chastain @ 2003-02-04  6:24 UTC (permalink / raw)
  To: eliz; +Cc: carlton, drow, gdb-patches

The only testing I did was to build gdb (hey, it takes only 10 minutes)
and then look at the 'makeinfo' output in the log file.  I didn't even
read the generated info files, let alone chase references.

> As long as we are testing, perhaps someone could find a moment and TeX 
> the manual, to see that the additions typeset well.

This falls in my self-claimed charter of "gdb quality assurance".

I've added this to my todo list.

Can you give me a brain dump of how to QA the manuals: what software
I need to have, what procedures to follow, how to check the output,
things that often go wrong.

Michael C


^ permalink raw reply	[flat|nested] 18+ messages in thread
[parent not found: <200302032008.h13K8M230404@duracef.shout.net>]
* Re: [rfa/doc] correct info about best C++ compilers/debug formats
@ 2003-02-03 19:29 David Carlton
  0 siblings, 0 replies; 18+ messages in thread
From: David Carlton @ 2003-02-03 19:29 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: gdb-patches, Daniel Jacobowitz, eliz

On Mon, 3 Feb 2003 12:56:22 -0600, Michael Elizabeth Chastain <mec@shout.net> said:

> After fixing the doco, we can kill all the setup_xfail_format dwarf-1
> lines.  We can either add a test for dwarf-1 to "skip_cplus_tests",
> or we can just let the test suite do its job and report a lot of
> FAILs on dwarf-1.  I favor the latter.  But I would like to discuss
> this *after* fixing the docs.

Fair enough.

> Now the content:

>  @emph{Warning:} @value{GDBN} can only debug C@t{++} code if you use the
>  proper compiler and the proper debug format.  Currently, @value{GDBN}
>  works best when debugging C@t{++} code that is compiled with
>  @value{NGCC} 2.95.3 or with @value{NGCC} 3.1 or newer, using the options
>  @option{-gdwarf-2} or @option{-gstabs+}.  DWARF 2 is preferred over
>  stabs; newer versions of @value{NGCC} use DWARF 2 as the default
>  whenever possible.  Other compilers and/or debug formats are likely to
>  work badly or not at all when using @value{GDBN} to debugg C@t{++} code.

> The normal spelling is 'DWARF2' not 'DWARF 2'.

I wondered about this.  The standard doesn't give any guidance (it
says "DWARF Version 2", to me DWARF 2 looks much better, and the GCC
option is -gdwarf-2, not -gdwarf2.  On the other hand, there are more
web pages that refer to it as DWARF2 than web pages that refer to it
as DWARF 2.

> Also you usually want to say "stabs+", not "stabs".

I guess that makes sense.

> Also a typo on "debugg".

Thanks.

> The part about "newer versions of gcc use DWARF 2 as the default
> whenever possible" is vague and not accurate enough for doco (I
> think).

Well, I wanted to include some sort of sentence that reassured users
that they probably didn't have to specify the debug format explicitly.
Also, if they use a recent version of GCC, they'll probably get
the best working debug format by default: if GCC doesn't default to
DWARF 2, there's probably a good reason for that.

> Some more places need changing:

>   To solve such problems, either recompile without optimizations, or use a
>   different debug info format, if the compiler supports several such
>   formats.  For example, @value{NGCC}, the @sc{gnu} C/C@t{++} compiler usually
>   supports the @samp{-gstabs} option.  @samp{-gstabs} produces debug info
>   in a format that is superior to formats such as COFF.  You may be able
>   to use DWARF2 (@samp{-gdwarf-2}), which is also an effective form for
>   debug info.  See @ref{Debugging Options,,Options for Debugging Your
>   Program or @sc{gnu} CC, gcc.info, Using @sc{gnu} CC}, for more
>   information.

> --> Change "-gstabs" to "-gstabs+" here.  In particular "-gstabs" is
>       miserable with C++ (I have tested it).

>   For best results when using @sc{gnu} C@t{++}, use the stabs debugging
>   format.  You can select that format explicitly with the @code{g++}
>   command-line options @samp{-gstabs} or @samp{-gstabs+}.  See
>   @ref{Debugging Options,,Options for Debugging Your Program or @sc{gnu}
>   CC, gcc.info, Using @sc{gnu} CC}, for more information.

> --> Rewrite to say 'DWARF2'.

Thanks, I'll submit a revised patch including these.

David Carlton
carlton@math.stanford.edu


^ permalink raw reply	[flat|nested] 18+ messages in thread
* [rfa/doc] correct info about best C++ compilers/debug formats
@ 2003-02-03 18:27 David Carlton
  2003-02-03 18:37 ` Daniel Jacobowitz
  2003-02-03 19:23 ` Eli Zaretskii
  0 siblings, 2 replies; 18+ messages in thread
From: David Carlton @ 2003-02-03 18:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: Eli Zaretskii, Daniel Jacobowitz, Michael Elizabeth Chastain

As noted in PR symtab/874, the information in the manual about the
best debug formats for C++ is not only incorrect but actively
harmful.  Here's an attempt at a patch.  So:

* Eli: Is the TeXinfo okay?  What about the choice of cindex entries?
  When I actually looked at the index, I found that it generated three
  consecutive entries "C++ and ..." that all pointed at the same
  place; I'm tempted to get rid of the C++ and GCC entry, since that's
  really a special case of C++ and compilers.

* Daniel (and Michael): Is the content okay?  I decided to take a
  conservative approach, not promising support for compilers/debug
  formats that we don't intend to work on.

* Daniel, Michael: Once this goes in, should we get rid of the DWARF 1
  xfails in gdb.c++ and simply not run the C++ testsuite under DWARF
  1?

I'd like to apply this to 5.3 as well as mainline, on the slim chance
that 5.3.1 might happen, because the information in the doc now really
is bad.

David Carlton
carlton@math.stanford.edu

2003-02-03  David Carlton  <carlton@math.stanford.edu>

	* gdb.texinfo (C plus plus expressions): Correct info about
	compiler/debug formats for C++ debugging.  PR symtab/874.

Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.145
diff -u -p -r1.145 gdb.texinfo
--- gdb.texinfo	1 Feb 2003 20:51:06 -0000	1.145
+++ gdb.texinfo	3 Feb 2003 18:08:27 -0000
@@ -8062,28 +8062,22 @@ and @samp{@{&"hi", &"there", &"fred"@}} 
 @cindex expressions in C@t{++}
 @value{GDBN} expression handling can interpret most C@t{++} expressions.
 
-@cindex C@t{++} support, not in @sc{coff}
-@cindex @sc{coff} versus C@t{++}
-@cindex C@t{++} and object formats
-@cindex object formats and C@t{++}
-@cindex a.out and C@t{++}
-@cindex @sc{ecoff} and C@t{++}
-@cindex @sc{xcoff} and C@t{++}
+@cindex C@t{++} and debug formats
+@cindex debug formats and C@t{++}
 @cindex @sc{elf}/stabs and C@t{++}
 @cindex @sc{elf}/@sc{dwarf} and C@t{++}
-@c FIXME!! GDB may eventually be able to debug C++ using DWARF; check
-@c periodically whether this has happened...
+@cindex C@t{++} compilers
+@cindex C@t{++} and @value{NGCC}
+@cindex @value{NGCC} and C@t{++}
 @quotation
 @emph{Warning:} @value{GDBN} can only debug C@t{++} code if you use the
-proper compiler.  Typically, C@t{++} debugging depends on the use of
-additional debugging information in the symbol table, and thus requires
-special support.  In particular, if your compiler generates a.out, MIPS
-@sc{ecoff}, RS/6000 @sc{xcoff}, or @sc{elf} with stabs extensions to the
-symbol table, these facilities are all available.  (With @sc{gnu} CC,
-you can use the @samp{-gstabs} option to request stabs debugging
-extensions explicitly.)  Where the object code format is standard
-@sc{coff} or @sc{dwarf} in @sc{elf}, on the other hand, most of the C@t{++}
-support in @value{GDBN} does @emph{not} work.
+proper compiler and the proper debug format.  Currently, @value{GDBN}
+works best when debugging C@t{++} code that is compiled with
+@value{NGCC} 2.95.3 or with @value{NGCC} 3.1 or newer, using the options
+@option{-gdwarf-2} or @option{-gstabs+}.  DWARF 2 is preferred over
+stabs; newer versions of @value{NGCC} use DWARF 2 as the default
+whenever possible.  Other compilers and/or debug formats are likely to
+work badly or not at all when using @value{GDBN} to debugg C@t{++} code.
 @end quotation
 
 @enumerate


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

end of thread, other threads:[~2003-02-05  5:54 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-03 21:21 [rfa/doc] correct info about best C++ compilers/debug formats Michael Elizabeth Chastain
2003-02-04  6:16 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2003-02-04 14:41 Michael Elizabeth Chastain
2003-02-04  6:24 Michael Elizabeth Chastain
2003-02-04  8:08 ` Eli Zaretskii
     [not found] <200302032008.h13K8M230404@duracef.shout.net>
2003-02-03 20:14 ` David Carlton
2003-02-04  6:08   ` Eli Zaretskii
2003-02-04  7:04     ` Andrew Cagney
2003-02-04 21:17     ` David Carlton
2003-02-05  5:54       ` Eli Zaretskii
2003-02-03 19:29 David Carlton
2003-02-03 18:27 David Carlton
2003-02-03 18:37 ` Daniel Jacobowitz
2003-02-03 19:23 ` Eli Zaretskii
2003-02-03 20:09   ` David Carlton
2003-02-03 20:49     ` Andrew Cagney
2003-02-04  6:14       ` Eli Zaretskii
2003-02-04  5:59     ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox