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]

Re: test availability of variables in context from user command


Rob Quill wrote:
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.
It's exactly what I want to check.
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.
Unfortunately, this solution doesn't fit our needs because our gdb user commands will crash on non-patched gdb versions.
But I think it should be a good idea to have a such integrated functionality (a full scripting language too).


Thanks a lot for your answers.

Regards,
Christophe.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]