* frame.c (get_frame_register_bytes): Avoid excessive function calls.
This commit is contained in:
parent
45ef8ce0c5
commit
68e007ca21
|
@ -1,7 +1,7 @@
|
||||||
2008-09-24 Andreas Schwab <schwab@suse.de>
|
2008-09-24 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
* frame.c (get_frame_register_bytes): Take pseudo registers into
|
* frame.c (get_frame_register_bytes): Take pseudo registers into
|
||||||
account.
|
account. Avoid excessive function calls.
|
||||||
|
|
||||||
2008-09-23 Doug Evans <dje@google.com>
|
2008-09-23 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
|
|
|
@ -798,6 +798,7 @@ get_frame_register_bytes (struct frame_info *frame, int regnum,
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||||
int i;
|
int i;
|
||||||
int maxsize;
|
int maxsize;
|
||||||
|
int numregs;
|
||||||
|
|
||||||
/* Skip registers wholly inside of OFFSET. */
|
/* Skip registers wholly inside of OFFSET. */
|
||||||
while (offset >= register_size (gdbarch, regnum))
|
while (offset >= register_size (gdbarch, regnum))
|
||||||
|
@ -809,8 +810,8 @@ get_frame_register_bytes (struct frame_info *frame, int regnum,
|
||||||
/* Ensure that we will not read beyond the end of the register file.
|
/* Ensure that we will not read beyond the end of the register file.
|
||||||
This can only ever happen if the debug information is bad. */
|
This can only ever happen if the debug information is bad. */
|
||||||
maxsize = -offset;
|
maxsize = -offset;
|
||||||
for (i = regnum;
|
numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
|
||||||
i < gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch); i++)
|
for (i = regnum; i < numregs; i++)
|
||||||
{
|
{
|
||||||
int thissize = register_size (gdbarch, i);
|
int thissize = register_size (gdbarch, i);
|
||||||
if (thissize == 0)
|
if (thissize == 0)
|
||||||
|
|
Loading…
Reference in New Issue