]> sourceware.org Git - systemtap.git/commitdiff
translate symbol/unwind extraction: shrink output
authorFrank Ch. Eigler <fche@redhat.com>
Tue, 16 Aug 2011 03:07:27 +0000 (23:07 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Tue, 16 Aug 2011 03:09:01 +0000 (23:09 -0400)
* translate.cxx (dump_unwindsyms): Use plain decimal formatting
  instead of 0xFF hex for bulk data, to save 1-3 bytes of C source per
  byte.

translate.cxx

index f06b72b88ddac0d08b06c28cd3d2f53daee165e3..ffd35e22d86861fa03db12547d6cb29b1be5924f 100644 (file)
@@ -4966,8 +4966,12 @@ dump_unwindsyms (Dwfl_Module *m,
 
   for (int i = 0; i < syments; ++i)
     {
+      if (pending_interrupts)
+        return DWARF_CB_ABORT;
+
       GElf_Sym sym;
       GElf_Word shndxp;
+
       const char *name = dwfl_module_getsym(m, i, &sym, &shndxp);
       if (name)
         {
@@ -5123,7 +5127,7 @@ dump_unwindsyms (Dwfl_Module *m,
         for (size_t i = 0; i < debug_len; i++)
           {
             int h = ((uint8_t *)debug_frame)[i];
-            c->output << "0x" << hex << h << dec << ",";
+            c->output << h << ","; // decimal is less wordy than hex
             if ((i + 1) % 16 == 0)
               c->output << "\n" << "   ";
           }
@@ -5172,7 +5176,7 @@ dump_unwindsyms (Dwfl_Module *m,
         for (size_t i = 0; i < eh_frame_hdr_len; i++)
           {
             int h = ((uint8_t *)eh_frame_hdr)[i];
-            c->output << "0x" << hex << h << dec << ",";
+            c->output << h << ","; // decimal is less wordy than hex
             if ((i + 1) % 16 == 0)
               c->output << "\n" << "   ";
           }
@@ -5240,7 +5244,7 @@ dump_unwindsyms (Dwfl_Module *m,
                for (size_t i = 0; i < debug_frame_hdr_len; i++)
                  {
                    int h = ((uint8_t *)debug_frame_hdr)[i];
-                   c->output << "0x" << hex << h << dec << ",";
+                    c->output << h << ","; // decimal is less wordy than hex
                    if ((i + 1) % 16 == 0)
                      c->output << "\n" << "   ";
                  }
This page took 0.042027 seconds and 5 git commands to generate.