GDB (xrefs)
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
/tmp/gdb-13.1/gdb/rust-lang.c File Reference
#include "defs.h"
#include <ctype.h>
#include "block.h"
#include "c-lang.h"
#include "charset.h"
#include "cp-support.h"
#include "demangle.h"
#include "gdbarch.h"
#include "infcall.h"
#include "objfiles.h"
#include "psymtab.h"
#include "rust-lang.h"
#include "typeprint.h"
#include "valprint.h"
#include "varobj.h"
#include <algorithm>
#include <string>
#include <vector>
#include "cli/cli-style.h"
#include "parser-defs.h"
#include "rust-exp.h"

Go to the source code of this file.

Namespaces

namespace  expr
 

Functions

const char * rust_last_path_segment (const char *path)
 
std::string rust_crate_for_block (const struct block *block)
 
static bool rust_enum_p (struct type *type)
 
static bool rust_empty_enum_p (const struct type *type)
 
static int rust_enum_variant (struct type *type)
 
bool rust_tuple_type_p (struct type *type)
 
static bool rust_underscore_fields (struct type *type)
 
bool rust_tuple_struct_type_p (struct type *type)
 
static bool rust_slice_type_p (struct type *type)
 
static bool rust_range_type_p (struct type *type)
 
static bool rust_inclusive_range_type_p (struct type *type)
 
static bool rust_u8_type_p (struct type *type)
 
static bool rust_chartype_p (struct type *type)
 
static struct valuerust_get_trait_object_pointer (struct value *value)
 
static void rust_val_print_slice (struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options)
 
static void rust_internal_print_type (struct type *type, const char *varstring, struct ui_file *stream, int show, int level, const struct type_print_options *flags, bool for_rust_enum, print_offset_data *podata)
 
static void rust_print_struct_def (struct type *type, const char *varstring, struct ui_file *stream, int show, int level, const struct type_print_options *flags, bool for_rust_enum, print_offset_data *podata)
 
static struct typerust_composite_type (struct type *original, const char *name, const char *field1, struct type *type1, const char *field2, struct type *type2)
 
struct typerust_slice_type (const char *name, struct type *elt_type, struct type *usize_type)
 
struct valuerust_range (struct type *expect_type, struct expression *exp, enum noside noside, enum range_flag kind, struct value *low, struct value *high)
 
static void rust_compute_range (struct type *type, struct value *range, LONGEST *low, LONGEST *high, range_flags *kind)
 
struct valuerust_subscript (struct type *expect_type, struct expression *exp, enum noside noside, bool for_addr, struct value *lhs, struct value *rhs)
 
struct valueeval_op_rust_complement (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *value)
 
struct valueeval_op_rust_array (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode opcode, struct value *elt, struct value *ncopies)
 

Variables

static const struct generic_val_print_decorations rust_decorations
 
static rust_language rust_language_defn
 

Function Documentation

◆ eval_op_rust_array()

struct value * eval_op_rust_array ( struct type expect_type,
struct expression exp,
enum noside noside noside  ,
enum exp_opcode  opcode,
struct value elt,
struct value ncopies 
)

◆ eval_op_rust_complement()

struct value * eval_op_rust_complement ( struct type expect_type,
struct expression exp,
enum noside noside noside  ,
enum exp_opcode  opcode,
struct value value 
)

◆ rust_chartype_p()

static bool rust_chartype_p ( struct type type)
static

Definition at line 233 of file rust-lang.c.

References type::code(), type::is_unsigned(), and type::length().

Referenced by rust_language::emitchar().

◆ rust_composite_type()

static struct type * rust_composite_type ( struct type original,
const char *  name,
const char *  field1,
struct type type1,
const char *  field2,
struct type type2 
)
static

◆ rust_compute_range()

static void rust_compute_range ( struct type type,
struct value range,
LONGEST *  low,
LONGEST *  high,
range_flags *  kind 
)
static

◆ rust_crate_for_block()

std::string rust_crate_for_block ( const struct block block)

Definition at line 59 of file rust-lang.c.

References block_scope(), and cp_find_first_component().

Referenced by rust_parser::crate_name().

◆ rust_empty_enum_p()

static bool rust_empty_enum_p ( const struct type type)
static

◆ rust_enum_p()

static bool rust_enum_p ( struct type type)
static

◆ rust_enum_variant()

static int rust_enum_variant ( struct type type)
static

◆ rust_get_trait_object_pointer()

static struct value * rust_get_trait_object_pointer ( struct value value)
static

◆ rust_inclusive_range_type_p()

static bool rust_inclusive_range_type_p ( struct type type)
static

Definition at line 214 of file rust-lang.c.

References type::name().

Referenced by rust_compute_range().

◆ rust_internal_print_type()

static void rust_internal_print_type ( struct type type,
const char *  varstring,
struct ui_file stream,
int  show,
int  level,
const struct type_print_options flags,
bool  for_rust_enum,
print_offset_data podata 
)
static

◆ rust_last_path_segment()

const char * rust_last_path_segment ( const char *  path)

◆ rust_print_struct_def()

static void rust_print_struct_def ( struct type type,
const char *  varstring,
struct ui_file stream,
int  show,
int  level,
const struct type_print_options flags,
bool  for_rust_enum,
print_offset_data podata 
)
static

◆ rust_range()

struct value * rust_range ( struct type expect_type,
struct expression exp,
enum noside noside noside  ,
enum range_flag  kind,
struct value low,
struct value high 
)

◆ rust_range_type_p()

static bool rust_range_type_p ( struct type type)
static

Definition at line 180 of file rust-lang.c.

References type::code(), type::field(), field::name(), type::name(), and type::num_fields().

Referenced by rust_subscript().

◆ rust_slice_type()

struct type * rust_slice_type ( const char *  name,
struct type elt_type,
struct type usize_type 
)

◆ rust_slice_type_p()

static bool rust_slice_type_p ( struct type type)
static

◆ rust_subscript()

struct value * rust_subscript ( struct type expect_type,
struct expression exp,
enum noside noside noside  ,
bool  for_addr,
struct value lhs,
struct value rhs 
)

◆ rust_tuple_struct_type_p()

bool rust_tuple_struct_type_p ( struct type type)

◆ rust_tuple_type_p()

bool rust_tuple_type_p ( struct type type)

◆ rust_u8_type_p()

static bool rust_u8_type_p ( struct type type)
static

◆ rust_underscore_fields()

static bool rust_underscore_fields ( struct type type)
static

◆ rust_val_print_slice()

static void rust_val_print_slice ( struct value val,
struct ui_file stream,
int  recurse,
const struct value_print_options options 
)
static

Variable Documentation

◆ rust_decorations

const struct generic_val_print_decorations rust_decorations
static
Initial value:
=
{
"",
" + ",
" * I",
"true",
"false",
"()",
"[",
"]"
}

Definition at line 309 of file rust-lang.c.

Referenced by rust_val_print_slice(), and rust_language::value_print_inner().

◆ rust_language_defn

rust_language rust_language_defn
static

Definition at line 1687 of file rust-lang.c.