* findcmd.c: White space.
* findvar.c: White space.
* fork-child.c: White space.
* frame-base.c: White space.
* frame.c: White space.
* frame-unwind.c: White space.
* f-valprint.c: White space.
2010-05-14 Michael Snyder <msnyder@vmware.com>
+ * findcmd.c: White space.
+ * findvar.c: White space.
+ * fork-child.c: White space.
+ * frame-base.c: White space.
+ * frame.c: White space.
+ * frame-unwind.c: White space.
+ * f-valprint.c: White space.
+
* elfread.c: White space.
* environ.c: White space.
* eval.c: White space.
{
CORE_ADDR addr
= extract_typed_address (valaddr + embedded_offset, type);
+
fprintf_filtered (stream, "@");
fputs_filtered (paddress (gdbarch, addr), stream);
if (options->deref_ref)
if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
{
struct value *deref_val =
- value_at
- (TYPE_TARGET_TYPE (type),
- unpack_pointer (type, valaddr + embedded_offset));
+ value_at
+ (TYPE_TARGET_TYPE (type),
+ unpack_pointer (type, valaddr + embedded_offset));
+
common_val_print (deref_val, stream, recurse,
options, current_language);
}
if (options->format || options->output_format)
{
struct value_print_options opts = *options;
+
opts.format = (options->format ? options->format
: options->output_format);
print_scalar_formatted (valaddr, type, &opts, 0, stream);
if (options->format || options->output_format)
{
struct value_print_options opts = *options;
+
opts.format = (options->format ? options->format
: options->output_format);
print_scalar_formatted (valaddr, type, &opts, 0, stream);
for (index = 0; index < TYPE_NFIELDS (type); index++)
{
int offset = TYPE_FIELD_BITPOS (type, index) / 8;
+
f_val_print (TYPE_FIELD_TYPE (type, index), valaddr + offset,
embedded_offset, address, stream, recurse, options);
if (index != TYPE_NFIELDS (type) - 1)
else
{
struct minimal_symbol *msymbol =
- lookup_minimal_symbol_by_pc (get_frame_pc (fi));
+ lookup_minimal_symbol_by_pc (get_frame_pc (fi));
if (msymbol != NULL)
funname = SYMBOL_LINKAGE_NAME (msymbol);
else
{
struct minimal_symbol *msymbol =
- lookup_minimal_symbol_by_pc (fi->pc);
+ lookup_minimal_symbol_by_pc (fi->pc);
if (msymbol != NULL)
funname = SYMBOL_LINKAGE_NAME (msymbol);
if (*s == '+')
{
LONGEST len;
+
++s;
v = parse_to_comma_and_eval (&s);
len = value_as_long (v);
else
{
CORE_ADDR end_addr;
+
v = parse_to_comma_and_eval (&s);
end_addr = value_as_address (v);
if (start_addr > end_addr)
> pattern_buf_size)
{
size_t current_offset = pattern_buf_end - pattern_buf;
+
pattern_buf_size *= 2;
pattern_buf = xrealloc (pattern_buf, pattern_buf_size);
pattern_buf_end = pattern_buf + current_offset;
if (found_count > 0)
{
struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
+
set_internalvar (lookup_internalvar ("_"),
value_from_pointer (ptr_type, last_found_addr));
}
struct type *type, const gdb_byte *buf)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+
return extract_unsigned_integer (buf, TYPE_LENGTH (type), byte_order);
}
struct type *type, const gdb_byte *buf)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+
return extract_signed_integer (buf, TYPE_LENGTH (type), byte_order);
}
gdb_byte *buf, CORE_ADDR addr)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+
store_unsigned_integer (buf, TYPE_LENGTH (type), byte_order, addr);
}
gdb_byte *buf, CORE_ADDR addr)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+
store_signed_integer (buf, TYPE_LENGTH (type), byte_order, addr);
}
\f
CORE_ADDR addr
= symbol_overlayed_address (SYMBOL_VALUE_ADDRESS (var),
SYMBOL_OBJ_SECTION (var));
+
store_typed_address (value_contents_raw (v), type, addr);
}
else
return v;
case LOC_CONST_BYTES:
- {
- memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var), len);
- VALUE_LVAL (v) = not_lval;
- return v;
- }
+ memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var), len);
+ VALUE_LVAL (v) = not_lval;
+ return v;
case LOC_STATIC:
if (overlay_debugging)
{
struct value *ref;
CORE_ADDR argref;
+
argref = get_frame_args_address (frame);
if (!argref)
return 0;
assuming that every other character is a separate
argument. */
int argc = (strlen (allargs) + 1) / 2 + 2;
+
argv = (char **) xmalloc (argc * sizeof (*argv));
argv[0] = exec_file;
breakup_args (allargs, &argv[1]);
{
struct frame_base_table *table
= OBSTACK_ZALLOC (obstack, struct frame_base_table);
+
table->tail = &table->head;
table->default_base = &default_frame_base;
return table;
frame_base_sniffer_ftype *sniffer)
{
struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+
(*table->tail) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base_table_entry);
(*table->tail)->sniffer = sniffer;
table->tail = &(*table->tail)->next;
const struct frame_base *default_base)
{
struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+
table->default_base = default_base;
}
for (entry = table->head; entry != NULL; entry = entry->next)
{
const struct frame_base *desc = NULL;
+
desc = entry->sniffer (this_frame);
if (desc != NULL)
return desc;
{
struct frame_unwind_table *table
= OBSTACK_ZALLOC (obstack, struct frame_unwind_table);
+
/* Start the table out with a few default sniffers. OSABI code
can't override this. */
table->list = OBSTACK_ZALLOC (obstack, struct frame_unwind_table_entry);
for (frame = get_current_frame (); ; frame = prev_frame)
{
struct frame_id this = get_frame_id (frame);
+
if (frame_id_eq (id, this))
/* An exact match. */
return frame;
if (!this_frame->prev_pc.p)
{
CORE_ADDR pc;
+
if (gdbarch_unwind_pc_p (frame_unwind_arch (this_frame)))
{
/* The right way. The `pure' way. The one true way. This
/* FIXME: write_memory doesn't yet take constant buffers.
Arrrg! */
gdb_byte tmp[MAX_REGISTER_SIZE];
+
memcpy (tmp, buf, register_size (gdbarch, regnum));
write_memory (addr, tmp, register_size (gdbarch, regnum));
break;
for (i = regnum; i < numregs; i++)
{
int thissize = register_size (gdbarch, i);
+
if (thissize == 0)
break; /* This register is not available on this architecture. */
maxsize += thissize;
while (len > 0)
{
int curr_len = register_size (gdbarch, regnum) - offset;
+
if (curr_len > len)
curr_len = len;
else
{
gdb_byte buf[MAX_REGISTER_SIZE];
+
if (!frame_register_read (frame, regnum, buf))
return 0;
memcpy (myaddr, buf + offset, curr_len);
while (len > 0)
{
int curr_len = register_size (gdbarch, regnum) - offset;
+
if (curr_len > len)
curr_len = len;
else
{
gdb_byte buf[MAX_REGISTER_SIZE];
+
frame_register_read (frame, regnum, buf);
memcpy (buf + offset, myaddr, curr_len);
put_frame_register (frame, regnum, buf);