1993-03-23 01:19:58 +00:00
|
|
|
/* Parameters for target machine Hewlett-Packard 9000/300, running bsd.
|
|
|
|
Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
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
|
1995-08-02 03:41:12 +00:00
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
1993-03-23 01:19:58 +00:00
|
|
|
|
1993-08-20 21:59:05 +00:00
|
|
|
/* Configuration file for HP9000/300 series machine running BSD,
|
|
|
|
including Utah, Mt. Xinu or Berkeley variants. This is NOT for HP-UX.
|
|
|
|
Problems to hpbsd-bugs@cs.utah.edu. */
|
1993-03-23 01:19:58 +00:00
|
|
|
|
1993-11-10 19:32:22 +00:00
|
|
|
/* GCC is the only compiler used on this OS. So get this right even if
|
|
|
|
the code which detects gcc2_compiled. is still broken. */
|
|
|
|
|
|
|
|
#define BELIEVE_PCC_PROMOTION 1
|
|
|
|
|
1993-03-23 01:19:58 +00:00
|
|
|
/* Define BPT_VECTOR if it is different than the default.
|
1993-12-27 04:52:47 +00:00
|
|
|
This is the vector number used by traps to indicate a breakpoint.
|
|
|
|
|
|
|
|
For hp300bsd the normal breakpoint vector is 0x2 (for debugging via
|
|
|
|
ptrace); for remote kernel debugging the breakpoint vector is 0xf. */
|
1993-03-23 01:19:58 +00:00
|
|
|
|
|
|
|
#define BPT_VECTOR 0x2
|
1993-12-16 21:10:24 +00:00
|
|
|
#define REMOTE_BPT_VECTOR 0xf
|
1993-03-23 01:19:58 +00:00
|
|
|
|
|
|
|
#define TARGET_NBPG 4096
|
1993-08-20 21:59:05 +00:00
|
|
|
|
|
|
|
/* For 4.4 this would be 2, but it is OK for us to detect an area a
|
|
|
|
bit bigger than necessary. This way the same gdb binary can target
|
|
|
|
either 4.3 or 4.4. */
|
|
|
|
|
1993-03-23 01:19:58 +00:00
|
|
|
#define TARGET_UPAGES 3
|
|
|
|
|
|
|
|
/* On the HP300, sigtramp is in the u area. Gak! User struct is not
|
|
|
|
mapped to the same virtual address in user/kernel address space
|
|
|
|
(hence STACK_END_ADDR as opposed to KERNEL_U_ADDR). This tests
|
|
|
|
for the whole u area, since we don't necessarily have hp300bsd
|
|
|
|
include files around. */
|
1993-08-20 21:59:05 +00:00
|
|
|
|
|
|
|
/* For 4.4, it is actually right 20 bytes *before* STACK_END_ADDR, so
|
|
|
|
include that in the area we test for. */
|
|
|
|
|
Changes from: David Mosberger-Tang <davidm@azstarnet.com>
* NEWS: Add Alpha Linux as a new native configuration.
* mdebugread.c (parse_symbol): When we find a malloc() symbol with
return type VOID, assume no debugging info is available for that
object file and patch the return value into VOID *. Otherwise,
operations requiring an implicit call to malloc() will fail.
* infrun.c (wait_for_inferior): The criterion to detect entering a
sigtramp handler is now: (a) the current pc is inside a sigtramp
handler, (b) the previous pc is not in a sigtramp handler, and (c)
the current stack pointer is "inner" than the old one. Condition
(c) is new to avoid mistaking a return from a signal handler into
sigtramp as a new sigtramp invocation.
* dcache.c (struct dcache_block): Declare addr as CORE_ADDR. An
int may not be big enough to hold an address.
(dcache_hit): Ditto.
(dcache_peek_byte): Fix indentation.
* configure.in (alpha-*-linux*): Add target.
* configure: Rebuild
* config/alpha/tm-alpha.h (PROC_DESC_IS_DYN_SIGTRAMP): New macro.
(SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
(DYNAMIC_SIGTRAMP_OFFSET): Ditto.
(SIGCONTEXT_ADDR): Ditto.
(FRAME_PAST_SIGTRAMP_FRAME): Ditto.
* config/alpha/alpha-linux.mh: New file.
* config/alpha/alpha-linux.mt: Ditto.
* config/alpha/nm-linux.h: Ditto.
* config/alpha/tm-alphalinux.h: Ditto.
* config/alpha/xm-alphalinux.h: Ditto.
* config/alpha/xm-alphaosf.h: Renamed from xm-alpha.h.
* config/alpha/alpha-osf1.mh (XM_FILE): Change from xm-alpha.h to
xm-alphaosf.h.
* config/alpha/alpha-osf2.mh: Ditto.
* blockframe.c (find_pc_partial_function): Pass PC to
SIGTRAMP_START and SIGTRAMP_END macros for the benefit of systems
that detect sigtramp code via designated code sequences (as is the
case for Linux/Alpha, for example).
* config/i386/tm-i386bsd.h: Change SIGTRAMP_START and SIGTRAMP_END
to ignore new PC argument.
* config/m68k/tm-hp300bsd.h: Ditto.
* config/vax/tm-vax.h: Ditto.
* alpha-tdep.c (alpha_linux_sigtramp_offset): New function.
(alpha_osf_skip_sigtramp_frame): Ditto.
(push_sigtramp_desc): Ditto.
(alpha_find_saved_regs): Use SIGCONTEXT_ADDR macro to extract
sigcontext address from frame.
(alpha_saved_pc_after_call): When in sigtramp, use
alpha_frame_saved_pc() instead of read-register().
(after_prologue): When inside a dynamically generated sigtramp
function, there is no prologue, so return address of first
instruction.
(alpha_in_prologue): Fix typo in comment.
(find_proc_desc): Use macro DYNAMIC_SIGTRAMP_OFFSET to determine
whether we're inside a dynamicaly generated sigtramp function. If
so, create and push and appropriate procedure descriptor.
(alpha_frame_chain): Use macro FRAME_PAST_SIGTRAMP_FRAME to obtain
the frame past a sigtramp frame (if the current frame is indeed a
sigtramp function).
(init_extra_frame_info): Don't read next frame register off of
stack-pointer when inside a dynamiccaly generated sigtramp.
(alpha_pop_frame): Also unlink and destroy procedure descriptors
created for dynamically generated sigtramp functions.
* alpha-nat.c: When compiling under Linux, include <asm/reg.h> and
<alpha/ptrace.h> instead of <machine/reg.h>
1996-05-26 21:41:40 +00:00
|
|
|
#define SIGTRAMP_START(pc) (STACK_END_ADDR - 20)
|
|
|
|
#define SIGTRAMP_END(pc) (STACK_END_ADDR + TARGET_UPAGES * TARGET_NBPG)
|
1993-03-23 01:19:58 +00:00
|
|
|
|
|
|
|
/* Address of end of stack space. */
|
|
|
|
|
|
|
|
#define STACK_END_ADDR 0xfff00000
|
|
|
|
|
* config/m68k/tm-m68k.h: Renamed from config/m68k/tm-68k.h.
* m68k/{tm-3b1.h, tm-altos.h, tm-amix.h, tm-es1800.h,
tm-hp300bsd.h, tm-hp300hpux.h, tm-isi.h, tm-news.h, tm-os68k.h,
tm-st2000.h, tm-sun2.h, tm-sun3.h, tm-vx68.h}: Include tm-m68k.h
instead of tm-68k.h.
* Makefile.in (HFILES): tm-68k.h renamed to tm-m68k.h.
* README, a29k-pinsn.c, m68k-pinsn.c, m68k-stub.c, remote-vx.c,
m68k/{altos.mh, altos.mt, apollo68b.mh, nm-apollo68b.h,
nm-hp300bsd.h, config/m68k/xm-apollo68b.h}: Map '68k' to 'm68k'.
* a29k/tm-a29k.h, doc/gdbint.texinfo: Account for renaming of
tm-68k.h to tm-m68k.h.
* m68k/m68k-fp.mt (TM_FILE): tm-68k-fp.h renamed to tm-m68k-fp.h.
* m68k/m68k-nofp.mt (TM_FILE): tm-68k-nofp.h renamed to
tm-m68k-nofp.h.
1993-03-30 00:33:44 +00:00
|
|
|
#include "m68k/tm-m68k.h"
|