diff options
author | Tom Tromey <tromey@adacore.com> | 2023-03-27 13:05:03 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-04-17 10:43:06 -0600 |
commit | d760ae22b964995234e14e090ba179311382b90d (patch) | |
tree | 48bbb6beade2bd14470bc6631e988c2729608637 /gdb/testsuite | |
parent | 5309ce2f04d8b76ff8a8005f6115cdf544d83bf7 (diff) | |
download | gdb-d760ae22b964995234e14e090ba179311382b90d.zip gdb-d760ae22b964995234e14e090ba179311382b90d.tar.gz gdb-d760ae22b964995234e14e090ba179311382b90d.tar.bz2 |
Add 128-bit integer support to the Rust parser
This adds support for 128-bit integers to the Rust parser.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=21185
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.base/parse_number.exp | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.rust/onetwoeight.exp | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.base/parse_number.exp b/gdb/testsuite/gdb.base/parse_number.exp index 0710443..5dd4fa7 100644 --- a/gdb/testsuite/gdb.base/parse_number.exp +++ b/gdb/testsuite/gdb.base/parse_number.exp @@ -108,9 +108,10 @@ proc parse_number { lang n } { return [list "i32" $n] } elseif { [fits_in_type $n 64 s] } { return [list "i64" $n] - } elseif { [fits_in_type $n 64 u] } { - # Note: Interprets MAX_U64 as -1. - return [list "i64" $n] + } elseif { [fits_in_type $n 128 u] } { + return [list "i128" $n] + } elseif { [fits_in_type $n 128 u] } { + return [list "i128" $n] } else { # Overflow. return [list $re_overflow $re_overflow] diff --git a/gdb/testsuite/gdb.rust/onetwoeight.exp b/gdb/testsuite/gdb.rust/onetwoeight.exp index ef56bca..5ca3071 100644 --- a/gdb/testsuite/gdb.rust/onetwoeight.exp +++ b/gdb/testsuite/gdb.rust/onetwoeight.exp @@ -64,3 +64,7 @@ gdb_test "print x >> 2" "= 85070591730234615865843651857942052863" gdb_test "print/x x & mask" " = 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0" gdb_test "print/x x ^ mask" " = 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f" gdb_test "print/x mask | (mask >> 4)" " = 0xffffffffffffffffffffffffffffffff" + +gdb_test "print 170141183460469231731687303715884105727" \ + " = 170141183460469231731687303715884105727" +gdb_test "ptype 23i128" "type = i128" |