Skip to content

Commit 569c4af

Browse files
committed
---
yaml --- r: 167468 b: refs/heads/snap-stage3 c: 67d1388 h: refs/heads/master v: v3
1 parent de62640 commit 569c4af

File tree

205 files changed

+2456
-2581
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+2456
-2581
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 023dfb0c898d851dee6ace2f8339b73b5287136b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6abfac083feafc73e5d736177755cce3bfb7153f
4+
refs/heads/snap-stage3: 67d13883f868e6b27aa00a6c69f7c748d16e1c94
55
refs/heads/try: 5204084bd2e46af7cc6e0147430e44dd0d657bbb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/mk/clean.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ clean-generic-$(2)-$(1):
6464
-name '*.dll' -o \
6565
-name '*.def' -o \
6666
-name '*.py' -o \
67+
-name '*.pyc' -o \
6768
-name '*.bc' \
6869
\) \
6970
| xargs rm -f
@@ -79,7 +80,7 @@ define CLEAN_HOST_STAGE_N
7980

8081
clean$(1)_H_$(2): \
8182
$$(foreach crate,$$(CRATES),clean$(1)_H_$(2)-lib-$$(crate)) \
82-
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_H_$(2)-tool-$$(tool))
83+
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS_ALL),clean$(1)_H_$(2)-tool-$$(tool))
8384
$$(Q)rm -fr $(2)/rt/libbacktrace
8485

8586
clean$(1)_H_$(2)-tool-%:
@@ -99,7 +100,7 @@ define CLEAN_TARGET_STAGE_N
99100

100101
clean$(1)_T_$(2)_H_$(3): \
101102
$$(foreach crate,$$(CRATES),clean$(1)_T_$(2)_H_$(3)-lib-$$(crate)) \
102-
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
103+
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS_ALL),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
103104
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
104105
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a
105106
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/librun_pass_stage* # For unix

branches/snap-stage3/mk/debuggers.mk

Lines changed: 88 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,77 @@
1212
# Copy debugger related scripts
1313
######################################################################
1414

15-
DEBUGGER_RUSTLIB_ETC_SCRIPTS=lldb_rust_formatters.py
16-
DEBUGGER_BIN_SCRIPTS=rust-lldb
1715

18-
DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS=$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS), \
19-
$(CFG_SRC_DIR)src/etc/$(script))
20-
DEBUGGER_BIN_SCRIPTS_ABS=$(foreach script,$(DEBUGGER_BIN_SCRIPTS), \
21-
$(CFG_SRC_DIR)src/etc/$(script))
16+
## GDB ##
17+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB=gdb_load_rust_pretty_printers.py \
18+
gdb_rust_pretty_printing.py
19+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS=\
20+
$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB), \
21+
$(CFG_SRC_DIR)src/etc/$(script))
22+
23+
DEBUGGER_BIN_SCRIPTS_GDB=rust-gdb
24+
DEBUGGER_BIN_SCRIPTS_GDB_ABS=\
25+
$(foreach script,$(DEBUGGER_BIN_SCRIPTS_GDB), \
26+
$(CFG_SRC_DIR)src/etc/$(script))
27+
28+
29+
## LLDB ##
30+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB=lldb_rust_formatters.py
31+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS=\
32+
$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB), \
33+
$(CFG_SRC_DIR)src/etc/$(script))
34+
35+
DEBUGGER_BIN_SCRIPTS_LLDB=rust-lldb
36+
DEBUGGER_BIN_SCRIPTS_LLDB_ABS=\
37+
$(foreach script,$(DEBUGGER_BIN_SCRIPTS_LLDB), \
38+
$(CFG_SRC_DIR)src/etc/$(script))
39+
40+
41+
## ALL ##
42+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB) \
43+
$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB)
44+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
45+
$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS)
46+
DEBUGGER_BIN_SCRIPTS_ALL=$(DEBUGGER_BIN_SCRIPTS_GDB) \
47+
$(DEBUGGER_BIN_SCRIPTS_LLDB)
48+
DEBUGGER_BIN_SCRIPTS_ALL_ABS=$(DEBUGGER_BIN_SCRIPTS_GDB_ABS) \
49+
$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
2250

23-
DEBUGGER_SCRIPTS_ALL=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $(DEBUGGER_BIN_SCRIPTS_ABS)
2451

2552
# $(1) - the stage to copy to
2653
# $(2) - the host triple
2754
define DEF_INSTALL_DEBUGGER_SCRIPTS_HOST
2855

