aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-lang.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/rust-lang.h')
-rw-r--r--gdb/rust-lang.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/rust-lang.h b/gdb/rust-lang.h
index 554a440..ce30e33 100644
--- a/gdb/rust-lang.h
+++ b/gdb/rust-lang.h
@@ -39,6 +39,11 @@ extern bool rust_tuple_struct_type_p (struct type *type);
stringif no crate name can be found. */
extern std::string rust_crate_for_block (const struct block *block);
+/* Returns the last segment of a Rust path like foo::bar::baz. Will
+ not handle cases where the last segment contains generics. */
+
+extern const char *rust_last_path_segment (const char *path);
+
/* Create a new slice type. NAME is the name of the type. ELT_TYPE
is the type of the elements of the slice. USIZE_TYPE is the Rust
"usize" type to use. The new type is allocated whereever ELT_TYPE