Hi.
Thank you for the dump support of the `.gcc_except_table`, I think elfutils is
the only
tool that can dump the information. That being said, I would like to improve
the quality
of the output.
Thanks,
Martin
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 <[email protected]>
---
src/readelf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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;
--
2.52.0