- Jan 29, 2012
-
-
Greg Clayton authored
due to RTTI worries since llvm and clang don't use RTTI, but I was able to switch back with no issues as far as I can tell. Once the RTTI issue wasn't an issue, we were looking for a way to properly track weak pointers to objects to solve some of the threading issues we have been running into which naturally led us back to std::tr1::weak_ptr. We also wanted the ability to make a shared pointer from just a pointer, which is also easily solved using the std::tr1::enable_shared_from_this class. The main reason for this move back is so we can start properly having weak references to objects. Currently a lldb_private::Thread class has a refrence to its parent lldb_private::Process. This doesn't work well when we now hand out a SBThread object that contains a shared pointer to a lldb_private::Thread as this SBThread can be held onto by external clients and if they end up using one of these objects we can easily crash. So the next task is to start adopting std::tr1::weak_ptr where ever it makes sense which we can do with lldb_private::Debugger, lldb_private::Target, lldb_private::Process, lldb_private::Thread, lldb_private::StackFrame, and many more objects now that they are no longer using intrusive ref counted pointer objects (you can't do std::tr1::weak_ptr functionality with intrusive pointers). llvm-svn: 149207
-
Greg Clayton authored
llvm-svn: 149192
-
Greg Clayton authored
from the SBTarget and SBModule interfaces. Also added many python properties for easier access to many things from many SB objects. llvm-svn: 149191
-
- Jan 28, 2012
-
-
Jason Molenda authored
llvm-svn: 149171
-
Greg Clayton authored
llvm-svn: 149168
-
Greg Clayton authored
for when we enable the assisted layout. llvm-svn: 149167
-
Greg Clayton authored
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
-
Greg Clayton authored
llvm-svn: 149165
-
Greg Clayton authored
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
-
- Jan 27, 2012
-
-
Johnny Chen authored
Add an InstanceSettings::NotifyOwnerIsShuttingDown() method so that the owner can notify InstanceSettings instances that their owner reference is no longer valid. llvm-svn: 149145
-
Greg Clayton authored
test suite and I need to investigate this. llvm-svn: 149141
-
Johnny Chen authored
llvm-svn: 149140
-
Johnny Chen authored
Emit the message about putting ' -- ' between the end of command options and 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
-
Greg Clayton authored
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
-
Greg Clayton authored
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
-
Greg Clayton authored
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
-
Greg Clayton authored
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
-
Greg Clayton authored
the ClusterManager. Also switched to using Mutex::Locker where we can. llvm-svn: 149132
-
Greg Clayton authored
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/10760649Greg Clayton authored
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/10750012Greg Clayton authored
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
-
- Jan 26, 2012
-
-
Greg Clayton authored
target variable -f <format> [args] frame variable -f <format> [args] expression -f <format> -- expr llvm-svn: 149080
-
Greg Clayton authored
and showed a work around for when this won't. llvm-svn: 149046
-
Greg Clayton authored
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
-
Greg Clayton authored
llvm-svn: 149004
-
Johnny Chen authored
llvm-svn: 149002
-
Johnny Chen authored
llvm-svn: 148994
-
- Jan 25, 2012
-
-
Greg Clayton authored
If timestamps are enabled when logging GDB remote packets ("log enable -T -f /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
-
Johnny Chen authored
llvm-svn: 148974
-
Johnny Chen authored
llvm-svn: 148972
-
Johnny Chen authored
llvm-svn: 148971
-
Greg Clayton authored
llvm-svn: 148911
-
Johnny Chen authored
o complete an unambiguous option o complete/list the available option values o complete/list the candidate command names llvm-svn: 148899
-
Johnny Chen authored
llvm-svn: 148876
-
- Jan 24, 2012
-
-
Sean Callanan authored
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
-
Jim Ingham authored
llvm-svn: 148770
-
Jim Ingham authored
llvm-svn: 148769
-
Jim Ingham authored
llvm-svn: 148768
-
Johnny Chen authored
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
-
Johnny Chen authored
llvm-svn: 148756
-