public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "tromey at sourceware dot org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug rust/29735] Can't have multiple breakpoints - crash otherwise
Date: Sat, 28 Oct 2023 20:46:11 +0000	[thread overview]
Message-ID: <bug-29735-4717-cXMiVgl9SS@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29735-4717@http.sourceware.org/bugzilla/>

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

--- Comment #10 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to The Puzzlemaker from comment #9)
> Comment on attachment 15198 [details]
> Patch for this issue, or an issue similar to it
> 
> >From 07bb370168aab780c4780435ad3d9257ad8a474b Mon Sep 17 00:00:00 2001
> >From: ThePuzzlemaker <tpzker@thepuzzlemaker.info>
> >Date: Sat, 28 Oct 2023 13:28:33 -0500
> >Subject: [PATCH] Fix assertion fail from `rust_lang::print_enum`
> >
> >This commit fixes an assertion fail in `rust_lang::print_enum` related
> >to the handling of field numbers for variant types.
> >---
> > gdb/rust-lang.c | 12 +++++++++++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> >diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
> >index 74808ad0716..9acd2e1d2fa 100644
> >--- a/gdb/rust-lang.c
> >+++ b/gdb/rust-lang.c
> >@@ -470,8 +470,18 @@ rust_language::print_enum (struct value *val, struct ui_file *stream,
> >     }
> > 
> >   int variant_fieldno = rust_enum_variant (type);
> >-  val = value_field (val, variant_fieldno);

This code looks different on trunk.
IIRC I fixed a bug like this a while ago.
git says 2020 though, which seems wrong if you're using 13.

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

  parent reply	other threads:[~2023-10-28 20:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31 13:25 [Bug gdb/29735] New: " amab8901 at protonmail dot com
2022-10-31 20:21 ` [Bug rust/29735] " tromey at sourceware dot org
2022-11-01  3:37 ` amab8901 at protonmail dot com
2022-11-01 13:38 ` tromey at sourceware dot org
2022-11-01 14:27 ` amab8901 at protonmail dot com
2022-11-02 19:47 ` tromey at sourceware dot org
2023-03-08  0:28 ` tromey at sourceware dot org
2023-10-28 18:34 ` tpzker at thepuzzlemaker dot info
2023-10-28 18:51 ` tpzker at thepuzzlemaker dot info
2023-10-28 18:55 ` tpzker at thepuzzlemaker dot info
2023-10-28 20:46 ` tromey at sourceware dot org [this message]
2023-10-28 20:48 ` tromey at sourceware dot org
2023-10-28 20:56 ` tpzker at thepuzzlemaker dot info
2023-10-28 20:57 ` tpzker at thepuzzlemaker dot info
2023-10-28 21:08 ` tpzker at thepuzzlemaker dot info
2023-10-29 10:06 ` sam at gentoo dot org
2023-11-24 16:30 ` tromey at sourceware dot 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-29735-4717-cXMiVgl9SS@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).