[libunwind] r275996 - libunwind: Use conventional DWARF capitalization in comments and errors

Ed Maste via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 19 10:15:50 PDT 2016


Author: emaste
Date: Tue Jul 19 12:15:50 2016
New Revision: 275996

URL: http://llvm.org/viewvc/llvm-project?rev=275996&view=rev
Log:
libunwind: Use conventional DWARF capitalization in comments and errors

Modified:
    libunwind/trunk/include/libunwind.h
    libunwind/trunk/include/mach-o/compact_unwind_encoding.h
    libunwind/trunk/include/unwind.h
    libunwind/trunk/src/AddressSpace.hpp
    libunwind/trunk/src/DwarfInstructions.hpp
    libunwind/trunk/src/DwarfParser.hpp
    libunwind/trunk/src/UnwindLevel1-gcc-ext.c
    libunwind/trunk/src/libunwind.cpp

Modified: libunwind/trunk/include/libunwind.h
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/include/libunwind.h?rev=275996&r1=275995&r2=275996&view=diff
==============================================================================
--- libunwind/trunk/include/libunwind.h (original)
+++ libunwind/trunk/include/libunwind.h Tue Jul 19 12:15:50 2016
@@ -75,8 +75,8 @@ struct unw_proc_info_t {
   unw_word_t  gp;               /* not used */
   unw_word_t  flags;            /* not used */
   uint32_t    format;           /* compact unwind encoding, or zero if none */
-  uint32_t    unwind_info_size; /* size of dwarf unwind info, or zero if none */
-  unw_word_t  unwind_info;      /* address of dwarf unwind info, or zero */
+  uint32_t    unwind_info_size; /* size of DWARF unwind info, or zero if none */
+  unw_word_t  unwind_info;      /* address of DWARF unwind info, or zero */
   unw_word_t  extra;            /* mach_header of mach-o image containing func */
 };
 typedef struct unw_proc_info_t unw_proc_info_t;

Modified: libunwind/trunk/include/mach-o/compact_unwind_encoding.h
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/include/mach-o/compact_unwind_encoding.h?rev=275996&r1=275995&r2=275996&view=diff
==============================================================================
--- libunwind/trunk/include/mach-o/compact_unwind_encoding.h (original)
+++ libunwind/trunk/include/mach-o/compact_unwind_encoding.h Tue Jul 19 12:15:50 2016
@@ -6,7 +6,7 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //
-// Darwin's alternative to dwarf based unwind encodings.
+// Darwin's alternative to DWARF based unwind encodings.
 //
 //===----------------------------------------------------------------------===//
 
@@ -17,7 +17,7 @@
 #include <stdint.h>
 
 //
-// Compilers can emit standard Dwarf FDEs in the __TEXT,__eh_frame section
+// Compilers can emit standard DWARF FDEs in the __TEXT,__eh_frame section
 // of object files. Or compilers can emit compact unwind information in
 // the __LD,__compact_unwind section.
 //
@@ -26,10 +26,10 @@
 // runtime to access unwind info for any given function.  If the compiler
 // emitted compact unwind info for the function, that compact unwind info will
 // be encoded in the __TEXT,__unwind_info section. If the compiler emitted
-// dwarf unwind info, the __TEXT,__unwind_info section will contain the offset
+// DWARF unwind info, the __TEXT,__unwind_info section will contain the offset
 // of the FDE in the __TEXT,__eh_frame section in the final linked image.
 //
-// Note: Previously, the linker would transform some dwarf unwind infos into
+// Note: Previously, the linker would transform some DWARF unwind infos into
 //       compact unwind info.  But that is fragile and no longer done.
 
 
