Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* DWARF-related warnings in DJGPP build of GDB
@ 2009-04-15 10:10 Eli Zaretskii
  2009-04-15 16:22 ` Joel Brobecker
  2009-04-17  9:40 ` Eli Zaretskii
  0 siblings, 2 replies; 12+ messages in thread
From: Eli Zaretskii @ 2009-04-15 10:10 UTC (permalink / raw)
  To: gdb-patches

During debugging with DJGPP build of GDB built out of Apr 10th
snapshot, I sometimes see various warnings that seem to be related to
DWARF2.  Examples:

  During symbol reading, inner block not inside outer block in prompt_for_continue.
  During symbol reading, inner block (0x61ab0-0x6b68b) not inside outer block (0x64c90-0x64d2f).
  During symbol reading, Offset 174868 out of bounds for DW_AT_ranges attribute.

Is this a GCC problem, a GDB problem, or something else?  Should I be
worried?  My GCC version is 3.4.3, in case that matters.

Thanks.


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

* Re: DWARF-related warnings in DJGPP build of GDB
  2009-04-15 10:10 DWARF-related warnings in DJGPP build of GDB Eli Zaretskii
@ 2009-04-15 16:22 ` Joel Brobecker
  2009-04-15 19:26   ` Eli Zaretskii
  2009-04-17  9:40 ` Eli Zaretskii
  1 sibling, 1 reply; 12+ messages in thread
From: Joel Brobecker @ 2009-04-15 16:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

>   During symbol reading, inner block not inside outer block in prompt_for_continue.
>   During symbol reading, inner block (0x61ab0-0x6b68b) not inside outer block (0x64c90-0x64d2f).
>   During symbol reading, Offset 174868 out of bounds for DW_AT_ranges attribute.
> 
> Is this a GCC problem, a GDB problem, or something else?  Should I be
> worried?  My GCC version is 3.4.3, in case that matters.

What you can do is verify that the addresses are correctly read
by GDB.

You could try dumping the DWARF data if you have a tool that does that
on your system. Otherwise, you could check the assembly file where
prompt_for_continue is defined, and see if blocks indeed have
the correct relationship in terms of block addresses. It could be
the compiler emitting wrong debugging info, or the assembler/linker
toolchain that screws up. Or, possibly, GDB is reading the information
incorrectly, in which case, yes, you should be worried because that
might cause a fair amount of grief depending on what's going wrong.
I think this is unlikely, though.

-- 
Joel


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

* Re: DWARF-related warnings in DJGPP build of GDB
  2009-04-15 16:22 ` Joel Brobecker
@ 2009-04-15 19:26   ` Eli Zaretskii
  2009-04-15 19:31     ` Pedro Alves
  2009-04-15 19:48     ` Tom Tromey
  0 siblings, 2 replies; 12+ messages in thread
From: Eli Zaretskii @ 2009-04-15 19:26 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

> Date: Wed, 15 Apr 2009 09:22:42 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
> 
> >   During symbol reading, inner block not inside outer block in prompt_for_continue.
> >   During symbol reading, inner block (0x61ab0-0x6b68b) not inside outer block (0x64c90-0x64d2f).
> >   During symbol reading, Offset 174868 out of bounds for DW_AT_ranges attribute.
> > 
> > Is this a GCC problem, a GDB problem, or something else?  Should I be
> > worried?  My GCC version is 3.4.3, in case that matters.
> 
> What you can do is verify that the addresses are correctly read
> by GDB.
> 
> You could try dumping the DWARF data if you have a tool that does that
> on your system.

What tools can do that?  Is there a way of doing this with Binutils?

> Otherwise, you could check the assembly file where
> prompt_for_continue is defined, and see if blocks indeed have
> the correct relationship in terms of block addresses.

Hints or an example for how to do that will be highly appreciated.

> It could be the compiler emitting wrong debugging info, or the
> assembler/linker toolchain that screws up.

I will try to upgrade to newer Binutils and to GCC 3.4.4, and see if
that helps.

Thanks for the feedback.


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

* Re: DWARF-related warnings in DJGPP build of GDB
  2009-04-15 19:26   ` Eli Zaretskii
