List Info

Thread: scoping rules for disp / bp where there is no code




scoping rules for disp / bp where there is no code
country flaguser name
Austria
2008-03-25 08:53:05
Hi,

We use gdb 6.6. and stabs.

When having disp'ed a global variable and a
variable/parameter with the 
same name is also local to a function,
then gdb does not show the local value, when stepping into
the function.
Without looking into code I suppose that the binding to an
address is when 
the user does "disp ...". 
        But shouldn't GDB better use the scoping rules given
by C/C++ or 
other languages?
        Does that depend on the type of debug info used?
Else a help hint should maybe be added.

Another thing:
    GDB's response to setting a breakpoint at a line where
there is no 
code, i.e. which is not in the line table, is as if there
were code,
    just that the actual breakpoint is set in the line
nearest to the line 
specified in the command, which can be quite far away.
    I suggest that the message in this case should show the
actual line 
where the bp was set, maybe with the additional info that
the specified 
line does not have code.


Best Regards, Roland

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )