- May 11, 2012
-
-
Jim Ingham authored
rdar://problem/11419156 llvm-svn: 156627
-
- May 10, 2012
-
-
rdar://problem/11330621Greg Clayton authored
Fixed the DisassemblerLLVMC disassembler to parse more efficiently instead of parsing opcodes over and over. The InstructionLLVMC class now only reads the opcode in the InstructionLLVMC::Decode function. This can be done very efficiently for ARM and architectures that have fixed opcode sizes. For x64 it still calls the disassembler to get the byte size. Moved the lldb_private::Instruction::Dump(...) function up into the lldb_private::Instruction class and it now uses the function that gets the mnemonic, operandes and comments so that all disassembly is using the same code. Added StreamString::FillLastLineToColumn() to allow filling a line up to a column with a character (which is used by the lldb_private::Instruction::Dump(...) function). Modified the Opcode::GetData() fucntion to "do the right thing" for thumb instructions. llvm-svn: 156532
-
Jim Ingham authored
If the ObjC Step Through Trampoline plan causes a target crash, properly propagate the error back to the controlling plans so that they don't lose control. Also change "ThreadPlanStepThrough" to take the return StackID for its backstop breakpoint as an argument to the constructor rather than having it try to figure it out itself, since it might get it wrong whereas the caller always knows where it is coming from. rdar://problem/11402287 llvm-svn: 156529
-
- May 09, 2012
-
-
Jim Ingham authored
Print out a notification when the process of a target other than the currently selected target stops. llvm-svn: 156433
-
- May 08, 2012
-
-
rdar://problem/11358639Greg Clayton authored
Switch over to the "*-apple-macosx" for desktop and "*-apple-ios" for iOS triples. Also make the selection process for auto selecting platforms based off of an arch much better. llvm-svn: 156354
-
- May 05, 2012
-
-
Jim Ingham authored
No one was using it and Locker(pthread_mutex_t *) immediately asserts for pthread_mutex_t's that don't come from a Mutex anyway. Rather than try to make that work, we should maintain the Mutex abstraction and not pass around the platform implementation... Make Mutex::Locker::Lock take a Mutex & or a Mutex *, and remove the constructor taking a pthread_mutex_t *. You no longer need to call Mutex::GetMutex to pass your mutex to a Locker (you can't in fact, since I made it private.) llvm-svn: 156221
-
- May 04, 2012
-
-
Jason Molenda authored
us of its architecture, use that to set the Target's arch if it doesn't already have one set. In Process::CompleteAttach(), if the Target has a valid arch make sure that the Platform we pick up is compatible with that arch; if not, find a Platform that is compatible. Don't let the the default platform override the Target's arch. <rdar://problem/11185420> llvm-svn: 156116
-
- May 03, 2012
-
-
Jim Ingham authored
should be MasterPlans that want to stay on the plan stack. So make all plans NOT MasterPlans by default and then have the SB API's and the CommandObjectThread step commands set this explicitly. Also added a "clean up" phase to the Thread::ShouldStop so that if plans get stranded on the stack, we can remove them. This is done by adding an IsPlanStale method to the thread plans, and if the plan can know that it is no longer relevant, it returns true, and the plan and its sub-plans will get discarded. llvm-svn: 156101
-
- May 02, 2012
-
-
Jim Ingham authored
since we now run the condition in the StopInfoBreakpoint's PerformAction, and don't need to refer it to another "continue". Actually, we haven't needed to do this for a year or so, I just hadn't gotten around to deleting the dead wood. llvm-svn: 155967
-
- May 01, 2012
-
-
Jim Ingham authored
Fix reporting of stop reasons when the StepOver & StepIn plans stop because of a crash or breakpoint. Added the ability for a plan to say it is done but doesn't want to be the reason for the stop. llvm-svn: 155927
-
- Apr 27, 2012
-
-
Greg Clayton authored
Clean up the way modules are looked for when calling Target::GetSharedModule(...). We were ignoring remapped files, even if they were valid. Also if we have a UUID, we should check our global module list first. llvm-svn: 155683
-
- Apr 25, 2012
-
-
Jason Molenda authored
if the section is marked as encrypted. It will likely be readable in live memory. <rdar://problem/11305675> llvm-svn: 155509
-
Enrico Granata authored
Fixing an issue where the expression parser was not correctly freeze-drying bitfields - This patch ensures that (a) freeze-drying bitfields works correctly and (b) that we actually access bitfields through IR instead of the 'frame var en lieu of expr' shortcut, for added safety in corner cases that may arise llvm-svn: 155494
-
- Apr 20, 2012
-
-
Jim Ingham authored
Make sure the "synchronous breakpoint callbacks" get called before the thread plan logic gets invoked, and if they ask to continue that should short-circuit the thread plans for that thread. Also add a bit more explanation for how this machinery is supposed to work. Also pass eExecutionPolicyOnlyWhenNeeded, not eExecutionPolicyAlways when evaluating the expression for breakpoint conditions. llvm-svn: 155236
-
- Apr 19, 2012
-
-
Jim Ingham authored
Switch to setting the write side of the run lock when we call Resume. Then make a PrivateResume that doesn't switch the run-lock state, and use that where we are resuming without changing the public resume state. llvm-svn: 155092
-
Jim Ingham authored
for the plan stack, so assert here if it gets called with an empty plan stack. <rdar://problem/11265974> llvm-svn: 155078
-
- Apr 18, 2012
-
-
Greg Clayton authored
llvm-svn: 154965
-
- Apr 16, 2012
-
-
Greg Clayton authored
Fixed the ability to load multiple __LINKEDIT segments at the same address for darwin shared cache entries. Now when registering the load address of a section, the DynamicLoader objects can specify if they should warn or not. This will fix the ability to load the nlist entries for shared libraries in the darwin shared caches when no on disk representation is available for a shared library. llvm-svn: 154860
-
- Apr 14, 2012
-
-
Greg Clayton authored
Added a new host function that allows us to run shell command and get the output from them along with the status and signal: Error Host::RunShellCommand (const char *command, const char *working_dir, int *status_ptr, int *signo_ptr, std::string *command_output_ptr, uint32_t timeout_sec); This will allow us to use this functionality in the host lldb_private::Platform, and also use it in our lldb-platform binary. It leverages the existing code in Host::LaunchProcess and ProcessLaunchInfo. llvm-svn: 154730
-
Jim Ingham authored
Also fixed up some logging. llvm-svn: 154709
-
Jim Ingham authored
The run all threads timeout in RunThreadPlan should respect the user timeout, not be arbitrarily 10 seconds (which was too long anyway...) Also added some logging to RunThreadPlan and made others more regular. llvm-svn: 154708
-
- Apr 13, 2012
-
-
Jim Ingham authored
Factor out a bunch of common code in the two ThreadPlanCallFunction constructors. Also add a sanity check - try reading the frame, and if we fail bag out. llvm-svn: 154698
-
rdar://problem/11193466Greg Clayton authored
Fixed an error where lldb would hang when writing memory near the end of the addres space due to an unsigned overflow. llvm-svn: 154697
-
Jim Ingham authored
ThreadPlanCallFunction's destructor wasn't calling DoTakedown, so if the that plan got discarded we weren't doing the takedown. llvm-svn: 154681
-
- Apr 12, 2012
-
-
Jim Ingham authored
for packet confirmation. Also added a bit more logging. Also, unlock the writer end of the run lock in Process.cpp on our way out of the private state thread so that the Process can shut down cleanly. <rdar://problem/11228538> llvm-svn: 154601
-
- Apr 10, 2012
-
-
Sean Callanan authored
not consume slots in the persistent variable store. llvm-svn: 154416
-
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
-
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 07, 2012
-
-
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
-
- Apr 06, 2012
-
-
Bill Wendling authored
llvm-svn: 154147
-
- Apr 05, 2012
-
-
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
-
- Apr 04, 2012
-
-
rdar://problem/11184458Greg Clayton authored
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
-
- Mar 29, 2012
-
-
rdar://problem/11035349Greg Clayton authored
Fixed an issue with stepping where the stack frame list could get changed out from underneath you when multiple threads start accessing frame info. llvm-svn: 153627
-
- Mar 27, 2012
-
-
Greg Clayton authored
indicates that the section is thread specific. Any functions the load a module given a slide, will currently ignore any sections that are thread specific. lldb_private::Section now has: bool Section::IsThreadSpecific () const { return m_thread_specific; } void Section::SetIsThreadSpecific (bool b) { m_thread_specific = b; } The ELF plug-in has been modified to set this for the ".tdata" and the ".tbss" sections. Eventually we need to have each lldb_private::Thread subclass be able to resolve a thread specific section, but for now they will just not resolve. The code for that should be trivual to add, but the address resolving functions will need to be changed to take a "ExecutionContext" object instead of just a target so that thread specific sections can be resolved. llvm-svn: 153537
-
Enrico Granata authored
Synthetic values are now automatically enabled and active by default. SBValue is set up to always wrap a synthetic value when one is available. A new setting enable-synthetic-value is provided on the target to disable this behavior. There also is a new GetNonSyntheticValue() API call on SBValue to go back from synthetic to non-synthetic. There is no call to go from non-synthetic to synthetic. The test suite has been changed accordingly. Fallout from changes to type searching: an hack has to be played to make it possible to use maps that contain std::string due to the special name replacement operated by clang Fixing a test case that was using libstdcpp instead of libc++ - caught as a consequence of said changes to type searching llvm-svn: 153495
-
rdar://problem/11113279Greg Clayton authored
Fixed type lookups to "do the right thing". Prior to this fix, looking up a type using "foo::bar" would result in a type list that contains all types that had "bar" as a basename unless the symbol file was able to match fully qualified names (which our DWARF parser does not). This fix will allow type matches to be made based on the basename and then have the types that don't match filtered out. Types by name can be fully qualified, or partially qualified with the new "bool exact_match" parameter to the Module::FindTypes() method. This fixes some issue that we discovered with dynamic type resolution as well as improves the overall type lookups in LLDB. llvm-svn: 153482
-
Johnny Chen authored
If creation of watchpoint failed on the device, make sure the list maintained by the target reflects that by cleaning it up. llvm-svn: 153477
-
- Mar 20, 2012
-
-
Greg Clayton authored
Platforms can now auto-select themselves if you specify a full target triple when doing a "target create" command. Each platform now knows if it can handle an architecture and a platform can be found using an architecture. Each platform can look at the arch, vendor and OS and know if it should be used or not. llvm-svn: 153104
-