[Lldb-commits] [lldb] r291895 - Remove a couple of Stream flags

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 13 02:42:00 PST 2017


Author: labath
Date: Fri Jan 13 04:41:59 2017
New Revision: 291895

URL: http://llvm.org/viewvc/llvm-project?rev=291895&view=rev
Log:
Remove a couple of Stream flags

Summary:
I came across this while trying to understand what Log::Debug does. It turns out
it does not do anything, as there is no instance of someone setting a debug flag
on a stream. The same is true for the Verbose and AddPrefix flags. Removing
these will enable some cleanups in the Logging class, and it brings us closer
towards the long term goal of standardizing on llvm stream classes.

I have removed these flags and all code the code which tested for their
presence -- there wasn't much of it, mostly in SymbolFileDWARF, which is
probably going away at some point anyway.

The eBinary flag still has some users, so I am letting it life for the time
being.

Reviewers: clayborg, zturner

Subscribers: aprantl, beanz, lldb-commits

Differential Revision: https://reviews.llvm.org/D28616

Modified:
    lldb/trunk/include/lldb/Core/Stream.h
    lldb/trunk/source/Core/Log.cpp
    lldb/trunk/source/Core/SearchFilter.cpp
    lldb/trunk/source/Core/Stream.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
    lldb/trunk/source/Symbol/Declaration.cpp

Modified: lldb/trunk/include/lldb/Core/Stream.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Stream.h?rev=291895&r1=291894&r2=291895&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Stream.h (original)
+++ lldb/trunk/include/lldb/Core/Stream.h Fri Jan 13 04:41:59 2017
@@ -33,11 +33,7 @@ public:
   /// \a m_flags bit values.
   //------------------------------------------------------------------
   enum {
-    eVerbose = (1 << 0),   ///< If set, verbose logging is enabled
-    eDebug = (1 << 1),     ///< If set, debug logging is enabled
-    eAddPrefix = (1 << 2), ///< Add number prefixes for binary, octal and hex
-                           ///when eBinary is clear
-    eBinary = (1 << 3) ///< Get and put data as binary instead of as the default
+    eBinary = (1 << 0) ///< Get and put data as binary instead of as the default
                        ///string mode.
   };
 
@@ -385,15 +381,6 @@ public:
   uint32_t GetAddressByteSize() const;
 
   //------------------------------------------------------------------
-  /// Test if debug logging is enabled.
-  ///
-  /// @return
-  //      \b true if the debug flag bit is set in this stream, \b
-  //      false otherwise.
-  //------------------------------------------------------------------
-  bool GetDebug() const;
-
-  //------------------------------------------------------------------
   /// The flags accessor.
   ///
   /// @return
@@ -426,15 +413,6 @@ public:
   int GetIndentLevel() const;
 
   //------------------------------------------------------------------
-  /// Test if verbose logging is enabled.
-  ///
-  /// @return
-  //      \b true if the verbose flag bit is set in this stream, \b
-  //      false otherwise.
-  //------------------------------------------------------------------
-  bool GetVerbose() const;
-
-  //------------------------------------------------------------------
   /// Indent the current line in the stream.
   ///
   /// Indent the current line using the current indentation level and

Modified: lldb/trunk/source/Core/Log.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Log.cpp?rev=291895&r1=291894&r2=291895&view=diff
==============================================================================
--- lldb/trunk/source/Core/Log.cpp (original)
+++ lldb/trunk/source/Core/Log.cpp Fri Jan 13 04:41:59 2017
@@ -343,28 +343,13 @@ void Log::ListAllLogChannels(Stream *str
   }
 }
 
