summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Added gdb-remote test for s packet, single stepping.Todd Fiala2014-06-092-22/+220
| | | | llvm-svn: 210481
* Remove invalid comment from last commit.Todd Fiala2014-06-061-1/+0
| | | | llvm-svn: 210376
* Added gdb-remote program counter check at breakpoint.Todd Fiala2014-06-062-80/+184
| | | | | | | | | | | | | | | | | | | | | | | | | Modified the breakpoint stop and start check to verify the program counter printed immediately after stopping does match the breakpoint address. This is based on a conversation with Greg Clayton clarifying that the breakpoint stop handling code on a remote should do any and all adjusting of the program counter at stop time, not at resume time. Added a qProcessInfo parser and helper methods to add the collection send/response elements to the packet flow. Removed the older pid-only query mechanism. The parser verifies all the keys provided are within the documented known set of key-value pairs. Added helper routine to unpack the hex value of a $p-style register read response according to the endian-ness of the inferior as reported by qProcessInfo. Added a test to verify qProcessInfo includes an endian key/value pair. Refactored several older tests to move to the less verbose test startup code. Most of these were the tests using the older qProcessInfo pid-only retrieval code. llvm-svn: 210374
* Added gdb-remote test for software breakpoints.Todd Fiala2014-06-052-17/+140
| | | | | | | | | | Tests $Z0 and $z0. Extends test exe get-code-address-hex: to take a function name. Enabled for debugserver, disabled for llgs. Implementing in llgs branch next. llvm-svn: 210272
* Remove unused defines from lldb driver.Todd Fiala2014-06-051-3/+0
| | | | | | | | See http://reviews.llvm.org/D3965 for details. Change by Thiago Farina. llvm-svn: 210268
* Move MemoryRegionInfo out of Target/Process.h into its own header.Todd Fiala2014-06-043-85/+106
| | | | | | | | lldb-gdbserver and NativeProcessProtocol will use MemoryRegionInfo but don't want to pull in Process.h. Pull this declaration and definition out into its own header. llvm-svn: 210213
* Added gdb-remote $qMemoryRegionInfo tests for heap and stack.Todd Fiala2014-06-043-46/+182
| | | | | | | | | | | | | | | | | | Added two new tests: one to verify that a test exe heap address returned is readable and writeable, and a similar one to verify a test exe stack address is readable and writeable. Ran the main.cpp test exe code through the Xcode re-indenter. I was using TextMate to edit the test's C++ code alongside the Python code but last check-in found that it was not handling tabs/indentation the way I am intending it. Modified test exe to require C++11. Refactored gdb remote python code's handling of memory region info into more re-usable methods. llvm-svn: 210196
* Add gdb-remote test for $qMemoryRegionInfo code querying.Todd Fiala2014-06-042-1/+113
| | | | | | | | | | Added test stub for collecting a code, heap and stack address. Added test to verify that the code address returns a readable, executable memory region and that the memory region range was indeed the one that the code belonged to. llvm-svn: 210187
* Add gdb-remote test to ensure $qMemoryRegionInfo is supported.Todd Fiala2014-06-041-0/+29
| | | | llvm-svn: 210185
* Fix a couple minor typos in $qMemoryRegionInfo packet docs.Todd Fiala2014-06-041-2/+2
| | | | llvm-svn: 210163
* Added gdb-remote memory read ($m) test.Todd Fiala2014-06-032-3/+86
| | | | | | | | | | | | Added set-memory:{content} and get-memory-address-hex: commands to the test exe for gdb-remote. Added a test that sets the content via the inferior command line, then reads it back via gdb-remote with $m. Passing on debugserver. Marked as fail on llgs. Implementing in the llgs branch next. llvm-svn: 210116
* Windows fix: Disable editline for MSVC. Since r208369 there have been ↵Colin Riley2014-06-031-1/+2
| | | | | | issues, probably related to the editline wrapper. For now, it's more stable and usable disabled. llvm-svn: 210105
* Windows fix: Condition::Wait returned failure when it actually succeeded ↵Colin Riley2014-06-031-1/+1
| | | | | | (SleepConditionVariableCS returns non-zero for success) llvm-svn: 210104
* Fix windows build: SBTypeEnumMember.cpp added to the separate windows ↵Colin Riley2014-06-031-0/+1
| | | | | | liblldb.dll project. llvm-svn: 210099
* Small cleanups for the new enum fixes:Greg Clayton2014-06-023-10/+18
| | | | | | | | - Fix Xcode project to have source files for SBTypeEnumMember.h/SBTypeEnumMember.cpp in the right place - Rename a member variable to inluce "_sp" suffix since it is a shared pointer - Cleanup initialization code for TypeEnumMemberImpl to not warn about out of order initialization llvm-svn: 210051
* Add support for inspecting enum members.Todd Fiala2014-06-0220-2/+608
| | | | | | | | | Change by Russell Harmon. Xcode project updates (and all errors therein) by Todd Fiala. llvm-svn: 210046
* Add executable extension to debugger name, run dotest via binary.Todd Fiala2014-06-022-3/+3
| | | | | | | | See http://reviews.llvm.org/D3904 for details. Change by Scott Graham. llvm-svn: 210036
* Fix most of the remaining Windows build warnings.Todd Fiala2014-06-026-61/+70
| | | | | | | | See http://reviews.llvm.org/D3944 for more details. Change by Zachary Turner. llvm-svn: 210035
* Don't use libc's "char *basename(char *)" or "char *dirname(char *)" as they ↵Greg Clayton2014-05-301-35/+8
| | | | | | | | | | are not thread safe. I switched the lldb_private::FileSpec code over to use "llvm::StringRef llvm::sys::path::filename(llvm::StringRef)" for basename() and "llvm::StringRef llvm::sys::path::parent_path(llvm::StringRef)" for dirname(). <rdar://problem/16870083> llvm-svn: 209917
* gdb-remote signal delivery test cleanup.Todd Fiala2014-05-303-49/+199
| | | | | | | | | | | | | | | | Learned that MacOSX only accepts signal delivery on a thread that is already signal handling. Reworked the test exe to cause a SIGSEGV and recover if either nothing intercepts the SIGSEGV handler, or if a SIGUSR1 is inserted. The test uses the latter part to test signal delivery on continue using the SIGUSR1. I still don't have this working on MacOSX. I'm seeing the signal get delivered to a different thread than the one I'm specifying with $Hc{thread-id} + $C{signo}, or with $vCont;C{signo}:{thread-id};c. I'll come back to this after getting it working on the llgs branch on Linux x86_64. llvm-svn: 209912
* iOS simulator cleanup to make sure we use "*-apple-ios" for iOS simulator ↵Greg Clayton2014-05-298-81/+302
| | | | | | | | | | | | | | | | | | apps and binaries. Changes include: - ObjectFileMachO can now determine if a binary is "*-apple-ios" or "*-apple-macosx" by checking the min OS and SDK load commands - ArchSpec now says "<arch>-apple-macosx" is equivalent to "<arch>-apple-ios" since the simulator mixes and matches binaries (some from the system and most from the iOS SDK). - Getting process inforamtion on MacOSX now correctly classifies iOS simulator processes so they have "*-apple-ios" architectures in the ProcessInstanceInfo - PlatformiOSSimulator can now list iOS simulator processes correctly instead of showing nothing by using: (lldb) platform select ios-simulator (lldb) platform process list - debugserver can now properly return "*-apple-ios" for the triple in the process info packets for iOS simulator executables - GDBRemoteCommunicationClient now correctly passes along the triples it gets for process info by setting the OS in the llvm::Triple correctly <rdar://problem/17060217> llvm-svn: 209852
* gdb-remote testing: new test, cleaned up socket reading.Todd Fiala2014-05-295-129/+521
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new SocketPacketPump class to decouple gdb remote packet reading from packet expectations code. This allowed for cleaner implementation of the separate $O output streams (non-deterministic packaging of inferior stdout/stderr) from all the rest of the packets. Added a packet expectation matcher that can match expected accumulated output with a timeout. Use a dictionary with "type":"output_match". See lldbgdbserverutils.MatchRemoteOutputEntry for details. Added a gdb remote test to verify that $Hc (continue thread selection) plus signal delivery ($C{signo}) works. Having trouble getting this to pass with debugserver on MacOSX 10.9. Tried different variants, including $vCont;C{signo}:{thread-id};c. In some cases, I get the test exe's signal handler to run ($vCont variant first time), in others I don't ($vCont second and further times). $C{signo} doesn't hit the signal handler code at all in the test exe but delivers a stop. Further $Hc and $C{signo} deliver the stop marking the wrong thread. For now I'm marking the test as XFAIL on dsym/debugserver. Will revisit this on lldb-dev. Updated the text exe for these tests to support thread:print-ids (each thread announces its thread id) and provide a SIGUSR1 thread handler that prints out the thread id on which it was signaled. llvm-svn: 209845
* Fixed the Module::Module(ModuleSpec) constructor to properly copy the file ↵Greg Clayton2014-05-291-2/+2
| | | | | | offset and object file mod time from the actual module specifications so we will always be able to directly load the image we care about when calling Module::GetObjectFile(). llvm-svn: 209833
* Fix r209807 which inadvertently removed thingsArnaud A. de Grandmaison2014-05-291-0/+3
| | | | llvm-svn: 209809
* Fix build. Method was renamed in r209800.Nikola Smiljanic2014-05-291-5/+2
| | | | llvm-svn: 209807
* Disabled warning C4251 on MSVC builds.Todd Fiala2014-05-281-0/+1
| | | | | | | | | See http://reviews.llvm.org/D3934 for more details. This is only the CMakeLists.txt portion of that change. Change by Zachary Turner. llvm-svn: 209756
* Cmake build changes.Todd Fiala2014-05-281-11/+19
| | | | | | | | | | | | | Disables exception handling in LLDB, using appropriate compiler flags depending on the platform. This is consistent with the build of LLVM, should improve performance, and also removes a substantial number of warnings from the Windows build. See http://reviews.llvm.org/D3929 for more details. Change by Zachary Turner llvm-svn: 209752
* Fix Windows warnings.Todd Fiala2014-05-287-14/+12
| | | | | | | | | | This fixes a number of trivial warnings in the Windows build. This is part of a larger effort to make the Windows build warning-free. See http://reviews.llvm.org/D3914 for more details. Change by Zachary Turner llvm-svn: 209749
* Avoid passing null signal name for Log %s argumentEd Maste2014-05-281-3/+7
| | | | llvm-svn: 209739
* Fix whitespace / formattingEd Maste2014-05-282-15/+15
| | | | llvm-svn: 209737
* Remove unused variable.Greg Clayton2014-05-281-2/+0
| | | | llvm-svn: 209703
* Allow classes to be intialized using current lldb::SB objects. This can help ↵Greg Clayton2014-05-281-4/+55
| | | | | | to import/export the current process state. llvm-svn: 209702
* Add stdlib.h for malloc and friendsEd Maste2014-05-261-0/+2
| | | | llvm-svn: 209633
* Remove include of obsolete stropts.h headerEd Maste2014-05-261-1/+0
| | | | | | | The header is for POSIX streams functionality, and does not exist on FreeBSD, OS X, or contemporary Linux distributions. llvm-svn: 209632
* Use MIUtilSystemLinux on FreeBSD as wellEd Maste2014-05-263-3/+3
| | | | | | | | We should later rename this file (probably MIUtilSystemPOSIX), but more clean-up is still needed here, and we can wait until we better understand how this code may be shared between FreeBSD, Linux, and OS X. llvm-svn: 209631
* Add missing headerEd Maste2014-05-261-0/+1
| | | | | | Presumably included by header leakage on other platforms. llvm-svn: 209630
* Add a lock ivar to the Platform so that multiple TargetsJason Molenda2014-05-232-3/+9
| | | | | | | | trying to populate the list of trap handler names at the same time don't conflict with one another. <rdar://problem/17011969> llvm-svn: 209563
* Remove some unnecessary comments from previous check-in.Todd Fiala2014-05-231-51/+47
| | | | | | | | | | | Removed a "done" TODO comment. Moved some helper methods to the top of the unit test. Removed some commented out code I was considering implementing before I came up with a better overall approach. llvm-svn: 209561
* Added gdb remote tests to verify $Hg{thread-id}.Todd Fiala2014-05-234-7/+215
| | | | | | | | | | | | | | | | | | | | | Added test to check that each thread reported by $q{f,s}ThreadInfo can be switched to by $Hg, verified by a follow-up $qC. Modified test exe to accept "thread:new" to create a new thread that runs and sleeps for 5 seconds. @llgs_test/@debugserver_test now buffer output. llgs and debugserver gdbremote protocol tests now collect $O notification output into the context returned from expect_lldb_gdbserver_replay. context["O_count"] is an integer indicating the number of $O packets collected during the replay, and context["O_content"] contains the accumulated hex-decoded text output by the inferior (stdout and stderr). Modified the $O check test to check the accumulated output rather than a direct $O packet. llvm-svn: 209560
* Fixed the Symbol code to resolve the callable addressSean Callanan2014-05-233-27/+63
| | | | | | | | | | of the symbol itself rather than forcing clients to do it. This simplifies the logic for the expression parser a great deal. <rdar://problem/16935324> llvm-svn: 209494
* Instead of having an UnwindTable own a single assembly profiler, Jason Molenda2014-05-234-24/+40
| | | | | | | | | | | and sharing it with all of its FuncUnwinders, have each FuncUnwinder create an AssemblyProfiler on demand as needed. I was worried that the cost of creating the llvm disassemblers would be high for this approach but it's not supposed to be an expensive operation, and it means we don't need to add locks around this section of code. <rdar://problem/16992332> llvm-svn: 209493
* Revert r209488; Greg suggests a different approach.Jason Molenda2014-05-234-28/+13
| | | | llvm-svn: 209492
* The UnwindTable (one per module) used to hand out shared pointersJason Molenda2014-05-234-13/+28
| | | | | | | | | | | | | | | to its unwind assembly profiler to all of the FuncUnwinders (one per symbol) under it. If lldb is running multiple targets, you could get two different FuncUnwinders in the same Module trying to use the same llvm disassembler simultaneously and that may be a re-entrancy problem. Instead, the UnwindTable has the unwind assembly profiler and when the FuncUnwinders want to use it, they get exclusive access to the assembly profiler until they're done using it. <rdar://problem/16992332> llvm-svn: 209488
* Make sure SectionLoadHistory::GetCurrentSectionLoadList () is thread safe.Greg Clayton2014-05-221-0/+1
| | | | | | <rdar://problem/15818525> llvm-svn: 209485
* Added gdbremote protocol test for $p and returned data size.Todd Fiala2014-05-221-0/+78
| | | | | | | | | | | | Each register returned by $qRegisterInfo is tested that it's $p register read returns a representation that is the correct byte size as indicated by $qRegisterInfo. Currently enabled for debugserver, disabled for llgs. The llgs branch will use this to verify $p implementation. llvm-svn: 209452
* Change ProcessKDP::DoReadMemory() to break up large memoryJason Molenda2014-05-211-1/+25
| | | | | | | | | read requests into smaller chunks; some remote kdp stubs cannot handle memory reads larger than a KB or two & will error out. <rdar://problem/16983125> llvm-svn: 209341
* Added tests for q{f,s}ThreadInfo for attached processes.Todd Fiala2014-05-211-28/+115
| | | | | | | | | | | | | | | | | | Added helper methods: prep_debug_monitor_and_inferior(): properly handles the two cases of running the stub against an inferior process launched by the stub, and one attached to by the stub. See docs for function: simplifies test creation for tests that want to test the same operations against a launched and attached inferior. Added the q{f,s}ThreadInfo and $qC response comparison test (verifies they both return the same thing) when the process is attached rather than launched by the stub. Modified the previous two tests added to make use of the new prep_debug_monitor_and_inferior() facility. llvm-svn: 209318
* Added gdb-remote tests for q{f,s}ThreadInfo.Todd Fiala2014-05-212-3/+134
| | | | | | | | | The First test verifies that qThreadInfo queries work for stub-launched processes. The second test verifies that $qC after stub-launched inferior returns the same thread as the qThreadInfo queries. llvm-svn: 209314
* Implement Host::GetThreadName for FreeBSDEd Maste2014-05-211-0/+29
| | | | llvm-svn: 209312
* Update for llvm api change in r209266.Rafael Espindola2014-05-211-3/+6
| | | | llvm-svn: 209303
OpenPOWER on IntegriCloud