45 #define WCHAR_BUFLEN(X) ((X) * sizeof (gdb_wchar_t)) 48 #define WCHAR_BUFLEN_MAX WCHAR_BUFLEN (MAX_WCHARS) 83 int len,
int *errptr);
93 #define PRINT_MAX_DEFAULT 200 149 _(
"Limit on string chars or array " 150 "elements to print is %s.\n"),
163 _(
"Default input radix for entering numbers is %s.\n"),
173 _(
"Default output radix for printing of values is %s.\n"),
206 _(
"Printing of char arrays to stop " 207 "at first null char is %s.\n"),
237 _(
"Printing of unions interior to structures is %s.\n"),
255 _(
"Printing of symbols when printing pointers is %s.\n"),
293 const struct value *val)
325 int ref_is_addressable = 0;
331 if (deref_val != NULL)
335 if (!is_ref || !ref_is_addressable)
411 struct ui_file *stream,
int recurse,
412 struct value *original_value,
425 error (
_(
"Could not determine the array high bound"));
435 recurse, original_value, options, 0);
451 int embedded_offset,
struct ui_file *stream,
452 struct value *original_value,
461 original_value, options, 0, stream);
469 valaddr + embedded_offset * unit_size);
480 int embedded_offset,
struct ui_file *stream,
481 struct value *original_value,
485 original_value, options, 0, stream);
492 int embedded_offset,
struct ui_file *stream)
496 if (address_buffer != NULL)
528 int embedded_offset,
struct ui_file *stream,
int recurse,
529 struct value *original_value,
533 struct value *deref_val = NULL;
534 const int value_is_synthetic
538 const int must_coerce_ref = ((options->
addressprint && value_is_synthetic)
543 if (must_coerce_ref && type_is_defined)
547 if (deref_val != NULL)
601 for (i = 0; i < len; i++)
621 for (i = 0; i < len; ++i)
636 if (first || val != 0)
655 struct value *original_value,
665 original_value, options, 0, stream);
681 int embedded_offset,
struct ui_file *stream,
682 struct value *original_value,
703 struct value *original_value,
711 original_value, options, 0, stream);
730 int embedded_offset,
struct ui_file *stream,
731 struct value *original_value,
745 original_value, &opts, 0, stream);
765 int embedded_offset,
struct ui_file *stream,
766 struct value *original_value,
774 original_value, &opts, 0, stream);
783 struct value *original_value,
797 original_value, &opts, 0, stream);
817 int embedded_offset,
struct ui_file *stream,
818 struct value *original_value,
827 original_value, options, 0, stream);
841 int embedded_offset,
struct ui_file *stream,
842 struct value *original_value,
854 embedded_offset, original_value, options, 0,
864 original_value, options, 0, stream);
886 struct ui_file *stream,
int recurse,
887 struct value *original_value,
891 struct type *unresolved_type =
type;
898 recurse, original_value, options, decorations);
903 original_value, options);
908 original_value, options);
914 original_value, options);
919 original_value, options);
924 original_value, options);
930 original_value, options);
935 original_value, options, decorations);
951 original_value, options);
956 stream, original_value, options);
962 original_value, options);
982 original_value, options, decorations);
989 error (
_(
"Unhandled type code %d in symbol table."),
1048 address, stream, recurse,
1064 language->la_val_print (
type, embedded_offset, address,
1065 stream, recurse, val,
1201 if (field_type == bool_type
1219 field_val &= ((
ULONGEST) 1 << field_len) - 1;
1255 if (options->
format ==
's')
1280 options,
size, stream);
1311 val =
int_string (val_long, 10, 1, 0, 1);
break;
1313 val =
int_string (val_long, 10, 0, 0, 1);
break;
1315 val =
int_string (val_long, 16, 0, 0, use_c_format);
break;
1317 val =
int_string (val_long, 16, 0, 2, 1);
break;
1319 val =
int_string (val_long, 16, 0, 4, 1);
break;
1321 val =
int_string (val_long, 16, 0, 8, 1);
break;
1323 val =
int_string (val_long, 16, 0, 16, 1);
break;
1326 val =
int_string (val_long, 8, 0, 0, use_c_format);
break;
1329 _(
"failed internal consistency check"));
1344 int rtnval = (int) arg;
1347 if (
sizeof (
LONGEST) >
sizeof (int))
1351 error (
_(
"Value out of range."));
1370 unsigned len,
enum bfd_endian byte_order,
bool zero_pad)
1375 bool seen_a_one =
false;
1380 const int mask = 0x080;
1382 if (byte_order == BFD_ENDIAN_BIG)
1393 if (*p & (mask >> i))
1398 if (zero_pad || seen_a_one || b ==
'1')
1407 for (p = valaddr + len - 1;
1413 if (*p & (mask >> i))
1418 if (zero_pad || seen_a_one || b ==
'1')
1428 if (!zero_pad && !seen_a_one)
1438 if (*seen_a_one || digit != 0)
1449 unsigned len,
enum bfd_endian byte_order)
1452 unsigned char octa1, octa2, octa3, carry;
1470 #define BITS_IN_OCTAL 3 1471 #define HIGH_ZERO 0340 1472 #define LOW_ZERO 0034 1473 #define CARRY_ZERO 0003 1475 "cycle zero constants are wrong");
1476 #define HIGH_ONE 0200 1477 #define MID_ONE 0160 1478 #define LOW_ONE 0016 1479 #define CARRY_ONE 0001 1481 "cycle one constants are wrong");
1482 #define HIGH_TWO 0300 1483 #define MID_TWO 0070 1484 #define LOW_TWO 0007 1486 "cycle two constants are wrong");
1495 bool seen_a_one =
false;
1496 if (byte_order == BFD_ENDIAN_BIG)
1517 octa1 = (carry << 1) | ((HIGH_ONE & *p) >> 7);
1529 octa1 = (carry << 2) | ((HIGH_TWO & *p) >> 6);
1539 error (
_(
"Internal error in octal conversion;"));
1548 for (p = valaddr + len - 1;
1567 octa1 = (carry << 1) | ((HIGH_ONE & *p) >> 7);
1579 octa1 = (carry << 2) | ((HIGH_TWO & *p) >> 6);
1589 error (
_(
"Internal error in octal conversion;"));
1606 enum bfd_endian byte_order,
1610 if (byte_order == BFD_ENDIAN_BIG)
1611 sign_byte = bytes[0];
1613 sign_byte = bytes[len - 1];
1614 if ((sign_byte & 0x80) == 0)
1617 out_vec->resize (len);
1620 if (byte_order == BFD_ENDIAN_LITTLE)
1623 for (
unsigned i = 0; i < len; ++i)
1625 unsigned tem = (0xff & ~bytes[i]) + carry;
1626 (*out_vec)[i] = tem & 0xff;
1633 for (
unsigned i = len; i > 0; --i)
1635 unsigned tem = (0xff & ~bytes[i - 1]) + carry;
1636 (*out_vec)[i - 1] = tem & 0xff;
1649 unsigned len,
bool is_signed,
1650 enum bfd_endian byte_order)
1653 #define CARRY_OUT( x ) ((x) / TEN) 1654 #define CARRY_LEFT( x ) ((x) % TEN) 1655 #define SHIFT( x ) ((x) << 4) 1656 #define LOW_NIBBLE( x ) ( (x) & 0x00F) 1657 #define HIGH_NIBBLE( x ) (((x) & 0x0F0) >> 4) 1662 int i, j, decimal_digits;
1671 valaddr = negated_bytes.data ();
1677 decimal_len = len * 2 * 2;
1678 std::vector<unsigned char> digits (decimal_len, 0);
1694 p = (byte_order == BFD_ENDIAN_BIG) ? valaddr : valaddr + len - 1;
1696 while ((byte_order == BFD_ENDIAN_BIG) ? (p < valaddr + len) : (p >= valaddr))
1703 for (j = 0; j < decimal_digits; j++)
1705 digits[j] =
SHIFT (digits[j]);
1726 if (byte_order == BFD_ENDIAN_BIG)
1742 for (j = 0; j < decimal_len - 1; j++)
1754 if (j >= decimal_digits && carry == 0)
1763 decimal_digits = j + 1;
1772 for (i = decimal_digits - 1; i > 0 && digits[i] == 0; --i)
1785 unsigned len,
enum bfd_endian byte_order,
1791 if (byte_order == BFD_ENDIAN_BIG)
1799 for (; p < valaddr + len - 1 && !*p; ++p)
1810 if (!zero_pad && p == first)
1818 p = valaddr + len - 1;
1824 for (; p >= valaddr + 1 && !*p; --p)
1835 if (!zero_pad && p == first)
1850 unsigned len,
enum bfd_endian byte_order)
1854 if (byte_order == BFD_ENDIAN_BIG)
1857 while (p < valaddr + len - 1 && *p == 0)
1860 while (p < valaddr + len)
1868 p = valaddr + len - 1;
1869 while (p > valaddr && *p == 0)
1872 while (p >= valaddr)
1913 struct value *index_value;
1940 unsigned int things_printed = 0;
1942 struct type *elttype, *index_type, *base_index_type;
1949 LONGEST low_bound, high_bound;
1961 base_index_type = index_type;
1971 warning (
_(
"unable to get positions in array, use bounds instead"));
1972 low_pos = low_bound;
1973 high_pos = high_bound;
1981 if (low_pos > high_pos)
1984 len = high_pos - low_pos + 1;
1988 warning (
_(
"unable to get bounds of array, assuming null array"));
1995 for (; i < len && things_printed < options->
print_max; i++)
2021 embedded_offset + i * eltlen,
2034 val_print (elttype, embedded_offset + i * eltlen,
2035 address, stream, recurse + 1, val, options,
2046 val_print (elttype, embedded_offset + i * eltlen,
2070 int len,
int *errptr)
2085 for (errcode = 0, nread = 0; len > 0 && errcode == 0; nread++, len--)
2131 unsigned int nfetch;
2134 struct cleanup *old_chain = NULL;
2147 unsigned int fetchlen = std::min ((
unsigned) len, fetchlimit);
2154 addr += nfetch * width;
2155 bufptr += nfetch * width;
2159 unsigned long bufsize = 0;
2160 unsigned int chunksize;
2171 chunksize = std::min (8u, fetchlimit);
2176 nfetch = std::min ((
unsigned long) chunksize, fetchlimit - bufsize);
2182 (nfetch + bufsize) * width);
2184 bufptr = *
buffer + bufsize * width;
2197 limit = bufptr + nfetch * width;
2198 while (bufptr < limit)
2216 && bufptr - *
buffer < fetchlimit * width
2228 *bytes_read = bufptr - *
buffer;
2244 || w ==
LCST (
'\a') || w ==
LCST (
'\b')
2245 || w ==
LCST (
'\f') || w ==
LCST (
'\n')
2246 || w ==
LCST (
'\r') || w ==
LCST (
'\t')
2247 || w ==
LCST (
'\v'));
2255 struct obstack *output)
2275 int orig_len,
int width,
2276 enum bfd_endian byte_order,
2277 struct obstack *output,
2278 int quoter,
int *need_escapep)
2280 int need_escape = *need_escapep;
2314 && w !=
LCST (
'9'))))
2320 obstack_grow (output, &wchar,
sizeof (
gdb_wchar_t));
2326 for (i = 0; i + width <= orig_len; i += width)
2336 xsnprintf (octal,
sizeof (octal),
"\\%.3o",
2337 (
int) (
value & 0777));
2343 while (i < orig_len)
2347 xsnprintf (octal,
sizeof (octal),
"\\%.3o", orig[i] & 0xff);
2365 int quoter,
const char *encoding)
2367 enum bfd_endian byte_order
2370 int need_escape = 0;
2386 int print_escape = 1;
2389 num_chars = iter.
iterate (&result, &chars, &buf, &buflen);
2402 for (i = 0; i < num_chars; ++i)
2411 for (i = 0; i < num_chars; ++i)
2414 &wchar_buf, quoter, &need_escape);
2421 byte_order, &wchar_buf, quoter, &need_escape);
2428 (
gdb_byte *) obstack_base (&wchar_buf),
2429 obstack_object_size (&wchar_buf),
2431 obstack_1grow (&output,
'\0');
2503 && memcmp (current->
buf, d.
buf, current->
buflen) == 0))
2527 int quote_char,
int width,
2528 enum bfd_endian byte_order,
2533 enum {START, SINGLE, REPEAT, INCOMPLETE, FINISH} state, last;
2535 int need_escape = 0;
2539 last = state = START;
2563 obstack_grow (obstack, &wide_quote_char,
sizeof (
gdb_wchar_t));
2570 byte_order, obstack, quote_char, &need_escape);
2573 byte_order, obstack, quote_char, &need_escape);
2590 obstack_grow (obstack, &wide_quote_char,
sizeof (
gdb_wchar_t));
2599 byte_order, obstack, quote_char, &need_escape);
2602 byte_order, obstack, quote_char, &need_escape);
2605 for (j = 0; s[j]; ++j)
2620 obstack_grow (obstack, &wide_quote_char,
sizeof (
gdb_wchar_t));
2628 obstack, 0, &need_escape);
2640 obstack_grow (obstack, &wide_quote_char,
sizeof (
gdb_wchar_t));
2647 if (state != FINISH)
2684 const gdb_byte *
string,
unsigned int length,
2685 const char *encoding,
int force_ellipses,
2686 int quote_char,
int c_style_terminator,
2699 unsigned long current_char = 1;
2701 for (i = 0; current_char; ++i)
2713 if (c_style_terminator
2717 width, byte_order) == 0))
2728 converted_chars = NULL;
2735 while (i < options->print_max)
2767 width, byte_order, options);
2769 if (force_ellipses || !finished)
2776 (
gdb_byte *) obstack_base (&wchar_buf),
2777 obstack_object_size (&wchar_buf),
2779 obstack_1grow (&output,
'\0');
2800 int force_ellipsis = 0;
2803 unsigned int fetchlimit;
2806 struct cleanup *old_chain = NULL;
2819 fetchlimit = (len == -1 ? options->
print_max : std::min ((
unsigned) len,
2834 if (bytes_read >= width)
2837 if (len == -1 && !found_nul)
2845 peekbuf = (
gdb_byte *) alloca (width);
2851 else if ((len >= 0 &&
err != 0) || (len > bytes_read / width))
2862 if (
err == 0 || bytes_read > 0)
2865 encoding, force_ellipsis, options);
2880 return (bytes_read / width);
2913 error (
_(
"Nonsense input radix ``decimal %u''; input radix unchanged."),
2920 "decimal %u, hex %x, octal %o.\n"),
2921 radix, radix, radix);
2955 error (
_(
"Unsupported output radix ``decimal %u''; " 2956 "output radix unchanged."),
2963 "decimal %u, hex %x, octal %o.\n"),
2964 radix, radix, radix);
2987 "decimal %u, hex %x, octal %o.\n"),
2988 radix, radix, radix);
3002 "decimal %u, hex %x, octal %o.\n"),
3008 "%u, hex %x, octal %o.\n"),
3011 "%u, hex %x, octal %o.\n"),
3022 "\"set print\" must be followed by the name of a print subcommand.\n");
3036 "\"set print raw\" must be followed by the name of a \"print raw\" subcommand.\n");
3051 _(
"Generic command for setting how things print."),
3058 _(
"Generic command for showing print settings."),
3065 Generic command for setting what things to print in \"raw\" mode."),
3068 _(
"Generic command for showing \"print raw\" settings."),
3073 Set limit on string chars or array elements to print."),
_(
"\ 3074 Show limit on string chars or array elements to print."),
_(
"\ 3075 \"set print elements unlimited\" causes there to be no limit."),
3082 Set printing of char arrays to stop at first null char."),
_(
"\ 3083 Show printing of char arrays to stop at first null char."), NULL,
3090 Set threshold for repeated print elements."),
_(
"\ 3091 Show threshold for repeated print elements."),
_(
"\ 3092 \"set print repeats unlimited\" causes all elements to be individually printed."),
3099 Set pretty formatting of structures."),
_(
"\ 3100 Show pretty formatting of structures."), NULL,
3107 Set printing of unions interior to structures."),
_(
"\ 3108 Show printing of unions interior to structures."), NULL,
3115 Set pretty formatting of arrays."),
_(
"\ 3116 Show pretty formatting of arrays."), NULL,
3123 Set printing of addresses."),
_(
"\ 3124 Show printing of addresses."), NULL,
3131 Set printing of symbol names when printing pointers."),
_(
"\ 3132 Show printing of symbol names when printing pointers."),
3139 Set default input radix for entering numbers."),
_(
"\ 3140 Show default input radix for entering numbers."), NULL,
3147 Set default output radix for printing of values."),
_(
"\ 3148 Show default output radix for printing of values."), NULL,
3161 Set default input and output number radices.\n\ 3162 Use 'set input-radix' or 'set output-radix' to independently set each.\n\ 3163 Without an argument, sets both radices back to the default value of 10."),
3166 Show the default input and output number radices.\n\ 3167 Use 'show input-radix' or 'show output-radix' to independently show each."),
3172 Set printing of array indexes."),
_(
"\
void val_print_not_allocated(struct ui_file *stream)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t err
static void show_prettyformat_structs(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
#define TYPE_ERROR_NAME(type)
static void show_unionprint(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void generic_val_print_flags(struct type *type, int embedded_offset, struct ui_file *stream, struct value *original_value, const struct value_print_options *options)
#define obstack_grow_wstr(OBSTACK, WSTRING)
static void set_output_radix(const char *args, int from_tty, struct cmd_list_element *c)
unsigned int repeat_count_threshold
CORE_ADDR extract_typed_address(const gdb_byte *buf, struct type *type)
std::string target_float_to_string(const gdb_byte *addr, const struct type *type, const char *format)
struct value * value_addr(struct value *arg1)
static void show_print_max(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void value_print(struct value *val, struct ui_file *stream, const struct value_print_options *options)
#define TYPE_FIELD_NAME(thistype, n)
enum wchar_iterate_result result
static void show_repeat_count_threshold(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void set_input_radix(const char *args, int from_tty, struct cmd_list_element *c)
int type_not_allocated(const struct type *type)
int value_entirely_optimized_out(struct value *value)
char * int_string(LONGEST val, int radix, int is_signed, int width, int use_c_format)
CORE_ADDR unpack_pointer(struct type *type, const gdb_byte *valaddr)
static const gdb_byte * get_value_addr_contents(struct value *deref_val)
static void generic_val_print_float(struct type *type, int embedded_offset, struct ui_file *stream, struct value *original_value, const struct value_print_options *options)
void warning(const char *fmt,...)
int fputc_filtered(int c, struct ui_file *stream)
LONGEST value_embedded_offset(const struct value *value)
static void set_output_radix_1(int, unsigned)
struct value * value_at(struct type *type, CORE_ADDR addr)
void get_formatted_print_options(struct value_print_options *opts, char format)
void val_print_unavailable(struct ui_file *stream)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
void common_val_print(struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
void print_decimal_chars(struct ui_file *stream, const gdb_byte *valaddr, unsigned len, bool is_signed, enum bfd_endian byte_order)
static void show_stop_print_at_null(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void internal_error(const char *file, int line, const char *fmt,...)
void print_floating(const gdb_byte *valaddr, struct type *type, struct ui_file *stream)
unsigned int type_length_units(struct type *type)
static void show_radix(const char *arg, int from_tty)
static unsigned output_radix_1
int value_lazy(const struct value *value)
static void generic_val_print_complex(struct type *type, int embedded_offset, struct ui_file *stream, struct value *original_value, const struct value_print_options *options, const struct generic_val_print_decorations *decorations)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
void type_print(struct type *type, const char *varstring, struct ui_file *stream, int show)
static void generic_val_print_enum_1(struct type *type, LONGEST val, struct ui_file *stream)
static void show_output_radix(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
#define VEC_safe_push(T, V, O)
void get_no_prettyformat_print_options(struct value_print_options *opts)
void val_print_invalid_address(struct ui_file *stream)
const gdb_byte * value_contents_for_printing(struct value *value)
int value_bytes_available(const struct value *value, LONGEST offset, LONGEST length)
int value_bits_any_optimized_out(const struct value *value, int bit_offset, int bit_length)
struct value_print_options user_print_options
static void show_prettyformat_arrays(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
#define TYPE_FIELD_ENUMVAL(thistype, n)
#define TYPE_FIELD_TYPE(thistype, n)
enum val_prettyformat prettyformat
static void emit_octal_digit(struct ui_file *stream, bool *seen_a_one, int digit)
void printf_filtered(const char *format,...)
static int wchar_printable(gdb_wchar_t w)
static bool maybe_negate_by_bytes(const gdb_byte *bytes, unsigned len, enum bfd_endian byte_order, gdb::byte_vector *out_vec)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
static void set_radix(const char *arg, int from_tty)
#define TYPE_IS_REFERENCE(t)
enum lval_type value_lval_const(const struct value *value)
static void generic_val_print_memberptr(struct type *type, int embedded_offset, struct ui_file *stream, struct value *original_value, const struct value_print_options *options)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_const_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
int gdbarch_addressable_memory_unit_size(struct gdbarch *gdbarch)
static void generic_val_print_ref(struct type *type, int embedded_offset, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options)
void add_setshow_zuinteger_cmd(const char *name, enum command_class theclass, unsigned int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static int count_next_character(wchar_iterator *iter, VEC(converted_character_d) **vec)
DEF_VEC_O(converted_character_d)
static int partial_memory_read(CORE_ADDR memaddr, gdb_byte *myaddr, int len, int *errptr)
void val_print_optimized_out(const struct value *val, struct ui_file *stream)
void val_print_scalar_formatted(struct type *type, LONGEST embedded_offset, struct value *val, const struct value_print_options *options, int size, struct ui_file *stream)
int discrete_position(struct type *type, LONGEST val, LONGEST *pos)
struct cmd_list_element * setlist
void add_setshow_uinteger_cmd(const char *name, enum command_class theclass, unsigned int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
bool value_contents_eq(const struct value *val1, LONGEST offset1, const struct value *val2, LONGEST offset2, LONGEST length)
#define PRINT_MAX_DEFAULT
#define LA_EMIT_CHAR(ch, type, stream, quoter)
void print_char_chars(struct ui_file *stream, struct type *type, const gdb_byte *valaddr, unsigned len, enum bfd_endian byte_order)
void val_print_not_associated(struct ui_file *stream)
struct type * check_typedef(struct type *type)
static void generic_val_print_ptr(struct type *type, int embedded_offset, struct ui_file *stream, struct value *original_value, const struct value_print_options *options)
#define CATCH(EXCEPTION, MASK)
void convert_between_encodings(const char *from, const char *to, const gdb_byte *bytes, unsigned int num_bytes, int width, struct obstack *output, enum transliterations translit)
void generic_printstr(struct ui_file *stream, struct type *type, const gdb_byte *string, unsigned int length, const char *encoding, int force_ellipses, int quote_char, int c_style_terminator, const struct value_print_options *options)
struct target_ops current_target
std::string memory_error_message(enum target_xfer_status err, struct gdbarch *gdbarch, CORE_ADDR memaddr)
static void generic_val_print_array(struct type *type, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct generic_val_print_decorations *decorations)
int longest_to_int(LONGEST arg)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
static void generic_val_print_enum(struct type *type, int embedded_offset, struct ui_file *stream, struct value *original_value, const struct value_print_options *options)
static ULONGEST extract_unsigned_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
void print_hex_chars(struct ui_file *stream, const gdb_byte *valaddr, unsigned len, enum bfd_endian byte_order, bool zero_pad)
static void show_print_raw(const char *args, int from_tty)
static void print_wchar(gdb_wint_t w, const gdb_byte *orig, int orig_len, int width, enum bfd_endian byte_order, struct obstack *output, int quoter, int *need_escapep)
CORE_ADDR gdbarch_convert_from_func_ptr_addr(struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
static void show_print_array_indexes(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void print_unpacked_pointer(struct type *type, struct type *elttype, CORE_ADDR address, struct ui_file *stream, const struct value_print_options *options)
void annotate_elt_rep(unsigned int repcount)
struct cmd_list_element * showlist
void fputs_filtered(const char *linebuffer, struct ui_file *stream)
static void generic_val_print_int(struct type *type, int embedded_offset, struct ui_file *stream, struct value *original_value, const struct value_print_options *options)
void free_current_contents(void *ptr)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
void print_binary_chars(struct ui_file *stream, const gdb_byte *valaddr, unsigned len, enum bfd_endian byte_order, bool zero_pad)
void annotate_array_section_begin(int idx, struct type *elttype)
#define VEC_index(T, V, I)
struct value * coerce_ref_if_computed(const struct value *arg)
struct gdbarch * get_type_arch(const struct type *type)
int type_not_associated(const struct type *type)
void _initialize_valprint(void)
struct value * value_from_longest(struct type *type, LONGEST num)
static void show_input_radix(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
const gdb_byte * value_contents_for_printing_const(const struct value *value)
int iterate(enum wchar_iterate_result *out_result, gdb_wchar_t **out_chars, const gdb_byte **ptr, size_t *len)
struct cmd_list_element * setprintlist
char * xstrprintf(const char *format,...)
static void show_addressprint(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void printf_unfiltered(const char *format,...)
static void show_print(const char *args, int from_tty)
void print_octal_chars(struct ui_file *stream, const gdb_byte *valaddr, unsigned len, enum bfd_endian byte_order)
int valprint_check_validity(struct ui_file *stream, struct type *type, LONGEST embedded_offset, const struct value *val)
#define TYPE_FIELD_BITSIZE(thistype, n)
int val_print_scalar_type_p(struct type *type)
struct type * builtin_bool
void annotate_elt_rep_end(void)
LONGEST unpack_long(struct type *type, const gdb_byte *valaddr)
void cmd_show_list(struct cmd_list_element *list, int from_tty, const char *prefix)
#define TYPE_FIELD_BITPOS(thistype, n)
struct cmd_list_element * add_alias_cmd(const char *name, cmd_list_element *old, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
void annotate_array_section_end(void)
gdb_wchar_t chars[WCHAR_BUFLEN_MAX]
void wrap_here(const char *indent)
static void generic_val_print_func(struct type *type, int embedded_offset, CORE_ADDR address, struct ui_file *stream, struct value *original_value, const struct value_print_options *options)
int value_bits_synthetic_pointer(const struct value *value, LONGEST offset, LONGEST length)
PTR xrealloc(PTR ptr, size_t size)
static void set_print(const char *arg, int from_tty)
int read_string(CORE_ADDR addr, int len, int width, unsigned int fetchlimit, enum bfd_endian byte_order, gdb_byte **buffer, int *bytes_read)
void print_spaces_filtered(int n, struct ui_file *stream)
static unsigned input_radix_1
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
void discard_cleanups(struct cleanup *old_chain)
const struct language_defn * current_language
#define TYPE_TARGET_TYPE(thistype)
void print_longest(struct ui_file *stream, int format, int use_c_format, LONGEST val_long)
void value_fetch_lazy(struct value *val)
char * value_internal_function_name(struct value *val)
void generic_val_print(struct type *type, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct generic_val_print_decorations *decorations)
int xsnprintf(char *str, size_t size, const char *format,...)
#define TYPE_CODE(thistype)
#define TYPE_INDEX_TYPE(type)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
const char * complex_prefix
void get_user_print_options(struct value_print_options *opts)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static void val_print_type_code_flags(struct type *type, const gdb_byte *valaddr, struct ui_file *stream)
#define TYPE_NFIELDS(thistype)
void generic_emit_char(int c, struct type *type, struct ui_file *stream, int quoter, const char *encoding)
int print_address_demangle(const struct value_print_options *opts, struct gdbarch *gdbarch, CORE_ADDR addr, struct ui_file *stream, int do_demangle)
static void print_ref_address(struct type *type, const gdb_byte *address_buffer, int embedded_offset, struct ui_file *stream)
struct cmd_list_element * showprintlist
#define INTERMEDIATE_ENCODING
gdb::def_vector< gdb_byte > byte_vector
#define TYPE_FLAG_ENUM(t)
void val_print(struct type *type, LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, const struct language_defn *language)
void print_scalar_formatted(const gdb_byte *, struct type *, const struct value_print_options *, int, struct ui_file *)
unsigned long long ULONGEST
const char * complex_infix
static void generic_val_print_bool(struct type *type, int embedded_offset, struct ui_file *stream, struct value *original_value, const struct value_print_options *options, const struct generic_val_print_decorations *decorations)
#define LA_PRINT_ARRAY_INDEX(index_value, stream, options)
struct type * value_type(const struct value *value)
static void generic_val_print_char(struct type *type, struct type *unresolved_type, int embedded_offset, struct ui_file *stream, struct value *original_value, const struct value_print_options *options)
static int value_check_printable(struct value *val, struct ui_file *stream, const struct value_print_options *options)
#define LA_VALUE_PRINT(val, stream, options)
#define LA_PRINT_STRING(stream, elttype, string, length, encoding, force_ellipses, options)
const char * host_charset(void)
struct value * ada_to_fixed_value(struct value *val)
#define TYPE_LENGTH(thistype)
static void print_converted_chars_to_obstack(struct obstack *obstack, VEC(converted_character_d) *chars, int quote_char, int width, enum bfd_endian byte_order, const struct value_print_options *options)
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)
#define LA_PRINT_CHAR(ch, type, stream)
static void set_input_radix_1(int, unsigned)
void print_function_pointer_address(const struct value_print_options *options, struct gdbarch *gdbarch, CORE_ADDR address, struct ui_file *stream)
void gdb_flush(struct ui_file *file)
static void set_print_raw(const char *arg, int from_tty)
void val_print_array_elements(struct type *type, LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, unsigned int i)
CORE_ADDR value_address(const struct value *value)
const char * complex_suffix
void pack_long(gdb_byte *buf, struct type *type, LONGEST num)
int get_array_bounds(struct type *type, LONGEST *low_bound, LONGEST *high_bound)
enum bfd_endian byte_order
static void append_string_as_wide(const char *string, struct obstack *output)
struct cmd_list_element * setprintrawlist
int value_entirely_unavailable(struct value *value)
void error(const char *fmt,...)
void maybe_print_array_index(struct type *index_type, LONGEST index, struct ui_file *stream, const struct value_print_options *options)
struct cmd_list_element * showprintrawlist
static void show_symbol_print(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void val_print_not_saved(struct ui_file *stream)
void do_cleanups(struct cleanup *old_chain)
int apply_ext_lang_val_pretty_printer(struct type *type, LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, const struct language_defn *language)
LONGEST parse_and_eval_long(const char *exp)