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/29409] [gdb, tdep/aarch64] FAIL: gdb.opt/inline-small-func.exp: info breakpoints
Date: Tue, 26 Jul 2022 13:36:29 +0000 [thread overview]
Message-ID: <bug-29409-4717-DoqpLDBpRv@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29409-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=29409
--- Comment #9 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #7)
> Interestingly, that alone was not enough, and I also needed this bit:
> ...
> @@ -302,6 +303,8 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch,
> regs[i] = pv_register (i, 0);
> pv_area stack (AARCH64_SP_REGNUM, gdbarch_addr_bit (gdbarch));
>
> + CORE_ADDR orig_start = start;
> +
> for (; start < limit; start += 4)
> {
> uint32_t insn;
> @@ -544,7 +547,7 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch,
> }
>
> if (cache == NULL)
> - return start;
> + return seen_stack_set ? start : orig_start;
>
> if (pv_is_register (regs[AARCH64_FP_REGNUM], AARCH64_SP_REGNUM))
> {
> @@ -583,7 +586,7 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch,
> cache->saved_regs[i + regnum + AARCH64_D0_REGNUM].set_addr (offset);
> }
>
> - return start;
> + return seen_stack_set ? start : orig_start;
> }
>
> static CORE_ADDR
> ...
> which is roughly equivalent with this bit for amd64:
> ...
> if (cache.frameless_p)
> return start_pc;
> ...
Hmm, this seems to break (in test-case gdb.base/call-rt-st.exp) returning
0x4008e0 for:
...
00000000004008dc <loop_count>:
4008dc: d10043ff sub sp, sp, #0x10
4008e0: b9000fff str wzr, [sp, #12]
4008e4: 14000004 b 4008f4 <loop_count+0x18>
...
and this fixes it:
...
@@ -336,7 +339,8 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch,
}
/* Did we move SP to FP? */
- if (rn == AARCH64_SP_REGNUM && rd == AARCH64_FP_REGNUM)
+ if (rn == AARCH64_SP_REGNUM
+ && (rd == AARCH64_FP_REGNUM || rd == AARCH64_SP_REGNUM))
seen_stack_set = true;
}
else if (inst.opcode->iclass == pcreladdr
...
but I'm not sure about this. Maybe !frameless_p and seen_stack_set are
different concepts and need to be tracked separately?
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2022-07-26 13:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 8:25 [Bug tdep/29409] New: " vries at gcc dot gnu.org
2022-07-26 8:51 ` [Bug tdep/29409] " vries at gcc dot gnu.org
2022-07-26 8:56 ` vries at gcc dot gnu.org
2022-07-26 9:05 ` vries at gcc dot gnu.org
2022-07-26 9:12 ` luis.machado at arm dot com
2022-07-26 10:58 ` vries at gcc dot gnu.org
2022-07-26 11:14 ` vries at gcc dot gnu.org
2022-07-26 12:57 ` vries at gcc dot gnu.org
2022-07-26 13:10 ` luis.machado at arm dot com
2022-07-26 13:36 ` vries at gcc dot gnu.org [this message]
2022-07-26 13:58 ` luis.machado at arm dot com
2022-07-26 14:47 ` vries at gcc dot gnu.org
2022-07-26 15:30 ` vries at gcc dot gnu.org
2022-08-10 13:50 ` vries at gcc dot gnu.org
2022-08-11 11:59 ` vries at gcc dot gnu.org
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-29409-4717-DoqpLDBpRv@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).