Hi, I wrote an email about this a while ago, but it was rather consice and didn't explain the problem well.
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. I have be warned that attempting to do this (from GDB's perspective) is not likely to be easy, and will more than likely bring forth new problems, but doing it would greatly help the correctness of what I am trying to do, and unless anyone has any objections, I think there is no reason not to make something meet the specification. 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? Thanks for your help. Rob