-bool Log::GetVerbose() const {
-  // FIXME: This has to be centralized between the stream and the log...
-  if (m_options.Test(LLDB_LOG_OPTION_VERBOSE))
-    return true;
-
-  // Make a copy of our stream shared pointer in case someone disables our
-  // log while we are logging and releases the stream
-  StreamSP stream_sp(m_stream_sp);
-  if (stream_sp)
-    return stream_sp->GetVerbose();
-  return false;
-}
+bool Log::GetVerbose() const { return m_options.Test(LLDB_LOG_OPTION_VERBOSE); }
 
 //------------------------------------------------------------------
 // Returns true if the debug flag bit is set in this stream.
 //------------------------------------------------------------------
 bool Log::GetDebug() const {
-  // Make a copy of our stream shared pointer in case someone disables our
-  // log while we are logging and releases the stream
-  StreamSP stream_sp(m_stream_sp);
-  if (stream_sp)
-    return stream_sp->GetDebug();
+  // TODO: remove and clean up callers
   return false;
 }
 

Modified: lldb/trunk/source/Core/SearchFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=291895&r1=291894&r2=291895&view=diff
==============================================================================
--- lldb/trunk/source/Core/SearchFilter.cpp (original)
+++ lldb/trunk/source/Core/SearchFilter.cpp Fri Jan 13 04:41:59 2017
@@ -433,13 +433,7 @@ void SearchFilterByModule::Search(Search
 
 void SearchFilterByModule::GetDescription(Stream *s) {
   s->PutCString(", module = ");
-  if (s->GetVerbose()) {
-    char buffer[2048];
-    m_module_spec.GetPath(buffer, 2047);
-    s->PutCString(buffer);
-  } else {
-    s->PutCString(m_module_spec.GetFilename().AsCString("<Unknown>"));
-  }
+  s->PutCString(m_module_spec.GetFilename().AsCString("<Unknown>"));
 }
 
 uint32_t SearchFilterByModule::GetFilterRequiredItems() {
@@ -591,27 +585,15 @@ void SearchFilterByModuleList::GetDescri
   size_t num_modules = m_module_spec_list.GetSize();
   if (num_modules == 1) {
     s->Printf(", module = ");
-    if (s->GetVerbose()) {
-      char buffer[2048];
-      m_module_spec_list.GetFileSpecAtIndex(0).GetPath(buffer, 2047);
-      s->PutCString(buffer);
-    } else {
-      s->PutCString(
-          m_module_spec_list.GetFileSpecAtIndex(0).GetFilename().AsCString(
-              "<Unknown>"));
-    }
+    s->PutCString(
+        m_module_spec_list.GetFileSpecAtIndex(0).GetFilename().AsCString(
+            "<Unknown>"));
   } else {
     s->Printf(", modules(%" PRIu64 ") = ", (uint64_t)num_modules);
     for (size_t i = 0; i < num_modules; i++) {
-      if (s->GetVerbose()) {
-        char buffer[2048];
-        m_module_spec_list.GetFileSpecAtIndex(i).GetPath(buffer, 2047);
-        s->PutCString(buffer);
-      } else {
-        s->PutCString(
-            m_module_spec_list.GetFileSpecAtIndex(i).GetFilename().AsCString(
-                "<Unknown>"));
-      }
+      s->PutCString(
+          m_module_spec_list.GetFileSpecAtIndex(i).GetFilename().AsCString(
+              "<Unknown>"));
       if (i != num_modules - 1)
         s->PutCString(", ");
     }
@@ -827,27 +809,15 @@ void SearchFilterByModuleListAndCU::GetD
   size_t num_modules = m_module_spec_list.GetSize();
   if (num_modules == 1) {
     s->Printf(", module = ");
-    if (s->GetVerbose()) {
-      char buffer[2048];
-      m_module_spec_list.GetFileSpecAtIndex(0).GetPath(buffer, 2047);
-      s->PutCString(buffer);
-    } else {
-      s->PutCString(
-          m_module_spec_list.GetFileSpecAtIndex(0).GetFilename().AsCString(
-              "<Unknown>"));
-    }
+    s->PutCString(
+        m_module_spec_list.GetFileSpecAtIndex(0).GetFilename().AsCString(
+            "<Unknown>"));
   } else if (num_modules > 0) {
     s->Printf(", modules(%" PRIu64 ") = ", static_cast<uint64_t>(num_modules));
     for (size_t i = 0; i < num_modules; i++) {
-      if (s->GetVerbose()) {
-        char buffer[2048];
-        m_module_spec_list.GetFileSpecAtIndex(i).GetPath(buffer, 2047);
-        s->PutCString(buffer);
-      } else {
-        s->PutCString(
-            m_module_spec_list.GetFileSpecAtIndex(i).GetFilename().AsCString(
-                "<Unknown>"));
-      }
+      s->PutCString(
+          m_module_spec_list.GetFileSpecAtIndex(i).GetFilename().AsCString(
+              "<Unknown>"));
       if (i != num_modules - 1)
         s->PutCString(", ");
     }

Modified: lldb/trunk/source/Core/Stream.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Stream.cpp?rev=291895&r1=291894&r2=291895&view=diff
==============================================================================
--- lldb/trunk/source/Core/Stream.cpp (original)
+++ lldb/trunk/source/Core/Stream.cpp Fri Jan 13 04:41:59 2017
@@ -340,16 +340,6 @@ uint32_t Stream::GetAddressByteSize() co
 void Stream::SetAddressByteSize(uint32_t addr_size) { m_addr_size = addr_size; }
 
 //------------------------------------------------------------------
-// Returns true if the verbose flag bit is set in this stream.
-//------------------------------------------------------------------
-bool Stream::GetVerbose() const { return m_flags.Test(eVerbose); }
-
-//------------------------------------------------------------------
-// Returns true if the debug flag bit is set in this stream.
-//------------------------------------------------------------------
-bool Stream::GetDebug() const { return m_flags.Test(eDebug); }
-
-//------------------------------------------------------------------
 // The flags get accessor
 //------------------------------------------------------------------
 Flags &Stream::GetFlags() { return m_flags; }
@@ -400,7 +390,7 @@ size_t Stream::PrintfAsRawHex8(const cha
 size_t Stream::PutNHex8(size_t n, uint8_t uvalue) {
   size_t bytes_written = 0;
   for (size_t i = 0; i < n; ++i)
-    bytes_written += _PutHex8(uvalue, m_flags.Test(eAddPrefix));
+    bytes_written += _PutHex8(uvalue, false);
   return bytes_written;
 }
 
@@ -423,23 +413,19 @@ size_t Stream::_PutHex8(uint8_t uvalue,
   return bytes_written;
 }
 
-size_t Stream::PutHex8(uint8_t uvalue) {
-  return _PutHex8(uvalue, m_flags.Test(eAddPrefix));
-}
+size_t Stream::PutHex8(uint8_t uvalue) { return _PutHex8(uvalue, false); }
 
 size_t Stream::PutHex16(uint16_t uvalue, ByteOrder byte_order) {
   if (byte_order == eByteOrderInvalid)
     byte_order = m_byte_order;
 
-  bool add_prefix = m_flags.Test(eAddPrefix);
   size_t bytes_written = 0;
   if (byte_order == eByteOrderLittle) {
-    for (size_t byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
-      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), add_prefix);
+    for (size_t byte = 0; byte < sizeof(uvalue); ++byte)
+      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), false);
   } else {
-    for (size_t byte = sizeof(uvalue) - 1; byte < sizeof(uvalue);
-         --byte, add_prefix = false)
-      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), add_prefix);
+    for (size_t byte = sizeof(uvalue) - 1; byte < sizeof(uvalue); --byte)
+      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), false);
   }
   return bytes_written;
 }
