Skip to content
  1. Oct 30, 2013
    • Manman Ren's avatar
      Debug Info: code clean up. · 251a1bd2
      Manman Ren authored
      Use EmitLabelOffsetDifference for handling on darwin platform when
      non-darwin platforms use EmitLabelPlusOffset.
      
      Also fix a bug in EmitLabelOffsetDifference where the size is hard-coded
      to 4 even though Size is passed in as an argument.
      
      llvm-svn: 193660
      251a1bd2
  2. Oct 29, 2013
    • Manman Ren's avatar
      Debug Info: support for DW_FORM_ref_addr. · ce20d460
      Manman Ren authored
      To support ref_addr, we calculate the section offset of a DIE (i.e. offset
      of a DIE from beginning of the debug info section). The Offset field in DIE
      is currently CU-relative. To calculate the section offset, we add a
      DebugInfoOffset field in CompileUnit to store the offset of a CU from beginning
      of the debug info section. We set the value in DwarfUnits::computeSizeAndOffset
      for each CompileUnit.
      
      A helper function DIE::getCompileUnit is added to return the CU DIE that
      the input DIE belongs to. We also add a map CUDieMap in DwarfDebug to help
      finding the CU for a given CU DIE.
      
      For a cross-referenced DIE, we first find the CU DIE it belongs to with
      getCompileUnit, then we use CUDieMap to get the corresponding CU for the CU DIE.
      Adding the section offset of the CU with the CU-relative offset of a DIE gives
      us the seciton offset of the DIE.
      
      We correctly emit ref_addr with relocation using EmitLabelPlusOffset when
      doesDwarfUseRelocationsAcrossSections is true.
      
      This commit handles the emission of DW_FORM_ref_addr when we have an attribute
      with FORM_ref_addr. A follow-on patch will start using ref_addr when adding a
      DIEEntry. This commit will be tested and verified in the follow-on patch.
      
      Reviewed off-list by Eric, Thanks.
      
      llvm-svn: 193658
      ce20d460
    • Manman Ren's avatar
      Debug Info: instead of calling addToContextOwner which constructs the context · f4c339e0
      Manman Ren authored
      after the DIE creation, we construct the context first.
      
      Ensure that we create the context before we create a type so that we can add
      the newly created type to the parent. Remove last use of addToContextOwner
      now that it's not needed.
      
      We use createAndAddDIE to wrap around "new DIE(". Now all shareable DIEs
      should be added to their parents right after the creation.
      
      Reviewed off-list by Eric, Thanks.
      
      llvm-svn: 193657
      f4c339e0
    • Rafael Espindola's avatar
      Move getSymbol to TargetLoweringObjectFile. · e133ed88
      Rafael Espindola authored
      This allows constructing a Mangler with just a TargetMachine.
      
      llvm-svn: 193630
      e133ed88
    • Rafael Espindola's avatar
      Add a helper getSymbol to AsmPrinter. · 79858aa3
      Rafael Espindola authored
      llvm-svn: 193627
      79858aa3
    • Manman Ren's avatar
      Debug Info: instead of calling addToContextOwner which constructs the context · f6b936bc
      Manman Ren authored
      after the DIE creation, we construct the context first.
      
      This touches creation of namespaces and global variables. The purpose is to
      handle all DIE creations similarly: constructs the context first, then creates
      the DIE and immediately adds the DIE to its parent.
      
      We use createAndAddDIE to wrap around "new DIE(".
      
      llvm-svn: 193589
      f6b936bc
    • Manman Ren's avatar
      Debug Info: use createAndAddDIE to wrap around "new DIE" in DwarfDebug. · 4a841a86
      Manman Ren authored
      This commit ensures DIEs are constructed within a compile unit and
      immediately added to their parents.
      
      Reviewed off-list by Eric.
      
      llvm-svn: 193568
      4a841a86
    • Manman Ren's avatar
      Debug Info: use createAndAddDIE for newly-created Subprogram DIEs. · 73d697c6
      Manman Ren authored
      More patches will be submitted to convert "new DIE(" to use createAddAndDIE in
      DwarfCompileUnit.cpp. This will simplify implementation of addDIEEntry where
      we have to decide between ref4 and ref_addr, because DIEs that can be shared
      across CU will be added to a CU already.
      
      Reviewed off-list by Eric.
      
      llvm-svn: 193567
      73d697c6
    • Manman Ren's avatar
      Debug Info: add a helper function createAndAddDIE. · b987e517
      Manman Ren authored
      It wraps around "new DIE(" and handles the bookkeeping part of the newly-created
      DIE. It adds the DIE to its parent, and calls insertDIE if necessary. It makes
      sure that bookkeeping is done at the earliest time and we should not see
      parentless DIEs if all constructions of DIEs go through this helper function.
      
      Later on, we can use an allocator for DIE allocation, and will only need to
      change createAndAddDIE instead of modifying all the "new DIE(".
      
      Reviewed off-list by Eric.
      
      llvm-svn: 193566
      b987e517
  3. Oct 25, 2013
  4. Oct 24, 2013
  5. Oct 23, 2013
  6. Oct 22, 2013
  7. Oct 21, 2013
  8. Oct 20, 2013
    • Peter Collingbourne's avatar
      Emit prefix data after debug and EH directives. · e9f45e25
      Peter Collingbourne authored
      This ensures that the prefix data is treated as part of the function for
      the purpose of debug info.  This provides a better debugging experience,
      among other things by allowing a debug info client to correctly look up
      a function in debug info given a function pointer.
      
      llvm-svn: 193042
      e9f45e25
  9. Oct 19, 2013
Loading