daily update
[external/binutils.git] / gdb / amd64obsd-tdep.c
index 17c7219..2460e00 100644 (file)
@@ -1,12 +1,12 @@
 /* Target-dependent code for OpenBSD/amd64.
 
-   Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -15,9 +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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "frame.h"
@@ -356,7 +354,9 @@ amd64obsd_trapframe_cache(struct frame_info *next_frame, void **this_cache)
   cache = trad_frame_cache_zalloc (next_frame);
   *this_cache = cache;
 
-  func = frame_func_unwind (next_frame);
+  /* NORMAL_FRAME matches the type in amd64obsd_trapframe_unwind, but
+     SIGTRAMP_FRAME might be more appropriate.  */
+  func = frame_func_unwind (next_frame, NORMAL_FRAME);
   sp = frame_unwind_register_unsigned (next_frame, AMD64_RSP_REGNUM);
 
   find_pc_partial_function (func, &name, NULL, NULL);
@@ -418,7 +418,7 @@ amd64obsd_trapframe_sniffer (const struct frame_unwind *self,
   ULONGEST cs;
   char *name;
 
-  /* Check Current Privilige Level and bail out if we're not executing
+  /* Check Current Privilege Level and bail out if we're not executing
      in kernel space.  */
   cs = frame_unwind_register_unsigned (next_frame, AMD64_CS_REGNUM);
   if ((cs & I386_SEL_RPL) == I386_SEL_UPL)