public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Michal Ludvig <mludvig@suse.cz>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: gdb <gdb@sources.redhat.com>, Daniel Jacobowitz <drow@mvista.com>
Subject: Re: Dwarf2-related Internal error
Date: Thu, 14 Aug 2003 13:17:00 -0000	[thread overview]
Message-ID: <3F3B8C04.1010309@suse.cz> (raw)
In-Reply-To: <16187.34103.759484.814559@localhost.redhat.com>

Elena Zannoni told me that:
> Michal Ludvig writes:
>  > Hi Daniel, Elena and others,
>  > this problem is still present in recent HEAD - could anyone who knows 
>  > the internals of symbols handling and .debug_info please help me with 
>  > fixing it, please? I tried to debug it myself but got quickly lost in 
>  > all those symbols<->types<->other_types references and couldn't find 
>  > where the problem originates.
>  > 
>  > Also pointing out the right direction where to look for the bug would 
>  > help me a lot :-)
>  > 
>  > BTW I also filled a PR with a very nice number 1333 for this issue.
>  > 
>  > Thanks in advance!
>  > 
>  > Michal Ludvig
> 
> I don't have much time to devote to this, but usually that kind of
> error is generated by some infinite loop that gdb got itself into.

Unlikely. The immediate problem is that the size of function's parameter 
'xx' is too big:

(top-gdb) f
#0  read_var_value (var=0x8b35c0, frame=0x85ad98)
     at ../../gdb-head/gdb/findvar.c:397
397       struct type *type = SYMBOL_TYPE (var);
(top-gdb) p *var->type
$2 = {pointer_type = 0x0, reference_type = 0x0, chain = 0x89fc00,
   instance_flags = 0, length = 4294967292, main_type = 0x89fc28}
(top-gdb) p (int)4294967292
$3 = -4
(top-gdb)

Very likely it was ment to be -4 because something somewhere in the 
debug info was wrongly interpreted.

 From what is this length computed and where? Somewhere in dwarf2read.c?

> Does the same happen for 386? Maybe comparing the two would help. 

Unfortunately i386 generates completely different code and debug info 
(it apparently doesn't use dwarf2 - maybe dwarf1? Sections .debug, 
.lines, ...) that couldn't be reasonably compared. I wasn't able to 
convince it to produce dwarf2 :-(

Thanks for the reply anyway :-)

Michal Ludvig
-- 
* SuSE CR, s.r.o     * mludvig@suse.cz
* (+420) 296.545.373 * http://www.suse.cz

  reply	other threads:[~2003-08-14 13:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-08 14:36 Michal Ludvig
2003-08-14 11:03 ` Michal Ludvig
2003-08-14 12:41   ` Elena Zannoni
2003-08-14 13:17     ` Michal Ludvig [this message]
2003-08-14 14:56       ` Michal Ludvig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F3B8C04.1010309@suse.cz \
    --to=mludvig@suse.cz \
    --cc=drow@mvista.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).