This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 8/8] DWARF-5: DW_FORM_data16
On 02/12/2017 08:23 PM, Jan Kratochvil wrote:
> @@ -20250,6 +20261,10 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die)
> fprintf_unfiltered (f, "expression: size %s",
> pulongest (DW_BLOCK (&die->attrs[i])->size));
> break;
> + case DW_FORM_data16:
> + /* FIXME: Print the contents. */
> + fprintf_unfiltered (f, "constant of 16 bytes");
Should we fix that FIXME?
> + break;
> case DW_FORM_ref_addr:
> fprintf_unfiltered (f, "ref address: ");
> fputs_filtered (hex_string (DW_UNSND (&die->attrs[i])), f);
> @@ -20411,6 +20426,7 @@ dwarf2_get_attr_constant_value (const struct attribute *attr, int default_value)
> return DW_UNSND (attr);
> else
> {
> + /* For DW_FORM_data16 see attr_form_is_constant. */
Spurious space after "For".
> complaint (&symfile_complaints,
> _("Attribute value is not a constant (%s)"),
> dwarf_form_name (attr->form));
> @@ -20694,6 +20710,7 @@ dwarf2_fetch_constant_bytes (sect_offset offset,
> case DW_FORM_block4:
> case DW_FORM_block:
> case DW_FORM_exprloc:
> + case DW_FORM_data16:
> result = DW_BLOCK (attr)->data;
> *len = DW_BLOCK (attr)->size;
> break;
> +# We need to know the endianess in order
> +# to write some of the debugging info we'd like to generate.
> +if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] {
"failed to prepare for endianness test" instead of "${testfile}.exp".
> + return -1
> +}
> +
> +if { [prepare_for_testing ${testfile}.exp ${testfile} \
"failed to prepare" instead of "${testfile}.exp".
> + [list $srcfile $asm_file] {nodebug}] } {
> + return -1
> +}
> +
> +gdb_test "p/x xxx" " = 0x123456789abcdef00fedcba987654321"
Thanks,
Pedro Alves