Skip to content
  1. May 11, 2011
    • Greg Clayton's avatar
      Moved all code from ArchDefaultUnwindPlan and ArchVolatileRegs into their · 31f1d2f5
      Greg Clayton authored
      respective ABI plugins as they were plug-ins that supplied ABI specfic info.
      
      Also hookep up the UnwindAssemblyInstEmulation so that it can generate the
      unwind plans for ARM.
      
      Changed the way ABI plug-ins are handed out when you get an instance from
      the plug-in manager. They used to return pointers that would be mananged
      individually by each client that requested them, but now they are handed out
      as shared pointers since there is no state in the ABI objects, they can be
      shared.
      
      llvm-svn: 131193
      31f1d2f5
  2. May 10, 2011
    • Sean Callanan's avatar
      Fixed a bug in which expression-local variables were · e359d9b7
      Sean Callanan authored
      treated as being permanently resident in target
      memory.  In fact, since the expression's stack frame
      is deleted and potentially re-used after the
      expression completes, the variables need to be treated
      as being freeze-dried.
      
      llvm-svn: 131104
      e359d9b7
  3. Mar 08, 2011
    • Jim Ingham's avatar
      Add a method "GetEntryPoint" to the ObjectFile class, and implement it on... · 672e6f59
      Jim Ingham authored
      Add a method "GetEntryPoint" to the ObjectFile class, and implement it on MachO & ELF - though the ELF implementation is probably a little weak.  Then use this method in place of directly looking for "start" in the ThreadPlanCallFunction constructor to find the stopping point for our function evaluation.
      
      llvm-svn: 127194
      672e6f59
  4. Jan 26, 2011
  5. Jan 22, 2011
  6. Jan 20, 2011
  7. Jan 18, 2011
    • Jim Ingham's avatar
      In ThreadPlanCallFunction, do the Takedown right when the thread plan gets... · bda4e5eb
      Jim Ingham authored
      In ThreadPlanCallFunction, do the Takedown right when the thread plan gets popped.  When the function call is discarded (e.g. when it crashes and discard_on_error is true) the plan gets discarded.  You need to make sure that the stack gets restored right then, and not wait till you start again and the thread plan stack is cleared.
      
      llvm-svn: 123716
      bda4e5eb
  8. Jan 06, 2011
    • Greg Clayton's avatar
      Fixed issues with RegisterContext classes and the subclasses. There was · 5ccbd294
      Greg Clayton authored
      an issue with the way the UnwindLLDB was handing out RegisterContexts: it
      was making shared pointers to register contexts and then handing out just
      the pointers (which would get put into shared pointers in the thread and
      stack frame classes) and cause double free issues. MallocScribble helped to
      find these issues after I did some other cleanup. To help avoid any
      RegisterContext issue in the future, all code that deals with them now
      returns shared pointers to the register contexts so we don't end up with
      multiple deletions. Also now that the RegisterContext class doesn't require
      a stack frame, we patched a memory leak where a StackFrame object was being
      created and leaked.
      
      Made the RegisterContext class not have a pointer to a StackFrame object as
      one register context class can be used for N inlined stack frames so there is
      not a 1 - 1 mapping. Updates the ExecutionContextScope part of the 
      RegisterContext class to never return a stack frame to indicate this when it
      is asked to recreate the execution context. Now register contexts point to the
      concrete frame using a concrete frame index. Concrete frames are all of the
      frames that are actually formed on the stack of a thread. These concrete frames
      can be turned into one or more user visible frames due to inlining. Each 
      inlined stack frame has the exact same register context (shared via shared
      pointers) as any parent inlined stack frames all the way up to the concrete 
      frame itself.
      
      So now the stack frames and the register contexts should behave much better.
      
      llvm-svn: 122976
      5ccbd294
  9. Dec 13, 2010
    • Sean Callanan's avatar
      Added support for generating expressions that have · 17827830
      Sean Callanan authored
      access to the members of the Objective-C self object.
      
      The approach we take is to generate the method as a
      @category on top of the self object, and to pass the
      "self" pointer to it.  (_cmd is currently NULL.)
      
      Most changes are in ClangExpressionDeclMap, but the
      change that adds support to the ABIs to pass _cmd
      touches a fair amount of code.
      
      llvm-svn: 121722
      17827830
  10. Nov 12, 2010
  11. Nov 11, 2010
  12. Nov 08, 2010
  13. Nov 06, 2010
    • Greg Clayton's avatar
      Modified all logging calls to hand out shared pointers to make sure we · 2d4edfbc
      Greg Clayton authored
      don't crash if we disable logging when some code already has a copy of the
      logger. Prior to this fix, logs were handed out as pointers and if they were
      held onto while a log got disabled, then it could cause a crash. Now all logs
      are handed out as shared pointers so this problem shouldn't happen anymore.
      We are also using our new shared pointers that put the shared pointer count
      and the object into the same allocation for a tad better performance.
      
      llvm-svn: 118319
      2d4edfbc
  14. Nov 04, 2010
  15. Nov 03, 2010
  16. Oct 26, 2010
  17. Oct 20, 2010
  18. Sep 21, 2010
    • Sean Callanan's avatar
      Removed the hacky "#define this ___clang_this" handler · fc55f5d1
      Sean Callanan authored
      for C++ classes.  Replaced it with a less hacky approach:
      
       - If an expression is defined in the context of a
         method of class A, then that expression is wrapped as
         ___clang_class::___clang_expr(void*) { ... }
         instead of ___clang_expr(void*) { ... }.
      
       - ___clang_class is resolved as the type of the target
         of the "this" pointer in the method the expression
         is defined in.
      
       - When reporting the type of ___clang_class, a method
         with the signature ___clang_expr(void*) is added to
         that class, so that Clang doesn't complain about a
         method being defined without a corresponding
         declaration.
      
       - Whenever the expression gets called, "this" gets
         looked up, type-checked, and then passed in as the
         first argument.
      
      This required the following changes:
      
       - The ABIs were changed to support passing of the "this"
         pointer as part of trivial calls.
      
       - ThreadPlanCallFunction and ClangFunction were changed
         to support passing of an optional "this" pointer.
      
       - ClangUserExpression was extended to perform the
         wrapping described above.
      
       - ClangASTSource was changed to revert the changes
         required by the hack.
      
       - ClangExpressionParser, IRForTarget, and
         ClangExpressionDeclMap were changed to handle
         different manglings of ___clang_expr flexibly.  This
         meant no longer searching for a function called
         ___clang_expr, but rather looking for a function whose
         name *contains* ___clang_expr.
      
       - ClangExpressionParser and ClangExpressionDeclMap now
         remember whether "this" is required, and know how to
         look it up as necessary.
      
      A few inheritance bugs remain, and I'm trying to resolve
      these.  But it is now possible to use "this" as well as
      refer implicitly to member variables, when in the proper
      context.
      
      llvm-svn: 114384
      fc55f5d1
  19. Sep 15, 2010
  20. Jul 31, 2010
    • Sean Callanan's avatar
      Added support for rewriting objc_msgSend so we can · 5300d37a
      Sean Callanan authored
      call Objective-C methods from expressions.  Also added
      some more logging to the function-calling thread plan
      so that we can see the registers when a function
      finishes.
      
      Also documented things maybe a bit better.
      
      llvm-svn: 109938
      5300d37a
  21. Jul 16, 2010
  22. Jun 19, 2010
    • Jim Ingham's avatar
      Two changes in this checkin. Added a ThreadPlanKind so that I can do some... · b01e742a
      Jim Ingham authored
      Two changes in this checkin.  Added a ThreadPlanKind so that I can do some reasoning based on the kind of thread plan
      without having to use RTTI.
      Removed the ThreadPlanContinue and replaced with a ShouldAutoContinue query that serves the same purpose.  Having to push
      another plan to assert that if there's no other indication the target should continue when this plan is popped was flakey
      and error prone.  This method is more stable, and fixed problems we were having with thread specific breakpoints.
      
      llvm-svn: 106378
      b01e742a
  23. Jun 08, 2010
Loading