Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Klaus Gerlicher <klaus.gerlicher@intel.com>
Cc: gdb-patches@sourceware.org,  TankutBaris.Aktemur@amd.com,
	aburgess@redhat.com,  simark@simark.ca
Subject: Re: [PATCH v5 1/1] gdb: avoid conversion of SIGSEGV to SIGTRAP on user breakpoints
Date: Wed, 02 Sep 2026 13:20:43 -0600	[thread overview]
Message-ID: <87qzjb4fzo.fsf@tromey.com> (raw)
In-Reply-To: <20260828125003.253648-1-klaus.gerlicher@intel.com> (Klaus Gerlicher's message of "Fri, 28 Aug 2026 12:50:03 +0000")

>>>>> Klaus Gerlicher <klaus.gerlicher@intel.com> writes:

> From: "Gerlicher, Klaus" <klaus.gerlicher@intel.com>
> GDB converts signals GDB_SIGNAL_ILL, GDB_SIGNAL_SEGV and GDB_SIGNAL_EMT to
> GDB_SIGNAL_TRAP if a breakpoint is inserted at the fault location.  This
> conversion logic assumes that when these signals occur at a breakpoint
> location, the signal was actually caused by hitting the breakpoint rather
> than a genuine fault.

Thanks for the patch.

> Add a new gdbarch function, imprecise_pagefault_reporting, that allows the
> signal conversion from GDB_SIGNAL_SEGV to GDB_SIGNAL_TRAP to be skipped for
> an architecture.  The default is false (conversion enabled), preserving
> existing behavior.  Architectures with imprecise fault reporting should
> override this to return true.

My first thought was that, without an implementation in the tree, this
will cause gdb/check-gdbarch.py to complain.  However, I saw that the
plan is a follow-up patch to use this.

Maybe temporarily marking this 'unused' would be good, provided that is
removed in the follow-up.

Also I was wondering, why a Function and not a Value?

> +    predefault="[] () -> bool {return false;}",

This doesn't take arguments, so presumably just a value would be
sufficient?

Tom

  parent reply	other threads:[~2026-09-02 19:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28 12:50 Klaus Gerlicher
2026-09-01  7:02 ` Aktemur, Baris
2026-09-02 19:20 ` Tom Tromey [this message]
2026-09-15 18:31   ` Simon Marchi

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=87qzjb4fzo.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=TankutBaris.Aktemur@amd.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=klaus.gerlicher@intel.com \
    --cc=simark@simark.ca \
    /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