gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / rust-lang.h
index 8cde84ad73a5901d708cc6b23150635e0ddbf3bc..3ab860e086a9968660f5e702bd6060716b3aeffc 100644 (file)
@@ -1,6 +1,6 @@
 /* Rust language support definitions for GDB, the GNU debugger.
 
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,25 +26,26 @@ struct type;
 /* The la_parser implementation for Rust.  */
 extern int rust_parse (struct parser_state *);
 
-/* The la_error implementation for Rust.  */
-extern void rustyyerror (char *);
-
 /* Return true if TYPE is a tuple type; otherwise false.  */
-extern int rust_tuple_type_p (struct type *type);
+extern bool rust_tuple_type_p (struct type *type);
 
 /* Return true if TYPE is a tuple struct type; otherwise false.  */
-extern int rust_tuple_struct_type_p (struct type *type);
+extern bool rust_tuple_struct_type_p (struct type *type);
+
+/* Given a block, find the name of the block's crate. Returns an empty
+   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.  */
 
-/* Given a block, find the name of the block's crate.  The name must
-   be freed by the caller.  Returns NULL if no crate name can be
-   found.  */
-extern char *rust_crate_for_block (const struct block *block);
+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
    is allocated.  */
-struct type *rust_slice_type (const char *name, struct type *elt_type,
-                             struct type *usize_type);
+extern struct type *rust_slice_type (const char *name, struct type *elt_type,
+                                    struct type *usize_type);
 
 #endif /* RUST_LANG_H */
This page took 0.023973 seconds and 4 git commands to generate.