summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Make sure frozen_sp for a ClangExpressionVariableSean Callanan2012-04-121-1/+2
| | | | | | is non-NULL before asking for its name. llvm-svn: 154593
* Cleaned up code that was getting SBData for an SBInstruction.Greg Clayton2012-04-113-34/+74
| | | | llvm-svn: 154535
* Fixed an issue that would cause a crash when dumping fully qualified types.Greg Clayton2012-04-111-2/+5
| | | | llvm-svn: 154503
* No functionality changes, mostly cleanup.Greg Clayton2012-04-1120-138/+115
| | | | | | | | Cleaned up the Mutex::Locker and the ReadWriteLock classes a bit. Also cleaned up the GDBRemoteCommunication class to not have so many packet functions. Used the "NoLock" versions of send/receive packet functions when possible for a bit of performance. llvm-svn: 154458
* Improved detection of ARM branch instructions toSean Callanan2012-04-101-6/+4
| | | | | | cover all possible condition codes. llvm-svn: 154440
* Set variables returned by utility functions toSean Callanan2012-04-101-1/+2
| | | | | | | not consume slots in the persistent variable store. llvm-svn: 154416
* Added a new packet to our GDB remote protocol:Greg Clayton2012-04-103-2/+27
| | | | | | | | QListThreadsInStopReply This GDB remote query command can enable added a "threads" key/value pair to all stop reply packets so that we always get a list of all threads in each stop reply packet. It increases performance if enabled (the reply to the "QListThreadsInStopReply" is "OK") by saving us from sending to command/reply pairs (the "qfThreadInfo" and "qsThreadInfo" packets), and also helps us keep the current process state up to date. llvm-svn: 154380
* A general stability fix where we _always_ get the thread list immediately ↵Greg Clayton2012-04-102-15/+84
| | | | | | | | after we get the stop packets. We had some racy conditions where thread 1 might be sending a packet and thread 2 tries to send a packet to get the thread list and it fails and ends up with an empty list. Packets use a sequence mutex to be able to ensure when you send a packet, you get the resonse. This sequence mutex is take when the process is running, and as we exit the running state and notify our process with the stop packet, we now always get the thread ID list before we do anything and before we can run into race conditions. The next step is to have our stop reply packets send the thread list in the actual stop reply packet to avoid a 2 packet overhead of sending the qfThreadInfo + response and qfThreadInfo + response. llvm-svn: 154376
* Two changes, Jim Ingham2012-04-101-10/+44
| | | | | | | | | | | | | | | 1) Start the PrivateStateThread stopped, and then in StartPrivateStateThread, make the private state thread and then resume it before we say the thread is created. That way we know it is listening for events by the time we get out of StartPrivateStateThread. 2) Backstop running a thread plan when calling Process::RunThreadPlan on the private state thread with a ThreadPlanBase so that running the plan doesn't pass its stop events to whatever plans happen to be above us on the thread plan stack. llvm-svn: 154368
* Clear the "m_actual_stop_info_sp" in the thread during Destroy. It might be ↵Jim Ingham2012-04-101-0/+1
| | | | | | a StopInfoThreadPlan, and that would hold onto members that need to be destroyed while the Full thread is still around. llvm-svn: 154366
* Trying to solve our disappearing thread issues by making thread list updates ↵Greg Clayton2012-04-1015-37/+41
| | | | | | | | | | | | | | | | safer. The current ProcessGDBRemote function that updates the threads could end up with an empty list if any other thread had the sequence mutex. We now don't clear the thread list when we can't access it, and we also have changed how lldb_private::Process handles the return code from the: virtual bool Process::UpdateThreadList (lldb_private::ThreadList &old_thread_list, lldb_private::ThreadList &new_thread_list) = 0; A bool is now returned to indicate if the list was actually updated or not and the lldb_private::Process class will only update the stop ID of the validity of the thread list if "true" is returned. The ProcessGDBRemote also got an extra assertion that will hopefully assert when running debug builds so we can find the source of this issue. llvm-svn: 154365
* Added a packet history object to the GDBRemoteCommunication class that is ↵Greg Clayton2012-04-095-24/+281
| | | | | | always remembering the last 512 packets that were sent/received. These packets get dumped if logging gets enabled, or when the new expr lldb::DumpProcessGDBRemotePacketHistory (void *process, const char *log_file_path) global function is called. llvm-svn: 154354
* Fixed an issue that could occur when looking up functions inside of a ↵Greg Clayton2012-04-091-35/+112
| | | | | | | | namespace where if the NamespaceDecl hadn't been parsed yet, we would say a function wasn't in a namespace. Also improved the logging that happens with "log enable dwarf lookups" is enabled to show when we find matches. llvm-svn: 154352
* Rework how master plans declare themselves. Also make "PlanIsBasePlan" not ↵Jim Ingham2012-04-096-2/+28
| | | | | | rely only on this being the bottom plan in the stack, but allow the plan to declare itself as such. llvm-svn: 154351
* <rdar://problem/11202426> Greg Clayton2012-04-094-8/+27
| | | | | | Work around a deadlocking issue where "SBDebugger::MemoryPressureDetected ()" is being called and is causing a deadlock. We now just try and get the lock when trying to trim down the unique modules so we don't deadlock debugger GUI programs until we can find the root cause. llvm-svn: 154339
* Linux/ProcessMonitor: include sys/user.h for user_regs_struct and ↵Benjamin Kramer2012-04-071-0/+1
| | | | | | user_fpregs_struct. llvm-svn: 154255
* Version bump to lldb-138.Jason Molenda2012-04-072-2/+2
| | | | llvm-svn: 154252
* Fix a integer trauction issue - calculating the current time inJason Molenda2012-04-071-2/+2
| | | | | | | | | | | | | nanoseconds in 32-bit expression would cause pthread_cond_timedwait to time out immediately. Add explicit casts to the TimeValue::TimeValue ctor that takes a struct timeval and change the NanoSecsPerSec etc constants defined in TimeValue to be uint64_t so any other calculations involving these should be promoted to 64-bit even when lldb is built for 32-bit. <rdar://problem/11204073>, <rdar://problem/11179821>, <rdar://problem/11194705>. llvm-svn: 154250
* Removed redundant isxdigit checks and added the ability to GetHexU8() so it ↵Greg Clayton2012-04-072-19/+12
| | | | | | can extract an 8 bit hex value if one is available. It will set EOF if "set_eof_on_fail" is true or if out of data. This allows a string decoder to grab a string without losing the last part of the packet with a packet like "414243,abc" (it can extract "ABC" and leave the file position set to the comma). llvm-svn: 154239
* Hardened the struct layout code to eliminate aSean Callanan2012-04-071-0/+5
| | | | | | | potential crash if the underlying type couldn't be completed. llvm-svn: 154234
* We sometimes need to be able to call functions (via Process::RunThreadPlan) ↵Jim Ingham2012-04-077-127/+250
| | | | | | | | | | | | from code run on the private state thread. To do that we have to spin up a temporary "private state thread" that will respond to events from the lower level process plugins. This check-in should work to do that, but it is still buggy. However, if you don't call functions on the private state thread, these changes make no difference. This patch also moves the code in the AppleObjCRuntime step-through-trampoline handler that might call functions (in the case where the debug server doesn't support the memory allocate/deallocate packet) out to a safe place to do that call. llvm-svn: 154230
* Fixed ModuleList::FindTypes() so that when a symbol context is supplied that ↵Greg Clayton2012-04-061-5/+28
| | | | | | contains a valid module, it will search that module first, then if we are still looking for matches (we have found less that "max_matches"), search in all of the other modules as well. llvm-svn: 154186
* Fixed a leak in the LLVM disassembler where weSean Callanan2012-04-061-0/+10
| | | | | | | did not destroy the underlying disassembler in our destructor. llvm-svn: 154185
* In a prior commit, I changed the parameters around on a ↵Greg Clayton2012-04-066-70/+105
| | | | | | ModuleList::FindTypes where the old parameters that existing clients were using would have been compatible, so I renamed ModuleList::FindTypes to ModuleList::FindTypes2. Then I made fixes and verified I updated and fixed all client code, but I forgot to rename the function back to ModuleList::FindTypes(). I am doing that now and also cleaning up the C++ dynamic type code a bit. llvm-svn: 154182
* Check if the two clang opaque type pointers are equal before doing anything ↵Greg Clayton2012-04-061-0/+3
| | | | | | more exhaustive comparison. llvm-svn: 154181
* Added logging when API calls try to do something that shouldn't be done when ↵Greg Clayton2012-04-064-249/+704
| | | | | | | | the process is stopped by having logging calls that end with "error: process is running". Also test for the process to be stopped when many SBValue API calls are made to make sure it is safe to evaluate values, children of values and much more. llvm-svn: 154160
* explicitly cast the value.Bill Wendling2012-04-061-1/+1
| | | | llvm-svn: 154148
* Order ivar initializers to how they're declared in the class.Bill Wendling2012-04-061-2/+2
| | | | llvm-svn: 154147
* Order ivar initializers to how they're declared in the class.Bill Wendling2012-04-061-1/+1
| | | | llvm-svn: 154146
* Enable building the POSIX-DYLD dynamic loader plug-in in the Makefile build ↵Greg Clayton2012-04-051-3/+4
| | | | | | since it can be used for remote debugging. llvm-svn: 154109
* Revert r154086. It may be needed for Darwin. But the symbols are still ↵Bill Wendling2012-04-051-4/+2
| | | | | | missing in the dylib. llvm-svn: 154108
* Added a new Host class: ReadWriteLockGreg Clayton2012-04-055-622/+817
| | | | | | | | | | | | This abstracts read/write locks on the current host system. It is currently backed by pthread_rwlock_t objects so it should work on all unix systems. We also need a way to control multi-threaded access to the process through the public API when it is running. For example it isn't a good idea to try and get stack frames while the process is running. To implement this, the lldb_private::Process class now contains a ReadWriteLock member variable named m_run_lock which is used to control the public process state. The public process state represents the state of the process as the client knows it. The private is used to control the actual current process state. So the public state of the process can be stopped, yet the private state can be running when evaluating an expression for example. Adding the read/write lock where readers are clients that want the process to stay stopped, and writers are clients that run the process, allows us to accurately control multi-threaded access to the process. Switched the SBThread and SBFrame over to us shared pointers to the ExecutionContextRef class instead of making their own class to track this. This fixed an issue with assigning on SBFrame to another and will also centralize the code that tracks weak references to execution context objects into one location. llvm-svn: 154099
* The DynamicLoaderPOSIXDYLD calls aren't available on Apple systems.Bill Wendling2012-04-051-2/+4
| | | | llvm-svn: 154086
* Fixed a problem where we did not read propertiesSean Callanan2012-04-054-25/+147
| | | | | | | | | | | | | | | | correctly if the setter/getter were not present in the debug information. The fixes are as follows: - We not only look for the method by its full name, but also look for automatically-generated methods when searching for a selector in an Objective-C interface. This is necessary to find accessors. - Extract the getter and setter name from the DW_TAG_APPLE_Property declaration in the DWARF if they are present; generate them if not. llvm-svn: 154067
* Order the initializations so that they reflect how they're declared in the ↵Bill Wendling2012-04-041-1/+1
| | | | | | class. llvm-svn: 154055
* <rdar://problem/11184458>Greg Clayton2012-04-041-5/+11
| | | | | | | | | | | Found an issue where we might still have shared pointer references to lldb_private::Thread objects where the object itself is not valid and has been removed from the Process. When a thread is removed from a process, it will call Thread::DestroyThread() which well set a boolean member variable which is exposed now via: bool Thread::IsValid() const; We then check the thread validity before handing out a shared pointer. llvm-svn: 154048
* Change SBAddress back to using a std::auto_ptr to a lldb_private::Address as ↵Greg Clayton2012-04-042-107/+44
| | | | | | the lldb_private::Address has a weak pointer to the section which has a weak pointer back to the module, so it is safe to have just a lldb_private::Address object now. llvm-svn: 154045
* Attempt at fixing a crasher where summary strings where looping endlessly.Enrico Granata2012-04-041-1/+8
| | | | llvm-svn: 154028
* Fixing a potential crasher where Python would assume we have no thread state ↵Enrico Granata2012-04-041-8/+15
| | | | | | while clearing out an SBDebugger which was acquiring input from the interactive interpreter llvm-svn: 154027
* Adding a new --python-function (-F) option to breakpoint command add. The ↵Enrico Granata2012-04-042-5/+39
| | | | | | option allows the user to specify a Python function name instead of a Python oneliner or interactive script input as a breakpoint command llvm-svn: 154026
* Initialize ivars in the correct order.Bill Wendling2012-04-031-3/+3
| | | | llvm-svn: 153947
* Possibly too soon for this commit.Bill Wendling2012-04-031-1/+1
| | | | llvm-svn: 153946
* Possibly too soon for this change.Bill Wendling2012-04-031-1/+1
| | | | llvm-svn: 153944
* Use the path to the header file. Use an integer instead of NULL. And get rid ↵Bill Wendling2012-04-031-3/+2
| | | | | | of a superfluous 'default' label. llvm-svn: 153943
* The option is 'NoInlineDefine.'Bill Wendling2012-04-031-1/+1
| | | | llvm-svn: 153942
* Use integers instead of NULL.Bill Wendling2012-04-032-4/+4
| | | | llvm-svn: 153941
* Spell 'DW_TAG_APPLE_property' with the correct capitalization.Bill Wendling2012-04-031-1/+1
| | | | llvm-svn: 153940
* Initialize ivars in the order they are defined in the class.Bill Wendling2012-04-031-3/+3
| | | | llvm-svn: 153931
* Return 0 for the size_t return type.Bill Wendling2012-04-031-1/+1
| | | | llvm-svn: 153930
* Use 0 instead of NULL for the integral value.Bill Wendling2012-04-031-12/+12
| | | | llvm-svn: 153929
OpenPOWER on IntegriCloud