summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectProcess.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-10-09 01:40:57 +0000
committerGreg Clayton <gclayton@apple.com>2010-10-09 01:40:57 +0000
commit237cd90620dcd6226d6909b34932d192d3473423 (patch)
treead34e88df14e0daadc6f50b0ae699c06c2abf172 /lldb/source/Commands/CommandObjectProcess.cpp
parenta2fabff4f6f4ccbbd6d237d6737720a91b6cc030 (diff)
downloadbcm5719-llvm-237cd90620dcd6226d6909b34932d192d3473423.tar.gz
bcm5719-llvm-237cd90620dcd6226d6909b34932d192d3473423.zip
Fixed process.gdb-remote to be able to properly propagate the signals and
obey the UnixSignals table that we have in the process. llvm-svn: 116139
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp11
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);
OpenPOWER on IntegriCloud