[llvm-commits] [llvm] r143812 - in /llvm/trunk/lib/DebugInfo: DWARFDebugInfoEntry.cpp DWARFDebugInfoEntry.h

Joe Abbey jabbey at arxan.com
Sat Nov 5 08:52:46 PDT 2011


pr11300.ll still fails on PPC with this patch.

Please apply 

Index: lib/DebugInfo/DWARFDebugInfoEntry.cpp
===================================================================
--- lib/DebugInfo/DWARFDebugInfoEntry.cpp	(revision 143812)
+++ lib/DebugInfo/DWARFDebugInfoEntry.cpp	(working copy)
@@ -26,9 +26,9 @@
   uint32_t offset = Offset;
 
   if (debug_info_data.isValidOffset(offset)) {
+    OS << format("\n0x%8.8x: ", offset);
     uint32_t abbrCode = debug_info_data.getULEB128(&offset);
-
-    OS << format("\n0x%8.8x: ", Offset);
+    
     if (abbrCode) {
       if (AbbrevDecl) {
         const char *tagString = TagString(getTag());

Cheers,

Joe Abbey
Software Architect
Arxan Technologies, Inc.
1305 Cumberland Ave, Ste 215
West Lafayette, IN 47906
jabbey at arxan.com
www.arxan.com


On Nov 5, 2011, at 11:35 AM, Benjamin Kramer wrote:

> Author: d0k
> Date: Sat Nov  5 10:35:00 2011
> New Revision: 143812
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=143812&view=rev
> Log:
> Reduce the offsets in DwarfDebugInfoEntry to 32 bit, they're printed with %x and
> that breaks on big-endian machines.
> 
> I have to clean up the 32/64 bit confusion in libDebugInfo some day.
> 
> Modified:
>    llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp
>    llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h
> 
> Modified: llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp?rev=143812&r1=143811&r2=143812&view=diff
> ==============================================================================
> --- llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp (original)
> +++ llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp Sat Nov  5 10:35:00 2011
> @@ -26,7 +26,7 @@
>   uint32_t offset = Offset;
> 
>   if (debug_info_data.isValidOffset(offset)) {
> -    uint64_t abbrCode = debug_info_data.getULEB128(&offset);
> +    uint32_t abbrCode = debug_info_data.getULEB128(&offset);
> 
>     OS << format("\n0x%8.8x: ", Offset);
>     if (abbrCode) {
> 
> Modified: llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h?rev=143812&r1=143811&r2=143812&view=diff
> ==============================================================================
> --- llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h (original)
> +++ llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h Sat Nov  5 10:35:00 2011
> @@ -23,7 +23,7 @@
> /// DWARFDebugInfoEntryMinimal - A DIE with only the minimum required data.
> class DWARFDebugInfoEntryMinimal {
>   /// Offset within the .debug_info of the start of this entry.
> -  uint64_t Offset;
> +  uint32_t Offset;
> 
>   /// How many to subtract from "this" to get the parent.
>   /// If zero this die has no parent.
> @@ -52,7 +52,7 @@
> 
>   uint32_t getTag() const { return AbbrevDecl ? AbbrevDecl->getTag() : 0; }
>   bool isNULL() const { return AbbrevDecl == 0; }
> -  uint64_t getOffset() const { return Offset; }
> +  uint32_t getOffset() const { return Offset; }
>   uint32_t getNumAttributes() const {
>     return !isNULL() ? AbbrevDecl->getNumAttributes() : 0;
>   }
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111105/ef8b9c76/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111105/ef8b9c76/attachment.bin>


More information about the llvm-commits mailing list