From ebc08b50d71622148c9e472a3876972e3a5a59e3 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Mon, 15 Aug 2011 23:07:27 -0400 Subject: [PATCH] translate symbol/unwind extraction: shrink output * 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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/translate.cxx b/translate.cxx index f06b72b88..ffd35e22d 100644 --- a/translate.cxx +++ b/translate.cxx @@ -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" << " "; } -- 2.43.5