X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fprologue-value.c;h=07047875811f3009f4270f771017555ae6a7a679;hb=7230378dfd17300cd58e07acda312299f6bd1936;hp=e4282e648df076f1485b96ba1566e8344ebe439a;hpb=55f960e1d2e58215a0c274e8d30e6036c96a2959;p=deliverable%2Fbinutils-gdb.git
diff --git a/gdb/prologue-value.c b/gdb/prologue-value.c
index e4282e648d..0704787581 100644
--- a/gdb/prologue-value.c
+++ b/gdb/prologue-value.c
@@ -1,5 +1,6 @@
/* Prologue value handling for GDB.
- Copyright 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -14,7 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see . */
+ along with this program. If not, see . */
#include "defs.h"
#include "gdb_string.h"
@@ -202,7 +203,7 @@ pv_is_identical (pv_t a, pv_t b)
case pvk_register:
return (a.reg == b.reg && a.k == b.k);
default:
- gdb_assert (0);
+ gdb_assert_not_reached ("unexpected prologue value kind");
}
}
@@ -345,6 +346,7 @@ clear_entries (struct pv_area *area)
do
{
struct area_entry *next = e->next;
+
xfree (e);
e = next;
}
@@ -397,7 +399,7 @@ pv_area_store_would_trash (struct pv_area *area, pv_t addr)
This may return zero, if AREA has no entries.
And since the entries are a ring, this may return an entry that
- entirely preceeds OFFSET. This is the correct behavior: depending
+ entirely precedes OFFSET. This is the correct behavior: depending
on the sizes involved, we could still overlap such an area, with
wrap-around. */
static struct area_entry *
@@ -467,6 +469,7 @@ pv_area_store (struct pv_area *area,
while (e && overlaps (area, e, offset, size))
{
struct area_entry *next = (e->next == e) ? 0 : e->next;
+
e->prev->next = e->next;
e->next->prev = e->prev;
@@ -491,6 +494,7 @@ pv_area_store (struct pv_area *area,
{
CORE_ADDR offset = addr.k;
struct area_entry *e = (struct area_entry *) xmalloc (sizeof (*e));
+
e->offset = offset;
e->size = size;
e->value = value;