GDB (xrefs)

Classes | Functions | Variables
scm-string.c File Reference
`#include "defs.h"`
`#include "charset.h"`
`#include "guile-internal.h"`

Go to the source code of this file.

## Classes
struct | scm_to_stringn_data
struct | scm_from_stringn_data

## Functions
int | gdbscm_scm_string_to_int (SCM string)
SCM | gdbscm_scm_from_c_string (const char *string)
char * | gdbscm_scm_to_c_string (SCM string)
SCM | gdbscm_scm_from_printf (const char *format,...)
static SCM | gdbscm_call_scm_to_stringn (void *datap)
char * | gdbscm_scm_to_string (SCM string, size_t *lenp, const char *charset, int strict, SCM *except_scmp)
static SCM | gdbscm_call_scm_from_stringn (void *datap)
SCM | gdbscm_scm_from_string (const char *string, size_t len, const char *charset, int strict)
char * | gdbscm_scm_to_host_string (SCM string, size_t *lenp, SCM *except_scmp)
SCM | gdbscm_scm_from_host_string (const char *string, size_t len)
static SCM | gdbscm_string_to_argv (SCM string_scm)
void | gdbscm_initialize_strings (void)

## Variables
static const scheme_function | string_functions []

## Function Documentation

## ◆ gdbscm_call_scm_from_stringn()

static SCM gdbscm_call_scm_from_stringn | ( | void * | datap | ) |
| static

Definition at line 162 of file scm-string.c.

References scm_from_stringn_data::charset, scm_from_stringn_data::conversion_kind, scm_from_stringn_data::len, scm_from_stringn_data::result, and scm_from_stringn_data::string.

Referenced by gdbscm_scm_from_string().

## ◆ gdbscm_call_scm_to_stringn()

static SCM gdbscm_call_scm_to_stringn | ( | void * | datap | ) |
| static

Definition at line 94 of file scm-string.c.

References scm_to_stringn_data::charset, scm_to_stringn_data::conversion_kind, scm_to_stringn_data::lenp, scm_to_stringn_data::result, and scm_to_stringn_data::string.

Referenced by gdbscm_scm_to_string().

## ◆ gdbscm_initialize_strings()

void gdbscm_initialize_strings | ( | void |  | ) |

Definition at line 277 of file scm-string.c.

References gdbscm_define_functions(), and string_functions.

## ◆ gdbscm_scm_from_c_string()

SCM gdbscm_scm_from_c_string | ( | const char * | string | ) |

Definition at line 44 of file scm-string.c.

Referenced by dascm_make_insn(), gdbscm_arch_charset(), gdbscm_arch_name(), gdbscm_arch_wide_charset(), gdbscm_breakpoint_commands(), gdbscm_breakpoint_condition(), gdbscm_breakpoint_expression(), gdbscm_breakpoint_location(), gdbscm_define_functions(), gdbscm_field_name(), gdbscm_frame_name(), gdbscm_initialize_blocks(), gdbscm_initialize_types(), gdbscm_lazy_string_encoding(), gdbscm_objfile_filename(), gdbscm_parse_command_name(), gdbscm_progspace_filename(), gdbscm_scm_from_gdb_exception(), gdbscm_string_to_argv(), gdbscm_symbol_linkage_name(), gdbscm_symbol_name(), gdbscm_symbol_print_name(), gdbscm_symtab_filename(), gdbscm_symtab_fullname(), gdbscm_type_name(), gdbscm_type_print_name(), gdbscm_type_tag(), gdbscm_unwind_stop_reason_string(), ioscm_make_gdb_stdio_port(), and ioscm_parse_mode_bits().

## ◆ gdbscm_scm_from_host_string()

SCM gdbscm_scm_from_host_string | ( | const char * | string,
|  | size_t | len
| ) |  |

Definition at line 231 of file scm-string.c.

References gdbscm_scm_from_string(), host_charset(), and scm_from_stringn_data::len.

Referenced by pascm_param_value(), and pascm_show_func().

