Re: [PATCH v4 0/2] Breakpoint conditions at locations with differing contexts

Gary Benson via Gdb-patches
2020-10-28T16:57:41Z

Hi Baris,

Tankut Baris Aktemur wrote:
> create mode 100644 gdb/testsuite/gdb.base/condbreak-multi-context.exp

This test fails if you build the test executable with Clang. I've
inlined a full diff of the gdb.log files below, but I think the
issue is that Clang and GCC are writing the code or the debuginfo
in a different order, so where the test expects to see breakpoints
like:

1.1 Base::func()
1.2 A::func()
1.3 C::func()

but what it gets with Clang is:

1.1 A::func()
1.2 Base::func()
1.3 C::func()

Are you able to update the test to handle this?

In case you're not familiar with switching compilers you should be
able to do it by adding CC_FOR_TARGET=clang and CXX_FOR_TARGET=clang++
to your RUNTESTFLAGS, e.g.:

cd /path/to/your/build
export RUNTESTFLAGS="CC_FOR_TARGET=clang CXX_FOR_TARGET=clang++"
make check TESTS=gdb.base/condbreak-multi-context.exp

Cheers,
Gary

--
--- /gdbtest/2020-10-28/with-gcc/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/gdb.log 2020-10-28 15:42:08.465601501 +0000
+++ /gdbtest/2020-10-28/with-clang/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/gdb.log 2020-10-28 15:53:48.394477290 +0000
@@ -1,24 +1,24 @@
-Test run by gdbtest on Wed Oct 28 15:42:04 2020
+Test run by gdbtest on Wed Oct 28 15:53:43 2020
Native configuration is x86_64-pc-linux-gnu

=== gdb tests ===

Schedule of variations:
- gdbtest-with-gcc
+ gdbtest-with-clang

