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 python/31437] [gdb/python] Unavailable register breaks python unwinding
Date: Fri, 01 Mar 2024 12:27:01 +0000	[thread overview]
Message-ID: <bug-31437-4717-23teSvHdW7@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31437-4717@http.sourceware.org/bugzilla/>

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
With commit bbb12eb9c84aa2b32480b7c022c494c2469ef717 reverted, and this patch:
...
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c
index 56f925bc57f..90f8ba4f293 100644
--- a/gdb/python/py-unwind.c
+++ b/gdb/python/py-unwind.c
@@ -916,6 +916,13 @@ pyuw_sniffer (const struct frame_unwind *self, const
frame_info_ptr &this_frame,
        gdb_assert (data_size == value->type ()->length ());

        cached_reg_t *cached = new (&cached_frame->reg[i]) cached_reg_t ();
+
+       if (!value->entirely_available ())
+          {
+            cached->num = -1;
+            continue;
+          }
+
        cached->num = reg->number;
        cached->data.reset ((gdb_byte *) xmalloc (data_size));
        memcpy (cached->data.get (), value->contents ().data (), data_size);
...
the test-case still passes for me on arm-linux.

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

  reply	other threads:[~2024-03-01 12:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 12:24 [Bug python/31437] New: " vries at gcc dot gnu.org
2024-03-01 12:27 ` vries at gcc dot gnu.org [this message]
2024-03-02  8:52 ` [Bug python/31437] " vries at gcc dot gnu.org
2024-03-02 12:37 ` vries at gcc dot gnu.org
2024-03-19  9:29 ` cvs-commit at gcc dot gnu.org
2024-05-08  8:36 ` vries at gcc dot gnu.org
2024-05-08 12:12 ` cvs-commit at gcc dot gnu.org
2024-05-08 12:14 ` vries at gcc dot gnu.org
2024-05-08 12:15 ` 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-31437-4717-23teSvHdW7@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).