2010-06-15 Roland McGrath <roland@redhat.com>
+ * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
+ DW_FORM_ref_addr.
+ * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
+ here, since we don't support it yet.
+
* dwarf_next_cfi.c: Handle version 4 format.
* dwarf_getsrclines.c: Handle version 4 format.
/* Return reference offset represented by attribute.
- Copyright (C) 2003, 2005, 2007, 2008 Red Hat, Inc.
+ Copyright (C) 2003-2010 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2003.
break;
case DW_FORM_ref_addr:
+ case DW_FORM_ref_sig8:
__libdw_seterrno (DWARF_E_INVALID_REFERENCE);
return -1;
/* Look up the DIE in a reference-form attribute.
- Copyright (C) 2005, 2007 Red Hat, Inc.
+ Copyright (C) 2005-2010 Red Hat, Inc.
This file is part of Red Hat elfutils.
Red Hat elfutils is free software; you can redistribute it and/or modify
ref_size, &offset, IDX_debug_info, 0))
return NULL;
}
+ else if (attr->form == DW_FORM_ref_sig8)
+ {
+ /* This doesn't have an offset, but instead a value we
+ have to match in the .debug_types type unit headers. */
+
+ uint64_t sig = read_8ubyte_unaligned (attr->cu->dbg, attr->valp);
+
+ /* XXX We don't actually support this yet. We need to parse
+ .debug_types and keep a table keyed on signature. */
+#if 0
+ return INTUSE(dwarf_typeunit) (attr->cu->dbg, sig, die_mem);
+#else
+ sig = sig;
+ __libdw_seterrno (DWARF_E_INVALID_REFERENCE);
+#endif
+ return NULL;
+ }
else
{
/* Other forms produce an offset from the CU. */