@@ -58,7 +58,7 @@ enum {
 // 1-bit: has lsda
 // 2-bit: personality index
 //
-// 4-bits: 0=old, 1=ebp based, 2=stack-imm, 3=stack-ind, 4=dwarf
+// 4-bits: 0=old, 1=ebp based, 2=stack-imm, 3=stack-ind, 4=DWARF
 //  ebp based:
 //        15-bits (5*3-bits per reg) register permutation
 //        8-bits for stack offset
@@ -128,9 +128,9 @@ enum {
 //    UNWIND_X86_FRAMELESS_STACK_SIZE.  
 // UNWIND_X86_MODE_DWARF:
 //    No compact unwind encoding is available.  Instead the low 24-bits of the
-//    compact encoding is the offset of the dwarf FDE in the __eh_frame section.
+//    compact encoding is the offset of the DWARF FDE in the __eh_frame section.
 //    This mode is never used in object files.  It is only generated by the 
-//    linker in final linked images which have only dwarf unwind info for a
+//    linker in final linked images which have only DWARF unwind info for a
 //    function.
 //
 // The permutation encoding is a Lehmer code sequence encoded into a
@@ -193,7 +193,7 @@ enum {
 // 1-bit: has lsda
 // 2-bit: personality index
 //
-// 4-bits: 0=old, 1=rbp based, 2=stack-imm, 3=stack-ind, 4=dwarf
+// 4-bits: 0=old, 1=rbp based, 2=stack-imm, 3=stack-ind, 4=DWARF
 //  rbp based:
 //        15-bits (5*3-bits per reg) register permutation
 //        8-bits for stack offset
@@ -262,9 +262,9 @@ enum {
 //    UNWIND_X86_64_FRAMELESS_STACK_SIZE.  
 // UNWIND_X86_64_MODE_DWARF:
 //    No compact unwind encoding is available.  Instead the low 24-bits of the
-//    compact encoding is the offset of the dwarf FDE in the __eh_frame section.
+//    compact encoding is the offset of the DWARF FDE in the __eh_frame section.
 //    This mode is never used in object files.  It is only generated by the 
-//    linker in final linked images which have only dwarf unwind info for a
+//    linker in final linked images which have only DWARF unwind info for a
 //    function.
 //
 
@@ -275,14 +275,14 @@ enum {
 // 1-bit: has lsda
 // 2-bit: personality index
 //
-// 4-bits: 4=frame-based, 3=dwarf, 2=frameless
+// 4-bits: 4=frame-based, 3=DWARF, 2=frameless
 //  frameless:
 //        12-bits of stack size
 //  frame-based:
 //        4-bits D reg pairs saved
 //        5-bits X reg pairs saved
-//  dwarf:
-//        24-bits offset of dwarf FDE in __eh_frame section
+//  DWARF:
+//        24-bits offset of DWARF FDE in __eh_frame section
 //
 enum {
     UNWIND_ARM64_MODE_MASK                     = 0x0F000000,
@@ -320,9 +320,9 @@ enum {
 //    UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK.
 // UNWIND_ARM64_MODE_DWARF:
 //    No compact unwind encoding is available.  Instead the low 24-bits of the
-//    compact encoding is the offset of the dwarf FDE in the __eh_frame section.
+//    compact encoding is the offset of the DWARF FDE in the __eh_frame section.
 //    This mode is never used in object files.  It is only generated by the 
-//    linker in final linked images which have only dwarf unwind info for a
+//    linker in final linked images which have only DWARF unwind info for a
 //    function.
 //
 
@@ -385,7 +385,7 @@ enum {
 // saved at that range of the function.
 //
 // If a particular function is so wacky that there is no compact unwind way
-// to encode it, then the compiler can emit traditional dwarf unwind info.  
+// to encode it, then the compiler can emit traditional DWARF unwind info.  
 // The runtime will use which ever is available.
 //
 // Runtime support for compact unwind encodings are only available on 10.6 

Modified: libunwind/trunk/include/unwind.h
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/include/unwind.h?rev=275996&r1=275995&r2=275996&view=diff
==============================================================================
--- libunwind/trunk/include/unwind.h (original)
+++ libunwind/trunk/include/unwind.h Tue Jul 19 12:15:50 2016
@@ -321,7 +321,7 @@ extern void __deregister_frame(const voi
 
 // _Unwind_Find_FDE() will locate the FDE if the pc is in some function that has
 // an associated FDE. Note, Mac OS X 10.6 and later, introduces "compact unwind
-// info" which the runtime uses in preference to dwarf unwind info.  This
+// info" which the runtime uses in preference to DWARF unwind info.  This
 // function will only work if the target function has an FDE but no compact
 // unwind info.
 struct dwarf_eh_bases {
@@ -334,7 +334,7 @@ extern const void *_Unwind_Find_FDE(cons
 
 // This function attempts to find the start (address of first instruction) of
 // a function given an address inside the function.  It only works if the
-// function has an FDE (dwarf unwind info).
+// function has an FDE (DWARF unwind info).
 // This function is unimplemented on Mac OS X 10.6 and later.  Instead, use
 // _Unwind_Find_FDE() and look at the dwarf_eh_bases.func result.
 extern void *_Unwind_FindEnclosingFunction(void *pc);

Modified: libunwind/trunk/src/AddressSpace.hpp
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/AddressSpace.hpp?rev=275996&r1=275995&r2=275996&view=diff
==============================================================================
--- libunwind/trunk/src/AddressSpace.hpp (original)
+++ libunwind/trunk/src/AddressSpace.hpp Tue Jul 19 12:15:50 2016
@@ -330,7 +330,7 @@ LocalAddressSpace::getEncodedP(pint_t &a
         return false;
       const mach_header *mh = (const mach_header *)dlinfo.dli_saddr;
       
-      // Find dwarf unwind section in that image.
+      // Find DWARF unwind section in that image.
       unsigned long size;
       const uint8_t *p = getsectiondata(mh, "__TEXT", "__eh_frame", &size);
       if (!p)

Modified: libunwind/trunk/src/DwarfInstructions.hpp
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/DwarfInstructions.hpp?rev=275996&r1=275995&r2=275996&view=diff
==============================================================================
--- libunwind/trunk/src/DwarfInstructions.hpp (original)
+++ libunwind/trunk/src/DwarfInstructions.hpp Tue Jul 19 12:15:50 2016
@@ -6,7 +6,7 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //
-//  Processor specific interpretation of dwarf unwind info.
+//  Processor specific interpretation of DWARF unwind info.
 //
 //===----------------------------------------------------------------------===//
 
@@ -27,7 +27,7 @@
 namespace libunwind {
 
 
-/// DwarfInstructions maps abtract dwarf unwind instructions to a particular
+/// DwarfInstructions maps abtract DWARF unwind instructions to a particular
 /// architecture
 template <typename A, typename R>
 class DwarfInstructions {
@@ -164,7 +164,7 @@ int DwarfInstructions<A, R>::stepWithDwa
       // get pointer to cfa (architecture specific)
       pint_t cfa = getCFA(addressSpace, prolog, registers);
 
-       // restore registers that dwarf says were saved
+       // restore registers that DWARF says were saved
       R newRegisters = registers;
       pint_t returnAddress = 0;
       const int lastReg = R::lastDwarfRegNum();
@@ -744,7 +744,7 @@ DwarfInstructions<A, R>::evaluateExpress
     case DW_OP_call4:
     case DW_OP_call_ref:
     default:
-      _LIBUNWIND_ABORT("dwarf opcode not implemented");
+      _LIBUNWIND_ABORT("DWARF opcode not implemented");
     }
 
   }

Modified: libunwind/trunk/src/DwarfParser.hpp
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/DwarfParser.hpp?rev=275996&r1=275995&r2=275996&view=diff
==============================================================================
--- libunwind/trunk/src/DwarfParser.hpp (original)
+++ libunwind/trunk/src/DwarfParser.hpp Tue Jul 19 12:15:50 2016
@@ -26,7 +26,7 @@
 namespace libunwind {
 
 /// CFI_Parser does basic parsing of a CFI (Call Frame Information) records.
-/// See Dwarf Spec for details:
+/// See DWARF Spec for details:
 ///    http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
 ///
 template <typename A>
@@ -77,7 +77,7 @@ public:
     int64_t value;
   };
   /// Information about a frame layout and registers saved determined
-  /// by "running" the dwarf FDE "instructions"
+  /// by "running" the DWARF FDE "instructions"
   struct PrologInfo {
     uint32_t          cfaRegister;
     int32_t           cfaRegisterOffset;  // CFA = (cfaRegister)+cfaRegisterOffset
@@ -338,7 +338,7 @@ const char *CFI_Parser<A>::parseCIE(A &a
 }
 
 
-/// "run" the dwarf instructions and create the abstact PrologInfo for an FDE
+/// "run" the DWARF instructions and create the abstact PrologInfo for an FDE
 template <typename A>
 bool CFI_Parser<A>::parseFDEInstructions(A &addressSpace,
                                          const FDE_Info &fdeInfo,
@@ -357,7 +357,7 @@ bool CFI_Parser<A>::parseFDEInstructions
                            upToPC - fdeInfo.pcStart, rememberStack, results);
 }
 
-/// "run" the dwarf instructions
+/// "run" the DWARF instructions
 template <typename A>
 bool CFI_Parser<A>::parseInstructions(A &addressSpace, pint_t instructions,
                                       pint_t instructionsEnd,
@@ -372,7 +372,7 @@ bool CFI_Parser<A>::parseInstructions(A
     fprintf(stderr, "parseInstructions(instructions=0x%0" PRIx64 ")\n",
             (uint64_t)instructionsEnd);
 
-  // see Dwarf Spec, section 6.4.2 for details on unwind opcodes
+  // see DWARF Spec, section 6.4.2 for details on unwind opcodes
   while ((p < instructionsEnd) && (codeOffset < pcoffset)) {
     uint64_t reg;
     uint64_t reg2;
@@ -422,7 +422,7 @@ bool CFI_Parser<A>::parseInstructions(A
                                                   * cieInfo.dataAlignFactor;
       if (reg > kMaxRegisterNumber) {
         fprintf(stderr,
-                "malformed DW_CFA_offset_extended dwarf unwind, reg too big\n");
+                "malformed DW_CFA_offset_extended DWARF unwind, reg too big\n");
         return false;
       }
       results->savedRegisters[reg].location = kRegisterInCFA;
@@ -438,7 +438,7 @@ bool CFI_Parser<A>::parseInstructions(A
       if (reg > kMaxRegisterNumber) {
         fprintf(
             stderr,
-            "malformed DW_CFA_restore_extended dwarf unwind, reg too big\n");
+            "malformed DW_CFA_restore_extended DWARF unwind, reg too big\n");
         return false;
       }
       results->savedRegisters[reg] = initialState.savedRegisters[reg];
@@ -449,7 +449,7 @@ bool CFI_Parser<A>::parseInstructions(A
       reg = addressSpace.getULEB128(p, instructionsEnd);
       if (reg > kMaxRegisterNumber) {
         fprintf(stderr,
-                "malformed DW_CFA_undefined dwarf unwind, reg too big\n");
+                "malformed DW_CFA_undefined DWARF unwind, reg too big\n");
         return false;
       }
       results->savedRegisters[reg].location = kRegisterUnused;
@@ -460,7 +460,7 @@ bool CFI_Parser<A>::parseInstructions(A
       reg = addressSpace.getULEB128(p, instructionsEnd);
       if (reg > kMaxRegisterNumber) {
         fprintf(stderr,
-                "malformed DW_CFA_same_value dwarf unwind, reg too big\n");
+                "malformed DW_CFA_same_value DWARF unwind, reg too big\n");
         return false;
       }
       // <rdar://problem/8456377> DW_CFA_same_value unsupported
@@ -478,12 +478,12 @@ bool CFI_Parser<A>::parseInstructions(A
       reg2 = addressSpace.getULEB128(p, instructionsEnd);
       if (reg > kMaxRegisterNumber) {
         fprintf(stderr,
-                "malformed DW_CFA_register dwarf unwind, reg too big\n");
+                "malformed DW_CFA_register DWARF unwind, reg too big\n");
         return false;
       }
       if (reg2 > kMaxRegisterNumber) {
         fprintf(stderr,
-                "malformed DW_CFA_register dwarf unwind, reg2 too big\n");
+                "malformed DW_CFA_register DWARF unwind, reg2 too big\n");
         return false;
       }
       results->savedRegisters[reg].location = kRegisterInRegister;
@@ -525,7 +525,7 @@ bool CFI_Parser<A>::parseInstructions(A
       reg = addressSpace.getULEB128(p, instructionsEnd);
       offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd);
       if (reg > kMaxRegisterNumber) {
-        fprintf(stderr, "malformed DW_CFA_def_cfa dwarf unwind, reg too big\n");
+        fprintf(stderr, "malformed DW_CFA_def_cfa DWARF unwind, reg too big\n");
         return false;
       }
       results->cfaRegister = (uint32_t)reg;
@@ -539,7 +539,7 @@ bool CFI_Parser<A>::parseInstructions(A
       if (reg > kMaxRegisterNumber) {
         fprintf(
             stderr,
-            "malformed DW_CFA_def_cfa_register dwarf unwind, reg too big\n");
+            "malformed DW_CFA_def_cfa_register DWARF unwind, reg too big\n");
         return false;
       }
       results->cfaRegister = (uint32_t)reg;
@@ -568,7 +568,7 @@ bool CFI_Parser<A>::parseInstructions(A
       reg = addressSpace.getULEB128(p, instructionsEnd);
       if (reg > kMaxRegisterNumber) {
         fprintf(stderr,
-                "malformed DW_CFA_expression dwarf unwind, reg too big\n");
+                "malformed DW_CFA_expression DWARF unwind, reg too big\n");
         return false;
       }
       results->savedRegisters[reg].location = kRegisterAtExpression;
@@ -585,7 +585,7 @@ bool CFI_Parser<A>::parseInstructions(A
       if (reg > kMaxRegisterNumber) {
         fprintf(
             stderr,
-            "malformed DW_CFA_offset_extended_sf dwarf unwind, reg too big\n");
+            "malformed DW_CFA_offset_extended_sf DWARF unwind, reg too big\n");
         return false;
       }
       offset =
@@ -603,7 +603,7 @@ bool CFI_Parser<A>::parseInstructions(A
           addressSpace.getSLEB128(p, instructionsEnd) * cieInfo.dataAlignFactor;
       if (reg > kMaxRegisterNumber) {
         fprintf(stderr,
-                "malformed DW_CFA_def_cfa_sf dwarf unwind, reg too big\n");
+                "malformed DW_CFA_def_cfa_sf DWARF unwind, reg too big\n");
         return false;
       }
       results->cfaRegister = (uint32_t)reg;
@@ -636,7 +636,7 @@ bool CFI_Parser<A>::parseInstructions(A
       reg = addressSpace.getULEB128(p, instructionsEnd);
       if (reg > kMaxRegisterNumber) {
         fprintf(stderr,
-                "malformed DW_CFA_val_offset_sf dwarf unwind, reg too big\n");
+                "malformed DW_CFA_val_offset_sf DWARF unwind, reg too big\n");
         return false;
       }
       offset =
@@ -652,7 +652,7 @@ bool CFI_Parser<A>::parseInstructions(A
       reg = addressSpace.getULEB128(p, instructionsEnd);
       if (reg > kMaxRegisterNumber) {
         fprintf(stderr,
-                "malformed DW_CFA_val_expression dwarf unwind, reg too big\n");
+                "malformed DW_CFA_val_expression DWARF unwind, reg too big\n");
         return false;
       }
       results->savedRegisters[reg].location = kRegisterIsExpression;
@@ -673,7 +673,7 @@ bool CFI_Parser<A>::parseInstructions(A
     case DW_CFA_GNU_negative_offset_extended:
       reg = addressSpace.getULEB128(p, instructionsEnd);
       if (reg > kMaxRegisterNumber) {
-        fprintf(stderr, "malformed DW_CFA_GNU_negative_offset_extended dwarf "
+        fprintf(stderr, "malformed DW_CFA_GNU_negative_offset_extended DWARF "
                         "unwind, reg too big\n");
         return false;
       }

Modified: libunwind/trunk/src/UnwindLevel1-gcc-ext.c
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/UnwindLevel1-gcc-ext.c?rev=275996&r1=275995&r2=275996&view=diff
==============================================================================
--- libunwind/trunk/src/UnwindLevel1-gcc-ext.c (original)
+++ libunwind/trunk/src/UnwindLevel1-gcc-ext.c Tue Jul 19 12:15:50 2016
@@ -180,7 +180,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callb
 }
 
 
-/// Find dwarf unwind info for an address 'pc' in some function.
+/// Find DWARF unwind info for an address 'pc' in some function.
 _LIBUNWIND_EXPORT const void *_Unwind_Find_FDE(const void *pc,
                                                struct dwarf_eh_bases *bases) {
   // This is slow, but works.

Modified: libunwind/trunk/src/libunwind.cpp
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/libunwind.cpp?rev=275996&r1=275995&r2=275996&view=diff
==============================================================================
--- libunwind/trunk/src/libunwind.cpp (original)
+++ libunwind/trunk/src/libunwind.cpp Tue Jul 19 12:15:50 2016
@@ -306,7 +306,7 @@ _LIBUNWIND_EXPORT void unw_save_vfp_as_X
 
 
 #if _LIBUNWIND_SUPPORT_DWARF_UNWIND
-/// SPI: walks cached dwarf entries
+/// SPI: walks cached DWARF entries
 _LIBUNWIND_EXPORT void unw_iterate_dwarf_unwind_cache(void (*func)(
     unw_word_t ip_start, unw_word_t ip_end, unw_word_t fde, unw_word_t mh)) {
   _LIBUNWIND_TRACE_API("unw_iterate_dwarf_unwind_cache(func=%p)\n",




More information about the cfe-commits mailing list