@ 2009-04-15 19:31     ` Pedro Alves
  2009-04-15 20:48       ` Eli Zaretskii
  2009-04-15 19:48     ` Tom Tromey
  1 sibling, 1 reply; 12+ messages in thread
From: Pedro Alves @ 2009-04-15 19:31 UTC (permalink / raw)
  To: gdb-patches, Eli Zaretskii; +Cc: Joel Brobecker

On Wednesday 15 April 2009 20:26:37, Eli Zaretskii wrote:
> > It could be the compiler emitting wrong debugging info, or the
> > assembler/linker toolchain that screws up.
> 
> I will try to upgrade to newer Binutils and to GCC 3.4.4, and see if
> that helps.
                                                     ^^^^^

Interesting, is there a reason to stay with the gcc 3 series on DJGPP?
I was using DJGPP gcc 4.2.3 last time I tried DJGPP (it's on the wiki),
and it was a prebuilt binary.  I don't remember if I saw those dwarf
issues.  May be worth giving that a shot too.

-- 
Pedro Alves


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

* Re: DWARF-related warnings in DJGPP build of GDB
  2009-04-15 19:26   ` Eli Zaretskii
  2009-04-15 19:31     ` Pedro Alves
@ 2009-04-15 19:48     ` Tom Tromey
  2009-04-15 20:17       ` Eli Zaretskii
  1 sibling, 1 reply; 12+ messages in thread
From: Tom Tromey @ 2009-04-15 19:48 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Joel Brobecker, gdb-patches

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

Pedro> You could try dumping the DWARF data if you have a tool that does that
Pedro> on your system.

Eli> What tools can do that?  Is there a way of doing this with Binutils?

You can use objdump -W or readelf -w (if DJGPP uses ELF) to dump debug
info.

Tom


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

* Re: DWARF-related warnings in DJGPP build of GDB
  2009-04-15 19:48     ` Tom Tromey
@ 2009-04-15 20:17       ` Eli Zaretskii
  2009-04-15 22:29         ` Joel Brobecker
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2009-04-15 20:17 UTC (permalink / raw)
  To: tromey; +Cc: brobecker, gdb-patches

> Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org
> From: Tom Tromey <tromey@redhat.com>
> Date: Wed, 15 Apr 2009 13:47:45 -0600
> 
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
> 
> Pedro> You could try dumping the DWARF data if you have a tool that does that
> Pedro> on your system.
> 
> Eli> What tools can do that?  Is there a way of doing this with Binutils?
> 
> You can use objdump -W or readelf -w (if DJGPP uses ELF) to dump debug
> info.

Thanks.  readelf is out, because DJGPP uses COFF.  "objdump -W" (with
a recent enough Binutils ;-) seems to do the job, thanks.  How to use
the info it dumps on me to track down my particular problems is
another matter.  Hmmm...


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

