Skip to content
  1. May 11, 2012
  2. May 10, 2012
    • Greg Clayton's avatar
      <rdar://problem/11330621> · ba812f42
      Greg 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
      ba812f42
    • Jim Ingham's avatar
      If the ObjC Step Through Trampoline plan causes a target crash, properly... · 18de2fdc
      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
      18de2fdc
  3. May 09, 2012
  4. May 08, 2012
    • Greg Clayton's avatar
      <rdar://problem/11358639> · 70512317
      Greg 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
      70512317
  5. May 05, 2012
    • Jim Ingham's avatar
      Don't expose the pthread_mutex_t underlying the Mutex & Mutex::Locker classes. · 10ebffa4
      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
      10ebffa4
  6. May 04, 2012
  7. May 03, 2012
    • Jim Ingham's avatar
      Clean up the usage of "MasterPlan" status in ThreadPlans. Only user-initiated plans · 64e7ead1
      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
      64e7ead1
  8. May 02, 2012
  9. May 01, 2012
  10. Apr 27, 2012
    • Greg Clayton's avatar
      Clean up the way modules are looked for when calling... · b69bb2e4
      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
      b69bb2e4
  11. Apr 25, 2012
  12. Apr 20, 2012
    • Jim Ingham's avatar
      Make sure the "synchronous breakpoint callbacks" get called before the thread... · 6d66ce67
      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
      6d66ce67
  13. Apr 19, 2012
  14. Apr 18, 2012
  15. Apr 16, 2012
    • Greg Clayton's avatar
      Fixed the ability to load multiple __LINKEDIT segments at the same address for... · 1e8ac36b
      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
      1e8ac36b
  16. Apr 14, 2012
  17. Apr 13, 2012
  18. Apr 12, 2012
  19. Apr 10, 2012
    • Sean Callanan's avatar
      Set variables returned by utility functions to · 6153c518
      Sean Callanan authored
      not consume slots in the persistent variable
      store.
      
      llvm-svn: 154416
      6153c518
    • Jim Ingham's avatar
      Two changes, · 076b3041
      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
      076b3041
    • Jim Ingham's avatar
      Clear the "m_actual_stop_info_sp" in the thread during Destroy. It might be a... · d8ba464b
      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
      d8ba464b
    • Greg Clayton's avatar
      Trying to solve our disappearing thread issues by making thread list updates safer. · 9fc13556
      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
      9fc13556
    • Jim Ingham's avatar
      Rework how master plans declare themselves. Also make "PlanIsBasePlan" not... · cf274f91
      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
      cf274f91
  20. Apr 07, 2012
    • Jim Ingham's avatar
      We sometimes need to be able to call functions (via Process::RunThreadPlan)... · 372787fc
      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
      372787fc
  21. Apr 06, 2012
  22. Apr 05, 2012
    • Greg Clayton's avatar
      Added a new Host class: ReadWriteLock · 7fdf9ef1
      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
      7fdf9ef1
  23. Apr 04, 2012
    • Greg Clayton's avatar
      <rdar://problem/11184458> · 0b88d815
      Greg 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
      0b88d815
  24. Mar 29, 2012
    • Greg Clayton's avatar
      <rdar://problem/11035349> · 39d0ab32
      Greg 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
      39d0ab32
  25. Mar 27, 2012
    • Greg Clayton's avatar
      lldb_private::Section objects have a boolean flag that can be set that · 741f3f9a
      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
      741f3f9a
    • Enrico Granata's avatar
      Synthetic values are now automatically enabled and active by default. SBValue... · c5bc412c
      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
      c5bc412c
    • Greg Clayton's avatar
      <rdar://problem/11113279> · 84db9105
      Greg 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
      84db9105
    • Johnny Chen's avatar
      If creation of watchpoint failed on the device, make sure the list maintained... · 41b77265
      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
      41b77265
  26. Mar 20, 2012
    • Greg Clayton's avatar
      Platforms can now auto-select themselves if you specify a full target triple... · b3a40ba8
      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
      b3a40ba8
Loading