summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source
Commit message (Collapse)AuthorAgeFilesLines
...
* Change RNBRemote::HandlePacket_m() to store the packet on the heapJason Molenda2014-02-111-1/+6
| | | | | | instead of on the stack. Handles larger packet read requests better. llvm-svn: 201118
* If we fail to attach, return an error rather than returning the success or ↵Jim Ingham2014-02-041-1/+3
| | | | | | | | failure of sending the error packet. llvm-svn: 200732
* Add support for Haswell on x86_64.Greg Clayton2014-01-221-1/+1
| | | | | | <rdar://problem/15312873> llvm-svn: 199854
* Make lldb build with Makefiles on OS X.Todd Fiala2014-01-184-0/+138
| | | | | | | | | | | | | | | | | | This change does the following: * Adds Makefile build scripts to debug server. * Fixes a few small mistakes in the other makefiles. * Modifies generate-vers.pl slightly to also work for debugserver. * Changes the OS X, non-framework python search path from libdir to libdir/python2.X/site-packages where it is installed by the build system (also where it is installed on other operating systems). Patch by Keno Fischer. llvm-svn: 199543
* Add the "--unix-socket" opton back as it was being used.Greg Clayton2013-12-101-8/+90
| | | | | | <rdar://problem/15622900> llvm-svn: 196952
* Replace all in_port_t with uint16_t to avoid compilation issues on different ↵Greg Clayton2013-12-063-4/+4
| | | | | | systems. llvm-svn: 196586
* Modified local spawning in debugserver processes to use a new ↵Greg Clayton2013-12-051-24/+42
| | | | | | | | | | | | | | | | | | --reverse-connect option so that debugserver actually connects back to LLDB instead of LLDB connecting to debugserver. This gets rid of our hacky "get_random_port()" which would grab a random port and tell debugserver to open that port. Now LLDB creates, binds, listens and accepts a connection by binding to port zero and sending the correctly bound port down as the host:port to connect back to. Fixed the "ConnectionFileDescriptor" to be able to correctly listen for connections from a specified host, localhost, or any host. Prior to this fix "listen://" only accepted the following format: listen://<port> But now it can accept: listen://<port> // Listen for connection from localhost on port <port> listen://<host>:<port> // Listen for connection from <host> and <port> listen://*:<port> // Listen for connection from any host on port <port> llvm-svn: 196547
* Remove log line that was left in accidentally.Greg Clayton2013-12-041-1/+0
| | | | llvm-svn: 196403
* Switch local launching of debugserver over to always use a FIFO in order to ↵Greg Clayton2013-12-043-76/+41
| | | | | | | | | | handshake with the launched debugserver. This helps ensure that the launched debugserver is ready and listening for a connection. Prior to this we had a race condition. Consolidate the launching of debugserver into a single place: a static function in GDBRemoteCommunication. llvm-svn: 196401
* Make sure the getopt variables are correctly initialized for any option parsing.Greg Clayton2013-11-221-0/+8
| | | | | | Added a new "--port-offset PORT" option to lldb-platform so it can be used with USB mux type scenarios. llvm-svn: 195486
* Fixes to get the arm native debugserver building again.Jason Molenda2013-11-216-13/+20
| | | | | | Fix a small typeo in the i386/x86_64 debugserver plugins. llvm-svn: 195308
* <rdar://problem/14814689>Greg Clayton2013-11-131-2/+1
| | | | | | Add a log message to the console that will display the error code when we fail to reply to a mach message. llvm-svn: 194623
* <rdar://problem/15172417>Greg Clayton2013-11-1316-91/+441
| | | | | | | | | | | | | | | Added two new GDB server packets to debugserver: "QSaveRegisterState" and "QRestoreRegiterState". "QSaveRegisterState" makes the remote GDB server save all register values and it returns a save identifier as an unsigned integer. This packet can be used prior to running expressions to save all registers. All registers can them we later restored with "QRestoreRegiterState:SAVEID" what SAVEID is the integer identifier that was returned from the call to QSaveRegisterState. Cleaned up redundant code in lldb_private::Thread, lldb_private::ThreadPlanCallFunction. Moved the lldb_private::Thread::RegisterCheckpoint into its own header file and it is now in the lldb_private namespace. Trimmed down the RegisterCheckpoint class to omit stuff that wasn't used (the stack ID). Added a few new virtual methods to lldb_private::RegisterContext that allow subclasses to efficiently save/restore register states and changed the RegisterContextGDBRemote to take advantage of these new calls. llvm-svn: 194621
* Fixed up registers in debugserver.Greg Clayton2013-11-099-659/+725
| | | | | | | | | | | | - removed all gaps from the g/G packets - optimized registers for x86_64 to not send/receive xmm0-xmm15 as well as ymm0-ymm15, now we only send ymm0-15 and xmm0-15 are now pseudo regs - Fixed x86_64 floating point register gaps - Fixed x86_64 so that xmm8-xmm15 don't overlap with ymm0-ymm3. This could lead to bad values showing in the debugger and was due to bad register info structure contents - Fixed i386 so we only send ymm0-ymm7 and xmm0-xmm7 are now pseudo regs. - Fixed ARM register definitions to not have any gaps - Fixed it so value registers and invalidation registers are specified using register names which avoid games we had to play with register numbering in the ARM plugin. llvm-svn: 194302
* Fixed printf warnings.Greg Clayton2013-10-311-4/+4
| | | | llvm-svn: 193806
* Fix a few errors found when building lldb with newer versions of clang.Jason Molenda2013-10-052-5/+6
| | | | | | <rdar://problem/15148224> llvm-svn: 192024
* Update RNBRemote to handle the new pseudo_regs field added to DNBRegisterInfoJason Molenda2013-10-011-9/+14
| | | | | | | | | | back in r173096 by Greg. When constructing a g packet or parsing a G packet, and we're iterate over our register list, skip registers that are actually just slices of other, real, registers. For instance, eax is 32-bits of rax on x86_64. <rdar://problem/15104187> llvm-svn: 191802
* Add a new qGDBServerVersion packet so lldb can queryJason Molenda2013-10-012-0/+16
| | | | | | | | | the name of the remote gdb-protocol server, and get a version number from it. This can be useful if lldb needs to interoperate with a gdb-protocol server with a known issue or bug. llvm-svn: 191729
* Add support for building debugserver with CMake (on Mac OS X)Daniel Malea2013-08-096-3/+128
| | | | | | | | - updated RNBDefs.h to allow version numbers to be passed in via preprocessor defines - update libdebugserver.cpp to compile against latest DNBProcessKill signature Review: http://llvm-reviews.chandlerc.com/D1331 llvm-svn: 188078
* Use the correct call to close down the lockdown connection.Jim Ingham2013-07-181-4/+2
| | | | | | <rdar://problem/14460024> llvm-svn: 186597
* Didn't get the right version of these files in the checkin for r186132.Jim Ingham2013-07-182-17/+18
| | | | llvm-svn: 186596
* Get debugserver to call task_set_state to prime the control registers so ↵Jim Ingham2013-07-1110-141/+72
| | | | | | | | | | | | | that watchpoints take for threads created while the program is running. Remove the testcase skips from TestConcurrentEvents.py, since they all pass now, and fix TestWatchpointMultipleThreads.py - which should have caught this problem - so it doesn't artificially break on new thread creation before the watchpoint triggers. llvm.org/pr16566 <rdar://problem/14383244> llvm-svn: 186132
* <rdar://problem/14195566>Greg Clayton2013-06-272-9/+13
| | | | | | Found a race condition when killing an application where the state could be set to exited by the waitpid_thread() _before_ we call task resume (via MachProcess::PrivateResume()) in MachProcess::Kill(). llvm-svn: 185048
* <rdar://problem/14281898>Han Ming Ong2013-06-261-0/+18
| | | | | | Much faster way to get dirty size. llvm-svn: 185033
* <rdar://problem/14262854>Han Ming Ong2013-06-261-3/+16
| | | | | | | Match up with top’s implementation on recent Cab as API has changed a bit. Tested the same binary running on Zin as well. Tested ARM binary on iOS as well. llvm-svn: 185017
* If debugserver fails to interrogate the inferior process CPU typeJason Molenda2013-06-251-1/+35
| | | | | | | | | for any reason, use debugserver own's cputype as a best guess when we reply to the debugger's qProcessInfo packet or when initializing our register tables. <rdar://problem/13406879> llvm-svn: 184829
* Remove some unnecessary uses of nub_break_t in the arm specificJason Molenda2013-06-253-126/+1
| | | | | | | | | support files for debugserver to fix a build failure for arm. Also remove some of the code used for software-driven single instruction stepping; this is slowly being yanked out and these particular bits overlap with the nub_break_t going away. llvm-svn: 184828
* Huge performance improvements when one breakpoint contains many locations.Greg Clayton2013-06-1214-815/+312
| | | | | | | | | | 325,000 breakpoints for running "breakpoint set --func-regex ." on lldb itself (after hitting a breakpoint at main so that LLDB.framework is loaded) used to take up to an hour to set, now we are down under a minute. With warm file caches, we are at 40 seconds, and that is with setting 325,000 breakpoint through the GDB remote API. Linux and the native debuggers might be faster. I haven't timed what how much is debug info parsing and how much is the protocol traffic to/from GDB remote. That there were many performance issues. Most of them were due to storing breakpoints in the wrong data structures, or using the wrong iterators to traverse the lists, traversing the lists in inefficient ways, and not optimizing certain function name lookups/symbol merges correctly. Debugging after that is also now very efficient. There were issues with replacing the breakpoint opcodes in memory that was read, and those routines were also fixed. llvm-svn: 183820
* Remove the debugserver "--open-connection" option and obey the hostname that ↵Greg Clayton2013-06-063-54/+132
| | | | | | | | | | | | | | is passed into debugserver. you can now specify: debugserver host:port debugserver port debugserver /path/to/file When "host" is specified, we will only accept connections from that host. If host is not specified, we default to "localhost". llvm-svn: 183457
* <rdar://problem/13963648>Han Ming Ong2013-05-221-2/+6
| | | | | | | Changes after feedback: Directly use function pointer, just to be safer on 10.8. llvm-svn: 182529
* <rdar://problem/13963648>Han Ming Ong2013-05-224-19/+80
| | | | | | Collect 'anonymous memory' info, if possible llvm-svn: 182523
* <rdar://problem/13892516>Greg Clayton2013-05-219-836/+99
| | | | | | LLDB can now debug across calls to exec when the architecture changes from say i386 to x86_64 (on darwin). llvm-svn: 182345
* <rdar://problem/13891604>Greg Clayton2013-05-162-3/+14
| | | | | | Fixed a 2 second delay when sending the 'k' (kill) packet that happened due to a race condition. llvm-svn: 182025
* Removed unused code and an unused event.Greg Clayton2013-05-163-13/+1
| | | | llvm-svn: 181948
* fix a couple of clang static analyzer warnings.Jason Molenda2013-05-042-4/+2
| | | | | | | Most important was a new[] + delete mismatch in ScanFormatDescriptor() and a couple of possible memory leaks in FileSpec::EnumerateDirectory(). llvm-svn: 181080
* After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton2013-04-186-21/+8
| | | | | | the macros and just use C++11. llvm-svn: 179805
* Since we use C++11, we should switch over to using std::unique_ptr when ↵Greg Clayton2013-04-183-3/+5
| | | | | | | | C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++. Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro. llvm-svn: 179779
* Cache the VM page size that we get from task_vm_info so we don'tJason Molenda2013-04-061-1/+2
| | | | | | re-fetch the value. llvm-svn: 178962
* Add optional LOG_TASK logging for MachVMMemory::PageSize when the call ↵Jason Molenda2013-04-061-0/+1
| | | | | | succeeds, too. llvm-svn: 178955
* Add optional LOG_TASK logging for MachVMMemory::PageSize() task_info call ↵Jason Molenda2013-04-061-0/+4
| | | | | | failure. llvm-svn: 178954
* Update MachVMMemory::PageSize to get the page size of a specific processJason Molenda2013-04-064-16/+45
| | | | | | | | | | | if we have an updated task_info call available; else fall back to getting the default host-wide page size. Update all uses of the vm page size to get it via MachVMMemory::PageSize(). <rdar://problem/13477763>, <rdar://problem/13498504> llvm-svn: 178953
* <rdar://problem/13457391>Greg Clayton2013-04-041-3/+3
| | | | | | LLDB now can use a single dash for all long options for all commands form the command line and from the command interpreter. This involved just switching all calls from getopt_long() to getopt_long_only(). llvm-svn: 178789
* <rdar://problem/13198919>Greg Clayton2013-04-041-0/+15
| | | | | | Try and reap process when sending the "k" packet to avoid a race condition. We now wait for at most 1 second to reap the child process that we are killing. llvm-svn: 178726
* <rdar://problem/12789467>Greg Clayton2013-04-031-1/+2
| | | | | | Fixed an attach case for ARM that was imporperly detecting an application bundle when there wasn't one. llvm-svn: 178704
* Remove a bit of code duplication in RNBRemote::HandlePacket_qProcessInfo -Jason Molenda2013-04-031-11/+3
| | | | | | call DNBProcessGetCPUType() to get the cputype of the process we're debugging. llvm-svn: 178620
* Fix another old usage of GetCurrentThread() to get a mach portJason Molenda2013-04-035-1/+21
| | | | | | | | | number in RNBRemote::HandlePacket_qProcessInfo -- add a new GetCurrentThreadMachPort() so callers who need to make a mach thred_get_state() call at the RNBRemote level will have a way to get the port number. llvm-svn: 178619
* Remove some unused code.Jim Ingham2013-04-021-13/+0
| | | | llvm-svn: 178512
* Debugserver fix for launching iOS apps who are named "com.apple.something"Jason Molenda2013-03-281-2/+16
| | | | | | | | - the ".app" would be treated as the app bundle final characters and the SpringBoard launch would fail. <rdar://problem/13258935> llvm-svn: 178209
* Remove FunctionProfiler and ProfileObjectiveC action classes as they are not ↵Greg Clayton2013-03-264-833/+0
| | | | | | used. llvm-svn: 178035
* <rdar://problem/13498504>Han Ming Ong2013-03-252-11/+36
| | | | | | Don't hard code vm page size in profiling code llvm-svn: 177907
OpenPOWER on IntegriCloud