public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests
@ 2024-03-20 22:33 liushuyu011 at gmail dot com
2024-03-20 22:37 ` [Bug rust/31517] " liushuyu011 at gmail dot com
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: liushuyu011 at gmail dot com @ 2024-03-20 22:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
Bug ID: 31517
Summary: GDB 15 broke Rust upstream GDB tests
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: rust
Assignee: unassigned at sourceware dot org
Reporter: liushuyu011 at gmail dot com
Target Milestone: ---
Created attachment 15423
--> https://sourceware.org/bugzilla/attachment.cgi?id=15423&action=edit
Error logs
Hi there,
Recently, I tried building and running Rust 1.76 testsuites on my device, and I
encountered a slew of errors when the test runner started to run GDB-related
tests.
The errors were like this: (see the log file attached).
I remember those tests passing before, so I did some digging on GDB, and I
found this commit:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=b0dd661fa16a424f059b1e1d80e779508b1a9a12
that caused this kind of error.
I am unsure if this new behaviour is intentional. If it is, how should someone
print out the size of a Rust slice in this case?
I have also opened a bug report on the Rust upstream:
https://github.com/rust-lang/rust/issues/122751, in case GDB cannot do anything
to fix this situation (so that Rust upstream can fix their tests instead).
Thanks!
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] GDB 15 broke Rust upstream GDB tests
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
@ 2024-03-20 22:37 ` liushuyu011 at gmail dot com
2024-03-20 22:40 ` doko at debian dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: liushuyu011 at gmail dot com @ 2024-03-20 22:37 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
--- Comment #1 from liushuyu <liushuyu011 at gmail dot com> ---
If you don't want to run all the tests, you may just check this one:
https://raw.githubusercontent.com/rust-lang/rust/e3df96cfda905301fc8514e000f942222c1ab6ad/tests/debuginfo/vec-slices.rs
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] GDB 15 broke Rust upstream GDB tests
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
2024-03-20 22:37 ` [Bug rust/31517] " liushuyu011 at gmail dot com
@ 2024-03-20 22:40 ` doko at debian dot org
2024-03-20 22:41 ` [Bug rust/31517] [15 Regression] " doko at debian dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: doko at debian dot org @ 2024-03-20 22:40 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
Matthias Klose <doko at debian dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |doko at debian dot org
--- Comment #2 from Matthias Klose <doko at debian dot org> ---
checked with trunk 20240312 and 20240320
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] [15 Regression] GDB 15 broke Rust upstream GDB tests
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
2024-03-20 22:37 ` [Bug rust/31517] " liushuyu011 at gmail dot com
2024-03-20 22:40 ` doko at debian dot org
@ 2024-03-20 22:41 ` doko at debian dot org
2024-03-20 22:42 ` doko at debian dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: doko at debian dot org @ 2024-03-20 22:41 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
Matthias Klose <doko at debian dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|GDB 15 broke Rust upstream |[15 Regression] GDB 15
|GDB tests |broke Rust upstream GDB
| |tests
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] [15 Regression] GDB 15 broke Rust upstream GDB tests
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
` (2 preceding siblings ...)
2024-03-20 22:41 ` [Bug rust/31517] [15 Regression] " doko at debian dot org
@ 2024-03-20 22:42 ` doko at debian dot org
2024-03-21 14:47 ` tromey at sourceware dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: doko at debian dot org @ 2024-03-20 22:42 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
Matthias Klose <doko at debian dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] [15 Regression] GDB 15 broke Rust upstream GDB tests
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
` (3 preceding siblings ...)
2024-03-20 22:42 ` doko at debian dot org
@ 2024-03-21 14:47 ` tromey at sourceware dot org
2024-03-21 21:42 ` liushuyu011 at gmail dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2024-03-21 14:47 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |tromey at sourceware dot org
Target Milestone|--- |15.1
--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
The gdb change was intentional. See bug #30330.
There's also a follow-up patch that will land before gdb 15:
https://sourceware.org/pipermail/gdb-patches/2024-March/207190.html
This patch slightly changes the output in some cases.
In fact... let's use this bug to track that patch, to make sure
it really does land for 15.
> If it is, how should someone print out the size of a Rust slice in this case?
I built vec-slices.rs and ran it under a gdb with the patch
applied:
(gdb) info local
mut_slice = &mut [i64] [1, 2, 3, 4, 5]
padded_struct = &[vec_slices::AStruct] [
vec_slices::AStruct {x: 10, y: 11, z: 12},
vec_slices::AStruct {x: 13, y: 14, z: 15}]
padded_tuple = &[(i32, i16)] [(6, 7), (8, 9)]
slice_of_slice = &[i64] [3, 4]
multiple = &[i64] [2, 3, 4, 5]
singleton = &[i64] [1]
empty = &[i64] []
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] [15 Regression] GDB 15 broke Rust upstream GDB tests
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
` (4 preceding siblings ...)
2024-03-21 14:47 ` tromey at sourceware dot org
@ 2024-03-21 21:42 ` liushuyu011 at gmail dot com
2024-03-21 23:26 ` tromey at sourceware dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: liushuyu011 at gmail dot com @ 2024-03-21 21:42 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
--- Comment #4 from liushuyu <liushuyu011 at gmail dot com> ---
> I built vec-slices.rs and ran it under a gdb with the patch
> applied:
Thanks for the information!
Although I am curious about how to print the length of a slice like using
`print slice.length` before?
I have also built a GDB with the patch applied; the auto-completion in the
interactive mode still completes `.length` in this case:
(gdb) p multiple.
data_ptr length
Is this expected?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] [15 Regression] GDB 15 broke Rust upstream GDB tests
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
` (5 preceding siblings ...)
2024-03-21 21:42 ` liushuyu011 at gmail dot com
@ 2024-03-21 23:26 ` tromey at sourceware dot org
2024-03-23 3:56 ` [Bug rust/31517] [15 Regression] Rust upstream GDB tests regressions with GDB 15 brobecker at gnat dot com
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2024-03-21 23:26 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to liushuyu from comment #4)
> Although I am curious about how to print the length of a slice like using
> `print slice.length` before?
You can't, not directly anyway.
In Rust you use len() but the Rust compiler doesn't emit enough information
for gdb to do calls via traits.
> I have also built a GDB with the patch applied; the auto-completion in the
> interactive mode still completes `.length` in this case:
>
> (gdb) p multiple.
> data_ptr length
>
> Is this expected?
No, this should have a separate report.
The completer still sees the underlying C-like type.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] [15 Regression] Rust upstream GDB tests regressions with GDB 15
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
` (6 preceding siblings ...)
2024-03-21 23:26 ` tromey at sourceware dot org
@ 2024-03-23 3:56 ` brobecker at gnat dot com
2024-03-23 3:59 ` brobecker at gnat dot com
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: brobecker at gnat dot com @ 2024-03-23 3:56 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
Joel Brobecker <brobecker at gnat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[15 Regression] GDB 15 |[15 Regression] Rust
|broke Rust upstream GDB |upstream GDB tests
|tests |regressions with GDB 15
CC| |brobecker at gnat dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] [15 Regression] Rust upstream GDB tests regressions with GDB 15
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
` (7 preceding siblings ...)
2024-03-23 3:56 ` [Bug rust/31517] [15 Regression] Rust upstream GDB tests regressions with GDB 15 brobecker at gnat dot com
@ 2024-03-23 3:59 ` brobecker at gnat dot com
2024-03-23 15:20 ` tromey at sourceware dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: brobecker at gnat dot com @ 2024-03-23 3:59 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
--- Comment #6 from Joel Brobecker <brobecker at gnat dot com> ---
Hello,
From what I could understand, Tom is saying that there is no issue in GDB, and
so we should be able to close this PR?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] [15 Regression] Rust upstream GDB tests regressions with GDB 15
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
` (8 preceding siblings ...)
2024-03-23 3:59 ` brobecker at gnat dot com
@ 2024-03-23 15:20 ` tromey at sourceware dot org
2024-04-02 17:44 ` cvs-commit at gcc dot gnu.org
2024-04-02 17:45 ` tromey at sourceware dot org
11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2024-03-23 15:20 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
I want to land the patch mentioned in comment#3 first.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] [15 Regression] Rust upstream GDB tests regressions with GDB 15
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
` (9 preceding siblings ...)
2024-03-23 15:20 ` tromey at sourceware dot org
@ 2024-04-02 17:44 ` cvs-commit at gcc dot gnu.org
2024-04-02 17:45 ` tromey at sourceware dot org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-02 17:44 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
--- Comment #8 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=251cedaeb57fe1e0fd28798f476fbee75373bbf4
commit 251cedaeb57fe1e0fd28798f476fbee75373bbf4
Author: Tom Tromey <tromey@adacore.com>
Date: Thu Mar 7 12:57:07 2024 -0700
Print type name when printing Rust slice
The recent change to how unsized Rust values are printed included a
small regression from past behavior. Previously, a slice's type would
be printed, like:
(gdb) print slice
$80 = &[i32] [3]
The patch changed this to just
(gdb) print slice
$80 = [3]
This patch restores the previous behavior.
Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30330
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31517
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rust/31517] [15 Regression] Rust upstream GDB tests regressions with GDB 15
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
` (10 preceding siblings ...)
2024-04-02 17:44 ` cvs-commit at gcc dot gnu.org
@ 2024-04-02 17:45 ` tromey at sourceware dot org
11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2024-04-02 17:45 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31517
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #9 from Tom Tromey <tromey at sourceware dot org> ---
I am going to close this now.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-04-02 17:45 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20 22:33 [Bug rust/31517] New: GDB 15 broke Rust upstream GDB tests liushuyu011 at gmail dot com
2024-03-20 22:37 ` [Bug rust/31517] " liushuyu011 at gmail dot com
2024-03-20 22:40 ` doko at debian dot org
2024-03-20 22:41 ` [Bug rust/31517] [15 Regression] " doko at debian dot org
2024-03-20 22:42 ` doko at debian dot org
2024-03-21 14:47 ` tromey at sourceware dot org
2024-03-21 21:42 ` liushuyu011 at gmail dot com
2024-03-21 23:26 ` tromey at sourceware dot org
2024-03-23 3:56 ` [Bug rust/31517] [15 Regression] Rust upstream GDB tests regressions with GDB 15 brobecker at gnat dot com
2024-03-23 3:59 ` brobecker at gnat dot com
2024-03-23 15:20 ` tromey at sourceware dot org
2024-04-02 17:44 ` cvs-commit at gcc dot gnu.org
2024-04-02 17:45 ` tromey at sourceware dot org
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).