* serial.c (_initialize_serial): Add a description of
"set remotelogbase".
* command.c (do_setshow_command): If no arguments are supplied,
don't dump core, instead print out an error message.
Changes to OCD support to support wiggler box as well as
target boxes:
* ocd.c: change speed in init command to 0 from 80,
add (temporary) logging commands to help debugging,
(ocd_open): if "target ocd wiggler lpt" then use special
ser-ocd.c serial interface which communicates with Wigglers.dll,
otherwise do as we did before
(ocd_get_packet): add OCD_LOG_FILE and OCD_SET_CONNECTION to
switch of known commands of len 0
* ocd.h: add OCD_LOG_FILE
* serial.c (serial_open): do serial_interface_lookup on ocd
in the case of ocd
* ser-ocd.c: add buffer to contain responses from sending a
command to the Wigglers.dll.
(ocd_readchar): return curr char from buffer and increment ptr
(ocd_write): send buffer to Wigglers.dll, storing response in
return buffer and initializing curr location ptr to start of
buffer.
that directory.
* defs.h utils.c (error warning): Make message be const.
* main.c (fputs_unfiltered): Only send gdb_stdout and gdb_stderr
to hook. Otherwise send it to fputs.
* monitor.c monitor.h (monitor_get_dev_name): New function. Does
the obvious.
* remote-e7000.c: Remove debugify stuff. Change printf, fprintf
to _filtered forms to make output appear in GUIs. Replace all
uses of SERIAL_READCHAR with readchar, which has better error
checking.
* (e7000_parse_device): Add prototype.
* (readchar): Improve doc. Handle random serial errors.
* (expect): Disable notice_quit code. It's busted. Remove
serial error handling (it's now handled in readchar). Remove
remote_debug echoing. That's handled in readchar as well.
* (e7000_parse_device): Remove serial_flag arg. It's not
necessary.
* (e7000_open): Split into two pieces. Second part is
e7000_start_remote, and is error protected. Now, when we connect
to the target, we setup the initial frame and registers so that
the user gets an immediate indication of where the target is.
* (gch): Remove debug output. That's handled by readchar.
* (e7000_read_inferior_memory): Handle errors better.
* (_initialize_remote_e7000): Get rid of `<xxx>' things from
command names. They show up when doing completion and confuse
things horribly.
* ser-e7kpc.c: Remove the last seven months of brain damage. Get
rid of the DLL's since we can access the device directly from Win32s
and Win95. Get rid of debugify crud.
* serial.c: Remove debugify cruft.
* (serial_logchar serial_log_command serial_write serial_readchar
serial_send_break serial_close): Merge common functionality into
serial_logchar. Clean up rest of routines.
* sparclet-rom.c: Disembowel. Leave only download routine.
Download routine now switches to remote target automatically.
* top.c (disconnect): Only define if SIGHUP is defined. Cleans
up MSVC/Win32 problem.
* utils.c (gdb_flush): Don't call hook unless it's for gdb_stdout
or gdb_stderr.
* config/sh/tm-sh.h: Define TARGET_SH for WinGDB.
* config/sparc/tm-sparclet.h: Remove override for prompt.
Add prototypes for make_final_cleanup (and the other cleanup
routines.
* remote-e7000.c: Fix sync code to timeout if unable to sync.
Change sync code to report status while trying to sync-up
with hardware. Add debugging output and document.
* ser-e7kpc.c: Swap order of len & offset to match implementation.
Add debugging output and document.
* serial.c: Add debugging output.
* top.c: Add call to do_final_cleanups.
Remove conditionals preventing Win32 from getting SIGQUIT.
* utils.c: (*_cleanup): Modify cleanup routines to accept a cleanup
chain as a parameter. Extract this generic code from the cleanup
routines into separate funtions (*_my_cleanup). Keep old
functionality by passing "cleanup_chain" to the new funtions.
Define the cleanup chain "final_cleanup_chain" to be a cleanup
chain which will be executed only when gdb exits. Add functions
(*_final_cleanup) to match the original (*_cleanup) functions.
(pollquit, quit, notice_quit): Fix to read cntl-C from the
Windows message queue.
mswin/libwingdb.a and remote-wiggler.o.
* breakpoint.c (breakpoint_here_p): Clean up bp enabled test.
* (breakpoint_inserted_here_p): New func, just like
breakpoint_here_p, except it's honest. Honestly.
* breakpoint.h: Proto for above.
start-sanitize-gdbtk
* configure configure.in: Add host *windows* to list of hosts
that don't support GDBtk.
end-sanitize-gdbtk
* configure configure.in: Add mswin to configdirs if host is
i[3456]86-*-windows.
* core-aout.c (fetch_core_registers register_addr) gdbcore.h:
Change all vars that can contain addresses to type CORE_ADDR.
* findvar.c (supply_register): Allow val to be NULL. This means
that regno is unsupported.
* (read_pc read_pc_pid write_pc write_pc_pid): Make non-pid forms
just call pid forms with inferior_pid so that there's only once
place to hack PC's and such.
* infrun.c (proceed): Don't skip breakpoints if user changed PC.
* remote-wiggler.c: New file. Support for BDM interface from
Macraigor Systems.
* serial.c: Enhance serial logging capability. Add hex and octal
output modes (set remotelogbase {hex|octal|ascii}. Also log
breaks, timeouts, errors, and eofs.
* serial.h: Redefine SERIAL_SEND_BREAK to go through a wrapper
function so that we can log breaks. Don't export serial_logfile
or serial_logfp.
* top.c (execute_command): Don't test for serial_logfp here.
Just call serial_log_comand, and let serial.c sort it out.
* valops.c (value_of_variable): Don't attempt to establish frames
for static and global variables. This makes things work a bit
better if the stack or frame pointer is trashed.
* config/m68k/monitor.mt (TDEPFILES): Add remote-wiggler.o.
* config/m68k/tm-m68k.h: Define STACK_ALIGN. CPU32 can't hack
misaligned stacks during function calls.
* config.in: Regenerate with autoheader.
* configure: Regenerate with autoconf.
* inflow.c (_initialize_inflow): Only try to use _SC_JOB_CONTROL
if it is actually defined.
(gdb_setpgid): Use HAVE_SETPGID.
* ch-exp.c: Change include of <string.h> to "gdb_string.h".
* c-exp.y: Ditto.
* f-exp.y: Ditto.
* m2-exp.y: Ditto.
* c-exp.y: Include <ctype.h>.
* serial.c: Ditto.
* config/m68k/nm-news.h: Add typedef for pid_t which is
apparently missing from <sys/types.h>. Enclose entire
file in NM_NEWS_H ifndef and define when included.
* config/mips/nm-news-mips.h: Ditto.
* config/m68k/tm-m68k.h (REGISTER_CONVERT_TO_VIRTUAL,
REGISTER_CONVERT_TO_RAW): Change name of temporary variable.
S-record download code into srec.c.
* srec.c srec.h: New files. Contain S-record loading routines
formerly in monitor.c.
* serial.c serial.h: New routine just like fprintf, but uses
serial_t instead of FILE *.
* sh-tdep.c (frame_find_saved_regs init_extra_frame_info):
Don't add four to saved pc (makes things match manual). Also, fix
bug where we didn't get pc from stack frame correctly.
* config/sh/tm-sh.h (SAVED_PC_AFTER_CALL): Don't add four to
saved pc. Real hardware does this for you.
* sh3-rom.c (sh3_load): New routine. Sets up for download then
calls generic S-record loader.
* config/h8300/h8300.mt, config/h8500/h8500.mt,
config/m68k/monitor.mt, config/pa/hppapro.mt, config/sh/sh.mt:
Add srec.o to TDEPFILES.
for `watchdog' variable. This allows the user to put an upper
limit on the amount of time that GDB will wait for the target to
return from a step or continue operation. This will primarily be
used for the testsuite, where it is difficult to come up with a
reasonable timeout for things like function calls, which can take
as long as three minutes under some circumstances. If the
watchdog timer expires, GDB will generate an error that looks like
`Watchdog has expired.', and will detach from the target.
* remote-mips.c (mips_open): Setup initial frame from target.
Print it out so that user is told where the program is stopped
when they attach.
* remote-nrom.c: Loads of cleanups. Use serial code to open
network connections. Use expect() to wait for response to
download command.
* ser-tcp.c (tcp_open): Retry connection if we get ECONNREFUSED.
* serial.c serial.h (serial_open serial_fdopen serial_close):
Allow users to open the same device multiple times. They all get
to share the same serial_t. This is about the only way to have
multiple active targets use the same device (for download and
debug).
* sparcl-tdep.c: Keep #include <unistd.h> away from GO32.
* target.c: Add `targetdebug' variable. If this is non-zero,
then a special target is put at the top of the target stack which
will cause all calls through the target vector to have their args
and results printed out.
bus interface.
* serial.c (serial_open): Notice device "pc".
* remote-e7000.c: Fix copyright date.
(expect): Compare \n and \r the same.
(e7000_open): Allow pc as a serial port
* sh/sh.mt: Add ser-e7kpc.
* h8300/h8300hms.mt: Add ser-e7kpc.
* main.c (proc_wait): Don't wait if using go32.
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.
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.
clarification. Also add prototypes for some new functions.
* (remote_wait): Better error reporting for 'T' responses.
* ser-go32.c (strncasecmp): Make str1 & str2 be const.
* (dos_async_init): Make usage message reflect requested port #.
* ser-tcp.c (tcp_open): Terminate hostname properly to prevent
random hostname lookup failures. Add nicer message for unknown
host error. (wait_for): Wake up in case of exceptions. Also,
restart select() if we got EINTR.
* ser-unix.c (wait_for): Restart select() if we got EINTR.
* serial.c: (serial_close): Clean up code.
* defs.h (memcmp): Add decl for memcmp to #ifndef MEM_FNS_DECLARED.
* findvar.c (write_register): See if we are writing back the same
value that's already in the register. If so, don't bother.
* remote.c (putpkt, getpkt): Improve handling of communication
problems.
* ser-go32.c: Prototype it to death. Update serial_ops and add
dummy routines where appropriate.
* ser-tcp.c: New module to implement serial I/O via TCP
connections.
* ser-unix.c: Clean up getting/setting of tty state. Get rid of
SERIAL_RESTORE, add SERIAL_{GET|SET}_TTY_STATE interfaces.
* serial.c: Add start of support for connect command.
(serial_open): Distinguish between tcp and local devices.
* serial.h (struct serial_ops): Get rid of restore, add
get_tty_state and set_tty_state. Define protoypes and macros for
this mess.
* gdbserver/remote-utils.c: Add tcp support. (readchar): Do
some real buffering. Handle error conditions gracefully.
* gdbserver/remote-inflow-sparc.c: Update to remote-inflow.c
(Lynx), remove lots of cruft.
(putpkt, getpkt): Use new return codes for SERIAL_READCHAR.
* ser-go32.c: Return -1 on most failures, 0 on most successes,
and use new return codes for go32_readchar().
* ser-unix.c: Ditto. Also, move error handling up to caller for
SERIAL_SETBAUDRATE().
* serial.c (serial_open): Internal call, not SERIAL_OPEN to get
to specific routine.
(serial_close): New routine to wrap around device close routine.
serial.h: Clean & document return values more clearly.
These implement a new serial line interface for talking to remote
targets.
* configure.in: Link ser-hardwire.c to ser-unix.c for all hosts,
EXCEPT go32, which gets ser-go32.c.
* remote.c: Use new serial interface. More remote-xxx's to be
converted later.
* ser-bsd.c, ser-termios.c: Removed.
* serial.c: New. Implements common operations for all serial
types.
* ser-unix.c: New. Unix specific serial operations for various
flavors of Unix (Posix, SysV, BSD).
* serial.h: Generic serial interface defs.
* config/i386/go32.mh, config/i386/i386bsd.h,
config/m68k/apollo68b.mh, config/sparc/sun4os4.mh: Remove
ser-bsd.o from XDEPFILES. All the magic is now handled in
configure.in.