29-
tmp/install-debugger-scripts$(1)_H_$(2).done: $$(DEBUGGER_SCRIPTS_ALL)
56+
tmp/install-debugger-scripts$(1)_H_$(2)-gdb.done: \
57+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
58+
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
59+
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
60+
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
61+
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(HBIN$(1)_H_$(2))
62+
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
63+
$(Q)touch $$@
64+
65+
tmp/install-debugger-scripts$(1)_H_$(2)-lldb.done: \
66+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
67+
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
68+
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
69+
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
70+
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(HBIN$(1)_H_$(2))
71+
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
72+
$(Q)touch $$@
73+
74+
tmp/install-debugger-scripts$(1)_H_$(2)-all.done: \
75+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
76+
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
3077
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
3178
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
32-
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ABS) $$(HBIN$(1)_H_$(2))
33-
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
79+
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(HBIN$(1)_H_$(2))
80+
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
3481
$(Q)touch $$@
82+
83+
tmp/install-debugger-scripts$(1)_H_$(2)-none.done:
84+
$(Q)touch $$@
85+
3586
endef
3687

3788
# Expand host make-targets for all stages
@@ -44,12 +95,36 @@ $(foreach stage,$(STAGES), \
4495
# $(3) is the host triple
4596
define DEF_INSTALL_DEBUGGER_SCRIPTS_TARGET
4697

47-
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3).done: $$(DEBUGGER_SCRIPTS_ALL)
98+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-gdb.done: \
99+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
100+
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
101+
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
102+
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
103+
$(Q)install $(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
104+
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
105+
$(Q)touch $$@
106+
107+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-lldb.done: \
108+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
109+
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
48110
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
49111
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
50-
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
51-
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
112+
$(Q)install $(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
113+
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
52114
$(Q)touch $$@
115+
116+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-all.done: \
117+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
118+
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
119+
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
120+
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
121+
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
122+
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
123+
$(Q)touch $$@
124+
125+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-none.done:
126+
$(Q)touch $$@
127+
53128
endef
54129

55130
# Expand target make-targets for all stages

branches/snap-stage3/mk/dist.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
3535
# Source tarball
3636
######################################################################
3737

38-
PKG_TAR = dist/$(PKG_NAME).tar.gz
38+
PKG_TAR = dist/$(PKG_NAME)-src.tar.gz
3939

4040
PKG_GITMODULES := $(S)src/llvm $(S)src/compiler-rt \
4141
$(S)src/rt/hoedown $(S)src/jemalloc

branches/snap-stage3/mk/main.mk

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
# The version number
1616
CFG_RELEASE_NUM=0.13.0
1717

18+
# An optional number to put after the label, e.g. '2' -> '-beta2'
19+
CFG_BETA_CYCLE=
20+
1821
CFG_FILENAME_EXTRA=4e7c5e5c
1922

2023
ifeq ($(CFG_RELEASE_CHANNEL),stable)
@@ -24,12 +27,13 @@ CFG_RELEASE=$(CFG_RELEASE_NUM)
2427
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
2528
endif
2629
ifeq ($(CFG_RELEASE_CHANNEL),beta)
27-
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta
30+
# The beta channel is temporarily called 'alpha'
31+
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
2832
# When building beta/nightly distributables just reuse the same "beta"
2933
# name so when we upload we'll always override the previous
3034
# nighly. This doesn't actually impact the version reported by rustc -
3135
# it's just for file naming.
32-
CFG_PACKAGE_VERS=beta
36+
CFG_PACKAGE_VERS=alpha
3337
endif
3438
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
3539
CFG_RELEASE=$(CFG_RELEASE_NUM)-nightly
@@ -325,6 +329,12 @@ export CFG_DISABLE_INJECT_STD_VERSION
325329
# Per-stage targets and runner
326330
######################################################################
327331

332+
# Valid setting-strings are 'all', 'none', 'gdb', 'lldb'
333+
# This 'function' will determine which debugger scripts to copy based on a
334+
# target triple. See debuggers.mk for more information.
335+
TRIPLE_TO_DEBUGGER_SCRIPT_SETTING=\
336+
$(if $(findstring windows,$(1)),none,$(if $(findstring darwin,$(1)),lldb,gdb))
337+
328338
STAGES = 0 1 2 3
329339

330340
define SREQ
@@ -357,7 +367,7 @@ else
357367
HSREQ$(1)_H_$(3) = \
358368
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
359369
$$(MKFILE_DEPS) \
360-
tmp/install-debugger-scripts$(1)_H_$(3).done
370+
tmp/install-debugger-scripts$(1)_H_$(3)-$$(call TRIPLE_TO_DEBUGGER_SCRIPT_SETTING,$(3)).done
361371
endif
362372

363373
# Prerequisites for using the stageN compiler to build target artifacts
@@ -372,7 +382,7 @@ SREQ$(1)_T_$(2)_H_$(3) = \
372382
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
373383
$$(foreach dep,$$(TARGET_CRATES), \
374384
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) \
375-
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3).done
385+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-$$(call TRIPLE_TO_DEBUGGER_SCRIPT_SETTING,$(2)).done
376386

377387
# Prerequisites for a working stageN compiler and complete set of target
378388
# libraries

branches/snap-stage3/mk/prepare.mk

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,27 @@ prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
144144
$$(call PREPARE_LIB,libcompiler-rt.a),),),)
145145
endef
146146

