/* When arguments must be pushed onto the stack, they go on in reverse
order. The code below implements a FILO (stack) to do this. */
-struct stack_item
+struct arm_stack_item
{
int len;
- struct stack_item *prev;
+ struct arm_stack_item *prev;
gdb_byte *data;
};
-static struct stack_item *
-push_stack_item (struct stack_item *prev, const gdb_byte *contents, int len)
+static struct arm_stack_item *
+push_stack_item (struct arm_stack_item *prev, const gdb_byte *contents,
+ int len)
{
- struct stack_item *si;
- si = XNEW (struct stack_item);
+ struct arm_stack_item *si;
+ si = XNEW (struct arm_stack_item);
si->data = (gdb_byte *) xmalloc (len);
si->len = len;
si->prev = prev;
return si;
}
-static struct stack_item *
-pop_stack_item (struct stack_item *si)
+static struct arm_stack_item *
+pop_stack_item (struct arm_stack_item *si)
{
- struct stack_item *dead = si;
+ struct arm_stack_item *dead = si;
si = si->prev;
xfree (dead->data);
xfree (dead);
int argnum;
int argreg;
int nstack;
- struct stack_item *si = NULL;
+ struct arm_stack_item *si = NULL;
int use_vfp_abi;
struct type *ftype;
unsigned vfp_regs_free = (1 << 16) - 1;
/* When arguments must be pushed onto the stack, they go on in reverse
order. The below implements a FILO (stack) to do this. */
-struct stack_item
+struct avr_stack_item
{
int len;
- struct stack_item *prev;
+ struct avr_stack_item *prev;
gdb_byte *data;
};
-static struct stack_item *
-push_stack_item (struct stack_item *prev, const bfd_byte *contents, int len)
+static struct avr_stack_item *
+push_stack_item (struct avr_stack_item *prev, const bfd_byte *contents,
+ int len)
{
- struct stack_item *si;
- si = XNEW (struct stack_item);
+ struct avr_stack_item *si;
+ si = XNEW (struct avr_stack_item);
si->data = (gdb_byte *) xmalloc (len);
si->len = len;
si->prev = prev;
return si;
}
-static struct stack_item *pop_stack_item (struct stack_item *si);
-static struct stack_item *
-pop_stack_item (struct stack_item *si)
+static struct avr_stack_item *
+pop_stack_item (struct avr_stack_item *si)
{
- struct stack_item *dead = si;
+ struct avr_stack_item *dead = si;
si = si->prev;
xfree (dead->data);
xfree (dead);
int call_length = tdep->call_length;
CORE_ADDR return_pc = avr_convert_iaddr_to_raw (bp_addr);
int regnum = AVR_ARGN_REGNUM;
- struct stack_item *si = NULL;
+ struct avr_stack_item *si = NULL;
if (return_method == return_method_struct)
{
order. The below implements a FILO (stack) to do this.
Copied from d10v-tdep.c. */
-struct stack_item
+struct cris_stack_item
{
int len;
- struct stack_item *prev;
+ struct cris_stack_item *prev;
gdb_byte *data;
};
-static struct stack_item *
-push_stack_item (struct stack_item *prev, const gdb_byte *contents, int len)
+static struct cris_stack_item *
+push_stack_item (struct cris_stack_item *prev, const gdb_byte *contents,
+ int len)
{
- struct stack_item *si = XNEW (struct stack_item);
+ struct cris_stack_item *si = XNEW (struct cris_stack_item);
si->data = (gdb_byte *) xmalloc (len);
si->len = len;
si->prev = prev;
return si;
}
-static struct stack_item *
-pop_stack_item (struct stack_item *si)
+static struct cris_stack_item *
+pop_stack_item (struct cris_stack_item *si)
{
- struct stack_item *dead = si;
+ struct cris_stack_item *dead = si;
si = si->prev;
xfree (dead->data);
xfree (dead);
int argreg;
int argnum;
- struct stack_item *si = NULL;
+ struct cris_stack_item *si = NULL;
/* Push the return address. */
regcache_cooked_write_unsigned (regcache, SRP_REGNUM, bp_addr);
/* Data structure to marshall items in a dummy stack frame when
calling a function in the inferior. */
-struct stack_item
+struct csky_stack_item
{
- stack_item (int len_, const gdb_byte *data_)
+ csky_stack_item (int len_, const gdb_byte *data_)
: len (len_), data (data_)
{}
int argreg = CSKY_ABI_A0_REGNUM;
int last_arg_regnum = CSKY_ABI_LAST_ARG_REGNUM;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- std::vector<stack_item> stack_items;
+ std::vector<csky_stack_item> stack_items;
/* Set the return address. For CSKY, the return breakpoint is
always at BP_ADDR. */
}
/* Transfer the dummy stack frame to the target. */
- std::vector<stack_item>::reverse_iterator iter;
+ std::vector<csky_stack_item>::reverse_iterator iter;
for (iter = stack_items.rbegin (); iter != stack_items.rend (); ++iter)
{
sp -= iter->len;