public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom Tromey <tromey@adacore.com>
Subject: Re: [PATCH 2/3] Handle erroneous DW_AT_call_return_pc
Date: Fri, 24 Mar 2023 10:10:22 -0600	[thread overview]
Message-ID: <87ttyadtap.fsf@tromey.com> (raw)
In-Reply-To: <20230314-submit-ppc-finish-fixes-v1-2-5f2f461b52f8@adacore.com> (Tom Tromey via Gdb-patches's message of "Tue, 14 Mar 2023 07:37:17 -0600")

>>>>> "Tom" == Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> writes:

Tom> On PPC64, with the test case included in an earlier patch, we found
Tom> that "finish" would still not correctly find the return value via
Tom> entry values.
[...]

Tom> I'm not completely sure that the nop check in the new arch hook is
Tom> correct; but if it is incorrect it just means that some invocations of
Tom> 'finish' won't find a value -- which is what happens without the
Tom> patch.

Subsequent discussion revealed that the linker might replace this 'nop'
with some other instruction, so ...

Tom> +  unsigned long op = rs6000_fetch_instruction (gdbarch, pc);
Tom> +  if (op == 0x60000000)
Tom> +    pc += 4;
Tom> +  return pc;

... in an updated version I've replaced this with just "return pc + 4".

Tom

  reply	other threads:[~2023-03-24 16:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 13:37 [PATCH 0/3] PPC/PPC64 "finish" fixes Tom Tromey
2023-03-14 13:37 ` [PATCH 1/3] Handle function descriptors in call_site_target Tom Tromey
2023-03-14 13:37 ` [PATCH 2/3] Handle erroneous DW_AT_call_return_pc Tom Tromey
2023-03-24 16:10   ` Tom Tromey [this message]
2023-03-14 13:37 ` [PATCH 3/3] Use entry values for 32-bit PPC struct return Tom Tromey
2023-04-21 13:40 ` [PATCH 0/3] PPC/PPC64 "finish" fixes Tom Tromey

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=87ttyadtap.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@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).