147+
define INSTALL_GDB_DEBUGGER_SCRIPTS_COMMANDS
148+
$(Q)$(PREPARE_BIN_CMD) $(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $(PREPARE_DEST_BIN_DIR)
149+
$(Q)$(PREPARE_LIB_CMD) $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $(PREPARE_DEST_LIB_DIR)/rustlib/etc
150+
endef
151+
152+
define INSTALL_LLDB_DEBUGGER_SCRIPTS_COMMANDS
153+
$(Q)$(PREPARE_BIN_CMD) $(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $(PREPARE_DEST_BIN_DIR)
154+
$(Q)$(PREPARE_LIB_CMD) $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $(PREPARE_DEST_LIB_DIR)/rustlib/etc
155+
endef
156+
157+
define INSTALL_NO_DEBUGGER_SCRIPTS_COMMANDS
158+
$(Q)echo "No debugger scripts will be installed for host $(PREPARE_HOST)"
159+
endef
160+
161+
# $(1) is PREPARE_HOST
162+
INSTALL_DEBUGGER_SCRIPT_COMMANDS=$(if $(findstring windows,$(1)),\
163+
$(INSTALL_NO_DEBUGGER_SCRIPTS_COMMANDS),\
164+
$(if $(findstring darwin,$(1)),\
165+
$(INSTALL_LLDB_DEBUGGER_SCRIPTS_COMMANDS),\
166+
$(INSTALL_GDB_DEBUGGER_SCRIPTS_COMMANDS)))
167+
147168
define DEF_PREPARE
148169

149170
prepare-base-$(1): PREPARE_SOURCE_DIR=$$(PREPARE_HOST)/stage$$(PREPARE_STAGE)
@@ -170,9 +191,10 @@ prepare-host-dirs-$(1): prepare-maybe-clean-$(1)
170191
$$(call PREPARE_DIR,$$(PREPARE_DEST_LIB_DIR)/rustlib/etc)
171192
$$(call PREPARE_DIR,$$(PREPARE_DEST_MAN_DIR))
172193

173-
prepare-debugger-scripts-$(1): prepare-host-dirs-$(1) $(DEBUGGER_SCRIPTS_ALL)
174-
$$(Q)$$(PREPARE_BIN_CMD) $(DEBUGGER_BIN_SCRIPTS_ABS) $$(PREPARE_DEST_BIN_DIR)
175-
$$(Q)$$(PREPARE_LIB_CMD) $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(PREPARE_DEST_LIB_DIR)/rustlib/etc
194+
prepare-debugger-scripts-$(1): prepare-host-dirs-$(1) \
195+
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS) \
196+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS)
197+
$$(call INSTALL_DEBUGGER_SCRIPT_COMMANDS,$$(PREPARE_HOST))
176198

