Skip to content
  1. Jan 04, 2012
  2. Dec 30, 2011
    • Greg Clayton's avatar
      <rdar://problem/10368163> · 77ccca71
      Greg Clayton authored
      Watch for empty symbol tables by doing a lot more error checking on
      all mach-o symbol table load command values and data that is obtained.
      This avoids a crash that was happening when there was no string table.
      
      llvm-svn: 147358
      77ccca71
  3. Dec 29, 2011
    • Greg Clayton's avatar
      <rdar://problem/10551280> · 360f9a76
      Greg Clayton authored
      Fixed a crasher that can occur when parsing invalid DWARF.
      
      llvm-svn: 147350
      360f9a76
    • Greg Clayton's avatar
      <rdar://problem/10568905> · d3444848
      Greg Clayton authored
      Fixed an issue where our new accelerator tables could cause a crash
      when we got a full 32 bit hash match, yet a C string mismatch.
      
      We had a member variable in DWARFMappedHash::Prologue named 
      "min_hash_data_byte_size" the would compute the byte size of HashData
      so we could skip hash data efficiently. It started out with a byte size
      value of 4. When we read the table in from disk, we would clear the
      atom array and read it from disk, and the byte size would still be set
      to 4. We would then, as we read each atom from disk, increment this count. 
      So the byte size of the HashData was off, which means when we get a lookup
      whose 32 bit hash does matches, but the C string does NOT match (which is
      very very rare), then we try and skip the data for that hash and we would
      add an incorrect offset and get off in our parsing of the hash data and 
      cause this crash. 
      
      To fix this I added a few safeguards:
      1 - I now correctly clear the hash data size when we reset the atom array using the new DWARFMappedHash::Prologue::ClearAtoms() function. 
      2 - I now correctly always let the AppendAtom() calculate the byte size of the hash (before we were doing things manually some times, which was correct, but not good)
      3 - I also track if the size of each HashData is a fixed byte size or not, and "do the right thing" when we need to skip the data.
      4 - If we do get off in the weeds, then I make sure to return an error and stop any further parsing from happening. 
      
      llvm-svn: 147334
      d3444848
    • Greg Clayton's avatar
      <rdar://problem/10546739> · dcad5021
      Greg Clayton authored
      Fixed SBValue::GetValueAsUnsigned() and SBValue::GetValueAsSigned() calls to
      work for bitfields.
      
      llvm-svn: 147332
      dcad5021
    • Greg Clayton's avatar
      Centralize the code the reads the CFI so that we always log. · f97c5213
      Greg Clayton authored
      llvm-svn: 147330
      f97c5213
  4. Dec 28, 2011
  5. Dec 23, 2011
  6. Dec 22, 2011
  7. Dec 21, 2011
    • Sean Callanan's avatar
      The "desired result type" code in the expression · 20bb3aa5
      Sean Callanan authored
      parser has hitherto been an implementation waiting
      for a use.  I have now tied the '-o' option for
      the expression command -- which indicates that the
      result is an Objective-C object and needs to be
      printed -- to the ExpressionParser, which
      communicates the desired type to Clang.
      
      Now, if the result of an expression is determined
      by an Objective-C method call for which there is
      no type information, that result is implicitly
      cast to id if and only if the -o option is passed
      to the expression command.  (Otherwise if there
      is no explicit cast Clang will issue an error.
      This behavior is identical to what happened before
      r146756.)
      
      Also added a testcase for -o enabled and disabled.
      
      llvm-svn: 147099
      20bb3aa5
    • Sean Callanan's avatar
      Fixed a bug in the ASTImporter that affects · 5bc5a76d
      Sean Callanan authored
      types that have been imported multiple times.
      
      The discussion below uses this diagram:
      
      ASTContext     A      B      C
      Decl           Da     Db     Dc
      ASTImporter    \-Iab-/\-Iac-/
                     \-----Iac----/
      
      When a Decl D is imported from ASTContext A to
      ASTContext B, the ASTImporter Iab records the
      pair <Da, Db> in a DenseMap.  That way, if Iab
      ever encounters Da again (for example, as the
      DeclContext for another Decl), it can use the
      imported version.  This is not an optimization,
      it is critical: if I import the field "st_dev"
      as part of importing "struct stat," the field
      must have DeclContext equal to the parent
      structure or we end up with multiple different
      Decls containing different parts of "struct
      stat."  "struct stat" is imported once and
      recorded in the DenseMap; then the ASTImporter
      finds that same version when looking for the
      DeclContext of "st_dev."
      
      The bug arises when Db is imported into another
      ASTContext C and ASTContext B goes away.  This
      often occurs when LLDB produces result variables
      for expressions.  Ibc is aware of the transport
      of Db to Dc, but a brand new ASTImporter, Iac,
      is responsible for completing Dc from its source
      upon request.  That ASTImporter has no mappings,
      so it will produce a clone of Dc when attempting
      to import its children.  That means that type
      completion operations on Dc will fail.
      
      The solution is to create Iac as soon as Ibc
      imports D from B to C, and inform Iac of the
      mapping between Da and Dc.  This allows type
      completion to happen correctly.
      
      llvm-svn: 147016
      5bc5a76d
  8. Dec 20, 2011
  9. Dec 19, 2011
  10. Dec 17, 2011
    • Johnny Chen's avatar
      Fixed code rot pointed out by Jim. · 290fa41b
      Johnny Chen authored
      SBThread::GetStopReasonDataCount/GetStopReasonDataAtIndex() need to handle eStopReasonWatchpoint.
      
      llvm-svn: 146812
      290fa41b
    • Jim Ingham's avatar
      Add the ability to capture the return value in a thread's stop info, and print it · 73ca05a2
      Jim Ingham authored
      as part of the thread format output.
      Currently this is only done for the ThreadPlanStepOut.
      Add a convenience API ABI::GetReturnValueObject.
      Change the ValueObject::EvaluationPoint to BE an ExecutionContextScope, rather than
      trying to hand out one of its subsidiary object's pointers.  That way this will always
      be good.
      
      llvm-svn: 146806
      73ca05a2
    • Greg Clayton's avatar
      Modified LLDB to be able to handle our updated __apple_types accelerator tables · 3cac132d
      Greg Clayton authored
      which have the dwarf DIE tag (DW_TAG_XXX enum) and TypeFlags for each type.
      
      llvm-svn: 146802
      3cac132d
    • Jim Ingham's avatar
      Remove an unnecessary #include. · 105d7234
      Jim Ingham authored
      llvm-svn: 146798
      105d7234
    • Johnny Chen's avatar
      http://llvm.org/bugs/show_bug.cgi?id=11588 · b456b792
      Johnny Chen authored
      valobj.AddressOf() returns None when an address is expected in a SyntheticChildrenProvider
      
      Patch from Enrico Granata:
      
      The problem was that the frozen object created by the expression parser was a copy of the contents of the StgClosure, rather than a pointer to it. Thus, the expression parser was correctly computing the result of the arithmetic&cast operation along with its address, but only saving it in the live object. This meant that the frozen copy acted as an address-less variable, hence the problem.
      
      The fix attached to this email lets the expression parser store the "live address" in the frozen copy of the address when the object is built without a valid address of its own.
      Doing so, along with delegating ValueObjectConstResult to calculate its own address when necessary, solves the issue. I have also added a new test case to check for regressions in this area, and checked that existing test cases pass correctly.
      
      llvm-svn: 146768
      b456b792
  11. Dec 16, 2011
    • Sean Callanan's avatar
      Updated Clang to take an enhancement to the way · bb12004c
      Sean Callanan authored
      we handle Objective-C method calls.  Currently,
      LLDB treats the result of an Objective-C method
      as unknown if the type information doesn't have
      the method's signature.  Now Clang can cast the
      result to id if it isn't explicitly cast.
      
      I also added a test case for this, as well as a
      fix for a type import problem that this feature
      exposed.
      
      llvm-svn: 146756
      bb12004c
    • Greg Clayton's avatar
      Handle all of the "thumb" target triple architecture variants that llvm · b5c39fe9
      Greg Clayton authored
      handles.
      
      llvm-svn: 146746
      b5c39fe9
    • Jason Molenda's avatar
      When we're unwinding out of frame 0 and we end up with a bogus frame · 9d828ac0
      Jason Molenda authored
      1 -- an address pointing off into non-executable memory -- don't
      abort the unwind.  We'll use the ABI's default UnwindPlan to try
      to get out of frame 1 and on many platforms with a standard frame
      chain stack layout we can get back on track and get a valid frame
      2.  This preserves the lldb behavior to-date; the change last week
      to require the memory region to be executable broke it.
      
      I'd like to mark this frame specially when displayed to the user;
      I tried to override the places where the frame's pc value is returned
      to change it to a sentinel value (e.g. LLDB_INVALID_ADDRESS) but
      couldn't get that to work cleanly so I backed that part out for
      now.  When this happens we'll often miss one of the user's actual
      frames, the one that's of most interest to the user, so I'd like
      to make this visually distinctive.
      
      Note that a frame in non-executable memory region is only allowed
      for frame 1.  After that we should be solid on the unwind and any
      pc address in non-executable memory indicates a failure and we
      should stop unwinding.
      
      llvm-svn: 146723
      9d828ac0
    • Jim Ingham's avatar
      Remove unnecessary #include. · 30b74fa8
      Jim Ingham authored
      llvm-svn: 146717
      30b74fa8
    • Jim Ingham's avatar
      Fix a bug where when debugging with .o files, we end up with two symbols for... · 918533bc
      Jim Ingham authored
      Fix a bug where when debugging with .o files, we end up with two symbols for each real OBJC_CLASS_$_whatever, one of which is correctly classified as an ObjCClass symbol, and the other is just a data symbol.  This was messing up the ObjC dynamic type detection.
      <rdar://problem/10589527>
      
      llvm-svn: 146712
      918533bc
  12. Dec 15, 2011
    • Greg Clayton's avatar
      <rdar://problem/10584789> · f9322415
      Greg Clayton authored
      Added a static memory pressure function in SBDebugger:
      
          void SBDebugger::MemoryPressureDetected ()
      
      This can be called by applications that detect memory pressure to cause LLDB to release cached information.
      
      llvm-svn: 146640
      f9322415
Loading