"Rob Quill" <[EMAIL PROTECTED]> writes:

> My problem is thus: When using GDB do debug the follow bit of code:
> 
> int i = 0;
> int j = 2;
> int k = 3;
> 
> If I set a breakpoint at the 3rd line, before int k = 3; has been
> executed, and check if k is in scope, I find that it is, when, of
> course, it shouldn't be. I emailed the GDB mailing list about this and
> was informed that the problem arose because GCC does not emmit and GDB
> cannot handle the DW_AT_start_scope attribute (DWARF 3 standard, page
> 61, item 11). Normally this is not a problem, but in my particular
> case, the checking of variable values is automated, with decisions
> being made on the value of those variables, so a variable being in
> scope and having an incorrect value will result in a incorrect
> decision being made.

...

> So, assuming no-one has any objections, my question is, how do I go
> about trying to do it in GCC? What should I look at and where should I
> look?

Look in gcc/dwarf2out.c at the handling of VAR_DECL.  Good luck.

Ian

Reply via email to