mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-30 20:55:39 +00:00
Compare commits
2 Commits
gdb-1999-0
...
gdb-4_18-b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0749de2ef | ||
|
|
c1d4905c6e |
2507
gdb/ChangeLog
2507
gdb/ChangeLog
File diff suppressed because it is too large
Load Diff
@@ -143,12 +143,6 @@ 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
|
||||
@@ -1022,10 +1016,6 @@ 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
|
||||
@@ -1161,11 +1151,6 @@ 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
|
||||
@@ -1669,15 +1654,6 @@ 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
|
||||
@@ -1719,10 +1695,6 @@ 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)
|
||||
@@ -1790,15 +1762,6 @@ 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
|
||||
@@ -1817,10 +1780,6 @@ 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
|
||||
@@ -2143,11 +2102,6 @@ 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.
|
||||
@@ -2157,10 +2111,6 @@ 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
|
||||
@@ -2217,10 +2167,6 @@ 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)
|
||||
|
||||
|
||||
@@ -3355,62 +3355,11 @@ Fri Dec 18 14:23:34 1998 Andrew Cagney <cagney@chook>
|
||||
(mips_push_arguments, mips_push_dummy_frame, mips_pop_frame,
|
||||
mips_extract_return_value): Update.
|
||||
|
||||
Fri Dec 18 12:56:56 1998 Andrew Cagney <cagney@chook>
|
||||
|
||||
* gdbarch.h (gdbarch_init_ftype): Pass struct gdbarch_info
|
||||
by-value.
|
||||
(struct gdbarch_info): Add struct gdbarch_tdep_info *tdep_info.
|
||||
* gdbarch.c (gdbarch_update): Update.
|
||||
|
||||
* gdbarch.c (gdbarch_update): Add more tracing.
|
||||
|
||||
Thu Dec 17 02:15:40 1998 Andrew Cagney <cagney@chook.cygnus.com>
|
||||
|
||||
* configure.tgt (gdb_target): Identify mips64*vr4100*-*-elf* as
|
||||
vr4100.
|
||||
|
||||
Thu Dec 17 02:01:58 1998 Andrew Cagney <cagney@chook>
|
||||
|
||||
* gdbtypes.c (_initialize_gdbtypes): Register all builtin types
|
||||
with gdbarch so that they are updated whenever the architecture is
|
||||
changed.
|
||||
|
||||
Thu Dec 17 01:58:16 1998 Andrew Cagney <cagney@chook>
|
||||
|
||||
* gdbarch.h (GDB_MULTI_ARCH): New macro, default to zero.
|
||||
(current_gdbarch): Current architecture pointer.
|
||||
* gdbarch.c (struct gdbarch): Define.
|
||||
|
||||
* gdbarch.h (TARGET_ARCHITECTURE, TARGET_BYTE_ORDER,
|
||||
TARGET_LONG_BIT, TARGET_LONG_LONG_BIT, TARGET_PTR_BIT): When
|
||||
multi-arch force definition.
|
||||
* gdbarch.h, gdbarch.c (gdbarch_tdep, gdbarch_bfd_arch_info,
|
||||
gdbarch_byte_order, {set,}gdbarch_long_bit,
|
||||
{set,}gdbarch_long_long_bit, {set,}gdbarch_ptr_bit): Corresponding
|
||||
functions.
|
||||
|
||||
* gdbarch.h (struct gdbarch_list, struct gdbarch_info,
|
||||
gdbarch_init_ftype), gdbarch.c (register_gdbarch_init): Mechanism
|
||||
for registering an architecture with GDB.
|
||||
(gdbarch_list_lookup_by_info, gdbarch_alloc, gdbarch_update,
|
||||
verify_gdbarch): Support functions.
|
||||
|
||||
* gdbarch.h (gdbarch_data_ftype), gdbarch.c
|
||||
(register_gdbarch_data, gdbarch_data): Mechanism for maintaining
|
||||
per-architecture pointers.
|
||||
(init_gdbarch_data): Support functions.
|
||||
|
||||
* gdbarch.h (gdbarch_swap_ftype), gdbarch.c
|
||||
(register_gdbarch_swap): Ditto for swapped memory regions.
|
||||
(init_gdbarch_swap, swapout_gdbarch_swap, swapin_gdbarch_swap):
|
||||
Support functions.
|
||||
|
||||
* gdbarch.c (set_endian_big, set_endian_little, set_architecture,
|
||||
info_architecture, set_gdbarch_from_file): Hook in multi-arch
|
||||
code by calling gdbarch_update.
|
||||
(default_gdbarch): Default multi-arch vector. Use host's type
|
||||
system for values.
|
||||
|
||||
Thu Dec 17 01:34:36 1998 Andrew Cagney <cagney@chook>
|
||||
|
||||
* gdbtypes.c (build_gdbtypes): New function.
|
||||
@@ -4453,11 +4402,6 @@ Thu Oct 8 08:40:42 1998 Mark Alexander <marka@cygnus.com>
|
||||
* rs6000-tdep.c (get_saved_register): Define only if
|
||||
USE_GENERIC_DUMMY_FRAMES is defined.
|
||||
|
||||
Tue Oct 6 21:35:10 1998 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* Makefile.in (DEPFILES): Add TARGET_OBS.
|
||||
(TARGET_OBS): Defined by configure.
|
||||
|
||||
1998-10-06 Jason Molenda (jsm@bugshack.cygnus.com)
|
||||
|
||||
Eliminate a few warnings from the compiler.
|
||||
@@ -5774,13 +5718,6 @@ 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
|
||||
@@ -6544,9 +6481,6 @@ 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.
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
hp testsuite (gdb.hp) Jimmy Guo adl-debugger-wdb-merge-guru@cup.hp.com
|
||||
d10v target Andrew Cagney cagney@cygnus.com
|
||||
d30v target Andrew Cagney cagney@cygnus.com
|
||||
mips target Andrew Cagney cagney@cygnus.com
|
||||
powerpc target Andrew Cagney cagney@cygnus.com
|
||||
generic arch support Andrew Cagney cagney@cygnus.com
|
||||
target vector Andrew Cagney cagney@cygnus.com
|
||||
remote.c Andrew Cagney cagney@cygnus.com
|
||||
djgpp native DJ Delorie dj@cygnus.com
|
||||
win32 host & native Chris Faylor cgf@cygnus.com
|
||||
main (main.c, top.c) Elena Zannoni ezannoni@cygnus.com
|
||||
readline Elena Zannoni ezannoni@cygnus.com
|
||||
arm target Elena Zannoni ezannoni@cygnus.com
|
||||
command interpreter Fernando Nasser fnasser@cygnus.com
|
||||
generic symtabs Jim Blandy jimb@cygnus.com
|
||||
dwarf readers Jim Blandy jimb@cygnus.com
|
||||
elf reader Jim Blandy jimb@cygnus.com
|
||||
stabs reader Jim Blandy jimb@cygnus.com
|
||||
x86 linux native Jim Blandy jimb@cygnus.com
|
||||
Scheme support Jim Blandy jimb@cygnus.com
|
||||
svr4 shlibs (solib.c) Jim Blandy jimb@cygnus.com
|
||||
hurd native Mark Kettenis kettenis@wins.va.nl
|
||||
hpux, hp pa native Jeff Law law@cygnus.com
|
||||
m32r target Michael Snyder msnyder@cygnus.com
|
||||
tracing Michael Snyder msnyder@cygnus.com
|
||||
threads Michael Snyder msnyder@cygnus.com
|
||||
breakpoint.c Michael Snyder msnyder@cygnus.com
|
||||
coff reader Philippe De Muyter phdm@macqel.be
|
||||
macos host & native Stan Shebs shebs@cygnus.com
|
||||
sds protocol Stan Shebs shebs@cygnus.com
|
||||
rdi/adp protocol Stan Shebs shebs@cygnus.com
|
||||
gdbserver Stan Shebs shebs@cygnus.com
|
||||
documentation Stan Shebs shebs@cygnus.com
|
||||
testsuite Stan Shebs shebs@cygnus.com
|
||||
language support David Taylor taylor@cygnus.com
|
||||
expression eval David Taylor taylor@cygnus.com
|
||||
defs.h David Taylor taylor@cygnus.com
|
||||
utils.c David Taylor taylor@cygnus.com
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
|
||||
# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
# This file is part of GDB.
|
||||
@@ -47,8 +47,6 @@ top_builddir = .
|
||||
SHELL = @SHELL@
|
||||
EXEEXT = @EXEEXT@
|
||||
|
||||
AWK = @AWK@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
@@ -148,8 +146,6 @@ OPCODES_CFLAGS = -I$(OP_INCLUDE)
|
||||
# should set this to list all the .o or .a files to be linked in.
|
||||
SIM =
|
||||
|
||||
WIN32LIBS = @WIN32LIBS@
|
||||
|
||||
|
||||
ENABLE_CFLAGS= @ENABLE_CFLAGS@
|
||||
|
||||
@@ -219,7 +215,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 = 19990621
|
||||
VERSION=4.18
|
||||
DIST=gdb
|
||||
|
||||
LINT=/usr/5bin/lint
|
||||
@@ -253,13 +249,6 @@ 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)" \
|
||||
@@ -370,7 +359,6 @@ SFILES = ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
|
||||
ch-exp.c ch-lang.c ch-typeprint.c ch-valprint.c coffread.c \
|
||||
command.c complaints.c corefile.c cp-valprint.c dbxread.c \
|
||||
demangle.c dwarfread.c dwarf2read.c elfread.c environ.c eval.c \
|
||||
event-loop.c event-top.c \
|
||||
expprint.c f-exp.y f-lang.c f-typeprint.c f-valprint.c \
|
||||
findvar.c gdbarch.c gdbtypes.c infcmd.c inflow.c infrun.c language.c \
|
||||
jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \
|
||||
@@ -436,11 +424,9 @@ gdbcmd_h = gdbcmd.h $(command_h)
|
||||
|
||||
defs_h = defs.h xm.h tm.h nm.h config.status config.h gdbarch.h
|
||||
|
||||
top_h = top.h
|
||||
inferior_h = inferior.h $(breakpoint_h)
|
||||
tracepoint_h = tracepoint.h
|
||||
ax_h = ax.h
|
||||
event_loop_h = event-loop.h
|
||||
|
||||
# Header files that need to have srcdir added. Note that in the cases
|
||||
# where we use a macro like $(gdbcmd_h), things are carefully arranged
|
||||
@@ -496,9 +482,7 @@ TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
|
||||
COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
|
||||
source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \
|
||||
symtab.o symfile.o symmisc.o infcmd.o infrun.o command.o \
|
||||
expprint.o environ.o \
|
||||
event-loop.o event-top.o \
|
||||
gdbarch.o gdbtypes.o copying.o $(DEPFILES) \
|
||||
expprint.o environ.o gdbarch.o gdbtypes.o copying.o $(DEPFILES) \
|
||||
mem-break.o target.o parse.o language.o $(YYOBJ) buildsym.o \
|
||||
exec.o bcache.o objfiles.o minsyms.o maint.o demangle.o \
|
||||
dbxread.o coffread.o elfread.o \
|
||||
@@ -935,7 +919,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 \
|
||||
gould-tdep.c gould-xdep.c h8300-tdep.c h8500-tdep.c \
|
||||
go32-xdep.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 \
|
||||
@@ -945,8 +929,7 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
|
||||
infptrace.c inftarg.c irix4-nat.c irix5-nat.c isi-xdep.c \
|
||||
lynx-nat.c m3-nat.c \
|
||||
m68k-tdep.c \
|
||||
m88k-nat.c m88k-tdep.c mac-nat.c \
|
||||
mips-nat.c \
|
||||
m88k-nat.c m88k-tdep.c mac-nat.c mips-nat.c \
|
||||
mips-tdep.c mipsm3-nat.c mipsv4-nat.c news-xdep.c \
|
||||
nindy-share/Onindy.c nindy-share/nindy.c \
|
||||
nindy-share/ttyflush.c nindy-tdep.c \
|
||||
@@ -1109,11 +1092,6 @@ eval.o: eval.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
|
||||
$(gdbtypes_h) language.h $(symtab_h) target.h $(value_h) \
|
||||
gdb_string.h
|
||||
|
||||
event-loop.o: event-loop.c $(defs_h) $(top_h) $(event_loop_h)
|
||||
|
||||
event-top.o: event-top.c top.h $(readline_headers) \
|
||||
$(defs_h) $(inferior_h) $(event_loop_h) terminal.h
|
||||
|
||||
exec.o: exec.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
|
||||
target.h language.h gdb_string.h
|
||||
|
||||
@@ -1139,6 +1117,8 @@ 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)
|
||||
|
||||
@@ -1216,11 +1196,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 c-lang.h
|
||||
typeprint.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 gdbcore.h annotate.h
|
||||
language.h jv-lang.h c-lang.h
|
||||
|
||||
language.o: language.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
|
||||
$(gdbcmd_h) $(gdbtypes_h) language.h parser-defs.h $(symtab_h) \
|
||||
@@ -1256,7 +1236,7 @@ m88k-tdep.o: m88k-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
|
||||
|
||||
mac-nat.o: mac-nat.c $(defs_h) gdb_string.h
|
||||
|
||||
main.o: main.c top.h $(defs_h) gdb_string.h $(event_loop_h)
|
||||
main.o: main.c top.h $(defs_h) gdb_string.h
|
||||
|
||||
maint.o: maint.c $(defs_h) $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) language.h \
|
||||
$(expression_h) objfiles.h symfile.h
|
||||
@@ -1317,7 +1297,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 $(breakpoint_h)
|
||||
$(symtab_h) gdb_string.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
|
||||
@@ -1524,7 +1504,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) $(value_h)
|
||||
ax-general.o: ax-general.c $(ax_h) $(defs_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
|
||||
|
||||
@@ -1553,16 +1533,14 @@ 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
|
||||
|
||||
thread.o: thread.c $(defs_h) gdbthread.h $(gdbcmd_h) target.h
|
||||
thread.o: thread.c $(defs_h) gdbthread.h $(gdbcmd_h)
|
||||
|
||||
top.o: top.c top.h $(bfd_h) $(getopt_h) $(readline_headers) call-cmds.h \
|
||||
$(defs_h) $(gdbcmd_h) $(inferior_h) language.h signals.h \
|
||||
$(remote_utils_h) gdb_string.h $(event_loop_h)
|
||||
$(remote_utils_h) gdb_string.h
|
||||
|
||||
typeprint.o: typeprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
|
||||
$(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \
|
||||
@@ -1638,5 +1616,4 @@ m2-exp.tab.o: m2-exp.tab.c $(defs_h) $(expression_h) $(gdbtypes_h) \
|
||||
language.h m2-lang.h parser-defs.h $(symtab_h) $(value_h) \
|
||||
$(bfd_h) objfiles.h symfile.h
|
||||
|
||||
|
||||
### end of the gdb Makefile.in.
|
||||
|
||||
7
gdb/NEWS
7
gdb/NEWS
@@ -1,13 +1,6 @@
|
||||
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
|
||||
|
||||
@@ -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://sourceware.cygnus.com/gdb/ for up to
|
||||
date release information, mailing list links and archives, etc.
|
||||
See the GDB home page at http://www.cygnus.com/gdb/ for up to date
|
||||
release information, mailing list links and archives, etc.
|
||||
|
||||
|
||||
Unpacking and Installation -- quick overview
|
||||
@@ -152,8 +152,6 @@ 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)
|
||||
|
||||
20
gdb/TODO
20
gdb/TODO
@@ -9,20 +9,6 @@ General To Do List
|
||||
This list is probably not up to date, and opinions vary about the
|
||||
importance or even desirability of some of the items.
|
||||
|
||||
Document trace machinery.
|
||||
|
||||
Document overlay machinery.
|
||||
|
||||
Extend .gdbinit mechanism to specify name on command line, allow for
|
||||
lists of files to load, include function of --tclcommand.
|
||||
|
||||
@c This does not work (yet if ever). FIXME.
|
||||
@c @item --parse=@var{lang} @dots{}
|
||||
@c Configure the @value{GDBN} expression parser to parse the listed languages.
|
||||
@c @samp{all} configures @value{GDBN} for all supported languages. To get a
|
||||
@c list of all supported languages, omit the argument. Without this
|
||||
@c option, @value{GDBN} is configured to parse all supported languages.
|
||||
|
||||
Add an "info bfd" command that displays supported object formats,
|
||||
similarly to objdump -i.
|
||||
|
||||
@@ -396,6 +382,9 @@ Why do we allow a target to omit standard register names (NO_STD_REGS
|
||||
in tm-z8k.h)? I thought the standard register names were supposed to
|
||||
be just that, standard.
|
||||
|
||||
Make DEBUG_EXPRESSIONS a maintenance command, dependent on
|
||||
MAINTENANCE_COMMANDS.
|
||||
|
||||
Allow core file without exec file on RS/6000.
|
||||
|
||||
Make sure "shell" with no arguments works right on DOS.
|
||||
@@ -477,9 +466,6 @@ Add a command for searching memory, a la adb. It specifies size,
|
||||
mask, value, start address. ADB searches until it finds it or hits
|
||||
an error (or is interrupted).
|
||||
|
||||
Remove the range and type checking code and documentation, if not
|
||||
going to implement.
|
||||
|
||||
# Local Variables:
|
||||
# mode: text
|
||||
# End:
|
||||
|
||||
@@ -337,7 +337,7 @@ examine_prologue (pc, rsize, msize, mfp_used)
|
||||
to reach some "real" code. */
|
||||
|
||||
CORE_ADDR
|
||||
a29k_skip_prologue (pc)
|
||||
skip_prologue (pc)
|
||||
CORE_ADDR pc;
|
||||
{
|
||||
return examine_prologue (pc, NULL, NULL, NULL);
|
||||
@@ -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.
|
||||
/* We're in get_prev_frame_info.
|
||||
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
|
||||
a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp)
|
||||
get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp)
|
||||
char *raw_buffer;
|
||||
int *optimized;
|
||||
CORE_ADDR *addrp;
|
||||
|
||||
@@ -35,6 +35,7 @@ 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);
|
||||
@@ -77,6 +78,7 @@ 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);
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
|
||||
/* Whether malloc must be declared even if <stdlib.h> is included. */
|
||||
#undef NEED_DECLARATION_MALLOC
|
||||
|
||||
/* Whether realloc must be declared even if <stdlib.h> is included. */
|
||||
#undef NEED_DECLARATION_REALLOC
|
||||
|
||||
/* Whether free must be declared even if <stdlib.h> is included. */
|
||||
#undef NEED_DECLARATION_FREE
|
||||
|
||||
/* Whether strerror must be declared even if <string.h> is included. */
|
||||
#undef NEED_DECLARATION_STRERROR
|
||||
@TOP@
|
||||
|
||||
/* Define if pstatus_t type is available */
|
||||
#undef HAVE_PSTATUS_T
|
||||
|
||||
@@ -74,9 +88,6 @@
|
||||
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
|
||||
|
||||
|
||||
@@ -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
6
gdb/aclocal.m4
vendored
@@ -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,[
|
||||
|
||||
@@ -59,10 +59,6 @@ static CORE_ADDR after_prologue PARAMS ((CORE_ADDR pc,
|
||||
static int alpha_in_prologue PARAMS ((CORE_ADDR pc,
|
||||
alpha_extra_func_info_t proc_desc));
|
||||
|
||||
static int alpha_about_to_return PARAMS ((CORE_ADDR pc));
|
||||
|
||||
void _initialize_alpha_tdep PARAMS ((void));
|
||||
|
||||
/* Heuristic_proc_start may hunt through the text section for a long
|
||||
time across a 2400 baud serial line. Allows the user to limit this
|
||||
search. */
|
||||
@@ -112,11 +108,8 @@ static unsigned int heuristic_fence_post = 0;
|
||||
*/
|
||||
|
||||
#define PROC_LOW_ADDR(proc) ((proc)->pdr.adr) /* least address */
|
||||
/* These next two fields are kind of being hijacked. I wonder if
|
||||
iline is too small for the values it needs to hold, if GDB is
|
||||
running on a 32-bit host. */
|
||||
#define PROC_HIGH_ADDR(proc) ((proc)->pdr.iline) /* upper address bound */
|
||||
#define PROC_DUMMY_FRAME(proc) ((proc)->pdr.cbLineOffset) /*CALL_DUMMY frame */
|
||||
#define PROC_DUMMY_FRAME(proc) ((proc)->pdr.iopt) /* frame for CALL_DUMMY */
|
||||
#define PROC_FRAME_OFFSET(proc) ((proc)->pdr.frameoffset)
|
||||
#define PROC_FRAME_REG(proc) ((proc)->pdr.framereg)
|
||||
#define PROC_REG_MASK(proc) ((proc)->pdr.regmask)
|
||||
@@ -161,14 +154,8 @@ 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 (pc)
|
||||
CORE_ADDR pc;
|
||||
alpha_linux_sigtramp_offset (CORE_ADDR pc)
|
||||
{
|
||||
unsigned int i[3], w;
|
||||
long off;
|
||||
@@ -916,7 +903,7 @@ alpha_push_arguments (nargs, args, sp, struct_return, struct_addr)
|
||||
int struct_return;
|
||||
CORE_ADDR struct_addr;
|
||||
{
|
||||
int i;
|
||||
register 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; };
|
||||
@@ -1114,15 +1101,6 @@ alpha_pop_frame()
|
||||
|
||||
alpha_extra_func_info_t proc_desc = frame->proc_desc;
|
||||
|
||||
/* we need proc_desc to know how to restore the registers;
|
||||
if it is NULL, construct (a temporary) one */
|
||||
if (proc_desc == NULL)
|
||||
proc_desc = find_proc_desc(frame->pc, frame->next);
|
||||
|
||||
/* Question: should we copy this proc_desc and save it in
|
||||
frame->proc_desc? If we do, who will free it?
|
||||
For now, we don't save a copy... */
|
||||
|
||||
write_register (PC_REGNUM, FRAME_SAVED_PC(frame));
|
||||
if (frame->saved_regs == NULL)
|
||||
alpha_find_saved_regs (frame);
|
||||
@@ -1231,21 +1209,18 @@ alpha_skip_prologue (pc, lenient)
|
||||
continue;
|
||||
if ((inst & 0xffff0000) == 0x23de0000) /* lda $sp,n($sp) */
|
||||
continue;
|
||||
if ((inst & 0xffe01fff) == 0x43c0153e) /* subq $sp,n,$sp */
|
||||
continue;
|
||||
|
||||
if ((inst & 0xfc1f0000) == 0xb41e0000
|
||||
&& (inst & 0xffff0000) != 0xb7fe0000)
|
||||
else if ((inst & 0xfc1f0000) == 0xb41e0000
|
||||
&& (inst & 0xffff0000) != 0xb7fe0000)
|
||||
continue; /* stq reg,n($sp) */
|
||||
/* reg != $zero */
|
||||
if ((inst & 0xfc1f0000) == 0x9c1e0000
|
||||
&& (inst & 0xffff0000) != 0x9ffe0000)
|
||||
else if ((inst & 0xfc1f0000) == 0x9c1e0000
|
||||
&& (inst & 0xffff0000) != 0x9ffe0000)
|
||||
continue; /* stt reg,n($sp) */
|
||||
/* reg != $zero */
|
||||
if (inst == 0x47de040f) /* bis sp,sp,fp */
|
||||
else if (inst == 0x47de040f) /* bis sp,sp,fp */
|
||||
continue;
|
||||
|
||||
break;
|
||||
else
|
||||
break;
|
||||
}
|
||||
return pc + offset;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ 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. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Annotation routines for GDB.
|
||||
Copyright 1986, 89, 90, 91, 92, 95, 98, 1999 Free Software Foundation, Inc.
|
||||
Copyright 1986, 89, 90, 91, 92, 95, 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -27,8 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Prototypes for local functions. */
|
||||
|
||||
extern void _initialize_annotate PARAMS ((void));
|
||||
|
||||
static void print_value_flags PARAMS ((struct type *));
|
||||
|
||||
static void breakpoint_changed PARAMS ((struct breakpoint *));
|
||||
@@ -36,7 +34,6 @@ 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
|
||||
@@ -164,9 +161,6 @@ annotate_signal_string_end ()
|
||||
void
|
||||
annotate_signal ()
|
||||
{
|
||||
if (annotate_signal_hook)
|
||||
annotate_signal_hook ();
|
||||
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032signal\n");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Annotation routines for GDB.
|
||||
Copyright 1986, 1989, 1990, 1991, 1992, 1999 Free Software Foundation, Inc.
|
||||
Copyright 1986, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -101,5 +101,4 @@ 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));
|
||||
|
||||
@@ -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. */
|
||||
@@ -264,7 +264,7 @@ arc_get_frame_setup (pc)
|
||||
This allows a quicker answer. */
|
||||
|
||||
CORE_ADDR
|
||||
arc_skip_prologue (pc, frameless_p)
|
||||
skip_prologue (pc, frameless_p)
|
||||
CORE_ADDR pc;
|
||||
int frameless_p;
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Target-dependent code for the Acorn Risc Machine (ARM).
|
||||
Copyright (C) 1988, 1989, 1991, 1992, 1993, 1995-1999
|
||||
/* Target-dependent code for the Acorn Risc Machine, for GDB, the GNU Debugger.
|
||||
Copyright (C) 1988, 1989, 1991, 1992, 1993, 1995, 1996, 1998, 1999
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
@@ -137,19 +137,6 @@ arm_saved_pc_after_call (frame)
|
||||
return ADDR_BITS_REMOVE (read_register (LR_REGNUM));
|
||||
}
|
||||
|
||||
int
|
||||
arm_frameless_function_invocation (fi)
|
||||
struct frame_info *fi;
|
||||
{
|
||||
int frameless;
|
||||
CORE_ADDR func_start, after_prologue;
|
||||
func_start = (get_pc_function_start ((fi)->pc) + FUNCTION_START_OFFSET);
|
||||
after_prologue = func_start;
|
||||
SKIP_PROLOGUE (after_prologue);
|
||||
frameless = (after_prologue == func_start);
|
||||
return frameless;
|
||||
}
|
||||
|
||||
/* A typical Thumb prologue looks like this:
|
||||
push {r7, lr}
|
||||
add sp, sp, #-28
|
||||
@@ -492,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 = ADDR_BITS_REMOVE(read_memory_integer (fi->frame, 4)) - 12;
|
||||
prologue_start = (read_memory_integer (fi->frame, 4) & 0x03fffffc) - 12;
|
||||
prologue_end = prologue_start + 40; /* FIXME: should be big enough */
|
||||
}
|
||||
|
||||
@@ -987,16 +974,14 @@ 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, old_SP);
|
||||
write_register (SP_REGNUM, read_register (frame->framereg));
|
||||
|
||||
flush_cached_frames ();
|
||||
}
|
||||
|
||||
@@ -161,6 +161,7 @@ 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. */
|
||||
|
||||
@@ -17,6 +17,8 @@ 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"
|
||||
|
||||
@@ -17,6 +17,8 @@ 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
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ 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
|
||||
@@ -25,15 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#include "defs.h"
|
||||
#include "ax.h"
|
||||
|
||||
#include "value.h"
|
||||
|
||||
static void grow_expr PARAMS ((struct agent_expr *x, int n));
|
||||
|
||||
static void append_const PARAMS ((struct agent_expr *x, LONGEST val, int n));
|
||||
|
||||
static LONGEST read_const PARAMS ((struct agent_expr *x, int o, int n));
|
||||
|
||||
static void generic_ext PARAMS ((struct agent_expr *x, enum agent_op op, int n));
|
||||
|
||||
/* Functions for building expressions. */
|
||||
|
||||
|
||||
2
gdb/ax.h
2
gdb/ax.h
@@ -17,6 +17,8 @@ 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
|
||||
|
||||
|
||||
@@ -138,6 +138,8 @@ bcache (bytes, count, bcachep)
|
||||
return (location);
|
||||
}
|
||||
|
||||
#if MAINTENANCE_CMDS
|
||||
|
||||
void
|
||||
print_bcache_statistics (bcachep, id)
|
||||
struct bcache *bcachep;
|
||||
@@ -213,3 +215,5 @@ print_bcache_statistics (bcachep, id)
|
||||
}
|
||||
printf_filtered (" Maximum chain length %d at %d:%d\n", lmax, lmaxt, lmaxh);
|
||||
}
|
||||
|
||||
#endif /* MAINTENANCE_CMDS */
|
||||
|
||||
@@ -62,7 +62,11 @@ 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 */
|
||||
|
||||
171
gdb/blockframe.c
171
gdb/blockframe.c
@@ -88,14 +88,13 @@ 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;
|
||||
}
|
||||
#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
|
||||
return (addr >= symfile_objfile -> ei.entry_file_lowpc &&
|
||||
addr < symfile_objfile -> ei.entry_file_highpc);
|
||||
}
|
||||
@@ -149,20 +148,19 @@ 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;
|
||||
}
|
||||
#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
|
||||
return (symfile_objfile -> ei.entry_func_lowpc <= pc &&
|
||||
symfile_objfile -> ei.entry_func_highpc > pc);
|
||||
}
|
||||
@@ -247,6 +245,16 @@ 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). */
|
||||
|
||||
@@ -307,9 +315,9 @@ frameless_look_for_prologue (frame)
|
||||
#ifdef SKIP_PROLOGUE_FRAMELESS_P
|
||||
/* This is faster, since only care whether there *is* a prologue,
|
||||
not how long it is. */
|
||||
after_prologue = SKIP_PROLOGUE_FRAMELESS_P (after_prologue);
|
||||
SKIP_PROLOGUE_FRAMELESS_P (after_prologue);
|
||||
#else
|
||||
after_prologue = SKIP_PROLOGUE (after_prologue);
|
||||
SKIP_PROLOGUE (after_prologue);
|
||||
#endif
|
||||
return after_prologue == func_start;
|
||||
}
|
||||
@@ -344,7 +352,7 @@ frameless_look_for_prologue (frame)
|
||||
if there is no such frame. */
|
||||
|
||||
struct frame_info *
|
||||
get_prev_frame (next_frame)
|
||||
get_prev_frame_info (next_frame)
|
||||
struct frame_info *next_frame;
|
||||
{
|
||||
CORE_ADDR address = 0;
|
||||
@@ -381,16 +389,17 @@ get_prev_frame (next_frame)
|
||||
define this macro to take two args; a frameinfo pointer
|
||||
identifying a frame and a variable to set or clear if it is
|
||||
or isn't leafless. */
|
||||
|
||||
#ifdef FRAMELESS_FUNCTION_INVOCATION
|
||||
/* Still don't want to worry about this except on the innermost
|
||||
frame. This macro will set FROMLEAF if NEXT_FRAME is a
|
||||
frameless function invocation. */
|
||||
if (!(next_frame->next))
|
||||
{
|
||||
fromleaf = FRAMELESS_FUNCTION_INVOCATION (next_frame);
|
||||
FRAMELESS_FUNCTION_INVOCATION (next_frame, fromleaf);
|
||||
if (fromleaf)
|
||||
address = FRAME_FP (next_frame);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!fromleaf)
|
||||
{
|
||||
@@ -1025,72 +1034,7 @@ sigtramp_saved_pc (frame)
|
||||
}
|
||||
#endif /* SIGCONTEXT_PC_OFFSET */
|
||||
|
||||
|
||||
/* 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));
|
||||
}
|
||||
|
||||
#ifdef USE_GENERIC_DUMMY_FRAMES
|
||||
|
||||
/*
|
||||
* GENERIC DUMMY FRAMES
|
||||
@@ -1107,22 +1051,7 @@ pc_in_call_dummy_at_entry_point (pc, sp, frame_address)
|
||||
* zero, and CALL_DUMMY_LOCATION to AT_ENTRY. Then you must remember
|
||||
* to define PUSH_RETURN_ADDRESS, because no call instruction will be
|
||||
* being executed by the target. Also FRAME_CHAIN_VALID as
|
||||
* generic_frame_chain_valid and FIX_CALL_DUMMY as
|
||||
* generic_fix_call_dummy. */
|
||||
|
||||
/* 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;
|
||||
};
|
||||
* generic_frame_chain_valid. */
|
||||
|
||||
static struct dummy_frame *dummy_frame_stack = NULL;
|
||||
|
||||
@@ -1144,7 +1073,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->registers;
|
||||
return dummyframe->regs;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1153,14 +1082,12 @@ 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, sp, fp)
|
||||
generic_pc_in_call_dummy (pc, fp)
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR sp;
|
||||
CORE_ADDR fp;
|
||||
{
|
||||
/* if find_dummy_frame succeeds, then PC is in a call dummy */
|
||||
/* Note: SP and not FP is passed on. */
|
||||
return (generic_find_dummy_frame (pc, sp) != 0);
|
||||
return (generic_find_dummy_frame (pc, fp) != 0);
|
||||
}
|
||||
|
||||
/* Function: read_register_dummy
|
||||
@@ -1210,12 +1137,10 @@ 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->registers, REGISTER_BYTES);
|
||||
read_register_bytes (0, dummy_frame->regs, REGISTER_BYTES);
|
||||
dummy_frame->next = dummy_frame_stack;
|
||||
dummy_frame_stack = dummy_frame;
|
||||
}
|
||||
@@ -1249,10 +1174,8 @@ 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->registers, REGISTER_BYTES);
|
||||
write_register_bytes (0, dummy_frame->regs, REGISTER_BYTES);
|
||||
flush_cached_frames ();
|
||||
|
||||
free (dummy_frame->registers);
|
||||
free (dummy_frame);
|
||||
}
|
||||
|
||||
@@ -1273,23 +1196,6 @@ generic_frame_chain_valid (fp, fi)
|
||||
&& !inside_entry_file (FRAME_SAVED_PC(fi)));
|
||||
}
|
||||
|
||||
/* Function: fix_call_dummy
|
||||
Stub function. Generic dumy frames typically do not need to fix
|
||||
the frame being created */
|
||||
|
||||
void
|
||||
generic_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p)
|
||||
char *dummy;
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR fun;
|
||||
int nargs;
|
||||
struct value **args;
|
||||
struct type *type;
|
||||
int gcc_p;
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Function: get_saved_register
|
||||
Find register number REGNUM relative to FRAME and put its (raw,
|
||||
target format) contents in *RAW_BUFFER.
|
||||
@@ -1386,6 +1292,7 @@ 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 ()
|
||||
|
||||
135
gdb/breakpoint.c
135
gdb/breakpoint.c
@@ -88,14 +88,9 @@ 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));
|
||||
|
||||
@@ -187,36 +182,6 @@ 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
|
||||
@@ -877,9 +842,6 @@ which its expression is valid.\n", b->number);
|
||||
case bp_catch_exec :
|
||||
val = target_insert_exec_catchpoint (inferior_pid);
|
||||
break;
|
||||
default:
|
||||
warning ("GDB bug: breakpoint.c (insert_breakpoints): enclosing `if' does not protect `switch'");
|
||||
break;
|
||||
}
|
||||
if (val < 0)
|
||||
{
|
||||
@@ -1194,9 +1156,6 @@ remove_breakpoint (b, is)
|
||||
case bp_catch_exec :
|
||||
val = target_remove_exec_catchpoint (inferior_pid);
|
||||
break;
|
||||
default:
|
||||
warning ("GDB bug: breakpoint.c (remove_breakpoint): enclosing `if' does not protect `switch'");
|
||||
break;
|
||||
}
|
||||
if (val)
|
||||
return val;
|
||||
@@ -1368,26 +1327,29 @@ 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_CALL_DUMMY_WORDS / sizeof (LONGEST) * REGISTER_SIZE))
|
||||
- sizeof (dummy) / sizeof (LONGEST) * REGISTER_SIZE))
|
||||
&& frame->pc <= b->address)
|
||||
return 1;
|
||||
}
|
||||
#endif /* GENERIC_DUMMY_FRAMES */
|
||||
#endif /* CALL_DUMMY */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2719,7 +2681,6 @@ breakpoint_1 (bnum, allflag)
|
||||
static char bpenables[] = "nyn";
|
||||
char wrap_indent[80];
|
||||
|
||||
|
||||
ALL_BREAKPOINTS (b)
|
||||
if (bnum == -1
|
||||
|| bnum == b->number)
|
||||
@@ -2935,7 +2896,7 @@ breakpoint_1 (bnum, allflag)
|
||||
|
||||
while (l)
|
||||
{
|
||||
print_command_line (l, 4, gdb_stdout);
|
||||
print_command_line (l, 4);
|
||||
l = l->next;
|
||||
}
|
||||
}
|
||||
@@ -2971,8 +2932,10 @@ breakpoints_info (bnum_exp, from_tty)
|
||||
breakpoint_1 (bnum, 0);
|
||||
}
|
||||
|
||||
#if MAINTENANCE_CMDS
|
||||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
void
|
||||
maintenance_info_breakpoints (bnum_exp, from_tty)
|
||||
char *bnum_exp;
|
||||
int from_tty;
|
||||
@@ -2985,6 +2948,8 @@ maintenance_info_breakpoints (bnum_exp, from_tty)
|
||||
breakpoint_1 (bnum, 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Print a message describing any breakpoints set at PC. */
|
||||
|
||||
static void
|
||||
@@ -3276,11 +3241,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;
|
||||
@@ -3386,9 +3351,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;
|
||||
@@ -4127,7 +4092,7 @@ break_command (arg, from_tty)
|
||||
break_command_1 (arg, 0, from_tty);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
break_at_finish_command (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
@@ -4135,7 +4100,7 @@ break_at_finish_command (arg, from_tty)
|
||||
break_at_finish_command_1 (arg, 0, from_tty);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
break_at_finish_at_depth_command (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
@@ -4151,7 +4116,7 @@ tbreak_command (arg, from_tty)
|
||||
break_command_1 (arg, BP_TEMPFLAG, from_tty);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
tbreak_at_finish_command (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
@@ -4566,7 +4531,6 @@ 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.
|
||||
@@ -4630,7 +4594,6 @@ 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. */
|
||||
|
||||
@@ -4748,7 +4711,7 @@ get_catch_sals (this_level_only)
|
||||
|
||||
static void
|
||||
ep_skip_leading_whitespace (s)
|
||||
char **s;
|
||||
char ** s;
|
||||
{
|
||||
if ((s == NULL) || (*s == NULL))
|
||||
return;
|
||||
@@ -4762,7 +4725,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;
|
||||
@@ -4795,7 +4758,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;
|
||||
|
||||
@@ -4828,7 +4791,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;
|
||||
@@ -4858,14 +4821,12 @@ 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;
|
||||
|
||||
@@ -4898,9 +4859,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;
|
||||
|
||||
@@ -5018,10 +4979,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;
|
||||
@@ -5059,10 +5020,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;
|
||||
@@ -6626,6 +6587,8 @@ 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\
|
||||
@@ -6645,6 +6608,8 @@ 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\
|
||||
|
||||
@@ -112,7 +112,6 @@ enum bptype {
|
||||
commands for C++ exception handling. */
|
||||
bp_catch_catch,
|
||||
bp_catch_throw
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
2796
gdb/c-exp.tab.c
Normal file
2796
gdb/c-exp.tab.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#include "language.h"
|
||||
#include "c-lang.h"
|
||||
|
||||
extern void _initialize_c_language PARAMS ((void));
|
||||
static void c_emit_char PARAMS ((int c, GDB_FILE *stream, int quoter));
|
||||
|
||||
/* Print the character C on STREAM as part of the contents of a literal
|
||||
|
||||
@@ -41,8 +41,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* Flag indicating target was compiled by HP compiler */
|
||||
extern int hp_som_som_object_present;
|
||||
|
||||
static void cp_type_print_method_args PARAMS ((struct type **args, char *prefix, char *varstring, int staticp, GDB_FILE *stream));
|
||||
|
||||
static void
|
||||
c_type_print_args PARAMS ((struct type *, GDB_FILE *));
|
||||
|
||||
@@ -205,7 +203,7 @@ cp_type_print_derivation_info (stream, type)
|
||||
}
|
||||
/* Print the C++ method arguments ARGS to the file STREAM. */
|
||||
|
||||
static void
|
||||
void
|
||||
cp_type_print_method_args (args, prefix, varstring, staticp, stream)
|
||||
struct type **args;
|
||||
char *prefix;
|
||||
@@ -915,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 == ':')
|
||||
|
||||
@@ -26,8 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#include "language.h"
|
||||
#include "ch-lang.h"
|
||||
|
||||
extern void _initialize_chill_language PARAMS ((void));
|
||||
|
||||
static value_ptr
|
||||
evaluate_subexp_chill PARAMS ((struct type *, struct expression *, int *, enum noside));
|
||||
|
||||
|
||||
@@ -42,8 +42,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#include "complaints.h"
|
||||
#include "target.h"
|
||||
|
||||
extern void _initialize_coffread PARAMS ((void));
|
||||
|
||||
struct coff_symfile_info {
|
||||
file_ptr min_lineno_offset; /* Where in file lowest line#s are */
|
||||
file_ptr max_lineno_offset; /* 1+last byte of line#s in file */
|
||||
@@ -86,6 +84,21 @@ 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. */
|
||||
|
||||
@@ -239,6 +252,8 @@ 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));
|
||||
@@ -425,6 +440,30 @@ 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. */
|
||||
@@ -445,6 +484,17 @@ 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,
|
||||
@@ -485,12 +535,26 @@ 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;
|
||||
}
|
||||
|
||||
@@ -619,6 +683,7 @@ 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;
|
||||
@@ -688,17 +753,6 @@ coff_symfile_read (objfile, section_offsets, mainline)
|
||||
|
||||
if (info->stabsects)
|
||||
{
|
||||
if (! info->stabstrsect)
|
||||
{
|
||||
error_begin ();
|
||||
fprintf_filtered
|
||||
(gdb_stderr,
|
||||
("The debugging information in `%s' is corrupted.\n"
|
||||
"The file has a `.stabs' section, but no `.stabstr' section.\n"),
|
||||
name);
|
||||
return_to_top_level (RETURN_ERROR);
|
||||
}
|
||||
|
||||
/* FIXME: dubious. Why can't we use something normal like
|
||||
bfd_get_section_contents? */
|
||||
bfd_seek (abfd, abfd->where, 0);
|
||||
@@ -766,7 +820,6 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
|
||||
char *filestring = "";
|
||||
int depth = 0;
|
||||
int fcn_first_line = 0;
|
||||
CORE_ADDR fcn_first_line_addr;
|
||||
int fcn_last_line = 0;
|
||||
int fcn_start_addr = 0;
|
||||
long fcn_line_ptr = 0;
|
||||
@@ -1023,7 +1076,6 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
|
||||
if (cs->c_naux != 1)
|
||||
complain (&bf_no_aux_complaint, cs->c_symnum);
|
||||
fcn_first_line = main_aux.x_sym.x_misc.x_lnsz.x_lnno;
|
||||
fcn_first_line_addr = cs->c_value;
|
||||
|
||||
/* Might want to check that locals are 0 and
|
||||
context_stack_depth is zero, and complain if not. */
|
||||
@@ -1066,18 +1118,8 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
|
||||
{
|
||||
fcn_last_line = main_aux.x_sym.x_misc.x_lnsz.x_lnno;
|
||||
}
|
||||
/* fcn_first_line is the line number of the opening '{'.
|
||||
Do not record it - because it would affect gdb's idea
|
||||
of the line number of the first statement of the function -
|
||||
except for one-line functions, for which it is also the line
|
||||
number of all the statements and of the closing '}', and
|
||||
for which we do not have any other statement-line-number. */
|
||||
if (fcn_last_line == 1)
|
||||
record_line (current_subfile, fcn_first_line,
|
||||
fcn_first_line_addr);
|
||||
else
|
||||
enter_linenos (fcn_line_ptr, fcn_first_line, fcn_last_line,
|
||||
section_offsets);
|
||||
enter_linenos (fcn_line_ptr, fcn_first_line, fcn_last_line,
|
||||
section_offsets);
|
||||
|
||||
finish_block (new->name, &local_symbols, new->old_blocks,
|
||||
new->start_addr,
|
||||
@@ -1416,7 +1458,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)
|
||||
record_line (current_subfile, first_line + L_LNNO32 (&lptr),
|
||||
coff_record_line (first_line + L_LNNO32 (&lptr),
|
||||
lptr.l_addr.l_paddr
|
||||
+ ANOFFSET (section_offsets, SECT_OFF_TEXT));
|
||||
else
|
||||
|
||||
@@ -51,12 +51,6 @@ static int parse_binary_operation PARAMS ((char *));
|
||||
|
||||
static void print_doc_line PARAMS ((GDB_FILE *, char *));
|
||||
|
||||
static struct cmd_list_element *find_cmd PARAMS ((char *command,
|
||||
int len,
|
||||
struct cmd_list_element *clist,
|
||||
int ignore_help_classes,
|
||||
int *nfound));
|
||||
|
||||
void _initialize_command PARAMS ((void));
|
||||
|
||||
/* Add element named NAME.
|
||||
@@ -574,7 +568,6 @@ help_cmd_list (list, class, prefix, recurse, stream)
|
||||
static struct cmd_list_element *
|
||||
find_cmd(command, len, clist, ignore_help_classes, nfound)
|
||||
char *command;
|
||||
int len;
|
||||
struct cmd_list_element *clist;
|
||||
int ignore_help_classes;
|
||||
int *nfound;
|
||||
@@ -1520,7 +1513,7 @@ show_user_1 (c, stream)
|
||||
|
||||
while (cmdlines)
|
||||
{
|
||||
print_command_line (cmdlines, 4, stream);
|
||||
print_command_line (cmdlines, 4);
|
||||
cmdlines = cmdlines->next;
|
||||
}
|
||||
fputs_filtered ("\n", stream);
|
||||
|
||||
@@ -21,8 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#include "complaints.h"
|
||||
#include "gdbcmd.h"
|
||||
|
||||
extern void _initialize_complaints PARAMS ((void));
|
||||
|
||||
/* Structure to manage complaints about symbol file contents. */
|
||||
|
||||
struct complaint complaint_root[1] = {
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
/* config.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Whether malloc must be declared even if <stdlib.h> is included. */
|
||||
#undef NEED_DECLARATION_MALLOC
|
||||
|
||||
/* Whether realloc must be declared even if <stdlib.h> is included. */
|
||||
#undef NEED_DECLARATION_REALLOC
|
||||
|
||||
/* Whether free must be declared even if <stdlib.h> is included. */
|
||||
#undef NEED_DECLARATION_FREE
|
||||
|
||||
/* Whether strerror must be declared even if <string.h> is included. */
|
||||
#undef NEED_DECLARATION_STRERROR
|
||||
|
||||
/* Define if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
@@ -104,13 +116,6 @@
|
||||
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
|
||||
|
||||
@@ -135,9 +140,6 @@
|
||||
/* Define if you have the bzero function. */
|
||||
#undef HAVE_BZERO
|
||||
|
||||
/* Define if you have the poll function. */
|
||||
#undef HAVE_POLL
|
||||
|
||||
/* Define if you have the dcgettext function. */
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
@@ -246,9 +248,6 @@
|
||||
/* 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
|
||||
|
||||
@@ -312,9 +311,6 @@
|
||||
/* Define if strdup is not declared in system header files. */
|
||||
#undef NEED_DECLARATION_STRDUP
|
||||
|
||||
/* Define if strstr is not declared in system header files. */
|
||||
#undef NEED_DECLARATION_STRSTR
|
||||
|
||||
/* Define if <sys/procfs.h> has pstatus_t. */
|
||||
#undef HAVE_PSTATUS_T
|
||||
|
||||
|
||||
@@ -43,8 +43,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
#define SKIP_PROLOGUE(pc) (a29k_skip_prologue (pc))
|
||||
CORE_ADDR a29k_skip_prologue ();
|
||||
#define SKIP_PROLOGUE(pc) \
|
||||
{ pc = skip_prologue (pc); }
|
||||
CORE_ADDR skip_prologue ();
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
Can't go through the frames for this because on some machines
|
||||
@@ -428,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, that is. */
|
||||
get_prev_frame_info, that is. */
|
||||
#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) init_extra_frame_info(fci)
|
||||
void init_extra_frame_info ();
|
||||
|
||||
@@ -471,10 +472,11 @@ void init_frame_pc ();
|
||||
|
||||
/* Define other aspects of the stack frame. */
|
||||
|
||||
/* An expression that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. */
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(frameless_look_for_prologue (FI))
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
(FRAMELESS) = frameless_look_for_prologue(FI)
|
||||
|
||||
/* Saved pc (i.e. return address). */
|
||||
#define FRAME_SAVED_PC(fraim) \
|
||||
@@ -493,7 +495,7 @@ extern CORE_ADDR frame_locals_address ();
|
||||
the argcount field from it, to support debugging assembler code.
|
||||
Problem was, the "argcount" field never did hold the argument
|
||||
count. */
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(numargs, fi) ((numargs) = -1)
|
||||
|
||||
#define FRAME_ARGS_ADDRESS(fi) FRAME_LOCALS_ADDRESS (fi)
|
||||
|
||||
@@ -504,13 +506,7 @@ 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. */
|
||||
|
||||
#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)
|
||||
#define GET_SAVED_REGISTER
|
||||
|
||||
/* Call function stuff. */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Target machine description for VxWorks on the 29k, for GDB, the GNU debugger.
|
||||
Copyright 1994, 1999 Free Software Foundation, Inc.
|
||||
Copyright 1994 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
|
||||
This file is part of GDB.
|
||||
@@ -19,7 +19,10 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "a29k/tm-a29k.h"
|
||||
#include "tm-vxworks.h"
|
||||
|
||||
#define GDBINIT_FILENAME ".vxgdbinit"
|
||||
|
||||
#define DEFAULT_PROMPT "(vxgdb) "
|
||||
|
||||
/* Number of registers in a ptrace_getregs call. */
|
||||
|
||||
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 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
|
||||
|
||||
@@ -59,7 +59,7 @@ struct symbol;
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
#define SKIP_PROLOGUE(pc) (alpha_skip_prologue(pc, 0))
|
||||
#define SKIP_PROLOGUE(pc) pc = alpha_skip_prologue(pc, 0)
|
||||
extern CORE_ADDR alpha_skip_prologue PARAMS ((CORE_ADDR addr, int lenient));
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
@@ -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", "fpcr",\
|
||||
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",\
|
||||
"pc", "vfp", \
|
||||
}
|
||||
|
||||
@@ -132,7 +132,6 @@ 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 */
|
||||
|
||||
@@ -177,7 +176,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 + 31)
|
||||
#define REGISTER_CONVERTIBLE(N) ((N) >= FP0_REGNUM && (N) < FP0_REGNUM + 32)
|
||||
|
||||
/* Convert data from raw format for register REGNUM in buffer FROM
|
||||
to virtual format with type TYPE in buffer TO. */
|
||||
@@ -199,7 +198,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+31) \
|
||||
(((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) \
|
||||
? builtin_type_double : builtin_type_long) \
|
||||
|
||||
/* Store the address of the place in which to copy the structure the
|
||||
@@ -252,11 +251,12 @@ extern CORE_ADDR alpha_frame_chain PARAMS ((struct frame_info *));
|
||||
/* Define other aspects of the stack frame. */
|
||||
|
||||
|
||||
/* An expression that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. */
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
/* We handle this differently for alpha, and maybe we should not */
|
||||
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) (0)
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) {(FRAMELESS) = 0;}
|
||||
|
||||
/* Saved Pc. */
|
||||
|
||||
@@ -286,7 +286,7 @@ alpha_frame_saved_pc PARAMS ((struct frame_info *));
|
||||
/* Return number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(num, fi) ((num) = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
@@ -311,7 +311,7 @@ extern void alpha_find_saved_regs PARAMS ((struct frame_info *));
|
||||
/* Things needed for making the inferior call functions. */
|
||||
|
||||
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
|
||||
(alpha_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
|
||||
sp = alpha_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
|
||||
extern CORE_ADDR
|
||||
alpha_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
|
||||
|
||||
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#if !defined (HOST_BYTE_ORDER)
|
||||
#define HOST_BYTE_ORDER LITTLE_ENDIAN
|
||||
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#if !defined (HOST_BYTE_ORDER)
|
||||
#define HOST_BYTE_ORDER LITTLE_ENDIAN
|
||||
|
||||
@@ -37,9 +37,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
knows that the function has a frame. Its result is equal
|
||||
to its input PC if the function is frameless, unequal otherwise. */
|
||||
|
||||
#define SKIP_PROLOGUE(pc) (arc_skip_prologue (pc, 0))
|
||||
#define SKIP_PROLOGUE_FRAMELESS_P(pc) (arc_skip_prologue (pc, 1))
|
||||
extern CORE_ADDR arc_skip_prologue PARAMS ((CORE_ADDR, int));
|
||||
#define SKIP_PROLOGUE(pc) \
|
||||
{ pc = skip_prologue (pc, 0); }
|
||||
#define SKIP_PROLOGUE_FRAMELESS_P(pc) \
|
||||
{ pc = skip_prologue (pc, 1); }
|
||||
extern CORE_ADDR skip_prologue PARAMS ((CORE_ADDR, int));
|
||||
|
||||
/* Sequence of bytes for breakpoint instruction.
|
||||
??? The current value is "sr -1,[-1]" and is for the simulator only.
|
||||
@@ -265,11 +267,17 @@ extern void arc_software_single_step PARAMS ((unsigned int, int));
|
||||
and has no caller. */
|
||||
#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
|
||||
|
||||
/* An expression that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. */
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue (FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
do { \
|
||||
if ((FI)->signal_handler_caller) \
|
||||
(FRAMELESS) = 0; \
|
||||
else \
|
||||
(FRAMELESS) = frameless_look_for_prologue (FI); \
|
||||
} while (0)
|
||||
|
||||
/* Where is the PC for a specific frame.
|
||||
A leaf function may never save blink, so we have to check for that here. */
|
||||
@@ -294,7 +302,7 @@ CORE_ADDR arc_frame_saved_pc PARAMS ((struct frame_info *));
|
||||
/* Set NUMARGS to the number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(numargs, fi) (numargs = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions to make GDB target for an ARM
|
||||
Copyright 1986-1989, 1991, 1993-1999 Free Software Foundation, Inc.
|
||||
Copyright 1986, 1987, 1989, 1991, 1993, 1997, 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -56,7 +56,7 @@ CORE_ADDR arm_addr_bits_remove PARAMS ((CORE_ADDR));
|
||||
|
||||
extern CORE_ADDR arm_skip_prologue PARAMS ((CORE_ADDR pc));
|
||||
|
||||
#define SKIP_PROLOGUE(pc) (arm_skip_prologue (pc))
|
||||
#define SKIP_PROLOGUE(pc) { pc = arm_skip_prologue (pc); }
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
Can't always go through the frames for this because on some machines
|
||||
@@ -268,8 +268,7 @@ 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) \
|
||||
(extract_address ((PTR) (REGBUF), REGISTER_RAW_SIZE(0)))
|
||||
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
|
||||
|
||||
/* Specify that for the native compiler variables for a particular
|
||||
lexical context are listed after the beginning LBRAC instead of
|
||||
@@ -313,10 +312,18 @@ extern int arm_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
|
||||
|
||||
/* Define other aspects of the stack frame. */
|
||||
|
||||
/* An expression that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. */
|
||||
extern int arm_frameless_function_invocation PARAMS ((struct frame_info *frame));
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) (arm_frameless_function_invocation (FI))
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
{ \
|
||||
CORE_ADDR func_start, after_prologue; \
|
||||
func_start = (get_pc_function_start ((FI)->pc) + \
|
||||
FUNCTION_START_OFFSET); \
|
||||
after_prologue = func_start; \
|
||||
SKIP_PROLOGUE (after_prologue); \
|
||||
(FRAMELESS) = (after_prologue == func_start); \
|
||||
}
|
||||
|
||||
/* Saved Pc. */
|
||||
|
||||
@@ -330,7 +337,7 @@ extern CORE_ADDR arm_frame_saved_pc PARAMS ((struct frame_info *));
|
||||
/* Return number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(numargs, fi) (numargs = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
@@ -354,8 +361,9 @@ void frame_find_saved_regs PARAMS((struct frame_info *fi,
|
||||
/* Things needed for making the inferior call functions. */
|
||||
|
||||
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
|
||||
(arm_push_arguments ((nargs), (args), (sp), (struct_return), (struct_addr)))
|
||||
extern CORE_ADDR arm_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
|
||||
sp = arm_push_arguments ((nargs), (args), (sp), (struct_return), (struct_addr))
|
||||
extern CORE_ADDR
|
||||
arm_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
|
||||
|
||||
/* Push an empty stack frame, to record the current PC, etc. */
|
||||
|
||||
|
||||
@@ -52,8 +52,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
[ld.- -(ap),-] pcc/gcc register arg loads
|
||||
*/
|
||||
|
||||
extern CORE_ADDR convex_skip_prologue PARAMS ((CORE_ADDR pc));
|
||||
#define SKIP_PROLOGUE(pc) (convex_skip_prologue (pc))
|
||||
#define SKIP_PROLOGUE(pc) \
|
||||
{ int op, ix; \
|
||||
op = read_memory_integer (pc, 2); \
|
||||
if ((op & 0xffc7) == 0x5ac0) pc += 2; \
|
||||
else if (op == 0x1580) pc += 4; \
|
||||
else if (op == 0x15c0) pc += 6; \
|
||||
if ((read_memory_integer (pc, 2) & 0xfff8) == 0x7c40 \
|
||||
&& (read_memory_integer (pc + 2, 2) & 0xfff8) == 0x1240 \
|
||||
&& (read_memory_integer (pc + 8, 2) & 0xfff8) == 0x7c48) \
|
||||
pc += 10; \
|
||||
if (read_memory_integer (pc, 2) == 0x1240) pc += 6; \
|
||||
for (;;) { \
|
||||
op = read_memory_integer (pc, 2); \
|
||||
ix = (op >> 3) & 7; \
|
||||
if (ix != 6) break; \
|
||||
if ((op & 0xfcc0) == 0x3000) pc += 4; \
|
||||
else if ((op & 0xfcc0) == 0x3040) pc += 6; \
|
||||
else if ((op & 0xfcc0) == 0x2800) pc += 4; \
|
||||
else if ((op & 0xfcc0) == 0x2840) pc += 6; \
|
||||
else break;}}
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
(ignore frame and return *$sp so we can handle both calls and callq) */
|
||||
@@ -260,13 +278,19 @@ extern struct value *value_of_trapped_internalvar ();
|
||||
|
||||
#define NEED_TEXT_START_END 1
|
||||
|
||||
/* An expression that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it.
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0.
|
||||
On convex, check at the return address for `callq' -- if so, frameless,
|
||||
otherwise, not. */
|
||||
|
||||
extern int convex_frameless_function_invocation PARAMS ((struct frame_info *fi));
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) (convex_frameless_function_invocatio (FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
{ \
|
||||
extern CORE_ADDR text_start, text_end; \
|
||||
CORE_ADDR call_addr = SAVED_PC_AFTER_CALL (FI); \
|
||||
(FRAMELESS) = (call_addr >= text_start && call_addr < text_end \
|
||||
&& read_memory_integer (call_addr - 6, 1) == 0x22); \
|
||||
}
|
||||
|
||||
#define FRAME_SAVED_PC(fi) (read_memory_integer ((fi)->frame, 4))
|
||||
|
||||
@@ -277,8 +301,9 @@ extern int convex_frameless_function_invocation PARAMS ((struct frame_info *fi))
|
||||
/* Return number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
extern int convex_frame_num_args PARAMS ((struct frame_info *fi));
|
||||
#define FRAME_NUM_ARGS(fi) (convex_frame_num_args ((fi)))
|
||||
#define FRAME_NUM_ARGS(numargs, fi) \
|
||||
{ numargs = read_memory_integer (FRAME_ARGS_ADDRESS (fi) - 4, 4); \
|
||||
if (numargs < 0 || numargs >= 256) numargs = -1;}
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Target-specific definition for the Mitsubishi D10V
|
||||
Copyright (C) 1996,1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -19,14 +19,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Martin Hunt, hunt@cygnus.com */
|
||||
|
||||
#define GDB_MULTI_ARCH 1
|
||||
|
||||
/* #define GDB_TARGET_IS_D10V - moved to gdbarch.h */
|
||||
#define GDB_TARGET_IS_D10V
|
||||
|
||||
/* Define the bit, byte, and word ordering of the machine. */
|
||||
|
||||
#if !GDB_MULTI_ARCH
|
||||
|
||||
#define TARGET_BYTE_ORDER BIG_ENDIAN
|
||||
|
||||
/* Offset from address of function to start of its code.
|
||||
@@ -34,30 +30,48 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define FUNCTION_START_OFFSET 0
|
||||
|
||||
/* these are the addresses the D10V-EVA board maps data */
|
||||
/* and instruction memory to. */
|
||||
|
||||
#define DMEM_START 0x0000000
|
||||
#define IMEM_START 0x1000000
|
||||
#define STACK_START 0x0007ffe
|
||||
|
||||
#ifdef __STDC__ /* Forward decls for prototypes */
|
||||
struct frame_info;
|
||||
struct frame_saved_regs;
|
||||
struct type;
|
||||
struct value;
|
||||
#endif
|
||||
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
extern CORE_ADDR d10v_skip_prologue ();
|
||||
#define SKIP_PROLOGUE(ip) (d10v_skip_prologue (ip))
|
||||
#define SKIP_PROLOGUE(ip) \
|
||||
{(ip) = d10v_skip_prologue(ip);}
|
||||
|
||||
|
||||
/* Stack grows downward. */
|
||||
#define INNER_THAN(lhs,rhs) (core_addr_lessthan ((lhs), (rhs)))
|
||||
#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
|
||||
|
||||
/* for a breakpoint, use "dbt || nop" */
|
||||
extern breakpoint_from_pc_fn d10v_breakpoint_from_pc;
|
||||
#define BREAKPOINT_FROM_PC(PCPTR,LENPTR) (d10v_breakpoint_from_pc ((PCPTR), (LENPTR)))
|
||||
#define BREAKPOINT {0x2f, 0x90, 0x5e, 0x00}
|
||||
|
||||
/* If your kernel resets the pc after the trap happens you may need to
|
||||
define this before including this file. */
|
||||
#define DECR_PC_AFTER_BREAK 4
|
||||
|
||||
extern char *d10v_register_name PARAMS ((int reg_nr));
|
||||
#define REGISTER_NAME(NR) (d10v_register_name (NR))
|
||||
#define REGISTER_NAMES \
|
||||
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
|
||||
"r8", "r9", "r10","r11","r12", "r13", "r14","r15",\
|
||||
"psw","bpsw","pc","bpc", "cr4", "cr5", "cr6", "rpt_c",\
|
||||
"rpt_s","rpt_e", "mod_s", "mod_e", "cr12", "cr13", "iba", "cr15",\
|
||||
"imap0","imap1","dmap","a0", "a1"\
|
||||
}
|
||||
|
||||
#define NUM_REGS 37
|
||||
|
||||
#endif /* GDB_MULTI_ARCH */
|
||||
|
||||
/* Register numbers of various important registers.
|
||||
Note that some of these values are "real" register numbers,
|
||||
and correspond to the general registers of the machine,
|
||||
@@ -65,43 +79,34 @@ extern char *d10v_register_name PARAMS ((int reg_nr));
|
||||
to be actual register numbers as far as the user is concerned
|
||||
but do serve to get the desired values when passed to read_register. */
|
||||
|
||||
/* Used by both d10v-tdep.c and remote-d10v.c */
|
||||
|
||||
#define R0_REGNUM 0
|
||||
#define LR_REGNUM 13
|
||||
#if !GDB_MULTI_ARCH
|
||||
#define SP_REGNUM 15
|
||||
#define FP_REGNUM 11
|
||||
#define PC_REGNUM 18
|
||||
#endif
|
||||
#define PSW_REGNUM 16
|
||||
#define IMAP0_REGNUM 32
|
||||
#define IMAP1_REGNUM 33
|
||||
#define DMAP_REGNUM 34
|
||||
#define A0_REGNUM 35
|
||||
|
||||
#if !GDB_MULTI_ARCH
|
||||
|
||||
/* ??? */
|
||||
#define REGISTER_SIZE 2
|
||||
|
||||
/* Say how much memory is needed to store a copy of the register set */
|
||||
#define REGISTER_BYTES ((37/*NUM_REGS*/-2)*2+16)
|
||||
#define REGISTER_BYTES ((NUM_REGS-2)*2+16)
|
||||
|
||||
/* Index within `registers' of the first byte of the space for
|
||||
register N. */
|
||||
extern int d10v_register_byte PARAMS ((int reg_nr));
|
||||
#define REGISTER_BYTE(N) (d10v_register_byte (N))
|
||||
|
||||
#define REGISTER_BYTE(N) \
|
||||
( ((N) > A0_REGNUM) ? ( ((N)-A0_REGNUM)*8 + A0_REGNUM*2 ) : ((N) * 2) )
|
||||
|
||||
/* Number of bytes of storage in the actual machine representation
|
||||
for register N. */
|
||||
extern int d10v_register_raw_size PARAMS ((int reg_nr));
|
||||
#define REGISTER_RAW_SIZE(N) (d10v_register_raw_size (N))
|
||||
|
||||
#define REGISTER_RAW_SIZE(N) ( ((N) >= A0_REGNUM) ? 8 : 2 )
|
||||
|
||||
/* Number of bytes of storage in the program's representation
|
||||
for register N. */
|
||||
extern int d10v_register_virtual_size PARAMS ((int reg_nr));
|
||||
#define REGISTER_VIRTUAL_SIZE(N) (d10v_register_virtual_size (N))
|
||||
#define REGISTER_VIRTUAL_SIZE(N) ( ((N) >= A0_REGNUM) ? 8 : ( ((N) == PC_REGNUM || (N) == SP_REGNUM) ? 4 : 2 ))
|
||||
|
||||
/* Largest value REGISTER_RAW_SIZE can have. */
|
||||
|
||||
@@ -114,33 +119,39 @@ extern int d10v_register_virtual_size PARAMS ((int reg_nr));
|
||||
/* Return the GDB type object for the "standard" data type
|
||||
of data in register N. */
|
||||
|
||||
extern struct type *d10v_register_virtual_type PARAMS ((int reg_nr));
|
||||
#define REGISTER_VIRTUAL_TYPE(N) (d10v_register_virtual_type (N))
|
||||
#define REGISTER_VIRTUAL_TYPE(N) \
|
||||
( ((N) < A0_REGNUM ) ? ((N) == PC_REGNUM || (N) == SP_REGNUM ? builtin_type_long : builtin_type_short) : builtin_type_long_long)
|
||||
|
||||
|
||||
/* convert $pc and $sp to/from virtual addresses */
|
||||
extern int d10v_register_convertible PARAMS ((int nr));
|
||||
extern void d10v_register_convert_to_virtual PARAMS ((int regnum, struct type *type, char *from, char *to));
|
||||
extern void d10v_register_convert_to_raw PARAMS ((struct type *type, int regnum, char *from, char *to));
|
||||
#define REGISTER_CONVERTIBLE(N) (d10v_register_convertible ((N)))
|
||||
#define REGISTER_CONVERTIBLE(N) ((N) == PC_REGNUM || (N) == SP_REGNUM)
|
||||
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
|
||||
d10v_register_convert_to_virtual ((REGNUM), (TYPE), (FROM), (TO))
|
||||
{ \
|
||||
ULONGEST x = extract_unsigned_integer ((FROM), REGISTER_RAW_SIZE (REGNUM)); \
|
||||
if (REGNUM == PC_REGNUM) x = (x << 2) | IMEM_START; \
|
||||
else x |= DMEM_START; \
|
||||
store_unsigned_integer ((TO), TYPE_LENGTH(TYPE), x); \
|
||||
}
|
||||
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
|
||||
d10v_register_convert_to_raw ((TYPE), (REGNUM), (FROM), (TO))
|
||||
{ \
|
||||
ULONGEST x = extract_unsigned_integer ((FROM), TYPE_LENGTH(TYPE)); \
|
||||
x &= 0x3ffff; \
|
||||
if (REGNUM == PC_REGNUM) x >>= 2; \
|
||||
store_unsigned_integer ((TO), 2, x); \
|
||||
}
|
||||
|
||||
extern CORE_ADDR d10v_make_daddr PARAMS ((CORE_ADDR x));
|
||||
#define D10V_MAKE_DADDR(x) (d10v_make_daddr (x))
|
||||
extern CORE_ADDR d10v_make_iaddr PARAMS ((CORE_ADDR x));
|
||||
#define D10V_MAKE_IADDR(x) (d10v_make_iaddr (x))
|
||||
#define D10V_MAKE_DADDR(x) ((x) | DMEM_START)
|
||||
#define D10V_MAKE_IADDR(x) (((x) << 2) | IMEM_START)
|
||||
|
||||
extern int d10v_daddr_p PARAMS ((CORE_ADDR x));
|
||||
#define D10V_DADDR_P(X) (d10v_daddr_p (X))
|
||||
extern int d10v_iaddr_p PARAMS ((CORE_ADDR x));
|
||||
#define D10V_IADDR_P(X) (d10v_iaddr_p (X))
|
||||
#define D10V_DADDR_P(X) (((X) & 0x3000000) == DMEM_START)
|
||||
#define D10V_IADDR_P(X) (((X) & 0x3000000) == IMEM_START)
|
||||
|
||||
extern CORE_ADDR d10v_convert_daddr_to_raw PARAMS ((CORE_ADDR x));
|
||||
#define D10V_CONVERT_DADDR_TO_RAW(X) (d10v_convert_daddr_to_raw (X))
|
||||
extern CORE_ADDR d10v_convert_iaddr_to_raw PARAMS ((CORE_ADDR x));
|
||||
#define D10V_CONVERT_IADDR_TO_RAW(X) (d10v_convert_iaddr_to_raw (X))
|
||||
#define D10V_CONVERT_IADDR_TO_RAW(X) (((X) >> 2) & 0xffff)
|
||||
#define D10V_CONVERT_DADDR_TO_RAW(X) ((X) & 0xffff)
|
||||
|
||||
#define ARG1_REGNUM R0_REGNUM
|
||||
#define ARGN_REGNUM 3
|
||||
#define RET1_REGNUM R0_REGNUM
|
||||
|
||||
/* Store the address of the place in which to copy the structure the
|
||||
subroutine will return. This is called from call_function.
|
||||
@@ -148,8 +159,8 @@ extern CORE_ADDR d10v_convert_iaddr_to_raw PARAMS ((CORE_ADDR x));
|
||||
We store structs through a pointer passed in the first Argument
|
||||
register. */
|
||||
|
||||
extern void d10v_store_struct_return PARAMS ((CORE_ADDR addr, CORE_ADDR sp));
|
||||
#define STORE_STRUCT_RETURN(ADDR, SP) d10v_store_struct_return ((ADDR), (SP))
|
||||
#define STORE_STRUCT_RETURN(ADDR, SP) \
|
||||
{ write_register (ARG1_REGNUM, (ADDR)); }
|
||||
|
||||
|
||||
/* Write into appropriate registers a function return value
|
||||
@@ -157,16 +168,16 @@ extern void d10v_store_struct_return PARAMS ((CORE_ADDR addr, CORE_ADDR sp));
|
||||
|
||||
Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
|
||||
|
||||
extern void d10v_store_return_value PARAMS ((struct type *type, char *valbuf));
|
||||
#define STORE_RETURN_VALUE(TYPE,VALBUF) d10v_store_return_value ((TYPE), (VALBUF))
|
||||
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
|
||||
write_register_bytes (REGISTER_BYTE(RET1_REGNUM), VALBUF, TYPE_LENGTH (TYPE))
|
||||
|
||||
|
||||
/* Extract from an array REGBUF containing the (raw) register state
|
||||
the address in which a function should return its structure value,
|
||||
as a CORE_ADDR (or an expression that can be used as one). */
|
||||
|
||||
extern CORE_ADDR d10v_extract_struct_value_address PARAMS ((char *regbuf));
|
||||
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (d10v_extract_struct_value_address ((REGBUF)))
|
||||
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
|
||||
(extract_address ((REGBUF) + REGISTER_BYTE (ARG1_REGNUM), REGISTER_RAW_SIZE (ARG1_REGNUM)) | DMEM_START)
|
||||
|
||||
/* Should we use EXTRACT_STRUCT_VALUE_ADDRESS instead of
|
||||
EXTRACT_RETURN_VALUE? GCC_P is true if compiled with gcc
|
||||
@@ -179,58 +190,65 @@ extern use_struct_convention_fn d10v_use_struct_convention;
|
||||
#define USE_STRUCT_CONVENTION(gcc_p, type) d10v_use_struct_convention (gcc_p, type)
|
||||
|
||||
|
||||
|
||||
/* Define other aspects of the stack frame.
|
||||
we keep a copy of the worked out return pc lying around, since it
|
||||
is a useful bit of info */
|
||||
|
||||
extern void d10v_init_extra_frame_info PARAMS ((int fromleaf, struct frame_info *fi));
|
||||
#define EXTRA_FRAME_INFO \
|
||||
CORE_ADDR return_pc; \
|
||||
int frameless; \
|
||||
int size;
|
||||
|
||||
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
|
||||
d10v_init_extra_frame_info(fromleaf, fi)
|
||||
|
||||
extern void d10v_init_extra_frame_info PARAMS (( int fromleaf, struct frame_info *fi ));
|
||||
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(frameless_look_for_prologue (FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
(FRAMELESS) = frameless_look_for_prologue(FI)
|
||||
|
||||
extern CORE_ADDR d10v_frame_chain PARAMS ((struct frame_info *frame));
|
||||
#define FRAME_CHAIN(FRAME) d10v_frame_chain(FRAME)
|
||||
extern int d10v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
|
||||
#define FRAME_CHAIN_VALID(chain, thisframe) d10v_frame_chain_valid (chain, thisframe)
|
||||
extern CORE_ADDR d10v_frame_saved_pc PARAMS ((struct frame_info *fi));
|
||||
#define FRAME_SAVED_PC(fi) (d10v_frame_saved_pc ((fi)))
|
||||
extern CORE_ADDR d10v_frame_args_address PARAMS ((struct frame_info *fi));
|
||||
#define FRAME_ARGS_ADDRESS(fi) (d10v_frame_args_address ((fi)))
|
||||
extern CORE_ADDR d10v_frame_locals_address PARAMS ((struct frame_info *fi));
|
||||
#define FRAME_LOCALS_ADDRESS(fi) (d10v_frame_locals_address ((fi)))
|
||||
#define FRAME_SAVED_PC(FRAME) ((FRAME)->return_pc)
|
||||
#define FRAME_ARGS_ADDRESS(fi) (fi)->frame
|
||||
#define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
|
||||
|
||||
/* Immediately after a function call, return the saved pc. We can't */
|
||||
/* use frame->return_pc beause that is determined by reading R13 off the */
|
||||
/*stack and that may not be written yet. */
|
||||
|
||||
extern CORE_ADDR d10v_saved_pc_after_call PARAMS ((struct frame_info *frame));
|
||||
#define SAVED_PC_AFTER_CALL(frame) (d10v_saved_pc_after_call ((frame)))
|
||||
#define SAVED_PC_AFTER_CALL(frame) ((read_register(LR_REGNUM) << 2) | IMEM_START)
|
||||
|
||||
/* Set VAL to the number of args passed to frame described by FI.
|
||||
Can set VAL to -1, meaning no way to tell. */
|
||||
/* We can't tell how many args there are */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val,fi) (val = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
#define FRAME_ARGS_SKIP 0
|
||||
|
||||
/* Put here the code to store, into frame_info->saved_regs, the
|
||||
addresses of the saved registers of frame described by FRAME_INFO.
|
||||
This includes special registers such as pc and fp saved in special
|
||||
ways in the stack frame. sp is even more special: the address we
|
||||
return for it IS the sp for the next frame. */
|
||||
|
||||
extern void d10v_frame_init_saved_regs PARAMS ((struct frame_info *));
|
||||
#define FRAME_INIT_SAVED_REGS(frame_info) \
|
||||
d10v_frame_init_saved_regs(frame_info)
|
||||
/* Put here the code to store, into a struct frame_saved_regs,
|
||||
the addresses of the saved registers of frame described by FRAME_INFO.
|
||||
This includes special registers such as pc and fp saved in special
|
||||
ways in the stack frame. sp is even more special:
|
||||
the address we return for it IS the sp for the next frame. */
|
||||
|
||||
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
|
||||
d10v_frame_find_saved_regs(frame_info, &(frame_saved_regs))
|
||||
|
||||
extern void d10v_frame_find_saved_regs PARAMS ((struct frame_info *, struct frame_saved_regs *));
|
||||
|
||||
#define NAMES_HAVE_UNDERSCORE
|
||||
|
||||
|
||||
/* DUMMY FRAMES. Need these to support inferior function calls. They
|
||||
work like this on D10V: First we set a breakpoint at 0 or __start.
|
||||
@@ -241,10 +259,10 @@ extern void d10v_frame_init_saved_regs PARAMS ((struct frame_info *));
|
||||
breakpoint, clear the break point and pop the old register contents
|
||||
off the stack. */
|
||||
|
||||
extern void d10v_pop_frame PARAMS ((void));
|
||||
#define POP_FRAME d10v_pop_frame ()
|
||||
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 1
|
||||
#define USE_GENERIC_DUMMY_FRAMES
|
||||
#define CALL_DUMMY {0}
|
||||
#define CALL_DUMMY_START_OFFSET (0)
|
||||
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
|
||||
@@ -254,18 +272,18 @@ extern void d10v_pop_frame PARAMS ((void));
|
||||
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, FP)
|
||||
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
|
||||
/* #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(raw_buffer, optimized, addrp, frame, regnum, lval) \
|
||||
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
||||
#define GET_SAVED_REGISTER
|
||||
#define get_saved_register generic_get_saved_register
|
||||
|
||||
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
|
||||
(d10v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
|
||||
sp = d10v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
|
||||
extern CORE_ADDR d10v_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
|
||||
|
||||
|
||||
@@ -275,9 +293,19 @@ extern CORE_ADDR d10v_push_arguments PARAMS ((int, struct value **, CORE_ADDR, i
|
||||
|
||||
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
|
||||
d10v_extract_return_value(TYPE, REGBUF, VALBUF)
|
||||
extern void d10v_extract_return_value PARAMS ((struct type *, char *, char *));
|
||||
extern void
|
||||
d10v_extract_return_value PARAMS ((struct type *, char *, char *));
|
||||
|
||||
|
||||
#define REGISTER_SIZE 2
|
||||
|
||||
#ifdef CC_HAS_LONG_LONG
|
||||
# define LONGEST long long
|
||||
#else
|
||||
# define LONGEST long
|
||||
#endif
|
||||
#define ULONGEST unsigned LONGEST
|
||||
|
||||
void d10v_write_pc PARAMS ((CORE_ADDR val, int pid));
|
||||
CORE_ADDR d10v_read_pc PARAMS ((int pid));
|
||||
void d10v_write_sp PARAMS ((CORE_ADDR val));
|
||||
@@ -303,8 +331,7 @@ CORE_ADDR d10v_read_fp PARAMS ((void));
|
||||
need to be translated into a format that the d10v rom monitor
|
||||
understands. */
|
||||
|
||||
extern void remote_d10v_translate_xfer_address PARAMS ((CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len));
|
||||
int remote_d10v_translate_xfer_address PARAMS ((CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr));
|
||||
#define REMOTE_TRANSLATE_XFER_ADDRESS(GDB_ADDR, GDB_LEN, REM_ADDR, REM_LEN) \
|
||||
remote_d10v_translate_xfer_address ((GDB_ADDR), (GDB_LEN), (REM_ADDR), (REM_LEN))
|
||||
(REM_LEN) = remote_d10v_translate_xfer_address ((GDB_ADDR), (GDB_LEN), &(REM_ADDR))
|
||||
|
||||
#endif
|
||||
|
||||
@@ -46,8 +46,9 @@ struct value;
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
extern CORE_ADDR d30v_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(ip) (d30v_skip_prologue (ip))
|
||||
extern CORE_ADDR d30v_skip_prologue ();
|
||||
#define SKIP_PROLOGUE(ip) \
|
||||
{(ip) = d30v_skip_prologue(ip);}
|
||||
|
||||
|
||||
/* Stack grows downward. */
|
||||
@@ -212,8 +213,8 @@ extern void d30v_init_extra_frame_info PARAMS (( int fromleaf, struct frame_info
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(frameless_look_for_prologue (FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
(FRAMELESS) = frameless_look_for_prologue(FI)
|
||||
|
||||
#define FRAME_CHAIN(FRAME) d30v_frame_chain(FRAME)
|
||||
extern int d30v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
|
||||
@@ -235,7 +236,7 @@ extern int d30v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
|
||||
Can set VAL to -1, meaning no way to tell. */
|
||||
/* We can't tell how many args there are */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val,fi) (val = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
@@ -253,6 +254,8 @@ extern int d30v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
|
||||
|
||||
extern void d30v_frame_find_saved_regs PARAMS ((struct frame_info *, struct frame_saved_regs *));
|
||||
|
||||
#define NAMES_HAVE_UNDERSCORE
|
||||
|
||||
/* DUMMY FRAMES. Need these to support inferior function calls.
|
||||
They work like this on D30V:
|
||||
First we set a breakpoint at 0 or __start.
|
||||
@@ -281,7 +284,7 @@ extern CORE_ADDR d30v_fix_call_dummy PARAMS ((char *, CORE_ADDR, CORE_ADDR,
|
||||
int, struct value **,
|
||||
struct type *, int));
|
||||
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
|
||||
(d30v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
|
||||
sp = d30v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
|
||||
extern CORE_ADDR d30v_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/* Parameters for execution on a Fujitsu FR30 processor.
|
||||
Copyright 1999, Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -96,7 +95,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 1
|
||||
#define USE_GENERIC_DUMMY_FRAMES
|
||||
#define CALL_DUMMY {0}
|
||||
#define CALL_DUMMY_START_OFFSET (0)
|
||||
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
|
||||
@@ -130,12 +129,12 @@ 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.
|
||||
Can return -1, meaning no way to tell. */
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(numargs, fi) (numargs = -1)
|
||||
|
||||
#ifdef __STDC__ /* Forward decls for prototypes */
|
||||
struct frame_info;
|
||||
@@ -159,16 +158,13 @@ extern CORE_ADDR fr30_frame_saved_pc PARAMS ((struct frame_info *));
|
||||
#define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
|
||||
|
||||
extern CORE_ADDR fr30_skip_prologue PARAMS ((CORE_ADDR pc));
|
||||
#define SKIP_PROLOGUE(pc) (fr30_skip_prologue (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. 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));
|
||||
/* Write into appropriate registers a function return value
|
||||
of type TYPE, given in virtual format. */
|
||||
|
||||
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
|
||||
(fr30_store_return_value ((TYPE), (VALBUF)))
|
||||
write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
|
||||
|
||||
/* Put here the code to store, into a struct frame_saved_regs,
|
||||
the addresses of the saved registers of frame described by FRAME_INFO.
|
||||
@@ -190,10 +186,18 @@ extern void fr30_store_return_value PARAMS ((struct type *type, char *valbuf));
|
||||
|
||||
/* Define other aspects of the stack frame. */
|
||||
|
||||
/* An expression that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. */
|
||||
extern int fr30_frameless_function_invocation PARAMS ((struct frame_info *frame));
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) (fr30_frameless_function_invocation (FI));
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
{ \
|
||||
CORE_ADDR func_start, after_prologue; \
|
||||
func_start = (get_pc_function_start ((FI)->pc) + \
|
||||
FUNCTION_START_OFFSET); \
|
||||
after_prologue = func_start; \
|
||||
SKIP_PROLOGUE (after_prologue); \
|
||||
(FRAMELESS) = (after_prologue == func_start); \
|
||||
}
|
||||
|
||||
extern void fr30_init_extra_frame_info PARAMS ((struct frame_info *fi));
|
||||
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) fr30_init_extra_frame_info (fi)
|
||||
@@ -205,9 +209,9 @@ fr30_push_arguments PARAMS ((int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return,
|
||||
CORE_ADDR struct_addr));
|
||||
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
|
||||
(fr30_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, FP)
|
||||
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
|
||||
|
||||
/* Fujitsu's ABI requires all structs to be passed using a pointer.
|
||||
That is obviously not very efficient, so I am leaving the definitions
|
||||
@@ -226,12 +230,3 @@ 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
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
/* OBSOLETE */
|
||||
/* OBSOLETE /* We can check the stab info to see how */
|
||||
/* OBSOLETE many arg we have. No info in stack will tell us *x/ */
|
||||
/* OBSOLETE #define FRAME_NUM_ARGS(fi) (findarg(fi)) */
|
||||
/* OBSOLETE #define FRAME_NUM_ARGS(val,fi) (val = findarg(fi)) */
|
||||
/* OBSOLETE */
|
||||
/* OBSOLETE /* Return number of bytes at start of arglist that are not really args. *x/ */
|
||||
/* OBSOLETE #define FRAME_ARGS_SKIP 8 */
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
/* OBSOLETE */
|
||||
/* OBSOLETE /* We can check the stab info to see how */
|
||||
/* OBSOLETE many arg we have. No info in stack will tell us *x/ */
|
||||
/* OBSOLETE #define FRAME_NUM_ARGS(fi) (findarg(fi)) */
|
||||
/* OBSOLETE #define FRAME_NUM_ARGS(val,fi) (val = findarg(fi)) */
|
||||
/* OBSOLETE */
|
||||
/* OBSOLETE /* Return number of bytes at start of arglist that are not really args. *x/ */
|
||||
/* OBSOLETE #define FRAME_ARGS_SKIP 8 */
|
||||
|
||||
@@ -69,7 +69,7 @@ extern void h8300_init_extra_frame_info ();
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
#define SKIP_PROLOGUE(ip) (h8300_skip_prologue(ip))
|
||||
#define SKIP_PROLOGUE(ip) {(ip) = h8300_skip_prologue(ip);}
|
||||
extern CORE_ADDR h8300_skip_prologue ();
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
@@ -213,8 +213,8 @@ CORE_ADDR h8300_frame_chain PARAMS ((struct frame_info *));
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(frameless_look_for_prologue (FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
(FRAMELESS) = frameless_look_for_prologue(FI)
|
||||
|
||||
/* Any function with a frame looks like this
|
||||
SECOND ARG
|
||||
@@ -239,7 +239,7 @@ CORE_ADDR h8300_frame_chain PARAMS ((struct frame_info *));
|
||||
/* We can't tell how many args there are
|
||||
now that the C compiler delays popping them. */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val,fi) (val = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
@@ -271,7 +271,7 @@ typedef unsigned short INSN_WORD;
|
||||
* CALL_DUMMY stuff:
|
||||
*/
|
||||
|
||||
#define USE_GENERIC_DUMMY_FRAMES 1
|
||||
#define USE_GENERIC_DUMMY_FRAMES
|
||||
#define CALL_DUMMY {0}
|
||||
#define CALL_DUMMY_LENGTH (0)
|
||||
#define CALL_DUMMY_ADDRESS() entry_point_address ()
|
||||
@@ -286,10 +286,10 @@ 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, FP)
|
||||
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
|
||||
#define FIX_CALL_DUMMY(DUMMY, START_SP, FUNADDR, NARGS, ARGS, TYPE, GCCP)
|
||||
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
|
||||
(h8300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
|
||||
(SP) = h8300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
|
||||
/* Push an empty stack frame, to record the current PC, etc. */
|
||||
#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
|
||||
/* Discard from the stack the innermost frame, restoring all registers. */
|
||||
@@ -298,8 +298,6 @@ 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(raw_buffer, optimized, addrp, frame, regnum, lval) \
|
||||
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
||||
|
||||
#define GET_SAVED_REGISTER
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
#define SKIP_PROLOGUE(ip) (h8500_skip_prologue (ip))
|
||||
#define SKIP_PROLOGUE(ip) { (ip) = h8500_skip_prologue(ip); }
|
||||
extern CORE_ADDR h8500_skip_prologue PARAMS ((CORE_ADDR));
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
@@ -186,8 +186,8 @@ extern struct type *h8500_register_virtual_type PARAMS ((int regno));
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(frameless_look_for_prologue (FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
(FRAMELESS) = frameless_look_for_prologue(FI)
|
||||
|
||||
/* Any function with a frame looks like this
|
||||
SECOND ARG
|
||||
@@ -221,7 +221,7 @@ extern CORE_ADDR frame_saved_pc PARAMS ((struct frame_info *frame));
|
||||
/* We can't tell how many args there are
|
||||
now that the C compiler delays popping them. */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val,fi) (val = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
@@ -247,6 +247,8 @@ extern void h8500_pop_frame PARAMS ((void));
|
||||
#define SHORT_INT_MAX 32767
|
||||
#define SHORT_INT_MIN -32768
|
||||
|
||||
#define NAMES_HAVE_UNDERSCORE
|
||||
|
||||
typedef unsigned short INSN_WORD;
|
||||
|
||||
extern CORE_ADDR h8500_addr_bits_remove PARAMS ((CORE_ADDR));
|
||||
|
||||
@@ -1,19 +1,8 @@
|
||||
# Host: Intel x86 running DJGPP
|
||||
# we don't need mmalloc on DJGPP
|
||||
MH_CFLAGS= -DNO_MMALLOC
|
||||
MMALLOC=
|
||||
MMALLOC_CFLAGS=
|
||||
|
||||
MH_CFLAGS=-D__GO32__ -D__MSDOS__
|
||||
XDEPFILES= go32-xdep.o
|
||||
XM_FILE= xm-go32.h
|
||||
XDEPFILES=
|
||||
|
||||
NAT_FILE= nm-go32.h
|
||||
NATDEPFILES= go32-nat.o
|
||||
|
||||
TERMCAP=
|
||||
HOST_IPC=
|
||||
HOST_IPC=-DDOS_IPC
|
||||
SER_HARDWIRE= ser-go32.o
|
||||
CC= gcc
|
||||
XM_CLIBS= -ldbg
|
||||
CC=i386-go32-gcc -O2 -fno-omit-frame-pointer
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Target: Intel 386 running DJGPP
|
||||
TDEPFILES= i386-tdep.o i387-tdep.o
|
||||
TM_FILE= tm-go32.h
|
||||
@@ -1,57 +0,0 @@
|
||||
/* Native definitions for Intel x86 running DJGPP.
|
||||
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define NO_PTRACE_H
|
||||
|
||||
#include "i386/nm-i386v.h"
|
||||
|
||||
#define TARGET_HAS_HARDWARE_WATCHPOINTS
|
||||
|
||||
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
|
||||
|
||||
/* After a watchpoint trap, the PC points to the instruction after the
|
||||
one that caused the trap. Therefore we don't need to step over it.
|
||||
But we do need to reset the status register to avoid another trap. */
|
||||
|
||||
#define HAVE_CONTINUABLE_WATCHPOINT
|
||||
|
||||
#define STOPPED_BY_WATCHPOINT(W) \
|
||||
go32_stopped_by_watchpoint (inferior_pid)
|
||||
|
||||
/* Use these macros for watchpoint insertion/removal. */
|
||||
|
||||
#define target_insert_watchpoint(addr, len, type) \
|
||||
go32_insert_watchpoint (inferior_pid, addr, len, 2)
|
||||
|
||||
#define target_remove_watchpoint(addr, len, type) \
|
||||
go32_remove_watchpoint (inferior_pid, addr, len)
|
||||
|
||||
#define target_insert_hw_breakpoint(addr, shadow) \
|
||||
go32_insert_hw_breakpoint(addr, shadow)
|
||||
|
||||
#define target_remove_hw_breakpoint(addr, shadow) \
|
||||
go32_remove_hw_breakpoint(addr, shadow)
|
||||
|
||||
#define DECR_PC_AFTER_HW_BREAK 0
|
||||
|
||||
#undef FLOAT_INFO
|
||||
#define FLOAT_INFO { i386_go32_float_info (); }
|
||||
|
||||
extern void i386_go32_float_info (void);
|
||||
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
/* Basically, its a lot like the older versions ... */
|
||||
#include "i386/nm-i386sco.h"
|
||||
|
||||
@@ -117,6 +117,8 @@ double_to_i387 PARAMS ((char *, char *));
|
||||
((N < FP0_REGNUM) ? builtin_type_int : \
|
||||
builtin_type_double)
|
||||
|
||||
#define NAMES_HAVE_UNDERSCORE
|
||||
|
||||
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) skip_trampoline_code (pc, name)
|
||||
#define SKIP_TRAMPOLINE_CODE(pc) skip_trampoline_code (pc, 0)
|
||||
extern CORE_ADDR skip_trampoline_code PARAMS ((CORE_ADDR pc, char *name));
|
||||
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include "i386/tm-i386bsd.h"
|
||||
|
||||
|
||||
@@ -1,210 +0,0 @@
|
||||
/* Target-dependent definitions for Intel x86 running DJGPP.
|
||||
Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "i386/tm-i386v.h"
|
||||
|
||||
/* Number of machine registers. */
|
||||
|
||||
#undef NUM_FREGS
|
||||
#define NUM_FREGS 15
|
||||
#undef NUM_REGS
|
||||
#define NUM_REGS (16+NUM_FREGS)
|
||||
|
||||
/* Initializer for an array of names of registers. There should be
|
||||
NUM_REGS strings in this initializer. */
|
||||
|
||||
/* The order of the first 8 registers must match the compiler's
|
||||
numbering scheme (which is the same as the 386 scheme). */
|
||||
|
||||
#undef REGISTER_NAMES
|
||||
#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
|
||||
"esp", "ebp", "esi", "edi", \
|
||||
"eip", "eflags","cs", "ss", \
|
||||
"ds", "es", "fs", "gs", \
|
||||
"st0", "st1", "st2", "st3", \
|
||||
"st4", "st5", "st6", "st7", \
|
||||
"fctrl","fstat", "ftag", "fcs", \
|
||||
"fopsel","fip", "fopoff" }
|
||||
|
||||
#undef FP_REGNUM
|
||||
#define FP_REGNUM 5 /* (ebp) Contains addr of stack frame */
|
||||
#undef SP_REGNUM
|
||||
#define SP_REGNUM 4 /* (usp) Contains address of top of stack */
|
||||
#undef PS_REGNUM
|
||||
#define PS_REGNUM 9 /* (ps) Contains processor status */
|
||||
#undef PC_REGNUM
|
||||
#define PC_REGNUM 8 /* (eip) Contains program counter */
|
||||
#undef FP0_REGNUM
|
||||
#define FP0_REGNUM 16 /* Floating point register 0 */
|
||||
#undef FPC_REGNUM
|
||||
#define FPC_REGNUM 24 /* 80387 control register */
|
||||
#undef FPCWD_REGNUM
|
||||
#define FPCWD_REGNUM FPC_REGNUM
|
||||
#undef FPSWD_REGNUM
|
||||
#define FPSWD_REGNUM 25 /* 80387 status register */
|
||||
#undef FPTWD_REGNUM
|
||||
#define FPTWD_REGNUM 26 /* 80387 tag register */
|
||||
#undef FPIPO_REGNUM
|
||||
#define FPIPO_REGNUM 29 /* 80387 instruction pointer offset reg */
|
||||
#undef FPIPS_REGNUM
|
||||
#define FPIPS_REGNUM 27 /* 80387 instruction pointer selector reg */
|
||||
#undef FPOOS_REGNUM
|
||||
#define FPOOS_REGNUM 30 /* 80387 operand pointer offset reg */
|
||||
#undef FPOPS_REGNUM
|
||||
#define FPOPS_REGNUM 28 /* 80387 operand pointer selector reg */
|
||||
|
||||
/* Total amount of space needed to store our copies of the machine's
|
||||
register state, the array `registers'. */
|
||||
|
||||
#undef REGISTER_BYTES
|
||||
#define REGISTER_BYTES (10*4 + 6*2 + 8*10 + 5*2 + 2*4)
|
||||
|
||||
/* Index within `registers' of the first byte of the space for
|
||||
register N. */
|
||||
|
||||
#undef REGISTER_BYTE
|
||||
#define REGBYTE_0 0
|
||||
#define REGBYTE_10 (REGBYTE_0+10*4)
|
||||
#define REGBYTE_16 (REGBYTE_10+6*2)
|
||||
#define REGBYTE_24 (REGBYTE_16+8*10)
|
||||
#define REGBYTE_29 (REGBYTE_24+5*2)
|
||||
#define REGISTER_BYTE(N) (((N) < 10) ? (N) * 4 : \
|
||||
(N) < 16 ? REGBYTE_10 +((N) - 10) * 2 : \
|
||||
(N) < 24 ? REGBYTE_16 +((N) - 16) * 10 : \
|
||||
(N) < 29 ? REGBYTE_24 +((N) - 24) * 2 : \
|
||||
REGBYTE_29 + ((N) - 29) * 4)
|
||||
|
||||
/* Number of bytes of storage in the actual machine representation
|
||||
for register N. */
|
||||
|
||||
#undef REGISTER_RAW_SIZE
|
||||
#define REGISTER_RAW_SIZE(N) ((N) < 10 ? 4 : (N) < 16 ? 2 : (N) < 24 ? 10 : \
|
||||
(N) < 29 ? 2 : 4)
|
||||
|
||||
/* Number of bytes of storage in the program's representation
|
||||
for register N. */
|
||||
|
||||
#undef REGISTER_VIRTUAL_SIZE
|
||||
#define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
|
||||
|
||||
/* Largest value REGISTER_RAW_SIZE can have. */
|
||||
|
||||
#undef MAX_REGISTER_RAW_SIZE
|
||||
#define MAX_REGISTER_RAW_SIZE 10
|
||||
|
||||
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
|
||||
|
||||
#undef MAX_REGISTER_VIRTUAL_SIZE
|
||||
#define MAX_REGISTER_VIRTUAL_SIZE 10
|
||||
|
||||
/* Nonzero if register N requires conversion
|
||||
from raw format to virtual format. */
|
||||
|
||||
#undef REGISTER_CONVERTIBLE
|
||||
#define REGISTER_CONVERTIBLE(N) ((N) < FP0_REGNUM ? 0 :\
|
||||
(N) < FPC_REGNUM ? 1 : 0)
|
||||
|
||||
/* The host and target are i386 machines and the compiler supports
|
||||
long doubles. Long doubles on the host therefore have the same
|
||||
layout as a 387 FPU stack register. */
|
||||
|
||||
#if defined(HAVE_LONG_DOUBLE) && defined(HOST_I386)
|
||||
#undef LD_I387
|
||||
#define LD_I387
|
||||
#endif
|
||||
|
||||
/* Allow floating point numbers to be specified by a raw long double
|
||||
10 hex bytes number, e.g. 1.0 can be input as
|
||||
0x3fff8000000000000000 */
|
||||
|
||||
#ifdef LD_I387
|
||||
#define HEX_LONG_DOUBLE_INPUT(base,p,len,target) \
|
||||
((base) == 16 && (len) == 20 \
|
||||
&& i387_hex_long_double_input ((p), (target)))
|
||||
#endif
|
||||
|
||||
extern int i387_hex_long_double_input (char *p, long double *putithere);
|
||||
|
||||
#undef REGISTER_CONVERT_TO_VIRTUAL
|
||||
#ifdef LD_I387
|
||||
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
|
||||
{ \
|
||||
if (TYPE == REGISTER_VIRTUAL_TYPE (REGNUM)) \
|
||||
{ \
|
||||
memcpy (TO, FROM, TYPE_LENGTH (TYPE)); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
long double val = *((long double *)FROM); \
|
||||
store_floating ((TO), TYPE_LENGTH (TYPE), val); \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
/* Convert data from raw format for register REGNUM in buffer FROM to
|
||||
virtual format with type TYPE in buffer TO. */
|
||||
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
|
||||
{ \
|
||||
double val; \
|
||||
i387_to_double ((FROM), (char *)&val); \
|
||||
store_floating ((TO), TYPE_LENGTH (TYPE), val); \
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void i387_to_double PARAMS ((char *, char *));
|
||||
|
||||
#undef REGISTER_CONVERT_TO_RAW
|
||||
#ifdef LD_I387
|
||||
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
|
||||
{ \
|
||||
if (TYPE == REGISTER_VIRTUAL_TYPE (REGNUM)) \
|
||||
{ \
|
||||
memcpy (TO, FROM, TYPE_LENGTH (TYPE)); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
long double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
|
||||
*((long double *)TO) = val; \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
|
||||
{ \
|
||||
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
|
||||
double_to_i387((char *)&val, (TO)); \
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void double_to_i387 PARAMS ((char *, char *));
|
||||
|
||||
/* Return the GDB type object for the "standard" data type of data in
|
||||
register N. */
|
||||
|
||||
#undef REGISTER_VIRTUAL_TYPE
|
||||
#ifdef LD_I387
|
||||
#define REGISTER_VIRTUAL_TYPE(N) \
|
||||
((N < FP0_REGNUM) ? builtin_type_int : \
|
||||
(N < FPC_REGNUM) ? builtin_type_long_double : builtin_type_int)
|
||||
#else
|
||||
#define REGISTER_VIRTUAL_TYPE(N) \
|
||||
((N < FP0_REGNUM) ? builtin_type_int : \
|
||||
(N < FPC_REGNUM) ? builtin_type_double : builtin_type_int)
|
||||
#endif
|
||||
|
||||
#undef TARGET_LONG_DOUBLE_BIT
|
||||
#define TARGET_LONG_DOUBLE_BIT 96
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef TM_I386_H
|
||||
#define TM_I386_H 1
|
||||
@@ -47,7 +47,7 @@ struct type;
|
||||
/* Advance PC across any function entry prologue instructions to reach some
|
||||
"real" code. */
|
||||
|
||||
#define SKIP_PROLOGUE(frompc) (i386_skip_prologue (frompc))
|
||||
#define SKIP_PROLOGUE(frompc) {(frompc) = i386_skip_prologue((frompc));}
|
||||
|
||||
extern int i386_skip_prologue PARAMS ((int));
|
||||
|
||||
@@ -207,8 +207,13 @@ extern void i386_extract_return_value PARAMS ((struct type *, char [], char *));
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue(FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
do { \
|
||||
if ((FI)->signal_handler_caller) \
|
||||
(FRAMELESS) = 0; \
|
||||
else \
|
||||
(FRAMELESS) = frameless_look_for_prologue(FI); \
|
||||
} while (0)
|
||||
|
||||
/* Saved Pc. Get it from sigcontext if within sigtramp. */
|
||||
|
||||
@@ -227,7 +232,7 @@ extern CORE_ADDR sigtramp_saved_pc PARAMS ((struct frame_info *));
|
||||
/* Return number of args passed to a frame. Can return -1, meaning no way
|
||||
to tell, which is typical now that the C compiler delays popping them. */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (i386_frame_num_args(fi))
|
||||
#define FRAME_NUM_ARGS(numargs, fi) (numargs) = i386_frame_num_args(fi)
|
||||
|
||||
extern int i386_frame_num_args PARAMS ((struct frame_info *));
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Macro definitions for i386, GNU Hurd
|
||||
Copyright (C) 1992, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -17,9 +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. */
|
||||
|
||||
#ifndef TM_I386GNU_H
|
||||
#define TM_I386GNU_H 1
|
||||
|
||||
/* Include common definitions for gnu systems */
|
||||
#include "nm-gnu.h"
|
||||
|
||||
@@ -36,15 +33,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* we can do it */
|
||||
#define ATTACH_DETACH 1
|
||||
|
||||
#include "i386/tm-i386.h"
|
||||
/* Sigh. There should be a file for i386 but no sysv stuff in it */
|
||||
#include "i386/tm-i386v.h"
|
||||
|
||||
/* I want to test this float info code. See comment in tm-i386v.h */
|
||||
#undef FLOAT_INFO
|
||||
#define FLOAT_INFO { i386_mach3_float_info (); }
|
||||
|
||||
/* Offset to saved PC in sigcontext. */
|
||||
#define SIGCONTEXT_PC_OFFSET 68
|
||||
|
||||
/* We need this file for the SOLIB_TRAMPOLINE stuff. */
|
||||
#include "tm-sysv4.h"
|
||||
|
||||
#endif /* TM_I386GNU_H */
|
||||
/* Address of end of stack space.
|
||||
* for MACH, see <machine/vmparam.h>
|
||||
* @@@ I don't know what is in the 5 ints...
|
||||
*/
|
||||
#undef STACK_END_ADDR
|
||||
#define STACK_END_ADDR (0xc0000000-sizeof(int [5]))
|
||||
|
||||
@@ -40,6 +40,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* we can do it */
|
||||
#define ATTACH_DETACH 1
|
||||
|
||||
/* Define this if the C compiler puts an underscore at the front
|
||||
of external names before giving them to the linker. */
|
||||
|
||||
#define NAMES_HAVE_UNDERSCORE
|
||||
|
||||
/* Sigh. There should be a file for i386 but no sysv stuff in it */
|
||||
#include "i386/tm-i386.h"
|
||||
|
||||
|
||||
@@ -140,8 +140,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
|
||||
#undef FRAMELESS_FUNCTION_INVOCATION
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(frameless_look_for_prologue (FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
(FRAMELESS) = frameless_look_for_prologue(FI)
|
||||
|
||||
#undef FRAME_SAVED_PC
|
||||
#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
|
||||
@@ -150,7 +150,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
#undef FRAME_NUM_ARGS
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(numargs, fi) (numargs) = -1
|
||||
|
||||
#ifdef __STDC__ /* Forward decl's for prototypes */
|
||||
struct frame_info;
|
||||
|
||||
@@ -186,8 +186,8 @@ double_to_i387 PARAMS ((char *, char *));
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
|
||||
#undef FRAMELESS_FUNCTION_INVOCATION
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(frameless_look_for_prologue (FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
{ (FRAMELESS) = frameless_look_for_prologue (FI); }
|
||||
|
||||
#undef FRAME_SAVED_PC
|
||||
#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
|
||||
|
||||
17
gdb/config/i386/windows.mh
Normal file
17
gdb/config/i386/windows.mh
Normal file
@@ -0,0 +1,17 @@
|
||||
# gdbwin.o and ser-win32s.c have to be named because they have
|
||||
# _initialize functions that need to be found by init.c
|
||||
# gui.ores has to be named, or else msvc won't link it in.
|
||||
XDEPFILES = \
|
||||
mswin/gdbwin.o \
|
||||
mswin/ser-win32s.o \
|
||||
mswin/gui.ores \
|
||||
mswin/libwingdb.a
|
||||
|
||||
$(XDEPFILES):
|
||||
rootme=`pwd` ; export rootme ; \
|
||||
( cd mswin ; \
|
||||
$(MAKE) $(FLAGS_TO_PASS) all )
|
||||
|
||||
XM_FILE=xm-windows.h
|
||||
MMALLOC=
|
||||
SER_HARDWIRE =
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Host-dependent definitions for Intel x86 running DJGPP.
|
||||
Copyright 1993-1996 Free Software Foundation, Inc.
|
||||
/* Definitions for hosting on GO32, for GDB.
|
||||
Copyright 1991, 1992 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -18,20 +18,14 @@ 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
|
||||
|
||||
@@ -49,8 +49,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* Advance ip across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
#define SKIP_PROLOGUE(ip) (i960_skip_prologue (ip))
|
||||
extern CORE_ADDR i960_skip_prologue ();
|
||||
#define SKIP_PROLOGUE(ip) { ip = skip_prologue (ip); }
|
||||
extern CORE_ADDR skip_prologue ();
|
||||
|
||||
/* Immediately after a function call, return the saved ip.
|
||||
Can't always go through the frames for this because on some machines
|
||||
@@ -286,8 +286,8 @@ extern use_struct_convention_fn i960_use_struct_convention;
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(leafproc_return ((FI)->pc) != 0)
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
{ (FRAMELESS) = (leafproc_return ((FI)->pc) != 0); }
|
||||
|
||||
/* Note that in the i960 architecture the return pointer is saved in the
|
||||
*caller's* stack frame.
|
||||
@@ -317,7 +317,7 @@ extern CORE_ADDR frame_args_address (); /* i960-tdep.c */
|
||||
/* Set NUMARGS to the number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(numargs, fi) (numargs = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Parameters for VxWorks Intel 960's, for GDB, the GNU debugger.
|
||||
Copyright (C) 1986-1991, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1986-1991 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
|
||||
This file is part of GDB.
|
||||
@@ -19,13 +19,16 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "i960/tm-i960.h"
|
||||
#include "tm-vxworks.h"
|
||||
|
||||
/* Under VxWorks the IP isn't filled in. Skip it, go with RIP, which has
|
||||
the real value. */
|
||||
#undef PC_REGNUM
|
||||
#define PC_REGNUM RIP_REGNUM
|
||||
|
||||
#define GDBINIT_FILENAME ".vxgdbinit"
|
||||
|
||||
#define DEFAULT_PROMPT "(vxgdb) "
|
||||
|
||||
/* We have more complex, useful breakpoints on the target.
|
||||
Amount ip must be decremented by after a breakpoint. */
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ extern CORE_ADDR m32r_frame_saved_pc PARAMS((struct frame_info *));
|
||||
|
||||
extern CORE_ADDR m32r_skip_prologue PARAMS ((CORE_ADDR pc));
|
||||
/* mvs_check SKIP_PROLOGUE */
|
||||
#define SKIP_PROLOGUE(pc) (m32r_skip_prologue (pc))
|
||||
#define SKIP_PROLOGUE(pc) pc = m32r_skip_prologue (pc)
|
||||
|
||||
/* mvs_no_check FRAME_ARGS_SKIP */
|
||||
#define FRAME_ARGS_SKIP 0
|
||||
@@ -165,7 +165,7 @@ extern CORE_ADDR m32r_skip_prologue PARAMS ((CORE_ADDR pc));
|
||||
/* mvs_no_check FRAME_LOCALS_ADDRESS */
|
||||
#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
|
||||
/* mvs_no_check FRAME_NUM_ARGS */
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val, fi) ((val) = -1)
|
||||
|
||||
#define COERCE_FLOAT_TO_DOUBLE 1
|
||||
|
||||
@@ -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, FP)
|
||||
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
|
||||
|
||||
|
||||
/* target-specific dummy_frame stuff */
|
||||
@@ -216,17 +216,15 @@ extern CORE_ADDR m32r_push_arguments PARAMS ((int nargs,
|
||||
|
||||
/* mvs_no_check PUSH_ARGUMENTS */
|
||||
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
|
||||
(m32r_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
|
||||
(SP) = m32r_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
|
||||
|
||||
#define PUSH_RETURN_ADDRESS(PC, SP) m32r_push_return_address (PC, SP)
|
||||
|
||||
/* override the standard get_saved_register function with
|
||||
one that takes account of generic CALL_DUMMY frames */
|
||||
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
|
||||
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
||||
#define GET_SAVED_REGISTER
|
||||
|
||||
|
||||
#define USE_GENERIC_DUMMY_FRAMES 1
|
||||
#define USE_GENERIC_DUMMY_FRAMES
|
||||
#define CALL_DUMMY {0}
|
||||
#define CALL_DUMMY_LENGTH (0)
|
||||
#define CALL_DUMMY_START_OFFSET (0)
|
||||
|
||||
@@ -38,7 +38,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* The only reason this is here is the tm-altos.h reference below. It
|
||||
was moved back here from tm-m68k.h. FIXME? */
|
||||
|
||||
extern CORE_ADDR altos_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(pc) (altos_skip_prologue (pc))
|
||||
#define SKIP_PROLOGUE(pc) \
|
||||
{ register int op = read_memory_integer (pc, 2); \
|
||||
if (op == 0047126) \
|
||||
pc += 4; /* Skip link #word */ \
|
||||
else if (op == 0044016) \
|
||||
pc += 6; /* Skip link #long */ \
|
||||
/* Not sure why branches are here. */ \
|
||||
/* From tm-isi.h, tm-altos.h */ \
|
||||
else if (op == 0060000) \
|
||||
pc += 4; /* Skip bra #word */ \
|
||||
else if (op == 00600377) \
|
||||
pc += 6; /* skip bra #long */ \
|
||||
else if ((op & 0177400) == 0060000) \
|
||||
pc += 2; /* skip bra #char */ \
|
||||
}
|
||||
|
||||
#include "m68k/tm-m68k.h"
|
||||
|
||||
@@ -75,8 +75,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* Return number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
extern int delta68_frame_num_args PARAMS ((struct frame_info *fi));
|
||||
#define FRAME_NUM_ARGS(fi) (delta68_frame_num_args ((fi)))
|
||||
#define FRAME_NUM_ARGS(val, fi) \
|
||||
{ register CORE_ADDR pc = FRAME_SAVED_PC (fi); \
|
||||
register int insn = 0177777 & read_memory_integer (pc, 2); \
|
||||
val = 0; \
|
||||
if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */ \
|
||||
val = read_memory_integer (pc + 2, 2); \
|
||||
else if ((insn & 0170777) == 0050217 /* addql #N, sp */ \
|
||||
|| (insn & 0170777) == 0050117) /* addqw */ \
|
||||
{ val = (insn >> 9) & 7; if (val == 0) val = 8; } \
|
||||
else if (insn == 0157774) /* addal #WW, sp */ \
|
||||
val = read_memory_integer (pc + 2, 4); \
|
||||
val >>= 2; }
|
||||
|
||||
/* On M68040 versions of sysV68 R3V7.1, ptrace(PT_WRITE_I) does not clear
|
||||
the processor's instruction cache as it should. */
|
||||
|
||||
@@ -41,8 +41,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* Return number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
extern int isi_frame_num_args PARAMS ((struct frame_info *fi));
|
||||
#define FRAME_NUM_ARGS(fi) (isi_frame_num_args ((fi)))
|
||||
#define FRAME_NUM_ARGS(val, fi) \
|
||||
{ register CORE_ADDR pc = FRAME_SAVED_PC (fi); \
|
||||
register int insn = 0177777 & read_memory_integer (pc, 2); \
|
||||
val = 0; \
|
||||
if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */ \
|
||||
val = read_memory_integer (pc + 2, 2); \
|
||||
else if ((insn & 0170777) == 0050217 /* addql #N, sp */ \
|
||||
|| (insn & 0170777) == 0050117) /* addqw */ \
|
||||
{ val = (insn >> 9) & 7; if (val == 0) val = 8; } \
|
||||
else if (insn == 0157774) /* addal #WW, sp */ \
|
||||
val = read_memory_integer (pc + 2, 4); \
|
||||
val >>= 2; }
|
||||
|
||||
/* Put here the code to store, into a struct frame_saved_regs,
|
||||
the addresses of the saved registers of frame described by FRAME_INFO.
|
||||
@@ -121,7 +131,20 @@ retry: \
|
||||
/* The only reason this is here is the tm-isi.h reference below. It
|
||||
was moved back here from tm-m68k.h. FIXME? */
|
||||
|
||||
extern CORE_ADDR isi_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(pc) (isi_skip_prologue (pc))
|
||||
#define SKIP_PROLOGUE(pc) \
|
||||
{ register int op = read_memory_integer (pc, 2); \
|
||||
if (op == 0047126) \
|
||||
pc += 4; /* Skip link #word */ \
|
||||
else if (op == 0044016) \
|
||||
pc += 6; /* Skip link #long */ \
|
||||
/* Not sure why branches are here. */ \
|
||||
/* From tm-isi.h, tm-altos.h */ \
|
||||
else if (op == 0060000) \
|
||||
pc += 4; /* Skip bra #word */ \
|
||||
else if (op == 00600377) \
|
||||
pc += 6; /* skip bra #long */ \
|
||||
else if ((op & 0177400) == 0060000) \
|
||||
pc += 2; /* skip bra #char */ \
|
||||
}
|
||||
|
||||
#include "m68k/tm-m68k.h"
|
||||
|
||||
@@ -33,9 +33,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
to reach some "real" code. */
|
||||
|
||||
#if !defined(SKIP_PROLOGUE)
|
||||
#define SKIP_PROLOGUE(ip) (m68k_skip_prologue (ip))
|
||||
#endif
|
||||
#define SKIP_PROLOGUE(ip) {(ip) = m68k_skip_prologue(ip);}
|
||||
extern CORE_ADDR m68k_skip_prologue PARAMS ((CORE_ADDR ip));
|
||||
#endif
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
Can't always go through the frames for this because on some machines
|
||||
@@ -274,8 +274,13 @@ do \
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue(FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
do { \
|
||||
if ((FI)->signal_handler_caller) \
|
||||
(FRAMELESS) = 0; \
|
||||
else \
|
||||
(FRAMELESS) = frameless_look_for_prologue(FI); \
|
||||
} while (0)
|
||||
|
||||
/* This was determined by experimentation on hp300 BSD 4.3. Perhaps
|
||||
it corresponds to some offset in /usr/include/sys/user.h or
|
||||
@@ -306,7 +311,7 @@ do \
|
||||
/* We can't tell how many args there are
|
||||
now that the C compiler delays popping them. */
|
||||
#if !defined (FRAME_NUM_ARGS)
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val,fi) (val = -1)
|
||||
#endif
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
@@ -59,7 +59,17 @@ Here is an m-news.h file for gdb. It supports the 68881 registers.
|
||||
/* Return number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
extern int news_frame_num_args PARAMS ((struct frame_info *fi));
|
||||
#define FRAME_NUM_ARGS(fi) (news_frame_num_args ((fi)))
|
||||
#define FRAME_NUM_ARGS(val, fi) \
|
||||
{ register CORE_ADDR pc = FRAME_SAVED_PC (fi); \
|
||||
register int insn = 0177777 & read_memory_integer (pc, 2); \
|
||||
val = 0; \
|
||||
if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */ \
|
||||
val = read_memory_integer (pc + 2, 2); \
|
||||
else if ((insn & 0170777) == 0050217 /* addql #N, sp */ \
|
||||
|| (insn & 0170777) == 0050117) /* addqw */ \
|
||||
{ val = (insn >> 9) & 7; if (val == 0) val = 8; } \
|
||||
else if (insn == 0157774) /* addal #WW, sp */ \
|
||||
val = read_memory_integer (pc + 2, 4); \
|
||||
val >>= 2; }
|
||||
|
||||
#include "m68k/tm-m68k.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Target machine description for VxWorks m68k's, for GDB, the GNU debugger.
|
||||
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1999 Free Software Foundation, Inc.
|
||||
Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
|
||||
This file is part of GDB.
|
||||
@@ -18,6 +18,10 @@ 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. */
|
||||
|
||||
#define GDBINIT_FILENAME ".vxgdbinit"
|
||||
|
||||
#define DEFAULT_PROMPT "(vxgdb) "
|
||||
|
||||
/* GCC is probably the only compiler used on this configuration. So
|
||||
get this right even if the code which detects gcc2_compiled. is
|
||||
still broken. */
|
||||
@@ -28,7 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#define DECR_PC_AFTER_BREAK 0
|
||||
|
||||
#include "m68k/tm-m68k.h"
|
||||
#include "tm-vxworks.h"
|
||||
|
||||
/* Takes the current frame-struct pointer and returns the chain-pointer
|
||||
to get to the calling frame.
|
||||
|
||||
@@ -52,8 +52,9 @@ extern void init_extra_frame_info ();
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
extern CORE_ADDR m88k_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(frompc) (m88k_skip_prologue (frompc))
|
||||
#define SKIP_PROLOGUE(frompc) \
|
||||
{ (frompc) = skip_prologue (frompc); }
|
||||
extern CORE_ADDR skip_prologue ();
|
||||
|
||||
/* The m88k kernel aligns all instructions on 4-byte boundaries. The
|
||||
kernel also uses the least significant two bits for its own hocus
|
||||
@@ -445,8 +446,8 @@ extern int frameless_function_invocation ();
|
||||
#define FRAME_CHAIN(thisframe) \
|
||||
frame_chain (thisframe)
|
||||
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(frame) \
|
||||
(frameless_function_invocation (frame))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(frame, fromleaf) \
|
||||
fromleaf = frameless_function_invocation (frame)
|
||||
|
||||
/* Define other aspects of the stack frame. */
|
||||
|
||||
@@ -465,7 +466,7 @@ extern CORE_ADDR frame_locals_address ();
|
||||
/* Return number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(numargs, fi) ((numargs) = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* Redefine register numbers for SGI. */
|
||||
|
||||
#undef NUM_REGS
|
||||
#undef MIPS_REGISTER_NAMES
|
||||
#undef REGISTER_NAMES
|
||||
#undef FP0_REGNUM
|
||||
#undef PC_REGNUM
|
||||
#undef PS_REGNUM
|
||||
@@ -45,7 +45,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* Initializer for an array of names of registers.
|
||||
There should be NUM_REGS strings in this initializer. */
|
||||
|
||||
#define MIPS_REGISTER_NAMES \
|
||||
#define REGISTER_NAMES \
|
||||
{ "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3", \
|
||||
"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", \
|
||||
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", \
|
||||
|
||||
@@ -83,7 +83,7 @@ CORE_ADDR mips_addr_bits_remove PARAMS ((CORE_ADDR addr));
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
#define SKIP_PROLOGUE(pc) (mips_skip_prologue (pc, 0))
|
||||
#define SKIP_PROLOGUE(pc) pc = mips_skip_prologue (pc, 0)
|
||||
extern CORE_ADDR mips_skip_prologue PARAMS ((CORE_ADDR addr, int lenient));
|
||||
|
||||
/* Return non-zero if PC points to an instruction which will cause a step
|
||||
@@ -151,16 +151,11 @@ extern breakpoint_from_pc_fn mips_breakpoint_from_pc;
|
||||
#define NUM_REGS 90
|
||||
#endif
|
||||
|
||||
/* Given the register index, return the name of the corresponding
|
||||
register. */
|
||||
extern char *mips_register_name PARAMS ((int regnr));
|
||||
#define REGISTER_NAME(i) mips_register_name (i)
|
||||
|
||||
/* Initializer for an array of names of registers.
|
||||
There should be NUM_REGS strings in this initializer. */
|
||||
|
||||
#ifndef MIPS_REGISTER_NAMES
|
||||
#define MIPS_REGISTER_NAMES \
|
||||
#ifndef REGISTER_NAMES
|
||||
#define REGISTER_NAMES \
|
||||
{ "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3", \
|
||||
"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", \
|
||||
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", \
|
||||
@@ -344,7 +339,7 @@ extern CORE_ADDR mips_frame_chain PARAMS ((struct frame_info *));
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
/* We handle this differently for mips, and maybe we should not */
|
||||
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) (0)
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) {(FRAMELESS) = 0;}
|
||||
|
||||
/* Saved Pc. */
|
||||
|
||||
@@ -358,7 +353,7 @@ extern CORE_ADDR mips_frame_saved_pc PARAMS ((struct frame_info *));
|
||||
/* Return number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (mips_frame_num_args(fi))
|
||||
#define FRAME_NUM_ARGS(num, fi) (num = mips_frame_num_args(fi))
|
||||
extern int mips_frame_num_args PARAMS ((struct frame_info *));
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
@@ -386,12 +381,10 @@ extern void mips_find_saved_regs PARAMS ((struct frame_info *));
|
||||
function calls. We don't need STACK_ALIGN, PUSH_ARGUMENTS will
|
||||
handle it. */
|
||||
|
||||
extern CORE_ADDR mips_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
|
||||
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
|
||||
(mips_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
|
||||
|
||||
extern CORE_ADDR mips_push_return_address PARAMS ((CORE_ADDR pc, CORE_ADDR sp));
|
||||
#define PUSH_RETURN_ADDRESS(PC, SP) (mips_push_return_address ((PC), (SP)))
|
||||
sp = mips_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
|
||||
extern CORE_ADDR
|
||||
mips_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
|
||||
|
||||
/* Push an empty stack frame, to record the current PC, etc. */
|
||||
|
||||
@@ -445,13 +438,20 @@ typedef struct mips_extra_func_info {
|
||||
PDR pdr; /* Procedure descriptor record */
|
||||
} *mips_extra_func_info_t;
|
||||
|
||||
extern void mips_init_extra_frame_info PARAMS ((int fromleaf, struct frame_info *));
|
||||
#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) \
|
||||
mips_init_extra_frame_info(fromleaf, fci)
|
||||
#define EXTRA_FRAME_INFO \
|
||||
mips_extra_func_info_t proc_desc; \
|
||||
int num_args;
|
||||
|
||||
#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) init_extra_frame_info(fci)
|
||||
extern void init_extra_frame_info PARAMS ((struct frame_info *));
|
||||
|
||||
extern void mips_print_extra_frame_info PARAMS ((struct frame_info *frame));
|
||||
#define PRINT_EXTRA_FRAME_INFO(fi) \
|
||||
mips_print_extra_frame_info (fi)
|
||||
{ \
|
||||
if (fi && fi->proc_desc && fi->proc_desc->pdr.framereg < NUM_REGS) \
|
||||
printf_filtered (" frame pointer is at %s+%d\n", \
|
||||
REGISTER_NAME (fi->proc_desc->pdr.framereg), \
|
||||
fi->proc_desc->pdr.frameoffset); \
|
||||
}
|
||||
|
||||
/* It takes two values to specify a frame on the MIPS.
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "mips/tm-bigmips.h"
|
||||
|
||||
#undef MIPS_REGISTER_NAMES
|
||||
#define MIPS_REGISTER_NAMES \
|
||||
#undef REGISTER_NAMES
|
||||
#define REGISTER_NAMES \
|
||||
{ "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3", \
|
||||
"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", \
|
||||
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", \
|
||||
|
||||
@@ -22,8 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "mips/tm-mips.h"
|
||||
|
||||
#undef MIPS_REGISTER_NAMES
|
||||
#define MIPS_REGISTER_NAMES \
|
||||
#undef REGISTER_NAMES
|
||||
#define REGISTER_NAMES \
|
||||
{ "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3", \
|
||||
"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", \
|
||||
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Target machine description for VxWorks MIPS's, for GDB, the GNU debugger.
|
||||
Copyright 1996, 1999 Free Software Foundation, Inc.
|
||||
Copyright 1996 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
|
||||
This file is part of GDB.
|
||||
@@ -18,8 +18,11 @@ 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. */
|
||||
|
||||
#define GDBINIT_FILENAME ".vxgdbinit"
|
||||
|
||||
#define DEFAULT_PROMPT "(vxgdb) "
|
||||
|
||||
#include "mips/tm-mips.h"
|
||||
#include "tm-vxworks.h"
|
||||
|
||||
/* FIXME: These are almost certainly wrong. */
|
||||
|
||||
|
||||
@@ -166,18 +166,18 @@ extern CORE_ADDR mn10200_frame_saved_pc PARAMS ((struct frame_info *));
|
||||
(SP) = mn10200_store_struct_return (STRUCT_ADDR, SP)
|
||||
|
||||
extern CORE_ADDR mn10200_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(pc) (mn10200_skip_prologue (pc))
|
||||
#define SKIP_PROLOGUE(pc) pc = mn10200_skip_prologue (pc)
|
||||
|
||||
#define FRAME_ARGS_SKIP 0
|
||||
|
||||
#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
|
||||
#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val, fi) ((val) = -1)
|
||||
|
||||
extern void mn10200_pop_frame PARAMS ((struct frame_info *));
|
||||
#define POP_FRAME mn10200_pop_frame (get_current_frame ())
|
||||
|
||||
#define USE_GENERIC_DUMMY_FRAMES 1
|
||||
#define USE_GENERIC_DUMMY_FRAMES
|
||||
#define CALL_DUMMY {0}
|
||||
#define CALL_DUMMY_START_OFFSET (0)
|
||||
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
|
||||
@@ -194,9 +194,9 @@ extern CORE_ADDR
|
||||
mn10200_push_arguments PARAMS ((int, struct value **, CORE_ADDR,
|
||||
unsigned char, CORE_ADDR));
|
||||
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
|
||||
(mn10200_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, FP)
|
||||
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
|
||||
|
||||
#define REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \
|
||||
(TYPE_LENGTH (TYPE) > 8)
|
||||
@@ -206,8 +206,7 @@ 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(raw_buffer, optimized, addrp, frame, regnum, lval) \
|
||||
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
||||
#define GET_SAVED_REGISTER
|
||||
|
||||
/* Define this for Wingdb */
|
||||
#define TARGET_MN10200
|
||||
|
||||
@@ -37,8 +37,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define REGISTER_BYTES (NUM_REGS * REGISTER_SIZE)
|
||||
|
||||
extern char *mn10300_register_name PARAMS ((int regnr));
|
||||
#define REGISTER_NAME(i) (mn10300_register_name (i))
|
||||
extern char **mn10300_register_names;
|
||||
#define REGISTER_NAME(i) mn10300_register_names[i]
|
||||
|
||||
#define D2_REGNUM 2
|
||||
#define D3_REGNUM 3
|
||||
@@ -65,9 +65,8 @@ extern breakpoint_from_pc_fn mn10300_breakpoint_from_pc;
|
||||
|
||||
#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
|
||||
|
||||
extern CORE_ADDR mn10300_saved_pc_after_call PARAMS ((struct frame_info *frame));
|
||||
#define SAVED_PC_AFTER_CALL(frame) \
|
||||
mn10300_saved_pc_after_call (frame)
|
||||
read_memory_integer (read_register (SP_REGNUM), 4)
|
||||
|
||||
#ifdef __STDC__
|
||||
struct frame_info;
|
||||
@@ -93,34 +92,39 @@ extern CORE_ADDR mn10300_frame_saved_pc PARAMS ((struct frame_info *));
|
||||
a function return value of type TYPE, and copy that, in virtual format,
|
||||
into VALBUF. */
|
||||
|
||||
extern void mn10300_extract_return_value PARAMS ((struct type *type, char *regbuf, char *valbuf));
|
||||
#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
|
||||
mn10300_extract_return_value (TYPE, REGBUF, VALBUF)
|
||||
if (TYPE_CODE (TYPE) == TYPE_CODE_PTR) \
|
||||
memcpy (VALBUF, REGBUF + REGISTER_BYTE (4), TYPE_LENGTH (TYPE)); \
|
||||
else \
|
||||
memcpy (VALBUF, REGBUF + REGISTER_BYTE (0), TYPE_LENGTH (TYPE));
|
||||
|
||||
|
||||
CORE_ADDR mn10300_extract_struct_value_address PARAMS ((char *regbuf));
|
||||
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
|
||||
mn10300_extract_struct_value_address (REGBUF)
|
||||
extract_address (REGBUF + REGISTER_BYTE (4), \
|
||||
REGISTER_RAW_SIZE (4))
|
||||
|
||||
void mn10300_store_return_value PARAMS ((struct type *type, char *valbuf));
|
||||
#define STORE_RETURN_VALUE(TYPE, VALBUF) \
|
||||
mn10300_store_return_value (TYPE, VALBUF)
|
||||
if (TYPE_CODE (TYPE) == TYPE_CODE_PTR) \
|
||||
write_register_bytes(REGISTER_BYTE (4), VALBUF, TYPE_LENGTH (TYPE)); \
|
||||
else \
|
||||
write_register_bytes(REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE));
|
||||
|
||||
#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \
|
||||
(mn10300_store_struct_return (STRUCT_ADDR, SP))
|
||||
(SP) = mn10300_store_struct_return (STRUCT_ADDR, SP)
|
||||
|
||||
extern CORE_ADDR mn10300_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(pc) (mn10300_skip_prologue (pc))
|
||||
#define SKIP_PROLOGUE(pc) pc = mn10300_skip_prologue (pc)
|
||||
|
||||
#define FRAME_ARGS_SKIP 0
|
||||
|
||||
#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
|
||||
#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val, fi) ((val) = -1)
|
||||
|
||||
extern void mn10300_pop_frame PARAMS ((struct frame_info *));
|
||||
#define POP_FRAME mn10300_pop_frame (get_current_frame ())
|
||||
|
||||
#define USE_GENERIC_DUMMY_FRAMES 1
|
||||
#define USE_GENERIC_DUMMY_FRAMES
|
||||
#define CALL_DUMMY {0}
|
||||
#define CALL_DUMMY_START_OFFSET (0)
|
||||
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
|
||||
@@ -137,9 +141,9 @@ extern CORE_ADDR
|
||||
mn10300_push_arguments PARAMS ((int, struct value **, CORE_ADDR,
|
||||
unsigned char, CORE_ADDR ));
|
||||
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
|
||||
(mn10300_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, FP)
|
||||
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
|
||||
|
||||
#define REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \
|
||||
(TYPE_LENGTH (TYPE) > 8)
|
||||
@@ -149,10 +153,13 @@ 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(raw_buffer, optimized, addrp, frame, regnum, lval) \
|
||||
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
||||
#define GET_SAVED_REGISTER
|
||||
|
||||
/* Cons up virtual frame pointer for trace */
|
||||
extern void mn10300_virtual_frame_pointer PARAMS ((CORE_ADDR, long *, long *));
|
||||
#define TARGET_VIRTUAL_FRAME_POINTER(PC, REGP, OFFP) \
|
||||
mn10300_virtual_frame_pointer ((PC), (REGP), (OFFP))
|
||||
|
||||
/* Define this for Wingdb */
|
||||
|
||||
#define TARGET_MN10300
|
||||
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef __NM_GNU_H__
|
||||
#define __NM_GNU_H__
|
||||
@@ -40,4 +40,6 @@ extern char *gnu_target_pid_to_str (int pid);
|
||||
#include "solib.h"
|
||||
#define NO_CORE_OPS
|
||||
|
||||
#define MAINTENANCE_CMDS 1
|
||||
|
||||
#endif /* __NM_GNU_H__ */
|
||||
|
||||
@@ -27,8 +27,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
extern CORE_ADDR merlin_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(pc) (merlin_skip_prologue (pc))
|
||||
#define SKIP_PROLOGUE(pc) \
|
||||
{ register int op = read_memory_integer (pc, 1); \
|
||||
if (op == 0x82) \
|
||||
{ op = read_memory_integer (pc+2,1); \
|
||||
if ((op & 0x80) == 0) pc += 3; \
|
||||
else if ((op & 0xc0) == 0x80) pc += 4; \
|
||||
else pc += 6; \
|
||||
}}
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
Can't always go through the frames for this because on some machines
|
||||
@@ -192,8 +198,30 @@ extern CORE_ADDR merlin_skip_prologue PARAMS ((CORE_ADDR));
|
||||
/* Return number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
extern int merlin_frame_num_args PARAMS ((struct frame_info *fi));
|
||||
#define FRAME_NUM_ARGS(fi) (merlin_frame_num_args ((fi)))
|
||||
#define FRAME_NUM_ARGS(numargs, fi) \
|
||||
{ CORE_ADDR pc; \
|
||||
int insn; \
|
||||
int addr_mode; \
|
||||
int width; \
|
||||
\
|
||||
pc = FRAME_SAVED_PC (fi); \
|
||||
insn = read_memory_integer (pc,2); \
|
||||
addr_mode = (insn >> 11) & 0x1f; \
|
||||
insn = insn & 0x7ff; \
|
||||
if ((insn & 0x7fc) == 0x57c \
|
||||
&& addr_mode == 0x14) /* immediate */ \
|
||||
{ if (insn == 0x57c) /* adjspb */ \
|
||||
width = 1; \
|
||||
else if (insn == 0x57d) /* adjspw */ \
|
||||
width = 2; \
|
||||
else if (insn == 0x57f) /* adjspd */ \
|
||||
width = 4; \
|
||||
numargs = read_memory_integer (pc+2,width); \
|
||||
if (width > 1) \
|
||||
flip_bytes (&numargs, width); \
|
||||
numargs = - sign_extend (numargs, width*8) / 4; } \
|
||||
else numargs = -1; \
|
||||
}
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
|
||||
@@ -33,8 +33,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
extern CORE_ADDR umax_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(pc) (umax_skip_prologue (pc))
|
||||
#define SKIP_PROLOGUE(pc) \
|
||||
{ register unsigned char op = read_memory_integer (pc, 1); \
|
||||
if (op == 0x82) { op = read_memory_integer (pc+2,1); \
|
||||
if ((op & 0x80) == 0) pc += 3; \
|
||||
else if ((op & 0xc0) == 0x80) pc += 4; \
|
||||
else pc += 6; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
Can't always go through the frames for this because on some machines
|
||||
@@ -221,6 +227,46 @@ extern CORE_ADDR umax_skip_prologue PARAMS ((CORE_ADDR));
|
||||
|
||||
extern CORE_ADDR ns32k_get_enter_addr ();
|
||||
|
||||
/* Return number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell.
|
||||
Encore's C compiler often reuses same area on stack for args,
|
||||
so this will often not work properly. If the arg names
|
||||
are known, it's likely most of them will be printed. */
|
||||
|
||||
#define FRAME_NUM_ARGS(numargs, fi) \
|
||||
{ CORE_ADDR pc; \
|
||||
CORE_ADDR enter_addr; \
|
||||
unsigned int insn; \
|
||||
unsigned int addr_mode; \
|
||||
int width; \
|
||||
\
|
||||
numargs = -1; \
|
||||
enter_addr = ns32k_get_enter_addr ((fi)->pc); \
|
||||
if (enter_addr > 0) \
|
||||
{ \
|
||||
pc = (enter_addr == 1) ? \
|
||||
SAVED_PC_AFTER_CALL (fi) : \
|
||||
FRAME_SAVED_PC (fi); \
|
||||
insn = read_memory_integer (pc,2); \
|
||||
addr_mode = (insn >> 11) & 0x1f; \
|
||||
insn = insn & 0x7ff; \
|
||||
if ((insn & 0x7fc) == 0x57c && \
|
||||
addr_mode == 0x14) /* immediate */ \
|
||||
{ \
|
||||
if (insn == 0x57c) /* adjspb */ \
|
||||
width = 1; \
|
||||
else if (insn == 0x57d) /* adjspw */ \
|
||||
width = 2; \
|
||||
else if (insn == 0x57f) /* adjspd */ \
|
||||
width = 4; \
|
||||
numargs = read_memory_integer (pc+2,width); \
|
||||
if (width > 1) \
|
||||
flip_bytes (&numargs, width); \
|
||||
numargs = - sign_extend (numargs, width*8) / 4;\
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
#define FRAME_ARGS_SKIP 8
|
||||
@@ -231,8 +277,35 @@ extern CORE_ADDR ns32k_get_enter_addr ();
|
||||
ways in the stack frame. sp is even more special:
|
||||
the address we return for it IS the sp for the next frame. */
|
||||
|
||||
extern int umax_frame_num_args PARAMS ((struct frame_info *fi));
|
||||
#define FRAME_NUM_ARGS(fi) (umax_frame_num_args ((fi)))
|
||||
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
|
||||
{ \
|
||||
register int regmask, regnum; \
|
||||
int localcount; \
|
||||
register CORE_ADDR enter_addr; \
|
||||
register CORE_ADDR next_addr; \
|
||||
\
|
||||
memset (&(frame_saved_regs), '\0', sizeof (frame_saved_regs)); \
|
||||
enter_addr = ns32k_get_enter_addr ((frame_info)->pc); \
|
||||
if (enter_addr > 1) \
|
||||
{ \
|
||||
regmask = read_memory_integer (enter_addr+1, 1) & 0xff; \
|
||||
localcount = ns32k_localcount (enter_addr); \
|
||||
next_addr = (frame_info)->frame + localcount; \
|
||||
for (regnum = 0; regnum < 8; regnum++, regmask >>= 1) \
|
||||
(frame_saved_regs).regs[regnum] = (regmask & 1) ? \
|
||||
(next_addr -= 4) : 0; \
|
||||
(frame_saved_regs).regs[SP_REGNUM] = (frame_info)->frame + 4;\
|
||||
(frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 4;\
|
||||
(frame_saved_regs).regs[FP_REGNUM] = \
|
||||
(read_memory_integer ((frame_info)->frame, 4));\
|
||||
} \
|
||||
else if (enter_addr == 1) \
|
||||
{ \
|
||||
CORE_ADDR sp = read_register (SP_REGNUM); \
|
||||
(frame_saved_regs).regs[PC_REGNUM] = sp; \
|
||||
(frame_saved_regs).regs[SP_REGNUM] = sp + 4; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Things needed for making the inferior call functions. */
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* While this is for use by threaded programs, it doesn't appear
|
||||
* to hurt non-threaded ones. This is used in infrun.c: */
|
||||
#define PREPARE_TO_PROCEED(select_it) hppa_prepare_to_proceed()
|
||||
#define PREPARE_TO_PROCEED() hppa_prepare_to_proceed()
|
||||
extern int hppa_prepare_to_proceed PARAMS(( void ));
|
||||
|
||||
/* In infptrace.c or infttrace.c: */
|
||||
@@ -279,10 +279,3 @@ 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)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Parameters for execution on any Hewlett-Packard PA-RISC machine.
|
||||
Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1995, 1999
|
||||
Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1995
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Contributed by the Center for Software Science at the
|
||||
@@ -72,8 +72,8 @@ struct inferior_status;
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
extern CORE_ADDR hppa_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(pc) (hppa_skip_prologue (pc))
|
||||
#define SKIP_PROLOGUE(pc) pc = skip_prologue (pc)
|
||||
extern CORE_ADDR skip_prologue PARAMS ((CORE_ADDR));
|
||||
|
||||
/* If PC is in some function-call trampoline code, return the PC
|
||||
where the function itself actually starts. If not, return NULL. */
|
||||
@@ -437,8 +437,8 @@ extern int hppa_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(frameless_function_invocation (FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
(FRAMELESS) = frameless_function_invocation(FI)
|
||||
extern int frameless_function_invocation PARAMS ((struct frame_info *));
|
||||
|
||||
extern CORE_ADDR hppa_frame_saved_pc PARAMS ((struct frame_info *frame));
|
||||
@@ -452,7 +452,7 @@ extern CORE_ADDR hppa_frame_saved_pc PARAMS ((struct frame_info *frame));
|
||||
|
||||
/* We can't tell how many args there are
|
||||
now that the C compiler delays popping them. */
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val,fi) (val = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
@@ -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,
|
||||
@@ -624,7 +624,7 @@ hppa_fix_call_dummy PARAMS ((char *, CORE_ADDR, CORE_ADDR, int,
|
||||
struct value **, struct type *, int));
|
||||
|
||||
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
|
||||
(hppa_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
|
||||
sp = hppa_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
|
||||
extern CORE_ADDR
|
||||
hppa_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int,
|
||||
CORE_ADDR));
|
||||
@@ -723,7 +723,6 @@ enum unwind_stub_types
|
||||
PARAMETER_RELOCATION = 2,
|
||||
EXPORT = 10,
|
||||
IMPORT = 11,
|
||||
IMPORT_SHLIB = 12,
|
||||
};
|
||||
|
||||
/* We use the objfile->obj_private pointer for two things:
|
||||
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include "rs6000/nm-rs6000.h"
|
||||
|
||||
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
/* Use generic RS6000 definitions. */
|
||||
#include "rs6000/tm-rs6000.h"
|
||||
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef TM_PPC_AIX_H
|
||||
#define TM_PPC_AIX_H
|
||||
|
||||
@@ -46,6 +46,8 @@ 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 */
|
||||
|
||||
@@ -56,6 +58,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
extern struct frame_info *rs6000_pop_frame PARAMS ((struct frame_info *frame));
|
||||
|
||||
extern CORE_ADDR ppc_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
|
||||
extern CORE_ADDR rs6000_push_arguments PARAMS ((int nargs,
|
||||
struct value **args,
|
||||
CORE_ADDR sp,
|
||||
unsigned char struct_return,
|
||||
CORE_ADDR struct_addr));
|
||||
|
||||
#undef PUSH_DUMMY_FRAME
|
||||
#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
|
||||
@@ -64,10 +71,9 @@ extern CORE_ADDR ppc_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(raw_buffer, optimized, addrp, frame, regnum, lval) \
|
||||
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
||||
#define GET_SAVED_REGISTER
|
||||
|
||||
#define USE_GENERIC_DUMMY_FRAMES 1
|
||||
#define USE_GENERIC_DUMMY_FRAMES
|
||||
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
|
||||
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
|
||||
#define CALL_DUMMY_ADDRESS() entry_point_address ()
|
||||
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include "xm-aix4.h"
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
If so, what do they look like?
|
||||
This is becoming harder, since tege@sics.SE wants to change
|
||||
gcc to not output a prologue when no frame is needed. */
|
||||
#define SKIP_PROLOGUE(pc) (pc)
|
||||
#define SKIP_PROLOGUE(pc) do {} while (0)
|
||||
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
@@ -332,7 +332,7 @@ do { \
|
||||
/* Return number of args passed to a frame.
|
||||
Can return -1, meaning no way to tell. */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val, fi) (val = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
|
||||
@@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef TM_RS6000_AIX4_H
|
||||
#define TM_RS6000_AIX4_H
|
||||
|
||||
@@ -97,8 +97,11 @@ struct rs6000_framedata {
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
extern CORE_ADDR rs6000_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(pc) (rs6000_skip_prologue (pc))
|
||||
#define SKIP_PROLOGUE(pc) \
|
||||
do { \
|
||||
struct rs6000_framedata _frame; \
|
||||
pc = skip_prologue (pc, &_frame); \
|
||||
} while (0)
|
||||
|
||||
extern CORE_ADDR skip_prologue PARAMS((CORE_ADDR, struct rs6000_framedata *));
|
||||
|
||||
@@ -156,8 +159,9 @@ extern void aix_process_linenos PARAMS ((void));
|
||||
handle it. */
|
||||
|
||||
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
|
||||
(rs6000_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
|
||||
extern CORE_ADDR rs6000_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
|
||||
sp = push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
|
||||
extern CORE_ADDR push_arguments PARAMS ((int, struct value **, CORE_ADDR,
|
||||
int, CORE_ADDR));
|
||||
|
||||
/* BREAKPOINT_FROM_PC uses the program counter value to determine the
|
||||
breakpoint that should be used */
|
||||
@@ -377,8 +381,8 @@ CORE_ADDR rs6000_frame_chain PARAMS ((struct frame_info *));
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(frameless_function_invocation (FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
FRAMELESS = frameless_function_invocation (FI)
|
||||
|
||||
extern int frameless_function_invocation PARAMS((struct frame_info *));
|
||||
|
||||
@@ -420,7 +424,7 @@ extern CORE_ADDR rs6000_frame_args_address PARAMS ((struct frame_info *));
|
||||
/* We can't tell how many args there are
|
||||
now that the C compiler delays popping them. */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val,fi) (val = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
|
||||
@@ -43,13 +43,15 @@ struct type;
|
||||
/* Advance PC across any function entry prologue instructions
|
||||
to reach some "real" code. */
|
||||
|
||||
extern CORE_ADDR sh_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(ip) (sh_skip_prologue (ip))
|
||||
extern CORE_ADDR sh_skip_prologue ();
|
||||
#define SKIP_PROLOGUE(ip) \
|
||||
{(ip) = sh_skip_prologue(ip);}
|
||||
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
Can't always go through the frames for this because on some machines
|
||||
the new frame is not set up until the new function executes
|
||||
some instructions.
|
||||
some instructions.
|
||||
|
||||
The return address is the value saved in the PR register + 4 */
|
||||
|
||||
@@ -62,7 +64,7 @@ extern CORE_ADDR sh_skip_prologue PARAMS ((CORE_ADDR));
|
||||
/* Illegal instruction - used by the simulator for breakpoint
|
||||
detection */
|
||||
|
||||
#define BREAKPOINT {0xc3, 0xc3} /* 0xc3c3 is trapa #c3, and it works in big
|
||||
#define BREAKPOINT {0xc3, 0xc3} /* 0xc3c3 is trapa #c3, and it works in big
|
||||
and little endian modes */
|
||||
|
||||
#define BIG_REMOTE_BREAKPOINT { 0xc3, 0x20 }
|
||||
@@ -76,7 +78,7 @@ extern CORE_ADDR sh_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define REGISTER_TYPE long
|
||||
|
||||
/* Say how much memory is needed to store a copy of the register set */
|
||||
#define REGISTER_BYTES (NUM_REGS*4)
|
||||
#define REGISTER_BYTES (NUM_REGS*4)
|
||||
|
||||
/* Index within `registers' of the first byte of the space for
|
||||
register N. */
|
||||
@@ -146,7 +148,7 @@ extern char **sh_register_names;
|
||||
#define NUM_REALREGS 59
|
||||
|
||||
/* Store the address of the place in which to copy the structure the
|
||||
subroutine will return. This is called from call_function.
|
||||
subroutine will return. This is called from call_function.
|
||||
|
||||
We store structs through a pointer passed in R0 */
|
||||
|
||||
@@ -165,7 +167,7 @@ extern void sh_extract_return_value PARAMS ((struct type *, void *, void *));
|
||||
sh_extract_return_value (TYPE, REGBUF, VALBUF)
|
||||
|
||||
/* Write into appropriate registers a function return value
|
||||
of type TYPE, given in virtual format.
|
||||
of type TYPE, given in virtual format.
|
||||
|
||||
Things always get returned in R0/R1 */
|
||||
|
||||
@@ -180,25 +182,25 @@ extern void sh_extract_return_value PARAMS ((struct type *, void *, void *));
|
||||
extract_address (REGBUF, REGISTER_RAW_SIZE (0))
|
||||
|
||||
|
||||
/* Define other aspects of the stack frame.
|
||||
/* Define other aspects of the stack frame.
|
||||
we keep a copy of the worked out return pc lying around, since it
|
||||
is a useful bit of info */
|
||||
|
||||
#define EXTRA_FRAME_INFO \
|
||||
CORE_ADDR return_pc; \
|
||||
int leaf_function; \
|
||||
int f_offset;
|
||||
int f_offset;
|
||||
|
||||
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
|
||||
sh_init_extra_frame_info(fromleaf, fi)
|
||||
sh_init_extra_frame_info(fromleaf, fi)
|
||||
extern void sh_init_extra_frame_info PARAMS ((int, struct frame_info *));
|
||||
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(frameless_look_for_prologue(FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
(FRAMELESS) = frameless_look_for_prologue(FI)
|
||||
|
||||
#define FRAME_SAVED_PC(FRAME) ((FRAME)->return_pc)
|
||||
#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
|
||||
@@ -209,13 +211,13 @@ extern void sh_init_extra_frame_info PARAMS ((int, struct frame_info *));
|
||||
|
||||
/* We can't tell how many args there are */
|
||||
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val,fi) (val = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
#define FRAME_ARGS_SKIP 0
|
||||
|
||||
extern void sh_frame_find_saved_regs PARAMS ((struct frame_info *fi,
|
||||
extern void sh_frame_find_saved_regs PARAMS ((struct frame_info *fi,
|
||||
struct frame_saved_regs *fsr));
|
||||
|
||||
/* Put here the code to store, into a struct frame_saved_regs,
|
||||
@@ -227,20 +229,22 @@ extern void sh_frame_find_saved_regs PARAMS ((struct frame_info *fi,
|
||||
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
|
||||
sh_frame_find_saved_regs(frame_info, &(frame_saved_regs))
|
||||
|
||||
#define NAMES_HAVE_UNDERSCORE
|
||||
|
||||
typedef unsigned short INSN_WORD;
|
||||
|
||||
extern CORE_ADDR sh_push_arguments PARAMS ((int nargs,
|
||||
struct value **args,
|
||||
extern CORE_ADDR sh_push_arguments PARAMS ((int nargs,
|
||||
struct value **args,
|
||||
CORE_ADDR sp,
|
||||
unsigned char struct_return,
|
||||
CORE_ADDR struct_addr));
|
||||
|
||||
#define USE_GENERIC_DUMMY_FRAMES 1
|
||||
#define USE_GENERIC_DUMMY_FRAMES
|
||||
#define CALL_DUMMY {0}
|
||||
#define CALL_DUMMY_LENGTH (0)
|
||||
#define CALL_DUMMY_START_OFFSET (0)
|
||||
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
|
||||
#define FIX_CALL_DUMMY(DUMMY, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP)
|
||||
#define FIX_CALL_DUMMY(DUMMY, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP)
|
||||
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
|
||||
#define CALL_DUMMY_ADDRESS() entry_point_address ()
|
||||
extern CORE_ADDR sh_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
|
||||
@@ -251,14 +255,13 @@ 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, FP)
|
||||
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
|
||||
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
|
||||
(sh_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
|
||||
/* override the standard get_saved_register function with
|
||||
one that takes account of generic CALL_DUMMY frames */
|
||||
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
|
||||
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
||||
#define GET_SAVED_REGISTER
|
||||
|
||||
/* Discard from the stack the innermost frame, restoring all saved
|
||||
registers. */
|
||||
|
||||
@@ -369,7 +369,7 @@ extern void sparc64_write_fp PARAMS ((CORE_ADDR));
|
||||
|
||||
CORE_ADDR sp64_push_arguments PARAMS ((int, struct value **, CORE_ADDR, unsigned char, CORE_ADDR));
|
||||
#undef PUSH_ARGUMENTS
|
||||
#define PUSH_ARGUMENTS(A,B,C,D,E) (sp64_push_arguments ((A), (B), (C), (D), (E)))
|
||||
#define PUSH_ARGUMENTS(A,B,C,D,E) (sp = sp64_push_arguments ((A), (B), (C), (D), (E)))
|
||||
|
||||
#undef EXTRACT_RETURN_VALUE
|
||||
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
|
||||
|
||||
@@ -88,9 +88,11 @@ struct value;
|
||||
knows that the function has a frame. Its result is equal
|
||||
to its input PC if the function is frameless, unequal otherwise. */
|
||||
|
||||
#define SKIP_PROLOGUE(pc) (sparc_skip_prologue (pc, 0))
|
||||
#define SKIP_PROLOGUE_FRAMELESS_P(pc) (sparc_skip_prologue (pc, 1))
|
||||
extern CORE_ADDR sparc_skip_prologue PARAMS ((CORE_ADDR, int));
|
||||
#define SKIP_PROLOGUE(pc) \
|
||||
{ pc = skip_prologue (pc, 0); }
|
||||
#define SKIP_PROLOGUE_FRAMELESS_P(pc) \
|
||||
{ pc = skip_prologue (pc, 1); }
|
||||
extern CORE_ADDR skip_prologue PARAMS ((CORE_ADDR, int));
|
||||
|
||||
/* Immediately after a function call, return the saved pc.
|
||||
Can't go through the frames for this because on some machines
|
||||
@@ -204,13 +206,7 @@ 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. */
|
||||
|
||||
#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)
|
||||
#define GET_SAVED_REGISTER 1
|
||||
|
||||
/* Number of bytes of storage in the actual machine representation
|
||||
for register N. */
|
||||
@@ -362,8 +358,8 @@ extern CORE_ADDR sparc_frame_chain PARAMS ((struct frame_info *));
|
||||
/* A macro that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. If it
|
||||
does not, FRAMELESS is set to 1, else 0. */
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||
(frameless_look_for_prologue(FI))
|
||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||
(FRAMELESS) = frameless_look_for_prologue(FI)
|
||||
|
||||
/* The location of I0 w.r.t SP. This is actually dependent on how the system's
|
||||
window overflow/underflow routines are written. Most vendors save the L regs
|
||||
@@ -390,7 +386,7 @@ extern CORE_ADDR sparc_frame_saved_pc PARAMS ((struct frame_info *));
|
||||
|
||||
/* We can't tell how many args there are
|
||||
now that the C compiler delays popping them. */
|
||||
#define FRAME_NUM_ARGS(fi) (-1)
|
||||
#define FRAME_NUM_ARGS(val,fi) (val = -1)
|
||||
|
||||
/* Return number of bytes at start of arglist that are not really args. */
|
||||
|
||||
@@ -583,6 +579,6 @@ extern int deferred_stores;
|
||||
function calls. */
|
||||
|
||||
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
|
||||
(sparc_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
|
||||
sp = sparc_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
|
||||
extern CORE_ADDR
|
||||
sparc_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user