projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set executable bit on analyze-racy-logs.py
[deliverable/binutils-gdb.git]
/
gdb
/
avr-tdep.c
diff --git
a/gdb/avr-tdep.c
b/gdb/avr-tdep.c
index 4fcae530f51f23edf6562d3cd1f25b18b607235f..088fe51b4c0ebb77a40ab594e94a031c81185ae9 100644
(file)
--- a/
gdb/avr-tdep.c
+++ b/
gdb/avr-tdep.c
@@
-1,6
+1,6
@@
/* Target-dependent code for Atmel AVR, for GDB.
/* Target-dependent code for Atmel AVR, for GDB.
- Copyright (C) 1996-201
5
Free Software Foundation, Inc.
+ Copyright (C) 1996-201
6
Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-111,6
+111,7
@@
enum
AVR_ARG1_REGNUM = 24, /* Single byte argument */
AVR_ARGN_REGNUM = 25, /* Multi byte argments */
AVR_ARG1_REGNUM = 24, /* Single byte argument */
AVR_ARGN_REGNUM = 25, /* Multi byte argments */
+ AVR_LAST_ARG_REGNUM = 8, /* Last argument register */
AVR_RET1_REGNUM = 24, /* Single byte return value */
AVR_RETN_REGNUM = 25, /* Multi byte return value */
AVR_RET1_REGNUM = 24, /* Single byte return value */
AVR_RETN_REGNUM = 25, /* Multi byte return value */
@@
-1198,7
+1199,7
@@
struct stack_item
{
int len;
struct stack_item *prev;
{
int len;
struct stack_item *prev;
-
void
*data;
+
gdb_byte
*data;
};
static struct stack_item *
};
static struct stack_item *
@@
-1206,7
+1207,7
@@
push_stack_item (struct stack_item *prev, const bfd_byte *contents, int len)
{
struct stack_item *si;
si = XNEW (struct stack_item);
{
struct stack_item *si;
si = XNEW (struct stack_item);
- si->data = xmalloc (len);
+ si->data =
(gdb_byte *)
xmalloc (len);
si->len = len;
si->prev = prev;
memcpy (si->data, contents, len);
si->len = len;
si->prev = prev;
memcpy (si->data, contents, len);
@@
-1298,23
+1299,24
@@
avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
const bfd_byte *contents = value_contents (arg);
int len = TYPE_LENGTH (type);
const bfd_byte *contents = value_contents (arg);
int len = TYPE_LENGTH (type);
- /* Calculate the potential last register needed. */
- last_regnum = regnum - (len + (len & 1));
+ /* Calculate the potential last register needed.
+ E.g. For length 2, registers regnum and regnum-1 (say 25 and 24)
+ shall be used. So, last needed register will be regnum-1(24). */
+ last_regnum = regnum - (len + (len & 1)) + 1;
/* If there are registers available, use them. Once we start putting
stuff on the stack, all subsequent args go on stack. */
/* If there are registers available, use them. Once we start putting
stuff on the stack, all subsequent args go on stack. */
- if ((si == NULL) && (last_regnum >=
8
))
+ if ((si == NULL) && (last_regnum >=
AVR_LAST_ARG_REGNUM
))
{
{
- ULONGEST val;
-
/* Skip a register for odd length args. */
if (len & 1)
regnum--;
/* Skip a register for odd length args. */
if (len & 1)
regnum--;
- val = extract_unsigned_integer (contents, len, byte_order);
+ /* Write MSB of argument into register and subsequent bytes in
+ decreasing register numbers. */
for (j = 0; j < len; j++)
regcache_cooked_write_unsigned
for (j = 0; j < len; j++)
regcache_cooked_write_unsigned
- (regcache, regnum--,
val >> (8 * (len - j - 1))
);
+ (regcache, regnum--,
contents[len - j - 1]
);
}
/* No registers available, push the args onto the stack. */
else
}
/* No registers available, push the args onto the stack. */
else
@@
-1364,9
+1366,6
@@
avr_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
return reg;
if (reg == 32)
return AVR_SP_REGNUM;
return reg;
if (reg == 32)
return AVR_SP_REGNUM;
-
- warning (_("Unmapped DWARF Register #%d encountered."), reg);
-
return -1;
}
return -1;
}
@@
-1635,7
+1634,6
@@
_initialize_avr_tdep (void)
/* FIXME: TRoth/2002-02-18: This should probably be changed to 'info avr
io_registers' to signify it is not available on other platforms. */
/* FIXME: TRoth/2002-02-18: This should probably be changed to 'info avr
io_registers' to signify it is not available on other platforms. */
- add_cmd ("io_registers", class_info, avr_io_reg_read_command,
- _("query remote avr target for io space register values"),
- &infolist);
+ add_info ("io_registers", avr_io_reg_read_command,
+ _("query remote avr target for io space register values"));
}
}
This page took
0.024696 seconds
and
4
git commands to generate.