public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/31574] New: [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x
@ 2024-03-29 7:51 vries at gcc dot gnu.org
2024-03-29 11:53 ` [Bug ada/31574] " tromey at sourceware dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-29 7:51 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31574
Bug ID: 31574
Summary: [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: ada
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
In an armhf container on an aarch64-linux host, I run into:
...
PASS: gdb.ada/verylong.exp: compilation prog.adb
FAIL: gdb.ada/verylong.exp: print x
FAIL: gdb.ada/verylong.exp: print x / 2
FAIL: gdb.ada/verylong.exp: print (x / 4) * 2
PASS: gdb.ada/verylong.exp: print x - x
FAIL: gdb.ada/verylong.exp: print x - 99 + 1
FAIL: gdb.ada/verylong.exp: print -x
FAIL: gdb.ada/verylong.exp: print +x
PASS: gdb.ada/verylong.exp: print 170141183460469231731687303715884105727
FAIL: gdb.ada/verylong.exp: print x = 170141183460469231731687303715884105727
...
In more detail:
...
(gdb) print x^M
$1 = 9223372036854775807^M
(gdb) FAIL: gdb.ada/verylong.exp: print x
...
A passing version on x86_64-linux looks like:
...
(gdb) print x^M
$1 = 170141183460469231731687303715884105727^M
(gdb) PASS: gdb.ada/verylong.exp: print x
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/31574] [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x
2024-03-29 7:51 [Bug ada/31574] New: [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x vries at gcc dot gnu.org
@ 2024-03-29 11:53 ` tromey at sourceware dot org
2024-03-29 11:57 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2024-03-29 11:53 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31574
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Maybe Long_Long_Long_Integer is a different size on this arch.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/31574] [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x
2024-03-29 7:51 [Bug ada/31574] New: [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x vries at gcc dot gnu.org
2024-03-29 11:53 ` [Bug ada/31574] " tromey at sourceware dot org
@ 2024-03-29 11:57 ` vries at gcc dot gnu.org
2024-03-29 12:17 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-29 11:57 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31574
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom Tromey from comment #1)
> Maybe Long_Long_Long_Integer is a different size on this arch.
Here (
https://gcc.gnu.org/onlinedocs/gnat_rm/Implementation-Defined-Characteristics.html
) I found:
...
‘Long_Long_Long_Integer’:
128-bit signed (on 64-bit targets) 64-bit signed (on 32-bit targets)
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/31574] [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x
2024-03-29 7:51 [Bug ada/31574] New: [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x vries at gcc dot gnu.org
2024-03-29 11:53 ` [Bug ada/31574] " tromey at sourceware dot org
2024-03-29 11:57 ` vries at gcc dot gnu.org
@ 2024-03-29 12:17 ` vries at gcc dot gnu.org
2024-03-29 12:38 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-29 12:17 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31574
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative fix:
...
diff --git a/gdb/testsuite/gdb.ada/verylong.exp
b/gdb/testsuite/gdb.ada/verylong.exp
index 28b65a10f64..4a3e0b9eeb2 100644
--- a/gdb/testsuite/gdb.ada/verylong.exp
+++ b/gdb/testsuite/gdb.ada/verylong.exp
@@ -29,15 +29,29 @@ clean_restart ${testfile}
set bp_location [gdb_get_line_number "START" ${testdir}/prog.adb]
runto "prog.adb:$bp_location"
-gdb_test "print x" " = 170141183460469231731687303715884105727"
-gdb_test "print x / 2" " = 85070591730234615865843651857942052863"
-gdb_test "print (x / 4) * 2" " = 85070591730234615865843651857942052862"
+set lll_int_size 0
+gdb_test_multiple "ptype Long_Long_Long_Integer" "" {
+ -re -wrap "type = <8-byte integer>" {
+ set lll_int_size 8
+ set max 9223372036854775807
+ }
+ -re -wrap "type = <16-byte integer>" {
+ set lll_int_size 16
+ set max 170141183460469231731687303715884105727
+ }
+}
+
+require {expr $lll_int_size == 8 || $lll_int_size == 16}
+
+gdb_test "print x" " = $max"
+gdb_test "print x / 2" " = [expr $max / 2]"
+gdb_test "print (x / 4) * 2" " = [expr ($max / 4) * 2]"
gdb_test "print x - x" " = 0"
-gdb_test "print x - 99 + 1" " = 170141183460469231731687303715884105629"
-gdb_test "print -x" " = -170141183460469231731687303715884105727"
-gdb_test "print +x" " = 170141183460469231731687303715884105727"
+gdb_test "print x - 99 + 1" " = [expr $max - 99 + 1]"
+gdb_test "print -x" " = -$max"
+gdb_test "print +x" " = $max"
gdb_test "print 170141183460469231731687303715884105727" \
" = 170141183460469231731687303715884105727"
-gdb_test "print x = 170141183460469231731687303715884105727" \
+gdb_test "print x = $max" \
" = true"
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/31574] [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x
2024-03-29 7:51 [Bug ada/31574] New: [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x vries at gcc dot gnu.org
` (2 preceding siblings ...)
2024-03-29 12:17 ` vries at gcc dot gnu.org
@ 2024-03-29 12:38 ` vries at gcc dot gnu.org
2024-04-02 14:14 ` cvs-commit at gcc dot gnu.org
2024-04-02 14:16 ` [Bug testsuite/31574] [gdb, 32-bit] " vries at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-29 12:38 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31574
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2024-March/207668.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/31574] [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x
2024-03-29 7:51 [Bug ada/31574] New: [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x vries at gcc dot gnu.org
` (3 preceding siblings ...)
2024-03-29 12:38 ` vries at gcc dot gnu.org
@ 2024-04-02 14:14 ` cvs-commit at gcc dot gnu.org
2024-04-02 14:16 ` [Bug testsuite/31574] [gdb, 32-bit] " vries at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-02 14:14 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31574
--- Comment #5 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d16a53152cc2dfd6e92fdf9ae288ff19dac49dd1
commit d16a53152cc2dfd6e92fdf9ae288ff19dac49dd1
Author: Tom de Vries <tdevries@suse.de>
Date: Tue Apr 2 16:14:39 2024 +0200
[gdb/testsuite] Fix gdb.ada/verylong.exp on 32-bit target
In an aarch32-linux chroot on an aarch64-linux system, I run into:
...
(gdb) print x^M
$1 = 9223372036854775807^M
(gdb) FAIL: gdb.ada/verylong.exp: print x
...
A passing version on aarch64-linux looks like:
...
(gdb) print x^M
$1 = 170141183460469231731687303715884105727^M
(gdb) PASS: gdb.ada/verylong.exp: print x
...
The difference is caused by the size of the type Long_Long_Long_Integer,
which
is:
- a 128-bit signed on 64-bit targets, and
- a 64-bit signed on 32-bit target.
Fix this by detecting the size of the Long_Long_Long_Integer type, and
handling it.
Tested on aarch64-linux and aarch32-linux.
Approved-By: Tom Tromey <tom@tromey.com>
PR testsuite/31574
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31574
[1]
https://gcc.gnu.org/onlinedocs/gnat_rm/Implementation-Defined-Characteristics.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug testsuite/31574] [gdb, 32-bit] FAIL: gdb.ada/verylong.exp: print x
2024-03-29 7:51 [Bug ada/31574] New: [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x vries at gcc dot gnu.org
` (4 preceding siblings ...)
2024-04-02 14:14 ` cvs-commit at gcc dot gnu.org
@ 2024-04-02 14:16 ` vries at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-04-02 14:16 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31574
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|ada |testsuite
Status|NEW |RESOLVED
Target Milestone|--- |15.1
Resolution|--- |FIXED
Summary|[gdb, armv8l] FAIL: |[gdb, 32-bit] FAIL:
|gdb.ada/verylong.exp: print |gdb.ada/verylong.exp: print
|x |x
--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-04-02 14:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29 7:51 [Bug ada/31574] New: [gdb, armv8l] FAIL: gdb.ada/verylong.exp: print x vries at gcc dot gnu.org
2024-03-29 11:53 ` [Bug ada/31574] " tromey at sourceware dot org
2024-03-29 11:57 ` vries at gcc dot gnu.org
2024-03-29 12:17 ` vries at gcc dot gnu.org
2024-03-29 12:38 ` vries at gcc dot gnu.org
2024-04-02 14:14 ` cvs-commit at gcc dot gnu.org
2024-04-02 14:16 ` [Bug testsuite/31574] [gdb, 32-bit] " vries at gcc dot gnu.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).