Skip to content
  1. Mar 28, 2013
    • Greg Clayton's avatar
      <rdar://problem/13521159> · 5160ce5c
      Greg Clayton authored
      LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.
      
      All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.
      
      llvm-svn: 178191
      5160ce5c
  2. Jan 02, 2013
  3. Oct 12, 2012
  4. Oct 11, 2012
  5. Jul 17, 2012
  6. May 30, 2012
  7. Feb 09, 2012
  8. Nov 16, 2011
    • Sean Callanan's avatar
      Two fixes for Objetive-C methods that return struct · a6cbf06d
      Sean Callanan authored
      types.  First, I added handling for the memset intrinsic
      in the IR, which is used to zero out the returned struct.
      Second, I fixed the object-checking instrumentation
      to objc_msgSend_stret, and generally tightened up how
      the object-checking functions get inserted.
      
      llvm-svn: 144741
      a6cbf06d
  9. Nov 01, 2011
  10. Oct 31, 2011
  11. Oct 27, 2011
  12. Sep 22, 2011
    • Greg Clayton's avatar
      Converted the lldb_private::Process over to use the intrusive · c14ee32d
      Greg Clayton authored
      shared pointers.
      
      Changed the ExecutionContext over to use shared pointers for
      the target, process, thread and frame since these objects can
      easily go away at any time and any object that was holding onto
      an ExecutionContext was running the risk of using a bad object.
      
      Now that the shared pointers for target, process, thread and
      frame are just a single pointer (they all use the instrusive
      shared pointers) the execution context is much safer and still
      the same size. 
      
      Made the shared pointers in the the ExecutionContext class protected
      and made accessors for all of the various ways to get at the pointers,
      references, and shared pointers.
      
      llvm-svn: 140298
      c14ee32d
  13. Jul 30, 2011
    • Sean Callanan's avatar
      This change brings in the latest LLVM/Clang, and · cc427fad
      Sean Callanan authored
      completes the support in the LLDB expression parser
      for incomplete types.  Clang now imports types
      lazily, and we complete those types as necessary.
      
      Changes include:
      
      - ClangASTSource now supports three APIs which it
        passes to ClangExpressionDeclMap.  CompleteType
        completes a TagDecl or an ObjCInterfaceDecl when
        needed; FindExternalVisibleDecls finds named
        entities that are visible in the expression's
        scope; and FindExternalLexicalDecls performs a
        (potentially restricted) search for entities
        inside a lexical scope like a namespace.  These
        changes mean that entities in namespaces should
        work normally.
      
      - The SymbolFileDWARF code for searching a context
        for a specific name is now more general, and can
        search arbitrary contexts.
      
      - We are continuing to adapt our calls into LLVM
        from interfaces that take start and end iterators
        when accepting multiple items to interfaces that
        use ArrayRef.
      
      - I have cleaned up some code, especially our use
        of namespaces.
      
      This change is neutral for our testsuite and greatly
      improves correctness for large programs (like Clang)
      with complicated type systems.  It should also lay
      the groundwork for improving the expression parser's
      performance as we are lazier and lazier about
      providing type information.
      
      llvm-svn: 136555
      cc427fad
  14. Jul 19, 2011
    • Enrico Granata's avatar
      The implementation of categories is now synchronization safe · 20edcdbe
      Enrico Granata authored
      Code cleanup:
       - The Format Manager implementation is now split between two files: FormatClasses.{h|cpp} where the
         actual formatter classes (ValueFormat, SummaryFormat, ...) are implemented and
         FormatManager.{h|cpp} where the infrastructure classes (FormatNavigator, FormatManager, ...)
         are contained. The wrapper code always remains in Debugger.{h|cpp}
       - Several leftover fields, methods and comments from previous design choices have been removed
      type category subcommands (enable, disable, delete) now can take a list of category names as input
       - for type category enable, saying "enable A B C" is the same as saying
          enable C
          enable B
          enable A
         (the ordering is relevant in enabling categories, and it is expected that a user typing
          enable A B C wants to look into category A, then into B, then into C and not the other
          way round)
       - for the other two commands, the order is not really relevant (however, the same inverted ordering
         is used for consistency)
      
      llvm-svn: 135494
      20edcdbe
  15. Jul 08, 2011
  16. Apr 14, 2011
  17. Apr 11, 2011
  18. Jan 26, 2011
  19. Jan 22, 2011
  20. 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
  21. Nov 04, 2010
  22. Oct 18, 2010
    • Greg Clayton's avatar
      Added a new Host call to find LLDB related paths: · dd36defd
      Greg Clayton authored
          static bool
          Host::GetLLDBPath (lldb::PathType path_type, FileSpec &file_spec);
          
      This will fill in "file_spec" with an appropriate path that is appropriate
      for the current Host OS. MacOSX will return paths within the LLDB.framework,
      and other unixes will return the paths they want. The current PathType
      enums are:
      
      typedef enum PathType
      {
          ePathTypeLLDBShlibDir,          // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists
          ePathTypeSupportExecutableDir,  // Find LLDB support executable directory (debugserver, etc)
          ePathTypeHeaderDir,             // Find LLDB header file directory
          ePathTypePythonDir              // Find Python modules (PYTHONPATH) directory
      } PathType;
      
      All places that were finding executables are and python paths are now updated
      to use this Host call.
      
      Added another new host call to launch the inferior in a terminal. This ability
      will be very host specific and doesn't need to be supported on all systems.
      MacOSX currently will create a new .command file and tell Terminal.app to open
      the .command file. It also uses the new "darwin-debug" app which is a small
      app that uses posix to exec (no fork) and stop at the entry point of the 
      program. The GDB remote plug-in is almost able launch a process and attach to
      it, it currently will spawn the process, but it won't attach to it just yet.
      This will let LLDB not have to share the terminal with another process and a
      new terminal window will pop up when you launch. This won't get hooked up
      until we work out all of the kinks. The new Host function is:
      
          static lldb::pid_t
          Host::LaunchInNewTerminal (
              const char **argv,   // argv[0] is executable
              const char **envp,
              const ArchSpec *arch_spec,
              bool stop_at_entry,
              bool disable_aslr);
      
      Cleaned up FileSpec::GetPath to not use strncpy() as it was always zero 
      filling the entire path buffer.
      
      Fixed an issue with the dynamic checker function where I missed a '$' prefix
      that should have been added.
      
      llvm-svn: 116690
      dd36defd
  23. Oct 16, 2010
    • Greg Clayton's avatar
      prefix more stuff with '$' to make sure we don't go trying to lookup anything · d59cea2d
      Greg Clayton authored
      we don't need to.
      
      llvm-svn: 116676
      d59cea2d
    • Greg Clayton's avatar
      Made many ConstString functions inlined in the header file. · 7b462cc1
      Greg Clayton authored
      Changed all of our synthesized "___clang" functions, types and variables
      that get used in expressions over to have a prefix of "$_lldb". Now when we
      do name lookups we can easily switch off of the first '$' character to know
      if we should look through only our internal (when first char is '$') stuff,
      or when we should look through program variables, functions and types.
      
      Converted all of the clang expression code over to using "const ConstString&" 
      values for names instead of "const char *" since there were many places that
      were converting the "const char *" names into ConstString names and them
      throwing them away. We now avoid making a lot of ConstString conversions and
      benefit from the quick comparisons in a few extra spots.
      
      Converted a lot of code from LLVM coding conventions into LLDB coding 
      conventions.
      
      llvm-svn: 116634
      7b462cc1
  24. Sep 23, 2010
  25. Sep 13, 2010
    • Sean Callanan's avatar
      Bugfixes to the expression parser. Fixes include: · 9e6ed53e
      Sean Callanan authored
       - If you put a semicolon at the end of an expression,
         this no longer causes the expression parser to
         error out.  This was a two-part fix: first,
         ClangExpressionDeclMap::Materialize now handles
         an empty struct (such as when there is no return
         value); second, ASTResultSynthesizer walks backward
         from the end of the ASTs until it reaches something
         that's not a NullStmt.
      
       - ClangExpressionVariable now properly byte-swaps when
         printing itself.
      
       - ClangUtilityFunction now cleans up after itself when
         it's done compiling itself.
      
       - Utility functions can now use external functions just
         like user expressions.
      
       - If you end your expression with a statement that does
         not return a value, the expression now runs correctly
         anyway.
      
      Also, added the beginnings of an Objective-C object
      validator function, which is neither installed nor used
      as yet.
      
      llvm-svn: 113789
      9e6ed53e
  26. Sep 08, 2010
    • Sean Callanan's avatar
      Fixed an expression parser bug that prevented · afa4237d
      Sean Callanan authored
      certain functions from being resolved correctly.
      
      Some functions (particularly varargs functions)
      are BitCast before being called, and the problem
      was that a CallInst where getCalledValue()
      returned a BitCast ConstantExpr was not being
      relocated at all.
      
      This problem should now be resolved for the case
      of BitCast.
      
      llvm-svn: 113396
      afa4237d
  27. Sep 02, 2010
  28. Sep 01, 2010
    • Sean Callanan's avatar
      Added support for dynamic sanity checking in · 6961e878
      Sean Callanan authored
      expressions.  Values used by the expression are
      checked by validation functions which cause the
      program to crash if the values are unsafe.
      
      Major changes:
      
      - Added IRDynamicChecks.[ch], which contains the
        core code related to this feature
      
      - Modified CommandObjectExpression to install the
        validator functions into the target process.
      
      - Added an accessor to Process that gets/sets the
        helper functions
      
      llvm-svn: 112690
      6961e878
Loading