From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AB882385B527; Mon, 13 Feb 2023 19:48:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB882385B527 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676317697; bh=x59aX2f1yaxeQTCy+DMii6zAmmFk4TSDE1449HTw4dY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xO8KcVBe+Bd7vbWXbFvfnYXwugq5ed0eSVVB+9IiMEiOy/8cNI1DT/a3VOKOen3k8 UgatziUH+tFzeTFQyHSlLrVv4f4xwcXBTipOAt7EgcZnZjDCseXLgV6loRQHf8gOy+ lxjqt0uIKcWpL6ZeQ6pO1JhpbTMFKuteIaHs1dq4= From: "corinna at vinschen dot de" To: gdb-prs@sourceware.org Subject: [Bug win32/18027] dwarf2 debug info after rebasing DLLs unusable Date: Mon, 13 Feb 2023 19:48:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: win32 X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: corinna at vinschen dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D18027 --- Comment #10 from Corinna Vinschen --- (In reply to Tom Tromey from comment #8) > > I'm pretty sure the problem is that the dwarf2 debug info contains > > absolute addresses which don't match the load address of the DLL after > > rebase. >=20 > Ok... so if I'm understanding correctly, this might not completely > be a gdb bug, since what's happening is that the DLL is rebased but > some addresses in the DWARF are not updated. Indeed, this is not necessarily a GDB bug. Apologies, but 8 years ago it very much looked like a combined ld/GDB problem, that's why I created https://sourceware.org/bugzilla/show_bug.cgi?id=3D18025 and this bug here at the same time. In fact, the first question is probably if the dwarf2 info couldn't by imagebase-relative, rather than absolute. If that's possible (and maybe even already handled in GDB?) this could be done by tweaking the linker. If that's not possible because of how the dwarf info is defined... > However, maybe gdb could work around this some way, if we had a > way to determine the original base? Like, for DWARF symbols, > gdb could do ADDR - ORIG + NEW to compute the address? ...then it would be great if GDB could workaround this somehow. The problem here is, I have no clue if there's anything in the DLL which would be indicative of the original image base address after rebasing. Unless, maybe, some of the dwarf2 info itself can be=20 used to reconstruct the originl address? Thanks, Corinna --=20 You are receiving this mail because: You are on the CC list for the bug.=