debuginfo: Split debuginfo autotests into debuginfo-gdb and debuginfo-lldb

This commit is contained in:
Michael Woerister 2014-04-24 11:35:48 +02:00
parent 445988b478
commit 55a8bd56e5
108 changed files with 3601 additions and 3236 deletions

23
configure vendored
View file

@ -466,6 +466,26 @@ probe CFG_PDFLATEX pdflatex
probe CFG_XELATEX xelatex
probe CFG_LUALATEX lualatex
probe CFG_GDB gdb
probe CFG_LLDB lldb
if [ ! -z "$CFG_LLDB" ]
then
# If CFG_LLDB_PYTHON_DIR is not already set from the outside and valid, try to read it from
# LLDB via the -P commandline options.
if [ -z "$CFG_LLDB_PYTHON_DIR" ] || [ ! -d "$CFG_LLDB_PYTHON_DIR" ]
then
CFG_LLDB_PYTHON_DIR=$($CFG_LLDB -P)
# If CFG_LLDB_PYTHON_DIR is not a valid directory, set it to something more readable
if [ ! -d "$CFG_LLDB_PYTHON_DIR" ]
then
CFG_LLDB_PYTHON_DIR="LLDB_PYTHON_DIRECTORY_NOT_FOUND"
fi
putvar CFG_LLDB_PYTHON_DIR
fi
fi
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
then
probe CFG_PAXCTL paxctl /sbin/paxctl
@ -807,7 +827,8 @@ do
make_dir $h/test/bench
make_dir $h/test/perf
make_dir $h/test/pretty
make_dir $h/test/debug-info
make_dir $h/test/debuginfo-gdb
make_dir $h/test/debuginfo-lldb
make_dir $h/test/codegen
make_dir $h/test/doc-tutorial
make_dir $h/test/doc-guide-ffi

View file