* Re: DWARF-related warnings in DJGPP build of GDB
  2009-04-15 19:31     ` Pedro Alves
@ 2009-04-15 20:48       ` Eli Zaretskii
  2009-04-15 21:00         ` Pedro Alves
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2009-04-15 20:48 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches, brobecker

> From: Pedro Alves <pedro@codesourcery.com>
> Date: Wed, 15 Apr 2009 20:31:19 +0100
> Cc: Joel Brobecker <brobecker@adacore.com>
> 
> On Wednesday 15 April 2009 20:26:37, Eli Zaretskii wrote:
> > > It could be the compiler emitting wrong debugging info, or the
> > > assembler/linker toolchain that screws up.
> > 
> > I will try to upgrade to newer Binutils and to GCC 3.4.4, and see if
> > that helps.
>                                                      ^^^^^
> 
> Interesting, is there a reason to stay with the gcc 3 series on DJGPP?

I'm very conservative in upgrading my development tools.  As long as
something works fine for me, I'm reluctant to do significant upgrades,
because doing so runs a risk of destabilizing the development
environment, and with so little free time, I cannot afford that,
unless strictly necessary.

> I was using DJGPP gcc 4.2.3 last time I tried DJGPP (it's on the wiki),
> and it was a prebuilt binary.

A DJGPP port of GCC 4.3.2 is available since Sep 2008, but I dislike
GCC 4.x because it whines too much about perfectly valid C code.  (It
may not be a problem with GDB sources, but I compile other projects
besides GDB.)  So, if GCC 3.4.4 solves the problems I have, I won't
have a significant incentive to go to 4.x.

> I don't remember if I saw those dwarf issues.  May be worth giving
> that a shot too.

If 3.x won't help, then I might do just that.

Thanks.


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

* Re: DWARF-related warnings in DJGPP build of GDB
  2009-04-15 20:48       ` Eli Zaretskii
@ 2009-04-15 21:00         ` Pedro Alves
  0 siblings, 0 replies; 12+ messages in thread
From: Pedro Alves @ 2009-04-15 21:00 UTC (permalink / raw)
  To: gdb-patches, Eli Zaretskii; +Cc: brobecker

On Wednesday 15 April 2009 21:48:38, Eli Zaretskii wrote:

> > Interesting, is there a reason to stay with the gcc 3 series on DJGPP?
> 
> I'm very conservative in upgrading my development tools.  As long as
> something works fine for me, I'm reluctant to do significant upgrades,
> because doing so runs a risk of destabilizing the development
> environment, and with so little free time, I cannot afford that,
> unless strictly necessary.

Ah, understood.  I was just wondering if there was some
fundamental issue with gcc 4 series, for the next time I might
try something with DJGPP.  Curiosity killed.  Thank you.

-- 
Pedro Alves


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

* Re: DWARF-related warnings in DJGPP build of GDB
  2009-04-15 20:17       ` Eli Zaretskii
@ 2009-04-15 22:29         ` Joel Brobecker
  0 siblings, 0 replies; 12+ messages in thread
From: Joel Brobecker @ 2009-04-15 22:29 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: tromey, gdb-patches

> Thanks.  readelf is out, because DJGPP uses COFF.  "objdump -W" (with
> a recent enough Binutils ;-) seems to do the job, thanks.  How to use
> the info it dumps on me to track down my particular problems is
> another matter.  Hmmm...

You can search for that function that GDB complained about, and look
at the address attributes for the function itself, as well as any
inner block (DW_TAG_lexical_block is would imagine).

-- 
Joel


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

* Re: DWARF-related warnings in DJGPP build of GDB
  2009-04-15 10:10 DWARF-related warnings in DJGPP build of GDB Eli Zaretskii
  2009-04-15 16:22 ` Joel Brobecker
@ 2009-04-17  9:40 ` Eli Zaretskii
  2009-04-17 10:11   ` Mark Kettenis
  1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2009-04-17  9:40 UTC (permalink / raw)
  To: gdb-patches

> Date: Wed, 15 Apr 2009 13:10:49 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> During debugging with DJGPP build of GDB built out of Apr 10th
> snapshot, I sometimes see various warnings that seem to be related to
> DWARF2.  Examples:
> 
>   During symbol reading, inner block not inside outer block in prompt_for_continue.
>   During symbol reading, inner block (0x61ab0-0x6b68b) not inside outer block (0x64c90-0x64d2f).
>   During symbol reading, Offset 174868 out of bounds for DW_AT_ranges attribute.
> 
> Is this a GCC problem, a GDB problem, or something else?  Should I be
> worried?  My GCC version is 3.4.3, in case that matters.

Btw, I see warnings on GNU/Linux as well, with GCC 4.0.3 and Binutils
2.16.91:

  During symbol reading, incomplete CFI data; unspecified registers (e.g., rax) at 0x444d44.
  During symbol reading, DW_AT_type missing from DW_TAG_subrange_type.

