public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "luis.machado at arm dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/30872] Assertion `buffer.copy_insn_closure.get () != nullptr' failed
Date: Wed, 27 Sep 2023 12:39:49 +0000	[thread overview]
Message-ID: <bug-30872-4717-D9XpGcjQiQ@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30872-4717@http.sourceware.org/bugzilla/>

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

--- Comment #8 from Luis Machado <luis.machado at arm dot com> ---
Well, just should've been a bit obvious. I'm still checking this, but here's
some useful information.

The displaced stepping machinery in gdb, which is used to side-step breakpoints
without removing them, uses scratch space for executing the instructions out of
their original location.

That scratch location was picked a while ago to be the entry point of the
program, from the auxv's AT_ENTRY value. That's usually the first instruction
of _start.

Now, your example program starts from _start. So things get a bit confusing
because gdb is trying to execute and modify things using the same address.

As a temporary workaround, you can disable displaced stepping. It likely won't
make a difference for your case.

set displaced-stepping off

That should allow you to resume your debugging session.

I'll see what can be done about this corner case.

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

  parent reply	other threads:[~2023-09-27 12:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19  9:43 [Bug gdb/30872] New: " zbigniew2011 at gmail dot com
2023-09-19 12:02 ` [Bug gdb/30872] " zbigniew2011 at gmail dot com
2023-09-19 12:29 ` tromey at sourceware dot org
2023-09-19 12:34 ` zbigniew2011 at gmail dot com
2023-09-19 16:02 ` ssbssa at sourceware dot org
2023-09-19 18:00 ` tromey at sourceware dot org
2023-09-19 20:31 ` luis.machado at arm dot com
2023-09-27 11:46 ` luis.machado at arm dot com
2023-09-27 12:39 ` luis.machado at arm dot com [this message]
2023-09-27 13:27 ` zbigniew2011 at gmail dot com
2023-09-27 14:07 ` luis.machado at arm dot com
2023-09-28  8:13 ` luis.machado at arm dot com
2023-09-28 10:50 ` sam at gentoo dot org
2023-09-29  8:16 ` luis.machado at arm dot com
2023-10-16 10:57 ` cvs-commit at gcc dot gnu.org
2023-10-16 10:59 ` cvs-commit at gcc dot gnu.org
2023-10-16 11:01 ` luis.machado at arm dot com

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-30872-4717-D9XpGcjQiQ@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).