@ -293,7 +293,8 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
check-stage$(1)-T-$(2)-H-$(3)-bench-exec \
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-exec \
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
check-stage$(1)-T-$(2)-H-$(3)-doc-exec \
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec
@ -460,7 +461,8 @@ CFAIL_RC := $(wildcard $(S)src/test/compile-fail/*.rc)
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
DEBUGINFO_RS := $(wildcard $(S)src/test/debug-info/*.rs)
DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
DEBUGINFO_LLDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
CODEGEN_RS := $(wildcard $(S)src/test/codegen/*.rs)
CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
@ -476,7 +478,8 @@ CFAIL_TESTS := $(CFAIL_RC) $(CFAIL_RS)
BENCH_TESTS := $(BENCH_RS)
PERF_TESTS := $(PERF_RS)
PRETTY_TESTS := $(PRETTY_RS)
DEBUGINFO_TESTS := $(DEBUGINFO_RS)
DEBUGINFO_GDB_TESTS := $(DEBUGINFO_GDB_RS)
DEBUGINFO_LLDB_TESTS := $(DEBUGINFO_LLDB_RS)
CODEGEN_TESTS := $(CODEGEN_RS) $(CODEGEN_CC)
CTEST_SRC_BASE_rpass = run-pass
@ -514,10 +517,15 @@ CTEST_BUILD_BASE_perf = perf
CTEST_MODE_perf = run-pass
CTEST_RUNTOOL_perf = $(CTEST_PERF_RUNTOOL)
CTEST_SRC_BASE_debuginfo = debug-info
CTEST_BUILD_BASE_debuginfo = debug-info
CTEST_MODE_debuginfo = debug-info
CTEST_RUNTOOL_debuginfo = $(CTEST_RUNTOOL)
CTEST_SRC_BASE_debuginfo-gdb = debuginfo
CTEST_BUILD_BASE_debuginfo-gdb = debuginfo-gdb
CTEST_MODE_debuginfo-gdb = debuginfo-gdb
CTEST_RUNTOOL_debuginfo-gdb = $(CTEST_RUNTOOL)
CTEST_SRC_BASE_debuginfo-lldb = debuginfo
CTEST_BUILD_BASE_debuginfo-lldb = debuginfo-lldb
CTEST_MODE_debuginfo-lldb = debuginfo-lldb
CTEST_RUNTOOL_debuginfo-lldb = $(CTEST_RUNTOOL)
CTEST_SRC_BASE_codegen = codegen
CTEST_BUILD_BASE_codegen = codegen
@ -529,15 +537,22 @@ CTEST_RUNTOOL_codegen = $(CTEST_RUNTOOL)
# during attempts to run those tests.
ifeq ($(CFG_GDB),)
CTEST_DISABLE_debuginfo = "no gdb found"
CTEST_DISABLE_debuginfo-gdb = "no gdb found"
endif
ifeq ($(CFG_LLDB),)
CTEST_DISABLE_debuginfo-lldb = "no lldb found"
endif
# Completely disable LLDB tests for now
CTEST_DISABLE_debuginfo-lldb = "LLDB tests are not enabled yet"
ifeq ($(CFG_CLANG),)
CTEST_DISABLE_codegen = "no clang found"
endif
ifeq ($(CFG_OSTYPE),apple-darwin)
CTEST_DISABLE_debuginfo = "gdb on darwing needs root"
CTEST_DISABLE_debuginfo-gdb = "gdb on darwing needs root"
endif
# CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that
@ -587,6 +602,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
--adb-path=$(CFG_ADB) \
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
--host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(3))" \
--lldb-python-dir=$(CFG_LLDB_PYTHON_DIR) \
--target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
$$(CTEST_TESTARGS)
@ -597,7 +613,8 @@ CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS)
CTEST_DEPS_debuginfo_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_TESTS)
CTEST_DEPS_debuginfo-gdb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_GDB_TESTS)
CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS)
CTEST_DEPS_codegen_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_TESTS)
endef
@ -661,7 +678,7 @@ endif
endef
CTEST_NAMES = rpass rpass-full cfail-full rfail cfail bench perf debuginfo codegen
CTEST_NAMES = rpass rpass-full cfail-full rfail cfail bench perf debuginfo-gdb debuginfo-lldb codegen
$(foreach host,$(CFG_HOST), \
$(eval $(foreach target,$(CFG_TARGET), \
@ -810,7 +827,8 @@ TEST_GROUPS = \
bench \
perf \
rmake \
debuginfo \
debuginfo-gdb \
debuginfo-lldb \
codegen \
doc \
$(foreach docname,$(DOCS),doc-$(docname)) \

View file

@ -14,7 +14,8 @@ pub enum mode {
mode_run_fail,
mode_run_pass,
mode_pretty,
mode_debug_info,
mode_debug_info_gdb,
mode_debug_info_lldb,
mode_codegen
}
@ -101,6 +102,9 @@ pub struct config {
// status whether android device available or not
pub adb_device_status: bool,
// the path containing LLDB's Python module
pub lldb_python_dir: Option<~str>,
// Explain what's going on
pub verbose: bool

View file

@ -28,14 +28,8 @@ use std::os;
use std::io;
use std::io::fs;
use getopts::{optopt, optflag, reqopt};
use common::config;
use common::mode_run_pass;
use common::mode_run_fail;
use common::mode_compile_fail;
use common::mode_pretty;
use common::mode_debug_info;
use common::mode_codegen;
use common::mode;
use common::{config, mode_run_pass, mode_run_fail, mode_compile_fail, mode_pretty,
mode_debug_info_gdb, mode_debug_info_lldb, mode_codegen, mode};
use util::logv;
pub mod procsrv;
@ -87,6 +81,7 @@ pub fn parse_config(args: Vec<~str> ) -> config {
optopt("", "host", "the host to build for", "HOST"),
optopt("", "adb-path", "path to the android debugger", "PATH"),
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
optopt("", "lldb-python-dir", "directory containing LLDB's python module", "PATH"),
optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite", "A.B"),
optflag("h", "help", "show this message"));
@ -154,6 +149,7 @@ pub fn parse_config(args: Vec<~str> ) -> config {
"arm-linux-androideabi" == opt_str2(matches.opt_str("target")) &&
"(none)" != opt_str2(matches.opt_str("adb-test-dir")) &&
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
lldb_python_dir: matches.opt_str("lldb-python-dir"),
test_shard: test::opt_shard(matches.opt_str("test-shard")),
verbose: matches.opt_present("verbose")
}
@ -204,13 +200,14 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str {
pub fn str_mode(s: ~str) -> mode {
match s.as_slice() {
"compile-fail" => mode_compile_fail,
"run-fail" => mode_run_fail,
"run-pass" => mode_run_pass,
"pretty" => mode_pretty,
"debug-info" => mode_debug_info,
"codegen" => mode_codegen,
_ => fail!("invalid mode")
"compile-fail" => mode_compile_fail,
"run-fail" => mode_run_fail,
"run-pass" => mode_run_pass,
"pretty" => mode_pretty,
"debuginfo-gdb" => mode_debug_info_gdb,
"debuginfo-lldb" => mode_debug_info_lldb,
"codegen" => mode_codegen,
s => fail!("invalid mode: " + s)
}
}
@ -220,7 +217,8 @@ pub fn mode_str(mode: mode) -> ~str {
mode_run_fail => "run-fail".to_owned(),
mode_run_pass => "run-pass".to_owned(),
mode_pretty => "pretty".to_owned(),
mode_debug_info => "debug-info".to_owned(),
mode_debug_info_gdb => "debuginfo-gdb".to_owned(),
mode_debug_info_lldb => "debuginfo-lldb".to_owned(),
mode_codegen => "codegen".to_owned(),
}
}
@ -228,7 +226,7 @@ pub fn mode_str(mode: mode) -> ~str {
pub fn run_tests(config: &config) {
if config.target == "arm-linux-androideabi".to_owned() {
match config.mode{
mode_debug_info => {
mode_debug_info_gdb => {
println!("arm-linux-androideabi debug-info \
test uses tcp 5039 port. please reserve it");
}

View file

@ -26,8 +26,6 @@ pub struct TestProps {
pub aux_builds: Vec<~str> ,
// Environment settings to use during execution
pub exec_env: Vec<(~str,~str)> ,
// Commands to be given to the debugger, when testing debug info
pub debugger_cmds: Vec<~str> ,
// Lines to check if they appear in the expected debugger output
pub check_lines: Vec<~str> ,
// Flag to force a crate to be built with the host architecture
@ -46,7 +44,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
let mut compile_flags = None;
let mut run_flags = None;
let mut pp_exact = None;
let mut debugger_cmds = Vec::new();
let mut check_lines = Vec::new();
let mut force_host = false;
let mut check_stdout = false;
@ -91,11 +88,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
None => {}
}
match parse_debugger_cmd(ln) {
Some(dc) => debugger_cmds.push(dc),
None => ()
};
match parse_check_line(ln) {
Some(cl) => check_lines.push(cl),
None => ()
@ -111,7 +103,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
pp_exact: pp_exact,
aux_builds: aux_builds,
exec_env: exec_env,
debugger_cmds: debugger_cmds,
check_lines: check_lines,
force_host: force_host,
check_stdout: check_stdout,
@ -173,10 +164,6 @@ fn parse_run_flags(line: &str) -> Option<~str> {
parse_name_value_directive(line, "run-flags".to_owned())
}
fn parse_debugger_cmd(line: &str) -> Option<~str> {
parse_name_value_directive(line, "debugger".to_owned())
}
fn parse_check_line(line: &str) -> Option<~str> {
parse_name_value_directive(line, "check".to_owned())
}
@ -226,7 +213,7 @@ fn parse_name_directive(line: &str, directive: &str) -> bool {
line.contains(directive)
}
fn parse_name_value_directive(line: &str,
pub fn parse_name_value_directive(line: &str,
directive: ~str) -> Option<~str> {
let keycolon = directive + ":";
match line.find_str(keycolon) {

View file

@ -8,14 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use common::config;
use common::mode_compile_fail;
use common::mode_pretty;
use common::mode_run_fail;
use common::mode_run_pass;
use common::{config, mode_compile_fail, mode_pretty, mode_run_fail, mode_run_pass};
use errors;
use header::TestProps;
use header::load_props;
use header;
use procsrv;
use util::logv;
#[cfg(target_os = "win32")]
@ -59,14 +55,15 @@ pub fn run_metrics(config: config, testfile: ~str, mm: &mut MetricMap) {
}
let testfile = Path::new(testfile);
debug!("running {}", testfile.display());
let props = load_props(&testfile);
let props = header::load_props(&testfile);
debug!("loaded props");
match config.mode {
mode_compile_fail => run_cfail_test(&config, &props, &testfile),
mode_run_fail => run_rfail_test(&config, &props, &testfile),
mode_run_pass => run_rpass_test(&config, &props, &testfile),
mode_pretty => run_pretty_test(&config, &props, &testfile),
mode_debug_info => run_debuginfo_test(&config, &props, &testfile),
mode_debug_info_gdb => run_debuginfo_gdb_test(&config, &props, &testfile),
mode_debug_info_lldb => run_debuginfo_lldb_test(&config, &props, &testfile),
mode_codegen => run_codegen_test(&config, &props, &testfile, mm)
}
}
@ -259,7 +256,7 @@ actual:\n\
}
}
fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
fn run_debuginfo_gdb_test(config: &config, props: &TestProps, testfile: &Path) {
let mut config = config {
target_rustcflags: cleanup_debug_info_options(&config.target_rustcflags),
host_rustcflags: cleanup_debug_info_options(&config.host_rustcflags),
@ -267,18 +264,19 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
};
let config = &mut config;
let check_lines = &props.check_lines;
let mut cmds = props.debugger_cmds.connect("\n");
let DebuggerCommands { commands, check_lines, .. } = parse_debugger_commands(testfile, "gdb");
let mut cmds = commands.connect("\n");
// compile test file (it shoud have 'compile-flags:-g' in the header)
let mut proc_res = compile_test(config, props, testfile);
if !proc_res.status.success() {
fatal_ProcRes("compilation failed!".to_owned(), &proc_res);
let compiler_run_result = compile_test(config, props, testfile);
if !compiler_run_result.status.success() {
fatal_ProcRes("compilation failed!".to_owned(), &compiler_run_result);
}
let exe_file = make_exe_name(config, testfile);
let mut proc_args;
let debugger_run_result;
match config.target.as_slice() {
"arm-linux-androideabi" => {
@ -363,10 +361,12 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
cmdline
};
proc_res = ProcRes {status: status,
stdout: out,
stderr: err,
cmdline: cmdline};
debugger_run_result = ProcRes {
status: status,
stdout: out,
stderr: err,
cmdline: cmdline
};
process.signal_kill().unwrap();
}
@ -391,25 +391,199 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
"-command=" + debugger_script.as_str().unwrap().to_owned(),
exe_file.as_str().unwrap().to_owned());
proc_args = ProcArgs {prog: debugger(), args: debugger_opts};
proc_res = compose_and_run(config, testfile, proc_args, Vec::new(), "", None);
debugger_run_result = compose_and_run(config,
testfile,
proc_args,
Vec::new(),
"",
None);
}
}
if !proc_res.status.success() {
if !debugger_run_result.status.success() {
fatal("gdb failed to execute".to_owned());
}
check_debugger_output(&debugger_run_result, check_lines.as_slice());
}
fn run_debuginfo_lldb_test(config: &config, props: &TestProps, testfile: &Path) {
use std::io::process::{Process, ProcessConfig, ProcessOutput};
if config.lldb_python_dir.is_none() {
fatal("Can't run LLDB test because LLDB's python path is not set.".to_owned());
}
let mut config = config {
target_rustcflags: cleanup_debug_info_options(&config.target_rustcflags),
host_rustcflags: cleanup_debug_info_options(&config.host_rustcflags),
.. config.clone()
};
let config = &mut config;
// compile test file (it shoud have 'compile-flags:-g' in the header)
let compile_result = compile_test(config, props, testfile);
if !compile_result.status.success() {
fatal_ProcRes("compilation failed!".to_owned(), &compile_result);
}
let exe_file = make_exe_name(config, testfile);
// Parse debugger commands etc from test files
let DebuggerCommands {
commands,
check_lines,
breakpoint_lines
} = parse_debugger_commands(testfile, "lldb");
// Write debugger script:
// We don't want to hang when calling `quit` while the process is still running
let mut script_str = StrBuf::from_str("settings set auto-confirm true\n");
// Set breakpoints on every line that contains the string "#break"
for line in breakpoint_lines.iter() {
script_str.push_str(format!("breakpoint set --line {}\n", line));
}
// Append the other commands
for line in commands.iter() {
script_str.push_str(line.as_slice());
script_str.push_str("\n");
}
// Finally, quit the debugger
script_str.push_str("quit\n");
// Write the script into a file
debug!("script_str = {}", script_str);
dump_output_file(config, testfile, script_str.into_owned(), "debugger.script");
let debugger_script = make_out_name(config, testfile, "debugger.script");
// Let LLDB execute the script via lldb_batchmode.py
let debugger_run_result = run_lldb(config, &exe_file, &debugger_script);
if !debugger_run_result.status.success() {
fatal_ProcRes("Error while running LLDB".to_owned(), &debugger_run_result);
}
check_debugger_output(&debugger_run_result, check_lines.as_slice());
fn run_lldb(config: &config, test_executable: &Path, debugger_script: &Path) -> ProcRes {
// Prepare the lldb_batchmode which executes the debugger script
let lldb_batchmode_script = "./src/etc/lldb_batchmode.py".to_owned();
let test_executable_str = test_executable.as_str().unwrap().to_owned();
let debugger_script_str = debugger_script.as_str().unwrap().to_owned();
let commandline = format!("python {} {} {}",
lldb_batchmode_script.as_slice(),
test_executable_str.as_slice(),
debugger_script_str.as_slice());
let args = &[lldb_batchmode_script, test_executable_str, debugger_script_str];
let env = &[("PYTHONPATH".to_owned(), config.lldb_python_dir.clone().unwrap())];
let mut opt_process = Process::configure(ProcessConfig {
program: "python",
args: args,
env: Some(env),
.. ProcessConfig::new()
});
let (status, out, err) = match opt_process {
Ok(ref mut process) => {
let ProcessOutput { status, output, error } = process.wait_with_output();
(status,
str::from_utf8(output.as_slice()).unwrap().to_owned(),
str::from_utf8(error.as_slice()).unwrap().to_owned())
},
Err(e) => {
fatal(format!("Failed to setup Python process for LLDB script: {}", e))
}
};
dump_output(config, test_executable, out, err);
return ProcRes {
status: status,
stdout: out,
stderr: err,
cmdline: commandline
};
}
}
struct DebuggerCommands
{
commands: Vec<~str>,
check_lines: Vec<~str>,
breakpoint_lines: Vec<uint>
}
fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str) -> DebuggerCommands {
use std::io::{BufferedReader, File};
let command_directive = debugger_prefix + "-command";
let check_directive = debugger_prefix + "-check";
let mut breakpoint_lines = vec!();
let mut commands = vec!();
let mut check_lines = vec!();
let mut counter = 1;
let mut reader = BufferedReader::new(File::open(file_path).unwrap());
for line in reader.lines() {
match line {
Ok(line) => {
if line.contains("#break") {
breakpoint_lines.push(counter);
}
header::parse_name_value_directive(line, command_directive.clone())
.map(|cmd| commands.push(cmd));
header::parse_name_value_directive(line, check_directive.clone())
.map(|cmd| check_lines.push(cmd));
}
Err(e) => {
fatal(format!("Error while parsing debugger commands: {}", e))
}
}
counter += 1;
}
DebuggerCommands {
commands: commands,
check_lines: check_lines,
breakpoint_lines: breakpoint_lines
}
}
fn cleanup_debug_info_options(options: &Option<~str>) -> Option<~str> {
if options.is_none() {
return None;
}
// Remove options that are either unwanted (-O) or may lead to duplicates due to RUSTFLAGS.
let options_to_remove = ["-O".to_owned(), "-g".to_owned(), "--debuginfo".to_owned()];
let new_options = split_maybe_args(options).move_iter()
.filter(|x| !options_to_remove.contains(x))
.collect::<Vec<~str>>()
.connect(" ");
Some(new_options)
}
fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[~str]) {
let num_check_lines = check_lines.len();
if num_check_lines > 0 {
// Allow check lines to leave parts unspecified (e.g., uninitialized
// bits in the wrong case of an enum) with the notation "[...]".
let check_fragments: Vec<Vec<~str>> =
check_lines.iter().map(|s| {
s.split_str("[...]").map(|x| x.to_str()).collect()
s.trim().split_str("[...]").map(|x| x.to_str()).collect()
}).collect();
// check if each line in props.check_lines appears in the
// output (in order)
let mut i = 0u;
for line in proc_res.stdout.lines() {
for line in debugger_run_result.stdout.lines() {
let mut rest = line.trim();
let mut first = true;
let mut failed = false;
@ -440,23 +614,9 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
}
if i != num_check_lines {
fatal_ProcRes(format!("line not found in debugger output: {}",
*check_lines.get(i)), &proc_res);
check_lines.get(i).unwrap()), debugger_run_result);
}
}
fn cleanup_debug_info_options(options: &Option<~str>) -> Option<~str> {
if options.is_none() {
return None;
}
// Remove options that are either unwanted (-O) or may lead to duplicates due to RUSTFLAGS.
let options_to_remove = ["-O".to_owned(), "-g".to_owned(), "--debuginfo".to_owned()];
let new_options = split_maybe_args(options).move_iter()
.filter(|x| !options_to_remove.contains(x))
.collect::<Vec<~str>>()
.connect(" ");
Some(new_options)
}
}
fn check_error_patterns(props: &TestProps,
@ -736,7 +896,7 @@ fn compose_and_run_compiler(
for rel_ab in props.aux_builds.iter() {
let abs_ab = config.aux_base.join(rel_ab.as_slice());
let aux_props = load_props(&abs_ab);
let aux_props = header::load_props(&abs_ab);
let crate_type = if aux_props.no_prefer_dynamic {
Vec::new()
} else {

184
src/etc/lldb_batchmode.py Normal file
View file

@ -0,0 +1,184 @@
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.
# This script allows to use LLDB in a way similar to GDB's batch mode. That is, given a text file
# containing LLDB commands (one command per line), this script will execute the commands one after
# the other.
# LLDB also has the -s and -S commandline options which also execute a list of commands from a text
# file. However, this command are execute `immediately`: a the command of a `run` or `continue`
# command will be executed immediately after the `run` or `continue`, without waiting for the next
# breakpoint to be hit. This a command sequence like the following will not yield reliable results:
#
# break 11
# run
# print x
#
# Most of the time the `print` command will be executed while the program is still running will thus
# fail. Using this Python script, the above will work as expected.
from __future__ import print_function
import lldb
import os
import sys
import threading
import re
import atexit
# Terminate the debugger
atexit.register(lambda: lldb.SBDebugger.Terminate())
# Set this to True for additional output
DEBUG_OUTPUT = False
def print_debug(s):
"Print something if DEBUG_OUTPUT is True"
global DEBUG_OUTPUT
if DEBUG_OUTPUT:
print("DEBUG: " + str(s))
def normalize_whitespace(s):
"Replace newlines, tabs, multiple spaces, etc with exactly one space"
return re.sub("\s+", " ", s)
# This callback is registered with every breakpoint and makes sure that the frame containing the
# breakpoint location is selected
def breakpoint_callback(frame, bp_loc, dict):
"Called whenever a breakpoint is hit"
print("Hit breakpoint " + str(bp_loc))
# Select the frame and the thread containing it
frame.thread.process.SetSelectedThread(frame.thread)
frame.thread.SetSelectedFrame(frame.idx)
# Returning True means that we actually want to stop at this breakpoint
return True
# This is a list of breakpoints that are not registered with the breakpoint callback. The list is
# populated by the breakpoint listener and checked/emptied whenever a command has been executed
new_breakpoints = []
# This set contains all breakpoint ids that have already been registered with a callback, and is
# used to avoid hooking callbacks into breakpoints more than once
registered_breakpoints = set()
def execute_command(command_interpreter, command):
"Executes a single CLI command"
global new_breakpoints
global registered_breakpoints
res = lldb.SBCommandReturnObject()
print(command)
command_interpreter.HandleCommand(command, res)
if res.Succeeded():
if res.HasResult():
print(normalize_whitespace(res.GetOutput()), end = '\n')
# If the command introduced any breakpoints, make sure to register them with the breakpoint
# callback
while len(new_breakpoints) > 0:
res.Clear()
breakpoint_id = new_breakpoints.pop()
if breakpoint_id in registered_breakpoints:
print_debug("breakpoint with id %s is already registered. Ignoring." % str(breakpoint_id))
else:
print_debug("registering breakpoint callback, id = " + str(breakpoint_id))
callback_command = "breakpoint command add -F breakpoint_callback " + str(breakpoint_id)
command_interpreter.HandleCommand(callback_command, res)
if res.Succeeded():
print_debug("successfully registered breakpoint callback, id = " + str(breakpoint_id))
registered_breakpoints.add(breakpoint_id)
else:
print("Error while trying to register breakpoint callback, id = " + str(breakpoint_id))
else:
print(res.GetError())
def start_breakpoint_listener(target):
"Listens for breakpoints being added and adds new ones to the callback registration list"
listener = lldb.SBListener("breakpoint listener")
def listen():
event = lldb.SBEvent()
try:
while True:
if listener.WaitForEvent(120, event):
if lldb.SBBreakpoint.EventIsBreakpointEvent(event) and \
lldb.SBBreakpoint.GetBreakpointEventTypeFromEvent(event) == \
lldb.eBreakpointEventTypeAdded:
global new_breakpoints
breakpoint = lldb.SBBreakpoint.GetBreakpointFromEvent(event)
print_debug("breakpoint added, id = " + str(breakpoint.id))
new_breakpoints.append(breakpoint.id)
except:
print_debug("breakpoint listener shutting down")
# Start the listener and let it run as a daemon
listener_thread = threading.Thread(target = listen)
listener_thread.daemon = True
listener_thread.start()
# Register the listener with the target
target.GetBroadcaster().AddListener(listener, lldb.SBTarget.eBroadcastBitBreakpointChanged)
####################################################################################################
# ~main
####################################################################################################
if len(sys.argv) != 3:
print("usage: python lldb_batchmode.py target-path script-path")
sys.exit(1)
target_path = sys.argv[1]
script_path = sys.argv[2]
# Create a new debugger instance
debugger = lldb.SBDebugger.Create()
# When we step or continue, don't return from the function until the process
# stops. We do this by setting the async mode to false.
debugger.SetAsync(False)
# Create a target from a file and arch
print("Creating a target for '%s'" % target_path)
target = debugger.CreateTargetWithFileAndArch(target_path, lldb.LLDB_ARCH_DEFAULT)
if not target:
print("Could not create debugging target '" + target_path + "'. Aborting.", file=sys.stderr)
sys.exit(1)
# Register the breakpoint callback for every breakpoint
start_breakpoint_listener(target)
command_interpreter = debugger.GetCommandInterpreter()
try:
script_file = open(script_path, 'r')
for line in script_file:
command = line.strip()
if command != '':
execute_command(command_interpreter, command)
except IOError as e:
print("Could not read debugging script '%s'." % script_path, file = sys.stderr)
print(e, file = sys.stderr)
print("Aborting.", file = sys.stderr)
sys.exit(1)
finally:
script_file.close()

View file

@ -1,73 +0,0 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-win32: FIXME #13256
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:whatis 'basic-types-globals-metadata::B'
// check:type = bool
// debugger:whatis 'basic-types-globals-metadata::I'
// check:type = int
// debugger:whatis 'basic-types-globals-metadata::C'
// check:type = char
// debugger:whatis 'basic-types-globals-metadata::I8'
// check:type = i8
// debugger:whatis 'basic-types-globals-metadata::I16'
// check:type = i16
// debugger:whatis 'basic-types-globals-metadata::I32'
// check:type = i32
// debugger:whatis 'basic-types-globals-metadata::I64'
// check:type = i64
// debugger:whatis 'basic-types-globals-metadata::U'
// check:type = uint
// debugger:whatis 'basic-types-globals-metadata::U8'
// check:type = u8
// debugger:whatis 'basic-types-globals-metadata::U16'
// check:type = u16
// debugger:whatis 'basic-types-globals-metadata::U32'
// check:type = u32
// debugger:whatis 'basic-types-globals-metadata::U64'
// check:type = u64
// debugger:whatis 'basic-types-globals-metadata::F32'
// check:type = f32
// debugger:whatis 'basic-types-globals-metadata::F64'
// check:type = f64
// debugger:continue
#![allow(unused_variable)]
#![allow(dead_code)]
static B: bool = false;
static I: int = -1;
static C: char = 'a';
static I8: i8 = 68;
static I16: i16 = -16;
static I32: i32 = -32;
static I64: i64 = -64;
static U: uint = 1;
static U8: u8 = 100;
static U16: u16 = 16;
static U32: u32 = 32;
static U64: u64 = 64;
static F32: f32 = 2.5;
static F64: f64 = 3.5;
fn main() {
_zzz();
let a = (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64);
}
fn _zzz() {()}

View file

@ -1,129 +0,0 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Caveats - gdb prints any 8-bit value (meaning rust I8 and u8 values)
// as its numerical value along with its associated ASCII char, there
// doesn't seem to be any way around this. Also, gdb doesn't know
// about UTF-32 character encoding and will print a rust char as only
// its numerical value.
// ignore-win32: FIXME #13256
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// Check initializers
// debugger:print 'basic-types-mut-globals::B'
// check:$1 = false
// debugger:print 'basic-types-mut-globals::I'
// check:$2 = -1
// debugger:print 'basic-types-mut-globals::C'
// check:$3 = 97
// debugger:print/d 'basic-types-mut-globals::I8'
// check:$4 = 68
// debugger:print 'basic-types-mut-globals::I16'
// check:$5 = -16
// debugger:print 'basic-types-mut-globals::I32'
// check:$6 = -32
// debugger:print 'basic-types-mut-globals::I64'
// check:$7 = -64
// debugger:print 'basic-types-mut-globals::U'
// check:$8 = 1
// debugger:print/d 'basic-types-mut-globals::U8'
// check:$9 = 100
// debugger:print 'basic-types-mut-globals::U16'
// check:$10 = 16
// debugger:print 'basic-types-mut-globals::U32'
// check:$11 = 32
// debugger:print 'basic-types-mut-globals::U64'
// check:$12 = 64
// debugger:print 'basic-types-mut-globals::F32'
// check:$13 = 2.5
// debugger:print 'basic-types-mut-globals::F64'
// check:$14 = 3.5
// debugger:continue
// Check new values
// debugger:print 'basic-types-mut-globals'::B
// check:$15 = true
// debugger:print 'basic-types-mut-globals'::I
// check:$16 = 2
// debugger:print 'basic-types-mut-globals'::C
// check:$17 = 102
// debugger:print/d 'basic-types-mut-globals'::I8
// check:$18 = 78
// debugger:print 'basic-types-mut-globals'::I16
// check:$19 = -26
// debugger:print 'basic-types-mut-globals'::I32
// check:$20 = -12
// debugger:print 'basic-types-mut-globals'::I64
// check:$21 = -54
// debugger:print 'basic-types-mut-globals'::U
// check:$22 = 5
// debugger:print/d 'basic-types-mut-globals'::U8
// check:$23 = 20
// debugger:print 'basic-types-mut-globals'::U16
// check:$24 = 32
// debugger:print 'basic-types-mut-globals'::U32
// check:$25 = 16
// debugger:print 'basic-types-mut-globals'::U64
// check:$26 = 128
// debugger:print 'basic-types-mut-globals'::F32
// check:$27 = 5.75
// debugger:print 'basic-types-mut-globals'::F64
// check:$28 = 9.25
// debugger:detach
// debugger:quit
#![allow(unused_variable)]
static mut B: bool = false;
static mut I: int = -1;
static mut C: char = 'a';
static mut I8: i8 = 68;
static mut I16: i16 = -16;
static mut I32: i32 = -32;
static mut I64: i64 = -64;
static mut U: uint = 1;
static mut U8: u8 = 100;
static mut U16: u16 = 16;
static mut U32: u32 = 32;
static mut U64: u64 = 64;
static mut F32: f32 = 2.5;
static mut F64: f64 = 3.5;
fn main() {
_zzz();
unsafe {
B = true;
I = 2;
C = 'f';
I8 = 78;
I16 = -26;
I32 = -12;
I64 = -54;
U = 5;
U8 = 20;
U16 = 32;
U32 = 16;
U64 = 128;
F32 = 5.75;
F64 = 9.25;
}
_zzz();
}
fn _zzz() {()}

View file

@ -1,127 +0,0 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// FIRST ITERATION
// debugger:finish
// debugger:print x
// check:$1 = 0
// debugger:continue
// debugger:finish
// debugger:print x
// check:$2 = 1
// debugger:continue
// debugger:finish
// debugger:print x
// check:$3 = 101
// debugger:continue
// debugger:finish
// debugger:print x
// check:$4 = 101
// debugger:continue
// debugger:finish
// debugger:print x
// check:$5 = -987
// debugger:continue
// debugger:finish
// debugger:print x
// check:$6 = 101
// debugger:continue
// SECOND ITERATION
// debugger:finish
// debugger:print x
// check:$7 = 1
// debugger:continue
// debugger:finish
// debugger:print x
// check:$8 = 2
// debugger:continue
// debugger:finish
// debugger:print x
// check:$9 = 102
// debugger:continue
// debugger:finish
// debugger:print x
// check:$10 = 102
// debugger:continue
// debugger:finish
// debugger:print x
// check:$11 = -987
// debugger:continue
// debugger:finish
// debugger:print x
// check:$12 = 102
// debugger:continue
// debugger:finish
// debugger:print x
// check:$13 = 2
// debugger:continue
fn main() {
let mut x = 0;
loop {
if x >= 2 {
break;
}
zzz();
sentinel();
x += 1;
zzz();
sentinel();
// Shadow x
let x = x + 100;
zzz();
sentinel();
// open scope within loop's top level scope
{
zzz();
sentinel();
let x = -987;
zzz();
sentinel();
}
// Check that we get the x before the inner scope again
zzz();
sentinel();
}
zzz();
sentinel();
}
fn zzz() {()}
fn sentinel() {()}

View file

@ -1,123 +0,0 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// FIRST ITERATION
// debugger:finish
// debugger:print x
// check:$1 = 0
// debugger:continue
// debugger:finish
// debugger:print x
// check:$2 = 1
// debugger:continue
// debugger:finish
// debugger:print x
// check:$3 = 101
// debugger:continue
// debugger:finish
// debugger:print x
// check:$4 = 101
// debugger:continue
// debugger:finish
// debugger:print x
// check:$5 = -987
// debugger:continue
// debugger:finish
// debugger:print x
// check:$6 = 101
// debugger:continue
// SECOND ITERATION
// debugger:finish
// debugger:print x
// check:$7 = 1
// debugger:continue
// debugger:finish
// debugger:print x
// check:$8 = 2
// debugger:continue
// debugger:finish
// debugger:print x
// check:$9 = 102
// debugger:continue
// debugger:finish
// debugger:print x
// check:$10 = 102
// debugger:continue
// debugger:finish
// debugger:print x
// check:$11 = -987
// debugger:continue
// debugger:finish
// debugger:print x
// check:$12 = 102
// debugger:continue
// debugger:finish
// debugger:print x
// check:$13 = 2
// debugger:continue
fn main() {
let mut x = 0;
while x < 2 {
zzz();
sentinel();
x += 1;
zzz();
sentinel();
// Shadow x
let x = x + 100;
zzz();
sentinel();
// open scope within loop's top level scope
{
zzz();
sentinel();
let x = -987;
zzz();
sentinel();
}
// Check that we get the x before the inner scope again
zzz();
sentinel();
}
zzz();
sentinel();
}
fn zzz() {()}
fn sentinel() {()}

View file

@ -1,377 +0,0 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-win32: FIXME #13256
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:print 'lexical-scopes-in-block-expression::MUT_INT'
// check:$1 = 0
// STRUCT EXPRESSION
// debugger:finish
// debugger:print val
// check:$2 = -1
// debugger:print ten
// check:$3 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$4 = 11
// debugger:print 'lexical-scopes-in-block-expression::MUT_INT'
// check:$5 = 1
// debugger:print ten
// check:$6 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$7 = -1
// debugger:print ten
// check:$8 = 10
// debugger:continue
// FUNCTION CALL
// debugger:finish
// debugger:print val
// check:$9 = -1
// debugger:print ten
// check:$10 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$11 = 12
// debugger:print 'lexical-scopes-in-block-expression::MUT_INT'
// check:$12 = 2
// debugger:print ten
// check:$13 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$14 = -1
// debugger:print ten
// check:$15 = 10
// debugger:continue
// TUPLE EXPRESSION
// debugger:finish
// debugger:print val
// check:$16 = -1
// debugger:print ten
// check:$17 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$18 = 13
// debugger:print 'lexical-scopes-in-block-expression::MUT_INT'
// check:$19 = 3
// debugger:print ten
// check:$20 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$21 = -1
// debugger:print ten
// check:$22 = 10
// debugger:continue
// VEC EXPRESSION
// debugger:finish
// debugger:print val
// check:$23 = -1
// debugger:print ten
// check:$24 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$25 = 14
// debugger:print 'lexical-scopes-in-block-expression::MUT_INT'
// check:$26 = 4
// debugger:print ten
// check:$27 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$28 = -1
// debugger:print ten
// check:$29 = 10
// debugger:continue
// REPEAT VEC EXPRESSION
// debugger:finish
// debugger:print val
// check:$30 = -1
// debugger:print ten
// check:$31 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$32 = 15
// debugger:print 'lexical-scopes-in-block-expression::MUT_INT'
// check:$33 = 5
// debugger:print ten
// check:$34 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$35 = -1
// debugger:print ten
// check:$36 = 10
// debugger:continue
// ASSIGNMENT EXPRESSION
// debugger:finish
// debugger:print val
// check:$37 = -1
// debugger:print ten
// check:$38 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$39 = 16
// debugger:print 'lexical-scopes-in-block-expression::MUT_INT'
// check:$40 = 6
// debugger:print ten
// check:$41 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$42 = -1
// debugger:print ten
// check:$43 = 10
// debugger:continue
// ARITHMETIC EXPRESSION
// debugger:finish
// debugger:print val
// check:$44 = -1
// debugger:print ten
// check:$45 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$46 = 17
// debugger:print 'lexical-scopes-in-block-expression::MUT_INT'
// check:$47 = 7
// debugger:print ten
// check:$48 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$49 = -1
// debugger:print ten
// check:$50 = 10
// debugger:continue
// INDEX EXPRESSION
// debugger:finish
// debugger:print val
// check:$51 = -1
// debugger:print ten
// check:$52 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$53 = 18
// debugger:print 'lexical-scopes-in-block-expression::MUT_INT'
// check:$54 = 8
// debugger:print ten
// check:$55 = 10
// debugger:continue
// debugger:finish
// debugger:print val
// check:$56 = -1
// debugger:print ten
// check:$57 = 10
// debugger:continue
#![allow(unused_variable)]
#![allow(dead_assignment)]
static mut MUT_INT: int = 0;
struct Point {
x: int,
y: int
}
fn a_function(x: int) -> int {
x + 1
}
fn main() {
let val = -1;
let ten = 10;
// surrounded by struct expression
let point = Point {
x: {
zzz();
sentinel();
let val = ten + 1;
unsafe {MUT_INT = 1;};
zzz();
sentinel();
val
},
y: 10
};
zzz();
sentinel();
// surrounded by function call
let _ = a_function({
zzz();
sentinel();
let val = ten + 2;
unsafe {MUT_INT = 2;};
zzz();
sentinel();
val
});
zzz();
sentinel();
// surrounded by tup
let _ = ({
zzz();
sentinel();
let val = ten + 3;
unsafe {MUT_INT = 3;};
zzz();
sentinel();
val
}, 0);
zzz();
sentinel();
// surrounded by vec
let _ = [{
zzz();
sentinel();
let val = ten + 4;
unsafe {MUT_INT = 4;};
zzz();
sentinel();
val
}, 0, 0];
zzz();
sentinel();
// surrounded by repeat vec
let _ = [{
zzz();
sentinel();
let val = ten + 5;
unsafe {MUT_INT = 5;};
zzz();
sentinel();
val
}, ..10];
zzz();
sentinel();
// assignment expression
let mut var = 0;
var = {
zzz();
sentinel();
let val = ten + 6;
unsafe {MUT_INT = 6;};
zzz();
sentinel();
val
};
zzz();
sentinel();
// arithmetic expression
var = 10 + -{
zzz();
sentinel();
let val = ten + 7;
unsafe {MUT_INT = 7;};
zzz();
sentinel();
val
} * 5;
zzz();
sentinel();
// index expression
let a_vector = [10, ..20];
let _ = a_vector[{
zzz();
sentinel();
let val = ten + 8;
unsafe {MUT_INT = 8;};
zzz();
sentinel();
val as uint
}];
zzz();
sentinel();
}
fn zzz() {()}
fn sentinel() {()}

View file

@ -1,113 +0,0 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-win32: FIXME #13256
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:print/d 'simple-tuple::NO_PADDING_8'
// check:$1 = {-50, 50}
// debugger:print 'simple-tuple::NO_PADDING_16'
// check:$2 = {-1, 2, 3}
// debugger:print 'simple-tuple::NO_PADDING_32'
// check:$3 = {4, 5, 6}
// debugger:print 'simple-tuple::NO_PADDING_64'
// check:$4 = {7, 8, 9}
// debugger:print 'simple-tuple::INTERNAL_PADDING_1'
// check:$5 = {10, 11}
// debugger:print 'simple-tuple::INTERNAL_PADDING_2'
// check:$6 = {12, 13, 14, 15}
// debugger:print 'simple-tuple::PADDING_AT_END'
// check:$7 = {16, 17}
// debugger:run
// debugger:finish
// debugger:print/d noPadding8
// check:$8 = {-100, 100}
// debugger:print noPadding16
// check:$9 = {0, 1, 2}
// debugger:print noPadding32
// check:$10 = {3, 4.5, 5}
// debugger:print noPadding64
// check:$11 = {6, 7.5, 8}
// debugger:print internalPadding1
// check:$12 = {9, 10}
// debugger:print internalPadding2
// check:$13 = {11, 12, 13, 14}
// debugger:print paddingAtEnd
// check:$14 = {15, 16}
// debugger:print/d 'simple-tuple::NO_PADDING_8'
// check:$15 = {-127, 127}
// debugger:print 'simple-tuple::NO_PADDING_16'
// check:$16 = {-10, 10, 9}
// debugger:print 'simple-tuple::NO_PADDING_32'
// check:$17 = {14, 15, 16}
// debugger:print 'simple-tuple::NO_PADDING_64'
// check:$18 = {17, 18, 19}
// debugger:print 'simple-tuple::INTERNAL_PADDING_1'
// check:$19 = {110, 111}
// debugger:print 'simple-tuple::INTERNAL_PADDING_2'
// check:$20 = {112, 113, 114, 115}
// debugger:print 'simple-tuple::PADDING_AT_END'
// check:$21 = {116, 117}
#![allow(unused_variable)]
#![allow(dead_code)]
static mut NO_PADDING_8: (i8, u8) = (-50, 50);
static mut NO_PADDING_16: (i16, i16, u16) = (-1, 2, 3);
static mut NO_PADDING_32: (i32, f32, u32) = (4, 5.0, 6);
static mut NO_PADDING_64: (i64, f64, u64) = (7, 8.0, 9);
static mut INTERNAL_PADDING_1: (i16, i32) = (10, 11);
static mut INTERNAL_PADDING_2: (i16, i32, u32, u64) = (12, 13, 14, 15);
static mut PADDING_AT_END: (i32, i16) = (16, 17);
fn main() {
let noPadding8: (i8, u8) = (-100, 100);
let noPadding16: (i16, i16, u16) = (0, 1, 2);
let noPadding32: (i32, f32, u32) = (3, 4.5, 5);
let noPadding64: (i64, f64, u64) = (6, 7.5, 8);
let internalPadding1: (i16, i32) = (9, 10);
let internalPadding2: (i16, i32, u32, u64) = (11, 12, 13, 14);
let paddingAtEnd: (i32, i16) = (15, 16);
unsafe {
NO_PADDING_8 = (-127, 127);
NO_PADDING_16 = (-10, 10, 9);
NO_PADDING_32 = (14, 15.0, 16);
NO_PADDING_64 = (17, 18.0, 19);
INTERNAL_PADDING_1 = (110, 111);
INTERNAL_PADDING_2 = (112, 113, 114, 115);
PADDING_AT_END = (116, 117);
}
zzz();
}
fn zzz() {()}

View file

@ -1,87 +0,0 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-win32: FIXME #13256
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:print empty.length
// check:$1 = 0
// debugger:print singleton.length
// check:$2 = 1
// debugger:print *((int64_t[1]*)(singleton.data_ptr))
// check:$3 = {1}
// debugger:print multiple.length
// check:$4 = 4
// debugger:print *((int64_t[4]*)(multiple.data_ptr))
// check:$5 = {2, 3, 4, 5}
// debugger:print slice_of_slice.length
// check:$6 = 2
// debugger:print *((int64_t[2]*)(slice_of_slice.data_ptr))
// check:$7 = {3, 4}
// debugger:print padded_tuple.length
// check:$8 = 2
// debugger:print padded_tuple.data_ptr[0]
// check:$9 = {6, 7}
// debugger:print padded_tuple.data_ptr[1]
// check:$10 = {8, 9}
// debugger:print padded_struct.length
// check:$11 = 2
// debugger:print padded_struct.data_ptr[0]
// check:$12 = {x = 10, y = 11, z = 12}
// debugger:print padded_struct.data_ptr[1]
// check:$13 = {x = 13, y = 14, z = 15}
// debugger:print 'vec-slices::MUT_VECT_SLICE'.length
// check:$14 = 2
// debugger:print *((int64_t[2]*)('vec-slices::MUT_VECT_SLICE'.data_ptr))
// check:$15 = {64, 65}
#![allow(unused_variable)]
struct AStruct {
x: i16,
y: i32,
z: i16
}
static VECT_SLICE: &'static [i64] = &[64, 65];
static mut MUT_VECT_SLICE: &'static [i64] = &[32];
fn main() {
let empty: &[i64] = &[];
let singleton: &[i64] = &[1];
let multiple: &[i64] = &[2, 3, 4, 5];
let slice_of_slice = multiple.slice(1,3);
let padded_tuple: &[(i32, i16)] = &[(6, 7), (8, 9)];
let padded_struct: &[AStruct] = &[
AStruct { x: 10, y: 11, z: 12 },
AStruct { x: 13, y: 14, z: 15 }
];
unsafe {
MUT_VECT_SLICE = VECT_SLICE;
}
zzz();
}
fn zzz() {()}

View file

@ -0,0 +1,73 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-win32: FIXME #13256
// ignore-android: FIXME(#10381)
// compile-flags:-g
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// gdb-command:whatis 'basic-types-globals-metadata::B'
// gdb-check:type = bool
// gdb-command:whatis 'basic-types-globals-metadata::I'
// gdb-check:type = int
// gdb-command:whatis 'basic-types-globals-metadata::C'
// gdb-check:type = char
// gdb-command:whatis 'basic-types-globals-metadata::I8'
// gdb-check:type = i8
// gdb-command:whatis 'basic-types-globals-metadata::I16'
// gdb-check:type = i16
// gdb-command:whatis 'basic-types-globals-metadata::I32'
// gdb-check:type = i32
// gdb-command:whatis 'basic-types-globals-metadata::I64'
// gdb-check:type = i64
// gdb-command:whatis 'basic-types-globals-metadata::U'
// gdb-check:type = uint
// gdb-command:whatis 'basic-types-globals-metadata::U8'
// gdb-check:type = u8
// gdb-command:whatis 'basic-types-globals-metadata::U16'
// gdb-check:type = u16
// gdb-command:whatis 'basic-types-globals-metadata::U32'
// gdb-check:type = u32
// gdb-command:whatis 'basic-types-globals-metadata::U64'
// gdb-check:type = u64
// gdb-command:whatis 'basic-types-globals-metadata::F32'
// gdb-check:type = f32
// gdb-command:whatis 'basic-types-globals-metadata::F64'
// gdb-check:type = f64
// gdb-command:continue
#![allow(unused_variable)]
#![allow(dead_code)]
static B: bool = false;
static I: int = -1;
static C: char = 'a';
static I8: i8 = 68;
static I16: i16 = -16;
static I32: i32 = -32;
static I64: i64 = -64;
static U: uint = 1;
static U8: u8 = 100;
static U16: u16 = 16;
static U32: u32 = 32;
static U64: u64 = 64;
static F32: f32 = 2.5;
static F64: f64 = 3.5;
fn main() {
_zzz();
let a = (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64);
}
fn _zzz() {()}

View file

@ -18,38 +18,38 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:print 'basic-types-globals::B'
// check:$1 = false
// debugger:print 'basic-types-globals::I'
// check:$2 = -1
// debugger:print 'basic-types-globals::C'
// check:$3 = 97
// debugger:print/d 'basic-types-globals::I8'
// check:$4 = 68
// debugger:print 'basic-types-globals::I16'
// check:$5 = -16
// debugger:print 'basic-types-globals::I32'
// check:$6 = -32
// debugger:print 'basic-types-globals::I64'
// check:$7 = -64
// debugger:print 'basic-types-globals::U'
// check:$8 = 1
// debugger:print/d 'basic-types-globals::U8'
// check:$9 = 100
// debugger:print 'basic-types-globals::U16'
// check:$10 = 16
// debugger:print 'basic-types-globals::U32'
// check:$11 = 32
// debugger:print 'basic-types-globals::U64'
// check:$12 = 64
// debugger:print 'basic-types-globals::F32'
// check:$13 = 2.5
// debugger:print 'basic-types-globals::F64'
// check:$14 = 3.5
// debugger:continue
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// gdb-command:print 'basic-types-globals::B'
// gdb-check:$1 = false
// gdb-command:print 'basic-types-globals::I'
// gdb-check:$2 = -1
// gdb-command:print 'basic-types-globals::C'
// gdb-check:$3 = 97
// gdb-command:print/d 'basic-types-globals::I8'
// gdb-check:$4 = 68
// gdb-command:print 'basic-types-globals::I16'
// gdb-check:$5 = -16
// gdb-command:print 'basic-types-globals::I32'
// gdb-check:$6 = -32
// gdb-command:print 'basic-types-globals::I64'
// gdb-check:$7 = -64
// gdb-command:print 'basic-types-globals::U'
// gdb-check:$8 = 1
// gdb-command:print/d 'basic-types-globals::U8'
// gdb-check:$9 = 100
// gdb-command:print 'basic-types-globals::U16'
// gdb-check:$10 = 16
// gdb-command:print 'basic-types-globals::U32'
// gdb-check:$11 = 32
// gdb-command:print 'basic-types-globals::U64'
// gdb-check:$12 = 64
// gdb-command:print 'basic-types-globals::F32'
// gdb-check:$13 = 2.5
// gdb-command:print 'basic-types-globals::F64'
// gdb-check:$14 = 3.5
// gdb-command:continue
#![allow(unused_variable)]

View file

@ -11,42 +11,42 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:whatis unit
// check:type = ()
// debugger:whatis b
// check:type = bool
// debugger:whatis i
// check:type = int
// debugger:whatis c
// check:type = char
// debugger:whatis i8
// check:type = i8
// debugger:whatis i16
// check:type = i16
// debugger:whatis i32
// check:type = i32
// debugger:whatis i64
// check:type = i64
// debugger:whatis u
// check:type = uint
// debugger:whatis u8
// check:type = u8
// debugger:whatis u16
// check:type = u16
// debugger:whatis u32
// check:type = u32
// debugger:whatis u64
// check:type = u64
// debugger:whatis f32
// check:type = f32
// debugger:whatis f64
// check:type = f64
// debugger:info functions _yyy
// check:[...]![...]_yyy([...])([...]);
// debugger:continue
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// gdb-command:whatis unit
// gdb-check:type = ()
// gdb-command:whatis b
// gdb-check:type = bool
// gdb-command:whatis i
// gdb-check:type = int
// gdb-command:whatis c
// gdb-check:type = char
// gdb-command:whatis i8
// gdb-check:type = i8
// gdb-command:whatis i16
// gdb-check:type = i16
// gdb-command:whatis i32
// gdb-check:type = i32
// gdb-command:whatis i64
// gdb-check:type = i64
// gdb-command:whatis u
// gdb-check:type = uint
// gdb-command:whatis u8
// gdb-check:type = u8
// gdb-command:whatis u16
// gdb-check:type = u16
// gdb-command:whatis u32
// gdb-check:type = u32
// gdb-command:whatis u64
// gdb-check:type = u64
// gdb-command:whatis f32
// gdb-check:type = f32
// gdb-command:whatis f64
// gdb-check:type = f64
// gdb-command:info functions _yyy
// gdb-check:[...]![...]_yyy([...])([...]);
// gdb-command:continue
#![allow(unused_variable)]

View file

@ -0,0 +1,129 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Caveats - gdb prints any 8-bit value (meaning rust I8 and u8 values)
// as its numerical value along with its associated ASCII char, there
// doesn't seem to be any way around this. Also, gdb doesn't know
// about UTF-32 character encoding and will print a rust char as only
// its numerical value.
// ignore-win32: FIXME #13256
// ignore-android: FIXME(#10381)
// compile-flags:-g
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// Check initializers
// gdb-command:print 'basic-types-mut-globals::B'
// gdb-check:$1 = false
// gdb-command:print 'basic-types-mut-globals::I'
// gdb-check:$2 = -1
// gdb-command:print 'basic-types-mut-globals::C'
// gdb-check:$3 = 97
// gdb-command:print/d 'basic-types-mut-globals::I8'
// gdb-check:$4 = 68
// gdb-command:print 'basic-types-mut-globals::I16'
// gdb-check:$5 = -16
// gdb-command:print 'basic-types-mut-globals::I32'
// gdb-check:$6 = -32
// gdb-command:print 'basic-types-mut-globals::I64'
// gdb-check:$7 = -64
// gdb-command:print 'basic-types-mut-globals::U'
// gdb-check:$8 = 1
// gdb-command:print/d 'basic-types-mut-globals::U8'
// gdb-check:$9 = 100
// gdb-command:print 'basic-types-mut-globals::U16'
// gdb-check:$10 = 16
// gdb-command:print 'basic-types-mut-globals::U32'
// gdb-check:$11 = 32
// gdb-command:print 'basic-types-mut-globals::U64'
// gdb-check:$12 = 64
// gdb-command:print 'basic-types-mut-globals::F32'
// gdb-check:$13 = 2.5
// gdb-command:print 'basic-types-mut-globals::F64'
// gdb-check:$14 = 3.5
// gdb-command:continue
// Check new values
// gdb-command:print 'basic-types-mut-globals'::B
// gdb-check:$15 = true
// gdb-command:print 'basic-types-mut-globals'::I
// gdb-check:$16 = 2
// gdb-command:print 'basic-types-mut-globals'::C
// gdb-check:$17 = 102
// gdb-command:print/d 'basic-types-mut-globals'::I8
// gdb-check:$18 = 78
// gdb-command:print 'basic-types-mut-globals'::I16
// gdb-check:$19 = -26
// gdb-command:print 'basic-types-mut-globals'::I32
// gdb-check:$20 = -12
// gdb-command:print 'basic-types-mut-globals'::I64
// gdb-check:$21 = -54
// gdb-command:print 'basic-types-mut-globals'::U
// gdb-check:$22 = 5
// gdb-command:print/d 'basic-types-mut-globals'::U8
// gdb-check:$23 = 20
// gdb-command:print 'basic-types-mut-globals'::U16
// gdb-check:$24 = 32
// gdb-command:print 'basic-types-mut-globals'::U32
// gdb-check:$25 = 16
// gdb-command:print 'basic-types-mut-globals'::U64
// gdb-check:$26 = 128
// gdb-command:print 'basic-types-mut-globals'::F32
// gdb-check:$27 = 5.75
// gdb-command:print 'basic-types-mut-globals'::F64
// gdb-check:$28 = 9.25
// gdb-command:detach
// gdb-command:quit
#![allow(unused_variable)]
static mut B: bool = false;
static mut I: int = -1;
static mut C: char = 'a';
static mut I8: i8 = 68;
static mut I16: i16 = -16;
static mut I32: i32 = -32;
static mut I64: i64 = -64;
static mut U: uint = 1;
static mut U8: u8 = 100;
static mut U16: u16 = 16;
static mut U32: u32 = 32;
static mut U64: u64 = 64;
static mut F32: f32 = 2.5;
static mut F64: f64 = 3.5;
fn main() {
_zzz();
unsafe {
B = true;
I = 2;
C = 'f';
I8 = 78;
I16 = -26;
I32 = -12;
I64 = -54;
U = 5;
U8 = 20;
U16 = 32;
U32 = 16;
U64 = 128;
F32 = 5.75;
F64 = 9.25;
}
_zzz();
}
fn _zzz() {()}

View file

@ -17,37 +17,37 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:print b
// check:$1 = false
// debugger:print i
// check:$2 = -1
// debugger:print c
// check:$3 = 97
// debugger:print/d i8
// check:$4 = 68
// debugger:print i16
// check:$5 = -16
// debugger:print i32
// check:$6 = -32
// debugger:print i64
// check:$7 = -64
// debugger:print u
// check:$8 = 1
// debugger:print/d u8
// check:$9 = 100
// debugger:print u16
// check:$10 = 16
// debugger:print u32
// check:$11 = 32
// debugger:print u64
// check:$12 = 64
// debugger:print f32
// check:$13 = 2.5
// debugger:print f64
// check:$14 = 3.5
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// gdb-command:print b
// gdb-check:$1 = false
// gdb-command:print i
// gdb-check:$2 = -1
// gdb-command:print c
// gdb-check:$3 = 97
// gdb-command:print/d i8
// gdb-check:$4 = 68
// gdb-command:print i16
// gdb-check:$5 = -16
// gdb-command:print i32
// gdb-check:$6 = -32
// gdb-command:print i64
// gdb-check:$7 = -64
// gdb-command:print u
// gdb-check:$8 = 1
// gdb-command:print/d u8
// gdb-check:$9 = 100
// gdb-command:print u16
// gdb-check:$10 = 16
// gdb-command:print u32
// gdb-check:$11 = 32
// gdb-command:print u64
// gdb-check:$12 = 64
// gdb-command:print f32
// gdb-check:$13 = 2.5
// gdb-command:print f64
// gdb-check:$14 = 3.5
#![allow(unused_variable)]

View file

@ -14,50 +14,50 @@
// its numerical value.
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:print *bool_ref
// check:$1 = true
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// gdb-command:print *bool_ref
// gdb-check:$1 = true
// debugger:print *int_ref
// check:$2 = -1
// gdb-command:print *int_ref
// gdb-check:$2 = -1
// debugger:print *char_ref
// check:$3 = 97
// gdb-command:print *char_ref
// gdb-check:$3 = 97
// debugger:print *i8_ref
// check:$4 = 68 'D'
// gdb-command:print *i8_ref
// gdb-check:$4 = 68 'D'
// debugger:print *i16_ref
// check:$5 = -16
// gdb-command:print *i16_ref
// gdb-check:$5 = -16
// debugger:print *i32_ref
// check:$6 = -32
// gdb-command:print *i32_ref
// gdb-check:$6 = -32
// debugger:print *i64_ref
// check:$7 = -64
// gdb-command:print *i64_ref
// gdb-check:$7 = -64
// debugger:print *uint_ref
// check:$8 = 1
// gdb-command:print *uint_ref
// gdb-check:$8 = 1
// debugger:print *u8_ref
// check:$9 = 100 'd'
// gdb-command:print *u8_ref
// gdb-check:$9 = 100 'd'
// debugger:print *u16_ref
// check:$10 = 16
// gdb-command:print *u16_ref
// gdb-check:$10 = 16
// debugger:print *u32_ref
// check:$11 = 32
// gdb-command:print *u32_ref
// gdb-check:$11 = 32
// debugger:print *u64_ref
// check:$12 = 64
// gdb-command:print *u64_ref
// gdb-check:$12 = 64
// debugger:print *f32_ref
// check:$13 = 2.5
// gdb-command:print *f32_ref
// gdb-check:$13 = 2.5
// debugger:print *f64_ref
// check:$14 = 3.5
// gdb-command:print *f64_ref
// gdb-check:$14 = 3.5
#![allow(unused_variable)]

View file

@ -11,18 +11,18 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print *the_a_ref
// check:$1 = TheA
// gdb-command:print *the_a_ref
// gdb-check:$1 = TheA
// debugger:print *the_b_ref
// check:$2 = TheB
// gdb-command:print *the_b_ref
// gdb-check:$2 = TheB
// debugger:print *the_c_ref
// check:$3 = TheC
// gdb-command:print *the_c_ref
// gdb-check:$3 = TheC
#![allow(unused_variable)]

View file

@ -11,18 +11,18 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print *the_a_ref
// check:$1 = {{TheA, x = 0, y = 8970181431921507452}, {TheA, 0, 2088533116, 2088533116}}
// gdb-command:print *the_a_ref
// gdb-check:$1 = {{TheA, x = 0, y = 8970181431921507452}, {TheA, 0, 2088533116, 2088533116}}
// debugger:print *the_b_ref
// check:$2 = {{TheB, x = 0, y = 1229782938247303441}, {TheB, 0, 286331153, 286331153}}
// gdb-command:print *the_b_ref
// gdb-check:$2 = {{TheB, x = 0, y = 1229782938247303441}, {TheB, 0, 286331153, 286331153}}
// debugger:print *univariant_ref
// check:$3 = {4820353753753434}
// gdb-command:print *univariant_ref
// gdb-check:$3 = {4820353753753434}
#![allow(unused_variable)]
#![feature(struct_variant)]

View file

@ -16,50 +16,50 @@
// its numerical value.
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:print *bool_ref
// check:$1 = true
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// gdb-command:print *bool_ref
// gdb-check:$1 = true
// debugger:print *int_ref
// check:$2 = -1
// gdb-command:print *int_ref
// gdb-check:$2 = -1
// debugger:print *char_ref
// check:$3 = 97
// gdb-command:print *char_ref
// gdb-check:$3 = 97
// debugger:print/d *i8_ref
// check:$4 = 68
// gdb-command:print/d *i8_ref
// gdb-check:$4 = 68
// debugger:print *i16_ref
// check:$5 = -16
// gdb-command:print *i16_ref
// gdb-check:$5 = -16
// debugger:print *i32_ref
// check:$6 = -32
// gdb-command:print *i32_ref
// gdb-check:$6 = -32
// debugger:print *i64_ref
// check:$7 = -64
// gdb-command:print *i64_ref
// gdb-check:$7 = -64
// debugger:print *uint_ref
// check:$8 = 1
// gdb-command:print *uint_ref
// gdb-check:$8 = 1
// debugger:print/d *u8_ref
// check:$9 = 100
// gdb-command:print/d *u8_ref
// gdb-check:$9 = 100
// debugger:print *u16_ref
// check:$10 = 16
// gdb-command:print *u16_ref
// gdb-check:$10 = 16
// debugger:print *u32_ref
// check:$11 = 32
// gdb-command:print *u32_ref
// gdb-check:$11 = 32
// debugger:print *u64_ref
// check:$12 = 64
// gdb-command:print *u64_ref
// gdb-check:$12 = 64
// debugger:print *f32_ref
// check:$13 = 2.5
// gdb-command:print *f32_ref
// gdb-check:$13 = 2.5
// debugger:print *f64_ref
// check:$14 = 3.5
// gdb-command:print *f64_ref
// gdb-check:$14 = 3.5
#![allow(unused_variable)]

View file

@ -11,39 +11,39 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print *stack_val_ref
// check:$1 = {x = 10, y = 23.5}
// gdb-command:print *stack_val_ref
// gdb-check:$1 = {x = 10, y = 23.5}
// debugger:print *stack_val_interior_ref_1
// check:$2 = 10
// gdb-command:print *stack_val_interior_ref_1
// gdb-check:$2 = 10
// debugger:print *stack_val_interior_ref_2
// check:$3 = 23.5
// gdb-command:print *stack_val_interior_ref_2
// gdb-check:$3 = 23.5
// debugger:print *ref_to_unnamed
// check:$4 = {x = 11, y = 24.5}
// gdb-command:print *ref_to_unnamed
// gdb-check:$4 = {x = 11, y = 24.5}
// debugger:print *managed_val_ref
// check:$5 = {x = 12, y = 25.5}
// gdb-command:print *managed_val_ref
// gdb-check:$5 = {x = 12, y = 25.5}
// debugger:print *managed_val_interior_ref_1
// check:$6 = 12
// gdb-command:print *managed_val_interior_ref_1
// gdb-check:$6 = 12
// debugger:print *managed_val_interior_ref_2
// check:$7 = 25.5
// gdb-command:print *managed_val_interior_ref_2
// gdb-check:$7 = 25.5
// debugger:print *unique_val_ref
// check:$8 = {x = 13, y = 26.5}
// gdb-command:print *unique_val_ref
// gdb-check:$8 = {x = 13, y = 26.5}
// debugger:print *unique_val_interior_ref_1
// check:$9 = 13
// gdb-command:print *unique_val_interior_ref_1
// gdb-check:$9 = 13
// debugger:print *unique_val_interior_ref_2
// check:$10 = 26.5
// gdb-command:print *unique_val_interior_ref_2
// gdb-check:$10 = 26.5
#![feature(managed_boxes)]
#![allow(unused_variable)]

View file

@ -13,21 +13,21 @@
#![feature(managed_boxes)]
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print *stack_val_ref
// check:$1 = {-14, -19}
// gdb-command:print *stack_val_ref
// gdb-check:$1 = {-14, -19}
// debugger:print *ref_to_unnamed
// check:$2 = {-15, -20}
// gdb-command:print *ref_to_unnamed
// gdb-check:$2 = {-15, -20}
// debugger:print *managed_val_ref
// check:$3 = {-16, -21}
// gdb-command:print *managed_val_ref
// gdb-check:$3 = {-16, -21}
// debugger:print *unique_val_ref
// check:$4 = {-17, -22}
// gdb-command:print *unique_val_ref
// gdb-check:$4 = {-17, -22}
#![allow(unused_variable)]

View file

@ -14,50 +14,50 @@
// its numerical value.
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:print *bool_ref
// check:$1 = true
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// gdb-command:print *bool_ref
// gdb-check:$1 = true
// debugger:print *int_ref
// check:$2 = -1
// gdb-command:print *int_ref
// gdb-check:$2 = -1
// debugger:print *char_ref
// check:$3 = 97
// gdb-command:print *char_ref
// gdb-check:$3 = 97
// debugger:print/d *i8_ref
// check:$4 = 68
// gdb-command:print/d *i8_ref
// gdb-check:$4 = 68
// debugger:print *i16_ref
// check:$5 = -16
// gdb-command:print *i16_ref
// gdb-check:$5 = -16
// debugger:print *i32_ref
// check:$6 = -32
// gdb-command:print *i32_ref
// gdb-check:$6 = -32
// debugger:print *i64_ref
// check:$7 = -64
// gdb-command:print *i64_ref
// gdb-check:$7 = -64
// debugger:print *uint_ref
// check:$8 = 1
// gdb-command:print *uint_ref
// gdb-check:$8 = 1
// debugger:print/d *u8_ref
// check:$9 = 100
// gdb-command:print/d *u8_ref
// gdb-check:$9 = 100
// debugger:print *u16_ref
// check:$10 = 16
// gdb-command:print *u16_ref
// gdb-check:$10 = 16
// debugger:print *u32_ref
// check:$11 = 32
// gdb-command:print *u32_ref
// gdb-check:$11 = 32
// debugger:print *u64_ref
// check:$12 = 64
// gdb-command:print *u64_ref
// gdb-check:$12 = 64
// debugger:print *f32_ref
// check:$13 = 2.5
// gdb-command:print *f32_ref
// gdb-check:$13 = 2.5
// debugger:print *f64_ref
// check:$14 = 3.5
// gdb-command:print *f64_ref
// gdb-check:$14 = 3.5
#![allow(unused_variable)]

View file

@ -11,18 +11,18 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:print *a
// check:$1 = 1
// debugger:print *b
// check:$2 = {2, 3.5}
// debugger:print c->val
// check:$3 = 4
// debugger:print d->val
// check:$4 = false
// gdb-command:set print pretty off
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// gdb-command:print *a
// gdb-check:$1 = 1
// gdb-command:print *b
// gdb-check:$2 = {2, 3.5}
// gdb-command:print c->val
// gdb-check:$3 = 4
// gdb-command:print d->val
// gdb-check:$4 = false
#![feature(managed_boxes)]
#![allow(unused_variable)]

View file

@ -11,21 +11,21 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print *unique
// check:$1 = {x = 99, y = 999, z = 9999, w = 99999}
// gdb-command:print *unique
// gdb-check:$1 = {x = 99, y = 999, z = 9999, w = 99999}
// debugger:print managed->val
// check:$2 = {x = 88, y = 888, z = 8888, w = 88888}
// gdb-command:print managed->val
// gdb-check:$2 = {x = 88, y = 888, z = 8888, w = 88888}
// debugger:print *unique_dtor
// check:$3 = {x = 77, y = 777, z = 7777, w = 77777}
// gdb-command:print *unique_dtor
// gdb-check:$3 = {x = 77, y = 777, z = 7777, w = 77777}
// debugger:print managed_dtor->val
// check:$4 = {x = 33, y = 333, z = 3333, w = 33333}
// gdb-command:print managed_dtor->val
// gdb-check:$4 = {x = 33, y = 333, z = 3333, w = 33333}
#![feature(managed_boxes)]
#![allow(unused_variable)]

View file

@ -11,37 +11,37 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print s
// check:$1 = {a = 1, b = 2.5}
// debugger:continue
// gdb-command:finish
// gdb-command:print s
// gdb-check:$1 = {a = 1, b = 2.5}
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$2 = {a = 3, b = 4.5}
// debugger:print y
// check:$3 = 5
// debugger:print z
// check:$4 = 6.5
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$2 = {a = 3, b = 4.5}
// gdb-command:print y
// gdb-check:$3 = 5
// gdb-command:print z
// gdb-check:$4 = 6.5
// gdb-command:continue
// debugger:finish
// debugger:print a
// check:$5 = {7, 8, 9.5, 10.5}
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$5 = {7, 8, 9.5, 10.5}
// gdb-command:continue
// debugger:finish
// debugger:print a
// check:$6 = {11.5, 12.5, 13, 14}
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$6 = {11.5, 12.5, 13, 14}
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$7 = {{Case1, x = 0, y = 8970181431921507452}, {Case1, 0, 2088533116, 2088533116}}
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$7 = {{Case1, x = 0, y = 8970181431921507452}, {Case1, 0, 2088533116, 2088533116}}
// gdb-command:continue
#![feature(struct_variant)]

View file

@ -13,28 +13,28 @@
#![feature(managed_boxes)]
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print self
// check:$1 = 1111
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$1 = 1111
// gdb-command:continue
// debugger:finish
// debugger:print self
// check:$2 = {x = 2222, y = 3333}
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$2 = {x = 2222, y = 3333}
// gdb-command:continue
// debugger:finish
// debugger:print self
// check:$3 = {4444.5, 5555, 6666, 7777.5}
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$3 = {4444.5, 5555, 6666, 7777.5}
// gdb-command:continue
// debugger:finish
// debugger:print self->val
// check:$4 = 8888
// debugger:continue
// gdb-command:finish
// gdb-command:print self->val
// gdb-check:$4 = 8888
// gdb-command:continue
trait Trait {
fn method(self) -> Self;

View file

@ -11,30 +11,30 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print tuple_interior_padding
// check:$1 = {0, OneHundred}
// gdb-command:print tuple_interior_padding
// gdb-check:$1 = {0, OneHundred}
// debugger:print tuple_padding_at_end
// check:$2 = {{1, OneThousand}, 2}
// gdb-command:print tuple_padding_at_end
// gdb-check:$2 = {{1, OneThousand}, 2}
// debugger:print tuple_different_enums
// check:$3 = {OneThousand, MountainView, OneMillion, Vienna}
// gdb-command:print tuple_different_enums
// gdb-check:$3 = {OneThousand, MountainView, OneMillion, Vienna}
// debugger:print padded_struct
// check:$4 = {a = 3, b = OneMillion, c = 4, d = Toronto, e = 5}
// gdb-command:print padded_struct
// gdb-check:$4 = {a = 3, b = OneMillion, c = 4, d = Toronto, e = 5}
// debugger:print packed_struct
// check:$5 = {a = 6, b = OneHundred, c = 7, d = Vienna, e = 8}
// gdb-command:print packed_struct
// gdb-check:$5 = {a = 6, b = OneHundred, c = 7, d = Vienna, e = 8}
// debugger:print non_padded_struct
// check:$6 = {a = OneMillion, b = MountainView, c = OneThousand, d = Toronto}
// gdb-command:print non_padded_struct
// gdb-check:$6 = {a = OneMillion, b = MountainView, c = OneThousand, d = Toronto}
// debugger:print struct_with_drop
// check:$7 = {{a = OneHundred, b = Vienna}, 9}
// gdb-command:print struct_with_drop
// gdb-check:$7 = {{a = OneHundred, b = Vienna}, 9}
#![allow(unused_variable)]

View file

@ -12,64 +12,64 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// gdb-command:rbreak zzz
// debugger:print 'c-style-enum::SINGLE_VARIANT'
// check:$1 = TheOnlyVariant
// gdb-command:print 'c-style-enum::SINGLE_VARIANT'
// gdb-check:$1 = TheOnlyVariant
// debugger:print 'c-style-enum::AUTO_ONE'
// check:$2 = One
// gdb-command:print 'c-style-enum::AUTO_ONE'
// gdb-check:$2 = One
// debugger:print 'c-style-enum::AUTO_TWO'
// check:$3 = One
// gdb-command:print 'c-style-enum::AUTO_TWO'
// gdb-check:$3 = One
// debugger:print 'c-style-enum::AUTO_THREE'
// check:$4 = One
// gdb-command:print 'c-style-enum::AUTO_THREE'
// gdb-check:$4 = One
// debugger:print 'c-style-enum::MANUAL_ONE'
// check:$5 = OneHundred
// gdb-command:print 'c-style-enum::MANUAL_ONE'
// gdb-check:$5 = OneHundred
// debugger:print 'c-style-enum::MANUAL_TWO'
// check:$6 = OneHundred
// gdb-command:print 'c-style-enum::MANUAL_TWO'
// gdb-check:$6 = OneHundred
// debugger:print 'c-style-enum::MANUAL_THREE'
// check:$7 = OneHundred
// gdb-command:print 'c-style-enum::MANUAL_THREE'
// gdb-check:$7 = OneHundred
// debugger:run
// debugger:finish
// gdb-command:run
// gdb-command:finish
// debugger:print auto_one
// check:$8 = One
// gdb-command:print auto_one
// gdb-check:$8 = One
// debugger:print auto_two
// check:$9 = Two
// gdb-command:print auto_two
// gdb-check:$9 = Two
// debugger:print auto_three
// check:$10 = Three
// gdb-command:print auto_three
// gdb-check:$10 = Three
// debugger:print manual_one_hundred
// check:$11 = OneHundred
// gdb-command:print manual_one_hundred
// gdb-check:$11 = OneHundred
// debugger:print manual_one_thousand
// check:$12 = OneThousand
// gdb-command:print manual_one_thousand
// gdb-check:$12 = OneThousand
// debugger:print manual_one_million
// check:$13 = OneMillion
// gdb-command:print manual_one_million
// gdb-check:$13 = OneMillion
// debugger:print single_variant
// check:$14 = TheOnlyVariant
// gdb-command:print single_variant
// gdb-check:$14 = TheOnlyVariant
// debugger:print 'c-style-enum::AUTO_TWO'
// check:$15 = Two
// gdb-command:print 'c-style-enum::AUTO_TWO'
// gdb-check:$15 = Two
// debugger:print 'c-style-enum::AUTO_THREE'
// check:$16 = Three
// gdb-command:print 'c-style-enum::AUTO_THREE'
// gdb-check:$16 = Three
// debugger:print 'c-style-enum::MANUAL_TWO'
// check:$17 = OneThousand
// gdb-command:print 'c-style-enum::MANUAL_TWO'
// gdb-check:$17 = OneThousand
// debugger:print 'c-style-enum::MANUAL_THREE'
// check:$18 = OneMillion
// gdb-command:print 'c-style-enum::MANUAL_THREE'
// gdb-check:$18 = OneMillion
#![allow(unused_variable)]
#![allow(dead_code)]

View file

@ -11,22 +11,22 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print x
// check:$1 = 0.5
// debugger:print y
// check:$2 = 10
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = 0.5
// gdb-command:print y
// gdb-check:$2 = 10
// gdb-command:continue
// debugger:finish
// debugger:print *x
// check:$3 = 29
// debugger:print *y
// check:$4 = 110
// debugger:continue
// gdb-command:finish
// gdb-command:print *x
// gdb-check:$3 = 29
// gdb-command:print *y
// gdb-check:$4 = 110
// gdb-command:continue
fn some_generic_fun<T1, T2>(a: T1, b: T2) -> (T2, T1) {

View file

@ -11,175 +11,175 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print a
// check:$1 = 1
// debugger:print b
// check:$2 = false
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$1 = 1
// gdb-command:print b
// gdb-check:$2 = false
// gdb-command:continue
// debugger:finish
// debugger:print a
// check:$3 = 2
// debugger:print b
// check:$4 = 3
// debugger:print c
// check:$5 = 4
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$3 = 2
// gdb-command:print b
// gdb-check:$4 = 3
// gdb-command:print c
// gdb-check:$5 = 4
// gdb-command:continue
// debugger:finish
// debugger:print a
// check:$6 = 5
// debugger:print b
// check:$7 = {6, 7}
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$6 = 5
// gdb-command:print b
// gdb-check:$7 = {6, 7}
// gdb-command:continue
// debugger:finish
// debugger:print h
// check:$8 = 8
// debugger:print i
// check:$9 = {a = 9, b = 10}
// debugger:print j
// check:$10 = 11
// debugger:continue
// gdb-command:finish
// gdb-command:print h
// gdb-check:$8 = 8
// gdb-command:print i
// gdb-check:$9 = {a = 9, b = 10}
// gdb-command:print j
// gdb-check:$10 = 11
// gdb-command:continue
// debugger:finish
// debugger:print k
// check:$11 = 12
// debugger:print l
// check:$12 = 13
// debugger:continue
// gdb-command:finish
// gdb-command:print k
// gdb-check:$11 = 12
// gdb-command:print l
// gdb-check:$12 = 13
// gdb-command:continue
// debugger:finish
// debugger:print m
// check:$13 = 14
// debugger:print n
// check:$14 = 16
// debugger:continue
// gdb-command:finish
// gdb-command:print m
// gdb-check:$13 = 14
// gdb-command:print n
// gdb-check:$14 = 16
// gdb-command:continue
// debugger:finish
// debugger:print o
// check:$15 = 18
// debugger:continue
// gdb-command:finish
// gdb-command:print o
// gdb-check:$15 = 18
// gdb-command:continue
// debugger:finish
// debugger:print p
// check:$16 = 19
// debugger:print q
// check:$17 = 20
// debugger:print r
// check:$18 = {a = 21, b = 22}
// debugger:continue
// gdb-command:finish
// gdb-command:print p
// gdb-check:$16 = 19
// gdb-command:print q
// gdb-check:$17 = 20
// gdb-command:print r
// gdb-check:$18 = {a = 21, b = 22}
// gdb-command:continue
// debugger:finish
// debugger:print s
// check:$19 = 24
// debugger:print t
// check:$20 = 23
// debugger:continue
// gdb-command:finish
// gdb-command:print s
// gdb-check:$19 = 24
// gdb-command:print t
// gdb-check:$20 = 23
// gdb-command:continue
// debugger:finish
// debugger:print u
// check:$21 = 25
// debugger:print v
// check:$22 = 26
// debugger:print w
// check:$23 = 27
// debugger:print x
// check:$24 = 28
// debugger:print y
// check:$25 = 29
// debugger:print z
// check:$26 = 30
// debugger:print ae
// check:$27 = 31
// debugger:print oe
// check:$28 = 32
// debugger:print ue
// check:$29 = 33
// debugger:continue
// gdb-command:finish
// gdb-command:print u
// gdb-check:$21 = 25
// gdb-command:print v
// gdb-check:$22 = 26
// gdb-command:print w
// gdb-check:$23 = 27
// gdb-command:print x
// gdb-check:$24 = 28
// gdb-command:print y
// gdb-check:$25 = 29
// gdb-command:print z
// gdb-check:$26 = 30
// gdb-command:print ae
// gdb-check:$27 = 31
// gdb-command:print oe
// gdb-check:$28 = 32
// gdb-command:print ue
// gdb-check:$29 = 33
// gdb-command:continue
// debugger:finish
// debugger:print aa
// check:$30 = {34, 35}
// debugger:continue
// gdb-command:finish
// gdb-command:print aa
// gdb-check:$30 = {34, 35}
// gdb-command:continue
// debugger:finish
// debugger:print bb
// check:$31 = {36, 37}
// debugger:continue
// gdb-command:finish
// gdb-command:print bb
// gdb-check:$31 = {36, 37}
// gdb-command:continue
// debugger:finish
// debugger:print cc
// check:$32 = 38
// debugger:continue
// gdb-command:finish
// gdb-command:print cc
// gdb-check:$32 = 38
// gdb-command:continue
// debugger:finish
// debugger:print dd
// check:$33 = {40, 41, 42}
// debugger:continue
// gdb-command:finish
// gdb-command:print dd
// gdb-check:$33 = {40, 41, 42}
// gdb-command:continue
// debugger:finish
// debugger:print *ee
// check:$34 = {43, 44, 45}
// debugger:continue
// gdb-command:finish
// gdb-command:print *ee
// gdb-check:$34 = {43, 44, 45}
// gdb-command:continue
// debugger:finish
// debugger:print *ff
// check:$35 = 46
// debugger:print gg
// check:$36 = {47, 48}
// debugger:continue
// gdb-command:finish
// gdb-command:print *ff
// gdb-check:$35 = 46
// gdb-command:print gg
// gdb-check:$36 = {47, 48}
// gdb-command:continue
// debugger:finish
// debugger:print *hh
// check:$37 = 50
// debugger:continue
// gdb-command:finish
// gdb-command:print *hh
// gdb-check:$37 = 50
// gdb-command:continue
// debugger:finish
// debugger:print ii
// check:$38 = 51
// debugger:continue
// gdb-command:finish
// gdb-command:print ii
// gdb-check:$38 = 51
// gdb-command:continue
// debugger:finish
// debugger:print *jj
// check:$39 = 52
// debugger:continue
// gdb-command:finish
// gdb-command:print *jj
// gdb-check:$39 = 52
// gdb-command:continue
// debugger:finish
// debugger:print kk
// check:$40 = 53
// debugger:print ll
// check:$41 = 54
// debugger:continue
// gdb-command:finish
// gdb-command:print kk
// gdb-check:$40 = 53
// gdb-command:print ll
// gdb-check:$41 = 54
// gdb-command:continue
// debugger:finish
// debugger:print mm
// check:$42 = 55
// debugger:print *nn
// check:$43 = 56
// debugger:continue
// gdb-command:finish
// gdb-command:print mm
// gdb-check:$42 = 55
// gdb-command:print *nn
// gdb-check:$43 = 56
// gdb-command:continue
// debugger:finish
// debugger:print oo
// check:$44 = 57
// debugger:print pp
// check:$45 = 58
// debugger:print qq
// check:$46 = 59
// debugger:continue
// gdb-command:finish
// gdb-command:print oo
// gdb-check:$44 = 57
// gdb-command:print pp
// gdb-check:$45 = 58
// gdb-command:print qq
// gdb-check:$46 = 59
// gdb-command:continue
// debugger:finish
// debugger:print rr
// check:$47 = 60
// debugger:print ss
// check:$48 = 61
// debugger:print tt
// check:$49 = 62
// debugger:continue
// gdb-command:finish
// gdb-command:print rr
// gdb-check:$47 = 60
// gdb-command:print ss
// gdb-check:$48 = 61
// gdb-command:print tt
// gdb-check:$49 = 62
// gdb-command:continue
#![allow(unused_variable)]

View file

@ -11,119 +11,119 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print a
// check:$1 = 1
// debugger:print b
// check:$2 = false
// gdb-command:print a
// gdb-check:$1 = 1
// gdb-command:print b
// gdb-check:$2 = false
// debugger:print c
// check:$3 = 2
// debugger:print d
// check:$4 = 3
// debugger:print e
// check:$5 = 4
// gdb-command:print c
// gdb-check:$3 = 2
// gdb-command:print d
// gdb-check:$4 = 3
// gdb-command:print e
// gdb-check:$5 = 4
// debugger:print f
// check:$6 = 5
// debugger:print g
// check:$7 = {6, 7}
// gdb-command:print f
// gdb-check:$6 = 5
// gdb-command:print g
// gdb-check:$7 = {6, 7}
// debugger:print h
// check:$8 = 8
// debugger:print i
// check:$9 = {a = 9, b = 10}
// debugger:print j
// check:$10 = 11
// gdb-command:print h
// gdb-check:$8 = 8
// gdb-command:print i
// gdb-check:$9 = {a = 9, b = 10}
// gdb-command:print j
// gdb-check:$10 = 11
// debugger:print k
// check:$11 = 12
// debugger:print l
// check:$12 = 13
// gdb-command:print k
// gdb-check:$11 = 12
// gdb-command:print l
// gdb-check:$12 = 13
// debugger:print m
// check:$13 = 14
// debugger:print n
// check:$14 = 16
// gdb-command:print m
// gdb-check:$13 = 14
// gdb-command:print n
// gdb-check:$14 = 16
// debugger:print o
// check:$15 = 18
// gdb-command:print o
// gdb-check:$15 = 18
// debugger:print p
// check:$16 = 19
// debugger:print q
// check:$17 = 20
// debugger:print r
// check:$18 = {a = 21, b = 22}
// gdb-command:print p
// gdb-check:$16 = 19
// gdb-command:print q
// gdb-check:$17 = 20
// gdb-command:print r
// gdb-check:$18 = {a = 21, b = 22}
// debugger:print s
// check:$19 = 24
// debugger:print t
// check:$20 = 23
// gdb-command:print s
// gdb-check:$19 = 24
// gdb-command:print t
// gdb-check:$20 = 23
// debugger:print u
// check:$21 = 25
// debugger:print v
// check:$22 = 26
// debugger:print w
// check:$23 = 27
// debugger:print x
// check:$24 = 28
// debugger:print y
// check:$25 = 29
// debugger:print z
// check:$26 = 30
// debugger:print ae
// check:$27 = 31
// debugger:print oe
// check:$28 = 32
// debugger:print ue
// check:$29 = 33
// gdb-command:print u
// gdb-check:$21 = 25
// gdb-command:print v
// gdb-check:$22 = 26
// gdb-command:print w
// gdb-check:$23 = 27
// gdb-command:print x
// gdb-check:$24 = 28
// gdb-command:print y
// gdb-check:$25 = 29
// gdb-command:print z
// gdb-check:$26 = 30
// gdb-command:print ae
// gdb-check:$27 = 31
// gdb-command:print oe
// gdb-check:$28 = 32
// gdb-command:print ue
// gdb-check:$29 = 33
// debugger:print aa
// check:$30 = {34, 35}
// gdb-command:print aa
// gdb-check:$30 = {34, 35}
// debugger:print bb
// check:$31 = {36, 37}
// gdb-command:print bb
// gdb-check:$31 = {36, 37}
// debugger:print cc
// check:$32 = 38
// gdb-command:print cc
// gdb-check:$32 = 38
// debugger:print dd
// check:$33 = {40, 41, 42}
// gdb-command:print dd
// gdb-check:$33 = {40, 41, 42}
// debugger:print *ee
// check:$34 = {43, 44, 45}
// gdb-command:print *ee
// gdb-check:$34 = {43, 44, 45}
// debugger:print *ff
// check:$35 = 46
// gdb-command:print *ff
// gdb-check:$35 = 46
// debugger:print gg
// check:$36 = {47, 48}
// gdb-command:print gg
// gdb-check:$36 = {47, 48}
// debugger:print *hh
// check:$37 = 50
// gdb-command:print *hh
// gdb-check:$37 = 50
// debugger:print ii
// check:$38 = 51
// gdb-command:print ii
// gdb-check:$38 = 51
// debugger:print *jj
// check:$39 = 52
// gdb-command:print *jj
// gdb-check:$39 = 52
// debugger:print kk
// check:$40 = 53
// gdb-command:print kk
// gdb-check:$40 = 53
// debugger:print ll
// check:$41 = 54
// gdb-command:print ll
// gdb-check:$41 = 54
// debugger:print mm
// check:$42 = 55
// gdb-command:print mm
// gdb-check:$42 = 55
// debugger:print *nn
// check:$43 = 56
// gdb-command:print *nn
// gdb-check:$43 = 56
#![allow(unused_variable)]

View file

@ -11,24 +11,24 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print pretty off
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print no_padding1
// check:$1 = {x = {0, 1, 2}, y = -3, z = {4.5, 5.5}}
// debugger:print no_padding2
// check:$2 = {x = {6, 7, 8}, y = {{9, 10}, {11, 12}}}
// gdb-command:print no_padding1
// gdb-check:$1 = {x = {0, 1, 2}, y = -3, z = {4.5, 5.5}}
// gdb-command:print no_padding2
// gdb-check:$2 = {x = {6, 7, 8}, y = {{9, 10}, {11, 12}}}
// debugger:print struct_internal_padding
// check:$3 = {x = {13, 14}, y = {15, 16}}
// gdb-command:print struct_internal_padding
// gdb-check:$3 = {x = {13, 14}, y = {15, 16}}
// debugger:print single_vec
// check:$4 = {x = {17, 18, 19, 20, 21}}
// gdb-command:print single_vec
// gdb-check:$4 = {x = {17, 18, 19, 20, 21}}
// debugger:print struct_padded_at_end
// check:$5 = {x = {22, 23}, y = {24, 25}}
// gdb-command:print struct_padded_at_end
// gdb-check:$5 = {x = {22, 23}, y = {24, 25}}
#![allow(unused_variable)]

View file

@ -17,118 +17,118 @@
// Therefore the setup here sets them using line numbers (so be careful when changing this file).
// compile-flags:-g
// debugger:set print pretty off
// debugger:break function-arg-initialization.rs:139
// debugger:break function-arg-initialization.rs:154
// debugger:break function-arg-initialization.rs:158
// debugger:break function-arg-initialization.rs:162
// debugger:break function-arg-initialization.rs:166
// debugger:break function-arg-initialization.rs:170
// debugger:break function-arg-initialization.rs:174
// debugger:break function-arg-initialization.rs:178
// debugger:break function-arg-initialization.rs:182
// debugger:break function-arg-initialization.rs:190
// debugger:break function-arg-initialization.rs:197
// gdb-command:set print pretty off
// gdb-command:break function-arg-initialization.rs:139
// gdb-command:break function-arg-initialization.rs:154
// gdb-command:break function-arg-initialization.rs:158
// gdb-command:break function-arg-initialization.rs:162
// gdb-command:break function-arg-initialization.rs:166
// gdb-command:break function-arg-initialization.rs:170
// gdb-command:break function-arg-initialization.rs:174
// gdb-command:break function-arg-initialization.rs:178
// gdb-command:break function-arg-initialization.rs:182
// gdb-command:break function-arg-initialization.rs:190
// gdb-command:break function-arg-initialization.rs:197
// debugger:run
// gdb-command:run
// IMMEDIATE ARGS
// debugger:print a
// check:$1 = 1
// debugger:print b
// check:$2 = true
// debugger:print c
// check:$3 = 2.5
// debugger:continue
// gdb-command:print a
// gdb-check:$1 = 1
// gdb-command:print b
// gdb-check:$2 = true
// gdb-command:print c
// gdb-check:$3 = 2.5
// gdb-command:continue
// NON IMMEDIATE ARGS
// debugger:print a
// check:$4 = {a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10}
// debugger:print b
// check:$5 = {a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18}
// debugger:continue
// gdb-command:print a
// gdb-check:$4 = {a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10}
// gdb-command:print b
// gdb-check:$5 = {a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18}
// gdb-command:continue
// BINDING
// debugger:print a
// check:$6 = 19
// debugger:print b
// check:$7 = 20
// debugger:print c
// check:$8 = 21.5
// debugger:continue
// gdb-command:print a
// gdb-check:$6 = 19
// gdb-command:print b
// gdb-check:$7 = 20
// gdb-command:print c
// gdb-check:$8 = 21.5
// gdb-command:continue
// ASSIGNMENT
// debugger:print a
// check:$9 = 22
// debugger:print b
// check:$10 = 23
// debugger:print c
// check:$11 = 24.5
// debugger:continue
// gdb-command:print a
// gdb-check:$9 = 22
// gdb-command:print b
// gdb-check:$10 = 23
// gdb-command:print c
// gdb-check:$11 = 24.5
// gdb-command:continue
// FUNCTION CALL
// debugger:print x
// check:$12 = 25
// debugger:print y
// check:$13 = 26
// debugger:print z
// check:$14 = 27.5
// debugger:continue
// gdb-command:print x
// gdb-check:$12 = 25
// gdb-command:print y
// gdb-check:$13 = 26
// gdb-command:print z
// gdb-check:$14 = 27.5
// gdb-command:continue
// EXPR
// debugger:print x
// check:$15 = 28
// debugger:print y
// check:$16 = 29
// debugger:print z
// check:$17 = 30.5
// debugger:continue
// gdb-command:print x
// gdb-check:$15 = 28
// gdb-command:print y
// gdb-check:$16 = 29
// gdb-command:print z
// gdb-check:$17 = 30.5
// gdb-command:continue
// RETURN EXPR
// debugger:print x
// check:$18 = 31
// debugger:print y
// check:$19 = 32
// debugger:print z
// check:$20 = 33.5
// debugger:continue
// gdb-command:print x
// gdb-check:$18 = 31
// gdb-command:print y
// gdb-check:$19 = 32
// gdb-command:print z
// gdb-check:$20 = 33.5
// gdb-command:continue
// ARITHMETIC EXPR
// debugger:print x
// check:$21 = 34
// debugger:print y
// check:$22 = 35
// debugger:print z
// check:$23 = 36.5
// debugger:continue
// gdb-command:print x
// gdb-check:$21 = 34
// gdb-command:print y
// gdb-check:$22 = 35
// gdb-command:print z
// gdb-check:$23 = 36.5
// gdb-command:continue
// IF EXPR
// debugger:print x
// check:$24 = 37
// debugger:print y
// check:$25 = 38
// debugger:print z
// check:$26 = 39.5
// debugger:continue
// gdb-command:print x
// gdb-check:$24 = 37
// gdb-command:print y
// gdb-check:$25 = 38
// gdb-command:print z
// gdb-check:$26 = 39.5
// gdb-command:continue
// WHILE EXPR
// debugger:print x
// check:$27 = 40
// debugger:print y
// check:$28 = 41
// debugger:print z
// check:$29 = 42
// debugger:continue
// gdb-command:print x
// gdb-check:$27 = 40
// gdb-command:print y
// gdb-check:$28 = 41
// gdb-command:print z
// gdb-check:$29 = 42
// gdb-command:continue
// LOOP EXPR
// debugger:print x
// check:$30 = 43
// debugger:print y
// check:$31 = 44
// debugger:print z
// check:$32 = 45
// debugger:continue
// gdb-command:print x
// gdb-check:$30 = 43
// gdb-command:print y
// gdb-check:$31 = 44
// gdb-command:print z
// gdb-check:$32 = 45
// gdb-command:continue
#![allow(unused_variable)]

View file

@ -11,22 +11,22 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print x
// check:$1 = 111102
// debugger:print y
// check:$2 = true
// gdb-command:print x
// gdb-check:$1 = 111102
// gdb-command:print y
// gdb-check:$2 = true
// debugger:continue
// debugger:finish
// gdb-command:continue
// gdb-command:finish
// debugger:print a
// check:$3 = 2000
// debugger:print b
// check:$4 = 3000
// gdb-command:print a
// gdb-check:$3 = 2000
// gdb-command:print b
// gdb-check:$4 = 3000
fn main() {

View file

@ -17,115 +17,115 @@
// function name (and don't have to fall back on using line numbers).
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak immediate_args
// debugger:rbreak binding
// debugger:rbreak assignment
// debugger:rbreak function_call
// debugger:rbreak identifier
// debugger:rbreak return_expr
// debugger:rbreak arithmetic_expr
// debugger:rbreak if_expr
// debugger:rbreak while_expr
// debugger:rbreak loop_expr
// debugger:run
// gdb-command:set print pretty off
// gdb-command:rbreak immediate_args
// gdb-command:rbreak binding
// gdb-command:rbreak assignment
// gdb-command:rbreak function_call
// gdb-command:rbreak identifier
// gdb-command:rbreak return_expr
// gdb-command:rbreak arithmetic_expr
// gdb-command:rbreak if_expr
// gdb-command:rbreak while_expr
// gdb-command:rbreak loop_expr
// gdb-command:run
// IMMEDIATE ARGS
// debugger:print a
// check:$1 = 1
// debugger:print b
// check:$2 = true
// debugger:print c
// check:$3 = 2.5
// debugger:continue
// gdb-command:print a
// gdb-check:$1 = 1
// gdb-command:print b
// gdb-check:$2 = true
// gdb-command:print c
// gdb-check:$3 = 2.5
// gdb-command:continue
// NON IMMEDIATE ARGS
// debugger:print a
// check:$4 = {a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10}
// debugger:print b
// check:$5 = {a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18}
// debugger:continue
// gdb-command:print a
// gdb-check:$4 = {a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10}
// gdb-command:print b
// gdb-check:$5 = {a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18}
// gdb-command:continue
// BINDING
// debugger:print a
// check:$6 = 19
// debugger:print b
// check:$7 = 20
// debugger:print c
// check:$8 = 21.5
// debugger:continue
// gdb-command:print a
// gdb-check:$6 = 19
// gdb-command:print b
// gdb-check:$7 = 20
// gdb-command:print c
// gdb-check:$8 = 21.5
// gdb-command:continue
// ASSIGNMENT
// debugger:print a
// check:$9 = 22
// debugger:print b
// check:$10 = 23
// debugger:print c
// check:$11 = 24.5
// debugger:continue
// gdb-command:print a
// gdb-check:$9 = 22
// gdb-command:print b
// gdb-check:$10 = 23
// gdb-command:print c
// gdb-check:$11 = 24.5
// gdb-command:continue
// FUNCTION CALL
// debugger:print x
// check:$12 = 25
// debugger:print y
// check:$13 = 26
// debugger:print z
// check:$14 = 27.5
// debugger:continue
// gdb-command:print x
// gdb-check:$12 = 25
// gdb-command:print y
// gdb-check:$13 = 26
// gdb-command:print z
// gdb-check:$14 = 27.5
// gdb-command:continue
// EXPR
// debugger:print x
// check:$15 = 28
// debugger:print y
// check:$16 = 29
// debugger:print z
// check:$17 = 30.5
// debugger:continue
// gdb-command:print x
// gdb-check:$15 = 28
// gdb-command:print y
// gdb-check:$16 = 29
// gdb-command:print z
// gdb-check:$17 = 30.5
// gdb-command:continue
// RETURN EXPR
// debugger:print x
// check:$18 = 31
// debugger:print y
// check:$19 = 32
// debugger:print z
// check:$20 = 33.5
// debugger:continue
// gdb-command:print x
// gdb-check:$18 = 31
// gdb-command:print y
// gdb-check:$19 = 32
// gdb-command:print z
// gdb-check:$20 = 33.5
// gdb-command:continue
// ARITHMETIC EXPR
// debugger:print x
// check:$21 = 34
// debugger:print y
// check:$22 = 35
// debugger:print z
// check:$23 = 36.5
// debugger:continue
// gdb-command:print x
// gdb-check:$21 = 34
// gdb-command:print y
// gdb-check:$22 = 35
// gdb-command:print z
// gdb-check:$23 = 36.5
// gdb-command:continue
// IF EXPR
// debugger:print x
// check:$24 = 37
// debugger:print y
// check:$25 = 38
// debugger:print z
// check:$26 = 39.5
// debugger:continue
// gdb-command:print x
// gdb-check:$24 = 37
// gdb-command:print y
// gdb-check:$25 = 38
// gdb-command:print z
// gdb-check:$26 = 39.5
// gdb-command:continue
// WHILE EXPR
// debugger:print x
// check:$27 = 40
// debugger:print y
// check:$28 = 41
// debugger:print z
// check:$29 = 42
// debugger:continue
// gdb-command:print x
// gdb-check:$27 = 40
// gdb-command:print y
// gdb-check:$28 = 41
// gdb-command:print z
// gdb-check:$29 = 42
// gdb-command:continue
// LOOP EXPR
// debugger:print x
// check:$30 = 43
// debugger:print y
// check:$31 = 44
// debugger:print z
// check:$32 = 45
// debugger:continue
// gdb-command:print x
// gdb-check:$30 = 43
// gdb-command:print y
// gdb-check:$31 = 44
// gdb-command:print z
// gdb-check:$32 = 45
// gdb-command:continue
#![allow(unused_variable)]

View file

@ -11,35 +11,35 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print *t0
// check:$1 = 1
// debugger:print *t1
// check:$2 = 2.5
// debugger:print ret
// check:$3 = {{1, 2.5}, {2.5, 1}}
// debugger:continue
// gdb-command:finish
// gdb-command:print *t0
// gdb-check:$1 = 1
// gdb-command:print *t1
// gdb-check:$2 = 2.5
// gdb-command:print ret
// gdb-check:$3 = {{1, 2.5}, {2.5, 1}}
// gdb-command:continue
// debugger:finish
// debugger:print *t0
// check:$4 = 3.5
// debugger:print *t1
// check:$5 = 4
// debugger:print ret
// check:$6 = {{3.5, 4}, {4, 3.5}}
// debugger:continue
// gdb-command:finish
// gdb-command:print *t0
// gdb-check:$4 = 3.5
// gdb-command:print *t1
// gdb-check:$5 = 4
// gdb-command:print ret
// gdb-check:$6 = {{3.5, 4}, {4, 3.5}}
// gdb-command:continue
// debugger:finish
// debugger:print *t0
// check:$7 = 5
// debugger:print *t1
// check:$8 = {a = 6, b = 7.5}
// debugger:print ret
// check:$9 = {{5, {a = 6, b = 7.5}}, {{a = 6, b = 7.5}, 5}}
// debugger:continue
// gdb-command:finish
// gdb-command:print *t0
// gdb-check:$7 = 5
// gdb-command:print *t1
// gdb-check:$8 = {a = 6, b = 7.5}
// gdb-command:print ret
// gdb-check:$9 = {{5, {a = 6, b = 7.5}}, {{a = 6, b = 7.5}, 5}}
// gdb-command:continue
#[deriving(Clone)]
struct Struct {

View file

@ -11,36 +11,36 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print x
// check:$1 = -1
// debugger:print y
// check:$2 = 1
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = -1
// gdb-command:print y
// gdb-check:$2 = 1
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$3 = -1
// debugger:print y
// check:$4 = 2.5
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$3 = -1
// gdb-command:print y
// gdb-check:$4 = 2.5
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$5 = -2.5
// debugger:print y
// check:$6 = 1
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$5 = -2.5
// gdb-command:print y
// gdb-check:$6 = 1
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$7 = -2.5
// debugger:print y
// check:$8 = 2.5
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$7 = -2.5
// gdb-command:print y
// gdb-check:$8 = 2.5
// gdb-command:continue
fn outer<TA: Clone>(a: TA) {
inner(a.clone(), 1);

View file

@ -11,58 +11,58 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// STACK BY REF
// debugger:finish
// debugger:print *self
// check:$1 = {x = {8888, -8888}}
// debugger:print arg1
// check:$2 = -1
// debugger:print/d arg2
// check:$3 = -2
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$1 = {x = {8888, -8888}}
// gdb-command:print arg1
// gdb-check:$2 = -1
// gdb-command:print/d arg2
// gdb-check:$3 = -2
// gdb-command:continue
// STACK BY VAL
// debugger:finish
// debugger:print self
// check:$4 = {x = {8888, -8888}}
// debugger:print arg1
// check:$5 = -3
// debugger:print arg2
// check:$6 = -4
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$4 = {x = {8888, -8888}}
// gdb-command:print arg1
// gdb-check:$5 = -3
// gdb-command:print arg2
// gdb-check:$6 = -4
// gdb-command:continue
// OWNED BY REF
// debugger:finish
// debugger:print *self
// check:$7 = {x = 1234.5}
// debugger:print arg1
// check:$8 = -5
// debugger:print arg2
// check:$9 = -6
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$7 = {x = 1234.5}
// gdb-command:print arg1
// gdb-check:$8 = -5
// gdb-command:print arg2
// gdb-check:$9 = -6
// gdb-command:continue
// OWNED BY VAL
// debugger:finish
// debugger:print self
// check:$10 = {x = 1234.5}
// debugger:print arg1
// check:$11 = -7
// debugger:print arg2
// check:$12 = -8
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$10 = {x = 1234.5}
// gdb-command:print arg1
// gdb-check:$11 = -7
// gdb-command:print arg2
// gdb-check:$12 = -8
// gdb-command:continue
// OWNED MOVED
// debugger:finish
// debugger:print *self
// check:$13 = {x = 1234.5}
// debugger:print arg1
// check:$14 = -9
// debugger:print arg2
// check:$15 = -10.5
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$13 = {x = 1234.5}
// gdb-command:print arg1
// gdb-check:$14 = -9
// gdb-command:print arg2
// gdb-check:$15 = -10.5
// gdb-command:continue
struct Struct<T> {
x: T

View file

@ -11,26 +11,26 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// STRUCT
// debugger:finish
// debugger:print arg1
// check:$1 = 1
// debugger:print arg2
// check:$2 = 2
// debugger:continue
// gdb-command:finish
// gdb-command:print arg1
// gdb-check:$1 = 1
// gdb-command:print arg2
// gdb-check:$2 = 2
// gdb-command:continue
// ENUM
// debugger:finish
// debugger:print arg1
// check:$3 = -3
// debugger:print arg2
// check:$4 = 4.5
// debugger:print arg3
// check:$5 = 5
// debugger:continue
// gdb-command:finish
// gdb-command:print arg1
// gdb-check:$3 = -3
// gdb-command:print arg2
// gdb-check:$4 = 4.5
// gdb-command:print arg3
// gdb-check:$5 = 5
// gdb-command:continue
#![feature(struct_variant)]

View file

@ -12,22 +12,22 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print union on
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print union on
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print case1
// check:$1 = {{Case1, a = 0, b = 31868, c = 31868, d = 31868, e = 31868}, {Case1, a = 0, b = 2088533116, c = 2088533116}, {Case1, a = 0, b = 8970181431921507452}}
// gdb-command:print case1
// gdb-check:$1 = {{Case1, a = 0, b = 31868, c = 31868, d = 31868, e = 31868}, {Case1, a = 0, b = 2088533116, c = 2088533116}, {Case1, a = 0, b = 8970181431921507452}}
// debugger:print case2
// check:$2 = {{Case2, a = 0, b = 4369, c = 4369, d = 4369, e = 4369}, {Case2, a = 0, b = 286331153, c = 286331153}, {Case2, a = 0, b = 1229782938247303441}}
// gdb-command:print case2
// gdb-check:$2 = {{Case2, a = 0, b = 4369, c = 4369, d = 4369, e = 4369}, {Case2, a = 0, b = 286331153, c = 286331153}, {Case2, a = 0, b = 1229782938247303441}}
// debugger:print case3
// check:$3 = {{Case3, a = 0, b = 22873, c = 22873, d = 22873, e = 22873}, {Case3, a = 0, b = 1499027801, c = 1499027801}, {Case3, a = 0, b = 6438275382588823897}}
// gdb-command:print case3
// gdb-check:$3 = {{Case3, a = 0, b = 22873, c = 22873, d = 22873, e = 22873}, {Case3, a = 0, b = 1499027801, c = 1499027801}, {Case3, a = 0, b = 6438275382588823897}}
// debugger:print univariant
// check:$4 = {a = -1}
// gdb-command:print univariant
// gdb-check:$4 = {a = -1}
#![feature(struct_variant)]

View file

@ -11,18 +11,18 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print int_int
// check:$1 = {key = 0, value = 1}
// debugger:print int_float
// check:$2 = {key = 2, value = 3.5}
// debugger:print float_int
// check:$3 = {key = 4.5, value = 5}
// debugger:print float_int_float
// check:$4 = {key = 6.5, value = {key = 7, value = 8.5}}
// gdb-command:finish
// gdb-command:print int_int
// gdb-check:$1 = {key = 0, value = 1}
// gdb-command:print int_float
// gdb-check:$2 = {key = 2, value = 3.5}
// gdb-command:print float_int
// gdb-check:$3 = {key = 4.5, value = 5}
// gdb-command:print float_int_float
// gdb-check:$4 = {key = 6.5, value = {key = 7, value = 8.5}}
struct AGenericStruct<TKey, TValue> {
key: TKey,

View file

@ -11,22 +11,22 @@
// except according to those terms.
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print arg1
// check:$1 = 1000
// debugger:print *arg2
// check:$2 = {1, 2.5}
// debugger:continue
// gdb-command:finish
// gdb-command:print arg1
// gdb-check:$1 = 1000
// gdb-command:print *arg2
// gdb-check:$2 = {1, 2.5}
// gdb-command:continue
// debugger:finish
// debugger:print arg1
// check:$3 = 2000
// debugger:print *arg2
// check:$4 = {3.5, {4, 5, 6}}
// debugger:continue
// gdb-command:finish
// gdb-command:print arg1
// gdb-check:$3 = 2000
// gdb-command:print *arg2
// gdb-check:$4 = {3.5, {4, 5, 6}}
// gdb-command:continue
struct Struct {

View file

@ -12,22 +12,22 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print union on
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print union on
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print case1
// check:$1 = {{Case1, 0, 31868, 31868, 31868, 31868}, {Case1, 0, 2088533116, 2088533116}, {Case1, 0, 8970181431921507452}}
// gdb-command:print case1
// gdb-check:$1 = {{Case1, 0, 31868, 31868, 31868, 31868}, {Case1, 0, 2088533116, 2088533116}, {Case1, 0, 8970181431921507452}}
// debugger:print case2
// check:$2 = {{Case2, 0, 4369, 4369, 4369, 4369}, {Case2, 0, 286331153, 286331153}, {Case2, 0, 1229782938247303441}}
// gdb-command:print case2
// gdb-check:$2 = {{Case2, 0, 4369, 4369, 4369, 4369}, {Case2, 0, 286331153, 286331153}, {Case2, 0, 1229782938247303441}}
// debugger:print case3
// check:$3 = {{Case3, 0, 22873, 22873, 22873, 22873}, {Case3, 0, 1499027801, 1499027801}, {Case3, 0, 6438275382588823897}}
// gdb-command:print case3
// gdb-check:$3 = {{Case3, 0, 22873, 22873, 22873, 22873}, {Case3, 0, 1499027801, 1499027801}, {Case3, 0, 6438275382588823897}}
// debugger:print univariant
// check:$4 = {-1}
// gdb-command:print univariant
// gdb-check:$4 = {-1}
// NOTE: This is a copy of the non-generic test case. The `Txx` type parameters have to be

View file

@ -11,16 +11,16 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:print string1.length
// check:$1 = 48
// debugger:print string2.length
// check:$2 = 48
// debugger:print string3.length
// check:$3 = 48
// debugger:continue
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// gdb-command:print string1.length
// gdb-check:$1 = 48
// gdb-command:print string2.length
// gdb-check:$2 = 48
// gdb-command:print string3.length
// gdb-check:$3 = 48
// gdb-command:continue
#![allow(unused_variable)]

View file

@ -8,30 +8,23 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// This test was actually never run before because commands were only parsed up to the first
// function definition but the test relied on the function being above the commands. Ignore for now.
// ignore-test
fn main() {
let args : ~[~str] = ::std::os::args();
::std::io::println(args[0]);
}
// ignore-android: FIXME(#10381)
// This test case checks whether compile unit names are set correctly, so that the correct default
// source file can be found.
// compile-flags:-g
// debugger:list
// check:1[...]fn main() {
// check:2[...]let args : ~[~str] = ::std::os::args();
// check:3[...]::std::io::println(args[0]);
// check:4[...]}
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gdb-command:list
// gdb-check:1[...]fn main() {
// gdb-check:2[...]let args : ~[~str] = ::std::os::args();
// gdb-check:3[...]::std::io::println(args[0]);
// gdb-check:4[...]}

View file

@ -11,11 +11,11 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:break issue12886.rs:29
// debugger:run
// debugger:next
// check:[...]30[...]s
// debugger:continue
// gdb-command:break issue12886.rs:29
// gdb-command:run
// gdb-command:next
// gdb-check:[...]30[...]s
// gdb-command:continue
// IF YOU MODIFY THIS FILE, BE CAREFUL TO ADAPT THE LINE NUMBERS IN THE DEBUGGER COMMANDS

View file

@ -11,47 +11,47 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// FIRST ITERATION
// debugger:finish
// debugger:print x
// check:$1 = 1
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = 1
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$2 = -1
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$2 = -1
// gdb-command:continue
// SECOND ITERATION
// debugger:finish
// debugger:print x
// check:$3 = 2
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$3 = 2
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$4 = -2
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$4 = -2
// gdb-command:continue
// THIRD ITERATION
// debugger:finish
// debugger:print x
// check:$5 = 3
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$5 = 3
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$6 = -3
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$6 = -3
// gdb-command:continue
// AFTER LOOP
// debugger:finish
// debugger:print x
// check:$7 = 1000000
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$7 = 1000000
// gdb-command:continue
fn main() {

View file

@ -11,72 +11,72 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// BEFORE if
// debugger:finish
// debugger:print x
// check:$1 = 999
// debugger:print y
// check:$2 = -1
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = 999
// gdb-command:print y
// gdb-check:$2 = -1
// gdb-command:continue
// AT BEGINNING of 'then' block
// debugger:finish
// debugger:print x
// check:$3 = 999
// debugger:print y
// check:$4 = -1
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$3 = 999
// gdb-command:print y
// gdb-check:$4 = -1
// gdb-command:continue
// AFTER 1st redeclaration of 'x'
// debugger:finish
// debugger:print x
// check:$5 = 1001
// debugger:print y
// check:$6 = -1
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$5 = 1001
// gdb-command:print y
// gdb-check:$6 = -1
// gdb-command:continue
// AFTER 2st redeclaration of 'x'
// debugger:finish
// debugger:print x
// check:$7 = 1002
// debugger:print y
// check:$8 = 1003
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$7 = 1002
// gdb-command:print y
// gdb-check:$8 = 1003
// gdb-command:continue
// AFTER 1st if expression
// debugger:finish
// debugger:print x
// check:$9 = 999
// debugger:print y
// check:$10 = -1
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$9 = 999
// gdb-command:print y
// gdb-check:$10 = -1
// gdb-command:continue
// BEGINNING of else branch
// debugger:finish
// debugger:print x
// check:$11 = 999
// debugger:print y
// check:$12 = -1
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$11 = 999
// gdb-command:print y
// gdb-check:$12 = -1
// gdb-command:continue
// BEGINNING of else branch
// debugger:finish
// debugger:print x
// check:$13 = 1004
// debugger:print y
// check:$14 = 1005
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$13 = 1004
// gdb-command:print y
// gdb-check:$14 = 1005
// gdb-command:continue
// BEGINNING of else branch
// debugger:finish
// debugger:print x
// check:$15 = 999
// debugger:print y
// check:$16 = -1
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$15 = 999
// gdb-command:print y
// gdb-check:$16 = -1
// gdb-command:continue
fn main() {

View file

@ -11,68 +11,68 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print shadowed
// check:$1 = 231
// debugger:print not_shadowed
// check:$2 = 232
// debugger:continue
// gdb-command:finish
// gdb-command:print shadowed
// gdb-check:$1 = 231
// gdb-command:print not_shadowed
// gdb-check:$2 = 232
// gdb-command:continue
// debugger:finish
// debugger:print shadowed
// check:$3 = 233
// debugger:print not_shadowed
// check:$4 = 232
// debugger:print local_to_arm
// check:$5 = 234
// debugger:continue
// gdb-command:finish
// gdb-command:print shadowed
// gdb-check:$3 = 233
// gdb-command:print not_shadowed
// gdb-check:$4 = 232
// gdb-command:print local_to_arm
// gdb-check:$5 = 234
// gdb-command:continue
// debugger:finish
// debugger:print shadowed
// check:$6 = 236
// debugger:print not_shadowed
// check:$7 = 232
// debugger:continue
// gdb-command:finish
// gdb-command:print shadowed
// gdb-check:$6 = 236
// gdb-command:print not_shadowed
// gdb-check:$7 = 232
// gdb-command:continue
// debugger:finish
// debugger:print shadowed
// check:$8 = 237
// debugger:print not_shadowed
// check:$9 = 232
// debugger:print local_to_arm
// check:$10 = 238
// debugger:continue
// gdb-command:finish
// gdb-command:print shadowed
// gdb-check:$8 = 237
// gdb-command:print not_shadowed
// gdb-check:$9 = 232
// gdb-command:print local_to_arm
// gdb-check:$10 = 238
// gdb-command:continue
// debugger:finish
// debugger:print shadowed
// check:$11 = 239
// debugger:print not_shadowed
// check:$12 = 232
// debugger:continue
// gdb-command:finish
// gdb-command:print shadowed
// gdb-check:$11 = 239
// gdb-command:print not_shadowed
// gdb-check:$12 = 232
// gdb-command:continue
// debugger:finish
// debugger:print shadowed
// check:$13 = 241
// debugger:print not_shadowed
// check:$14 = 232
// debugger:continue
// gdb-command:finish
// gdb-command:print shadowed
// gdb-check:$13 = 241
// gdb-command:print not_shadowed
// gdb-check:$14 = 232
// gdb-command:continue
// debugger:finish
// debugger:print shadowed
// check:$15 = 243
// debugger:print *local_to_arm
// check:$16 = 244
// debugger:continue
// gdb-command:finish
// gdb-command:print shadowed
// gdb-check:$15 = 243
// gdb-command:print *local_to_arm
// gdb-check:$16 = 244
// gdb-command:continue
// debugger:finish
// debugger:print shadowed
// check:$17 = 231
// debugger:print not_shadowed
// check:$18 = 232
// debugger:continue
// gdb-command:finish
// gdb-command:print shadowed
// gdb-check:$17 = 231
// gdb-command:print not_shadowed
// gdb-check:$18 = 232
// gdb-command:continue
struct Struct {
x: int,

View file

@ -11,7 +11,7 @@
// ignore-android: FIXME(#10381)
// compile-flags:--debuginfo=1
// debugger:run
// gdb-command:run
// Nothing to do here really, just make sure it compiles. See issue #8513.
fn main() {

View file

@ -11,38 +11,38 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print x
// check:$1 = false
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = false
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$2 = false
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$2 = false
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$3 = 1000
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$3 = 1000
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$4 = 2.5
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$4 = 2.5
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$5 = true
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$5 = true
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$6 = false
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$6 = false
// gdb-command:continue
fn main() {

View file

@ -0,0 +1,127 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-android: FIXME(#10381)
// compile-flags:-g
// gdb-command:rbreak zzz
// gdb-command:run
// FIRST ITERATION
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = 0
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$2 = 1
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$3 = 101
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$4 = 101
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$5 = -987
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$6 = 101
// gdb-command:continue
// SECOND ITERATION
// gdb-command:finish
// gdb-command:print x
// gdb-check:$7 = 1
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$8 = 2
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$9 = 102
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$10 = 102
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$11 = -987
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$12 = 102
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$13 = 2
// gdb-command:continue
fn main() {
let mut x = 0;
loop {
if x >= 2 {
break;
}
zzz();
sentinel();
x += 1;
zzz();
sentinel();
// Shadow x
let x = x + 100;
zzz();
sentinel();
// open scope within loop's top level scope
{
zzz();
sentinel();
let x = -987;
zzz();
sentinel();
}
// Check that we get the x before the inner scope again
zzz();
sentinel();
}
zzz();
sentinel();
}
fn zzz() {()}
fn sentinel() {()}

View file

@ -11,38 +11,38 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print x
// check:$1 = false
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = false
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$2 = false
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$2 = false
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$3 = 1000
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$3 = 1000
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$4 = 2.5
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$4 = 2.5
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$5 = true
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$5 = true
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$6 = false
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$6 = false
// gdb-command:continue
fn main() {

View file

@ -0,0 +1,123 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-android: FIXME(#10381)
// compile-flags:-g
// gdb-command:rbreak zzz
// gdb-command:run
// FIRST ITERATION
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = 0
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$2 = 1
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$3 = 101
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$4 = 101
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$5 = -987
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$6 = 101
// gdb-command:continue
// SECOND ITERATION
// gdb-command:finish
// gdb-command:print x
// gdb-check:$7 = 1
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$8 = 2
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$9 = 102
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$10 = 102
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$11 = -987
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$12 = 102
// gdb-command:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$13 = 2
// gdb-command:continue
fn main() {
let mut x = 0;
while x < 2 {
zzz();
sentinel();
x += 1;
zzz();
sentinel();
// Shadow x
let x = x + 100;
zzz();
sentinel();
// open scope within loop's top level scope
{
zzz();
sentinel();
let x = -987;
zzz();
sentinel();
}
// Check that we get the x before the inner scope again
zzz();
sentinel();
}
zzz();
sentinel();
}
fn zzz() {()}
fn sentinel() {()}

View file

@ -11,59 +11,59 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print a
// check:$1 = 10
// debugger:print b
// check:$2 = 34
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$1 = 10
// gdb-command:print b
// gdb-check:$2 = 34
// gdb-command:continue
// debugger:finish
// debugger:print a
// check:$3 = 890242
// debugger:print b
// check:$4 = 34
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$3 = 890242
// gdb-command:print b
// gdb-check:$4 = 34
// gdb-command:continue
// debugger:finish
// debugger:print a
// check:$5 = 10
// debugger:print b
// check:$6 = 34
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$5 = 10
// gdb-command:print b
// gdb-check:$6 = 34
// gdb-command:continue
// debugger:finish
// debugger:print a
// check:$7 = 102
// debugger:print b
// check:$8 = 34
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$7 = 102
// gdb-command:print b
// gdb-check:$8 = 34
// gdb-command:continue
// debugger:finish
// debugger:print a
// check:$9 = 110
// debugger:print b
// check:$10 = 34
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$9 = 110
// gdb-command:print b
// gdb-check:$10 = 34
// gdb-command:continue
// debugger:finish
// debugger:print a
// check:$11 = 10
// debugger:print b
// check:$12 = 34
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$11 = 10
// gdb-command:print b
// gdb-check:$12 = 34
// gdb-command:continue
// debugger:finish
// debugger:print a
// check:$13 = 10
// debugger:print b
// check:$14 = 34
// debugger:print c
// check:$15 = 400
// debugger:continue
// gdb-command:finish
// gdb-command:print a
// gdb-check:$13 = 10
// gdb-command:print b
// gdb-check:$14 = 34
// gdb-command:print c
// gdb-check:$15 = 400
// gdb-command:continue
#![feature(macro_rules)]

View file

@ -0,0 +1,377 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-win32: FIXME #13256
// ignore-android: FIXME(#10381)
// compile-flags:-g
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT'
// gdb-check:$1 = 0
// STRUCT EXPRESSION
// gdb-command:finish
// gdb-command:print val
// gdb-check:$2 = -1
// gdb-command:print ten
// gdb-check:$3 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$4 = 11
// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT'
// gdb-check:$5 = 1
// gdb-command:print ten
// gdb-check:$6 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$7 = -1
// gdb-command:print ten
// gdb-check:$8 = 10
// gdb-command:continue
// FUNCTION CALL
// gdb-command:finish
// gdb-command:print val
// gdb-check:$9 = -1
// gdb-command:print ten
// gdb-check:$10 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$11 = 12
// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT'
// gdb-check:$12 = 2
// gdb-command:print ten
// gdb-check:$13 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$14 = -1
// gdb-command:print ten
// gdb-check:$15 = 10
// gdb-command:continue
// TUPLE EXPRESSION
// gdb-command:finish
// gdb-command:print val
// gdb-check:$16 = -1
// gdb-command:print ten
// gdb-check:$17 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$18 = 13
// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT'
// gdb-check:$19 = 3
// gdb-command:print ten
// gdb-check:$20 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$21 = -1
// gdb-command:print ten
// gdb-check:$22 = 10
// gdb-command:continue
// VEC EXPRESSION
// gdb-command:finish
// gdb-command:print val
// gdb-check:$23 = -1
// gdb-command:print ten
// gdb-check:$24 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$25 = 14
// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT'
// gdb-check:$26 = 4
// gdb-command:print ten
// gdb-check:$27 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$28 = -1
// gdb-command:print ten
// gdb-check:$29 = 10
// gdb-command:continue
// REPEAT VEC EXPRESSION
// gdb-command:finish
// gdb-command:print val
// gdb-check:$30 = -1
// gdb-command:print ten
// gdb-check:$31 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$32 = 15
// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT'
// gdb-check:$33 = 5
// gdb-command:print ten
// gdb-check:$34 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$35 = -1
// gdb-command:print ten
// gdb-check:$36 = 10
// gdb-command:continue
// ASSIGNMENT EXPRESSION
// gdb-command:finish
// gdb-command:print val
// gdb-check:$37 = -1
// gdb-command:print ten
// gdb-check:$38 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$39 = 16
// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT'
// gdb-check:$40 = 6
// gdb-command:print ten
// gdb-check:$41 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$42 = -1
// gdb-command:print ten
// gdb-check:$43 = 10
// gdb-command:continue
// ARITHMETIC EXPRESSION
// gdb-command:finish
// gdb-command:print val
// gdb-check:$44 = -1
// gdb-command:print ten
// gdb-check:$45 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$46 = 17
// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT'
// gdb-check:$47 = 7
// gdb-command:print ten
// gdb-check:$48 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$49 = -1
// gdb-command:print ten
// gdb-check:$50 = 10
// gdb-command:continue
// INDEX EXPRESSION
// gdb-command:finish
// gdb-command:print val
// gdb-check:$51 = -1
// gdb-command:print ten
// gdb-check:$52 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$53 = 18
// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT'
// gdb-check:$54 = 8
// gdb-command:print ten
// gdb-check:$55 = 10
// gdb-command:continue
// gdb-command:finish
// gdb-command:print val
// gdb-check:$56 = -1
// gdb-command:print ten
// gdb-check:$57 = 10
// gdb-command:continue
#![allow(unused_variable)]
#![allow(dead_assignment)]
static mut MUT_INT: int = 0;
struct Point {
x: int,
y: int
}
fn a_function(x: int) -> int {
x + 1
}
fn main() {
let val = -1;
let ten = 10;
// surrounded by struct expression
let point = Point {
x: {
zzz();
sentinel();
let val = ten + 1;
unsafe {MUT_INT = 1;};
zzz();
sentinel();
val
},
y: 10
};
zzz();
sentinel();
// surrounded by function call
let _ = a_function({
zzz();
sentinel();
let val = ten + 2;
unsafe {MUT_INT = 2;};
zzz();
sentinel();
val
});
zzz();
sentinel();
// surrounded by tup
let _ = ({
zzz();
sentinel();
let val = ten + 3;
unsafe {MUT_INT = 3;};
zzz();
sentinel();
val
}, 0);
zzz();
sentinel();
// surrounded by vec
let _ = [{
zzz();
sentinel();
let val = ten + 4;
unsafe {MUT_INT = 4;};
zzz();
sentinel();
val
}, 0, 0];
zzz();
sentinel();
// surrounded by repeat vec
let _ = [{
zzz();
sentinel();
let val = ten + 5;
unsafe {MUT_INT = 5;};
zzz();
sentinel();
val
}, ..10];
zzz();
sentinel();
// assignment expression
let mut var = 0;
var = {
zzz();
sentinel();
let val = ten + 6;
unsafe {MUT_INT = 6;};
zzz();
sentinel();
val
};
zzz();
sentinel();
// arithmetic expression
var = 10 + -{
zzz();
sentinel();
let val = ten + 7;
unsafe {MUT_INT = 7;};
zzz();
sentinel();
val
} * 5;
zzz();
sentinel();
// index expression
let a_vector = [10, ..20];
let _ = a_vector[{
zzz();
sentinel();
let val = ten + 8;
unsafe {MUT_INT = 8;};
zzz();
sentinel();
val as uint
}];
zzz();
sentinel();
}
fn zzz() {()}
fn sentinel() {()}

View file

@ -13,20 +13,20 @@
// compile-flags:--debuginfo=1
// Make sure functions have proper names
// debugger:info functions
// check:[...]void[...]main([...]);
// check:[...]void[...]some_function([...]);
// check:[...]void[...]some_other_function([...]);
// check:[...]void[...]zzz([...]);
// gdb-command:info functions
// gdb-check:[...]void[...]main([...]);
// gdb-check:[...]void[...]some_function([...]);
// gdb-check:[...]void[...]some_other_function([...]);
// gdb-check:[...]void[...]zzz([...]);
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// Make sure there is no information about locals
// debugger:finish
// debugger:info locals
// check:No locals.
// debugger:continue
// gdb-command:finish
// gdb-command:info locals
// gdb-check:No locals.
// gdb-command:continue
#![allow(unused_variable)]

View file

@ -11,18 +11,18 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print the_a->val
// check:$1 = {{TheA, x = 0, y = 8970181431921507452}, {TheA, 0, 2088533116, 2088533116}}
// gdb-command:print the_a->val
// gdb-check:$1 = {{TheA, x = 0, y = 8970181431921507452}, {TheA, 0, 2088533116, 2088533116}}
// debugger:print the_b->val
// check:$2 = {{TheB, x = 0, y = 1229782938247303441}, {TheB, 0, 286331153, 286331153}}
// gdb-command:print the_b->val
// gdb-check:$2 = {{TheB, x = 0, y = 1229782938247303441}, {TheB, 0, 286331153, 286331153}}
// debugger:print univariant->val
// check:$3 = {-9747455}
// gdb-command:print univariant->val
// gdb-check:$3 = {-9747455}
#![allow(unused_variable)]
#![feature(struct_variant, managed_boxes)]

View file

@ -13,21 +13,21 @@
#![feature(managed_boxes)]
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print unique.ptr[0]->val
// check:$1 = 10
// gdb-command:print unique.ptr[0]->val
// gdb-check:$1 = 10
// debugger:print unique.ptr[1]->val
// check:$2 = 11
// gdb-command:print unique.ptr[1]->val
// gdb-check:$2 = 11
// debugger:print unique.ptr[2]->val
// check:$3 = 12
// gdb-command:print unique.ptr[2]->val
// gdb-check:$3 = 12
// debugger:print unique.ptr[3]->val
// check:$4 = 13
// gdb-command:print unique.ptr[3]->val
// gdb-check:$4 = 13
#![allow(unused_variable)]

View file

@ -13,19 +13,19 @@
#![feature(managed_boxes)]
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print pretty off
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print *ordinary_unique
// check:$1 = {-1, -2}
// gdb-command:print *ordinary_unique
// gdb-check:$1 = {-1, -2}
// debugger:print managed_within_unique->x
// check:$2 = -3
// gdb-command:print managed_within_unique->x
// gdb-check:$2 = -3
// debugger:print managed_within_unique->y->val
// check:$3 = -4
// gdb-command:print managed_within_unique->y->val
// gdb-check:$3 = -4
#![allow(unused_variable)]

View file

@ -11,58 +11,58 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// STACK BY REF
// debugger:finish
// debugger:print *self
// check:$1 = {{Variant2, [...]}, {Variant2, 117901063}}
// debugger:print arg1
// check:$2 = -1
// debugger:print arg2
// check:$3 = -2
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$1 = {{Variant2, [...]}, {Variant2, 117901063}}
// gdb-command:print arg1
// gdb-check:$2 = -1
// gdb-command:print arg2
// gdb-check:$3 = -2
// gdb-command:continue
// STACK BY VAL
// debugger:finish
// debugger:print self
// check:$4 = {{Variant2, [...]}, {Variant2, 117901063}}
// debugger:print arg1
// check:$5 = -3
// debugger:print arg2
// check:$6 = -4
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$4 = {{Variant2, [...]}, {Variant2, 117901063}}
// gdb-command:print arg1
// gdb-check:$5 = -3
// gdb-command:print arg2
// gdb-check:$6 = -4
// gdb-command:continue
// OWNED BY REF
// debugger:finish
// debugger:print *self
// check:$7 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
// debugger:print arg1
// check:$8 = -5
// debugger:print arg2
// check:$9 = -6
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$7 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
// gdb-command:print arg1
// gdb-check:$8 = -5
// gdb-command:print arg2
// gdb-check:$9 = -6
// gdb-command:continue
// OWNED BY VAL
// debugger:finish
// debugger:print self
// check:$10 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
// debugger:print arg1
// check:$11 = -7
// debugger:print arg2
// check:$12 = -8
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$10 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
// gdb-command:print arg1
// gdb-check:$11 = -7
// gdb-command:print arg2
// gdb-check:$12 = -8
// gdb-command:continue
// OWNED MOVED
// debugger:finish
// debugger:print *self
// check:$13 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
// debugger:print arg1
// check:$14 = -9
// debugger:print arg2
// check:$15 = -10
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$13 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
// gdb-command:print arg1
// gdb-check:$14 = -9
// gdb-command:print arg2
// gdb-check:$15 = -10
// gdb-command:continue
#![feature(struct_variant)]

View file

@ -11,58 +11,58 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// STACK BY REF
// debugger:finish
// debugger:print *self
// check:$1 = {x = {8888, -8888}}
// debugger:print arg1
// check:$2 = -1
// debugger:print arg2
// check:$3 = -2
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$1 = {x = {8888, -8888}}
// gdb-command:print arg1
// gdb-check:$2 = -1
// gdb-command:print arg2
// gdb-check:$3 = -2
// gdb-command:continue
// STACK BY VAL
// debugger:finish
// debugger:print self
// check:$4 = {x = {8888, -8888}}
// debugger:print arg1
// check:$5 = -3
// debugger:print arg2
// check:$6 = -4
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$4 = {x = {8888, -8888}}
// gdb-command:print arg1
// gdb-check:$5 = -3
// gdb-command:print arg2
// gdb-check:$6 = -4
// gdb-command:continue
// OWNED BY REF
// debugger:finish
// debugger:print *self
// check:$7 = {x = 1234.5}
// debugger:print arg1
// check:$8 = -5
// debugger:print arg2
// check:$9 = -6
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$7 = {x = 1234.5}
// gdb-command:print arg1
// gdb-check:$8 = -5
// gdb-command:print arg2
// gdb-check:$9 = -6
// gdb-command:continue
// OWNED BY VAL
// debugger:finish
// debugger:print self
// check:$10 = {x = 1234.5}
// debugger:print arg1
// check:$11 = -7
// debugger:print arg2
// check:$12 = -8
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$10 = {x = 1234.5}
// gdb-command:print arg1
// gdb-check:$11 = -7
// gdb-command:print arg2
// gdb-check:$12 = -8
// gdb-command:continue
// OWNED MOVED
// debugger:finish
// debugger:print *self
// check:$13 = {x = 1234.5}
// debugger:print arg1
// check:$14 = -9
// debugger:print arg2
// check:$15 = -10
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$13 = {x = 1234.5}
// gdb-command:print arg1
// gdb-check:$14 = -9
// gdb-command:print arg2
// gdb-check:$15 = -10
// gdb-command:continue
struct Struct<T> {
x: T

View file

@ -11,58 +11,58 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// STACK BY REF
// debugger:finish
// debugger:print *self
// check:$1 = {x = 100}
// debugger:print arg1
// check:$2 = -1
// debugger:print arg2
// check:$3 = -2
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$1 = {x = 100}
// gdb-command:print arg1
// gdb-check:$2 = -1
// gdb-command:print arg2
// gdb-check:$3 = -2
// gdb-command:continue
// STACK BY VAL
// debugger:finish
// debugger:print self
// check:$4 = {x = 100}
// debugger:print arg1
// check:$5 = -3
// debugger:print arg2
// check:$6 = -4
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$4 = {x = 100}
// gdb-command:print arg1
// gdb-check:$5 = -3
// gdb-command:print arg2
// gdb-check:$6 = -4
// gdb-command:continue
// OWNED BY REF
// debugger:finish
// debugger:print *self
// check:$7 = {x = 200}
// debugger:print arg1
// check:$8 = -5
// debugger:print arg2
// check:$9 = -6
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$7 = {x = 200}
// gdb-command:print arg1
// gdb-check:$8 = -5
// gdb-command:print arg2
// gdb-check:$9 = -6
// gdb-command:continue
// OWNED BY VAL
// debugger:finish
// debugger:print self
// check:$10 = {x = 200}
// debugger:print arg1
// check:$11 = -7
// debugger:print arg2
// check:$12 = -8
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$10 = {x = 200}
// gdb-command:print arg1
// gdb-check:$11 = -7
// gdb-command:print arg2
// gdb-check:$12 = -8
// gdb-command:continue
// OWNED MOVED
// debugger:finish
// debugger:print *self
// check:$13 = {x = 200}
// debugger:print arg1
// check:$14 = -9
// debugger:print arg2
// check:$15 = -10
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$13 = {x = 200}
// gdb-command:print arg1
// gdb-check:$14 = -9
// gdb-command:print arg2
// gdb-check:$15 = -10
// gdb-command:continue
struct Struct {
x: int

View file

@ -11,58 +11,58 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// STACK BY REF
// debugger:finish
// debugger:print *self
// check:$1 = {x = 100}
// debugger:print arg1
// check:$2 = -1
// debugger:print arg2
// check:$3 = -2
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$1 = {x = 100}
// gdb-command:print arg1
// gdb-check:$2 = -1
// gdb-command:print arg2
// gdb-check:$3 = -2
// gdb-command:continue
// STACK BY VAL
// debugger:finish
// debugger:print self
// check:$4 = {x = 100}
// debugger:print arg1
// check:$5 = -3
// debugger:print arg2
// check:$6 = -4
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$4 = {x = 100}
// gdb-command:print arg1
// gdb-check:$5 = -3
// gdb-command:print arg2
// gdb-check:$6 = -4
// gdb-command:continue
// OWNED BY REF
// debugger:finish
// debugger:print *self
// check:$7 = {x = 200}
// debugger:print arg1
// check:$8 = -5
// debugger:print arg2
// check:$9 = -6
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$7 = {x = 200}
// gdb-command:print arg1
// gdb-check:$8 = -5
// gdb-command:print arg2
// gdb-check:$9 = -6
// gdb-command:continue
// OWNED BY VAL
// debugger:finish
// debugger:print self
// check:$10 = {x = 200}
// debugger:print arg1
// check:$11 = -7
// debugger:print arg2
// check:$12 = -8
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$10 = {x = 200}
// gdb-command:print arg1
// gdb-check:$11 = -7
// gdb-command:print arg2
// gdb-check:$12 = -8
// gdb-command:continue
// OWNED MOVED
// debugger:finish
// debugger:print *self
// check:$13 = {x = 200}
// debugger:print arg1
// check:$14 = -9
// debugger:print arg2
// check:$15 = -10
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$13 = {x = 200}
// gdb-command:print arg1
// gdb-check:$14 = -9
// gdb-command:print arg2
// gdb-check:$15 = -10
// gdb-command:continue
struct Struct {
x: int

View file

@ -11,58 +11,58 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// STACK BY REF
// debugger:finish
// debugger:print *self
// check:$1 = {100, -100.5}
// debugger:print arg1
// check:$2 = -1
// debugger:print arg2
// check:$3 = -2
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$1 = {100, -100.5}
// gdb-command:print arg1
// gdb-check:$2 = -1
// gdb-command:print arg2
// gdb-check:$3 = -2
// gdb-command:continue
// STACK BY VAL
// debugger:finish
// debugger:print self
// check:$4 = {100, -100.5}
// debugger:print arg1
// check:$5 = -3
// debugger:print arg2
// check:$6 = -4
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$4 = {100, -100.5}
// gdb-command:print arg1
// gdb-check:$5 = -3
// gdb-command:print arg2
// gdb-check:$6 = -4
// gdb-command:continue
// OWNED BY REF
// debugger:finish
// debugger:print *self
// check:$7 = {200, -200.5}
// debugger:print arg1
// check:$8 = -5
// debugger:print arg2
// check:$9 = -6
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$7 = {200, -200.5}
// gdb-command:print arg1
// gdb-check:$8 = -5
// gdb-command:print arg2
// gdb-check:$9 = -6
// gdb-command:continue
// OWNED BY VAL
// debugger:finish
// debugger:print self
// check:$10 = {200, -200.5}
// debugger:print arg1
// check:$11 = -7
// debugger:print arg2
// check:$12 = -8
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$10 = {200, -200.5}
// gdb-command:print arg1
// gdb-check:$11 = -7
// gdb-command:print arg2
// gdb-check:$12 = -8
// gdb-command:continue
// OWNED MOVED
// debugger:finish
// debugger:print *self
// check:$13 = {200, -200.5}
// debugger:print arg1
// check:$14 = -9
// debugger:print arg2
// check:$15 = -10
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$13 = {200, -200.5}
// gdb-command:print arg1
// gdb-check:$14 = -9
// gdb-command:print arg2
// gdb-check:$15 = -10
// gdb-command:continue
struct TupleStruct(int, f64);

View file

@ -11,22 +11,22 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print abc
// check:$1 = 10101
// debugger:continue
// gdb-command:print abc
// gdb-check:$1 = 10101
// gdb-command:continue
// debugger:finish
// debugger:print abc
// check:$2 = 20202
// debugger:continue
// gdb-command:finish
// gdb-command:print abc
// gdb-check:$2 = 20202
// gdb-command:continue
// debugger:finish
// debugger:print abc
// check:$3 = 30303
// gdb-command:finish
// gdb-command:print abc
// gdb-check:$3 = 30303
#![allow(unused_variable)]

View file

@ -11,22 +11,22 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print a
// check:$1 = 10101
// debugger:continue
// gdb-command:print a
// gdb-check:$1 = 10101
// gdb-command:continue
// debugger:finish
// debugger:print b
// check:$2 = 20202
// debugger:continue
// gdb-command:finish
// gdb-command:print b
// gdb-check:$2 = 20202
// gdb-command:continue
// debugger:finish
// debugger:print c
// check:$3 = 30303
// gdb-command:finish
// gdb-command:print c
// gdb-check:$3 = 30303
#![allow(unused_variable)]

View file

@ -11,50 +11,50 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print x
// check:$1 = false
// debugger:print y
// check:$2 = true
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = false
// gdb-command:print y
// gdb-check:$2 = true
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$3 = 10
// debugger:print y
// check:$4 = true
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$3 = 10
// gdb-command:print y
// gdb-check:$4 = true
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$5 = 10.5
// debugger:print y
// check:$6 = 20
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$5 = 10.5
// gdb-command:print y
// gdb-check:$6 = 20
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$7 = true
// debugger:print y
// check:$8 = 2220
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$7 = true
// gdb-command:print y
// gdb-check:$8 = 2220
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$9 = 203203.5
// debugger:print y
// check:$10 = 2220
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$9 = 203203.5
// gdb-command:print y
// gdb-check:$10 = 2220
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$11 = 10.5
// debugger:print y
// check:$12 = 20
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$11 = 10.5
// gdb-command:print y
// gdb-check:$12 = 20
// gdb-command:continue
fn main() {
let x = false;

View file

@ -11,15 +11,15 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print first
// check:$1 = {<No data fields>}
// gdb-command:print first
// gdb-check:$1 = {<No data fields>}
// debugger:print second
// check:$2 = {<No data fields>}
// gdb-command:print second
// gdb-check:$2 = {<No data fields>}
#![allow(unused_variable)]

View file

@ -11,29 +11,29 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print some
// check:$1 = {0x12345678}
// gdb-command:print some
// gdb-check:$1 = {0x12345678}
// debugger:print none
// check:$2 = {0x0}
// gdb-command:print none
// gdb-check:$2 = {0x0}
// debugger:print full
// check:$3 = {454545, 0x87654321, 9988}
// gdb-command:print full
// gdb-check:$3 = {454545, 0x87654321, 9988}
// debugger:print empty->discr
// check:$4 = (int *) 0x0
// gdb-command:print empty->discr
// gdb-check:$4 = (int *) 0x0
// debugger:print droid
// check:$5 = {id = 675675, range = 10000001, internals = 0x43218765}
// gdb-command:print droid
// gdb-check:$5 = {id = 675675, range = 10000001, internals = 0x43218765}
// debugger:print void_droid->internals
// check:$6 = (int *) 0x0
// gdb-command:print void_droid->internals
// gdb-check:$6 = (int *) 0x0
// debugger:continue
// gdb-command:continue
#![feature(struct_variant)]

View file

@ -12,35 +12,35 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print pretty off
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print packed
// check:$1 = {x = 123, y = 234, z = 345}
// gdb-command:print packed
// gdb-check:$1 = {x = 123, y = 234, z = 345}
// debugger:print packedInPacked
// check:$2 = {a = 1111, b = {x = 2222, y = 3333, z = 4444}, c = 5555, d = {x = 6666, y = 7777, z = 8888}}
// gdb-command:print packedInPacked
// gdb-check:$2 = {a = 1111, b = {x = 2222, y = 3333, z = 4444}, c = 5555, d = {x = 6666, y = 7777, z = 8888}}
// debugger:print packedInUnpacked
// check:$3 = {a = -1111, b = {x = -2222, y = -3333, z = -4444}, c = -5555, d = {x = -6666, y = -7777, z = -8888}}
// gdb-command:print packedInUnpacked
// gdb-check:$3 = {a = -1111, b = {x = -2222, y = -3333, z = -4444}, c = -5555, d = {x = -6666, y = -7777, z = -8888}}
// debugger:print unpackedInPacked
// check:$4 = {a = 987, b = {x = 876, y = 765, z = 654}, c = {x = 543, y = 432, z = 321}, d = 210}
// gdb-command:print unpackedInPacked
// gdb-check:$4 = {a = 987, b = {x = 876, y = 765, z = 654}, c = {x = 543, y = 432, z = 321}, d = 210}
// debugger:print packedInPackedWithDrop
// check:$5 = {a = 11, b = {x = 22, y = 33, z = 44}, c = 55, d = {x = 66, y = 77, z = 88}}
// gdb-command:print packedInPackedWithDrop
// gdb-check:$5 = {a = 11, b = {x = 22, y = 33, z = 44}, c = 55, d = {x = 66, y = 77, z = 88}}
// debugger:print packedInUnpackedWithDrop
// check:$6 = {a = -11, b = {x = -22, y = -33, z = -44}, c = -55, d = {x = -66, y = -77, z = -88}}
// gdb-command:print packedInUnpackedWithDrop
// gdb-check:$6 = {a = -11, b = {x = -22, y = -33, z = -44}, c = -55, d = {x = -66, y = -77, z = -88}}
// debugger:print unpackedInPackedWithDrop
// check:$7 = {a = 98, b = {x = 87, y = 76, z = 65}, c = {x = 54, y = 43, z = 32}, d = 21}
// gdb-command:print unpackedInPackedWithDrop
// gdb-check:$7 = {a = 98, b = {x = 87, y = 76, z = 65}, c = {x = 54, y = 43, z = 32}, d = 21}
// debugger:print deeplyNested
// check:$8 = {a = {a = 1, b = {x = 2, y = 3, z = 4}, c = 5, d = {x = 6, y = 7, z = 8}}, b = {a = 9, b = {x = 10, y = 11, z = 12}, c = {x = 13, y = 14, z = 15}, d = 16}, c = {a = 17, b = {x = 18, y = 19, z = 20}, c = 21, d = {x = 22, y = 23, z = 24}}, d = {a = 25, b = {x = 26, y = 27, z = 28}, c = 29, d = {x = 30, y = 31, z = 32}}, e = {a = 33, b = {x = 34, y = 35, z = 36}, c = {x = 37, y = 38, z = 39}, d = 40}, f = {a = 41, b = {x = 42, y = 43, z = 44}, c = 45, d = {x = 46, y = 47, z = 48}}}
// gdb-command:print deeplyNested
// gdb-check:$8 = {a = {a = 1, b = {x = 2, y = 3, z = 4}, c = 5, d = {x = 6, y = 7, z = 8}}, b = {a = 9, b = {x = 10, y = 11, z = 12}, c = {x = 13, y = 14, z = 15}, d = 16}, c = {a = 17, b = {x = 18, y = 19, z = 20}, c = 21, d = {x = 22, y = 23, z = 24}}, d = {a = 25, b = {x = 26, y = 27, z = 28}, c = 29, d = {x = 30, y = 31, z = 32}}, e = {a = 33, b = {x = 34, y = 35, z = 36}, c = {x = 37, y = 38, z = 39}, d = 40}, f = {a = 41, b = {x = 42, y = 43, z = 44}, c = 45, d = {x = 46, y = 47, z = 48}}}
#![allow(unused_variable)]

View file

@ -12,28 +12,28 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print pretty off
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print packed
// check:$1 = {x = 123, y = 234, z = 345}
// gdb-command:print packed
// gdb-check:$1 = {x = 123, y = 234, z = 345}
// debugger:print packedInPacked
// check:$2 = {a = 1111, b = {x = 2222, y = 3333, z = 4444}, c = 5555, d = {x = 6666, y = 7777, z = 8888}}
// gdb-command:print packedInPacked
// gdb-check:$2 = {a = 1111, b = {x = 2222, y = 3333, z = 4444}, c = 5555, d = {x = 6666, y = 7777, z = 8888}}
// debugger:print packedInUnpacked
// check:$3 = {a = -1111, b = {x = -2222, y = -3333, z = -4444}, c = -5555, d = {x = -6666, y = -7777, z = -8888}}
// gdb-command:print packedInUnpacked
// gdb-check:$3 = {a = -1111, b = {x = -2222, y = -3333, z = -4444}, c = -5555, d = {x = -6666, y = -7777, z = -8888}}
// debugger:print unpackedInPacked
// check:$4 = {a = 987, b = {x = 876, y = 765, z = 654, w = 543}, c = {x = 432, y = 321, z = 210, w = 109}, d = -98}
// gdb-command:print unpackedInPacked
// gdb-check:$4 = {a = 987, b = {x = 876, y = 765, z = 654, w = 543}, c = {x = 432, y = 321, z = 210, w = 109}, d = -98}
// debugger:print sizeof(packed)
// check:$5 = 14
// gdb-command:print sizeof(packed)
// gdb-check:$5 = 14
// debugger:print sizeof(packedInPacked)
// check:$6 = 40
// gdb-command:print sizeof(packedInPacked)
// gdb-check:$6 = 40
#![allow(unused_variable)]

View file

@ -11,7 +11,7 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:run
// gdb-command:run
// Test whether compiling a recursive enum definition crashes debug info generation. The test case
// is taken from issue #11083.

View file

@ -13,94 +13,94 @@
#![feature(managed_boxes)]
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print pretty off
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print stack_unique.value
// check:$1 = 0
// debugger:print stack_unique.next.val->value
// check:$2 = 1
// gdb-command:print stack_unique.value
// gdb-check:$1 = 0
// gdb-command:print stack_unique.next.val->value
// gdb-check:$2 = 1
// debugger:print unique_unique->value
// check:$3 = 2
// debugger:print unique_unique->next.val->value
// check:$4 = 3
// gdb-command:print unique_unique->value
// gdb-check:$3 = 2
// gdb-command:print unique_unique->next.val->value
// gdb-check:$4 = 3
// debugger:print box_unique->val.value
// check:$5 = 4
// debugger:print box_unique->val.next.val->value
// check:$6 = 5
// gdb-command:print box_unique->val.value
// gdb-check:$5 = 4
// gdb-command:print box_unique->val.next.val->value
// gdb-check:$6 = 5
// debugger:print vec_unique[0].value
// check:$7 = 6.5
// debugger:print vec_unique[0].next.val->value
// check:$8 = 7.5
// gdb-command:print vec_unique[0].value
// gdb-check:$7 = 6.5
// gdb-command:print vec_unique[0].next.val->value
// gdb-check:$8 = 7.5
// debugger:print borrowed_unique->value
// check:$9 = 8.5
// debugger:print borrowed_unique->next.val->value
// check:$10 = 9.5
// gdb-command:print borrowed_unique->value
// gdb-check:$9 = 8.5
// gdb-command:print borrowed_unique->next.val->value
// gdb-check:$10 = 9.5
// MANAGED
// debugger:print stack_managed.value
// check:$11 = 10
// debugger:print stack_managed.next.val->val.value
// check:$12 = 11
// gdb-command:print stack_managed.value
// gdb-check:$11 = 10
// gdb-command:print stack_managed.next.val->val.value
// gdb-check:$12 = 11
// debugger:print unique_managed->value
// check:$13 = 12
// debugger:print unique_managed->next.val->val.value
// check:$14 = 13
// gdb-command:print unique_managed->value
// gdb-check:$13 = 12
// gdb-command:print unique_managed->next.val->val.value
// gdb-check:$14 = 13
// debugger:print box_managed->val.value
// check:$15 = 14
// debugger:print box_managed->val.next.val->val.value
// check:$16 = 15
// gdb-command:print box_managed->val.value
// gdb-check:$15 = 14
// gdb-command:print box_managed->val.next.val->val.value
// gdb-check:$16 = 15
// debugger:print vec_managed[0].value
// check:$17 = 16.5
// debugger:print vec_managed[0].next.val->val.value
// check:$18 = 17.5
// gdb-command:print vec_managed[0].value
// gdb-check:$17 = 16.5
// gdb-command:print vec_managed[0].next.val->val.value
// gdb-check:$18 = 17.5
// debugger:print borrowed_managed->value
// check:$19 = 18.5
// debugger:print borrowed_managed->next.val->val.value
// check:$20 = 19.5
// gdb-command:print borrowed_managed->value
// gdb-check:$19 = 18.5
// gdb-command:print borrowed_managed->next.val->val.value
// gdb-check:$20 = 19.5
// LONG CYCLE
// debugger:print long_cycle1.value
// check:$21 = 20
// debugger:print long_cycle1.next->value
// check:$22 = 21
// debugger:print long_cycle1.next->next->value
// check:$23 = 22
// debugger:print long_cycle1.next->next->next->value
// check:$24 = 23
// gdb-command:print long_cycle1.value
// gdb-check:$21 = 20
// gdb-command:print long_cycle1.next->value
// gdb-check:$22 = 21
// gdb-command:print long_cycle1.next->next->value
// gdb-check:$23 = 22
// gdb-command:print long_cycle1.next->next->next->value
// gdb-check:$24 = 23
// debugger:print long_cycle2.value
// check:$25 = 24
// debugger:print long_cycle2.next->value
// check:$26 = 25
// debugger:print long_cycle2.next->next->value
// check:$27 = 26
// gdb-command:print long_cycle2.value
// gdb-check:$25 = 24
// gdb-command:print long_cycle2.next->value
// gdb-check:$26 = 25
// gdb-command:print long_cycle2.next->next->value
// gdb-check:$27 = 26
// debugger:print long_cycle3.value
// check:$28 = 27
// debugger:print long_cycle3.next->value
// check:$29 = 28
// gdb-command:print long_cycle3.value
// gdb-check:$28 = 27
// gdb-command:print long_cycle3.next->value
// gdb-check:$29 = 28
// debugger:print long_cycle4.value
// check:$30 = 29.5
// gdb-command:print long_cycle4.value
// gdb-check:$30 = 29.5
// debugger:print (*****long_cycle_w_anonymous_types).value
// check:$31 = 30
// gdb-command:print (*****long_cycle_w_anonymous_types).value
// gdb-check:$31 = 30
// debugger:print (*****((*****long_cycle_w_anonymous_types).next.val)).value
// check:$32 = 31
// gdb-command:print (*****((*****long_cycle_w_anonymous_types).next.val)).value
// gdb-check:$32 = 31
// debugger:continue
// gdb-command:continue
#![allow(unused_variable)]
#![feature(struct_variant)]

View file

@ -11,58 +11,58 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// STACK BY REF
// debugger:finish
// debugger:print *self
// check:$1 = {x = 100}
// debugger:print arg1
// check:$2 = -1
// debugger:print arg2
// check:$3 = -2
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$1 = {x = 100}
// gdb-command:print arg1
// gdb-check:$2 = -1
// gdb-command:print arg2
// gdb-check:$3 = -2
// gdb-command:continue
// STACK BY VAL
// debugger:finish
// debugger:print self
// check:$4 = {x = 100}
// debugger:print arg1
// check:$5 = -3
// debugger:print arg2
// check:$6 = -4
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$4 = {x = 100}
// gdb-command:print arg1
// gdb-check:$5 = -3
// gdb-command:print arg2
// gdb-check:$6 = -4
// gdb-command:continue
// OWNED BY REF
// debugger:finish
// debugger:print *self
// check:$7 = {x = 200}
// debugger:print arg1
// check:$8 = -5
// debugger:print arg2
// check:$9 = -6
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$7 = {x = 200}
// gdb-command:print arg1
// gdb-check:$8 = -5
// gdb-command:print arg2
// gdb-check:$9 = -6
// gdb-command:continue
// OWNED BY VAL
// debugger:finish
// debugger:print self
// check:$10 = {x = 200}
// debugger:print arg1
// check:$11 = -7
// debugger:print arg2
// check:$12 = -8
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$10 = {x = 200}
// gdb-command:print arg1
// gdb-check:$11 = -7
// gdb-command:print arg2
// gdb-check:$12 = -8
// gdb-command:continue
// OWNED MOVED
// debugger:finish
// debugger:print *self
// check:$13 = {x = 200}
// debugger:print arg1
// check:$14 = -9
// debugger:print arg2
// check:$15 = -10
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$13 = {x = 200}
// gdb-command:print arg1
// gdb-check:$14 = -9
// gdb-command:print arg2
// gdb-check:$15 = -10
// gdb-command:continue
struct Struct {
x: int

View file

@ -11,58 +11,58 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// STACK BY REF
// debugger:finish
// debugger:print *self
// check:$1 = {x = 987}
// debugger:print arg1
// check:$2 = -1
// debugger:print/d arg2
// check:$3 = -2
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$1 = {x = 987}
// gdb-command:print arg1
// gdb-check:$2 = -1
// gdb-command:print/d arg2
// gdb-check:$3 = -2
// gdb-command:continue
// STACK BY VAL
// debugger:finish
// debugger:print self
// check:$4 = {x = 987}
// debugger:print arg1
// check:$5 = -3
// debugger:print arg2
// check:$6 = -4
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$4 = {x = 987}
// gdb-command:print arg1
// gdb-check:$5 = -3
// gdb-command:print arg2
// gdb-check:$6 = -4
// gdb-command:continue
// OWNED BY REF
// debugger:finish
// debugger:print *self
// check:$7 = {x = 879}
// debugger:print arg1
// check:$8 = -5
// debugger:print arg2
// check:$9 = -6
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$7 = {x = 879}
// gdb-command:print arg1
// gdb-check:$8 = -5
// gdb-command:print arg2
// gdb-check:$9 = -6
// gdb-command:continue
// OWNED BY VAL
// debugger:finish
// debugger:print self
// check:$10 = {x = 879}
// debugger:print arg1
// check:$11 = -7
// debugger:print arg2
// check:$12 = -8
// debugger:continue
// gdb-command:finish
// gdb-command:print self
// gdb-check:$10 = {x = 879}
// gdb-command:print arg1
// gdb-check:$11 = -7
// gdb-command:print arg2
// gdb-check:$12 = -8
// gdb-command:continue
// OWNED MOVED
// debugger:finish
// debugger:print *self
// check:$13 = {x = 879}
// debugger:print arg1
// check:$14 = -9
// debugger:print arg2
// check:$15 = -10.5
// debugger:continue
// gdb-command:finish
// gdb-command:print *self
// gdb-check:$13 = {x = 879}
// gdb-command:print arg1
// gdb-check:$14 = -9
// gdb-command:print arg2
// gdb-check:$15 = -10.5
// gdb-command:continue
struct Struct {
x: int

View file

@ -11,29 +11,29 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print x
// check:$1 = false
// debugger:print y
// check:$2 = true
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = false
// gdb-command:print y
// gdb-check:$2 = true
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$3 = 10
// debugger:print y
// check:$4 = true
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$3 = 10
// gdb-command:print y
// gdb-check:$4 = true
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$5 = 10.5
// debugger:print y
// check:$6 = 20
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$5 = 10.5
// gdb-command:print y
// gdb-check:$6 = 20
// gdb-command:continue
fn a_function(x: bool, y: bool) {
zzz();

View file

@ -11,29 +11,29 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print x
// check:$1 = false
// debugger:print y
// check:$2 = true
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = false
// gdb-command:print y
// gdb-check:$2 = true
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$3 = 10
// debugger:print y
// check:$4 = true
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$3 = 10
// gdb-command:print y
// gdb-check:$4 = true
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$5 = 10.5
// debugger:print y
// check:$6 = 20
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$5 = 10.5
// gdb-command:print y
// gdb-check:$6 = 20
// gdb-command:continue
fn main() {
let x = false;

View file

@ -11,34 +11,34 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print/d i8x16
// check:$1 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
// debugger:print/d i16x8
// check:$2 = {16, 17, 18, 19, 20, 21, 22, 23}
// debugger:print/d i32x4
// check:$3 = {24, 25, 26, 27}
// debugger:print/d i64x2
// check:$4 = {28, 29}
// gdb-command:finish
// gdb-command:print/d i8x16
// gdb-check:$1 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
// gdb-command:print/d i16x8
// gdb-check:$2 = {16, 17, 18, 19, 20, 21, 22, 23}
// gdb-command:print/d i32x4
// gdb-check:$3 = {24, 25, 26, 27}
// gdb-command:print/d i64x2
// gdb-check:$4 = {28, 29}
// debugger:print/d u8x16
// check:$5 = {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45}
// debugger:print/d u16x8
// check:$6 = {46, 47, 48, 49, 50, 51, 52, 53}
// debugger:print/d u32x4
// check:$7 = {54, 55, 56, 57}
// debugger:print/d u64x2
// check:$8 = {58, 59}
// gdb-command:print/d u8x16
// gdb-check:$5 = {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45}
// gdb-command:print/d u16x8
// gdb-check:$6 = {46, 47, 48, 49, 50, 51, 52, 53}
// gdb-command:print/d u32x4
// gdb-check:$7 = {54, 55, 56, 57}
// gdb-command:print/d u64x2
// gdb-check:$8 = {58, 59}
// debugger:print f32x4
// check:$9 = {60.5, 61.5, 62.5, 63.5}
// debugger:print f64x2
// check:$10 = {64.5, 65.5}
// gdb-command:print f32x4
// gdb-check:$9 = {60.5, 61.5, 62.5, 63.5}
// gdb-command:print f64x2
// gdb-check:$10 = {64.5, 65.5}
// debugger:continue
// gdb-command:continue
#![allow(experimental)]
#![allow(unused_variable)]

View file

@ -11,43 +11,43 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print x
// check:$1 = false
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$1 = false
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$2 = false
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$2 = false
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$3 = 10
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$3 = 10
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$4 = 10
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$4 = 10
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$5 = 10.5
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$5 = 10.5
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$6 = 10
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$6 = 10
// gdb-command:continue
// debugger:finish
// debugger:print x
// check:$7 = false
// debugger:continue
// gdb-command:finish
// gdb-command:print x
// gdb-check:$7 = false
// gdb-command:continue
fn main() {

View file

@ -12,68 +12,68 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// gdb-command:set print pretty off
// gdb-command:rbreak zzz
// debugger:print 'simple-struct::NO_PADDING_16'
// check:$1 = {x = 1000, y = -1001}
// gdb-command:print 'simple-struct::NO_PADDING_16'
// gdb-check:$1 = {x = 1000, y = -1001}
// debugger:print 'simple-struct::NO_PADDING_32'
// check:$2 = {x = 1, y = 2, z = 3}
// gdb-command:print 'simple-struct::NO_PADDING_32'
// gdb-check:$2 = {x = 1, y = 2, z = 3}
// debugger:print 'simple-struct::NO_PADDING_64'
// check:$3 = {x = 4, y = 5, z = 6}
// gdb-command:print 'simple-struct::NO_PADDING_64'
// gdb-check:$3 = {x = 4, y = 5, z = 6}
// debugger:print 'simple-struct::NO_PADDING_163264'
// check:$4 = {a = 7, b = 8, c = 9, d = 10}
// gdb-command:print 'simple-struct::NO_PADDING_163264'
// gdb-check:$4 = {a = 7, b = 8, c = 9, d = 10}
// debugger:print 'simple-struct::INTERNAL_PADDING'
// check:$5 = {x = 11, y = 12}
// gdb-command:print 'simple-struct::INTERNAL_PADDING'
// gdb-check:$5 = {x = 11, y = 12}
// debugger:print 'simple-struct::PADDING_AT_END'
// check:$6 = {x = 13, y = 14}
// gdb-command:print 'simple-struct::PADDING_AT_END'
// gdb-check:$6 = {x = 13, y = 14}
// debugger:run
// debugger:finish
// gdb-command:run
// gdb-command:finish
// debugger:print no_padding16
// check:$7 = {x = 10000, y = -10001}
// gdb-command:print no_padding16
// gdb-check:$7 = {x = 10000, y = -10001}
// debugger:print no_padding32
// check:$8 = {x = -10002, y = -10003.5, z = 10004}
// gdb-command:print no_padding32
// gdb-check:$8 = {x = -10002, y = -10003.5, z = 10004}
// debugger:print no_padding64
// check:$9 = {x = -10005.5, y = 10006, z = 10007}
// gdb-command:print no_padding64
// gdb-check:$9 = {x = -10005.5, y = 10006, z = 10007}
// debugger:print no_padding163264
// check:$10 = {a = -10008, b = 10009, c = 10010, d = 10011}
// gdb-command:print no_padding163264
// gdb-check:$10 = {a = -10008, b = 10009, c = 10010, d = 10011}
// debugger:print internal_padding
// check:$11 = {x = 10012, y = -10013}
// gdb-command:print internal_padding
// gdb-check:$11 = {x = 10012, y = -10013}
// debugger:print padding_at_end
// check:$12 = {x = -10014, y = 10015}
// gdb-command:print padding_at_end
// gdb-check:$12 = {x = -10014, y = 10015}
// debugger:print 'simple-struct::NO_PADDING_16'
// check:$13 = {x = 100, y = -101}
// gdb-command:print 'simple-struct::NO_PADDING_16'
// gdb-check:$13 = {x = 100, y = -101}
// debugger:print 'simple-struct::NO_PADDING_32'
// check:$14 = {x = -15, y = -16, z = 17}
// gdb-command:print 'simple-struct::NO_PADDING_32'
// gdb-check:$14 = {x = -15, y = -16, z = 17}
// debugger:print 'simple-struct::NO_PADDING_64'
// check:$15 = {x = -18, y = 19, z = 20}
// gdb-command:print 'simple-struct::NO_PADDING_64'
// gdb-check:$15 = {x = -18, y = 19, z = 20}
// debugger:print 'simple-struct::NO_PADDING_163264'
// check:$16 = {a = -21, b = 22, c = 23, d = 24}
// gdb-command:print 'simple-struct::NO_PADDING_163264'
// gdb-check:$16 = {a = -21, b = 22, c = 23, d = 24}
// debugger:print 'simple-struct::INTERNAL_PADDING'
// check:$17 = {x = 25, y = -26}
// gdb-command:print 'simple-struct::INTERNAL_PADDING'
// gdb-check:$17 = {x = 25, y = -26}
// debugger:print 'simple-struct::PADDING_AT_END'
// check:$18 = {x = -27, y = 28}
// gdb-command:print 'simple-struct::PADDING_AT_END'
// gdb-check:$18 = {x = -27, y = 28}
// debugger:print inheriting
// check:$19 = {a = 10019, b = -10020, x = -10016, y = -10017.5, z = 10018}
// gdb-command:print inheriting
// gdb-check:$19 = {a = 10019, b = -10020, x = -10016, y = -10017.5, z = 10018}
#![feature(struct_inherit)];

View file

@ -0,0 +1,113 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-win32: FIXME #13256
// ignore-android: FIXME(#10381)
// compile-flags:-g
// gdb-command:set print pretty off
// gdb-command:rbreak zzz
// gdb-command:print/d 'simple-tuple::NO_PADDING_8'
// gdb-check:$1 = {-50, 50}
// gdb-command:print 'simple-tuple::NO_PADDING_16'
// gdb-check:$2 = {-1, 2, 3}
// gdb-command:print 'simple-tuple::NO_PADDING_32'
// gdb-check:$3 = {4, 5, 6}
// gdb-command:print 'simple-tuple::NO_PADDING_64'
// gdb-check:$4 = {7, 8, 9}
// gdb-command:print 'simple-tuple::INTERNAL_PADDING_1'
// gdb-check:$5 = {10, 11}
// gdb-command:print 'simple-tuple::INTERNAL_PADDING_2'
// gdb-check:$6 = {12, 13, 14, 15}
// gdb-command:print 'simple-tuple::PADDING_AT_END'
// gdb-check:$7 = {16, 17}
// gdb-command:run
// gdb-command:finish
// gdb-command:print/d noPadding8
// gdb-check:$8 = {-100, 100}
// gdb-command:print noPadding16
// gdb-check:$9 = {0, 1, 2}
// gdb-command:print noPadding32
// gdb-check:$10 = {3, 4.5, 5}
// gdb-command:print noPadding64
// gdb-check:$11 = {6, 7.5, 8}
// gdb-command:print internalPadding1
// gdb-check:$12 = {9, 10}
// gdb-command:print internalPadding2
// gdb-check:$13 = {11, 12, 13, 14}
// gdb-command:print paddingAtEnd
// gdb-check:$14 = {15, 16}
// gdb-command:print/d 'simple-tuple::NO_PADDING_8'
// gdb-check:$15 = {-127, 127}
// gdb-command:print 'simple-tuple::NO_PADDING_16'
// gdb-check:$16 = {-10, 10, 9}
// gdb-command:print 'simple-tuple::NO_PADDING_32'
// gdb-check:$17 = {14, 15, 16}
// gdb-command:print 'simple-tuple::NO_PADDING_64'
// gdb-check:$18 = {17, 18, 19}
// gdb-command:print 'simple-tuple::INTERNAL_PADDING_1'
// gdb-check:$19 = {110, 111}
// gdb-command:print 'simple-tuple::INTERNAL_PADDING_2'
// gdb-check:$20 = {112, 113, 114, 115}
// gdb-command:print 'simple-tuple::PADDING_AT_END'
// gdb-check:$21 = {116, 117}
#![allow(unused_variable)]
#![allow(dead_code)]
static mut NO_PADDING_8: (i8, u8) = (-50, 50);
static mut NO_PADDING_16: (i16, i16, u16) = (-1, 2, 3);
static mut NO_PADDING_32: (i32, f32, u32) = (4, 5.0, 6);
static mut NO_PADDING_64: (i64, f64, u64) = (7, 8.0, 9);
static mut INTERNAL_PADDING_1: (i16, i32) = (10, 11);
static mut INTERNAL_PADDING_2: (i16, i32, u32, u64) = (12, 13, 14, 15);
static mut PADDING_AT_END: (i32, i16) = (16, 17);
fn main() {
let noPadding8: (i8, u8) = (-100, 100);
let noPadding16: (i16, i16, u16) = (0, 1, 2);
let noPadding32: (i32, f32, u32) = (3, 4.5, 5);
let noPadding64: (i64, f64, u64) = (6, 7.5, 8);
let internalPadding1: (i16, i32) = (9, 10);
let internalPadding2: (i16, i32, u32, u64) = (11, 12, 13, 14);
let paddingAtEnd: (i32, i16) = (15, 16);
unsafe {
NO_PADDING_8 = (-127, 127);
NO_PADDING_16 = (-10, 10, 9);
NO_PADDING_32 = (14, 15.0, 16);
NO_PADDING_64 = (17, 18.0, 19);
INTERNAL_PADDING_1 = (110, 111);
INTERNAL_PADDING_2 = (112, 113, 114, 115);
PADDING_AT_END = (116, 117);
}
zzz();
}
fn zzz() {()}

View file

@ -11,26 +11,26 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// STRUCT
// debugger:finish
// debugger:print arg1
// check:$1 = 1
// debugger:print arg2
// check:$2 = 2
// debugger:continue
// gdb-command:finish
// gdb-command:print arg1
// gdb-check:$1 = 1
// gdb-command:print arg2
// gdb-check:$2 = 2
// gdb-command:continue
// ENUM
// debugger:finish
// debugger:print arg1
// check:$3 = -3
// debugger:print arg2
// check:$4 = 4.5
// debugger:print arg3
// check:$5 = 5
// debugger:continue
// gdb-command:finish
// gdb-command:print arg1
// gdb-check:$3 = -3
// gdb-command:print arg2
// gdb-check:$4 = 4.5
// gdb-command:print arg3
// gdb-check:$5 = 5
// gdb-command:continue
#![feature(struct_variant)]

View file

@ -12,19 +12,19 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print union on
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print union on
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print case1
// check:$1 = {{Case1, 0, {x = 2088533116, y = 2088533116, z = 31868}}, {Case1, 0, 8970181431921507452, 31868}}
// gdb-command:print case1
// gdb-check:$1 = {{Case1, 0, {x = 2088533116, y = 2088533116, z = 31868}}, {Case1, 0, 8970181431921507452, 31868}}
// debugger:print case2
// check:$2 = {{Case2, 0, {x = 286331153, y = 286331153, z = 4369}}, {Case2, 0, 1229782938247303441, 4369}}
// gdb-command:print case2
// gdb-check:$2 = {{Case2, 0, {x = 286331153, y = 286331153, z = 4369}}, {Case2, 0, 1229782938247303441, 4369}}
// debugger:print univariant
// check:$3 = {{x = 123, y = 456, z = 789}}
// gdb-command:print univariant
// gdb-check:$3 = {{x = 123, y = 456, z = 789}}
#![allow(unused_variable)]

View file

@ -11,19 +11,19 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print pretty off
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print three_simple_structs
// check:$1 = {x = {x = 1}, y = {x = 2}, z = {x = 3}}
// gdb-command:print three_simple_structs
// gdb-check:$1 = {x = {x = 1}, y = {x = 2}, z = {x = 3}}
// debugger:print internal_padding_parent
// check:$2 = {x = {x = 4, y = 5}, y = {x = 6, y = 7}, z = {x = 8, y = 9}}
// gdb-command:print internal_padding_parent
// gdb-check:$2 = {x = {x = 4, y = 5}, y = {x = 6, y = 7}, z = {x = 8, y = 9}}
// debugger:print padding_at_end_parent
// check:$3 = {x = {x = 10, y = 11}, y = {x = 12, y = 13}, z = {x = 14, y = 15}}
// gdb-command:print padding_at_end_parent
// gdb-check:$3 = {x = {x = 10, y = 11}, y = {x = 12, y = 13}, z = {x = 14, y = 15}}
#![allow(unused_variable)]

View file

@ -12,22 +12,22 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print union on
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print union on
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print case1
// check:$1 = {{Case1, a = 0, b = 31868, c = 31868, d = 31868, e = 31868}, {Case1, a = 0, b = 2088533116, c = 2088533116}, {Case1, a = 0, b = 8970181431921507452}}
// gdb-command:print case1
// gdb-check:$1 = {{Case1, a = 0, b = 31868, c = 31868, d = 31868, e = 31868}, {Case1, a = 0, b = 2088533116, c = 2088533116}, {Case1, a = 0, b = 8970181431921507452}}
// debugger:print case2
// check:$2 = {{Case2, a = 0, b = 4369, c = 4369, d = 4369, e = 4369}, {Case2, a = 0, b = 286331153, c = 286331153}, {Case2, a = 0, b = 1229782938247303441}}
// gdb-command:print case2
// gdb-check:$2 = {{Case2, a = 0, b = 4369, c = 4369, d = 4369, e = 4369}, {Case2, a = 0, b = 286331153, c = 286331153}, {Case2, a = 0, b = 1229782938247303441}}
// debugger:print case3
// check:$3 = {{Case3, a = 0, b = 22873, c = 22873, d = 22873, e = 22873}, {Case3, a = 0, b = 1499027801, c = 1499027801}, {Case3, a = 0, b = 6438275382588823897}}
// gdb-command:print case3
// gdb-check:$3 = {{Case3, a = 0, b = 22873, c = 22873, d = 22873, e = 22873}, {Case3, a = 0, b = 1499027801, c = 1499027801}, {Case3, a = 0, b = 6438275382588823897}}
// debugger:print univariant
// check:$4 = {a = -1}
// gdb-command:print univariant
// gdb-check:$4 = {a = -1}
#![allow(unused_variable)]
#![feature(struct_variant)]

View file

@ -11,20 +11,20 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// debugger:print simple
// check:$1 = {x = 10, y = 20}
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// gdb-command:print simple
// gdb-check:$1 = {x = 10, y = 20}
// debugger:print noDestructor
// check:$2 = {a = {x = 10, y = 20}, guard = -1}
// gdb-command:print noDestructor
// gdb-check:$2 = {a = {x = 10, y = 20}, guard = -1}
// debugger:print withDestructor
// check:$3 = {a = {x = 10, y = 20}, guard = -1}
// gdb-command:print withDestructor
// gdb-check:$3 = {a = {x = 10, y = 20}, guard = -1}
// debugger:print nested
// check:$4 = {a = {a = {x = 7890, y = 9870}}}
// gdb-command:print nested
// gdb-check:$4 = {a = {a = {x = 7890, y = 9870}}}
#![allow(unused_variable)]

View file

@ -11,22 +11,22 @@
// except according to those terms.
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// gdb-command:rbreak zzz
// gdb-command:run
// debugger:finish
// debugger:print arg1
// check:$1 = 1000
// debugger:print arg2
// check:$2 = 0.5
// debugger:continue
// gdb-command:finish
// gdb-command:print arg1
// gdb-check:$1 = 1000
// gdb-command:print arg2
// gdb-check:$2 = 0.5
// gdb-command:continue
// debugger:finish
// debugger:print arg1
// check:$3 = 2000
// debugger:print *arg2
// check:$4 = {1, 2, 3}
// debugger:continue
// gdb-command:finish
// gdb-command:print arg1
// gdb-check:$3 = 2000
// gdb-command:print *arg2
// gdb-check:$4 = {1, 2, 3}
// gdb-command:continue
struct Struct {

View file

@ -11,7 +11,7 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:run
// gdb-command:run
#![allow(unused_variable)]

View file

@ -11,35 +11,35 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print pretty off
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print no_padding1
// check:$1 = {x = {0, 1}, y = 2, z = {3, 4, 5}}
// debugger:print no_padding2
// check:$2 = {x = {6, 7}, y = {{8, 9}, 10}}
// gdb-command:print no_padding1
// gdb-check:$1 = {x = {0, 1}, y = 2, z = {3, 4, 5}}
// gdb-command:print no_padding2
// gdb-check:$2 = {x = {6, 7}, y = {{8, 9}, 10}}
// debugger:print tuple_internal_padding
// check:$3 = {x = {11, 12}, y = {13, 14}}
// debugger:print struct_internal_padding
// check:$4 = {x = {15, 16}, y = {17, 18}}
// debugger:print both_internally_padded
// check:$5 = {x = {19, 20, 21}, y = {22, 23}}
// gdb-command:print tuple_internal_padding
// gdb-check:$3 = {x = {11, 12}, y = {13, 14}}
// gdb-command:print struct_internal_padding
// gdb-check:$4 = {x = {15, 16}, y = {17, 18}}
// gdb-command:print both_internally_padded
// gdb-check:$5 = {x = {19, 20, 21}, y = {22, 23}}
// debugger:print single_tuple
// check:$6 = {x = {24, 25, 26}}
// gdb-command:print single_tuple
// gdb-check:$6 = {x = {24, 25, 26}}
// debugger:print tuple_padded_at_end
// check:$7 = {x = {27, 28}, y = {29, 30}}
// debugger:print struct_padded_at_end
// check:$8 = {x = {31, 32}, y = {33, 34}}
// debugger:print both_padded_at_end
// check:$9 = {x = {35, 36, 37}, y = {38, 39}}
// gdb-command:print tuple_padded_at_end
// gdb-check:$7 = {x = {27, 28}, y = {29, 30}}
// gdb-command:print struct_padded_at_end
// gdb-check:$8 = {x = {31, 32}, y = {33, 34}}
// gdb-command:print both_padded_at_end
// gdb-check:$9 = {x = {35, 36, 37}, y = {38, 39}}
// debugger:print mixed_padding
// check:$10 = {x = {{40, 41, 42}, {43, 44}}, y = {45, 46, 47, 48}}
// gdb-command:print mixed_padding
// gdb-check:$10 = {x = {{40, 41, 42}, {43, 44}}, y = {45, 46, 47, 48}}
#![allow(unused_variable)]

View file

@ -11,27 +11,27 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run
// debugger:finish
// gdb-command:set print pretty off
// gdb-command:rbreak zzz
// gdb-command:run
// gdb-command:finish
// debugger:print no_padding1
// check:$1 = {{0, 1}, 2, 3}
// debugger:print no_padding2
// check:$2 = {4, {5, 6}, 7}
// debugger:print no_padding3
// check:$3 = {8, 9, {10, 11}}
// gdb-command:print no_padding1
// gdb-check:$1 = {{0, 1}, 2, 3}
// gdb-command:print no_padding2
// gdb-check:$2 = {4, {5, 6}, 7}
// gdb-command:print no_padding3
// gdb-check:$3 = {8, 9, {10, 11}}
// debugger:print internal_padding1
// check:$4 = {12, {13, 14}}
// debugger:print internal_padding2
// check:$5 = {15, {16, 17}}
// gdb-command:print internal_padding1
// gdb-check:$4 = {12, {13, 14}}
// gdb-command:print internal_padding2
// gdb-check:$5 = {15, {16, 17}}
// debugger:print padding_at_end1
// check:$6 = {18, {19, 20}}
// debugger:print padding_at_end2
// check:$7 = {{21, 22}, 23}
// gdb-command:print padding_at_end1
// gdb-check:$6 = {18, {19, 20}}
// gdb-command:print padding_at_end2
// gdb-check:$7 = {{21, 22}, 23}
#![allow(unused_variable)]

Some files were not shown because too many files have changed in this diff Show more