This is when debugging a recent snapshot of GDB with itself.

Does anyone else see this?  Are the compiler and/or Binutils installed
on that system (fencepost.gnu.org) too old?


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

* Re: DWARF-related warnings in DJGPP build of GDB
  2009-04-17  9:40 ` Eli Zaretskii
@ 2009-04-17 10:11   ` Mark Kettenis
  2009-04-17 10:19     ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Mark Kettenis @ 2009-04-17 10:11 UTC (permalink / raw)
  To: eliz; +Cc: gdb-patches

> Date: Fri, 17 Apr 2009 12:40:04 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > Date: Wed, 15 Apr 2009 13:10:49 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > 
> > During debugging with DJGPP build of GDB built out of Apr 10th
> > snapshot, I sometimes see various warnings that seem to be related to
> > DWARF2.  Examples:
> > 
> >   During symbol reading, inner block not inside outer block in prompt_for_continue.
> >   During symbol reading, inner block (0x61ab0-0x6b68b) not inside outer block (0x64c90-0x64d2f).
> >   During symbol reading, Offset 174868 out of bounds for DW_AT_ranges attribute.
> > 
> > Is this a GCC problem, a GDB problem, or something else?  Should I be
> > worried?  My GCC version is 3.4.3, in case that matters.
> 
> Btw, I see warnings on GNU/Linux as well, with GCC 4.0.3 and Binutils
> 2.16.91:
> 
>   During symbol reading, incomplete CFI data; unspecified registers (e.g., rax) at 0x444d44.
>   During symbol reading, DW_AT_type missing from DW_TAG_subrange_type.
> 
> This is when debugging a recent snapshot of GDB with itself.

Which probably means that it used the .gdbinit that is automatically
generated in the build directory, which has

set complaints 1

in it.  This makes GDB very picky about the DWARF it is reading.  

> Does anyone else see this?  Are the compiler and/or Binutils installed
> on that system (fencepost.gnu.org) too old?

Yes, I see messages very similar to those.  The exact messages you see
depend (mostly) on the specific version of GCC you use.  Some of these
bugs have been fixed in later versions, others remain.  For most of
these issues, we have workarounds in GDB.


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

* Re: DWARF-related warnings in DJGPP build of GDB
  2009-04-17 10:11   ` Mark Kettenis
@ 2009-04-17 10:19     ` Eli Zaretskii
  0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2009-04-17 10:19 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

> Date: Fri, 17 Apr 2009 12:10:35 +0200 (CEST)
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
> CC: gdb-patches@sourceware.org
> 
> >   During symbol reading, DW_AT_type missing from DW_TAG_subrange_type.
> > 
> > This is when debugging a recent snapshot of GDB with itself.
> 
> Which probably means that it used the .gdbinit that is automatically
> generated in the build directory, which has
> 
> set complaints 1
> 
> in it.  This makes GDB very picky about the DWARF it is reading.  

Right.  Thanks for pointing this out.  That is probably the reason
that the DJGPP build complains as well (which was what started this
thread): it was also while debugging GDB with itself.


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

end of thread, other threads:[~2009-04-17 10:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-15 10:10 DWARF-related warnings in DJGPP build of GDB Eli Zaretskii
2009-04-15 16:22 ` Joel Brobecker
2009-04-15 19:26   ` Eli Zaretskii
2009-04-15 19:31     ` Pedro Alves
2009-04-15 20:48       ` Eli Zaretskii
2009-04-15 21:00         ` Pedro Alves
2009-04-15 19:48     ` Tom Tromey
2009-04-15 20:17       ` Eli Zaretskii
2009-04-15 22:29         ` Joel Brobecker
2009-04-17  9:40 ` Eli Zaretskii
2009-04-17 10:11   ` Mark Kettenis
2009-04-17 10:19     ` Eli Zaretskii

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