This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] MI ignores conditions for pending breakpoints
>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
Marc> Here is a test case for the problem. I'm not thrilled
Marc> with it but it does fail before the fix and pass
Marc> after, so it is probably sufficient.
Marc> What I don't like about it is that it verifies
Marc> that the condition prevents the breakpoint from
Marc> hitting instead of making sure a breakpoint hits at
Marc> the right condition. I had to do that because the alternative
Marc> is to use a variable in the sharedlib for the condition,
Marc> but then I would need to explicitly specify the sharedlib
Marc> file name and line number when setting the breakpoint which
Marc> didn't seem very future-proof.
Marc> What do you think?
I think as long as it exercises the bug -- fails before the patch and
passes after -- and is reasonably clean, then it is fine.
Coding in the name of the library, etc, is also fine; there are some
tools in the test suite to make this a bit less fragile, namely using
variables in place of file names and using gdb_get_line_number.
I don't have any problem with the approach in the patch though.
Marc> +# Set pending breakpoint with a condition via MI
Marc> +# We use a condition that will prevent the bp from hitting
Periods after sentences.
Marc> +# We should not stop on the breakpiont at pendfunc0
Typo, "breakpoint".
Ok with those changes plus a ChangeLog entry.
Tom