1 /* Kernel core dump functions below target vector, for GDB on FreeBSD/Alpha.
2 Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995
3 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 __FBSDID("$FreeBSD$");
24 #include "alpha/tm-alpha.h"
27 #define S0_REGNUM (T7_REGNUM+1)
31 fetch_kcore_registers (struct pcb *pcbp)
34 /* First clear out any garbage. */
35 memset (registers, '\0', REGISTER_BYTES);
38 *(long *) ®isters[REGISTER_BYTE (SP_REGNUM)] =
39 pcbp->pcb_hw.apcb_ksp;
42 memcpy (®isters[REGISTER_BYTE (S0_REGNUM)],
43 &pcbp->pcb_context[0], 7 * sizeof (long));
46 *(long *) ®isters[REGISTER_BYTE (PC_REGNUM)] =
53 fbsd_kern_frame_saved_pc (struct frame_info *fi)
55 struct minimal_symbol *sym;
56 CORE_ADDR this_saved_pc;
58 this_saved_pc = alpha_frame_saved_pc (fi);
60 sym = lookup_minimal_symbol_by_pc (this_saved_pc);
63 (strcmp (SYMBOL_NAME (sym), "XentArith") == 0 ||
64 strcmp (SYMBOL_NAME (sym), "XentIF") == 0 ||
65 strcmp (SYMBOL_NAME (sym), "XentInt") == 0 ||
66 strcmp (SYMBOL_NAME (sym), "XentMM") == 0 ||
67 strcmp (SYMBOL_NAME (sym), "XentSys") == 0 ||
68 strcmp (SYMBOL_NAME (sym), "XentUna") == 0 ||
69 strcmp (SYMBOL_NAME (sym), "XentRestart") == 0))
71 return (read_memory_integer (fi->frame + 32 * 8, 8));
75 return (this_saved_pc);