+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.
+
2019-12-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* inferior.c (prune_inferiors): Only call delete_inferior,
Do not modify the inferior list.
static void
faas_command (const char *cmd, int from_tty)
{
+ if (cmd == NULL || *cmd == '\0')
+ error (_("Please specify a command to apply on all frames"));
std::string expanded = std::string ("frame apply all -s ") + cmd;
execute_command (expanded.c_str (), from_tty);
}
+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.
+
2019-12-04 Andrew Burgess <andrew.burgess@embecosm.com>
* lib/gdb.exp (gdb_compile): Add -J compiler option when building
gdb_test "frame apply level 0-3" \
"Please specify a command to apply on the selected frames" \
"missing command"
+gdb_test "faas" "Please specify a command to apply on all frames" \
+ "missing command for faas"
] \
"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"
}
static void
taas_command (const char *cmd, int from_tty)
{
+ if (cmd == NULL || *cmd == '\0')
+ error (_("Please specify a command to apply on all threads"));
std::string expanded = std::string ("thread apply all -s ") + cmd;
execute_command (expanded.c_str (), from_tty);
}
static void
tfaas_command (const char *cmd, int from_tty)
{
+ if (cmd == NULL || *cmd == '\0')
+ error (_("Please specify a command to apply on all frames of all threads"));
std::string expanded
= std::string ("thread apply all -s -- frame apply all -s ") + cmd;
execute_command (expanded.c_str (), from_tty);