gdb: move rust_language into rust-lang.h
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 30 Oct 2020 15:09:35 +0000 (15:09 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 23 Dec 2020 20:53:14 +0000 (20:53 +0000)
commit1c4852651c26d88494b6c2988f9bee164f1f3d34
treed041d0dca40c135463bc1c700a66ea8ebcaeced9
parented5797ee2c17bae5d15204cbfa9a3918c7e4c1a9
gdb: move rust_language into rust-lang.h

Move the rust_language class declaration into the rust-lang.h header
file.  This allows for the function implementations called directly in
rust-lang.c and rust-exp.y without the need for trampoline functions.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* rust-exp.y (rust_parse): Rename to...
(rust_language::parser): ...this.
* rust-lang.c (-rust_printstr): Rename to...
(rust_language::printstr): ...this.
(rust_value_print_inner): Delete declaration.
(val_print_struct): Rename to...
(rust_language::val_print_struct): ...this.  Update calls to
member functions.
(rust_print_enum): Rename to...
(rust_language::print_enum): ...this.  Update calls to member
functions.
(rust_value_print_inner): Rename to...
(rust_language::value_print_inner): ...this.  Update calls to
member functions.
(exp_descriptor_rust): Rename to...
(rust_language::exp_descriptor_tab): ...this.
(class rust_language): Move to rust-lang.h.
(rust_language::language_arch_info): Implementation moved to here
from class declaration.
(rust_language::print_type): Likewise.
(rust_language::emitchar): Likewise.
(rust_language::is_string_type_p): Likewise.
* rust-lang.h: Add 'demangle.h', 'language.h', 'value.h', and
'c-lang.h' includes.
(rust_parse): Delete declaration.
(class rust_language): Class declaration moved here from
rust-lang.c.
gdb/ChangeLog
gdb/rust-exp.y
gdb/rust-lang.c
gdb/rust-lang.h