-Running target gdbtest-with-gcc
-Using /gdbtest/gdbtest/boards/gdbtest-with-gcc.exp as board description file for target.
+Running target gdbtest-with-clang
+Using /gdbtest/gdbtest/boards/gdbtest-with-clang.exp as board description file for target.
Using /gdbtest/gdbtest/boards/gdbtest-base.exp as board description file for target.
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /gdbtest/src/gdb/testsuite/boards/../boards/local-board.exp as board description file for target.
Using /gdbtest/src/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file.
Running /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.exp ...
-get_compiler_info: gcc-10-2-1
-Executing on host: gcc -fno-stack-protector -fdiagnostics-color=never -c -g -o /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context0.o /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc (timeout = 300)
-spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never -c -g -o /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context0.o /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc
-Executing on host: gcc -fno-stack-protector /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context0.o -fdiagnostics-color=never -g -lm -o /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context (timeout = 300)
-spawn -ignore SIGHUP gcc -fno-stack-protector /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context0.o -fdiagnostics-color=never -g -lm -o /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context
+get_compiler_info: clang-12-0-0
+Executing on host: clang -fdiagnostics-color=never -Wno-unknown-warning-option -c -g -o /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context0.o /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc (timeout = 300)
+spawn -ignore SIGHUP clang -fdiagnostics-color=never -Wno-unknown-warning-option -c -g -o /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context0.o /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc
+Executing on host: clang /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context0.o -fdiagnostics-color=never -Wno-unknown-warning-option -g -lm -o /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context (timeout = 300)
+spawn -ignore SIGHUP clang /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context0.o -fdiagnostics-color=never -Wno-unknown-warning-option -g -lm -o /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context
spawn /gdbtest/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /gdbtest/build/gdb/testsuite/../data-directory -iex set height 0 -iex set width 0 -ex set sysroot
GNU gdb (GDB) 11.0.50.20201027-git
Copyright (C) 2020 Free Software Foundation, Inc.
@@ -47,24 +47,24 @@
(gdb) file /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context
Reading symbols from /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context...
(gdb) break func if a == 10
-warning: failed to validate condition at location 1, disabling:
+warning: failed to validate condition at location 2, disabling:
No symbol "a" in current context.
warning: failed to validate condition at location 3, disabling:
No symbol "a" in current context.
-Breakpoint 1 at 0x401164: func. (3 locations)
-(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 1: define bp with condition a == 10
+Breakpoint 1 at 0x4011e8: func. (3 locations)
+(gdb) FAIL: gdb.base/condbreak-multi-context.exp: scenario 1: define bp with condition a == 10
print /d $bpnum
$1 = 1
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 1: get bpnum1
break func if c == 30
-Note: breakpoint 1 also set at pc 0x40117c.
-Note: breakpoint 1 also set at pc 0x401170.
-Note: breakpoint 1 also set at pc 0x401164.
+Note: breakpoint 1 also set at pc 0x4011e8.
+Note: breakpoint 1 also set at pc 0x4011f8.
+Note: breakpoint 1 also set at pc 0x401208.
warning: failed to validate condition at location 1, disabling:
No symbol "c" in current context.
warning: failed to validate condition at location 2, disabling:
No symbol "c" in current context.
-Breakpoint 2 at 0x401164: func. (3 locations)
+Breakpoint 2 at 0x4011e8: func. (3 locations)
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 1: define bp with condition c == 30
print /d $bpnum
$2 = 2
@@ -73,20 +73,20 @@
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
stop only if a == 10
-1.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-1.2 y 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-1.3 N* 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+1.1 y 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+1.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+1.3 N* 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
2 breakpoint keep y <MULTIPLE>
stop only if c == 30
-2.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-2.2 N* 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-2.3 y 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+2.1 N* 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+2.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+2.3 y 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(*): Breakpoint condition is invalid at this location.
-(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 1: info break 1
+(gdb) FAIL: gdb.base/condbreak-multi-context.exp: scenario 1: info break 1
run
Starting program: /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context

-Breakpoint 1, A::func (this=0x7fffffffcfd4) at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+Breakpoint 1, A::func (this=0x7fffffffcfc0) at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
31 void func () {}
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 1: run until A::func
print a
@@ -95,7 +95,7 @@
continue
Continuing.

-Breakpoint 2, C::func (this=0x7fffffffcfcc) at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+Breakpoint 2, C::func (this=0x7fffffffcfb8) at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
39 void func () {}
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 1: run until C::func
print c
@@ -103,24 +103,24 @@
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 1: print c
continue
Continuing.
-[Inferior 1 (process 3757547) exited normally]
+[Inferior 1 (process 46941) exited normally]
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 1: continue until exit
info break 1 2
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
stop only if a == 10
breakpoint already hit 1 time
-1.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-1.2 y 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-1.3 N* 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+1.1 y 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+1.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+1.3 N* 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
2 breakpoint keep y <MULTIPLE>
stop only if c == 30
breakpoint already hit 1 time
-2.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-2.2 N* 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-2.3 y 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+2.1 N* 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+2.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+2.3 y 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(*): Breakpoint condition is invalid at this location.
-(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 1: info break 2
+(gdb) FAIL: gdb.base/condbreak-multi-context.exp: scenario 1: info break 2
spawn /gdbtest/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /gdbtest/build/gdb/testsuite/../data-directory -iex set height 0 -iex set width 0 -ex set sysroot
GNU gdb (GDB) 11.0.50.20201027-git
Copyright (C) 2020 Free Software Foundation, Inc.
@@ -149,24 +149,24 @@
(gdb) file /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context
Reading symbols from /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context...
(gdb) break func
-Breakpoint 1 at 0x401164: func. (3 locations)
+Breakpoint 1 at 0x4011e8: func. (3 locations)
(gdb) print /d $bpnum
$1 = 1
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 2: get bpnum1
break func
-Note: breakpoint 1 also set at pc 0x40117c.
-Note: breakpoint 1 also set at pc 0x401170.
-Note: breakpoint 1 also set at pc 0x401164.
-Breakpoint 2 at 0x401164: func. (3 locations)
+Note: breakpoint 1 also set at pc 0x4011e8.
+Note: breakpoint 1 also set at pc 0x4011f8.
+Note: breakpoint 1 also set at pc 0x401208.
+Breakpoint 2 at 0x4011e8: func. (3 locations)
(gdb) print /d $bpnum
$2 = 2
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 2: get bpnum2
cond 1 a == 10
-warning: failed to validate condition at location 1.1, disabling:
+warning: failed to validate condition at location 1.2, disabling:
No symbol "a" in current context.
warning: failed to validate condition at location 1.3, disabling:
No symbol "a" in current context.
-(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 2: cond 1 a == 10
+(gdb) FAIL: gdb.base/condbreak-multi-context.exp: scenario 2: cond 1 a == 10
cond 2 c == 30
warning: failed to validate condition at location 2.1, disabling:
No symbol "c" in current context.
@@ -177,20 +177,20 @@
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
stop only if a == 10
-1.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-1.2 y 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-1.3 N* 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+1.1 y 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+1.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+1.3 N* 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
2 breakpoint keep y <MULTIPLE>
stop only if c == 30
-2.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-2.2 N* 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-2.3 y 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+2.1 N* 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+2.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+2.3 y 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(*): Breakpoint condition is invalid at this location.
-(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 2: info break 1
+(gdb) FAIL: gdb.base/condbreak-multi-context.exp: scenario 2: info break 1
run
Starting program: /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context

-Breakpoint 1, A::func (this=0x7fffffffcfd4) at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+Breakpoint 1, A::func (this=0x7fffffffcfc0) at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
31 void func () {}
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 2: run until A::func
print a
@@ -199,7 +199,7 @@
continue
Continuing.

-Breakpoint 2, C::func (this=0x7fffffffcfcc) at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+Breakpoint 2, C::func (this=0x7fffffffcfb8) at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
39 void func () {}
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 2: run until C::func
print c
@@ -207,24 +207,24 @@
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 2: print c
continue
Continuing.
-[Inferior 1 (process 3757794) exited normally]
+[Inferior 1 (process 47152) exited normally]
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 2: continue until exit
info break 1 2
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
stop only if a == 10
breakpoint already hit 1 time
-1.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-1.2 y 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-1.3 N* 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+1.1 y 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+1.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+1.3 N* 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
2 breakpoint keep y <MULTIPLE>
stop only if c == 30
breakpoint already hit 1 time
-2.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-2.2 N* 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-2.3 y 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+2.1 N* 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+2.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+2.3 y 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(*): Breakpoint condition is invalid at this location.
-(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 2: info break 2
+(gdb) FAIL: gdb.base/condbreak-multi-context.exp: scenario 2: info break 2
spawn /gdbtest/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /gdbtest/build/gdb/testsuite/../data-directory -iex set height 0 -iex set width 0 -ex set sysroot
GNU gdb (GDB) 11.0.50.20201027-git
Copyright (C) 2020 Free Software Foundation, Inc.
@@ -253,24 +253,24 @@
(gdb) file /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context
Reading symbols from /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context...
(gdb) break func
-Breakpoint 1 at 0x401164: func. (3 locations)
+Breakpoint 1 at 0x4011e8: func. (3 locations)
(gdb) print /d $bpnum
$1 = 1
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: get bpnum1
break func
-Note: breakpoint 1 also set at pc 0x40117c.
-Note: breakpoint 1 also set at pc 0x401170.
-Note: breakpoint 1 also set at pc 0x401164.
-Breakpoint 2 at 0x401164: func. (3 locations)
+Note: breakpoint 1 also set at pc 0x4011e8.
+Note: breakpoint 1 also set at pc 0x4011f8.
+Note: breakpoint 1 also set at pc 0x401208.
+Breakpoint 2 at 0x4011e8: func. (3 locations)
(gdb) print /d $bpnum
$2 = 2
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: get bpnum2
cond 1 a == 10
-warning: failed to validate condition at location 1.1, disabling:
+warning: failed to validate condition at location 1.2, disabling:
No symbol "a" in current context.
warning: failed to validate condition at location 1.3, disabling:
No symbol "a" in current context.
-(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: cond 1 a == 10
+(gdb) FAIL: gdb.base/condbreak-multi-context.exp: scenario 3: cond 1 a == 10
cond 2 c == 30
warning: failed to validate condition at location 2.1, disabling:
No symbol "c" in current context.
@@ -288,9 +288,9 @@
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
stop only if c == 30
-1.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-1.2 N* 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-1.3 y 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+1.1 N* 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+1.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+1.3 y 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(*): Breakpoint condition is invalid at this location.
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: check bp 1 after changing the condition
cond 1
@@ -301,9 +301,9 @@
info break 1
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
-1.1 y 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-1.2 y 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-1.3 y 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+1.1 y 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+1.2 y 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+1.3 y 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: check bp 1 after resetting the condition
disable 2.2
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: disable 2.2
@@ -311,9 +311,9 @@
Num Type Disp Enb Address What
2 breakpoint keep y <MULTIPLE>
stop only if c == 30
-2.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-2.2 N* 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-2.3 y 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+2.1 N* 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+2.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+2.3 y 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(*): Breakpoint condition is invalid at this location.
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: check bp 2 after disabling loc 2
cond 2
@@ -323,18 +323,18 @@
info break 2
Num Type Disp Enb Address What
2 breakpoint keep y <MULTIPLE>
-2.1 y 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-2.2 n 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-2.3 y 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+2.1 y 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+2.2 n 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+2.3 y 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: check bp 2 loc 2 should remain disabled
disable 2.3
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: disable 2.3
info break 2
Num Type Disp Enb Address What
2 breakpoint keep y <MULTIPLE>
-2.1 y 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-2.2 n 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-2.3 n 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+2.1 y 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+2.2 n 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+2.3 n 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: check bp 2 after disabling loc 3
cond 2 c == 30
warning: failed to validate condition at location 2.1, disabling:
@@ -344,9 +344,9 @@
Num Type Disp Enb Address What
2 breakpoint keep y <MULTIPLE>
stop only if c == 30
-2.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-2.2 N* 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-2.3 n 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+2.1 N* 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+2.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+2.3 n 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(*): Breakpoint condition is invalid at this location.
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: check bp 2 loc 3 should remain disabled
enable 2.1
@@ -356,9 +356,9 @@
Num Type Disp Enb Address What
2 breakpoint keep y <MULTIPLE>
stop only if c == 30
-2.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-2.2 N* 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-2.3 n 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+2.1 N* 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+2.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+2.3 n 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(*): Breakpoint condition is invalid at this location.
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: check bp 2 after enable attempt
cond 2 garbage
@@ -367,7 +367,7 @@
delete 1
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: delete 1
break main
-Breakpoint 3 at 0x40110e: file /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc, line 45.
+Breakpoint 3 at 0x40111f: file /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc, line 45.
(gdb) run
Starting program: /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context

@@ -376,7 +376,7 @@
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: start
continue
Continuing.
-[Inferior 1 (process 3758069) exited normally]
+[Inferior 1 (process 47358) exited normally]
(gdb) PASS: gdb.base/condbreak-multi-context.exp: scenario 3: continue until exit
spawn /gdbtest/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /gdbtest/build/gdb/testsuite/../data-directory -iex set height 0 -iex set width 0 -ex set sysroot
GNU gdb (GDB) 11.0.50.20201027-git
@@ -406,7 +406,7 @@
(gdb) file /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context
Reading symbols from /gdbtest/build/gdb/testsuite/outputs/gdb.base/condbreak-multi-context/condbreak-multi-context...
(gdb) break func
-Breakpoint 1 at 0x401164: func. (3 locations)
+Breakpoint 1 at 0x4011e8: func. (3 locations)
(gdb) print /d $bpnum
$1 = 1
(gdb) PASS: gdb.base/condbreak-multi-context.exp: force: get bpnum1
@@ -422,22 +422,22 @@
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
stop only if foo
-1.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-1.2 N* 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-1.3 N* 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+1.1 N* 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+1.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+1.3 N* 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(*): Breakpoint condition is invalid at this location.
(gdb) PASS: gdb.base/condbreak-multi-context.exp: force: check bp 1 after forcing the condition
break func -force-condition if baz
-Note: breakpoint 1 also set at pc 0x40117c.
-Note: breakpoint 1 also set at pc 0x401170.
-Note: breakpoint 1 also set at pc 0x401164.
+Note: breakpoint 1 also set at pc 0x4011e8.
+Note: breakpoint 1 also set at pc 0x4011f8.
+Note: breakpoint 1 also set at pc 0x401208.
warning: failed to validate condition at location 1, disabling:
No symbol "baz" in current context.
warning: failed to validate condition at location 2, disabling:
No symbol "baz" in current context.
warning: failed to validate condition at location 3, disabling:
No symbol "baz" in current context.
-Breakpoint 2 at 0x401164: func. (3 locations)
+Breakpoint 2 at 0x4011e8: func. (3 locations)
(gdb) print /d $bpnum
$2 = 2
(gdb) PASS: gdb.base/condbreak-multi-context.exp: force: get bpnum2
@@ -445,16 +445,17 @@
Num Type Disp Enb Address What
2 breakpoint keep y <MULTIPLE>
stop only if baz
-2.1 N* 0x0000000000401164 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
-2.2 N* 0x0000000000401170 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
-2.3 N* 0x000000000040117c in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
+2.1 N* 0x00000000004011e8 in A::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:31
+2.2 N* 0x00000000004011f8 in Base::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:23
+2.3 N* 0x0000000000401208 in C::func() at /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.cc:39
(*): Breakpoint condition is invalid at this location.
(gdb) PASS: gdb.base/condbreak-multi-context.exp: force: check bp 2 set using the break command
-testcase /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.exp completed in 4 seconds
+testcase /gdbtest/src/gdb/testsuite/gdb.base/condbreak-multi-context.exp completed in 5 seconds

=== gdb Summary ===

-# of expected passes 49
+# of expected passes 42
+# of unexpected failures 7
Executing on host: /gdbtest/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /gdbtest/build/gdb/testsuite/../data-directory -iex "set height 0" -iex "set width 0" --version (timeout = 300)
spawn -ignore SIGHUP /gdbtest/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /gdbtest/build/gdb/testsuite/../data-directory -iex set height 0 -iex set width 0 --version
GNU gdb (GDB) 11.0.50.20201027-git
@@ -464,4 +465,4 @@
There is NO WARRANTY, to the extent permitted by law.
/gdbtest/build/gdb/gdb version 11.0.50.20201027-git -nw -nx -data-directory /gdbtest/build/gdb/testsuite/../data-directory -iex "set height 0" -iex "set width 0" -ex "set sysroot"

-runtest completed at Wed Oct 28 15:42:08 2020
+runtest completed at Wed Oct 28 15:53:48 2020