OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [gdb/] [alpha-osf1-tdep.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1181 sfurman
/* 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 "gdbcore.h"
24
#include "value.h"
25
 
26
#include "alpha-tdep.h"
27
 
28
/* Under OSF/1, the __sigtramp routine is frameless and has a frame
29
   size of zero, but we are able to backtrace through it.  */
30
static CORE_ADDR
31
alpha_osf1_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
32
{
33
  char *name;
34
 
35
  find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
36
  if (PC_IN_SIGTRAMP (pc, name))
37
    return frame->frame;
38
  return 0;
39
}
40
 
41
static int
42
alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
43
{
44
  return (func_name != NULL && STREQ ("__sigtramp", func_name));
45
}
46
 
47
static CORE_ADDR
48
alpha_osf1_sigcontext_addr (struct frame_info *frame)
49
{
50
  return (read_memory_integer (frame->next ? frame->next->frame
51
                                           : frame->frame, 8));
52
}
53
 
54
static void
55
alpha_osf1_init_abi (struct gdbarch_info info,
56
                     struct gdbarch *gdbarch)
57
{
58
  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
59
 
60
  set_gdbarch_pc_in_sigtramp (gdbarch, alpha_osf1_pc_in_sigtramp);
61
  /* The next/step support via procfs on OSF1 is broken when running
62
     on multi-processor machines. We need to use software single stepping
63
     instead.  */
64
  set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
65
 
66
  tdep->skip_sigtramp_frame = alpha_osf1_skip_sigtramp_frame;
67
  tdep->sigcontext_addr = alpha_osf1_sigcontext_addr;
68
 
69
  tdep->jb_pc = 2;
70
  tdep->jb_elt_size = 8;
71
}
72
 
73
void
74
_initialize_alpha_osf1_tdep (void)
75
{
76
  gdbarch_register_osabi (bfd_arch_alpha, GDB_OSABI_OSF1, alpha_osf1_init_abi);
77
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.