177199
$$(foreach tool,$$(PREPARE_TOOLS), \
178200
$$(foreach host,$$(CFG_HOST), \

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
368368
let DebuggerCommands {
369369
commands,
370370
check_lines,
371-
use_gdb_pretty_printer,
372371
breakpoint_lines
373372
} = parse_debugger_commands(testfile, "gdb");
374373
let mut cmds = commands.connect("\n");
@@ -522,16 +521,11 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
522521
if header::gdb_version_to_int(version.as_slice()) >
523522
header::gdb_version_to_int("7.4") {
524523
// Add the directory containing the pretty printers to
525-
// GDB's script auto loading safe path ...
524+
// GDB's script auto loading safe path
526525
script_str.push_str(
527526
format!("add-auto-load-safe-path {}\n",
528527
rust_pp_module_abs_path.replace("\\", "\\\\").as_slice())
529528
.as_slice());
530-
// ... and also the test directory
531-
script_str.push_str(
532-
format!("add-auto-load-safe-path {}\n",
533-
config.build_base.as_str().unwrap().replace("\\", "\\\\"))
534-
.as_slice());
535529
}
536530
}
537531
_ => {
@@ -544,6 +538,9 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
544538
// pretty printing, it just tells GDB to print values on one line:
545539
script_str.push_str("set print pretty off\n");
546540

541+
// Add the pretty printer directory to GDB's source-file search path
542+
script_str.push_str(format!("directory {}\n", rust_pp_module_abs_path)[]);
543+
547544
// Load the target executable
548545
script_str.push_str(format!("file {}\n",
549546
exe_file.as_str().unwrap().replace("\\", "\\\\"))
@@ -565,12 +562,6 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
565562
script_str.as_slice(),
566563
"debugger.script");
567564

568-
if use_gdb_pretty_printer {
569-
// Only emit the gdb auto-loading script if pretty printers
570-
// should actually be loaded
571-
dump_gdb_autoload_script(config, testfile);
572-
}
573-
574565
// run debugger script with gdb
575566
#[cfg(windows)]
576567
fn debugger() -> String {
@@ -612,19 +603,6 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
612603
}
613604

614605
check_debugger_output(&debugger_run_result, check_lines.as_slice());
615-
616-
fn dump_gdb_autoload_script(config: &Config, testfile: &Path) {
617-
let mut script_path = output_base_name(config, testfile);
618-
let mut script_file_name = script_path.filename().unwrap().to_vec();
619-
script_file_name.push_all("-gdb.py".as_bytes());
620-
script_path.set_filename(script_file_name.as_slice());
621-
622-
let script_content = "import gdb_rust_pretty_printing\n\
623-
gdb_rust_pretty_printing.register_printers(gdb.current_objfile())\n"
624-
.as_bytes();
625-
626-
File::create(&script_path).write(script_content).unwrap();
627-
}
628606
}
629607

630608
fn find_rust_src_root(config: &Config) -> Option<Path> {
@@ -782,7 +760,6 @@ struct DebuggerCommands {
782760
commands: Vec<String>,
783761
check_lines: Vec<String>,
784762
breakpoint_lines: Vec<uint>,
785-
use_gdb_pretty_printer: bool
786763
}
787764

788765
fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
@@ -795,7 +772,6 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
795772
let mut breakpoint_lines = vec!();
796773
let mut commands = vec!();
797774
let mut check_lines = vec!();
798-
let mut use_gdb_pretty_printer = false;
799775
let mut counter = 1;
800776
let mut reader = BufferedReader::new(File::open(file_path).unwrap());
801777
for line in reader.lines() {
@@ -805,10 +781,6 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
805781
breakpoint_lines.push(counter);
806782
}
807783

808-
if line.as_slice().contains("gdb-use-pretty-printer") {
809-
use_gdb_pretty_printer = true;
810-
}
811-
812784
header::parse_name_value_directive(
813785
line.as_slice(),
814786
command_directive.as_slice()).map(|cmd| {
@@ -833,7 +805,6 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
833805
commands: commands,
834806
check_lines: check_lines,
835807
breakpoint_lines: breakpoint_lines,
836-
use_gdb_pretty_printer: use_gdb_pretty_printer,
837808
}
838809
}
839810

branches/snap-stage3/src/doc/guide.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ x = 10i;
460460
There is no single reason that bindings are immutable by default, but we can
461461
think about it through one of Rust's primary focuses: safety. If you forget to
462462
say `mut`, the compiler will catch it, and let you know that you have mutated
463-
something you may not have cared to mutate. If bindings were mutable by
463+
something you may not have intended to mutate. If bindings were mutable by
464464
default, the compiler would not be able to tell you this. If you _did_ intend
465465
mutation, then the solution is quite easy: add `mut`.
466466

@@ -889,9 +889,8 @@ fn hello(name: &str) {
889889
When writing doc comments, adding sections for any arguments, return values,
890890
and providing some examples of usage is very, very helpful.
891891

892-
You can use the `rustdoc` tool to generate HTML documentation from these doc
893-
comments. We will talk more about `rustdoc` when we get to modules, as
894-
generally, you want to export documentation for a full module.
892+
You can use the [`rustdoc`](rustdoc.html) tool to generate HTML documentation
893+
from these doc comments.
895894

896895
# Compound Data Types
897896

0 commit comments

Comments
 (0)