debugedit mishandles DW_FORM_ref_addr (Roland McGrath)
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 18 Oct 2007 06:33:56 +0000 (09:33 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 18 Oct 2007 06:33:56 +0000 (09:33 +0300)
tools/debugedit.c

index ca30877..9206241 100644 (file)
@@ -821,6 +821,7 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase)
 
          switch (form)
            {
+           case DW_FORM_ref_addr: /* ptr_size in DWARF 2, offset in DWARF 3 */
            case DW_FORM_addr:
              ptr += ptr_size;
              break;
@@ -846,7 +847,6 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase)
            case DW_FORM_udata:
              read_uleb128 (ptr);
              break;
-           case DW_FORM_ref_addr:
            case DW_FORM_strp:
              ptr += 4;
              break;