aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
AgeCommit message (Collapse)AuthorFilesLines
1994-07-28 * Makefile.in (INSTALLED_LIBS, CLIBS, DEPFILES): Add support forStu Grossman1-186/+198
--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.
1994-05-13 gcc -Wall lint:Jim Kingdon1-3/+5
* breakpoint.c (watchpoint_check): Remove unused variable b. * stack.c (print_frame_info): Move sp and buf inside #if. * eval.c (evaluate_subexp): Remove unused variables pp, mangle_ptr, ptr, and mangle_tstr. * valarith.c (value_x_binop): Remove unused variables mangle_tstr and mangle_ptr. * symtab.c (lookup_symtab): Put variable copy inside #if. (decode_line_1): Put variable q1 inside #if 0. * target.h: Declare target_link. * infrun.c (wait_for_inferior): Remove unused variables signame. * remote.c (remote_resume): Remove unused variable name. * c-exp.y (parse_number): Parenthesize operand of shift. * dbxread.c (record_minimal_symbol): Parenthesize operand of && (this is a semantic change, the warning seems to have detected a bug). * dbxread.c (end_psymtab): Move variable p1 inside #if. * coffread.c: Move variable temptype inside #if. * ch-typeprint.c (chill_type_print_base): Remove unused variable name. * ch-valprint.c: #include typeprint.h and ch-lang.h. (chill_val_print): Remove unused variable in_range. (chill_val_print): Remove statement "length > TYPE_LENGTH (type);". (chill_val_print): Add default case for switch. * stabsread.h: Declare stabsect_build_psymtabs. * os9kread.c (read_minimal_symbols): Make this return void. (os9k_symfile_read): Remove unused variables stb_exist and val. (os9k_symfile_init): Remove unused variable val. (fill_sym): Remove unused variable id. (read_os9k_psymtab): Put variable back_to inside #if 0. Remove unused variable nsl. Remove unused variable symfile_bfd. #if 0 unused variables lbrac_unmatched_complaint and lbrac_mismatch_complaint. Remove declaration for non-existent function os9k_next_symbol_text. * annotate.c, annotate.h: New files, containing a function for each annotation which outputs it. * Move breakpoints_changed from breakpoint.c to annotate.c. * breakpoint.c, blockframe.c, infrun.c, cp-valprint.c, main.c, printcmd.c, source.c, stack.c, utils.c, valprint.c: Use annotate.c functions to output annotations. * Makefile.in (OBS): Add annotate.o.
1994-05-04 * valprint.c (print_longest): Clarify comment about use_local.Jim Kingdon1-4/+4
* printcmd.c, defs.h (print_address_numeric), callers in symmisc.c, symfile.c, stack.c, source.c, remote.c, infcmd.c, cp-valprint.c, core.c, ch-valprint.c, c-valprint.c, breakpoint.c, exec.c: New argument use_local. * source.c (identify_source_line): Use filtered output. Use print_address_numeric.
1994-04-27[Sharp eyes, Jim...]Stu Grossman1-3/+44
* remote.c: * (get_offsets): Temporary kludge to force data & bss sections to have the same relocation.
1994-04-11 * remote.c: Around redefinition of PBUFSIZE, adjust whitespace.Jim Kingdon1-1/+4
* 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.
1994-03-30* remote.c (getpkt): Remove unused "out" label.Jim Kingdon1-1/+0
1994-03-30 * remote.c (getpkt): If we get a timeout, actually retry ratherJim Kingdon1-6/+7
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.
1994-03-29 * remote.c (remote_store_registers): Add 'P' request to set anJim Kingdon1-20/+64
individual register. (remote_write_bytes, remote_read_bytes): Use %lx, not %x, to print a target address.
1994-03-21Mon Mar 21 11:02:51 1994 Stu Grossman (grossman at cygnus.com)Stu Grossman1-100/+66
* 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.
1994-03-19 * Makefile.in (TAGS): Use variables directly, rather than usingJim Kingdon1-26/+158
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.
1993-11-01Change the stream argument to _filtered to GDB_FILE *.Thomas Lord1-7/+7
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.
1993-10-30 * symfile.c (reread_symbols): When re-reading symbols, do all theJim Kingdon1-10/+6
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.
1993-10-22 * Makefile.in (init.c): Generate using the source, not munch. ThisJim Kingdon1-1/+3
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.
1993-10-21 * target.h: Put remote_debug declaration back here. Add baud_rate.Jim Kingdon1-4/+0
* 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.
1993-10-21 * main.c: Make baud_rate and remote_debug be global variables,Stu Grossman1-13/+17
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.
1993-10-08 * remote.c (remote_wait): Use strtoul for parsing 'N' message.Jim Kingdon1-3/+3
Add code to relocate symfile_objfile->sections.
1993-10-07* blockframe.c (find_pc_partial_function): Fix handling for PCsStu Grossman1-9/+79
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.
1993-09-21* remote.c, remote-utils.c: Use SERIAL_FLUSH_INPUT after opening it.Jim Kingdon1-0/+4
1993-09-21Add comment regarding section designation:Jim Kingdon1-1/+8
Mon Sep 6 15:43:25 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * remote.c (remote_wait): Added 'W' and 'N' responses.
1993-09-20* remote.c, remote-mips.c: Use sr_get_debug not remote_debug.Jim Kingdon1-12/+8
1993-09-14use remote-utils facilities for baud_rateK. Richard Pixley1-12/+4
1993-09-14 * remote.c: Define remote_debug to 0 and #if 0 baud_rate. TemporaryJim Kingdon1-3/+35
hack so this file compiles again. * remote-utils.c (gr_multi_scan): Cast return value from alloca. (gr_multi_scan): #if 0 never-reached return(-1).
1993-09-07 * remote.c (remote_wait): Don't call error. Instead, call warningIan Lance Taylor1-93/+102
inside a loop. User can ^C to get out.
1993-09-06 * remote.c (remote_wait): Added 'W' and 'N' responses.Ian Lance Taylor1-0/+69
1993-09-03 * dcache.c: Cast return value from xmalloc.Jim Kingdon1-2/+6
* remote.c: Move setting of immediate_quit from remote_open to remote_start_dummy and set it back to zero when done.
1993-09-01 * remote.c: Add comment explaining why dcache is disabled.Jim Kingdon1-3/+14
(remote_fetch_word, remote_store_word): Make static and #if 0. They are not called from anywhere.
1993-09-01break dcache code out of remote.cK. Richard Pixley1-207/+97
1993-07-14Tue Jul 13 14:03:48 1993 Jim Kingdon (kingdon@lioth.cygnus.com)Jim Kingdon1-28/+97
* 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.
1993-06-25add commentJim Kingdon1-0/+2
1993-06-25doc fixJim Kingdon1-1/+1
1993-06-25 * remote.c: Move comments regarding packets to top of file with theJim Kingdon1-26/+28
rest of the protocol comments. Fix incorrect description of 'T' response.
1993-06-08 * symfile.{c,h} (generic_load): New function.Jim Kingdon1-29/+56
remote{,-nindy,-eb,-mips}.c: Use it.
1993-04-28 * remote.c: Change timeout to 2.Jim Kingdon1-169/+94
(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.
1993-02-18* remote.c (readchar): forward declare alarm which otherwise looksK. Richard Pixley1-0/+4
like an undeclared variable to gcc.
1993-02-16* remote.c: Improve error recovery. Allow user to break outJohn Gilmore1-24/+81
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.
1992-10-03Changes to make 29k function calls work better at Adobe.John Gilmore1-2/+4
* 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.
1992-09-18Remove convert_{to,from}_virtual members from target structs.John Gilmore1-10/+17
1992-08-15* sparc-stub.c: New file. Mix it with your SPARCliteStu Grossman1-8/+19
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,
1992-08-05* remote.c (getpkt): Only force retransmission ten times;John Gilmore1-2/+13
after that, assume bug in target code, and handle pkt anyway.
1992-06-25* dbxread.c (dbx_symfile_init): Move more code under hp9000s800Stu Grossman1-1/+1
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.
1992-06-24 * Makefile.in (VERSION): Bump to 4.5.6.Fred Fish1-2/+4
* 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().
1992-06-19* remote.c (getpkt): Error if input exceeds buffer size.John Gilmore1-15/+69
(_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.
1992-03-03Tue Mar 3 15:11:52 1992 Michael Tiemann (tiemann@cygnus.com)Michael Tiemann1-3/+2
* 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.)
1992-02-28* remote.c: Make it work for embedded MIPS. Increase bufferJohn Gilmore1-71/+229
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.
1991-05-04Saber C (lint) cleanups, and a few bug fixes. See ChangeLog.John Gilmore1-2/+1
1991-05-04See ChangeLog.John Gilmore1-2/+0
1991-05-02The list of changes is too long to fit in the cvs log (since it truncates!).Jim Kingdon1-6/+13
Look at the ChangeLog for Apr 30 and May 1.
1991-04-24 * remote.c (getpkt): Don't set immediate_quit.Jim Kingdon1-0/+14
1991-04-20 * findvar.c (read_register_gen): Add "target byte-order" comment.Jim Kingdon1-1/+4
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("?");
1991-04-19 * target.h: Add to_doc and target_preopen.Jim Kingdon1-0/+4
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.