aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2018-01-20 23:56:37 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2018-01-21 15:06:05 +0000
commitb1b189e04cb5ea5da1cbb07bd6cceccd4d2ac969 (patch)
treed221844efa43b34df8b43ae509fb93eb8730c673 /gdb
parentf49464e4287179069ee98b27fcbac793493f18ac (diff)
downloadgdb-b1b189e04cb5ea5da1cbb07bd6cceccd4d2ac969.zip
gdb-b1b189e04cb5ea5da1cbb07bd6cceccd4d2ac969.tar.gz
gdb-b1b189e04cb5ea5da1cbb07bd6cceccd4d2ac969.tar.bz2
gdb: Add test for some error cases of @entry usage
Adds a test that using @entry for a non-parameter, or for an unknown symbol, both give the expected error. This error message was previously untested. gdb/testsuite/ChangeLog: * gdb.arch/amd64-entry-value.exp: Test using @entry on a non-parameter, and on an unknown symbol.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.arch/amd64-entry-value.exp8
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 2b96801..db860b0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.arch/amd64-entry-value.exp: Test using @entry on a
+ non-parameter, and on an unknown symbol.
+
2018-01-19 Tom Tromey <tom@tromey.com>
* gdb.rust/modules.rs (TWENTY_THREE): New global.
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value.exp b/gdb/testsuite/gdb.arch/amd64-entry-value.exp
index 46a896f..72700d5 100644
--- a/gdb/testsuite/gdb.arch/amd64-entry-value.exp
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value.exp
@@ -87,6 +87,14 @@ gdb_test "p d9@entry" " = 11\\.5" "entry_stack: p d9@entry"
gdb_test "p da" " = 4\\.5" "entry_stack: p da"
gdb_test "p da@entry" " = 12\\.5" "entry_stack: p da@entry"
+# Test @entry values for a static file scoped variable, and for an
+# unknown symbol. Both of these should give an error.
+gdb_test "p v@entry" \
+ "@entry can be used only for function parameters, not for \"v\"" \
+ "attempt to print global v@entry"
+gdb_test "p unknown@entry" \
+ "@entry can be used only for function parameters, not for \"unknown\"" \
+ "attempt to print unknown@entry"
# Test various kinds of `set print entry-values'.