summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Fix shell commands that do code signing.Jason Molenda2012-01-282-2/+2
| | | | llvm-svn: 149171
* Bumping Xcode project versions for lldb-109 and debugserver-167.Greg Clayton2012-01-283-22/+22
| | | | llvm-svn: 149168
* Added logging so we can see the field names and offsets of any structures Greg Clayton2012-01-281-2/+12
| | | | | | for when we enable the assisted layout. llvm-svn: 149167
* Stop running so many individual commands when going into the script interpreter.Greg Clayton2012-01-281-48/+20
| | | | | | | | | | All of the commands now get globbed into a single line. lldb.target, lldb.process, lldb.thread and lldb.frame now get initialized with empty SBTarget, SBProcess, SBThread and SBFrame objects when they don't contain anything. llvm-svn: 149166
* Xcode codesigning is broken. Work around this by doing code signing in a ↵Greg Clayton2012-01-282-10/+30
| | | | | | shell script build phase. llvm-svn: 149165
* Adding the DWARF parser side for assited layout where the AST contextGreg Clayton2012-01-285-136/+330
| | | | | | | | | will ask ExternalASTSource objects to help laying out a type. This is needed because the DWARF typically doesn't contain alignement or packing attribute values, and we need to be able to match up types that the compiler uses in expressions. llvm-svn: 149160
* Add an InstanceSettings::NotifyOwnerIsShuttingDown() method so that the ↵Johnny Chen2012-01-272-2/+17
| | | | | | | | owner can notify InstanceSettings instances that their owner reference is no longer valid. llvm-svn: 149145
* Disable the ConnectionFileDescriptor mutex for now as it is deadlocking ourGreg Clayton2012-01-272-8/+7
| | | | | | test suite and I need to investigate this. llvm-svn: 149141
* Fix typo.Johnny Chen2012-01-271-1/+1
| | | | llvm-svn: 149140
* Emit the message about putting ' -- ' between the end of command options and ↵Johnny Chen2012-01-271-2/+4
| | | | | | | | the raw input conditionally, that is, only if the command object does not want completion. An example is the "settings set" command. llvm-svn: 149139
* Added a ModuleList::Destroy() method which will reclaim the std::vectorGreg Clayton2012-01-274-24/+68
| | | | | | | | | | memory by doing a swap. Also added a few utilty functions that can be enabled for debugging issues with modules staying around too long when external clients still have references to them. llvm-svn: 149138
* NULL out the "ptr_" member of shared pointers for debug and releaseGreg Clayton2012-01-271-0/+9
| | | | | | | | builds (not build and integration builds) to help catch when a shared pointer that might be in a collection class is used after the collection has been freed. llvm-svn: 149136
* Enable extra error checking for debug builds in our mutexes byGreg Clayton2012-01-271-0/+36
| | | | | | | | | | watching for errors from pthread_mutex_destroy () (usually "Resource busy" errors for when you have a mutex locked and try to destroy it), and pthread_mutex_lock, and pthread_mutex_unlock (usually for trying to lock an invalid mutex that might have possible already been freed). llvm-svn: 149135
* There is no need to hold onto an ExecutionContext as a member variable. Greg Clayton2012-01-272-7/+4
| | | | | | | ExecutionContext objects have shared pointers to Target, Process, Thread and Frame objects and they can end up being held onto for too long. llvm-svn: 149133
* Fixed a location where we would never end up unlocking our mutex inGreg Clayton2012-01-271-11/+13
| | | | | | the ClusterManager. Also switched to using Mutex::Locker where we can. llvm-svn: 149132
* Fixed an issue that could happen during global object destruction in ourGreg Clayton2012-01-273-7/+14
| | | | | | | map that tracks all live Module classes. We must leak our mutex for our collection class as it might be destroyed in an order we can't control. llvm-svn: 149131
* <rdar://problem/10760649>Greg Clayton2012-01-272-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed another double file descriptor close issue that could occur when destroying a ProcessGDBRemote() object. There was a race which was detected by our fd_interposing library: error: /Applications/Xcode.app/Contents/MacOS/Xcode (pid=55222): close (fd=60) resulted in EBADF: 0 libFDInterposing.dylib 0x00000001082be8ca close$__interposed__ + 666 1 LLDB 0x00000001194fde91 lldb_private::ConnectionFileDescriptor::Close(int&, lldb_private::Error*) + 97 2 LLDB 0x00000001194fddcd lldb_private::ConnectionFileDescriptor::Disconnect(lldb_private::Error*) + 143 3 LLDB 0x00000001194fe249 lldb_private::ConnectionFileDescriptor::Read(void*, unsigned long, unsigned int, lldb::ConnectionStatus&, lldb_private::Error*) + 835 4 LLDB 0x00000001194fc320 lldb_private::Communication::Read(void*, unsigned long, unsigned int, lldb::ConnectionStatus&, lldb_private::Error*) + 634 5 LLDB 0x000000011959c7f4 GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote&, unsigned int) + 228 6 LLDB 0x000000011959c6b5 GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSeconds(StringExtractorGDBRemote&, unsigned int) + 49 7 LLDB 0x0000000119629a71 GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse(ProcessGDBRemote*, char const*, unsigned long, StringExtractorGDBRemote&) + 509 8 LLDB 0x00000001195a4076 ProcessGDBRemote::AsyncThread(void*) + 514 9 LLDB 0x0000000119568094 ThreadCreateTrampoline(void*) + 91 10 libsystem_c.dylib 0x00007fff8ca028bf _pthread_start + 335 11 libsystem_c.dylib 0x00007fff8ca05b75 thread_start + 13 fd=60 was previously closed with this event: pid=55222: close (fd=60) => 0 0 libFDInterposing.dylib 0x00000001082be870 close$__interposed__ + 576 1 LLDB 0x00000001194fde91 lldb_private::ConnectionFileDescriptor::Close(int&, lldb_private::Error*) + 97 2 LLDB 0x00000001194fddcd lldb_private::ConnectionFileDescriptor::Disconnect(lldb_private::Error*) + 143 3 LLDB 0x00000001194fbf00 lldb_private::Communication::Disconnect(lldb_private::Error*) + 92 4 LLDB 0x00000001195a2a77 ProcessGDBRemote::StopAsyncThread() + 89 5 LLDB 0x00000001195a2bf6 ProcessGDBRemote::DoDestroy() + 310 6 LLDB 0x00000001195f938d lldb_private::Process::Destroy() + 85 7 LLDB 0x0000000118819b48 lldb::SBProcess::Kill() + 72 8 DebuggerLLDB 0x0000000117264358 DBGLLDBSessionThread(void*) + 4450 9 LLDB 0x0000000119568094 ThreadCreateTrampoline(void*) + 91 10 libsystem_c.dylib 0x00007fff8ca028bf _pthread_start + 335 11 libsystem_c.dylib 0x00007fff8ca05b75 thread_start + 13 fd=60 was created with this event: pid=55222: socket (domain = 2, type = 1, protocol = 6) => fd=60 0 libFDInterposing.dylib 0x00000001082bc968 socket$__interposed__ + 600 1 LLDB 0x00000001194fd75f lldb_private::ConnectionFileDescriptor::ConnectTCP(char const*, lldb_private::Error*) + 179 ..... llvm-svn: 149103
* <rdar://problem/10750012>Greg Clayton2012-01-276-95/+5
| | | | | | | | Remove a pseudo terminal master open and slave file descriptor that was being used for pythong stdin. It was not hooked up correctly and was causing file descriptor leaks. llvm-svn: 149098
* Fixed formats being able to be applied recursively when using:Greg Clayton2012-01-266-36/+69
| | | | | | | | target variable -f <format> [args] frame variable -f <format> [args] expression -f <format> -- expr llvm-svn: 149080
* Added some clarifications about when the __lldb_init_module would be calledGreg Clayton2012-01-261-6/+27
| | | | | | and showed a work around for when this won't. llvm-svn: 149046
* Added a 'gdbremote' python module that adds two commands: start_gdb_log and ↵Greg Clayton2012-01-262-4/+188
| | | | | | | | | | | | | | | end_gdb_log. When this is imported into your lldb using the "command script import /path/to/gdbremote.py" these new commands are available within LLDB. 'start_gdb_log' will enable logging with timestamps for GDB remote packets, and 'stop_gdb_log' will then dump the details and also a lot of packet timing data. This allows us to accurately track what packets are taking up the most time when debugging (when using the ProcessGDBRemote debugging plug-in). Also udpated the comments at the top of the cmdtemplate.py to show how to correctly import the module from within LLDB. llvm-svn: 149030
* Fix page title.Greg Clayton2012-01-261-2/+2
| | | | llvm-svn: 149004
* For Dump(Stream *s), use GetOptionsNoCreate()->GetIgnoreCount() and fix the ↵Johnny Chen2012-01-261-8/+8
| | | | | | indentation. llvm-svn: 149002
* Typo.Johnny Chen2012-01-251-1/+1
| | | | llvm-svn: 148994
* If timestamps are enabled when logging GDB remote packets ("log enable -T -f ↵Greg Clayton2012-01-251-2/+97
| | | | | | | | | | | | | | | | | | | | | | | /tmp/packets.log gdb-remote logs") then get the amount of time spent executing each packet and summarize at the end of a dump. Sample timing output looks like: ---------------------------------------------------------------------- Packet timing summary: ---------------------------------------------------------------------- Packet Time % ---------------------- -------- ------ qThreadStopInfo 0.363844 35.35 m 0.281967 27.39 s 0.147160 14.30 qfThreadInfo 0.070865 6.88 qsThreadInfo 0.061608 5.99 z 0.036796 3.57 Z 0.036271 3.52 c 0.018410 1.79 H 0.012418 1.21 ---------------------- -------- ------ Total 1.029339 100.00 llvm-svn: 148983
* Move argument checking/manipulation into the front of the function.Johnny Chen2012-01-251-4/+9
| | | | llvm-svn: 148974
* Clearify some comment.Johnny Chen2012-01-251-1/+2
| | | | llvm-svn: 148972
* Cleanup docstring and remove dead code.Johnny Chen2012-01-251-4/+3
| | | | llvm-svn: 148971
* Handle 's' packets correctly when disassembling GDB packet output.Greg Clayton2012-01-251-5/+15
| | | | llvm-svn: 148911
* Add some more test cases for command completion:Johnny Chen2012-01-251-0/+12
| | | | | | | | o complete an unambiguous option o complete/list the available option values o complete/list the candidate command names llvm-svn: 148899
* Fix a typo in the error message of the StopInfoWatchpoint class.Johnny Chen2012-01-241-1/+1
| | | | llvm-svn: 148876
* Added a mechanism for the IR interpreter to returnSean Callanan2012-01-246-66/+159
| | | | | | | | | an error along with its boolean result. The expression parser reports this error if the interpreter fails and the expression could not be run in the target. llvm-svn: 148870
* Better name for the Python Scripting.Jim Ingham2012-01-241-1/+1
| | | | llvm-svn: 148770
* Better name for the python reference.Jim Ingham2012-01-242-1/+1
| | | | llvm-svn: 148769
* Proof-reading the python docs.Jim Ingham2012-01-242-68/+105
| | | | llvm-svn: 148768
* Modify redo.py script so that if sessin_dir is left unspecified, it uses the ↵Johnny Chen2012-01-241-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | heuristic to find the possible session directories with names starting with %Y-%m-%d- (for example, 2012-01-23-) and employs the one with the latest timestamp. For example: johnny:/Volumes/data/lldb/svn/latest/test $ ./redo.py Using session dir path: /Volumes/data/lldb/svn/latest/test/2012-01-23-11_28_30 adding filterspec: DisassembleRawDataTestCase.test_disassemble_raw_data Running ./dotest.py -C clang -v -t -f DisassembleRawDataTestCase.test_disassemble_raw_data LLDB build dir: /Volumes/data/lldb/svn/latest/build/Debug LLDB-108 Path: /Volumes/data/lldb/svn/latest URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk Repository Root: https://johnny@llvm.org/svn/llvm-project Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8 Revision: 148710 Node Kind: directory Schedule: normal Last Changed Author: gclayton Last Changed Rev: 148650 Last Changed Date: 2012-01-21 18:55:08 -0800 (Sat, 21 Jan 2012) Session logs for test failures/errors/unexpected successes will go into directory '2012-01-23-17_04_48' Command invoked: python ./dotest.py -C clang -v -t -f DisassembleRawDataTestCase.test_disassemble_raw_data Configuration: compiler=clang ---------------------------------------------------------------------- Collected 1 test Change dir to: /Volumes/data/lldb/svn/latest/test/python_api/disassemble-raw-data 1: test_disassemble_raw_data (TestDisassembleRawData.DisassembleRawDataTestCase) Test disassembling raw bytes with the API. ... Raw bytes: ['0x48', '0x89', '0xe5'] Disassembled: movq %rsp, %rbp ok Restore dir to: /Volumes/data/lldb/svn/latest/test ---------------------------------------------------------------------- Ran 1 test in 0.233s OK llvm-svn: 148766
* Minor comment change. Plus use member function instead of directly ↵Johnny Chen2012-01-242-3/+3
| | | | | | accessing member field. llvm-svn: 148756
* Tiny refactoring to use member functions instead of directly accessing ↵Johnny Chen2012-01-234-7/+11
| | | | | | member fields. llvm-svn: 148743
* Followup check in for http://llvm.org/viewvc/llvm-project?rev=148491&view=rev,Johnny Chen2012-01-234-45/+129
| | | | | | | | | where we changed the CommandObjectSettingsSet object impl to require raw command string. Do the same for CommandObjectSettingsAppend/InsertBefore/InsertAfter classes and add test cases for basic functionalities as well as for variable name completion. llvm-svn: 148719
* Dump the raw bytes and the disassembled instruction before calling ↵Johnny Chen2012-01-231-3/+3
| | | | | | | | self.assertTrue() instead of after, in case the assert fails for any reason. llvm-svn: 148717
* Added a python FAQ page with detailed examples of how to add python functionsGreg Clayton2012-01-228-5/+477
| | | | | | | to breakpoints, creating new LLDB commands using python modules and also how to run scripts from the command line. llvm-svn: 148650
* Added options to specify how many instructions before and after the frameGreg Clayton2012-01-211-12/+25
| | | | | | | PC to disassemble. Users can also specify the frame depth to disassemble to and also if disassembly should happen for all threads. llvm-svn: 148627
* Use the "shlex" module to parse the command line that was passed down intoGreg Clayton2012-01-211-6/+25
| | | | | | | | | | python so that single and double quotes and other standard shell like argument parsing happens as expected before passing stuff along to option parsing. Also handle exceptions so that we don't accidentally exit lldb if an uncaught exception occurs. llvm-svn: 148623
* <rdar://problem/10711649>Greg Clayton2012-01-211-0/+7
| | | | | | A Small tweak to handle a zero timeout. llvm-svn: 148617
* Our Read functions were taking a timeout of UINT32_MAX to mean wait forever, ↵Jim Ingham2012-01-211-2/+10
| | | | | | | | | but then we didn't implement that in setting the socket option. <rdar://problem/10711649> llvm-svn: 148616
* Followup check in for http://llvm.org/viewvc/llvm-project?rev=148491&view=rev,Johnny Chen2012-01-214-14/+48
| | | | | | | | | | where we changed the CommandObjectSettingsSet object impl to require raw command string. Do the same for CommandObjectSettingsReplace class and add two test cases; one for the "settings replace" command and the other to ensure that completion for variable name still works. llvm-svn: 148615
* Bumped Xcode project versions for lldb-108 and debugserver-166.Greg Clayton2012-01-213-23/+23
| | | | llvm-svn: 148613
* Fixed it so the "--help" option works for the crashlog command. Corrected andGreg Clayton2012-01-211-172/+210
| | | | | | | | | | | | filled out the command help and removed unused options. Updated the command to have a "--load-all" option that will cause the target that gets created to locate and load all images specified in the Binary Images section of the crash log to allow for complete program state to be matched to that of the crash log, not just the images that were in the stack frames (the default). llvm-svn: 148605
* Add comment.Johnny Chen2012-01-211-3/+4
| | | | llvm-svn: 148602
* A little bit of cleanup to make the code more understandable.Johnny Chen2012-01-201-6/+6
| | | | llvm-svn: 148600
OpenPOWER on IntegriCloud