| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
is non-NULL before asking for its name.
llvm-svn: 154593
|
| |
|
|
| |
llvm-svn: 154535
|
| |
|
|
| |
llvm-svn: 154503
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
cover all possible condition codes.
llvm-svn: 154440
|
| |
|
|
|
|
|
| |
not consume slots in the persistent variable
store.
llvm-svn: 154416
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
a StopInfoThreadPlan, and that would hold onto members that need to be destroyed while the Full thread is still around.
llvm-svn: 154366
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
rely only on this being the bottom plan in the stack, but allow the plan to declare itself as such.
llvm-svn: 154351
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
user_fpregs_struct.
llvm-svn: 154255
|
| |
|
|
| |
llvm-svn: 154252
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
potential crash if the underlying type couldn't
be completed.
llvm-svn: 154234
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
did not destroy the underlying disassembler in
our destructor.
llvm-svn: 154185
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
more exhaustive comparison.
llvm-svn: 154181
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 154148
|
| |
|
|
| |
llvm-svn: 154147
|
| |
|
|
| |
llvm-svn: 154146
|
| |
|
|
|
|
| |
since it can be used for remote debugging.
llvm-svn: 154109
|
| |
|
|
|
|
| |
missing in the dylib.
llvm-svn: 154108
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 154086
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
class.
llvm-svn: 154055
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 154028
|
| |
|
|
|
|
| |
while clearing out an SBDebugger which was acquiring input from the interactive interpreter
llvm-svn: 154027
|
| |
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 153947
|
| |
|
|
| |
llvm-svn: 153946
|
| |
|
|
| |
llvm-svn: 153944
|
| |
|
|
|
|
| |
of a superfluous 'default' label.
llvm-svn: 153943
|
| |
|
|
| |
llvm-svn: 153942
|
| |
|
|
| |
llvm-svn: 153941
|
| |
|
|
| |
llvm-svn: 153940
|
| |
|
|
| |
llvm-svn: 153931
|
| |
|
|
| |
llvm-svn: 153930
|
| |
|
|
| |
llvm-svn: 153929
|