## ◆ gdbscm_scm_from_printf()

SCM gdbscm_scm_from_printf | ( | const char * | format,
|  |  | ...
| ) |  |

Definition at line 63 of file scm-string.c.

References string, xfree(), and xstrvprintf().

## ◆ gdbscm_scm_from_string()

SCM gdbscm_scm_from_string | ( | const char * | string,
|  | size_t | len,
|  | const char * | charset,
|  | int | strict
| ) |  |

Definition at line 180 of file scm-string.c.

References scm_from_stringn_data::charset, scm_from_stringn_data::conversion_kind, gdb_assert, gdbscm_call_guile(), gdbscm_call_scm_from_stringn(), gdbscm_is_exception(), gdbscm_is_false, scm_from_stringn_data::len, scm_from_stringn_data::result, string, and scm_from_stringn_data::string.

Referenced by cmdscm_completer(), cmdscm_function(), and gdbscm_scm_from_host_string().

## ◆ gdbscm_scm_string_to_int()

int gdbscm_scm_string_to_int | ( | SCM | string | ) |

Definition at line 31 of file scm-string.c.

References free().

## ◆ gdbscm_scm_to_c_string()

char* gdbscm_scm_to_c_string | ( | SCM | string | ) |

Definition at line 55 of file scm-string.c.

Referenced by extract_arg(), gdbscm_exception_message_to_string(), gdbscm_frame_read_var(), gdbscm_set_breakpoint_condition_x(), gdbscm_type_field(), gdbscm_type_has_field_p(), gdbscm_value_field(), and ppscm_print_children().

## ◆ gdbscm_scm_to_host_string()

char* gdbscm_scm_to_host_string | ( | SCM | string,
|  | size_t * | lenp,
|  | SCM * | except_scmp
| ) |  |

Definition at line 221 of file scm-string.c.

References gdbscm_scm_to_string(), and host_charset().

Referenced by compute_enum_list(), gdbscm_parameter_value(), pascm_set_func(), pascm_set_param_value_x(), and pascm_show_func().

## ◆ gdbscm_scm_to_string()

char* gdbscm_scm_to_string | ( | SCM | string,
|  | size_t * | lenp,
|  | const char * | charset,
|  | int | strict,
|  | SCM * | except_scmp
| ) |  |

Definition at line 120 of file scm-string.c.

References scm_to_stringn_data::charset, scm_to_stringn_data::conversion_kind, gdb_assert, gdbscm_call_guile(), gdbscm_call_scm_to_stringn(), gdbscm_is_exception(), gdbscm_is_false, scm_to_stringn_data::lenp, scm_to_stringn_data::result, string, and scm_to_stringn_data::string.

Referenced by cmdscm_add_completion(), gdbscm_scm_to_host_string(), ppscm_print_string_repr(), and vlscm_convert_typed_value_from_scheme().

## ◆ gdbscm_string_to_argv()

static SCM gdbscm_string_to_argv | ( | SCM | string_scm | ) |
| static

Definition at line 241 of file scm-string.c.

References FUNC_NAME, gdbscm_parse_function_args(), gdbscm_scm_from_c_string(), scm_from_stringn_data::result, string, and xfree().

## Variable Documentation

## ◆ string_functions

const scheme_function string_functions[]
| static

Initial value:
=
{
{ "string->argv", 1, 0, 0, as_a_scm_t_subr (gdbscm_string_to_argv),
"\
Convert a string to a list of strings split up according to\n\
gdb's argv parsing rules." },
END_FUNCTIONS
}
as_a_scm_t_subr
static scm_t_subr as_a_scm_t_subr(SCM(*func)(void))
Definition: guile-internal.h:66
gdbscm_string_to_argv
static SCM gdbscm_string_to_argv(SCM string_scm)
Definition: scm-string.c:241
END_FUNCTIONS
#define END_FUNCTIONS
Definition: guile-internal.h:103

Definition at line 266 of file scm-string.c.

Referenced by gdbscm_initialize_strings().