diff options
author | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2019-12-05 23:41:58 +0100 |
---|---|---|
committer | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2019-12-06 06:06:02 +0100 |
commit | e0fad1eadfcb68d543cdd96f44dca86364778fa2 (patch) | |
tree | 68b36fc2f7ffd19d3bc886bac5e9ef0bea5bc1c1 /gdb/testsuite/gdb.threads/pthreads.exp | |
parent | 8fc52a054bb7954813ff62adc6187c1072f09e8b (diff) | |
download | gdb-e0fad1eadfcb68d543cdd96f44dca86364778fa2.zip gdb-e0fad1eadfcb68d543cdd96f44dca86364778fa2.tar.gz gdb-e0fad1eadfcb68d543cdd96f44dca86364778fa2.tar.bz2 |
Fix crash when command arg is missing in faas/taas/tfaas commands.
GDB crashes when doing:
(gdb) faas
Aborted
Do the needed check to avoid crashing.
gdb/ChangeLog
2019-12-06 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* stack.c (faas_command): Check a command is provided.
* thread.c (taas_command, tfaas_command): Likewise.
gdb/testsuite/ChangeLog
2019-12-06 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.threads/pthreads.exp: Test taas and tfaas without command.
* gdb.base/frameapply.exp: Test faas without command.
Diffstat (limited to 'gdb/testsuite/gdb.threads/pthreads.exp')
-rw-r--r-- | gdb/testsuite/gdb.threads/pthreads.exp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp index 0bb9083..f633b5e 100644 --- a/gdb/testsuite/gdb.threads/pthreads.exp +++ b/gdb/testsuite/gdb.threads/pthreads.exp @@ -334,10 +334,14 @@ proc check_qcs {} { ] \ "run a failing command except in one frame of thread 2,3, -s to silently continue. Do not show thread and frame info" - # Check invalid flag combinations. + # Check invalid flag combinations and errors. gdb_test "thread apply all -c -s p 1" \ "thread apply all: -c and -s are mutually exclusive" \ "check -c and -s cannot be used simultaneously" + gdb_test "taas" "Please specify a command to apply on all threads" \ + "missing command for taas" + gdb_test "tfaas" "Please specify a command to apply on all frames of all threads" \ + "missing command for tfaas" } |