import gdb-19990422 snapshot

This commit is contained in:
Stan Shebs 1999-04-26 18:34:20 +00:00
parent 1996fae846
commit 7a292a7adf
354 changed files with 13433 additions and 11180 deletions

File diff suppressed because it is too large Load Diff

View File

@ -143,6 +143,12 @@ Thu Dec 11 13:40:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
* dwarf2read.c (dwarf_decode_lines): Change type of address to
CORE_ADDR.
Thu Dec 11 22:39:02 1997 Mark Alexander <marka@cygnus.com>
From change made to branch by Bob Manson <manson@cygnus.com>:
* tic80-tdep.c (tic80_push_arguments): The compiler always
passes structs by reference.
Thu Dec 11 14:28:01 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c (trace_find_command): don't error if going
@ -1016,6 +1022,10 @@ Sat Aug 9 01:50:14 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
Fri Aug 8 21:35:44 1997 Mark Alexander <marka@cygnus.com>
* config/tic80/tic80.mt:
(GDBSERVER-DEPFILES, GDBSERVER_LIBS): Define for gdbserver.
(SIM): Remove -lm to prevent make errors.
* configure.tgt: add gdbserver to configdirs for tic80.
* gdbserver/utils.c (error): Change prototype to match defs.h.
* gdbserver/low-sim.c: Change simulator calls to use new interface.
* remote.c (remote_write_bytes): Include '$' at start of packet
@ -1151,6 +1161,11 @@ Wed Aug 6 16:15:31 1997 Geoffrey Noer <noer@cygnus.com>
(_initialize_bdm_ppc): new
* config/powerpc/tm-ppc-eabi.h: add necessary CPU32 BDM defines
Tue Aug 5 23:56:14 1997 Mark Alexander <marka@cygnus.com>
* tic80-tdep.c (tic80_init_extra_frame_info): Allow zero
as a valid SP-relative offset of a saved register.
Wed Aug 6 00:24:08 1997 Jeffrey A Law (law@cygnus.com)
* hpread.c (hpread_read_struct_type): Use accessor macros rather
@ -1654,6 +1669,15 @@ Wed May 14 08:58:55 1997 Jeffrey A Law (law@cygnus.com)
symbols to find the end of the prologue.
* mn10300-tdep.c (mn10300_skip_prologue): Likewise.
Wed May 14 12:04:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
* config/tic80/tm-tic80.h (NUM_REGS): 38 not 37.
Mon May 12 11:35:04 1997 Mark Alexander <marka@cygnus.com>
* tic80-tdep.c, config/tic80/tm-tic80.h: First cut at getting
basic C80 features working.
Thu May 8 08:42:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in (AC_TYPE_SIGNAL): Add
@ -1695,6 +1719,10 @@ Thu May 1 02:28:21 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* printcmd.c (disassemble_command): Adjust low function bound
by FUNCTION_START_OFFSET.
Wed Apr 30 15:23:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
* config/tic80/tm-tic80.h (BREAKPOINT): Set it to trap 73.
Mon Apr 28 21:25:32 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
* Makefile.in: Add rule for gnu-nat.o and i386gnu-nat.o (Gnu Hurd)
@ -1762,6 +1790,15 @@ Thu Apr 24 13:31:10 1997 Jeffrey A Law (law@cygnus.com)
* mn10300-tdep.c (mn10300_analyze_prologue): Check for a return
insn at "pc", not "fi->pc".
Thu Apr 24 16:11:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
* config/tic80/tm-tic80.h (NUM_REGS): Four 64bit accumulators.
(REGISTER_BYTE, REGISTER_RAW_SIZE, REGISTER_SIZE,
MAX_REGISTER_RAW_SIZE, REGISTER_VIRTUAL_TYPE): Adjust.
(NPC_REGNUM): Tic80 has a delay slot.
(R0_REGNUM, Rn_REGNUM, An_REGNUM): For sim, provide base/bound for
register blocks.
Wed Apr 23 11:18:45 1997 Jeffrey A Law (law@cygnus.com)
* config/mn10200/tm-mn10200.h (STORE_RETURN_VALUE): Pointers are
@ -1780,6 +1817,10 @@ Tue Apr 22 11:58:15 1997 Fred Fish <fnf@cygnus.com>
(floatformat_from_doublest): Postswap output words for
the floatformat_littlebyte_bigwords format.
Mon Apr 21 22:44:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
* config/tic80/tic80.mt (SIM): Link in simulator.
Tue Apr 22 09:02:10 1997 Stu Grossman (grossman@critters.cygnus.com)
* config/alpha/alpha-osf3.mh config/i386/{i386gnu linux}.mh
@ -2102,6 +2143,11 @@ Mon Mar 31 14:55:53 1997 Ian Lance Taylor <ian@cygnus.com>
* configure.in: Generate .gdbinit from gdbinit.in.
* configure: Rebuild.
Sun Mar 30 12:28:24 1997 Fred Fish <fnf@cygnus.com>
* config/tic80/tic80.mt: Disable using the simulator
until it is ready.
Sat Mar 29 13:57:20 1997 Fred Fish <fnf@cygnus.com>
* COPYING: Install new version of file from FSF.
@ -2111,6 +2157,10 @@ Fri Mar 28 18:33:41 1997 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (distclean): Remove .gdbinit.
Fri Mar 28 15:37:30 1997 Fred Fish <fnf@cygnus.com>
* config/tic80/tm-tic80.h (NAMES_HAVE_UNDERSCORE): Define.
Fri Mar 28 15:38:04 1997 Mike Meissner <meissner@cygnus.com>
* remote-sim.c (gdb_os_{,e}vprintf_filtered): Change stdarg type
@ -2167,6 +2217,10 @@ Sat Mar 22 16:41:35 1997 Fred Fish <fnf@cygnus.com>
* remote-sim.c (simulator_command): Add comment about dealing with
NULL or empty args.
* Makefile.in (tic80-tdep.o): Add target.
* configure.tgt: Add tic80 case.
* tic80-tdep.c: New file.
* config/tic80/{tic80.mt, tm-tic80.h}: New files.
Sat Mar 22 02:48:11 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)

View File

@ -5718,6 +5718,13 @@ Wed Apr 29 14:02:59 1998 David Taylor <taylor@texas.cygnus.com>
Wed Apr 29 10:20:40 1998 John Metzler <jmetzler@cygnus.com>
* nec4102rom.c: New file implements ROM monitor adapter for
nec-vr4102 board. This board hosts the vr4111 chip. This file
required extensions to the monitor_ops structure, hooks for wait
filter, new flags. This version does not support more than one
breakpoint and resuming after a breakpoint in 16 bit mode is
completely disfunctional.
* monitor.h: Defined additional hooks for dmpregs, configure_hooks
and wait_filter. These additions require that all ROM monitor
interfaces be recoded to initialize monitor ops using assignments
@ -6481,6 +6488,9 @@ Wed Mar 4 01:39:08 1998 Ron Unrau <runrau@cygnus.com>
Tue Mar 3 17:19:08 1998 John Metzler <jmetzler@cygnus.com>
* config/mips/tm-vr4xxx.h: implements vr4111 as separate from 4300
* config/mips/vr4xxx.tm: implements vr4111 as separate from 4300
* configure.tgt: Recognise mips64vr4111-*-elf as vr4xxx
* dwarfread.c (read_tag_pointer_type): Pointer sizes now come from
TARGET_PTR_BIT rather from sizeof(char *) on host.

View File

@ -1,4 +1,4 @@
# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
# Free Software Foundation, Inc.
# This file is part of GDB.
@ -47,6 +47,8 @@ top_builddir = .
SHELL = @SHELL@
EXEEXT = @EXEEXT@
AWK = @AWK@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
@ -215,7 +217,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
VERSION=4.18
VERSION = 19990422
DIST=gdb
LINT=/usr/5bin/lint
@ -249,6 +251,13 @@ ANNOTATE_OBS = annotate.o
@target_makefile_frag@
# End of host and target-dependent makefile fragments
# Possibly ignore the simulator. If the simulator is being ignored,
# these expand into SIM= and SIM_OBJ=, overriding the entries from
# target_makefile_frag
#
@IGNORE_SIM@
@IGNORE_SIM_OBS@
FLAGS_TO_PASS = \
"prefix=$(prefix)" \
"exec_prefix=$(exec_prefix)" \
@ -919,7 +928,7 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
convex-tdep.c convex-xdep.c \
core-sol2.c core-regset.c core-aout.c corelow.c \
dcache.c delta68-nat.c dpx2-nat.c dstread.c exec.c fork-child.c \
go32-xdep.c gould-tdep.c gould-xdep.c h8300-tdep.c h8500-tdep.c \
gould-tdep.c gould-xdep.c h8300-tdep.c h8500-tdep.c \
hp300ux-nat.c hppa-tdep.c hppab-nat.c hppah-nat.c \
hp-psymtab-read.c hp-symtab-read.c \
i386-tdep.c i386b-nat.c i386mach-nat.c i386v-nat.c \
@ -1117,8 +1126,6 @@ gdbtypes.o: gdbtypes.c $(bfd_h) complaints.h $(defs_h) $(expression_h) \
gnu-nat.o: process_reply_S.h exc_request_S.h notify_S.h msg_reply_S.h \
exc_request_U.h msg_U.h gnu-nat.h
go32-xdep.o: go32-xdep.c
# OBSOLETE gould-tdep.o: gould-tdep.c $(OP_INCLUDE)/np1.h $(defs_h) $(frame_h) \
# OBSOLETE $(gdbcore_h) $(symtab_h)
@ -1196,11 +1203,11 @@ jv-lang.o: jv-lang.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
jv-typeprint.o: jv-typeprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
$(value_h) $(INCLUDE_DIR)/demangle.h jv-lang.h gdb_string.h \
typeprint.h
typeprint.h c-lang.h
jv-valprint.o: jv-valprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
$(expression_h) $(value_h) $(INCLUDE_DIR)/demangle.h valprint.h \
language.h jv-lang.h c-lang.h
language.h jv-lang.h c-lang.h gdbcore.h annotate.h
language.o: language.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
$(gdbcmd_h) $(gdbtypes_h) language.h parser-defs.h $(symtab_h) \
@ -1297,7 +1304,7 @@ nindy-tdep.o: nindy-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcore_h)
ns32k-tdep.o: ns32k-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h)
objfiles.o: objfiles.c $(bfd_h) $(defs_h) objfiles.h symfile.h \
$(symtab_h) gdb_string.h
$(symtab_h) gdb_string.h $(breakpoint_h)
osfsolib.o: osfsolib.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
objfiles.h gnu-regex.h symfile.h target.h language.h gdb_string.h
@ -1504,7 +1511,7 @@ stabsread.o: stabsread.c $(bfd_h) $(INCLUDE_DIR)/aout/stab.def \
stack.o: stack.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
language.h target.h gdb_string.h
ax-general.o: ax-general.c $(ax_h) $(defs_h)
ax-general.o: ax-general.c $(ax_h) $(defs_h) $(value_h)
ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) symfile.h $(gdbtypes_h) \
$(value_h) $(expression_h) $(command_h) $(ax_h) $(gdbcmd_h) ax-gdb.h
@ -1533,6 +1540,8 @@ symtab.o: symtab.c call-cmds.h $(defs_h) $(expression_h) $(frame_h) \
tahoe-tdep.o: tahoe-tdep.c $(OP_INCLUDE)/tahoe.h $(defs_h) \
$(symtab_h)
tic80-tdep.o: tic80-tdep.c $(defs_h)
target.o: target.c $(bfd_h) $(defs_h) $(gdbcmd_h) $(inferior_h) \
objfiles.h symfile.h target.h gdb_string.h

View File

@ -1,6 +1,13 @@
What has changed in GDB?
(Organized release by release)
*** Changes since GDB-4.18:
* New targets
TI TMS320C80 tic80-*-*
*** Changes in GDB-4.18:
* New native configurations

View File

@ -4,8 +4,8 @@
This is GDB, the GNU source-level debugger.
A summary of new features is in the file `NEWS'.
See the GDB home page at http://www.cygnus.com/gdb/ for up to date
release information, mailing list links and archives, etc.
See the GDB home page at http://sourceware.cygnus.com/gdb/ for up to
date release information, mailing list links and archives, etc.
Unpacking and Installation -- quick overview
@ -152,6 +152,8 @@ directory. That directory contains:
`gdb-4.18/readline'
source for the GNU command-line interface
NOTE: The readline library is compiled for use by GDB, but will
not be installed on your system when "make install" is issued.
`gdb-4.18/sim'
source for some simulators (ARM, D10V, SPARC, M32R, MIPS, PPC, V850, etc)

View File

@ -510,7 +510,7 @@ init_extra_frame_info (frame)
but there isn't any way to tell the difference. */
init_frame_info (1, frame);
else {
/* We're in get_prev_frame_info.
/* We're in get_prev_frame.
Take care of everything in init_frame_pc. */
;
}
@ -668,7 +668,7 @@ write_register_stack (memaddr, myaddr, actual_mem_addr)
The argument RAW_BUFFER must point to aligned memory. */
void
get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp)
a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp)
char *raw_buffer;
int *optimized;
CORE_ADDR *addrp;

View File

@ -35,7 +35,6 @@ fetch_inferior_registers (ignored)
struct ptrace_$data_regs_m68k inferior_registers;
struct ptrace_$floating_regs_m68k inferior_fp_registers;
struct ptrace_$control_regs_m68k inferior_control_registers;
extern char registers[];
ptrace_$init_control(&inferior_control_registers);
inferior_fp_registers.size = sizeof(inferior_fp_registers);
@ -78,7 +77,6 @@ store_inferior_registers (regno)
struct ptrace_$data_regs_m68k inferior_registers;
struct ptrace_$floating_regs_m68k inferior_fp_registers;
struct ptrace_$control_regs_m68k inferior_control_registers;
extern char registers[];
ptrace_$init_control(&inferior_control_registers);
inferior_fp_registers.size = sizeof(inferior_fp_registers);

View File

@ -88,6 +88,9 @@
name, as a C string. */
#undef TARGET_CPU_DEFAULT
/* Define if the simulator is being linked in. */
#undef WITH_SIM
/* Set to true if the save_state_t structure is present */
#define HAVE_STRUCT_SAVE_STATE_T 0

View File

@ -493,7 +493,7 @@ AC_DEFUN(CY_AC_PATH_ITCLCONFIG, [
if test x"${no_itcl}" = x ; then
# we reset no_itcl in case something fails here
no_itcl=true
AC_ARG_WITH(itclconfig, [ --with-itclconfig directory containing itcl configuration (itclConfig.sh)],
AC_ARG_WITH(itclconfig, [ --with-itclconfig Directory containing itcl configuration (itclConfig.sh)],
with_itclconfig=${withval})
AC_MSG_CHECKING([for Itcl configuration])
AC_CACHE_VAL(ac_cv_c_itclconfig,[
@ -619,7 +619,7 @@ AC_DEFUN(CY_AC_PATH_ITKCONFIG, [
if test x"${no_itk}" = x ; then
# we reset no_itk in case something fails here
no_itk=true
AC_ARG_WITH(itkconfig, [ --with-itkconfig directory containing itk configuration (itkConfig.sh)],
AC_ARG_WITH(itkconfig, [ --with-itkconfig Directory containing itk configuration (itkConfig.sh)],
with_itkconfig=${withval})
AC_MSG_CHECKING([for Itk configuration])
AC_CACHE_VAL(ac_cv_c_itkconfig,[
@ -765,7 +765,7 @@ AC_DEFUN(CY_AC_PATH_TIXCONFIG, [
if test x"${no_tix}" = x ; then
# we reset no_tix in case something fails here
no_tix=true
AC_ARG_WITH(tixconfig, [ --with-tixconfig directory containing tix configuration (tixConfig.sh)],
AC_ARG_WITH(tixconfig, [ --with-tixconfig Directory containing tix configuration (tixConfig.sh)],
with_tixconfig=${withval})
AC_MSG_CHECKING([for Tix configuration])
AC_CACHE_VAL(ac_cv_c_tixconfig,[

6
gdb/aclocal.m4 vendored
View File

@ -505,7 +505,7 @@ AC_DEFUN(CY_AC_PATH_ITCLCONFIG, [
if test x"${no_itcl}" = x ; then
# we reset no_itcl in case something fails here
no_itcl=true
AC_ARG_WITH(itclconfig, [ --with-itclconfig directory containing itcl configuration (itclConfig.sh)],
AC_ARG_WITH(itclconfig, [ --with-itclconfig Directory containing itcl configuration (itclConfig.sh)],
with_itclconfig=${withval})
AC_MSG_CHECKING([for Itcl configuration])
AC_CACHE_VAL(ac_cv_c_itclconfig,[
@ -631,7 +631,7 @@ AC_DEFUN(CY_AC_PATH_ITKCONFIG, [
if test x"${no_itk}" = x ; then
# we reset no_itk in case something fails here
no_itk=true
AC_ARG_WITH(itkconfig, [ --with-itkconfig directory containing itk configuration (itkConfig.sh)],
AC_ARG_WITH(itkconfig, [ --with-itkconfig Directory containing itk configuration (itkConfig.sh)],
with_itkconfig=${withval})
AC_MSG_CHECKING([for Itk configuration])
AC_CACHE_VAL(ac_cv_c_itkconfig,[
@ -777,7 +777,7 @@ AC_DEFUN(CY_AC_PATH_TIXCONFIG, [
if test x"${no_tix}" = x ; then
# we reset no_tix in case something fails here
no_tix=true
AC_ARG_WITH(tixconfig, [ --with-tixconfig directory containing tix configuration (tixConfig.sh)],
AC_ARG_WITH(tixconfig, [ --with-tixconfig Directory containing tix configuration (tixConfig.sh)],
with_tixconfig=${withval})
AC_MSG_CHECKING([for Tix configuration])
AC_CACHE_VAL(ac_cv_c_tixconfig,[

View File

@ -154,8 +154,14 @@ struct linked_proc_info
think this will be a problem in praxis, though.
*/
#ifndef TM_LINUXALPHA_H
/* HACK: Provide a prototype when compiling this file for non
linuxalpha targets. */
long alpha_linux_sigtramp_offset PARAMS ((CORE_ADDR pc));
#endif
long
alpha_linux_sigtramp_offset (CORE_ADDR pc)
alpha_linux_sigtramp_offset (pc)
CORE_ADDR pc;
{
unsigned int i[3], w;
long off;
@ -903,7 +909,7 @@ alpha_push_arguments (nargs, args, sp, struct_return, struct_addr)
int struct_return;
CORE_ADDR struct_addr;
{
register i;
int i;
int accumulate_size = struct_return ? 8 : 0;
int arg_regs_size = ALPHA_NUM_ARG_REGS * 8;
struct alpha_arg { char *contents; int len; int offset; };
@ -1209,18 +1215,21 @@ alpha_skip_prologue (pc, lenient)
continue;
if ((inst & 0xffff0000) == 0x23de0000) /* lda $sp,n($sp) */
continue;
else if ((inst & 0xfc1f0000) == 0xb41e0000
&& (inst & 0xffff0000) != 0xb7fe0000)
if ((inst & 0xffe01fff) == 0x43c0153e) /* subq $sp,n,$sp */
continue;
if ((inst & 0xfc1f0000) == 0xb41e0000
&& (inst & 0xffff0000) != 0xb7fe0000)
continue; /* stq reg,n($sp) */
/* reg != $zero */
else if ((inst & 0xfc1f0000) == 0x9c1e0000
&& (inst & 0xffff0000) != 0x9ffe0000)
if ((inst & 0xfc1f0000) == 0x9c1e0000
&& (inst & 0xffff0000) != 0x9ffe0000)
continue; /* stt reg,n($sp) */
/* reg != $zero */
else if (inst == 0x47de040f) /* bis sp,sp,fp */
if (inst == 0x47de040f) /* bis sp,sp,fp */
continue;
else
break;
break;
}
return pc + offset;
}
@ -1383,6 +1392,7 @@ alpha_call_dummy_address ()
return SYMBOL_VALUE_ADDRESS (sym) + 4;
}
void _initialize_alpha_tdep PARAMS ((void));
void
_initialize_alpha_tdep ()
{

View File

@ -54,7 +54,6 @@ core_file_command (filename, from_tty)
int from_tty;
{
int val;
extern char registers[];
/* Discard all vestiges of any previous core file
and mark data and stack spaces as empty. */

View File

@ -1,5 +1,5 @@
/* Annotation routines for GDB.
Copyright 1986, 89, 90, 91, 92, 95, 1998 Free Software Foundation, Inc.
Copyright 1986, 89, 90, 91, 92, 95, 98, 1999 Free Software Foundation, Inc.
This file is part of GDB.
@ -34,6 +34,7 @@ static void breakpoint_changed PARAMS ((struct breakpoint *));
void (*annotate_starting_hook) PARAMS ((void));
void (*annotate_stopped_hook) PARAMS ((void));
void (*annotate_signalled_hook) PARAMS ((void));
void (*annotate_signal_hook) PARAMS ((void));
void (*annotate_exited_hook) PARAMS ((void));
static void
@ -161,6 +162,9 @@ annotate_signal_string_end ()
void
annotate_signal ()
{
if (annotate_signal_hook)
annotate_signal_hook ();
if (annotation_level > 1)
printf_filtered ("\n\032\032signal\n");
}

View File

@ -1,5 +1,5 @@
/* Annotation routines for GDB.
Copyright 1986, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
Copyright 1986, 1989, 1990, 1991, 1992, 1999 Free Software Foundation, Inc.
This file is part of GDB.
@ -101,4 +101,5 @@ extern void annotate_array_section_end PARAMS ((void));
extern void (*annotate_starting_hook) PARAMS ((void));
extern void (*annotate_stopped_hook) PARAMS ((void));
extern void (*annotate_signalled_hook) PARAMS ((void));
extern void (*annotate_signal_hook) PARAMS ((void));
extern void (*annotate_exited_hook) PARAMS ((void));

View File

@ -234,7 +234,7 @@ arc_get_frame_setup (pc)
/* This sequence is used to get the address of the return
buffer for a function that returns a structure. */
insn = codestream_peek ();
if (insn & OPMASK == 0x60000000)
if ((insn & OPMASK) == 0x60000000)
codestream_get ();
}
/* Frameless fn. */

View File

@ -1,5 +1,5 @@
/* Target-dependent code for the Acorn Risc Machine, for GDB, the GNU Debugger.
Copyright (C) 1988, 1989, 1991, 1992, 1993, 1995, 1996, 1998, 1999
/* Target-dependent code for the Acorn Risc Machine (ARM).
Copyright (C) 1988, 1989, 1991, 1992, 1993, 1995-1999
Free Software Foundation, Inc.
This file is part of GDB.
@ -479,7 +479,7 @@ arm_scan_prologue (fi)
{
/* Get address of the stmfd in the prologue of the callee; the saved
PC is the address of the stmfd + 12. */
prologue_start = (read_memory_integer (fi->frame, 4) & 0x03fffffc) - 12;
prologue_start = ADDR_BITS_REMOVE(read_memory_integer (fi->frame, 4)) - 12;
prologue_end = prologue_start + 40; /* FIXME: should be big enough */
}
@ -974,14 +974,16 @@ arm_pop_frame ()
{
struct frame_info *frame = get_current_frame();
int regnum;
CORE_ADDR old_SP;
old_SP = read_register (frame->framereg);
for (regnum = 0; regnum < NUM_REGS; regnum++)
if (frame->fsr.regs[regnum] != 0)
write_register (regnum,
read_memory_integer (frame->fsr.regs[regnum], 4));
write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
write_register (SP_REGNUM, read_register (frame->framereg));
write_register (SP_REGNUM, old_SP);
flush_cached_frames ();
}

View File

@ -161,7 +161,6 @@ core_file_command (filename, from_tty)
int from_tty;
{
int val;
extern char registers[];
/* Discard all vestiges of any previous core file
and mark data and stack spaces as empty. */

View File

@ -17,8 +17,6 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* $Id$ */
#include "defs.h"
#include "symtab.h"
#include "symfile.h"

View File

@ -17,8 +17,6 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* $Id$ */
#ifndef AX_GDB_H
#define AX_GDB_H

View File

@ -17,8 +17,6 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* $Id$ */
/* Despite what the above comment says about this file being part of
GDB, we would like to keep these functions free of GDB
dependencies, since we want to be able to use them in contexts
@ -27,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "ax.h"
#include "value.h"
/* Functions for building expressions. */

View File

@ -17,8 +17,6 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* $Id$ */
#ifndef AGENTEXPR_H
#define AGENTEXPR_H

View File

@ -138,8 +138,6 @@ bcache (bytes, count, bcachep)
return (location);
}
#if MAINTENANCE_CMDS
void
print_bcache_statistics (bcachep, id)
struct bcache *bcachep;
@ -215,5 +213,3 @@ print_bcache_statistics (bcachep, id)
}
printf_filtered (" Maximum chain length %d at %d:%d\n", lmax, lmaxt, lmaxh);
}
#endif /* MAINTENANCE_CMDS */

View File

@ -62,11 +62,7 @@ struct bcache {
extern void *
bcache PARAMS ((void *bytes, int count, struct bcache *bcachep));
#if MAINTENANCE_CMDS
extern void
print_bcache_statistics PARAMS ((struct bcache *, char *));
#endif /* MAINTENANCE_CMDS */
#endif /* BCACHE_H */

View File

@ -88,13 +88,14 @@ inside_entry_file (addr)
return 1;
if (symfile_objfile == 0)
return 0;
#if CALL_DUMMY_LOCATION == AT_ENTRY_POINT
/* Do not stop backtracing if the pc is in the call dummy
at the entry point. */
/* FIXME: Won't always work with zeros for the last two arguments */
if (PC_IN_CALL_DUMMY (addr, 0, 0))
return 0;
#endif
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
{
/* Do not stop backtracing if the pc is in the call dummy
at the entry point. */
/* FIXME: Won't always work with zeros for the last two arguments */
if (PC_IN_CALL_DUMMY (addr, 0, 0))
return 0;
}
return (addr >= symfile_objfile -> ei.entry_file_lowpc &&
addr < symfile_objfile -> ei.entry_file_highpc);
}
@ -148,19 +149,20 @@ CORE_ADDR pc;
int
inside_entry_func (pc)
CORE_ADDR pc;
CORE_ADDR pc;
{
if (pc == 0)
return 1;
if (symfile_objfile == 0)
return 0;
#if CALL_DUMMY_LOCATION == AT_ENTRY_POINT
/* Do not stop backtracing if the pc is in the call dummy
at the entry point. */
/* FIXME: Won't always work with zeros for the last two arguments */
if (PC_IN_CALL_DUMMY (pc, 0, 0))
return 0;
#endif
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
{
/* Do not stop backtracing if the pc is in the call dummy
at the entry point. */
/* FIXME: Won't always work with zeros for the last two arguments */
if (PC_IN_CALL_DUMMY (pc, 0, 0))
return 0;
}
return (symfile_objfile -> ei.entry_func_lowpc <= pc &&
symfile_objfile -> ei.entry_func_highpc > pc);
}
@ -245,16 +247,6 @@ create_new_frame (addr, pc)
return fi;
}
/* Return the frame that called FI.
If FI is the original frame (it has no caller), return 0. */
struct frame_info *
get_prev_frame (frame)
struct frame_info *frame;
{
return get_prev_frame_info (frame);
}
/* Return the frame that FRAME calls (NULL if FRAME is the innermost
frame). */
@ -352,7 +344,7 @@ frameless_look_for_prologue (frame)
if there is no such frame. */
struct frame_info *
get_prev_frame_info (next_frame)
get_prev_frame (next_frame)
struct frame_info *next_frame;
{
CORE_ADDR address = 0;
@ -1034,7 +1026,72 @@ sigtramp_saved_pc (frame)
}
#endif /* SIGCONTEXT_PC_OFFSET */
#ifdef USE_GENERIC_DUMMY_FRAMES
/* Are we in a call dummy? The code below which allows DECR_PC_AFTER_BREAK
below is for infrun.c, which may give the macro a pc without that
subtracted out. */
extern CORE_ADDR text_end;
int
pc_in_call_dummy_before_text_end (pc, sp, frame_address)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR frame_address;
{
return ((pc) >= text_end - CALL_DUMMY_LENGTH
&& (pc) <= text_end + DECR_PC_AFTER_BREAK);
}
int
pc_in_call_dummy_after_text_end (pc, sp, frame_address)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR frame_address;
{
return ((pc) >= text_end
&& (pc) <= text_end + CALL_DUMMY_LENGTH + DECR_PC_AFTER_BREAK);
}
/* Is the PC in a call dummy? SP and FRAME_ADDRESS are the bottom and
top of the stack frame which we are checking, where "bottom" and
"top" refer to some section of memory which contains the code for
the call dummy. Calls to this macro assume that the contents of
SP_REGNUM and FP_REGNUM (or the saved values thereof), respectively,
are the things to pass.
This won't work on the 29k, where SP_REGNUM and FP_REGNUM don't
have that meaning, but the 29k doesn't use ON_STACK. This could be
fixed by generalizing this scheme, perhaps by passing in a frame
and adding a few fields, at least on machines which need them for
PC_IN_CALL_DUMMY.
Something simpler, like checking for the stack segment, doesn't work,
since various programs (threads implementations, gcc nested function
stubs, etc) may either allocate stack frames in another segment, or
allocate other kinds of code on the stack. */
int
pc_in_call_dummy_on_stack (pc, sp, frame_address)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR frame_address;
{
return (INNER_THAN ((sp), (pc))
&& (frame_address != 0)
&& INNER_THAN ((pc), (frame_address)));
}
int
pc_in_call_dummy_at_entry_point (pc, sp, frame_address)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR frame_address;
{
return ((pc) >= CALL_DUMMY_ADDRESS ()
&& (pc) <= (CALL_DUMMY_ADDRESS () + DECR_PC_AFTER_BREAK));
}
/*
* GENERIC DUMMY FRAMES
@ -1053,6 +1110,20 @@ sigtramp_saved_pc (frame)
* being executed by the target. Also FRAME_CHAIN_VALID as
* generic_frame_chain_valid. */
/* Dummy frame. This saves the processor state just prior to setting
up the inferior function call. Older targets save the registers
target stack (but that really slows down function calls). */
struct dummy_frame
{
struct dummy_frame *next;
CORE_ADDR pc;
CORE_ADDR fp;
CORE_ADDR sp;
char *registers;
};
static struct dummy_frame *dummy_frame_stack = NULL;
/* Function: find_dummy_frame(pc, fp, sp)
@ -1073,7 +1144,7 @@ generic_find_dummy_frame (pc, fp)
dummyframe = dummyframe->next)
if (fp == dummyframe->fp || fp == dummyframe->sp)
/* The frame in question lies between the saved fp and sp, inclusive */
return dummyframe->regs;
return dummyframe->registers;
return 0;
}
@ -1082,12 +1153,14 @@ generic_find_dummy_frame (pc, fp)
Return true if this is a dummy frame created by gdb for an inferior call */
int
generic_pc_in_call_dummy (pc, fp)
generic_pc_in_call_dummy (pc, sp, fp)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR fp;
{
/* if find_dummy_frame succeeds, then PC is in a call dummy */
return (generic_find_dummy_frame (pc, fp) != 0);
/* Note: SP and not FP is passed on. */
return (generic_find_dummy_frame (pc, sp) != 0);
}
/* Function: read_register_dummy
@ -1137,10 +1210,12 @@ generic_push_dummy_frame ()
dummy_frame = dummy_frame->next;
dummy_frame = xmalloc (sizeof (struct dummy_frame));
dummy_frame->registers = xmalloc (REGISTER_BYTES);
dummy_frame->pc = read_register (PC_REGNUM);
dummy_frame->sp = read_register (SP_REGNUM);
dummy_frame->fp = fp;
read_register_bytes (0, dummy_frame->regs, REGISTER_BYTES);
read_register_bytes (0, dummy_frame->registers, REGISTER_BYTES);
dummy_frame->next = dummy_frame_stack;
dummy_frame_stack = dummy_frame;
}
@ -1174,8 +1249,10 @@ generic_pop_dummy_frame ()
if (!dummy_frame)
error ("Can't pop dummy frame!");
dummy_frame_stack = dummy_frame->next;
write_register_bytes (0, dummy_frame->regs, REGISTER_BYTES);
write_register_bytes (0, dummy_frame->registers, REGISTER_BYTES);
flush_cached_frames ();
free (dummy_frame->registers);
free (dummy_frame);
}
@ -1292,7 +1369,6 @@ generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
if (raw_buffer)
read_register_gen (regnum, raw_buffer);
}
#endif /* USE_GENERIC_DUMMY_FRAMES */
void
_initialize_blockframe ()

View File

@ -88,9 +88,14 @@ watch_command PARAMS ((char *, int));
static int
can_use_hardware_watchpoint PARAMS ((struct value *));
static void break_at_finish_command PARAMS ((char *, int));
static void break_at_finish_at_depth_command PARAMS ((char *, int));
void
tbreak_command PARAMS ((char *, int));
static void tbreak_at_finish_command PARAMS ((char *, int));
static void
break_command_1 PARAMS ((char *, int, int));
@ -182,6 +187,36 @@ static void awatch_command PARAMS ((char *, int));
static void do_enable_breakpoint PARAMS ((struct breakpoint *, enum bpdisp));
static void create_solib_load_unload_event_breakpoint PARAMS ((char *hookname, int tempflag, char *dll_pathname, char *cond_string, enum bptype bp_kind));
static void create_fork_vfork_event_catchpoint PARAMS ((int tempflag, char * cond_string, enum bptype bp_kind));
static void break_at_finish_at_depth_command_1 PARAMS ((char *arg, int flag, int from_tty));
static void break_at_finish_command_1 PARAMS ((char *arg, int flag, int from_tty));
static void stop_command PARAMS ((char *arg, int from_tty));
static void stopin_command PARAMS ((char *arg, int from_tty));
static void stopat_command PARAMS ((char *arg, int from_tty));
static char *ep_find_event_name_end PARAMS ((char *arg));
static char *ep_parse_optional_if_clause PARAMS ((char **arg));
static char *ep_parse_optional_filename PARAMS ((char **arg));
static void catch_exec_command_1 PARAMS ((char *arg, int tempflag, int from_tty));
static void create_exception_catchpoint PARAMS ((int tempflag, char *cond_string, enum exception_event_kind ex_event, struct symtab_and_line *sal));
static void catch_exception_command_1 PARAMS ((enum exception_event_kind ex_event, char *arg, int tempflag, int from_tty));
static void tcatch_command PARAMS ((char *arg, int from_tty));
static void ep_skip_leading_whitespace PARAMS ((char **s));
/* Prototypes for exported functions. */
static void
@ -1327,29 +1362,26 @@ int
frame_in_dummy (frame)
struct frame_info *frame;
{
#ifdef CALL_DUMMY
#ifdef USE_GENERIC_DUMMY_FRAMES
return generic_pc_in_call_dummy (frame->pc, frame->frame);
#else
struct breakpoint *b;
if (! CALL_DUMMY_P)
return 0;
if (USE_GENERIC_DUMMY_FRAMES)
return generic_pc_in_call_dummy (frame->pc, frame->frame, frame->frame);
ALL_BREAKPOINTS (b)
{
static ULONGEST dummy[] = CALL_DUMMY;
if (b->type == bp_call_dummy
&& b->frame == frame->frame
/* We need to check the PC as well as the frame on the sparc,
for signals.exp in the testsuite. */
&& (frame->pc
>= (b->address
- sizeof (dummy) / sizeof (LONGEST) * REGISTER_SIZE))
- SIZEOF_CALL_DUMMY_WORDS / sizeof (LONGEST) * REGISTER_SIZE))
&& frame->pc <= b->address)
return 1;
}
#endif /* GENERIC_DUMMY_FRAMES */
#endif /* CALL_DUMMY */
return 0;
}
@ -2932,10 +2964,8 @@ breakpoints_info (bnum_exp, from_tty)
breakpoint_1 (bnum, 0);
}
#if MAINTENANCE_CMDS
/* ARGSUSED */
void
static void
maintenance_info_breakpoints (bnum_exp, from_tty)
char *bnum_exp;
int from_tty;
@ -2948,8 +2978,6 @@ maintenance_info_breakpoints (bnum_exp, from_tty)
breakpoint_1 (bnum, 1);
}
#endif
/* Print a message describing any breakpoints set at PC. */
static void
@ -3241,11 +3269,11 @@ re_enable_breakpoints_in_shlibs ()
static void
create_solib_load_unload_event_breakpoint (hookname, tempflag, dll_pathname, cond_string, bp_kind)
char * hookname;
int tempflag;
char * dll_pathname;
char * cond_string;
enum bptype bp_kind;
char *hookname;
int tempflag;
char *dll_pathname;
char *cond_string;
enum bptype bp_kind;
{
struct breakpoint * b;
struct symtabs_and_lines sals;
@ -3351,9 +3379,9 @@ create_solib_unload_event_breakpoint (hookname, tempflag, dll_pathname, cond_str
static void
create_fork_vfork_event_catchpoint (tempflag, cond_string, bp_kind)
int tempflag;
char * cond_string;
enum bptype bp_kind;
int tempflag;
char *cond_string;
enum bptype bp_kind;
{
struct symtab_and_line sal;
struct breakpoint * b;
@ -4092,7 +4120,7 @@ break_command (arg, from_tty)
break_command_1 (arg, 0, from_tty);
}
void
static void
break_at_finish_command (arg, from_tty)
char *arg;
int from_tty;
@ -4100,7 +4128,7 @@ break_at_finish_command (arg, from_tty)
break_at_finish_command_1 (arg, 0, from_tty);
}
void
static void
break_at_finish_at_depth_command (arg, from_tty)
char *arg;
int from_tty;
@ -4116,7 +4144,7 @@ tbreak_command (arg, from_tty)
break_command_1 (arg, BP_TEMPFLAG, from_tty);
}
void
static void
tbreak_at_finish_command (arg, from_tty)
char *arg;
int from_tty;
@ -4531,6 +4559,7 @@ struct sal_chain
struct symtab_and_line sal;
};
#if 0
/* Not really used -- invocation in handle_gnu_4_16_catch_command
had been commented out in the v.4.16 sources, and stays
disabled there now because "catch NAME" syntax isn't allowed.
@ -4594,6 +4623,7 @@ map_catch_names (args, function)
while (*p == ' ' || *p == '\t') p++;
}
}
#endif
/* This shares a lot of code with `print_frame_label_vars' from stack.c. */
@ -4711,7 +4741,7 @@ get_catch_sals (this_level_only)
static void
ep_skip_leading_whitespace (s)
char ** s;
char **s;
{
if ((s == NULL) || (*s == NULL))
return;
@ -4725,7 +4755,7 @@ ep_skip_leading_whitespace (s)
the token is returned. Else, NULL is returned. */
static char *
ep_find_event_name_end (arg)
char * arg;
char *arg;
{
char * s = arg;
char * event_name_end = NULL;
@ -4758,7 +4788,7 @@ ep_find_event_name_end (arg)
if clause in the arg string. */
static char *
ep_parse_optional_if_clause (arg)
char ** arg;
char **arg;
{
char * cond_string;
@ -4791,7 +4821,7 @@ ep_parse_optional_if_clause (arg)
future access should copy it to their own buffers. */
static char *
ep_parse_optional_filename (arg)
char ** arg;
char **arg;
{
static char filename [1024];
char * arg_p = *arg;
@ -4821,12 +4851,14 @@ ep_parse_optional_filename (arg)
typedef enum {catch_fork, catch_vfork} catch_fork_kind;
static void catch_fork_command_1 PARAMS ((catch_fork_kind fork_kind, char *arg, int tempflag, int from_tty));
static void
catch_fork_command_1 (fork_kind, arg, tempflag, from_tty)
catch_fork_kind fork_kind;
char * arg;
int tempflag;
int from_tty;
catch_fork_kind fork_kind;
char *arg;
int tempflag;
int from_tty;
{
char * cond_string = NULL;
@ -4859,9 +4891,9 @@ catch_fork_command_1 (fork_kind, arg, tempflag, from_tty)
static void
catch_exec_command_1 (arg, tempflag, from_tty)
char * arg;
int tempflag;
int from_tty;
char *arg;
int tempflag;
int from_tty;
{
char * cond_string = NULL;
@ -4979,10 +5011,10 @@ catch_unload_command_1 (arg, tempflag, from_tty)
static void
create_exception_catchpoint (tempflag, cond_string, ex_event, sal)
int tempflag;
char * cond_string;
enum exception_event_kind ex_event;
struct symtab_and_line * sal;
int tempflag;
char *cond_string;
enum exception_event_kind ex_event;
struct symtab_and_line *sal;
{
struct breakpoint * b;
int i;
@ -5020,10 +5052,10 @@ create_exception_catchpoint (tempflag, cond_string, ex_event, sal)
static void
catch_exception_command_1 (ex_event, arg, tempflag, from_tty)
enum exception_event_kind ex_event;
char * arg;
int tempflag;
int from_tty;
enum exception_event_kind ex_event;
char *arg;
int tempflag;
int from_tty;
{
char * cond_string = NULL;
struct symtab_and_line * sal = NULL;
@ -6587,8 +6619,6 @@ are set to the address of the last breakpoint listed.\n\n\
Convenience variable \"$bpnum\" contains the number of the last\n\
breakpoint set.", NULL));
#if MAINTENANCE_CMDS
add_cmd ("breakpoints", class_maintenance, maintenance_info_breakpoints,
concat ("Status of all breakpoints, or breakpoint number NUMBER.\n\
The \"Type\" column indicates one of:\n\
@ -6608,8 +6638,6 @@ Convenience variable \"$bpnum\" contains the number of the last\n\
breakpoint set.", NULL),
&maintenanceinfolist);
#endif /* MAINTENANCE_CMDS */
add_com ("catch", class_breakpoint, catch_command,
"Set catchpoints to catch events.\n\
Raised signals may be caught:\n\

View File

@ -112,6 +112,7 @@ enum bptype {
commands for C++ exception handling. */
bp_catch_catch,
bp_catch_throw
};

View File

@ -913,7 +913,7 @@ c_type_print_base (type, stream, show, level)
char *p;
char *demangled_no_class = demangled_name;
while (p = strchr (demangled_no_class, ':'))
while ((p = strchr (demangled_no_class, ':')))
{
demangled_no_class = p;
if (*++demangled_no_class == ':')

View File

@ -84,21 +84,6 @@ static CORE_ADDR current_source_end_addr;
static bfd *nlist_bfd_global;
static int nlist_nsyms_global;
/* Vector of line number information. */
static struct linetable *line_vector;
/* Index of next entry to go in line_vector_index. */
static int line_vector_index;
/* Last line number recorded in the line vector. */
static int prev_line_number;
/* Number of elements allocated for line_vector currently. */
static int line_vector_length;
/* Pointers to scratch storage, used for reading raw symbols and auxents. */
@ -252,8 +237,6 @@ static void complete_symtab PARAMS ((char *, CORE_ADDR, unsigned int));
static void coff_start_symtab PARAMS ((char *));
static void coff_record_line PARAMS ((int, CORE_ADDR));
static struct type *coff_alloc_type PARAMS ((int));
static struct type **coff_lookup_type PARAMS ((int));
@ -440,30 +423,6 @@ coff_alloc_type (index)
return type;
}
/* Record a line number entry for line LINE at address PC.
FIXME: Use record_line instead. */
static void
coff_record_line (line, pc)
int line;
CORE_ADDR pc;
{
struct linetable_entry *e;
/* Make sure line vector is big enough. */
if (line_vector_index + 2 >= line_vector_length)
{
line_vector_length *= 2;
line_vector = (struct linetable *)
xrealloc ((char *) line_vector, sizeof (struct linetable)
+ (line_vector_length
* sizeof (struct linetable_entry)));
}
e = line_vector->item + line_vector_index++;
e->line = line; e->pc = pc;
}
/* Start a new symtab for a new source file.
This is called when a COFF ".file" symbol is seen;
it indicates the start of data for one original source file. */
@ -484,17 +443,6 @@ coff_start_symtab (name)
last_source_start_addr in coff_end_symtab. */
0);
record_debugformat ("COFF");
/* Initialize the source file line number information for this file. */
if (line_vector) /* Unlikely, but maybe possible? */
free ((PTR)line_vector);
line_vector_index = 0;
line_vector_length = 1000;
prev_line_number = -2; /* Force first line number to be explicit */
line_vector = (struct linetable *)
xmalloc (sizeof (struct linetable)
+ line_vector_length * sizeof (struct linetable_entry));
}
/* Save the vital information from when starting to read a file,
@ -535,26 +483,12 @@ coff_end_symtab (objfile)
last_source_start_addr = current_source_start_addr;
/* For no good reason, this file stores the number of entries in a
separate variable instead of in line_vector->nitems. Fix it. */
if (line_vector)
line_vector->nitems = line_vector_index;
/* For COFF, we only have one subfile, so we can just look at
subfiles and not worry about there being other elements in the
chain. We fill in various fields now because we didn't know them
before (or because doing it now is simply an artifact of how this
file used to be written). */
subfiles->line_vector = line_vector;
symtab = end_symtab (current_source_end_addr, objfile, 0);
if (symtab != NULL)
free_named_symtabs (symtab->filename);
/* Reinitialize for beginning of new file. */
line_vector = 0;
line_vector_length = -1;
last_source_file = NULL;
}
@ -683,7 +617,6 @@ coff_symfile_read (objfile, section_offsets, mainline)
/* Set a few file-statics that give us specific information about
the particular COFF file format we're reading. */
local_linesz = cdata->local_linesz;
local_n_btmask = cdata->local_n_btmask;
local_n_btshft = cdata->local_n_btshft;
local_n_tmask = cdata->local_n_tmask;
@ -1086,6 +1019,7 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
new->name =
process_coff_symbol (&fcn_cs_saved, &fcn_aux_saved,
section_offsets, objfile);
record_line (current_subfile, fcn_first_line, cs->c_value);
}
else if (STREQ (cs->c_name, ".ef"))
{
@ -1458,7 +1392,7 @@ enter_linenos (file_offset, first_line, last_line, section_offsets)
rawptr += local_linesz;
/* The next function, or the sentinel, will have L_LNNO32 zero; we exit. */
if (L_LNNO32 (&lptr) && L_LNNO32 (&lptr) <= last_line)
coff_record_line (first_line + L_LNNO32 (&lptr),
record_line (current_subfile, first_line + L_LNNO32 (&lptr),
lptr.l_addr.l_paddr
+ ANOFFSET (section_offsets, SECT_OFF_TEXT));
else

View File

@ -116,6 +116,13 @@
size_t, and assorted other type changes. */
#undef PROC_SERVICE_IS_OLD
/* If you want to specify a default CPU variant, define this to be its
name, as a C string. */
#undef TARGET_CPU_DEFAULT
/* Define if the simulator is being linked in. */
#undef WITH_SIM
/* Set to true if the save_state_t structure is present */
#define HAVE_STRUCT_SAVE_STATE_T 0
@ -248,6 +255,9 @@
/* Define if you have the <sys/reg.h> header file. */
#undef HAVE_SYS_REG_H
/* Define if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H

View File

@ -429,7 +429,7 @@ long read_register_stack_integer ();
/* Because INIT_FRAME_PC gets passed fromleaf, that's where we init
not only ->pc and ->frame, but all the extra stuff, when called from
get_prev_frame_info, that is. */
get_prev_frame, that is. */
#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) init_extra_frame_info(fci)
void init_extra_frame_info ();
@ -506,7 +506,13 @@ extern CORE_ADDR frame_locals_address ();
/* Provide our own get_saved_register. HAVE_REGISTER_WINDOWS is insufficient
because registers get renumbered on the a29k without getting saved. */
#define GET_SAVED_REGISTER
#ifdef __STDC__
enum lval_type;
struct frame_info;
#endif
void a29k_get_saved_register PARAMS ((char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lvalp));
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
/* Call function stuff. */

View File

@ -15,7 +15,7 @@ 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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Figure out where the longjmp will land. We expect that we have just entered
longjmp and haven't yet setup the stack frame, so the args are still in the

View File

@ -110,7 +110,7 @@ alpha_saved_pc_after_call PARAMS ((struct frame_info *));
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",\
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",\
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "fpcr",\
"pc", "vfp", \
}
@ -132,6 +132,7 @@ alpha_saved_pc_after_call PARAMS ((struct frame_info *));
#define ZERO_REGNUM 31 /* Read-only register, always 0 */
#define FP0_REGNUM 32 /* Floating point register 0 */
#define FPA0_REGNUM 48 /* First float arg during a subr call */
#define FPCR_REGNUM 63 /* Floating point control register */
#define PC_REGNUM 64 /* Contains program counter */
#define FP_REGNUM 65 /* Virtual frame pointer */
@ -176,7 +177,7 @@ alpha_saved_pc_after_call PARAMS ((struct frame_info *));
memory format is an integer with 4 bytes or less, as the representation
of integers in floating point registers is different. */
#define REGISTER_CONVERTIBLE(N) ((N) >= FP0_REGNUM && (N) < FP0_REGNUM + 32)
#define REGISTER_CONVERTIBLE(N) ((N) >= FP0_REGNUM && (N) < FP0_REGNUM + 31)
/* Convert data from raw format for register REGNUM in buffer FROM
to virtual format with type TYPE in buffer TO. */
@ -198,7 +199,7 @@ alpha_register_convert_to_raw PARAMS ((struct type *, int, char *, char *));
of data in register N. */
#define REGISTER_VIRTUAL_TYPE(N) \
(((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) \
(((N) >= FP0_REGNUM && (N) < FP0_REGNUM+31) \
? builtin_type_double : builtin_type_long) \
/* Store the address of the place in which to copy the structure the

View File

@ -15,7 +15,7 @@ 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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if !defined (HOST_BYTE_ORDER)
#define HOST_BYTE_ORDER LITTLE_ENDIAN

View File

@ -15,7 +15,7 @@ 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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if !defined (HOST_BYTE_ORDER)
#define HOST_BYTE_ORDER LITTLE_ENDIAN

View File

@ -1,5 +1,5 @@
/* Definitions to make GDB target for an ARM
Copyright 1986, 1987, 1989, 1991, 1993, 1997, 1998 Free Software Foundation, Inc.
Copyright 1986-1989, 1991, 1993-1999 Free Software Foundation, Inc.
This file is part of GDB.
@ -268,7 +268,8 @@ extern use_struct_convention_fn arm_use_struct_convention;
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
(extract_address ((PTR) (REGBUF), REGISTER_RAW_SIZE(0)))
/* Specify that for the native compiler variables for a particular
lexical context are listed after the beginning LBRAC instead of

View File

@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Contributed by Martin Hunt, hunt@cygnus.com */
#define GDB_TARGET_IS_D10V
/* #define GDB_TARGET_IS_D10V - moved to gdbarch.h */
/* Define the bit, byte, and word ordering of the machine. */
@ -262,7 +262,7 @@ extern void d10v_frame_find_saved_regs PARAMS ((struct frame_info *, struct fram
extern void d10v_pop_frame PARAMS ((struct frame_info *frame));
#define POP_FRAME generic_pop_current_frame (d10v_pop_frame)
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY {0}
#define CALL_DUMMY_START_OFFSET (0)
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
@ -272,15 +272,15 @@ extern void d10v_pop_frame PARAMS ((struct frame_info *frame));
extern CORE_ADDR d10v_push_return_address PARAMS ((CORE_ADDR pc, CORE_ADDR sp));
#define PUSH_RETURN_ADDRESS(PC, SP) d10v_push_return_address (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
/* #define PC_IN_CALL_DUMMY(pc, sp, frame_address) ( pc == IMEM_START + 4 ) */
#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
/* override the default get_saved_register function with one that
takes account of generic CALL_DUMMY frames */
#define GET_SAVED_REGISTER
#define get_saved_register generic_get_saved_register
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
sp = d10v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))

View File

@ -1,4 +1,5 @@
/* Parameters for execution on a Fujitsu FR30 processor.
Copyright 1999, Free Software Foundation, Inc.
This file is part of GDB.
@ -95,7 +96,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern void fr30_pop_frame PARAMS ((void));
#define POP_FRAME fr30_pop_frame()
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY {0}
#define CALL_DUMMY_START_OFFSET (0)
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
@ -129,7 +130,7 @@ extern void fr30_pop_frame PARAMS ((void));
#define STORE_STRUCT_RETURN(ADDR, SP) \
{ write_register (RETVAL_REG, (ADDR)); }
#define FRAME_ARGS_ADDRESS(fi) (fi->frame)
#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
/* Return number of args passed to a frame.
@ -160,11 +161,14 @@ extern CORE_ADDR fr30_frame_saved_pc PARAMS ((struct frame_info *));
extern CORE_ADDR fr30_skip_prologue PARAMS ((CORE_ADDR pc));
#define SKIP_PROLOGUE(pc) pc = fr30_skip_prologue (pc)
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format. */
/* Write into appropriate registers a function return value of type
TYPE, given in virtual format. VALBUF is in the target byte order;
it's typically the VALUE_CONTENTS of some struct value, and those
are in the target's byte order. */
extern void fr30_store_return_value PARAMS ((struct type *type, char *valbuf));
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
(fr30_store_return_value ((TYPE), (VALBUF)))
/* Put here the code to store, into a struct frame_saved_regs,
the addresses of the saved registers of frame described by FRAME_INFO.
@ -211,7 +215,7 @@ fr30_push_arguments PARAMS ((int nargs, struct value **args, CORE_ADDR sp,
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
(SP) = fr30_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
/* Fujitsu's ABI requires all structs to be passed using a pointer.
That is obviously not very efficient, so I am leaving the definitions
@ -230,3 +234,12 @@ fr30_push_arguments PARAMS ((int nargs, struct value **args, CORE_ADDR sp,
#endif
/* alway return struct by value by input pointer */
#define USE_STRUCT_CONVENTION(GCC_P, TYPE) 1
/* The stack should always be aligned on a four-word boundary. */
#define STACK_ALIGN(len) (((len) + 3) & ~3)
/* I think the comment about this in value_arg_coerce is wrong; this
should be true on any system where you can rely on the prototyping
information. When this is true, value_arg_coerce will promote
floats to doubles iff the function is not prototyped. */
#define COERCE_FLOAT_TO_DOUBLE 1

View File

@ -271,7 +271,7 @@ typedef unsigned short INSN_WORD;
* CALL_DUMMY stuff:
*/
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY {0}
#define CALL_DUMMY_LENGTH (0)
#define CALL_DUMMY_ADDRESS() entry_point_address ()
@ -286,7 +286,7 @@ extern CORE_ADDR h8300_push_arguments PARAMS ((int nargs,
CORE_ADDR struct_addr));
extern CORE_ADDR h8300_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
#define FIX_CALL_DUMMY(DUMMY, START_SP, FUNADDR, NARGS, ARGS, TYPE, GCCP)
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
(SP) = h8300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
@ -298,6 +298,8 @@ extern CORE_ADDR h8300_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
/* override the standard get_saved_register function with
one that takes account of generic CALL_DUMMY frames */
#define GET_SAVED_REGISTER
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)

View File

@ -1,8 +1,19 @@
MH_CFLAGS=-D__GO32__ -D__MSDOS__
XDEPFILES= go32-xdep.o
# Host: Intel x86 running DJGPP
# we don't need mmalloc on DJGPP
MH_CFLAGS= -DNO_MMALLOC
MMALLOC=
MMALLOC_CFLAGS=
XM_FILE= xm-go32.h
HOST_IPC=-DDOS_IPC
XDEPFILES=
NAT_FILE= nm-go32.h
NATDEPFILES= go32-nat.o
TERMCAP=
HOST_IPC=
SER_HARDWIRE= ser-go32.o
CC=i386-go32-gcc -O2 -fno-omit-frame-pointer
CC= gcc
XM_CLIBS= -ldbg

View File

@ -19,7 +19,7 @@ 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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Basically, its a lot like the older versions ... */
#include "i386/nm-i386sco.h"

View File

@ -15,7 +15,7 @@ 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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "i386/tm-i386bsd.h"

View File

@ -15,7 +15,7 @@ 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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef TM_I386_H
#define TM_I386_H 1

View File

@ -1,5 +1,5 @@
/* Definitions for hosting on GO32, for GDB.
Copyright 1991, 1992 Free Software Foundation, Inc.
/* Host-dependent definitions for Intel x86 running DJGPP.
Copyright 1993-1996 Free Software Foundation, Inc.
This file is part of GDB.
@ -18,14 +18,20 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define HOST_BYTE_ORDER LITTLE_ENDIAN
#include "fopen-bin.h"
/* Define this lseek(n) != nth byte of file */
#define LSEEK_NOT_LINEAR
#define CANT_FORK
#undef QUIT
#define QUIT { pollquit(); }
#define GDBINIT_FILENAME "gdb.ini"
#define SLASH_P(X) ((X)=='\\' || (X) == '/')
#define ROOTED_P(X) ((SLASH_P((X)[0]))|| ((X)[1] ==':'))
#define SLASH_CHAR '/'
#define SLASH_STRING "/"
#define CRLF_SOURCE_FILES
#define DIRNAME_SEPARATOR ';'
#define HOST_I386

View File

@ -193,7 +193,7 @@ extern use_struct_convention_fn m32r_use_struct_convention;
/* generic dummy frame stuff */
#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
/* target-specific dummy_frame stuff */
@ -222,9 +222,11 @@ extern CORE_ADDR m32r_push_arguments PARAMS ((int nargs,
/* override the standard get_saved_register function with
one that takes account of generic CALL_DUMMY frames */
#define GET_SAVED_REGISTER
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY {0}
#define CALL_DUMMY_LENGTH (0)
#define CALL_DUMMY_START_OFFSET (0)

View File

@ -177,7 +177,7 @@ extern CORE_ADDR mn10200_skip_prologue PARAMS ((CORE_ADDR));
extern void mn10200_pop_frame PARAMS ((struct frame_info *));
#define POP_FRAME mn10200_pop_frame (get_current_frame ())
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY {0}
#define CALL_DUMMY_START_OFFSET (0)
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
@ -196,7 +196,7 @@ mn10200_push_arguments PARAMS ((int, struct value **, CORE_ADDR,
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
(SP) = mn10200_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
#define REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \
(TYPE_LENGTH (TYPE) > 8)
@ -206,7 +206,8 @@ extern use_struct_convention_fn mn10200_use_struct_convention;
/* Override the default get_saved_register function with
one that takes account of generic CALL_DUMMY frames. */
#define GET_SAVED_REGISTER
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
/* Define this for Wingdb */
#define TARGET_MN10200

View File

@ -124,7 +124,7 @@ extern CORE_ADDR mn10300_skip_prologue PARAMS ((CORE_ADDR));
extern void mn10300_pop_frame PARAMS ((struct frame_info *));
#define POP_FRAME mn10300_pop_frame (get_current_frame ())
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY {0}
#define CALL_DUMMY_START_OFFSET (0)
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
@ -143,7 +143,7 @@ mn10300_push_arguments PARAMS ((int, struct value **, CORE_ADDR,
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
(SP) = mn10300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
#define REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \
(TYPE_LENGTH (TYPE) > 8)
@ -153,7 +153,8 @@ extern use_struct_convention_fn mn10300_use_struct_convention;
/* override the default get_saved_register function with
one that takes account of generic CALL_DUMMY frames */
#define GET_SAVED_REGISTER
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
/* Cons up virtual frame pointer for trace */
extern void mn10300_virtual_frame_pointer PARAMS ((CORE_ADDR, long *, long *));

View File

@ -16,7 +16,7 @@
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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef __NM_GNU_H__
#define __NM_GNU_H__
@ -40,6 +40,4 @@ extern char *gnu_target_pid_to_str (int pid);
#include "solib.h"
#define NO_CORE_OPS
#define MAINTENANCE_CMDS 1
#endif /* __NM_GNU_H__ */

View File

@ -279,3 +279,10 @@ extern char *hpux_pid_to_str PARAMS ((int pid));
#endif /* HAVE_HPUX_THREAD_SUPPORT */
#define HPUXHPPA
#define MAY_SWITCH_FROM_INFERIOR_PID (1)
#define MAY_FOLLOW_EXEC (1)
#define USE_THREAD_STEP_NEEDED (1)

View File

@ -469,7 +469,7 @@ hppa_frame_find_saved_regs PARAMS ((struct frame_info *,
/* Push an empty stack frame, to record the current PC, etc. */
#define PUSH_DUMMY_FRAME push_dummy_frame (&inf_status)
#define PUSH_DUMMY_FRAME push_dummy_frame (inf_status)
extern void push_dummy_frame PARAMS ((struct inferior_status *));
/* Discard from the stack the innermost frame,

View File

@ -15,7 +15,7 @@ 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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "rs6000/nm-rs6000.h"

View File

@ -15,7 +15,7 @@ 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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Use generic RS6000 definitions. */
#include "rs6000/tm-rs6000.h"

View File

@ -15,7 +15,7 @@ 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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef TM_PPC_AIX_H
#define TM_PPC_AIX_H

View File

@ -46,8 +46,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* FIXME: This just checks for the end of the stack, which is broken
for things like stepping through gcc nested function stubs. */
#undef PC_IN_CALL_DUMMY
#define PC_IN_CALL_DUMMY(STOP_PC, STOP_SP, STOP_FRAME_ADDR) \
(STOP_SP < STOP_PC)
/* generic dummy frame stuff */
@ -71,9 +69,10 @@ extern CORE_ADDR rs6000_push_arguments PARAMS ((int nargs,
/* override the standard get_saved_register function with
one that takes account of generic CALL_DUMMY frames */
#define GET_SAVED_REGISTER
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
#define CALL_DUMMY_ADDRESS() entry_point_address ()

View File

@ -16,7 +16,7 @@ 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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "xm-aix4.h"

View File

@ -15,7 +15,7 @@ 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. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef TM_RS6000_AIX4_H
#define TM_RS6000_AIX4_H

View File

@ -239,7 +239,7 @@ extern CORE_ADDR sh_push_arguments PARAMS ((int nargs,
unsigned char struct_return,
CORE_ADDR struct_addr));
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY {0}
#define CALL_DUMMY_LENGTH (0)
#define CALL_DUMMY_START_OFFSET (0)
@ -255,13 +255,14 @@ extern CORE_ADDR sh_frame_chain PARAMS ((struct frame_info *));
#define FRAME_CHAIN(FRAME) sh_frame_chain(FRAME)
#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
#define FRAME_CHAIN_VALID(FP, FRAME) generic_frame_chain_valid (FP, FRAME)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
(SP) = sh_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
/* override the standard get_saved_register function with
one that takes account of generic CALL_DUMMY frames */
#define GET_SAVED_REGISTER
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
/* Discard from the stack the innermost frame, restoring all saved
registers. */

View File

@ -206,7 +206,13 @@ extern CORE_ADDR sparc_pc_adjust PARAMS ((CORE_ADDR));
outs change into ins in different frames. HAVE_REGISTER_WINDOWS can't
deal with this case and also handle flat frames at the same time. */
#define GET_SAVED_REGISTER 1
#ifdef __STDC__
struct frame_info;
enum lval_type;
#endif
void sparc_get_saved_register PARAMS ((char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lvalp));
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
sparc_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
/* Number of bytes of storage in the actual machine representation
for register N. */

View File

@ -137,7 +137,7 @@ extern CORE_ADDR v850_skip_prologue PARAMS ((CORE_ADDR pc));
extern void v850_pop_frame PARAMS ((struct frame_info *frame));
#define POP_FRAME v850_pop_frame (get_current_frame ())
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY {0}
#define CALL_DUMMY_START_OFFSET (0)
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
@ -160,14 +160,15 @@ v850_push_arguments PARAMS ((int nargs, struct value **args, CORE_ADDR sp,
#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
extern use_struct_convention_fn v850_use_struct_convention;
#define USE_STRUCT_CONVENTION(GCC_P, TYPE) v850_use_struct_convention (GCC_P, TYPE);
/* override the default get_saved_register function with
one that takes account of generic CALL_DUMMY frames */
#define GET_SAVED_REGISTER
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
/* Define this for Wingdb */

738
gdb/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -56,6 +56,7 @@ i[3456]86-*-dgux*) gdb_host=i386dgux ;;
i[3456]86-*-freebsd*) gdb_host=fbsd ;;
i[3456]86-*-netbsd*) gdb_host=nbsd ;;
i[3456]86-*-go32*) gdb_host=go32 ;;
i[3456]86-*-msdosdjgpp*) gdb_host=go32 ;;
i[3456]86-*-linux*) gdb_host=linux ;;
i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
i[3456]86-*-mach3*) gdb_host=i386m3 ;;
@ -104,7 +105,7 @@ m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
m88*-motorola-sysv*) gdb_host=delta88 ;;
m88*-*-*) gdb_host=m88k ;;
mips-dec-mach3*) gdb_host=mach3 ;;
mips-dec-mach3*) gdb_host=mipsm3 ;;
mips-dec-*) gdb_host=decstation ;;
mips-little-*) gdb_host=littlemips ;;
mips-sgi-irix3*) gdb_host=irix3 ;;

View File

@ -54,6 +54,7 @@ changequote(,)dnl
dnl
changequote([,])dnl
AC_PROG_AWK
AC_PROG_INSTALL
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
@ -69,7 +70,7 @@ AC_CHECK_HEADERS(ctype.h curses.h endian.h link.h \
memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
string.h sys/procfs.h sys/ptrace.h sys/reg.h \
term.h termio.h termios.h unistd.h wait.h sys/wait.h \
wchar.h wctype.h asm/debugreg.h sys/debugreg.h)
wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h)
AC_HEADER_STAT
AC_C_CONST
@ -109,16 +110,20 @@ AC_MSG_RESULT($gdb_cv_hpux_sswide)
# Also detect which type of /proc is in use, such as for Unixware.
if test "${target}" = "${host}"; then
gdb_cv_hostos_is_solaris=no
case "${host}" in
i[[3456]]86-*-linux*)
AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED,2)
AC_DEFINE(sys_quotactl)
;;
*-*-solaris*)
gdb_cv_hostos_is_solaris=yes ;;
esac
AC_MSG_CHECKING(for directory proc entries)
# The [gdb_host != sun4sol2] hack is because Solaris does provide the
# multiple procfs files as of Solaris 2.6, but GDB can't use it right now.
if test "$ac_cv_header_sys_procfs_h" = yes -a "$gdb_host" != sun4sol2 \
if test "$ac_cv_header_sys_procfs_h" = yes -a \
"$gdb_cv_hostos_is_solaris" = no \
-a -d /proc/$$ \
-a -f /proc/$$/ctl \
-a -f /proc/$$/as \
@ -405,6 +410,19 @@ if test x$want_mmalloc = xtrue; then
MMALLOC='../mmalloc/libmmalloc.a'
fi
# In the Cygwin environment, we need some additional flags.
AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin,
[AC_EGREP_CPP(lose, [
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
lose
#endif],[gdb_cv_os_cygwin=yes],[gdb_cv_os_cygwin=no])])
DLLTOOL=${DLLTOOL-dlltool}
WINDRES=${WINDRES-windres}
AC_SUBST(DLLTOOL)
AC_SUBST(WINDRES)
dnl Figure out which term library to use.
if test x$gdb_cv_os_cygwin = xyes; then
TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
@ -425,8 +443,44 @@ fi
AC_SUBST(TERM_LIB)
AC_PATH_X
# Unlike the sim directory, whether a simulator is linked is controlled by
# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
# This code just checks for a few cases where we'd like to ignore those
# definitions, even when they're present in the '.mt' file. These cases
# are when --disable-sim is specified, or if the simulator directory is
# not part of the soruce tree.
#
AC_ARG_ENABLE(sim,
[ --enable-sim Link gdb with simulator],
[echo "enable_sim = $enable_sim";
echo "enableval = ${enableval}";
case "${enableval}" in
yes) ignore_sim=false ;;
no) ignore_sim=true ;;
*) ignore_sim=false ;;
esac],
[ignore_sim=false])
if test ! -d "${srcdir}/../sim"; then
ignore_sim=true
fi
if test "${ignore_sim}" = "true"; then
IGNORE_SIM="SIM="
IGNORE_SIM_OBS="SIM_OBS="
else
IGNORE_SIM=""
IGNORE_SIM_OBS=""
AC_DEFINE(WITH_SIM)
fi
AC_SUBST(IGNORE_SIM)
AC_SUBST(IGNORE_SIM_OBS)
AC_SUBST(ENABLE_CFLAGS)
AC_SUBST(CONFIG_OBS)

View File

@ -50,17 +50,8 @@ alpha*-*-linux*) gdb_target=alpha-linux ;;
arc-*-*) gdb_target=arc ;;
arm-*-* | thumb-*-* | strongarm-*-*) gdb_target=arm
# rdi doesn't work for wingdb yet
case $gdb_host in
windows) ;;
*)
configdirs="$configdirs rdi-share"
CONFIG_OBS="$CONFIG_OBS remote-rdi.o rdi-share/libangsd.a"
;;
esac
;;
arm-*-* | thumb-*-* | strongarm-*-*)
gdb_target=arm ;;
c1-*-*) gdb_target=convex ;;
c2-*-*) gdb_target=convex ;;
@ -94,13 +85,14 @@ i[3456]86-*-freebsd*) gdb_target=fbsd ;;
i[3456]86-*-netbsd*) gdb_target=nbsd ;;
i[3456]86-*-os9k) gdb_target=i386os9k ;;
i[3456]86-*-go32*) gdb_target=i386aout ;;
i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
i[3456]86-*-lynxos*) gdb_target=i386lynx
configdirs="${configdirs} gdbserver" ;;
i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
i[3456]86-*-sunos*) gdb_target=sun386 ;;
i[3456]86-*-sysv4.2MP) gdb_target=i386v42mp ;;
i[3456]86-*-sysv4.2uw2*) gdb_target=i386v42mp ;;
i[3456]86-*-sysv4.2*) gdb_target=i386v42mp ;;
i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
i[3456]86-*-sysv5*) gdb_target=i386v42mp ;;
i[3456]86-*-unixware2*) gdb_target=i386v42mp ;;
i[3456]86-*-unixware*) gdb_target=i386v4 ;;
i[3456]86-*-sco3.2v4*) gdb_target=i386sco4 ;;
@ -118,12 +110,12 @@ i[3456]86-*-netware*) gdb_target=i386nw
configdirs="${configdirs} nlm" ;;
i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
i[3456]86-*-cygwin*) gdb_target=cygwin ;;
i960-*-bout*) gdb_target=vxworks960 ;;
i960-nindy-coff*) gdb_target=nindy960 ;;
i960-*-coff*) gdb_target=mon960 ;;
i960-nindy-elf*) gdb_target=nindy960 ;;
i960-*-elf*) gdb_target=mon960 ;;
i960-*-nindy*) gdb_target=nindy960 ;;
i960-*-vxworks*) gdb_target=vxworks960 ;;
@ -266,6 +258,8 @@ sparc64-*-*) gdb_target=sp64 ;;
tahoe-*-*) gdb_target=tahoe ;;
tic80-*-*) gdb_target=tic80
configdirs="${configdirs} gdbserver" ;;
vax-*-*) gdb_target=vax ;;

View File

@ -123,9 +123,6 @@ static struct user u;
static thread_t th;
static proc_t pr;
/* The registers of the currently selected thread. */
extern char registers[REGISTER_BYTES];
/* Vector and communication registers from core dump or from inferior.
These are read on demand, ie, not normally valid. */

View File

@ -37,8 +37,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "symfile.h"
#include "objfiles.h"
extern char registers[];
/* Local function declarations. */
static void call_extra_exec_file_hooks PARAMS ((char *filename));

View File

@ -95,15 +95,18 @@ core_close (quitting)
{
inferior_pid = 0; /* Avoid confusion from thread stuff */
/* Clear out solib state while the bfd is still open. See
comments in clear_solib in solib.c. */
#ifdef CLEAR_SOLIB
CLEAR_SOLIB ();
#endif
name = bfd_get_filename (core_bfd);
if (!bfd_close (core_bfd))
warning ("cannot close \"%s\": %s",
name, bfd_errmsg (bfd_get_error ()));
free (name);
core_bfd = NULL;
#ifdef CLEAR_SOLIB
CLEAR_SOLIB ();
#endif
if (core_ops.to_sections)
{
free ((PTR)core_ops.to_sections);

View File

@ -63,7 +63,6 @@ extern int have_symbol_file_p();
extern jmp_buf stack_jmp;
extern int errno;
extern char registers[REGISTER_BYTES];
void
fetch_inferior_registers (regno)
@ -310,7 +309,6 @@ fill_gregset (gregsetp, regno)
{
int regi;
register greg_t *regp = (greg_t *) gregsetp;
extern char registers[];
for (regi = 0 ; regi <= R_R31 ; regi++)
if ((regno == -1) || (regno == regi))

View File

@ -552,6 +552,45 @@ d10v_push_return_address (pc, sp)
}
/* When arguments must be pushed onto the stack, they go on in reverse
order. The below implements a FILO (stack) to do this. */
struct stack_item
{
int len;
struct stack_item *prev;
void *data;
};
static struct stack_item *push_stack_item PARAMS ((struct stack_item *prev, void *contents, int len));
static struct stack_item *
push_stack_item (prev, contents, len)
struct stack_item *prev;
void *contents;
int len;
{
struct stack_item *si;
si = xmalloc (sizeof (struct stack_item));
si->data = xmalloc (len);
si->len = len;
si->prev = prev;
memcpy (si->data, contents, len);
return si;
}
static struct stack_item *pop_stack_item PARAMS ((struct stack_item *si));
static struct stack_item *
pop_stack_item (si)
struct stack_item *si;
{
struct stack_item *dead = si;
si = si->prev;
free (dead->data);
free (dead);
return si;
}
CORE_ADDR
d10v_push_arguments (nargs, args, sp, struct_return, struct_addr)
int nargs;
@ -562,6 +601,7 @@ d10v_push_arguments (nargs, args, sp, struct_return, struct_addr)
{
int i;
int regnum = ARG1_REGNUM;
struct stack_item *si = NULL;
/* Fill in registers and arg lists */
for (i = 0; i < nargs; i++)
@ -598,9 +638,9 @@ d10v_push_arguments (nargs, args, sp, struct_return, struct_addr)
else
{
char ptr[2];
sp -= 2;
/* arg will go onto stack */
store_address (ptr, val & 0xffff, 2);
write_memory (sp, ptr, 2);
si = push_stack_item (si, ptr, 2);
}
}
else
@ -631,13 +671,20 @@ d10v_push_arguments (nargs, args, sp, struct_return, struct_addr)
}
else
{
/* arg goes straight on stack */
regnum = ARGN_REGNUM + 1;
sp = (sp - len) & ~1;
write_memory (sp, contents, len);
/* arg will go onto stack */
regnum = ARGN_REGNUM + 1;
si = push_stack_item (si, contents, len);
}
}
}
while (si)
{
sp = (sp - si->len) & ~1;
write_memory (sp, si->data, si->len);
si = pop_stack_item (si);
}
return sp;
}

View File

@ -1,5 +1,5 @@
/* Remote debugging interface to dBUG ROM monitor for GDB, the GNU debugger.
Copyright 1996 Free Software Foundation, Inc.
Copyright 1996, 1999 Free Software Foundation, Inc.
Written by Stan Shebs of Cygnus Support.
@ -97,12 +97,12 @@ init_dbug_cmds(void)
dbug_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_GETMEM_NEEDS_RANGE | MO_FILL_USES_ADDR;
dbug_cmds.init = dbug_inits; /* Init strings */
dbug_cmds.cont = "go\r"; /* continue command */
dbug_cmds.step = "step\r"; /* single step */
dbug_cmds.step = "trace\r"; /* single step */
dbug_cmds.stop = NULL; /* interrupt command */
dbug_cmds.set_break = "br %x\r"; /* set a breakpoint */
dbug_cmds.clr_break = "br -c %x\r"; /* clear a breakpoint */
dbug_cmds.clr_all_break = "br -c\r"; /* clear all breakpoints */
dbug_cmds.fill = "bf.b %x %x %x"; /* fill (start end val) */
dbug_cmds.clr_break = "br -r %x\r"; /* clear a breakpoint */
dbug_cmds.clr_all_break = "br -r\r"; /* clear all breakpoints */
dbug_cmds.fill = "bf.b %x %x %x\r"; /* fill (start end val) */
dbug_cmds.setmem.cmdb = "mm.b %x %x\r"; /* setmem.cmdb (addr, value) */
dbug_cmds.setmem.cmdw = "mm.w %x %x\r"; /* setmem.cmdw (addr, value) */
dbug_cmds.setmem.cmdl = "mm.l %x %x\r"; /* setmem.cmdl (addr, value) */

View File

@ -196,6 +196,51 @@ struct complaint repeated_header_complaint =
struct complaint unclaimed_bincl_complaint =
{"N_BINCL %s not in entries for any file, at symtab pos %d", 0, 0};
/* find_text_range --- find start and end of loadable code sections
The find_text_range function finds the shortest address range that
encloses all sections containing executable code, and stores it in
objfile's text_addr and text_size members.
dbx_symfile_read will use this to finish off the partial symbol
table, in some cases. */
static void
find_text_range (bfd *sym_bfd, struct objfile *objfile)
{
asection *sec;
int found_any = 0;
CORE_ADDR start, end;
for (sec = sym_bfd->sections; sec; sec = sec->next)
if (bfd_get_section_flags (sym_bfd, sec) & SEC_CODE)
{
CORE_ADDR sec_start = bfd_section_vma (sym_bfd, sec);
CORE_ADDR sec_end = sec_start + bfd_section_size (sym_bfd, sec);
if (found_any)
{
if (sec_start < start) start = sec_start;
if (sec_end > end) end = sec_end;
}
else
{
start = sec_start;
end = sec_end;
}
found_any = 1;
}
if (! found_any)
error ("Can't find any code sections in symbol file");
DBX_TEXT_ADDR (objfile) = start;
DBX_TEXT_SIZE (objfile) = end - start;
}
/* During initial symbol readin, we need to have a structure to keep
track of which psymtabs have which bincls in them. This structure
@ -2589,11 +2634,9 @@ elfstab_build_psymtabs (objfile, section_offsets, mainline,
It might even contain some info from the ELF symtab to help us. */
info = objfile->sym_stab_info;
text_sect = bfd_get_section_by_name (sym_bfd, ".text");
if (!text_sect)
error ("Can't find .text section in symbol file");
DBX_TEXT_ADDR (objfile) = bfd_section_vma (sym_bfd, text_sect);
DBX_TEXT_SIZE (objfile) = bfd_section_size (sym_bfd, text_sect);
/* Find the first and last text address. dbx_symfile_read seems to
want this. */
find_text_range (sym_bfd, objfile);
#define ELF_STABS_SYMBOL_SIZE 12 /* XXX FIXME XXX */
DBX_SYMBOL_SIZE (objfile) = ELF_STABS_SYMBOL_SIZE;

View File

@ -1,5 +1,5 @@
/* Basic, host-specific, and target-specific definitions for GDB.
Copyright (C) 1986, 89, 91, 92, 93, 94, 95, 96, 98, 1999
Copyright (C) 1986, 89, 91, 92, 93, 94, 95, 96, 1998
Free Software Foundation, Inc.
This file is part of GDB.
@ -252,6 +252,8 @@ extern void notice_quit PARAMS ((void));
extern int strcmp_iw PARAMS ((const char *, const char *));
extern int subset_compare PARAMS ((char *, char *));
extern char *safe_strerror PARAMS ((int));
extern char *safe_strsignal PARAMS ((int));
@ -273,6 +275,8 @@ typedef void (*make_cleanup_func) PARAMS ((void *));
extern struct cleanup *make_cleanup PARAMS ((make_cleanup_func, void *));
extern struct cleanup *make_cleanup_freeargv PARAMS ((char **));
extern struct cleanup *make_final_cleanup PARAMS ((make_cleanup_func, void *));
extern struct cleanup *make_my_cleanup PARAMS ((struct cleanup **,
@ -1019,24 +1023,7 @@ extern CORE_ADDR push_bytes PARAMS ((CORE_ADDR, char *, int));
extern CORE_ADDR push_word PARAMS ((CORE_ADDR, ULONGEST));
/* Some parts of gdb might be considered optional, in the sense that they
are not essential for being able to build a working, usable debugger
for a specific environment. For example, the maintenance commands
are there for the benefit of gdb maintainers. As another example,
some environments really don't need gdb's that are able to read N
different object file formats. In order to make it possible (but
not necessarily recommended) to build "stripped down" versions of
gdb, the following defines control selective compilation of those
parts of gdb which can be safely left out when necessary. Note that
the default is to include everything. */
#ifndef MAINTENANCE_CMDS
#define MAINTENANCE_CMDS 1
#endif
#ifdef MAINTENANCE_CMDS
extern int watchdog;
#endif
/* Hooks for alternate command interfaces. */

View File

@ -1,3 +1,41 @@
Thu Apr 22 13:07:37 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdbint.texinfo (USE_GENERIC_DUMMY_FRAMES): Document.
(GET_SAVED_REGISTER): Update, not just the a29k uses this.
Wed Apr 21 13:59:01 1999 Dave Brolley <brolley@cygnus.com>
* gdbint.texinfo: Fix typos: $ -> @.
Tue Apr 20 11:59:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdbint.texinfo (REGISTER_NAMES, BREAKPOINT, BIG_BREAKPOINT,
LITTLE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT,
BIG_REMOTE_BREAKPOINT): Deprecate in favor of REGISTER_NAME and
BREAKPOINT_FROM_PC.
Mon Apr 12 16:00:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdbint.texinfo (CALL_DUMMY_STACK_ADJUST_P,
CALL_DUMMY_STACK_ADJUST): Document.
Thu Apr 8 17:23:15 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdbint.texinfo (CALL_DUMMY_P, CALL_DUMMY_WORDS,
SIZEOF_CALL_DUMMY_WORDS, CALL_DUMMY): Define.
1999-04-02 Stan Shebs <shebs@andros.cygnus.com>
* gdbint.texinfo (MAINTENANCE_CMDS): Remove ref, since it no
longer exists.
Tue Mar 9 19:25:11 1999 Stan Shebs <shebs@andros.cygnus.com>
* gdb.texinfo, remote.texi, all-cfg.texi, HPPA-cfg.texi: Remove
nearly all @ifset/@ifclear conditionals; nobody uses them, and
they make the manual source incomprehensible.
* h8-cfg.texi: Remove, hasn't been used in years.
Thu Feb 11 18:00:59 1999 Stan Shebs <shebs@andros.cygnus.com>
* gdb.texinfo: Update the credits.

View File

@ -1,5 +1,5 @@
@c GDB MANUAL configuration file.
@c Copyright (c) 1993 Free Software Foundation, Inc.
@c Copyright (c) 1997, 1998 Free Software Foundation, Inc.
@c
@c NOTE: While the GDB manual is configurable (by changing these
@c switches), its configuration is ***NOT*** automatically tied in to
@ -21,75 +21,9 @@
@c HP PA-RISC target:
@set HPPA
@c
@c Hitachi H8/300 target:
@clear H8
@c Hitachi H8/300 target ONLY:
@clear H8EXCLUSIVE
@c
@c remote MIPS target:
@clear MIPS
@c
@c SPARC target:
@clear SPARC
@c
@c AMD 29000 target:
@clear AMD29K
@c
@c Intel 960 target:
@clear I960
@c
@c Tandem ST2000 (phone switch) target:
@clear ST2000
@c
@c Zilog 8000 target:
@clear Z8K
@c
@c Wind River Systems VxWorks environment:
@clear VXWORKS
@c
@c ----------------------------------------------------------------------
@c DOC FEATURE FLAGS:
@c
@c Bare-board target?
@clear BARETARGET
@c
@c Restrict languages discussed to C?
@c This is backward. As time permits, change this to language-specific
@c switches for what to include.
@clear CONLY
@c Discuss Fortran?
@clear FORTRAN
@c
@c Discuss Modula 2?
@clear MOD2
@c
@c Specifically for host machine running DOS?
@clear DOSHOST
@c
@c Talk about CPU simulator targets?
@clear SIMS
@c
@c Remote serial line settings of interest?
@set SERIAL
@c
@c Discuss features requiring Posix or similar OS environment?
@set POSIX
@c
@c Discuss remote serial debugging stub?
@clear REMOTESTUB
@c
@c Discuss gdbserver?
@set GDBSERVER
@c
@c Discuss gdbserve.nlm?
@set GDBSERVE
@c
@c Refrain from discussing how to configure sw and format doc?
@clear PRECONFIGURED
@c
@c Refrain from referring to unfree publications?
@set FSFDOC
@c
@c ----------------------------------------------------------------------
@c STRINGS:
@c

View File

@ -21,76 +21,9 @@
@c HP PA-RISC target ONLY:
@clear HPPA
@c
@c Hitachi H8/300 target:
@set H8
@c Hitachi H8/300 target ONLY:
@clear H8EXCLUSIVE
@c
@c remote MIPS target:
@set MIPS
@c
@c SPARC target:
@set SPARC
@set SPARCLET
@c
@c AMD 29000 target:
@set AMD29K
@c
@c Intel 960 target:
@set I960
@c
@c Tandem ST2000 (phone switch) target:
@set ST2000
@c
@c Zilog 8000 target:
@set Z8K
@c
@c Wind River Systems VxWorks environment:
@set VXWORKS
@c
@c ----------------------------------------------------------------------
@c DOC FEATURE FLAGS:
@c
@c Bare-board target?
@clear BARETARGET
@c
@c Restrict languages discussed to C?
@c This is backward. As time permits, change this to language-specific
@c switches for what to include.
@clear CONLY
@c Discuss Fortran?
@set FORTRAN
@c
@c Discuss Modula 2?
@set MOD2
@c
@c Specifically for host machine running DOS?
@clear DOSHOST
@c
@c Talk about CPU simulator targets?
@set SIMS
@c
@c Remote serial line settings of interest?
@set SERIAL
@c
@c Discuss features requiring Posix or similar OS environment?
@set POSIX
@c
@c Discuss remote serial debugging stub?
@set REMOTESTUB
@c
@c Discuss gdbserver?
@set GDBSERVER
@c
@c Discuss gdbserve.nlm?
@set GDBSERVE
@c
@c Refrain from discussing how to configure sw and format doc?
@clear PRECONFIGURED
@c
@c Refrain from referring to unfree publications?
@set FSFDOC
@c
@c ----------------------------------------------------------------------
@c STRINGS:
@c

File diff suppressed because it is too large Load Diff

View File

@ -1017,10 +1017,6 @@ This macro is used as the argument to lseek (or, most commonly,
bfd_seek). FIXME, should be replaced by SEEK_SET instead, which is the
POSIX equivalent.
@item MAINTENANCE_CMDS
If the value of this is 1, then a number of optional maintenance
commands are compiled in.
@item MALLOC_INCOMPATIBLE
Define this if the system's prototype for @code{malloc} differs from the
@sc{ANSI} definition.
@ -1048,6 +1044,10 @@ of functions to indicate that they never return. The default is already
set correctly if compiling with GCC. This will almost never need to be
defined.
@item USE_GENERIC_DUMMY_FRAMES
Define this to 1 if the target is using the generic inferior function
call code. See @code{blockframe.c} for more information.
@item USE_MMALLOC
GDB will use the @code{mmalloc} library for memory allocation for symbol
reading if this symbol is defined. Be careful defining it since there
@ -1198,15 +1198,24 @@ instruction for a breakpoint, it's not required; for instance, the bit
pattern could be an invalid instruction. The breakpoint must be no
longer than the shortest instruction of the architecture.
@var{BREAKPOINT} has been deprecated in favour of
@var{BREAKPOINT_FROM_PC}.
@item BIG_BREAKPOINT
@item LITTLE_BREAKPOINT
Similar to BREAKPOINT, but used for bi-endian targets.
@var{BIG_BREAKPOINT} and @var{LITTLE_BREAKPOINT} have been deprecated in
favour of @var{BREAKPOINT_FROM_PC}.
@item REMOTE_BREAKPOINT
@item LITTLE_REMOTE_BREAKPOINT
@item BIG_REMOTE_BREAKPOINT
Similar to BREAKPOINT, but used for remote targets.
@var{BIG_REMOTE_BREAKPOINT} and @var{LITTLE_REMOTE_BREAKPOINT} have been
deprecated in favour of @var{BREAKPOINT_FROM_PC}.
@item BREAKPOINT_FROM_PC (pcptr, lenptr)
Use the program counter to determine the contents and size of a
@ -1220,14 +1229,40 @@ not required; for instance, the bit pattern could be an invalid
instruction. The breakpoint must be no longer than the shortest
instruction of the architecture.
Replaces all the other BREAKPOINTs.
Replaces all the other @var{BREAKPOINT} macros.
@item CALL_DUMMY_P
A C expresson that is non-zero when the target suports inferior function
calls.
@item CALL_DUMMY_WORDS
Pointer to an array of @var{LONGEST} words of data containing
host-byte-ordered @var{REGISTER_BYTES} sized values that partially
specify the sequence of instructions needed for an inferior function
call.
Should be deprecated in favour of a macro that uses target-byte-ordered
data.
@item SIZEOF_CALL_DUMMY_WORDS
The size of @var{CALL_DUMMY_WORDS}. When @var{CALL_DUMMY_P} this must
return a positive value. See also @var{CALL_DUMMY_LENGTH}.
@item CALL_DUMMY
valops.c
A static initializer for @var{CALL_DUMMY_WORDS}. Deprecated.
@item CALL_DUMMY_LOCATION
inferior.h
@item CALL_DUMMY_STACK_ADJUST
valops.c
Stack adjustment needed when performing an inferior function call.
Should be deprecated in favor of something like @var{STACK_ALIGN}.
@item CALL_DUMMY_STACK_ADJUST_P
Predicate for use of @var{CALL_DUMMY_STACK_ADJUST}.
Should be deprecated in favor of something like @var{STACK_ALIGN}.
@item CANNOT_FETCH_REGISTER (regno)
A C expression that should be nonzero if @var{regno} cannot be fetched
@ -1375,7 +1410,7 @@ pointer. It examines the current state of the machine as needed.
@item GET_SAVED_REGISTER
Define this if you need to supply your own definition for the function
@code{get_saved_register}. Currently this is only done for the a29k.
@code{get_saved_register}.
@item HAVE_REGISTER_WINDOWS
Define this if the target has register windows.
@ -1507,6 +1542,9 @@ register state.
Return the name of register @var{i} as a string. May return @var{NULL}
or @var{NUL} to indicate that register @var{i} is not valid.
@item REGISTER_NAMES
Deprecated in favor of @var{REGISTER_NAME}.
@item REG_STRUCT_HAS_ADDR (gcc_p, type)
Define this to return 1 if the given type will be passed by pointer
rather than directly.

View File

@ -1,11 +1,7 @@
@c -*- Texinfo -*-
@c Copyright (c) 1990 1991 1992 1993 Free Software Foundation, Inc.
@c This file is part of the source for the GDB manual.
@c This text diverted to "Remote Debugging" section in general case;
@c however, if we're doing a manual specifically for one of these, it
@c belongs up front (in "Getting In and Out" chapter).
@ifset REMOTESTUB
@node Remote Serial
@subsection The @value{GDBN} remote serial protocol
@ -47,11 +43,9 @@ you must link with your program a few special-purpose subroutines that
implement the @value{GDBN} remote serial protocol. The file containing these
subroutines is called a @dfn{debugging stub}.
@ifset GDBSERVER
On certain remote targets, you can use an auxiliary program
@code{gdbserver} instead of linking a stub into your program.
@xref{Server,,Using the @code{gdbserver} program}, for details.
@end ifset
@end table
The debugging stub is specific to the architecture of the remote
@ -102,12 +96,8 @@ recently added stubs.
* Bootstrapping:: What you must do for the stub
* Debug Session:: Putting it all together
* Protocol:: Outline of the communication protocol
@ifset GDBSERVER
* Server:: Using the `gdbserver' program
@end ifset
@ifset GDBSERVE
* NetWare:: Using the `gdbserve.nlm' program
@end ifset
@end menu
@node Stub Contents
@ -221,7 +211,7 @@ should be a simple jump, not a jump to subroutine.
For the 386, @var{exception_address} should be installed as an interrupt
gate so that interrupts are masked while the handler runs. The gate
should be at privilege level 0 (the most privileged level). The
@sc{sparc} and 68k stubs are able to mask interrup themselves without
@sc{sparc} and 68k stubs are able to mask interrupts themselves without
help from @code{exceptionHandler}.
@item void flush_i_cache()
@ -460,7 +450,6 @@ packet-debugging information is printed on the @value{GDBN} standard output
stream. @code{set remotedebug off} turns it off, and @code{show
remotedebug} shows you its current state.
@ifset GDBSERVER
@node Server
@subsubsection Using the @code{gdbserver} program
@ -562,9 +551,7 @@ the @code{target remote} command. Otherwise you may get an error whose
text depends on the host system, but which usually looks something like
@samp{Connection refused}.
@end table
@end ifset
@ifset GDBSERVE
@node NetWare
@subsubsection Using the @code{gdbserve.nlm} program
@ -621,11 +608,7 @@ argument is a device name (usually a serial device, like
@noindent
communications with the server via serial line @file{/dev/ttyb}.
@end table
@end ifset
@end ifset
@ifset I960
@node i960-Nindy Remote
@subsection @value{GDBN} with a remote i960 (Nindy)
@ -728,9 +711,7 @@ circuit to perform a hard reset (or some other interesting action) when
a break is detected.
@end table
@c @end group
@end ifset
@ifset AMD29K
@node UDI29K Remote
@subsection The UDI protocol for AMD29K
@ -943,9 +924,6 @@ of the commands sent to it. Running @samp{tail -f} on this file in
another window often helps to understand trouble with @code{EBMON}, or
unexpected events on the PC side of the connection.
@end ifset
@ifset ST2000
@node ST2000 Remote
@subsection @value{GDBN} with a Tandem ST2000
@ -991,11 +969,10 @@ sequences gets you back to the @value{GDBN} command prompt:
@kbd{@key{RET}~.} (Return, followed by tilde and period) or
@kbd{@key{RET}~@key{C-d}} (Return, followed by tilde and control-D).
@end table
@end ifset
@ifset VXWORKS
@node VxWorks Remote
@subsection @value{GDBN} and VxWorks
@cindex VxWorks
@value{GDBN} enables developers to spawn and debug tasks running on networked
@ -1141,9 +1118,7 @@ follows:
where @var{task} is the VxWorks hexadecimal task ID. The task can be running
or suspended when you attach to it. Running tasks are suspended at
the time of attachment.
@end ifset
@ifset SPARCLET
@node Sparclet Remote
@subsection @value{GDBN} and Sparclet
@cindex Sparclet
@ -1292,9 +1267,6 @@ Breakpoint 1, main (argc=1, argv=0xeffff21c) at prog.c:3
(gdbslet)
@end example
@end ifset
@ifset H8
@node Hitachi Remote
@subsection @value{GDBN} and Hitachi microprocessors
@value{GDBN} needs to know these things to talk to your
@ -1312,11 +1284,8 @@ H8/300, or H8/500.)
what serial device connects your host to your Hitachi board (the first
serial device available on your host is the default).
@ifclear H8EXCLUSIVE
@c this is only for Unix hosts, not of interest to Hitachi
@item
what speed to use over the serial device.
@end ifclear
@end enumerate
@menu
@ -1328,7 +1297,6 @@ what speed to use over the serial device.
@node Hitachi Boards
@subsubsection Connecting to Hitachi boards
@ifclear H8EXCLUSIVE
@c only for Unix hosts
@kindex device
@cindex serial device, Hitachi micros
@ -1348,13 +1316,11 @@ com2:9600,n,8,1,p}} for a 9600 bps connection).
The @samp{device} and @samp{speed} commands are available only when you
use a Unix host to debug your Hitachi microprocessor programs. If you
use a DOS host,
@end ifclear
@value{GDBN} depends on an auxiliary terminate-and-stay-resident program
called @code{asynctsr} to communicate with the development board
through a PC serial port. You must also use the DOS @code{mode} command
to set up the serial port on the DOS side.
@ifset DOSHOST
The following sample session illustrates the steps needed to start a
program under @value{GDBN} control on an H8/300. The example uses a
sample H8/300 program called @file{t.x}. The procedure is the same for
@ -1440,7 +1406,6 @@ to detect program completion.
In either case, @value{GDBN} sees the effect of a @sc{reset} on the
development board as a ``normal exit'' of your program.
@end ifset
@node Hitachi ICE
@subsubsection Using the E7000 in-circuit emulator
@ -1487,9 +1452,6 @@ memory}. The accepted values for @var{mod} are @code{small},
@code{big}, @code{medium}, and @code{compact}.
@end table
@end ifset
@ifset MIPS
@node MIPS Remote
@subsection @value{GDBN} and remote MIPS boards
@ -1622,13 +1584,10 @@ is waiting for your program to stop. In that case, @value{GDBN} waits
forever because it has no way of knowing how long the program is going
to run before stopping.
@end table
@end ifset
@ifset SIMS
@node Simulator
@subsection Simulated CPU target
@ifset GENERIC
@cindex simulator
@cindex simulator, Z8000
@cindex Z8000 simulator
@ -1642,33 +1601,16 @@ can use instead of a hardware CPU to debug your programs.
Currently, simulators are available for ARM, D10V, D30V, FR30, H8/300,
H8/500, i960, M32R, MIPS, MN10200, MN10300, PowerPC, SH, Sparc, V850,
W65, and Z8000.
@end ifset
@ifclear GENERIC
@ifset H8
@cindex simulator, H8/300 or H8/500
@cindex Hitachi H8/300 or H8/500 simulator
@cindex simulator, Hitachi SH
@cindex Hitachi SH simulator
When configured for debugging Hitachi microprocessor targets,
@value{GDBN} includes a CPU simulator for the target chip (a Hitachi SH,
H8/300, or H8/500).
@end ifset
@ifset Z8K
@cindex simulator, Z8000
@cindex Zilog Z8000 simulator
When configured for debugging Zilog Z8000 targets, @value{GDBN} includes
a Z8000 simulator.
@end ifset
@end ifclear
@ifset Z8K
For the Z8000 family, @samp{target sim} simulates either the Z8002 (the
unsegmented variant of the Z8000 architecture) or the Z8001 (the
segmented variant). The simulator recognizes which architecture is
appropriate by inspecting the object code.
@end ifset
@table @code
@item target sim @var{args}
@ -1703,6 +1645,5 @@ You can refer to these values in @value{GDBN} expressions with the usual
conventions; for example, @w{@samp{b fputc if $cycles>5000}} sets a
conditional breakpoint that suspends only after at least 5000
simulated clock ticks.
@end ifset
@c need to add much more detail about sims!

View File

@ -3048,7 +3048,7 @@ the derivation of this class is encoded as follows.
@node Virtual Base Classes
@section Virtual Base Classes
A derived class object consists of a concatination in memory of the data
A derived class object consists of a concatenation in memory of the data
areas defined by each base class, starting with the leftmost and ending
with the rightmost in the list of base classes. The exception to this
rule is for virtual inheritence. In the example above, class @code{D}

View File

@ -302,13 +302,28 @@ static struct partial_die_info zeroed_partial_die;
in buildsym.c. */
static struct pending **list_in_scope = &file_symbols;
/* FIXME: The following variables pass additional information from
decode_locdesc to the caller. */
static int optimized_out; /* Kludge to identify optimized out variables */
static int isreg; /* Kludge to identify register variables */
static int offreg; /* Kludge to identify basereg references */
static int basereg; /* Which base register is it relative to? */
static int islocal; /* Kludge to identify local variables */
/* FIXME: decode_locdesc sets these variables to describe the location
to the caller. These ought to be a structure or something. If
none of the flags are set, the object lives at the address returned
by decode_locdesc. */
static int optimized_out; /* No ops in location in expression,
so object was optimized out. */
static int isreg; /* Object lives in register.
decode_locdesc's return value is
the register number. */
static int offreg; /* Object's address is the sum of the
register specified by basereg, plus
the offset returned. */
static int basereg; /* See `offreg'. */
static int isderef; /* Value described by flags above is
the address of a pointer to the object. */
static int islocal; /* Variable is at the returned offset
from the frame start, but there's
no identified frame pointer for
this function, so we can't say
which register it's relative to;
use LOC_LOCAL. */
/* DW_AT_frame_base values for the current function.
frame_base_reg is -1 if DW_AT_frame_base is missing, otherwise it
@ -464,6 +479,10 @@ static struct complaint dwarf2_unsupported_stack_op =
{
"unsupported stack op: '%s'", 0, 0
};
static struct complaint dwarf2_complex_location_expr =
{
"location expression too complex", 0, 0
};
static struct complaint dwarf2_unsupported_tag =
{
"unsupported tag: '%s'", 0, 0
@ -1595,7 +1614,9 @@ read_func_scope (die, objfile)
if (attr)
{
CORE_ADDR addr = decode_locdesc (DW_BLOCK (attr), objfile);
if (isreg)
if (isderef)
complain (&dwarf2_unsupported_at_frame_base, name);
else if (isreg)
frame_base_reg = addr;
else if (offreg)
{
@ -3922,7 +3943,12 @@ dwarf_decode_lines (offset, comp_dir, abfd)
{
case DW_LNE_end_sequence:
end_sequence = 1;
record_line (current_subfile, line, address);
/* Don't call record_line here. The end_sequence
instruction provides the address of the first byte
*after* the last line in the sequence; it's not the
address of any real source line. However, the GDB
linetable structure only records the starts of lines,
not the ends. This is a weakness of GDB. */
break;
case DW_LNE_set_address:
address = read_address (abfd, line_ptr) + baseaddr;
@ -4238,8 +4264,17 @@ new_symbol (die, type, objfile)
}
else if (offreg)
{
SYMBOL_CLASS (sym) = LOC_BASEREG_ARG;
SYMBOL_BASEREG (sym) = basereg;
if (isderef)
{
if (basereg != frame_base_reg)
complain (&dwarf2_complex_location_expr);
SYMBOL_CLASS (sym) = LOC_REF_ARG;
}
else
{
SYMBOL_CLASS (sym) = LOC_BASEREG_ARG;
SYMBOL_BASEREG (sym) = basereg;
}
}
else
{
@ -5643,6 +5678,7 @@ decode_locdesc (blk, objfile)
stack[stacki] = 0;
isreg = 0;
offreg = 0;
isderef = 0;
islocal = 0;
optimized_out = 1;
@ -5816,6 +5852,14 @@ decode_locdesc (blk, objfile)
stacki--;
break;
case DW_OP_deref:
isderef = 1;
/* If we're not the last op, then we definitely can't encode
this using GDB's address_class enum. */
if (i < size)
complain (&dwarf2_complex_location_expr);
break;
default:
complain (&dwarf2_unsupported_stack_op, dwarf_stack_op_name(op));
return (stack[stacki]);

View File

@ -191,7 +191,7 @@ exec_file_attach (args, from_tty)
if (argv == NULL)
nomem (0);
make_cleanup ((make_cleanup_func) freeargv, (char *) argv);
make_cleanup_freeargv (argv);
for (; (*argv != NULL) && (**argv == '-'); argv++) {;}
if (*argv == NULL)

View File

@ -497,8 +497,6 @@ op_string(op)
return NULL;
}
#ifdef MAINTENANCE_CMDS
/* Support for dumping the raw data from expressions in a human readable
form. */
@ -899,5 +897,3 @@ dump_postfix_expression (exp, stream, note)
elt = dump_subexp (exp, stream, elt);
fputs_filtered ("\n", stream);
}
#endif /* MAINTENANCE_CMDS */

View File

@ -370,13 +370,11 @@ extern void print_expression PARAMS ((struct expression *, GDB_FILE *));
extern char *op_string PARAMS ((enum exp_opcode));
#ifdef MAINTENANCE_CMDS
extern void dump_prefix_expression PARAMS ((struct expression *,
GDB_FILE *,
char *));
extern void dump_postfix_expression PARAMS ((struct expression *,
GDB_FILE *,
char *));
#endif /* MAINTENANCE_CMDS */
#endif /* !defined (EXPRESSION_H) */

View File

@ -43,6 +43,8 @@ const struct floatformat floatformat_unknown;
static void write_register_gen PARAMS ((int, char *));
static int read_relative_register_raw_bytes_for_frame PARAMS ((int regnum, char *myaddr, struct frame_info *frame));
/* Basic byte-swapping routines. GDB has needed these for a long time...
All extract a target-format integer at ADDR which is LEN bytes long. */
@ -252,25 +254,6 @@ store_address (addr, len, val)
int len;
LONGEST val;
{
if( TARGET_BYTE_ORDER == BIG_ENDIAN
&& len != sizeof( LONGEST )) {
/* On big-endian machines (e.g., HPPA 2.0, narrow mode)
* just letting this fall through to the call below will
* lead to the wrong bits being stored.
*
* Only the simplest case is fixed here, the others just
* get the old behavior.
*/
if( (len == sizeof( CORE_ADDR ))
&& (sizeof( LONGEST ) == 2 * sizeof( CORE_ADDR ))) {
/* Watch out! The high bits are garbage! */
CORE_ADDR coerce[2];
*(LONGEST*)&coerce = val;
store_unsigned_integer (addr, len, coerce[1] ); /* BIG_ENDIAN code! */
return;
}
}
store_unsigned_integer (addr, len, val);
}
@ -393,7 +376,6 @@ store_floating (addr, len, val)
}
}
#if !defined (GET_SAVED_REGISTER)
/* Return the address in which frame FRAME's value of register REGNUM
has been saved in memory. Or return zero if it has not been saved.
@ -477,7 +459,7 @@ find_saved_register (frame, regnum)
The argument RAW_BUFFER must point to aligned memory. */
void
get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
default_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
char *raw_buffer;
int *optimized;
CORE_ADDR *addrp;
@ -523,7 +505,22 @@ get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
if (addrp != NULL)
*addrp = addr;
}
#endif /* GET_SAVED_REGISTER. */
#if !defined (GET_SAVED_REGISTER)
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
default_get_saved_register(raw_buffer, optimized, addrp, frame, regnum, lval)
#endif
void
get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
char *raw_buffer;
int *optimized;
CORE_ADDR *addrp;
struct frame_info *frame;
int regnum;
enum lval_type *lval;
{
GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval);
}
/* Copy the bytes of register REGNUM, relative to the input stack frame,
into our memory at MYADDR, in target byte order.
@ -531,7 +528,7 @@ get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
Returns 1 if could not be read, 0 if could. */
int
static int
read_relative_register_raw_bytes_for_frame (regnum, myaddr, frame)
int regnum;
char *myaddr;
@ -627,15 +624,14 @@ value_of_register (regnum)
or it will get garbage. (a change from GDB version 3, in which
the caller got the value from the last stop). */
/* Contents of the registers in target byte order.
We allocate some extra slop since we do a lot of memcpy's around
`registers', and failing-soft is better than failing hard. */
/* Contents and state of the registers (in target byte order). */
char registers[REGISTER_BYTES + /* SLOP */ 256];
char *registers;
/* Nonzero if that register has been fetched,
-1 if register value not available. */
SIGNED char register_valid[NUM_REGS];
/* VALID_REGISTER is non-zero if it has been fetched, -1 if the
register value was not available. */
signed char *register_valid;
/* The thread/process associated with the current set of registers. For now,
-1 is special, and means `no current process'. */
@ -1628,3 +1624,25 @@ locate_var_value (var, frame)
}
return 0; /* For lint -- never reached */
}
static void build_findvar PARAMS ((void));
static void
build_findvar ()
{
/* We allocate some extra slop since we do a lot of memcpy's around
`registers', and failing-soft is better than failing hard. */
int sizeof_registers = REGISTER_BYTES + /* SLOP */ 256;
int sizeof_register_valid = NUM_REGS * sizeof (*register_valid);
registers = xmalloc (sizeof_registers);
memset (registers, 0, sizeof_registers);
register_valid = xmalloc (sizeof_register_valid);
memset (register_valid, 0, sizeof_register_valid);
}
void _initialize_findvar PARAMS ((void));
void
_initialize_findvar ()
{
build_findvar ();
}

View File

@ -56,6 +56,48 @@ fr30_pop_frame ()
flush_cached_frames ();
}
/* Function: fr30_store_return_value
Put a value where a caller expects to see it. Used by the 'return'
command. */
void
fr30_store_return_value (struct type *type,
char *valbuf)
{
/* Here's how the FR30 returns values (gleaned from gcc/config/
fr30/fr30.h):
If the return value is 32 bits long or less, it goes in r4.
If the return value is 64 bits long or less, it goes in r4 (most
significant word) and r5 (least significant word.
If the function returns a structure, of any size, the caller
passes the function an invisible first argument where the callee
should store the value. But GDB doesn't let you do that anyway.
If you're returning a value smaller than a word, it's not really
necessary to zero the upper bytes of the register; the caller is
supposed to ignore them. However, the FR30 typically keeps its
values extended to the full register width, so we should emulate
that. */
/* The FR30 is big-endian, so if we return a small value (like a
short or a char), we need to position it correctly within the
register. We round the size up to a register boundary, and then
adjust the offset so as to place the value at the right end. */
int value_size = TYPE_LENGTH (type);
int returned_size = (value_size + FR30_REGSIZE - 1) & ~(FR30_REGSIZE - 1);
int offset = (REGISTER_BYTE (RETVAL_REG)
+ (returned_size - value_size));
char *zeros = alloca (returned_size);
memset (zeros, 0, returned_size);
write_register_bytes (REGISTER_BYTE (RETVAL_REG), zeros, returned_size);
write_register_bytes (offset, valbuf, value_size);
}
/* Function: skip_prologue
Return the address of the first code past the prologue of the function. */
@ -180,11 +222,13 @@ fr30_push_arguments(nargs, args, sp, struct_return, struct_addr)
return sp;
}
_initialize_fr30_tdep()
{
extern int print_insn_fr30(bfd_vma, disassemble_info *);
void _initialize_fr30_tdep PARAMS ((void));
tm_print_insn = print_insn_fr30;
void
_initialize_fr30_tdep ()
{
extern int print_insn_fr30(bfd_vma, disassemble_info *);
tm_print_insn = print_insn_fr30;
}
/* Function: check_prologue_cache

View File

@ -42,7 +42,7 @@ struct frame_saved_regs
frame_info". The innermost one gets allocated (in
wait_for_inferior) each time the inferior stops; current_frame
points to it. Additional frames get allocated (in
get_prev_frame_info) as needed, and are chained through the next
get_prev_frame) as needed, and are chained through the next
and prev fields. Any time that the frame cache becomes invalid
(most notably when we execute something, but also if we change how
we interpret the frames (e.g. "set heuristic-fence-post" in
@ -106,20 +106,6 @@ struct frame_info
extern void *frame_obstack_alloc PARAMS ((unsigned long size));
extern void frame_saved_regs_zalloc PARAMS ((struct frame_info *));
/* Dummy frame. This saves the processor state just prior to setting up the
inferior function call. On most targets, the registers are saved on the
target stack, but that really slows down function calls. */
struct dummy_frame
{
struct dummy_frame *next;
CORE_ADDR pc;
CORE_ADDR fp;
CORE_ADDR sp;
char regs[REGISTER_BYTES];
};
/* Return the frame address from FR. Except in the machine-dependent
*FRAME* macros, a frame address has no defined meaning other than
as a magic cookie which identifies a frame over calls to the
@ -171,8 +157,6 @@ extern struct frame_info *selected_frame;
extern int selected_frame_level;
extern struct frame_info *get_prev_frame_info PARAMS ((struct frame_info *));
extern struct frame_info *create_new_frame PARAMS ((CORE_ADDR, CORE_ADDR));
extern void flush_cached_frames PARAMS ((void));
@ -218,6 +202,8 @@ extern void print_frame_args PARAMS ((struct symbol *, struct frame_info *,
extern struct frame_info *find_relative_frame PARAMS ((struct frame_info *, int*));
extern void show_and_print_stack_frame PARAMS ((struct frame_info *fi, int level, int source));
extern void print_stack_frame PARAMS ((struct frame_info *, int, int));
extern void print_only_stack_frame PARAMS ((struct frame_info *, int, int));
@ -250,6 +236,7 @@ extern void generic_pop_current_frame PARAMS ((void (*) (struct frame_inf
extern void generic_pop_dummy_frame PARAMS ((void));
extern int generic_pc_in_call_dummy PARAMS ((CORE_ADDR pc,
CORE_ADDR sp,
CORE_ADDR fp));
extern char * generic_find_dummy_frame PARAMS ((CORE_ADDR pc,
CORE_ADDR fp));

View File

@ -18,9 +18,23 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "bfd.h"
#include "gdbcmd.h"
/* Just include everything in sight so that the every old definition
of macro is visible. */
#include "gdb_string.h"
#include <ctype.h>
#include "symtab.h"
#include "frame.h"
#include "inferior.h"
#include "breakpoint.h"
#include "wait.h"
#include "gdbcore.h"
#include "gdbcmd.h"
#include "target.h"
#include "gdbthread.h"
#include "annotate.h"
#include "symfile.h" /* for overlay functions */
#include "symcat.h"
/* Non-zero if we want to trace architecture code. */
@ -40,6 +54,7 @@ int gdbarch_debug = GDBARCH_DEBUG;
#define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN
#endif
#endif
#if !TARGET_BYTE_ORDER_SELECTABLE_P
#ifndef TARGET_BYTE_ORDER_DEFAULT
/* compat - Catch old non byte-order selectable targets that do not
define TARGET_BYTE_ORDER_DEFAULT and instead expect
@ -48,6 +63,10 @@ int gdbarch_debug = GDBARCH_DEBUG;
below will get a strange compiler warning. */
#define TARGET_BYTE_ORDER_DEFAULT TARGET_BYTE_ORDER
#endif
#endif
#ifndef TARGET_BYTE_ORDER_DEFAULT
#define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN /* arbitrary */
#endif
int target_byte_order = TARGET_BYTE_ORDER_DEFAULT;
int target_byte_order_auto = 1;
@ -177,20 +196,37 @@ const struct bfd_arch_info *target_architecture = &bfd_default_arch_struct;
int (*target_architecture_hook) PARAMS ((const struct bfd_arch_info *ap));
/* Do the real work of changing the current architecture */
enum set_arch { set_arch_auto, set_arch_manual };
static void
set_arch (arch)
set_arch (arch, type)
const struct bfd_arch_info *arch;
enum set_arch type;
{
/* FIXME: Is it compatible with gdb? */
/* Check with the target on the setting */
if (target_architecture_hook != NULL
&& !target_architecture_hook (arch))
printf_unfiltered ("Target does not support `%s' architecture.\n",
arch->printable_name);
else
/* FIXME: Should be performing the more basic check that the binary
is compatible with GDB. */
/* Check with the target that the architecture is valid. */
int arch_valid = (target_architecture_hook != NULL
&& !target_architecture_hook (arch));
switch (type)
{
target_architecture_auto = 0;
case set_arch_auto:
if (!arch_valid)
warning ("Target may not support %s architecture",
arch->printable_name);
target_architecture = arch;
break;
case set_arch_manual:
if (!arch_valid)
{
printf_unfiltered ("Target does not support `%s' architecture.\n",
arch->printable_name);
}
else
{
target_architecture_auto = 0;
target_architecture = arch;
}
break;
}
}
@ -229,7 +265,7 @@ set_architecture (args, from_tty)
{
const struct bfd_arch_info *arch = bfd_scan_arch (args);
if (arch != NULL)
set_arch (arch);
set_arch (arch, set_arch_manual);
else
printf_unfiltered ("Architecture `%s' not reconized.\n", args);
}
@ -268,7 +304,7 @@ set_architecture_from_arch_mach (arch, mach)
{
const struct bfd_arch_info *wanted = bfd_lookup_arch (arch, mach);
if (wanted != NULL)
set_arch (wanted);
set_arch (wanted, set_arch_manual);
else
fatal ("hardwired architecture/machine not reconized");
}
@ -282,11 +318,7 @@ set_architecture_from_file (abfd)
const struct bfd_arch_info *wanted = bfd_get_arch_info (abfd);
if (target_architecture_auto)
{
if (target_architecture_hook != NULL
&& !target_architecture_hook (wanted))
warning ("Target may not support %s architecture",
wanted->printable_name);
target_architecture = wanted;
set_arch (wanted, set_arch_auto);
}
else if (wanted != target_architecture)
{
@ -318,6 +350,13 @@ set_gdbarch_from_file (abfd)
}
#if defined (CALL_DUMMY)
/* FIXME - this should go away */
LONGEST call_dummy_words[] = CALL_DUMMY;
int sizeof_call_dummy_words = sizeof (call_dummy_words);
#endif
extern void _initialize_gdbarch PARAMS ((void));
void
_initialize_gdbarch ()
@ -348,7 +387,6 @@ _initialize_gdbarch ()
tm_print_insn_info.memory_error_func = dis_asm_memory_error;
tm_print_insn_info.print_address_func = dis_asm_print_address;
#ifdef MAINTENANCE_CMDS
add_show_from_set (add_set_cmd ("archdebug",
class_maintenance,
var_zinteger,
@ -356,5 +394,4 @@ _initialize_gdbarch ()
"Set architecture debugging.\n\
When non-zero, architecture debugging is enabled.", &setlist),
&showlist);
#endif
}

