2007-06-13 Mike Frysinger <vapier@gentoo.org>
[deliverable/binutils-gdb.git] / gdb / alpha-osf1-tdep.c
CommitLineData
36a6271d 1/* Target-dependent code for OSF/1 on Alpha.
6aba47ca 2 Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
36a6271d
JT
3
4 This file is part of GDB.
5
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 2 of the License, or
9 (at your option) any later version.
10
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.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
197e01b6
EZ
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
36a6271d
JT
20
21#include "defs.h"
22#include "frame.h"
5868c862 23#include "gdbcore.h"
36a6271d 24#include "value.h"
4be87837 25#include "osabi.h"
4c2e2391 26#include "gdb_string.h"
9798ab0d 27#include "objfiles.h"
36a6271d
JT
28
29#include "alpha-tdep.h"
30
6c72f9f9
JT
31static int
32alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
33{
bde58177 34 return (func_name != NULL && strcmp ("__sigtramp", func_name) == 0);
6c72f9f9
JT
35}
36
5868c862 37static CORE_ADDR
a99b228b 38alpha_osf1_sigcontext_addr (struct frame_info *next_frame)
5868c862 39{
a99b228b 40 const struct frame_id next_id = get_frame_id (next_frame);
37bb6d9f 41
a99b228b 42 return (read_memory_integer (next_id.stack_addr, 8));
5868c862
JT
43}
44
36a6271d
JT
45static void
46alpha_osf1_init_abi (struct gdbarch_info info,
47 struct gdbarch *gdbarch)
48{
49 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
50
0bd79c5c
JB
51 /* Hook into the MDEBUG frame unwinder. */
52 alpha_mdebug_init_abi (info, gdbarch);
53
c8edd8b4
JB
54 /* The next/step support via procfs on OSF1 is broken when running
55 on multi-processor machines. We need to use software single stepping
56 instead. */
57 set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
6c72f9f9 58
5868c862 59 tdep->sigcontext_addr = alpha_osf1_sigcontext_addr;
f2524b93 60 tdep->pc_in_sigtramp = alpha_osf1_pc_in_sigtramp;
accc6d1f
JT
61
62 tdep->jb_pc = 2;
63 tdep->jb_elt_size = 8;
36a6271d
JT
64}
65
66void
67_initialize_alpha_osf1_tdep (void)
68{
05816f70
MK
69 gdbarch_register_osabi (bfd_arch_alpha, 0, GDB_OSABI_OSF1,
70 alpha_osf1_init_abi);
36a6271d 71}
This page took 0.309278 seconds and 4 git commands to generate.