public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Marius Muench <munch@eurecom.fr>
To: Kevin Buettner <kevinb@redhat.com>, gdb-patches@sourceware.org
Cc: Marius Muench <Marius.Muench@eurecom.fr>
Subject: Re: [PATCH] ARM: Do not use FP reg when on AAPCS
Date: Wed, 24 Oct 2018 11:40:00 -0000	[thread overview]
Message-ID: <e92e31b0-c118-a502-62dd-bbec9ceaf50d@eurecom.fr> (raw)
In-Reply-To: <20181023101649.23d4af8b@pinnacle.lan>

On 10/23/18 7:16 PM, Kevin Buettner wrote:
> On Tue, 23 Oct 2018 15:03:39 +0200
> Marius Muench <munch@eurecom.fr> wrote:
>> gdb/ChangeLog
>> 2018-10-23  Marius Muench  <marius.muench@eurecom.fr>
>>
>>        * arm-tdeb.c (arm_scan_prologue): Don't dereference FP reg
>>        when on aapcs.
> 
> Typo on filename above.  (s/tdeb/tdep/)  While you're changing it,
> please capitalize AAPCS too.
> 
> Otherwise, okay.
> 
> Kevin
> 

Good catch, sorry for that. Here's the updated patch.

Thanks,
Marius

2018-10-24  Marius Muench  <marius.muench@eurecom.fr>

       * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
       when on AAPCS.
---
 gdb/arm-tdep.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 53eee76926..5cff22977d 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1801,6 +1801,10 @@ arm_scan_prologue (struct frame_info *this_frame,
       CORE_ADDR frame_loc;
       ULONGEST return_value;

+      /* AAPCS does not use a frame register, so we can abort here. */
+      if (gdbarch_tdep (gdbarch)->arm_abi == ARM_ABI_AAPCS)
+        return;
+
       frame_loc = get_frame_register_unsigned (this_frame, ARM_FP_REGNUM);
       if (!safe_read_memory_unsigned_integer (frame_loc, 4, byte_order,
                                              &return_value))

  reply	other threads:[~2018-10-24 11:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23 13:03 Marius Muench
2018-10-23 17:16 ` Kevin Buettner
2018-10-24 11:40   ` Marius Muench [this message]
2018-10-24 16:47     ` Kevin Buettner
2018-10-24 17:23     ` Pedro Alves
2018-10-24 19:37       ` Marius Muench
2018-10-25 20:34         ` Kevin Buettner
2018-10-26 12:13           ` Marius Muench
2018-11-06 17:53             ` 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=e92e31b0-c118-a502-62dd-bbec9ceaf50d@eurecom.fr \
    --to=munch@eurecom.fr \
    --cc=Marius.Muench@eurecom.fr \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    /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).