From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id DEF413857C77; Tue, 21 Sep 2021 15:26:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DEF413857C77 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3740] [Ada] Follow-up tweaks to System.Dwarf_Line X-Act-Checkin: gcc X-Git-Author: Eric Botcazou X-Git-Refname: refs/heads/master X-Git-Oldrev: cf7aa7d8e8523ca246804ba7c8ef6ab4c7910cb8 X-Git-Newrev: 97c5d522c6ee36b7ed1824d1eb6b8f30172c1818 Message-Id: <20210921152654.DEF413857C77@sourceware.org> Date: Tue, 21 Sep 2021 15:26:54 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2021 15:26:55 -0000 https://gcc.gnu.org/g:97c5d522c6ee36b7ed1824d1eb6b8f30172c1818 commit r12-3740-g97c5d522c6ee36b7ed1824d1eb6b8f30172c1818 Author: Eric Botcazou Date: Tue Jul 6 12:18:57 2021 +0200 [Ada] Follow-up tweaks to System.Dwarf_Line gcc/ada/ * libgnat/s-dwalin.adb (Skip_Form): Fix cases of DW_FORM_addrx and DW_FORM_implicit_const. Replace Constraint_Error with Dwarf_Error. Diff: --- gcc/ada/libgnat/s-dwalin.adb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/gcc/ada/libgnat/s-dwalin.adb b/gcc/ada/libgnat/s-dwalin.adb index 530b8029427..74700e68bfc 100644 --- a/gcc/ada/libgnat/s-dwalin.adb +++ b/gcc/ada/libgnat/s-dwalin.adb @@ -1114,8 +1114,6 @@ package body System.Dwarf_Lines is case Form is when DW_FORM_addr => Skip := Offset (Ptr_Sz); - when DW_FORM_addrx => - Skip := Offset (uint32'(Read_LEB128 (S))); when DW_FORM_block1 => Skip := Offset (uint8'(Read (S))); when DW_FORM_block2 => @@ -1161,11 +1159,12 @@ package body System.Dwarf_Lines is begin return; end; - when DW_FORM_udata - | DW_FORM_ref_udata + when DW_FORM_addrx | DW_FORM_loclistx + | DW_FORM_ref_udata | DW_FORM_rnglistx | DW_FORM_strx + | DW_FORM_udata => declare Val : constant uint32 := Read_LEB128 (S); @@ -1173,7 +1172,7 @@ package body System.Dwarf_Lines is begin return; end; - when DW_FORM_flag_present => + when DW_FORM_flag_present | DW_FORM_implicit_const => return; when DW_FORM_ref_addr | DW_FORM_sec_offset @@ -1187,10 +1186,10 @@ package body System.Dwarf_Lines is null; end loop; return; - when DW_FORM_implicit_const | DW_FORM_indirect => - raise Constraint_Error; + when DW_FORM_indirect => + raise Dwarf_Error with "DW_FORM_indirect not implemented"; when others => - raise Constraint_Error; + raise Dwarf_Error with "DWARF form not implemented"; end case; Seek (S, Tell (S) + Skip);