summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-06-14 23:43:00 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-06-15 21:39:06 +0100
commitec8e2b6d3051f0b4b2a8eee9917898e95046c62f (patch)
tree6954251f1ea7259a107f40632c8147beb231d3c7 /gdb/testsuite/gdb.cp
parent0d3abd8cc936360f8c46502135edd2e646473438 (diff)
downloadbinutils-gdb-ec8e2b6d3051f0b4b2a8eee9917898e95046c62f.tar.gz
gdb: Don't allow annotations to influence what else GDB prints
The annotations should be additional information printed by GDB to be consumed by users (GUIs), but GDB shouldn't reduce what it prints based on whether annotations are on or not. However, this is what happens for annotate_source_line. This commit makes annotate_source_line a void function that simply outputs the annotation information, GDB will then print the contents of the source line to the terminal in the normal way. Some tests needed to be updated after this commit. gdb/ChangeLog: * annotate.c (annotate_source_line): Change return type to void, update implementation to match. * annotate.h (annotate_source_line): Change return type to void, update header comment. * stack.c (print_frame_info): Don't change what frame information is printed based on whether annotations are on or not. gdb/testsuite/ChangeLog: * gdb.base/annota1.exp: Update expected results. * gdb.cp/annota2.exp: Likewise. * gdb.cp/annota3.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r--gdb/testsuite/gdb.cp/annota2.exp1
-rw-r--r--gdb/testsuite/gdb.cp/annota3.exp2
2 files changed, 2 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp
index 745f4617160..6699de01a3b 100644
--- a/gdb/testsuite/gdb.cp/annota2.exp
+++ b/gdb/testsuite/gdb.cp/annota2.exp
@@ -243,6 +243,7 @@ set pat [multi_line "" \
"" \
"" \
"\032\032source .*$srcfile.*beg:$hex" \
+ "$decimal\[^\r\n\]+" \
"" \
"\032\032frame-end" \
"" \
diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp
index 3b506e2a82c..8f9a1456912 100644
--- a/gdb/testsuite/gdb.cp/annota3.exp
+++ b/gdb/testsuite/gdb.cp/annota3.exp
@@ -164,7 +164,7 @@ gdb_expect_list "set watch on a.x" "$gdb_prompt$" {
# annotate-watchpoint
#
gdb_test_multiple "next" "watch triggered on a.x" {
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n(\032\032frame-begin 0 0x\[0-9a-z\]+\r\n|)main \\(\\) at .*$srcfile:$decimal\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" {
+ -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n(\032\032frame-begin 0 0x\[0-9a-z\]+\r\n|)main \\(\\) at .*$srcfile:$decimal\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n$decimal\[^\r\n\]+\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" {
pass "watch triggered on a.x"
}
}