From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9B1A53858C50; Mon, 11 Dec 2023 14:02:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B1A53858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702303334; bh=Xj5/rFz0+VEPkTNxcJJmegEmloxlTyo7fYBoEzf1eeg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=l6Efx8ROkBuww/wyqZyguFgAAidd2LydC0VbRdasyael4odNXwY5j1a/tF7n6Pbjj sO0Ny3Sl8To3vo9xgai1pzD0Q4MipkX5e5Fzy75l4g4MF9H3STg4v/AcFFtqJAIdMt V8Np18y9Exm++k5hsj5mpzVmrBNx6CicxyINh/DY= From: "mark at klomp dot org" To: debugedit@sourceware.org Subject: [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx) Date: Mon, 11 Dec 2023 14:02:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: debugedit X-Bugzilla-Component: debugedit X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D28728 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #9 from Mark Wielaard --- commit 3e7aeeab4f744ad15108775685db68d3a35b0735 Author: Mark Wielaard Date: Thu Mar 23 18:07:40 2023 +0100 debugedit: Add support for .debug_str_offsets (DW_FORM_strx) In theory supporting strx .debug_str_offsets is easy, the strings in .debug_str are just read through an indirection table. When the strings are updated in .debug_str we just need to rewrite the indirection table. The tricky part is the ET_REL (object files or kernel modules) support. Relocation reading is "global" per section and we expect to read a relocation only once. But we need to read the DW_AT_str_offsets_base before reading any strx form attributes. So we read that first, then reset the relptr. And when we read from the .debug_str_offsets section we need to save and restore the .debug_info relptr. * tools/debugedit.c (do_read_24): New function. (str_offsets_base): New static variable. (buf_read_ule24): New function. (buf_read_ube24): Likewise. (setup_relbuf): Handle .debug_str_offsets. (do_read_uleb128): New function. (do_read_str_form_relocated): Likewise. (read_abbrev): Handle DW_FORM_strx[1234]. (edit_strp): Take the actual string form as argument. Use do_read_str_form_relocated. (read_dwarf5_line_entries): Pass form to edit_strp. (edit_attributes_str_comp_dir): Take the actual string form as argument. Use do_read_str_form_relocated. (edit_attributes): Handle DW_FORM_strx[1234]. (edit_info): Read DW_AT_str_offsets_base first. (update_str_offsets): New function. (edit_dwarf2): Setup do_read_24. Call update_str_offsets. https://sourceware.org/bugzilla/show_bug.cgi?id=3D28728 Signed-off-by: Mark Wielaard --=20 You are receiving this mail because: You are on the CC list for the bug.=