@@ -448,15 +434,13 @@ size_t Stream::PutHex32(uint32_t uvalue,
   if (byte_order == eByteOrderInvalid)
     byte_order = m_byte_order;
 
-  bool add_prefix = m_flags.Test(eAddPrefix);
   size_t bytes_written = 0;
   if (byte_order == eByteOrderLittle) {
-    for (size_t byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
-      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), add_prefix);
+    for (size_t byte = 0; byte < sizeof(uvalue); ++byte)
+      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), false);
   } else {
-    for (size_t byte = sizeof(uvalue) - 1; byte < sizeof(uvalue);
-         --byte, add_prefix = false)
-      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), add_prefix);
+    for (size_t byte = sizeof(uvalue) - 1; byte < sizeof(uvalue); --byte)
+      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), false);
   }
   return bytes_written;
 }
@@ -465,15 +449,13 @@ size_t Stream::PutHex64(uint64_t uvalue,
   if (byte_order == eByteOrderInvalid)
     byte_order = m_byte_order;
 
-  bool add_prefix = m_flags.Test(eAddPrefix);
   size_t bytes_written = 0;
   if (byte_order == eByteOrderLittle) {
-    for (size_t byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
-      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), add_prefix);
+    for (size_t byte = 0; byte < sizeof(uvalue); ++byte)
+      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), false);
   } else {
-    for (size_t byte = sizeof(uvalue) - 1; byte < sizeof(uvalue);
-         --byte, add_prefix = false)
-      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), add_prefix);
+    for (size_t byte = sizeof(uvalue) - 1; byte < sizeof(uvalue); --byte)
+      bytes_written += _PutHex8((uint8_t)(uvalue >> (byte * 8)), false);
   }
   return bytes_written;
 }

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=291895&r1=291894&r2=291895&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Fri Jan 13 04:41:59 2017
@@ -324,11 +324,8 @@ bool DWARFCompileUnit::Verify(Stream *s)
   bool abbr_offset_OK =
       m_dwarf2Data->get_debug_abbrev_data().ValidOffset(GetAbbrevOffset());
   bool addr_size_OK = ((m_addr_size == 4) || (m_addr_size == 8));
