Skip to content
  1. Jun 25, 2015
  2. Jun 24, 2015
    • Tamas Berghammer's avatar
      Improve instruction emulation based stack unwinding on ARM · 44ff9cce
      Tamas Berghammer authored
      * Add and fix the emulation of several instruction.
      * Disable frame pointer usage on Android.
      * Specify return address register for the unwind plan instead of explict
        tracking the value of RA.
      * Replace prologue detection heuristics (unreliable in several cases)
        with a logic to follow the branch instructions and restore the CFI
        value based on them. The target address for a branch should have the
        same CFI as the source address (if they are in the same function).
      * Handle symbols in ELF files where the symbol size is not specified
        with calcualting their size based on the next symbol (already done
        in MachO files).
      * Fix architecture in FuncUnwinders with filling up the inforamtion
        missing from the object file with the architecture of the target.
      * Add code to read register wehn the value is set to "IsSame" as it
        meanse the value of a register in the parent frame is the same as the
        value in the current frame.
      
      Differential revision: http://reviews.llvm.org/D10447
      
      llvm-svn: 240533
      44ff9cce
  3. Jun 23, 2015
  4. Jun 19, 2015
  5. Jun 18, 2015
  6. Jun 15, 2015
    • Greg Clayton's avatar
      Found an issue that was causing types to be completed much more often than they needed to be. · 49e9010c
      Greg Clayton authored
      The problem is for lldb_private::Type instances that have encoding types (pointer/reference/const/volatile/restrict/typedef to type with user ID 0x123). If they started out with m_flags.clang_type_resolve_state being set to eResolveStateUnresolved (0), then when we would call Type::ResolveClangType(eResolveStateForward) we would complete the full type due to logic errors in the code. 
      
      We now only complete the type if clang_type_resolve_state is eResolveStateLayout or eResolveStateFull and we correctly upgrade the type's current completion state to eResolveStateForward after we make a forward delcaration to the pointer/reference/const/volatile/restrict/typedef type instead of leaving it set to eResolveStateUnresolved.
      
      llvm-svn: 239752
      49e9010c
  7. Jun 09, 2015
  8. Jun 01, 2015
  9. May 29, 2015
    • Zachary Turner's avatar
      Don't #include "lldb-python.h" from anywhere. · 1124045a
      Zachary Turner authored
      Since interaction with the python interpreter is moving towards
      being more isolated, we won't be able to include this header from
      normal files anymore, all includes of it should be localized to
      the python library which will live under source/bindings/API/Python
      after a future patch.
      
      None of the files that were including this header actually depended
      on it anyway, so it was just a dead include in every single instance.
      
      llvm-svn: 238581
      1124045a
  10. May 26, 2015
  11. May 13, 2015
  12. May 07, 2015
  13. May 06, 2015
    • Pavel Labath's avatar
      Simplify FuncUnwinders::GetEHFrameAugmentedUnwindPlan · ad5ee040
      Pavel Labath authored
      Summary:
      GetEHFrameAugmentedUnwindPlan duplicated the work of GetEHFrameUnwindPlan in getting the original
      plan from DWARF CFI. This changes the function to call GetEHFrameUnwindPlan instead of doing all
      the work itself. A copy constructor is added to UnwindPlan to enable plan copying.
      
      Test Plan: No regressions on linux test suite.
      
      Reviewers: jasonmolenda, clayborg
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D9369
      
      llvm-svn: 236607
      ad5ee040
  14. May 05, 2015
  15. Apr 22, 2015
  16. Apr 20, 2015
    • Sean Callanan's avatar
      This patch implements several improvements to the · f0c5aeb6
      Sean Callanan authored
      module-loading support for the expression parser.
      
      - It adds support for auto-loading modules referred
        to by a compile unit.  These references are
        currently in the form of empty translation units.
        This functionality is gated by the setting
      
        target.auto-import-clang-modules (boolean) = false
      
      - It improves and corrects support for loading
        macros from modules, currently by textually
        pasting all #defines into the user's expression.
        The improvements center around including only those
        modules that are relevant to the current context -
        hand-loaded modules and the modules that are imported
        from the current compile unit.
      
      - It adds an "opt-in" mechanism for all of this
        functionality.  Modules have to be explicitly
        imported (via @import) or auto-loaded (by enabling
        the above setting) to enable any of this
        functionality.
      
      It also adds support to the compile unit and symbol
      file code to deal with empty translation units that
      indicate module imports, and plumbs this through to
      the CompileUnit interface.
      
      Finally, it makes the following changes to the test
      suite:
      
      - It adds a testcase that verifies that modules are
        automatically loaded when the appropriate setting
        is enabled (lang/objc/modules-auto-import); and
      
      - It modifies lanb/objc/modules-incomplete to test
        the case where a module #undefs something that is
        #defined in another module.
      
      <rdar://problem/20299554>
      
      llvm-svn: 235313
      f0c5aeb6
  17. Apr 15, 2015
  18. Apr 13, 2015
  19. Apr 09, 2015
  20. Apr 08, 2015
    • Stephane Sezer's avatar
      Fix resolution of certain recursive types. · 9901e9c6
      Stephane Sezer authored
      Summary:
      If a struct type S has a member T that has a member that is a function that
      returns a typedef of S* the respective field would be duplicated, which caused
      an assert down the line in RecordLayoutBuilder. This patch adds a check that
      removes the possibility of trying to resolve the same type twice within the
      same callstack.
      
      This commit also adds unit tests for these failures.
      
      Fixes https://llvm.org/bugs/show_bug.cgi?id=20486.
      
      Patch by Cristian Hancila.
      
      Test Plan: Run unit tests.
      
      Reviewers: clayborg spyffe
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D8561
      
      llvm-svn: 234441
      9901e9c6
  21. Apr 02, 2015
    • Zachary Turner's avatar
      Fix warnings generated by clang-cl. · 48b475cb
      Zachary Turner authored
      There were a couple of real bugs here regarding error checking and
      signed/unsigned comparisons, but mostly these were just noise.
      
      There was one class of bugs fixed here which is particularly
      annoying, dealing with MSVC's non-standard behavior regarding
      the underlying type of enums.  See the comment in
      lldb-enumerations.h for details.  In short, from now on please use
      FLAGS_ENUM and FLAGS_ANONYMOUS_ENUM when defining enums which
      contain values larger than can fit into a signed integer.
      
      llvm-svn: 233943
      48b475cb
    • Jason Molenda's avatar
      Add a tiny bit of hardening to the eh_frame and compact unwind parsing. · c48ef341
      Jason Molenda authored
      When we're seeing offsets that exceed the size of our section, don't 
      try to use that unwind info.
      <rdar://problem/20113673> 
      
      llvm-svn: 233886
      c48ef341
  22. Apr 01, 2015
    • Tamas Berghammer's avatar
      Correctly detect sign-ness of wchar_t · 3c0d0057
      Tamas Berghammer authored
      The underlying type of wchar_t is not defined by the standard. This CL
      add logic to correctly use the type specified for the current target
      based on TargetInfo.
      
      llvm-svn: 233795
      3c0d0057
  23. Mar 31, 2015
    • Tamas Berghammer's avatar
      Fix type detection for 'char' variables · dccbfaf9
      Tamas Berghammer authored
      A char can have signed and unsigned encoding but previously lldb always
      assumed it is signed. This CL adds a logic to detect the encoding of
      'char' types based on the default encoding on the target architecture.
      It fixes variable printing and expression evaluation on architectures
      where 'char' is signed by default.
      
      Differential revision: http://reviews.llvm.org/D8636
      
      llvm-svn: 233682
      dccbfaf9
  24. Mar 24, 2015
    • Zachary Turner's avatar
      Fix error introduced by changing function signatures. · a98fac28
      Zachary Turner authored
      Since ClangASTSource::layoutRecordType() was overriding a virtual
      function in the base, this was inadvertently causing a new method
      to be introduced rather than an override.  To fix this all method
      signatures are changed back to taking DenseMaps, and the `override`
      keyword is added to make sure this type of error doesn't happen
      again.
      
      To keep the original fix intact, which is that fields and bases
      must be added in offset order, the ImportOffsetMap() function
      now copies the DenseMap into a vector and then sorts the vector
      on the value type (e.g. the offset) before iterating over the
      sorted vector and inserting the items.
      
      llvm-svn: 233099
      a98fac28
    • Siva Chandra's avatar
      [DWARF] If linkages names are missing, use decl context to get qualified names. · 0783ab9a
      Siva Chandra authored
      Summary:
      This commit adds this alternate route only when parsing variable dies
      corresponding to global or static variables. The motivation for this is that GCC
      does not emit linkage names for functions and variables declared/defined in
      anonymous namespaces. Having this alternate route fixes one part of
      TestNamespace which fails when the test case is compiled with GCC.
      
      An alternate route to get fully qualified names of functions whose linkage names
      are missing will be added with a followup change. With that, the other failing
      part of TestNamespace will also be fixed.
      
      Test Plan: dotest.py -C gcc -p TestNamespace
      
      Reviewers: clayborg
      
      Reviewed By: clayborg
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D8569
      
      llvm-svn: 233098
      0783ab9a
    • Zachary Turner's avatar
      Fix record layout when synthesizing class types. · 504f38da
      Zachary Turner authored
      Prior to this patch, we would try to synthesize class types by
      iterating over a DenseMap of FieldDecls and adding each one to
      a CXXRecordDecl.  Since a DenseMap doesn't provide a deterministic
      ordering of the elements, this would not add the fields in
      FieldOffset order, but rather in some random order determined by
      the memory layout of the DenseMap.
      
      This patch fixes the issue by changing DenseMaps to vectors.  The
      ability to lookup a value in the DenseMap was hardly being used,
      and where it is sufficient to do a vector lookup.
      
      Differential Revision: http://reviews.llvm.org/D8512
      
      llvm-svn: 233090
      504f38da
  25. Mar 19, 2015
  26. Mar 18, 2015
    • Zachary Turner's avatar
      Move lldb-log.cpp to core/Logging.cpp · 3294de27
      Zachary Turner authored
      So that we don't have to update every single #include in the entire
      codebase to #include this new header (which used to get included by
      lldb-private-log.h, we automatically #include "Logging.h" from
      within "Log.h".
      
      llvm-svn: 232653
      3294de27
  27. Mar 10, 2015
  28. Mar 06, 2015
    • Zachary Turner's avatar
      Remove Host::Backtrace in favor of llvm::sys::PrintStackTrace() · a893d301
      Zachary Turner authored
      This removes Host::Backtrace from the codebase, and changes all
      call sites to use llvm::sys::PrintStackTrace().  This makes the
      functionality available for all platforms, and even for platforms
      which currently had a supported implementation of Host::Backtrace,
      this patch should enable richer information in stack traces, such
      as file and line number information, as well as giving it the
      ability to unwind through inlined functions.
      
      llvm-svn: 231511
      a893d301
    • Enrico Granata's avatar
      A few improvements to our vector types formatting story: · db595cdc
      Enrico Granata authored
      - use a hardcoded formatter to match all vector types, and make it so that their element type is taken into account when doing default formatting
      - special case a vector of char to display byte values instead of characters by default
      
      Fixes the test failures Ilia was seeing
      
      llvm-svn: 231504
      db595cdc
  29. Mar 04, 2015
    • Pavel Labath's avatar
      Correctly resolve symbol names containing linker annotations · c6ae7eaa
      Pavel Labath authored
      Summary:
      Symbols in ELF files can be versioned, but LLDB currently does not understand these. This problem
      becomes apparent once one loads glibc with debug info. Here (in the .symtab section) the versions
      are embedded in the name (name@VERSION), which causes issues when evaluating expressions
      referencing memcpy for example (current glibc contains memcpy@@GLIBC_2.14 and
      memcpy@GLIBC_2.2.5).
      
      This problem was not evident without debug symbols as the .dynsym section
      stores the bare names and the actual versions are present in a separate section (.gnu.version_d),
      which LLDB ignores. This resulted in two definitions of memcpy in the symbol table.
      
      This patch adds support for storing annotated names to the Symbol class. If
      Symbol.m_contains_linker_annotations is true then this symbol is annotated. Unannotated name can
      be obtained by calling StripLinkerAnnotations on the corresponding ObjectFile. ObjectFileELF
      implements this to strip @VERSION suffixes when requested. Symtab uses this function to add the
      bare name as well as the annotated name to the name lookup table.
      
      To preserve the size of the Symbol class, I had to steal one bit from the m_type field.
      
      Test Plan:
      This fixes TestExprHelpExamples.py when run with a glibc with debug symbols. Writing
      an environment agnostic test case would require building a custom shared library with symbol
      versions and testing symbol resolution against that, which is somewhat challenging.
      
      Reviewers: clayborg, jingham
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D8036
      
      llvm-svn: 231228
      c6ae7eaa
    • Zachary Turner's avatar
      Fix errors building on linux. · 90aff47c
      Zachary Turner authored
      llvm-svn: 231169
      90aff47c
    • Zachary Turner's avatar
      Don't #include FormatManager.h from Debugger.h · a78bd7ff
      Zachary Turner authored
      Debugger.h is a huge file that gets included everywhere, and
      FormatManager.h brings in a ton of unnecessary stuff and doesn't
      even use anything from it in the header.
      
      llvm-svn: 231161
      a78bd7ff
  30. Mar 03, 2015
Loading