- Apr 10, 2012
-
-
Sean Callanan authored
not consume slots in the persistent variable store. llvm-svn: 154416
-
Greg Clayton authored
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
-
Greg Clayton authored
A general stability fix where we _always_ get the thread list immediately 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
-
Jim Ingham authored
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
-
Jim Ingham authored
Clear the "m_actual_stop_info_sp" in the thread during Destroy. It might be a StopInfoThreadPlan, and that would hold onto members that need to be destroyed while the Full thread is still around. llvm-svn: 154366
-
Greg Clayton authored
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
-
Enrico Granata authored
Fixing a problem where some uninitialized cases of vectors could cause diagnostic output from the synthetic children providers - this time the fix should work llvm-svn: 154361
-
Greg Clayton authored
Added a packet history object to the GDBRemoteCommunication class that is 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
-
Greg Clayton authored
llvm-svn: 154353
-
Greg Clayton authored
Fixed an issue that could occur when looking up functions inside of a 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
-
Jim Ingham authored
Rework how master plans declare themselves. Also make "PlanIsBasePlan" not rely only on this being the bottom plan in the stack, but allow the plan to declare itself as such. llvm-svn: 154351
-
- Apr 09, 2012
-
-
rdar://problem/11202426Greg Clayton authored
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
-
- Apr 07, 2012
-
-
Benjamin Kramer authored
llvm-svn: 154255
-
Jason Molenda authored
llvm-svn: 154252
-
Jason Molenda authored
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
-
Greg Clayton authored
Removed redundant isxdigit checks and added the ability to GetHexU8() so it 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
-
Sean Callanan authored
potential crash if the underlying type couldn't be completed. llvm-svn: 154234
-
Jim Ingham authored
We sometimes need to be able to call functions (via Process::RunThreadPlan) 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
-
Sean Callanan authored
this file. llvm-svn: 154222
-
Sean Callanan authored
--start argument. Fixed that. llvm-svn: 154221
-
- Apr 06, 2012
-
-
Johnny Chen authored
llvm-svn: 154211
-
Sean Callanan authored
the stress test by a LOT. llvm-svn: 154208
-
Sean Callanan authored
new features: (1) it outputs the instruction currently being tested to a log file, if a path is provided (2) if instructed, it prints the time remaining in the exhaustive test llvm-svn: 154205
-
Johnny Chen authored
Plus some minor cleanup of test method names. Third and final batch is coming. llvm-svn: 154197
-
Greg Clayton authored
Fixed ModuleList::FindTypes() so that when a symbol context is supplied that 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
-
Sean Callanan authored
did not destroy the underlying disassembler in our destructor. llvm-svn: 154185
-
Greg Clayton authored
In a prior commit, I changed the parameters around on a 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
-
Greg Clayton authored
Check if the two clang opaque type pointers are equal before doing anything more exhaustive comparison. llvm-svn: 154181
-
Greg Clayton authored
Added logging when API calls try to do something that shouldn't be done when 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
-
Johnny Chen authored
either @dsym_test or @dwarf_test to be executed during the testsuite run. There are still lots of Test*.py files which have not been decorated with the new decorator. An example: # From TestMyFirstWatchpoint.py -> class HelloWatchpointTestCase(TestBase): mydir = os.path.join("functionalities", "watchpoint", "hello_watchpoint") @dsym_test def test_hello_watchpoint_with_dsym_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" self.buildDsym(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) self.hello_watchpoint() @dwarf_test def test_hello_watchpoint_with_dwarf_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" self.buildDwarf(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) self.hello_watchpoint() # Invocation -> [17:50:14] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py LLDB build dir: /Volumes/data/lldb/svn/ToT/build/Debug LLDB-137 Path: /Volumes/data/lldb/svn/ToT 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: 154133 Node Kind: directory Schedule: normal Last Changed Author: gclayton Last Changed Rev: 154109 Last Changed Date: 2012-04-05 10:43:02 -0700 (Thu, 05 Apr 2012) Session logs for test failures/errors/unexpected successes will go into directory '2012-04-05-17_50_49' Command invoked: python ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py compilers=['clang'] Configuration: arch=x86_64 compiler=clang ---------------------------------------------------------------------- Collected 2 tests 1: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... skipped 'dsym tests' 2: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... ok ---------------------------------------------------------------------- Ran 2 tests in 1.138s OK (skipped=1) Session logs for test failures/errors/unexpected successes can be found in directory '2012-04-05-17_50_49' [17:50:50] johnny:/Volumes/data/lldb/svn/ToT/test $ llvm-svn: 154154
-
Bill Wendling authored
llvm-svn: 154153
-
Bill Wendling authored
llvm-svn: 154148
-
Bill Wendling authored
llvm-svn: 154147
-
Bill Wendling authored
llvm-svn: 154146
-
Bill Wendling authored
llvm-svn: 154145
-
Sean Callanan authored
Right now it only works on Mac OS X, but other platforms would just need to add their own implementation of AddLLDBToSysPathOn*(). The stress-tester has two modes: Used with --bytes N --random, the stress-tester generates random instructions of length N and runs them through the disassembler. This is suitable for architectures like Intel where it is combinatorially infeasible to run through the entire space of possible instructions. Used with --bytes N and no arguments (or --start S --stride T), the stress-tester tests the disassembler with a monotonically increasing sequence of instructions. The --start and --stride arguments are intended for use in multiprocessing environments. Give each core an ID from 0 .. T-1, pass the ID in as the --start, and use T as the stride, and you can launch one copy of the stress-tester on each core you have available. llvm-svn: 154143
-
- Apr 05, 2012
-
-
Greg Clayton authored
Enable building the POSIX-DYLD dynamic loader plug-in in the Makefile build since it can be used for remote debugging. llvm-svn: 154109
-
Bill Wendling authored
llvm-svn: 154108
-
Greg Clayton authored
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
-
Bill Wendling authored
llvm-svn: 154086
-