import gdb-1999-10-04 snapshot
This commit is contained in:
parent
3e9c42873e
commit
2acceee218
430
gdb/ChangeLog
430
gdb/ChangeLog
@ -1,3 +1,430 @@
|
||||
1999-10-04 James Ingham <jingham@leda.cygnus.com>
|
||||
|
||||
* remote-rdi.c (arm_rdi_open): If the angel_RDI_Open fails, close
|
||||
the serial port and raise an error. If you try to go on, you will
|
||||
stall forever down in the rdi-share code.
|
||||
|
||||
1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* printcmd.c (output_command): Makes sure result from the output
|
||||
command is printed before the next prompt.
|
||||
|
||||
1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* printcmd.c (print_formatted): Add missing stream parameter.
|
||||
(do_examine, print_command_1, output_command, do_one_display):
|
||||
Adjust call to print_formatted().
|
||||
|
||||
1999-10-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* infcmd.c: Remove include of event-loop.h.
|
||||
* utils.c: Ditto.
|
||||
* top.c: Ditto.
|
||||
|
||||
* infrun.c (fetch_inferior_event): Call inferior_event_handler
|
||||
when inferior stops, instead of doing work ourselves.
|
||||
(fetch_inferior_event): Use void* instead of gdb_client_data.
|
||||
Remove includes of event-top.h and event-loop.h. Add include of
|
||||
inf-loop.h.
|
||||
(complete_execution): Move from here.
|
||||
|
||||
* inf-loop.c (complete_execution): To here.
|
||||
(inferior_event_handler): Handle inferior's execution completion
|
||||
case as well.
|
||||
* inf-loop.h: Add def of INF_LOOP_H.
|
||||
|
||||
* event-top.h: Don't use gdb_client_data, use void*, to avoid
|
||||
dependency on event-loop.h.
|
||||
|
||||
* remote.c (remote_async_resume): Set target_executing only after we
|
||||
actually register the inferior with the event loop.
|
||||
|
||||
1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* corefile.c (memory_error): Use error_stream() and eliminate call
|
||||
to return_to_top_level().
|
||||
|
||||
1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* utils.c (error): Save error message text (w/o new line).
|
||||
(error_last_message): New function. Returns the last message
|
||||
issued by gdb.
|
||||
(error_init): New function. Initializes error handling machinery.
|
||||
(error_stream): New function. Allows the error message to be
|
||||
passed on a stream buffer.
|
||||
* defs.h: Add prototypes for error_stream() and
|
||||
error_last_message().
|
||||
* main.c (main): Add call to error_init().
|
||||
|
||||
1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* utils.c (tui_sfileopen): New function. Replaces
|
||||
gdb_file_init_astring().
|
||||
* defs.h: Add prototype for the above.
|
||||
|
||||
Mon Oct 4 19:25:55 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* symfile.c (add_symbol_file_command): Fix -Wformat on query call.
|
||||
|
||||
1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* target.c (cleanup_target): Type of to_async param is now
|
||||
function with enum inferior_event_type param.
|
||||
|
||||
* target.h (target_ops): Adjust to_async accordingly. Move enum
|
||||
inferior_event_type to this file. Don't have a typedef for
|
||||
inferior_event_type. Add more enumeration constants INF_QUIT_REQ,
|
||||
INF_EXEC_COMPLETE. Remove INF_SIGINT_FIRST, INF_SIGINT_SECOND.
|
||||
|
||||
* inf-loop.c (inferior_event_handler): Change first param to tell
|
||||
the type of event we are dealing with. Deal with INF_ERROR and
|
||||
INF_REG_EVENT, for the moment.
|
||||
Include target.h.
|
||||
|
||||
* inf-loop.h (inferior_event_handler): Adjust prototype. Remove
|
||||
enum inferior_event_type from here.
|
||||
|
||||
* remote.c (remote_async_serial_handler): Pass INF_REG_EVENT to
|
||||
the client callback.
|
||||
(remote_async): Change callback's param type to inferior_event_type.
|
||||
(async_client_callback): Change type as above.
|
||||
|
||||
1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* event-top.c (stdin_event_handler): Delete fd parameter, use
|
||||
input_fd instead.
|
||||
* event-top.h (stdin_event_handler): Delete fd parameter.
|
||||
|
||||
* inf-loop.c (inferior_event_handler): Delete fd parameter. Use
|
||||
target_async() to unregister the inferior fd in case of errors.
|
||||
* inf-loop.h(inferior_event_handler): Delete fd parameter.
|
||||
|
||||
* ser-unix.c (fd_event): Delete fd parameter. Use scb->fd,
|
||||
instead.
|
||||
|
||||
* remote.c (async_client_callback): Delete fd parameter.
|
||||
(remote_async_serial_handler): Ditto.
|
||||
(remote_async): Adjust to new type of callback function.
|
||||
|
||||
* target.c (cleanup_target): Adjust parameters for to_async
|
||||
default case.
|
||||
* target.h (*to_async): Delete fd parameter from cb function.
|
||||
|
||||
* event-loop.h (handler_func): Delete fd parameter.
|
||||
* event-loop.c (handle_file_event): Delete fd param from call to
|
||||
proc. Do not include inferior.h.
|
||||
|
||||
1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* event-loop.c (inferior_event_handler,
|
||||
inferior_event_handler_wrapper): Move from here.
|
||||
* inf-loop.c: To here. New file.
|
||||
|
||||
* event-loop.h (inferior_event_handler): Move from here.
|
||||
* inf-loop.h: To here. New file.
|
||||
|
||||
* remote.c: Include inf-loop.h.
|
||||
(set_extende_protocol): Remove unused prototpye.
|
||||
|
||||
* Makefile.in (SFILES): Add inf-loop.c.
|
||||
(inf_loop_h): Define.
|
||||
(COMMON_OBS): Add inf-loop.o.
|
||||
(inf-loop.o): Add rule.
|
||||
(remote.o): Add dependency on inf-loop.h.
|
||||
|
||||
Fri Oct 1 19:59:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ser-unix.c: Add some notes on how the async code works.
|
||||
|
||||
Fri Oct 1 01:45:32 1999 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* somread.c (som_symfile_offsets): Fix typo in last change.
|
||||
|
||||
1999-09-30 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* coff-solib.c (coff_solib_add): Adjust call to symbol_file_add.
|
||||
* cxux-nat.c (add_shared_symbol_files): Ditto.
|
||||
* irix5-nat.c (symbol_add_stub): Ditto.
|
||||
* osfsolib.c (symbol_add_stub): Ditto.
|
||||
* pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
|
||||
* remote-mm.c (mm_load): Ditto.
|
||||
* remote-udi.c (udi_load): Ditto.
|
||||
* remote-vx.c (vx_add_symbols): Ditto.
|
||||
* solib.c (symbol_add_stub): Ditto.
|
||||
* somsolib.c (som_solib_add_solib_objfile): Ditto.
|
||||
* win32-nat.c (handle_load_dll): Ditto.
|
||||
|
||||
* irix5-nat.c (symbol_add_stub): Add section_addrs, zero it.
|
||||
* cxux-nat.c (add_shared_symbol_files): Ditto.
|
||||
* osfsolib.c (symbol_add_stub): Ditto.
|
||||
* pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
|
||||
* solib.c (symbol_add_stub): Ditto.
|
||||
* somsolib.c (som_solib_add_solib_objfile): Ditto.
|
||||
* symfile.c (symbol_file_command): Ditto.
|
||||
* win32-nat.c (handle_load_dll): Ditto.
|
||||
|
||||
* irix5-nat.c (symbol_add_stub): Use section_addrs to pass text addr.
|
||||
* cxux-nat.c (add_shared_symbol_files): Ditto.
|
||||
* osfsolib.c (symbol_add_stub): Ditto.
|
||||
* pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
|
||||
* solib.c (symbol_add_stub): Ditto.
|
||||
* somsolib.c (som_solib_add_solib_objfile): Ditto.
|
||||
* symfile.c (symbol_file_command): Ditto.
|
||||
* win32-nat.c (handle_load_dll): Ditto.
|
||||
|
||||
* coff-solib.c (coff_solib_add): Call symbol_file_add with NULL ptr.
|
||||
* cxux-nat.c (add_shared_symbol_files): Ditto.
|
||||
* remote-udi.c (udi_load): Ditto.
|
||||
* remote-vx.c (vx_add_symbols): Ditto.
|
||||
* symfile.c (symbol_file_command): Ditto.
|
||||
|
||||
* dstread.c (dst_symfile_offsets): Take "section_addr_info *"
|
||||
instead of CORE_ADDR.
|
||||
* somread.c (som_symfile_offsets): Ditto.
|
||||
* symfile.c (default_symfile_offsets): Ditto.
|
||||
* xcoffread.c (xcoff_symfile_offsets): Ditto.
|
||||
|
||||
* symfile.h (default_symfile_offsets): Adjust prototype.
|
||||
(syms_from_objfile): Ditto.
|
||||
* symtab.h (symbol_file_add): Ditto.
|
||||
|
||||
* rs6000-nat.c (objfile_symbol_add): Call syms_from_objfile with NULL.
|
||||
* xcoffsolib.c (solib_add): Ditto.
|
||||
* gdb-stabs.h (SECT_OFF_MAX): Increase from 4 to 16.
|
||||
* symtab.h (MAX_SECTIONS): Define.
|
||||
(struct section_addr_info): New struct for better control over
|
||||
changing load addresses of sections.
|
||||
* objfiles.h (OBJF_READNOW): Add new flag bit.
|
||||
* symfile.h (sym_offsets): Change second param from CORE_ADDR to
|
||||
"section_addr_info *".
|
||||
|
||||
* symfile.c (symbol_file_add): Replace scalar arg "CORE_ADDR addr"
|
||||
with "struct section_addr_info *addrs".
|
||||
(syms_from_objfile): Ditto.
|
||||
(add_symbol_file_command): Remove local variables "readnow" and
|
||||
"mapped". Replaced with general "flags" variable.
|
||||
(symbol_file_command): Ditto.
|
||||
(add_symbol_file_command): Add local variables i, sec_num, argcnt,
|
||||
expecting_option, option_index, and opt. Rework option parsing code
|
||||
to handle additional options.
|
||||
(_initialize_symfile): Adjust add-symbol-file usage to match new
|
||||
option handling.
|
||||
(symbol_file_add): Remove parameters "mapped" and "readnow",
|
||||
replace with general "flags".
|
||||
(symbol_file_add): In call to allocate_objfile, replace "mapped"
|
||||
with extracted OBJF_MAPPED bit from flags.
|
||||
(symbol_file_add): Use OBJF_READNOW bit from flags, instead of
|
||||
"readnow" variable.
|
||||
(symbol_file_command): Set OBJF_MAPPED and OBJF_READNOW bits
|
||||
from parsed options. Pass flags to symbol_file_add.
|
||||
(add_symbol_file_command): Ditto.
|
||||
(syms_from_objfile): Add local variables i, sect, lower_sect,
|
||||
lower_offset, and local_addr. Substitute local_addr for addrs
|
||||
when addrs is NULL. Find lowest loadable section to be used as
|
||||
starting point for contiguous sections. Adjust offsets if segments
|
||||
are not contiguous. Call sym_offsets with section_addr_info
|
||||
instead of single addr.
|
||||
(default_symfile_offsets): Initialize objfile's section_offsets
|
||||
with user specified offsets.
|
||||
(symbol_file_add): Call syms_from_objfile with offsets.
|
||||
(unknown_option_complaint): Add.
|
||||
(add_symbol_file_command): Add "section_addrs", zero it with memset.
|
||||
|
||||
1999-09-30 Jason Molenda (jsm@bugshack.cygnus.com)
|
||||
|
||||
* configure.in: Call config.sub explicitly instead of misusing the
|
||||
autoconf internal variable $ac_config_sub.
|
||||
* configure: Regenerated.
|
||||
|
||||
Thu Sep 30 15:53:59 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* remote.c (readchar): When EOF mourn the inferior.
|
||||
(getpkt): Try QUIT. Might not be a watchdog timer timeout.
|
||||
(remote_async_serial_handler): Pass ``-1'' as the dummy FD. Safer
|
||||
than ZERO == STDIN.
|
||||
|
||||
* serial.h (enum serial_rc): Replace #define SERIAL_ERROR,
|
||||
SERIAL_TIMEOUT and SERIAL_EOF.
|
||||
(struct _serial_t): Add more notes on termios specific fields.
|
||||
|
||||
* ser-unix.c (generic_readchar): Make SERIAL_ERROR sticky.
|
||||
(do_hardwire_readchar, do_unix_readchar): Don't use bufcnt as a
|
||||
tempoary for the return-value from read.
|
||||
|
||||
* serial.c (serial_logchar): Add a stream parameter.
|
||||
(serial_readchar, serial_write, serial_send_break): Update.
|
||||
(serial_readchar): Add serial debug trace.
|
||||
|
||||
Thu Sep 30 12:07:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* serial.h (struct _serial_t): Add field async_state. Better
|
||||
document field bufcnt.
|
||||
(SERIAL_ERROR): Delete comment about errno.
|
||||
* serial.c (serial_open, serial_fdopen): Initialize async_state.
|
||||
|
||||
* ser-unix.c (push_event, fd_event, reschedule): New functions.
|
||||
Handle ASYNC serial input.
|
||||
(ser_unix_async): Update.
|
||||
(generic_readchar): New function. Handle event scheduling. Make
|
||||
EOF condition sticky.
|
||||
(do_unix_readchar): Rename ser_unix_readchar.
|
||||
(ser_unix_readchar): New function, call do_unix_readchar via
|
||||
generic_readchar.
|
||||
(do_hardwire_readchar, hardwire_readchar): Ditto.
|
||||
|
||||
* ser-unix.c (ser_unix_readchar): Delete code working around ASYNC
|
||||
fifo bugs.
|
||||
(hardwire_readchar): Delete code working around ASYNC fifo bugs.
|
||||
|
||||
Wed Sep 29 21:27:16 1999 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* breakpoint.c (insert_breakpoints): Addresses are CORE_ADDRs,
|
||||
not "int"s.
|
||||
(remove_breakpoint): Likewise.
|
||||
|
||||
1999-09-29 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* breakpoint.c (breakpoint_1): Replace cast "(CORE_ADDR) - 1"
|
||||
with the more obviously intended expression "(CORE_ADDR) -1".
|
||||
* dwarf2read.c (scan_partial_symbols, read_file_scope): Ditto.
|
||||
* gnu-nat.c (gnu_create_inferior): Ditto.
|
||||
* go32-nat.c (go32_create_inferior): Ditto.
|
||||
* hppa-tdep.c (hppa_pop_frame): Ditto.
|
||||
* infcmd.c (continue_command, step_1, signal_command): Ditto.
|
||||
(until_next_command, finish_command): Ditto.
|
||||
* infrun.c (proceed): Ditto.
|
||||
* inftarg.c (child_create_inferior): Ditto.
|
||||
* m3-nat.c (m3_create_inferior): Ditto.
|
||||
* mac-nat.c (child_create_inferior): Ditto.
|
||||
* procfs.c (procfs_create_inferior): Ditto.
|
||||
* remote-sim.c (gdbsim_create_inferior): Ditto.
|
||||
* target.c (target_link): Ditto.
|
||||
* win32-nat.c (child_create_inferior): Ditto.
|
||||
* varobj.c (varobj_create, new_root_variable): Ditto.
|
||||
|
||||
Thu Sep 30 10:36:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ser-unix.c (ser_unix_flush_input): New function. Discard input
|
||||
buffer.
|
||||
(hardwire_flush_input): Use ser_unix_flush_input.
|
||||
(ser_unix_nop_flush_input): Delete.
|
||||
* ser-unix.h (ser_unix_flush_input): Update.
|
||||
ser-tcp.c (_initialize_ser_tcp), ser-pipe.c
|
||||
(_initialize_ser_pipe): Update.
|
||||
|
||||
* ser-unix.c (hardwire_write): Delete.
|
||||
(_initialize_ser_hardwire): Update, use ser_unix_write.
|
||||
|
||||
Thu Sep 30 10:16:50 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ser-pipe.c (pipe_open): Don't make the FD non-blocking. Already
|
||||
being handled in ser_unix_wait_for by a select.
|
||||
|
||||
Thu Sep 30 10:00:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* serial.h (struct _serial_t): Add field debug_p.
|
||||
(SERIAL_DEBUG, SERIAL_DEBUG_P): Define.
|
||||
|
||||
* serial.c (serial_open, serial_fdopen): Initialize debug_p.
|
||||
(serial_debug, serial_debug_p): New functions.
|
||||
(global_serial_debug_p): New variable.
|
||||
(_initialize_serial): Add ``set serialdebug'' command.
|
||||
|
||||
Thu Sep 30 09:09:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* serial.h (serial_event_ftype): Replace FD and ERROR args with
|
||||
SERRIAL_T arg.
|
||||
* ser-unix.c (ser_unix_event): Update.
|
||||
|
||||
* remote.c (remote_async_serial_handler): New function. Handle
|
||||
serial events.
|
||||
(remote_async): Pass remote_async_serial_handler to SERIAL.
|
||||
(async_client_callback, async_client_context): New variables.
|
||||
|
||||
* remote.c (extended_remote_async_create_inferior): Use
|
||||
target_async to register the inferior event handler.
|
||||
|
||||
Thu Sep 30 00:02:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* configure.in (AC_CHECK_FUNCS): Test for sigprocmask.
|
||||
* configure, config.in: Re-generate.
|
||||
* event-top.c (async_stop_sig): Use sigprocmask when available.
|
||||
|
||||
1999-09-29 Doug Evans <devans@casey.cygnus.com>
|
||||
|
||||
* sh-stub.c (handle_exception): Fix typo in patch of 1999-08-26.
|
||||
* m68k-stub.c (handle_exception): Ditto.
|
||||
|
||||
1999-09-28 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* alpha-nat.c (alpha_osf_core_fns, alpha_elf_core_fns):
|
||||
Add default entries for check_format and core_sniffer.
|
||||
* core-aout.c (aout_core_fns): Ditto.
|
||||
* core-regset.c (regset_core_fns): Ditto.
|
||||
* core-sol2.c (solaris_core_fns): Ditto.
|
||||
* i386aix-nat.c (i386aix_core_fns): Ditto.
|
||||
* i386mach-nat.c (i386mach_core_fns): Ditto.
|
||||
* irix4-nat.c (irix4_core_fns): Ditto.
|
||||
* irix5-nat.c (irix5_core_fns): Ditto.
|
||||
* lynx-nat.c (lynx_core_fns): Ditto.
|
||||
* mips-nat.c (mips_core_fns): Ditto.
|
||||
* ns32knbsd-nat.c (nat_core_fns): Ditto.
|
||||
* rs6000-nat.c (rs6000_core_fns): Ditto.
|
||||
* sparc-nat.c (sparc_core_fns): Ditto.
|
||||
* sun-nat.c (sun3_core_fns): Ditto.
|
||||
* ultra3-nat.c (ultra3_core_fns): Ditto.
|
||||
|
||||
* corelow.c (core_vec): New, for selected core file handler.
|
||||
(sniff_core_bfd): New function.
|
||||
(gdb_check_format): New function.
|
||||
(default_check_format): New function.
|
||||
(default_core_sniffer): New function.
|
||||
(sniff_core_bfd): New function.
|
||||
(core_close): Reset core_vec to NULL.
|
||||
(core_open): Fall back to gdb_check_format if bfd_check_format
|
||||
does not identify the file format. Call sniff_core_bfd to pick
|
||||
a core file handler.
|
||||
(get_core_registers): Remove code that is now in sniff_core_bfd.
|
||||
Use current core_vec.
|
||||
|
||||
* gdbcore.h (check_format): New core_fns function, points to function
|
||||
to try and identify a core file format.
|
||||
(core_sniffer): New core_fns function, points to function to select
|
||||
a specific handler for the selected core file format.
|
||||
(default_core_sniffer): Add prototype.
|
||||
(default_check_format): Add prototype.
|
||||
|
||||
* i960-tdep.c (inferior.h): Include.
|
||||
* mips-tdep.c (read_next_frame_reg): Use ADDR_BITS_REMOVE
|
||||
on addresses pulled from stack.
|
||||
|
||||
1999-09-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* event-loop.c (poll_timers): Check whether the timer list has any
|
||||
element on it by looking at the first element pointer, instead of
|
||||
num_timers.
|
||||
|
||||
Wed Sep 29 18:02:31 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
||||
|
||||
* command.c: Attempt to include POSIX <sys/wait.h> before
|
||||
<wait.h>.
|
||||
|
||||
* ser-unix.c (hardwire_print_tty_state): Ditto.
|
||||
* inflow.c (child_terminal_info): Fix printf args.
|
||||
|
||||
1999-09-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* remote.c (remote_async_resume): Register the inferior with the
|
||||
event loop.
|
||||
(remote_async_open_1): Don't put the target in async mode here,
|
||||
just do it when executing.
|
||||
|
||||
* infrun.c (complete_execution): Unregister the inferior from the
|
||||
event loop.
|
||||
|
||||
* event-top.c (async_disable_stdin): Don't add
|
||||
async_enable_stdin() to the exec_cleanups chain.
|
||||
|
||||
Tue Sep 28 11:08:34 1999 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* hppa-tdep.c (hppa_fix_call_dummy): Ignore IMPORT_SHLIB stubs
|
||||
@ -1157,11 +1584,8 @@ Wed Sep 1 09:22:50 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* dbxread.c (read_dbx_symtab): Use ANOFFSET to access section
|
||||
offsets.
|
||||
* core-cisco.c (get_seg_info): Make static.
|
||||
* coffread.c (enter_linenos): Pass objfile instead of section
|
||||
offsets.
|
||||
* jv-vm.c (jv_vm_internal_lookup_symbol): Call allocate_objfile
|
||||
with the right number of arguments.
|
||||
|
||||
* dbxread.c (dbx_symfile_read): No need to explicitly pass
|
||||
text addr and size. Let read_dbx_symtab find them.
|
||||
|
@ -229,7 +229,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
|
||||
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
||||
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
||||
|
||||
VERSION = 19990928
|
||||
VERSION = 19991004
|
||||
DIST=gdb
|
||||
|
||||
LINT=/usr/5bin/lint
|
||||
@ -385,7 +385,8 @@ SFILES = ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
|
||||
demangle.c dwarfread.c dwarf2read.c elfread.c environ.c eval.c \
|
||||
event-loop.c event-top.c \
|
||||
expprint.c f-exp.y f-lang.c f-typeprint.c f-valprint.c \
|
||||
findvar.c gdbarch.c gdbtypes.c infcmd.c inflow.c infrun.c language.c \
|
||||
findvar.c gdbarch.c gdbtypes.c \
|
||||
inf-loop.c infcmd.c inflow.c infrun.c language.c \
|
||||
kod.c kod-cisco.c \
|
||||
jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \
|
||||
m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c main.c maint.c \
|
||||
@ -457,6 +458,7 @@ tracepoint_h = tracepoint.h
|
||||
ax_h = ax.h
|
||||
event_loop_h = event-loop.h
|
||||
event_top_h = event-top.h
|
||||
inf_loop_h = inf-loop.h
|
||||
remote_h = remote.h
|
||||
version_h = version.h
|
||||
|
||||
@ -515,7 +517,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
|
||||
source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \
|
||||
symtab.o symfile.o symmisc.o infcmd.o infrun.o command.o \
|
||||
expprint.o environ.o \
|
||||
event-loop.o event-top.o \
|
||||
event-loop.o event-top.o inf-loop.o \
|
||||
gdbarch.o gdbtypes.o copying.o $(DEPFILES) \
|
||||
mem-break.o target.o parse.o language.o $(YYOBJ) buildsym.o \
|
||||
kod.o kod-cisco.o \
|
||||
@ -1139,6 +1141,9 @@ event-top.o: event-top.c top.h $(readline_headers) \
|
||||
$(defs_h) $(inferior_h) $(event_loop_h) $(event_top_h) terminal.h \
|
||||
$(gdbcmd_h)
|
||||
|
||||
inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(inf_loop_h) $(event_loop_h) \
|
||||
$(event_top_h)
|
||||
|
||||
exec.o: exec.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
|
||||
target.h language.h gdb_string.h
|
||||
|
||||
@ -1517,7 +1522,7 @@ remote-utils.o: remote-utils.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
|
||||
|
||||
remote.o: remote.c $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
|
||||
$(inferior_h) $(remote_utils_h) symfile.h terminal.h gdb_string.h \
|
||||
$(event_loop_h) $(event_top_h) $(remote_h)
|
||||
$(event_loop_h) $(event_top_h) $(remote_h) $(inf_loop_h)
|
||||
|
||||
remote-nrom.o: remote-nrom.c $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
|
||||
$(inferior_h) $(remote_utils_h) symfile.h terminal.h
|
||||
|
@ -280,16 +280,20 @@ static struct core_fns alpha_osf_core_fns =
|
||||
{
|
||||
/* This really is bfd_target_unknown_flavour. */
|
||||
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_osf_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_osf_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
static struct core_fns alpha_elf_core_fns =
|
||||
{
|
||||
bfd_target_elf_flavour,
|
||||
fetch_elf_core_registers,
|
||||
NULL
|
||||
bfd_target_elf_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_elf_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -855,7 +855,8 @@ insert_breakpoints ()
|
||||
/* If it's a memory location, then we must watch it. */
|
||||
if (v->lval == lval_memory)
|
||||
{
|
||||
int addr, len, type;
|
||||
CORE_ADDR addr;
|
||||
int len, type;
|
||||
|
||||
addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
|
||||
len = TYPE_LENGTH (VALUE_TYPE (v));
|
||||
@ -1199,7 +1200,8 @@ remove_breakpoint (b, is)
|
||||
at that address. */
|
||||
if (v->lval == lval_memory)
|
||||
{
|
||||
int addr, len, type;
|
||||
CORE_ADDR addr;
|
||||
int len, type;
|
||||
|
||||
addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
|
||||
len = TYPE_LENGTH (VALUE_TYPE (v));
|
||||
@ -2820,7 +2822,7 @@ breakpoint_1 (bnum, allflag)
|
||||
register struct breakpoint *b;
|
||||
register struct command_line *l;
|
||||
register struct symbol *sym;
|
||||
CORE_ADDR last_addr = (CORE_ADDR) - 1;
|
||||
CORE_ADDR last_addr = (CORE_ADDR) -1;
|
||||
int found_a_breakpoint = 0;
|
||||
static ep_type_description_t bptypes[] =
|
||||
{
|
||||
@ -3087,7 +3089,7 @@ breakpoint_1 (bnum, allflag)
|
||||
else
|
||||
/* Compare against (CORE_ADDR)-1 in case some compiler decides
|
||||
that a comparison of an unsigned with -1 is always false. */
|
||||
if (last_addr != (CORE_ADDR) - 1)
|
||||
if (last_addr != (CORE_ADDR) -1)
|
||||
set_next_address (last_addr);
|
||||
|
||||
annotate_breakpoints_table_end ();
|
||||
|
@ -92,10 +92,9 @@ coff_solib_add (arg_string, from_tty, target)
|
||||
filename = (char *) ent + nameoffset * 4;
|
||||
|
||||
objfile = symbol_file_add (filename, from_tty,
|
||||
0, /* addr */
|
||||
NULL, /* no offsets */
|
||||
0, /* not mainline */
|
||||
0, /* not mapped */
|
||||
0, /* Not readnow */
|
||||
0, /* flags */
|
||||
0, /* Not user loaded */
|
||||
1); /* Is a solib */
|
||||
|
||||
|
@ -23,12 +23,10 @@
|
||||
#include <ctype.h>
|
||||
#include "gdb_string.h"
|
||||
|
||||
#ifdef HAVE_WAIT_H
|
||||
#include <wait.h>
|
||||
#else
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#if HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
#elif HAVE_WAIT_H
|
||||
#include <wait.h>
|
||||
#endif
|
||||
|
||||
#include "wait.h"
|
||||
|
@ -171,6 +171,9 @@
|
||||
/* Define if you have the sigaction function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define if you have the sigprocmask function. */
|
||||
#undef HAVE_SIGPROCMASK
|
||||
|
||||
/* Define if you have the socketpair function. */
|
||||
#undef HAVE_SOCKETPAIR
|
||||
|
||||
|
566
gdb/configure
vendored
566
gdb/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -89,7 +89,7 @@ AC_HEADER_STAT
|
||||
|
||||
AC_C_CONST
|
||||
|
||||
AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll)
|
||||
AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask)
|
||||
AC_FUNC_ALLOCA
|
||||
|
||||
AC_CHECK_LIB(socket, socketpair)
|
||||
@ -692,6 +692,7 @@ sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
|
||||
mv -f Makefile.tmp Makefile
|
||||
changequote([,])dnl
|
||||
|
||||
|
||||
case x$CONFIG_HEADERS in
|
||||
xconfig.h:config.in)
|
||||
echo > stamp-h ;;
|
||||
|
@ -285,3 +285,4 @@ w65-*-*) gdb_target=w65 ;;
|
||||
z8k-*-coff*) gdb_target=z8k ;;
|
||||
|
||||
esac
|
||||
|
||||
|
@ -136,9 +136,11 @@ register_addr (regno, blockend)
|
||||
|
||||
static struct core_fns aout_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -123,9 +123,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
|
||||
static struct core_fns regset_core_fns =
|
||||
{
|
||||
bfd_target_elf_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_elf_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -122,9 +122,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
|
||||
static struct core_fns solaris_core_fns =
|
||||
{
|
||||
bfd_target_elf_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_elf_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -236,25 +236,27 @@ memory_error (status, memaddr)
|
||||
int status;
|
||||
CORE_ADDR memaddr;
|
||||
{
|
||||
GDB_FILE *tmp_stream = tui_sfileopen (130);
|
||||
make_cleanup ((make_cleanup_func) gdb_file_deallocate, &tmp_stream);
|
||||
|
||||
error_begin ();
|
||||
|
||||
if (status == EIO)
|
||||
{
|
||||
/* Actually, address between memaddr and memaddr + len
|
||||
was out of bounds. */
|
||||
error_begin ();
|
||||
printf_filtered ("Cannot access memory at address ");
|
||||
print_address_numeric (memaddr, 1, gdb_stdout);
|
||||
printf_filtered (".\n");
|
||||
return_to_top_level (RETURN_ERROR);
|
||||
fprintf_unfiltered (tmp_stream, "Cannot access memory at address ");
|
||||
print_address_numeric (memaddr, 1, tmp_stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
error_begin ();
|
||||
printf_filtered ("Error accessing memory address ");
|
||||
print_address_numeric (memaddr, 1, gdb_stdout);
|
||||
printf_filtered (": %s.\n",
|
||||
fprintf_filtered (tmp_stream, "Error accessing memory address ");
|
||||
print_address_numeric (memaddr, 1, tmp_stream);
|
||||
fprintf_filtered (tmp_stream, ": %s.",
|
||||
safe_strerror (status));
|
||||
return_to_top_level (RETURN_ERROR);
|
||||
}
|
||||
|
||||
error_stream (tmp_stream);
|
||||
}
|
||||
|
||||
/* Same as target_read_memory, but report an error if can't read. */
|
||||
|
128
gdb/corelow.c
128
gdb/corelow.c
@ -39,12 +39,21 @@
|
||||
|
||||
static struct core_fns *core_file_fns = NULL;
|
||||
|
||||
/* The core_fns for a core file handler that is prepared to read the core
|
||||
file currently open on core_bfd. */
|
||||
|
||||
static struct core_fns *core_vec = NULL;
|
||||
|
||||
static void core_files_info PARAMS ((struct target_ops *));
|
||||
|
||||
#ifdef SOLIB_ADD
|
||||
static int solib_add_stub PARAMS ((PTR));
|
||||
#endif
|
||||
|
||||
static struct core_fns *sniff_core_bfd PARAMS ((bfd *));
|
||||
|
||||
static boolean gdb_check_format PARAMS ((bfd *));
|
||||
|
||||
static void core_open PARAMS ((char *, int));
|
||||
|
||||
static void core_detach PARAMS ((char *, int));
|
||||
@ -80,6 +89,87 @@ add_core_fns (cf)
|
||||
core_file_fns = cf;
|
||||
}
|
||||
|
||||
/* The default function that core file handlers can use to examine a
|
||||
core file BFD and decide whether or not to accept the job of
|
||||
reading the core file. */
|
||||
|
||||
int
|
||||
default_core_sniffer (our_fns, abfd)
|
||||
struct core_fns *our_fns;
|
||||
bfd *abfd;
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (bfd_get_flavour (abfd) == our_fns -> core_flavour);
|
||||
return (result);
|
||||
}
|
||||
|
||||
/* Walk through the list of core functions to find a set that can
|
||||
handle the core file open on ABFD. Default to the first one in the
|
||||
list of nothing matches. Returns pointer to set that is
|
||||
selected. */
|
||||
|
||||
static struct core_fns *
|
||||
sniff_core_bfd (abfd)
|
||||
bfd *abfd;
|
||||
{
|
||||
struct core_fns *cf;
|
||||
struct core_fns *yummy = NULL;
|
||||
int matches = 0;;
|
||||
|
||||
for (cf = core_file_fns; cf != NULL; cf = cf->next)
|
||||
{
|
||||
if (cf->core_sniffer (cf, abfd))
|
||||
{
|
||||
yummy = cf;
|
||||
matches++;
|
||||
}
|
||||
}
|
||||
if (matches > 1)
|
||||
{
|
||||
warning ("\"%s\": ambiguous core format, %d handlers match",
|
||||
bfd_get_filename (abfd), matches);
|
||||
}
|
||||
else if (matches == 0)
|
||||
{
|
||||
warning ("\"%s\": no core file handler recognizes format, using default",
|
||||
bfd_get_filename (abfd));
|
||||
}
|
||||
if (yummy == NULL)
|
||||
{
|
||||
yummy = core_file_fns;
|
||||
}
|
||||
return (yummy);
|
||||
}
|
||||
|
||||
/* The default is to reject every core file format we see. Either
|
||||
BFD has to recognize it, or we have to provide a function in the
|
||||
core file handler that recognizes it. */
|
||||
|
||||
int
|
||||
default_check_format (abfd)
|
||||
bfd *abfd;
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Attempt to recognize core file formats that BFD rejects. */
|
||||
|
||||
static boolean
|
||||
gdb_check_format (abfd)
|
||||
bfd *abfd;
|
||||
{
|
||||
struct core_fns *cf;
|
||||
|
||||
for (cf = core_file_fns; cf != NULL; cf = cf->next)
|
||||
{
|
||||
if (cf->check_format (abfd))
|
||||
{
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
/* Discard all vestiges of any previous core file and mark data and stack
|
||||
spaces as empty. */
|
||||
@ -114,6 +204,7 @@ core_close (quitting)
|
||||
core_ops.to_sections_end = NULL;
|
||||
}
|
||||
}
|
||||
core_vec = NULL;
|
||||
}
|
||||
|
||||
#ifdef SOLIB_ADD
|
||||
@ -197,7 +288,8 @@ core_open (filename, from_tty)
|
||||
if (temp_bfd == NULL)
|
||||
perror_with_name (filename);
|
||||
|
||||
if (!bfd_check_format (temp_bfd, bfd_core))
|
||||
if (!bfd_check_format (temp_bfd, bfd_core) &&
|
||||
!gdb_check_format (temp_bfd))
|
||||
{
|
||||
/* Do it after the err msg */
|
||||
/* FIXME: should be checking for errors from bfd_close (for one thing,
|
||||
@ -215,6 +307,9 @@ core_open (filename, from_tty)
|
||||
core_bfd = temp_bfd;
|
||||
old_chain = make_cleanup ((make_cleanup_func) core_close, core_bfd);
|
||||
|
||||
/* Find a suitable core file handler to munch on core_bfd */
|
||||
core_vec = sniff_core_bfd (core_bfd);
|
||||
|
||||
validate_files ();
|
||||
|
||||
/* Find the data section */
|
||||
@ -293,10 +388,8 @@ get_core_registers (regno)
|
||||
unsigned size;
|
||||
char *the_regs;
|
||||
char secname[30];
|
||||
enum bfd_flavour our_flavour = bfd_get_flavour (core_bfd);
|
||||
struct core_fns *cf = NULL;
|
||||
|
||||
if (core_file_fns == NULL)
|
||||
if (core_vec == NULL)
|
||||
{
|
||||
fprintf_filtered (gdb_stderr,
|
||||
"Can't fetch registers from this type of core file\n");
|
||||
@ -319,24 +412,10 @@ get_core_registers (regno)
|
||||
goto cant;
|
||||
size = bfd_section_size (core_bfd, reg_sec);
|
||||
the_regs = alloca (size);
|
||||
/* Look for the core functions that match this flavor. Default to the
|
||||
first one if nothing matches. */
|
||||
for (cf = core_file_fns; cf != NULL; cf = cf->next)
|
||||
if (bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr) 0, size) &&
|
||||
core_vec->core_read_registers != NULL)
|
||||
{
|
||||
if (our_flavour == cf->core_flavour)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cf == NULL)
|
||||
{
|
||||
cf = core_file_fns;
|
||||
}
|
||||
if (cf != NULL &&
|
||||
bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr) 0, size) &&
|
||||
cf->core_read_registers != NULL)
|
||||
{
|
||||
(cf->core_read_registers (the_regs, size, 0,
|
||||
(core_vec->core_read_registers (the_regs, size, 0,
|
||||
(unsigned) bfd_section_vma (abfd, reg_sec)));
|
||||
}
|
||||
else
|
||||
@ -353,11 +432,10 @@ get_core_registers (regno)
|
||||
{
|
||||
size = bfd_section_size (core_bfd, reg_sec);
|
||||
the_regs = alloca (size);
|
||||
if (cf != NULL &&
|
||||
bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr) 0, size) &&
|
||||
cf->core_read_registers != NULL)
|
||||
if (bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr) 0, size) &&
|
||||
core_vec->core_read_registers != NULL)
|
||||
{
|
||||
(cf->core_read_registers (the_regs, size, 2,
|
||||
(core_vec->core_read_registers (the_regs, size, 2,
|
||||
(unsigned) bfd_section_vma (abfd, reg_sec)));
|
||||
}
|
||||
else
|
||||
|
@ -368,7 +368,7 @@ add_shared_symbol_files ()
|
||||
return;
|
||||
}
|
||||
|
||||
objfile = symbol_file_add (LIBC_FILE, 0, 0, 0, 0, 1, 0, 0);
|
||||
objfile = symbol_file_add (LIBC_FILE, 0, NULL, 0, OBJF_READNOW, 0, 0);
|
||||
minsym = lookup_minimal_symbol (LINKS_MAP_POINTER, objfile);
|
||||
|
||||
ld_map = (struct link_map *)
|
||||
@ -384,7 +384,10 @@ add_shared_symbol_files ()
|
||||
if (target_read_string ((CORE_ADDR) lms.l_name, &path_name,
|
||||
PATH_MAX, &local_errno))
|
||||
{
|
||||
symbol_file_add (path_name, 1, lms.l_addr, 0, 0, 0, 0, 0);
|
||||
struct section_addr_info section_addrs;
|
||||
memset (§ion_addrs, 0, sizeof (section_addrs));
|
||||
section_addrs.text_addr = lms.l_addr;
|
||||
symbol_file_add (path_name, 1, §ion_addrs, 0, 0, 0, 0);
|
||||
free (path_name);
|
||||
}
|
||||
}
|
||||
|
@ -420,6 +420,7 @@ extern void *gdb_file_data PARAMS ((struct gdb_file *file));
|
||||
extern struct gdb_file *stdio_fileopen PARAMS ((FILE *));
|
||||
/* #if defined (TUI) */
|
||||
extern struct gdb_file *tui_fileopen PARAMS ((FILE *));
|
||||
extern struct gdb_file *tui_sfileopen PARAMS ((int));
|
||||
/* #endif */
|
||||
|
||||
/* deprecated - use gdb_file_delete */
|
||||
@ -824,6 +825,10 @@ extern void error_begin PARAMS ((void));
|
||||
|
||||
extern NORETURN void internal_error (char *, ...) ATTR_NORETURN;
|
||||
|
||||
extern NORETURN void error_stream PARAMS ((GDB_FILE *)) ATTR_NORETURN;
|
||||
|
||||
extern char *error_last_message PARAMS ((void));
|
||||
|
||||
extern NORETURN void nomem PARAMS ((long)) ATTR_NORETURN;
|
||||
|
||||
/* Reasons for calling return_to_top_level. */
|
||||
|
@ -1,3 +1,8 @@
|
||||
1999-09-30 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* gdb.texinfo: Document additional forms of specifying section
|
||||
names and addresses for the add-symbol-file command.
|
||||
|
||||
1999-09-14 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||
|
||||
* gdbint.texinfo: Fix typo, add the word "have".
|
||||
|
@ -7756,12 +7756,18 @@ the program is running. To do this, use the @code{kill} command
|
||||
@cindex dynamic linking
|
||||
@item add-symbol-file @var{filename} @var{address}
|
||||
@itemx add-symbol-file @var{filename} @var{address} @r{[} -readnow @r{]} @r{[} -mapped @r{]}
|
||||
@itemx add-symbol-file @var{filename} @var{address} @var{data_address} @var{bss_address}
|
||||
@itemx add-symbol-file @var{filename} @r{-T}@var{section} @var{address}
|
||||
The @code{add-symbol-file} command reads additional symbol table information
|
||||
from the file @var{filename}. You would use this command when @var{filename}
|
||||
has been dynamically loaded (by some other means) into the program that
|
||||
is running. @var{address} should be the memory address at which the
|
||||
file has been loaded; @value{GDBN} cannot figure this out for itself.
|
||||
You can specify @var{address} as an expression.
|
||||
You can specify up to three addresses, in which case they are taken to be
|
||||
the addresses of the text, data, and bss segments respectively.
|
||||
For complicated cases, you can specify an arbitrary number of @r{-T}@var{section} @var{address}
|
||||
pairs, to give an explicit section name and base address for that section.
|
||||
You can specify any @var{address} as an expression.
|
||||
|
||||
The symbol table of the file @var{filename} is added to the symbol table
|
||||
originally read with the @code{symbol-file} command. You can use the
|
||||
|
@ -1641,7 +1641,7 @@ struct section_offsets dst_symfile_faker =
|
||||
void
|
||||
dst_symfile_offsets (objfile, addr)
|
||||
struct objfile *objfile;
|
||||
CORE_ADDR addr;
|
||||
struct section_addr_info *addrs;
|
||||
{
|
||||
objfile->num_sections = 1;
|
||||
objfile->section_offsets = &dst_symfile_faker;
|
||||
|
@ -1069,7 +1069,7 @@ scan_partial_symbols (info_ptr, objfile, lowpc, highpc)
|
||||
int nesting_level = 1;
|
||||
int has_pc_info;
|
||||
|
||||
*lowpc = ((CORE_ADDR) - 1);
|
||||
*lowpc = ((CORE_ADDR) -1);
|
||||
*highpc = ((CORE_ADDR) 0);
|
||||
|
||||
while (nesting_level)
|
||||
@ -1149,7 +1149,7 @@ scan_partial_symbols (info_ptr, objfile, lowpc, highpc)
|
||||
|
||||
/* If we didn't find a lowpc, set it to highpc to avoid complaints
|
||||
from `maint check'. */
|
||||
if (*lowpc == ((CORE_ADDR) - 1))
|
||||
if (*lowpc == ((CORE_ADDR) -1))
|
||||
*lowpc = *highpc;
|
||||
return info_ptr;
|
||||
}
|
||||
@ -1461,7 +1461,7 @@ read_file_scope (die, objfile)
|
||||
struct objfile *objfile;
|
||||
{
|
||||
unsigned int line_offset = 0;
|
||||
CORE_ADDR lowpc = ((CORE_ADDR) - 1);
|
||||
CORE_ADDR lowpc = ((CORE_ADDR) -1);
|
||||
CORE_ADDR highpc = ((CORE_ADDR) 0);
|
||||
struct attribute *attr;
|
||||
char *name = "<unknown>";
|
||||
@ -1493,7 +1493,7 @@ read_file_scope (die, objfile)
|
||||
|
||||
/* If we didn't find a lowpc, set it to highpc to avoid complaints
|
||||
from finish_block. */
|
||||
if (lowpc == ((CORE_ADDR) - 1))
|
||||
if (lowpc == ((CORE_ADDR) -1))
|
||||
lowpc = highpc;
|
||||
lowpc += baseaddr;
|
||||
highpc += baseaddr;
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "top.h"
|
||||
#include "event-loop.h"
|
||||
#include "event-top.h"
|
||||
#include "inferior.h" /* For fetch_inferior_event. */
|
||||
#ifdef HAVE_POLL
|
||||
#include <poll.h>
|
||||
#else
|
||||
@ -230,7 +229,7 @@ static struct
|
||||
/* Pointer to first in timer list. */
|
||||
struct gdb_timer *first_timer;
|
||||
|
||||
/* Length of timer list. */
|
||||
/* Id of the last timer created. */
|
||||
int num_timers;
|
||||
}
|
||||
timer_list;
|
||||
@ -264,7 +263,6 @@ static gdb_event *create_file_event (int fd);
|
||||
static int process_event (void);
|
||||
static void handle_timer_event (int dummy);
|
||||
static void poll_timers (void);
|
||||
static int fetch_inferior_event_wrapper (gdb_client_data client_data);
|
||||
|
||||
|
||||
/* Insert an event object into the gdb event queue at
|
||||
@ -731,7 +729,7 @@ handle_file_event (int event_file_desc)
|
||||
|
||||
/* If there was a match, then call the handler. */
|
||||
if (mask != 0)
|
||||
(*file_ptr->proc) (file_ptr->error, file_ptr->fd, file_ptr->client_data);
|
||||
(*file_ptr->proc) (file_ptr->error, file_ptr->client_data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -964,42 +962,6 @@ check_async_ready (void)
|
||||
return async_handler_ready;
|
||||
}
|
||||
|
||||
/* FIXME: where does this function belong? */
|
||||
/* General function to handle events in the inferior. So far it just
|
||||
takes care of detecting errors reported by select() or poll(),
|
||||
otherwise it assumes that all is OK, and goes on reading data from
|
||||
the fd. This however may not always be what we want to do. */
|
||||
void
|
||||
inferior_event_handler (int error, gdb_client_data client_data, int fd)
|
||||
{
|
||||
if (error == 1)
|
||||
{
|
||||
printf_unfiltered ("error detected on fd %d\n", fd);
|
||||
delete_file_handler (fd);
|
||||
pop_target ();
|
||||
discard_all_continuations ();
|
||||
}
|
||||
else
|
||||
/* Use catch errors for now, until the inner layers of
|
||||
fetch_inferior_event (i.e. readchar) can return meaningful
|
||||
error status. If an error occurs while getting an event from
|
||||
the target, just get rid of the target. */
|
||||
if (!catch_errors (fetch_inferior_event_wrapper, client_data, "", RETURN_MASK_ALL))
|
||||
{
|
||||
delete_file_handler (fd);
|
||||
discard_all_continuations ();
|
||||
pop_target ();
|
||||
display_gdb_prompt (0);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
fetch_inferior_event_wrapper (gdb_client_data client_data)
|
||||
{
|
||||
fetch_inferior_event (client_data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Create a timer that will expire in MILLISECONDS from now. When the
|
||||
timer is ready, PROC will be executed. At creation, the timer is
|
||||
aded to the timers queue. This queue is kept sorted in order of
|
||||
@ -1145,7 +1107,7 @@ poll_timers (void)
|
||||
struct timeval time_now, delta;
|
||||
gdb_event *event_ptr;
|
||||
|
||||
if (timer_list.num_timers)
|
||||
if (timer_list.first_timer != NULL)
|
||||
{
|
||||
gettimeofday (&time_now, NULL);
|
||||
delta.tv_sec = timer_list.first_timer->when.tv_sec - time_now.tv_sec;
|
||||
|
@ -59,7 +59,7 @@
|
||||
|
||||
typedef PTR gdb_client_data;
|
||||
struct async_signal_handler;
|
||||
typedef void (handler_func) (int, int, gdb_client_data);
|
||||
typedef void (handler_func) (int, gdb_client_data);
|
||||
typedef void (sig_handler_func) (gdb_client_data);
|
||||
typedef void (timer_handler_func) (gdb_client_data);
|
||||
|
||||
@ -91,6 +91,5 @@ extern void mark_async_signal_handler (struct async_signal_handler *async_handle
|
||||
extern struct async_signal_handler *
|
||||
create_async_signal_handler (sig_handler_func * proc, gdb_client_data client_data);
|
||||
extern void delete_async_signal_handler (struct async_signal_handler **async_handler_ptr);
|
||||
extern void inferior_event_handler (int error, gdb_client_data client_data, int fd);
|
||||
extern int create_timer (int milliseconds, timer_handler_func * proc, gdb_client_data client_data);
|
||||
extern void delete_timer (int id);
|
||||
|
@ -34,6 +34,8 @@
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
/* readline defines this. */
|
||||
#undef savestring
|
||||
|
||||
@ -399,12 +401,12 @@ pop_prompt (void)
|
||||
instead of calling gdb_readline2, give gdb a chance to detect
|
||||
errors and do something. */
|
||||
void
|
||||
stdin_event_handler (int error, int fd, gdb_client_data client_data)
|
||||
stdin_event_handler (int error, gdb_client_data client_data)
|
||||
{
|
||||
if (error)
|
||||
{
|
||||
printf_unfiltered ("error detected on stdin, fd %d\n", fd);
|
||||
delete_file_handler (fd);
|
||||
printf_unfiltered ("error detected on stdin\n");
|
||||
delete_file_handler (input_fd);
|
||||
discard_all_continuations ();
|
||||
/* If stdin died, we may as well kill gdb. */
|
||||
exit (1);
|
||||
@ -443,7 +445,10 @@ async_disable_stdin (void)
|
||||
sync/async mode) is refined, the duplicate calls can be
|
||||
eliminated (Here or in infcmd.c/infrun.c). */
|
||||
target_terminal_inferior ();
|
||||
make_exec_cleanup (async_enable_stdin, NULL);
|
||||
/* Add the reinstate of stdin to the list of cleanups to be done
|
||||
in case the target errors out and dies. These cleanups are also
|
||||
done in case of normal successful termination of the execution
|
||||
command, by complete_execution(). */
|
||||
make_exec_error_cleanup (async_enable_stdin, NULL);
|
||||
}
|
||||
|
||||
@ -1037,7 +1042,15 @@ async_stop_sig (gdb_client_data arg)
|
||||
char *prompt = get_prompt ();
|
||||
#if STOP_SIGNAL == SIGTSTP
|
||||
signal (SIGTSTP, SIG_DFL);
|
||||
#if HAVE_SIGPROCMASK
|
||||
{
|
||||
sigset_t zero;
|
||||
sigemptyset (&zero);
|
||||
sigprocmask (SIG_SETMASK, &zero, 0);
|
||||
}
|
||||
#else
|
||||
sigsetmask (0);
|
||||
#endif
|
||||
kill (getpid (), SIGTSTP);
|
||||
signal (SIGTSTP, handle_stop_sig);
|
||||
#else
|
||||
|
@ -86,10 +86,10 @@ extern void handle_stop_sig (int sig);
|
||||
extern void handle_sigint (int sig);
|
||||
extern void pop_prompt (void);
|
||||
extern void push_prompt (char *prefix, char *prompt, char *suffix);
|
||||
extern void gdb_readline2 (gdb_client_data client_data);
|
||||
extern void mark_async_signal_handler_wrapper (PTR token);
|
||||
extern void async_request_quit (gdb_client_data arg);
|
||||
extern void stdin_event_handler (int error, int fd, gdb_client_data client_data);
|
||||
extern void gdb_readline2 (void *client_data);
|
||||
extern void mark_async_signal_handler_wrapper (void *token);
|
||||
extern void async_request_quit (void *arg);
|
||||
extern void stdin_event_handler (int error, void *client_data);
|
||||
extern void async_disable_stdin (void);
|
||||
extern void async_enable_stdin (void *dummy);
|
||||
|
||||
@ -101,6 +101,6 @@ extern int exec_done_display_p;
|
||||
extern char *async_annotation_suffix;
|
||||
extern char *new_async_prompt;
|
||||
extern struct prompts the_prompts;
|
||||
extern void (*call_readline) (gdb_client_data);
|
||||
extern void (*call_readline) (void *);
|
||||
extern void (*input_handler) (char *);
|
||||
extern int input_fd;
|
||||
|
@ -37,7 +37,7 @@
|
||||
#define SECT_OFF_DATA 1
|
||||
#define SECT_OFF_BSS 2
|
||||
#define SECT_OFF_RODATA 3
|
||||
#define SECT_OFF_MAX 4 /* Count of possible values */
|
||||
#define SECT_OFF_MAX 16 /* Count of possible values */
|
||||
|
||||
/* The stab_section_info chain remembers info from the ELF symbol table,
|
||||
while psymtabs are being built for the other symbol tables in the
|
||||
|
@ -133,12 +133,28 @@ extern void set_gnutarget PARAMS ((char *));
|
||||
struct core_fns
|
||||
{
|
||||
|
||||
/* BFD flavour that we handle. Note that bfd_target_unknown_flavour matches
|
||||
anything, and if there is no better match, this function will be called
|
||||
as the default. */
|
||||
/* BFD flavour that a core file handler is prepared to read. This
|
||||
can be used by the handler's core tasting function as a first
|
||||
level filter to reject BFD's that don't have the right
|
||||
flavour. */
|
||||
|
||||
enum bfd_flavour core_flavour;
|
||||
|
||||
/* Core file handler function to call to recognize corefile
|
||||
formats that BFD rejects. Some core file format just don't fit
|
||||
into the BFD model, or may require other resources to identify
|
||||
them, that simply aren't available to BFD (such as symbols from
|
||||
another file). Returns nonzero if the handler recognizes the
|
||||
format, zero otherwise. */
|
||||
|
||||
int (*check_format) PARAMS ((bfd *));
|
||||
|
||||
/* Core file handler function to call to ask if it can handle a
|
||||
given core file format or not. Returns zero if it can't,
|
||||
nonzero otherwise. */
|
||||
|
||||
int (*core_sniffer) PARAMS ((struct core_fns *, bfd *));
|
||||
|
||||
/* Extract the register values out of the core file and store them where
|
||||
`read_register' will find them.
|
||||
|
||||
@ -167,5 +183,7 @@ struct core_fns
|
||||
};
|
||||
|
||||
extern void add_core_fns PARAMS ((struct core_fns * cf));
|
||||
extern int default_core_sniffer PARAMS ((struct core_fns *cf, bfd *abfd));
|
||||
extern int default_check_format PARAMS ((bfd *abfd));
|
||||
|
||||
#endif /* !defined (GDBCORE_H) */
|
||||
|
@ -2014,7 +2014,7 @@ gnu_create_inferior (exec_file, allargs, env)
|
||||
inf_restore_exc_ports (inf);
|
||||
|
||||
/* Here we go! */
|
||||
proceed ((CORE_ADDR) - 1, 0, 0);
|
||||
proceed ((CORE_ADDR) -1, 0, 0);
|
||||
}
|
||||
|
||||
/* Mark our target-struct as eligible for stray "run" and "attach"
|
||||
|
@ -717,7 +717,7 @@ go32_create_inferior (char *exec_file, char *args, char **env)
|
||||
push_target (&go32_ops);
|
||||
clear_proceed_status ();
|
||||
insert_breakpoints ();
|
||||
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
|
||||
prog_has_started = 1;
|
||||
}
|
||||
|
||||
|
@ -1624,7 +1624,7 @@ hppa_pop_frame ()
|
||||
/* Start up the inferior. */
|
||||
clear_proceed_status ();
|
||||
proceed_to_finish = 1;
|
||||
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 0);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
|
||||
|
||||
/* Perform our cleanups. */
|
||||
do_cleanups (old_chain);
|
||||
|
@ -970,6 +970,7 @@ set_disassembly_flavor ()
|
||||
set_architecture_from_arch_mach (bfd_arch_i386, bfd_mach_i386_i386_intel_syntax);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_initialize_i386_tdep ()
|
||||
{
|
||||
|
@ -358,9 +358,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
|
||||
static struct core_fns i386aix_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -150,9 +150,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
|
||||
static struct core_fns i386mach_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "floatformat.h"
|
||||
#include "target.h"
|
||||
#include "gdbcore.h"
|
||||
#include "inferior.h"
|
||||
|
||||
static CORE_ADDR next_insn PARAMS ((CORE_ADDR memaddr,
|
||||
unsigned int *pword1,
|
||||
@ -896,6 +897,7 @@ mon960_frame_chain_valid (chain, curframe)
|
||||
return (chain != read_memory_integer (a, 4));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_initialize_i960_tdep ()
|
||||
{
|
||||
|
113
gdb/inf-loop.c
Normal file
113
gdb/inf-loop.c
Normal file
@ -0,0 +1,113 @@
|
||||
/* Handling of inferior events for the event loop for GDB, the GNU debugger.
|
||||
Copyright 1999 Free Software Foundation, Inc.
|
||||
Written by Elena Zannoni <ezannoni@cygnus.com> of 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. */
|
||||
|
||||
#include "defs.h"
|
||||
#include "inferior.h" /* For fetch_inferior_event. */
|
||||
#include "target.h" /* For enum inferior_event_type. */
|
||||
#include "event-loop.h"
|
||||
#include "event-top.h"
|
||||
#include "inf-loop.h"
|
||||
|
||||
static int fetch_inferior_event_wrapper (gdb_client_data client_data);
|
||||
static void complete_execution (void);
|
||||
|
||||
/* General function to handle events in the inferior. So far it just
|
||||
takes care of detecting errors reported by select() or poll(),
|
||||
otherwise it assumes that all is OK, and goes on reading data from
|
||||
the fd. This however may not always be what we want to do. */
|
||||
void
|
||||
inferior_event_handler (enum inferior_event_type event_type,
|
||||
gdb_client_data client_data)
|
||||
{
|
||||
switch (event_type)
|
||||
{
|
||||
case INF_ERROR:
|
||||
printf_unfiltered ("error detected from target.\n");
|
||||
target_async (NULL, 0);
|
||||
pop_target ();
|
||||
discard_all_continuations ();
|
||||
do_exec_error_cleanups (ALL_CLEANUPS);
|
||||
break;
|
||||
|
||||
case INF_REG_EVENT:
|
||||
/* Use catch errors for now, until the inner layers of
|
||||
fetch_inferior_event (i.e. readchar) can return meaningful
|
||||
error status. If an error occurs while getting an event from
|
||||
the target, just get rid of the target. */
|
||||
if (!catch_errors (fetch_inferior_event_wrapper,
|
||||
client_data, "", RETURN_MASK_ALL))
|
||||
{
|
||||
target_async (NULL, 0);
|
||||
pop_target ();
|
||||
discard_all_continuations ();
|
||||
do_exec_error_cleanups (ALL_CLEANUPS);
|
||||
display_gdb_prompt (0);
|
||||
}
|
||||
break;
|
||||
|
||||
case INF_EXEC_COMPLETE:
|
||||
/* Is there anything left to do for the command issued to
|
||||
complete? */
|
||||
do_all_continuations ();
|
||||
/* Reset things after target has stopped for the async commands. */
|
||||
complete_execution ();
|
||||
break;
|
||||
|
||||
case INF_QUIT_REQ:
|
||||
case INF_TIMER:
|
||||
default:
|
||||
printf_unfiltered ("Event type not recognized.\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
fetch_inferior_event_wrapper (gdb_client_data client_data)
|
||||
{
|
||||
fetch_inferior_event (client_data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Reset proper settings after an asynchronous command has finished.
|
||||
If the execution command was in synchronous mode, register stdin
|
||||
with the event loop, and reset the prompt. */
|
||||
|
||||
static void
|
||||
complete_execution (void)
|
||||
{
|
||||
target_executing = 0;
|
||||
|
||||
/* Unregister the inferior from the event loop. This is done so that
|
||||
when the inferior is not running we don't get distracted by
|
||||
spurious inferior output. */
|
||||
target_async (NULL, 0);
|
||||
|
||||
if (sync_execution)
|
||||
{
|
||||
do_exec_error_cleanups (ALL_CLEANUPS);
|
||||
display_gdb_prompt (0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (exec_done_display_p)
|
||||
printf_unfiltered ("completed.\n");
|
||||
}
|
||||
}
|
28
gdb/inf-loop.h
Normal file
28
gdb/inf-loop.h
Normal file
@ -0,0 +1,28 @@
|
||||
/* Interface to the inferior event handling code for GDB, the GNU debugger.
|
||||
Copyright 1999 Free Software Foundation, Inc.
|
||||
Written by Elena Zannoni <ezannoni@cygnus.com> of 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. */
|
||||
|
||||
#ifndef INF_LOOP_H
|
||||
#define INF_LOOP_H
|
||||
|
||||
extern void inferior_event_handler (enum inferior_event_type event_type,
|
||||
void* client_data);
|
||||
|
||||
#endif /* #ifndef INF_LOOP_H */
|
11
gdb/infcmd.c
11
gdb/infcmd.c
@ -34,7 +34,6 @@
|
||||
#include "language.h"
|
||||
#include "symfile.h"
|
||||
#include "objfiles.h"
|
||||
#include "event-loop.h"
|
||||
#include "event-top.h"
|
||||
#include "parser-defs.h"
|
||||
|
||||
@ -392,7 +391,7 @@ continue_command (proc_count_exp, from_tty)
|
||||
|
||||
clear_proceed_status ();
|
||||
|
||||
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 0);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
|
||||
}
|
||||
|
||||
/* Step until outside of current statement. */
|
||||
@ -516,7 +515,7 @@ which has no line number information.\n", name);
|
||||
step_over_calls = 1;
|
||||
|
||||
step_multi = (count > 1);
|
||||
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 1);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
|
||||
if (!stop_step)
|
||||
break;
|
||||
|
||||
@ -684,7 +683,7 @@ signal_command (signum_exp, from_tty)
|
||||
FIXME: Neither should "signal foo" but when I tried passing
|
||||
(CORE_ADDR)-1 unconditionally I got a testsuite failure which I haven't
|
||||
tried to track down yet. */
|
||||
proceed (oursig == TARGET_SIGNAL_0 ? (CORE_ADDR) - 1 : stop_pc, oursig, 0);
|
||||
proceed (oursig == TARGET_SIGNAL_0 ? (CORE_ADDR) -1 : stop_pc, oursig, 0);
|
||||
}
|
||||
|
||||
/* Call breakpoint_auto_delete on the current contents of the bpstat
|
||||
@ -833,7 +832,7 @@ until_next_command (from_tty)
|
||||
|
||||
step_multi = 0; /* Only one call to proceed */
|
||||
|
||||
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 1);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1032,7 +1031,7 @@ finish_command (arg, from_tty)
|
||||
}
|
||||
|
||||
proceed_to_finish = 1; /* We want stop_registers, please... */
|
||||
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 0);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
|
||||
|
||||
/* Do this only if not running asynchronously or if the target
|
||||
cannot do async execution. Otherwise, complete this command when
|
||||
|
@ -489,7 +489,8 @@ child_terminal_info (args, from_tty)
|
||||
}
|
||||
|
||||
#ifdef PROCESS_GROUP_TYPE
|
||||
printf_filtered ("Process group = %d\n", inferior_process_group);
|
||||
printf_filtered ("Process group = %d\n",
|
||||
(int) inferior_process_group);
|
||||
#endif
|
||||
|
||||
SERIAL_PRINT_TTY_STATE (stdin_serial, inferior_ttystate, gdb_stdout);
|
||||
|
35
gdb/infrun.c
35
gdb/infrun.c
@ -34,8 +34,7 @@
|
||||
#include "symfile.h" /* for overlay functions */
|
||||
#include "top.h"
|
||||
#include <signal.h>
|
||||
#include "event-loop.h"
|
||||
#include "event-top.h"
|
||||
#include "inf-loop.h"
|
||||
|
||||
/* Prototypes for local functions */
|
||||
|
||||
@ -56,8 +55,6 @@ static void delete_breakpoint_current_contents (void *);
|
||||
static void set_follow_fork_mode_command (char *arg, int from_tty,
|
||||
struct cmd_list_element * c);
|
||||
|
||||
static void complete_execution (void);
|
||||
|
||||
static struct inferior_status *xmalloc_inferior_status (void);
|
||||
|
||||
static void free_inferior_status (struct inferior_status *);
|
||||
@ -963,7 +960,7 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
|
||||
if (step < 0)
|
||||
stop_after_trap = 1;
|
||||
|
||||
if (addr == (CORE_ADDR) - 1)
|
||||
if (addr == (CORE_ADDR) -1)
|
||||
{
|
||||
/* If there is a breakpoint at the address we will resume at,
|
||||
step one instruction before inserting breakpoints
|
||||
@ -1281,7 +1278,7 @@ struct execution_control_state *async_ecs;
|
||||
|
||||
void
|
||||
fetch_inferior_event (client_data)
|
||||
gdb_client_data client_data;
|
||||
void *client_data;
|
||||
{
|
||||
static struct cleanup *old_cleanups;
|
||||
|
||||
@ -1329,11 +1326,7 @@ fetch_inferior_event (client_data)
|
||||
if there are any. */
|
||||
do_exec_cleanups (old_cleanups);
|
||||
normal_stop ();
|
||||
/* Is there anything left to do for the command issued to
|
||||
complete? */
|
||||
do_all_continuations ();
|
||||
/* Reset things after target has stopped for the async commands. */
|
||||
complete_execution ();
|
||||
inferior_event_handler (INF_EXEC_COMPLETE, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3239,26 +3232,6 @@ stopped_for_internal_shlib_event (bpstat bs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Reset proper settings after an asynchronous command has finished.
|
||||
If the execution command was in synchronous mode, register stdin
|
||||
with the event loop, and reset the prompt. */
|
||||
|
||||
static void
|
||||
complete_execution (void)
|
||||
{
|
||||
target_executing = 0;
|
||||
|
||||
if (sync_execution)
|
||||
{
|
||||
do_exec_error_cleanups (ALL_CLEANUPS);
|
||||
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.
|
||||
Print appropriate messages, remove breakpoints, give terminal our modes.
|
||||
|
@ -515,7 +515,7 @@ child_create_inferior (exec_file, allargs, env)
|
||||
#endif
|
||||
/* We are at the first instruction we care about. */
|
||||
/* Pedal to the metal... */
|
||||
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
|
||||
}
|
||||
|
||||
#if !defined(CHILD_POST_STARTUP_INFERIOR)
|
||||
|
@ -186,9 +186,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
|
||||
static struct core_fns irix4_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -832,7 +832,9 @@ symbol_add_stub (arg)
|
||||
{
|
||||
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
|
||||
CORE_ADDR text_addr = 0;
|
||||
struct section_addr_info section_addrs;
|
||||
|
||||
memset (§ion_addrs, 0, sizeof (section_addrs));
|
||||
if (so->textsection)
|
||||
text_addr = so->textsection->addr;
|
||||
else if (so->abfd != NULL)
|
||||
@ -850,9 +852,10 @@ symbol_add_stub (arg)
|
||||
text_addr = bfd_section_vma (so->abfd, lowest_sect) + LM_OFFSET (so);
|
||||
}
|
||||
|
||||
section_addrs.text_addr = text_addr;
|
||||
so->objfile = symbol_file_add (so->so_name, so->from_tty,
|
||||
text_addr,
|
||||
0, 0, 0, 0, 0);
|
||||
§ion_addrs,
|
||||
0, 0, 0, 0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
@ -1314,9 +1317,11 @@ must be loaded manually, using `sharedlibrary'.",
|
||||
|
||||
static struct core_fns irix5_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -826,9 +826,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
|
||||
static struct core_fns lynx_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -3980,7 +3980,7 @@ m3_create_inferior (exec_file, allargs, env)
|
||||
fork_inferior (exec_file, allargs, env, m3_trace_me, m3_trace_him, NULL, NULL);
|
||||
/* We are at the first instruction we care about. */
|
||||
/* Pedal to the metal... */
|
||||
proceed ((CORE_ADDR) - 1, 0, 0);
|
||||
proceed ((CORE_ADDR) -1, 0, 0);
|
||||
}
|
||||
|
||||
/* Mark our target-struct as eligible for stray "run" and "attach"
|
||||
|
@ -791,7 +791,7 @@ void handle_exception(int exceptionVector)
|
||||
mem2hex((char*) registers, remcomOutBuffer, NUMREGBYTES);
|
||||
break;
|
||||
case 'G' : /* set the value of the CPU registers - return OK */
|
||||
hex2mem(&ptr, (char*) registers, NUMREGBYTES);
|
||||
hex2mem(ptr, (char*) registers, NUMREGBYTES);
|
||||
strcpy(remcomOutBuffer,"OK");
|
||||
break;
|
||||
|
||||
|
@ -635,6 +635,7 @@ m68k_saved_pc_after_call (frame)
|
||||
return read_memory_integer (read_register (SP_REGNUM), 4);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_initialize_m68k_tdep ()
|
||||
{
|
||||
|
@ -217,7 +217,7 @@ child_create_inferior (exec_file, allargs, env)
|
||||
init_wait_for_inferior ();
|
||||
clear_proceed_status ();
|
||||
|
||||
/* proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0); */
|
||||
/* proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0); */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -62,6 +62,10 @@ GDB_FILE *gdb_stderr;
|
||||
GDB_FILE *gdb_stdlog;
|
||||
GDB_FILE *gdb_stdtarg;
|
||||
|
||||
/* Used to initialize error() - defined in utils.c */
|
||||
|
||||
extern void error_init (void);
|
||||
|
||||
/* Whether to enable writing into executable and core files */
|
||||
extern int write_files;
|
||||
|
||||
@ -169,6 +173,9 @@ main (argc, argv)
|
||||
gdb_stdtarg = gdb_stderr; /* for moment */
|
||||
#endif
|
||||
|
||||
/* initialize error() */
|
||||
error_init ();
|
||||
|
||||
/* Parse arguments and options. */
|
||||
{
|
||||
int c;
|
||||
|
@ -237,9 +237,11 @@ register_addr (regno, blockend)
|
||||
|
||||
static struct core_fns mips_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -1146,7 +1146,7 @@ read_next_frame_reg (fi, regno)
|
||||
if (fi->saved_regs == NULL)
|
||||
mips_find_saved_regs (fi);
|
||||
if (fi->saved_regs[regno])
|
||||
return read_memory_integer (fi->saved_regs[regno], MIPS_SAVED_REGSIZE);
|
||||
return read_memory_integer (ADDR_BITS_REMOVE (fi->saved_regs[regno]), MIPS_SAVED_REGSIZE);
|
||||
}
|
||||
}
|
||||
return read_register (regno);
|
||||
@ -3564,6 +3564,7 @@ mips_call_dummy_address ()
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
_initialize_mips_tdep ()
|
||||
{
|
||||
|
@ -175,9 +175,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
|
||||
static struct core_fns nat_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -435,6 +435,10 @@ struct objfile
|
||||
|
||||
#define OBJF_SHARED (1 << 3) /* From a shared library */
|
||||
|
||||
/* User requested that this objfile be read in it's entirety. */
|
||||
|
||||
#define OBJF_READNOW (1 << 4) /* Immediate full read */
|
||||
|
||||
/* The object file that the main symbol table was loaded from (e.g. the
|
||||
argument to the "symbol-file" or "file" command). */
|
||||
|
||||
|
@ -578,7 +578,9 @@ symbol_add_stub (arg)
|
||||
{
|
||||
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
|
||||
CORE_ADDR text_addr = 0;
|
||||
struct section_addr_info section_addrs;
|
||||
|
||||
memset (§ion_addrs, 0, sizeof (section_addrs));
|
||||
if (so->textsection)
|
||||
text_addr = so->textsection->addr;
|
||||
else if (so->abfd != NULL)
|
||||
@ -596,9 +598,10 @@ symbol_add_stub (arg)
|
||||
text_addr = bfd_section_vma (so->abfd, lowest_sect) + LM_OFFSET (so);
|
||||
}
|
||||
|
||||
section_addrs.text_addr = text_addr;
|
||||
so->objfile = symbol_file_add (so->so_name, so->from_tty,
|
||||
text_addr,
|
||||
0, 0, 0, 0, 1);
|
||||
§ion_addrs,
|
||||
0, 0, 0, 1);
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,9 @@ pa64_solib_add_solib_objfile (so, name, from_tty, text_addr)
|
||||
bfd *tmp_bfd;
|
||||
asection *sec;
|
||||
obj_private_data_t *obj_private;
|
||||
struct section_addr_info section_addrs;
|
||||
|
||||
memset (§ion_addrs, 0, sizeof (section_addrs));
|
||||
/* We need the BFD so that we can look at its sections. We open up the
|
||||
file temporarily, then close it when we are done. */
|
||||
tmp_bfd = bfd_openr (name, gnutarget);
|
||||
@ -270,7 +272,8 @@ pa64_solib_add_solib_objfile (so, name, from_tty, text_addr)
|
||||
tmp_bfd = NULL;
|
||||
|
||||
/* Now let the generic code load up symbols for this library. */
|
||||
so->objfile = symbol_file_add (name, from_tty, text_addr, 0, 0, 0, 0, 1);
|
||||
section_addrs.text_addr = text_addr;
|
||||
so->objfile = symbol_file_add (name, from_tty, §ion_addrs, 0, 0, 0, 1);
|
||||
so->abfd = so->objfile->obfd;
|
||||
|
||||
/* Mark this as a shared library and save private data. */
|
||||
|
@ -166,7 +166,7 @@ static void validate_format PARAMS ((struct format_data, char *));
|
||||
|
||||
static void do_examine PARAMS ((struct format_data, CORE_ADDR addr, asection * section));
|
||||
|
||||
static void print_formatted PARAMS ((value_ptr, int, int));
|
||||
static void print_formatted PARAMS ((value_ptr, int, int, GDB_FILE *));
|
||||
|
||||
static struct format_data decode_format PARAMS ((char **, int, int));
|
||||
|
||||
@ -270,17 +270,18 @@ decode_format (string_ptr, oformat, osize)
|
||||
return val;
|
||||
}
|
||||
|
||||
/* Print value VAL on gdb_stdout according to FORMAT, a letter or 0.
|
||||
/* Print value VAL on stream according to FORMAT, a letter or 0.
|
||||
Do not end with a newline.
|
||||
0 means print VAL according to its own type.
|
||||
SIZE is the letter for the size of datum being printed.
|
||||
This is used to pad hex numbers so they line up. */
|
||||
|
||||
static void
|
||||
print_formatted (val, format, size)
|
||||
print_formatted (val, format, size, stream)
|
||||
register value_ptr val;
|
||||
register int format;
|
||||
int size;
|
||||
GDB_FILE *stream;
|
||||
{
|
||||
struct type *type = check_typedef (VALUE_TYPE (val));
|
||||
int len = TYPE_LENGTH (type);
|
||||
@ -296,7 +297,7 @@ print_formatted (val, format, size)
|
||||
case 's':
|
||||
/* FIXME: Need to handle wchar_t's here... */
|
||||
next_address = VALUE_ADDRESS (val)
|
||||
+ val_print_string (VALUE_ADDRESS (val), -1, 1, gdb_stdout);
|
||||
+ val_print_string (VALUE_ADDRESS (val), -1, 1, stream);
|
||||
next_section = VALUE_BFD_SECTION (val);
|
||||
break;
|
||||
|
||||
@ -310,7 +311,7 @@ print_formatted (val, format, size)
|
||||
/* We often wrap here if there are long symbolic names. */
|
||||
wrap_here (" ");
|
||||
next_address = VALUE_ADDRESS (val)
|
||||
+ print_insn (VALUE_ADDRESS (val), gdb_stdout);
|
||||
+ print_insn (VALUE_ADDRESS (val), stream);
|
||||
next_section = VALUE_BFD_SECTION (val);
|
||||
break;
|
||||
|
||||
@ -325,13 +326,13 @@ print_formatted (val, format, size)
|
||||
* we have to use language rules to print it as
|
||||
* a series of scalars.
|
||||
*/
|
||||
value_print (val, gdb_stdout, format, Val_pretty_default);
|
||||
value_print (val, stream, format, Val_pretty_default);
|
||||
else
|
||||
/* User specified format, so don't look to the
|
||||
* the type to tell us what to do.
|
||||
*/
|
||||
print_scalar_formatted (VALUE_CONTENTS (val), type,
|
||||
format, size, gdb_stdout);
|
||||
format, size, stream);
|
||||
}
|
||||
}
|
||||
|
||||
@ -803,7 +804,7 @@ do_examine (fmt, addr, sect)
|
||||
if (last_examine_value)
|
||||
release_value (last_examine_value);
|
||||
|
||||
print_formatted (last_examine_value, format, size);
|
||||
print_formatted (last_examine_value, format, size, gdb_stdout);
|
||||
}
|
||||
printf_filtered ("\n");
|
||||
gdb_flush (gdb_stdout);
|
||||
@ -909,7 +910,7 @@ print_command_1 (exp, inspect, voidprint)
|
||||
if (histindex >= 0)
|
||||
annotate_value_history_value ();
|
||||
|
||||
print_formatted (val, format, fmt.size);
|
||||
print_formatted (val, format, fmt.size, gdb_stdout);
|
||||
printf_filtered ("\n");
|
||||
|
||||
if (histindex >= 0)
|
||||
@ -984,10 +985,13 @@ output_command (exp, from_tty)
|
||||
|
||||
annotate_value_begin (VALUE_TYPE (val));
|
||||
|
||||
print_formatted (val, format, fmt.size);
|
||||
print_formatted (val, format, fmt.size, gdb_stdout);
|
||||
|
||||
annotate_value_end ();
|
||||
|
||||
wrap_here ("");
|
||||
gdb_flush (gdb_stdout);
|
||||
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
|
||||
@ -1578,7 +1582,7 @@ do_one_display (d)
|
||||
annotate_display_expression ();
|
||||
|
||||
print_formatted (evaluate_expression (d->exp),
|
||||
d->format.format, d->format.size);
|
||||
d->format.format, d->format.size, gdb_stdout);
|
||||
printf_filtered ("\n");
|
||||
}
|
||||
|
||||
|
@ -5672,7 +5672,7 @@ procfs_create_inferior (exec_file, allargs, env)
|
||||
/* We are at the first instruction we care about. */
|
||||
/* Pedal to the metal... */
|
||||
|
||||
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
|
||||
}
|
||||
|
||||
/* Clean up after the inferior dies. */
|
||||
|
@ -248,6 +248,8 @@ device is attached to the remote system (e.g. /dev/ttya).");
|
||||
else if (rslt)
|
||||
{
|
||||
printf_filtered ("RDI_open: %s\n", rdi_error_message (rslt));
|
||||
Adp_CloseDevice ();
|
||||
error("RID_open failed\n");
|
||||
}
|
||||
|
||||
rslt = angel_RDI_info (RDIInfo_Target, &arg1, &arg2);
|
||||
|
@ -462,7 +462,7 @@ gdbsim_create_inferior (exec_file, args, env)
|
||||
clear_proceed_status ();
|
||||
|
||||
/* NB: Entry point already set by sim_create_inferior. */
|
||||
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 0);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
|
||||
}
|
||||
|
||||
/* The open routine takes the rest of the parameters from the command,
|
||||
|
@ -1316,7 +1316,7 @@ udi_load (args, from_tty)
|
||||
/* As a convenience, pick up any symbol info that is in the program
|
||||
being loaded. Note that we assume that the program is the``mainline'';
|
||||
if this is not always true, then this code will need to be augmented. */
|
||||
symbol_file_add (strtok (args, " \t"), from_tty, 0, 1, 0, 0, 0, 0);
|
||||
symbol_file_add (strtok (args, " \t"), from_tty, NULL, 1, 0, 0, 0);
|
||||
|
||||
/* Getting new symbols may change our opinion about what is
|
||||
frameless. */
|
||||
|
@ -701,7 +701,7 @@ vx_add_symbols (name, from_tty, text_addr, data_addr, bss_addr)
|
||||
|
||||
/* It might be nice to suppress the breakpoint_re_set which happens here
|
||||
because we are going to do one again after the objfile_relocate. */
|
||||
objfile = symbol_file_add (name, from_tty, 0, 0, 0, 0, 0, 0);
|
||||
objfile = symbol_file_add (name, from_tty, NULL, 0, 0, 0, 0);
|
||||
|
||||
/* This is a (slightly cheesy) way of superceding the old symbols. A less
|
||||
cheesy way would be to find the objfile with the same name and
|
||||
|
86
gdb/remote.c
86
gdb/remote.c
@ -48,6 +48,7 @@
|
||||
|
||||
#include "event-loop.h"
|
||||
#include "event-top.h"
|
||||
#include "inf-loop.h"
|
||||
|
||||
#include <signal.h>
|
||||
#include "serial.h"
|
||||
@ -61,8 +62,6 @@ static void handle_remote_sigint_twice PARAMS ((int));
|
||||
static void async_remote_interrupt PARAMS ((gdb_client_data));
|
||||
static void async_remote_interrupt_twice PARAMS ((gdb_client_data));
|
||||
|
||||
static void set_extended_protocol PARAMS ((struct continuation_arg *));
|
||||
|
||||
static void build_remote_gdbarch_data PARAMS ((void));
|
||||
|
||||
static int remote_write_bytes PARAMS ((CORE_ADDR memaddr,
|
||||
@ -1904,18 +1903,6 @@ serial device is attached to the remote system (e.g. /dev/ttya).");
|
||||
putpkt ("!");
|
||||
getpkt (buf, 0);
|
||||
}
|
||||
|
||||
/* If running in asynchronous mode, register the target with the
|
||||
event loop. Set things up so that when there is an event on the
|
||||
file descriptor, the event loop will call fetch_inferior_event,
|
||||
which will do the proper analysis to determine what happened. */
|
||||
/* FIXME: cagney/1999-09-26: We shouldn't just put the target into
|
||||
async mode. Instead we should leave the target synchronous and
|
||||
then leave it to the client to flip modes. */
|
||||
if (event_loop_p && target_can_async_p ())
|
||||
target_async (inferior_event_handler, 0);
|
||||
if (remote_debug && SERIAL_IS_ASYNC_P (remote_desc))
|
||||
fputs_unfiltered ("Serial put into async mode.\n", gdb_stdlog);
|
||||
}
|
||||
|
||||
/* This takes a program previously attached to and detaches it. After
|
||||
@ -2059,14 +2046,6 @@ remote_async_resume (pid, step, siggnal)
|
||||
if (target_resume_hook)
|
||||
(*target_resume_hook) ();
|
||||
|
||||
/* Tell the world that the target is now executing. */
|
||||
/* FIXME: cagney/1999-09-23: Is it the targets responsibility to set
|
||||
this? Instead, should the client of target just assume (for
|
||||
async targets) that the target is going to start executing? Is
|
||||
this information already found in the continuation block? */
|
||||
if (SERIAL_IS_ASYNC_P (remote_desc))
|
||||
target_executing = 1;
|
||||
|
||||
if (siggnal != TARGET_SIGNAL_0)
|
||||
{
|
||||
buf[0] = step ? 'S' : 'C';
|
||||
@ -2077,6 +2056,22 @@ remote_async_resume (pid, step, siggnal)
|
||||
else
|
||||
strcpy (buf, step ? "s" : "c");
|
||||
|
||||
/* We are about to start executing the inferior, let's register it
|
||||
with the event loop. NOTE: this is the one place where all the
|
||||
execution commands end up. We could alternatively do this in each
|
||||
of the execution commands in infcmd.c.*/
|
||||
/* FIXME: ezannoni 1999-09-28: We may need to move this out of here
|
||||
into infcmd.c in order to allow inferior function calls to work
|
||||
NOT asynchronously. */
|
||||
if (event_loop_p && SERIAL_CAN_ASYNC_P (remote_desc))
|
||||
target_async (inferior_event_handler, 0);
|
||||
/* Tell the world that the target is now executing. */
|
||||
/* FIXME: cagney/1999-09-23: Is it the targets responsibility to set
|
||||
this? Instead, should the client of target just assume (for
|
||||
async targets) that the target is going to start executing? Is
|
||||
this information already found in the continuation block? */
|
||||
if (SERIAL_IS_ASYNC_P (remote_desc))
|
||||
target_executing = 1;
|
||||
putpkt (buf);
|
||||
}
|
||||
|
||||
@ -3402,17 +3397,22 @@ readchar (timeout)
|
||||
|
||||
ch = SERIAL_READCHAR (remote_desc, timeout);
|
||||
|
||||
switch (ch)
|
||||
if (ch >= 0)
|
||||
return (ch & 0x7f);
|
||||
|
||||
switch ((enum serial_rc) ch)
|
||||
{
|
||||
case SERIAL_EOF:
|
||||
target_mourn_inferior ();
|
||||
error ("Remote connection closed");
|
||||
/* no return */
|
||||
case SERIAL_ERROR:
|
||||
perror_with_name ("Remote communication error");
|
||||
/* no return */
|
||||
case SERIAL_TIMEOUT:
|
||||
return ch;
|
||||
default:
|
||||
return ch & 0x7f;
|
||||
break;
|
||||
}
|
||||
return ch;
|
||||
}
|
||||
|
||||
/* Send the command in BUF to the remote machine, and read the reply
|
||||
@ -3723,8 +3723,9 @@ getpkt (buf, forever)
|
||||
|
||||
if (c == SERIAL_TIMEOUT)
|
||||
{
|
||||
if (forever) /* Watchdog went off. Kill the target. */
|
||||
if (forever) /* Watchdog went off? Kill the target. */
|
||||
{
|
||||
QUIT;
|
||||
target_mourn_inferior ();
|
||||
error ("Watchdog has expired. Target detached.\n");
|
||||
}
|
||||
@ -3887,8 +3888,8 @@ extended_remote_async_create_inferior (exec_file, args, env)
|
||||
|
||||
/* If running asynchronously, register the target file descriptor
|
||||
with the event loop. */
|
||||
if (event_loop_p && SERIAL_CAN_ASYNC_P (remote_desc))
|
||||
SERIAL_ASYNC (remote_desc, inferior_event_handler, 0);
|
||||
if (event_loop_p && target_can_async_p ())
|
||||
target_async (inferior_event_handler, 0);
|
||||
|
||||
/* Now restart the remote server. */
|
||||
extended_remote_restart ();
|
||||
@ -5082,10 +5083,33 @@ remote_is_async_p (void)
|
||||
return SERIAL_IS_ASYNC_P (remote_desc);
|
||||
}
|
||||
|
||||
/* Pass the SERIAL event on and up to the client. One day this code
|
||||
will be able to delay notifying the client of an event until the
|
||||
point where an entire packet has been received. */
|
||||
|
||||
static void (*async_client_callback) (enum inferior_event_type event_type, void *context);
|
||||
static void *async_client_context;
|
||||
static serial_event_ftype remote_async_serial_handler;
|
||||
|
||||
static void
|
||||
remote_async (void (*callback) (int error, void *context, int fd), void *context)
|
||||
remote_async_serial_handler (serial_t scb, void *context)
|
||||
{
|
||||
SERIAL_ASYNC (remote_desc, callback, context);
|
||||
/* Don't propogate error information up to the client. Instead let
|
||||
the client find out about the error by querying the target. */
|
||||
async_client_callback (INF_REG_EVENT, async_client_context);
|
||||
}
|
||||
|
||||
static void
|
||||
remote_async (void (*callback) (enum inferior_event_type event_type, void *context), void *context)
|
||||
{
|
||||
if (callback != NULL)
|
||||
{
|
||||
SERIAL_ASYNC (remote_desc, remote_async_serial_handler, NULL);
|
||||
async_client_callback = callback;
|
||||
async_client_context = context;
|
||||
}
|
||||
else
|
||||
SERIAL_ASYNC (remote_desc, NULL, NULL);
|
||||
}
|
||||
|
||||
/* Target async and target extended-async.
|
||||
|
@ -365,7 +365,7 @@ objfile_symbol_add (arg)
|
||||
{
|
||||
struct objfile *obj = (struct objfile *) arg;
|
||||
|
||||
syms_from_objfile (obj, 0, 0, 0);
|
||||
syms_from_objfile (obj, NULL, 0, 0);
|
||||
new_symfile_objfile (obj, 0, 0);
|
||||
return 1;
|
||||
}
|
||||
@ -814,9 +814,11 @@ find_toc_address (pc)
|
||||
|
||||
static struct core_fns rs6000_core_fns =
|
||||
{
|
||||
bfd_target_coff_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_coff_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -1828,9 +1828,10 @@ show_processor (char *arg, int from_tty)
|
||||
{
|
||||
show_current_variant ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Initialization code. */
|
||||
|
||||
void
|
||||
|
@ -49,7 +49,7 @@ struct pipe_state
|
||||
static int
|
||||
pipe_open (serial_t scb, const char *name)
|
||||
{
|
||||
#if !defined(O_NONBLOCK) || !defined(F_GETFL) || !defined(F_SETFL) || !HAVE_SOCKETPAIR
|
||||
#if !HAVE_SOCKETPAIR
|
||||
return -1;
|
||||
#else
|
||||
struct pipe_state *state;
|
||||
@ -106,17 +106,6 @@ pipe_open (serial_t scb, const char *name)
|
||||
scb->fd = pdes[0];
|
||||
scb->state = state;
|
||||
|
||||
/* Make it non-blocking */
|
||||
{
|
||||
int flags = fcntl (scb->fd, F_GETFL, 0);
|
||||
if (fcntl (scb->fd, F_SETFL, flags | O_NONBLOCK) < 0)
|
||||
{
|
||||
perror ("ser-pipe");
|
||||
pipe_close (scb);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we don't do this, GDB simply exits when the remote side dies. */
|
||||
signal (SIGPIPE, SIG_IGN);
|
||||
return 0;
|
||||
@ -153,7 +142,7 @@ _initialize_ser_pipe (void)
|
||||
ops->readchar = ser_unix_readchar;
|
||||
ops->write = ser_unix_write;
|
||||
ops->flush_output = ser_unix_nop_flush_output;
|
||||
ops->flush_input = ser_unix_nop_flush_input;
|
||||
ops->flush_input = ser_unix_flush_input;
|
||||
ops->send_break = ser_unix_nop_send_break;
|
||||
ops->go_raw = ser_unix_nop_raw;
|
||||
ops->get_tty_state = ser_unix_nop_get_tty_state;
|
||||
|
@ -144,7 +144,7 @@ _initialize_ser_tcp (void)
|
||||
ops->readchar = ser_unix_readchar;
|
||||
ops->write = ser_unix_write;
|
||||
ops->flush_output = ser_unix_nop_flush_output;
|
||||
ops->flush_input = ser_unix_nop_flush_input;
|
||||
ops->flush_input = ser_unix_flush_input;
|
||||
ops->send_break = ser_unix_nop_send_break;
|
||||
ops->go_raw = ser_unix_nop_raw;
|
||||
ops->get_tty_state = ser_unix_nop_get_tty_state;
|
||||
|
340
gdb/ser-unix.c
340
gdb/ser-unix.c
@ -34,7 +34,6 @@
|
||||
#include "gdb_string.h"
|
||||
#include "event-loop.h"
|
||||
|
||||
|
||||
#ifdef HAVE_TERMIOS
|
||||
|
||||
struct hardwire_ttystate
|
||||
@ -71,9 +70,10 @@ static int hardwire_open (serial_t scb, const char *name);
|
||||
static void hardwire_raw (serial_t scb);
|
||||
static int wait_for (serial_t scb, int timeout);
|
||||
static int hardwire_readchar (serial_t scb, int timeout);
|
||||
static int do_hardwire_readchar (serial_t scb, int timeout);
|
||||
static int generic_readchar (serial_t scb, int timeout, int (*do_readchar) (serial_t scb, int timeout));
|
||||
static int rate_to_code (int rate);
|
||||
static int hardwire_setbaudrate (serial_t scb, int rate);
|
||||
static int hardwire_write (serial_t scb, const char *str, int len);
|
||||
static void hardwire_close (serial_t scb);
|
||||
static int get_tty_state (serial_t scb, struct hardwire_ttystate * state);
|
||||
static int set_tty_state (serial_t scb, struct hardwire_ttystate * state);
|
||||
@ -88,6 +88,11 @@ static int hardwire_flush_input (serial_t);
|
||||
static int hardwire_send_break (serial_t);
|
||||
static int hardwire_setstopbits (serial_t, int);
|
||||
|
||||
static int do_unix_readchar (serial_t scb, int timeout);
|
||||
static timer_handler_func push_event;
|
||||
static handler_func fd_event;
|
||||
static void reschedule (serial_t scb);
|
||||
|
||||
void _initialize_ser_hardwire (void);
|
||||
|
||||
extern int (*ui_loop_hook) (int);
|
||||
@ -230,9 +235,11 @@ hardwire_print_tty_state (serial_t scb,
|
||||
|
||||
#ifdef HAVE_TERMIOS
|
||||
fprintf_filtered (stream, "c_iflag = 0x%x, c_oflag = 0x%x,\n",
|
||||
state->termios.c_iflag, state->termios.c_oflag);
|
||||
(int) state->termios.c_iflag,
|
||||
(int) state->termios.c_oflag);
|
||||
fprintf_filtered (stream, "c_cflag = 0x%x, c_lflag = 0x%x\n",
|
||||
state->termios.c_cflag, state->termios.c_lflag);
|
||||
(int) state->termios.c_cflag,
|
||||
(int) state->termios.c_lflag);
|
||||
#if 0
|
||||
/* This not in POSIX, and is not really documented by those systems
|
||||
which have it (at least not Sun). */
|
||||
@ -325,8 +332,7 @@ hardwire_flush_output (serial_t scb)
|
||||
static int
|
||||
hardwire_flush_input (serial_t scb)
|
||||
{
|
||||
scb->bufcnt = 0;
|
||||
scb->bufp = scb->buf;
|
||||
ser_unix_flush_input (scb);
|
||||
|
||||
#ifdef HAVE_TERMIOS
|
||||
return tcflush (scb->fd, TCIFLUSH);
|
||||
@ -418,9 +424,14 @@ hardwire_raw (serial_t scb)
|
||||
timeout occur in the read() in hardwire_read().
|
||||
*/
|
||||
|
||||
/* FIXME: Don't replace this with the equivalent ser_unix*() until the
|
||||
old TERMIOS/SGTTY/... timer code has been flushed. cagney
|
||||
1999-09-16. */
|
||||
/* FIXME: cagney/1999-09-16: Don't replace this with the equivalent
|
||||
ser_unix*() until the old TERMIOS/SGTTY/... timer code has been
|
||||
flushed. . */
|
||||
|
||||
/* NOTE: cagney/1999-09-30: Much of the code below is dead. The only
|
||||
possible values of the TIMEOUT parameter are ONE and ZERO.
|
||||
Consequently all the code that tries to handle the possability of
|
||||
an overflowed timer is unnecessary. */
|
||||
|
||||
static int
|
||||
wait_for (serial_t scb, int timeout)
|
||||
@ -544,14 +555,11 @@ wait_for (serial_t scb, int timeout)
|
||||
that. */
|
||||
|
||||
static int
|
||||
hardwire_readchar (serial_t scb, int timeout)
|
||||
do_hardwire_readchar (serial_t scb, int timeout)
|
||||
{
|
||||
int status, delta;
|
||||
int detach = 0;
|
||||
|
||||
if (scb->bufcnt-- > 0)
|
||||
return *scb->bufp++;
|
||||
|
||||
if (timeout > 0)
|
||||
timeout++;
|
||||
|
||||
@ -583,15 +591,11 @@ hardwire_readchar (serial_t scb, int timeout)
|
||||
if (status < 0)
|
||||
return status;
|
||||
|
||||
/* NOTE: cagney/1999-09-17: See ser_unix_readchar() for reason
|
||||
why ASYNC reads are character by character. */
|
||||
status = read (scb->fd, scb->buf, BUFSIZ);
|
||||
|
||||
scb->bufcnt = read (scb->fd, scb->buf,
|
||||
(SERIAL_IS_ASYNC_P (scb) ? 1 : BUFSIZ));
|
||||
|
||||
if (scb->bufcnt <= 0)
|
||||
if (status <= 0)
|
||||
{
|
||||
if (scb->bufcnt == 0)
|
||||
if (status == 0)
|
||||
{
|
||||
/* Zero characters means timeout (it could also be EOF, but
|
||||
we don't (yet at least) distinguish). */
|
||||
@ -611,12 +615,20 @@ hardwire_readchar (serial_t scb, int timeout)
|
||||
return SERIAL_ERROR; /* Got an error from read */
|
||||
}
|
||||
|
||||
scb->bufcnt = status;
|
||||
scb->bufcnt--;
|
||||
scb->bufp = scb->buf;
|
||||
return *scb->bufp++;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
hardwire_readchar (serial_t scb, int timeout)
|
||||
{
|
||||
return generic_readchar (scb, timeout, do_hardwire_readchar);
|
||||
}
|
||||
|
||||
|
||||
#ifndef B19200
|
||||
#define B19200 EXTA
|
||||
#endif
|
||||
@ -812,28 +824,6 @@ hardwire_setstopbits (scb, num)
|
||||
return set_tty_state (scb, &state);
|
||||
}
|
||||
|
||||
/* FIXME: Don't replace this with the equivalent ser_unix*() until the
|
||||
old TERMIOS/SGTTY/... timer code has been flushed. cagney
|
||||
1999-09-16. */
|
||||
|
||||
static int
|
||||
hardwire_write (serial_t scb, const char *str, int len)
|
||||
{
|
||||
int cc;
|
||||
|
||||
while (len > 0)
|
||||
{
|
||||
cc = write (scb->fd, str, len);
|
||||
|
||||
if (cc < 0)
|
||||
return 1;
|
||||
len -= cc;
|
||||
str += cc;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
hardwire_close (serial_t scb)
|
||||
{
|
||||
@ -911,15 +901,12 @@ ser_unix_wait_for (serial_t scb, int timeout)
|
||||
char if successful. Returns -2 if timeout expired, EOF if line dropped
|
||||
dead, or -3 for any other error (see errno in that case). */
|
||||
|
||||
int
|
||||
ser_unix_readchar (serial_t scb, int timeout)
|
||||
static int
|
||||
do_unix_readchar (serial_t scb, int timeout)
|
||||
{
|
||||
int status;
|
||||
int delta;
|
||||
|
||||
if (scb->bufcnt-- > 0)
|
||||
return *scb->bufp++;
|
||||
|
||||
/* We have to be able to keep the GUI alive here, so we break the original
|
||||
timeout into steps of 1 second, running the "keep the GUI alive" hook
|
||||
each time through the loop.
|
||||
@ -969,20 +956,14 @@ ser_unix_readchar (serial_t scb, int timeout)
|
||||
|
||||
while (1)
|
||||
{
|
||||
/* FIXME: cagney/1999-09-17: ASYNC: The ASYNC serial code needs
|
||||
to be modified so that it agressivly tries to drain its local
|
||||
input buffer. Until this is done, the read() below can only
|
||||
take in single characters. This is to ensure that
|
||||
unprocessed data doesn't end up sitting in the input fifo. */
|
||||
scb->bufcnt = read (scb->fd, scb->buf,
|
||||
(SERIAL_IS_ASYNC_P (scb) ? 1 : BUFSIZ));
|
||||
if (scb->bufcnt != -1 || errno != EINTR)
|
||||
status = read (scb->fd, scb->buf, BUFSIZ);
|
||||
if (status != -1 || errno != EINTR)
|
||||
break;
|
||||
}
|
||||
|
||||
if (scb->bufcnt <= 0)
|
||||
if (status <= 0)
|
||||
{
|
||||
if (scb->bufcnt == 0)
|
||||
if (status == 0)
|
||||
return SERIAL_TIMEOUT; /* 0 chars means timeout [may need to
|
||||
distinguish between EOF & timeouts
|
||||
someday] */
|
||||
@ -990,11 +971,70 @@ ser_unix_readchar (serial_t scb, int timeout)
|
||||
return SERIAL_ERROR; /* Got an error from read */
|
||||
}
|
||||
|
||||
scb->bufcnt = status;
|
||||
scb->bufcnt--;
|
||||
scb->bufp = scb->buf;
|
||||
return *scb->bufp++;
|
||||
}
|
||||
|
||||
/* Perform operations common to both old and new readchar. */
|
||||
|
||||
/* Return the next character from the input FIFO. If the FIFO is
|
||||
empty, call the SERIAL specific routine to try and read in more
|
||||
characters.
|
||||
|
||||
Initially data from the input FIFO is returned (fd_event()
|
||||
pre-reads the input into that FIFO. Once that has been emptied,
|
||||
further data is obtained by polling the input FD using the device
|
||||
specific readchar() function. Note: reschedule() is called after
|
||||
every read. This is because there is no guarentee that the lower
|
||||
level fd_event() poll_event() code (which also calls reschedule())
|
||||
will be called. */
|
||||
|
||||
static int
|
||||
generic_readchar (serial_t scb, int timeout,
|
||||
int (do_readchar) (serial_t scb, int timeout))
|
||||
{
|
||||
int ch;
|
||||
if (scb->bufcnt > 0)
|
||||
{
|
||||
ch = *scb->bufp;
|
||||
scb->bufcnt--;
|
||||
scb->bufp++;
|
||||
}
|
||||
else if (scb->bufcnt < 0)
|
||||
{
|
||||
/* Some errors/eof are are sticky. */
|
||||
ch = scb->bufcnt;
|
||||
}
|
||||
else
|
||||
{
|
||||
ch = do_readchar (scb, timeout);
|
||||
if (ch < 0)
|
||||
{
|
||||
switch ((enum serial_rc) ch)
|
||||
{
|
||||
case SERIAL_EOF:
|
||||
case SERIAL_ERROR:
|
||||
/* Make the error/eof stick. */
|
||||
scb->bufcnt = ch;
|
||||
break;
|
||||
case SERIAL_TIMEOUT:
|
||||
scb->bufcnt = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
reschedule (scb);
|
||||
return ch;
|
||||
}
|
||||
|
||||
int
|
||||
ser_unix_readchar (serial_t scb, int timeout)
|
||||
{
|
||||
return generic_readchar (scb, timeout, do_unix_readchar);
|
||||
}
|
||||
|
||||
int
|
||||
ser_unix_nop_noflush_set_tty_state (serial_t scb,
|
||||
serial_ttystate new_ttystate,
|
||||
@ -1048,9 +1088,16 @@ ser_unix_nop_flush_output (serial_t scb)
|
||||
}
|
||||
|
||||
int
|
||||
ser_unix_nop_flush_input (serial_t scb)
|
||||
ser_unix_flush_input (serial_t scb)
|
||||
{
|
||||
return 0;
|
||||
if (scb->bufcnt >= 0)
|
||||
{
|
||||
scb->bufcnt = 0;
|
||||
scb->bufp = scb->buf;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return SERIAL_ERROR;
|
||||
}
|
||||
|
||||
int
|
||||
@ -1065,24 +1112,186 @@ ser_unix_nop_drain_output (serial_t scb)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Event handling for ASYNC serial code.
|
||||
|
||||
At any time the SERIAL device either: has an empty FIFO and is
|
||||
waiting on a FD event; or has a non-empty FIFO/error condition and
|
||||
is constantly scheduling timer events.
|
||||
|
||||
ASYNC only stops pestering its client when it is de-async'ed or it
|
||||
is told to go away. */
|
||||
|
||||
/* Value of scb->async_state: */
|
||||
enum {
|
||||
/* >= 0 (TIMER_SCHEDULED) */
|
||||
/* The ID of the currently scheduled timer event. This state is
|
||||
rarely encountered. Timer events are one-off so as soon as the
|
||||
event is delivered the state is shanged to NOTHING_SCHEDULED. */
|
||||
FD_SCHEDULED = -1,
|
||||
/* The fd_event() handler is scheduled. It is called when ever the
|
||||
file descriptor becomes ready. */
|
||||
NOTHING_SCHEDULED = -2
|
||||
/* Either no task is scheduled (just going into ASYNC mode) or a
|
||||
timer event has just gone off and the current state has been
|
||||
forced into nothing scheduled. */
|
||||
};
|
||||
|
||||
/* Identify and schedule the next ASYNC task based on scb->async_state
|
||||
and scb->buf* (the input FIFO). A state machine is used to avoid
|
||||
the need to make redundant calls into the event-loop - the next
|
||||
scheduled task is only changed when needed. */
|
||||
|
||||
static void
|
||||
ser_unix_event (int error, int fd, gdb_client_data context)
|
||||
reschedule (serial_t scb)
|
||||
{
|
||||
if (SERIAL_IS_ASYNC_P (scb))
|
||||
{
|
||||
int next_state;
|
||||
switch (scb->async_state)
|
||||
{
|
||||
case FD_SCHEDULED:
|
||||
if (scb->bufcnt == 0)
|
||||
next_state = FD_SCHEDULED;
|
||||
else
|
||||
{
|
||||
delete_file_handler (scb->fd);
|
||||
next_state = create_timer (0, push_event, scb);
|
||||
}
|
||||
break;
|
||||
case NOTHING_SCHEDULED:
|
||||
if (scb->bufcnt == 0)
|
||||
{
|
||||
add_file_handler (scb->fd, fd_event, scb);
|
||||
next_state = FD_SCHEDULED;
|
||||
}
|
||||
else
|
||||
{
|
||||
next_state = create_timer (0, push_event, scb);
|
||||
}
|
||||
break;
|
||||
default: /* TIMER SCHEDULED */
|
||||
if (scb->bufcnt == 0)
|
||||
{
|
||||
delete_timer (scb->async_state);
|
||||
add_file_handler (scb->fd, fd_event, scb);
|
||||
next_state = FD_SCHEDULED;
|
||||
}
|
||||
else
|
||||
next_state = scb->async_state;
|
||||
break;
|
||||
}
|
||||
if (SERIAL_DEBUG_P (scb))
|
||||
{
|
||||
switch (next_state)
|
||||
{
|
||||
case FD_SCHEDULED:
|
||||
if (scb->async_state != FD_SCHEDULED)
|
||||
fprintf_unfiltered (gdb_stdlog, "[fd%d->fd-scheduled]\n",
|
||||
scb->fd);
|
||||
break;
|
||||
default: /* TIMER SCHEDULED */
|
||||
if (scb->async_state == FD_SCHEDULED)
|
||||
fprintf_unfiltered (gdb_stdlog, "[fd%d->timer-scheduled]\n",
|
||||
scb->fd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
scb->async_state = next_state;
|
||||
}
|
||||
}
|
||||
|
||||
/* FD_EVENT: This is scheduled when the input FIFO is empty (and there
|
||||
is no pending error). As soon as data arrives, it is read into the
|
||||
input FIFO and the client notified. The client should then drain
|
||||
the FIFO using readchar(). If the FIFO isn't immediatly emptied,
|
||||
push_event() is used to nag the client until it is. */
|
||||
|
||||
static void
|
||||
fd_event (int error, void *context)
|
||||
{
|
||||
serial_t scb = context;
|
||||
scb->async_handler (error, scb->async_context, fd);
|
||||
if (error != 0)
|
||||
{
|
||||
scb->bufcnt = SERIAL_ERROR;
|
||||
}
|
||||
else if (scb->bufcnt == 0)
|
||||
{
|
||||
/* Prime the input FIFO. The readchar() function is used to
|
||||
pull characters out of the buffer. See also
|
||||
generic_readchar(). */
|
||||
int nr;
|
||||
do
|
||||
{
|
||||
nr = read (scb->fd, scb->buf, BUFSIZ);
|
||||
}
|
||||
while (nr == -1 && errno == EINTR);
|
||||
if (nr == 0)
|
||||
{
|
||||
scb->bufcnt = SERIAL_EOF;
|
||||
}
|
||||
else if (nr > 0)
|
||||
{
|
||||
scb->bufcnt = nr;
|
||||
scb->bufp = scb->buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
scb->bufcnt = SERIAL_ERROR;
|
||||
}
|
||||
}
|
||||
scb->async_handler (scb, scb->async_context);
|
||||
reschedule (scb);
|
||||
}
|
||||
|
||||
/* PUSH_EVENT: The input FIFO is non-empty (or there is a pending
|
||||
error). Nag the client until all the data has been read. In the
|
||||
case of errors, the client will need to close or de-async the
|
||||
device before naging stops. */
|
||||
|
||||
static void
|
||||
push_event (void *context)
|
||||
{
|
||||
serial_t scb = context;
|
||||
scb->async_state = NOTHING_SCHEDULED; /* Timers are one-off */
|
||||
scb->async_handler (scb, scb->async_context);
|
||||
/* re-schedule */
|
||||
reschedule (scb);
|
||||
}
|
||||
|
||||
/* Put the SERIAL device into/out-of ASYNC mode. */
|
||||
|
||||
void
|
||||
ser_unix_async (serial_t scb,
|
||||
int async_p)
|
||||
{
|
||||
if (async_p)
|
||||
{
|
||||
add_file_handler (scb->fd, ser_unix_event, scb);
|
||||
/* Force a re-schedule. */
|
||||
scb->async_state = NOTHING_SCHEDULED;
|
||||
if (SERIAL_DEBUG_P (scb))
|
||||
fprintf_unfiltered (gdb_stdlog, "[fd%d->asynchronous]\n",
|
||||
scb->fd);
|
||||
reschedule (scb);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete_file_handler (scb->fd);
|
||||
if (SERIAL_DEBUG_P (scb))
|
||||
fprintf_unfiltered (gdb_stdlog, "[fd%d->synchronous]\n",
|
||||
scb->fd);
|
||||
/* De-schedule what ever tasks are currently scheduled. */
|
||||
switch (scb->async_state)
|
||||
{
|
||||
case FD_SCHEDULED:
|
||||
delete_file_handler (scb->fd);
|
||||
break;
|
||||
NOTHING_SCHEDULED:
|
||||
break;
|
||||
default: /* TIMER SCHEDULED */
|
||||
delete_timer (scb->async_state);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1099,10 +1308,7 @@ _initialize_ser_hardwire (void)
|
||||
the old TERMIOS/SGTTY/... timer code has been flushed. cagney
|
||||
1999-09-16. */
|
||||
ops->readchar = hardwire_readchar;
|
||||
/* FIXME: Don't replace this with the equivalent ser_unix*() until
|
||||
the old TERMIOS/SGTTY/... timer code has been flushed. cagney
|
||||
1999-09-16. */
|
||||
ops->write = hardwire_write;
|
||||
ops->write = ser_unix_write;
|
||||
ops->flush_output = hardwire_flush_output;
|
||||
ops->flush_input = hardwire_flush_input;
|
||||
ops->send_break = hardwire_send_break;
|
||||
|
@ -27,7 +27,7 @@
|
||||
/* Generic UNIX/FD functions */
|
||||
|
||||
extern int ser_unix_nop_flush_output (serial_t scb);
|
||||
extern int ser_unix_nop_flush_input (serial_t scb);
|
||||
extern int ser_unix_flush_input (serial_t scb);
|
||||
extern int ser_unix_nop_send_break (serial_t scb);
|
||||
extern void ser_unix_nop_raw (serial_t scb);
|
||||
extern serial_ttystate ser_unix_nop_get_tty_state (serial_t scb);
|
||||
|
78
gdb/serial.c
78
gdb/serial.c
@ -26,6 +26,10 @@
|
||||
|
||||
extern void _initialize_serial (void);
|
||||
|
||||
/* Is serial being debugged? */
|
||||
|
||||
static int global_serial_debug_p;
|
||||
|
||||
/* Linked list of serial I/O handlers */
|
||||
|
||||
static struct serial_ops *serial_ops_list = NULL;
|
||||
@ -45,7 +49,7 @@ static char *serial_logfile = NULL;
|
||||
static GDB_FILE *serial_logfp = NULL;
|
||||
|
||||
static struct serial_ops *serial_interface_lookup (char *);
|
||||
static void serial_logchar (int, int, int);
|
||||
static void serial_logchar (struct gdb_file *stream, int ch_type, int ch, int timeout);
|
||||
static char logbase_hex[] = "hex";
|
||||
static char logbase_octal[] = "octal";
|
||||
static char logbase_ascii[] = "ascii";
|
||||
@ -64,62 +68,62 @@ static int serial_current_type = 0;
|
||||
#define SERIAL_BREAK 1235
|
||||
|
||||
static void
|
||||
serial_logchar (int ch_type, int ch, int timeout)
|
||||
serial_logchar (struct gdb_file *stream, int ch_type, int ch, int timeout)
|
||||
{
|
||||
if (ch_type != serial_current_type)
|
||||
{
|
||||
fprintf_unfiltered (serial_logfp, "\n%c ", ch_type);
|
||||
fprintf_unfiltered (stream, "\n%c ", ch_type);
|
||||
serial_current_type = ch_type;
|
||||
}
|
||||
|
||||
if (serial_logbase != logbase_ascii)
|
||||
fputc_unfiltered (' ', serial_logfp);
|
||||
fputc_unfiltered (' ', stream);
|
||||
|
||||
switch (ch)
|
||||
{
|
||||
case SERIAL_TIMEOUT:
|
||||
fprintf_unfiltered (serial_logfp, "<Timeout: %d seconds>", timeout);
|
||||
fprintf_unfiltered (stream, "<Timeout: %d seconds>", timeout);
|
||||
return;
|
||||
case SERIAL_ERROR:
|
||||
fprintf_unfiltered (serial_logfp, "<Error: %s>", safe_strerror (errno));
|
||||
fprintf_unfiltered (stream, "<Error: %s>", safe_strerror (errno));
|
||||
return;
|
||||
case SERIAL_EOF:
|
||||
fputs_unfiltered ("<Eof>", serial_logfp);
|
||||
fputs_unfiltered ("<Eof>", stream);
|
||||
return;
|
||||
case SERIAL_BREAK:
|
||||
fputs_unfiltered ("<Break>", serial_logfp);
|
||||
fputs_unfiltered ("<Break>", stream);
|
||||
return;
|
||||
default:
|
||||
if (serial_logbase == logbase_hex)
|
||||
fprintf_unfiltered (serial_logfp, "%02x", ch & 0xff);
|
||||
fprintf_unfiltered (stream, "%02x", ch & 0xff);
|
||||
else if (serial_logbase == logbase_octal)
|
||||
fprintf_unfiltered (serial_logfp, "%03o", ch & 0xff);
|
||||
fprintf_unfiltered (stream, "%03o", ch & 0xff);
|
||||
else
|
||||
switch (ch)
|
||||
{
|
||||
case '\\':
|
||||
fputs_unfiltered ("\\\\", serial_logfp);
|
||||
fputs_unfiltered ("\\\\", stream);
|
||||
break;
|
||||
case '\b':
|
||||
fputs_unfiltered ("\\b", serial_logfp);
|
||||
fputs_unfiltered ("\\b", stream);
|
||||
break;
|
||||
case '\f':
|
||||
fputs_unfiltered ("\\f", serial_logfp);
|
||||
fputs_unfiltered ("\\f", stream);
|
||||
break;
|
||||
case '\n':
|
||||
fputs_unfiltered ("\\n", serial_logfp);
|
||||
fputs_unfiltered ("\\n", stream);
|
||||
break;
|
||||
case '\r':
|
||||
fputs_unfiltered ("\\r", serial_logfp);
|
||||
fputs_unfiltered ("\\r", stream);
|
||||
break;
|
||||
case '\t':
|
||||
fputs_unfiltered ("\\t", serial_logfp);
|
||||
fputs_unfiltered ("\\t", stream);
|
||||
break;
|
||||
case '\v':
|
||||
fputs_unfiltered ("\\v", serial_logfp);
|
||||
fputs_unfiltered ("\\v", stream);
|
||||
break;
|
||||
default:
|
||||
fprintf_unfiltered (serial_logfp, isprint (ch) ? "%c" : "\\x%02x", ch & 0xFF);
|
||||
fprintf_unfiltered (stream, isprint (ch) ? "%c" : "\\x%02x", ch & 0xFF);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -212,6 +216,8 @@ serial_open (const char *name)
|
||||
scb->name = strsave (name);
|
||||
scb->next = scb_base;
|
||||
scb->refcnt = 1;
|
||||
scb->debug_p = 0;
|
||||
scb->async_state = 0;
|
||||
scb->async_handler = NULL;
|
||||
scb->async_context = NULL;
|
||||
scb_base = scb;
|
||||
@ -258,6 +264,8 @@ serial_fdopen (const int fd)
|
||||
scb->name = NULL;
|
||||
scb->next = scb_base;
|
||||
scb->refcnt = 1;
|
||||
scb->debug_p = 0;
|
||||
scb->async_state = 0;
|
||||
scb->async_handler = NULL;
|
||||
scb->async_context = NULL;
|
||||
scb_base = scb;
|
||||
@ -339,12 +347,19 @@ serial_readchar (serial_t scb, int timeout)
|
||||
ch = scb->ops->readchar (scb, timeout);
|
||||
if (serial_logfp != NULL)
|
||||
{
|
||||
serial_logchar ('r', ch, timeout);
|
||||
serial_logchar (serial_logfp, 'r', ch, timeout);
|
||||
|
||||
/* Make sure that the log file is as up-to-date as possible,
|
||||
in case we are getting ready to dump core or something. */
|
||||
gdb_flush (serial_logfp);
|
||||
}
|
||||
if (SERIAL_DEBUG_P (scb))
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "[");
|
||||
serial_logchar (gdb_stdlog, 'r', ch, timeout);
|
||||
fprintf_unfiltered (gdb_stdlog, "]");
|
||||
gdb_flush (gdb_stdlog);
|
||||
}
|
||||
|
||||
return (ch);
|
||||
}
|
||||
@ -357,7 +372,7 @@ serial_write (serial_t scb, const char *str, int len)
|
||||
int count;
|
||||
|
||||
for (count = 0; count < len; count++)
|
||||
serial_logchar ('w', str[count] & 0xff, 0);
|
||||
serial_logchar (serial_logfp, 'w', str[count] & 0xff, 0);
|
||||
|
||||
/* Make sure that the log file is as up-to-date as possible,
|
||||
in case we are getting ready to dump core or something. */
|
||||
@ -403,7 +418,7 @@ int
|
||||
serial_send_break (serial_t scb)
|
||||
{
|
||||
if (serial_logfp != NULL)
|
||||
serial_logchar ('w', SERIAL_BREAK, 0);
|
||||
serial_logchar (serial_logfp, 'w', SERIAL_BREAK, 0);
|
||||
|
||||
return (scb->ops->send_break (scb));
|
||||
}
|
||||
@ -491,6 +506,19 @@ deprecated_serial_fd (serial_t scb)
|
||||
return scb->fd; /* sigh */
|
||||
}
|
||||
|
||||
void
|
||||
serial_debug (serial_t scb, int debug_p)
|
||||
{
|
||||
scb->debug_p = debug_p;
|
||||
}
|
||||
|
||||
int
|
||||
serial_debug_p (serial_t scb)
|
||||
{
|
||||
return scb->debug_p || global_serial_debug_p;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/*
|
||||
The connect command is #if 0 because I hadn't thought of an elegant
|
||||
@ -638,4 +666,12 @@ by gdbserver.",
|
||||
"Set numerical base for remote session logging",
|
||||
&setlist),
|
||||
&showlist);
|
||||
|
||||
add_show_from_set (add_set_cmd ("serialdebug",
|
||||
class_maintenance,
|
||||
var_zinteger,
|
||||
(char *)&global_serial_debug_p,
|
||||
"Set serial debugging.\n\
|
||||
When non-zero, serial port debugging is enabled.", &setlist),
|
||||
&showlist);
|
||||
}
|
||||
|
42
gdb/serial.h
42
gdb/serial.h
@ -55,12 +55,17 @@ extern void serial_un_fdopen (serial_t scb);
|
||||
|
||||
/* Read one char from the serial device with TIMEOUT seconds to wait
|
||||
or -1 to wait forever. Use timeout of 0 to effect a poll. Returns
|
||||
char if ok, else one of the following codes. Note that all error
|
||||
codes are guaranteed to be < 0. */
|
||||
unsigned char if ok, else one of the following codes. Note that
|
||||
all error return-codes are guaranteed to be < 0. */
|
||||
|
||||
#define SERIAL_ERROR -1 /* General error, see errno for details */
|
||||
#define SERIAL_TIMEOUT -2
|
||||
#define SERIAL_EOF -3
|
||||
enum serial_rc {
|
||||
SERIAL_ERROR = -1, /* General error. */
|
||||
SERIAL_TIMEOUT = -2, /* Timeout during read. ui_loop_hook() can,
|
||||
unfortunatly, force this to be returned. */
|
||||
SERIAL_EOF = -3 /* General end-of-file or remote target
|
||||
connection closed, indication. Includes
|
||||
things like the line dropping dead. */
|
||||
};
|
||||
|
||||
extern int serial_readchar (serial_t scb, int timeout);
|
||||
#define SERIAL_READCHAR(SERIAL_T, TIMEOUT) serial_readchar ((SERIAL_T), (TIMEOUT))
|
||||
@ -165,7 +170,7 @@ extern int serial_is_async_p (serial_t scb);
|
||||
asynchronous mode. To disable asynchronous mode, register a NULL
|
||||
callback. */
|
||||
|
||||
typedef void (serial_event_ftype) (int error, void *context, int fd);
|
||||
typedef void (serial_event_ftype) (serial_t scb, void *context);
|
||||
extern void serial_async (serial_t scb, serial_event_ftype *handler, void *context);
|
||||
#define SERIAL_ASYNC(SERIAL_T, HANDLER, CONTEXT) serial_async ((SERIAL_T), (HANDLER), (CONTEXT))
|
||||
|
||||
@ -177,6 +182,17 @@ extern void serial_async (serial_t scb, serial_event_ftype *handler, void *conte
|
||||
extern int deprecated_serial_fd (serial_t scb);
|
||||
#define DEPRECATED_SERIAL_FD(SERIAL_T) deprecated_serial_fd ((SERIAL_T))
|
||||
|
||||
/* Trace/debug mechanism.
|
||||
|
||||
SERIAL_DEBUG() enables/disables internal debugging.
|
||||
SERIAL_DEBUG_P() indicates the current debug state. */
|
||||
|
||||
extern void serial_debug (serial_t scb, int debug_p);
|
||||
#define SERIAL_DEBUG(SERIAL_T, DEBUG_P) serial_debug ((SERIAL_T), (DEBUG_P))
|
||||
|
||||
extern int serial_debug_p (serial_t scb);
|
||||
#define SERIAL_DEBUG_P(SERIAL_T) serial_debug_p ((SERIAL_T))
|
||||
|
||||
|
||||
/* Details of an instance of a serial object */
|
||||
|
||||
@ -186,16 +202,20 @@ struct _serial_t
|
||||
struct serial_ops *ops; /* Function vector */
|
||||
void *state; /* Local context info for open FD */
|
||||
serial_ttystate ttystate; /* Not used (yet) */
|
||||
int bufcnt; /* Amount of data in receive buffer */
|
||||
int bufcnt; /* Amount of data remaining in receive
|
||||
buffer. -ve for sticky errors. */
|
||||
unsigned char *bufp; /* Current byte */
|
||||
unsigned char buf[BUFSIZ]; /* Da buffer itself */
|
||||
int current_timeout; /* (termio{s} only), last value of VTIME */
|
||||
/* ser-unix.c termio{,s} only, we still need to wait for this many more
|
||||
seconds. */
|
||||
int timeout_remaining;
|
||||
int current_timeout; /* (ser-unix.c termio{,s} only), last
|
||||
value of VTIME */
|
||||
int timeout_remaining; /* (ser-unix.c termio{,s} only), we
|
||||
still need to wait for this many
|
||||
more seconds. */
|
||||
char *name; /* The name of the device or host */
|
||||
struct _serial_t *next; /* Pointer to the next serial_t */
|
||||
int refcnt; /* Number of pointers to this block */
|
||||
int debug_p; /* Trace this serial devices operation. */
|
||||
int async_state; /* Async internal state. */
|
||||
void *async_context; /* Async event thread's context */
|
||||
serial_event_ftype *async_handler;/* Async event handler */
|
||||
};
|
||||
|
@ -706,7 +706,7 @@ gdb_handle_exception (int exceptionVector)
|
||||
mem2hex ((char *) registers, remcomOutBuffer, NUMREGBYTES);
|
||||
break;
|
||||
case 'G': /* set the value of the CPU registers - return OK */
|
||||
hex2mem (&ptr, (char *) registers, NUMREGBYTES);
|
||||
hex2mem (ptr, (char *) registers, NUMREGBYTES);
|
||||
strcpy (remcomOutBuffer, "OK");
|
||||
break;
|
||||
|
||||
|
@ -1083,7 +1083,9 @@ symbol_add_stub (arg)
|
||||
{
|
||||
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
|
||||
CORE_ADDR text_addr = 0;
|
||||
struct section_addr_info section_addrs;
|
||||
|
||||
memset (§ion_addrs, 0, sizeof (section_addrs));
|
||||
if (so->textsection)
|
||||
text_addr = so->textsection->addr;
|
||||
else if (so->abfd != NULL)
|
||||
@ -1107,10 +1109,11 @@ symbol_add_stub (arg)
|
||||
if (strcmp (so->objfile->name, so->so_name) == 0)
|
||||
return 1;
|
||||
}
|
||||
section_addrs.text_addr = text_addr;
|
||||
so->objfile =
|
||||
symbol_file_add (so->so_name, so->from_tty,
|
||||
text_addr,
|
||||
0, 0, 0, 0, 1);
|
||||
§ion_addrs,
|
||||
0, 0, 0, 1);
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ som_symtab_read PARAMS ((bfd *, struct objfile *,
|
||||
struct section_offsets *));
|
||||
|
||||
static void
|
||||
som_symfile_offsets PARAMS ((struct objfile *, CORE_ADDR));
|
||||
som_symfile_offsets PARAMS ((struct objfile *, struct section_addr_info *));
|
||||
|
||||
/* FIXME: These should really be in a common header somewhere */
|
||||
|
||||
@ -460,9 +460,9 @@ som_symfile_init (objfile)
|
||||
Plain and simple for now. */
|
||||
|
||||
static void
|
||||
som_symfile_offsets (objfile, addr)
|
||||
som_symfile_offsets (objfile, addrs)
|
||||
struct objfile *objfile;
|
||||
CORE_ADDR addr;
|
||||
struct section_addr_info *addrs;
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -471,11 +471,11 @@ som_symfile_offsets (objfile, addr)
|
||||
obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
|
||||
|
||||
/* First see if we're a shared library. If so, get the section
|
||||
offsets from the library, else get them from addr. */
|
||||
offsets from the library, else get them from addrs. */
|
||||
if (!som_solib_section_offsets (objfile, objfile->section_offsets))
|
||||
{
|
||||
for (i = 0; i < SECT_OFF_MAX; i++)
|
||||
ANOFFSET (objfile->section_offsets, i) = addr;
|
||||
ANOFFSET (objfile->section_offsets, i) = addrs -> text_addr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -287,8 +287,11 @@ som_solib_add_solib_objfile (so, name, from_tty, text_addr)
|
||||
CORE_ADDR text_addr;
|
||||
{
|
||||
obj_private_data_t *obj_private;
|
||||
struct section_addr_info section_addrs;
|
||||
|
||||
so->objfile = symbol_file_add (name, from_tty, text_addr, 0, 0, 0, 0, 1);
|
||||
memset (§ion_addrs, 0, sizeof (section_addrs));
|
||||
section_addrs.text_addr = text_addr;
|
||||
so->objfile = symbol_file_add (name, from_tty, §ion_addrs, 0, 0, 0, 1);
|
||||
so->abfd = so->objfile->obfd;
|
||||
|
||||
/* Mark this as a shared library and save private data.
|
||||
|
@ -325,9 +325,11 @@ kernel_u_size ()
|
||||
|
||||
static struct core_fns sparc_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -2143,4 +2143,6 @@ sparc64_extract_return_value (type, regbuf, valbuf, bitoffset)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -146,9 +146,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
|
||||
static struct core_fns sun3_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
386
gdb/symfile.c
386
gdb/symfile.c
@ -80,6 +80,11 @@ struct complaint empty_symtab_complaint =
|
||||
"Empty symbol table found for `%s'", 0, 0
|
||||
};
|
||||
|
||||
struct complaint unknown_option_complaint =
|
||||
{
|
||||
"Unknown option `%s' ignored", 0, 0
|
||||
};
|
||||
|
||||
/* External variables and functions referenced. */
|
||||
|
||||
extern int info_verbose;
|
||||
@ -458,9 +463,9 @@ find_lowest_section (abfd, sect, obj)
|
||||
for the objectfile OBJFILE and stuffs ADDR into all of the offsets. */
|
||||
|
||||
void
|
||||
default_symfile_offsets (objfile, addr)
|
||||
default_symfile_offsets (objfile, addrs)
|
||||
struct objfile *objfile;
|
||||
CORE_ADDR addr;
|
||||
struct section_addr_info *addrs;
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -469,8 +474,34 @@ default_symfile_offsets (objfile, addr)
|
||||
obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
|
||||
memset (objfile->section_offsets, 0, SIZEOF_SECTION_OFFSETS);
|
||||
|
||||
for (i = 0; i < SECT_OFF_MAX; i++)
|
||||
ANOFFSET (objfile->section_offsets, i) = addr;
|
||||
/* If user explicitly specified values for data and bss, set them here. */
|
||||
|
||||
if (addrs->text_addr)
|
||||
ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT) = addrs->text_addr;
|
||||
if (addrs->data_addr)
|
||||
ANOFFSET (objfile->section_offsets, SECT_OFF_DATA) = addrs->data_addr;
|
||||
if (addrs->bss_addr)
|
||||
ANOFFSET (objfile->section_offsets, SECT_OFF_BSS) = addrs->bss_addr;
|
||||
|
||||
/* Now calculate offsets for other sections. */
|
||||
for (i = 0; i < MAX_SECTIONS && addrs->other[i].name; i++)
|
||||
{
|
||||
struct other_sections *osp ;
|
||||
|
||||
osp = &addrs->other[i] ;
|
||||
if (addrs->other[i].addr == 0)
|
||||
continue;
|
||||
#if 0
|
||||
if (strcmp (".text", osp->name) == 0)
|
||||
SECT_OFF_TEXT = osp->sectindex ;
|
||||
else if (strcmp (".data", osp->name) == 0)
|
||||
SECT_OFF_DATA = osp->sectindex ;
|
||||
else if (strcmp (".bss", osp->name) == 0)
|
||||
SECT_OFF_BSS = osp->sectindex ;
|
||||
#endif
|
||||
/* Record all sections in offsets */
|
||||
ANOFFSET (objfile->section_offsets, osp->sectindex) = osp->addr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -489,15 +520,29 @@ default_symfile_offsets (objfile, addr)
|
||||
the symbol reading (and complaints can be more terse about it). */
|
||||
|
||||
void
|
||||
syms_from_objfile (objfile, addr, mainline, verbo)
|
||||
syms_from_objfile (objfile, addrs, mainline, verbo)
|
||||
struct objfile *objfile;
|
||||
CORE_ADDR addr;
|
||||
struct section_addr_info *addrs;
|
||||
int mainline;
|
||||
int verbo;
|
||||
{
|
||||
struct section_offsets *section_offsets;
|
||||
asection *lowest_sect;
|
||||
asection *lower_sect;
|
||||
asection *sect;
|
||||
CORE_ADDR lower_offset;
|
||||
struct section_addr_info local_addr;
|
||||
struct cleanup *old_chain;
|
||||
int i;
|
||||
|
||||
/* If ADDRS is NULL, initialize the local section_addr_info struct and
|
||||
point ADDRS to it. We now establish the convention that an addr of
|
||||
zero means no load address was specified. */
|
||||
|
||||
if (addrs == NULL)
|
||||
{
|
||||
memset (&local_addr, 0, sizeof (local_addr));
|
||||
addrs = &local_addr;
|
||||
}
|
||||
|
||||
init_entry_point_info (objfile);
|
||||
find_sym_fns (objfile);
|
||||
@ -536,21 +581,107 @@ syms_from_objfile (objfile, addr, mainline, verbo)
|
||||
happens for the PA64 port. */
|
||||
if (mainline)
|
||||
{
|
||||
addr = 0; /* No offset from objfile addresses. */
|
||||
/* No offset from objfile addresses. */
|
||||
addrs -> text_addr = 0;
|
||||
addrs -> data_addr = 0;
|
||||
addrs -> bss_addr = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
lowest_sect = bfd_get_section_by_name (objfile->obfd, ".text");
|
||||
if (lowest_sect == NULL)
|
||||
/* Find lowest loadable section to be used as starting point for
|
||||
continguous sections. FIXME!! won't work without call to find
|
||||
.text first, but this assumes text is lowest section. */
|
||||
lower_sect = bfd_get_section_by_name (objfile->obfd, ".text");
|
||||
if (lower_sect == NULL)
|
||||
bfd_map_over_sections (objfile->obfd, find_lowest_section,
|
||||
(PTR) &lowest_sect);
|
||||
|
||||
if (lowest_sect == NULL)
|
||||
(PTR) &lower_sect);
|
||||
if (lower_sect == NULL)
|
||||
warning ("no loadable sections found in added symbol-file %s",
|
||||
objfile->name);
|
||||
else if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE)
|
||||
== 0)
|
||||
warning ("Lowest section in %s is %s at %s",
|
||||
objfile->name,
|
||||
bfd_section_name (objfile->obfd, lower_sect),
|
||||
paddr (bfd_section_vma (objfile->obfd, lower_sect)));
|
||||
if (lower_sect != NULL)
|
||||
lower_offset = bfd_section_vma (objfile->obfd, lower_sect);
|
||||
else
|
||||
lower_offset = 0;
|
||||
|
||||
/* Calculate offsets for the loadable sections.
|
||||
FIXME! Sections must be in order of increasing loadable section
|
||||
so that contiguous sections can use the lower-offset!!!
|
||||
|
||||
Adjust offsets if the segments are not contiguous.
|
||||
If the section is contiguous, its offset should be set to
|
||||
the offset of the highest loadable section lower than it
|
||||
(the loadable section directly below it in memory).
|
||||
this_offset = lower_offset = lower_addr - lower_orig_addr */
|
||||
|
||||
if (lowest_sect)
|
||||
addr -= bfd_section_vma (objfile->obfd, lowest_sect);
|
||||
/* FIXME: These sections will not need special treatment because ALL
|
||||
sections are in the other sections table */
|
||||
|
||||
if (addrs->text_addr != 0)
|
||||
{
|
||||
sect = bfd_get_section_by_name (objfile->obfd, ".text");
|
||||
if (sect)
|
||||
{
|
||||
addrs->text_addr -= bfd_section_vma (objfile->obfd, sect);
|
||||
lower_offset = addrs->text_addr;
|
||||
}
|
||||
}
|
||||
else
|
||||
/* ??? who's below me? */
|
||||
addrs->text_addr = lower_offset;
|
||||
|
||||
if (addrs->data_addr != 0)
|
||||
{
|
||||
sect = bfd_get_section_by_name (objfile->obfd, ".data");
|
||||
if (sect)
|
||||
{
|
||||
addrs->data_addr -= bfd_section_vma (objfile->obfd, sect);
|
||||
lower_offset = addrs->data_addr;
|
||||
}
|
||||
}
|
||||
else
|
||||
addrs->data_addr = lower_offset;
|
||||
|
||||
if (addrs->bss_addr != 0)
|
||||
{
|
||||
sect = bfd_get_section_by_name (objfile->obfd, ".bss");
|
||||
if (sect)
|
||||
{
|
||||
addrs->bss_addr -= bfd_section_vma (objfile->obfd, sect);
|
||||
lower_offset = addrs->bss_addr;
|
||||
}
|
||||
}
|
||||
else
|
||||
addrs->bss_addr = lower_offset;
|
||||
|
||||
/* Now calculate offsets for other sections. */
|
||||
for (i=0 ; i < MAX_SECTIONS && addrs->other[i].name; i++)
|
||||
{
|
||||
|
||||
if (addrs->other[i].addr != 0)
|
||||
{
|
||||
sect=bfd_get_section_by_name(objfile->obfd, addrs->other[i].name);
|
||||
if (sect)
|
||||
{
|
||||
addrs->other[i].addr -= bfd_section_vma (objfile->obfd, sect);
|
||||
lower_offset = addrs->other[i].addr;
|
||||
addrs->other[i].sectindex = sect->index ;
|
||||
}
|
||||
else
|
||||
{
|
||||
warning ("section %s not found in %s", addrs->other[i].name,
|
||||
objfile->name);
|
||||
addrs->other[i].addr = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
addrs->other[i].addr = lower_offset;
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize symbol reading routines for this objfile, allow complaints to
|
||||
@ -560,7 +691,7 @@ syms_from_objfile (objfile, addr, mainline, verbo)
|
||||
(*objfile->sf->sym_init) (objfile);
|
||||
clear_complaints (1, verbo);
|
||||
|
||||
(*objfile->sf->sym_offsets) (objfile, addr);
|
||||
(*objfile->sf->sym_offsets) (objfile, addrs);
|
||||
|
||||
#ifndef IBM6000_TARGET
|
||||
/* This is a SVR4/SunOS specific hack, I think. In any event, it
|
||||
@ -581,17 +712,36 @@ syms_from_objfile (objfile, addr, mainline, verbo)
|
||||
These should probably all be collapsed into some target
|
||||
independent form of shared library support. FIXME. */
|
||||
|
||||
if (addr)
|
||||
if (addrs)
|
||||
{
|
||||
struct obj_section *s;
|
||||
|
||||
/* Map section offsets in "addr" back to the object's
|
||||
sections by comparing the section names with bfd's
|
||||
section names. Then adjust the section address by
|
||||
the offset. */ /* for gdb/13815 */
|
||||
|
||||
ALL_OBJFILE_OSECTIONS (objfile, s)
|
||||
{
|
||||
CORE_ADDR s_addr = 0;
|
||||
int i;
|
||||
|
||||
if (strcmp (s->the_bfd_section->name, ".text") == 0)
|
||||
s_addr = addrs->text_addr;
|
||||
else if (strcmp (s->the_bfd_section->name, ".data") == 0)
|
||||
s_addr = addrs->data_addr;
|
||||
else if (strcmp (s->the_bfd_section->name, ".bss") == 0)
|
||||
s_addr = addrs->bss_addr;
|
||||
else
|
||||
for (i = 0; !s_addr && addrs->other[i].name; i++)
|
||||
if (strcmp (s->the_bfd_section->name, addrs->other[i].name) == 0)
|
||||
s_addr = addrs->other[i].addr; /* end added for gdb/13815 */
|
||||
|
||||
s->addr -= s->offset;
|
||||
s->addr += addr;
|
||||
s->addr += s_addr;
|
||||
s->endaddr -= s->offset;
|
||||
s->endaddr += addr;
|
||||
s->offset += addr;
|
||||
s->endaddr += s_addr;
|
||||
s->offset += s_addr;
|
||||
}
|
||||
}
|
||||
#endif /* not IBM6000_TARGET */
|
||||
@ -680,13 +830,12 @@ new_symfile_objfile (objfile, mainline, verbo)
|
||||
Upon failure, jumps back to command level (never returns). */
|
||||
|
||||
struct objfile *
|
||||
symbol_file_add (name, from_tty, addr, mainline, mapped, readnow, user_loaded, is_solib)
|
||||
symbol_file_add (name, from_tty, addrs, mainline, flags, user_loaded, is_solib)
|
||||
char *name;
|
||||
int from_tty;
|
||||
CORE_ADDR addr;
|
||||
struct section_addr_info *addrs;
|
||||
int mainline;
|
||||
int mapped;
|
||||
int readnow;
|
||||
int flags;
|
||||
int user_loaded;
|
||||
int is_solib;
|
||||
{
|
||||
@ -705,7 +854,7 @@ symbol_file_add (name, from_tty, addr, mainline, mapped, readnow, user_loaded, i
|
||||
&& !query ("Load new symbol table from \"%s\"? ", name))
|
||||
error ("Not confirmed.");
|
||||
|
||||
objfile = allocate_objfile (abfd, mapped, user_loaded, is_solib);
|
||||
objfile = allocate_objfile (abfd, flags & OBJF_MAPPED, user_loaded, is_solib);
|
||||
|
||||
/* If the objfile uses a mapped symbol file, and we have a psymtab for
|
||||
it, then skip reading any symbols at this time. */
|
||||
@ -741,7 +890,7 @@ symbol_file_add (name, from_tty, addr, mainline, mapped, readnow, user_loaded, i
|
||||
gdb_flush (gdb_stdout);
|
||||
}
|
||||
}
|
||||
syms_from_objfile (objfile, addr, mainline, from_tty);
|
||||
syms_from_objfile (objfile, addrs, mainline, from_tty);
|
||||
}
|
||||
|
||||
/* We now have at least a partial symbol table. Check to see if the
|
||||
@ -749,7 +898,7 @@ symbol_file_add (name, from_tty, addr, mainline, mapped, readnow, user_loaded, i
|
||||
the gdb startup command line or on a per symbol file basis. Expand
|
||||
all partial symbol tables for this objfile if so. */
|
||||
|
||||
if (readnow || readnow_symbol_files)
|
||||
if ((flags & OBJF_READNOW) || readnow_symbol_files)
|
||||
{
|
||||
if (from_tty || info_verbose)
|
||||
{
|
||||
@ -803,8 +952,7 @@ symbol_file_command (args, from_tty)
|
||||
char *name = NULL;
|
||||
CORE_ADDR text_relocation = 0; /* text_relocation */
|
||||
struct cleanup *cleanups;
|
||||
int mapped = 0;
|
||||
int readnow = 0;
|
||||
int flags = 0;
|
||||
|
||||
dont_repeat ();
|
||||
|
||||
@ -845,11 +993,11 @@ symbol_file_command (args, from_tty)
|
||||
{
|
||||
if (STREQ (*argv, "-mapped"))
|
||||
{
|
||||
mapped = 1;
|
||||
flags |= OBJF_MAPPED;
|
||||
}
|
||||
else if (STREQ (*argv, "-readnow"))
|
||||
{
|
||||
readnow = 1;
|
||||
flags |= OBJF_READNOW;
|
||||
}
|
||||
else if (**argv == '-')
|
||||
{
|
||||
@ -875,15 +1023,20 @@ symbol_file_command (args, from_tty)
|
||||
return;
|
||||
else if (text_relocation == (CORE_ADDR) -1)
|
||||
{
|
||||
symbol_file_add (name, from_tty, (CORE_ADDR) 0,
|
||||
1, mapped, readnow, 1, 0);
|
||||
symbol_file_add (name, from_tty, NULL,
|
||||
1, flags, 1, 0);
|
||||
#ifdef HPUXHPPA
|
||||
RESET_HP_UX_GLOBALS ();
|
||||
#endif
|
||||
}
|
||||
else
|
||||
symbol_file_add (name, from_tty, (CORE_ADDR) text_relocation,
|
||||
0, mapped, readnow, 1, 0);
|
||||
{
|
||||
struct section_addr_info section_addrs;
|
||||
memset (§ion_addrs, 0, sizeof (section_addrs));
|
||||
section_addrs.text_addr = (CORE_ADDR) text_relocation;
|
||||
symbol_file_add (name, from_tty, §ion_addrs,
|
||||
0, flags, 1, 0);
|
||||
}
|
||||
|
||||
/* Getting new symbols may change our opinion about what is
|
||||
frameless. */
|
||||
@ -1233,9 +1386,20 @@ add_symbol_file_command (args, from_tty)
|
||||
{
|
||||
char *name = NULL;
|
||||
CORE_ADDR text_addr;
|
||||
int flags = 0;
|
||||
char *arg;
|
||||
int readnow = 0;
|
||||
int mapped = 0;
|
||||
int expecting_option = 0;
|
||||
int option_index = 0;
|
||||
int argcnt = 0;
|
||||
int sec_num = 0;
|
||||
int i;
|
||||
struct
|
||||
{
|
||||
enum { OPT_SECTION } type;
|
||||
char *name;
|
||||
char *value;
|
||||
} opt[SECT_OFF_MAX];
|
||||
struct section_addr_info section_addrs;
|
||||
|
||||
dont_repeat ();
|
||||
|
||||
@ -1249,9 +1413,12 @@ add_symbol_file_command (args, from_tty)
|
||||
args = strdup (args);
|
||||
make_cleanup (free, args);
|
||||
|
||||
/* Ensure section_addrs is initialized */
|
||||
memset (§ion_addrs, 0, sizeof (section_addrs));
|
||||
|
||||
/* Pick off any -option args and the file name. */
|
||||
|
||||
while ((*args != '\000') && (name == NULL))
|
||||
while (*args != '\000')
|
||||
{
|
||||
while (isspace (*args))
|
||||
{
|
||||
@ -1268,26 +1435,66 @@ add_symbol_file_command (args, from_tty)
|
||||
}
|
||||
if (*arg != '-')
|
||||
{
|
||||
name = arg;
|
||||
if (expecting_option)
|
||||
{
|
||||
opt[option_index++].value = arg;
|
||||
expecting_option = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (argcnt)
|
||||
{
|
||||
case 0:
|
||||
name = arg;
|
||||
break;
|
||||
case 1:
|
||||
opt[option_index].type = OPT_SECTION;
|
||||
opt[option_index].name = ".text";
|
||||
opt[option_index++].value = arg;
|
||||
break;
|
||||
case 2:
|
||||
opt[option_index].type = OPT_SECTION;
|
||||
opt[option_index].name = ".data";
|
||||
opt[option_index++].value = arg;
|
||||
break;
|
||||
case 3:
|
||||
opt[option_index].type = OPT_SECTION;
|
||||
opt[option_index].name = ".bss";
|
||||
opt[option_index++].value = arg;
|
||||
break;
|
||||
default:
|
||||
warning ("Too many arguments entered; see \"help add-symbol-file\" for command syntax.");
|
||||
}
|
||||
argcnt++;
|
||||
}
|
||||
}
|
||||
else if (STREQ (arg, "-mapped"))
|
||||
{
|
||||
mapped = 1;
|
||||
flags |= OBJF_MAPPED;
|
||||
}
|
||||
else if (STREQ (arg, "-readnow"))
|
||||
{
|
||||
readnow = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
error ("unknown option `%s'", arg);
|
||||
flags |= OBJF_READNOW;
|
||||
}
|
||||
else if (STREQN (arg, "-T", 2))
|
||||
{
|
||||
if (option_index >= SECT_OFF_MAX)
|
||||
{
|
||||
warning ("Number of options exceeds maximum allowed.");
|
||||
}
|
||||
else
|
||||
{
|
||||
expecting_option = 1;
|
||||
opt[option_index].type = OPT_SECTION;
|
||||
opt[option_index].name = arg + 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
error ("Unknown option `%s'", arg);
|
||||
}
|
||||
}
|
||||
|
||||
/* After picking off any options and the file name, args should be
|
||||
left pointing at the remainder of the command line, which should
|
||||
be the address expression to evaluate. */
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
error ("add-symbol-file takes a file name");
|
||||
@ -1295,24 +1502,77 @@ add_symbol_file_command (args, from_tty)
|
||||
name = tilde_expand (name);
|
||||
make_cleanup (free, name);
|
||||
|
||||
if (*args != '\000')
|
||||
if (option_index > 0)
|
||||
{
|
||||
text_addr = parse_and_eval_address (args);
|
||||
/* Print the prompt for the query below.
|
||||
We have to split this up into 3 print statements because
|
||||
local_hex_string returns a local static string. */
|
||||
|
||||
printf_filtered ("add symbol table from file \"%s\" at\n", name);
|
||||
for (i = 0; i < option_index; i++)
|
||||
{
|
||||
switch (opt[i].type)
|
||||
{
|
||||
case OPT_SECTION:
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
char *val = opt[i].value;
|
||||
char *sec = opt[i].name;
|
||||
|
||||
val = opt[i].value;
|
||||
if (val[0] == '0' && val[1] == 'x')
|
||||
addr = strtoul (val+2, NULL, 16);
|
||||
else
|
||||
addr = strtoul (val, NULL, 10);
|
||||
|
||||
if (strcmp (sec, ".text") == 0)
|
||||
section_addrs.text_addr = addr;
|
||||
else if (strcmp (sec, ".data") == 0)
|
||||
section_addrs.data_addr = addr;
|
||||
else if (strcmp (sec, ".bss") == 0)
|
||||
section_addrs.bss_addr = addr;
|
||||
/* Add the section to the others even if it is a
|
||||
text data or bss section. This is redundent but
|
||||
eventually, none will be given special treatment */
|
||||
{
|
||||
section_addrs.other[sec_num].name = strdup (sec);
|
||||
make_cleanup (free, section_addrs.other[sec_num].name);
|
||||
section_addrs.other[sec_num++].addr = addr;
|
||||
printf_filtered ("\t%s_addr = %s\n",
|
||||
sec,
|
||||
local_hex_string ((unsigned long)addr));
|
||||
}
|
||||
|
||||
/* The object's sections are initialized when a
|
||||
call is made to build_objfile_section_table (objfile).
|
||||
This happens in reread_symbols.
|
||||
At this point, we don't know what file type this is,
|
||||
so we can't determine what section names are valid. */
|
||||
}
|
||||
break;
|
||||
default:
|
||||
complain (&unknown_option_complaint, opt[i].name);
|
||||
}
|
||||
}
|
||||
/* Eventually, these hard coded names will be obsolete */
|
||||
/* All the addresses will be on the others section */
|
||||
}
|
||||
else
|
||||
{
|
||||
target_link (name, &text_addr);
|
||||
CORE_ADDR text_addr;
|
||||
target_link (name, &text_addr);
|
||||
if (text_addr == (CORE_ADDR) -1)
|
||||
error ("Don't know how to get text start location for this file");
|
||||
error("Don't know how to get text start location for this file");
|
||||
section_addrs.text_addr = text_addr;
|
||||
section_addrs.data_addr = 0;
|
||||
section_addrs.bss_addr = 0;
|
||||
printf_filtered("add symbol table from file \"%s\" at text_addr = %s?\n",
|
||||
name, local_hex_string ((unsigned long)text_addr));
|
||||
}
|
||||
|
||||
/* FIXME-32x64: Assumes text_addr fits in a long. */
|
||||
if ((from_tty)
|
||||
&& (!query ("add symbol table from file \"%s\" at text_addr = %s?\n",
|
||||
name, local_hex_string ((unsigned long) text_addr))))
|
||||
if (from_tty && (!query ("%s", "")))
|
||||
error ("Not confirmed.");
|
||||
|
||||
symbol_file_add (name, from_tty, text_addr, 0, mapped, readnow,
|
||||
symbol_file_add (name, from_tty, §ion_addrs, 0, flags,
|
||||
1, /* user_loaded */
|
||||
0); /* We'll guess it's ! is_solib */
|
||||
|
||||
@ -2978,9 +3238,13 @@ to execute.", &cmdlist);
|
||||
c->completer = filename_completer;
|
||||
|
||||
c = add_cmd ("add-symbol-file", class_files, add_symbol_file_command,
|
||||
"Usage: add-symbol-file FILE ADDR\n\
|
||||
"Usage: add-symbol-file FILE ADDR [DATA_ADDR [BSS_ADDR]]\n\
|
||||
or: add-symbol-file FILE -T<SECT> <SECT_ADDR> -T<SECT> <SECT_ADDR> ...\n\
|
||||
Load the symbols from FILE, assuming FILE has been dynamically loaded.\n\
|
||||
ADDR is the starting address of the file's text.",
|
||||
ADDR is the starting address of the file's text.\n\
|
||||
The optional arguments, DATA_ADDR and BSS_ADDR, should be specified\n\
|
||||
if the data and bss segments are not contiguous with the text.\n\
|
||||
For complicated cases, SECT is a section name to be loaded at SECT_ADDR.",
|
||||
&cmdlist);
|
||||
c->completer = filename_completer;
|
||||
|
||||
|
@ -99,7 +99,7 @@ struct sym_fns
|
||||
a string, where NULL means the default, and others are parsed in a file
|
||||
dependent way. */
|
||||
|
||||
void (*sym_offsets) PARAMS ((struct objfile *, CORE_ADDR));
|
||||
void (*sym_offsets) PARAMS ((struct objfile *, struct section_addr_info *));
|
||||
|
||||
/* Finds the next struct sym_fns. They are allocated and initialized
|
||||
in whatever module implements the functions pointed to; an
|
||||
@ -113,7 +113,7 @@ struct sym_fns
|
||||
do anything special. */
|
||||
|
||||
extern void
|
||||
default_symfile_offsets PARAMS ((struct objfile * objfile, CORE_ADDR addr));
|
||||
default_symfile_offsets PARAMS ((struct objfile * objfile, struct section_addr_info *));
|
||||
|
||||
|
||||
extern void
|
||||
@ -158,7 +158,7 @@ extern void
|
||||
init_entry_point_info PARAMS ((struct objfile *));
|
||||
|
||||
extern void
|
||||
syms_from_objfile PARAMS ((struct objfile *, CORE_ADDR, int, int));
|
||||
syms_from_objfile PARAMS ((struct objfile *, struct section_addr_info *, int, int));
|
||||
|
||||
extern void
|
||||
new_symfile_objfile PARAMS ((struct objfile *, int, int));
|
||||
|
22
gdb/symtab.h
22
gdb/symtab.h
@ -826,6 +826,26 @@ struct section_offsets
|
||||
(sizeof (struct section_offsets) \
|
||||
+ sizeof (((struct section_offsets *) 0)->offsets) * (SECT_OFF_MAX-1))
|
||||
|
||||
/* Define an array of addresses to accommodate non-contiguous dynamic
|
||||
loading of modules. This is for use when entering commands, so we
|
||||
can keep track of the section names until we read the file and
|
||||
can map them to bfd sections. */
|
||||
|
||||
#define MAX_SECTIONS 12
|
||||
struct section_addr_info
|
||||
{
|
||||
/* Sections whose names are always known to gdb. */
|
||||
CORE_ADDR text_addr;
|
||||
CORE_ADDR data_addr;
|
||||
CORE_ADDR bss_addr;
|
||||
/* Sections whose names are file format dependant. */
|
||||
struct other_sections
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
char *name;
|
||||
int sectindex;
|
||||
} other[MAX_SECTIONS];
|
||||
};
|
||||
|
||||
/* Each source file or header is represented by a struct symtab.
|
||||
These objects are chained through the `next' field. */
|
||||
@ -1399,7 +1419,7 @@ extern void
|
||||
clear_solib PARAMS ((void));
|
||||
|
||||
extern struct objfile *
|
||||
symbol_file_add PARAMS ((char *, int, CORE_ADDR, int, int, int, int, int));
|
||||
symbol_file_add PARAMS ((char *, int, struct section_addr_info *, int, int, int, int));
|
||||
|
||||
/* source.c */
|
||||
|
||||
|
@ -452,7 +452,7 @@ cleanup_target (t)
|
||||
de_fault (to_core_file_to_sym_file, (char *(*)PARAMS ((char *))) return_zero);
|
||||
de_fault (to_can_async_p, (int (*) (void)) return_zero);
|
||||
de_fault (to_is_async_p, (int (*) (void)) return_zero);
|
||||
de_fault (to_async, (void (*) (void (*) (int, void*, int), void*)) tcomplain);
|
||||
de_fault (to_async, (void (*) (void (*) (enum inferior_event_type, void*), void*)) tcomplain);
|
||||
#undef de_fault
|
||||
}
|
||||
|
||||
@ -1009,7 +1009,7 @@ target_link (modname, t_reloc)
|
||||
error ("Unable to link to %s and get relocation in rombug", modname);
|
||||
}
|
||||
else
|
||||
*t_reloc = (CORE_ADDR) - 1;
|
||||
*t_reloc = (CORE_ADDR) -1;
|
||||
}
|
||||
|
||||
/* Look through the list of possible targets for a target that can
|
||||
|
19
gdb/target.h
19
gdb/target.h
@ -264,6 +264,23 @@ struct target_waitstatus
|
||||
value;
|
||||
};
|
||||
|
||||
/* Possible types of events that the inferior handler will have to
|
||||
deal with. */
|
||||
enum inferior_event_type
|
||||
{
|
||||
/* There is a request to quit the inferior, abandon it. */
|
||||
INF_QUIT_REQ,
|
||||
/* Process a normal inferior event which will result in target_wait
|
||||
being called. */
|
||||
INF_REG_EVENT,
|
||||
/* Deal with an error on the inferior. */
|
||||
INF_ERROR,
|
||||
/* We are called because a timer went off. */
|
||||
INF_TIMER,
|
||||
/* We are called to do stuff after the inferior stops. */
|
||||
INF_EXEC_COMPLETE
|
||||
};
|
||||
|
||||
/* Return the string for a signal. */
|
||||
extern char *target_signal_to_string PARAMS ((enum target_signal));
|
||||
|
||||
@ -404,7 +421,7 @@ struct target_ops
|
||||
/* ASYNC target controls */
|
||||
int (*to_can_async_p) (void);
|
||||
int (*to_is_async_p) (void);
|
||||
void (*to_async) (void (*cb) (int error, void *context, int fd), void *context);
|
||||
void (*to_async) (void (*cb) (enum inferior_event_type, void *context), void *context);
|
||||
int to_magic;
|
||||
/* Need sub-structure for target machine related rather than comm related? */
|
||||
};
|
||||
|
@ -1,3 +1,15 @@
|
||||
1999-10-01 Kevin Buettner <kevinb@cygnus.com>
|
||||
|
||||
* gdb.base/break.c (main): Added a statement that we can step
|
||||
off of.
|
||||
* gdb.base/break.exp: Added tests for setting a breakpoint
|
||||
at an offset and stepping onto a breakpoint.
|
||||
|
||||
1999-10-01 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* gdb.base/help.exp (help add-symbol-file): Update to match current
|
||||
gdb output.
|
||||
|
||||
1999-09-18 Jim Blandy <jimb@cris.red-bean.com>
|
||||
|
||||
* gdb.base/break.exp: Code locations are in hex, don't forget!
|
||||
|
@ -82,7 +82,8 @@ char *argv[], **envp;
|
||||
marker2 (43);
|
||||
marker3 ("stack", "trace");
|
||||
marker4 (177601976L);
|
||||
return 0;
|
||||
argc = (argc == 12345); /* This is silly, but we can step off of it */
|
||||
return argc;
|
||||
}
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
|
@ -128,7 +128,7 @@ if {$hp_aCC_compiler} {
|
||||
gdb_test "info break" \
|
||||
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
|
||||
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
|
||||
\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:95.*
|
||||
\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:96.*
|
||||
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
|
||||
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
|
||||
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:85" \
|
||||
@ -180,16 +180,28 @@ gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*,
|
||||
# Run until the breakpoint set in a function in a file
|
||||
#
|
||||
for {set i 6} {$i >= 1} {incr i -1} {
|
||||
gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:95.*95\[\t \]+.*if .value > 1. \{.*" \
|
||||
gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:96.*96\[\t \]+.*if .value > 1. \{.*" \
|
||||
"run until file:function($i) breakpoint"
|
||||
}
|
||||
|
||||
#
|
||||
# run until the file:function breakpoint at a line number in a file
|
||||
#
|
||||
gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:85.*85\[\t \]+return 0;" \
|
||||
gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:85.*85\[\t \]+argc = \\(argc == 12345\\);.*" \
|
||||
"run until file:linenum breakpoint"
|
||||
|
||||
# Test break at offset +1
|
||||
|
||||
gdb_test "break +1" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line 86\\." \
|
||||
"breakpoint offset +1"
|
||||
|
||||
# Check to see if breakpoint is hit when stepped onto
|
||||
|
||||
gdb_test "step" \
|
||||
".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:86.*86\[\t \]+return argc;" \
|
||||
"step onto breakpoint"
|
||||
|
||||
#
|
||||
# delete all breakpoints so we can start over, course this can be a test too
|
||||
#
|
||||
@ -237,7 +249,7 @@ gdb_test "tbreak $srcfile:81" "Breakpoint.*at.* file .*$srcfile, line 81.*" "Te
|
||||
#
|
||||
gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
|
||||
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\]
|
||||
\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:95.*\[\r\n\]
|
||||
\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:96.*\[\r\n\]
|
||||
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:79.*\[\r\n\]
|
||||
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:75.*\[\r\n\]
|
||||
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:85.*\[\r\n\]
|
||||
|
@ -34,7 +34,7 @@ gdb_test "set height 400" "" "test set height"
|
||||
|
||||
# use a larger expect input buffer for long help outputs.
|
||||
# test help add-symbol-file
|
||||
gdb_test "help add-symbol-file" "Usage: add-symbol-file FILE ADDR.*\[\r\n\]+Load the symbols from FILE, assuming FILE has been dynamically loaded..*\[\r\n\]+ADDR is the starting address of the file\'s text." "help add-symbol-file"
|
||||
gdb_test "help add-symbol-file" "Usage: add-symbol-file FILE ADDR .*DATA_ADDR .*BSS_ADDR.*\[\r\n\]+or: add-symbol-file FILE -T<SECT> <SECT_ADDR> -T<SECT> <SECT_ADDR> ....*\[\r\n\]+Load the symbols from FILE, assuming FILE has been dynamically loaded..*\[\r\n\]+ADDR is the starting address of the file's text..*\[\r\n\]+The optional arguments, DATA_ADDR and BSS_ADDR, should be specified.*\[\r\n\]+if the data and bss segments are not contiguous with the text..*\[\r\n\]+For complicated cases, SECT is a section name to be loaded at SECT_ADDR." "help add-symbol-file"
|
||||
# test help aliases
|
||||
gdb_test "help aliases" "Aliases of other commands..*\[\r\n\]+List of commands\:.*\[\r\n\]+Type \"help\" followed by command name for full documentation..*\[\r\n\]+Command name abbreviations are allowed if unambiguous." "help aliases"
|
||||
gdb_test "help attach" "Attach to a process or file outside of GDB..*\[\r\n\]+This command attaches to another target, of the same type as your last.*\[\r\n\]+\"target\" command .\"info files\" will show your target stack.*\[\r\n\]+The command may take as argument a process id or a device file..*\[\r\n\]+For a process id, you must have permission to send the process a signal,.*\[\r\n\]+and it must have the same effective uid as the debugger..*\[\r\n\]+When using \"attach\" with a process id, the debugger finds the.*\[\r\n\]+program running in the process, looking first in the current working.*\[\r\n\]+directory, or .if not found there. using the source file search path.*\[\r\n\]+\\(see the \"directory\" command\\). You can also use the \"file\" command.*\[\r\n\]+to specify the program, and to load its symbol table." "help attach"
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "event-loop.h"
|
||||
|
||||
#include "event-top.h"
|
||||
#include "gdb_string.h"
|
||||
#include "gdb_stat.h"
|
||||
|
@ -353,9 +353,11 @@ register_addr (regno, blockend)
|
||||
|
||||
static struct core_fns ultra3_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
fetch_core_registers,
|
||||
NULL
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
void
|
||||
|
54
gdb/utils.c
54
gdb/utils.c
@ -21,7 +21,6 @@
|
||||
#include "defs.h"
|
||||
#include <ctype.h>
|
||||
#include "gdb_string.h"
|
||||
#include "event-loop.h"
|
||||
#include "event-top.h"
|
||||
|
||||
#ifdef HAVE_CURSES_H
|
||||
@ -53,6 +52,10 @@
|
||||
|
||||
void (*error_begin_hook) PARAMS ((void));
|
||||
|
||||
/* Holds the last error message issued by gdb */
|
||||
|
||||
static GDB_FILE *gdb_lasterr;
|
||||
|
||||
/* Prototypes for local functions */
|
||||
|
||||
static void vfprintf_maybe_filtered PARAMS ((GDB_FILE *, const char *,
|
||||
@ -516,11 +519,37 @@ error (const char *string,...)
|
||||
error_begin ();
|
||||
vfprintf_filtered (gdb_stderr, string, args);
|
||||
fprintf_filtered (gdb_stderr, "\n");
|
||||
/* Save it as the last error as well (no newline) */
|
||||
gdb_file_rewind (gdb_lasterr);
|
||||
vfprintf_filtered (gdb_lasterr, string, args);
|
||||
va_end (args);
|
||||
return_to_top_level (RETURN_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/* Allows the error message to be passed on a stream buffer */
|
||||
|
||||
NORETURN void
|
||||
error_stream (GDB_FILE *stream)
|
||||
{
|
||||
error (gdb_file_get_strbuf (stream));
|
||||
}
|
||||
|
||||
/* Get the last error message issued by gdb */
|
||||
|
||||
char *
|
||||
error_last_message (void)
|
||||
{
|
||||
return (gdb_file_get_strbuf (gdb_lasterr));
|
||||
}
|
||||
|
||||
/* This is to be called by main() at the very beginning */
|
||||
|
||||
void
|
||||
error_init (void)
|
||||
{
|
||||
gdb_lasterr = tui_sfileopen (132);
|
||||
}
|
||||
|
||||
/* Print a message reporting an internal error. Ask the user if they
|
||||
want to continue, dump core, or just exit. */
|
||||
@ -1770,6 +1799,27 @@ tui_fileopen (stream)
|
||||
return file;
|
||||
}
|
||||
|
||||
struct gdb_file *
|
||||
tui_sfileopen (n)
|
||||
int n;
|
||||
{
|
||||
struct gdb_file *file = tui_file_new ();
|
||||
struct tui_stream *tmpstream = gdb_file_data (file);
|
||||
tmpstream->ts_streamtype = astring;
|
||||
tmpstream->ts_filestream = NULL;
|
||||
if (n > 0)
|
||||
{
|
||||
tmpstream->ts_strbuf = xmalloc ((n + 1) * sizeof (char));
|
||||
tmpstream->ts_strbuf[0] = '\0';
|
||||
}
|
||||
else
|
||||
/* Do not allocate the buffer now. The first time something is printed
|
||||
one will be allocated by gdb_file_adjust_strbuf() */
|
||||
tmpstream->ts_strbuf = NULL;
|
||||
tmpstream->ts_buflen = n;
|
||||
return file;
|
||||
}
|
||||
|
||||
static int
|
||||
tui_file_isatty (file)
|
||||
struct gdb_file *file;
|
||||
@ -1887,6 +1937,8 @@ tui_file_fputs (linebuffer, file)
|
||||
}
|
||||
}
|
||||
|
||||
/* DEPRECATED: Use tui_sfileopen() instead */
|
||||
|
||||
GDB_FILE *
|
||||
gdb_file_init_astring (n)
|
||||
int n;
|
||||
|
@ -325,7 +325,9 @@ handle_load_dll (PTR dummy)
|
||||
char *p, *dll_name = NULL;
|
||||
struct objfile *objfile;
|
||||
MEMORY_BASIC_INFORMATION minfo;
|
||||
struct section_addr_info section_addrs;
|
||||
|
||||
memset (§ion_addrs, 0, sizeof (section_addrs));
|
||||
dll_buf[0] = dll_buf[sizeof (dll_buf) - 1] = '\0';
|
||||
|
||||
/* The following code attempts to find the name of the dll by reading the
|
||||
@ -417,7 +419,8 @@ handle_load_dll (PTR dummy)
|
||||
FIXME: Is this the real reason that we need the 0x1000 ? */
|
||||
|
||||
printf_unfiltered ("%x:%s", event->lpBaseOfDll, dll_name);
|
||||
symbol_file_add (dll_name, 0, (int) event->lpBaseOfDll + 0x1000, 0, 0, 0, 0, 1);
|
||||
section_addrs.text_addr = (int) event->lpBaseOfDll + 0x1000;
|
||||
symbol_file_add (dll_name, 0, §ion_addrs, 0, 0, 0, 1);
|
||||
printf_unfiltered ("\n");
|
||||
|
||||
return 1;
|
||||
@ -887,7 +890,7 @@ child_create_inferior (exec_file, allargs, env)
|
||||
/* Ignore the first trap */
|
||||
child_wait (inferior_pid, &dummy);
|
||||
|
||||
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -224,7 +224,7 @@ static void
|
||||
xcoff_symfile_finish PARAMS ((struct objfile *));
|
||||
|
||||
static void
|
||||
xcoff_symfile_offsets PARAMS ((struct objfile *, CORE_ADDR));
|
||||
xcoff_symfile_offsets PARAMS ((struct objfile *, struct section_addr_info *addrs));
|
||||
|
||||
static void
|
||||
find_linenos PARAMS ((bfd *, sec_ptr, PTR));
|
||||
@ -2761,7 +2761,7 @@ xcoff_initial_scan (objfile, mainline)
|
||||
static void
|
||||
xcoff_symfile_offsets (objfile, addr)
|
||||
struct objfile *objfile;
|
||||
CORE_ADDR addr;
|
||||
struct section_addr_info *addrs;
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -114,7 +114,7 @@ solib_add (arg_string, from_tty, target)
|
||||
continue;
|
||||
}
|
||||
|
||||
syms_from_objfile (obj, 0, 0, 0);
|
||||
syms_from_objfile (obj, NULL, 0, 0);
|
||||
new_symfile_objfile (obj, 0, 0);
|
||||
vmap_symtab (vp, 0, 0);
|
||||
printf_unfiltered ("Done.\n");
|
||||
|
@ -1,3 +1,8 @@
|
||||
1999-09-29 Doug Evans <devans@casey.cygnus.com>
|
||||
|
||||
* configure.in: Configure the testsuite directory for thumb.
|
||||
* configure: Regenerate.
|
||||
|
||||
1999-07-16 Ben Elliston <bje@cygnus.com>
|
||||
|
||||
* configure.in: Configure the testsuite directory for arm.
|
||||
|
@ -1,3 +1,8 @@
|
||||
1999-09-29 Doug Evans <devans@casey.cygnus.com>
|
||||
|
||||
* armos.c (SWIWrite0): Send output to stdout instead of stderr.
|
||||
(ARMul_OSHandleSWI, case SWI_WriteC,AngelSWI_Reason_WriteC): Ditto.
|
||||
|
||||
Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* configure: Regenerated to track ../common/aclocal.m4 changes.
|
||||
|
@ -251,7 +251,7 @@ SWIWrite0 (ARMul_State *state, ARMword addr)
|
||||
struct OSblock* OSptr = (struct OSblock*) state->OSptr;
|
||||
|
||||
while ((temp = ARMul_ReadByte (state, addr++)) != 0)
|
||||
(void) fputc ((char) temp, stderr);
|
||||
(void) fputc ((char) temp, stdout);
|
||||
|
||||
OSptr->ErrorNo = errno;
|
||||
}
|
||||
@ -430,7 +430,7 @@ ARMul_OSHandleSWI (ARMul_State *state, ARMword number)
|
||||
}
|
||||
|
||||
case SWI_WriteC :
|
||||
(void)fputc((int)state->Reg[0],stderr) ;
|
||||
(void)fputc((int)state->Reg[0],stdout) ;
|
||||
OSptr->ErrorNo = errno ;
|
||||
return(TRUE) ;
|
||||
|
||||
@ -497,7 +497,7 @@ ARMul_OSHandleSWI (ARMul_State *state, ARMword number)
|
||||
return (TRUE);
|
||||
|
||||
case AngelSWI_Reason_WriteC:
|
||||
(void) fputc ((int) ARMul_ReadByte (state,addr), stderr);
|
||||
(void) fputc ((int) ARMul_ReadByte (state,addr), stdout);
|
||||
OSptr->ErrorNo = errno;
|
||||
return (TRUE);
|
||||
|
||||
|
@ -1,3 +1,12 @@
|
||||
1999-09-29 Doug Evans <devans@casey.cygnus.com>
|
||||
|
||||
* cgen-defs.h (sim_engine_invalid_insn): New arg `vpc'.
|
||||
Change type of result to SEM_PC.
|
||||
|
||||
Wed Sep 29 14:43:57 1999 Dave Brolley <brolley@cygnus.com>
|
||||
|
||||
* cgen-defs.h (sim_engine_invalid_insn): Now returns PC.
|
||||
|
||||
1999-09-25 Doug Evans <devans@casey.cygnus.com>
|
||||
|
||||
* cgen-ops.h (SUBWORD*): Delete cpu arg.
|
||||
|
@ -115,7 +115,7 @@ typedef enum {
|
||||
VIRTUAL_INSN_X_CHAIN= -4, VIRTUAL_INSN_X_CTI_CHAIN = -5
|
||||
} CGEN_INSN_VIRTUAL_TYPE;
|
||||
|
||||
/* Return non-zero if OPCODE is a virtual insn. */
|
||||
/* Return non-zero if CGEN_INSN* INSN is a virtual insn. */
|
||||
#define CGEN_INSN_VIRTUAL_P(insn) \
|
||||
CGEN_INSN_ATTR_VALUE ((insn), CGEN_INSN_VIRTUAL)
|
||||
|
||||
@ -177,7 +177,7 @@ extern CPU_INSN_NAME_FN cgen_insn_name;
|
||||
language [or suggest a better way]. */
|
||||
extern int cgen_cpu_max_extra_bytes (void);
|
||||
|
||||
/* Called to process an invalid instruction. */
|
||||
extern void sim_engine_invalid_insn (SIM_CPU *, IADDR);
|
||||
/* Target supplied routine to process an invalid instruction. */
|
||||
extern SEM_PC sim_engine_invalid_insn (SIM_CPU *, IADDR, SEM_PC);
|
||||
|
||||
#endif /* CGEN_DEFS_H */
|
||||
|
84
sim/configure
vendored
84
sim/configure
vendored
@ -30,6 +30,7 @@ program_suffix=NONE
|
||||
program_transform_name=s,x,x,
|
||||
silent=
|
||||
site=
|
||||
sitefile=
|
||||
srcdir=
|
||||
target=NONE
|
||||
verbose=
|
||||
@ -144,6 +145,7 @@ Configuration:
|
||||
--help print this message
|
||||
--no-create do not create output files
|
||||
--quiet, --silent do not print \`checking...' messages
|
||||
--site-file=FILE use FILE as the site file
|
||||
--version print the version of autoconf that created configure
|
||||
Directory and file names:
|
||||
--prefix=PREFIX install architecture-independent files in PREFIX
|
||||
@ -314,6 +316,11 @@ EOF
|
||||
-site=* | --site=* | --sit=*)
|
||||
site="$ac_optarg" ;;
|
||||
|
||||
-site-file | --site-file | --site-fil | --site-fi | --site-f)
|
||||
ac_prev=sitefile ;;
|
||||
-site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
|
||||
sitefile="$ac_optarg" ;;
|
||||
|
||||
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
|
||||
ac_prev=srcdir ;;
|
||||
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
||||
@ -479,12 +486,16 @@ fi
|
||||
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
|
||||
|
||||
# Prefer explicitly selected file to automatically selected ones.
|
||||
if test -z "$CONFIG_SITE"; then
|
||||
if test "x$prefix" != xNONE; then
|
||||
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
|
||||
else
|
||||
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
|
||||
if test -z "$sitefile"; then
|
||||
if test -z "$CONFIG_SITE"; then
|
||||
if test "x$prefix" != xNONE; then
|
||||
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
|
||||
else
|
||||
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
CONFIG_SITE="$sitefile"
|
||||
fi
|
||||
for ac_site_file in $CONFIG_SITE; do
|
||||
if test -r "$ac_site_file"; then
|
||||
@ -527,7 +538,7 @@ fi
|
||||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:531: checking for $ac_word" >&5
|
||||
echo "configure:542: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -557,7 +568,7 @@ if test -z "$CC"; then
|
||||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:561: checking for $ac_word" >&5
|
||||
echo "configure:572: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -608,7 +619,7 @@ fi
|
||||
# Extract the first word of "cl", so it can be a program name with args.
|
||||
set dummy cl; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:612: checking for $ac_word" >&5
|
||||
echo "configure:623: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -640,7 +651,7 @@ fi
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:644: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:655: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
@ -651,12 +662,12 @@ cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
|
||||
#line 655 "configure"
|
||||
#line 666 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
@ -682,12 +693,12 @@ if test $ac_cv_prog_cc_works = no; then
|
||||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:697: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:691: checking whether we are using GNU C" >&5
|
||||
echo "configure:702: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -696,7 +707,7 @@ else
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
@ -715,7 +726,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||
echo "configure:719: checking whether ${CC-cc} accepts -g" >&5
|
||||
echo "configure:730: checking whether ${CC-cc} accepts -g" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -777,7 +788,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
|
||||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||
# ./install, which can be erroneously created by make from ./install.sh.
|
||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||
echo "configure:781: checking for a BSD compatible install" >&5
|
||||
echo "configure:792: checking for a BSD compatible install" >&5
|
||||
if test -z "$INSTALL"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -836,7 +847,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||
echo "configure:840: checking host system type" >&5
|
||||
echo "configure:851: checking host system type" >&5
|
||||
|
||||
host_alias=$host
|
||||
case "$host_alias" in
|
||||
@ -857,7 +868,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
echo "$ac_t""$host" 1>&6
|
||||
|
||||
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||
echo "configure:861: checking build system type" >&5
|
||||
echo "configure:872: checking build system type" >&5
|
||||
|
||||
build_alias=$build
|
||||
case "$build_alias" in
|
||||
@ -883,7 +894,7 @@ fi
|
||||
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ar; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:887: checking for $ac_word" >&5
|
||||
echo "configure:898: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -915,7 +926,7 @@ fi
|
||||
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:919: checking for $ac_word" >&5
|
||||
echo "configure:930: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -947,7 +958,7 @@ if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:951: checking for $ac_word" >&5
|
||||
echo "configure:962: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1027,7 +1038,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||
echo "configure:1031: checking host system type" >&5
|
||||
echo "configure:1042: checking host system type" >&5
|
||||
|
||||
host_alias=$host
|
||||
case "$host_alias" in
|
||||
@ -1048,7 +1059,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
echo "$ac_t""$host" 1>&6
|
||||
|
||||
echo $ac_n "checking target system type""... $ac_c" 1>&6
|
||||
echo "configure:1052: checking target system type" >&5
|
||||
echo "configure:1063: checking target system type" >&5
|
||||
|
||||
target_alias=$target
|
||||
case "$target_alias" in
|
||||
@ -1066,7 +1077,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
echo "$ac_t""$target" 1>&6
|
||||
|
||||
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||
echo "configure:1070: checking build system type" >&5
|
||||
echo "configure:1081: checking build system type" >&5
|
||||
|
||||
build_alias=$build
|
||||
case "$build_alias" in
|
||||
@ -1110,7 +1121,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
|
||||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1114: checking for $ac_word" >&5
|
||||
echo "configure:1125: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1140,7 +1151,7 @@ if test -z "$CC"; then
|
||||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1144: checking for $ac_word" >&5
|
||||
echo "configure:1155: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1191,7 +1202,7 @@ fi
|
||||
# Extract the first word of "cl", so it can be a program name with args.
|
||||
set dummy cl; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1195: checking for $ac_word" >&5
|
||||
echo "configure:1206: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1223,7 +1234,7 @@ fi
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:1227: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:1238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
@ -1234,12 +1245,12 @@ cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
|
||||
#line 1238 "configure"
|
||||
#line 1249 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:1243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:1254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
@ -1265,12 +1276,12 @@ if test $ac_cv_prog_cc_works = no; then
|
||||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:1269: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:1280: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:1274: checking whether we are using GNU C" >&5
|
||||
echo "configure:1285: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1279,7 +1290,7 @@ else
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
@ -1298,7 +1309,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||
echo "configure:1302: checking whether ${CC-cc} accepts -g" >&5
|
||||
echo "configure:1313: checking whether ${CC-cc} accepts -g" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1336,7 +1347,7 @@ AR=${AR-ar}
|
||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1340: checking for $ac_word" >&5
|
||||
echo "configure:1351: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1397,12 +1408,11 @@ extra_subdirs=common
|
||||
# convention, else the table becomes a real mess to understand and maintain.
|
||||
|
||||
case "${target}" in
|
||||
arm*-*-*)
|
||||
arm*-*-* | thumb*-*-*)
|
||||
sim_target=arm
|
||||
extra_subdirs="${extra_subdirs} testsuite"
|
||||
;;
|
||||
strongarm*-*-*) sim_target=arm ;;
|
||||
thumb*-*-*) sim_target=arm ;;
|
||||
d10v-*-*) sim_target=d10v ;;
|
||||
d30v-*-*)
|
||||
sim_target=d30v
|
||||
|
@ -47,12 +47,11 @@ extra_subdirs=common
|
||||
# convention, else the table becomes a real mess to understand and maintain.
|
||||
|
||||
case "${target}" in
|
||||
arm*-*-*)
|
||||
arm*-*-* | thumb*-*-*)
|
||||
sim_target=arm
|
||||
extra_subdirs="${extra_subdirs} testsuite"
|
||||
;;
|
||||
strongarm*-*-*) sim_target=arm ;;
|
||||
thumb*-*-*) sim_target=arm ;;
|
||||
d10v-*-*) sim_target=d10v ;;
|
||||
d30v-*-*)
|
||||
sim_target=d30v
|
||||
|
@ -1,3 +1,13 @@
|
||||
1999-10-04 Doug Evans <devans@casey.cygnus.com>
|
||||
|
||||
* sem.c,sem-switch.c: Rebuild.
|
||||
* traps.c (sim_engine_invalid_insn): New arg `vpc'. Change type of
|
||||
result to SEM_PC. Return vpc.
|
||||
|
||||
Wed Sep 29 14:45:32 1999 Dave Brolley <brolley@cygnus.com>
|
||||
|
||||
* traps.c (sim_engine_invalid_insn): Return PC.
|
||||
|
||||
Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* configure: Regenerated to track ../common/aclocal.m4 changes.
|
||||
|
@ -270,13 +270,15 @@ SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case)
|
||||
vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
|
||||
|
||||
{
|
||||
#if WITH_SCACHE
|
||||
/* Update the recorded pc in the cpu state struct. */
|
||||
/* Update the recorded pc in the cpu state struct.
|
||||
Only necessary for WITH_SCACHE case, but to avoid the
|
||||
conditional compilation .... */
|
||||
SET_H_PC (pc);
|
||||
#endif
|
||||
sim_engine_invalid_insn (current_cpu, pc);
|
||||
sim_io_error (CPU_STATE (current_cpu), "invalid insn not handled\n");
|
||||
/* NOTREACHED */
|
||||
/* Virtual insns have zero size. Overwrite vpc with address of next insn
|
||||
using the default-insn-bitsize spec. When executing insns in parallel
|
||||
we may want to queue the fault and continue execution. */
|
||||
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
|
||||
vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
|
||||
}
|
||||
|
||||
#undef FLD
|
||||
@ -3390,7 +3392,7 @@ if (EQBI (GET_H_SBIT (), 0)) {
|
||||
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
|
||||
|
||||
{
|
||||
do { } while (0); /*nop*/
|
||||
((void) 0); /*nop*/
|
||||
}
|
||||
|
||||
#undef FLD
|
||||
@ -3406,7 +3408,7 @@ do { } while (0); /*nop*/
|
||||
IADDR UNUSED pc = abuf->addr;
|
||||
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
|
||||
|
||||
do { } while (0); /*nop*/
|
||||
((void) 0); /*nop*/
|
||||
|
||||
#undef FLD
|
||||
}
|
||||
@ -4509,7 +4511,7 @@ if (NOTBI (ORBI (CPU (h_cbit), CPU (h_zbit)))) {
|
||||
IADDR UNUSED pc = abuf->addr;
|
||||
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
|
||||
|
||||
do { } while (0); /*nop*/
|
||||
((void) 0); /*nop*/
|
||||
|
||||
#undef FLD
|
||||
}
|
||||
@ -4524,7 +4526,7 @@ do { } while (0); /*nop*/
|
||||
IADDR UNUSED pc = abuf->addr;
|
||||
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
|
||||
|
||||
do { } while (0); /*nop*/
|
||||
((void) 0); /*nop*/
|
||||
|
||||
#undef FLD
|
||||
}
|
||||
@ -4539,7 +4541,7 @@ do { } while (0); /*nop*/
|
||||
IADDR UNUSED pc = abuf->addr;
|
||||
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
|
||||
|
||||
do { } while (0); /*nop*/
|
||||
((void) 0); /*nop*/
|
||||
|
||||
#undef FLD
|
||||
}
|
||||
@ -4554,7 +4556,7 @@ do { } while (0); /*nop*/
|
||||
IADDR UNUSED pc = abuf->addr;
|
||||
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
|
||||
|
||||
do { } while (0); /*nop*/
|
||||
((void) 0); /*nop*/
|
||||
|
||||
#undef FLD
|
||||
}
|
||||
@ -4569,7 +4571,7 @@ do { } while (0); /*nop*/
|
||||
IADDR UNUSED pc = abuf->addr;
|
||||
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
|
||||
|
||||
do { } while (0); /*nop*/
|
||||
((void) 0); /*nop*/
|
||||
|
||||
#undef FLD
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user