DBX: Unable to get conditional breakpoint to work

107 Views Asked by At

I could not get:

stop at "<file_name>":<line_number> if (strncmp(<filename>.<function_name>.<structure_variable_name>.<variable_name>, "<some_string>", <length_of_the_string>) = 0) 

to work while debugging a program in DBX (on an AIX machine). It doesn't seem to consider this breakpoint. It stops at the line, but the variable value I get is different from the one I am looking for, when it stops.

However, as a workaround, this worked:

stop at "<file_name>":<line_number> if (<filename>.<function_name>.<structure_variable_name>.<variable_name>[6] == '2') && (<filename>.<function_name>.<structure_variable_name>.<variable_name>[7] == '4') && (<filename>.<function_name>.<structure_variable_name>.<variable_name>[8] == '5')

variable_name is a chracter array of size 9, and is part of a struct. An example of the value of variable_name is "060435245".

What am I doing wrong in the first instance? The second one is very tedious. Can someone please help?

0

There are 0 best solutions below