* infrun.c (set/show scheduler-locking) New command. Set a
mode bit that will control how GDB attempts to control thread
scheduling for step, continue, etc. (resume): make use of
the schedule-locking mode.
* target.h (struct target_ops): new field to_has_thread_control.
* sol-thread.c: initialize target_ops to_has_thread_control.
* procfs.c: ditto.
* target.c: ditto.
* m3-nat.c: ditto.
* remote.c: ditto.
* hpux-thread.c: ditto.
to conform to standards, fix spelling errors.
(ishex, stubhex, record_currthread, etc): Declare.
(ishex, stubhex): Declare char arg as int.
(pack_string): Comment out, never used but possibly useful.
(threadref_to_int, remote_get_threadinfo, etc): Make static.
called from wait_for_inferior. Instead, if a new thread-id is
detected, call add_thread. (MAGIC_NULL_PID): new macro, use
instead of the magic number "42000". (remote_find_new_threads):
if inferior_pid is unknown, get and use the current thread id.
(remote_start_remote): on connecting, attempt to get the current
thread id for inferior_pid. (remote_resume): If pid == -1,
then resume any-thread (not the current thread specifically).
* thread.c (info_threads_command): don't initialize current_pid
until after call to FIND_NEW_THREADS (which may change inferior_pid).
[Support for trace debugging: registers that were not collected.]
* remote.c (remote_fetch_registers): accept 'xxxx' in the register
packet, with the meaning "register value is not available".
Set register_valid to -1, which will connote "no value available".
* findvar.c (read_relative_register_raw_bytes): return failure if
register_valid == -1. (value_of_register): return failure if
register_valid == -1. (read_var_value): return error if
value_of_register fails for a register variable.
(value_from_register): return failure if register_valid == -1.
* eval.c (evaluate_subexp_standard): return error if
value_of_register fails for a register used in an expression.
* infcmd.c (do_registers_info): display "value not available"
for registers for which register_valid == -1.
* tracepoint.c (set_raw_tracepoint): just save the filename as is
from the symbol table, rather than trying to prepend the dir name.
Also save the bfd section. (tracepoints_info): use the section
when looking up the function name.
* tracepoint.h: add section field to tracepoint struct.
* remote.c: merged.
- Jim Blandy <jimb@zwingli.cygnus.com>
(print_packet, remote_packet_command): New functions.
(_initialize_remote): Register the remote-packet command.
- David Taylor <taylor@texas.cygnus.com>
(_initialize_remote): remote-compare is now
compare-sections.
- Elena Zannoni <ezannoni@kwikemart.cygnus.com>
(remote_compare_command): added warning, issued in case
of mismatch only.
* remote.c (remote_compare_command): New function, new command.
Compare object file binary image with corresponding memory on
remote target. Report differences.
address.
* (remote_ops extended_remote_ops remote_desc remote_write_size):
Make static.
* (remote_fetch_registers remote_write_bytes remote_read_bytes):
Record size of response to fetch registers command, use this to
limit size of memory read and write commands.
* (push_remote_target): New function to make it possible to have
another target switch to the remote target.
* target.h: Add prototype for push_remote_target.
* sh-tdep.c (sh_frame_find_saved_regs): Fix sign extension bugs
for hosts which default to unsigned chars (such as SGI's).
* (_initialize_sh_tdep): Don't set remote_write_size. It's now
handled automatically in remote.c.
before testing against reg_ptr.
* eval.c (evaluate_subexp_standard): Cast type of
TYPE_FN_FIELD_VOFFSET to int.
* findvar.c (extract_signed_integer, extract_unsigned_integer,
extract_long_unsigned_integer): Cast type of sizeof to int.
* values.c (unpack_field_as_long, modify_field): Ditto.
* valops.c (value_assign, call_function_by_hand): Ditto.
* infcmd.c (do_registers_info): Ditto.
* ser-tcp.c (tcp_open): Ditto
* remote.c (putpkt): Ditto.
* dcache.c (dcache_peek): Ditto.
* dcache.c (dcache_poke): Ditto.
* m2-exp.y (yylex): Ditto.
* gnu-regex.c (re_match_2): Ditto.
* f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef
out unused macro definition and variables.
* inftarg.c (proc_wait): Move from main.c to here, and make static.
* valprint.c (val_print_string): Change bufsize from int to unsigned.
* main.c (wait.h): Include
* top.c (command_line_input): Remove unused variable "c".
* f-typeprint.c (f_type_print_varspec_prefix): Add missing enum
value TYPE_CODE_TYPEDEF to switch statement.
(f_type_print_varspec_suffix): Add missing enum value
TYPE_CODE_TYPEDEF to switch statement.
* ch-exp.c (parse_primval): Add remaining enumeration values to
switch statement, with no specific action.
(ch_lex): Add LOC_UNRESOLVED in switch statement.
(pushback_token): Ifdef out, since code using it is ifdef'd out.
* stabsread.c (cleanup_undefined_types): Remove unused label
"badtype".
* objfiles.h (print_symbol_bcache_statistics): Add prototype.
* maint.c (objfiles.h): Include.
(maintenance_print_statistics): Remove unused variable "temp".
* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
unused variable "found_file_symbol".
* m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch.
* language.c (lang_bool_type): Use existing function local type
variable rather than create block local variables.
* solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS.
* infptrace.c (wait.h, command.h): Include.
* ser-tcp.c (gdb_string.h): Include
* i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR.
(i386_get_frame_setup): Change "pc" from int to CORE_ADDR.
* command.c (complete_on_enum): Make assignment used as truth value
explictly check against NULL.
(wait.h): Include.
* infrun.c (wait_for_inferior): Ifdef out prologue_pc since code
that uses it is ifdef'd out.
* parser-defs.h: Add prototype for write_dollar_variable.
* infrun.c: Add prototype for write_pc_pid.
* breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs.
* symmisc.c (bcache.h): Include.
* bcache.h: Add prototype for print_bcache_statistics.
* symfile.c: Include <time.h>.
* printcmd.c (print_scalar_formatted): Change len to unsigned int.
* valarith.c (value_equal): Cast result of TYPE_LENGTH to int.
* valarith.c (value_binop): Change result_len, promoted_len1,
and promoted_len2 to unsigned int.
* valarith.c (value_subscripted_rvalue): Change elt_offs and
elt_size to unsigned int.
* valops.c (value_array): Change typelength to unsigned int.
(destructor_name_p): Change len to unsigned int.
* scm-lang.h (scm_parse): Add prototype for scm_unpack.
* symfile.c (decrement_reading_symtab): Change return type to void.
* valarith.c (value_subscript): Remove unused variable "word".
(value_subscript): Remove unused variable "tint".
* valops.c (auto_abandon): Ifdef out, since code using it is also
ifdef'd out.
* eval.c (init_array_element): Remove unused variable "val".
* Makefile.in (values.o): Depends on scm-lang.h.
(command.o): Depends upon wait_h.
(ser-tcp.o): Depends upon gdb_string.h.
(infptrace.o): Depends upon wait_h and command_h.
(maint.o): Depends on objfiles.h and symfile.h.
* values.c (allocate_repeat_value): Remove unused variable
"element_type".
(scm-lang.h): Include.
* breakpoint.c (create_longjmp_breakpoint): Enclose in
GET_LONGJMP_TARGET define, unused otherwise.
* config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint,
i386_remove_watchpoint and i386_stopped_by_watchpoint.
* gdbserver/low-linux.c: New file.
* remote.c (remote_read_bytes): Fix aborts on larger packets.
* config/i386/linux.mh (GDBSERVER_DEPFILES, GDBSERVER_LIBS):
Define.
* stabsread.c (define_symbol): If register value is too large,
tell what it is and what max is.
* monitor.c: Turn on caching.
(monitor_printf): If a ^C was sent, don't expect to see its
echo.
(monitor_open): Enable caching.
(monitor_resume, monitor_load): Flush cache.
(monitor_xfer_memory): Call cache routine.
(monitor_dump_regs): New.
(monitor_fetch_registers): If monitor_dump_regs available
then use it.
(monitor_load): Don't ref exec_bfd if it's NULL.
(monitor_load_srec): Use new monitor_make_srec calling convention.
(monitor_make_srec): Rewrite to cope with two, three and four byte
addresses.
* remote-hms.c (hms_cmds): Initialze end-of-command delim.
* dcache.h, dcache.h: Rewritten.
* remote.c: Reenable caching.
(getpkt): Reduce MAX_TRIES to 3.
(remote_xfer_memory): Use dcache_xfer_memory.
* defs.h (error_hook): New.
* top.c (error_hook): New definition.
* utils.c (error): Use error_hook if initialized.
* sparcl-tdep.c (HAVE_SOCKETS): Don't define if GO32 or WIN32. Use
HAVE_SOCKETS in place of #ifndef GO32.
match stubs and protocol spec.
* gdbserver/remote-utils.c (remote_open): Cast to struct sockaddr
when passing to function which expects that.
The following changes aren't quite enough to make things work with
LynxOS (apprently kernel problems).
* infrun.c (wait_for_inferior): When resuming new thread, pass pid
not -1 for remote case.
* thread.c (info_threads_command): Give error if !target_has_stack.
* infrun.c (start_remote): Call init_thread_list.
* thread.c (info_threads_command): Don't call kill for remote
debugging target.
* target.c (normal_pid_to_str): Print "thread" not "process" for
remote.
* remote.c, gdbserver/*: Add 'H', 'S', and 'C' requests, 'X'
response, and `thread' part of 'T' response.
* gdbserver/*: If program exits, send packet to GDB before
exiting. Handle termination with a signal the same as exiting
with an exitstatus.
* remote.c: Don't try to kill program after getting an 'X'
response.
* infrun.c (wait_for_inferior): Add comment about kill versus mourn.
--enable-xxx configure option by adding ENABLE_{CLIBS DEPFILES}
where appropriate.
* General hackery to support alternate user-interface.
* breakpoint.c (mention, delete_breakpoint, enable_breakpoint,
disable_breakpoint): Call hooks for alternate user-interface.
* defs.h: Add declarations for alternate user-interface hooks.
* main.c (main): Add --nw (and --nowindows) options to disable
the GUI.
* (near call to command_loop): Call command_loop_hook if set.
* (fputs_unfiltered): Call fputs_unfiltered_hook if set.
* stack.c: Call print_frame_info_listing_hook if set.
* top.c (gdb_init): Initialize targets.c and utils.c prior to
other files to make sure that calls to error and warning will
work. Call init_ui_hook after everything else.
* utils.c (query): Call query_hook if set.
* (gdb_flush): Call flush_hook if set.
* Change _initialize_utils to initialize_utils cuz we don't use
automatic initialization of utils.c anymore.
* Support for TK GUI.
* Makefile.in: Add rule for gdbtk.o.
* configure.in: Add support for --enable-gdbtk.
* gdbtk.c: New file. Contains support routines for TK interface.
* gdbtk.tcl: New file. Implements GUI policy.
* remote.c: Get rid of #ifdef DONT_USE_REMOTE. It's no longer
necessary.
* config/pa/tm-hppa.h (REGISTER_BYTES): Use 4 rather than
REGISTER_RAW_SIZE (1).
Together these changes work around a bug in HP's compiler. Both
seem to be necessary.
than just giving up the first time it happens.
* remote.c: Document sequence numbers.
(remote_store_registers): Change syntax of 'P' request so that it
never looks like a sequence number.
* alpha-tdep.c: Gobs of changes (many imported from mips-tdep) to
improve remote debugging efficiency. Also fixed problems with
doing function calls for programs with no entry points.
* infcmd.c (run_stack_dummy): Use CALL_DUMMY_ADDRESS instead of
entry_point_address.
* inferior.h (PC_IN_CALL_DUMMY): ditto.
* mdebugread.c (parse_symbol, parse_procedure, parse_external,
parse_lines): Pass section_offsets info to these routines so that
we can relocate symbol table entries upon readin.
* (psymtab_to_symtab_1): Set symtab->primary to tell
objfile_relocate to do relocations for our symbols.
* (ecoff_relocate_efi): New routine to relocate adr field of PDRs
(which hang off of the symbol table).
* Use prim_record_minimal_symbols_and_info instead of
prim_record_minimal_symbols to supply section info to make minimal
symbol relocations work.
* minsyms.c (prim_record_minimal_symbols_and_info): If section is
-1, try to deduce it from ms_type.
* objfiles.c (objfile_relocate): Use ALL_OBJFILE_SYMTABS where
appropriate. Handle relocation of MIPS_EFI symbols special. Also,
add code to relocate objfile->sections data structure.
* remote.c (get_offsets): Use new protocol message to acquire
section offsets from the target.
* (remote_wait): Get rid of relocation stuff. That's all handled
by objfile_relocate now.
* config/alpha/alpha-nw.mt (TM_FILE): Use tm-alphanw.h.
* config/alpha/tm-alpha.h: Define CALL_DUMMY_ADDRESS, and
VM_MIN_ADDRESS.
* config/alpha/tm-alphanw.h: DECR_PC_AFTER_BREAK=0, VM_MIN_ADDRESS=0.
find, to locate TM_FILE, XM_FILE, and NAT_FILE. This is faster
and means that these filenames no longer need be unique across all
the config/* directories.
* configure.in: Put the config/*/ into TM_FILE, etc.
* m68k-stub.c (computeSignal): Return SIGFPE, not SIGURG, for chk
and trapv exceptions.
* target.h (struct section_table), objfiles.h (struct obj_section):
Change name of field sec_ptr to the_bfd_section. More mnemonic
and avoids the (sort of, for the ptx compiler) name clash with
the name of the typedef.
* exec.c, xcoffexec.c, sparc-tdep.c, rs6000-nat.c, osfsolib.c,
solib.c, irix5-nat.c, objfiles.c, remote.c: Change users.
* utils.c: Include readline.h.
* Makefile.in (utils.o): Add dependency.
* remote.c (getpkt): Add support for run-length encoding.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.
Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')
Replaced calls to fopen for output to gdb_fopen.
Added sufficient goo to utils.c and defs.h to make the above work.
The net effect is that stdio output functions are only directly used
in utils.c. Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.
In the near future, GDB_FILE will stop being equivalant to FILE.
The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior. The testsuite doesn't notice anything
like this, though.
Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code. All output from commands
should go to a GDB_FILE.
Target-specific code can still use stdio directly to communicate with
targets.
right operations ourself, rather than calling symbol_file_command.
If we re-read something, call clear_symtab_users not just
breakpoint_re_set.
* objfiles.h, objfiles.c (build_objfile_section_table): No longer
static.
* symfile.c (clear_symtab_users): Call clear_pc_function_cache.
* coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c, paread.c
(*_symfile_offsets): Set objfile->num_sections.
* remote.c (remote_wait), symfile.c (syms_from_objfile):
Don't muck with objfile->num_sections now that all the symbol
readers set it.
* elfread.c: Clean up obsolete comment about handling only DWARF.
* paread.c: Remove comment about how we should use an "ordinary"
file format with an hppa suffix. There is nothing ordinary about SOM.
cleans up all kinds of hassles (which nm to use in munch, etc). The
new formatting conventions (mostly already followed) are that
the name of the _initialize_* routines must start in column zero,
and must not be inside #if.
* munch: Removed.
* Makefile.in: Remove references to munch.
* serial.c, remote.c, infptrace.c, maint.c, convex-tdep.c,
alpha-tdep.c, hp300ux-nat.c, hppab-nat.c, osfsolib.c, remote-es.c,
procfs.c, remote-udi.c, ser-go32.c, ultra3-xdep.c, sh-tdep.c,
i960-tdep.c, hppa-tdep.c, h8500-tdep.c, dpx2-nat.c, delta68-nat.c,
z8k-tdep.c: Make sure the above conventions are followed. Make
sure they are all declared as returning void. Clean up
miscellaneous comments and such.
* remote.c, remote-udi.c, remote-utils.h: Let target.h take care of
declaring these. Those random externs all over are error prone.
* Move "set remotebaud" from remote-utils.c to main.c to it applies
to remote.c as well.
* xcoffread.c (xcoff_symfile_read), coffread.c (coff_symfile_read):
Sort symtabs for this objfile only, not for all objfiles.
* symfile.c, symfile.h (sort_all_symtab_syms): Remove; no longer used.
remove #include "remote-utils.h". This makes it possible to build
GDB without remote-utils.c. Also, move setting of remote_debug
into main, so that all remote*.c files can use it (not just the
serial line ones). And, make baud_rate be an int.
* remote-udi.c: Change kiodebug to remote_debug.
* remote-utils.c: Move setting of baud rate and debug into main.c.
* remote-utils.h: Redefine sr_{get set}_debug and sr_{get set}_baud
to use baud_rate and remote_debug globals for compatibility.
* remote.c: Use remote_debug and baud_rate globals directly,
instead of sr_ functions, so that we don't need to load
remote-utils.c.
beyond the end of the last function in an objfile.
* coff-solib.c (coff_solib_add): Use BFD to get fields from .lib
section.
* infrun.c (wait_for_inferior): Modify test for subroutine entry
to include pc out of bounds of the previous function.
* remote.c (remote_wait): Use strtoul for parsing 'N' message.
Add code to relocate symfile_objfile->sections.
* stabsread.c (define_symbol): Make the caddr_t hack apply to `function
returning foo' as well as `pointer to foo'.
* remote.c [REMOTE_BREAKPOINT]: Use for breakpoint insn if defined.
* config/m68k/tm-m68k.h: Define it.
* mem-break.c, breakpoint.c: Improve comments.
Tue Jul 13 13:35:31 1993 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr)
* config/m68k/tm-dpx2.h: Replace "tm-68k.h" with "m68k/tm-m68k.h".
* config/m68k/xm-dpx2.h: Define HAVE_TERMIOS not HAVE_TERMIO.
(remote_open): Use unpush_target not remote_close.
(remote_resume): If siggnal != 0, give warning not error().
(remote_wait, remote_interrupt, remote_interrupt_twice):
If we get two interrupts, let the user get out if they want.
(remote_{kill,mourn}): New functions.
i386-stub.c (handle_exception, case 'k'): Don't BREAKPOINT.
of initial connection attempt with INTERRUPT. Treat a timeout
while waiting for remote packet like a retry, unless the remote
side is actively running user code. Fix a few long printf_filtered's.
* xcoffread.c (read_xcoff_symtab): Don't use null symbol name for
trampoline symbols.
* buildsym.c (start_subfile): Allow null file name.
* am29k-tdep.c (_initialize_29k): Make it possible for the
user to set and query the address where function calls into the
inferior write a small scratch routine. `set call_scratch_address'
* inferior.h (PC_IN_CALL_DUMMY): Fix fencepost error.
* remote.c (remote_prepare_to_store): Only fetch regs if they are
not already cached validly.
application, and it will speak GDB remote protocol!
* remote.c (remote_wait): Change 'T' (expedited reply) message to
deal with arbitrary registers. Needed for sparc-stub,
conditional.
* hppabsd-core.c: Don't include "param.h", include <sys/param.h>
instead.
* remote.c (remote_wait): Cast signal to void * to avoid warning
from busted HP compiler.
* coffread.c (coff_end_symtab): Cast 2nd arg of complain() to
correct type.
* defs.h (NORETURN): Define away for Lucid compiler.
* remote.c (remote_timer, remote_interrupt): Signal handlers
take one int arg.
* ser-termios.c (serial_write, serial_close): Return whatever
value the write/close call returns, rather than falling off end.
* inferior.h (PTRACE_ARG3_TYPE): Third arg to ptrace is int on
more systems than it is "char *". Define PTRACE_ARG3_TYPE to
default to int.
* infptrace.c, hppabsd-xdep.c, hppahpux-xdep.c, i386-xdep.c,
inferior.h (call_ptrace): Use PTRACE_ARG3_TYPE to declare type
of third arg.
* a68v-xdep.c, arm-xdep.c, convex-xdep.c, hp300ux-xdep.c, infrun.c,
m88k-xdep.c, mach386-xdep.c, mips-xdep.c, os68k-xdep.c, pyr-tdep.c,
pyr-xdep.c, rs6000-xdep.c, sparc-xdep.c, sun3-xdep.c, sun386-xdep.c,
symm-xdep.c, ultra3-xdep.c: Use PTRACE_ARG3_TYPE to cast ptrace
argument 3.
* sparc-xdep.c, a68v-xdep.c (fetch_inferior_registers,
store_inferior_registers): Supply missing fourth argument to
ptrace().
(_initialize_remote): `set remotedebug' enables packet trace.
* dbxread.c (process_one_symbol:N_FUN): GCC now produces relative
N_SLINE's, etc, just like Sun cc on Solaris2.
* am29k-tdep.c (read_register_stack, write_register_stack):
Change RSTACK_HIGH_ADDR to rstack_high_address, a user-settable
variable. Add `set' and `show' commands for it.
* doc/gdb.texinfo: Document it.
* eval.c: Avoid residue-by-zero when evaluating without side effects.
(Bug and fix found by Pierre Willard.)
* sparc-tdep.c: Clean up slightly for Solaris2.
* All GDB files that #include defs.h: Removed stdio.h.
(defs.h): #include stdio.h.
This has been tested by building GDBs for all targets hosted on Sun4.
None of the build problems were related to stdio.h inclusion. (n.b.
many configurations don't build for other reasons.)
size, and use throughout. Round buffer size up if too many regs.
Support baud rate setting and try for an 8-bit path. If
interrupted while waiting for target, send a ^C down the wire.
Avoid single-byte reads.
* tm-mips.h: Add more embedded-system registers to REGISTER_NAMES
and NUM_REGS.
* mips-xdep.h: Avoid the embedded regs when on Unix.
Wed Apr 17 17:09:48 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
* i386-tdep.c (i386_get_frame_setup): Use SWAP_TARGET_AND_HOST
before returning locals or slocals.
* i386-tdep.c (i386_follow_jump): Do not add data16 to pos in
call to codestream_seek; add one to pos if (and only if)
we are dealing with a jump with data16 == 1 (i.e. 0x66, 0xe9).
Mon Apr 15 12:04:32 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
* valops.c (call_function_by_hand): Put dummy1 in target order
before FIX_CALL_DUMMY.
* tm-i386v.h (FIX_CALL_DUMMY): Don't depend on host byte order.
Sun Apr 14 11:55:19 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
* valops.c (push_word): Add SWAP_TARGET_AND_HOST.
* remote.c (remote_open): Send '+' before calling putpkt().
* tm-i386v.h (REGISTER_VIRTUAL_TYPE): Return pointer to void,
not int, for pc, fp, and sp.
* remote.c (remote_open): Call start_remote after putpkt("?");
target.c: Add target_preopen and target_command.
Remove target_info.
(add_target): Call add_cmd and mess with targetlist->doc.
core.c, exec.c, remote-eb.c, remote-nindy.c, remote-vx.c,
remote-vx.68.c, inftarg.c, remote.c: Add doc field to target struct.
Call target_preopen from open routine.