This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
It's exactly what I want to check.I modifed GDB to make in possible to cehck whether variables are in scope. I'm not sure if that's what you want, but you can do things like:
print $in_scope(var1);
or in a command file:
if($in_scope(var1) == 1)
i.e. do something if var1 is in scope.
Unfortunately, this solution doesn't fit our needs because our gdb user commands will crash on non-patched gdb versions.At the moment it only covers certain cases as I haven't had time to finish it off, but it wouldn't be hard to do. I modified it against 6.6, but hopefully I can forge a patch out of it, if you want it.
Regards, Christophe.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |