1994-03-01 01:57:46 +00:00
|
|
|
/* Macro definitions for i386 running under BSD Unix.
|
|
|
|
Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
|
|
|
|
|
|
/* Override number of expected traps from sysv. */
|
|
|
|
#define START_INFERIOR_TRAPS_EXPECTED 2
|
|
|
|
|
|
|
|
/* Most definitions from sysv could be used. */
|
|
|
|
#include "i386/tm-i386v.h"
|
|
|
|
|
|
|
|
/* 386BSD cannot handle the segment registers. */
|
|
|
|
/* BSDI can't handle them either. */
|
|
|
|
#if 0
|
|
|
|
#undef NUM_REGS
|
|
|
|
#define NUM_REGS 10
|
|
|
|
#endif 0
|
|
|
|
|
|
|
|
#undef REGISTER_NAMES
|
|
|
|
#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
|
|
|
|
"esp", "ebp", "esi", "edi", \
|
|
|
|
"eip", "eflags", "cs", "ss", \
|
|
|
|
"ds", "es", "fs", "gs", \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define DATABASE_REG 3 /* ebx */
|
1994-03-10 03:11:19 +00:00
|
|
|
#undef DECR_PC_AFTER_BREAK
|
|
|
|
#define DECR_PC_AFTER_BREAK 0
|
1994-03-01 01:57:46 +00:00
|
|
|
|
|
|
|
/* On 386 bsd, sigtramp is above the user stack and immediately below
|
|
|
|
the user area. Using constants here allows for cross debugging.
|
|
|
|
These are tested for BSDI but should work on 386BSD. */
|
|
|
|
#define SIGTRAMP_START 0xfdbfdfc0
|
|
|
|
#define SIGTRAMP_END 0xfdbfe000
|
|
|
|
|
|
|
|
/* The following redefines make backtracing through sigtramp work.
|
|
|
|
They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp
|
|
|
|
from the sigcontext structure which is pushed by the kernel on the
|
|
|
|
user stack, along with a pointer to it. */
|
|
|
|
|
|
|
|
/* FRAME_CHAIN takes a frame's nominal address and produces the frame's
|
|
|
|
chain-pointer.
|
|
|
|
In the case of the i386, the frame's nominal address
|
|
|
|
is the address of a 4-byte word containing the calling frame's address. */
|
|
|
|
#undef FRAME_CHAIN
|
|
|
|
#define FRAME_CHAIN(thisframe) \
|
|
|
|
(thisframe->signal_handler_caller \
|
|
|
|
? thisframe->frame \
|
|
|
|
: (!inside_entry_file ((thisframe)->pc) \
|
|
|
|
? read_memory_integer ((thisframe)->frame, 4) \
|
|
|
|
: 0))
|
|
|
|
|
|
|
|
/* A macro that tells us whether the function invocation represented
|
|
|
|
by FI does not have a frame on the stack associated with it. If it
|
|
|
|
does not, FRAMELESS is set to 1, else 0. */
|
|
|
|
#undef FRAMELESS_FUNCTION_INVOCATION
|
|
|
|
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
|
|
|
do { \
|
|
|
|
if ((FI)->signal_handler_caller) \
|
|
|
|
(FRAMELESS) = 0; \
|
|
|
|
else \
|
|
|
|
(FRAMELESS) = frameless_look_for_prologue(FI); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/* Saved Pc. Get it from sigcontext if within sigtramp. */
|
|
|
|
|
|
|
|
/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
|
|
|
|
#define SIGCONTEXT_PC_OFFSET 20
|
|
|
|
|
|
|
|
#undef FRAME_SAVED_PC(FRAME)
|
|
|
|
#define FRAME_SAVED_PC(FRAME) \
|
|
|
|
(((FRAME)->signal_handler_caller \
|
|
|
|
? sigtramp_saved_pc (FRAME) \
|
|
|
|
: read_memory_integer ((FRAME)->frame + 4, 4)) \
|
|
|
|
)
|
* os9kread.c (os9k_process_one_symbol): Rename
VARIABLES_INSIDE_BLOCK to OS9K_VARIABLES_INSIDE_BLOCK.
* symfile.c (symbol_file_command): Check for (CORE_ADDR)-1, not
(CORE_ADDR)0, from target_link, since that is what it uses.
Process name at end, not during parsing (like we did before Kung's
change), so that -readnow and -mapped can appear anywhere.
Make text_relocation a local variable.
* config/i386/i386os9k.mt: Fix comment.
* Makefile.in (ALLDEPFILES): Add remote-os9k.c.
* os9kread.c: Put "comments" after #endif inside /* */.
* stabsread.h: Add os9k_stabs variable.
* stabsread.c (start_stabs), os9kread.c (os9k_process_one_symbol):
Set it.
* stabsread.c (define_symbol): If os9k_stabs, put a 'V' symbol
descriptor in global_symbols not local_symbols.
(read_type): If os9k_stabs, accept 'c', 'i', and 'b' type
descriptors.
(read_type): If os9k_stabs, accept function parameters after 'f'
type descriptor.
(read_array_type): If os9k_stabs, don't expect index type and
expect lower and upper to be separated by ',' not ';'.
(read_enum_type): If os9k_stabs, read a number before the first
enumeration constant.
(os9k_init_type_vector): New function.
(dbx_lookup_type): Call it when starting new type vector.
* config/i386/tm-i386os9k.h: Define BELIEVE_PCC_PROMOTION.
* (os9k_process_one_symbol): Call define_symbol not os9k_define_symbol.
* os9kstab.c: Removed.
* Makefile.in: Update accordingly.
* objfiles.c (objfile_relocate_data): Removed.
* remote-os9k.c (rombug_wait): Call objfile_relocate
not objfile_relocate_data.
* objfiles.h, objfiles.c: Remove find_pc_objfile.
* remote-os9k.c (rombug_wait): Call find_pc_section not
find_pc_objfile.
* main.c (quit_command): Check inferior_pid; revert Kung change.
* remote-os9k.c (rombug_create_inferior): Set inferior_pid.
1994-03-02 03:01:34 +00:00
|
|
|
|
|
|
|
#define BELIEVE_PCC_PROMOTION 1
|