Files
binutils-gdb/gdb/testsuite/gdb.dap/rust-slices.rs
Tom Tromey 708cedb722 Handle array- and string-like values in no-op pretty printers
This changes the no-op pretty printers -- used by DAP -- to handle
array- and string-like objects known by the gdb core.  Two new tests
are added, one for Ada and one for Rust.
2023-09-05 11:10:24 -06:00

30 lines
919 B
Rust

// Copyright (C) 2023 Free Software Foundation, Inc.
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#![allow(dead_code)]
#![allow(unused_variables)]
#![allow(unused_assignments)]
fn empty () {
}
fn main () {
let array = [1,2,3,4];
let slice = &array[1..2];
let hello = "hello";
empty(); // STOP
}