aboutsummaryrefslogtreecommitdiff
path: root/gdb/break-catch-syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/break-catch-syscall.c')
-rw-r--r--gdb/break-catch-syscall.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c
index 9772ac0..7335377 100644
--- a/gdb/break-catch-syscall.c
+++ b/gdb/break-catch-syscall.c
@@ -390,6 +390,8 @@ catch_syscall_split_args (const char *arg)
syscall_number = (int) strtol (cur_name, &endptr, 0);
if (*endptr == '\0')
{
+ if (syscall_number < 0)
+ error (_("Unknown syscall number '%d'."), syscall_number);
get_syscall_by_number (gdbarch, syscall_number, &s);
result.push_back (s.number);
}