Re: one-too-many location in breakpoint

Maciej W. Rozycki
2011-12-08T18:40:00Z

On Tue, 29 Nov 2011, Tom Tromey wrote:

> Tom> I fixed all the other problems. I'm running a regression test to make
> Tom> sure I didn't make something else break while doing this. If all goes
> Tom> well I will send out refreshed patches.
>
> I needed a couple of test suite changes to account for the different
> output. Otherwise all is well.
>
> This includes a test addition for the iterate_over_symbols change.
>
> I didn't write a new test for the "normal_menu" problem.

Just as a heads-up, this has regressed on the mips-sde-elf target (both
MIPS32 and MIPS16 multilibs) as follows:

break A::outer::foo (char*) const if (a == 3)
No symbol "a" in current context.
(gdb) FAIL: gdb.cp/ovsrch.exp: break A::outer::foo (char*) const if (a == 3)
break 'A::outer::foo (char*) const' if (a == 3)
No symbol "a" in current context.
(gdb) FAIL: gdb.cp/ovsrch.exp: break 'A::outer::foo (char*) const' if (a == 3)
[...]
break A::outer::foo (int) const if (a == 3)
No symbol "a" in current context.
(gdb) FAIL: gdb.cp/ovsrch.exp: break A::outer::foo (int) const if (a == 3)
break 'A::outer::foo (int) const' if (a == 3)
No symbol "a" in current context.
(gdb) FAIL: gdb.cp/ovsrch.exp: break 'A::outer::foo (int) const' if (a == 3)
[...]
break A::B::inner::foo (char*) const if (a == 3)
No symbol "a" in current context.
(gdb) FAIL: gdb.cp/ovsrch.exp: break A::B::inner::foo (char*) const if (a == 3)
break 'A::B::inner::foo (char*) const' if (a == 3)
No symbol "a" in current context.
(gdb) FAIL: gdb.cp/ovsrch.exp: break 'A::B::inner::foo (char*) const' if (a == 3)
[...]
break A::B::inner::foo (int) const if (a == 3)
No symbol "a" in current context.
(gdb) FAIL: gdb.cp/ovsrch.exp: break A::B::inner::foo (int) const if (a == 3)
break 'A::B::inner::foo (int) const' if (a == 3)
No symbol "a" in current context.
(gdb) FAIL: gdb.cp/ovsrch.exp: break 'A::B::inner::foo (int) const' if (a == 3)

No regressions on mips-linux-gnu though.

This is SDE code:

800011e8 <A::stop_here()>:
800011e8: 27bdfff8 addiu sp,sp,-8
800011ec: afbe0004 sw s8,4(sp)
800011f0: 03a0f021 move s8,sp
800011f4: 03c0e821 move sp,s8
800011f8: 8fbe0004 lw s8,4(sp)
800011fc: 27bd0008 addiu sp,sp,8
80001200: 03e00008 jr ra
80001204: 00000000 nop

(breakpoint at 800011f4), and this is Linux code:

00400790 <A::stop_here()>:
400790: 27bdfff8 addiu sp,sp,-8
400794: afbe0004 sw s8,4(sp)
400798: 03a0f021 move s8,sp
40079c: 03c0e821 move sp,s8
4007a0: 8fbe0004 lw s8,4(sp)
4007a4: 27bd0008 addiu sp,sp,8
4007a8: 03e00008 jr ra
4007ac: 00000000 nop

(breakpoint at 40079c). And I fail to see "a" being defined anywhere
throughout gdb.cp/ovsrch*, so I am curious as to why it succeeds for any
target (including mips-linux-gnu) in the first place.

I can see you made this adjustment:

- gdb_test "break ${class}::foo if (a == 3)" "Breakpoint (\[0-9\]).*"
+ gdb_test "break ${class}::hibob if (a_param == 3)" "Breakpoint

but there's this definition elsewhere in this test case:

set conditional1 "if (a == 3)"

as well, that you have left intact. Should it be adjusted accordingly?
Why is this condition accepted for some targets and not for some others
anyway?

Thoughts?

Maciej