aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Target/UnixSignals.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-09-06*** This commit represents a complete reformatting of the LLDB source codeKate Stone1-269/+209
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
2016-09-04[NFC] Darwin llgs support from Week of CodeTodd Fiala1-0/+2
This code represents the Week of Code work I did on bringing up lldb-server LLGS support for Darwin. It does not include the Xcode project changes needed, as we don't want to throw that switch until more support is implemented (i.e. this change is inert, no build systems use it yet. I've verified on Ubuntu 16.04, macOS Xcode and macOS cmake builds). This change does some minimal refactoring of code that is shared with the Linux LLGS portion, moving it from NativeProcessLinux into NativeProcessProtocol. That code is also used by NativeProcessDarwin. Current state on Darwin: * Process launching is implemented. (Attach is not). Launching on devices has not yet been tested (FBS/BKS might need a bit of work). * Inferior waitpid monitoring and communication of exit status via MainLoop callback is implemented. * Memory read/write, breakpoints, thread register context, etc. are not yet implemented. This impacts process stop/resume, as the initial launch suspended immediately starts the process up and running because it doesn't know it is supposed to remain stopped. * I implemented the equivalent of MachThreadList as NativeThreadListDarwin, in anticipation that we might want to factor out common parts into NativeThreadList{Protocol} and share some code here. After writing it, though, the fallout from merging Mach Task/Process into a single concept plus some other minor changes makes the whole NativeThreadListDarwin concept nothing more than dead weight. I am likely going to get rid of this class and just manage it directly in NativeProcessDarwin, much like I did for NativeProcessLinux. * There is a stub-out call for starting a STDIO thread. That will go away and adopt the MainLoop pselect-based IOObject reading. I am developing the fully-integrated changes in the following repo, which contains the necessary Xcode bits and the glue that enables lldb-debugserver on a macOS system: https://github.com/tfiala/lldb/tree/llgs-darwin This change also breaks out a few of the lldb-server tests into their own directory, and adds some $qHostInfo tests (not sure why I didn't write those tests back when I initially implemented that on the Linux side). llvm-svn: 280604
2016-02-18Fix Clang-tidy modernize-use-nullptr warnings in some files in ↵Eugene Zelenko1-37/+21
source/Target; other minor fixes. llvm-svn: 261242
2016-01-22Target: fix -Wcast-qual warningSaleem Abdulrasool1-1/+1
We were unnecessarily stripping the const qualifier on the temporary variable. Restore the constness to avoid the warning. NFC. llvm-svn: 258547
2015-12-15Welcome to NetBSD signalsKamil Rytarowski1-1/+3
Summary: Signals 1-32 are matching the default UNIX platform. There are platform specific ones above 32. From the `/usr/include/sys/signal.h` header: ``` #define SIGPWR 32 /* power fail/restart (not reset when caught) */ #ifdef _KERNEL #define SIGRTMIN 33 /* Kernel only; not exposed to userland yet */ #define SIGRTMAX 63 /* Kernel only; not exposed to userland yet */ #endif ``` Reviewers: emaste, joerg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15482 llvm-svn: 255592
2015-10-20Fix build and some warnings after r250798Tamas Berghammer1-2/+2
llvm-svn: 250810
2015-10-20[LLDB] Insert names with same signo as alias instead of a new entryMohit K. Bhakkad1-41/+52
Reviewers: clayborg, labath. Subscribers: jaydeep, dsanders, bhushan, sagar, nitesh.jain, emaste,lldb-commits. Differential Revision: http://reviews.llvm.org/D13646 llvm-svn: 250801
2015-07-14Refactor Unix signals.Chaoren Lin1-5/+59
Summary: - Consolidate Unix signals selection in UnixSignals. - Make Unix signals available from platform. - Add jSignalsInfo packet to retrieve Unix signals from remote platform. - Get a copy of the platform signal for each remote process. - Update SB API for signals. - Update signal utility in test suite. Reviewers: ovyalov, clayborg Subscribers: chaoren, jingham, labath, emaste, tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D11094 llvm-svn: 242101
2015-01-15Moved Args::StringToXIntYZ to StringConvert::ToXIntYZVince Harron1-2/+2
The refactor was motivated by some comments that Greg made http://reviews.llvm.org/D6918 and also to break a dependency cascade that caused functions linking in string->int conversion functions to pull in most of lldb llvm-svn: 226199
2013-10-28Change the default handling for SIGALRM and SIGCHLD to not notify.Jim Ingham1-2/+2
<rdar://problem/15208799> llvm-svn: 193530
2011-07-06Fixed some issues with ARM backtraces by not processing any push/pop Greg Clayton1-33/+33
instructions if they are conditional. Also fixed issues where the PC wasn't getting bit zero stripped for ARM targets when a stack frame was thumb. We now properly call through the GetOpcodeLoadAddress() functions to make sure the addresses are properly stripped for any targets that may decorate up their addresses. We now don't pass the SIGSTOP signals along. We can revisit this soon, but currently this was interfering with debugging some older ARM targets that don't have vCont support in the GDB server. llvm-svn: 134461
2011-01-20Back up both the register AND the stop state when calling functions.Jim Ingham1-1/+1
Set the thread state to "bland" before calling functions so they don't inherit the pending signals and die. llvm-svn: 123869
2011-01-10Change the default signal setting for SIBABRT to SUPPRESS the signal. Why?Greg Clayton1-1/+1
When debugging, if an expression hits a SIGABRT, it the expression ends up completing and stopping due the the "SIGABRT". Then the next thing that runs (another expression, or continuing the program) ends up progating the SIGABRT and causing the parent processes to die. We should probably think of a different solution where we suppress any signal that resulted due to an expression, or we modifyin the UnixSignals class to contain a row for "suppress for expression". So the settings for SIGABRT are: suppress = true, stop = true, and notify = true. llvm-svn: 123157
2010-10-15Fixed the UnixSignals class to be able to get a signal by name, short name, ↵Greg Clayton1-44/+25
or signal number when using: int32_t UnixSignals::GetSignalNumberFromName (const char *name) const; llvm-svn: 116641
2010-10-15Added short names and descriptions to the UnixSignals class. Also cleaned upGreg Clayton1-108/+108
the code a bit. llvm-svn: 116561
2010-10-09Fixed process.gdb-remote to be able to properly propagate the signals andGreg Clayton1-32/+34
obey the UnixSignals table that we have in the process. llvm-svn: 116139
2010-06-08Initial checkin of lldb code from internal Apple repo.Chris Lattner1-0/+310
llvm-svn: 105619