-  bool verbose = s->GetVerbose();
   if (valid_offset && length_OK && version_OK && addr_size_OK &&
       abbr_offset_OK) {
-    if (verbose)
-      s->Printf("    0x%8.8x: OK\n", m_offset);
     return true;
   } else {
     s->Printf("    0x%8.8x: ", m_offset);

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp?rev=291895&r1=291894&r2=291895&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp Fri Jan 13 04:41:59 2017
@@ -430,10 +430,6 @@ static dw_offset_t DumpCallback(SymbolFi
       } else {
         // See if the DIE is in this compile unit?
         if (cu && dumpInfo->die_offset < cu->GetNextCompileUnitOffset()) {
-          // This DIE is in this compile unit!
-          if (s->GetVerbose())
-            cu->Dump(s); // Dump the compile unit for the DIE in verbose mode
-
           return next_offset;
           //  // We found our compile unit that contains our DIE, just skip to
           //  dumping the requested DIE...

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp?rev=291895&r1=291894&r2=291895&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp Fri Jan 13 04:41:59 2017
@@ -666,13 +666,9 @@ void DWARFDebugInfoEntry::DumpAttribute(
     SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
     const DWARFDataExtractor &debug_info_data, lldb::offset_t *offset_ptr,
     Stream &s, dw_attr_t attr, dw_form_t form) {
-  bool verbose = s.GetVerbose();
   bool show_form = s.GetFlags().Test(DWARFDebugInfo::eDumpFlag_ShowForm);
 
-  if (verbose)
-    s.Offset(*offset_ptr);
-  else
-    s.Printf("            ");
+  s.Printf("            ");
   s.Indent(DW_AT_value_to_name(attr));
 
   if (show_form) {
@@ -694,35 +690,18 @@ void DWARFDebugInfoEntry::DumpAttribute(
 
   s.PutCString("( ");
 
-  // Always dump form value if verbose is enabled
-  if (verbose) {
-    form_value.Dump(s);
-  }
-
   // Check to see if we have any special attribute formatters
   switch (attr) {
   case DW_AT_stmt_list:
-    if (verbose)
-      s.PutCString(" ( ");
     s.Printf("0x%8.8" PRIx64, form_value.Unsigned());
-    if (verbose)
-      s.PutCString(" )");
     break;
 
   case DW_AT_language:
-    if (verbose)
-      s.PutCString(" ( ");
     s.PutCString(DW_LANG_value_to_name(form_value.Unsigned()));
-    if (verbose)
-      s.PutCString(" )");
     break;
 
   case DW_AT_encoding:
-    if (verbose)
-      s.PutCString(" ( ");
     s.PutCString(DW_ATE_value_to_name(form_value.Unsigned()));
-    if (verbose)
-      s.PutCString(" )");
     break;
 
   case DW_AT_frame_base:
@@ -730,32 +709,20 @@ void DWARFDebugInfoEntry::DumpAttribute(
   case DW_AT_data_member_location: {
     const uint8_t *blockData = form_value.BlockData();
     if (blockData) {
-      if (!verbose)
-        form_value.Dump(s);
-
       // Location description is inlined in data in the form value
       DWARFDataExtractor locationData(debug_info_data,
                                       (*offset_ptr) - form_value.Unsigned(),
                                       form_value.Unsigned());
-      if (verbose)
-        s.PutCString(" ( ");
       DWARFExpression::PrintDWARFExpression(
           s, locationData, DWARFCompileUnit::GetAddressByteSize(cu), 4, false);
-      if (verbose)
-        s.PutCString(" )");
     } else {
       // We have a location list offset as the value that is
       // the offset into the .debug_loc section that describes
       // the value over it's lifetime
       uint64_t debug_loc_offset = form_value.Unsigned();
       if (dwarf2Data) {
-        if (!verbose)
-          form_value.Dump(s);
         DWARFExpression::PrintDWARFLocationList(
             s, cu, dwarf2Data->get_debug_loc_data(), debug_loc_offset);
-      } else {
-        if (!verbose)
-          form_value.Dump(s);
       }
     }
   } break;
@@ -765,25 +732,17 @@ void DWARFDebugInfoEntry::DumpAttribute(
     uint64_t abstract_die_offset = form_value.Reference();
     form_value.Dump(s);
     //  *ostrm_ptr << HEX32 << abstract_die_offset << " ( ";
-    if (verbose)
-      s.PutCString(" ( ");
     GetName(dwarf2Data, cu, abstract_die_offset, s);
-    if (verbose)
-      s.PutCString(" )");
   } break;
 
   case DW_AT_type: {
     uint64_t type_die_offset = form_value.Reference();
-    if (!verbose)
-      form_value.Dump(s);
     s.PutCString(" ( ");
     AppendTypeName(dwarf2Data, cu, type_die_offset, s);
     s.PutCString(" )");
   } break;
 
   case DW_AT_ranges: {
-    if (!verbose)
-      form_value.Dump(s);
     lldb::offset_t ranges_offset = form_value.Unsigned();
     dw_addr_t base_addr = cu ? cu->GetBaseAddress() : 0;
     if (dwarf2Data)
@@ -792,8 +751,6 @@ void DWARFDebugInfoEntry::DumpAttribute(
   } break;
 
   default:
-    if (!verbose)
-      form_value.Dump(s);
     break;
   }
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp?rev=291895&r1=291894&r2=291895&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp Fri Jan 13 04:41:59 2017
@@ -82,7 +82,6 @@ void DWARFDebugRanges::Dump(Stream &s,
                             lldb::offset_t *offset_ptr,
                             dw_addr_t cu_base_addr) {
   uint32_t addr_size = s.GetAddressByteSize();
-  bool verbose = s.GetVerbose();
 
   dw_addr_t base_addr = cu_base_addr;
   while (
@@ -95,10 +94,6 @@ void DWARFDebugRanges::Dump(Stream &s,
       begin = LLDB_INVALID_ADDRESS;
 
     s.Indent();
-    if (verbose) {
-      s.AddressRange(begin, end, sizeof(dw_addr_t), " offsets = ");
-    }
-
     if (begin == 0 && end == 0) {
       s.PutCString(" End");
       break;
@@ -111,8 +106,7 @@ void DWARFDebugRanges::Dump(Stream &s,
       dw_addr_t begin_addr = begin + base_addr;
       dw_addr_t end_addr = end + base_addr;
 
-      s.AddressRange(begin_addr, end_addr, sizeof(dw_addr_t),
-                     verbose ? " ==> addrs = " : NULL);
+      s.AddressRange(begin_addr, end_addr, sizeof(dw_addr_t), NULL);
     }
   }
 }

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp?rev=291895&r1=291894&r2=291895&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp Fri Jan 13 04:41:59 2017
@@ -406,8 +406,6 @@ void DWARFFormValue::Dump(Stream &s) con
   uint64_t uvalue = Unsigned();
   bool cu_relative_offset = false;
 
-  bool verbose = s.GetVerbose();
-
   switch (m_form) {
   case DW_FORM_addr:
     s.Address(uvalue, sizeof(uint64_t));
@@ -476,8 +474,6 @@ void DWARFFormValue::Dump(Stream &s) con
   case DW_FORM_strp: {
     const char *dbg_str = AsCString();
     if (dbg_str) {
-      if (verbose)
-        s.Printf(" .debug_str[0x%8.8x] = ", (uint32_t)uvalue);
       s.QuotedCString(dbg_str);
     } else {
       s.PutHex32(uvalue);
@@ -496,28 +492,18 @@ void DWARFFormValue::Dump(Stream &s) con
   }
   case DW_FORM_ref1:
     cu_relative_offset = true;
-    if (verbose)
-      s.Printf("cu + 0x%2.2x", (uint8_t)uvalue);
     break;
   case DW_FORM_ref2:
     cu_relative_offset = true;
-    if (verbose)
-      s.Printf("cu + 0x%4.4x", (uint16_t)uvalue);
     break;
   case DW_FORM_ref4:
     cu_relative_offset = true;
-    if (verbose)
-      s.Printf("cu + 0x%4.4x", (uint32_t)uvalue);
     break;
   case DW_FORM_ref8:
     cu_relative_offset = true;
-    if (verbose)
-      s.Printf("cu + 0x%8.8" PRIx64, uvalue);
     break;
   case DW_FORM_ref_udata:
     cu_relative_offset = true;
-    if (verbose)
-      s.Printf("cu + 0x%" PRIx64, uvalue);
     break;
 
   // All DW_FORM_indirect attributes should be resolved prior to calling this
@@ -535,9 +521,6 @@ void DWARFFormValue::Dump(Stream &s) con
   if (cu_relative_offset) {
     assert(m_cu); // CU must be valid for DW_FORM_ref forms that are compile
                   // unit relative or we will get this wrong
-    if (verbose)
-      s.PutCString(" => ");
-
     s.Printf("{0x%8.8" PRIx64 "}", uvalue + m_cu->GetOffset());
   }
 }

Modified: lldb/trunk/source/Symbol/Declaration.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Declaration.cpp?rev=291895&r1=291894&r2=291895&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Declaration.cpp (original)
+++ lldb/trunk/source/Symbol/Declaration.cpp Fri Jan 13 04:41:59 2017
@@ -42,7 +42,7 @@ void Declaration::Dump(Stream *s, bool s
 
 bool Declaration::DumpStopContext(Stream *s, bool show_fullpaths) const {
   if (m_file) {
-    if (show_fullpaths || s->GetVerbose())
+    if (show_fullpaths)
       *s << m_file;
     else
       m_file.GetFilename().Dump(s);




More information about the lldb-commits mailing list