diff options
| author | Roland McGrath <[email protected]> | 2007-12-15 23:39:34 +0000 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2007-12-15 23:39:34 +0000 |
| commit | 1a2e8f4f5bd2ca2aaed78d1cea3842eff2fa5295 (patch) | |
| tree | e40bba1bc6f5279da0642656b88a0eb029863cb5 /src | |
| parent | e7717c4101dc82f0f1a30b0abf997f0068fb4b64 (diff) | |
backends/
2007-12-15 Roland McGrath <[email protected]>
* ppc_regs.c (ppc_register_info): Return "spefscr", not "spr512".
tests/
2007-12-15 Roland McGrath <[email protected]>
* run-allregs.sh: Change expected output for powerpc spefscr.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/readelf.c | 21 |
2 files changed, 26 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 20436a1a..8bd6cb58 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,15 @@ +2007-11-19 Roland McGrath <[email protected]> + + * readelf.c (print_ops): Handle all bad op codes gracefully. + Print their numbers instead of just ???. + 2007-11-09 Roland McGrath <[email protected]> * readelf.c (attr_callback): Handle DW_AT_data_location. + Handle block forms to mean a DWARF expression for DW_AT_allocated, + DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride, + DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound, + DW_AT_upper_bound. 2007-10-20 Roland McGrath <[email protected]> diff --git a/src/readelf.c b/src/readelf.c index 83949b7c..42c444fa 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -3615,7 +3615,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, Dwarf_Word offset = 0; while (len-- > 0) { - size_t op = *data++; + uint_fast8_t op = *data++; switch (op) { @@ -3788,9 +3788,12 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, default: /* No Operand. */ - printf ("%*s[%4" PRIuMAX "] %s\n", - indent, "", (uintmax_t) offset, - known[op] ?: "???"); + if (op < sizeof known / sizeof known[0] && known[op] != NULL) + printf ("%*s[%4" PRIuMAX "] %s\n", + indent, "", (uintmax_t) offset, known[op]); + else + printf ("%*s[%4" PRIuMAX "] %#x\n", + indent, "", (uintmax_t) offset, op); ++offset; break; } @@ -4201,6 +4204,16 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) case DW_AT_frame_base: case DW_AT_return_addr: case DW_AT_static_link: + case DW_AT_allocated: + case DW_AT_associated: + case DW_AT_bit_size: + case DW_AT_bit_offset: + case DW_AT_bit_stride: + case DW_AT_byte_size: + case DW_AT_byte_stride: + case DW_AT_count: + case DW_AT_lower_bound: + case DW_AT_upper_bound: print_ops (cbargs->dwflmod, cbargs->dbg, 12 + level * 2, 12 + level * 2, cbargs->addrsize, block.length, block.data); |
