97 scm_remember_upto_here_1 (
self);
111 const char *encoding,
struct type *
type)
123 if (encoding == NULL || strcmp (encoding,
"") == 0)
126 ls_smob->
encoding = xstrdup (encoding);
156 const char *encoding,
struct type *
type)
162 _(
"invalid length"));
165 if (address == 0 &&
length != 0)
168 (NULL, 0, scm_from_int (
length),
169 _(
"cannot create a lazy string with address 0x0," 170 " and a non-zero length"));
176 (NULL, 0, scm_from_int (0),
_(
"a lazy string's type cannot be NULL"));
200 struct type *realtype;
237 return scm_from_int (ls_smob->
length);
263 return ls_smob->
type;
295 const char *func_name, SCM *except_scmp)
308 _(
"cannot create a value from NULL"));
322 if (ls_smob->
length != -1)
357 struct type *elt_type;
375 Return #t if the object is a <gdb:lazy-string> object." },
377 {
"lazy-string-address", 1, 0, 0,
380 Return the address of the lazy-string." },
384 Return the length of the lazy-string.\n\ 385 If the length is -1 then the length is determined by the first null\n\ 386 of appropriate width." },
388 {
"lazy-string-encoding", 1, 0, 0,
391 Return the encoding of the lazy-string." },
395 Return the <gdb:type> of the lazy-string." },
397 {
"lazy-string->value", 1, 0, 0,
400 Return the <gdb:value> representation of the lazy-string." },
static const scheme_function lazy_string_functions[]
static const char lazy_string_smob_name[]
char * hex_string(LONGEST num)
static SCM gdbscm_lazy_string_length(SCM self)
static scm_t_subr as_a_scm_t_subr(SCM(*func)(void))
struct type * lookup_array_range_type(struct type *element_type, LONGEST low_bound, LONGEST high_bound)
static SCM scm_new_smob(scm_t_bits tc, scm_t_bits data)
static struct type * lsscm_elt_type(lazy_string_smob *ls_smob)
void gdbscm_define_functions(const scheme_function *, int is_public)
SCM gdbscm_scm_from_ulongest(ULONGEST l)
SCM tyscm_scm_from_type(struct type *type)
static SCM gdbscm_lazy_string_address(SCM self)
static SCM lsscm_get_lazy_string_arg_unsafe(SCM self, int arg_pos, const char *func_name)
SCM gdbscm_make_out_of_range_error(const char *subr, int arg_pos, SCM bad_value, const char *error)
scm_t_bits gdbscm_make_smob_type(const char *name, size_t size)
SCM vlscm_scm_from_value(struct value *value)
static size_t lsscm_free_lazy_string_smob(SCM self)
struct type * check_typedef(struct type *type)
void gdbscm_init_gsmob(gdb_smob *base)
#define CATCH(EXCEPTION, MASK)
static struct parser_state * pstate
SCM lsscm_make_lazy_string(CORE_ADDR address, int length, const char *encoding, struct type *type)
SCM gdbscm_scm_from_c_string(const char *string)
SCM gdbscm_scm_from_gdb_exception(struct gdb_exception exception)
void lsscm_val_print_lazy_string(SCM string, struct ui_file *stream, const struct value_print_options *options)
void gdbscm_initialize_lazy_strings(void)
static SCM lsscm_make_lazy_string_smob(CORE_ADDR address, int length, const char *encoding, struct type *type)
void gdbscm_throw(SCM exception) ATTRIBUTE_NORETURN
struct value * lsscm_safe_lazy_string_to_value(SCM string, int arg_pos, const char *func_name, SCM *except_scmp)
struct value * value_at_lazy(struct type *type, CORE_ADDR addr)
static SCM gdbscm_lazy_string_encoding(SCM self)
void gdbscm_printf(SCM port, const char *format,...) ATTRIBUTE_PRINTF(2
static SCM gdbscm_lazy_string_to_value(SCM self)
struct type * tyscm_scm_to_type(SCM t_scm)
static SCM gdbscm_lazy_string_type(SCM self)
struct value * value_from_pointer(struct type *type, CORE_ADDR addr)
#define TYPE_TARGET_TYPE(thistype)
#define TYPE_CODE(thistype)
static scm_t_bits lazy_string_smob_tag
int val_print_string(struct type *elttype, const char *encoding, CORE_ADDR addr, int len, struct ui_file *stream, const struct value_print_options *options)
int lsscm_is_lazy_string(SCM scm)
static SCM gdbscm_lazy_string_p(SCM scm)
static int lsscm_print_lazy_string_smob(SCM self, SCM port, scm_print_state *pstate)