1 /* Target-dependent code for OSF/1 on Alpha.
2 Copyright (C) 2002, 2003, 2007, 2008 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
24 #include "gdb_string.h"
27 #include "alpha-tdep.h"
30 alpha_osf1_pc_in_sigtramp (CORE_ADDR pc
, char *func_name
)
32 return (func_name
!= NULL
&& strcmp ("__sigtramp", func_name
) == 0);
36 alpha_osf1_sigcontext_addr (struct frame_info
*next_frame
)
38 const struct frame_id next_id
= get_frame_id (next_frame
);
40 return (read_memory_integer (next_id
.stack_addr
, 8));
44 alpha_osf1_init_abi (struct gdbarch_info info
,
45 struct gdbarch
*gdbarch
)
47 struct gdbarch_tdep
*tdep
= gdbarch_tdep (gdbarch
);
49 /* Hook into the MDEBUG frame unwinder. */
50 alpha_mdebug_init_abi (info
, gdbarch
);
52 /* The next/step support via procfs on OSF1 is broken when running
53 on multi-processor machines. We need to use software single stepping
55 set_gdbarch_software_single_step (gdbarch
, alpha_software_single_step
);
57 tdep
->sigcontext_addr
= alpha_osf1_sigcontext_addr
;
58 tdep
->pc_in_sigtramp
= alpha_osf1_pc_in_sigtramp
;
61 tdep
->jb_elt_size
= 8;
65 _initialize_alpha_osf1_tdep (void)
67 gdbarch_register_osabi (bfd_arch_alpha
, 0, GDB_OSABI_OSF1
,