2010-05-15 Michael Snyder <msnyder@vmware.com>
* parse.c: White space. * p-lang.c: White space. * posix-hdep.c: White space. * printcmd.c: White space. * progspace.c: White space. * prologue-value.c: White space. * psymtab.c: White space. * p-typeprint.c: White space. * p-valprint.c: White space.
This commit is contained in:
parent
5cc80db34d
commit
ad3bbd48b6
10 changed files with 85 additions and 23 deletions
|
@ -1,5 +1,15 @@
|
||||||
2010-05-15 Michael Snyder <msnyder@vmware.com>
|
2010-05-15 Michael Snyder <msnyder@vmware.com>
|
||||||
|
|
||||||
|
* parse.c: White space.
|
||||||
|
* p-lang.c: White space.
|
||||||
|
* posix-hdep.c: White space.
|
||||||
|
* printcmd.c: White space.
|
||||||
|
* progspace.c: White space.
|
||||||
|
* prologue-value.c: White space.
|
||||||
|
* psymtab.c: White space.
|
||||||
|
* p-typeprint.c: White space.
|
||||||
|
* p-valprint.c: White space.
|
||||||
|
|
||||||
* objc-lang.c: White space.
|
* objc-lang.c: White space.
|
||||||
* objfiles.c: White space.
|
* objfiles.c: White space.
|
||||||
* observer.c: White space.
|
* observer.c: White space.
|
||||||
|
|
|
@ -137,6 +137,7 @@ is_pascal_string_type (struct type *type,int *length_pos,
|
||||||
if (char_type)
|
if (char_type)
|
||||||
{
|
{
|
||||||
*char_type = TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 2));
|
*char_type = TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 2));
|
||||||
|
|
||||||
if (TYPE_CODE (*char_type) == TYPE_CODE_ARRAY)
|
if (TYPE_CODE (*char_type) == TYPE_CODE_ARRAY)
|
||||||
*char_type = TYPE_TARGET_TYPE (*char_type);
|
*char_type = TYPE_TARGET_TYPE (*char_type);
|
||||||
}
|
}
|
||||||
|
@ -157,7 +158,6 @@ static void pascal_one_char (int, struct ui_file *, int *);
|
||||||
static void
|
static void
|
||||||
pascal_one_char (int c, struct ui_file *stream, int *in_quotes)
|
pascal_one_char (int c, struct ui_file *stream, int *in_quotes)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (c == '\'' || ((unsigned int) c <= 0xff && (PRINT_LITERAL_FORM (c))))
|
if (c == '\'' || ((unsigned int) c <= 0xff && (PRINT_LITERAL_FORM (c))))
|
||||||
{
|
{
|
||||||
if (!(*in_quotes))
|
if (!(*in_quotes))
|
||||||
|
@ -190,6 +190,7 @@ static void
|
||||||
pascal_emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
|
pascal_emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
|
||||||
{
|
{
|
||||||
int in_quotes = 0;
|
int in_quotes = 0;
|
||||||
|
|
||||||
pascal_one_char (c, stream, &in_quotes);
|
pascal_one_char (c, stream, &in_quotes);
|
||||||
if (in_quotes)
|
if (in_quotes)
|
||||||
fputs_filtered ("'", stream);
|
fputs_filtered ("'", stream);
|
||||||
|
@ -199,6 +200,7 @@ void
|
||||||
pascal_printchar (int c, struct type *type, struct ui_file *stream)
|
pascal_printchar (int c, struct type *type, struct ui_file *stream)
|
||||||
{
|
{
|
||||||
int in_quotes = 0;
|
int in_quotes = 0;
|
||||||
|
|
||||||
pascal_one_char (c, stream, &in_quotes);
|
pascal_one_char (c, stream, &in_quotes);
|
||||||
if (in_quotes)
|
if (in_quotes)
|
||||||
fputs_filtered ("'", stream);
|
fputs_filtered ("'", stream);
|
||||||
|
@ -370,6 +372,7 @@ pascal_language_arch_info (struct gdbarch *gdbarch,
|
||||||
struct language_arch_info *lai)
|
struct language_arch_info *lai)
|
||||||
{
|
{
|
||||||
const struct builtin_type *builtin = builtin_type (gdbarch);
|
const struct builtin_type *builtin = builtin_type (gdbarch);
|
||||||
|
|
||||||
lai->string_char_type = builtin->builtin_char;
|
lai->string_char_type = builtin->builtin_char;
|
||||||
lai->primitive_type_vector
|
lai->primitive_type_vector
|
||||||
= GDBARCH_OBSTACK_CALLOC (gdbarch, nr_pascal_primitive_types + 1,
|
= GDBARCH_OBSTACK_CALLOC (gdbarch, nr_pascal_primitive_types + 1,
|
||||||
|
|
|
@ -301,6 +301,7 @@ static void
|
||||||
pascal_print_func_args (struct type *type, struct ui_file *stream)
|
pascal_print_func_args (struct type *type, struct ui_file *stream)
|
||||||
{
|
{
|
||||||
int i, len = TYPE_NFIELDS (type);
|
int i, len = TYPE_NFIELDS (type);
|
||||||
|
|
||||||
if (len)
|
if (len)
|
||||||
{
|
{
|
||||||
fprintf_filtered (stream, "(");
|
fprintf_filtered (stream, "(");
|
||||||
|
@ -439,8 +440,8 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||||
s_none, s_public, s_private, s_protected
|
s_none, s_public, s_private, s_protected
|
||||||
}
|
}
|
||||||
section_type;
|
section_type;
|
||||||
QUIT;
|
|
||||||
|
|
||||||
|
QUIT;
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
if (type == NULL)
|
if (type == NULL)
|
||||||
{
|
{
|
||||||
|
@ -764,6 +765,7 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||||
case TYPE_CODE_RANGE:
|
case TYPE_CODE_RANGE:
|
||||||
{
|
{
|
||||||
struct type *target = TYPE_TARGET_TYPE (type);
|
struct type *target = TYPE_TARGET_TYPE (type);
|
||||||
|
|
||||||
print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
|
print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
|
||||||
fputs_filtered ("..", stream);
|
fputs_filtered ("..", stream);
|
||||||
print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
|
print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
|
||||||
|
|
|
@ -194,6 +194,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
||||||
{
|
{
|
||||||
ULONGEST string_length;
|
ULONGEST string_length;
|
||||||
void *buffer;
|
void *buffer;
|
||||||
|
|
||||||
buffer = xmalloc (length_size);
|
buffer = xmalloc (length_size);
|
||||||
read_memory (addr + length_pos, buffer, length_size);
|
read_memory (addr + length_pos, buffer, length_size);
|
||||||
string_length = extract_unsigned_integer (buffer, length_size,
|
string_length = extract_unsigned_integer (buffer, length_size,
|
||||||
|
@ -205,9 +206,9 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
||||||
{
|
{
|
||||||
/* print vtbl's nicely */
|
/* print vtbl's nicely */
|
||||||
CORE_ADDR vt_address = unpack_pointer (type, valaddr + embedded_offset);
|
CORE_ADDR vt_address = unpack_pointer (type, valaddr + embedded_offset);
|
||||||
|
|
||||||
struct minimal_symbol *msymbol =
|
struct minimal_symbol *msymbol =
|
||||||
lookup_minimal_symbol_by_pc (vt_address);
|
lookup_minimal_symbol_by_pc (vt_address);
|
||||||
|
|
||||||
if ((msymbol != NULL)
|
if ((msymbol != NULL)
|
||||||
&& (vt_address == SYMBOL_VALUE_ADDRESS (msymbol)))
|
&& (vt_address == SYMBOL_VALUE_ADDRESS (msymbol)))
|
||||||
{
|
{
|
||||||
|
@ -259,6 +260,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
||||||
{
|
{
|
||||||
CORE_ADDR addr
|
CORE_ADDR addr
|
||||||
= extract_typed_address (valaddr + embedded_offset, type);
|
= extract_typed_address (valaddr + embedded_offset, type);
|
||||||
|
|
||||||
fprintf_filtered (stream, "@");
|
fprintf_filtered (stream, "@");
|
||||||
fputs_filtered (paddress (gdbarch, addr), stream);
|
fputs_filtered (paddress (gdbarch, addr), stream);
|
||||||
if (options->deref_ref)
|
if (options->deref_ref)
|
||||||
|
@ -273,6 +275,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
||||||
value_at
|
value_at
|
||||||
(TYPE_TARGET_TYPE (type),
|
(TYPE_TARGET_TYPE (type),
|
||||||
unpack_pointer (type, valaddr + embedded_offset));
|
unpack_pointer (type, valaddr + embedded_offset));
|
||||||
|
|
||||||
common_val_print (deref_val, stream, recurse + 1, options,
|
common_val_print (deref_val, stream, recurse + 1, options,
|
||||||
current_language);
|
current_language);
|
||||||
}
|
}
|
||||||
|
@ -372,6 +375,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
||||||
if (options->format || options->output_format)
|
if (options->format || options->output_format)
|
||||||
{
|
{
|
||||||
struct value_print_options opts = *options;
|
struct value_print_options opts = *options;
|
||||||
|
|
||||||
opts.format = (options->format ? options->format
|
opts.format = (options->format ? options->format
|
||||||
: options->output_format);
|
: options->output_format);
|
||||||
print_scalar_formatted (valaddr + embedded_offset, type,
|
print_scalar_formatted (valaddr + embedded_offset, type,
|
||||||
|
@ -406,6 +410,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
||||||
if (options->format || options->output_format)
|
if (options->format || options->output_format)
|
||||||
{
|
{
|
||||||
struct value_print_options opts = *options;
|
struct value_print_options opts = *options;
|
||||||
|
|
||||||
opts.format = (options->format ? options->format
|
opts.format = (options->format ? options->format
|
||||||
: options->output_format);
|
: options->output_format);
|
||||||
print_scalar_formatted (valaddr + embedded_offset, type,
|
print_scalar_formatted (valaddr + embedded_offset, type,
|
||||||
|
@ -421,6 +426,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
||||||
if (options->format || options->output_format)
|
if (options->format || options->output_format)
|
||||||
{
|
{
|
||||||
struct value_print_options opts = *options;
|
struct value_print_options opts = *options;
|
||||||
|
|
||||||
opts.format = (options->format ? options->format
|
opts.format = (options->format ? options->format
|
||||||
: options->output_format);
|
: options->output_format);
|
||||||
print_scalar_formatted (valaddr + embedded_offset, type,
|
print_scalar_formatted (valaddr + embedded_offset, type,
|
||||||
|
@ -484,6 +490,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
||||||
for (i = low_bound; i <= high_bound; i++)
|
for (i = low_bound; i <= high_bound; i++)
|
||||||
{
|
{
|
||||||
int element = value_bit_index (type, valaddr + embedded_offset, i);
|
int element = value_bit_index (type, valaddr + embedded_offset, i);
|
||||||
|
|
||||||
if (element < 0)
|
if (element < 0)
|
||||||
{
|
{
|
||||||
i = element;
|
i = element;
|
||||||
|
@ -501,6 +508,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
||||||
if (i + 1 <= high_bound && value_bit_index (type, valaddr + embedded_offset, ++i))
|
if (i + 1 <= high_bound && value_bit_index (type, valaddr + embedded_offset, ++i))
|
||||||
{
|
{
|
||||||
int j = i;
|
int j = i;
|
||||||
|
|
||||||
fputs_filtered ("..", stream);
|
fputs_filtered ("..", stream);
|
||||||
while (i + 1 <= high_bound
|
while (i + 1 <= high_bound
|
||||||
&& value_bit_index (type, valaddr + embedded_offset, ++i))
|
&& value_bit_index (type, valaddr + embedded_offset, ++i))
|
||||||
|
@ -760,6 +768,7 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct value_print_options opts = *options;
|
struct value_print_options opts = *options;
|
||||||
|
|
||||||
v = value_from_longest (TYPE_FIELD_TYPE (type, i),
|
v = value_from_longest (TYPE_FIELD_TYPE (type, i),
|
||||||
unpack_field_as_long (type, valaddr, i));
|
unpack_field_as_long (type, valaddr, i));
|
||||||
|
|
||||||
|
@ -778,6 +787,7 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
|
||||||
{
|
{
|
||||||
/* struct value *v = value_static_field (type, i); v4.17 specific */
|
/* struct value *v = value_static_field (type, i); v4.17 specific */
|
||||||
struct value *v;
|
struct value *v;
|
||||||
|
|
||||||
v = value_from_longest (TYPE_FIELD_TYPE (type, i),
|
v = value_from_longest (TYPE_FIELD_TYPE (type, i),
|
||||||
unpack_field_as_long (type, valaddr, i));
|
unpack_field_as_long (type, valaddr, i));
|
||||||
|
|
||||||
|
@ -790,6 +800,7 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct value_print_options opts = *options;
|
struct value_print_options opts = *options;
|
||||||
|
|
||||||
opts.deref_ref = 0;
|
opts.deref_ref = 0;
|
||||||
/* val_print (TYPE_FIELD_TYPE (type, i),
|
/* val_print (TYPE_FIELD_TYPE (type, i),
|
||||||
valaddr + TYPE_FIELD_BITPOS (type, i) / 8,
|
valaddr + TYPE_FIELD_BITPOS (type, i) / 8,
|
||||||
|
@ -890,6 +901,7 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr,
|
||||||
{
|
{
|
||||||
/* FIXME (alloc): not safe is baseclass is really really big. */
|
/* FIXME (alloc): not safe is baseclass is really really big. */
|
||||||
gdb_byte *buf = alloca (TYPE_LENGTH (baseclass));
|
gdb_byte *buf = alloca (TYPE_LENGTH (baseclass));
|
||||||
|
|
||||||
base_valaddr = buf;
|
base_valaddr = buf;
|
||||||
if (target_read_memory (address + boffset, buf,
|
if (target_read_memory (address + boffset, buf,
|
||||||
TYPE_LENGTH (baseclass)) != 0)
|
TYPE_LENGTH (baseclass)) != 0)
|
||||||
|
|
24
gdb/parse.c
24
gdb/parse.c
|
@ -168,6 +168,7 @@ end_arglist (void)
|
||||||
{
|
{
|
||||||
int val = arglist_len;
|
int val = arglist_len;
|
||||||
struct funcall *call = funcall_chain;
|
struct funcall *call = funcall_chain;
|
||||||
|
|
||||||
funcall_chain = call->next;
|
funcall_chain = call->next;
|
||||||
arglist_len = call->arglist_len;
|
arglist_len = call->arglist_len;
|
||||||
xfree (call);
|
xfree (call);
|
||||||
|
@ -214,10 +215,9 @@ void
|
||||||
write_exp_elt_opcode (enum exp_opcode expelt)
|
write_exp_elt_opcode (enum exp_opcode expelt)
|
||||||
{
|
{
|
||||||
union exp_element tmp;
|
union exp_element tmp;
|
||||||
|
|
||||||
memset (&tmp, 0, sizeof (union exp_element));
|
memset (&tmp, 0, sizeof (union exp_element));
|
||||||
|
|
||||||
tmp.opcode = expelt;
|
tmp.opcode = expelt;
|
||||||
|
|
||||||
write_exp_elt (tmp);
|
write_exp_elt (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,10 +225,9 @@ void
|
||||||
write_exp_elt_sym (struct symbol *expelt)
|
write_exp_elt_sym (struct symbol *expelt)
|
||||||
{
|
{
|
||||||
union exp_element tmp;
|
union exp_element tmp;
|
||||||
|
|
||||||
memset (&tmp, 0, sizeof (union exp_element));
|
memset (&tmp, 0, sizeof (union exp_element));
|
||||||
|
|
||||||
tmp.symbol = expelt;
|
tmp.symbol = expelt;
|
||||||
|
|
||||||
write_exp_elt (tmp);
|
write_exp_elt (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,6 +235,7 @@ void
|
||||||
write_exp_elt_block (struct block *b)
|
write_exp_elt_block (struct block *b)
|
||||||
{
|
{
|
||||||
union exp_element tmp;
|
union exp_element tmp;
|
||||||
|
|
||||||
memset (&tmp, 0, sizeof (union exp_element));
|
memset (&tmp, 0, sizeof (union exp_element));
|
||||||
tmp.block = b;
|
tmp.block = b;
|
||||||
write_exp_elt (tmp);
|
write_exp_elt (tmp);
|
||||||
|
@ -245,6 +245,7 @@ void
|
||||||
write_exp_elt_objfile (struct objfile *objfile)
|
write_exp_elt_objfile (struct objfile *objfile)
|
||||||
{
|
{
|
||||||
union exp_element tmp;
|
union exp_element tmp;
|
||||||
|
|
||||||
memset (&tmp, 0, sizeof (union exp_element));
|
memset (&tmp, 0, sizeof (union exp_element));
|
||||||
tmp.objfile = objfile;
|
tmp.objfile = objfile;
|
||||||
write_exp_elt (tmp);
|
write_exp_elt (tmp);
|
||||||
|
@ -254,10 +255,9 @@ void
|
||||||
write_exp_elt_longcst (LONGEST expelt)
|
write_exp_elt_longcst (LONGEST expelt)
|
||||||
{
|
{
|
||||||
union exp_element tmp;
|
union exp_element tmp;
|
||||||
|
|
||||||
memset (&tmp, 0, sizeof (union exp_element));
|
memset (&tmp, 0, sizeof (union exp_element));
|
||||||
|
|
||||||
tmp.longconst = expelt;
|
tmp.longconst = expelt;
|
||||||
|
|
||||||
write_exp_elt (tmp);
|
write_exp_elt (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,10 +265,9 @@ void
|
||||||
write_exp_elt_dblcst (DOUBLEST expelt)
|
write_exp_elt_dblcst (DOUBLEST expelt)
|
||||||
{
|
{
|
||||||
union exp_element tmp;
|
union exp_element tmp;
|
||||||
|
|
||||||
memset (&tmp, 0, sizeof (union exp_element));
|
memset (&tmp, 0, sizeof (union exp_element));
|
||||||
|
|
||||||
tmp.doubleconst = expelt;
|
tmp.doubleconst = expelt;
|
||||||
|
|
||||||
write_exp_elt (tmp);
|
write_exp_elt (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,10 +287,9 @@ void
|
||||||
write_exp_elt_type (struct type *expelt)
|
write_exp_elt_type (struct type *expelt)
|
||||||
{
|
{
|
||||||
union exp_element tmp;
|
union exp_element tmp;
|
||||||
|
|
||||||
memset (&tmp, 0, sizeof (union exp_element));
|
memset (&tmp, 0, sizeof (union exp_element));
|
||||||
|
|
||||||
tmp.type = expelt;
|
tmp.type = expelt;
|
||||||
|
|
||||||
write_exp_elt (tmp);
|
write_exp_elt (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,10 +297,9 @@ void
|
||||||
write_exp_elt_intern (struct internalvar *expelt)
|
write_exp_elt_intern (struct internalvar *expelt)
|
||||||
{
|
{
|
||||||
union exp_element tmp;
|
union exp_element tmp;
|
||||||
|
|
||||||
memset (&tmp, 0, sizeof (union exp_element));
|
memset (&tmp, 0, sizeof (union exp_element));
|
||||||
|
|
||||||
tmp.internalvar = expelt;
|
tmp.internalvar = expelt;
|
||||||
|
|
||||||
write_exp_elt (tmp);
|
write_exp_elt (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1023,6 +1020,7 @@ prefixify_subexp (struct expression *inexpr,
|
||||||
for (i = 0; i < args; i++)
|
for (i = 0; i < args; i++)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
oplen = arglens[i];
|
oplen = arglens[i];
|
||||||
inend += oplen;
|
inend += oplen;
|
||||||
r = prefixify_subexp (inexpr, outexpr, inend, outbeg);
|
r = prefixify_subexp (inexpr, outexpr, inend, outbeg);
|
||||||
|
@ -1166,6 +1164,7 @@ struct expression *
|
||||||
parse_expression (char *string)
|
parse_expression (char *string)
|
||||||
{
|
{
|
||||||
struct expression *exp;
|
struct expression *exp;
|
||||||
|
|
||||||
exp = parse_exp_1 (&string, 0, 0);
|
exp = parse_exp_1 (&string, 0, 0);
|
||||||
if (*string)
|
if (*string)
|
||||||
error (_("Junk after end of expression."));
|
error (_("Junk after end of expression."));
|
||||||
|
@ -1369,6 +1368,7 @@ void
|
||||||
parser_fprintf (FILE *x, const char *y, ...)
|
parser_fprintf (FILE *x, const char *y, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
va_start (args, y);
|
va_start (args, y);
|
||||||
if (x == stderr)
|
if (x == stderr)
|
||||||
vfprintf_unfiltered (gdb_stderr, y, args);
|
vfprintf_unfiltered (gdb_stderr, y, args);
|
||||||
|
|
|
@ -37,6 +37,7 @@ safe_strerror (int errnum)
|
||||||
if (msg == NULL)
|
if (msg == NULL)
|
||||||
{
|
{
|
||||||
static char buf[32];
|
static char buf[32];
|
||||||
|
|
||||||
xsnprintf (buf, sizeof buf, "(undocumented errno %d)", errnum);
|
xsnprintf (buf, sizeof buf, "(undocumented errno %d)", errnum);
|
||||||
msg = buf;
|
msg = buf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -296,6 +296,7 @@ print_formatted (struct value *val, int size,
|
||||||
case 's':
|
case 's':
|
||||||
{
|
{
|
||||||
struct type *elttype = value_type (val);
|
struct type *elttype = value_type (val);
|
||||||
|
|
||||||
next_address = (value_address (val)
|
next_address = (value_address (val)
|
||||||
+ val_print_string (elttype,
|
+ val_print_string (elttype,
|
||||||
value_address (val), -1,
|
value_address (val), -1,
|
||||||
|
@ -463,6 +464,7 @@ print_scalar_formatted (const void *valaddr, struct type *type,
|
||||||
case 'a':
|
case 'a':
|
||||||
{
|
{
|
||||||
CORE_ADDR addr = unpack_pointer (type, valaddr);
|
CORE_ADDR addr = unpack_pointer (type, valaddr);
|
||||||
|
|
||||||
print_address (gdbarch, addr, stream);
|
print_address (gdbarch, addr, stream);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -470,8 +472,8 @@ print_scalar_formatted (const void *valaddr, struct type *type,
|
||||||
case 'c':
|
case 'c':
|
||||||
{
|
{
|
||||||
struct value_print_options opts = *options;
|
struct value_print_options opts = *options;
|
||||||
opts.format = 0;
|
|
||||||
|
|
||||||
|
opts.format = 0;
|
||||||
if (TYPE_UNSIGNED (type))
|
if (TYPE_UNSIGNED (type))
|
||||||
type = builtin_type (gdbarch)->builtin_true_unsigned_char;
|
type = builtin_type (gdbarch)->builtin_true_unsigned_char;
|
||||||
else
|
else
|
||||||
|
@ -769,6 +771,7 @@ print_address_demangle (struct gdbarch *gdbarch, CORE_ADDR addr,
|
||||||
struct ui_file *stream, int do_demangle)
|
struct ui_file *stream, int do_demangle)
|
||||||
{
|
{
|
||||||
struct value_print_options opts;
|
struct value_print_options opts;
|
||||||
|
|
||||||
get_user_print_options (&opts);
|
get_user_print_options (&opts);
|
||||||
if (addr == 0)
|
if (addr == 0)
|
||||||
{
|
{
|
||||||
|
@ -840,6 +843,7 @@ do_examine (struct format_data fmt, struct gdbarch *gdbarch, CORE_ADDR addr)
|
||||||
if (format == 's')
|
if (format == 's')
|
||||||
{
|
{
|
||||||
struct type *char_type = NULL;
|
struct type *char_type = NULL;
|
||||||
|
|
||||||
/* Search for "char16_t" or "char32_t" types or fall back to 8-bit char
|
/* Search for "char16_t" or "char32_t" types or fall back to 8-bit char
|
||||||
if type is not found. */
|
if type is not found. */
|
||||||
if (size == 'h')
|
if (size == 'h')
|
||||||
|
@ -1075,6 +1079,7 @@ set_command (char *exp, int from_tty)
|
||||||
struct expression *expr = parse_expression (exp);
|
struct expression *expr = parse_expression (exp);
|
||||||
struct cleanup *old_chain =
|
struct cleanup *old_chain =
|
||||||
make_cleanup (free_current_contents, &expr);
|
make_cleanup (free_current_contents, &expr);
|
||||||
|
|
||||||
evaluate_expression (expr);
|
evaluate_expression (expr);
|
||||||
do_cleanups (old_chain);
|
do_cleanups (old_chain);
|
||||||
}
|
}
|
||||||
|
@ -1653,6 +1658,7 @@ do_one_display (struct display *d)
|
||||||
if (d->exp == NULL)
|
if (d->exp == NULL)
|
||||||
{
|
{
|
||||||
volatile struct gdb_exception ex;
|
volatile struct gdb_exception ex;
|
||||||
|
|
||||||
TRY_CATCH (ex, RETURN_MASK_ALL)
|
TRY_CATCH (ex, RETURN_MASK_ALL)
|
||||||
{
|
{
|
||||||
innermost_block = NULL;
|
innermost_block = NULL;
|
||||||
|
@ -2253,6 +2259,7 @@ printf_command (char *arg, int from_tty)
|
||||||
/* Windows' printf does support long long, but not the usual way.
|
/* Windows' printf does support long long, but not the usual way.
|
||||||
Convert %lld to %I64d. */
|
Convert %lld to %I64d. */
|
||||||
int length_before_ll = f - last_arg - 1 - lcount;
|
int length_before_ll = f - last_arg - 1 - lcount;
|
||||||
|
|
||||||
strncpy (current_substring, last_arg, length_before_ll);
|
strncpy (current_substring, last_arg, length_before_ll);
|
||||||
strcpy (current_substring + length_before_ll, "I64");
|
strcpy (current_substring + length_before_ll, "I64");
|
||||||
current_substring[length_before_ll + 3] =
|
current_substring[length_before_ll + 3] =
|
||||||
|
@ -2264,6 +2271,7 @@ printf_command (char *arg, int from_tty)
|
||||||
{
|
{
|
||||||
/* Convert %ls or %lc to %s. */
|
/* Convert %ls or %lc to %s. */
|
||||||
int length_before_ls = f - last_arg - 2;
|
int length_before_ls = f - last_arg - 2;
|
||||||
|
|
||||||
strncpy (current_substring, last_arg, length_before_ls);
|
strncpy (current_substring, last_arg, length_before_ls);
|
||||||
strcpy (current_substring + length_before_ls, "s");
|
strcpy (current_substring + length_before_ls, "s");
|
||||||
current_substring += length_before_ls + 2;
|
current_substring += length_before_ls + 2;
|
||||||
|
@ -2284,6 +2292,7 @@ printf_command (char *arg, int from_tty)
|
||||||
while (*s != '\0')
|
while (*s != '\0')
|
||||||
{
|
{
|
||||||
char *s1;
|
char *s1;
|
||||||
|
|
||||||
if (nargs == allocated_args)
|
if (nargs == allocated_args)
|
||||||
val_args = (struct value **) xrealloc ((char *) val_args,
|
val_args = (struct value **) xrealloc ((char *) val_args,
|
||||||
(allocated_args *= 2)
|
(allocated_args *= 2)
|
||||||
|
@ -2311,12 +2320,14 @@ printf_command (char *arg, int from_tty)
|
||||||
gdb_byte *str;
|
gdb_byte *str;
|
||||||
CORE_ADDR tem;
|
CORE_ADDR tem;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
tem = value_as_address (val_args[i]);
|
tem = value_as_address (val_args[i]);
|
||||||
|
|
||||||
/* This is a %s argument. Find the length of the string. */
|
/* This is a %s argument. Find the length of the string. */
|
||||||
for (j = 0;; j++)
|
for (j = 0;; j++)
|
||||||
{
|
{
|
||||||
gdb_byte c;
|
gdb_byte c;
|
||||||
|
|
||||||
QUIT;
|
QUIT;
|
||||||
read_memory (tem + j, &c, 1);
|
read_memory (tem + j, &c, 1);
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
|
@ -2449,6 +2460,7 @@ printf_command (char *arg, int from_tty)
|
||||||
#if defined (CC_HAS_LONG_LONG) && defined (PRINTF_HAS_LONG_LONG)
|
#if defined (CC_HAS_LONG_LONG) && defined (PRINTF_HAS_LONG_LONG)
|
||||||
{
|
{
|
||||||
long long val = value_as_long (val_args[i]);
|
long long val = value_as_long (val_args[i]);
|
||||||
|
|
||||||
printf_filtered (current_substring, val);
|
printf_filtered (current_substring, val);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2458,12 +2470,14 @@ printf_command (char *arg, int from_tty)
|
||||||
case int_arg:
|
case int_arg:
|
||||||
{
|
{
|
||||||
int val = value_as_long (val_args[i]);
|
int val = value_as_long (val_args[i]);
|
||||||
|
|
||||||
printf_filtered (current_substring, val);
|
printf_filtered (current_substring, val);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case long_arg:
|
case long_arg:
|
||||||
{
|
{
|
||||||
long val = value_as_long (val_args[i]);
|
long val = value_as_long (val_args[i]);
|
||||||
|
|
||||||
printf_filtered (current_substring, val);
|
printf_filtered (current_substring, val);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2472,6 +2486,7 @@ printf_command (char *arg, int from_tty)
|
||||||
case decfloat_arg:
|
case decfloat_arg:
|
||||||
{
|
{
|
||||||
const gdb_byte *param_ptr = value_contents (val_args[i]);
|
const gdb_byte *param_ptr = value_contents (val_args[i]);
|
||||||
|
|
||||||
#if defined (PRINTF_HAS_DECFLOAT)
|
#if defined (PRINTF_HAS_DECFLOAT)
|
||||||
/* If we have native support for Decimal floating
|
/* If we have native support for Decimal floating
|
||||||
printing, handle it here. */
|
printing, handle it here. */
|
||||||
|
@ -2592,6 +2607,7 @@ printf_command (char *arg, int from_tty)
|
||||||
while (*p)
|
while (*p)
|
||||||
{
|
{
|
||||||
int is_percent = (*p == '%');
|
int is_percent = (*p == '%');
|
||||||
|
|
||||||
*fmt_p++ = *p++;
|
*fmt_p++ = *p++;
|
||||||
if (is_percent)
|
if (is_percent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -227,6 +227,7 @@ static void
|
||||||
restore_program_space (void *arg)
|
restore_program_space (void *arg)
|
||||||
{
|
{
|
||||||
struct program_space *saved_pspace = arg;
|
struct program_space *saved_pspace = arg;
|
||||||
|
|
||||||
set_current_program_space (saved_pspace);
|
set_current_program_space (saved_pspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,6 +240,7 @@ save_current_program_space (void)
|
||||||
{
|
{
|
||||||
struct cleanup *old_chain = make_cleanup (restore_program_space,
|
struct cleanup *old_chain = make_cleanup (restore_program_space,
|
||||||
current_program_space);
|
current_program_space);
|
||||||
|
|
||||||
return old_chain;
|
return old_chain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -435,6 +437,7 @@ update_address_spaces (void)
|
||||||
if (shared_aspace)
|
if (shared_aspace)
|
||||||
{
|
{
|
||||||
struct address_space *aspace = new_address_space ();
|
struct address_space *aspace = new_address_space ();
|
||||||
|
|
||||||
free_address_space (current_program_space->aspace);
|
free_address_space (current_program_space->aspace);
|
||||||
ALL_PSPACES (pspace)
|
ALL_PSPACES (pspace)
|
||||||
pspace->aspace = aspace;
|
pspace->aspace = aspace;
|
||||||
|
|
|
@ -346,6 +346,7 @@ clear_entries (struct pv_area *area)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
struct area_entry *next = e->next;
|
struct area_entry *next = e->next;
|
||||||
|
|
||||||
xfree (e);
|
xfree (e);
|
||||||
e = next;
|
e = next;
|
||||||
}
|
}
|
||||||
|
@ -468,6 +469,7 @@ pv_area_store (struct pv_area *area,
|
||||||
while (e && overlaps (area, e, offset, size))
|
while (e && overlaps (area, e, offset, size))
|
||||||
{
|
{
|
||||||
struct area_entry *next = (e->next == e) ? 0 : e->next;
|
struct area_entry *next = (e->next == e) ? 0 : e->next;
|
||||||
|
|
||||||
e->prev->next = e->next;
|
e->prev->next = e->next;
|
||||||
e->next->prev = e->prev;
|
e->next->prev = e->prev;
|
||||||
|
|
||||||
|
@ -492,6 +494,7 @@ pv_area_store (struct pv_area *area,
|
||||||
{
|
{
|
||||||
CORE_ADDR offset = addr.k;
|
CORE_ADDR offset = addr.k;
|
||||||
struct area_entry *e = (struct area_entry *) xmalloc (sizeof (*e));
|
struct area_entry *e = (struct area_entry *) xmalloc (sizeof (*e));
|
||||||
|
|
||||||
e->offset = offset;
|
e->offset = offset;
|
||||||
e->size = size;
|
e->size = size;
|
||||||
e->value = value;
|
e->value = value;
|
||||||
|
|
|
@ -236,6 +236,7 @@ find_pc_sect_psymtab (struct objfile *objfile, CORE_ADDR pc,
|
||||||
if (overlay_debugging && msymbol && section)
|
if (overlay_debugging && msymbol && section)
|
||||||
{
|
{
|
||||||
struct partial_symbol *p;
|
struct partial_symbol *p;
|
||||||
|
|
||||||
/* NOTE: This assumes that every psymbol has a
|
/* NOTE: This assumes that every psymbol has a
|
||||||
corresponding msymbol, which is not necessarily
|
corresponding msymbol, which is not necessarily
|
||||||
true; the debug info might be much richer than the
|
true; the debug info might be much richer than the
|
||||||
|
@ -518,6 +519,7 @@ psymtab_to_symtab (struct partial_symtab *pst)
|
||||||
if (!pst->readin)
|
if (!pst->readin)
|
||||||
{
|
{
|
||||||
struct cleanup *back_to = increment_reading_symtab ();
|
struct cleanup *back_to = increment_reading_symtab ();
|
||||||
|
|
||||||
(*pst->read_symtab) (pst);
|
(*pst->read_symtab) (pst);
|
||||||
do_cleanups (back_to);
|
do_cleanups (back_to);
|
||||||
}
|
}
|
||||||
|
@ -569,6 +571,7 @@ find_last_source_symtab_from_partial (struct objfile *ofp)
|
||||||
{
|
{
|
||||||
const char *name = ps->filename;
|
const char *name = ps->filename;
|
||||||
int len = strlen (name);
|
int len = strlen (name);
|
||||||
|
|
||||||
if (!(len > 2 && (strcmp (&name[len - 2], ".h") == 0
|
if (!(len > 2 && (strcmp (&name[len - 2], ".h") == 0
|
||||||
|| strcmp (name, "<<C++-namespaces>>") == 0)))
|
|| strcmp (name, "<<C++-namespaces>>") == 0)))
|
||||||
cs_pst = ps;
|
cs_pst = ps;
|
||||||
|
@ -768,6 +771,7 @@ print_psymtab_stats_for_objfile (struct objfile *objfile)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct partial_symtab *ps;
|
struct partial_symtab *ps;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
ALL_OBJFILE_PSYMTABS (objfile, ps)
|
ALL_OBJFILE_PSYMTABS (objfile, ps)
|
||||||
{
|
{
|
||||||
|
@ -854,6 +858,7 @@ map_symbol_names_psymtab (struct objfile *objfile,
|
||||||
void (*fun) (const char *, void *), void *data)
|
void (*fun) (const char *, void *), void *data)
|
||||||
{
|
{
|
||||||
struct partial_symtab *ps;
|
struct partial_symtab *ps;
|
||||||
|
|
||||||
ALL_OBJFILE_PSYMTABS (objfile, ps)
|
ALL_OBJFILE_PSYMTABS (objfile, ps)
|
||||||
{
|
{
|
||||||
struct partial_symbol **psym;
|
struct partial_symbol **psym;
|
||||||
|
@ -991,12 +996,14 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
|
||||||
if (global)
|
if (global)
|
||||||
{
|
{
|
||||||
int U;
|
int U;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
U = length - 1;
|
U = length - 1;
|
||||||
while (U - i > 4)
|
while (U - i > 4)
|
||||||
{
|
{
|
||||||
int M = (U + i) >> 1;
|
int M = (U + i) >> 1;
|
||||||
struct partial_symbol *psym = start[M];
|
struct partial_symbol *psym = start[M];
|
||||||
|
|
||||||
if (SYMBOL_LINKAGE_NAME (psym)[0] < name[0])
|
if (SYMBOL_LINKAGE_NAME (psym)[0] < name[0])
|
||||||
i = M + 1;
|
i = M + 1;
|
||||||
else if (SYMBOL_LINKAGE_NAME (psym)[0] > name[0])
|
else if (SYMBOL_LINKAGE_NAME (psym)[0] > name[0])
|
||||||
|
@ -1035,12 +1042,14 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
|
||||||
if (global)
|
if (global)
|
||||||
{
|
{
|
||||||
int U;
|
int U;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
U = length - 1;
|
U = length - 1;
|
||||||
while (U - i > 4)
|
while (U - i > 4)
|
||||||
{
|
{
|
||||||
int M = (U + i) >> 1;
|
int M = (U + i) >> 1;
|
||||||
struct partial_symbol *psym = start[M];
|
struct partial_symbol *psym = start[M];
|
||||||
|
|
||||||
if (SYMBOL_LINKAGE_NAME (psym)[0] < '_')
|
if (SYMBOL_LINKAGE_NAME (psym)[0] < '_')
|
||||||
i = M + 1;
|
i = M + 1;
|
||||||
else if (SYMBOL_LINKAGE_NAME (psym)[0] > '_')
|
else if (SYMBOL_LINKAGE_NAME (psym)[0] > '_')
|
||||||
|
@ -1106,6 +1115,7 @@ map_ada_symtabs (struct objfile *objfile,
|
||||||
wild_match, is_name_suffix))
|
wild_match, is_name_suffix))
|
||||||
{
|
{
|
||||||
struct symtab *s = PSYMTAB_TO_SYMTAB (ps);
|
struct symtab *s = PSYMTAB_TO_SYMTAB (ps);
|
||||||
|
|
||||||
if (s == NULL || !s->primary)
|
if (s == NULL || !s->primary)
|
||||||
continue;
|
continue;
|
||||||
(*callback) (objfile, s, data);
|
(*callback) (objfile, s, data);
|
||||||
|
@ -1456,6 +1466,7 @@ extend_psymbol_list (struct psymbol_allocation_list *listp,
|
||||||
struct objfile *objfile)
|
struct objfile *objfile)
|
||||||
{
|
{
|
||||||
int new_size;
|
int new_size;
|
||||||
|
|
||||||
if (listp->size == 0)
|
if (listp->size == 0)
|
||||||
{
|
{
|
||||||
new_size = 255;
|
new_size = 255;
|
||||||
|
@ -1641,6 +1652,7 @@ maintenance_check_symtabs (char *ignore, int from_tty)
|
||||||
ALL_PSYMTABS (objfile, ps)
|
ALL_PSYMTABS (objfile, ps)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||||
|
|
||||||
s = PSYMTAB_TO_SYMTAB (ps);
|
s = PSYMTAB_TO_SYMTAB (ps);
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue