From 243e2c5d0a828e6e461f8ee23cb613c1dff55a35 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 17 Feb 2010 10:39:10 +0000 Subject: [PATCH] =?utf8?q?2010-02-17=20=20Tristan=20Gingold=20=20=20=09=20=20=20=20Petr=20Hluz=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * avr-tdep.c (avr_scan_prologue): Convert an if statement to a gdb_assert. Fix info->size for SIG prologue. --- gdb/ChangeLog | 6 ++++++ gdb/avr-tdep.c | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 077528a1ed1..d62be6a0cf0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-02-17 Tristan Gingold + Petr Hluzín + + * avr-tdep.c (avr_scan_prologue): Convert an if statement to a + gdb_assert. Fix info->size for SIG prologue. + 2010-02-16 Daniel Jacobowitz * infcmd.c (show_inferior_tty_command): Check for NULL. diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 3b165859914..ef7d2a71068 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. */ -- 2.30.2