Issue complaint instead of assert for invalid/unhandled DW_AT_accessibility
authorKeith Seitz <keiths@redhat.com>
Tue, 17 Oct 2017 21:15:36 +0000 (14:15 -0700)
committerKeith Seitz <keiths@redhat.com>
Wed, 18 Oct 2017 17:14:01 +0000 (10:14 -0700)
A previous patch called gdb_assert_not_reached whenever reading
the accessibility of a nested typedef definition. Wisely, Pedro has asked me
not do this.

This patch changes the previous one so that it issues a complaint instead.

gdb/ChangeLog:

* dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
DW_AT_accessibility.

gdb/ChangeLog
gdb/dwarf2read.c

index 097b0deb8b3901d35581d4b10680f5b332f6d735..b58864199085149363a1a3f8523a251c6586204a 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-18  Keith Seitz  <keiths@redhat.com>
+
+       * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
+       DW_AT_accessibility.
+
 2017-10-18  Yao Qi  <yao.qi@linaro.org>
 
        * features/tic6x-c62x-linux.c: Remove.
index f27d9b96afe5f5760e51b5267523fe6af9ef2d35..686fa3f3d3134708902e379ab7e34bd889ab6212 100644 (file)
@@ -13131,7 +13131,8 @@ dwarf2_add_typedef (struct field_info *fip, struct die_info *die,
       fp->is_protected = 1;
       break;
     default:
-      gdb_assert_not_reached ("unexpected accessibility attribute");
+      complaint (&symfile_complaints,
+                _("Unhandled DW_AT_accessibility value (%x)"), accessibility);
     }
 
   new_field->next = fip->typedef_field_list;
This page took 0.04341 seconds and 4 git commands to generate.