Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Aktemur, Baris" <TankutBaris.Aktemur@amd.com>
To: "klaus.gerlicher@intel.com" <klaus.gerlicher@intel.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: "aburgess@redhat.com" <aburgess@redhat.com>
Subject: Re: [PATCH v3 1/1] gdb: avoid conversion of SIGSEGV to SIGTRAP on user breakpoints
Date: Wed, 13 May 2026 08:19:39 +0000	[thread overview]
Message-ID: <DM4PR12MB647003EFD58DC53F1023ACD9F8062@DM4PR12MB6470.namprd12.prod.outlook.com> (raw)

AMD General

Hi Klaus,

This is a reply to

 https://inbox.sourceware.org/gdb-patches/87zffcn798.fsf@redhat.com/

It seems the patch is not merged to upstream master, yet.  I assume it's
simply an oversight.  Could you take a look?

I have one comment below:

> diff --git a/gdb/infrun.c b/gdb/infrun.c
> index 43eca814e29..eb34aed09e0 100644
> --- a/gdb/infrun.c
> +++ b/gdb/infrun.c
> @@ -6138,7 +6138,9 @@ handle_inferior_event (struct execution_control_state *ecs)
>       stack.  */
>    if (ecs->ws.kind () == TARGET_WAITKIND_STOPPED
>        && (ecs->ws.sig () == GDB_SIGNAL_ILL
> -       || ecs->ws.sig () == GDB_SIGNAL_SEGV
> +       || (ecs->ws.sig () == GDB_SIGNAL_SEGV
> +           && !gdbarch_imprecise_pagefault_reporting
> +             (current_inferior ()->arch ()))

In a case like AMD GPUs, the inferior contains a mixture of CPU and GPU threads.
The imprecise reporting property would depend on the kind of the thread.  Therefore,
instead of

  current_inferior ()->arch ()

I'd propose

  target_thread_architecture (ecs->event_thread->ptid)

That should still give the same behavior for Intel's case because by default a
process stratum target returns the inferior's arch.

Best,
-Baris



             reply	other threads:[~2026-05-13  8:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13  8:19 Aktemur, Baris [this message]
2026-05-19 10:29 ` Gerlicher, Klaus
2026-07-07  6:35   ` Aktemur, Baris
2026-07-17  7:44     ` [PATCH v4 0/1] " Klaus Gerlicher
2026-07-17  7:44       ` [PATCH v4 1/1] " Klaus Gerlicher
2026-07-17  9:16         ` Aktemur, Baris
2026-07-17 13:25           ` Gerlicher, Klaus
2026-07-28  8:49             ` Aktemur, Baris
2026-07-17  7:46     ` [PATCH v3 " Gerlicher, Klaus
  -- strict thread matches above, loose matches on Subject: below --
2024-11-27 11:01 [PATCH v3 0/1] " Klaus Gerlicher
2024-11-27 11:01 ` [PATCH v3 1/1] " Klaus Gerlicher
2025-05-16 11:07   ` Andrew Burgess

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=DM4PR12MB647003EFD58DC53F1023ACD9F8062@DM4PR12MB6470.namprd12.prod.outlook.com \
    --to=tankutbaris.aktemur@amd.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=klaus.gerlicher@intel.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