While debugging another issue, I noticed that disassembling a DWARF
expression using DW_OP_const_type did not work.
disassemble_dwarf_expression was not properly decoding this operation.
This patch fixes the problem. Tested by re-debugging gdb.
I didn't write a test case because that seemed like overkill for
what's essentially a maintainer's helper.
The expression evaluator does decode this properly, so no other change
was needed.
gdb/ChangeLog
2020-04-03 Tom Tromey <tromey@adacore.com>
* dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
Read constant block.
+2020-04-03 Tom Tromey <tromey@adacore.com>
+
+ * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
+ Read constant block.
+
2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
* gdb_bfd.h: Include gdbsupport/byte-vector.h.
type_print (type, "", stream, -1);
fprintf_filtered (stream, " [0x%s]>",
phex_nz (to_underlying (type_die), 0));
+
+ int n = *data++;
+ fprintf_filtered (stream, " %d byte block:", n);
+ for (int i = 0; i < n; ++i)
+ fprintf_filtered (stream, " %02x", data[i]);
+ data += n;
}
break;