2002-04-25 02:28:57 +00:00
|
|
|
/* Target-dependent code for OSF/1 on Alpha.
|
2005-12-17 22:34:03 +00:00
|
|
|
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
2002-04-25 02:28:57 +00:00
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2005-12-17 22:34:03 +00:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA. */
|
2002-04-25 02:28:57 +00:00
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
#include "frame.h"
|
2002-04-26 07:05:35 +00:00
|
|
|
#include "gdbcore.h"
|
2002-04-25 02:28:57 +00:00
|
|
|
#include "value.h"
|
2003-01-04 23:38:46 +00:00
|
|
|
#include "osabi.h"
|
2003-03-20 22:09:54 +00:00
|
|
|
#include "gdb_string.h"
|
2003-06-03 23:52:41 +00:00
|
|
|
#include "objfiles.h"
|
2002-04-25 02:28:57 +00:00
|
|
|
|
|
|
|
#include "alpha-tdep.h"
|
|
|
|
|
2002-04-25 05:06:08 +00:00
|
|
|
static int
|
|
|
|
alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
|
|
|
|
{
|
2003-01-09 18:30:32 +00:00
|
|
|
return (func_name != NULL && strcmp ("__sigtramp", func_name) == 0);
|
2002-04-25 05:06:08 +00:00
|
|
|
}
|
|
|
|
|
2002-04-26 07:05:35 +00:00
|
|
|
static CORE_ADDR
|
2004-12-13 05:07:23 +00:00
|
|
|
alpha_osf1_sigcontext_addr (struct frame_info *next_frame)
|
2002-04-26 07:05:35 +00:00
|
|
|
{
|
2004-12-13 05:07:23 +00:00
|
|
|
const struct frame_id next_id = get_frame_id (next_frame);
|
2003-06-04 05:20:55 +00:00
|
|
|
|
2004-12-13 05:07:23 +00:00
|
|
|
return (read_memory_integer (next_id.stack_addr, 8));
|
2002-04-26 07:05:35 +00:00
|
|
|
}
|
|
|
|
|
2002-04-25 02:28:57 +00:00
|
|
|
static void
|
|
|
|
alpha_osf1_init_abi (struct gdbarch_info info,
|
|
|
|
struct gdbarch *gdbarch)
|
|
|
|
{
|
|
|
|
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
|
|
|
|
2003-06-04 05:25:10 +00:00
|
|
|
/* Hook into the MDEBUG frame unwinder. */
|
|
|
|
alpha_mdebug_init_abi (info, gdbarch);
|
|
|
|
|
2002-08-17 06:12:52 +00:00
|
|
|
/* The next/step support via procfs on OSF1 is broken when running
|
|
|
|
on multi-processor machines. We need to use software single stepping
|
|
|
|
instead. */
|
|
|
|
set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
|
2002-04-25 05:06:08 +00:00
|
|
|
|
2002-04-26 07:05:35 +00:00
|
|
|
tdep->sigcontext_addr = alpha_osf1_sigcontext_addr;
|
2004-05-01 15:34:49 +00:00
|
|
|
tdep->pc_in_sigtramp = alpha_osf1_pc_in_sigtramp;
|
2002-04-26 01:08:19 +00:00
|
|
|
|
|
|
|
tdep->jb_pc = 2;
|
|
|
|
tdep->jb_elt_size = 8;
|
2002-04-25 02:28:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_initialize_alpha_osf1_tdep (void)
|
|
|
|
{
|
2002-12-21 19:58:07 +00:00
|
|
|
gdbarch_register_osabi (bfd_arch_alpha, 0, GDB_OSABI_OSF1,
|
|
|
|
alpha_osf1_init_abi);
|
2002-04-25 02:28:57 +00:00
|
|
|
}
|