View File

@ -20,7 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef GDBARCH_H
#define GDBARCH_H
/* The target-system-dependant byte order is dynamic */
/* TARGET_BYTE_ORDER_SELECTABLE_P determines if the target endianness
@ -100,6 +99,21 @@ extern disassemble_info tm_print_insn_info;
/* Explicit test for D10V architecture.
USE of these macro's is *STRONGLY* discouraged. */
#define GDB_TARGET_IS_D10V (TARGET_ARCHITECTURE->arch == bfd_arch_d10v)
#ifndef D10V_MAKE_DADDR
#define D10V_MAKE_DADDR(X) (abort (), 0)
#endif
#ifndef D10V_MAKE_IADDR
#define D10V_MAKE_IADDR(X) (abort (), 0)
#endif
/* Set the dynamic target-system-dependant parameters (architecture,
byte-order, ...) using information found in the BFD */

View File

@ -78,6 +78,8 @@ static void print_bit_vector PARAMS ((B_TYPE *, int));
static void print_arg_types PARAMS ((struct type **, int));
static void dump_fn_fieldlists PARAMS ((struct type *, int));
static void print_cplus_stuff PARAMS ((struct type *, int));
static void virtual_base_list_aux PARAMS ((struct type *dclass));
/* Alloc a new type structure and fill it with some defaults. If
OBJFILE is non-NULL, then allocate the space for the type structure
@ -1719,15 +1721,15 @@ static struct vbase * current_vbase_list = NULL;
Note: the list goes backward, right-to-left. virtual_base_list()
copies the items out in reverse order. */
struct vbase *
static void
virtual_base_list_aux (dclass)
struct type * dclass;
struct type * dclass;
{
struct vbase * tmp_vbase;
register int i;
if (TYPE_CODE(dclass) != TYPE_CODE_CLASS)
return NULL;
return;
for (i = 0; i < TYPE_N_BASECLASSES (dclass); i++)
{
@ -2390,10 +2392,6 @@ rank_one_type (parm, arg)
/* End of functions for overload resolution */
#if MAINTENANCE_CMDS
static void
print_bit_vector (bits, nbits)
B_TYPE *bits;
@ -2766,9 +2764,6 @@ recursive_dump_type (type, spaces)
obstack_free (&dont_print_type_obstack, NULL);
}
#endif /* MAINTENANCE_CMDS */
static void build_gdbtypes PARAMS ((void));
static void
build_gdbtypes ()

View File

@ -1112,10 +1112,7 @@ rank_function PARAMS ((struct type **, int, struct type **, int));
extern int
rank_one_type PARAMS ((struct type *, struct type *));
#if MAINTENANCE_CMDS
extern void recursive_dump_type PARAMS ((struct type *, int));
#endif
/* printcmd.c */
@ -1124,9 +1121,7 @@ print_scalar_formatted PARAMS ((char *, struct type *, int, int, GDB_FILE *));
extern int can_dereference PARAMS ((struct type *));
#if MAINTENANCE_CMDS
extern void maintenance_print_type PARAMS ((char *, int));
#endif
/* typeprint.c */

View File

@ -23,6 +23,7 @@
*/
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <assert.h>
@ -32,7 +33,8 @@
/* We include this because we don't need the access macros and they conflict
with gdb's definitions (ick). This is very non standard! */
#include <waitflags.h>
#define _SYS_WAIT_H /* Inhibit warning from <bits/waitflags.h>. */
#include <bits/waitflags.h>
#include <mach.h>
#include <mach/message.h>
@ -84,7 +86,6 @@ int gnu_debug_flag = 0;
/* Forward decls */
extern struct target_ops gnu_ops;
extern char *strerror();
int inf_update_procs (struct inf *inf);
struct inf *make_inf ();
@ -1911,7 +1912,7 @@ gnu_create_inferior (exec_file, allargs, env)
if (ptrace (PTRACE_TRACEME) != 0)
error ("ptrace (PTRACE_TRACEME) failed!");
}
int attach_to_child (int pid)
void attach_to_child (int pid)
{
/* Attach to the now stopped child, which is actually a shell... */
inf_debug (inf, "attaching to child: %d", pid);
@ -1930,13 +1931,12 @@ gnu_create_inferior (exec_file, allargs, env)
inferior_pid = inf_pick_first_thread ();
startup_inferior (inf->pending_execs);
return inferior_pid;
}
inf_debug (inf, "creating inferior");
fork_inferior (exec_file, allargs, env, trace_me, attach_to_child, NULL, NULL);
fork_inferior (exec_file, allargs, env, trace_me, attach_to_child,
NULL, NULL);
inf_update_signal_thread (inf);
inf_set_traced (inf, inf->want_signals);
@ -2082,10 +2082,11 @@ gnu_stop ()
error ("to_stop target function not implemented");
}
static void
static char *
gnu_pid_to_exec_file ()
{
error ("to_pid_to_exec_file target function not implemented");
return NULL;
}
@ -3169,11 +3170,9 @@ _initialize_gnu_nat ()
add_task_commands ();
add_thread_commands ();
#if MAINTENANCE_CMDS
add_set_cmd ("gnu-debug", class_maintenance,
var_boolean, (char *)&gnu_debug_flag,
"Set debugging output for the gnu backend.", &maintenancelist);
#endif
}
#ifdef FLUSH_INFERIOR_CACHE

View File

@ -81,13 +81,10 @@ extern thread_state_t proc_get_state (struct proc *proc, int will_modify);
debug ("{proc %d/%d %p}: " msg, \
__proc_pid (__proc), __proc->tid, __proc , ##args); } while (0)
#if MAINTENANCE_CMDS
extern int gnu_debug_flag;
#define debug(msg, args...) \
do { if (gnu_debug_flag) \
fprintf (stderr, "%s: " msg "\r\n", __FUNCTION__ , ##args); } while (0)
#else
#define debug(msg, args...) (void)0
#endif
#endif /* __GNU_NAT_H__ */

View File

@ -750,22 +750,6 @@ h8300_store_return_value (type, valbuf)
}
}
/* Function: get_saved_register
Just call the generic_get_saved_register function. */
void
get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
char *raw_buffer;
int *optimized;
CORE_ADDR *addrp;
struct frame_info *frame;
int regnum;
enum lval_type *lval;
{
generic_get_saved_register (raw_buffer, optimized, addrp,
frame, regnum, lval);
}
struct cmd_list_element *setmemorylist;
static void

View File

@ -148,7 +148,6 @@ store_inferior_register (regno, regaddr)
#endif /* not HPUX_VERSION_5 */
{
register int i;
extern char registers[];
for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
{

View File

@ -1425,20 +1425,16 @@ push_dummy_frame (inf_status)
{
unsigned int sid;
int_buffer &= ~0x2;
memcpy (inf_status->registers, &int_buffer, 4);
memcpy (inf_status->registers + REGISTER_BYTE (PCOQ_HEAD_REGNUM), &pc, 4);
pc += 4;
memcpy (inf_status->registers + REGISTER_BYTE (PCOQ_TAIL_REGNUM), &pc, 4);
pc -= 4;
write_inferior_status_register (inf_status, 0, int_buffer);
write_inferior_status_register (inf_status, PCOQ_HEAD_REGNUM, pc + 0);
write_inferior_status_register (inf_status, PCOQ_TAIL_REGNUM, pc + 4);
sid = (pc >> 30) & 0x3;
if (sid == 0)
pcspace = read_register (SR4_REGNUM);
else
pcspace = read_register (SR4_REGNUM + 4 + sid);
memcpy (inf_status->registers + REGISTER_BYTE (PCSQ_HEAD_REGNUM),
&pcspace, 4);
memcpy (inf_status->registers + REGISTER_BYTE (PCSQ_TAIL_REGNUM),
&pcspace, 4);
write_inferior_status_register (inf_status, PCSQ_HEAD_REGNUM, pcspace);
write_inferior_status_register (inf_status, PCSQ_TAIL_REGNUM, pcspace);
}
else
pcspace = read_register (PCSQ_HEAD_REGNUM);
@ -2429,6 +2425,13 @@ pa_register_look_aside(raw_regs, regnum, raw_val)
have to cast away the type in our offset calculation:
otherwise we get an offset of 1! */
/* NB: save_state_t is not available before HPUX 9.
The ss_wide field is not available previous to HPUX 10.20,
so to avoid compile-time warnings, we only compile this for
PA 2.0 processors. This control path should only be followed
if we're debugging a PA 2.0 processor, so this should not cause
problems. */
/* #if the following code out so that this file can still be
compiled on older HPUX boxes (< 10.20) which don't have
this structure/structure member. */
@ -4276,9 +4279,6 @@ child_get_current_exception_event ()
return &current_ex_event;
}
#ifdef MAINTENANCE_CMDS
static void
unwind_command (exp, from_tty)
char *exp;
@ -4350,7 +4350,6 @@ unwind_command (exp, from_tty)
pin (Entry_GR);
pin (Total_frame_size);
}
#endif /* MAINTENANCE_CMDS */
#ifdef PREPARE_TO_PROCEED
@ -4437,9 +4436,7 @@ _initialize_hppa_tdep ()
{
tm_print_insn = print_insn_hppa;
#ifdef MAINTENANCE_CMDS
add_cmd ("unwind", class_maintenance, unwind_command,
"Print unwind table entry at given address.",
&maintenanceprintlist);
#endif /* MAINTENANCE_CMDS */
}

View File

@ -106,7 +106,6 @@ store_inferior_registers (regno)
{
register unsigned int regaddr;
char buf[80];
extern char registers[];
register int i;
unsigned int offset = U_REGS_OFFSET;
int scratch;

View File

@ -55,7 +55,6 @@ store_inferior_registers (regno)
{
register unsigned int regaddr;
char buf[80];
extern char registers[];
register int i;
unsigned int offset = U_REGS_OFFSET;
int scratch;

View File

@ -56,6 +56,12 @@ static char *valid_flavors[] = {
};
static char *disassembly_flavor = att_flavor;
/* This is used to keep the bfd arch_info in sync with the disassembly flavor. */
static void set_disassembly_flavor_sfunc PARAMS ((char *, int, struct cmd_list_element *));
static void set_disassembly_flavor ();
void (*disassembly_flavor_hook) PARAMS((char *args, int from_tty));
/* Stdio style buffering was used to minimize calls to ptrace, but this
buffering did not take into account that the code section being accessed
may not be an even number of buffers long (even if the buffer is only
@ -366,7 +372,7 @@ i386_frame_num_args (fi)
nameless arguments. */
return -1;
pfi = get_prev_frame_info (fi);
pfi = get_prev_frame (fi);
if (pfi == 0)
{
/* Note: this can happen if we are looking at the frame for
@ -772,23 +778,58 @@ gdb_print_insn_i386 (memaddr, info)
return print_insn_i386_att (memaddr, info);
else if (disassembly_flavor == intel_flavor)
return print_insn_i386_intel (memaddr, info);
/* Never reached - disassembly_flavour is always either att_flavor
or intel_flavor */
abort ();
}
/* If the disassembly mode is intel, we have to also switch the
bfd mach_type. This function is run in the set disassembly_flavor
command, and does that. */
static void
set_disassembly_flavor_sfunc (args, from_tty, c)
char *args;
int from_tty;
struct cmd_list_element *c;
{
set_disassembly_flavor ();
if (disassembly_flavor_hook != NULL)
disassembly_flavor_hook(args, from_tty);
}
static void
set_disassembly_flavor ()
{
if (disassembly_flavor == att_flavor)
set_architecture_from_arch_mach (bfd_arch_i386, bfd_mach_i386_i386);
else if (disassembly_flavor == intel_flavor)
set_architecture_from_arch_mach (bfd_arch_i386, bfd_mach_i386_i386_intel_syntax);
}
void
_initialize_i386_tdep ()
{
struct cmd_list_element *new_cmd;
tm_print_insn = gdb_print_insn_i386;
tm_print_insn_info.mach = bfd_lookup_arch (bfd_arch_i386, 0)->mach;
/* Add the variable that controls the disassembly flavor */
add_show_from_set(
add_set_enum_cmd ("disassembly-flavor", no_class,
new_cmd = add_set_enum_cmd ("disassembly-flavor", no_class,
valid_flavors,
(char *) &disassembly_flavor,
"Set the disassembly flavor, the valid values are \"att\" and \"intel\", \
and the default value is \"att\".",
&setlist),
&showlist);
&setlist);
new_cmd->function.sfunc = set_disassembly_flavor_sfunc;
add_show_from_set(new_cmd, &showlist);
/* Finally, initialize the disassembly flavor to the default given
in the disassembly_flavor variable */
set_disassembly_flavor ();
}

View File

@ -253,7 +253,6 @@ store_register (regno)
int regno;
{
char buf[80];
extern char registers[];
errno = 0;
if (regno < FP0_REGNUM)
ptrace (PT_WRITE_GPR, inferior_pid, PT_REG(regmap[regno]),

View File

@ -44,7 +44,6 @@ fetch_inferior_registers (regno)
{
struct regs inferior_registers;
struct fp_state inferior_fp_registers;
extern char registers[];
registers_fetched ();
@ -73,7 +72,6 @@ store_inferior_registers (regno)
{
struct regs inferior_registers;
struct fp_state inferior_fp_registers;
extern char registers[];
memcpy (&inferior_registers, registers, 20 * 4);
@ -121,7 +119,6 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
CORE_ADDR reg_addr; /* Unused in this version */
{
int val;
extern char registers[];
switch (which) {
case 0:

View File

@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "value.h"
#include "inferior.h"
#ifdef HAVE_SYS_REG_H
#include <sys/reg.h>
@ -127,7 +128,6 @@ fill_gregset (gregsetp, regno)
{
int regi;
register greg_t *regp = (greg_t *) gregsetp;
extern char registers[];
extern int regmap[];
for (regi = 0 ; regi < (NUM_REGS - NUM_FREGS) ; regi++)

Some files were not shown because too many files have changed in this diff Show More