gdb
[deliverable/binutils-gdb.git] / gdb / prologue-value.c
index 8d288385d3dc49acae3a12263e15eb348293ae2e..f1dd2bb0ad13bc795bfb06910c3bd9dcbbf148d6 100644 (file)
@@ -1,5 +1,6 @@
 /* Prologue value handling for GDB.
-   Copyright 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright 2003, 2004, 2005, 2007, 2008, 2009, 2010
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -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");
     }
 }
 
@@ -314,7 +315,7 @@ struct pv_area
 
 
 struct pv_area *
-make_pv_area (int base_reg)
+make_pv_area (int base_reg, int addr_bit)
 {
   struct pv_area *a = (struct pv_area *) xmalloc (sizeof (*a));
 
@@ -325,8 +326,7 @@ make_pv_area (int base_reg)
 
   /* Remember that shift amounts equal to the type's width are
      undefined.  */
-  a->addr_mask = ((((CORE_ADDR) 1
-                  << (gdbarch_addr_bit (current_gdbarch) - 1)) - 1) << 1) | 1;
+  a->addr_mask = ((((CORE_ADDR) 1 << (addr_bit - 1)) - 1) << 1) | 1;
 
   return a;
 }
@@ -346,6 +346,7 @@ clear_entries (struct pv_area *area)
       do
         {
           struct area_entry *next = e->next;
+
           xfree (e);
           e = next;
         }
@@ -468,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;
 
@@ -492,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;
This page took 0.023709 seconds and 4 git commands to generate.