forked from OSchip/llvm-project
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
This commit is contained in:
parent
a2fabff4f6
commit
237cd90620
|
@ -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);
|
||||
|
|
|
@ -678,7 +678,7 @@ CommandObject::g_arguments_data[] =
|
|||
{ eArgTypeSettingVariableName, "setting-variable-name", CommandCompletions::eNoCompletion, NULL, "The name of a settable internal debugger variable. Type 'settings list' to see a complete list of such variables." },
|
||||
{ eArgTypeShlibName, "shlib-name", CommandCompletions::eNoCompletion, NULL, "The name of a shared library." },
|
||||
{ eArgTypeSourceFile, "source-file", CommandCompletions::eNoCompletion, NULL, "The name of a source file.." },
|
||||
{ eArgTypeSortOrder, "sort-order", CommandCompletions::eNoCompletion, NULL, "The sort order when dumping the symbol table." },
|
||||
{ eArgTypeSortOrder, "sort-order", CommandCompletions::eNoCompletion, NULL, "Specify a sort order when dumping lists." },
|
||||
{ eArgTypeStartAddress, "start-address", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
|
||||
{ eArgTypeSymbol, "symbol", CommandCompletions::eNoCompletion, NULL, "Any symbol name (function name, variable, argument, etc.)" },
|
||||
{ eArgTypeThreadID, "thread-id", CommandCompletions::eNoCompletion, NULL, "Thread ID number." },
|
||||
|
|
|
@ -78,8 +78,12 @@ ThreadGDBRemote::GetQueueName ()
|
|||
bool
|
||||
ThreadGDBRemote::WillResume (StateType resume_state)
|
||||
{
|
||||
// TODO: cache for next time in case we can match things up??
|
||||
ClearStackFrames();
|
||||
// Call the Thread::WillResume first. If we stop at a signal, the stop info
|
||||
// class for signal will set the resume signal that we need below. The signal
|
||||
// stuff obeys the Process::UnixSignal defaults.
|
||||
Thread::WillResume(resume_state);
|
||||
|
||||
int signo = GetResumeSignal();
|
||||
|
||||
switch (resume_state)
|
||||
|
@ -106,7 +110,6 @@ ThreadGDBRemote::WillResume (StateType resume_state)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
Thread::WillResume(resume_state);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,8 @@ UnixSignals::Reset ()
|
|||
// order, you can either subclass this class, and use Add & Remove to change them
|
||||
// or you can subclass and build them afresh in your constructor;
|
||||
m_signals.clear();
|
||||
|
||||
// SIGNO NAME SUPPRESS STOP NOTIFY
|
||||
// ===== ============ ========= ====== ======
|
||||
AddSignal(1, "SIGHUP", false, true, true ); // 1 hangup
|
||||
AddSignal(2, "SIGINT", true, true, true ); // 2 interrupt
|
||||
AddSignal(3, "SIGQUIT", false, true, true ); // 3 quit
|
||||
|
@ -80,6 +81,7 @@ UnixSignals::Reset ()
|
|||
AddSignal(30, "SIGUSR1", false, true, true ); // 30 user defined signal 1
|
||||
AddSignal(31, "SIGUSR2", false, true, true ); // 31 user defined signal 2
|
||||
}
|
||||
|
||||
void
|
||||
UnixSignals::AddSignal (int signo, const char *name, bool default_suppress, bool default_stop, bool default_notify)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue