From: Martin Liška Date: Tue, 9 Dec 2025 08:21:01 +0000 (+0100) Subject: readelf: improve output format for .gcc_except_table X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb0d911e7c14004a9d82d95b285aeeb33bbf8269;p=thirdparty%2Felfutils.git readelf: improve output format for .gcc_except_table Before the change: ``` Call site table: [ 0] Call site start: 0x10 Call site length: 12 Landing pad: 0x2a Action: 3 [ 1] Call site start: 0x1c Call site length: 123 Landing pad: 0 Action: 0 Action table: [ 0] ar_filter: 1 ar_disp: 0 [ 1] ar_filter: 2 ar_disp: -3 -> [ 0] ``` After: ``` Call site table: [ 0] Call site start: 0x10 Call site length: 12 Landing pad: 0x2a Action: 3 [ 1] Call site start: 0x1c Call site length: 123 Landing pad: 0 Action: 0 Action table: [ 0] ar_filter: 1 ar_disp: 0 [ 1] ar_filter: 2 ar_disp: -3 -> [ 0] ``` ChangeLog: * src/readelf.c (print_debug_exception_table): Add newlines. Signed-off-by: Martin Liska --- diff --git a/src/readelf.c b/src/readelf.c index fbdf8c71..4faf0405 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -11724,7 +11724,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)), while (readp < action_table) { if (u == 0) - fputs (_("\n Call site table:"), out); + fputs (_("\n Call site table:\n"), out); uint64_t call_site_start; readp = read_encoded (call_site_encoding, readp, dataend, @@ -11752,7 +11752,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)), unsigned int max_ar_filter = 0; if (max_action > 0) { - fputs ("\n Action table:", out); + fputs ("\n Action table:\n", out); size_t maxdata = (size_t) (dataend - action_table); if (max_action > maxdata || maxdata - max_action < 1) @@ -11783,7 +11783,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)), if (abs (ar_disp) & 1) fprintf (out, " -> [%4u]\n", u + (ar_disp + 1) / 2); else if (ar_disp != 0) - fputs (" -> ???", out); + fputs (" -> ???\n", out); else fputc ('\n', out); ++u;