Skip to content
  1. Feb 04, 2012
    • Sean Callanan's avatar
      I have brought LLDB up-to-date with top of tree · 5b26f27f
      Sean Callanan authored
      LLVM/Clang.  This brings in several fixes, including:
      
      - Improvements in the Just-In-Time compiler's
        allocation of memory: the JIT now allocates
        memory in chunks of sections, improving its
        ability to generate relocations.  I have
        revamped the RecordingMemoryManager to reflect
        these changes, as well as to get the memory
        allocation and data copying out fo the
        ClangExpressionParser code.  Jim Grosbach wrote
        the updates to the JIT on the LLVM side.
      
      - A new ExternalASTSource interface to allow LLDB to
        report accurate structure layout information to
        Clang.  Previously we could only report the sizes
        of fields, not their offsets.  This meant that if
        data structures included field alignment
        directives, we could not communicate the necessary
        alignment to Clang and accesses to the data would
        fail.  Now we can (and I have update the relevant
        test case).  Thanks to Doug Gregor for implementing
        the Clang side of this fix.
      
      - The way Objective-C interfaces are completed by
        Clang has been made consistent with RecordDecls;
        with help from Doug Gregor and Greg Clayton I have
        ensured that this still works.
      
      - I have eliminated all local LLVM and Clang patches,
        committing the ones that are still relevant to LLVM
        and Clang as needed.
      
      I have tested the changes extensively locally, but
      please let me know if they cause any trouble for you.
      
      llvm-svn: 149775
      5b26f27f
    • Greg Clayton's avatar
      Allow a SBAddress to be created from a SBSection and an offset. · 819134a7
      Greg Clayton authored
      Changed the lldb.SBModule.section[<str>] property to return a single section.
      
      Added a lldb.SBSection.addr property which returns an lldb.SBAddress object.
      
      llvm-svn: 149755
      819134a7
    • Greg Clayton's avatar
      Convert all python objects in our API to use overload the __str__ method · 81e871ed
      Greg Clayton authored
      instead of the __repr__. __repr__ is a function that should return an
      expression that can be used to recreate an python object and we were using
      it to just return a human readable string.
      
      Fixed a crasher when using the new implementation of SBValue::Cast(SBType).
      
      Thread hardened lldb::SBValue and lldb::SBWatchpoint and did other general
      improvements to the API.
      
      Fixed a crasher in lldb::SBValue::GetChildMemberWithName() where we didn't
      correctly handle not having a target.
      
      llvm-svn: 149743
      81e871ed
    • Johnny Chen's avatar
      b428b697
  2. Feb 03, 2012
    • Johnny Chen's avatar
      Fix typos. · 9dad8ae6
      Johnny Chen authored
      llvm-svn: 149710
      9dad8ae6
    • Johnny Chen's avatar
      Add test cases for APIs to get template arguments from an SBType. · 15f247ad
      Johnny Chen authored
      llvm-svn: 149707
      15f247ad
    • Enrico Granata's avatar
      Fixing issues where synthetic children providers for STL containers std::list... · 4cee9e52
      Enrico Granata authored
      Fixing issues where synthetic children providers for STL containers std::list and std::map where not doing their job properly
      
      llvm-svn: 149700
      4cee9e52
    • Greg Clayton's avatar
      Expose more convenience functionality in the python classes. · 7edbdfc9
      Greg Clayton authored
      lldb.SBValueList now exposes the len() method and also allows item access:
      
      lldb.SBValueList[<int>] - where <int> is an integer index into the list, returns a single lldb.SBValue which might be empty if the index is out of range
      lldb.SBValueList[<str>] - where <str> is the name to look for, returns a list() of lldb.SBValue objects with any matching values (the list might be empty if nothing matches)
      lldb.SBValueList[<re>]  - where <re> is a compiles regular expression, returns a list of lldb.SBValue objects for containing any matches or a empty list if nothing matches
      
      lldb.SBFrame now exposes:
      
      lldb.SBFrame.variables => SBValueList of all variables that are in scope
      lldb.SBFrame.vars => see lldb.SBFrame.variables
      lldb.SBFrame.locals => SBValueList of all variables that are locals in the current frame
      lldb.SBFrame.arguments => SBValueList of all variables that are arguments in the current frame
      lldb.SBFrame.args => see lldb.SBFrame.arguments
      lldb.SBFrame.statics => SBValueList of all static variables
      lldb.SBFrame.registers => SBValueList of all registers for the current frame
      lldb.SBFrame.regs => see lldb.SBFrame.registers
      
      Combine any of the above properties with the new lldb.SBValueList functionality
      and now you can do:
      
      y = lldb.frame.vars['rect.origin.y']
      
      or
      
      vars = lldb.frame.vars
      for i in range len(vars):
        print vars[i]
      
      Also expose "lldb.SBFrame.var(<str>)" where <str> can be en expression path
      for any variable or child within the variable. This makes it easier to get a
      value from the current frame like "rect.origin.y". The resulting value is also
      not a constant result as expressions will return, but a live value that will
      continue to track the current value for the variable expression path.
      
      lldb.SBValue now exposes:
      
      lldb.SBValue.unsigned => unsigned integer for the value
      lldb.SBValue.signed => a signed integer for the value
      
      llvm-svn: 149684
      7edbdfc9
    • Greg Clayton's avatar
      Fixed casting in the lldb::SBValue::Cast(SBType) function. · 9a142cf8
      Greg Clayton authored
      llvm-svn: 149673
      9a142cf8
    • Greg Clayton's avatar
      Cleaned up the documentation strings for many helper objects and added · b62bb8ce
      Greg Clayton authored
      lldb.SBModule.section and lldb.SBModule.sections property access.
      
      llvm-svn: 149665
      b62bb8ce
    • Enrico Granata's avatar
      Adding support for an "equivalents map". This can be useful when compilers... · 1d261d1c
      Enrico Granata authored
      Adding support for an "equivalents map". This can be useful when compilers emit multiple, different names for the same actual type. In such scenarios, one of the type names can actually be found during a type lookup, while the others are just aliases. This can cause issues when trying to work with these aliased names and being unable to resolve them to an actual type (e.g. getting an SBType for the aliased name).
      Currently, no code is using this feature, since we can hopefully rely on the new template support in SBType to get the same stuff done, but the support is there just in case it turns out to be useful for some future need.
      
      llvm-svn: 149661
      1d261d1c
    • Greg Clayton's avatar
      Added support to SBType for getting template arguments from a SBType: · 402230e6
      Greg Clayton authored
      uint32_t
      SBType::GetNumberOfTemplateArguments ();
      
      lldb::SBType
      SBType::GetTemplateArgumentType (uint32_t idx);
      
      lldb::TemplateArgumentKind
      SBType::GetTemplateArgumentKind (uint32_t idx);
      
      Some lldb::TemplateArgumentKind values don't have a corresponding SBType
      that will be returned from SBType::GetTemplateArgumentType(). This will
      help our data formatters do their job by being able to find out the
      type of template params and do smart things with those.
      
      llvm-svn: 149658
      402230e6
    • Johnny Chen's avatar
      60b4f13c
    • Enrico Granata's avatar
      Added a new --omit-names (-O, uppercase letter o) option to "type summary add". · a6a60d0d
      Enrico Granata authored
      When used in conjunction with --inline-children, this option will cause the names of the values to be omitted from the output. This can be beneficial in cases such as vFloat, where it will compact the representation from
      ([0]=1,[1]=2,[2]=3,[3]=4) to (1, 2, 3, 4).
      Added a test case to check that the new option works correctly.
      Also took some time to revisit SummaryFormat and related classes and tweak them for added readability and maintainability.
      Finally, added a new class name to which the std::string summary should be applied.
      
      llvm-svn: 149644
      a6a60d0d
  3. Feb 02, 2012
  4. Feb 01, 2012
    • Johnny Chen's avatar
      Fix indentation. · ccfa90a5
      Johnny Chen authored
      llvm-svn: 149529
      ccfa90a5
    • Johnny Chen's avatar
      Add const-ness to BreakpointLocation::IsEnabled(). · fdad6794
      Johnny Chen authored
      llvm-svn: 149523
      fdad6794
    • Johnny Chen's avatar
      Add @expectedFailure decorators. · 3cfb9c67
      Johnny Chen authored
      llvm-svn: 149519
      3cfb9c67
    • Greg Clayton's avatar
      Added many more python convenience accessors: · 6b2bd939
      Greg Clayton authored
      You can now access a frame in a thread using:
      
      lldb.SBThread.frame[int] -> lldb.SBFrame object for a frame in a thread
      
      Where "int" is an integer index. You can also access a list object with all of
      the frames using:
      
      lldb.SBThread.frames => list() of lldb.SBFrame objects
      
      All SB objects that give out SBAddress objects have properties named "addr"
      
      lldb.SBInstructionList now has the following convenience accessors for len() and
      instruction access using an index:
      
      insts = lldb.frame.function.instructions
      for idx in range(len(insts)):
          print insts[idx]
          
      Instruction lists can also lookup an isntruction using a lldb.SBAddress as the key:
      
      pc_inst = lldb.frame.function.instructions[lldb.frame.addr]
      
      lldb.SBProcess now exposes:
      
      lldb.SBProcess.is_alive => BOOL Check if a process is exists and is alive
      lldb.SBProcess.is_running => BOOL check if a process is running (or stepping):
      lldb.SBProcess.is_running => BOOL check if a process is currently stopped or crashed:
      lldb.SBProcess.thread[int] => lldb.SBThreads for a given "int" zero based index
      lldb.SBProcess.threads => list() containing all lldb.SBThread objects in a process
      
      SBInstruction now exposes:
      lldb.SBInstruction.mnemonic => python string for instruction mnemonic
      lldb.SBInstruction.operands => python string for instruction operands
      lldb.SBInstruction.command => python string for instruction comment
      
      SBModule now exposes:
      
      lldb.SBModule.uuid => uuid.UUID(), an UUID object from the "uuid" python module
      lldb.SBModule.symbol[int] => lldb.Symbol, lookup symbol by zero based index
      lldb.SBModule.symbol[str] => list() of lldb.Symbol objects that match "str"
      lldb.SBModule.symbol[re] => list() of lldb.Symbol objecxts that match the regex
      lldb.SBModule.symbols => list() of all symbols in a module
      
        
      SBAddress objects can now access the current load address with the "lldb.SBAddress.load_addr"
      property. The current "lldb.target" will be used to try and resolve the load address.
      
      Load addresses can also be set using this accessor:
      
      addr = lldb.SBAddress()
      addd.load_addr = 0x123023
      
      Then you can check the section and offset to see if the address got resolved.
      
      SBTarget now exposes:
      
      lldb.SBTarget.module[int] => lldb.SBModule from zero based module index
      lldb.SBTarget.module[str] => lldb.SBModule by basename or fullpath or uuid string
      lldb.SBTarget.module[uuid.UUID()] => lldb.SBModule whose UUID matches
      lldb.SBTarget.module[re] => list() of lldb.SBModule objects that match the regex
      lldb.SBTarget.modules => list() of all lldb.SBModule objects in the target
      
      SBSymbol now exposes:
      
      lldb.SBSymbol.name => python string for demangled symbol name
      lldb.SBSymbol.mangled => python string for mangled symbol name or None if there is none
      lldb.SBSymbol.type => lldb.eSymbolType enum value
      lldb.SBSymbol.addr => SBAddress object that represents the start address for this symbol (if there is one)
      lldb.SBSymbol.end_addr => SBAddress for the end address of the symbol  (if there is one)
      lldb.SBSymbol.prologue_size => pythin int containing The size of the prologue in bytes
      lldb.SBSymbol.instructions => SBInstructionList containing all instructions for this symbol
      
      SBFunction now also has these new properties in addition to what is already has:
      lldb.SBFunction.addr => SBAddress object that represents the start address for this function
      lldb.SBFunction.end_addr => SBAddress for the end address of the function
      lldb.SBFunction.instructions => SBInstructionList containing all instructions for this function
      
      SBFrame now exposes the SBAddress for the frame:
      lldb.SBFrame.addr => SBAddress which is the section offset address for the current frame PC
      
      These are all in addition to what was already added. Documentation and website
      updates coming soon.
      
      llvm-svn: 149489
      6b2bd939
    • Greg Clayton's avatar
      Added a new convenience property on lldb.SBThread names "frames" which always... · 2415586f
      Greg Clayton authored
      Added a new convenience property on lldb.SBThread names "frames" which always returns a complete list of all lldb.SBFrame objects:
      
      (lldb) script
      >>> frames = lldb.thread.frames
      >>> for frame in frames:
      ...   print frame
      
      Also changed all of the "__repr__" methods to strip any trailing newline characters so we don't end up with entra newlines.
      
      llvm-svn: 149466
      2415586f
    • Johnny Chen's avatar
      lldb should warn when dSYM does not match the binary. · fdc80a5c
      Johnny Chen authored
      o Symbols.cpp:
      
        Emit a warning message when dSYM does not match the binary.
      
      o warnings/uuid:
      
        Added regression test case.
      
      o lldbtest.py:
      
        Modified to allow test case writer to demand that the build command does not begin
        with a clean first; required to make TestUUIDMismatchWanring.py work.
      
      rdar://problem/10515708
      
      llvm-svn: 149465
      fdc80a5c
    • Greg Clayton's avatar
      Added a new class to the lldb python module: · 05e8d194
      Greg Clayton authored
      lldb.value()
      
      It it designed to be given a lldb.SBValue object and it allows natural
      use of a variable value:
      
          pt = lldb.value(lldb.frame.FindVariable("pt"))
          print pt
          print pt.x
          print pt.y
      
          pt = lldb.frame.FindVariable("rectangle_array")
          print rectangle_array[12]
          print rectangle_array[5].origin.x
      
      Note that array access works just fine and works on arrays or pointers:
      
      pt = lldb.frame.FindVariable("point_ptr")
      print point_ptr[5].y
      
      Also note that pointer child accesses are done using a "." instead of "->":
      
      print point_ptr.x
      
      llvm-svn: 149464
      05e8d194
    • Enrico Granata's avatar
      remove spurious leftover code from std::list testcase · 8680c713
      Enrico Granata authored
      llvm-svn: 149461
      8680c713
    • Greg Clayton's avatar
      Added fuzz testing for when we call API calls with an invalid object. · fbf1b641
      Greg Clayton authored
      We previously weren't catching that SBValue::Cast(...) would crash
      if we had an invalid (empty) SBValue object.
      
      Cleaned up the SBType API a bit.
      
      llvm-svn: 149447
      fbf1b641
    • Jim Ingham's avatar
      Threads now store their "temporary" resume state, so we know whether they were... · 92087d86
      Jim Ingham authored
      Threads now store their "temporary" resume state, so we know whether they were suspended in the most
      recent step, and if they weren't allowed to run, don't ask questions about their state unless explicitly
      requested to do so.
      
      llvm-svn: 149443
      92087d86
  5. Jan 31, 2012
Loading