[Lldb-commits] [lldb] r145216 - in /lldb/trunk/source: Core/Stream.cpp Plugins/SymbolFile/DWARF/DWARFLocationList.cpp

Greg Clayton gclayton at apple.com
Sun Nov 27 16:51:27 PST 2011


Author: gclayton
Date: Sun Nov 27 18:51:27 2011
New Revision: 145216

URL: http://llvm.org/viewvc/llvm-project?rev=145216&view=rev
Log:
Fixed an issue in the DWARFLocationList::Dump() function where default 
arguments were quietly masked as the code changed (modified version of a path
from Dawn).


Modified:
    lldb/trunk/source/Core/Stream.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp

Modified: lldb/trunk/source/Core/Stream.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Stream.cpp?rev=145216&r1=145215&r2=145216&view=diff
==============================================================================
--- lldb/trunk/source/Core/Stream.cpp (original)
+++ lldb/trunk/source/Core/Stream.cpp Sun Nov 27 18:51:27 2011
@@ -168,10 +168,12 @@
 void
 Stream::AddressRange(uint64_t lo_addr, uint64_t hi_addr, int addr_size, const char *prefix, const char *suffix)
 {
-    if (prefix != NULL)
+    if (prefix && prefix[0])
         PutCString (prefix);
     Address (lo_addr, addr_size, "[");
     Address (hi_addr, addr_size, "-", ")");
+    if (suffix && suffix[0])
+        PutCString (suffix);
 }
 
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp?rev=145216&r1=145215&r2=145216&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp Sun Nov 27 18:51:27 2011
@@ -34,7 +34,11 @@
 
         s.PutCString("\n            ");
         s.Indent();
-        s.AddressRange(start_addr + base_addr, end_addr + base_addr, NULL, ": ");
+        s.AddressRange (start_addr + base_addr, 
+                        end_addr + base_addr, 
+                        cu->GetAddressByteSize(), 
+                        NULL,
+                        ": ");
         uint32_t loc_length = debug_loc_data.GetU16(&offset);
 
         DataExtractor locationData(debug_loc_data, offset, loc_length);





More information about the lldb-commits mailing list