]>
Commit | Line | Data |
---|---|---|
36a6271d JT |
1 | /* Target-dependent code for OSF/1 on Alpha. |
2 | Copyright 2002 Free Software Foundation, Inc. | |
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 | |
18 | Foundation, Inc., 59 Temple Place - Suite 330, | |
19 | Boston, MA 02111-1307, USA. */ | |
20 | ||
21 | #include "defs.h" | |
22 | #include "frame.h" | |
23 | #include "value.h" | |
24 | ||
25 | #include "alpha-tdep.h" | |
26 | ||
27 | /* Under OSF/1, the __sigtramp routine is frameless and has a frame | |
28 | size of zero, but we are able to backtrace through it. */ | |
29 | static CORE_ADDR | |
30 | alpha_osf1_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc) | |
31 | { | |
32 | char *name; | |
33 | ||
34 | find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL); | |
35 | if (PC_IN_SIGTRAMP (pc, name)) | |
36 | return frame->frame; | |
37 | return 0; | |
38 | } | |
39 | ||
6c72f9f9 JT |
40 | static int |
41 | alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name) | |
42 | { | |
43 | return (func_name != NULL && STREQ ("__sigtramp", func_name)); | |
44 | } | |
45 | ||
36a6271d JT |
46 | static void |
47 | alpha_osf1_init_abi (struct gdbarch_info info, | |
48 | struct gdbarch *gdbarch) | |
49 | { | |
50 | struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | |
51 | ||
6c72f9f9 JT |
52 | set_gdbarch_pc_in_sigtramp (gdbarch, alpha_osf1_pc_in_sigtramp); |
53 | ||
36a6271d | 54 | tdep->skip_sigtramp_frame = alpha_osf1_skip_sigtramp_frame; |
accc6d1f JT |
55 | |
56 | tdep->jb_pc = 2; | |
57 | tdep->jb_elt_size = 8; | |
36a6271d JT |
58 | } |
59 | ||
60 | void | |
61 | _initialize_alpha_osf1_tdep (void) | |
62 | { | |
63 | alpha_gdbarch_register_os_abi (ALPHA_ABI_OSF1, alpha_osf1_init_abi); | |
64 | } |