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 testsuite/26967] FAIL: gdb.base/longjmp.exp: next over longjmp(1)
Date: Wed, 27 Jan 2021 15:17:20 +0000	[thread overview]
Message-ID: <bug-26967-4717-8yCFbkUcVN@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26967-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26967

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
While working on PR27205 I figured out what happens.

Without longjmp probes in libc, we try to fall back to using longjmp_names
breakpoints, but when these trigger we don't manage to recuperate the pc from
jmp_buf because tdep->jb_pc_offset is not set (in other words, -1).

Perhaps this once was set, but switched off due to problems.  There are known
issues with this for linux related to pointer guarding of the pc in jmp_buf.

Anyway, we could detect this in the "set debug infrun 1" output:
...
  [infrun] process_event_stop_test: BPSTAT_WHAT_SET_LONGJMP_RESUME
(!gdbarch_get_longjmp_target)
...
and then allow the behaviour reported in this PR.

However, AFAIU that still wouldn't work for -m32, because there
tdep->jb_pc_offset is defined and then we run into pointer guarding (see
PR27205 for what that looks like).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-01-27 15:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-28 12:44 [Bug testsuite/26967] New: " vries at gcc dot gnu.org
2021-01-08 14:28 ` [Bug testsuite/26967] " vries at gcc dot gnu.org
2021-01-27 15:17 ` vries at gcc dot gnu.org [this message]
2022-12-05 23:33 ` tromey at sourceware dot org
2022-12-07  8:33 ` vries at gcc dot gnu.org
2022-12-07 10:31 ` vries at gcc dot gnu.org
2022-12-07 10:36 ` vries at gcc dot gnu.org
2022-12-07 15:10 ` vries at gcc dot gnu.org
2022-12-07 15:45 ` cvs-commit at gcc dot gnu.org
2024-03-20 18:24 ` cvs-commit 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-26967-4717-8yCFbkUcVN@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).