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]

basic gdb usage question


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


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