basic gdb usage question

Matt Funk matze999@gmx.net
Mon Jun 25 23:08:00 GMT 2007


Hi, 
( i hope this is the correct mailing list to email this question to).

I am just starting to use gdb and so have a lot to learn. 
Basically my problem is that i want to set a breakpoint on multiple 
conditions.

So i want to set the breakpoint in file A at line M under condition X.
However, another condition that needs to be met before breaking is in file B 
with condition Y.

condition X: the value of a local variable is (say) 2.
condition Y: the value of a variable is (say) 3.

Is this possible to set multiple conditions for one breakpoint? I thought 
about setting two breakpoints but that would not do what i need it to do.

Along the same lines, is it then possible to create a condition that 
references a variable outside the local scope?

thanks
mat



More information about the Gdb mailing list