Skip to content
  1. Sep 26, 2011
    • Greg Clayton's avatar
      Added more functionality to the public API to allow for better · 8f7180b1
      Greg Clayton authored
      symbolication. Also improved the SBInstruction API to allow
      access to the instruction opcode name, mnemonics, comment and
      instruction data.
      
      Added the ability to edit SBLineEntry objects (change the file,
      line and column), and also allow SBSymbolContext objects to be
      modified (set module, comp unit, function, block, line entry
      or symbol). 
      
      The SymbolContext and SBSymbolContext can now generate inlined
      call stack infomration for symbolication much easier using the
      SymbolContext::GetParentInlinedFrameInfo(...) and 
      SBSymbolContext::GetParentInlinedFrameInfo(...) methods.
      
      llvm-svn: 140518
      8f7180b1
  2. Sep 24, 2011
    • Greg Clayton's avatar
      Added the ability to get all section contents, or the section · d9dc52dc
      Greg Clayton authored
      contents starting at an offset (2 separate methods). This helps
      the scripting interface stay more natural by allowing both from
      Python.
      
      Added the ability to dump data with address annotations when
      call SBData::GetDescription().
      
      Hooked up the SBSection to the __repr__ so you can print section
      objects from within python.
      
      Improved the dumping of symbols from python.
      
      Fixed the .i interface references which were set to "Relative to this Group"
      which somehow included Jim's "lldb-clean" root directory in the path. The
      interfaces are now in a folder called "interfaces" withing the Xcode API
      subfolder.
      
      llvm-svn: 140451
      d9dc52dc
  3. Sep 23, 2011
  4. 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
  5. Sep 20, 2011
  6. Sep 18, 2011
    • Greg Clayton's avatar
      Don't put modules for .o files into the global shared module list. We · 762f7135
      Greg Clayton authored
      used to do this because we needed to find the shared pointer for a .o
      file when the .o file's module was needed in a SymbolContext since the
      module in a symbol context was a shared pointer. Now that we are using
      intrusive pointers we don't have this limitation anymore since any
      instrusive shared pointer can be made from a pointer to an object
      all on its own.
      
      Also switched over to having the Module and SymbolVendor use shared 
      pointers to their object files as had a leak on MacOSX when the 
      SymbolVendor's object file wasn't the same as the Module's (debug info
      in a stand along file (dSYM file)). Now everything will correctly clean
      itself up when the module goes away after an executable gets rebuilt.
      
      Now we correctly get rid of .o files that are used with the DWARF with 
      debug map executables on subsequent runs since the only shared pointer
      to the object files in from the DWARF symbol file debug map parser, and
      when the module gets replaced, it destroys to old one along with all .o 
      files. 
      
      Also added a small optimization when using BSD archives where we will
      remove old BSD containers from the shared list when they are outdated.
      
      llvm-svn: 140002
      762f7135
  7. Sep 17, 2011
    • Greg Clayton's avatar
      Removed the function: · a2eee184
      Greg Clayton authored
      	ModuleSP
      	Module::GetSP();
      
      Since we are now using intrusive ref counts, we can easily turn any
      pointer to a module into a shared pointer just by assigning it.
      	
      
      llvm-svn: 139984
      a2eee184
    • Greg Clayton's avatar
      Convert lldb::ModuleSP to use an instrusive ref counted pointer. · 747bcb03
      Greg Clayton authored
      We had some cases where getting the shared pointer for a module from
      the global module list was causing a performance issue when debugging
      with DWARF in .o files. Now that the module uses intrusive ref counts,
      we can easily convert any pointer to a shared pointer.
      
      llvm-svn: 139983
      747bcb03
  8. Sep 15, 2011
    • Sean Callanan's avatar
      This patch modifies the expression parser to allow it · 3bfdaa2a
      Sean Callanan authored
      to execute expressions even in the absence of a process.
      This allows expressions to run in situations where the
      target cannot run -- e.g., to perform calculations based
      on type information, or to inspect a binary's static
      data.
      
      This modification touches the following files:
      
      lldb-private-enumerations.h
        Introduce a new enum specifying the policy for
        processing an expression.  Some expressions should
        always be JITted, for example if they are functions
        that will be used over and over again.  Some
        expressions should always be interpreted, for
        example if the target is unsafe to run.  For most,
        it is acceptable to JIT them, but interpretation
        is preferable when possible.
      
      Target.[h,cpp]
        Have EvaluateExpression now accept the new enum.
      
      ClangExpressionDeclMap.[cpp,h]
        Add support for the IR interpreter and also make
        the ClangExpressionDeclMap more robust in the 
        absence of a process.
      
      ClangFunction.[cpp,h]
        Add support for the new enum.
      
      IRInterpreter.[cpp,h]
        New implementation.
      
      ClangUserExpression.[cpp,h]
        Add support for the new enum, and for running 
        expressions in the absence of a process.
      
      ClangExpression.h
        Remove references to the old DWARF-based method
        of evaluating expressions, because it has been
        superseded for now.
      
      ClangUtilityFunction.[cpp,h]
        Add support for the new enum.
      
      ClangExpressionParser.[cpp,h]
        Add support for the new enum, remove references
        to DWARF, and add support for checking whether
        the expression could be evaluated statically.
      
      IRForTarget.[h,cpp]
        Add support for the new enum, and add utility
        functions to support the interpreter.
      
      IRToDWARF.cpp
        Removed
      
      CommandObjectExpression.cpp
        Remove references to the obsolete -i option.
      
      Process.cpp 
        Modify calls to ClangUserExpression::Evaluate
        to pass the correct enum (for dlopen/dlclose)
      
      SBValue.cpp
        Add support for the new enum.
      
      SBFrame.cpp
        Add support for he new enum.
      
      BreakpointOptions.cpp
        Add support for the new enum.
      
      llvm-svn: 139772
      3bfdaa2a
    • Jason Molenda's avatar
      · 995cd3a5
      Jason Molenda authored
      Have the FuncUnwinder object request & provide an architecture-defined
      UnwindPlan for unwinding from the first instruction of an otherwise
      unknown function call (GetUnwindPlanArchitectureDefaultAtFunctionEntry()).
      
      Update RegisterContextLLDB::GetFullUnwindPlanForFrame() to detect the
      case of a frame 0 at address 0x0 which indicates that we jumped through
      a NULL function pointer.  Use the ABI's FunctionEntryUnwindPlan to
      find the caller frame.
      
      These changes make it so lldb can identify the calling frame correctly
      in code like
      
      int main ()
      {
        void (*f)(void) = 0;
        f();
      }
      
      llvm-svn: 139760
      995cd3a5
  9. Sep 11, 2011
  10. Sep 10, 2011
  11. Sep 06, 2011
    • Enrico Granata's avatar
      Redesign of the interaction between Python and frozen objects: · 9128ee2f
      Enrico Granata authored
       - introduced two new classes ValueObjectConstResultChild and ValueObjectConstResultImpl: the first one is a ValueObjectChild obtained from
         a ValueObjectConstResult, the second is a common implementation backend for VOCR and VOCRCh of method calls meant to read through pointers stored
         in frozen objects ; now such reads transparently move from host to target as required
       - as a consequence of the above, removed code that made target-memory copies of expression results in several places throughout LLDB, and also
         removed code that enabled to recognize an expression result VO as such
       - introduced a new GetPointeeData() method in ValueObject that lets you read a given amount of objects of type T from a VO
         representing a T* or T[], and doing dereferences transparently
         in private layer it returns a DataExtractor ; in public layer it returns an instance of a newly created lldb::SBData
       - as GetPointeeData() does the right thing for both frozen and non-frozen ValueObject's, reimplemented ReadPointedString() to use it
         en lieu of doing the raw read itself
       - introduced a new GetData() method in ValueObject that lets you get a copy of the data that backs the ValueObject (for pointers,
         this returns the address without any previous dereferencing steps ; for arrays it actually reads the whole chunk of memory)
         in public layer this returns an SBData, just like GetPointeeData()
       - introduced a new CreateValueFromData() method in SBValue that lets you create a new SBValue from a chunk of data wrapped in an SBData
         the limitation to remember for this kind of SBValue is that they have no address: extracting the address-of for these objects (with any
         of GetAddress(), GetLoadAddress() and AddressOf()) will return invalid values
       - added several tests to check that "p"-ing objects (STL classes, char* and char[]) will do the right thing
      Solved a bug where global pointers to global variables were not dereferenced correctly for display
      New target setting "max-string-summary-length" gives the maximum number of characters to show in a string when summarizing it, instead of the hardcoded 128
      Solved a bug where the summary for char[] and char* would not be shown if the ValueObject's were dumped via the "p" command
      Removed m_pointers_point_to_load_addrs from ValueObject. Introduced a new m_address_type_of_children, which each ValueObject can set to tell the address type
       of any pointers and/or references it creates. In the current codebase, this is load address most of the time (the only notable exception being file
       addresses that generate file address children UNLESS we have a live process)
      Updated help text for summary-string
      Fixed an issue in STL formatters where std::stlcontainer::iterator would match the container's synthetic children providers
      Edited the syntax and help for some commands to have proper argument types
      
      llvm-svn: 139160
      9128ee2f
  12. Sep 02, 2011
    • Greg Clayton's avatar
      Added the ability for DWARF locations to use the ABI plug-ins to resolve · afacd14b
      Greg Clayton authored
      register names when dumping variable locations and location lists. Also did
      some cleanup where "int" types were being used for "lldb::RegisterKind"
      values.
      
      llvm-svn: 138988
      afacd14b
    • Greg Clayton's avatar
      Added support for accessing and loading our new .debug_names and .debug_types · f9eec20b
      Greg Clayton authored
      DWARF accelerator table sections to the DWARF parser. These sections are similar
      to the .debug_pubnames and .debug_pubtypes, but they are designed to be hash tables
      that are saved to disc in a way that the sections can just be loaded into memory
      and used without any work on the debugger side. The .debug_pubnames and .debug_pubtypes
      sections are not ordered, contain a copy of the name in the section itself which
      makes these sections quite large, they only include publicly exported names (so no
      static functions, no types defined inside functions), many compilers put different
      information in them making them very unreliable so most debugger ignore these sections
      and parse the DWARF on their own. The tables must also be parsed and sorted in order 
      to be used effectively. The new sections can be quickly loaded and very efficiently be used 
      to do name to DIE lookups with very little up front work. The format of these new
      sections will be changing while we work out the bugs, but we hope to have really 
      fast name to DIE lookups soon.
      
      llvm-svn: 138979
      f9eec20b
  13. Aug 25, 2011
  14. Aug 19, 2011
    • Sean Callanan's avatar
      Refined the rollback to LLVM, picking up a newer · a87bee84
      Sean Callanan authored
      revision and adding a patch that fixes an AsmParser
      crash on ARM.
      
      One feature that we unfortunately lost (for the
      moment!) is the ability to cast unknown code symbols
      to arbitrary function types and put the resulting
      function pointer in a result variable.  This feature
      will be back, though.
      
      llvm-svn: 138036
      a87bee84
  15. Aug 16, 2011
  16. Aug 15, 2011
  17. Aug 12, 2011
  18. Aug 10, 2011
    • Greg Clayton's avatar
      While tracking down memory consumption issue a few things were needed: the · 3418c857
      Greg Clayton authored
      ability to dump more information about modules in "target modules list". We
      can now dump the shared pointer reference count for modules, the pointer to
      the module itself (in case performance tools can help track down who has
      references to said pointer), and the modification time.
      
      Added "target delete [target-idx ...]" to be able to delete targets when they
      are no longer needed. This will help track down memory usage issues and help 
      to resolve when module ref counts keep getting incremented. If the command gets
      no arguments, the currently selected target will be deleted. If any arguments 
      are given, they must all be valid target indexes (use the "target list" 
      command to get the current target indexes).
      
      Took care of a bunch of "no newline at end of file" warnings.
      
      TimeValue objects can now dump their time to a lldb_private::Stream object.
      
      Modified the "target modules list --global" command to not error out if there
      are no targets since it doesn't require a target.
      
      Fixed an issue in the MacOSX DYLD dynamic loader plug-in where if a shared 
      library was updated on disk, we would keep using the older one, even if it was
      updated.
      
      Don't allow the ModuleList::GetSharedModule(...) to return an empty module.
      Previously we could specify a valid path on disc to a module, and specify an
      architecture that wasn't contained in that module and get a shared pointer to
      a module that wouldn't be able to return an object file or a symbol file. We
      now make sure an object file can be extracted prior to adding the shared pointer
      to the module to get added to the shared list.
      
      llvm-svn: 137196
      3418c857
    • Sean Callanan's avatar
      Fixed the type code to print "<invalid>" for NULL · 1c49954b
      Sean Callanan authored
      types instead of letting Clang crash.
      
      llvm-svn: 137167
      1c49954b
  19. Aug 09, 2011
    • Enrico Granata's avatar
      Basic support for reading synthetic children by index: · 27b625e1
      Enrico Granata authored
       if your datatype provides synthetic children, "frame variable object[index]" should now do the right thing
       in cases where the above syntax would have been rejected before, i.e.
        object is not a pointer nor an array (frame variable ignores potential overload of [])
        object is a pointer to an Objective-C class (which cannot be dereferenced)
       expression will still run operator[] if available and complain if it cannot do so
       synthetic children by name do not work yet
      
      llvm-svn: 137097
      27b625e1
  20. Aug 06, 2011
    • Sean Callanan's avatar
      This is an overhaul of the expression parser code · 72e4940b
      Sean Callanan authored
      that detects what context the current expression is
      meant to execute in.  LLDB now properly consults
      the method declaration in the debug information
      rather than trying to hunt down the "this" or "self"
      pointer by name, which can be misleading.
      
      Other fixes include:
      
      - LLDB now properly detects that it is inside
        an inlined C++ member function.
      
      - LLDB now allows access to non-const members when
        in const code.
      
      - The functions in SymbolFile that locate the
        DeclContext containing a DIE have been renamed
        to reflect what they actually do.  I have added
        new functions that find the DeclContext for the
        DIE itself.
      
      I have also introduced testcases for C++ and 
      Objective-C.
      
      llvm-svn: 136999
      72e4940b
  21. Aug 05, 2011
  22. Aug 04, 2011
  23. Aug 02, 2011
    • Enrico Granata's avatar
      Fixed a bug where a variable could not be formatted in a summary if its... · c3e320a7
      Enrico Granata authored
      Fixed a bug where a variable could not be formatted in a summary if its datatype already had a custom format
      Fixed a bug where Objective-C variables coming out of the expression parser could crash the Python synthetic providers:
       - expression parser output has a "frozen data" component, which is a byte-exact copy of the value (in host memory),
         if trying to read into memory based on the host address, LLDB would crash. we are now passing the correct (target)
         pointer to the Python code
      Objective-C "id" variables are now formatted according to their dynamic type, if the -d option to frame variable is used:
       - Code based on the Objective-C 2.0 runtime is used to obtain this information without running code on the target
      
      llvm-svn: 136695
      c3e320a7
  24. 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
    • Greg Clayton's avatar
      Fixed a compile error. · 880cbb04
      Greg Clayton authored
      llvm-svn: 136551
      880cbb04
    • Enrico Granata's avatar
      changes in the new GetMinimumLanguages() ; robustness improvements in the... · 3bcee026
      Enrico Granata authored
      changes in the new GetMinimumLanguages() ; robustness improvements in the CFStringSynthProvider object ; made a CFString_SummaryProvider function you can use if all you care about is the summary string for your NSString objects
      
      llvm-svn: 136544
      3bcee026
    • Greg Clayton's avatar
      Moved some functionality from ValueObject to ClangASTType. · 92eac7f5
      Greg Clayton authored
      llvm-svn: 136536
      92eac7f5
  25. Jul 29, 2011
    • Enrico Granata's avatar
      Public API changes: · 6f3533fb
      Enrico Granata authored
       - Completely new implementation of SBType
       - Various enhancements in several other classes
      Python synthetic children providers for std::vector<T>, std::list<T> and std::map<K,V>:
       - these return the actual elements into the container as the children of the container
       - basic template name parsing that works (hopefully) on both Clang and GCC
       - find them in examples/synthetic and in the test suite in functionalities/data-formatter/data-formatter-python-synth
      New summary string token ${svar :
       - the syntax is just the same as in ${var but this new token lets you read the values
         coming from the synthetic children provider instead of the actual children
       - Python providers above provide a synthetic child len that returns the number of elements
         into the container
      Full bug fix for the issue in which getting byte size for a non-complete type would crash LLDB
      Several other fixes, including:
       - inverted the order of arguments in the ClangASTType constructor
       - EvaluationPoint now only returns SharedPointer's to Target and Process
       - the help text for several type subcommands now correctly indicates argument-less options as such
      
      llvm-svn: 136504
      6f3533fb
  26. Jul 26, 2011
  27. Jul 16, 2011
    • Enrico Granata's avatar
      System-wide summaries: · 9dd75c88
      Enrico Granata authored
       - Summaries for char*, const char* and char[] are loaded at startup as
         system-wide summaries. This means you cannot delete them unless you use
         the -a option to type summary delete/clear
       - You can add your own system-wide summaries by using the -w option to type
         summary add
      Several code improvements for the Python summaries feature
      
      llvm-svn: 135326
      9dd75c88
  28. Jul 12, 2011
    • Greg Clayton's avatar
      Added the ability to _not_ skip the prologue when settings breakpoints · d16e1e59
      Greg Clayton authored
      by name by adding an extra parameter to the lldb_private::Target breakpoint 
      setting functions.
      
      Added a function in the DWARF symbol file plug-in that can dump errors
      and prints out which DWARF file the error is happening in so we can track
      down what used to be assertions easily.
      
      Fixed the MacOSX kernel plug-in to properly read the kext images and set
      the kext breakpoint to watch for kexts as they are loaded.
      
      llvm-svn: 134990
      d16e1e59
    • Enrico Granata's avatar
      named summaries: · f9fa6ee5
      Enrico Granata authored
       - a new --name option for "type summary add" lets you give a name to a summary
       - a new --summary option for "frame variable" lets you bind a named summary to one or more variables
      ${var%s} now works for printing the value of 0-terminated CStrings
      type format test case now tests for cascading
       - this is disabled on GCC because GCC may end up stripping typedef chains, basically breaking cascading
      new design for the FormatNavigator class
      new template class CleanUp2 meant to support cleanup routines with 1 additional parameter beyond resource handle
      
      llvm-svn: 134943
      f9fa6ee5
Loading