bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb-5.0 scope bug


From: Michael Elizabeth Chastain
Subject: Re: gdb-5.0 scope bug
Date: Tue, 13 Feb 2001 20:16:07 -0800

Hi Fred,

> Do I need to give a more specific bug test case?

Not any more.  :)  This was a gcc bug, and it's fixed in the gcc CVS
repository.  You can get a recent gcc snapshot if you like.

The details were: gcc was not scoping locals correctly.  The scope of
every local variable was getting set to the whole function.  That's
why gdb always picked up the outer value.

One way to see this is to issue "info scope" at the first line of the
function and check whether every variable in the function is declared
or not.

A lot of symbol table bugs depend on the interface between gcc and gdb.
I'm not saying they are always gcc's fault (although this one was).
I'm saying that we always need to know the version of gcc in use when
reporting a gdb bug.  I think that's why you saw a bug, and Daniel
Berlin didn't.

If I recall correctly, the actual bug fix was this patch in gcc:

  ----------------------------
  revision 1.70
  date: 2000/12/31 07:22:28;  author: rth;  state: Exp;  lines: +9 -6
          * dbxout.c (dbxout_block): Invert logic on eliding LBRAC/RBRAC.
          Initialize variables properly for DBX_LBRAC_FIRST.

Michael Elizabeth Chastain
<address@hidden>
"love without fear"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]