91 scm_remember_upto_here_1 (
self);
115 if (encoding == NULL || strcmp (encoding,
"") == 0)
118 ls_smob->
encoding = xstrdup (encoding);
150 if (address == 0 && length != 0)
153 (NULL, 0, scm_from_int (length),
154 _(
"cannot create a lazy string with address 0x0"
155 " and a non-zero length"));
161 (NULL, 0, scm_from_int (0),
_(
"a lazy string's type cannot be NULL"));
200 return scm_from_int (ls_smob->
length);
241 _(
"cannot create a value from NULL")));
270 const char *func_name, SCM *except_scmp)
278 *except_scmp = SCM_BOOL_F;
284 _(
"cannot create a value from NULL"));
326 Return #t if the object is a <gdb:lazy-string> object." },
330 Return the address of the lazy-string." },
334 Return the length of the lazy-string.\n\
335 If the length is -1 then the length is determined by the first null\n\
336 of appropriate width." },
340 Return the encoding of the lazy-string." },
344 Return the <gdb:type> of the lazy-string." },
348 Return the <gdb:value> representation of the lazy-string." },
static const char lazy_string_smob_name[]
char * hex_string(LONGEST num)
static SCM gdbscm_lazy_string_length(SCM self)
static SCM scm_new_smob(scm_t_bits tc, scm_t_bits data)
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)
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)
static SCM gdbscm_lazy_string_type(SCM self)
#define GDBSCM_HANDLE_GDB_EXCEPTION(exception)
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)