Add support for the Rust language
authorTom Tromey <tom@tromey.com>
Wed, 27 Apr 2016 01:38:08 +0000 (19:38 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 17 May 2016 18:02:00 +0000 (12:02 -0600)
commitc44af4ebc000f606d16b42224cba2cfe80391d5c
tree73839883edc5c0bd6f744024802b30f0bdd7b0e3
parent00272ec4b0cc22c1b9d60d39ce7bf5b2d5512582
Add support for the Rust language

This patch adds support for the Rust language.

2016-05-17  Tom Tromey  <tom@tromey.com>
    Manish Goregaokar <manishsmail@gmail.com>

* symtab.c (symbol_find_demangled_name): Handle Rust.
* symfile.c (init_filename_language_table): Treat ".rs" as Rust.
* std-operator.def (STRUCTOP_ANONYMOUS, OP_RUST_ARRAY): New
constants.
* rust-lang.h: New file.
* rust-lang.c: New file.
* rust-exp.y: New file.
* dwarf2read.c (read_file_scope): Add Rust producer sniffing.
(dwarf2_compute_name, read_func_scope, read_structure_type)
(read_base_type, read_subrange_type, set_cu_language)
(new_symbol_full, determine_prefix): Handle Rust.
* defs.h (enum language) <language_rust>: New constant.
* Makefile.in (SFILES): Add rust-exp.y, rust-lang.c.
(COMMON_OBS): Add rust-exp.o, rust-lang.o.

2016-05-17  Tom Tromey  <tom@tromey.com>

* gdb.base/default.exp (set language): Add rust.
12 files changed:
gdb/ChangeLog
gdb/Makefile.in
gdb/defs.h
gdb/dwarf2read.c
gdb/rust-exp.y [new file with mode: 0644]
gdb/rust-lang.c [new file with mode: 0644]
gdb/rust-lang.h [new file with mode: 0644]
gdb/std-operator.def
gdb/symfile.c
gdb/symtab.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/default.exp