public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug tdep/29804] [gdb/tdep, vax] Remove gdbarch_deprecated_function_start_offset
Date: Fri, 18 Nov 2022 10:20:14 +0000 [thread overview]
Message-ID: <bug-29804-4717-gumAurFXdH@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29804-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=29804
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> Thing is, this conversion is exactly what CONVERT_FUNC_PTR_ADDR is for.
It's debatable whether we should use convert_from_func_ptr_addr or
gdbarch_skip_entrypoint.
In practise the determining factor for which to use could be just where the two
are used in the code.
Indeed the description of convert_from_func_ptr_addr (as confusingly given in
the comment for gdbarch_deprecated_function_start_offset) seems to fit nicely:
...
/* A function can be addressed by either it's "pointer" (possibly a
descriptor address) or "entry point" (first executable instruction).
The method "convert_from_func_ptr_addr" converting the former to the
latter. gdbarch_deprecated_function_start_offset is being used to implement
a simplified subset of that functionality - the function's address
corresponds to the "function pointer" and the function's start
corresponds to the "function entry point" - and hence is redundant. */
...
But I also saw in the gcc backend:
...
/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
Used for C++ multiple inheritance.
.mask ^m<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11> #conservative entry mask
addl2 $DELTA, 4(ap) #adjust first argument
jmp FUNCTION+2 #jump beyond FUNCTION's entry mask
...
So, we could describe this situation by saying there are two entry points for
FUNCTION:
- one for calls (target address at mask), and
- one for jumps (target address past mask).
Indeed
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2022-11-18 10:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 9:48 [Bug tdep/29804] New: " vries at gcc dot gnu.org
2022-11-18 9:55 ` [Bug tdep/29804] " vries at gcc dot gnu.org
2022-11-18 10:20 ` vries at gcc dot gnu.org [this message]
2022-11-18 15:55 ` tromey at sourceware dot org
2022-11-18 16:01 ` vries at gcc dot gnu.org
2022-11-18 20:13 ` macro at orcam dot me.uk
2022-11-19 9:50 ` vries at gcc dot gnu.org
2022-11-19 13:44 ` macro at orcam dot me.uk
2022-11-21 6:37 ` vries at gcc dot gnu.org
2022-11-22 15:58 ` macro at orcam dot me.uk
2022-12-06 16:25 ` tromey at sourceware dot org
2022-12-06 16:43 ` macro at orcam dot me.uk
2023-01-28 14:09 ` macro at orcam dot me.uk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-29804-4717-gumAurFXdH@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=gdb-prs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).