aboutsummaryrefslogtreecommitdiff
path: root/gdb/avr-tdep.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2010-02-17 10:39:10 +0000
committerTristan Gingold <gingold@adacore.com>2010-02-17 10:39:10 +0000
commit243e2c5d0a828e6e461f8ee23cb613c1dff55a35 (patch)
tree56b2c0af22c1b754e9e000fc21adef41620a6766 /gdb/avr-tdep.c
parent444a144ff432d54b9c14450a0b398f91bf1bbb1c (diff)
downloadgdb-243e2c5d0a828e6e461f8ee23cb613c1dff55a35.zip
gdb-243e2c5d0a828e6e461f8ee23cb613c1dff55a35.tar.gz
gdb-243e2c5d0a828e6e461f8ee23cb613c1dff55a35.tar.bz2
2010-02-17 Tristan Gingold <gingold@adacore.com>
Petr HluzĂ­<petr.hluzin@gmail.com> * avr-tdep.c (avr_scan_prologue): Convert an if statement to a gdb_assert. Fix info->size for SIG prologue.
Diffstat (limited to 'gdb/avr-tdep.c')
-rw-r--r--gdb/avr-tdep.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 3b16585..ef7d2a7 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -686,7 +686,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
info->saved_regs[AVR_SREG_REGNUM].addr = 3;
info->saved_regs[0].addr = 2;
info->saved_regs[1].addr = 1;
- info->size += 3;
+ info->size += 2;
}
}
@@ -708,9 +708,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
break;
}
- if (vpc >= AVR_MAX_PROLOGUE_SIZE)
- fprintf_unfiltered (gdb_stderr,
- _("Hit end of prologue while scanning pushes\n"));
+ gdb_assert (vpc < AVR_MAX_PROLOGUE_SIZE);
/* Handle static small stack allocation using rcall or push. */