From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C059E38518A3; Fri, 18 Nov 2022 09:48:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C059E38518A3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668764888; bh=jwj5nL/g4bkN0UEbZRSpVDnYHioLB35WlvoRq6AYOlE=; h=From:To:Subject:Date:From; b=LD6fX+pG0lscKE+8V4bjSjVDb6c9Wg0OXl0Pbqt8IfC0BdmBBD4mkC4pfoHg3F5/G 7eke4v5LV4dDRyu6UDzKkWt+W+vKW1PqnsXvmICw86xCYpDbGomP6Khv9HlBqkTMaY giaEZR+6dfdMOLkjbeP8VNLjgnchmdEdFicHEoH8= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/29804] New: [gdb/tdep, vax] Remove gdbarch_deprecated_function_start_offset Date: Fri, 18 Nov 2022 09:48:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D29804 Bug ID: 29804 Summary: [gdb/tdep, vax] Remove gdbarch_deprecated_function_start_offset Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: tdep Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- As noted in PR29793, there's only one user left of gdbarch_deprecated_function_start_offset: ... $ find gdb -type f | xargs grep set_gdbarch_deprecated_function_start_offset gdb/gdbarch-gen.h:extern void set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_function_start_offset); gdb/vax-tdep.c: set_gdbarch_deprecated_function_start_offset (gdbarch, 2); gdb/gdbarch.c:set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch, ... The vax target. The deprecation started in 2004: ... 2004-06-18 Andrew Cagney * gdbarch.sh (DEPRECATED_FUNCTION_START_OFFSET): Deprecated. ... The submission email ( https://sourceware.org/pipermail/gdb-patches/2004-May/034563.html ) mentions vax: ... The VAX uses this to ``adjust'' a function=20 pointer so that it instead points to the function's code address (the=20 first few bytes of a vax function are not executable and need to be=20 skipped over). Thing is, this conversion is exactly what CONVERT_FUNC_PTR_ADDR is for.=20 Given a function pointer return the function's code address. Given=20 this overlap, I think FUNCTION_START_OFFSET should be deprecated - it is=20 redundant. ... Unfortunately grepping through the sources shows that code locations of=20 gdbarch_deprecated_function_start_offset and convert_from_func_ptr_addr don= 't always overlap, so this is not a mechanical substitution, and needs to be tested. One outcome could be that we cannot (fully) remove it, but then we should de-deprecate it and document precisely why we need it and when and where th= is hook is necessary. --=20 You are receiving this mail because: You are on the CC list for the bug.=