diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index c2f43368a96..09459d856b3 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -846,8 +846,15 @@ public: if (command.GetArgumentCount() == 1) { - int signo = Args::StringToSInt32(command.GetArgumentAtIndex(0), -1, 0); - if (signo == -1) + int signo = LLDB_INVALID_SIGNAL_NUMBER; + + const char *signal_name = command.GetArgumentAtIndex(0); + if (::isxdigit (signal_name[0])) + signo = Args::StringToSInt32(signal_name, LLDB_INVALID_SIGNAL_NUMBER, 0); + else + signo = process->GetUnixSignals().GetSignalNumberFromName (signal_name); + + if (signo == LLDB_INVALID_SIGNAL_NUMBER) { result.AppendErrorWithFormat ("Invalid signal argument '%s'.\n", command.GetArgumentAtIndex(0)); result.SetStatus (eReturnStatusFailed); |