Skip to content

Commit 862f094

Browse files
author
Yao Qi
committed
Relax gdb.compile/compile.exp to match the address printed for frame
One test in gdb.compile/compile.exp passes on one fedora builder, bt #0 0x00007ffff7ff43f6 in _gdb_expr (__regs=0x7ffff7ff2000) at gdb command line:1^M #1 <function called from gdb>^M #2 main () at /home/gdb-buildbot/fedora-x86-64-1/fedora-x86-64/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.compile/compile.c:106^M (gdb) PASS: gdb.compile/compile.exp: bt but fails on my machine with gcc trunk, bt^M #0 _gdb_expr (__regs=0x7ffff7ff3000) at gdb command line:1^M #1 <function called from gdb>^M #2 main () at gdb/testsuite/gdb.compile/compile.c:106^M (gdb) FAIL: gdb.compile/compile.exp: bt The test should be tweaked to match both cases (pc in the start of line vs pc in the middle of line). Note that I am not clear that why libcc1 emits debug info this way so that the address is in the middle of line. gdb/testsuite: 2018-01-17 Yao Qi <yao.qi@linaro.org> * gdb.compile/compile.exp: Match the address printed for frame in the output of command "bt".
1 parent 1049cf3 commit 862f094

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

gdb/testsuite/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2018-01-17 Yao Qi <yao.qi@linaro.org>
2+
3+
* gdb.compile/compile.exp: Match the address printed for
4+
frame in the output of command "bt".
5+
16
2018-01-15 Tom Tromey <tom@tromey.com>
27

38
* gdb.guile/scm-ports.exp (test_mem_port_rw): Use get_valueof to

gdb/testsuite/gdb.compile/compile.exp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,11 @@ gdb_test "compile code func_doesnotexist ();" "warning: Could not find symbol \"
139139
gdb_test "compile code *(volatile int *) 0 = 0;" \
140140
"The program being debugged was signaled while in a function called from GDB\\.\r\nGDB remains in the frame where the signal was received\\.\r\n.*" \
141141
"compile code segfault first"
142-
gdb_test "bt" \
143-
"\r\n#0 \[^\r\n\]* in _gdb_expr \[^\r\n\]*\r\n#1 <function called from gdb>\r\n.*"
142+
gdb_test "bt" [multi_line \
143+
"#0 ($hex in )?_gdb_expr .*" \
144+
"#1 <function called from gdb>" \
145+
"#2 .*" \
146+
]
144147

145148
set test "p/x \$pc"
146149
set infcall_pc 0

0 commit comments

Comments
 (0)