import gdb-1999-08-30 snapshot
This commit is contained in:
parent
fd485a97b1
commit
104c1213b4
132 changed files with 8907 additions and 3077 deletions
252
gdb/ChangeLog
252
gdb/ChangeLog
|
@ -1,5 +1,236 @@
|
||||||
|
1999-08-30 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* infrun.c (prepare_to_wait): New function, broken out from the
|
||||||
|
wfi_continue label in handle_inferior_event.
|
||||||
|
(handle_inferior_event): Change more gotos into function calls.
|
||||||
|
|
||||||
|
1999-08-30 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||||
|
|
||||||
|
* tracepoint.c: -Wall warning cleanup.
|
||||||
|
(parse_and_eval_memrange): remove (unused).
|
||||||
|
(output_command, args_info, locals_info, registers_info): add decls.
|
||||||
|
(getpkt, putpkt, remote_console_output): add decls.
|
||||||
|
(isalnum, isspace): cast arg to avoid warning.
|
||||||
|
(printf, fprintf, sprintf): use [fs]printf_vma for printing addrs.
|
||||||
|
|
||||||
|
Mon Aug 30 21:47:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* d10v-tdep.c: #include "language.h".
|
||||||
|
|
||||||
|
Mon Aug 30 20:38:57 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* configure.in (AC_CHECK_HEADERS): Check for <time.h>.
|
||||||
|
* configure, acconfig.in: Re-generate.
|
||||||
|
|
||||||
|
* remote-rdp.c: #include <time.h>
|
||||||
|
|
||||||
|
* config/arm/tm-arm.h (arm_float_info): Add declaration.
|
||||||
|
|
||||||
|
* arm-tdep.c (convert_from_extended, convert_to_extended): Change
|
||||||
|
double ptr arg to void ptr arg.
|
||||||
|
|
||||||
|
* config/arm/tm-arm.h (arm_frameless_function_invocation): Add
|
||||||
|
declaration.
|
||||||
|
(arm_frame_find_saved_regs): Rename frame_find_saved_regs.
|
||||||
|
(convert_from_extended, convert_to_extended): Add declaration.
|
||||||
|
|
||||||
|
Mon Aug 30 19:05:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* configure.in (WERR_CFLAGS): Separate the -Werror flag.
|
||||||
|
* configure: Re-generate.
|
||||||
|
|
||||||
|
* Makefile.in (INTERNAL_CFLAGS): Re-define using
|
||||||
|
INTERNAL_WARN_CFLAGS.
|
||||||
|
(INTERNAL_WARN_CFLAGS): Define. Leave off WERR_CFLAGS.
|
||||||
|
(tracepoint.o): Add explicit rule.
|
||||||
|
(WERR_CFLAGS): Add definition.
|
||||||
|
|
||||||
|
Mon Aug 30 17:52:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* utils.c: #include "event-loop.h" for declaration of
|
||||||
|
async_request_quit.
|
||||||
|
* Makefile.in (utils.o): Add dependency on event-loop.h.
|
||||||
|
|
||||||
|
* event-top.c (mark_async_signal_handler_wrapper,
|
||||||
|
async_request_quit): Move declaration from here.
|
||||||
|
* event-loop.h: To here.
|
||||||
|
|
||||||
|
* defs.h: Add declaration of exec.c:exec_set_section_offsets.
|
||||||
|
|
||||||
|
* event-top.c: #include "gdbcmd.h" which includes "command.h" and
|
||||||
|
hence expose declaration of function dont_repeat.
|
||||||
|
|
||||||
|
* top.c (ISATTY), tracepoint.c (ISATTY), utils.c (ISATTY),
|
||||||
|
event-top.c (ISATTY): Move definitions from here.
|
||||||
|
* defs.h (ISATTY): To here. #include <unistd.h>.
|
||||||
|
|
||||||
|
* sol-thread.c, solib.c, source.c, sparcl-tdep.c, tracepoint.c,
|
||||||
|
utils.c, win32-nat.c, wince.c, top.c, symfile.c, ser-unix.c,
|
||||||
|
ser-tcp.c, procfs.c, maint.c, infttrace.c, hppa-tdep.c,
|
||||||
|
ser-pipe.c, remote-rdp.c, main.c, inftarg.c, inflow.c,
|
||||||
|
hpux-thread.c, hp-psymtab-read.c, go32-nat.c, fork-child.c,
|
||||||
|
corelow.c, command.c: Do not #include <unistd.h>, moved to defs.h.
|
||||||
|
|
||||||
|
Mon Aug 30 15:14:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* defs.h (struct tui_stream, enum streamtype): Move from here.
|
||||||
|
* utils.c: To here.
|
||||||
|
|
||||||
|
* main.c (tui_file_fputs): Move from here.
|
||||||
|
* utils.c: To here.
|
||||||
|
|
||||||
|
Sun Aug 29 10:03:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* gdb-events.h, gdb-events.c, gdb-events.sh: New files.
|
||||||
|
|
||||||
|
1999-08-27 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||||
|
|
||||||
|
* solib.c (open_symbol_file_object): new function.
|
||||||
|
Called when attaching to a new process, if there is no loaded
|
||||||
|
symbol file. Attempts to locate the executable file for the
|
||||||
|
attached process and load symbols from it.
|
||||||
|
(solib_add): Call open_symbol_file_object if attaching to a
|
||||||
|
new process and no open symbol file.
|
||||||
|
|
||||||
|
1999-08-27 Jason Molenda (jsm@bugshack.cygnus.com)
|
||||||
|
|
||||||
|
* config/i386/tm-sun386.h (GDB_TARGET_IS_SUN386): Definition
|
||||||
|
removed--no longer checked anywhere in gdb.
|
||||||
|
|
||||||
|
1999-08-27 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* infrun.c (stop_stepping): New function, broken out from
|
||||||
|
stop_stepping label in handle_inferior_event.
|
||||||
|
(handle_inferior_event): Change gotos into function calls.
|
||||||
|
|
||||||
|
Fri Aug 27 20:13:22 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* defs.h (LONGEST): Move definition to earlier in file - to just
|
||||||
|
after BFD.
|
||||||
|
(paddr_u, paddr_d): Declare.
|
||||||
|
* utils.c (decimal2str): New function.
|
||||||
|
(paddr_u, paddr_d): Define.
|
||||||
|
|
||||||
|
* remote.c (remote_cisco_section_offsets,
|
||||||
|
compare_sections_command): Fix XprintfX arguments. Use paddr...
|
||||||
|
(putpkt_binary): Fix XprintfX arguments.
|
||||||
|
|
||||||
|
Tue Aug 24 21:30:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* arm-tdep.c (arm_init_extra_frame_info): Add braces. Recommended
|
||||||
|
by gcc -Wparentheses.
|
||||||
|
|
||||||
|
1999-08-26 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* infrun.c (check_sigtramp2): New function, broken out from
|
||||||
|
check_sigtramp2 label in handle_inferior_event.
|
||||||
|
(handle_inferior_event): Change gotos into function calls.
|
||||||
|
|
||||||
|
Declare Tahoe configuration obsolete.
|
||||||
|
* configure.host, configure.tgt: Comment out Tahoe configs.
|
||||||
|
* Makefile.in: Comment out Tahoe-related action.
|
||||||
|
* tahoe-tdep.c, config/tahoe/*: Comment out.
|
||||||
|
* NEWS: Mention obsolete status.
|
||||||
|
|
||||||
|
1999-08-26 J.T. Conklin <jtc@redback.com>
|
||||||
|
|
||||||
|
* i386-stub.c, m32r-stub.c, m68k-stub.c, sh-stub.c, sh-stub.c,
|
||||||
|
sparc-stub, sparcl-stub.c sparclet-stub.c (getpacket): If '$',
|
||||||
|
the packet start character is received in the 'middle' of a
|
||||||
|
packet, assume that packet end character has been lost and
|
||||||
|
start a new packet.
|
||||||
|
|
||||||
|
* i386-stub.c, m32r-stub.c, m68k-stub.c, sh-stub.c, sparc-stub.c,
|
||||||
|
sparcl-stub.c sparclet-stub.c (getpacket): Changed to return ptr
|
||||||
|
to first character of input buffer. Removed & 0x7f masks.
|
||||||
|
(handle_exception): Don't access remcomInBuffer directly.
|
||||||
|
|
||||||
|
1999-08-25 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* breakpoint.c (disable_breakpoints_in_shlibs): Only disable
|
||||||
|
enabled breakpoints.
|
||||||
|
|
||||||
|
Tue Aug 24 14:59:23 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* tracepoint.c, remote.c, pa64solib.h, value.h, somsolib.h,
|
||||||
|
solib.h, scm-lang.h, language.h, inferior.h, defs.h, coff-solib.h,
|
||||||
|
ch-lang.h, breakpoint.h, annotate.h: Remove #if __STDC__ wrapping
|
||||||
|
struct declarations.
|
||||||
|
|
||||||
|
* config/sparc/nm-sun4sol2.h, config/mn10300/tm-mn10300.h,
|
||||||
|
config/mn10200/tm-mn10200.h, config/i386/tm-i386.h,
|
||||||
|
config/i386/tm-i386v.h, config/i386/nm-i386sol2.h,
|
||||||
|
config/pa/nm-hppah.h, config/rs6000/nm-rs6000.h,
|
||||||
|
config/sparc/tm-sp64.h, config/v850/tm-v850.h,
|
||||||
|
config/tic80/tm-tic80.h, config/sparc/tm-sparc.h,
|
||||||
|
config/sh/tm-sh.h, config/rs6000/tm-rs6000.h, config/pa/tm-hppa.h,
|
||||||
|
config/mips/tm-mips.h, config/m68k/tm-m68k.h,
|
||||||
|
config/m32r/tm-m32r.h, config/i960/tm-mon960.h,
|
||||||
|
config/fr30/tm-fr30.h, config/h8300/tm-h8300.h,
|
||||||
|
config/arm/tm-arm.h, config/alpha/tm-alpha.h,
|
||||||
|
config/a29k/tm-a29k.h: Ditto.
|
||||||
|
|
||||||
|
Wed Aug 25 10:45:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* Makefile.in (gdb$(EXEEXT)): Add dependency on TDEPLIBS.
|
||||||
|
|
||||||
|
* config/arm/arm.mt (TDEPLIBS): Define. Move libangsd.a to here.
|
||||||
|
(TDEPFILES): From here.
|
||||||
|
|
||||||
|
1999-08-24 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||||
|
|
||||||
|
* top.c (init_main): Add new set/show command exec-done-display,
|
||||||
|
default value is off.
|
||||||
|
* event-loop.h: Export exec_done_display_p.
|
||||||
|
* event-top.c: New variable exec_done_display_p.
|
||||||
|
* infrun.c (complete_execution): Print completion message if
|
||||||
|
corresponding flag is set.
|
||||||
|
|
||||||
|
* top.c (DEFAULT_PROMPT): Add space after "(gdb)" at end of prompt.
|
||||||
|
|
||||||
|
From: J.T. Conklin <jtc@redback.com>
|
||||||
|
* top.c (DEFAULT_PROMPT): Set to "(gdb)" if not already defined.
|
||||||
|
(init_main): Always use DEFAULT_PROMPT.
|
||||||
|
|
||||||
|
Tue Aug 24 03:23:31 1999 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* hppa-tdep.c: Remove useless "purecov: deadcode" comments.
|
||||||
|
(hppa_use_struct_convention): Update for PA64.
|
||||||
|
(hppa_frame_saved_pc): Properly extract the saved PC in a call
|
||||||
|
dummy frame.
|
||||||
|
(in_solib_call_trampoline): Return nonzero if we are in a function
|
||||||
|
called ".stub".
|
||||||
|
(prologue_inst_adjust_sp): Handle std,ma.
|
||||||
|
(skip_prologue_hard_way): Handle more PA2.0/PA64 insns.
|
||||||
|
(hppa_frame_find_saved_regs): Similarly. Handle indirect save of
|
||||||
|
%r3 into the stack.
|
||||||
|
|
||||||
|
* config/pa/tm-hppa64.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): Define.
|
||||||
|
(CALL_DUMMY_BREAKPOINT_OFFSET): Define.
|
||||||
|
|
||||||
|
Tue Aug 24 14:59:23 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* Makefile.in (gdb$(EXEEXT)): Add dependency on main.o that was
|
||||||
|
lost when libgdb.a was added.
|
||||||
|
|
||||||
|
Tue Aug 24 14:26:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* gdbarch.c, gdbarch.h: Convert to pure ISO-C.
|
||||||
|
|
||||||
|
* gdbarch.sh: New file.
|
||||||
|
* gdbarch.c, gdbarch.h: Add note describing gdbarch.sh
|
||||||
|
|
||||||
|
Mon Aug 23 19:36:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* Makefile.in (libgdb.a): New target.
|
||||||
|
(gdb$(EXEEXT)): Add dependency on libgdb.a.
|
||||||
|
(libgdb-files, LIBGDB_OBS, libgdb, LIBGDBDEPS, LIBGDBFILES): Delete.
|
||||||
|
|
||||||
Mon Aug 23 10:16:32 1999 Jeffrey A Law (law@cygnus.com)
|
Mon Aug 23 10:16:32 1999 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* infttrate.c (child_pid_to_exec_file): Find the correct base
|
||||||
|
of the stack for PA64.
|
||||||
|
|
||||||
* pa64solib.c: Fix some minor whitespace problems.
|
* pa64solib.c: Fix some minor whitespace problems.
|
||||||
(bfd_lookup_symbol): New function.
|
(bfd_lookup_symbol): New function.
|
||||||
(pa64_solib_create_inferior_hook): Find the address __dld_break
|
(pa64_solib_create_inferior_hook): Find the address __dld_break
|
||||||
|
@ -43,6 +274,7 @@ Fri Aug 20 10:53:38 1999 Jeffrey A Law (law@cygnus.com)
|
||||||
* breakpoint.h (target_hw_bp_type): new enum.
|
* breakpoint.h (target_hw_bp_type): new enum.
|
||||||
* breakpoint.c (insert_breakpoints): use enum instead of consts.
|
* breakpoint.c (insert_breakpoints): use enum instead of consts.
|
||||||
(remove_breakpoint): use enum instead of consts.
|
(remove_breakpoint): use enum instead of consts.
|
||||||
|
(throughout): use "warning" instead of "fprintf(stderr, ..."
|
||||||
[Also clean up a bunch of excessively long lines.]
|
[Also clean up a bunch of excessively long lines.]
|
||||||
|
|
||||||
1999-08-19 J.T. Conklin <jtc@redback.com>
|
1999-08-19 J.T. Conklin <jtc@redback.com>
|
||||||
|
@ -537,8 +769,8 @@ Sun Aug 8 12:06:47 1999 Fred Fish <fnf@cygnus.com>
|
||||||
1999-08-08 James Ingham <jingham@leda.cygnus.com>
|
1999-08-08 James Ingham <jingham@leda.cygnus.com>
|
||||||
|
|
||||||
* remote.c (remote_insert_breakpoint): Fix typo in Z packet support.
|
* remote.c (remote_insert_breakpoint): Fix typo in Z packet support.
|
||||||
Also move Z packet support OUTSIDE of REMOTE_BREAKPOINT ifdef,
|
Also move Z packet support OUTSIDE of REMOTE_BREAKPOINT ifdef,
|
||||||
since this is not set for all targets that support the Z packet.
|
since this is not set for all targets that support the Z packet.
|
||||||
|
|
||||||
Fri Aug 6 17:17:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
Fri Aug 6 17:17:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
@ -624,7 +856,7 @@ Fri Aug 6 19:26:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
(arm_othernames): Use the set_disassembly_flavor.
|
(arm_othernames): Use the set_disassembly_flavor.
|
||||||
(_initialize_arm_tdep): Setup the disassembly flavor commands, and
|
(_initialize_arm_tdep): Setup the disassembly flavor commands, and
|
||||||
initialize the flavor.
|
initialize the flavor.
|
||||||
(arm_frameless_function_invocation): Adjust for
|
(arm_frameless_function_invocation): Adjust for
|
||||||
frameless functions that have 1 or 2 instructions that mimic the
|
frameless functions that have 1 or 2 instructions that mimic the
|
||||||
standard APCS form.
|
standard APCS form.
|
||||||
(arm_scan_prologue): Be more careful about scanning the function
|
(arm_scan_prologue): Be more careful about scanning the function
|
||||||
|
@ -886,7 +1118,7 @@ Wed Aug 4 10:42:58 1999 Fred Fish <fnf@cygnus.com>
|
||||||
|
|
||||||
1999-07-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
1999-07-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||||
|
|
||||||
From Eli Zaretskii <eliz@is.elta.co.il>:
|
From Eli Zaretskii <eliz@is.elta.co.il>:
|
||||||
* top.c (gdb_init) [__MSDOS__]: Arrange for GDB to return to the
|
* top.c (gdb_init) [__MSDOS__]: Arrange for GDB to return to the
|
||||||
original directory before exiting.
|
original directory before exiting.
|
||||||
(cd_command) [_WIN32 || __MSDOS__]: Canonicalize the new directory
|
(cd_command) [_WIN32 || __MSDOS__]: Canonicalize the new directory
|
||||||
|
@ -916,8 +1148,8 @@ Mon Jul 26 17:13:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
1999-07-24 Fred Fish <fnf@cygnus.com>
|
1999-07-24 Fred Fish <fnf@cygnus.com>
|
||||||
|
|
||||||
* symfile.c (default_symfile_offsets): Clear section_offsets
|
* symfile.c (default_symfile_offsets): Clear section_offsets
|
||||||
before filling it in.
|
before filling it in.
|
||||||
|
|
||||||
1999-07-16 Keith Seitz <keiths@cygnus.com>
|
1999-07-16 Keith Seitz <keiths@cygnus.com>
|
||||||
|
|
||||||
|
@ -1016,10 +1248,10 @@ Mon Jul 12 11:15:09 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
1999-07-12 Keith Seitz <keiths@cygnus.com>
|
1999-07-12 Keith Seitz <keiths@cygnus.com>
|
||||||
|
|
||||||
* rdi-share/unixcomm.c (Unix_ResetSerial): Remove CYGWIN32
|
* rdi-share/unixcomm.c (Unix_ResetSerial): Remove CYGWIN32
|
||||||
conditional. It's no longer needed.
|
conditional. It's no longer needed.
|
||||||
(SERPORT1, SERPORT2): Linux serial ports are "/dev/ttyX", not
|
(SERPORT1, SERPORT2): Linux serial ports are "/dev/ttyX", not
|
||||||
"/dev/cuaX" (X=0,1,2,3,...).
|
"/dev/cuaX" (X=0,1,2,3,...).
|
||||||
|
|
||||||
Mon Jul 12 02:02:00 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
Mon Jul 12 02:02:00 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
||||||
|
|
||||||
|
@ -1684,7 +1916,7 @@ Thu Jun 10 20:04:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
(mcore_push_arguments): Fix compiler warning.
|
(mcore_push_arguments): Fix compiler warning.
|
||||||
|
|
||||||
1999-06-09 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
1999-06-09 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||||
|
|
||||||
* rs6000-tdep.c (skip_prologue): Don't mistake a branch for a
|
* rs6000-tdep.c (skip_prologue): Don't mistake a branch for a
|
||||||
subroutine call.
|
subroutine call.
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,7 @@ READLINE_SRC = $(srcdir)/$(READLINE_DIR)
|
||||||
READLINE_CFLAGS = -I$(READLINE_SRC)/..
|
READLINE_CFLAGS = -I$(READLINE_SRC)/..
|
||||||
|
|
||||||
WARN_CFLAGS = @WARN_CFLAGS@
|
WARN_CFLAGS = @WARN_CFLAGS@
|
||||||
|
WERROR_CFLAGS = @WERROR_CFLAGS@
|
||||||
|
|
||||||
# Where is the INTL library? Typically in ../intl.
|
# Where is the INTL library? Typically in ../intl.
|
||||||
INTL_DIR = ../intl
|
INTL_DIR = ../intl
|
||||||
|
@ -183,10 +184,12 @@ CFLAGS = -g
|
||||||
CXXFLAGS = -g -O
|
CXXFLAGS = -g -O
|
||||||
|
|
||||||
# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
|
# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
|
||||||
INTERNAL_CFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
|
INTERNAL_WARN_CFLAGS = \
|
||||||
|
$(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
|
||||||
$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
|
$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
|
||||||
$(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \
|
$(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \
|
||||||
$(INTL_CFLAGS) $(TUI_CFLAGS) $(ENABLE_CFLAGS) $(WARN_CFLAGS)
|
$(INTL_CFLAGS) $(TUI_CFLAGS) $(ENABLE_CFLAGS) $(WARN_CFLAGS)
|
||||||
|
INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||||
|
|
||||||
# LDFLAGS is specifically reserved for setting from the command line
|
# LDFLAGS is specifically reserved for setting from the command line
|
||||||
# when running make.
|
# when running make.
|
||||||
|
@ -224,7 +227,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
|
||||||
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
||||||
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
||||||
|
|
||||||
VERSION = 19990823
|
VERSION = 19990830
|
||||||
DIST=gdb
|
DIST=gdb
|
||||||
|
|
||||||
LINT=/usr/5bin/lint
|
LINT=/usr/5bin/lint
|
||||||
|
@ -510,6 +513,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
|
||||||
gdbarch.o gdbtypes.o copying.o $(DEPFILES) \
|
gdbarch.o gdbtypes.o copying.o $(DEPFILES) \
|
||||||
mem-break.o target.o parse.o language.o $(YYOBJ) buildsym.o \
|
mem-break.o target.o parse.o language.o $(YYOBJ) buildsym.o \
|
||||||
kod.o kod-cisco.o \
|
kod.o kod-cisco.o \
|
||||||
|
gdb-events.o \
|
||||||
exec.o bcache.o objfiles.o minsyms.o maint.o demangle.o \
|
exec.o bcache.o objfiles.o minsyms.o maint.o demangle.o \
|
||||||
dbxread.o coffread.o elfread.o \
|
dbxread.o coffread.o elfread.o \
|
||||||
dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
|
dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
|
||||||
|
@ -521,9 +525,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
|
||||||
c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
|
c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
|
||||||
nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o
|
nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o
|
||||||
|
|
||||||
OBS = $(COMMON_OBS) $(ANNOTATE_OBS) main.o
|
OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
|
||||||
|
|
||||||
LIBGDB_OBS =
|
|
||||||
|
|
||||||
TSOBS = inflow.o
|
TSOBS = inflow.o
|
||||||
|
|
||||||
|
@ -645,28 +647,22 @@ init.c: $(OBS) $(TSOBS)
|
||||||
.PRECIOUS: init.c
|
.PRECIOUS: init.c
|
||||||
|
|
||||||
# Removing the old gdb first works better if it is running, at least on SunOS.
|
# Removing the old gdb first works better if it is running, at least on SunOS.
|
||||||
gdb$(EXEEXT): $(OBS) $(BUILD_TUI) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
|
gdb$(EXEEXT): main.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
|
||||||
rm -f gdb$(EXEEXT)
|
rm -f gdb$(EXEEXT)
|
||||||
$(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o gdb$(EXEEXT) \
|
$(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o gdb$(EXEEXT) main.o libgdb.a $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
|
||||||
init.o $(OBS) $(TSOBS) $(TUI_LIBRARY) $(ADD_FILES) $(CLIBS) $(LOADLIBES)
|
|
||||||
|
|
||||||
nlm: force
|
nlm: force
|
||||||
rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do
|
rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do
|
||||||
|
|
||||||
libgdb: libgdb-files $(LIBGDB_OBS)
|
# Create a library of the gdb object files and build GDB by linking
|
||||||
|
# against that.
|
||||||
# libproc is not listed here because all-libproc is a dependency of all-gui,
|
#
|
||||||
# not all-gdb, and thus might be built after us.
|
# init.o is very important. It pulls in the rest of GDB.
|
||||||
LIBGDBDEPS=$(COMMON_OBS) $(LIBGDB_OBS) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
|
LIBGDB_OBS= $(OBS) $(TSOBS) $(ADD_FILES) init.o
|
||||||
# libproc needs to be before libiberty for alloca.
|
libgdb.a: $(LIBGDB_OBS)
|
||||||
LIBGDBFILES=$(COMMON_OBS) $(LIBGDB_OBS) $(TSOBS) ../libproc/libproc.a \
|
-rm -f libgdb.a
|
||||||
$(ADD_DEPS) $(CDEPS) init.o
|
$(AR) q libgdb.a $(LIBGDB_OBS)
|
||||||
|
$(RANLIB) libgdb.a
|
||||||
libgdb-files: $(LIBGDBDEPS) Makefile.in
|
|
||||||
-rm -f libgdb-files
|
|
||||||
for i in $(LIBGDBFILES); do\
|
|
||||||
echo $$i >> libgdb-files;\
|
|
||||||
done
|
|
||||||
|
|
||||||
saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
|
saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
|
||||||
#setopt load_flags $(CFLAGS) $(BFD_CFLAGS) -DHOST_SYS=SUN4_SYS
|
#setopt load_flags $(CFLAGS) $(BFD_CFLAGS) -DHOST_SYS=SUN4_SYS
|
||||||
|
@ -756,7 +752,7 @@ clean mostlyclean:
|
||||||
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
|
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
|
||||||
rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp
|
rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp
|
||||||
rm -f init.c version.c
|
rm -f init.c version.c
|
||||||
rm -f gdb$(EXEEXT) core make.log libgdb-files
|
rm -f gdb$(EXEEXT) core make.log
|
||||||
rm -f gdb[0-9]$(EXEEXT)
|
rm -f gdb[0-9]$(EXEEXT)
|
||||||
|
|
||||||
# This used to depend on c-exp.tab.c m2-exp.tab.c TAGS
|
# This used to depend on c-exp.tab.c m2-exp.tab.c TAGS
|
||||||
|
@ -1009,7 +1005,8 @@ blockframe.o: blockframe.c $(defs_h) $(gdbcore_h) $(inferior_h) \
|
||||||
objfiles.h symfile.h target.h
|
objfiles.h symfile.h target.h
|
||||||
|
|
||||||
breakpoint.o: breakpoint.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
|
breakpoint.o: breakpoint.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
|
||||||
$(inferior_h) language.h target.h gdbthread.h gdb_string.h
|
$(inferior_h) language.h target.h gdbthread.h gdb_string.h \
|
||||||
|
gdb-events.h
|
||||||
|
|
||||||
buildsym.o: buildsym.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
|
buildsym.o: buildsym.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
|
||||||
objfiles.h symfile.h $(symtab_h) gdb_string.h
|
objfiles.h symfile.h $(symtab_h) gdb_string.h
|
||||||
|
@ -1122,7 +1119,7 @@ eval.o: eval.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
|
||||||
event-loop.o: event-loop.c $(defs_h) $(top_h) $(event_loop_h)
|
event-loop.o: event-loop.c $(defs_h) $(top_h) $(event_loop_h)
|
||||||
|
|
||||||
event-top.o: event-top.c top.h $(readline_headers) \
|
event-top.o: event-top.c top.h $(readline_headers) \
|
||||||
$(defs_h) $(inferior_h) $(event_loop_h) terminal.h
|
$(defs_h) $(inferior_h) $(event_loop_h) terminal.h $(gdbcmd_h)
|
||||||
|
|
||||||
exec.o: exec.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
|
exec.o: exec.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
|
||||||
target.h language.h gdb_string.h
|
target.h language.h gdb_string.h
|
||||||
|
@ -1136,9 +1133,12 @@ findvar.o: findvar.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
|
||||||
fork-child.o: fork-child.c $(wait_h) $(defs_h) $(gdbcore_h) \
|
fork-child.o: fork-child.c $(wait_h) $(defs_h) $(gdbcore_h) \
|
||||||
$(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
|
$(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
|
||||||
|
|
||||||
|
# Due to several ``enum enabled'' declaration clashes it is difficult
|
||||||
|
# to fix breakpoint.c's compiler warnings.
|
||||||
tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(tracepoint_h) \
|
tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(tracepoint_h) \
|
||||||
$(gdbtypes_h) $(expression_h) $(gdbcmd_h) $(value_h) target.h \
|
$(gdbtypes_h) $(expression_h) $(gdbcmd_h) $(value_h) target.h \
|
||||||
language.h gdb_string.h $(readline_headers)
|
language.h gdb_string.h $(readline_headers)
|
||||||
|
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
|
||||||
|
|
||||||
gdbarch.o: gdbarch.c $(defs_h) $(bfd_h) $(gdbcmd_h)
|
gdbarch.o: gdbarch.c $(defs_h) $(bfd_h) $(gdbcmd_h)
|
||||||
|
|
||||||
|
@ -1575,8 +1575,8 @@ symtab.o: symtab.c call-cmds.h $(defs_h) $(expression_h) $(frame_h) \
|
||||||
gnu-regex.h symfile.h $(symtab_h) target.h $(value_h) \
|
gnu-regex.h symfile.h $(symtab_h) target.h $(value_h) \
|
||||||
gdb_string.h
|
gdb_string.h
|
||||||
|
|
||||||
tahoe-tdep.o: tahoe-tdep.c $(OP_INCLUDE)/tahoe.h $(defs_h) \
|
# OBSOLETE tahoe-tdep.o: tahoe-tdep.c $(OP_INCLUDE)/tahoe.h $(defs_h) \
|
||||||
$(symtab_h)
|
# OBSOLETE $(symtab_h)
|
||||||
|
|
||||||
tic80-tdep.o: tic80-tdep.c $(defs_h)
|
tic80-tdep.o: tic80-tdep.c $(defs_h)
|
||||||
|
|
||||||
|
@ -1601,7 +1601,7 @@ umax-xdep.o: umax-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
|
||||||
|
|
||||||
utils.o: utils.c $(bfd_h) $(defs_h) $(expression_h) $(gdbcmd_h) \
|
utils.o: utils.c $(bfd_h) $(defs_h) $(expression_h) $(gdbcmd_h) \
|
||||||
language.h signals.h target.h terminal.h $(readline_headers) \
|
language.h signals.h target.h terminal.h $(readline_headers) \
|
||||||
gdb_string.h
|
gdb_string.h $(event_loop_h)
|
||||||
|
|
||||||
valarith.o: valarith.c $(bfd_h) $(defs_h) $(expression_h) \
|
valarith.o: valarith.c $(bfd_h) $(defs_h) $(expression_h) \
|
||||||
$(gdbtypes_h) language.h $(symtab_h) target.h $(value_h) \
|
$(gdbtypes_h) language.h $(symtab_h) target.h $(value_h) \
|
||||||
|
@ -1663,5 +1663,7 @@ 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) \
|
language.h m2-lang.h parser-defs.h $(symtab_h) $(value_h) \
|
||||||
$(bfd_h) objfiles.h symfile.h
|
$(bfd_h) objfiles.h symfile.h
|
||||||
|
|
||||||
|
gdb-events.o: gdb-events.c gdb-events.h $(defs_h) $(gdbcmd_h)
|
||||||
|
|
||||||
|
|
||||||
### end of the gdb Makefile.in.
|
### end of the gdb Makefile.in.
|
||||||
|
|
7
gdb/NEWS
7
gdb/NEWS
|
@ -3,6 +3,12 @@
|
||||||
|
|
||||||
*** Changes since GDB-4.18:
|
*** Changes since GDB-4.18:
|
||||||
|
|
||||||
|
* New features
|
||||||
|
|
||||||
|
On SVR4 native platforms (such as Solaris), if you attach to a process
|
||||||
|
without first loading a symbol file, GDB will now attempt to locate and
|
||||||
|
load symbols from the running process's executable file.
|
||||||
|
|
||||||
* New targets
|
* New targets
|
||||||
|
|
||||||
Motorola MCore mcore-*-*
|
Motorola MCore mcore-*-*
|
||||||
|
@ -15,6 +21,7 @@ TI TMS320C80 tic80-*-*
|
||||||
Altos 3068 m68*-altos-*
|
Altos 3068 m68*-altos-*
|
||||||
Convex c1-*-*, c2-*-*
|
Convex c1-*-*, c2-*-*
|
||||||
Pyramid pyramid-*-*
|
Pyramid pyramid-*-*
|
||||||
|
Tahoe tahoe-*-*
|
||||||
|
|
||||||
* Remote targets can connect to a sub-program
|
* Remote targets can connect to a sub-program
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,7 @@ extern void annotate_breakpoints_table_end PARAMS ((void));
|
||||||
|
|
||||||
extern void annotate_frames_invalid PARAMS ((void));
|
extern void annotate_frames_invalid PARAMS ((void));
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct type;
|
struct type;
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void annotate_field_begin PARAMS ((struct type *));
|
extern void annotate_field_begin PARAMS ((struct type *));
|
||||||
extern void annotate_field_name_end PARAMS ((void));
|
extern void annotate_field_name_end PARAMS ((void));
|
||||||
|
|
|
@ -833,18 +833,23 @@ arm_init_extra_frame_info (fromleaf, fi)
|
||||||
{
|
{
|
||||||
arm_scan_prologue (fi);
|
arm_scan_prologue (fi);
|
||||||
|
|
||||||
if (!fi->next) /* this is the innermost frame? */
|
if (!fi->next)
|
||||||
|
/* this is the innermost frame? */
|
||||||
fi->frame = read_register (fi->framereg);
|
fi->frame = read_register (fi->framereg);
|
||||||
else /* not the innermost frame */
|
else
|
||||||
|
/* not the innermost frame */
|
||||||
/* If we have an FP, the callee saved it. */
|
/* If we have an FP, the callee saved it. */
|
||||||
if (fi->framereg == FP_REGNUM || fi->framereg == THUMB_FP_REGNUM)
|
if (fi->framereg == FP_REGNUM || fi->framereg == THUMB_FP_REGNUM)
|
||||||
if (fi->next->fsr.regs[fi->framereg] != 0)
|
{
|
||||||
fi->frame = read_memory_integer (fi->next->fsr.regs[fi->framereg],
|
if (fi->next->fsr.regs[fi->framereg] != 0)
|
||||||
4);
|
fi->frame =
|
||||||
else if (fromleaf) /* If we were called by a frameless fn.
|
read_memory_integer (fi->next->fsr.regs[fi->framereg], 4);
|
||||||
then our frame is still in the frame pointer
|
else if (fromleaf)
|
||||||
register on the board... */
|
/* If we were called by a frameless fn. then our frame
|
||||||
fi->frame = read_fp ();
|
is still in the frame pointer register on the
|
||||||
|
board... */
|
||||||
|
fi->frame = read_fp ();
|
||||||
|
}
|
||||||
|
|
||||||
/* Calculate actual addresses of saved registers using offsets determined
|
/* Calculate actual addresses of saved registers using offsets determined
|
||||||
by arm_scan_prologue. */
|
by arm_scan_prologue. */
|
||||||
|
@ -1246,17 +1251,17 @@ arm_othernames ()
|
||||||
void
|
void
|
||||||
convert_from_extended (ptr, dbl)
|
convert_from_extended (ptr, dbl)
|
||||||
void *ptr;
|
void *ptr;
|
||||||
double *dbl;
|
void *dbl;
|
||||||
{
|
{
|
||||||
*dbl = *(double *) ptr;
|
*(double *) dbl = *(double *) ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
convert_to_extended (dbl, ptr)
|
convert_to_extended (dbl, ptr)
|
||||||
void *ptr;
|
void *ptr;
|
||||||
double *dbl;
|
void *dbl;
|
||||||
{
|
{
|
||||||
*(double *) ptr = *dbl;
|
*(double *) ptr = *(double *) dbl;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -40,6 +40,8 @@
|
||||||
#include "symfile.h"
|
#include "symfile.h"
|
||||||
#include "objfiles.h"
|
#include "objfiles.h"
|
||||||
|
|
||||||
|
#include "gdb-events.h"
|
||||||
|
|
||||||
/* Prototypes for local functions. */
|
/* Prototypes for local functions. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -3347,6 +3349,9 @@ create_solib_event_breakpoint (address)
|
||||||
b->type = bp_shlib_event;
|
b->type = bp_shlib_event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disable any breakpoints that are on code in shared libraries. Only
|
||||||
|
apply to enabled breakpoints, disabled ones can just stay disabled. */
|
||||||
|
|
||||||
void
|
void
|
||||||
disable_breakpoints_in_shlibs (silent)
|
disable_breakpoints_in_shlibs (silent)
|
||||||
int silent;
|
int silent;
|
||||||
|
@ -3360,8 +3365,7 @@ disable_breakpoints_in_shlibs (silent)
|
||||||
#if defined (PC_SOLIB)
|
#if defined (PC_SOLIB)
|
||||||
if (((b->type == bp_breakpoint) ||
|
if (((b->type == bp_breakpoint) ||
|
||||||
(b->type == bp_hardware_breakpoint)) &&
|
(b->type == bp_hardware_breakpoint)) &&
|
||||||
(b->enable != shlib_disabled) &&
|
b->enable == enabled &&
|
||||||
(b->enable != call_disabled) &&
|
|
||||||
!b->duplicate &&
|
!b->duplicate &&
|
||||||
PC_SOLIB (b->address))
|
PC_SOLIB (b->address))
|
||||||
{
|
{
|
||||||
|
@ -3736,6 +3740,7 @@ mention (b)
|
||||||
delete_breakpoint_hook and so on. */
|
delete_breakpoint_hook and so on. */
|
||||||
if (create_breakpoint_hook)
|
if (create_breakpoint_hook)
|
||||||
create_breakpoint_hook (b);
|
create_breakpoint_hook (b);
|
||||||
|
breakpoint_create_event (b->number);
|
||||||
|
|
||||||
switch (b->type)
|
switch (b->type)
|
||||||
{
|
{
|
||||||
|
@ -5850,6 +5855,7 @@ delete_breakpoint (bpt)
|
||||||
|
|
||||||
if (delete_breakpoint_hook)
|
if (delete_breakpoint_hook)
|
||||||
delete_breakpoint_hook (bpt);
|
delete_breakpoint_hook (bpt);
|
||||||
|
breakpoint_delete_event (bpt->number);
|
||||||
|
|
||||||
if (bpt->inserted)
|
if (bpt->inserted)
|
||||||
remove_breakpoint (bpt, mark_uninserted);
|
remove_breakpoint (bpt, mark_uninserted);
|
||||||
|
@ -6381,6 +6387,7 @@ disable_breakpoint (bpt)
|
||||||
|
|
||||||
if (modify_breakpoint_hook)
|
if (modify_breakpoint_hook)
|
||||||
modify_breakpoint_hook (bpt);
|
modify_breakpoint_hook (bpt);
|
||||||
|
breakpoint_modify_event (bpt->number);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
|
@ -6513,6 +6520,7 @@ have been allocated for other watchpoints.\n", bpt->number);
|
||||||
}
|
}
|
||||||
if (modify_breakpoint_hook)
|
if (modify_breakpoint_hook)
|
||||||
modify_breakpoint_hook (bpt);
|
modify_breakpoint_hook (bpt);
|
||||||
|
breakpoint_modify_event (bpt->number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
|
|
||||||
|
#include "gdb-events.h"
|
||||||
|
|
||||||
/* This is the maximum number of bytes a breakpoint instruction can take.
|
/* This is the maximum number of bytes a breakpoint instruction can take.
|
||||||
Feel free to increase it. It's just used in a few places to size
|
Feel free to increase it. It's just used in a few places to size
|
||||||
arrays that should be independent of the target architecture. */
|
arrays that should be independent of the target architecture. */
|
||||||
|
@ -461,9 +463,8 @@ enum inf_context
|
||||||
|
|
||||||
/* Prototypes for breakpoint-related functions. */
|
/* Prototypes for breakpoint-related functions. */
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward declarations for prototypes */
|
/* Forward declarations for prototypes */
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int breakpoint_here_p PARAMS ((CORE_ADDR));
|
extern int breakpoint_here_p PARAMS ((CORE_ADDR));
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,8 @@
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decls for prototypes */
|
/* Forward decls for prototypes */
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int
|
extern int
|
||||||
chill_parse PARAMS ((void)); /* Defined in ch-exp.y */
|
chill_parse PARAMS ((void)); /* Defined in ch-exp.y */
|
||||||
|
|
|
@ -18,9 +18,8 @@
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decl's for prototypes */
|
/* Forward decl's for prototypes */
|
||||||
struct target_ops;
|
struct target_ops;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Called when we free all symtabs, to free the shared library information
|
/* Called when we free all symtabs, to free the shared library information
|
||||||
as well. */
|
as well. */
|
||||||
|
|
|
@ -22,9 +22,6 @@
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_WAIT_H
|
#ifdef HAVE_WAIT_H
|
||||||
#include <wait.h>
|
#include <wait.h>
|
||||||
|
|
|
@ -264,6 +264,9 @@
|
||||||
/* Define if you have the <termios.h> header file. */
|
/* Define if you have the <termios.h> header file. */
|
||||||
#undef HAVE_TERMIOS_H
|
#undef HAVE_TERMIOS_H
|
||||||
|
|
||||||
|
/* Define if you have the <time.h> header file. */
|
||||||
|
#undef HAVE_TIME_H
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> header file. */
|
/* Define if you have the <unistd.h> header file. */
|
||||||
#undef HAVE_UNISTD_H
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
|
|
@ -507,10 +507,7 @@ extern CORE_ADDR frame_locals_address ();
|
||||||
/* Provide our own get_saved_register. HAVE_REGISTER_WINDOWS is insufficient
|
/* Provide our own get_saved_register. HAVE_REGISTER_WINDOWS is insufficient
|
||||||
because registers get renumbered on the a29k without getting saved. */
|
because registers get renumbered on the a29k without getting saved. */
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
enum lval_type;
|
|
||||||
struct frame_info;
|
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));
|
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) \
|
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
|
||||||
a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
||||||
|
|
|
@ -26,12 +26,10 @@
|
||||||
#include "coff/sym.h" /* Needed for PDR below. */
|
#include "coff/sym.h" /* Needed for PDR below. */
|
||||||
#include "coff/symconst.h"
|
#include "coff/symconst.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
struct symbol;
|
struct symbol;
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined (TARGET_BYTE_ORDER)
|
#if !defined (TARGET_BYTE_ORDER)
|
||||||
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
|
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# Target: Acorn RISC machine (ARM) with simulator
|
# Target: Acorn RISC machine (ARM) with simulator
|
||||||
TDEPFILES= arm-tdep.o remote-rdp.o remote-rdi.o rdi-share/libangsd.a
|
TDEPFILES= arm-tdep.o remote-rdp.o remote-rdi.o
|
||||||
|
TDEPLIBS= rdi-share/libangsd.a
|
||||||
TM_FILE= tm-arm.h
|
TM_FILE= tm-arm.h
|
||||||
|
|
||||||
SIM_OBS = remote-sim.o
|
SIM_OBS = remote-sim.o
|
||||||
|
|
|
@ -18,10 +18,9 @@
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decls for prototypes */
|
/* Forward decls for prototypes */
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TARGET_BYTE_ORDER_SELECTABLE
|
#define TARGET_BYTE_ORDER_SELECTABLE
|
||||||
|
|
||||||
|
@ -105,6 +104,8 @@ extern breakpoint_from_pc_fn arm_breakpoint_from_pc;
|
||||||
* floating point processor (if any)
|
* floating point processor (if any)
|
||||||
* No need to define if there is nothing to do.
|
* No need to define if there is nothing to do.
|
||||||
*/
|
*/
|
||||||
|
extern void arm_float_info (void);
|
||||||
|
|
||||||
#define FLOAT_INFO { arm_float_info (); }
|
#define FLOAT_INFO { arm_float_info (); }
|
||||||
|
|
||||||
/* Say how long (ordinary) registers are. This is a piece of bogosity
|
/* Say how long (ordinary) registers are. This is a piece of bogosity
|
||||||
|
@ -213,6 +214,8 @@ extern char **arm_register_names;
|
||||||
/* Convert data from raw format for register REGNUM in buffer FROM
|
/* Convert data from raw format for register REGNUM in buffer FROM
|
||||||
to virtual format with type TYPE in buffer TO. */
|
to virtual format with type TYPE in buffer TO. */
|
||||||
|
|
||||||
|
void convert_from_extended (void *ptr, /*double*/void *dbl);
|
||||||
|
|
||||||
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
|
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
|
||||||
{ \
|
{ \
|
||||||
double val; \
|
double val; \
|
||||||
|
@ -223,6 +226,8 @@ extern char **arm_register_names;
|
||||||
/* Convert data from virtual format with type TYPE in buffer FROM
|
/* Convert data from virtual format with type TYPE in buffer FROM
|
||||||
to raw format for register REGNUM in buffer TO. */
|
to raw format for register REGNUM in buffer TO. */
|
||||||
|
|
||||||
|
extern void convert_to_extended (void *ptr, /*double*/void *dbl);
|
||||||
|
|
||||||
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
|
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
|
||||||
{ \
|
{ \
|
||||||
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
|
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
|
||||||
|
@ -332,6 +337,7 @@ extern int arm_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
|
||||||
stmdb sp!, {}
|
stmdb sp!, {}
|
||||||
sub sp, ip, #4. */
|
sub sp, ip, #4. */
|
||||||
|
|
||||||
|
extern int arm_frameless_function_invocation (struct frame_info *fi);
|
||||||
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
||||||
(arm_frameless_function_invocation (FI))
|
(arm_frameless_function_invocation (FI))
|
||||||
|
|
||||||
|
@ -361,8 +367,8 @@ extern CORE_ADDR arm_frame_saved_pc PARAMS ((struct frame_info *));
|
||||||
|
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
void frame_find_saved_regs PARAMS ((struct frame_info * fi,
|
void arm_frame_find_saved_regs (struct frame_info * fi,
|
||||||
struct frame_saved_regs * fsr));
|
struct frame_saved_regs * fsr);
|
||||||
|
|
||||||
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
|
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
|
||||||
arm_frame_find_saved_regs (frame_info, &(frame_saved_regs));
|
arm_frame_find_saved_regs (frame_info, &(frame_saved_regs));
|
||||||
|
|
|
@ -37,12 +37,11 @@
|
||||||
#define IMEM_START 0x00000000 /* was 0x10000000 */
|
#define IMEM_START 0x00000000 /* was 0x10000000 */
|
||||||
#define STACK_START 0x20007ffe
|
#define STACK_START 0x20007ffe
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decls for prototypes */
|
/* Forward decls for prototypes */
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Advance PC across any function entry prologue instructions
|
/* Advance PC across any function entry prologue instructions
|
||||||
to reach some "real" code. */
|
to reach some "real" code. */
|
||||||
|
|
|
@ -138,12 +138,11 @@ extern void fr30_pop_frame PARAMS ((void));
|
||||||
Can return -1, meaning no way to tell. */
|
Can return -1, meaning no way to tell. */
|
||||||
#define FRAME_NUM_ARGS(fi) (-1)
|
#define FRAME_NUM_ARGS(fi) (-1)
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decls for prototypes */
|
/* Forward decls for prototypes */
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EXTRA_FRAME_INFO \
|
#define EXTRA_FRAME_INFO \
|
||||||
struct frame_saved_regs fsr; \
|
struct frame_saved_regs fsr; \
|
||||||
|
|
|
@ -20,12 +20,10 @@
|
||||||
|
|
||||||
/* Contributed by Steve Chamberlain sac@cygnus.com */
|
/* Contributed by Steve Chamberlain sac@cygnus.com */
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
struct value;
|
struct value;
|
||||||
struct type;
|
struct type;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* 1 if debugging H8/300H application */
|
/* 1 if debugging H8/300H application */
|
||||||
extern int h8300hmode;
|
extern int h8300hmode;
|
||||||
|
|
|
@ -22,9 +22,7 @@
|
||||||
|
|
||||||
#ifdef HAVE_THREAD_DB_LIB
|
#ifdef HAVE_THREAD_DB_LIB
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct objfile;
|
struct objfile;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define target_new_objfile(OBJFILE) sol_thread_new_objfile (OBJFILE)
|
#define target_new_objfile(OBJFILE) sol_thread_new_objfile (OBJFILE)
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,10 @@
|
||||||
#ifndef TM_I386_H
|
#ifndef TM_I386_H
|
||||||
#define TM_I386_H 1
|
#define TM_I386_H 1
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decl's for prototypes */
|
/* Forward decl's for prototypes */
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
struct type;
|
struct type;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
|
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
|
||||||
|
|
||||||
|
|
|
@ -153,10 +153,9 @@
|
||||||
#undef FRAME_NUM_ARGS
|
#undef FRAME_NUM_ARGS
|
||||||
#define FRAME_NUM_ARGS(fi) (-1)
|
#define FRAME_NUM_ARGS(fi) (-1)
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decl's for prototypes */
|
/* Forward decl's for prototypes */
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int
|
extern int
|
||||||
i386_frame_num_args PARAMS ((struct frame_info *));
|
i386_frame_num_args PARAMS ((struct frame_info *));
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#ifndef sun386
|
#ifndef sun386
|
||||||
#define sun386
|
#define sun386
|
||||||
#endif
|
#endif
|
||||||
#define GDB_TARGET_IS_SUN386 1
|
|
||||||
#define SUNOS4
|
#define SUNOS4
|
||||||
#define USE_MACHINE_REG_H
|
#define USE_MACHINE_REG_H
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,7 @@
|
||||||
#include "i960/tm-i960.h"
|
#include "i960/tm-i960.h"
|
||||||
|
|
||||||
/* forward declarations */
|
/* forward declarations */
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* redefined from tm-i960.h */
|
/* redefined from tm-i960.h */
|
||||||
/* Number of machine registers */
|
/* Number of machine registers */
|
||||||
|
|
|
@ -26,9 +26,7 @@
|
||||||
#include "i960/tm-i960.h"
|
#include "i960/tm-i960.h"
|
||||||
|
|
||||||
/* forward declarations */
|
/* forward declarations */
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Override the standard gdb prompt when compiled for this target. */
|
/* Override the standard gdb prompt when compiled for this target. */
|
||||||
|
|
||||||
|
|
|
@ -89,12 +89,10 @@
|
||||||
/* mvs_check SAVED_PC_AFTER_CALL */
|
/* mvs_check SAVED_PC_AFTER_CALL */
|
||||||
#define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
|
#define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define other aspects of the stack frame.
|
/* Define other aspects of the stack frame.
|
||||||
We keep the offsets of all saved registers, 'cause we need 'em a lot!
|
We keep the offsets of all saved registers, 'cause we need 'em a lot!
|
||||||
|
|
|
@ -43,10 +43,8 @@ extern CORE_ADDR m68k_skip_prologue PARAMS ((CORE_ADDR ip));
|
||||||
the new frame is not set up until the new function executes
|
the new frame is not set up until the new function executes
|
||||||
some instructions. */
|
some instructions. */
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
#endif
|
|
||||||
|
|
||||||
extern CORE_ADDR m68k_saved_pc_after_call PARAMS ((struct frame_info *));
|
extern CORE_ADDR m68k_saved_pc_after_call PARAMS ((struct frame_info *));
|
||||||
extern void m68k_find_saved_regs PARAMS ((struct frame_info *, struct frame_saved_regs *));
|
extern void m68k_find_saved_regs PARAMS ((struct frame_info *, struct frame_saved_regs *));
|
||||||
|
|
|
@ -24,12 +24,10 @@
|
||||||
#ifndef TM_MIPS_H
|
#ifndef TM_MIPS_H
|
||||||
#define TM_MIPS_H 1
|
#define TM_MIPS_H 1
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct symbol;
|
struct symbol;
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <bfd.h>
|
#include <bfd.h>
|
||||||
#include "coff/sym.h" /* Needed for PDR below. */
|
#include "coff/sym.h" /* Needed for PDR below. */
|
||||||
|
|
|
@ -92,12 +92,10 @@
|
||||||
#define SAVED_PC_AFTER_CALL(frame) \
|
#define SAVED_PC_AFTER_CALL(frame) \
|
||||||
(read_memory_integer (read_register (SP_REGNUM), REGISTER_SIZE) & 0xffffff)
|
(read_memory_integer (read_register (SP_REGNUM), REGISTER_SIZE) & 0xffffff)
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EXTRA_FRAME_INFO struct frame_saved_regs fsr; int status; int stack_size;
|
#define EXTRA_FRAME_INFO struct frame_saved_regs fsr; int status; int stack_size;
|
||||||
|
|
||||||
|
|
|
@ -70,11 +70,9 @@ extern CORE_ADDR mn10300_saved_pc_after_call PARAMS ((struct frame_info * frame)
|
||||||
#define SAVED_PC_AFTER_CALL(frame) \
|
#define SAVED_PC_AFTER_CALL(frame) \
|
||||||
mn10300_saved_pc_after_call (frame)
|
mn10300_saved_pc_after_call (frame)
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void mn10300_init_extra_frame_info PARAMS ((struct frame_info *));
|
extern void mn10300_init_extra_frame_info PARAMS ((struct frame_info *));
|
||||||
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) mn10300_init_extra_frame_info (fi)
|
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) mn10300_init_extra_frame_info (fi)
|
||||||
|
|
|
@ -279,9 +279,7 @@ extern int hppa_resume_execd_vforking_child_to_get_parent_vfork PARAMS ((void));
|
||||||
|
|
||||||
#ifdef HAVE_HPUX_THREAD_SUPPORT
|
#ifdef HAVE_HPUX_THREAD_SUPPORT
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct objfile;
|
struct objfile;
|
||||||
#endif
|
|
||||||
|
|
||||||
void hpux_thread_new_objfile PARAMS ((struct objfile * objfile));
|
void hpux_thread_new_objfile PARAMS ((struct objfile * objfile));
|
||||||
#define target_new_objfile(OBJFILE) hpux_thread_new_objfile (OBJFILE)
|
#define target_new_objfile(OBJFILE) hpux_thread_new_objfile (OBJFILE)
|
||||||
|
|
|
@ -24,13 +24,11 @@
|
||||||
|
|
||||||
/* Forward declarations of some types we use in prototypes */
|
/* Forward declarations of some types we use in prototypes */
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
struct value;
|
struct value;
|
||||||
struct type;
|
struct type;
|
||||||
struct inferior_status;
|
struct inferior_status;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Target system byte order. */
|
/* Target system byte order. */
|
||||||
|
|
||||||
|
|
|
@ -191,6 +191,9 @@ call_dummy
|
||||||
0xe820f0000fb110d3LL, 0x0001000400151820LL,\
|
0xe820f0000fb110d3LL, 0x0001000400151820LL,\
|
||||||
0xe6c0000008000240LL}
|
0xe6c0000008000240LL}
|
||||||
|
|
||||||
|
#define CALL_DUMMY_BREAKPOINT_OFFSET_P 1
|
||||||
|
#define CALL_DUMMY_BREAKPOINT_OFFSET 22 * 4
|
||||||
|
|
||||||
/* CALL_DUMMY_LENGTH is computed based on the size of a word on the target
|
/* CALL_DUMMY_LENGTH is computed based on the size of a word on the target
|
||||||
machine, not the size of an instruction. Since a word on this target
|
machine, not the size of an instruction. Since a word on this target
|
||||||
holds two instructions we have to divide the instruction size by two to
|
holds two instructions we have to divide the instruction size by two to
|
||||||
|
|
|
@ -50,9 +50,7 @@
|
||||||
xcoff_relocate_core (c);
|
xcoff_relocate_core (c);
|
||||||
|
|
||||||
extern void xcoff_relocate_symtab PARAMS ((unsigned int));
|
extern void xcoff_relocate_symtab PARAMS ((unsigned int));
|
||||||
#ifdef __STDC__
|
|
||||||
struct target_ops;
|
struct target_ops;
|
||||||
#endif
|
|
||||||
extern void xcoff_relocate_core PARAMS ((struct target_ops *));
|
extern void xcoff_relocate_core PARAMS ((struct target_ops *));
|
||||||
|
|
||||||
/* Return sizeof user struct to callers in less machine dependent routines */
|
/* Return sizeof user struct to callers in less machine dependent routines */
|
||||||
|
|
|
@ -20,11 +20,10 @@
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decls for prototypes */
|
/* Forward decls for prototypes */
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Minimum possible text address in AIX */
|
/* Minimum possible text address in AIX */
|
||||||
|
|
||||||
|
@ -520,10 +519,9 @@ CORE_ADDR (*find_toc_address_hook) PARAMS ((CORE_ADDR));
|
||||||
for a given object file.
|
for a given object file.
|
||||||
It is used under native AIX configurations for determining the
|
It is used under native AIX configurations for determining the
|
||||||
TOC address when calling functions in the inferior. */
|
TOC address when calling functions in the inferior. */
|
||||||
#ifdef __STDC__
|
|
||||||
struct objfile;
|
struct objfile;
|
||||||
#endif
|
extern CORE_ADDR get_toc_offset PARAMS ((struct objfile *));
|
||||||
extern CORE_ADDR get_toc_offset PARAMS ((struct objfile *));
|
|
||||||
|
|
||||||
/* Usually a function pointer's representation is simply the address
|
/* Usually a function pointer's representation is simply the address
|
||||||
of the function. On the RS/6000 however, a function pointer is
|
of the function. On the RS/6000 however, a function pointer is
|
||||||
|
|
|
@ -20,12 +20,10 @@
|
||||||
|
|
||||||
/* Contributed by Steve Chamberlain sac@cygnus.com */
|
/* Contributed by Steve Chamberlain sac@cygnus.com */
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
struct value;
|
struct value;
|
||||||
struct type;
|
struct type;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GDB_TARGET_IS_SH
|
#define GDB_TARGET_IS_SH
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,7 @@
|
||||||
|
|
||||||
#ifdef HAVE_THREAD_DB_LIB
|
#ifdef HAVE_THREAD_DB_LIB
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct objfile;
|
struct objfile;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define target_new_objfile(OBJFILE) sol_thread_new_objfile (OBJFILE)
|
#define target_new_objfile(OBJFILE) sol_thread_new_objfile (OBJFILE)
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,7 @@
|
||||||
|
|
||||||
#define GDB_TARGET_IS_SPARC64
|
#define GDB_TARGET_IS_SPARC64
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Eeeew. Ok, we have to assume (for now) that the processor really is
|
/* Eeeew. Ok, we have to assume (for now) that the processor really is
|
||||||
in sparc64 mode. While this is the same instruction sequence as
|
in sparc64 mode. While this is the same instruction sequence as
|
||||||
|
|
|
@ -21,11 +21,9 @@
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TARGET_BYTE_ORDER BIG_ENDIAN
|
#define TARGET_BYTE_ORDER BIG_ENDIAN
|
||||||
|
|
||||||
|
@ -205,10 +203,7 @@ extern CORE_ADDR sparc_pc_adjust PARAMS ((CORE_ADDR));
|
||||||
outs change into ins in different frames. HAVE_REGISTER_WINDOWS can't
|
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. */
|
deal with this case and also handle flat frames at the same time. */
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
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));
|
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) \
|
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
|
||||||
sparc_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
sparc_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Host: CCI or Harris Tahoe running BSD Unix
|
# OBSOLETE # Host: CCI or Harris Tahoe running BSD Unix
|
||||||
|
# OBSOLETE
|
||||||
XM_FILE= xm-tahoe.h
|
# OBSOLETE XM_FILE= xm-tahoe.h
|
||||||
XDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
|
# OBSOLETE XDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Target: CCI or Harris Tahoe running BSD Unix
|
# OBSOLETE # Target: CCI or Harris Tahoe running BSD Unix
|
||||||
TDEPFILES= tahoe-tdep.o
|
# OBSOLETE TDEPFILES= tahoe-tdep.o
|
||||||
TM_FILE= tm-tahoe.h
|
# OBSOLETE TM_FILE= tm-tahoe.h
|
||||||
|
|
|
@ -1,271 +1,271 @@
|
||||||
/* Definitions to make GDB target for a tahoe running 4.3-Reno.
|
/* OBSOLETE /* Definitions to make GDB target for a tahoe running 4.3-Reno. */
|
||||||
Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
|
/* OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. */
|
||||||
|
/* OBSOLETE */
|
||||||
This file is part of GDB.
|
/* OBSOLETE This file is part of GDB. */
|
||||||
|
/* OBSOLETE */
|
||||||
This program is free software; you can redistribute it and/or modify
|
/* OBSOLETE 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
|
/* OBSOLETE it under the terms of the GNU General Public License as published by */
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
|
||||||
(at your option) any later version.
|
/* OBSOLETE (at your option) any later version. */
|
||||||
|
/* OBSOLETE */
|
||||||
This program is distributed in the hope that it will be useful,
|
/* OBSOLETE This program is distributed in the hope that it will be useful, */
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
GNU General Public License for more details.
|
/* OBSOLETE GNU General Public License for more details. */
|
||||||
|
/* OBSOLETE */
|
||||||
You should have received a copy of the GNU General Public License
|
/* OBSOLETE You should have received a copy of the GNU General Public License */
|
||||||
along with this program; if not, write to the Free Software
|
/* OBSOLETE along with this program; if not, write to the Free Software */
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
|
||||||
Boston, MA 02111-1307, USA. */
|
/* OBSOLETE Boston, MA 02111-1307, USA. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
/*
|
/* OBSOLETE /* */
|
||||||
* Ported by the State University of New York at Buffalo by the Distributed
|
/* OBSOLETE * Ported by the State University of New York at Buffalo by the Distributed */
|
||||||
* Computer Systems Lab, Department of Computer Science, 1991.
|
/* OBSOLETE * Computer Systems Lab, Department of Computer Science, 1991. */
|
||||||
*/
|
/* OBSOLETE *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define TARGET_BYTE_ORDER BIG_ENDIAN
|
/* OBSOLETE #define TARGET_BYTE_ORDER BIG_ENDIAN */
|
||||||
#define BITS_BIG_ENDIAN 0
|
/* OBSOLETE #define BITS_BIG_ENDIAN 0 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Offset from address of function to start of its code.
|
/* OBSOLETE /* Offset from address of function to start of its code. */
|
||||||
Zero on most machines. */
|
/* OBSOLETE Zero on most machines. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define FUNCTION_START_OFFSET 2
|
/* OBSOLETE #define FUNCTION_START_OFFSET 2 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Advance PC across any function entry prologue instructions
|
/* OBSOLETE /* Advance PC across any function entry prologue instructions */
|
||||||
to reach some "real" code. */
|
/* OBSOLETE to reach some "real" code. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
extern CORE_ADDR tahoe_skip_prologue PARAMS ((CORE_ADDR));
|
/* OBSOLETE extern CORE_ADDR tahoe_skip_prologue PARAMS ((CORE_ADDR)); */
|
||||||
#define SKIP_PROLOGUE(pc) (tahoe_skip_prologue (pc))
|
/* OBSOLETE #define SKIP_PROLOGUE(pc) (tahoe_skip_prologue (pc)) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Immediately after a function call, return the saved pc.
|
/* OBSOLETE /* Immediately after a function call, return the saved pc. */
|
||||||
Can't always go through the frames for this because on some machines
|
/* OBSOLETE 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
|
/* OBSOLETE the new frame is not set up until the new function executes */
|
||||||
some instructions. */
|
/* OBSOLETE some instructions. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define SAVED_PC_AFTER_CALL(frame) FRAME_SAVED_PC(frame)
|
/* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) FRAME_SAVED_PC(frame) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Wrong for cross-debugging. I don't know the real values. */
|
/* OBSOLETE /* Wrong for cross-debugging. I don't know the real values. *x/ */
|
||||||
#include <machine/param.h>
|
/* OBSOLETE #include <machine/param.h> */
|
||||||
#define TARGET_UPAGES UPAGES
|
/* OBSOLETE #define TARGET_UPAGES UPAGES */
|
||||||
#define TARGET_NBPG NBPG
|
/* OBSOLETE #define TARGET_NBPG NBPG */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Address of end of stack space. */
|
/* OBSOLETE /* Address of end of stack space. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define STACK_END_ADDR (0xc0000000 - (TARGET_UPAGES * TARGET_NBPG))
|
/* OBSOLETE #define STACK_END_ADDR (0xc0000000 - (TARGET_UPAGES * TARGET_NBPG)) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* On BSD, sigtramp is in the u area. Can't check the exact
|
/* OBSOLETE /* On BSD, sigtramp is in the u area. Can't check the exact */
|
||||||
addresses because for cross-debugging we don't have target include
|
/* OBSOLETE addresses because for cross-debugging we don't have target include */
|
||||||
files around. This should be close enough. */
|
/* OBSOLETE files around. This should be close enough. *x/ */
|
||||||
#define IN_SIGTRAMP(pc, name) ((pc) >= STACK_END_ADDR && (pc < 0xc0000000))
|
/* OBSOLETE #define IN_SIGTRAMP(pc, name) ((pc) >= STACK_END_ADDR && (pc < 0xc0000000)) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Stack grows downward. */
|
/* OBSOLETE /* Stack grows downward. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
|
/* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Sequence of bytes for breakpoint instruction. */
|
/* OBSOLETE /* Sequence of bytes for breakpoint instruction. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define BREAKPOINT {0x30}
|
/* OBSOLETE #define BREAKPOINT {0x30} */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Amount PC must be decremented by after a breakpoint.
|
/* OBSOLETE /* Amount PC must be decremented by after a breakpoint. */
|
||||||
This is often the number of bytes in BREAKPOINT
|
/* OBSOLETE This is often the number of bytes in BREAKPOINT */
|
||||||
but not always. */
|
/* OBSOLETE but not always. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define DECR_PC_AFTER_BREAK 0
|
/* OBSOLETE #define DECR_PC_AFTER_BREAK 0 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Return 1 if P points to an invalid floating point value.
|
/* OBSOLETE /* Return 1 if P points to an invalid floating point value. */
|
||||||
LEN is the length in bytes -- not relevant on the Tahoe. */
|
/* OBSOLETE LEN is the length in bytes -- not relevant on the Tahoe. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define INVALID_FLOAT(p, len) ((*(short *) p & 0xff80) == 0x8000)
|
/* OBSOLETE #define INVALID_FLOAT(p, len) ((*(short *) p & 0xff80) == 0x8000) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Say how long (ordinary) registers are. This is a piece of bogosity
|
/* OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity */
|
||||||
used in push_word and a few other places; REGISTER_RAW_SIZE is the
|
/* OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the */
|
||||||
real way to know how big a register is. */
|
/* OBSOLETE real way to know how big a register is. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define REGISTER_SIZE 4
|
/* OBSOLETE #define REGISTER_SIZE 4 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Number of machine registers */
|
/* OBSOLETE /* Number of machine registers *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define NUM_REGS 19
|
/* OBSOLETE #define NUM_REGS 19 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Initializer for an array of names of registers.
|
/* OBSOLETE /* Initializer for an array of names of registers. */
|
||||||
There should be NUM_REGS strings in this initializer. */
|
/* OBSOLETE There should be NUM_REGS strings in this initializer. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define REGISTER_NAMES {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "fp", "sp", "pc", "ps", "al", "ah"}
|
/* OBSOLETE #define REGISTER_NAMES {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "fp", "sp", "pc", "ps", "al", "ah"} */
|
||||||
|
/* OBSOLETE */
|
||||||
#define FP_REGNUM 13 /* Contains address of executing stack frame */
|
/* OBSOLETE #define FP_REGNUM 13 /* Contains address of executing stack frame *x/ */
|
||||||
#define SP_REGNUM 14 /* Contains address of top of stack */
|
/* OBSOLETE #define SP_REGNUM 14 /* Contains address of top of stack *x/ */
|
||||||
#define PC_REGNUM 15 /* Contains program counter */
|
/* OBSOLETE #define PC_REGNUM 15 /* Contains program counter *x/ */
|
||||||
#define PS_REGNUM 16 /* Contains processor status */
|
/* OBSOLETE #define PS_REGNUM 16 /* Contains processor status *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define AL_REGNUM 17 /* Contains accumulator */
|
/* OBSOLETE #define AL_REGNUM 17 /* Contains accumulator *x/ */
|
||||||
#define AH_REGNUM 18
|
/* OBSOLETE #define AH_REGNUM 18 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Total amount of space needed to store our copies of the machine's
|
/* OBSOLETE /* Total amount of space needed to store our copies of the machine's */
|
||||||
register state, the array `registers'. */
|
/* OBSOLETE register state, the array `registers'. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define REGISTER_BYTES (19*4)
|
/* OBSOLETE #define REGISTER_BYTES (19*4) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Index within `registers' of the first byte of the space for
|
/* OBSOLETE /* Index within `registers' of the first byte of the space for */
|
||||||
register N. */
|
/* OBSOLETE register N. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define REGISTER_BYTE(N) ((N) * 4)
|
/* OBSOLETE #define REGISTER_BYTE(N) ((N) * 4) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Number of bytes of storage in the actual machine representation
|
/* OBSOLETE /* Number of bytes of storage in the actual machine representation */
|
||||||
for register N. On the tahoe, all regs are 4 bytes. */
|
/* OBSOLETE for register N. On the tahoe, all regs are 4 bytes. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define REGISTER_RAW_SIZE(N) 4
|
/* OBSOLETE #define REGISTER_RAW_SIZE(N) 4 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Number of bytes of storage in the program's representation
|
/* OBSOLETE /* Number of bytes of storage in the program's representation */
|
||||||
for register N. On the tahoe, all regs are 4 bytes. */
|
/* OBSOLETE for register N. On the tahoe, all regs are 4 bytes. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define REGISTER_VIRTUAL_SIZE(N) 4
|
/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) 4 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Largest value REGISTER_RAW_SIZE can have. */
|
/* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define MAX_REGISTER_RAW_SIZE 4
|
/* OBSOLETE #define MAX_REGISTER_RAW_SIZE 4 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
|
/* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define MAX_REGISTER_VIRTUAL_SIZE 4
|
/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Return the GDB type object for the "standard" data type
|
/* OBSOLETE /* Return the GDB type object for the "standard" data type */
|
||||||
of data in register N. */
|
/* OBSOLETE of data in register N. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define REGISTER_VIRTUAL_TYPE(N) builtin_type_int
|
/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) builtin_type_int */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Store the address of the place in which to copy the structure the
|
/* OBSOLETE /* Store the address of the place in which to copy the structure the */
|
||||||
subroutine will return. This is called from call_function. */
|
/* OBSOLETE subroutine will return. This is called from call_function. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define STORE_STRUCT_RETURN(ADDR, SP) \
|
/* OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \ */
|
||||||
{ write_register (1, (ADDR)); }
|
/* OBSOLETE { write_register (1, (ADDR)); } */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Extract from an array REGBUF containing the (raw) register state
|
/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
|
||||||
a function return value of type TYPE, and copy that, in virtual format,
|
/* OBSOLETE a function return value of type TYPE, and copy that, in virtual format, */
|
||||||
into VALBUF. */
|
/* OBSOLETE into VALBUF. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
|
/* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */
|
||||||
memcpy (VALBUF, REGBUF, TYPE_LENGTH (TYPE))
|
/* OBSOLETE memcpy (VALBUF, REGBUF, TYPE_LENGTH (TYPE)) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Write into appropriate registers a function return value
|
/* OBSOLETE /* Write into appropriate registers a function return value */
|
||||||
of type TYPE, given in virtual format. */
|
/* OBSOLETE of type TYPE, given in virtual format. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
|
/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */
|
||||||
write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
|
/* OBSOLETE write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE)) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Extract from an array REGBUF containing the (raw) register state
|
/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
|
||||||
the address in which a function should return its structure value,
|
/* OBSOLETE the address in which a function should return its structure value, */
|
||||||
as a CORE_ADDR (or an expression that can be used as one). */
|
/* OBSOLETE as a CORE_ADDR (or an expression that can be used as one). *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
|
/* OBSOLETE #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF)) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Describe the pointer in each stack frame to the previous stack frame
|
/* OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame */
|
||||||
(its caller).
|
/* OBSOLETE (its caller). */
|
||||||
|
/* OBSOLETE */
|
||||||
FRAME_CHAIN takes a frame's nominal address
|
/* OBSOLETE FRAME_CHAIN takes a frame's nominal address */
|
||||||
and produces the frame's chain-pointer. */
|
/* OBSOLETE and produces the frame's chain-pointer. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
/* In the case of the Tahoe, the frame's nominal address is the FP value,
|
/* OBSOLETE /* In the case of the Tahoe, the frame's nominal address is the FP value, */
|
||||||
and it points to the old FP */
|
/* OBSOLETE and it points to the old FP *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define FRAME_CHAIN(thisframe) \
|
/* OBSOLETE #define FRAME_CHAIN(thisframe) \ */
|
||||||
(!inside_entry_file ((thisframe)->pc) ? \
|
/* OBSOLETE (!inside_entry_file ((thisframe)->pc) ? \ */
|
||||||
read_memory_integer ((thisframe)->frame, 4) :\
|
/* OBSOLETE read_memory_integer ((thisframe)->frame, 4) :\ */
|
||||||
0)
|
/* OBSOLETE 0) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Define other aspects of the stack frame. */
|
/* OBSOLETE /* Define other aspects of the stack frame. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Saved PC */
|
/* OBSOLETE /* Saved PC *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame - 8, 4))
|
/* OBSOLETE #define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame - 8, 4)) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* In most of GDB, getting the args address is too important to
|
/* OBSOLETE /* In most of GDB, getting the args address is too important to */
|
||||||
just say "I don't know". */
|
/* OBSOLETE just say "I don't know". *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
|
/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Address to use as an anchor for finding local variables */
|
/* OBSOLETE /* Address to use as an anchor for finding local variables *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
|
/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Return number of args passed to a frame.
|
/* OBSOLETE /* Return number of args passed to a frame. */
|
||||||
Can return -1, meaning no way to tell. */
|
/* OBSOLETE Can return -1, meaning no way to tell. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
extern int tahoe_frame_num_args PARAMS ((struct frame_info * fi));
|
/* OBSOLETE extern int tahoe_frame_num_args PARAMS ((struct frame_info * fi)); */
|
||||||
#define FRAME_NUM_ARGS(fi) (tahoe_frame_num_args ((fi)))
|
/* OBSOLETE #define FRAME_NUM_ARGS(fi) (tahoe_frame_num_args ((fi))) */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Return number of bytes at start of arglist that are not really args. */
|
/* OBSOLETE /* Return number of bytes at start of arglist that are not really args. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define FRAME_ARGS_SKIP 0
|
/* OBSOLETE #define FRAME_ARGS_SKIP 0 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Put here the code to store, into a struct frame_saved_regs,
|
/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, */
|
||||||
the addresses of the saved registers of frame described by FRAME_INFO.
|
/* OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO. */
|
||||||
This includes special registers such as pc and fp saved in special
|
/* OBSOLETE This includes special registers such as pc and fp saved in special */
|
||||||
ways in the stack frame. sp is even more special:
|
/* OBSOLETE ways in the stack frame. sp is even more special: */
|
||||||
the address we return for it IS the sp for the next frame. */
|
/* OBSOLETE the address we return for it IS the sp for the next frame. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
|
/* OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ */
|
||||||
{ register int regnum; \
|
/* OBSOLETE { register int regnum; \ */
|
||||||
register int rmask = read_memory_integer ((frame_info)->frame-4, 4) >> 16;\
|
/* OBSOLETE register int rmask = read_memory_integer ((frame_info)->frame-4, 4) >> 16;\ */
|
||||||
register CORE_ADDR next_addr; \
|
/* OBSOLETE register CORE_ADDR next_addr; \ */
|
||||||
memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \
|
/* OBSOLETE memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \ */
|
||||||
next_addr = (frame_info)->frame - 8; \
|
/* OBSOLETE next_addr = (frame_info)->frame - 8; \ */
|
||||||
for (regnum = 12; regnum >= 0; regnum--, rmask <<= 1) \
|
/* OBSOLETE for (regnum = 12; regnum >= 0; regnum--, rmask <<= 1) \ */
|
||||||
(frame_saved_regs).regs[regnum] = (rmask & 0x1000) ? (next_addr -= 4) : 0;\
|
/* OBSOLETE (frame_saved_regs).regs[regnum] = (rmask & 0x1000) ? (next_addr -= 4) : 0;\ */
|
||||||
(frame_saved_regs).regs[SP_REGNUM] = (frame_info)->frame + 4; \
|
/* OBSOLETE (frame_saved_regs).regs[SP_REGNUM] = (frame_info)->frame + 4; \ */
|
||||||
(frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame - 8; \
|
/* OBSOLETE (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame - 8; \ */
|
||||||
(frame_saved_regs).regs[FP_REGNUM] = (frame_info)->frame; \
|
/* OBSOLETE (frame_saved_regs).regs[FP_REGNUM] = (frame_info)->frame; \ */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Things needed for making the inferior call functions. */
|
/* OBSOLETE /* Things needed for making the inferior call functions. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Push an empty stack frame, to record the current PC, etc. */
|
/* OBSOLETE /* Push an empty stack frame, to record the current PC, etc. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define PUSH_DUMMY_FRAME \
|
/* OBSOLETE #define PUSH_DUMMY_FRAME \ */
|
||||||
{ register CORE_ADDR sp = read_register (SP_REGNUM); \
|
/* OBSOLETE { register CORE_ADDR sp = read_register (SP_REGNUM); \ */
|
||||||
register int regnum; \
|
/* OBSOLETE register int regnum; \ */
|
||||||
printf("PUSH_DUMMY_FRAME\n"); \
|
/* OBSOLETE printf("PUSH_DUMMY_FRAME\n"); \ */
|
||||||
sp = push_word (sp, read_register (FP_REGNUM)); \
|
/* OBSOLETE sp = push_word (sp, read_register (FP_REGNUM)); \ */
|
||||||
write_register (FP_REGNUM, sp); \
|
/* OBSOLETE write_register (FP_REGNUM, sp); \ */
|
||||||
sp = push_word (sp, 0x1fff0004); /*SAVE MASK*/ \
|
/* OBSOLETE sp = push_word (sp, 0x1fff0004); /*SAVE MASK*x/ \ */
|
||||||
sp = push_word (sp, read_register (PC_REGNUM)); \
|
/* OBSOLETE sp = push_word (sp, read_register (PC_REGNUM)); \ */
|
||||||
for (regnum = 12; regnum >= 0; regnum--) \
|
/* OBSOLETE for (regnum = 12; regnum >= 0; regnum--) \ */
|
||||||
sp = push_word (sp, read_register (regnum)); \
|
/* OBSOLETE sp = push_word (sp, read_register (regnum)); \ */
|
||||||
write_register (SP_REGNUM, sp); \
|
/* OBSOLETE write_register (SP_REGNUM, sp); \ */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Discard from the stack the innermost frame, restoring all registers. */
|
/* OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define POP_FRAME \
|
/* OBSOLETE #define POP_FRAME \ */
|
||||||
{ register CORE_ADDR fp = read_register (FP_REGNUM); \
|
/* OBSOLETE { register CORE_ADDR fp = read_register (FP_REGNUM); \ */
|
||||||
register int regnum; \
|
/* OBSOLETE register int regnum; \ */
|
||||||
register int regmask = read_memory_integer (fp-4, 4); \
|
/* OBSOLETE register int regmask = read_memory_integer (fp-4, 4); \ */
|
||||||
printf("POP_FRAME\n"); \
|
/* OBSOLETE printf("POP_FRAME\n"); \ */
|
||||||
regmask >>= 16; \
|
/* OBSOLETE regmask >>= 16; \ */
|
||||||
write_register (SP_REGNUM, fp+4); \
|
/* OBSOLETE write_register (SP_REGNUM, fp+4); \ */
|
||||||
write_register (PC_REGNUM, read_memory_integer(fp-8, 4)); \
|
/* OBSOLETE write_register (PC_REGNUM, read_memory_integer(fp-8, 4)); \ */
|
||||||
write_register (FP_REGNUM, read_memory_integer(fp, 4)); \
|
/* OBSOLETE write_register (FP_REGNUM, read_memory_integer(fp, 4)); \ */
|
||||||
fp -= 8; \
|
/* OBSOLETE fp -= 8; \ */
|
||||||
for (regnum = 12; regnum >= 0; regnum--, regmask <<= 1) \
|
/* OBSOLETE for (regnum = 12; regnum >= 0; regnum--, regmask <<= 1) \ */
|
||||||
if (regmask & 0x1000) \
|
/* OBSOLETE if (regmask & 0x1000) \ */
|
||||||
write_register (regnum, read_memory_integer (fp-=4, 4)); \
|
/* OBSOLETE write_register (regnum, read_memory_integer (fp-=4, 4)); \ */
|
||||||
flush_cached_frames (); \
|
/* OBSOLETE flush_cached_frames (); \ */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
|
/* OBSOLETE */
|
||||||
/* This sequence of words is the instructions
|
/* OBSOLETE /* This sequence of words is the instructions */
|
||||||
calls #69, @#32323232
|
/* OBSOLETE calls #69, @#32323232 */
|
||||||
bpt
|
/* OBSOLETE bpt */
|
||||||
Note this is 8 bytes. */
|
/* OBSOLETE Note this is 8 bytes. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define CALL_DUMMY {0xbf699f32, 0x32323230}
|
/* OBSOLETE #define CALL_DUMMY {0xbf699f32, 0x32323230} */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Start execution at beginning of dummy */
|
/* OBSOLETE /* Start execution at beginning of dummy *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define CALL_DUMMY_START_OFFSET 0
|
/* OBSOLETE #define CALL_DUMMY_START_OFFSET 0 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Insert the specified number of args and function address
|
/* OBSOLETE /* Insert the specified number of args and function address */
|
||||||
into a call sequence of the above form stored at DUMMYNAME. */
|
/* OBSOLETE into a call sequence of the above form stored at DUMMYNAME. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, valtype, using_gcc) \
|
/* OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, valtype, using_gcc) \ */
|
||||||
{ int temp = (int) fun; \
|
/* OBSOLETE { int temp = (int) fun; \ */
|
||||||
*((char *) dummyname + 1) = nargs; \
|
/* OBSOLETE *((char *) dummyname + 1) = nargs; \ */
|
||||||
memcpy((char *)dummyname+3,&temp,4); }
|
/* OBSOLETE memcpy((char *)dummyname+3,&temp,4); } */
|
||||||
|
|
|
@ -1,137 +1,137 @@
|
||||||
/* Definitions to make GDB hosted on a tahoe running 4.3-Reno
|
/* OBSOLETE /* Definitions to make GDB hosted on a tahoe running 4.3-Reno */
|
||||||
Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
|
/* OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc. */
|
||||||
Contributed by the State University of New York at Buffalo, by the
|
/* OBSOLETE Contributed by the State University of New York at Buffalo, by the */
|
||||||
Distributed Computer Systems Lab, Department of Computer Science, 1991.
|
/* OBSOLETE Distributed Computer Systems Lab, Department of Computer Science, 1991. */
|
||||||
|
/* OBSOLETE */
|
||||||
This file is part of GDB.
|
/* OBSOLETE This file is part of GDB. */
|
||||||
|
/* OBSOLETE */
|
||||||
This program is free software; you can redistribute it and/or modify
|
/* OBSOLETE 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
|
/* OBSOLETE it under the terms of the GNU General Public License as published by */
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
|
||||||
(at your option) any later version.
|
/* OBSOLETE (at your option) any later version. */
|
||||||
|
/* OBSOLETE */
|
||||||
This program is distributed in the hope that it will be useful,
|
/* OBSOLETE This program is distributed in the hope that it will be useful, */
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
GNU General Public License for more details.
|
/* OBSOLETE GNU General Public License for more details. */
|
||||||
|
/* OBSOLETE */
|
||||||
You should have received a copy of the GNU General Public License
|
/* OBSOLETE You should have received a copy of the GNU General Public License */
|
||||||
along with this program; if not, write to the Free Software
|
/* OBSOLETE along with this program; if not, write to the Free Software */
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
|
||||||
Boston, MA 02111-1307, USA. */
|
/* OBSOLETE Boston, MA 02111-1307, USA. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Make sure the system include files define BIG_ENDIAN, UINT_MAX, const,
|
/* OBSOLETE /* Make sure the system include files define BIG_ENDIAN, UINT_MAX, const, */
|
||||||
etc, rather than GDB's files. */
|
/* OBSOLETE etc, rather than GDB's files. *x/ */
|
||||||
#include <stdio.h>
|
/* OBSOLETE #include <stdio.h> */
|
||||||
#include <sys/param.h>
|
/* OBSOLETE #include <sys/param.h> */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Host is big-endian */
|
/* OBSOLETE /* Host is big-endian *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define HOST_BYTE_ORDER BIG_ENDIAN
|
/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
|
||||||
|
/* OBSOLETE */
|
||||||
/* This is the amount to subtract from u.u_ar0
|
/* OBSOLETE /* This is the amount to subtract from u.u_ar0 */
|
||||||
to get the offset in the core file of the register values. */
|
/* OBSOLETE to get the offset in the core file of the register values. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define KERNEL_U_ADDR (0xc0000000 - (TARGET_UPAGES * TARGET_NBPG))
|
/* OBSOLETE #define KERNEL_U_ADDR (0xc0000000 - (TARGET_UPAGES * TARGET_NBPG)) */
|
||||||
|
/* OBSOLETE */
|
||||||
#define REGISTER_U_ADDR(addr, blockend, regno) \
|
/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \ */
|
||||||
{ addr = blockend - 100 + regno * 4; \
|
/* OBSOLETE { addr = blockend - 100 + regno * 4; \ */
|
||||||
if (regno == PC_REGNUM) addr = blockend - 8; \
|
/* OBSOLETE if (regno == PC_REGNUM) addr = blockend - 8; \ */
|
||||||
if (regno == PS_REGNUM) addr = blockend - 4; \
|
/* OBSOLETE if (regno == PS_REGNUM) addr = blockend - 4; \ */
|
||||||
if (regno == FP_REGNUM) addr = blockend - 40; \
|
/* OBSOLETE if (regno == FP_REGNUM) addr = blockend - 40; \ */
|
||||||
if (regno == SP_REGNUM) addr = blockend - 36; \
|
/* OBSOLETE if (regno == SP_REGNUM) addr = blockend - 36; \ */
|
||||||
if (regno == AL_REGNUM) addr = blockend - 20; \
|
/* OBSOLETE if (regno == AL_REGNUM) addr = blockend - 20; \ */
|
||||||
if (regno == AH_REGNUM) addr = blockend - 24;}
|
/* OBSOLETE if (regno == AH_REGNUM) addr = blockend - 24;} */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Interface definitions for kernel debugger KDB. */
|
/* OBSOLETE /* Interface definitions for kernel debugger KDB. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Map machine fault codes into signal numbers.
|
/* OBSOLETE /* Map machine fault codes into signal numbers. */
|
||||||
First subtract 0, divide by 4, then index in a table.
|
/* OBSOLETE First subtract 0, divide by 4, then index in a table. */
|
||||||
Faults for which the entry in this table is 0
|
/* OBSOLETE Faults for which the entry in this table is 0 */
|
||||||
are not handled by KDB; the program's own trap handler
|
/* OBSOLETE are not handled by KDB; the program's own trap handler */
|
||||||
gets to handle then. */
|
/* OBSOLETE gets to handle then. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define FAULT_CODE_ORIGIN 0
|
/* OBSOLETE #define FAULT_CODE_ORIGIN 0 */
|
||||||
#define FAULT_CODE_UNITS 4
|
/* OBSOLETE #define FAULT_CODE_UNITS 4 */
|
||||||
#define FAULT_TABLE \
|
/* OBSOLETE #define FAULT_TABLE \ */
|
||||||
{ 0, SIGKILL, SIGSEGV, 0, 0, 0, 0, 0, \
|
/* OBSOLETE { 0, SIGKILL, SIGSEGV, 0, 0, 0, 0, 0, \ */
|
||||||
0, 0, SIGTRAP, SIGTRAP, 0, 0, 0, 0, \
|
/* OBSOLETE 0, 0, SIGTRAP, SIGTRAP, 0, 0, 0, 0, \ */
|
||||||
0, 0, 0, 0, 0, 0, 0, 0}
|
/* OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0} */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Start running with a stack stretching from BEG to END.
|
/* OBSOLETE /* Start running with a stack stretching from BEG to END. */
|
||||||
BEG and END should be symbols meaningful to the assembler.
|
/* OBSOLETE BEG and END should be symbols meaningful to the assembler. */
|
||||||
This is used only for kdb. */
|
/* OBSOLETE This is used only for kdb. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define INIT_STACK(beg, end) \
|
/* OBSOLETE #define INIT_STACK(beg, end) \ */
|
||||||
{ asm (".globl end"); \
|
/* OBSOLETE { asm (".globl end"); \ */
|
||||||
asm ("movl $ end, sp"); \
|
/* OBSOLETE asm ("movl $ end, sp"); \ */
|
||||||
asm ("clrl fp"); }
|
/* OBSOLETE asm ("clrl fp"); } */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Push the frame pointer register on the stack. */
|
/* OBSOLETE /* Push the frame pointer register on the stack. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define PUSH_FRAME_PTR \
|
/* OBSOLETE #define PUSH_FRAME_PTR \ */
|
||||||
asm ("pushl fp");
|
/* OBSOLETE asm ("pushl fp"); */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Copy the top-of-stack to the frame pointer register. */
|
/* OBSOLETE /* Copy the top-of-stack to the frame pointer register. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define POP_FRAME_PTR \
|
/* OBSOLETE #define POP_FRAME_PTR \ */
|
||||||
asm ("movl (sp), fp");
|
/* OBSOLETE asm ("movl (sp), fp"); */
|
||||||
|
/* OBSOLETE */
|
||||||
/* After KDB is entered by a fault, push all registers
|
/* OBSOLETE /* After KDB is entered by a fault, push all registers */
|
||||||
that GDB thinks about (all NUM_REGS of them),
|
/* OBSOLETE that GDB thinks about (all NUM_REGS of them), */
|
||||||
so that they appear in order of ascending GDB register number.
|
/* OBSOLETE so that they appear in order of ascending GDB register number. */
|
||||||
The fault code will be on the stack beyond the last register. */
|
/* OBSOLETE The fault code will be on the stack beyond the last register. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define PUSH_REGISTERS \
|
/* OBSOLETE #define PUSH_REGISTERS \ */
|
||||||
{ asm ("pushl 8(sp)"); \
|
/* OBSOLETE { asm ("pushl 8(sp)"); \ */
|
||||||
asm ("pushl 8(sp)"); \
|
/* OBSOLETE asm ("pushl 8(sp)"); \ */
|
||||||
asm ("pushal 0x41(sp)"); \
|
/* OBSOLETE asm ("pushal 0x41(sp)"); \ */
|
||||||
asm ("pushl r0" ); \
|
/* OBSOLETE asm ("pushl r0" ); \ */
|
||||||
asm ("pushl r1" ); \
|
/* OBSOLETE asm ("pushl r1" ); \ */
|
||||||
asm ("pushl r2" ); \
|
/* OBSOLETE asm ("pushl r2" ); \ */
|
||||||
asm ("pushl r3" ); \
|
/* OBSOLETE asm ("pushl r3" ); \ */
|
||||||
asm ("pushl r4" ); \
|
/* OBSOLETE asm ("pushl r4" ); \ */
|
||||||
asm ("pushl r5" ); \
|
/* OBSOLETE asm ("pushl r5" ); \ */
|
||||||
asm ("pushl r6" ); \
|
/* OBSOLETE asm ("pushl r6" ); \ */
|
||||||
asm ("pushl r7" ); \
|
/* OBSOLETE asm ("pushl r7" ); \ */
|
||||||
asm ("pushl r8" ); \
|
/* OBSOLETE asm ("pushl r8" ); \ */
|
||||||
asm ("pushl r9" ); \
|
/* OBSOLETE asm ("pushl r9" ); \ */
|
||||||
asm ("pushl r10" ); \
|
/* OBSOLETE asm ("pushl r10" ); \ */
|
||||||
asm ("pushl r11" ); \
|
/* OBSOLETE asm ("pushl r11" ); \ */
|
||||||
asm ("pushl r12" ); \
|
/* OBSOLETE asm ("pushl r12" ); \ */
|
||||||
asm ("pushl fp" ); \
|
/* OBSOLETE asm ("pushl fp" ); \ */
|
||||||
asm ("pushl sp" ); \
|
/* OBSOLETE asm ("pushl sp" ); \ */
|
||||||
asm ("pushl pc" ); \
|
/* OBSOLETE asm ("pushl pc" ); \ */
|
||||||
asm ("pushl ps" ); \
|
/* OBSOLETE asm ("pushl ps" ); \ */
|
||||||
asm ("pushl aclo" ); \
|
/* OBSOLETE asm ("pushl aclo" ); \ */
|
||||||
asm ("pushl achi" ); \
|
/* OBSOLETE asm ("pushl achi" ); \ */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Assuming the registers (including processor status) have been
|
/* OBSOLETE /* Assuming the registers (including processor status) have been */
|
||||||
pushed on the stack in order of ascending GDB register number,
|
/* OBSOLETE pushed on the stack in order of ascending GDB register number, */
|
||||||
restore them and return to the address in the saved PC register. */
|
/* OBSOLETE restore them and return to the address in the saved PC register. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#define POP_REGISTERS \
|
/* OBSOLETE #define POP_REGISTERS \ */
|
||||||
{ \
|
/* OBSOLETE { \ */
|
||||||
asm ("movl (sp)+, achi"); \
|
/* OBSOLETE asm ("movl (sp)+, achi"); \ */
|
||||||
asm ("movl (sp)+, aclo"); \
|
/* OBSOLETE asm ("movl (sp)+, aclo"); \ */
|
||||||
asm ("movl (sp)+, ps"); \
|
/* OBSOLETE asm ("movl (sp)+, ps"); \ */
|
||||||
asm ("movl (sp)+, pc"); \
|
/* OBSOLETE asm ("movl (sp)+, pc"); \ */
|
||||||
asm ("movl (sp)+, sp"); \
|
/* OBSOLETE asm ("movl (sp)+, sp"); \ */
|
||||||
asm ("movl (sp)+, fp"); \
|
/* OBSOLETE asm ("movl (sp)+, fp"); \ */
|
||||||
asm ("movl (sp)+, r12"); \
|
/* OBSOLETE asm ("movl (sp)+, r12"); \ */
|
||||||
asm ("movl (sp)+, r11"); \
|
/* OBSOLETE asm ("movl (sp)+, r11"); \ */
|
||||||
asm ("movl (sp)+, r10"); \
|
/* OBSOLETE asm ("movl (sp)+, r10"); \ */
|
||||||
asm ("movl (sp)+, r9"); \
|
/* OBSOLETE asm ("movl (sp)+, r9"); \ */
|
||||||
asm ("movl (sp)+, r8"); \
|
/* OBSOLETE asm ("movl (sp)+, r8"); \ */
|
||||||
asm ("movl (sp)+, r7"); \
|
/* OBSOLETE asm ("movl (sp)+, r7"); \ */
|
||||||
asm ("movl (sp)+, r6"); \
|
/* OBSOLETE asm ("movl (sp)+, r6"); \ */
|
||||||
asm ("movl (sp)+, r5"); \
|
/* OBSOLETE asm ("movl (sp)+, r5"); \ */
|
||||||
asm ("movl (sp)+, r4"); \
|
/* OBSOLETE asm ("movl (sp)+, r4"); \ */
|
||||||
asm ("movl (sp)+, r3"); \
|
/* OBSOLETE asm ("movl (sp)+, r3"); \ */
|
||||||
asm ("movl (sp)+, r2"); \
|
/* OBSOLETE asm ("movl (sp)+, r2"); \ */
|
||||||
asm ("movl (sp)+, r1"); \
|
/* OBSOLETE asm ("movl (sp)+, r1"); \ */
|
||||||
asm ("movl (sp)+, r0"); \
|
/* OBSOLETE asm ("movl (sp)+, r0"); \ */
|
||||||
asm ("subl2 $8,(sp)"); \
|
/* OBSOLETE asm ("subl2 $8,(sp)"); \ */
|
||||||
asm ("movl (sp),sp"); \
|
/* OBSOLETE asm ("movl (sp),sp"); \ */
|
||||||
asm ("rei"); }
|
/* OBSOLETE asm ("rei"); } */
|
||||||
|
|
|
@ -22,13 +22,12 @@
|
||||||
#ifndef TM_TIC80_H
|
#ifndef TM_TIC80_H
|
||||||
#define TM_TIC80_H
|
#define TM_TIC80_H
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward declare structs used in prototypes */
|
/* Forward declare structs used in prototypes */
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
struct symbol;
|
struct symbol;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
|
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
|
||||||
|
|
||||||
|
|
|
@ -92,12 +92,10 @@ extern char **v850_register_names;
|
||||||
|
|
||||||
#define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
|
#define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct frame_saved_regs;
|
struct frame_saved_regs;
|
||||||
struct type;
|
struct type;
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EXTRA_FRAME_INFO struct frame_saved_regs fsr;
|
#define EXTRA_FRAME_INFO struct frame_saved_regs fsr;
|
||||||
|
|
||||||
|
|
|
@ -198,9 +198,7 @@ extern CORE_ADDR mz8k_skip_prologue PARAMS ((CORE_ADDR ip));
|
||||||
|
|
||||||
#define FRAME_ARGS_SKIP 8
|
#define FRAME_ARGS_SKIP 8
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
#endif
|
|
||||||
extern void z8k_frame_init_saved_regs PARAMS ((struct frame_info *));
|
extern void z8k_frame_init_saved_regs PARAMS ((struct frame_info *));
|
||||||
#define FRAME_INIT_SAVED_REGS(fi) z8k_frame_init_saved_regs (fi)
|
#define FRAME_INIT_SAVED_REGS(fi) z8k_frame_init_saved_regs (fi)
|
||||||
|
|
||||||
|
|
308
gdb/configure
vendored
308
gdb/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -155,7 +155,7 @@ sparc64-*-*) gdb_host=sun4sol2 ;;
|
||||||
|
|
||||||
strongarm-*-*) gdb_host=arm ;;
|
strongarm-*-*) gdb_host=arm ;;
|
||||||
|
|
||||||
tahoe-*-*) gdb_host=tahoe ;;
|
# OBSOLETE tahoe-*-*) gdb_host=tahoe ;;
|
||||||
|
|
||||||
vax-*-bsd*) gdb_host=vaxbsd ;;
|
vax-*-bsd*) gdb_host=vaxbsd ;;
|
||||||
vax-*-ultrix2*) gdb_host=vaxult2 ;;
|
vax-*-ultrix2*) gdb_host=vaxult2 ;;
|
||||||
|
|
|
@ -83,7 +83,8 @@ AC_CHECK_HEADERS(ctype.h curses.h endian.h link.h \
|
||||||
memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
|
memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
|
||||||
string.h sys/procfs.h sys/ptrace.h sys/reg.h \
|
string.h sys/procfs.h sys/ptrace.h sys/reg.h \
|
||||||
term.h termio.h termios.h unistd.h wait.h sys/wait.h \
|
term.h termio.h termios.h unistd.h wait.h sys/wait.h \
|
||||||
wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h)
|
wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
|
||||||
|
time.h)
|
||||||
AC_HEADER_STAT
|
AC_HEADER_STAT
|
||||||
|
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
|
@ -400,13 +401,21 @@ case "${enableval}" in
|
||||||
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
||||||
esac],[build_warnings=""])dnl
|
esac],[build_warnings=""])dnl
|
||||||
|
|
||||||
|
WARN_CFLAGS=""
|
||||||
|
WERROR_CFLAGS=""
|
||||||
if test "x${build_warnings}" != x -a "x$GCC" = xyes
|
if test "x${build_warnings}" != x -a "x$GCC" = xyes
|
||||||
then
|
then
|
||||||
WARN_CFLAGS="${build_warnings}"
|
# Separate out the -Werror flag as some files just cannot be
|
||||||
else
|
# compiled with it enabled.
|
||||||
WARN_CFLAGS=""
|
for w in ${build_warnings}; do
|
||||||
|
case $w in
|
||||||
|
-Werr*) WERROR_CFLAGS=-Werror ;;
|
||||||
|
*) WARN_CFLAGS="${WARN_CFLAGS} $w"
|
||||||
|
esac
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
AC_SUBST(WARN_CFLAGS)
|
AC_SUBST(WARN_CFLAGS)
|
||||||
|
AC_SUBST(WERROR_CFLAGS)
|
||||||
|
|
||||||
MMALLOC_CFLAGS=
|
MMALLOC_CFLAGS=
|
||||||
MMALLOC=
|
MMALLOC=
|
||||||
|
|
|
@ -262,7 +262,7 @@ sparc86x-*-*) gdb_target=sparclite ;;
|
||||||
#sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
|
#sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
|
||||||
sparc64-*-*) gdb_target=sp64 ;;
|
sparc64-*-*) gdb_target=sp64 ;;
|
||||||
|
|
||||||
tahoe-*-*) gdb_target=tahoe ;;
|
# OBSOLETE tahoe-*-*) gdb_target=tahoe ;;
|
||||||
|
|
||||||
tic80-*-*) gdb_target=tic80
|
tic80-*-*) gdb_target=tic80
|
||||||
configdirs="${configdirs} gdbserver" ;;
|
configdirs="${configdirs} gdbserver" ;;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include "frame.h" /* required by inferior.h */
|
#include "frame.h" /* required by inferior.h */
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "dis-asm.h"
|
#include "dis-asm.h"
|
||||||
#include "symfile.h"
|
#include "symfile.h"
|
||||||
#include "objfiles.h"
|
#include "objfiles.h"
|
||||||
|
#include "language.h"
|
||||||
|
|
||||||
struct frame_extra_info
|
struct frame_extra_info
|
||||||
{
|
{
|
||||||
|
|
116
gdb/defs.h
116
gdb/defs.h
|
@ -34,6 +34,10 @@
|
||||||
# include <sys/types.h> /* for size_t */
|
# include <sys/types.h> /* for size_t */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Just in case they're not defined in stdio.h. */
|
/* Just in case they're not defined in stdio.h. */
|
||||||
|
|
||||||
#ifndef SEEK_SET
|
#ifndef SEEK_SET
|
||||||
|
@ -72,6 +76,36 @@ extern char *strsignal PARAMS ((int));
|
||||||
|
|
||||||
typedef bfd_vma CORE_ADDR;
|
typedef bfd_vma CORE_ADDR;
|
||||||
|
|
||||||
|
/* This is to make sure that LONGEST is at least as big as CORE_ADDR. */
|
||||||
|
|
||||||
|
#ifndef LONGEST
|
||||||
|
|
||||||
|
#ifdef BFD64
|
||||||
|
|
||||||
|
#define LONGEST BFD_HOST_64_BIT
|
||||||
|
#define ULONGEST BFD_HOST_U_64_BIT
|
||||||
|
|
||||||
|
#else /* No BFD64 */
|
||||||
|
|
||||||
|
# ifdef CC_HAS_LONG_LONG
|
||||||
|
# define LONGEST long long
|
||||||
|
# define ULONGEST unsigned long long
|
||||||
|
# else
|
||||||
|
/* BFD_HOST_64_BIT is defined for some hosts that don't have long long
|
||||||
|
(e.g. i386-windows) so try it. */
|
||||||
|
# ifdef BFD_HOST_64_BIT
|
||||||
|
# define LONGEST BFD_HOST_64_BIT
|
||||||
|
# define ULONGEST BFD_HOST_U_64_BIT
|
||||||
|
# else
|
||||||
|
# define LONGEST long
|
||||||
|
# define ULONGEST unsigned long
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#endif /* No BFD64 */
|
||||||
|
|
||||||
|
#endif /* ! LONGEST */
|
||||||
|
|
||||||
extern int core_addr_lessthan PARAMS ((CORE_ADDR lhs, CORE_ADDR rhs));
|
extern int core_addr_lessthan PARAMS ((CORE_ADDR lhs, CORE_ADDR rhs));
|
||||||
extern int core_addr_greaterthan PARAMS ((CORE_ADDR lhs, CORE_ADDR rhs));
|
extern int core_addr_greaterthan PARAMS ((CORE_ADDR lhs, CORE_ADDR rhs));
|
||||||
|
|
||||||
|
@ -231,10 +265,8 @@ struct cleanup
|
||||||
|
|
||||||
/* Needed for various prototypes */
|
/* Needed for various prototypes */
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct symtab;
|
struct symtab;
|
||||||
struct breakpoint;
|
struct breakpoint;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* From blockframe.c */
|
/* From blockframe.c */
|
||||||
|
|
||||||
|
@ -340,23 +372,6 @@ extern void wrap_here PARAMS ((char *));
|
||||||
|
|
||||||
extern void reinitialize_more_filter PARAMS ((void));
|
extern void reinitialize_more_filter PARAMS ((void));
|
||||||
|
|
||||||
/* new */
|
|
||||||
enum streamtype
|
|
||||||
{
|
|
||||||
afile,
|
|
||||||
astring
|
|
||||||
};
|
|
||||||
|
|
||||||
/* new */
|
|
||||||
struct tui_stream
|
|
||||||
{
|
|
||||||
int *ts_magic;
|
|
||||||
enum streamtype ts_streamtype;
|
|
||||||
FILE *ts_filestream;
|
|
||||||
char *ts_strbuf;
|
|
||||||
int ts_buflen;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct gdb_file;
|
struct gdb_file;
|
||||||
typedef struct gdb_file GDB_FILE; /* deprecated */
|
typedef struct gdb_file GDB_FILE; /* deprecated */
|
||||||
|
|
||||||
|
@ -504,15 +519,18 @@ extern void fputstrn_unfiltered PARAMS ((const char *str, int n, int quotr, GDB_
|
||||||
|
|
||||||
extern void gdb_print_address PARAMS ((void *, GDB_FILE *));
|
extern void gdb_print_address PARAMS ((void *, GDB_FILE *));
|
||||||
|
|
||||||
typedef bfd_vma t_addr;
|
/* Convert a CORE_ADDR into a HEX string. paddr() is like %08lx.
|
||||||
|
paddr_nz() is like %lx. paddr_u() is like %lu. paddr_width() is
|
||||||
|
for ``%*''. */
|
||||||
|
extern int strlen_paddr ();
|
||||||
|
extern char* paddr (CORE_ADDR addr);
|
||||||
|
extern char* paddr_nz (CORE_ADDR addr);
|
||||||
|
extern char* paddr_u (CORE_ADDR addr);
|
||||||
|
extern char* paddr_d (LONGEST addr);
|
||||||
|
|
||||||
typedef bfd_vma t_reg;
|
typedef bfd_vma t_reg;
|
||||||
extern char* paddr PARAMS ((t_addr addr));
|
extern char* preg (t_reg reg);
|
||||||
|
extern char* preg_nz (t_reg reg);
|
||||||
extern char* preg PARAMS ((t_reg reg));
|
|
||||||
|
|
||||||
extern char* paddr_nz PARAMS ((t_addr addr));
|
|
||||||
|
|
||||||
extern char* preg_nz PARAMS ((t_reg reg));
|
|
||||||
|
|
||||||
extern void fprintf_symbol_filtered PARAMS ((GDB_FILE *, char *,
|
extern void fprintf_symbol_filtered PARAMS ((GDB_FILE *, char *,
|
||||||
enum language, int));
|
enum language, int));
|
||||||
|
@ -570,6 +588,12 @@ extern void init_source_path PARAMS ((void));
|
||||||
|
|
||||||
extern char *symtab_to_filename PARAMS ((struct symtab *));
|
extern char *symtab_to_filename PARAMS ((struct symtab *));
|
||||||
|
|
||||||
|
/* From exec.c */
|
||||||
|
|
||||||
|
extern void exec_set_section_offsets (bfd_signed_vma text_off,
|
||||||
|
bfd_signed_vma data_off,
|
||||||
|
bfd_signed_vma bss_off);
|
||||||
|
|
||||||
/* From findvar.c */
|
/* From findvar.c */
|
||||||
|
|
||||||
extern int read_relative_register_raw_bytes PARAMS ((int, char *));
|
extern int read_relative_register_raw_bytes PARAMS ((int, char *));
|
||||||
|
@ -763,36 +787,6 @@ enum val_prettyprint
|
||||||
#define LONG_MAX ((long)(ULONG_MAX >> 1)) /* 0x7FFFFFFF for 32-bits */
|
#define LONG_MAX ((long)(ULONG_MAX >> 1)) /* 0x7FFFFFFF for 32-bits */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LONGEST
|
|
||||||
|
|
||||||
#ifdef BFD64
|
|
||||||
|
|
||||||
/* This is to make sure that LONGEST is at least as big as CORE_ADDR. */
|
|
||||||
|
|
||||||
#define LONGEST BFD_HOST_64_BIT
|
|
||||||
#define ULONGEST BFD_HOST_U_64_BIT
|
|
||||||
|
|
||||||
#else /* No BFD64 */
|
|
||||||
|
|
||||||
# ifdef CC_HAS_LONG_LONG
|
|
||||||
# define LONGEST long long
|
|
||||||
# define ULONGEST unsigned long long
|
|
||||||
# else
|
|
||||||
/* BFD_HOST_64_BIT is defined for some hosts that don't have long long
|
|
||||||
(e.g. i386-windows) so try it. */
|
|
||||||
# ifdef BFD_HOST_64_BIT
|
|
||||||
# define LONGEST BFD_HOST_64_BIT
|
|
||||||
# define ULONGEST BFD_HOST_U_64_BIT
|
|
||||||
# else
|
|
||||||
# define LONGEST long
|
|
||||||
# define ULONGEST unsigned long
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif /* No BFD64 */
|
|
||||||
|
|
||||||
#endif /* ! LONGEST */
|
|
||||||
|
|
||||||
/* Convert a LONGEST to an int. This is used in contexts (e.g. number of
|
/* Convert a LONGEST to an int. This is used in contexts (e.g. number of
|
||||||
arguments to a function, number in a value history, register number, etc.)
|
arguments to a function, number in a value history, register number, etc.)
|
||||||
where the value must not be larger than can fit in an int. */
|
where the value must not be larger than can fit in an int. */
|
||||||
|
@ -1145,10 +1139,8 @@ extern CORE_ADDR push_word PARAMS ((CORE_ADDR, ULONGEST));
|
||||||
extern int watchdog;
|
extern int watchdog;
|
||||||
|
|
||||||
/* Hooks for alternate command interfaces. */
|
/* Hooks for alternate command interfaces. */
|
||||||
#ifdef __STDC__
|
|
||||||
struct target_waitstatus;
|
struct target_waitstatus;
|
||||||
struct cmd_list_element;
|
struct cmd_list_element;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Should the asynchronous variant of the interpreter (using the
|
/* Should the asynchronous variant of the interpreter (using the
|
||||||
event-loop) be enabled? */
|
event-loop) be enabled? */
|
||||||
|
@ -1257,4 +1249,10 @@ extern int use_windows;
|
||||||
#define STDERR_FILENO 2
|
#define STDERR_FILENO 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* If this definition isn't overridden by the header files, assume
|
||||||
|
that isatty and fileno exist on this system. */
|
||||||
|
#ifndef ISATTY
|
||||||
|
#define ISATTY(FP) (isatty (fileno (FP)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* #ifndef DEFS_H */
|
#endif /* #ifndef DEFS_H */
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
1999-08-30 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* gdb.texinfo: Create a new "Configurations" chapter with
|
||||||
|
platform-specific info, inline remote.texi and move sections of it
|
||||||
|
into the new chapter, move bits about info proc, heuristic search,
|
||||||
|
and register stack into the new chapter.
|
||||||
|
* remote.texi: Remove, now part of gdb.texinfo.
|
||||||
|
* Makefile.in (SFILES_INCLUDED): Remove ref to remote.texi.
|
||||||
|
|
||||||
|
1999-08-27 Jason Molenda (jsm@bugshack.cygnus.com)
|
||||||
|
|
||||||
|
* gdbint.texinfo (GDB_TARGET_IS_SUN3, GDB_TARGET_IS_SUN386,
|
||||||
|
GDB_TARGET_IS_MACH386): These kludges have gone away.
|
||||||
|
|
||||||
|
Wed Aug 25 10:47:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* gdbint.texinfo (Target Architecture Definition): Mention
|
||||||
|
TDEPLIBS.
|
||||||
|
|
||||||
1999-08-20 Stan Shebs <shebs@andros.cygnus.com>
|
1999-08-20 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
* gdb.texinfo: Remove remaining "HPPA" conditionals, rewrite
|
* gdb.texinfo: Remove remaining "HPPA" conditionals, rewrite
|
||||||
|
|
|
@ -83,7 +83,7 @@ TEXINDEX = texindex
|
||||||
DVIPS = dvips
|
DVIPS = dvips
|
||||||
|
|
||||||
# Main GDB manual's source files
|
# Main GDB manual's source files
|
||||||
SFILES_INCLUDED = gdb-cfg.texi $(srcdir)/remote.texi
|
SFILES_INCLUDED = gdb-cfg.texi
|
||||||
|
|
||||||
SFILES_LOCAL = $(srcdir)/gdb.texinfo GDBvn.texi $(SFILES_INCLUDED)
|
SFILES_LOCAL = $(srcdir)/gdb.texinfo GDBvn.texi $(SFILES_INCLUDED)
|
||||||
|
|
||||||
|
|
2976
gdb/doc/gdb.texinfo
2976
gdb/doc/gdb.texinfo
File diff suppressed because it is too large
Load diff
|
@ -1418,11 +1418,6 @@ partial-stab.h is used to mangle multiple-symbol-table files from
|
||||||
HPPA's. This should all be ripped out, and a scheme like elfread.c
|
HPPA's. This should all be ripped out, and a scheme like elfread.c
|
||||||
used.
|
used.
|
||||||
|
|
||||||
@item GDB_TARGET_IS_MACH386
|
|
||||||
@item GDB_TARGET_IS_SUN3
|
|
||||||
@item GDB_TARGET_IS_SUN386
|
|
||||||
Kludges that should go away.
|
|
||||||
|
|
||||||
@item GET_LONGJMP_TARGET
|
@item GET_LONGJMP_TARGET
|
||||||
For most machines, this is a target-dependent parameter. On the
|
For most machines, this is a target-dependent parameter. On the
|
||||||
DECstation and the Iris, this is a native-dependent parameter, since
|
DECstation and the Iris, this is a native-dependent parameter, since
|
||||||
|
@ -1749,10 +1744,13 @@ The following files define a target to GDB:
|
||||||
@item gdb/config/@var{arch}/@var{ttt}.mt
|
@item gdb/config/@var{arch}/@var{ttt}.mt
|
||||||
Contains a Makefile fragment specific to this target. Specifies what
|
Contains a Makefile fragment specific to this target. Specifies what
|
||||||
object files are needed for target @var{ttt}, by defining
|
object files are needed for target @var{ttt}, by defining
|
||||||
@samp{TDEPFILES=@dots{}}. Also specifies the header file which
|
@samp{TDEPFILES=@dots{}} and @samp{TDEPLIBS=@dots{}}. Also specifies
|
||||||
describes @var{ttt}, by defining @samp{TM_FILE= tm-@var{ttt}.h}. You
|
the header file which describes @var{ttt}, by defining @samp{TM_FILE=
|
||||||
can also define @samp{TM_CFLAGS}, @samp{TM_CLIBS}, @samp{TM_CDEPS}, but
|
tm-@var{ttt}.h}.
|
||||||
these are now deprecated and may go away in future versions of GDB.
|
|
||||||
|
You can also define @samp{TM_CFLAGS}, @samp{TM_CLIBS}, @samp{TM_CDEPS},
|
||||||
|
but these are now deprecated, replaced by autoconf, and may go away in
|
||||||
|
future versions of GDB.
|
||||||
|
|
||||||
@item gdb/config/@var{arch}/tm-@var{ttt}.h
|
@item gdb/config/@var{arch}/tm-@var{ttt}.h
|
||||||
(@file{tm.h} is a link to this file, created by configure). Contains
|
(@file{tm.h} is a link to this file, created by configure). Contains
|
||||||
|
|
|
@ -228,7 +228,7 @@ extern void start_event_loop PARAMS ((void));
|
||||||
extern void delete_file_handler PARAMS ((int));
|
extern void delete_file_handler PARAMS ((int));
|
||||||
extern void add_file_handler PARAMS ((int, void (*) (void), gdb_client_data));
|
extern void add_file_handler PARAMS ((int, void (*) (void), gdb_client_data));
|
||||||
extern void mark_async_signal_handler PARAMS ((async_signal_handler *));
|
extern void mark_async_signal_handler PARAMS ((async_signal_handler *));
|
||||||
extern async_signal_handler *
|
extern async_signal_handler *
|
||||||
create_async_signal_handler PARAMS ((handler_func *, gdb_client_data));
|
create_async_signal_handler PARAMS ((handler_func *, gdb_client_data));
|
||||||
extern void delete_async_signal_handler PARAMS ((async_signal_handler ** async_handler_ptr));
|
extern void delete_async_signal_handler PARAMS ((async_signal_handler ** async_handler_ptr));
|
||||||
|
|
||||||
|
@ -246,13 +246,16 @@ extern void pop_prompt PARAMS ((void));
|
||||||
extern void push_prompt PARAMS ((char *, char *, char *));
|
extern void push_prompt PARAMS ((char *, char *, char *));
|
||||||
extern void gdb_readline2 PARAMS ((void));
|
extern void gdb_readline2 PARAMS ((void));
|
||||||
|
|
||||||
/* Exported variables from event-top.c.
|
/* Exported variables and functions from event-top.c.
|
||||||
FIXME: these should really go into top.h. */
|
FIXME: these should really go into top.h. */
|
||||||
|
|
||||||
extern int async_command_editing_p;
|
extern int async_command_editing_p;
|
||||||
|
extern int exec_done_display_p;
|
||||||
extern char *async_annotation_suffix;
|
extern char *async_annotation_suffix;
|
||||||
extern char *new_async_prompt;
|
extern char *new_async_prompt;
|
||||||
extern struct prompts the_prompts;
|
extern struct prompts the_prompts;
|
||||||
extern void (*call_readline) PARAMS ((void));
|
extern void (*call_readline) PARAMS ((void));
|
||||||
extern void (*input_handler) PARAMS ((char *));
|
extern void (*input_handler) PARAMS ((char *));
|
||||||
extern int input_fd;
|
extern int input_fd;
|
||||||
|
void mark_async_signal_handler_wrapper (void *);
|
||||||
|
void async_request_quit (gdb_client_data);
|
||||||
|
|
|
@ -26,6 +26,9 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include "event-loop.h"
|
#include "event-loop.h"
|
||||||
|
|
||||||
|
/* For dont_repeat() */
|
||||||
|
#include "gdbcmd.h"
|
||||||
|
|
||||||
/* readline include files */
|
/* readline include files */
|
||||||
#include <readline/readline.h>
|
#include <readline/readline.h>
|
||||||
#include <readline/history.h>
|
#include <readline/history.h>
|
||||||
|
@ -60,18 +63,11 @@ void handle_stop_sig PARAMS ((int));
|
||||||
|
|
||||||
/* Functions to be invoked by the event loop in response to
|
/* Functions to be invoked by the event loop in response to
|
||||||
signals. */
|
signals. */
|
||||||
void async_request_quit PARAMS ((gdb_client_data));
|
|
||||||
static void async_do_nothing PARAMS ((gdb_client_data));
|
static void async_do_nothing PARAMS ((gdb_client_data));
|
||||||
static void async_disconnect PARAMS ((gdb_client_data));
|
static void async_disconnect PARAMS ((gdb_client_data));
|
||||||
static void async_float_handler PARAMS ((gdb_client_data));
|
static void async_float_handler PARAMS ((gdb_client_data));
|
||||||
static void async_stop_sig PARAMS ((gdb_client_data));
|
static void async_stop_sig PARAMS ((gdb_client_data));
|
||||||
|
|
||||||
/* If this definition isn't overridden by the header files, assume
|
|
||||||
that isatty and fileno exist on this system. */
|
|
||||||
#ifndef ISATTY
|
|
||||||
#define ISATTY(FP) (isatty (fileno (FP)))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Readline offers an alternate interface, via callback
|
/* Readline offers an alternate interface, via callback
|
||||||
functions. These are all included in the file callback.c in the
|
functions. These are all included in the file callback.c in the
|
||||||
readline distribution. This file provides (mainly) a function, which
|
readline distribution. This file provides (mainly) a function, which
|
||||||
|
@ -113,6 +109,10 @@ char *new_async_prompt;
|
||||||
annotation_level is 2. */
|
annotation_level is 2. */
|
||||||
char *async_annotation_suffix;
|
char *async_annotation_suffix;
|
||||||
|
|
||||||
|
/* This is used to display the notification of the completion of an
|
||||||
|
asynchronous execution command. */
|
||||||
|
int exec_done_display_p = 0;
|
||||||
|
|
||||||
/* This is the file descriptor for the input stream that GDB uses to
|
/* This is the file descriptor for the input stream that GDB uses to
|
||||||
read commands from. */
|
read commands from. */
|
||||||
int input_fd;
|
int input_fd;
|
||||||
|
@ -141,8 +141,6 @@ PTR sigwinch_token;
|
||||||
PTR sigtstp_token;
|
PTR sigtstp_token;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void mark_async_signal_handler_wrapper PARAMS ((void *));
|
|
||||||
|
|
||||||
/* Structure to save a partially entered command. This is used when
|
/* Structure to save a partially entered command. This is used when
|
||||||
the user types '\' at the end of a command line. This is necessary
|
the user types '\' at the end of a command line. This is necessary
|
||||||
because each line of input is handled by a different call to
|
because each line of input is handled by a different call to
|
||||||
|
|
|
@ -30,9 +30,6 @@
|
||||||
#include "gdbthread.h"
|
#include "gdbthread.h"
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This just gets used as a default if we can't find SHELL */
|
/* This just gets used as a default if we can't find SHELL */
|
||||||
#ifndef SHELL_FILE
|
#ifndef SHELL_FILE
|
||||||
|
|
227
gdb/gdb-events.c
Normal file
227
gdb/gdb-events.c
Normal file
|
@ -0,0 +1,227 @@
|
||||||
|
/* User Interface Events.
|
||||||
|
Copyright 1999 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
Contributed by Cygnus Solutions.
|
||||||
|
|
||||||
|
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. */
|
||||||
|
|
||||||
|
/* Work in progress */
|
||||||
|
|
||||||
|
/* This file was created with the aid of ``gdb-events.sh''.
|
||||||
|
|
||||||
|
The bourn shell script ``gdb-events.sh'' creates the files
|
||||||
|
``new-gdb-events.c'' and ``new-gdb-events.h and then compares
|
||||||
|
them against the existing ``gdb-events.[hc]''. Any differences
|
||||||
|
found being reported.
|
||||||
|
|
||||||
|
If editing this file, please also run gdb-events.sh and merge any
|
||||||
|
changes into that script. Conversely, when making sweeping changes
|
||||||
|
to this file, modifying gdb-events.sh and using its output may
|
||||||
|
prove easier. */
|
||||||
|
|
||||||
|
|
||||||
|
#include "defs.h"
|
||||||
|
#include "gdb-events.h"
|
||||||
|
#include "gdbcmd.h"
|
||||||
|
|
||||||
|
#undef XMALLOC
|
||||||
|
#define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
|
||||||
|
|
||||||
|
#if WITH_GDB_EVENTS
|
||||||
|
static struct gdb_events null_event_hooks;
|
||||||
|
static struct gdb_events queue_event_hooks;
|
||||||
|
static struct gdb_events *current_event_hooks = &null_event_hooks;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int gdb_events_debug;
|
||||||
|
|
||||||
|
#if WITH_GDB_EVENTS
|
||||||
|
|
||||||
|
void
|
||||||
|
breakpoint_create_event (int b)
|
||||||
|
{
|
||||||
|
if (gdb_events_debug)
|
||||||
|
fprintf_unfiltered (gdb_stdlog, "breakpoint_create_event\n");
|
||||||
|
if (!current_event_hooks->breakpoint_create)
|
||||||
|
return;
|
||||||
|
current_event_hooks->breakpoint_create (b);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
breakpoint_delete_event (int b)
|
||||||
|
{
|
||||||
|
if (gdb_events_debug)
|
||||||
|
fprintf_unfiltered (gdb_stdlog, "breakpoint_delete_event\n");
|
||||||
|
if (!current_event_hooks->breakpoint_delete)
|
||||||
|
return;
|
||||||
|
current_event_hooks->breakpoint_delete (b);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
breakpoint_modify_event (int b)
|
||||||
|
{
|
||||||
|
if (gdb_events_debug)
|
||||||
|
fprintf_unfiltered (gdb_stdlog, "breakpoint_modify_event\n");
|
||||||
|
if (!current_event_hooks->breakpoint_modify)
|
||||||
|
return;
|
||||||
|
current_event_hooks->breakpoint_modify (b);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if WITH_GDB_EVENTS
|
||||||
|
void
|
||||||
|
set_gdb_event_hooks (struct gdb_events *vector)
|
||||||
|
{
|
||||||
|
if (vector == NULL)
|
||||||
|
current_event_hooks = &queue_event_hooks;
|
||||||
|
else
|
||||||
|
current_event_hooks = vector;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum gdb_event
|
||||||
|
{
|
||||||
|
breakpoint_create,
|
||||||
|
breakpoint_delete,
|
||||||
|
breakpoint_modify,
|
||||||
|
nr_gdb_events
|
||||||
|
};
|
||||||
|
|
||||||
|
struct breakpoint_create
|
||||||
|
{
|
||||||
|
int b;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct breakpoint_delete
|
||||||
|
{
|
||||||
|
int b;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct breakpoint_modify
|
||||||
|
{
|
||||||
|
int b;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct event
|
||||||
|
{
|
||||||
|
enum gdb_event type;
|
||||||
|
struct event *next;
|
||||||
|
union
|
||||||
|
{
|
||||||
|
struct breakpoint_create breakpoint_create;
|
||||||
|
struct breakpoint_delete breakpoint_delete;
|
||||||
|
struct breakpoint_modify breakpoint_modify;
|
||||||
|
}
|
||||||
|
data;
|
||||||
|
};
|
||||||
|
struct event *pending_events;
|
||||||
|
struct event *delivering_events;
|
||||||
|
|
||||||
|
static void
|
||||||
|
append (struct event *new_event)
|
||||||
|
{
|
||||||
|
struct event **event = &pending_events;
|
||||||
|
while ((*event) != NULL)
|
||||||
|
event = &((*event)->next);
|
||||||
|
(*event) = new_event;
|
||||||
|
(*event)->next = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
queue_breakpoint_create (int b)
|
||||||
|
{
|
||||||
|
struct event *event = XMALLOC (struct event);
|
||||||
|
event->type = breakpoint_create;
|
||||||
|
event->data.breakpoint_create.b = b;
|
||||||
|
append (event);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
queue_breakpoint_delete (int b)
|
||||||
|
{
|
||||||
|
struct event *event = XMALLOC (struct event);
|
||||||
|
event->type = breakpoint_delete;
|
||||||
|
event->data.breakpoint_delete.b = b;
|
||||||
|
append (event);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
queue_breakpoint_modify (int b)
|
||||||
|
{
|
||||||
|
struct event *event = XMALLOC (struct event);
|
||||||
|
event->type = breakpoint_modify;
|
||||||
|
event->data.breakpoint_modify.b = b;
|
||||||
|
append (event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gdb_events_deliver (struct gdb_events *vector)
|
||||||
|
{
|
||||||
|
/* Just zap any events left around from last time. */
|
||||||
|
while (delivering_events != NULL)
|
||||||
|
{
|
||||||
|
struct event *event = delivering_events;
|
||||||
|
delivering_events = event->next;
|
||||||
|
free (event);
|
||||||
|
}
|
||||||
|
/* Process any pending events. Because one of the deliveries could
|
||||||
|
bail out we move everything off of the pending queue onto an
|
||||||
|
in-progress queue where it can, later, be cleaned up if
|
||||||
|
necessary. */
|
||||||
|
delivering_events = pending_events;
|
||||||
|
pending_events = NULL;
|
||||||
|
while (delivering_events != NULL)
|
||||||
|
{
|
||||||
|
struct event *event = delivering_events;
|
||||||
|
switch (event->type)
|
||||||
|
{
|
||||||
|
case breakpoint_create:
|
||||||
|
vector->breakpoint_create
|
||||||
|
(event->data.breakpoint_create.b);
|
||||||
|
break;
|
||||||
|
case breakpoint_delete:
|
||||||
|
vector->breakpoint_delete
|
||||||
|
(event->data.breakpoint_delete.b);
|
||||||
|
break;
|
||||||
|
case breakpoint_modify:
|
||||||
|
vector->breakpoint_modify
|
||||||
|
(event->data.breakpoint_modify.b);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
delivering_events = event->next;
|
||||||
|
free (event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _initialize_gdb_events (void);
|
||||||
|
void
|
||||||
|
_initialize_gdb_events (void)
|
||||||
|
{
|
||||||
|
#if WITH_GDB_EVENTS
|
||||||
|
queue_event_hooks.breakpoint_create = queue_breakpoint_create;
|
||||||
|
queue_event_hooks.breakpoint_delete = queue_breakpoint_delete;
|
||||||
|
queue_event_hooks.breakpoint_modify = queue_breakpoint_modify;
|
||||||
|
#endif
|
||||||
|
add_show_from_set (add_set_cmd ("eventdebug",
|
||||||
|
class_maintenance,
|
||||||
|
var_zinteger,
|
||||||
|
(char *)&gdb_events_debug,
|
||||||
|
"Set event debugging.\n\
|
||||||
|
When non-zero, event/notify debugging is enabled.", &setlist),
|
||||||
|
&showlist);
|
||||||
|
}
|
97
gdb/gdb-events.h
Normal file
97
gdb/gdb-events.h
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
/* User Interface Events.
|
||||||
|
Copyright 1999 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
Contributed by Cygnus Solutions.
|
||||||
|
|
||||||
|
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. */
|
||||||
|
|
||||||
|
/* Work in progress */
|
||||||
|
|
||||||
|
/* This file was created with the aid of ``gdb-events.sh''.
|
||||||
|
|
||||||
|
The bourn shell script ``gdb-events.sh'' creates the files
|
||||||
|
``new-gdb-events.c'' and ``new-gdb-events.h and then compares
|
||||||
|
them against the existing ``gdb-events.[hc]''. Any differences
|
||||||
|
found being reported.
|
||||||
|
|
||||||
|
If editing this file, please also run gdb-events.sh and merge any
|
||||||
|
changes into that script. Conversely, when making sweeping changes
|
||||||
|
to this file, modifying gdb-events.sh and using its output may
|
||||||
|
prove easier. */
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef GDB_EVENTS_H
|
||||||
|
#define GDB_EVENTS_H
|
||||||
|
|
||||||
|
#ifndef WITH_GDB_EVENTS
|
||||||
|
#define WITH_GDB_EVENTS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* COMPAT: pointer variables for old, unconverted events.
|
||||||
|
A call to set_gdb_events() will automatically update these. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Type definition of all hook functions.
|
||||||
|
Recommended pratice is to first declare each hook function using
|
||||||
|
the below ftype and then define it. */
|
||||||
|
|
||||||
|
typedef void (gdb_events_breakpoint_create_ftype) (int b);
|
||||||
|
typedef void (gdb_events_breakpoint_delete_ftype) (int b);
|
||||||
|
typedef void (gdb_events_breakpoint_modify_ftype) (int b);
|
||||||
|
|
||||||
|
|
||||||
|
/* gdb-events: object. */
|
||||||
|
|
||||||
|
struct gdb_events
|
||||||
|
{
|
||||||
|
gdb_events_breakpoint_create_ftype *breakpoint_create;
|
||||||
|
gdb_events_breakpoint_delete_ftype *breakpoint_delete;
|
||||||
|
gdb_events_breakpoint_modify_ftype *breakpoint_modify;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* Interface into events functions.
|
||||||
|
Where a *_p() predicate is present, it must called before calling
|
||||||
|
the hook proper. */
|
||||||
|
extern void breakpoint_create_event (int b);
|
||||||
|
extern void breakpoint_delete_event (int b);
|
||||||
|
extern void breakpoint_modify_event (int b);
|
||||||
|
|
||||||
|
|
||||||
|
/* When GDB_EVENTS are not being used, completly disable them. */
|
||||||
|
|
||||||
|
#if !WITH_GDB_EVENTS
|
||||||
|
#define breakpoint_create_event(b) 0
|
||||||
|
#define breakpoint_delete_event(b) 0
|
||||||
|
#define breakpoint_modify_event(b) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Install custom gdb-events hooks. */
|
||||||
|
extern void set_gdb_event_hooks (struct gdb_events *vector);
|
||||||
|
|
||||||
|
/* Deliver any pending events. */
|
||||||
|
extern void gdb_events_deliver (struct gdb_events *vector);
|
||||||
|
|
||||||
|
#if !WITH_GDB_EVENTS
|
||||||
|
#define set_gdb_events(x) 0
|
||||||
|
#define set_gdb_event_hooks(x) 0
|
||||||
|
#define gdb_events_deliver(x) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
568
gdb/gdb-events.sh
Executable file
568
gdb/gdb-events.sh
Executable file
|
@ -0,0 +1,568 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# User Interface Events.
|
||||||
|
# Copyright 1999 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# Contributed by Cygnus Solutions.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
#
|
||||||
|
# What happens next:
|
||||||
|
#
|
||||||
|
|
||||||
|
# The gdb-events.h/gdb-events.c files this script generates are commited
|
||||||
|
# and published.
|
||||||
|
|
||||||
|
# Any UI module that is installing events is changed so that the
|
||||||
|
# events are installed using the ``set_gdb_events()'' and
|
||||||
|
# ``gdb_event_hooks()'' interfaces. There could prove to be an issue
|
||||||
|
# here with respect to annotate. We might need to accomodate a hook
|
||||||
|
# stack that allows several ui blocks to install their own events.
|
||||||
|
|
||||||
|
# Each of the variable events (as currently generated) is converteded
|
||||||
|
# to either a straight function call or a function call with a
|
||||||
|
# predicate.
|
||||||
|
|
||||||
|
|
||||||
|
IFS=:
|
||||||
|
|
||||||
|
read="class returntype function formal actual attrib"
|
||||||
|
|
||||||
|
function_list ()
|
||||||
|
{
|
||||||
|
# category:
|
||||||
|
# # -> disable
|
||||||
|
# * -> compatibility - pointer variable that is initialized
|
||||||
|
# by set_gdb_events().
|
||||||
|
# ? -> Predicate and function proper.
|
||||||
|
# f -> always call (must have a void returntype)
|
||||||
|
# return-type
|
||||||
|
# name
|
||||||
|
# formal argument list
|
||||||
|
# actual argument list
|
||||||
|
# attributes
|
||||||
|
# description
|
||||||
|
cat <<EOF |
|
||||||
|
f:void:breakpoint_create:int b:b
|
||||||
|
f:void:breakpoint_delete:int b:b
|
||||||
|
f:void:breakpoint_modify:int b:b
|
||||||
|
#*:void:annotate_starting_hook:void
|
||||||
|
#*:void:annotate_stopped_hook:void
|
||||||
|
#*:void:annotate_signalled_hook:void
|
||||||
|
#*:void:annotate_signal_hook:void
|
||||||
|
#*:void:annotate_exited_hook:void
|
||||||
|
##*:void:print_register_hook:int
|
||||||
|
##*:CORE_ADDR:find_toc_address_hook:CORE_ADDR
|
||||||
|
##*:void:sparc_print_register_hook:int regno:regno
|
||||||
|
#*:void:target_resume_hook:void
|
||||||
|
#*:void:target_wait_loop_hook:void
|
||||||
|
#*:void:init_gdb_hook:char *argv0:argv0
|
||||||
|
#*:void:command_loop_hook:void
|
||||||
|
#*:void:fputs_unfiltered_hook:const char *linebuff,GDB_FILE *stream:linebuff, stream
|
||||||
|
#*:void:print_frame_info_listing_hook:struct symtab *s, int line, int stopline, int noerror:s, line, stopline, noerror
|
||||||
|
#*:int:query_hook:const char *query, va_list args:query, args
|
||||||
|
#*:void:warning_hook:const char *string, va_list args:string, args
|
||||||
|
#*:void:flush_hook:GDB_FILE *stream:stream
|
||||||
|
#*:void:target_output_hook:char *b:b
|
||||||
|
#*:void:interactive_hook:void
|
||||||
|
#*:void:registers_changed_hook:void
|
||||||
|
#*:void:readline_begin_hook:char *format, ...:format
|
||||||
|
#*:char *:readline_hook:char *prompt:prompt
|
||||||
|
#*:void:readline_end_hook:void
|
||||||
|
#*:void:register_changed_hook:int regno:regno
|
||||||
|
#*:void:memory_changed_hook:CORE_ADDR addr, int len:addr, len
|
||||||
|
#*:void:context_hook:int num:num
|
||||||
|
#*:int:target_wait_hook:int pid, struct target_waitstatus *status:pid, status
|
||||||
|
#*:void:call_command_hook:struct cmd_list_element *c, char *cmd, int from_tty:c, cmd, from_tty
|
||||||
|
#*:NORETURN void:error_hook:void:: ATTR_NORETURN
|
||||||
|
#*:void:error_begin_hook:void
|
||||||
|
##*:int:target_architecture_hook:const struct bfd_arch_info *
|
||||||
|
#*:void:exec_file_display_hook:char *filename:filename
|
||||||
|
#*:void:file_changed_hook:char *filename:filename
|
||||||
|
##*:void:specify_exec_file_hook:
|
||||||
|
#*:int:gdb_load_progress_hook:char *section, unsigned long num:section, num
|
||||||
|
#*:void:pre_add_symbol_hook:char *name:name
|
||||||
|
#*:void:post_add_symbol_hook:void
|
||||||
|
#*:void:selected_frame_level_changed_hook:int level:level
|
||||||
|
#*:int:gdb_loop_hook:int signo:signo
|
||||||
|
##*:void:solib_create_inferior_hook:void
|
||||||
|
##*:void:xcoff_relocate_symtab_hook:unsigned int
|
||||||
|
EOF
|
||||||
|
grep -v '^#'
|
||||||
|
}
|
||||||
|
|
||||||
|
copyright ()
|
||||||
|
{
|
||||||
|
cat <<EOF
|
||||||
|
/* User Interface Events.
|
||||||
|
Copyright 1999 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
Contributed by Cygnus Solutions.
|
||||||
|
|
||||||
|
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. */
|
||||||
|
|
||||||
|
/* Work in progress */
|
||||||
|
|
||||||
|
/* This file was created with the aid of \`\`gdb-events.sh''.
|
||||||
|
|
||||||
|
The bourn shell script \`\`gdb-events.sh'' creates the files
|
||||||
|
\`\`new-gdb-events.c'' and \`\`new-gdb-events.h and then compares
|
||||||
|
them against the existing \`\`gdb-events.[hc]''. Any differences
|
||||||
|
found being reported.
|
||||||
|
|
||||||
|
If editing this file, please also run gdb-events.sh and merge any
|
||||||
|
changes into that script. Conversely, when making sweeping changes
|
||||||
|
to this file, modifying gdb-events.sh and using its output may
|
||||||
|
prove easier. */
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# The .h file
|
||||||
|
#
|
||||||
|
|
||||||
|
exec > new-gdb-events.h
|
||||||
|
copyright
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
#ifndef GDB_EVENTS_H
|
||||||
|
#define GDB_EVENTS_H
|
||||||
|
|
||||||
|
#ifndef WITH_GDB_EVENTS
|
||||||
|
#define WITH_GDB_EVENTS 1
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# pointer declarations
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
cat <<EOF
|
||||||
|
/* COMPAT: pointer variables for old, unconverted events.
|
||||||
|
A call to set_gdb_events() will automatically update these. */
|
||||||
|
EOF
|
||||||
|
echo ""
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
case "${class}" in
|
||||||
|
"*" )
|
||||||
|
echo "extern ${returntype} (*${function}_event) (${formal})${attrib};"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# function typedef's
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
cat <<EOF
|
||||||
|
/* Type definition of all hook functions.
|
||||||
|
Recommended pratice is to first declare each hook function using
|
||||||
|
the below ftype and then define it. */
|
||||||
|
EOF
|
||||||
|
echo ""
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
echo "typedef ${returntype} (gdb_events_${function}_ftype) (${formal});"
|
||||||
|
done
|
||||||
|
|
||||||
|
# gdb_events object
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
cat <<EOF
|
||||||
|
/* gdb-events: object. */
|
||||||
|
EOF
|
||||||
|
echo ""
|
||||||
|
echo "struct gdb_events"
|
||||||
|
echo " {"
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
echo " gdb_events_${function}_ftype *${function}${attrib};"
|
||||||
|
done
|
||||||
|
echo " };"
|
||||||
|
|
||||||
|
# function declarations
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
cat <<EOF
|
||||||
|
/* Interface into events functions.
|
||||||
|
Where a *_p() predicate is present, it must called before calling
|
||||||
|
the hook proper. */
|
||||||
|
EOF
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
case "${class}" in
|
||||||
|
"*" ) continue ;;
|
||||||
|
"?" )
|
||||||
|
echo "extern int ${function}_p (void);"
|
||||||
|
echo "extern ${returntype} ${function}_event (${formal})${attrib};"
|
||||||
|
;;
|
||||||
|
"f" )
|
||||||
|
echo "extern ${returntype} ${function}_event (${formal})${attrib};"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# function macros
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
cat <<EOF
|
||||||
|
/* When GDB_EVENTS are not being used, completly disable them. */
|
||||||
|
EOF
|
||||||
|
echo ""
|
||||||
|
echo "#if !WITH_GDB_EVENTS"
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
case "${class}" in
|
||||||
|
"*" ) continue ;;
|
||||||
|
"?" )
|
||||||
|
echo "#define ${function}_event_p() 0"
|
||||||
|
echo "#define ${function}_event(${actual}) 0"
|
||||||
|
;;
|
||||||
|
"f" )
|
||||||
|
echo "#define ${function}_event(${actual}) 0"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo "#endif"
|
||||||
|
|
||||||
|
# our set function
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
/* Install custom gdb-events hooks. */
|
||||||
|
extern void set_gdb_event_hooks (struct gdb_events *vector);
|
||||||
|
|
||||||
|
/* Deliver any pending events. */
|
||||||
|
extern void gdb_events_deliver (struct gdb_events *vector);
|
||||||
|
|
||||||
|
#if !WITH_GDB_EVENTS
|
||||||
|
#define set_gdb_events(x) 0
|
||||||
|
#define set_gdb_event_hooks(x) 0
|
||||||
|
#define gdb_events_deliver(x) 0
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# close it off
|
||||||
|
echo ""
|
||||||
|
echo "#endif"
|
||||||
|
exec 1>&2
|
||||||
|
#../move-if-change new-gdb-events.h gdb-events.h
|
||||||
|
if ! test -r gdb-events.h
|
||||||
|
then
|
||||||
|
echo "File missing? mv new-gdb-events.h gdb-events.h" 1>&2
|
||||||
|
elif ! diff -c gdb-events.h new-gdb-events.h
|
||||||
|
then
|
||||||
|
echo "gdb-events.h changed? cp new-gdb-events.h gdb-events.h" 1>&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# C file
|
||||||
|
#
|
||||||
|
|
||||||
|
exec > new-gdb-events.c
|
||||||
|
copyright
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
#include "defs.h"
|
||||||
|
#include "gdb-events.h"
|
||||||
|
#include "gdbcmd.h"
|
||||||
|
|
||||||
|
#undef XMALLOC
|
||||||
|
#define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
|
||||||
|
|
||||||
|
#if WITH_GDB_EVENTS
|
||||||
|
static struct gdb_events null_event_hooks;
|
||||||
|
static struct gdb_events queue_event_hooks;
|
||||||
|
static struct gdb_events *current_event_hooks = &null_event_hooks;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int gdb_events_debug;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# global pointer variables - always have this
|
||||||
|
#echo ""
|
||||||
|
#function_list | while eval read $read
|
||||||
|
#do
|
||||||
|
# case "${class}" in
|
||||||
|
# "*" )
|
||||||
|
# echo "${returntype} (*${function}_event) (${formal})${attrib} = 0;"
|
||||||
|
# ;;
|
||||||
|
# esac
|
||||||
|
#done
|
||||||
|
|
||||||
|
# function bodies
|
||||||
|
echo ""
|
||||||
|
echo "#if WITH_GDB_EVENTS"
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
case "${class}" in
|
||||||
|
"*" ) continue ;;
|
||||||
|
"?" )
|
||||||
|
echo ""
|
||||||
|
echo "int"
|
||||||
|
echo "${function}_event_p (${formal})"
|
||||||
|
echo "{"
|
||||||
|
echo " return current_event_hooks->${function};"
|
||||||
|
echo "}"
|
||||||
|
echo ""
|
||||||
|
echo "${returntype}"
|
||||||
|
echo "${function}_event (${formal})"
|
||||||
|
echo "{"
|
||||||
|
echo " return current_events->${function} (${actual});"
|
||||||
|
echo "}"
|
||||||
|
;;
|
||||||
|
"f" )
|
||||||
|
echo ""
|
||||||
|
echo "void"
|
||||||
|
echo "${function}_event (${formal})"
|
||||||
|
echo "{"
|
||||||
|
echo " if (gdb_events_debug)"
|
||||||
|
echo " fprintf_unfiltered (gdb_stdlog, \"${function}_event\\n\");"
|
||||||
|
echo " if (!current_event_hooks->${function})"
|
||||||
|
echo " return;"
|
||||||
|
echo " current_event_hooks->${function} (${actual});"
|
||||||
|
echo "}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
echo "#endif"
|
||||||
|
|
||||||
|
# Set hooks function
|
||||||
|
echo ""
|
||||||
|
cat <<EOF
|
||||||
|
#if WITH_GDB_EVENTS
|
||||||
|
void
|
||||||
|
set_gdb_event_hooks (struct gdb_events *vector)
|
||||||
|
{
|
||||||
|
if (vector == NULL)
|
||||||
|
current_event_hooks = &queue_event_hooks;
|
||||||
|
else
|
||||||
|
current_event_hooks = vector;
|
||||||
|
EOF
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
case "${class}" in
|
||||||
|
"*" )
|
||||||
|
echo " ${function}_event = hooks->${function};"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
cat <<EOF
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# event type
|
||||||
|
echo ""
|
||||||
|
cat <<EOF
|
||||||
|
enum gdb_event
|
||||||
|
{
|
||||||
|
EOF
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
case "${class}" in
|
||||||
|
"f" )
|
||||||
|
echo " ${function},"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
cat <<EOF
|
||||||
|
nr_gdb_events
|
||||||
|
};
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# event data
|
||||||
|
echo ""
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
case "${class}" in
|
||||||
|
"f" )
|
||||||
|
echo "struct ${function}"
|
||||||
|
echo " {"
|
||||||
|
echo " `echo ${formal} | tr '[,]' '[;]'`;"
|
||||||
|
echo " };"
|
||||||
|
echo ""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# event queue
|
||||||
|
cat <<EOF
|
||||||
|
struct event
|
||||||
|
{
|
||||||
|
enum gdb_event type;
|
||||||
|
struct event *next;
|
||||||
|
union
|
||||||
|
{
|
||||||
|
EOF
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
case "${class}" in
|
||||||
|
"f" )
|
||||||
|
echo " struct ${function} ${function};"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
cat <<EOF
|
||||||
|
}
|
||||||
|
data;
|
||||||
|
};
|
||||||
|
struct event *pending_events;
|
||||||
|
struct event *delivering_events;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# append
|
||||||
|
echo ""
|
||||||
|
cat <<EOF
|
||||||
|
static void
|
||||||
|
append (struct event *new_event)
|
||||||
|
{
|
||||||
|
struct event **event = &pending_events;
|
||||||
|
while ((*event) != NULL)
|
||||||
|
event = &((*event)->next);
|
||||||
|
(*event) = new_event;
|
||||||
|
(*event)->next = NULL;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# schedule a given event
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
case "${class}" in
|
||||||
|
"f" )
|
||||||
|
echo ""
|
||||||
|
echo "static void"
|
||||||
|
echo "queue_${function} (${formal})"
|
||||||
|
echo "{"
|
||||||
|
echo " struct event *event = XMALLOC (struct event);"
|
||||||
|
echo " event->type = ${function};"
|
||||||
|
for arg in `echo ${actual} | tr '[,]' '[ ]'`; do
|
||||||
|
echo " event->data.${function}.${arg} = ${arg};"
|
||||||
|
done
|
||||||
|
echo " append (event);"
|
||||||
|
echo "}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# deliver
|
||||||
|
echo ""
|
||||||
|
cat <<EOF
|
||||||
|
void
|
||||||
|
gdb_events_deliver (struct gdb_events *vector)
|
||||||
|
{
|
||||||
|
/* Just zap any events left around from last time. */
|
||||||
|
while (delivering_events != NULL)
|
||||||
|
{
|
||||||
|
struct event *event = delivering_events;
|
||||||
|
delivering_events = event->next;
|
||||||
|
free (event);
|
||||||
|
}
|
||||||
|
/* Process any pending events. Because one of the deliveries could
|
||||||
|
bail out we move everything off of the pending queue onto an
|
||||||
|
in-progress queue where it can, later, be cleaned up if
|
||||||
|
necessary. */
|
||||||
|
delivering_events = pending_events;
|
||||||
|
pending_events = NULL;
|
||||||
|
while (delivering_events != NULL)
|
||||||
|
{
|
||||||
|
struct event *event = delivering_events;
|
||||||
|
switch (event->type)
|
||||||
|
{
|
||||||
|
EOF
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
case "${class}" in
|
||||||
|
"f" )
|
||||||
|
echo " case ${function}:"
|
||||||
|
echo " vector->${function}"
|
||||||
|
sep=" ("
|
||||||
|
ass=""
|
||||||
|
for arg in `echo ${actual} | tr '[,]' '[ ]'`; do
|
||||||
|
ass="${ass}${sep}event->data.${function}.${arg}"
|
||||||
|
sep=",
|
||||||
|
"
|
||||||
|
done
|
||||||
|
echo "${ass});"
|
||||||
|
echo " break;"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
cat <<EOF
|
||||||
|
}
|
||||||
|
delivering_events = event->next;
|
||||||
|
free (event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Finally the initialization
|
||||||
|
echo ""
|
||||||
|
cat <<EOF
|
||||||
|
void _initialize_gdb_events (void);
|
||||||
|
void
|
||||||
|
_initialize_gdb_events (void)
|
||||||
|
{
|
||||||
|
#if WITH_GDB_EVENTS
|
||||||
|
EOF
|
||||||
|
function_list | while eval read $read
|
||||||
|
do
|
||||||
|
case "${class}" in
|
||||||
|
"f" )
|
||||||
|
echo " queue_event_hooks.${function} = queue_${function};"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
cat <<EOF
|
||||||
|
#endif
|
||||||
|
add_show_from_set (add_set_cmd ("eventdebug",
|
||||||
|
class_maintenance,
|
||||||
|
var_zinteger,
|
||||||
|
(char *)&gdb_events_debug,
|
||||||
|
"Set event debugging.\n\\
|
||||||
|
When non-zero, event/notify debugging is enabled.", &setlist),
|
||||||
|
&showlist);
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# close things off
|
||||||
|
exec 1>&2
|
||||||
|
#../move-if-change new-gdb-events.c gdb-events.c
|
||||||
|
if ! test -r gdb-events.c
|
||||||
|
then
|
||||||
|
echo "File missing? mv new-gdb-events.c gdb-events.c" 1>&2
|
||||||
|
elif ! diff -c gdb-events.c new-gdb-events.c
|
||||||
|
then
|
||||||
|
echo "gdb-events.c changed? cp new-gdb-events.c gdb-events.c" 1>&2
|
||||||
|
fi
|
653
gdb/gdbarch.c
653
gdb/gdbarch.c
File diff suppressed because it is too large
Load diff
478
gdb/gdbarch.h
478
gdb/gdbarch.h
File diff suppressed because it is too large
Load diff
1858
gdb/gdbarch.sh
Executable file
1858
gdb/gdbarch.sh
Executable file
File diff suppressed because it is too large
Load diff
|
@ -34,7 +34,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <dpmi.h>
|
#include <dpmi.h>
|
||||||
#include <debug/v2load.h>
|
#include <debug/v2load.h>
|
||||||
|
|
|
@ -75,7 +75,6 @@ static struct partial_symtab *hpread_end_psymtab
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
/* check for the existance of a file, given its full pathname */
|
/* check for the existance of a file, given its full pathname */
|
||||||
int
|
int
|
||||||
|
|
106
gdb/hppa-tdep.c
106
gdb/hppa-tdep.c
|
@ -58,9 +58,6 @@
|
||||||
#include "symfile.h"
|
#include "symfile.h"
|
||||||
#include "objfiles.h"
|
#include "objfiles.h"
|
||||||
|
|
||||||
/* To support asking "What CPU is this?" */
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
/* To support detection of the pseudo-initial frame
|
/* To support detection of the pseudo-initial frame
|
||||||
that threads have. */
|
that threads have. */
|
||||||
#define THREAD_INITIAL_FRAME_SYMBOL "__pthread_exit"
|
#define THREAD_INITIAL_FRAME_SYMBOL "__pthread_exit"
|
||||||
|
@ -159,7 +156,7 @@ hppa_use_struct_convention (gcc_p, type)
|
||||||
int gcc_p;
|
int gcc_p;
|
||||||
struct type *type;
|
struct type *type;
|
||||||
{
|
{
|
||||||
return (TYPE_LENGTH (type) > 8);
|
return (TYPE_LENGTH (type) > 2 * REGISTER_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -458,8 +455,8 @@ read_unwind_info (objfile)
|
||||||
|
|
||||||
if (elf_unwind_sec)
|
if (elf_unwind_sec)
|
||||||
{
|
{
|
||||||
elf_unwind_size = bfd_section_size (objfile->obfd, elf_unwind_sec); /* purecov: deadcode */
|
elf_unwind_size = bfd_section_size (objfile->obfd, elf_unwind_sec);
|
||||||
elf_unwind_entries = elf_unwind_size / UNWIND_ENTRY_SIZE; /* purecov: deadcode */
|
elf_unwind_entries = elf_unwind_size / UNWIND_ENTRY_SIZE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -576,7 +573,7 @@ find_unwind_entry (pc)
|
||||||
{
|
{
|
||||||
read_unwind_info (objfile);
|
read_unwind_info (objfile);
|
||||||
if (objfile->obj_private == NULL)
|
if (objfile->obj_private == NULL)
|
||||||
error ("Internal error reading unwind information."); /* purecov: deadcode */
|
error ("Internal error reading unwind information.");
|
||||||
ui = ((obj_private_data_t *) (objfile->obj_private))->unwind_info;
|
ui = ((obj_private_data_t *) (objfile->obj_private))->unwind_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,7 +649,9 @@ pc_in_interrupt_handler (pc)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called when no unwind descriptor was found for PC. Returns 1 if it
|
/* Called when no unwind descriptor was found for PC. Returns 1 if it
|
||||||
appears that PC is in a linker stub. */
|
appears that PC is in a linker stub.
|
||||||
|
|
||||||
|
?!? Need to handle stubs which appear in PA64 code. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
pc_in_linker_stub (pc)
|
pc_in_linker_stub (pc)
|
||||||
|
@ -866,6 +865,27 @@ hppa_frame_saved_pc (frame)
|
||||||
return read_memory_integer (frame->frame + PC_REGNUM * 4,
|
return read_memory_integer (frame->frame + PC_REGNUM * 4,
|
||||||
TARGET_PTR_BIT / 8) & ~0x3;
|
TARGET_PTR_BIT / 8) & ~0x3;
|
||||||
|
|
||||||
|
if ((frame->pc >= frame->frame
|
||||||
|
&& frame->pc <= (frame->frame
|
||||||
|
/* A call dummy is sized in words, but it is
|
||||||
|
actually a series of instructions. Account
|
||||||
|
for that scaling factor. */
|
||||||
|
+ ((REGISTER_SIZE / INSTRUCTION_SIZE)
|
||||||
|
* CALL_DUMMY_LENGTH)
|
||||||
|
/* Similarly we have to account for 64bit
|
||||||
|
wide register saves. */
|
||||||
|
+ (32 * REGISTER_SIZE)
|
||||||
|
/* We always consider FP regs 8 bytes long. */
|
||||||
|
+ (NUM_REGS - FP0_REGNUM) * 8
|
||||||
|
/* Similarly we have to account for 64bit
|
||||||
|
wide register saves. */
|
||||||
|
+ (6 * REGISTER_SIZE))))
|
||||||
|
{
|
||||||
|
return read_memory_integer ((frame->frame
|
||||||
|
+ (TARGET_PTR_BIT == 64 ? -16 : -20)),
|
||||||
|
TARGET_PTR_BIT / 8) & ~0x3;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef FRAME_SAVED_PC_IN_SIGTRAMP
|
#ifdef FRAME_SAVED_PC_IN_SIGTRAMP
|
||||||
/* Deal with signal handler caller frames too. */
|
/* Deal with signal handler caller frames too. */
|
||||||
if (frame->signal_handler_caller)
|
if (frame->signal_handler_caller)
|
||||||
|
@ -1890,7 +1910,7 @@ find_stub_with_shl_get (function, handle)
|
||||||
|
|
||||||
target_read_memory (value_return_addr, (char *) &stub_addr, sizeof (stub_addr));
|
target_read_memory (value_return_addr, (char *) &stub_addr, sizeof (stub_addr));
|
||||||
if (stub_addr <= 0)
|
if (stub_addr <= 0)
|
||||||
error ("call to __d_shl_get failed, error code is %d", err_value); /* purecov: deadcode */
|
error ("call to __d_shl_get failed, error code is %d", err_value);
|
||||||
|
|
||||||
return (stub_addr);
|
return (stub_addr);
|
||||||
}
|
}
|
||||||
|
@ -2820,6 +2840,10 @@ in_solib_call_trampoline (pc, name)
|
||||||
if (pc == dyncall || pc == sr4export)
|
if (pc == dyncall || pc == sr4export)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
minsym = lookup_minimal_symbol_by_pc (pc);
|
||||||
|
if (minsym && strcmp (SYMBOL_NAME (minsym), ".stub") == 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* Get the unwind descriptor corresponding to PC, return zero
|
/* Get the unwind descriptor corresponding to PC, return zero
|
||||||
if no unwind was found. */
|
if no unwind was found. */
|
||||||
u = find_unwind_entry (pc);
|
u = find_unwind_entry (pc);
|
||||||
|
@ -2865,12 +2889,12 @@ in_solib_call_trampoline (pc, name)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Should never happen. */
|
/* Should never happen. */
|
||||||
warning ("Unable to find branch in parameter relocation stub.\n"); /* purecov: deadcode */
|
warning ("Unable to find branch in parameter relocation stub.\n");
|
||||||
return 0; /* purecov: deadcode */
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unknown stub type. For now, just return zero. */
|
/* Unknown stub type. For now, just return zero. */
|
||||||
return 0; /* purecov: deadcode */
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return one if PC is in the return path of a trampoline, else return zero.
|
/* Return one if PC is in the return path of a trampoline, else return zero.
|
||||||
|
@ -2927,12 +2951,12 @@ in_solib_return_trampoline (pc, name)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Should never happen. */
|
/* Should never happen. */
|
||||||
warning ("Unable to find branch in parameter relocation stub.\n"); /* purecov: deadcode */
|
warning ("Unable to find branch in parameter relocation stub.\n");
|
||||||
return 0; /* purecov: deadcode */
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unknown stub type. For now, just return zero. */
|
/* Unknown stub type. For now, just return zero. */
|
||||||
return 0; /* purecov: deadcode */
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3246,6 +3270,10 @@ prologue_inst_adjust_sp (inst)
|
||||||
if ((inst & 0xffe00000) == 0x6fc00000)
|
if ((inst & 0xffe00000) == 0x6fc00000)
|
||||||
return extract_14 (inst);
|
return extract_14 (inst);
|
||||||
|
|
||||||
|
/* std,ma X,D(sp) */
|
||||||
|
if ((inst & 0xffe00008) == 0x73c00008)
|
||||||
|
return (inst & 0x1 ? -1 << 16 : 0) | (((inst >> 4) & 0x3ff) << 3);
|
||||||
|
|
||||||
/* addil high21,%r1; ldo low11,(%r1),%r30)
|
/* addil high21,%r1; ldo low11,(%r1),%r30)
|
||||||
save high bits in save_high21 for later use. */
|
save high bits in save_high21 for later use. */
|
||||||
if ((inst & 0xffe00000) == 0x28200000)
|
if ((inst & 0xffe00000) == 0x28200000)
|
||||||
|
@ -3461,9 +3489,10 @@ restart:
|
||||||
if (inst == 0x6bc23fd9 || inst == 0x0fc212c1)
|
if (inst == 0x6bc23fd9 || inst == 0x0fc212c1)
|
||||||
save_rp = 0;
|
save_rp = 0;
|
||||||
|
|
||||||
/* This is the only way we save SP into the stack. At this time
|
/* These are the only ways we save SP into the stack. At this time
|
||||||
the HP compilers never bother to save SP into the stack. */
|
the HP compilers never bother to save SP into the stack. */
|
||||||
if ((inst & 0xffffc000) == 0x6fc10000)
|
if ((inst & 0xffffc000) == 0x6fc10000
|
||||||
|
|| (inst & 0xffffc00c) == 0x73c10008)
|
||||||
save_sp = 0;
|
save_sp = 0;
|
||||||
|
|
||||||
/* Account for general and floating-point register saves. */
|
/* Account for general and floating-point register saves. */
|
||||||
|
@ -3788,17 +3817,22 @@ hppa_frame_find_saved_regs (frame_info, frame_saved_regs)
|
||||||
/* Note the interesting effects of this instruction. */
|
/* Note the interesting effects of this instruction. */
|
||||||
stack_remaining -= prologue_inst_adjust_sp (inst);
|
stack_remaining -= prologue_inst_adjust_sp (inst);
|
||||||
|
|
||||||
/* There is only one instruction used for saving RP into the stack. */
|
/* There are limited ways to store the return pointer into the
|
||||||
if (inst == 0x6bc23fd9)
|
stack. */
|
||||||
|
if (inst == 0x6bc23fd9 || inst == 0x0fc212c1)
|
||||||
{
|
{
|
||||||
save_rp = 0;
|
save_rp = 0;
|
||||||
frame_saved_regs->regs[RP_REGNUM] = frame_info->frame - 20;
|
frame_saved_regs->regs[RP_REGNUM] = frame_info->frame - 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Just note that we found the save of SP into the stack. The
|
/* Note if we saved SP into the stack. This also happens to indicate
|
||||||
value for frame_saved_regs was computed above. */
|
the location of the saved frame pointer. */
|
||||||
if ((inst & 0xffffc000) == 0x6fc10000)
|
if ((inst & 0xffffc000) == 0x6fc10000
|
||||||
save_sp = 0;
|
|| (inst & 0xffffc00c) == 0x73c10008)
|
||||||
|
{
|
||||||
|
frame_saved_regs->regs[FP_REGNUM] = frame_info->frame;
|
||||||
|
save_sp = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Account for general and floating-point register saves. */
|
/* Account for general and floating-point register saves. */
|
||||||
reg = inst_saves_gr (inst);
|
reg = inst_saves_gr (inst);
|
||||||
|
@ -3811,16 +3845,28 @@ hppa_frame_find_saved_regs (frame_info, frame_saved_regs)
|
||||||
if ((inst >> 26) == 0x1b
|
if ((inst >> 26) == 0x1b
|
||||||
&& extract_14 (inst) >= 0)
|
&& extract_14 (inst) >= 0)
|
||||||
frame_saved_regs->regs[reg] = frame_info->frame;
|
frame_saved_regs->regs[reg] = frame_info->frame;
|
||||||
|
/* A std has explicit post_modify forms. */
|
||||||
|
else if ((inst & 0xfc00000c0) == 0x70000008)
|
||||||
|
frame_saved_regs->regs[reg] = frame_info->frame;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
CORE_ADDR offset;
|
||||||
|
|
||||||
|
if ((inst >> 26) == 0x1c)
|
||||||
|
offset = (inst & 0x1 ? -1 << 16 : 0) | (((inst >> 4) & 0x3ff) << 3);
|
||||||
|
else if ((inst >> 26) == 0x03)
|
||||||
|
offset = low_sign_extend (inst & 0x1f, 5);
|
||||||
|
else
|
||||||
|
offset = extract_14 (inst);
|
||||||
|
|
||||||
/* Handle code with and without frame pointers. */
|
/* Handle code with and without frame pointers. */
|
||||||
if (u->Save_SP)
|
if (u->Save_SP)
|
||||||
frame_saved_regs->regs[reg]
|
frame_saved_regs->regs[reg]
|
||||||
= frame_info->frame + extract_14 (inst);
|
= frame_info->frame + offset;
|
||||||
else
|
else
|
||||||
frame_saved_regs->regs[reg]
|
frame_saved_regs->regs[reg]
|
||||||
= frame_info->frame + (u->Total_frame_size << 3)
|
= (frame_info->frame + (u->Total_frame_size << 3)
|
||||||
+ extract_14 (inst);
|
+ offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4219,8 +4265,8 @@ child_enable_exception_callback (kind, enable)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
warning ("Internal error: Invalid inferior pid? Cannot intercept exception events."); /* purecov: deadcode */
|
warning ("Internal error: Invalid inferior pid? Cannot intercept exception events.");
|
||||||
return (struct symtab_and_line *) -1; /* purecov: deadcode */
|
return (struct symtab_and_line *) -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4242,8 +4288,8 @@ child_enable_exception_callback (kind, enable)
|
||||||
return (struct symtab_and_line *) -1;
|
return (struct symtab_and_line *) -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: /* purecov: deadcode */
|
default:
|
||||||
error ("Request to enable unknown or unsupported exception event."); /* purecov: deadcode */
|
error ("Request to enable unknown or unsupported exception event.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy break address into new sal struct, malloc'ing if needed. */
|
/* Copy break address into new sal struct, malloc'ing if needed. */
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
|
||||||
|
|
127
gdb/i386-stub.c
127
gdb/i386-stub.c
|
@ -456,65 +456,82 @@ char ch;
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* scan for the sequence $<data>#<checksum> */
|
/* scan for the sequence $<data>#<checksum> */
|
||||||
void getpacket(buffer)
|
|
||||||
char * buffer;
|
unsigned char *
|
||||||
|
getpacket (buffer)
|
||||||
|
unsigned char *buffer;
|
||||||
{
|
{
|
||||||
unsigned char checksum;
|
unsigned char checksum;
|
||||||
unsigned char xmitcsum;
|
unsigned char xmitcsum;
|
||||||
int i;
|
int count;
|
||||||
int count;
|
|
||||||
char ch;
|
char ch;
|
||||||
|
|
||||||
do {
|
while (1)
|
||||||
/* wait around for the start character, ignore all other characters */
|
{
|
||||||
while ((ch = (getDebugChar() & 0x7f)) != '$');
|
/* wait around for the start character, ignore all other characters */
|
||||||
checksum = 0;
|
while ((ch = getDebugChar ()) != '$')
|
||||||
xmitcsum = -1;
|
;
|
||||||
|
|
||||||
count = 0;
|
retry:
|
||||||
|
checksum = 0;
|
||||||
|
xmitcsum = -1;
|
||||||
|
count = 0;
|
||||||
|
|
||||||
/* now, read until a # or end of buffer is found */
|
/* now, read until a # or end of buffer is found */
|
||||||
while (count < BUFMAX) {
|
while (count < BUFMAX)
|
||||||
ch = getDebugChar() & 0x7f;
|
{
|
||||||
if (ch == '#') break;
|
ch = getDebugChar ();
|
||||||
checksum = checksum + ch;
|
if (ch == '$')
|
||||||
buffer[count] = ch;
|
goto retry;
|
||||||
count = count + 1;
|
if (ch == '#')
|
||||||
}
|
break;
|
||||||
buffer[count] = 0;
|
checksum = checksum + ch;
|
||||||
|
buffer[count] = ch;
|
||||||
|
count = count + 1;
|
||||||
|
}
|
||||||
|
buffer[count] = 0;
|
||||||
|
|
||||||
if (ch == '#') {
|
if (ch == '#')
|
||||||
xmitcsum = hex(getDebugChar() & 0x7f) << 4;
|
{
|
||||||
xmitcsum += hex(getDebugChar() & 0x7f);
|
ch = getDebugChar ();
|
||||||
if ((remote_debug ) && (checksum != xmitcsum)) {
|
xmitcsum = hex (ch) << 4;
|
||||||
fprintf (stderr ,"bad checksum. My count = 0x%x, sent=0x%x. buf=%s\n",
|
ch = getDebugChar ();
|
||||||
checksum,xmitcsum,buffer);
|
xmitcsum += hex (ch);
|
||||||
}
|
|
||||||
|
|
||||||
if (checksum != xmitcsum) putDebugChar('-'); /* failed checksum */
|
if (checksum != xmitcsum)
|
||||||
else {
|
{
|
||||||
putDebugChar('+'); /* successful transfer */
|
if (remote_debug)
|
||||||
/* if a sequence char is present, reply the sequence ID */
|
{
|
||||||
if (buffer[2] == ':') {
|
fprintf (stderr,
|
||||||
putDebugChar( buffer[0] );
|
"bad checksum. My count = 0x%x, sent=0x%x. buf=%s\n",
|
||||||
putDebugChar( buffer[1] );
|
checksum, xmitcsum, buffer);
|
||||||
/* remove sequence chars from buffer */
|
}
|
||||||
count = strlen(buffer);
|
putDebugChar ('-'); /* failed checksum */
|
||||||
for (i=3; i <= count; i++) buffer[i-3] = buffer[i];
|
}
|
||||||
}
|
else
|
||||||
}
|
{
|
||||||
|
putDebugChar ('+'); /* successful transfer */
|
||||||
|
|
||||||
|
/* if a sequence char is present, reply the sequence ID */
|
||||||
|
if (buffer[2] == ':')
|
||||||
|
{
|
||||||
|
putDebugChar (buffer[0]);
|
||||||
|
putDebugChar (buffer[1]);
|
||||||
|
|
||||||
|
return &buffer[3];
|
||||||
|
}
|
||||||
|
|
||||||
|
return &buffer[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} while (checksum != xmitcsum);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send the packet in buffer. */
|
/* send the packet in buffer. */
|
||||||
|
|
||||||
|
|
||||||
void putpacket(buffer)
|
void putpacket(buffer)
|
||||||
char * buffer;
|
unsigned char *buffer;
|
||||||
{
|
{
|
||||||
unsigned char checksum;
|
unsigned char checksum;
|
||||||
int count;
|
int count;
|
||||||
|
@ -536,7 +553,7 @@ char * buffer;
|
||||||
putDebugChar(hexchars[checksum >> 4]);
|
putDebugChar(hexchars[checksum >> 4]);
|
||||||
putDebugChar(hexchars[checksum % 16]);
|
putDebugChar(hexchars[checksum % 16]);
|
||||||
|
|
||||||
} while ((getDebugChar() & 0x7f) != '+');
|
} while (getDebugChar() != '+');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -698,7 +715,7 @@ int hexToInt(char **ptr, int *intValue)
|
||||||
*/
|
*/
|
||||||
void handle_exception(int exceptionVector)
|
void handle_exception(int exceptionVector)
|
||||||
{
|
{
|
||||||
int sigval;
|
int sigval, stepping;
|
||||||
int addr, length;
|
int addr, length;
|
||||||
char * ptr;
|
char * ptr;
|
||||||
int newPC;
|
int newPC;
|
||||||
|
@ -719,11 +736,14 @@ void handle_exception(int exceptionVector)
|
||||||
|
|
||||||
putpacket(remcomOutBuffer);
|
putpacket(remcomOutBuffer);
|
||||||
|
|
||||||
|
stepping = 0;
|
||||||
|
|
||||||
while (1==1) {
|
while (1==1) {
|
||||||
error = 0;
|
error = 0;
|
||||||
remcomOutBuffer[0] = 0;
|
remcomOutBuffer[0] = 0;
|
||||||
getpacket(remcomInBuffer);
|
ptr = getpacket(remcomInBuffer);
|
||||||
switch (remcomInBuffer[0]) {
|
|
||||||
|
switch (*ptr++) {
|
||||||
case '?' : remcomOutBuffer[0] = 'S';
|
case '?' : remcomOutBuffer[0] = 'S';
|
||||||
remcomOutBuffer[1] = hexchars[sigval >> 4];
|
remcomOutBuffer[1] = hexchars[sigval >> 4];
|
||||||
remcomOutBuffer[2] = hexchars[sigval % 16];
|
remcomOutBuffer[2] = hexchars[sigval % 16];
|
||||||
|
@ -735,14 +755,13 @@ void handle_exception(int exceptionVector)
|
||||||
mem2hex((char*) registers, remcomOutBuffer, NUMREGBYTES, 0);
|
mem2hex((char*) registers, remcomOutBuffer, NUMREGBYTES, 0);
|
||||||
break;
|
break;
|
||||||
case 'G' : /* set the value of the CPU registers - return OK */
|
case 'G' : /* set the value of the CPU registers - return OK */
|
||||||
hex2mem(&remcomInBuffer[1], (char*) registers, NUMREGBYTES, 0);
|
hex2mem(ptr, (char*) registers, NUMREGBYTES, 0);
|
||||||
strcpy(remcomOutBuffer,"OK");
|
strcpy(remcomOutBuffer,"OK");
|
||||||
break;
|
break;
|
||||||
case 'P' : /* set the value of a single CPU register - return OK */
|
case 'P' : /* set the value of a single CPU register - return OK */
|
||||||
{
|
{
|
||||||
int regno;
|
int regno;
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt (&ptr, ®no) && *ptr++ == '=')
|
if (hexToInt (&ptr, ®no) && *ptr++ == '=')
|
||||||
if (regno >= 0 && regno < NUMREGS)
|
if (regno >= 0 && regno < NUMREGS)
|
||||||
{
|
{
|
||||||
|
@ -758,7 +777,6 @@ void handle_exception(int exceptionVector)
|
||||||
/* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
|
/* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
|
||||||
case 'm' :
|
case 'm' :
|
||||||
/* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
|
/* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr,&addr))
|
if (hexToInt(&ptr,&addr))
|
||||||
if (*(ptr++) == ',')
|
if (*(ptr++) == ',')
|
||||||
if (hexToInt(&ptr,&length))
|
if (hexToInt(&ptr,&length))
|
||||||
|
@ -775,14 +793,12 @@ void handle_exception(int exceptionVector)
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
strcpy(remcomOutBuffer,"E01");
|
strcpy(remcomOutBuffer,"E01");
|
||||||
debug_error("malformed read memory command: %s",remcomInBuffer);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
|
/* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
|
||||||
case 'M' :
|
case 'M' :
|
||||||
/* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
|
/* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr,&addr))
|
if (hexToInt(&ptr,&addr))
|
||||||
if (*(ptr++) == ',')
|
if (*(ptr++) == ',')
|
||||||
if (hexToInt(&ptr,&length))
|
if (hexToInt(&ptr,&length))
|
||||||
|
@ -803,16 +819,15 @@ void handle_exception(int exceptionVector)
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
strcpy(remcomOutBuffer,"E02");
|
strcpy(remcomOutBuffer,"E02");
|
||||||
debug_error("malformed write memory command: %s",remcomInBuffer);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* cAA..AA Continue at address AA..AA(optional) */
|
/* cAA..AA Continue at address AA..AA(optional) */
|
||||||
/* sAA..AA Step one instruction from AA..AA(optional) */
|
/* sAA..AA Step one instruction from AA..AA(optional) */
|
||||||
case 'c' :
|
|
||||||
case 's' :
|
case 's' :
|
||||||
|
stepping = 1;
|
||||||
|
case 'c' :
|
||||||
/* try to read optional parameter, pc unchanged if no parm */
|
/* try to read optional parameter, pc unchanged if no parm */
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr,&addr))
|
if (hexToInt(&ptr,&addr))
|
||||||
registers[ PC ] = addr;
|
registers[ PC ] = addr;
|
||||||
|
|
||||||
|
@ -822,7 +837,7 @@ void handle_exception(int exceptionVector)
|
||||||
registers[ PS ] &= 0xfffffeff;
|
registers[ PS ] &= 0xfffffeff;
|
||||||
|
|
||||||
/* set the trace bit if we're stepping */
|
/* set the trace bit if we're stepping */
|
||||||
if (remcomInBuffer[0] == 's') registers[ PS ] |= 0x100;
|
if (stepping) registers[ PS ] |= 0x100;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we found a match for the PC AND we are not returning
|
* If we found a match for the PC AND we are not returning
|
||||||
|
|
|
@ -36,9 +36,7 @@
|
||||||
control to the inferior which you don't want showing up in your
|
control to the inferior which you don't want showing up in your
|
||||||
control variables. */
|
control variables. */
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
struct inferior_status;
|
struct inferior_status;
|
||||||
#endif
|
|
||||||
|
|
||||||
extern struct inferior_status *save_inferior_status PARAMS ((int));
|
extern struct inferior_status *save_inferior_status PARAMS ((int));
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,6 @@
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SYS_SELECT_H
|
#ifdef HAVE_SYS_SELECT_H
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
306
gdb/infrun.c
306
gdb/infrun.c
|
@ -1136,6 +1136,10 @@ void init_execution_control_state (struct execution_control_state * ecs);
|
||||||
|
|
||||||
void handle_inferior_event (struct execution_control_state * ecs);
|
void handle_inferior_event (struct execution_control_state * ecs);
|
||||||
|
|
||||||
|
static void check_sigtramp2 (struct execution_control_state *ecs);
|
||||||
|
static void stop_stepping (struct execution_control_state *ecs);
|
||||||
|
static void prepare_to_wait (struct execution_control_state *ecs);
|
||||||
|
|
||||||
/* Wait for control to return from inferior to debugger.
|
/* Wait for control to return from inferior to debugger.
|
||||||
If inferior gets a signal, we may decide to start it up again
|
If inferior gets a signal, we may decide to start it up again
|
||||||
instead of returning. That is why there is a loop in this function.
|
instead of returning. That is why there is a loop in this function.
|
||||||
|
@ -1337,7 +1341,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
else
|
else
|
||||||
target_resume (-1, 0, TARGET_SIGNAL_0);
|
target_resume (-1, 0, TARGET_SIGNAL_0);
|
||||||
ecs->infwait_state = infwait_normal_state;
|
ecs->infwait_state = infwait_normal_state;
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
|
|
||||||
case infwait_nullified_state:
|
case infwait_nullified_state:
|
||||||
break;
|
break;
|
||||||
|
@ -1388,7 +1393,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
make progress. */
|
make progress. */
|
||||||
|
|
||||||
target_resume (-1, 0, TARGET_SIGNAL_0);
|
target_resume (-1, 0, TARGET_SIGNAL_0);
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1423,11 +1429,13 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
resume (0, TARGET_SIGNAL_0);
|
resume (0, TARGET_SIGNAL_0);
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
|
|
||||||
case TARGET_WAITKIND_SPURIOUS:
|
case TARGET_WAITKIND_SPURIOUS:
|
||||||
resume (0, TARGET_SIGNAL_0);
|
resume (0, TARGET_SIGNAL_0);
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
|
|
||||||
case TARGET_WAITKIND_EXITED:
|
case TARGET_WAITKIND_EXITED:
|
||||||
target_terminal_ours (); /* Must do this before mourn anyway */
|
target_terminal_ours (); /* Must do this before mourn anyway */
|
||||||
|
@ -1447,7 +1455,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
target_mourn_inferior ();
|
target_mourn_inferior ();
|
||||||
singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P */
|
singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P */
|
||||||
stop_print_frame = 0;
|
stop_print_frame = 0;
|
||||||
goto stop_stepping;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
|
|
||||||
case TARGET_WAITKIND_SIGNALLED:
|
case TARGET_WAITKIND_SIGNALLED:
|
||||||
stop_print_frame = 0;
|
stop_print_frame = 0;
|
||||||
|
@ -1475,7 +1484,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
printf_filtered ("The program no longer exists.\n");
|
printf_filtered ("The program no longer exists.\n");
|
||||||
gdb_flush (gdb_stdout);
|
gdb_flush (gdb_stdout);
|
||||||
singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P */
|
singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P */
|
||||||
goto stop_stepping;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
|
|
||||||
/* The following are the only cases in which we keep going;
|
/* The following are the only cases in which we keep going;
|
||||||
the above cases end in a continue or goto. */
|
the above cases end in a continue or goto. */
|
||||||
|
@ -1492,7 +1502,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
pending_follow.fork_event.saw_parent_fork = 1;
|
pending_follow.fork_event.saw_parent_fork = 1;
|
||||||
pending_follow.fork_event.parent_pid = ecs->pid;
|
pending_follow.fork_event.parent_pid = ecs->pid;
|
||||||
pending_follow.fork_event.child_pid = ecs->ws.value.related_pid;
|
pending_follow.fork_event.child_pid = ecs->ws.value.related_pid;
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1552,7 +1563,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
if (follow_vfork_when_exec)
|
if (follow_vfork_when_exec)
|
||||||
{
|
{
|
||||||
target_resume (ecs->pid, 0, TARGET_SIGNAL_0);
|
target_resume (ecs->pid, 0, TARGET_SIGNAL_0);
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1580,7 +1592,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
if (pending_follow.kind == TARGET_WAITKIND_VFORKED)
|
if (pending_follow.kind == TARGET_WAITKIND_VFORKED)
|
||||||
ENSURE_VFORKING_PARENT_REMAINS_STOPPED (pending_follow.fork_event.parent_pid);
|
ENSURE_VFORKING_PARENT_REMAINS_STOPPED (pending_follow.fork_event.parent_pid);
|
||||||
target_resume (ecs->pid, 0, TARGET_SIGNAL_0);
|
target_resume (ecs->pid, 0, TARGET_SIGNAL_0);
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
inferior_ignoring_leading_exec_events =
|
inferior_ignoring_leading_exec_events =
|
||||||
target_reported_exec_events_per_exec_call () - 1;
|
target_reported_exec_events_per_exec_call () - 1;
|
||||||
|
@ -1615,7 +1628,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
if (RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK ())
|
if (RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK ())
|
||||||
target_resume (ecs->pid, 1, TARGET_SIGNAL_0);
|
target_resume (ecs->pid, 1, TARGET_SIGNAL_0);
|
||||||
/* We expect the parent vfork event to be available now. */
|
/* We expect the parent vfork event to be available now. */
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This causes the eventpoints and symbol table to be reset. Must
|
/* This causes the eventpoints and symbol table to be reset. Must
|
||||||
|
@ -1661,7 +1675,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
TARGET_DISABLE_HW_WATCHPOINTS (inferior_pid);
|
TARGET_DISABLE_HW_WATCHPOINTS (inferior_pid);
|
||||||
}
|
}
|
||||||
resume (0, TARGET_SIGNAL_0);
|
resume (0, TARGET_SIGNAL_0);
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
|
|
||||||
/* Before examining the threads further, step this thread to
|
/* Before examining the threads further, step this thread to
|
||||||
get it entirely out of the syscall. (We get notice of the
|
get it entirely out of the syscall. (We get notice of the
|
||||||
|
@ -1686,7 +1701,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
ecs->enable_hw_watchpoints_after_wait =
|
ecs->enable_hw_watchpoints_after_wait =
|
||||||
(number_of_threads_in_syscalls == 0);
|
(number_of_threads_in_syscalls == 0);
|
||||||
}
|
}
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
|
|
||||||
case TARGET_WAITKIND_STOPPED:
|
case TARGET_WAITKIND_STOPPED:
|
||||||
stop_signal = ecs->ws.value.sig;
|
stop_signal = ecs->ws.value.sig;
|
||||||
|
@ -1703,7 +1719,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
if (ecs->new_thread_event)
|
if (ecs->new_thread_event)
|
||||||
{
|
{
|
||||||
target_resume (-1, 0, TARGET_SIGNAL_0);
|
target_resume (-1, 0, TARGET_SIGNAL_0);
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_pc = read_pc_pid (ecs->pid);
|
stop_pc = read_pc_pid (ecs->pid);
|
||||||
|
@ -1750,7 +1767,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
ecs->waiton_pid = ecs->pid;
|
ecs->waiton_pid = ecs->pid;
|
||||||
ecs->wp = &(ecs->ws);
|
ecs->wp = &(ecs->ws);
|
||||||
ecs->infwait_state = infwait_thread_hop_state;
|
ecs->infwait_state = infwait_thread_hop_state;
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We need to restart all the threads now,
|
/* We need to restart all the threads now,
|
||||||
|
@ -1761,7 +1779,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
target_resume (ecs->pid, 0, TARGET_SIGNAL_0);
|
target_resume (ecs->pid, 0, TARGET_SIGNAL_0);
|
||||||
else
|
else
|
||||||
target_resume (-1, 0, TARGET_SIGNAL_0);
|
target_resume (-1, 0, TARGET_SIGNAL_0);
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1827,7 +1846,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
stop_signal = TARGET_SIGNAL_0;
|
stop_signal = TARGET_SIGNAL_0;
|
||||||
|
|
||||||
target_resume (ecs->pid, 0, stop_signal);
|
target_resume (ecs->pid, 0, stop_signal);
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* It's a SIGTRAP or a signal we're interested in. Switch threads,
|
/* It's a SIGTRAP or a signal we're interested in. Switch threads,
|
||||||
|
@ -1893,7 +1913,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
ecs->infwait_state = infwait_nullified_state;
|
ecs->infwait_state = infwait_nullified_state;
|
||||||
ecs->waiton_pid = ecs->pid;
|
ecs->waiton_pid = ecs->pid;
|
||||||
ecs->wp = &(ecs->tmpstatus);
|
ecs->wp = &(ecs->tmpstatus);
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* It may not be necessary to disable the watchpoint to stop over
|
/* It may not be necessary to disable the watchpoint to stop over
|
||||||
|
@ -1902,7 +1923,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
if (HAVE_STEPPABLE_WATCHPOINT && STOPPED_BY_WATCHPOINT (ecs->ws))
|
if (HAVE_STEPPABLE_WATCHPOINT && STOPPED_BY_WATCHPOINT (ecs->ws))
|
||||||
{
|
{
|
||||||
resume (1, 0);
|
resume (1, 0);
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* It is far more common to need to disable a watchpoint to step
|
/* It is far more common to need to disable a watchpoint to step
|
||||||
|
@ -1936,7 +1958,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
ecs->waiton_pid = ecs->pid;
|
ecs->waiton_pid = ecs->pid;
|
||||||
ecs->wp = &(ecs->ws);
|
ecs->wp = &(ecs->ws);
|
||||||
ecs->infwait_state = infwait_nonstep_watch_state;
|
ecs->infwait_state = infwait_nonstep_watch_state;
|
||||||
goto wfi_continue;
|
prepare_to_wait (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* It may be possible to simply continue after a watchpoint. */
|
/* It may be possible to simply continue after a watchpoint. */
|
||||||
|
@ -1985,10 +2008,14 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
if (stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap)
|
if (stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap)
|
||||||
{
|
{
|
||||||
stop_print_frame = 0;
|
stop_print_frame = 0;
|
||||||
goto wfi_break;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (stop_soon_quietly)
|
if (stop_soon_quietly)
|
||||||
goto wfi_break;
|
{
|
||||||
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Don't even think about breakpoints
|
/* Don't even think about breakpoints
|
||||||
if just proceeded over a breakpoint.
|
if just proceeded over a breakpoint.
|
||||||
|
@ -2130,7 +2157,10 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
gdb_flush (gdb_stdout);
|
gdb_flush (gdb_stdout);
|
||||||
}
|
}
|
||||||
if (signal_stop[stop_signal])
|
if (signal_stop[stop_signal])
|
||||||
goto wfi_break;
|
{
|
||||||
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* If not going to stop, give terminal back
|
/* If not going to stop, give terminal back
|
||||||
if we took it away. */
|
if we took it away. */
|
||||||
else if (printed)
|
else if (printed)
|
||||||
|
@ -2172,7 +2202,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
this probably breaks that. As with anything else, it's up to
|
this probably breaks that. As with anything else, it's up to
|
||||||
the HP-UX maintainer to furnish a fix that doesn't break other
|
the HP-UX maintainer to furnish a fix that doesn't break other
|
||||||
platforms. --JimB, 20 May 1999 */
|
platforms. --JimB, 20 May 1999 */
|
||||||
goto check_sigtramp2;
|
check_sigtramp2 (ecs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle cases caused by hitting a breakpoint. */
|
/* Handle cases caused by hitting a breakpoint. */
|
||||||
|
@ -2267,7 +2297,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
through_sigtramp_breakpoint via the cleanup chain, so
|
through_sigtramp_breakpoint via the cleanup chain, so
|
||||||
no need to worry about it here. */
|
no need to worry about it here. */
|
||||||
|
|
||||||
goto stop_stepping;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
|
|
||||||
case BPSTAT_WHAT_STOP_SILENT:
|
case BPSTAT_WHAT_STOP_SILENT:
|
||||||
stop_print_frame = 0;
|
stop_print_frame = 0;
|
||||||
|
@ -2276,7 +2307,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
through_sigtramp_breakpoint via the cleanup chain, so
|
through_sigtramp_breakpoint via the cleanup chain, so
|
||||||
no need to worry about it here. */
|
no need to worry about it here. */
|
||||||
|
|
||||||
goto stop_stepping;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
|
|
||||||
case BPSTAT_WHAT_STEP_RESUME:
|
case BPSTAT_WHAT_STEP_RESUME:
|
||||||
/* This proably demands a more elegant solution, but, yeah
|
/* This proably demands a more elegant solution, but, yeah
|
||||||
|
@ -2349,7 +2381,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
if (stop_on_solib_events)
|
if (stop_on_solib_events)
|
||||||
{
|
{
|
||||||
stop_print_frame = 0;
|
stop_print_frame = 0;
|
||||||
goto stop_stepping;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we stopped due to an explicit catchpoint, then the
|
/* If we stopped due to an explicit catchpoint, then the
|
||||||
|
@ -2429,7 +2462,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
stop_bpstat = bpstat_copy (ecs->stepping_through_solib_catchpoints);
|
stop_bpstat = bpstat_copy (ecs->stepping_through_solib_catchpoints);
|
||||||
bpstat_clear (&ecs->stepping_through_solib_catchpoints);
|
bpstat_clear (&ecs->stepping_through_solib_catchpoints);
|
||||||
stop_print_frame = 1;
|
stop_print_frame = 1;
|
||||||
goto stop_stepping;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CALL_DUMMY_BREAKPOINT_OFFSET_P)
|
if (!CALL_DUMMY_BREAKPOINT_OFFSET_P)
|
||||||
|
@ -2452,23 +2486,30 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
#ifdef HP_OS_BUG
|
#ifdef HP_OS_BUG
|
||||||
trap_expected_after_continue = 1;
|
trap_expected_after_continue = 1;
|
||||||
#endif
|
#endif
|
||||||
goto wfi_break;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (step_resume_breakpoint)
|
if (step_resume_breakpoint)
|
||||||
/* Having a step-resume breakpoint overrides anything
|
{
|
||||||
else having to do with stepping commands until
|
/* Having a step-resume breakpoint overrides anything
|
||||||
that breakpoint is reached. */
|
else having to do with stepping commands until
|
||||||
/* I'm not sure whether this needs to be check_sigtramp2 or
|
that breakpoint is reached. */
|
||||||
whether it could/should be keep_going. */
|
/* I'm not sure whether this needs to be check_sigtramp2 or
|
||||||
goto check_sigtramp2;
|
whether it could/should be keep_going. */
|
||||||
|
check_sigtramp2 (ecs);
|
||||||
|
goto keep_going;
|
||||||
|
}
|
||||||
|
|
||||||
if (step_range_end == 0)
|
if (step_range_end == 0)
|
||||||
/* Likewise if we aren't even stepping. */
|
{
|
||||||
/* I'm not sure whether this needs to be check_sigtramp2 or
|
/* Likewise if we aren't even stepping. */
|
||||||
whether it could/should be keep_going. */
|
/* I'm not sure whether this needs to be check_sigtramp2 or
|
||||||
goto check_sigtramp2;
|
whether it could/should be keep_going. */
|
||||||
|
check_sigtramp2 (ecs);
|
||||||
|
goto keep_going;
|
||||||
|
}
|
||||||
|
|
||||||
/* If stepping through a line, keep going if still within it.
|
/* If stepping through a line, keep going if still within it.
|
||||||
|
|
||||||
|
@ -2480,7 +2521,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
{
|
{
|
||||||
/* We might be doing a BPSTAT_WHAT_SINGLE and getting a signal.
|
/* We might be doing a BPSTAT_WHAT_SINGLE and getting a signal.
|
||||||
So definately need to check for sigtramp here. */
|
So definately need to check for sigtramp here. */
|
||||||
goto check_sigtramp2;
|
check_sigtramp2 (ecs);
|
||||||
|
goto keep_going;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We stepped out of the stepping range. */
|
/* We stepped out of the stepping range. */
|
||||||
|
@ -2595,7 +2637,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
supposed to be stepping at the assembly language level
|
supposed to be stepping at the assembly language level
|
||||||
("stepi"). Just stop. */
|
("stepi"). Just stop. */
|
||||||
stop_step = 1;
|
stop_step = 1;
|
||||||
goto wfi_break;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (step_over_calls > 0 || IGNORE_HELPER_CALL (stop_pc))
|
if (step_over_calls > 0 || IGNORE_HELPER_CALL (stop_pc))
|
||||||
|
@ -2706,7 +2749,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
{
|
{
|
||||||
/* We are already there: stop now. */
|
/* We are already there: stop now. */
|
||||||
stop_step = 1;
|
stop_step = 1;
|
||||||
goto wfi_break;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* Put the step-breakpoint there and go until there. */
|
/* Put the step-breakpoint there and go until there. */
|
||||||
|
@ -2740,7 +2784,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
/* It is stepi or nexti. We always want to stop stepping after
|
/* It is stepi or nexti. We always want to stop stepping after
|
||||||
one instruction. */
|
one instruction. */
|
||||||
stop_step = 1;
|
stop_step = 1;
|
||||||
goto wfi_break;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we're in the return path from a shared library trampoline,
|
/* If we're in the return path from a shared library trampoline,
|
||||||
|
@ -2783,7 +2828,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
when we do "s" in a function with no line numbers,
|
when we do "s" in a function with no line numbers,
|
||||||
or can this happen as a result of a return or longjmp?). */
|
or can this happen as a result of a return or longjmp?). */
|
||||||
stop_step = 1;
|
stop_step = 1;
|
||||||
goto wfi_break;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((stop_pc == ecs->sal.pc)
|
if ((stop_pc == ecs->sal.pc)
|
||||||
|
@ -2794,7 +2840,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
That is said to make things like for (;;) statements work
|
That is said to make things like for (;;) statements work
|
||||||
better. */
|
better. */
|
||||||
stop_step = 1;
|
stop_step = 1;
|
||||||
goto wfi_break;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We aren't done stepping.
|
/* We aren't done stepping.
|
||||||
|
@ -2812,7 +2859,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
in which after skipping the prologue we better stop even though
|
in which after skipping the prologue we better stop even though
|
||||||
we will be in mid-line. */
|
we will be in mid-line. */
|
||||||
stop_step = 1;
|
stop_step = 1;
|
||||||
goto wfi_break;
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
step_range_start = ecs->sal.pc;
|
step_range_start = ecs->sal.pc;
|
||||||
step_range_end = ecs->sal.end;
|
step_range_end = ecs->sal.end;
|
||||||
|
@ -2829,42 +2877,6 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
step_frame_address = current_frame;
|
step_frame_address = current_frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
goto keep_going;
|
|
||||||
|
|
||||||
check_sigtramp2:
|
|
||||||
if (trap_expected
|
|
||||||
&& IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
|
|
||||||
&& !IN_SIGTRAMP (prev_pc, prev_func_name)
|
|
||||||
&& INNER_THAN (read_sp (), step_sp))
|
|
||||||
{
|
|
||||||
/* What has happened here is that we have just stepped the inferior
|
|
||||||
with a signal (because it is a signal which shouldn't make
|
|
||||||
us stop), thus stepping into sigtramp.
|
|
||||||
|
|
||||||
So we need to set a step_resume_break_address breakpoint
|
|
||||||
and continue until we hit it, and then step. FIXME: This should
|
|
||||||
be more enduring than a step_resume breakpoint; we should know
|
|
||||||
that we will later need to keep going rather than re-hitting
|
|
||||||
the breakpoint here (see testsuite/gdb.t06/signals.exp where
|
|
||||||
it says "exceedingly difficult"). */
|
|
||||||
struct symtab_and_line sr_sal;
|
|
||||||
|
|
||||||
INIT_SAL (&sr_sal); /* initialize to zeroes */
|
|
||||||
sr_sal.pc = prev_pc;
|
|
||||||
sr_sal.section = find_pc_overlay (sr_sal.pc);
|
|
||||||
/* We perhaps could set the frame if we kept track of what
|
|
||||||
the frame corresponding to prev_pc was. But we don't,
|
|
||||||
so don't. */
|
|
||||||
through_sigtramp_breakpoint =
|
|
||||||
set_momentary_breakpoint (sr_sal, NULL, bp_through_sigtramp);
|
|
||||||
if (breakpoints_inserted)
|
|
||||||
insert_breakpoints ();
|
|
||||||
|
|
||||||
ecs->remove_breakpoints_on_following_step = 1;
|
|
||||||
ecs->another_trap = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
keep_going:
|
keep_going:
|
||||||
/* Come to this label when you need to resume the inferior.
|
/* Come to this label when you need to resume the inferior.
|
||||||
It's really much cleaner to do a goto than a maze of if-else
|
It's really much cleaner to do a goto than a maze of if-else
|
||||||
|
@ -2932,7 +2944,10 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
{
|
{
|
||||||
breakpoints_failed = insert_breakpoints ();
|
breakpoints_failed = insert_breakpoints ();
|
||||||
if (breakpoints_failed)
|
if (breakpoints_failed)
|
||||||
goto wfi_break;
|
{
|
||||||
|
stop_stepping (ecs);
|
||||||
|
return;
|
||||||
|
}
|
||||||
breakpoints_inserted = 1;
|
breakpoints_inserted = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2971,40 +2986,73 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||||
resume (currently_stepping (ecs), stop_signal);
|
resume (currently_stepping (ecs), stop_signal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Former continues in the main loop goto here. */
|
prepare_to_wait (ecs);
|
||||||
wfi_continue:
|
|
||||||
/* This used to be at the top of the loop. */
|
|
||||||
if (ecs->infwait_state == infwait_normal_state)
|
|
||||||
{
|
|
||||||
overlay_cache_invalid = 1;
|
|
||||||
|
|
||||||
/* We have to invalidate the registers BEFORE calling
|
|
||||||
target_wait because they can be loaded from the target
|
|
||||||
while in target_wait. This makes remote debugging a bit
|
|
||||||
more efficient for those targets that provide critical
|
|
||||||
registers as part of their normal status mechanism. */
|
|
||||||
|
|
||||||
registers_changed ();
|
|
||||||
ecs->waiton_pid = -1;
|
|
||||||
ecs->wp = &(ecs->ws);
|
|
||||||
}
|
|
||||||
/* This is the old end of the while loop. Let everybody know
|
|
||||||
we want to wait for the inferior some more and get called
|
|
||||||
again soon. */
|
|
||||||
ecs->wait_some_more = 1;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
/* Former breaks in the main loop goto here. */
|
} /* extra brace, to preserve old indentation */
|
||||||
wfi_break:
|
|
||||||
|
|
||||||
stop_stepping:
|
stop_stepping (ecs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Are we in the middle of stepping? */
|
||||||
|
|
||||||
|
static int
|
||||||
|
currently_stepping (struct execution_control_state *ecs)
|
||||||
|
{
|
||||||
|
return ((through_sigtramp_breakpoint == NULL
|
||||||
|
&& !ecs->handling_longjmp
|
||||||
|
&& ((step_range_end && step_resume_breakpoint == NULL)
|
||||||
|
|| trap_expected))
|
||||||
|
|| ecs->stepping_through_solib_after_catch
|
||||||
|
|| bpstat_should_step ());
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
check_sigtramp2 (struct execution_control_state *ecs)
|
||||||
|
{
|
||||||
|
if (trap_expected
|
||||||
|
&& IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
|
||||||
|
&& !IN_SIGTRAMP (prev_pc, prev_func_name)
|
||||||
|
&& INNER_THAN (read_sp (), step_sp))
|
||||||
|
{
|
||||||
|
/* What has happened here is that we have just stepped the
|
||||||
|
inferior with a signal (because it is a signal which
|
||||||
|
shouldn't make us stop), thus stepping into sigtramp.
|
||||||
|
|
||||||
|
So we need to set a step_resume_break_address breakpoint and
|
||||||
|
continue until we hit it, and then step. FIXME: This should
|
||||||
|
be more enduring than a step_resume breakpoint; we should
|
||||||
|
know that we will later need to keep going rather than
|
||||||
|
re-hitting the breakpoint here (see the testsuite,
|
||||||
|
gdb.base/signals.exp where it says "exceedingly difficult"). */
|
||||||
|
|
||||||
|
struct symtab_and_line sr_sal;
|
||||||
|
|
||||||
|
INIT_SAL (&sr_sal); /* initialize to zeroes */
|
||||||
|
sr_sal.pc = prev_pc;
|
||||||
|
sr_sal.section = find_pc_overlay (sr_sal.pc);
|
||||||
|
/* We perhaps could set the frame if we kept track of what the
|
||||||
|
frame corresponding to prev_pc was. But we don't, so don't. */
|
||||||
|
through_sigtramp_breakpoint =
|
||||||
|
set_momentary_breakpoint (sr_sal, NULL, bp_through_sigtramp);
|
||||||
|
if (breakpoints_inserted)
|
||||||
|
insert_breakpoints ();
|
||||||
|
|
||||||
|
ecs->remove_breakpoints_on_following_step = 1;
|
||||||
|
ecs->another_trap = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
stop_stepping (struct execution_control_state *ecs)
|
||||||
|
{
|
||||||
if (target_has_execution)
|
if (target_has_execution)
|
||||||
{
|
{
|
||||||
/* Are we stopping for a vfork event? We only stop when we see
|
/* Are we stopping for a vfork event? We only stop when we see
|
||||||
the child's event. However, we may not yet have seen the
|
the child's event. However, we may not yet have seen the
|
||||||
parent's event. And, inferior_pid is still set to the parent's
|
parent's event. And, inferior_pid is still set to the
|
||||||
pid, until we resume again and follow either the parent or child.
|
parent's pid, until we resume again and follow either the
|
||||||
|
parent or child.
|
||||||
|
|
||||||
To ensure that we can really touch inferior_pid (aka, the
|
To ensure that we can really touch inferior_pid (aka, the
|
||||||
parent process) -- which calls to functions like read_pc
|
parent process) -- which calls to functions like read_pc
|
||||||
|
@ -3031,21 +3079,36 @@ stop_stepping:
|
||||||
prev_func_start = ecs->stop_func_start;
|
prev_func_start = ecs->stop_func_start;
|
||||||
prev_func_name = ecs->stop_func_name;
|
prev_func_name = ecs->stop_func_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Let callers know we don't want to wait for the inferior anymore. */
|
/* Let callers know we don't want to wait for the inferior anymore. */
|
||||||
ecs->wait_some_more = 0;
|
ecs->wait_some_more = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Are we in the middle of stepping? */
|
/* This function normally comes after a resume, before
|
||||||
|
handle_inferior_event exits. It takes care of any last bits of
|
||||||
|
housekeeping, and sets the all-important wait_some_more flag. */
|
||||||
|
|
||||||
static int
|
static void
|
||||||
currently_stepping (struct execution_control_state *ecs)
|
prepare_to_wait (struct execution_control_state *ecs)
|
||||||
{
|
{
|
||||||
return ((through_sigtramp_breakpoint == NULL
|
if (ecs->infwait_state == infwait_normal_state)
|
||||||
&& !ecs->handling_longjmp
|
{
|
||||||
&& ((step_range_end && step_resume_breakpoint == NULL)
|
overlay_cache_invalid = 1;
|
||||||
|| trap_expected))
|
|
||||||
|| ecs->stepping_through_solib_after_catch
|
/* We have to invalidate the registers BEFORE calling
|
||||||
|| bpstat_should_step ());
|
target_wait because they can be loaded from the target while
|
||||||
|
in target_wait. This makes remote debugging a bit more
|
||||||
|
efficient for those targets that provide critical registers
|
||||||
|
as part of their normal status mechanism. */
|
||||||
|
|
||||||
|
registers_changed ();
|
||||||
|
ecs->waiton_pid = -1;
|
||||||
|
ecs->wp = &(ecs->ws);
|
||||||
|
}
|
||||||
|
/* This is the old end of the while loop. Let everybody know we
|
||||||
|
want to wait for the inferior some more and get called again
|
||||||
|
soon. */
|
||||||
|
ecs->wait_some_more = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function returns TRUE if ep is an internal breakpoint
|
/* This function returns TRUE if ep is an internal breakpoint
|
||||||
|
@ -3100,6 +3163,11 @@ complete_execution (void)
|
||||||
cleanup_sigint_signal_handler ();
|
cleanup_sigint_signal_handler ();
|
||||||
display_gdb_prompt (0);
|
display_gdb_prompt (0);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (exec_done_display_p)
|
||||||
|
printf_unfiltered ("completed.\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Here to return control to GDB when the inferior stops for real.
|
/* Here to return control to GDB when the inferior stops for real.
|
||||||
|
|
|
@ -42,9 +42,6 @@
|
||||||
|
|
||||||
/* "wait.h" fills in the gaps left by <wait.h> */
|
/* "wait.h" fills in the gaps left by <wait.h> */
|
||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern struct symtab_and_line *
|
extern struct symtab_and_line *
|
||||||
child_enable_exception_callback PARAMS ((enum exception_event_kind, int));
|
child_enable_exception_callback PARAMS ((enum exception_event_kind, int));
|
||||||
|
|
|
@ -45,9 +45,6 @@
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
#include <sys/ttrace.h>
|
#include <sys/ttrace.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
#ifndef NO_PTRACE_H
|
#ifndef NO_PTRACE_H
|
||||||
|
@ -5216,7 +5213,7 @@ child_pid_to_exec_file (tid)
|
||||||
hack that DDE uses, of pawing through the process' data
|
hack that DDE uses, of pawing through the process' data
|
||||||
segment to find the pathname.
|
segment to find the pathname.
|
||||||
*/
|
*/
|
||||||
top_of_stack = 0x7b03a000;
|
top_of_stack = (TARGET_PTR_BIT == 64 ? 0x800003ffff7f0000 : 0x7b03a000);
|
||||||
name_index = 0;
|
name_index = 0;
|
||||||
done = 0;
|
done = 0;
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,11 @@
|
||||||
#if !defined (LANGUAGE_H)
|
#if !defined (LANGUAGE_H)
|
||||||
#define LANGUAGE_H 1
|
#define LANGUAGE_H 1
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decls for prototypes */
|
/* Forward decls for prototypes */
|
||||||
struct value;
|
struct value;
|
||||||
struct objfile;
|
struct objfile;
|
||||||
struct expression;
|
struct expression;
|
||||||
/* enum exp_opcode; ANSI's `wisdom' didn't include forward enum decls. */
|
/* enum exp_opcode; ANSI's `wisdom' didn't include forward enum decls. */
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This used to be included to configure GDB for one or more specific
|
/* This used to be included to configure GDB for one or more specific
|
||||||
languages. Now it is shortcutted to configure for all of them. FIXME. */
|
languages. Now it is shortcutted to configure for all of them. FIXME. */
|
||||||
|
|
140
gdb/m32r-stub.c
140
gdb/m32r-stub.c
|
@ -179,7 +179,7 @@ extern void breakpoint(void);
|
||||||
|
|
||||||
static int computeSignal(int);
|
static int computeSignal(int);
|
||||||
static void putpacket(unsigned char *);
|
static void putpacket(unsigned char *);
|
||||||
static void getpacket(unsigned char *);
|
static unsigned char *getpacket(unsigned char *);
|
||||||
|
|
||||||
static unsigned char *mem2hex(unsigned char *, unsigned char *, int, int);
|
static unsigned char *mem2hex(unsigned char *, unsigned char *, int, int);
|
||||||
static unsigned char *hex2mem(unsigned char *, unsigned char *, int, int);
|
static unsigned char *hex2mem(unsigned char *, unsigned char *, int, int);
|
||||||
|
@ -204,7 +204,7 @@ static int strlen (const unsigned char *);
|
||||||
void
|
void
|
||||||
handle_exception(int exceptionVector)
|
handle_exception(int exceptionVector)
|
||||||
{
|
{
|
||||||
int sigval;
|
int sigval, stepping;
|
||||||
int addr, length, i;
|
int addr, length, i;
|
||||||
unsigned char * ptr;
|
unsigned char * ptr;
|
||||||
unsigned char buf[16];
|
unsigned char buf[16];
|
||||||
|
@ -306,15 +306,16 @@ handle_exception(int exceptionVector)
|
||||||
|
|
||||||
putpacket(remcomOutBuffer);
|
putpacket(remcomOutBuffer);
|
||||||
|
|
||||||
|
stepping = 0;
|
||||||
|
|
||||||
while (1==1) {
|
while (1==1) {
|
||||||
remcomOutBuffer[0] = 0;
|
remcomOutBuffer[0] = 0;
|
||||||
getpacket(remcomInBuffer);
|
ptr = getpacket(remcomInBuffer);
|
||||||
binary = 0;
|
binary = 0;
|
||||||
switch (remcomInBuffer[0]) {
|
switch (*ptr++) {
|
||||||
default: /* Unknown code. Return an empty reply message. */
|
default: /* Unknown code. Return an empty reply message. */
|
||||||
break;
|
break;
|
||||||
case 'R':
|
case 'R':
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt (&ptr, &addr))
|
if (hexToInt (&ptr, &addr))
|
||||||
registers[PC] = addr;
|
registers[PC] = addr;
|
||||||
strcpy(remcomOutBuffer, "OK");
|
strcpy(remcomOutBuffer, "OK");
|
||||||
|
@ -327,7 +328,6 @@ handle_exception(int exceptionVector)
|
||||||
case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
|
case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
|
||||||
/* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
|
/* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
|
||||||
{
|
{
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr,&addr))
|
if (hexToInt(&ptr,&addr))
|
||||||
if (*(ptr++) == ',')
|
if (*(ptr++) == ',')
|
||||||
if (hexToInt(&ptr,&length))
|
if (hexToInt(&ptr,&length))
|
||||||
|
@ -349,14 +349,11 @@ handle_exception(int exceptionVector)
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
strcpy(remcomOutBuffer,"E02");
|
strcpy(remcomOutBuffer,"E02");
|
||||||
gdb_error("malformed write memory command: %s",
|
|
||||||
remcomInBuffer);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
|
case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
|
||||||
/* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
|
/* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr,&addr))
|
if (hexToInt(&ptr,&addr))
|
||||||
if (*(ptr++) == ',')
|
if (*(ptr++) == ',')
|
||||||
if (hexToInt(&ptr,&length))
|
if (hexToInt(&ptr,&length))
|
||||||
|
@ -372,8 +369,6 @@ handle_exception(int exceptionVector)
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
strcpy(remcomOutBuffer,"E01");
|
strcpy(remcomOutBuffer,"E01");
|
||||||
gdb_error("malformed read memory command: %s",
|
|
||||||
remcomInBuffer);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
|
@ -392,7 +387,6 @@ handle_exception(int exceptionVector)
|
||||||
{
|
{
|
||||||
int regno;
|
int regno;
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt (&ptr, ®no) && *ptr++ == '=')
|
if (hexToInt (&ptr, ®no) && *ptr++ == '=')
|
||||||
if (regno >= 0 && regno < NUMREGS)
|
if (regno >= 0 && regno < NUMREGS)
|
||||||
{
|
{
|
||||||
|
@ -435,17 +429,17 @@ handle_exception(int exceptionVector)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'G': /* set the value of the CPU registers - return OK */
|
case 'G': /* set the value of the CPU registers - return OK */
|
||||||
hex2mem(&remcomInBuffer[1], (unsigned char*) registers, NUMREGBYTES, 0);
|
hex2mem(&ptr, (unsigned char*) registers, NUMREGBYTES, 0);
|
||||||
strcpy(remcomOutBuffer,"OK");
|
strcpy(remcomOutBuffer,"OK");
|
||||||
break;
|
break;
|
||||||
case 's': /* sAA..AA Step one instruction from AA..AA(optional) */
|
case 's': /* sAA..AA Step one instruction from AA..AA(optional) */
|
||||||
|
stepping = 1;
|
||||||
case 'c': /* cAA..AA Continue from address AA..AA(optional) */
|
case 'c': /* cAA..AA Continue from address AA..AA(optional) */
|
||||||
/* try to read optional parameter, pc unchanged if no parm */
|
/* try to read optional parameter, pc unchanged if no parm */
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr,&addr))
|
if (hexToInt(&ptr,&addr))
|
||||||
registers[ PC ] = addr;
|
registers[ PC ] = addr;
|
||||||
|
|
||||||
if (remcomInBuffer[0] == 's') /* single-stepping */
|
if (stepping) /* single-stepping */
|
||||||
{
|
{
|
||||||
if (!prepare_to_step(0)) /* set up for single-step */
|
if (!prepare_to_step(0)) /* set up for single-step */
|
||||||
{
|
{
|
||||||
|
@ -505,7 +499,6 @@ handle_exception(int exceptionVector)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case 'q':
|
case 'q':
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (*ptr++ == 'C' &&
|
if (*ptr++ == 'C' &&
|
||||||
*ptr++ == 'R' &&
|
*ptr++ == 'R' &&
|
||||||
*ptr++ == 'C' &&
|
*ptr++ == 'C' &&
|
||||||
|
@ -581,65 +574,78 @@ hex(ch)
|
||||||
|
|
||||||
/* scan for the sequence $<data>#<checksum> */
|
/* scan for the sequence $<data>#<checksum> */
|
||||||
|
|
||||||
static void
|
unsigned char *
|
||||||
getpacket(buffer)
|
getpacket (buffer)
|
||||||
unsigned char * buffer;
|
unsigned char *buffer;
|
||||||
{
|
{
|
||||||
unsigned char checksum;
|
unsigned char checksum;
|
||||||
unsigned char xmitcsum;
|
unsigned char xmitcsum;
|
||||||
int i;
|
int count;
|
||||||
int count;
|
char ch;
|
||||||
unsigned char ch;
|
|
||||||
|
|
||||||
do {
|
while (1)
|
||||||
/* wait around for the start character, ignore all other characters */
|
{
|
||||||
while ((ch = getDebugChar()) != '$');
|
/* wait around for the start character, ignore all other characters */
|
||||||
checksum = 0;
|
while ((ch = getDebugChar ()) != '$')
|
||||||
xmitcsum = -1;
|
;
|
||||||
|
|
||||||
count = 0;
|
retry:
|
||||||
|
checksum = 0;
|
||||||
|
xmitcsum = -1;
|
||||||
|
count = 0;
|
||||||
|
|
||||||
/* now, read until a # or end of buffer is found */
|
/* now, read until a # or end of buffer is found */
|
||||||
while (count < BUFMAX) {
|
while (count < BUFMAX)
|
||||||
ch = getDebugChar();
|
{
|
||||||
|
ch = getDebugChar ();
|
||||||
if (ch == '#' && (count == 0 || buffer[count-1] != 0x7d))
|
if (ch == '$')
|
||||||
break;
|
goto retry;
|
||||||
|
if (ch == '#')
|
||||||
checksum = checksum + ch;
|
break;
|
||||||
buffer[count] = ch;
|
checksum = checksum + ch;
|
||||||
count = count + 1;
|
buffer[count] = ch;
|
||||||
}
|
count = count + 1;
|
||||||
buffer[count] = 0;
|
}
|
||||||
|
buffer[count] = 0;
|
||||||
if (ch == '#') {
|
|
||||||
xmitcsum = hex(getDebugChar()) << 4;
|
if (ch == '#')
|
||||||
xmitcsum += hex(getDebugChar());
|
{
|
||||||
if (checksum != xmitcsum) {
|
ch = getDebugChar ();
|
||||||
if (remote_debug) {
|
xmitcsum = hex (ch) << 4;
|
||||||
unsigned char buf[16];
|
ch = getDebugChar ();
|
||||||
|
xmitcsum += hex (ch);
|
||||||
mem2hex((unsigned char *) &checksum, buf, 4, 0);
|
|
||||||
gdb_error("Bad checksum: my count = %s, ", buf);
|
if (checksum != xmitcsum)
|
||||||
mem2hex((unsigned char *) &xmitcsum, buf, 4, 0);
|
{
|
||||||
gdb_error("sent count = %s\n", buf);
|
if (remote_debug)
|
||||||
gdb_error(" -- Bad buffer: \"%s\"\n", buffer);
|
{
|
||||||
}
|
unsigned char buf[16];
|
||||||
|
|
||||||
putDebugChar('-'); /* failed checksum */
|
mem2hex((unsigned char *) &checksum, buf, 4, 0);
|
||||||
} else {
|
gdb_error("Bad checksum: my count = %s, ", buf);
|
||||||
putDebugChar('+'); /* successful transfer */
|
mem2hex((unsigned char *) &xmitcsum, buf, 4, 0);
|
||||||
/* if a sequence char is present, reply the sequence ID */
|
gdb_error("sent count = %s\n", buf);
|
||||||
if (buffer[2] == ':') {
|
gdb_error(" -- Bad buffer: \"%s\"\n", buffer);
|
||||||
putDebugChar( buffer[0] );
|
}
|
||||||
putDebugChar( buffer[1] );
|
putDebugChar ('-'); /* failed checksum */
|
||||||
/* remove sequence chars from buffer */
|
}
|
||||||
count = strlen(buffer);
|
else
|
||||||
for (i=3; i <= count; i++) buffer[i-3] = buffer[i];
|
{
|
||||||
|
putDebugChar ('+'); /* successful transfer */
|
||||||
|
|
||||||
|
/* if a sequence char is present, reply the sequence ID */
|
||||||
|
if (buffer[2] == ':')
|
||||||
|
{
|
||||||
|
putDebugChar (buffer[0]);
|
||||||
|
putDebugChar (buffer[1]);
|
||||||
|
|
||||||
|
return &buffer[3];
|
||||||
|
}
|
||||||
|
|
||||||
|
return &buffer[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} while (checksum != xmitcsum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send the packet in buffer. */
|
/* send the packet in buffer. */
|
||||||
|
|
142
gdb/m68k-stub.c
142
gdb/m68k-stub.c
|
@ -523,57 +523,73 @@ char ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* scan for the sequence $<data>#<checksum> */
|
unsigned char *
|
||||||
void getpacket(buffer)
|
getpacket (unsigned char *buffer)
|
||||||
char * buffer;
|
|
||||||
{
|
{
|
||||||
unsigned char checksum;
|
unsigned char checksum;
|
||||||
unsigned char xmitcsum;
|
unsigned char xmitcsum;
|
||||||
int i;
|
int count;
|
||||||
int count;
|
|
||||||
char ch;
|
char ch;
|
||||||
|
|
||||||
do {
|
|
||||||
/* wait around for the start character, ignore all other characters */
|
|
||||||
while ((ch = (getDebugChar() & 0x7f)) != '$');
|
|
||||||
checksum = 0;
|
|
||||||
xmitcsum = -1;
|
|
||||||
|
|
||||||
count = 0;
|
|
||||||
|
|
||||||
/* now, read until a # or end of buffer is found */
|
|
||||||
while (count < BUFMAX) {
|
|
||||||
ch = getDebugChar() & 0x7f;
|
|
||||||
if (ch == '#') break;
|
|
||||||
checksum = checksum + ch;
|
|
||||||
buffer[count] = ch;
|
|
||||||
count = count + 1;
|
|
||||||
}
|
|
||||||
buffer[count] = 0;
|
|
||||||
|
|
||||||
if (ch == '#') {
|
while (1)
|
||||||
xmitcsum = hex(getDebugChar() & 0x7f) << 4;
|
{
|
||||||
xmitcsum += hex(getDebugChar() & 0x7f);
|
/* wait around for the start character, ignore all other characters */
|
||||||
if ((remote_debug ) && (checksum != xmitcsum)) {
|
while ((ch = getDebugChar ()) != '$')
|
||||||
fprintf (stderr,"bad checksum. My count = 0x%x, sent=0x%x. buf=%s\n",
|
;
|
||||||
checksum,xmitcsum,buffer);
|
|
||||||
}
|
retry:
|
||||||
|
checksum = 0;
|
||||||
if (checksum != xmitcsum) putDebugChar('-'); /* failed checksum */
|
xmitcsum = -1;
|
||||||
else {
|
count = 0;
|
||||||
putDebugChar('+'); /* successful transfer */
|
|
||||||
/* if a sequence char is present, reply the sequence ID */
|
/* now, read until a # or end of buffer is found */
|
||||||
if (buffer[2] == ':') {
|
while (count < BUFMAX)
|
||||||
putDebugChar( buffer[0] );
|
{
|
||||||
putDebugChar( buffer[1] );
|
ch = getDebugChar ();
|
||||||
/* remove sequence chars from buffer */
|
if (ch == '$')
|
||||||
count = strlen(buffer);
|
goto retry;
|
||||||
for (i=3; i <= count; i++) buffer[i-3] = buffer[i];
|
if (ch == '#')
|
||||||
}
|
break;
|
||||||
}
|
checksum = checksum + ch;
|
||||||
}
|
buffer[count] = ch;
|
||||||
} while (checksum != xmitcsum);
|
count = count + 1;
|
||||||
|
}
|
||||||
|
buffer[count] = 0;
|
||||||
|
|
||||||
|
if (ch == '#')
|
||||||
|
{
|
||||||
|
ch = getDebugChar ();
|
||||||
|
xmitcsum = hex (ch) << 4;
|
||||||
|
ch = getDebugChar ();
|
||||||
|
xmitcsum += hex (ch);
|
||||||
|
|
||||||
|
if (checksum != xmitcsum)
|
||||||
|
{
|
||||||
|
if (remote_debug)
|
||||||
|
{
|
||||||
|
fprintf (stderr,
|
||||||
|
"bad checksum. My count = 0x%x, sent=0x%x. buf=%s\n",
|
||||||
|
checksum, xmitcsum, buffer);
|
||||||
|
}
|
||||||
|
putDebugChar ('-'); /* failed checksum */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
putDebugChar ('+'); /* successful transfer */
|
||||||
|
|
||||||
|
/* if a sequence char is present, reply the sequence ID */
|
||||||
|
if (buffer[2] == ':')
|
||||||
|
{
|
||||||
|
putDebugChar (buffer[0]);
|
||||||
|
putDebugChar (buffer[1]);
|
||||||
|
|
||||||
|
return &buffer[3];
|
||||||
|
}
|
||||||
|
|
||||||
|
return &buffer[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send the packet in buffer. */
|
/* send the packet in buffer. */
|
||||||
|
@ -738,7 +754,7 @@ int hexToInt(char **ptr, int *intValue)
|
||||||
*/
|
*/
|
||||||
void handle_exception(int exceptionVector)
|
void handle_exception(int exceptionVector)
|
||||||
{
|
{
|
||||||
int sigval;
|
int sigval, stepping;
|
||||||
int addr, length;
|
int addr, length;
|
||||||
char * ptr;
|
char * ptr;
|
||||||
int newPC;
|
int newPC;
|
||||||
|
@ -758,11 +774,13 @@ void handle_exception(int exceptionVector)
|
||||||
|
|
||||||
putpacket(remcomOutBuffer);
|
putpacket(remcomOutBuffer);
|
||||||
|
|
||||||
|
stepping = 0;
|
||||||
|
|
||||||
while (1==1) {
|
while (1==1) {
|
||||||
error = 0;
|
error = 0;
|
||||||
remcomOutBuffer[0] = 0;
|
remcomOutBuffer[0] = 0;
|
||||||
getpacket(remcomInBuffer);
|
ptr = getpacket(remcomInBuffer);
|
||||||
switch (remcomInBuffer[0]) {
|
switch (*ptr++) {
|
||||||
case '?' : remcomOutBuffer[0] = 'S';
|
case '?' : remcomOutBuffer[0] = 'S';
|
||||||
remcomOutBuffer[1] = hexchars[sigval >> 4];
|
remcomOutBuffer[1] = hexchars[sigval >> 4];
|
||||||
remcomOutBuffer[2] = hexchars[sigval % 16];
|
remcomOutBuffer[2] = hexchars[sigval % 16];
|
||||||
|
@ -774,7 +792,7 @@ void handle_exception(int exceptionVector)
|
||||||
mem2hex((char*) registers, remcomOutBuffer, NUMREGBYTES);
|
mem2hex((char*) registers, remcomOutBuffer, NUMREGBYTES);
|
||||||
break;
|
break;
|
||||||
case 'G' : /* set the value of the CPU registers - return OK */
|
case 'G' : /* set the value of the CPU registers - return OK */
|
||||||
hex2mem(&remcomInBuffer[1], (char*) registers, NUMREGBYTES);
|
hex2mem(&ptr, (char*) registers, NUMREGBYTES);
|
||||||
strcpy(remcomOutBuffer,"OK");
|
strcpy(remcomOutBuffer,"OK");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -785,7 +803,6 @@ void handle_exception(int exceptionVector)
|
||||||
exceptionHandler(2,handle_buserror);
|
exceptionHandler(2,handle_buserror);
|
||||||
|
|
||||||
/* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
|
/* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr,&addr))
|
if (hexToInt(&ptr,&addr))
|
||||||
if (*(ptr++) == ',')
|
if (*(ptr++) == ',')
|
||||||
if (hexToInt(&ptr,&length))
|
if (hexToInt(&ptr,&length))
|
||||||
|
@ -797,14 +814,12 @@ void handle_exception(int exceptionVector)
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
strcpy(remcomOutBuffer,"E01");
|
strcpy(remcomOutBuffer,"E01");
|
||||||
debug_error("malformed read memory command: %s",remcomInBuffer);
|
}
|
||||||
}
|
} else {
|
||||||
}
|
|
||||||
else {
|
|
||||||
exceptionHandler(2,_catchException);
|
exceptionHandler(2,_catchException);
|
||||||
strcpy(remcomOutBuffer,"E03");
|
strcpy(remcomOutBuffer,"E03");
|
||||||
debug_error("bus error");
|
debug_error("bus error");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* restore handler for bus error */
|
/* restore handler for bus error */
|
||||||
exceptionHandler(2,_catchException);
|
exceptionHandler(2,_catchException);
|
||||||
|
@ -816,7 +831,6 @@ void handle_exception(int exceptionVector)
|
||||||
exceptionHandler(2,handle_buserror);
|
exceptionHandler(2,handle_buserror);
|
||||||
|
|
||||||
/* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
|
/* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr,&addr))
|
if (hexToInt(&ptr,&addr))
|
||||||
if (*(ptr++) == ',')
|
if (*(ptr++) == ',')
|
||||||
if (hexToInt(&ptr,&length))
|
if (hexToInt(&ptr,&length))
|
||||||
|
@ -829,14 +843,12 @@ void handle_exception(int exceptionVector)
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
strcpy(remcomOutBuffer,"E02");
|
strcpy(remcomOutBuffer,"E02");
|
||||||
debug_error("malformed write memory command: %s",remcomInBuffer);
|
}
|
||||||
}
|
} else {
|
||||||
}
|
|
||||||
else {
|
|
||||||
exceptionHandler(2,_catchException);
|
exceptionHandler(2,_catchException);
|
||||||
strcpy(remcomOutBuffer,"E03");
|
strcpy(remcomOutBuffer,"E03");
|
||||||
debug_error("bus error");
|
debug_error("bus error");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* restore handler for bus error */
|
/* restore handler for bus error */
|
||||||
exceptionHandler(2,_catchException);
|
exceptionHandler(2,_catchException);
|
||||||
|
@ -844,10 +856,10 @@ void handle_exception(int exceptionVector)
|
||||||
|
|
||||||
/* cAA..AA Continue at address AA..AA(optional) */
|
/* cAA..AA Continue at address AA..AA(optional) */
|
||||||
/* sAA..AA Step one instruction from AA..AA(optional) */
|
/* sAA..AA Step one instruction from AA..AA(optional) */
|
||||||
case 'c' :
|
|
||||||
case 's' :
|
case 's' :
|
||||||
|
stepping = 1;
|
||||||
|
case 'c' :
|
||||||
/* try to read optional parameter, pc unchanged if no parm */
|
/* try to read optional parameter, pc unchanged if no parm */
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr,&addr))
|
if (hexToInt(&ptr,&addr))
|
||||||
registers[ PC ] = addr;
|
registers[ PC ] = addr;
|
||||||
|
|
||||||
|
@ -857,7 +869,7 @@ void handle_exception(int exceptionVector)
|
||||||
registers[ PS ] &= 0x7fff;
|
registers[ PS ] &= 0x7fff;
|
||||||
|
|
||||||
/* set the trace bit if we're stepping */
|
/* set the trace bit if we're stepping */
|
||||||
if (remcomInBuffer[0] == 's') registers[ PS ] |= 0x8000;
|
if (stepping) registers[ PS ] |= 0x8000;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* look for newPC in the linked list of exception frames.
|
* look for newPC in the linked list of exception frames.
|
||||||
|
|
84
gdb/main.c
84
gdb/main.c
|
@ -24,9 +24,6 @@
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "call-cmds.h"
|
#include "call-cmds.h"
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
|
|
||||||
|
@ -715,84 +712,3 @@ GDB manual (available as on-line info or a printed manual).\n\
|
||||||
Report bugs to \"bug-gdb@prep.ai.mit.edu\".\
|
Report bugs to \"bug-gdb@prep.ai.mit.edu\".\
|
||||||
", stream);
|
", stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* All TUI I/O sent to the *_filtered and *_unfiltered functions
|
|
||||||
eventually ends up here. The fputs_unfiltered_hook is primarily
|
|
||||||
used by GUIs to collect all output and send it to the GUI, instead
|
|
||||||
of the controlling terminal. Only output to gdb_stdout and
|
|
||||||
gdb_stderr are sent to the hook. Everything else is sent on to
|
|
||||||
fputs to allow file I/O to be handled appropriately. */
|
|
||||||
|
|
||||||
/* FIXME: Should be broken up and moved to a TUI specific file. */
|
|
||||||
|
|
||||||
void
|
|
||||||
tui_file_fputs (linebuffer, file)
|
|
||||||
const char *linebuffer;
|
|
||||||
GDB_FILE *file;
|
|
||||||
{
|
|
||||||
struct tui_stream *stream = gdb_file_data (file);
|
|
||||||
#if defined(TUI)
|
|
||||||
extern int tui_owns_terminal;
|
|
||||||
#endif
|
|
||||||
/* If anything (GUI, TUI) wants to capture GDB output, this is
|
|
||||||
* the place... the way to do it is to set up
|
|
||||||
* fputs_unfiltered_hook.
|
|
||||||
* Our TUI ("gdb -tui") used to hook output, but in the
|
|
||||||
* new (XDB style) scheme, we do not do that anymore... - RT
|
|
||||||
*/
|
|
||||||
if (fputs_unfiltered_hook
|
|
||||||
&& (file == gdb_stdout
|
|
||||||
|| file == gdb_stderr))
|
|
||||||
fputs_unfiltered_hook (linebuffer, file);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#if defined(TUI)
|
|
||||||
if (tui_version && tui_owns_terminal)
|
|
||||||
{
|
|
||||||
/* If we get here somehow while updating the TUI (from
|
|
||||||
* within a tuiDo(), then we need to temporarily
|
|
||||||
* set up the terminal for GDB output. This probably just
|
|
||||||
* happens on error output.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (stream->ts_streamtype == astring)
|
|
||||||
{
|
|
||||||
gdb_file_adjust_strbuf (strlen (linebuffer), stream);
|
|
||||||
strcat (stream->ts_strbuf, linebuffer);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tuiTermUnsetup (0, (tui_version) ? cmdWin->detail.commandInfo.curch : 0);
|
|
||||||
fputs (linebuffer, stream->ts_filestream);
|
|
||||||
tuiTermSetup (0);
|
|
||||||
if (linebuffer[strlen (linebuffer) - 1] == '\n')
|
|
||||||
tuiClearCommandCharCount ();
|
|
||||||
else
|
|
||||||
tuiIncrCommandCharCountBy (strlen (linebuffer));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* The normal case - just do a fputs() */
|
|
||||||
if (stream->ts_streamtype == astring)
|
|
||||||
{
|
|
||||||
gdb_file_adjust_strbuf (strlen (linebuffer), stream);
|
|
||||||
strcat (stream->ts_strbuf, linebuffer);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
fputs (linebuffer, stream->ts_filestream);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
|
||||||
if (stream->ts_streamtype == astring)
|
|
||||||
{
|
|
||||||
gdb_file_adjust_strbuf (strlen (linebuffer), file);
|
|
||||||
strcat (stream->ts_strbuf, linebuffer);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
fputs (linebuffer, stream->ts_filestream);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -35,10 +35,6 @@
|
||||||
#include "objfiles.h"
|
#include "objfiles.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void _initialize_maint_cmds PARAMS ((void));
|
extern void _initialize_maint_cmds PARAMS ((void));
|
||||||
|
|
||||||
static void maintenance_command PARAMS ((char *, int));
|
static void maintenance_command PARAMS ((char *, int));
|
||||||
|
|
|
@ -19,11 +19,9 @@
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
/* Forward decl's for prototypes */
|
/* Forward decl's for prototypes */
|
||||||
#ifdef __STDC__
|
|
||||||
struct target_ops;
|
struct target_ops;
|
||||||
struct objfile;
|
struct objfile;
|
||||||
struct section_offsets;
|
struct section_offsets;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Called to add symbols from a shared library to gdb's symbol table. */
|
/* Called to add symbols from a shared library to gdb's symbol table. */
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
#include <stropts.h>
|
#include <stropts.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include "gdb_stat.h"
|
#include "gdb_stat.h"
|
||||||
|
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
|
|
@ -47,11 +47,11 @@
|
||||||
#include "symfile.h"
|
#include "symfile.h"
|
||||||
#include "remote-utils.h"
|
#include "remote-utils.h"
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_TIME_H
|
||||||
|
#include <time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
extern struct target_ops remote_rdp_ops;
|
extern struct target_ops remote_rdp_ops;
|
||||||
static serial_t io;
|
static serial_t io;
|
||||||
|
|
|
@ -196,9 +196,7 @@ void remote_console_output PARAMS ((char *));
|
||||||
|
|
||||||
static void check_binary_download PARAMS ((CORE_ADDR addr));
|
static void check_binary_download PARAMS ((CORE_ADDR addr));
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
struct packet_config;
|
struct packet_config;
|
||||||
#endif
|
|
||||||
|
|
||||||
static void show_packet_config_cmd PARAMS ((struct packet_config * config));
|
static void show_packet_config_cmd PARAMS ((struct packet_config * config));
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,8 @@
|
||||||
#define SCM_CODE(x) SCM_CAR(SCM_CLOSCAR (x))
|
#define SCM_CODE(x) SCM_CAR(SCM_CLOSCAR (x))
|
||||||
#define SCM_MAKINUM(x) (((x)<<2)+2L)
|
#define SCM_MAKINUM(x) (((x)<<2)+2L)
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decls for prototypes */
|
/* Forward decls for prototypes */
|
||||||
struct value;
|
struct value;
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int scm_value_print PARAMS ((struct value *, GDB_FILE *,
|
extern int scm_value_print PARAMS ((struct value *, GDB_FILE *,
|
||||||
int, enum val_prettyprint));
|
int, enum val_prettyprint));
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "signals.h"
|
#include "signals.h"
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __CYGWIN32__
|
#ifndef __CYGWIN32__
|
||||||
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
||||||
|
|
|
@ -23,9 +23,6 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_TERMIOS
|
#ifdef HAVE_TERMIOS
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,7 @@ static int hex (char);
|
||||||
static char *mem2hex (char *, char *, int);
|
static char *mem2hex (char *, char *, int);
|
||||||
static char *hex2mem (char *, char *, int);
|
static char *hex2mem (char *, char *, int);
|
||||||
static int hexToInt (char **, int *);
|
static int hexToInt (char **, int *);
|
||||||
static void getpacket (char *);
|
static unsigned char *getpacket (unsigned char *);
|
||||||
static void putpacket (char *);
|
static void putpacket (char *);
|
||||||
static void handle_buserror (void);
|
static void handle_buserror (void);
|
||||||
static int computeSignal (int exceptionVector);
|
static int computeSignal (int exceptionVector);
|
||||||
|
@ -382,28 +382,32 @@ hexToInt (char **ptr, int *intValue)
|
||||||
|
|
||||||
/* scan for the sequence $<data>#<checksum> */
|
/* scan for the sequence $<data>#<checksum> */
|
||||||
|
|
||||||
static
|
char *
|
||||||
void
|
getpacket (buffer)
|
||||||
getpacket (char *buffer)
|
char *buffer;
|
||||||
{
|
{
|
||||||
unsigned char checksum;
|
unsigned char checksum;
|
||||||
unsigned char xmitcsum;
|
unsigned char xmitcsum;
|
||||||
int i;
|
|
||||||
int count;
|
int count;
|
||||||
char ch;
|
char ch;
|
||||||
do
|
|
||||||
|
while (1)
|
||||||
{
|
{
|
||||||
/* wait around for the start character, ignore all other characters */
|
/* wait around for the start character, ignore all other characters */
|
||||||
while ((ch = getDebugChar ()) != '$');
|
while ((ch = getDebugChar ()) != '$')
|
||||||
|
;
|
||||||
|
|
||||||
|
retry:
|
||||||
checksum = 0;
|
checksum = 0;
|
||||||
xmitcsum = -1;
|
xmitcsum = -1;
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
/* now, read until a # or end of buffer is found */
|
/* now, read until a # or end of buffer is found */
|
||||||
while (count < BUFMAX)
|
while (count < BUFMAX)
|
||||||
{
|
{
|
||||||
ch = getDebugChar ();
|
ch = getDebugChar ();
|
||||||
|
if (ch == '$')
|
||||||
|
goto retry;
|
||||||
if (ch == '#')
|
if (ch == '#')
|
||||||
break;
|
break;
|
||||||
checksum = checksum + ch;
|
checksum = checksum + ch;
|
||||||
|
@ -414,28 +418,32 @@ getpacket (char *buffer)
|
||||||
|
|
||||||
if (ch == '#')
|
if (ch == '#')
|
||||||
{
|
{
|
||||||
xmitcsum = hex (getDebugChar ()) << 4;
|
ch = getDebugChar ();
|
||||||
xmitcsum += hex (getDebugChar ());
|
xmitcsum = hex (ch) << 4;
|
||||||
|
ch = getDebugChar ();
|
||||||
|
xmitcsum += hex (ch);
|
||||||
|
|
||||||
if (checksum != xmitcsum)
|
if (checksum != xmitcsum)
|
||||||
putDebugChar ('-'); /* failed checksum */
|
{
|
||||||
|
putDebugChar ('-'); /* failed checksum */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
putDebugChar ('+'); /* successful transfer */
|
putDebugChar ('+'); /* successful transfer */
|
||||||
|
|
||||||
/* if a sequence char is present, reply the sequence ID */
|
/* if a sequence char is present, reply the sequence ID */
|
||||||
if (buffer[2] == ':')
|
if (buffer[2] == ':')
|
||||||
{
|
{
|
||||||
putDebugChar (buffer[0]);
|
putDebugChar (buffer[0]);
|
||||||
putDebugChar (buffer[1]);
|
putDebugChar (buffer[1]);
|
||||||
/* remove sequence chars from buffer */
|
|
||||||
count = strlen (buffer);
|
return &buffer[3];
|
||||||
for (i = 3; i <= count; i++)
|
|
||||||
buffer[i - 3] = buffer[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return &buffer[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (checksum != xmitcsum);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -492,7 +500,6 @@ putpacket (register char *buffer)
|
||||||
putDebugChar (lowhex(checksum));
|
putDebugChar (lowhex(checksum));
|
||||||
}
|
}
|
||||||
while (getDebugChar() != '+');
|
while (getDebugChar() != '+');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -648,7 +655,7 @@ When in the monitor mode we talk a human on the serial line rather than gdb.
|
||||||
void
|
void
|
||||||
gdb_handle_exception (int exceptionVector)
|
gdb_handle_exception (int exceptionVector)
|
||||||
{
|
{
|
||||||
int sigval;
|
int sigval, stepping;
|
||||||
int addr, length;
|
int addr, length;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
|
@ -677,12 +684,14 @@ gdb_handle_exception (int exceptionVector)
|
||||||
*/
|
*/
|
||||||
undoSStep ();
|
undoSStep ();
|
||||||
|
|
||||||
|
stepping = 0;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
remcomOutBuffer[0] = 0;
|
remcomOutBuffer[0] = 0;
|
||||||
getpacket (remcomInBuffer);
|
ptr = getpacket (remcomInBuffer);
|
||||||
|
|
||||||
switch (remcomInBuffer[0])
|
switch (*ptr++)
|
||||||
{
|
{
|
||||||
case '?':
|
case '?':
|
||||||
remcomOutBuffer[0] = 'S';
|
remcomOutBuffer[0] = 'S';
|
||||||
|
@ -697,7 +706,7 @@ gdb_handle_exception (int exceptionVector)
|
||||||
mem2hex ((char *) registers, remcomOutBuffer, NUMREGBYTES);
|
mem2hex ((char *) registers, remcomOutBuffer, NUMREGBYTES);
|
||||||
break;
|
break;
|
||||||
case 'G': /* set the value of the CPU registers - return OK */
|
case 'G': /* set the value of the CPU registers - return OK */
|
||||||
hex2mem (&remcomInBuffer[1], (char *) registers, NUMREGBYTES);
|
hex2mem (&ptr, (char *) registers, NUMREGBYTES);
|
||||||
strcpy (remcomOutBuffer, "OK");
|
strcpy (remcomOutBuffer, "OK");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -707,7 +716,6 @@ gdb_handle_exception (int exceptionVector)
|
||||||
{
|
{
|
||||||
dofault = 0;
|
dofault = 0;
|
||||||
/* TRY, TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
|
/* TRY, TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt (&ptr, &addr))
|
if (hexToInt (&ptr, &addr))
|
||||||
if (*(ptr++) == ',')
|
if (*(ptr++) == ',')
|
||||||
if (hexToInt (&ptr, &length))
|
if (hexToInt (&ptr, &length))
|
||||||
|
@ -732,7 +740,6 @@ gdb_handle_exception (int exceptionVector)
|
||||||
dofault = 0;
|
dofault = 0;
|
||||||
|
|
||||||
/* TRY, TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
|
/* TRY, TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt (&ptr, &addr))
|
if (hexToInt (&ptr, &addr))
|
||||||
if (*(ptr++) == ',')
|
if (*(ptr++) == ',')
|
||||||
if (hexToInt (&ptr, &length))
|
if (hexToInt (&ptr, &length))
|
||||||
|
@ -754,15 +761,15 @@ gdb_handle_exception (int exceptionVector)
|
||||||
|
|
||||||
/* cAA..AA Continue at address AA..AA(optional) */
|
/* cAA..AA Continue at address AA..AA(optional) */
|
||||||
/* sAA..AA Step one instruction from AA..AA(optional) */
|
/* sAA..AA Step one instruction from AA..AA(optional) */
|
||||||
case 'c':
|
|
||||||
case 's':
|
case 's':
|
||||||
|
stepping = 1;
|
||||||
|
case 'c':
|
||||||
{
|
{
|
||||||
/* tRY, to read optional parameter, pc unchanged if no parm */
|
/* tRY, to read optional parameter, pc unchanged if no parm */
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt (&ptr, &addr))
|
if (hexToInt (&ptr, &addr))
|
||||||
registers[PC] = addr;
|
registers[PC] = addr;
|
||||||
|
|
||||||
if (remcomInBuffer[0] == 's')
|
if (stepping)
|
||||||
doSStep ();
|
doSStep ();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
|
|
77
gdb/solib.c
77
gdb/solib.c
|
@ -31,7 +31,6 @@
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#ifndef SVR4_SHARED_LIBS
|
#ifndef SVR4_SHARED_LIBS
|
||||||
/* SunOS shared libs need the nlist structure. */
|
/* SunOS shared libs need the nlist structure. */
|
||||||
|
@ -888,6 +887,70 @@ first_link_map_member ()
|
||||||
return (lm);
|
return (lm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SVR4_SHARED_LIBS
|
||||||
|
/*
|
||||||
|
|
||||||
|
LOCAL FUNCTION
|
||||||
|
|
||||||
|
open_exec_file_object
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
|
||||||
|
void open_symbol_file_object (int from_tty)
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
|
||||||
|
If no open symbol file, attempt to locate and open the main symbol
|
||||||
|
file. On SVR4 systems, this is the first link map entry. If its
|
||||||
|
name is here, we can open it. Useful when attaching to a process
|
||||||
|
without first loading its symbol file.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
int
|
||||||
|
open_symbol_file_object (arg)
|
||||||
|
PTR arg;
|
||||||
|
{
|
||||||
|
int from_tty = (int) arg; /* sneak past catch_errors */
|
||||||
|
struct link_map *lm, lmcopy;
|
||||||
|
char *filename;
|
||||||
|
int errcode;
|
||||||
|
|
||||||
|
if (symfile_objfile)
|
||||||
|
if (!query ("Attempt to reload symbols from process? "))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if ((debug_base = locate_base ()) == 0)
|
||||||
|
return 0; /* failed somehow... */
|
||||||
|
|
||||||
|
/* First link map member should be the executable. */
|
||||||
|
if ((lm = first_link_map_member ()) == NULL)
|
||||||
|
return 0; /* failed somehow... */
|
||||||
|
|
||||||
|
/* Read from target memory to GDB. */
|
||||||
|
read_memory ((CORE_ADDR) lm, (void *) &lmcopy, sizeof (lmcopy));
|
||||||
|
|
||||||
|
if (lmcopy.l_name == 0)
|
||||||
|
return 0; /* no filename. */
|
||||||
|
|
||||||
|
/* Now fetch the filename from target memory. */
|
||||||
|
target_read_string ((CORE_ADDR) lmcopy.l_name, &filename,
|
||||||
|
MAX_PATH_SIZE - 1, &errcode);
|
||||||
|
if (errcode)
|
||||||
|
{
|
||||||
|
warning ("failed to read exec filename from attached file: %s",
|
||||||
|
safe_strerror (errcode));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
make_cleanup ((make_cleanup_func) free, (void *) filename);
|
||||||
|
/* Have a pathname: read the symbol file. */
|
||||||
|
symbol_file_command (filename, from_tty);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif /* SVR4_SHARED_LIBS */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
LOCAL FUNCTION
|
LOCAL FUNCTION
|
||||||
|
@ -1099,6 +1162,18 @@ solib_add (arg_string, from_tty, target)
|
||||||
int count;
|
int count;
|
||||||
int old;
|
int old;
|
||||||
|
|
||||||
|
#ifdef SVR4_SHARED_LIBS
|
||||||
|
/* If we are attaching to a running process for which we
|
||||||
|
have not opened a symbol file, we may be able to get its
|
||||||
|
symbols now! */
|
||||||
|
if (attach_flag &&
|
||||||
|
symfile_objfile == NULL)
|
||||||
|
catch_errors (open_symbol_file_object, (PTR) from_tty,
|
||||||
|
"Error reading attached process's symbol file.\n",
|
||||||
|
RETURN_MASK_ALL);
|
||||||
|
|
||||||
|
#endif SVR4_SHARED_LIBS
|
||||||
|
|
||||||
if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL)
|
if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL)
|
||||||
{
|
{
|
||||||
error ("Invalid regexp: %s", re_err);
|
error ("Invalid regexp: %s", re_err);
|
||||||
|
|
|
@ -18,9 +18,8 @@
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decl's for prototypes */
|
/* Forward decl's for prototypes */
|
||||||
struct target_ops;
|
struct target_ops;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Called when we free all symtabs, to free the shared library information
|
/* Called when we free all symtabs, to free the shared library information
|
||||||
as well. */
|
as well. */
|
||||||
|
|
|
@ -21,11 +21,10 @@
|
||||||
Written by the Center for Software Science at the Univerity of Utah
|
Written by the Center for Software Science at the Univerity of Utah
|
||||||
and by Cygnus Support. */
|
and by Cygnus Support. */
|
||||||
|
|
||||||
#ifdef __STDC__ /* Forward decl's for prototypes */
|
/* Forward decl's for prototypes */
|
||||||
struct target_ops;
|
struct target_ops;
|
||||||
struct objfile;
|
struct objfile;
|
||||||
struct section_offsets;
|
struct section_offsets;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Called to add symbols from a shared library to gdb's symbol table. */
|
/* Called to add symbols from a shared library to gdb's symbol table. */
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,6 @@
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
#include "gdb_stat.h"
|
#include "gdb_stat.h"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
#include "gnu-regex.h"
|
#include "gnu-regex.h"
|
||||||
#include "symfile.h"
|
#include "symfile.h"
|
||||||
|
|
|
@ -286,70 +286,68 @@ hex(ch)
|
||||||
|
|
||||||
/* scan for the sequence $<data>#<checksum> */
|
/* scan for the sequence $<data>#<checksum> */
|
||||||
|
|
||||||
static void
|
unsigned char *
|
||||||
getpacket(buffer)
|
getpacket (buffer)
|
||||||
char *buffer;
|
unsigned char *buffer;
|
||||||
{
|
{
|
||||||
unsigned char checksum;
|
unsigned char checksum;
|
||||||
unsigned char xmitcsum;
|
unsigned char xmitcsum;
|
||||||
int i;
|
|
||||||
int count;
|
int count;
|
||||||
unsigned char ch;
|
char ch;
|
||||||
|
|
||||||
do
|
while (1)
|
||||||
{
|
{
|
||||||
/* wait around for the start character, ignore all other characters */
|
/* wait around for the start character, ignore all other characters */
|
||||||
while ((ch = (getDebugChar() & 0x7f)) != '$') ;
|
while ((ch = getDebugChar ()) != '$')
|
||||||
|
;
|
||||||
|
|
||||||
|
retry:
|
||||||
checksum = 0;
|
checksum = 0;
|
||||||
xmitcsum = -1;
|
xmitcsum = -1;
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
/* now, read until a # or end of buffer is found */
|
/* now, read until a # or end of buffer is found */
|
||||||
while (count < BUFMAX)
|
while (count < BUFMAX)
|
||||||
{
|
{
|
||||||
ch = getDebugChar() & 0x7f;
|
ch = getDebugChar ();
|
||||||
|
if (ch == '$')
|
||||||
|
goto retry;
|
||||||
if (ch == '#')
|
if (ch == '#')
|
||||||
break;
|
break;
|
||||||
checksum = checksum + ch;
|
checksum = checksum + ch;
|
||||||
buffer[count] = ch;
|
buffer[count] = ch;
|
||||||
count = count + 1;
|
count = count + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count >= BUFMAX)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
buffer[count] = 0;
|
buffer[count] = 0;
|
||||||
|
|
||||||
if (ch == '#')
|
if (ch == '#')
|
||||||
{
|
{
|
||||||
xmitcsum = hex(getDebugChar() & 0x7f) << 4;
|
ch = getDebugChar ();
|
||||||
xmitcsum |= hex(getDebugChar() & 0x7f);
|
xmitcsum = hex (ch) << 4;
|
||||||
#if 0
|
ch = getDebugChar ();
|
||||||
/* Humans shouldn't have to figure out checksums to type to it. */
|
xmitcsum += hex (ch);
|
||||||
putDebugChar ('+');
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
if (checksum != xmitcsum)
|
if (checksum != xmitcsum)
|
||||||
putDebugChar('-'); /* failed checksum */
|
{
|
||||||
|
putDebugChar ('-'); /* failed checksum */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
putDebugChar('+'); /* successful transfer */
|
putDebugChar ('+'); /* successful transfer */
|
||||||
|
|
||||||
/* if a sequence char is present, reply the sequence ID */
|
/* if a sequence char is present, reply the sequence ID */
|
||||||
if (buffer[2] == ':')
|
if (buffer[2] == ':')
|
||||||
{
|
{
|
||||||
putDebugChar(buffer[0]);
|
putDebugChar (buffer[0]);
|
||||||
putDebugChar(buffer[1]);
|
putDebugChar (buffer[1]);
|
||||||
/* remove sequence chars from buffer */
|
|
||||||
count = strlen(buffer);
|
return &buffer[3];
|
||||||
for (i=3; i <= count; i++)
|
|
||||||
buffer[i-3] = buffer[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return &buffer[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (checksum != xmitcsum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send the packet in buffer. */
|
/* send the packet in buffer. */
|
||||||
|
@ -381,7 +379,7 @@ putpacket(buffer)
|
||||||
putDebugChar(hexchars[checksum & 0xf]);
|
putDebugChar(hexchars[checksum & 0xf]);
|
||||||
|
|
||||||
}
|
}
|
||||||
while ((getDebugChar() & 0x7f) != '+');
|
while (getDebugChar() != '+');
|
||||||
}
|
}
|
||||||
|
|
||||||
static char remcomInBuffer[BUFMAX];
|
static char remcomInBuffer[BUFMAX];
|
||||||
|
@ -655,8 +653,8 @@ handle_exception (registers)
|
||||||
{
|
{
|
||||||
remcomOutBuffer[0] = 0;
|
remcomOutBuffer[0] = 0;
|
||||||
|
|
||||||
getpacket(remcomInBuffer);
|
ptr = getpacket(remcomInBuffer);
|
||||||
switch (remcomInBuffer[0])
|
switch (*ptr++)
|
||||||
{
|
{
|
||||||
case '?':
|
case '?':
|
||||||
remcomOutBuffer[0] = 'S';
|
remcomOutBuffer[0] = 'S';
|
||||||
|
@ -665,8 +663,7 @@ handle_exception (registers)
|
||||||
remcomOutBuffer[3] = 0;
|
remcomOutBuffer[3] = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd': /* toggle debug flag */
|
||||||
/* toggle debug flag */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'g': /* return the value of the CPU registers */
|
case 'g': /* return the value of the CPU registers */
|
||||||
|
@ -688,7 +685,6 @@ handle_exception (registers)
|
||||||
|
|
||||||
psr = registers[PSR];
|
psr = registers[PSR];
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
hex2mem(ptr, (char *)registers, 16 * 4, 0); /* G & O regs */
|
hex2mem(ptr, (char *)registers, 16 * 4, 0); /* G & O regs */
|
||||||
hex2mem(ptr + 16 * 4 * 2, sp + 0, 16 * 4, 0); /* L & I regs */
|
hex2mem(ptr + 16 * 4 * 2, sp + 0, 16 * 4, 0); /* L & I regs */
|
||||||
hex2mem(ptr + 64 * 4 * 2, (char *)®isters[Y],
|
hex2mem(ptr + 64 * 4 * 2, (char *)®isters[Y],
|
||||||
|
@ -714,8 +710,6 @@ handle_exception (registers)
|
||||||
case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
|
case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
|
||||||
/* Try to read %x,%x. */
|
/* Try to read %x,%x. */
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
|
|
||||||
if (hexToInt(&ptr, &addr)
|
if (hexToInt(&ptr, &addr)
|
||||||
&& *ptr++ == ','
|
&& *ptr++ == ','
|
||||||
&& hexToInt(&ptr, &length))
|
&& hexToInt(&ptr, &length))
|
||||||
|
@ -732,8 +726,6 @@ handle_exception (registers)
|
||||||
case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
|
case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
|
||||||
/* Try to read '%x,%x:'. */
|
/* Try to read '%x,%x:'. */
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
|
|
||||||
if (hexToInt(&ptr, &addr)
|
if (hexToInt(&ptr, &addr)
|
||||||
&& *ptr++ == ','
|
&& *ptr++ == ','
|
||||||
&& hexToInt(&ptr, &length)
|
&& hexToInt(&ptr, &length)
|
||||||
|
@ -751,7 +743,6 @@ handle_exception (registers)
|
||||||
case 'c': /* cAA..AA Continue at address AA..AA(optional) */
|
case 'c': /* cAA..AA Continue at address AA..AA(optional) */
|
||||||
/* try to read optional parameter, pc unchanged if no parm */
|
/* try to read optional parameter, pc unchanged if no parm */
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr, &addr))
|
if (hexToInt(&ptr, &addr))
|
||||||
{
|
{
|
||||||
registers[PC] = addr;
|
registers[PC] = addr;
|
||||||
|
@ -787,7 +778,6 @@ Disabled until we can unscrew this properly
|
||||||
int baudrate;
|
int baudrate;
|
||||||
extern void set_timer_3();
|
extern void set_timer_3();
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (!hexToInt(&ptr, &baudrate))
|
if (!hexToInt(&ptr, &baudrate))
|
||||||
{
|
{
|
||||||
strcpy(remcomOutBuffer,"B01");
|
strcpy(remcomOutBuffer,"B01");
|
||||||
|
|
|
@ -136,16 +136,6 @@ extern void trap_low();
|
||||||
nasty interactions between app code and the stub (for instance if user steps
|
nasty interactions between app code and the stub (for instance if user steps
|
||||||
into strlen, etc..) */
|
into strlen, etc..) */
|
||||||
|
|
||||||
static int
|
|
||||||
strlen (const char *s)
|
|
||||||
{
|
|
||||||
const char *s1 = s;
|
|
||||||
|
|
||||||
while (*s1++ != '\000');
|
|
||||||
|
|
||||||
return s1 - s;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
strcpy (char *dst, const char *src)
|
strcpy (char *dst, const char *src)
|
||||||
{
|
{
|
||||||
|
@ -392,70 +382,68 @@ hex(ch)
|
||||||
|
|
||||||
/* scan for the sequence $<data>#<checksum> */
|
/* scan for the sequence $<data>#<checksum> */
|
||||||
|
|
||||||
static void
|
unsigned char *
|
||||||
getpacket(buffer)
|
getpacket (buffer)
|
||||||
char *buffer;
|
unsigned char *buffer;
|
||||||
{
|
{
|
||||||
unsigned char checksum;
|
unsigned char checksum;
|
||||||
unsigned char xmitcsum;
|
unsigned char xmitcsum;
|
||||||
int i;
|
|
||||||
int count;
|
int count;
|
||||||
unsigned char ch;
|
char ch;
|
||||||
|
|
||||||
do
|
while (1)
|
||||||
{
|
{
|
||||||
/* wait around for the start character, ignore all other characters */
|
/* wait around for the start character, ignore all other characters */
|
||||||
while ((ch = (getDebugChar() & 0x7f)) != '$') ;
|
while ((ch = getDebugChar ()) != '$')
|
||||||
|
;
|
||||||
|
|
||||||
|
retry:
|
||||||
checksum = 0;
|
checksum = 0;
|
||||||
xmitcsum = -1;
|
xmitcsum = -1;
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
/* now, read until a # or end of buffer is found */
|
/* now, read until a # or end of buffer is found */
|
||||||
while (count < BUFMAX)
|
while (count < BUFMAX)
|
||||||
{
|
{
|
||||||
ch = getDebugChar() & 0x7f;
|
ch = getDebugChar ();
|
||||||
|
if (ch == '$')
|
||||||
|
goto retry;
|
||||||
if (ch == '#')
|
if (ch == '#')
|
||||||
break;
|
break;
|
||||||
checksum = checksum + ch;
|
checksum = checksum + ch;
|
||||||
buffer[count] = ch;
|
buffer[count] = ch;
|
||||||
count = count + 1;
|
count = count + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count >= BUFMAX)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
buffer[count] = 0;
|
buffer[count] = 0;
|
||||||
|
|
||||||
if (ch == '#')
|
if (ch == '#')
|
||||||
{
|
{
|
||||||
xmitcsum = hex(getDebugChar() & 0x7f) << 4;
|
ch = getDebugChar ();
|
||||||
xmitcsum |= hex(getDebugChar() & 0x7f);
|
xmitcsum = hex (ch) << 4;
|
||||||
#if 0
|
ch = getDebugChar ();
|
||||||
/* Humans shouldn't have to figure out checksums to type to it. */
|
xmitcsum += hex (ch);
|
||||||
putDebugChar ('+');
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
if (checksum != xmitcsum)
|
if (checksum != xmitcsum)
|
||||||
putDebugChar('-'); /* failed checksum */
|
{
|
||||||
|
putDebugChar ('-'); /* failed checksum */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
putDebugChar('+'); /* successful transfer */
|
putDebugChar ('+'); /* successful transfer */
|
||||||
|
|
||||||
/* if a sequence char is present, reply the sequence ID */
|
/* if a sequence char is present, reply the sequence ID */
|
||||||
if (buffer[2] == ':')
|
if (buffer[2] == ':')
|
||||||
{
|
{
|
||||||
putDebugChar(buffer[0]);
|
putDebugChar (buffer[0]);
|
||||||
putDebugChar(buffer[1]);
|
putDebugChar (buffer[1]);
|
||||||
/* remove sequence chars from buffer */
|
|
||||||
count = strlen(buffer);
|
return &buffer[3];
|
||||||
for (i=3; i <= count; i++)
|
|
||||||
buffer[i-3] = buffer[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return &buffer[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (checksum != xmitcsum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send the packet in buffer. */
|
/* send the packet in buffer. */
|
||||||
|
@ -487,7 +475,7 @@ putpacket(buffer)
|
||||||
putDebugChar(hexchars[checksum & 0xf]);
|
putDebugChar(hexchars[checksum & 0xf]);
|
||||||
|
|
||||||
}
|
}
|
||||||
while ((getDebugChar() & 0x7f) != '+');
|
while (getDebugChar() != '+');
|
||||||
}
|
}
|
||||||
|
|
||||||
static char remcomInBuffer[BUFMAX];
|
static char remcomInBuffer[BUFMAX];
|
||||||
|
@ -808,8 +796,8 @@ handle_exception (registers)
|
||||||
{
|
{
|
||||||
remcomOutBuffer[0] = 0;
|
remcomOutBuffer[0] = 0;
|
||||||
|
|
||||||
getpacket(remcomInBuffer);
|
ptr = getpacket(remcomInBuffer);
|
||||||
switch (remcomInBuffer[0])
|
switch (*ptr++)
|
||||||
{
|
{
|
||||||
case '?':
|
case '?':
|
||||||
remcomOutBuffer[0] = 'S';
|
remcomOutBuffer[0] = 'S';
|
||||||
|
@ -834,9 +822,7 @@ handle_exception (registers)
|
||||||
|
|
||||||
psr = registers[PSR];
|
psr = registers[PSR];
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
if (ptr[-1] == 'P')
|
||||||
|
|
||||||
if (remcomInBuffer[0] == 'P')
|
|
||||||
{
|
{
|
||||||
int regno;
|
int regno;
|
||||||
|
|
||||||
|
@ -878,8 +864,6 @@ handle_exception (registers)
|
||||||
case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
|
case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
|
||||||
/* Try to read %x,%x. */
|
/* Try to read %x,%x. */
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
|
|
||||||
if (hexToInt(&ptr, &addr)
|
if (hexToInt(&ptr, &addr)
|
||||||
&& *ptr++ == ','
|
&& *ptr++ == ','
|
||||||
&& hexToInt(&ptr, &length))
|
&& hexToInt(&ptr, &length))
|
||||||
|
@ -896,8 +880,6 @@ handle_exception (registers)
|
||||||
case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
|
case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
|
||||||
/* Try to read '%x,%x:'. */
|
/* Try to read '%x,%x:'. */
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
|
|
||||||
if (hexToInt(&ptr, &addr)
|
if (hexToInt(&ptr, &addr)
|
||||||
&& *ptr++ == ','
|
&& *ptr++ == ','
|
||||||
&& hexToInt(&ptr, &length)
|
&& hexToInt(&ptr, &length)
|
||||||
|
@ -914,8 +896,6 @@ handle_exception (registers)
|
||||||
|
|
||||||
case 'c': /* cAA..AA Continue at address AA..AA(optional) */
|
case 'c': /* cAA..AA Continue at address AA..AA(optional) */
|
||||||
/* try to read optional parameter, pc unchanged if no parm */
|
/* try to read optional parameter, pc unchanged if no parm */
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr, &addr))
|
if (hexToInt(&ptr, &addr))
|
||||||
{
|
{
|
||||||
registers[PC] = addr;
|
registers[PC] = addr;
|
||||||
|
@ -965,7 +945,6 @@ Disabled until we can unscrew this properly
|
||||||
int baudrate;
|
int baudrate;
|
||||||
extern void set_timer_3();
|
extern void set_timer_3();
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (!hexToInt(&ptr, &baudrate))
|
if (!hexToInt(&ptr, &baudrate))
|
||||||
{
|
{
|
||||||
strcpy(remcomOutBuffer,"B01");
|
strcpy(remcomOutBuffer,"B01");
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#if (!defined(__GO32__) && !defined(_WIN32)) || defined(__CYGWIN32__)
|
#if (!defined(__GO32__) && !defined(_WIN32)) || defined(__CYGWIN32__)
|
||||||
#define HAVE_SOCKETS
|
#define HAVE_SOCKETS
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
|
@ -452,67 +452,68 @@ hex(ch)
|
||||||
|
|
||||||
/* scan for the sequence $<data>#<checksum> */
|
/* scan for the sequence $<data>#<checksum> */
|
||||||
|
|
||||||
static void
|
unsigned char *
|
||||||
getpacket(buffer)
|
getpacket (buffer)
|
||||||
char *buffer;
|
unsigned char *buffer;
|
||||||
{
|
{
|
||||||
unsigned char checksum;
|
unsigned char checksum;
|
||||||
unsigned char xmitcsum;
|
unsigned char xmitcsum;
|
||||||
int i;
|
|
||||||
int count;
|
int count;
|
||||||
unsigned char ch;
|
char ch;
|
||||||
|
|
||||||
do
|
while (1)
|
||||||
{
|
{
|
||||||
/* wait around for the start character, ignore all other characters */
|
/* wait around for the start character, ignore all other characters */
|
||||||
while ((ch = (getDebugChar() & 0x7f)) != '$')
|
while ((ch = getDebugChar ()) != '$')
|
||||||
;
|
;
|
||||||
|
|
||||||
|
retry:
|
||||||
checksum = 0;
|
checksum = 0;
|
||||||
xmitcsum = -1;
|
xmitcsum = -1;
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
/* now, read until a # or end of buffer is found */
|
/* now, read until a # or end of buffer is found */
|
||||||
while (count < BUFMAX)
|
while (count < BUFMAX)
|
||||||
{
|
{
|
||||||
ch = getDebugChar() & 0x7f;
|
ch = getDebugChar ();
|
||||||
|
if (ch == '$')
|
||||||
|
goto retry;
|
||||||
if (ch == '#')
|
if (ch == '#')
|
||||||
break;
|
break;
|
||||||
checksum = checksum + ch;
|
checksum = checksum + ch;
|
||||||
buffer[count] = ch;
|
buffer[count] = ch;
|
||||||
count = count + 1;
|
count = count + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count >= BUFMAX)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
buffer[count] = 0;
|
buffer[count] = 0;
|
||||||
|
|
||||||
if (ch == '#')
|
if (ch == '#')
|
||||||
{
|
{
|
||||||
xmitcsum = hex(ch = getDebugChar() & 0x7f) << 4;
|
ch = getDebugChar ();
|
||||||
xmitcsum |= hex(ch = getDebugChar() & 0x7f);
|
xmitcsum = hex (ch) << 4;
|
||||||
|
ch = getDebugChar ();
|
||||||
|
xmitcsum += hex (ch);
|
||||||
|
|
||||||
if (checksum != xmitcsum)
|
if (checksum != xmitcsum)
|
||||||
putDebugChar('-'); /* failed checksum */
|
{
|
||||||
|
putDebugChar ('-'); /* failed checksum */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
putDebugChar('+'); /* successful transfer */
|
putDebugChar ('+'); /* successful transfer */
|
||||||
|
|
||||||
/* if a sequence char is present, reply the sequence ID */
|
/* if a sequence char is present, reply the sequence ID */
|
||||||
if (buffer[2] == ':')
|
if (buffer[2] == ':')
|
||||||
{
|
{
|
||||||
putDebugChar(buffer[0]);
|
putDebugChar (buffer[0]);
|
||||||
putDebugChar(buffer[1]);
|
putDebugChar (buffer[1]);
|
||||||
/* remove sequence chars from buffer */
|
|
||||||
count = strlen(buffer);
|
return &buffer[3];
|
||||||
for (i=3; i <= count; i++)
|
|
||||||
buffer[i-3] = buffer[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return &buffer[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (checksum != xmitcsum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send the packet in buffer. */
|
/* send the packet in buffer. */
|
||||||
|
@ -544,7 +545,7 @@ putpacket(buffer)
|
||||||
putDebugChar(hexchars[checksum & 0xf]);
|
putDebugChar(hexchars[checksum & 0xf]);
|
||||||
|
|
||||||
}
|
}
|
||||||
while ((getDebugChar() & 0x7f) != '+');
|
while (getDebugChar() != '+');
|
||||||
}
|
}
|
||||||
|
|
||||||
static char remcomInBuffer[BUFMAX];
|
static char remcomInBuffer[BUFMAX];
|
||||||
|
@ -880,8 +881,8 @@ handle_exception (registers)
|
||||||
{
|
{
|
||||||
remcomOutBuffer[0] = 0;
|
remcomOutBuffer[0] = 0;
|
||||||
|
|
||||||
getpacket(remcomInBuffer);
|
ptr = getpacket(remcomInBuffer);
|
||||||
switch (remcomInBuffer[0])
|
switch (*ptr++)
|
||||||
{
|
{
|
||||||
case '?':
|
case '?':
|
||||||
remcomOutBuffer[0] = 'S';
|
remcomOutBuffer[0] = 'S';
|
||||||
|
@ -928,9 +929,7 @@ handle_exception (registers)
|
||||||
|
|
||||||
psr = registers[PSR];
|
psr = registers[PSR];
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
if (ptr[-1] == 'P') /* do a single register */
|
||||||
|
|
||||||
if (remcomInBuffer[0] == 'P') /* do a single register */
|
|
||||||
{
|
{
|
||||||
int regno;
|
int regno;
|
||||||
|
|
||||||
|
@ -981,8 +980,6 @@ handle_exception (registers)
|
||||||
case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
|
case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
|
||||||
/* Try to read %x,%x. */
|
/* Try to read %x,%x. */
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
|
|
||||||
if (hexToInt(&ptr, &addr)
|
if (hexToInt(&ptr, &addr)
|
||||||
&& *ptr++ == ','
|
&& *ptr++ == ','
|
||||||
&& hexToInt(&ptr, &length))
|
&& hexToInt(&ptr, &length))
|
||||||
|
@ -999,8 +996,6 @@ handle_exception (registers)
|
||||||
case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
|
case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
|
||||||
/* Try to read '%x,%x:'. */
|
/* Try to read '%x,%x:'. */
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
|
|
||||||
if (hexToInt(&ptr, &addr)
|
if (hexToInt(&ptr, &addr)
|
||||||
&& *ptr++ == ','
|
&& *ptr++ == ','
|
||||||
&& hexToInt(&ptr, &length)
|
&& hexToInt(&ptr, &length)
|
||||||
|
@ -1018,7 +1013,6 @@ handle_exception (registers)
|
||||||
case 'c': /* cAA..AA Continue at address AA..AA(optional) */
|
case 'c': /* cAA..AA Continue at address AA..AA(optional) */
|
||||||
/* try to read optional parameter, pc unchanged if no parm */
|
/* try to read optional parameter, pc unchanged if no parm */
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (hexToInt(&ptr, &addr))
|
if (hexToInt(&ptr, &addr))
|
||||||
{
|
{
|
||||||
registers[PC] = addr;
|
registers[PC] = addr;
|
||||||
|
@ -1054,7 +1048,6 @@ Disabled until we can unscrew this properly
|
||||||
int baudrate;
|
int baudrate;
|
||||||
extern void set_timer_3();
|
extern void set_timer_3();
|
||||||
|
|
||||||
ptr = &remcomInBuffer[1];
|
|
||||||
if (!hexToInt(&ptr, &baudrate))
|
if (!hexToInt(&ptr, &baudrate))
|
||||||
{
|
{
|
||||||
strcpy(remcomOutBuffer,"B01");
|
strcpy(remcomOutBuffer,"B01");
|
||||||
|
|
|
@ -45,9 +45,6 @@
|
||||||
#include "gdb_stat.h"
|
#include "gdb_stat.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef O_BINARY
|
#ifndef O_BINARY
|
||||||
#define O_BINARY 0
|
#define O_BINARY 0
|
||||||
|
|
524
gdb/tahoe-tdep.c
524
gdb/tahoe-tdep.c
|
@ -1,262 +1,262 @@
|
||||||
/* Print instructions for Tahoe target machines, for GDB.
|
/* OBSOLETE /* Print instructions for Tahoe target machines, for GDB. */
|
||||||
Copyright 1986, 1989, 1991, 1992 Free Software Foundation, Inc.
|
/* OBSOLETE Copyright 1986, 1989, 1991, 1992 Free Software Foundation, Inc. */
|
||||||
Contributed by the State University of New York at Buffalo, by the
|
/* OBSOLETE Contributed by the State University of New York at Buffalo, by the */
|
||||||
Distributed Computer Systems Lab, Department of Computer Science, 1991.
|
/* OBSOLETE Distributed Computer Systems Lab, Department of Computer Science, 1991. */
|
||||||
|
/* OBSOLETE */
|
||||||
This file is part of GDB.
|
/* OBSOLETE This file is part of GDB. */
|
||||||
|
/* OBSOLETE */
|
||||||
This program is free software; you can redistribute it and/or modify
|
/* OBSOLETE 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
|
/* OBSOLETE it under the terms of the GNU General Public License as published by */
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
|
||||||
(at your option) any later version.
|
/* OBSOLETE (at your option) any later version. */
|
||||||
|
/* OBSOLETE */
|
||||||
This program is distributed in the hope that it will be useful,
|
/* OBSOLETE This program is distributed in the hope that it will be useful, */
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
GNU General Public License for more details.
|
/* OBSOLETE GNU General Public License for more details. */
|
||||||
|
/* OBSOLETE */
|
||||||
You should have received a copy of the GNU General Public License
|
/* OBSOLETE You should have received a copy of the GNU General Public License */
|
||||||
along with this program; if not, write to the Free Software
|
/* OBSOLETE along with this program; if not, write to the Free Software */
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
|
||||||
Boston, MA 02111-1307, USA. */
|
/* OBSOLETE Boston, MA 02111-1307, USA. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
#include "defs.h"
|
/* OBSOLETE #include "defs.h" */
|
||||||
#include "symtab.h"
|
/* OBSOLETE #include "symtab.h" */
|
||||||
#include "opcode/tahoe.h"
|
/* OBSOLETE #include "opcode/tahoe.h" */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Tahoe instructions are never longer than this. */
|
/* OBSOLETE /* Tahoe instructions are never longer than this. *x/ */
|
||||||
#define MAXLEN 62
|
/* OBSOLETE #define MAXLEN 62 */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Number of elements in the opcode table. */
|
/* OBSOLETE /* Number of elements in the opcode table. *x/ */
|
||||||
#define NOPCODES (sizeof votstrs / sizeof votstrs[0])
|
/* OBSOLETE #define NOPCODES (sizeof votstrs / sizeof votstrs[0]) */
|
||||||
|
/* OBSOLETE */
|
||||||
static unsigned char *print_insn_arg ();
|
/* OBSOLETE static unsigned char *print_insn_arg (); */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Advance PC across any function entry prologue instructions
|
/* OBSOLETE /* Advance PC across any function entry prologue instructions */
|
||||||
to reach some "real" code. */
|
/* OBSOLETE to reach some "real" code. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
CORE_ADDR
|
/* OBSOLETE CORE_ADDR */
|
||||||
tahoe_skip_prologue (pc)
|
/* OBSOLETE tahoe_skip_prologue (pc) */
|
||||||
CORE_ADDR pc;
|
/* OBSOLETE CORE_ADDR pc; */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
register int op = (unsigned char) read_memory_integer (pc, 1);
|
/* OBSOLETE register int op = (unsigned char) read_memory_integer (pc, 1); */
|
||||||
if (op == 0x11)
|
/* OBSOLETE if (op == 0x11) */
|
||||||
pc += 2; /* skip brb */
|
/* OBSOLETE pc += 2; /* skip brb *x/ */
|
||||||
if (op == 0x13)
|
/* OBSOLETE if (op == 0x13) */
|
||||||
pc += 3; /* skip brw */
|
/* OBSOLETE pc += 3; /* skip brw *x/ */
|
||||||
if (op == 0x2c
|
/* OBSOLETE if (op == 0x2c */
|
||||||
&& ((unsigned char) read_memory_integer (pc + 2, 1)) == 0x5e)
|
/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 2, 1)) == 0x5e) */
|
||||||
pc += 3; /* skip subl2 */
|
/* OBSOLETE pc += 3; /* skip subl2 *x/ */
|
||||||
if (op == 0xe9
|
/* OBSOLETE if (op == 0xe9 */
|
||||||
&& ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xae
|
/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xae */
|
||||||
&& ((unsigned char) read_memory_integer (pc + 3, 1)) == 0x5e)
|
/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 3, 1)) == 0x5e) */
|
||||||
pc += 4; /* skip movab */
|
/* OBSOLETE pc += 4; /* skip movab *x/ */
|
||||||
if (op == 0xe9
|
/* OBSOLETE if (op == 0xe9 */
|
||||||
&& ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xce
|
/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xce */
|
||||||
&& ((unsigned char) read_memory_integer (pc + 4, 1)) == 0x5e)
|
/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 4, 1)) == 0x5e) */
|
||||||
pc += 5; /* skip movab */
|
/* OBSOLETE pc += 5; /* skip movab *x/ */
|
||||||
if (op == 0xe9
|
/* OBSOLETE if (op == 0xe9 */
|
||||||
&& ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xee
|
/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xee */
|
||||||
&& ((unsigned char) read_memory_integer (pc + 6, 1)) == 0x5e)
|
/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 6, 1)) == 0x5e) */
|
||||||
pc += 7; /* skip movab */
|
/* OBSOLETE pc += 7; /* skip movab *x/ */
|
||||||
return pc;
|
/* OBSOLETE return pc; */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Return number of args passed to a frame.
|
/* OBSOLETE /* Return number of args passed to a frame. */
|
||||||
Can return -1, meaning no way to tell. */
|
/* OBSOLETE Can return -1, meaning no way to tell. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
int
|
/* OBSOLETE int */
|
||||||
tahoe_frame_num_args (fi)
|
/* OBSOLETE tahoe_frame_num_args (fi) */
|
||||||
struct frame_info *fi;
|
/* OBSOLETE struct frame_info *fi; */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
return (((0xffff & read_memory_integer (((fi)->frame - 4), 4)) - 4) >> 2);
|
/* OBSOLETE return (((0xffff & read_memory_integer (((fi)->frame - 4), 4)) - 4) >> 2); */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Print the Tahoe instruction at address MEMADDR in debugged memory,
|
/* OBSOLETE /* Print the Tahoe instruction at address MEMADDR in debugged memory, */
|
||||||
on STREAM. Returns length of the instruction, in bytes. */
|
/* OBSOLETE on STREAM. Returns length of the instruction, in bytes. *x/ */
|
||||||
|
/* OBSOLETE */
|
||||||
int
|
/* OBSOLETE int */
|
||||||
tahoe_print_insn (memaddr, stream)
|
/* OBSOLETE tahoe_print_insn (memaddr, stream) */
|
||||||
CORE_ADDR memaddr;
|
/* OBSOLETE CORE_ADDR memaddr; */
|
||||||
GDB_FILE *stream;
|
/* OBSOLETE GDB_FILE *stream; */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
unsigned char buffer[MAXLEN];
|
/* OBSOLETE unsigned char buffer[MAXLEN]; */
|
||||||
register int i;
|
/* OBSOLETE register int i; */
|
||||||
register unsigned char *p;
|
/* OBSOLETE register unsigned char *p; */
|
||||||
register char *d;
|
/* OBSOLETE register char *d; */
|
||||||
|
/* OBSOLETE */
|
||||||
read_memory (memaddr, buffer, MAXLEN);
|
/* OBSOLETE read_memory (memaddr, buffer, MAXLEN); */
|
||||||
|
/* OBSOLETE */
|
||||||
for (i = 0; i < NOPCODES; i++)
|
/* OBSOLETE for (i = 0; i < NOPCODES; i++) */
|
||||||
if (votstrs[i].detail.code == buffer[0]
|
/* OBSOLETE if (votstrs[i].detail.code == buffer[0] */
|
||||||
|| votstrs[i].detail.code == *(unsigned short *) buffer)
|
/* OBSOLETE || votstrs[i].detail.code == *(unsigned short *) buffer) */
|
||||||
break;
|
/* OBSOLETE break; */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Handle undefined instructions. */
|
/* OBSOLETE /* Handle undefined instructions. *x/ */
|
||||||
if (i == NOPCODES)
|
/* OBSOLETE if (i == NOPCODES) */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
fprintf_unfiltered (stream, "0%o", buffer[0]);
|
/* OBSOLETE fprintf_unfiltered (stream, "0%o", buffer[0]); */
|
||||||
return 1;
|
/* OBSOLETE return 1; */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
|
/* OBSOLETE */
|
||||||
fprintf_unfiltered (stream, "%s", votstrs[i].name);
|
/* OBSOLETE fprintf_unfiltered (stream, "%s", votstrs[i].name); */
|
||||||
|
/* OBSOLETE */
|
||||||
/* Point at first byte of argument data,
|
/* OBSOLETE /* Point at first byte of argument data, */
|
||||||
and at descriptor for first argument. */
|
/* OBSOLETE and at descriptor for first argument. *x/ */
|
||||||
p = buffer + 1 + (votstrs[i].detail.code >= 0x100);
|
/* OBSOLETE p = buffer + 1 + (votstrs[i].detail.code >= 0x100); */
|
||||||
d = votstrs[i].detail.args;
|
/* OBSOLETE d = votstrs[i].detail.args; */
|
||||||
|
/* OBSOLETE */
|
||||||
if (*d)
|
/* OBSOLETE if (*d) */
|
||||||
fputc_unfiltered ('\t', stream);
|
/* OBSOLETE fputc_unfiltered ('\t', stream); */
|
||||||
|
/* OBSOLETE */
|
||||||
while (*d)
|
/* OBSOLETE while (*d) */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
p = print_insn_arg (d, p, memaddr + (p - buffer), stream);
|
/* OBSOLETE p = print_insn_arg (d, p, memaddr + (p - buffer), stream); */
|
||||||
d += 2;
|
/* OBSOLETE d += 2; */
|
||||||
if (*d)
|
/* OBSOLETE if (*d) */
|
||||||
fprintf_unfiltered (stream, ",");
|
/* OBSOLETE fprintf_unfiltered (stream, ","); */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
return p - buffer;
|
/* OBSOLETE return p - buffer; */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
/*******************************************************************/
|
/* OBSOLETE /*******************************************************************x/ */
|
||||||
static unsigned char *
|
/* OBSOLETE static unsigned char * */
|
||||||
print_insn_arg (d, p, addr, stream)
|
/* OBSOLETE print_insn_arg (d, p, addr, stream) */
|
||||||
char *d;
|
/* OBSOLETE char *d; */
|
||||||
register char *p;
|
/* OBSOLETE register char *p; */
|
||||||
CORE_ADDR addr;
|
/* OBSOLETE CORE_ADDR addr; */
|
||||||
GDB_FILE *stream;
|
/* OBSOLETE GDB_FILE *stream; */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
int temp1 = 0;
|
/* OBSOLETE int temp1 = 0; */
|
||||||
register int regnum = *p & 0xf;
|
/* OBSOLETE register int regnum = *p & 0xf; */
|
||||||
float floatlitbuf;
|
/* OBSOLETE float floatlitbuf; */
|
||||||
|
/* OBSOLETE */
|
||||||
if (*d == 'b')
|
/* OBSOLETE if (*d == 'b') */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
if (d[1] == 'b')
|
/* OBSOLETE if (d[1] == 'b') */
|
||||||
fprintf_unfiltered (stream, "0x%x", addr + *p++ + 1);
|
/* OBSOLETE fprintf_unfiltered (stream, "0x%x", addr + *p++ + 1); */
|
||||||
else
|
/* OBSOLETE else */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
|
/* OBSOLETE */
|
||||||
temp1 = *p;
|
/* OBSOLETE temp1 = *p; */
|
||||||
temp1 <<= 8;
|
/* OBSOLETE temp1 <<= 8; */
|
||||||
temp1 |= *(p + 1);
|
/* OBSOLETE temp1 |= *(p + 1); */
|
||||||
fprintf_unfiltered (stream, "0x%x", addr + temp1 + 2);
|
/* OBSOLETE fprintf_unfiltered (stream, "0x%x", addr + temp1 + 2); */
|
||||||
p += 2;
|
/* OBSOLETE p += 2; */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
else
|
/* OBSOLETE else */
|
||||||
switch ((*p++ >> 4) & 0xf)
|
/* OBSOLETE switch ((*p++ >> 4) & 0xf) */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
case 0:
|
/* OBSOLETE case 0: */
|
||||||
case 1:
|
/* OBSOLETE case 1: */
|
||||||
case 2:
|
/* OBSOLETE case 2: */
|
||||||
case 3: /* Literal (short immediate byte) mode */
|
/* OBSOLETE case 3: /* Literal (short immediate byte) mode *x/ */
|
||||||
if (d[1] == 'd' || d[1] == 'f' || d[1] == 'g' || d[1] == 'h')
|
/* OBSOLETE if (d[1] == 'd' || d[1] == 'f' || d[1] == 'g' || d[1] == 'h') */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
*(int *) &floatlitbuf = 0x4000 + ((p[-1] & 0x3f) << 4);
|
/* OBSOLETE *(int *) &floatlitbuf = 0x4000 + ((p[-1] & 0x3f) << 4); */
|
||||||
fprintf_unfiltered (stream, "$%f", floatlitbuf);
|
/* OBSOLETE fprintf_unfiltered (stream, "$%f", floatlitbuf); */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
else
|
/* OBSOLETE else */
|
||||||
fprintf_unfiltered (stream, "$%d", p[-1] & 0x3f);
|
/* OBSOLETE fprintf_unfiltered (stream, "$%d", p[-1] & 0x3f); */
|
||||||
break;
|
/* OBSOLETE break; */
|
||||||
|
/* OBSOLETE */
|
||||||
case 4: /* Indexed */
|
/* OBSOLETE case 4: /* Indexed *x/ */
|
||||||
p = (char *) print_insn_arg (d, p, addr + 1, stream);
|
/* OBSOLETE p = (char *) print_insn_arg (d, p, addr + 1, stream); */
|
||||||
fprintf_unfiltered (stream, "[%s]", REGISTER_NAME (regnum));
|
/* OBSOLETE fprintf_unfiltered (stream, "[%s]", REGISTER_NAME (regnum)); */
|
||||||
break;
|
/* OBSOLETE break; */
|
||||||
|
/* OBSOLETE */
|
||||||
case 5: /* Register */
|
/* OBSOLETE case 5: /* Register *x/ */
|
||||||
fprintf_unfiltered (stream, REGISTER_NAME (regnum));
|
/* OBSOLETE fprintf_unfiltered (stream, REGISTER_NAME (regnum)); */
|
||||||
break;
|
/* OBSOLETE break; */
|
||||||
|
/* OBSOLETE */
|
||||||
case 7: /* Autodecrement */
|
/* OBSOLETE case 7: /* Autodecrement *x/ */
|
||||||
fputc_unfiltered ('-', stream);
|
/* OBSOLETE fputc_unfiltered ('-', stream); */
|
||||||
case 6: /* Register deferred */
|
/* OBSOLETE case 6: /* Register deferred *x/ */
|
||||||
fprintf_unfiltered (stream, "(%s)", REGISTER_NAME (regnum));
|
/* OBSOLETE fprintf_unfiltered (stream, "(%s)", REGISTER_NAME (regnum)); */
|
||||||
break;
|
/* OBSOLETE break; */
|
||||||
|
/* OBSOLETE */
|
||||||
case 9: /* Absolute Address & Autoincrement deferred */
|
/* OBSOLETE case 9: /* Absolute Address & Autoincrement deferred *x/ */
|
||||||
fputc_unfiltered ('*', stream);
|
/* OBSOLETE fputc_unfiltered ('*', stream); */
|
||||||
if (regnum == PC_REGNUM)
|
/* OBSOLETE if (regnum == PC_REGNUM) */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
temp1 = *p;
|
/* OBSOLETE temp1 = *p; */
|
||||||
temp1 <<= 8;
|
/* OBSOLETE temp1 <<= 8; */
|
||||||
temp1 |= *(p + 1);
|
/* OBSOLETE temp1 |= *(p + 1); */
|
||||||
|
/* OBSOLETE */
|
||||||
fputc_unfiltered ('$', stream);
|
/* OBSOLETE fputc_unfiltered ('$', stream); */
|
||||||
print_address (temp1, stream);
|
/* OBSOLETE print_address (temp1, stream); */
|
||||||
p += 4;
|
/* OBSOLETE p += 4; */
|
||||||
break;
|
/* OBSOLETE break; */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
case 8: /*Immediate & Autoincrement SP */
|
/* OBSOLETE case 8: /*Immediate & Autoincrement SP *x/ */
|
||||||
if (regnum == 8) /*88 is Immediate Byte Mode */
|
/* OBSOLETE if (regnum == 8) /*88 is Immediate Byte Mode *x/ */
|
||||||
fprintf_unfiltered (stream, "$%d", *p++);
|
/* OBSOLETE fprintf_unfiltered (stream, "$%d", *p++); */
|
||||||
|
/* OBSOLETE */
|
||||||
else if (regnum == 9) /*89 is Immediate Word Mode */
|
/* OBSOLETE else if (regnum == 9) /*89 is Immediate Word Mode *x/ */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
temp1 = *p;
|
/* OBSOLETE temp1 = *p; */
|
||||||
temp1 <<= 8;
|
/* OBSOLETE temp1 <<= 8; */
|
||||||
temp1 |= *(p + 1);
|
/* OBSOLETE temp1 |= *(p + 1); */
|
||||||
fprintf_unfiltered (stream, "$%d", temp1);
|
/* OBSOLETE fprintf_unfiltered (stream, "$%d", temp1); */
|
||||||
p += 2;
|
/* OBSOLETE p += 2; */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
|
/* OBSOLETE */
|
||||||
else if (regnum == PC_REGNUM) /*8F is Immediate Long Mode */
|
/* OBSOLETE else if (regnum == PC_REGNUM) /*8F is Immediate Long Mode *x/ */
|
||||||
{
|
/* OBSOLETE { */
|
||||||
temp1 = *p;
|
/* OBSOLETE temp1 = *p; */
|
||||||
temp1 <<= 8;
|
/* OBSOLETE temp1 <<= 8; */
|
||||||
temp1 |= *(p + 1);
|
/* OBSOLETE temp1 |= *(p + 1); */
|
||||||
temp1 <<= 8;
|
/* OBSOLETE temp1 <<= 8; */
|
||||||
temp1 |= *(p + 2);
|
/* OBSOLETE temp1 |= *(p + 2); */
|
||||||
temp1 <<= 8;
|
/* OBSOLETE temp1 <<= 8; */
|
||||||
temp1 |= *(p + 3);
|
/* OBSOLETE temp1 |= *(p + 3); */
|
||||||
fprintf_unfiltered (stream, "$%d", temp1);
|
/* OBSOLETE fprintf_unfiltered (stream, "$%d", temp1); */
|
||||||
p += 4;
|
/* OBSOLETE p += 4; */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
|
/* OBSOLETE */
|
||||||
else /*8E is Autoincrement SP Mode */
|
/* OBSOLETE else /*8E is Autoincrement SP Mode *x/ */
|
||||||
fprintf_unfiltered (stream, "(%s)+", REGISTER_NAME (regnum));
|
/* OBSOLETE fprintf_unfiltered (stream, "(%s)+", REGISTER_NAME (regnum)); */
|
||||||
break;
|
/* OBSOLETE break; */
|
||||||
|
/* OBSOLETE */
|
||||||
case 11: /* Register + Byte Displacement Deferred Mode */
|
/* OBSOLETE case 11: /* Register + Byte Displacement Deferred Mode *x/ */
|
||||||
fputc_unfiltered ('*', stream);
|
/* OBSOLETE fputc_unfiltered ('*', stream); */
|
||||||
case 10: /* Register + Byte Displacement Mode */
|
/* OBSOLETE case 10: /* Register + Byte Displacement Mode *x/ */
|
||||||
if (regnum == PC_REGNUM)
|
/* OBSOLETE if (regnum == PC_REGNUM) */
|
||||||
print_address (addr + *p + 2, stream);
|
/* OBSOLETE print_address (addr + *p + 2, stream); */
|
||||||
else
|
/* OBSOLETE else */
|
||||||
fprintf_unfiltered (stream, "%d(%s)", *p, REGISTER_NAME (regnum));
|
/* OBSOLETE fprintf_unfiltered (stream, "%d(%s)", *p, REGISTER_NAME (regnum)); */
|
||||||
p += 1;
|
/* OBSOLETE p += 1; */
|
||||||
break;
|
/* OBSOLETE break; */
|
||||||
|
/* OBSOLETE */
|
||||||
case 13: /* Register + Word Displacement Deferred Mode */
|
/* OBSOLETE case 13: /* Register + Word Displacement Deferred Mode *x/ */
|
||||||
fputc_unfiltered ('*', stream);
|
/* OBSOLETE fputc_unfiltered ('*', stream); */
|
||||||
case 12: /* Register + Word Displacement Mode */
|
/* OBSOLETE case 12: /* Register + Word Displacement Mode *x/ */
|
||||||
temp1 = *p;
|
/* OBSOLETE temp1 = *p; */
|
||||||
temp1 <<= 8;
|
/* OBSOLETE temp1 <<= 8; */
|
||||||
temp1 |= *(p + 1);
|
/* OBSOLETE temp1 |= *(p + 1); */
|
||||||
if (regnum == PC_REGNUM)
|
/* OBSOLETE if (regnum == PC_REGNUM) */
|
||||||
print_address (addr + temp1 + 3, stream);
|
/* OBSOLETE print_address (addr + temp1 + 3, stream); */
|
||||||
else
|
/* OBSOLETE else */
|
||||||
fprintf_unfiltered (stream, "%d(%s)", temp1, REGISTER_NAME (regnum));
|
/* OBSOLETE fprintf_unfiltered (stream, "%d(%s)", temp1, REGISTER_NAME (regnum)); */
|
||||||
p += 2;
|
/* OBSOLETE p += 2; */
|
||||||
break;
|
/* OBSOLETE break; */
|
||||||
|
/* OBSOLETE */
|
||||||
case 15: /* Register + Long Displacement Deferred Mode */
|
/* OBSOLETE case 15: /* Register + Long Displacement Deferred Mode *x/ */
|
||||||
fputc_unfiltered ('*', stream);
|
/* OBSOLETE fputc_unfiltered ('*', stream); */
|
||||||
case 14: /* Register + Long Displacement Mode */
|
/* OBSOLETE case 14: /* Register + Long Displacement Mode *x/ */
|
||||||
temp1 = *p;
|
/* OBSOLETE temp1 = *p; */
|
||||||
temp1 <<= 8;
|
/* OBSOLETE temp1 <<= 8; */
|
||||||
temp1 |= *(p + 1);
|
/* OBSOLETE temp1 |= *(p + 1); */
|
||||||
temp1 <<= 8;
|
/* OBSOLETE temp1 <<= 8; */
|
||||||
temp1 |= *(p + 2);
|
/* OBSOLETE temp1 |= *(p + 2); */
|
||||||
temp1 <<= 8;
|
/* OBSOLETE temp1 <<= 8; */
|
||||||
temp1 |= *(p + 3);
|
/* OBSOLETE temp1 |= *(p + 3); */
|
||||||
if (regnum == PC_REGNUM)
|
/* OBSOLETE if (regnum == PC_REGNUM) */
|
||||||
print_address (addr + temp1 + 5, stream);
|
/* OBSOLETE print_address (addr + temp1 + 5, stream); */
|
||||||
else
|
/* OBSOLETE else */
|
||||||
fprintf_unfiltered (stream, "%d(%s)", temp1, REGISTER_NAME (regnum));
|
/* OBSOLETE fprintf_unfiltered (stream, "%d(%s)", temp1, REGISTER_NAME (regnum)); */
|
||||||
p += 4;
|
/* OBSOLETE p += 4; */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
|
/* OBSOLETE */
|
||||||
return (unsigned char *) p;
|
/* OBSOLETE return (unsigned char *) p; */
|
||||||
}
|
/* OBSOLETE } */
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue