Commit graph

121 commits

Author SHA1 Message Date
David Taylor
65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Geoffrey Noer
1798621bcf Thu Nov 19 13:14:57 1998 Geoffrey Noer <noer@cygnus.com>
* gdbtk-cmds.c: Can't start using new API names yet.  Switch
          back
        to calling cygwin32_ funcs until some time has passed...
        * gdbtk.c: Ditto.  Also, include sys/cygwin.h for Cygwin,
          instead
        of providing own proto.
1998-11-19 21:18:29 +00:00
Geoffrey Noer
d836385e11 Fri Nov 13 00:15:08 1998 Geoffrey Noer <noer@cygnus.com>
Changes to account for name change from cygwin32 to cygwin and
        clean up Win32-related ifdefs.

        * configure.tgt: check for cygwin* instead of cygwin32.
        New cygwin gdb_target variable loses the "32".
        * configure.host: check for cygwin* instead of cygwin32.
        New cygwin gdb_host variable loses the "32".
        * configure.in: test __CYGWIN__ instead of __CYGWIN32__,
        rename gdb_cv_os_cygwin32 variable to drop the "32".  Call
        AM_EXEEXT instead of AC_EXEEXT since that isn't in a released
        autoconf yet.
        * configure: regenerate.

        * main.c: drop "32" from cygwin_ funcs, include sys/cygwin.h
          where
        cygwin path conv protos live, instead of adding a proto here
          for
        them here.
        * {main.c, ser-tcp.c, ser-unix.c, top.c}: check __CYGWIN__
        instead of __CYGWIN32__.
        * source.c: thoughout, check _WIN32 instead of WIN32.

        * config/i386/cygwin32.mh: delete.
        * config/i386/cygwin.mh: new file, was cygwin32.mh.
        * config/i386/cygwin32.mt: delete.
        * config/i386/cygwin.mt: new file, was cygwin32.mt.
        * config/i386/tm-cygwin32.h: delete.
        * config/i386/tm-cygwin.h: new file, was tm-cygwin32.h.
        * config/i386/xm-cygwin32.h: delete.
        * config/i386/xm-cygwin.h: new file, was xm-cygwin32.h.
        * config/i386/xm-windows.h: #include xm-cygwin.h now.
        * config/powerpc/cygwin32.mh: delete.
        * config/powerpc/cygwin.mh: new file, was cygwin32.mh.
        * config/powerpc/cygwin32.mt: delete.
        * config/powerpc/cygwin.mt: new file, was cygwin32.mt.
        * config/powerpc/tm-cygwin32.h: delete.
        * config/powerpc/tm-cygwin.h: new file, was tm-cygwin32.h.
        * config/powerpc/xm-cygwin32.h: delete.
        * config/powerpc/xm-cygwin.h: new file, was xm-cygwin32.h.

        * rdi-share/aclocal.m4: regenerate with aclocal.
        * rdi-share/configure: regenerate with autoconf.
        * rdi-share/{host.h, hostchan.c, hostchan.h, serdrv.c,
        * serpardr.c,
        unixcomm.c}: check __CYGWIN__ instead of __CYGWIN32__.
1998-11-13 08:16:08 +00:00
Jim Ingham
2aae63977c Thu Nov 12 15:20:15 1998 Jim Ingham <jingham@cygnus.com>
* console.tcl (complete): I added the ability to pass from_tty
        from gdb_cmd to the underlying commands.  Pass 1 when the
	command is invoked from the console.

	* interface.tcl (gdbtk_tcl_tstart, gdbtk_tcl_tstop): Run the
	src window's do_tstop method rather than manipulating the
	widgets by hand.

	* src.tcl (build_win): Redo the packing so that the function
	combobox doesn't push all the other combo-boxes off the screen
	if it has a very long function name in it.

	* srcbar.tcl (do_tstop): Added a mode that just changes the
	GUI, which can be called from console hooks.

	* srctextwin.tcl: Fixed some bugs I introduced in setting
	breakpoints in the assembly & mixed mode windows.  Dropped
	the notion of joint breakpoint images for lines that have
	breakpoints of two separate types.  Too fragile.
        Also added the "dont_change_appearance" flag, used in the
	continue_to_here method to tell the GUI not to reflect the
	temporary disabling of all the breakpoints.

	* toolbar.tcl (insert_buttons): Added a little more error-checking.
Thu Nov 12 15:20:15 1998  Jim Ingham   <jingham@cygnus.com>

	* gdbtk-cmds.c (gdb_cmd): Added an optional second argument to the
	gdb_cmd, which is from_tty.  This is passed to the gdb command
	parser.  It is 0 by default, and the console window passes 1.

	* gdbtk-cmds.c: moved disassemble_from_exec from gdbtk.c to gdbtk-cmds.c
	with all the other link-var'ed variables

	* gdbtk-hooks.c (gdbtk_trace_find): Only run the hook functions if
	we are called from_tty.

	* gdbtk-hooks.c (gdbtk_trace_start_stop): Set the trace buttons
	from a trace_start_command callback rather than doing it as a
	special case in gdb_cmd.

	* tracepoint.c (tstart_command, tstop_command): Add call to
	trace_start_stop_hook here.
1998-11-13 00:31:39 +00:00
Jason Molenda
ad3b8c4a1a 1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid
        possible nested-if confusion.
        * breakpoint.c (breakpoint_here_p): Ditto.
        (breakpoint_inserted_here_p): Ditto.
        (breakpoint_thread_match): Ditto.

        * gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined.
        * gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability
        prototypes.

        * symtab.h: Add prototype for _initialize_source.
        * value.h: Add prototype for _initialize_value.

        * defs.h: Include sys/types.h or stddef.h to get size_t.
        (make_cleanup): Add make_cleanup_func typedef and switch to using
        a prototype for this function.
        (mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't
        using mmalloc.

        * ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c
        dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c
        infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c
        symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c:
        Cast parameters passed to make_cleanup to use the new
        make_cleanup_func typedef.


More warning cleanups.  There are still a bunch of places where the first
argument to make_cleanup is not cast to (make_cleanup_func); these are
either due to the function fitting the make_cleanup_func specification
already (e.g. free()) or they are in files that weren't compiled when
I did my make on a Linux native system.  Bwahahaha.  You can see them
like this:

grep make_cleanup\  * | grep -v make_cleanup_func

I'll surely go back and clean up the remaining suspicious calls in
GDB one of these days. :-)
1998-10-14 01:15:00 +00:00
Martin Hunt
4ff5d55a08 Sun Aug 30 00:49:18 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk-cmds.c (Gdbtk_Init): Link C variable gdb_context
	with tcl variable gdb_context_id.

	* gdbtk-hooks.c (gdbtk_context_change): Implement new hook called
	context_hook.  Called when threads change.

	* gdbtk.c: Initialize gdb_context.

	* gdbtk.h: Declare gdb_context.

	* infrun (wait_for_inferior): Call context_hook.

	* thread.c (thread_command): Call context_hook.

	* defs.h: Declare context_hook.
1998-08-30 07:53:29 +00:00
Drew Moseley
1dd251f99d Added a scope-level around the contents of an #ifdef in
gdbtk_cleanup() so that the variable declarations in there
would not be illegal in a C compilation.
1998-08-13 20:15:20 +00:00
Martin Hunt
6f5af15b07 Mon Jul 27 13:07:16 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c (gdbtk_call_command): Removed because it is now
	in gdbtk-hooks.c
	(null_routine): Removed.

	* gdbtk-hooks.c (tracepoint_notify): Fix sprintf to
	match number of arguments.

	* gdbtk-cmds.c (gdb_loc): When calling gdb_loc with an
	argument, call find_pc_line() to get a complete
	symtab_and_line struct.
1998-07-27 20:23:58 +00:00
Martin Hunt
4d14b2522a Sun Jul 19 02:11:45 1998 Martin M. Hunt <hunt@cygnus.com>
* symtab.c (decode_line_2): Instead of printing a prompt
	and calling command_line_input() without a prompt, just
	call it with the proper args.  This makes the GUI work too.

Sat Jul 18 12:28:39 1998  Martin M. Hunt  <hunt@cygnus.com>

	* gdbtk.c (gdbtk_cleanup): Add call to tcl function
	gdbtk_cleanup. We need this so the GUI gets to clean
	up no matter how GDB exits.
1998-07-19 09:33:34 +00:00
Jim Ingham
ca4e7e143d Wed Jul 1 11:07:21 1998 Jim Ingham <jingham@cygnus.com>
* main.tcl (gdbtk_preloop): Call gdbtk_idle on spec.  If there was an
        error in loading an executible specified on the command line,
	then the pre_add_symbol hook would have called gdbtk_busy but
        the corresponding call to gdbtk_idle would not have occured.

        Also changed some catch calls so they didn't use
        "catch {set foo [real_command]}"
	    but rather the more efficient:
	"catch {real_command} foo"

	* register.tcl: more catch cleanups
	* src.tcl: more catch cleanups
	* stack.tcl: more catch cleanups
	* target.tcl: more catch cleanups
	* tdump.tcl: more catch cleanups
	* variables.tcl: more catch cleanups
	* watch.tcl: more catch cleanups

	* gdbtk.c (gdbtk_init): Fixed a bug in the startup code on Windows
	that caused gdbtk not to find the share directory unless
	GDBTK_LIBRARY was set.

	* gdbtk.c: removed all the commands and hooks from this file so
	now it contains only the startup code.
 	* gdbtk_cmds.c: New file - this contains all the Tcl commands that
	gdb defines.  All the old commands were moved here, the
	string-based commands were converted to object commands, and the
	object-based commands were all converted to uniformly use the
	call_wrapper.  A new function, Gdbtk_Init was added to centralize
	initializing the gdb package.  Also added gdbtk as a package
	into gdbtk_interp.
	* gdbtk_hooks.c: New file - All the hooks were moved here, and a new
	function, gdbtk_add_hooks was added to centralize adding all these
	hook functions.  gdbtk_fputs was also modified to handle the new
	result_ptr structure.  See the comments in gdbtk.h for more
	details.
	* gdbtk.h: New file - this contains all the defines and globals
	shared by gdbtk.c, gdbtk_cmds.c & gdbtk_hooks.c
	* Makefile.in, configure.in & configure: mutatis mutandi for the
	new files.
1998-07-01 19:29:14 +00:00
Keith Seitz
7f6cb62ee6 * symtab.h (enum namespace): Add new namespaces FUNCTIONS_NAMESPACE,
TYPES_NAMESPACE, METHODS_NAMESPACE, and VARIABLES_NAMESPACE used by
        new search_symbols.
        Add prototype for search_symbols and free_search_symbols.

        * symtab.c (list_symbols): Rewrite to use new search_symbols.
        (file_matches): New helper function for search_symbols.
        (free_search_symbols): New function which frees data returned from
        search_symbols.
        (print_symbol_info): New helper function which prints info about a
        matched symbol to stdout. Extracted from old list_symbols.
        (print_msymbol_info): New helper function which prints info about
        a matched msymbol to stdout. Extracted from old list_symbols.
        (symtab_symbol_info): Extracted from old list_symbols.
        (variables_info): Use symtab_symbol_info.
        (functions_info): Use symtab_symbol_info.
        (types_info): Use symtab_symbol_info.
        (rbreak_command): Rewrite to use new search_symbols.

        * gdbtk.c: Change all references to static global "interp" to
        "gdbtk_interp" and export this global.
        (gdbtk_init): If gdbtk_source_filename is not NULL, source this file
        into the interpreter when it goes idle.
        Add new command "gdb_search".
        (gdb_search): New function which searches the symbol table.
        (gdbtk_test): New function called by main when the --tclcommand
        option is used.

        * main.c (main): Add a new option "--tclcommand" which is used
        by the testsuite to source a file into the interpreter when it
        goes idle.
1998-06-27 00:45:20 +00:00
Ron Unrau
36841840ec * symtab.c (find_line_pc): assumed that a PC of 0 is illegal.
Changed to pass PC as arg and return 1 if valid (0 otherwise).
          symtab.h: change prototype to match
          symtab.c (find_line_pc_range): use new interface
          breakpoint.c (resolve_sal_pc): ditto
          gdbtk.c (gdb_set_bp): ditto
1998-06-21 15:31:09 +00:00
Jim Ingham
0436459d40 Mon Jun 15 13:18:21 1998 Jim Ingham <jingham@cygnus.com>
* gdbtk.c (gdbtk_init): Add elements to the auto_path AS LIST
       ELEMENTS.  This allows gdbtk to work when installed in a directory
       which has a space in the path.  D. Moseley pointed out the bug.
1998-06-16 19:36:47 +00:00
Jim Ingham
51c5a1366f Tue Jun 9 15:27:09 1998 Jim Ingham <jingham@cygnus.com>
* gdbtk.c: Added hooks to run gdbtk under the TclPro debugger.
	To do this, build gdbtk with:

	    make CFLAGS="-g -DTCLPRO_DEBUGGER"

	Then set the environment variable TCLPRO_DEBUG_DIR to point to
	wherever you have installed the TclPro debugger.  Finally, in
	the Alpha of the TclPro Debugger, you have to start up the
	TclPro Debugger BEFORE you start gdbtk.  Unfortunately, the
	debugger does not understand Itcl 1.5 style classes...
	* .Sanitize: Sanitize out references to the TclPro debugger,
	since it is not yet released.
1998-06-09 22:33:46 +00:00
Keith Seitz
fadce6f696 * symfile.c (symbol_file_add): Always call the
pre/post_add_symbol_hooks.

	* gdbtk.c (gdb_get_vars_command): Return static variables and
	variables stored in registers.
1998-06-09 21:15:46 +00:00
Martin Hunt
aa3b21bfdc Fri Jun 5 00:16:22 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c (gdbtk_init): Change all references to
	GDBTK_IDE to IDE_ENABLED.
1998-06-05 07:13:27 +00:00
Martin Hunt
94a6f14fa4 Thu Jun 4 18:31:53 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c (gdbtk_init): Initialize tkTable.
1998-06-05 01:29:10 +00:00
Elena Zannoni
fed03c013d Thu Jun 4 10:15:03 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c: merged:

	- Elena Zannoni  <ezannoni@kwikemart.cygnus.com>
        (call_obj_wrapper): in case of error, copy the
        error message from the result to the error_string.
        (gdbtk_fputs): add comments.
        (gdb_actions_command): call validate_actionline when installing the
        tracepoint, to do the syntax checking of the actions for us.
        - Elena Zannoni  <ezannoni@kwikemart.cygnus.com>
        (gdb_get_trace_frame_num): new function to get the
        trace frame number from gdb.
        (gdbtk_init): added new command gdb_get_trace_frame_num.
        - Jim Blandy  <jimb@zwingli.cygnus.com>
        (struct wrapped_call_objs): Change the `func' member to
        be a Tcl_ObjCmdProc, not an Tcl_CmdProc, since it accepts a vector
        of objects as arguments.  Change the object vector to be const,
        since that's what all the users of this structure seem to expect.
        (call_obj_wrapper): Cast clientData properly before storing it in
        the wrapped_args structure.
1998-06-04 18:10:21 +00:00
Keith Seitz
4779296003 * main.c (main): Check for NULL from getenv on CYGWIN32.
* gdbtk.c (_initialize_gdbtk): Get rid of the console. Patch from
        Chris Faylor (cgf@cygnus.com).

        * configure.in: Link cygwin32 with subsystem console.

        * configure: Regenerated
1998-05-29 01:20:46 +00:00
Keith Seitz
21b3bc779c * ser-unix.c (wait_for): Do not reset timeout_remaining for cygwin32 so
that
        we can use this member to track real timeouts.
        (hardwire_readchar): Modify for cygwin32 so that we only ever use a real
        system timeout of one second. Track the "real" timeout as a series of th
ese
        one second timeouts.
        Call ui_loop_hook to keep the gui alive.

        * top.c: Define new hook for cygwin32, "ui_loop_hook".

        * gdbtk.c (gdbtk_init): Add ui_loop_hook for CygWin32 to work around
        update problems.
1998-05-24 21:05:12 +00:00
Elena Zannoni
cb43207965 Thu May 21 13:56:24 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c: reinserted the changes that were accidentally deleted:
        (_initialize_gdbtk): Use correct device names in
        cygwin-specific call (cosmetic change).
        (gdbtk_ignorable_warning): removed va_list parameter,
        which was unused.
        (_initialize_gdbtk): add cygwin32 specific code to
        allow `gdb -nw' to work when specified specified from a windows
        console-mode command line.

        * ChangeLog: moved Chris Faylor's comment to ChangeLog-gdbtk
1998-05-21 18:03:25 +00:00
Jim Ingham
b33b741a76 Wed May 13 11:12:58 1998 James Ingham <jingham@leda.cygnus.com>
* gdbtk.c: Fixed a goof in the definition of the gdb_get_args &
	gdb_get_locals Tcl commands.  Moved the previous ChangeLog entry
	from ChangeLog to ChangeLog-gdbtk...
1998-05-13 18:23:59 +00:00
Jim Ingham
ff62d31088 Tue May 12 12:03:16 1998 James Ingham <jingham@leda.cygnus.com>
* gdbtk.c: Add an object call wrapper for the new Tcl_Obj based
	commands.  This way the obj commands will also go through
	catch_errors.  This is just a bandaid while I rewrite the
	string-based commands to use the object format.
1998-05-12 19:03:56 +00:00
Christopher Faylor
dfe9d3099d Tue May 5 09:30:25 1998 Christopher Faylor <cgf@cygnus.com>
* gdbtk.c (_initialize_gdbtk): Use correct device names in
	cygwin-specific calls (cosmetic change).
1998-05-05 13:33:37 +00:00
Elena Zannoni
5eb2b01c91 Wed Apr 29 15:53:16 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c (gdbtk_ignorable_warning): removed va_list parameter,
        which was unused.
1998-04-30 16:20:17 +00:00
Christopher Faylor
ecb3e4a19d Wed Apr 22 21:17:35 1998 Christopher Faylor <cgf@cygnus.com>
* gdbtk.c (_initialize_gdbtk): add cygwin32 specific code to
      allow `gdb -nw' to work when specified specified from a windows
      console-mode command line.
1998-04-23 01:26:23 +00:00
Martin Hunt
d2a3ee23fb Mon Apr 13 16:17:52 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c (gdb_loadfile): Change fstat() call to stat().
	Needed because you can't convert a FILE* to an fd.
1998-04-13 23:18:21 +00:00
Elena Zannoni
e6e9507d63 Mon Apr 13 16:28:07 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* utils.c: (warning) added call to warning_hook

        * source.c: (find_source_lines) modified to call warning in case
        of source vs. executable time stamp mismatch. Simplified object
        file check. Initialized mtime to 0.

        * defs.h: added warning_hook prototype

        * top.c: added warning_hook prototype.

        * gdbtk.c: (perror_with_name_wrapper) new function to call
        perror_with_name safely.
        (gdb_loadfile) added source vs. executable time stamp check.
        (gdbtk_warning) new function to pass a warning message to the gui.
        (gdbtk_ignorable_warning) new function to pass a warning
        to the gui. Used only for the src. vs. exec check.
        (gdbtk_init) added warning_hook
        added include <sys/stat.h>
1998-04-13 21:54:22 +00:00
Keith Seitz
7234efcb53 * gdbtk.c (gdbtk_start_timer): Include on all platforms. Decrease
timer interval a little.
        (gdbtk_stop_timer): Include on all platforms.
        (gdbtk_wait): No more signals! Use a timer on all platforms to keep the
        GUI alive.
        (gdbtk_init): Remove FIOASYNC and all x_fd references. Now using timers
        on all platforms.
1998-04-13 20:05:15 +00:00
Jason Molenda
6da4c15f22 Fri Apr 10 15:48:10 1998 Jason Molenda (crash@bugshack.cygnus.com)
* gdbtk.c (gdb_listfiles): Allocate space for 'files' dynamically.


Harumph, my change got lost in the foundry->devo merge.
1998-04-10 22:49:13 +00:00
Martin Hunt
1a509d60c2 Thu Apr 9 14:20:59 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c (gdbtk_init): Remove redundant variable "IDE".
1998-04-09 22:03:19 +00:00
Keith Seitz
4350602ff5 * gdbtk.c (gdb_cmd): NEVER call the busy, update, and idle hooks. 1998-04-07 20:05:02 +00:00
Keith Seitz
390ca26a02 * gdbtk.c (gdb_loadfile): Don't use the return result from sprintf, whi
ch
        returns a char * under SunOS4.
1998-03-31 23:42:51 +00:00
Keith Seitz
c62a71b625 * gdbtk.c (gdb_get_tracepoint_info): Change formatting of address.
(tracepoint_exists): Remove code which confuses assembly traces.
1998-03-30 05:18:29 +00:00
Keith Seitz
0b7148e4f5 * gdbtk.c (gdb_cmd): If argc > 2, assume that the busy and idle hooks
should not be called.
1998-03-28 20:16:06 +00:00
Elena Zannoni
411589588a Thu Mar 26 22:29:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c: (gdb_trace_status) new function.
        (gdbtk_init) added command "gdb_is_tracing".
        (tracepoint_notify) added passcount information.

        * tracepoint.c (trace_status_command): Recognize a boolean return
        value from the stub to indicate whether trace experiment is
        running.  Export this value as a global state variable
        (trace_running_p) for use by the GUI. (from Michael Snyder)
        (trace_pass_command) added call to modify_tracepoint_hook.

        * tracepoint.h export trace_running_p
1998-03-27 03:36:27 +00:00
Martin Hunt
ed5fa7c345 Thu Mar 26 12:00:35 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c (gdbtk_fputs): Insert fencepost.
	(gdb_loc): Correct pc calculation.
	(gdb_immediate_command): Return if a load is in progress.
	(gdb_cmd): Return if a load is in progress.
	(target_stop_wrapper): New function.
	(gdb_stop): Call target_stop_wrapper.
	(x_event): Add fencepost and optimize load cancel check.
	(gdbtk_start_timer): Set up structs only once.
	(gdbtk_stop_timer): Just use preset structs to set timer parameters.
	(gdb_loadfile): If file cannot be loaded, return error message.
	(gdb_loadfile): Add space before tab so that lines without
	a '-' can later be changed to have one.
1998-03-26 20:24:19 +00:00
Elena Zannoni
e924e1625c Wed Mar 25 14:08:51 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c (gdbtk_pre_add_symbol): Use Tcl_merge to form Tcl commands.
1998-03-25 19:12:09 +00:00
Elena Zannoni
ac3dff67ad Mon Mar 23 13:41:39 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c (gdb_get_mem): Rewrite to fetch entire contents
        of the memory window at once.
1998-03-23 18:43:42 +00:00
Elena Zannoni
929db6e5e2 Sat Mar 21 19:34:49 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
merged changes from Foundry (list follows by file/author):

        - Tom Tromey  <tromey@cygnus.com>
        * Makefile.in (gdbres.o): New target.
        (WINDRES): New define.
        * configure: Rebuilt.
        * configure.in (WINDRES): Define.
        (CONFIG_OBS): Include gdbres.o on Windows.
        * gdbtool.ico: New file.
        * gdb.rc: New file.

        * ser-unix.c
        - Keith Seitz  <keiths@onions.cygnus.com>
        (wait_for): Don't reset the timeout_remaining for CYGWIN32,
        since we now effectively poll the serial port.
        Don't reset the current_timeout, either, since this member is used
        by hardwire_readchar to track the timeout and call the ui_loop_hook.
        (hardwire_readchar): Poll the serial port for Cygwin32. We timeout every
        second, update the UI, and loop around doing this until we have hit the real
        timeout or we get data or an error. This will allow the UI to stay active
        while gdb is "blocked" talking to the target.
        - Martin M. Hunt  <hunt@cygnus.com>
        (wait_for): Do reset current_timeout
        because it is only used to keep track of what the
        current timeout for the scb is.

        * top.c
        - Martin M. Hunt  <hunt@cygnus.com>
        (quit_confirm): Change exit message again
        for GUI.
        (pc_changed_hook): Add prototype.
        - Tom Tromey  <tromey@cygnus.com>
        (quit_confirm): Added missing `else'.
        (quit_confirm): Special-case message if init_ui_hook is
        set.

        * symtab.c
        - Martin M. Hunt  <hunt@cygnus.com>
        (find_pc_sect_line): If no symbol information
        is found, return correct pc anyway.
        (find_methods): Comment out an apparently
        bogus error message because it messes up Foundry.

        * serial.c
        - Martin M. Hunt  <hunt@cygnus.com>
        (_initialize_serial): Add a description of
        "set remotelogbase".

        * findvar.c
        - Martin M. Hunt  <hunt@cygnus.com>
        (write_register_gen): Add call to
        pc_changed_hook if the PC is being changed.

        * defs.h
        - Martin M. Hunt  <hunt@cygnus.com>
        (pc_changed_hook): Define.

        * command.c
        -  Martin M. Hunt  <hunt@cygnus.com>
        (do_setshow_command): If no arguments are supplied,
        don't dump core, instead print out an error message.

        * breakpoint.c
        - Martin M. Hunt  <hunt@cygnus.com>
        Make set_raw_breakpoint, set_breakpoint_count,
        and breakpoint_count non-static so they are accessible from
        gdbtk.c.
        (enable_breakpoint): Enable breakpoint
        with same disposition instead of changing all breakpoints
        to donttouch.

        * annotate.h
	- Keith Seitz  <keiths@onions.cygnus.com>
        Add declarations for annotation hooks.

        * annotate.c
	- Keith Seitz  <keiths@onions.cygnus.com>
        Add hooks: annotate_starting_hook, annotate_stopped_hook,
        annotate_signalled_hook, annotate_exited_hook.
        (annotate_starting): If hook exists, call it instead.
        (annotate_stopped): If hook exists, call it instead.
        (annotate_exited): If hook exists, call it instead.
        (annotate_signalled): If hook exists, call it instead.

Sat Mar 21 19:34:49 1998  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>

	Merged changes from Foundry: list follows by author:

	- Tom Tromey  <tromey@cygnus.com>

	* Makefile.in (gdbres.o): New target.
	(WINDRES): New define.
	* configure: Rebuilt.
	* configure.in (WINDRES): Define.
	(CONFIG_OBS): Include gdbres.o on Windows.
	* gdbtool.ico: New file.
	* gdb.rc: New file.
        * gdbtk.c (gdbtk_init): Call ide_create_messagebox_command.
	(gdbtk_cleanup): Call ide_interface_deregister_all.
	(gdbtk_init): Pass event handle to cleanup.
	(TclDebug): Use Tcl_Merge to construct command.
	(gdbtk_init): Call ide_create_cygwin_path_command.

        - Martin M. Hunt  <hunt@cygnus.com>

	* gdbtk.c (gdb_set_bp): Set addr_string for bp.
	(gdb_get_breakpoint_info): Demangle function
	names in breakpoint info.
	Include "demangle.h".
	(gdb_loc, gdb_listfuncs): Demangle C++
	function names.
	(gdb_set_bp): Properly quote filename to fix
	problems with spaces. Send pc back as a hex string.
	(gdb_listfuncs): Remove debugging line.
	 Turn off some debugging lines.
 	(breakpoint_notify): Return correct line number.
	(gdb_get_breakpoint_info): Return correct line number.
	(gdb_set_bp): New function to provide a better way to
	set breakpoints.
	(gdbtk_readline, gdbtk_readline_begin): Memory
	allocated by tcl needs to be freed by Tcl_Free().
	(find_file_in_dir): Deleted.
	(gdb_find_file_command): Call full_lookup_symtab().
	(gdb_listfuncs): Call full_lookup_symtab().
	(full_lookup_symtab): New function.  Like lookup_symtab
	except handles multiple files with the same basename,
	full pathnames, and always sets symtab->fullname.
	(gdb_loadfile): Call full_lookup_symtab(). Clear
	realloc'd memory.
	(gdb_loadfile):  Don't tag lines without source.
	Tag source lines with source_tag.
	(gdb_find_file_command, find_file_in_dir):
 	Rewrite.  Now searches symtabs and psymtabs for a match
	on the partial or full filename.  Returns the full pathname.
	(gdb_loadfile): Realloc additional memory
	if someone loads in a file with more than 160,000
	lines.  I don't know if this really works because
	I don't have enough memory to test it.
	(gdb_sourcelines): Deleted.
	(gdb_loadfile): New function. Takes a text widget
	and loads it with the contents of a file.  Marks
	and tags source lines.
	(pc_changed): New function.
	(get_pc_register): Returns the value of
	the PC to GDB.
	(gdb_loc): If looking on the stack, return
	real pc along with calling source line.
	(gdb_loc): Return "" instead of "N/A" if
	filename is not found.
	(gdb_get_breakpoint_info): Same.
	(get_register): For Natural mode, set format to 0.
	 Minor bugfixes from keiths.
	(TclDebug): New function for debugging use.
	(gdb_loc): Return correct PC for frames
	that are not the innermost frame.
	(gdb_listfiles): Rewritten to use object
	API.  Now takes an optional dirname which will cause
	only files in that directory or its subdirectories
	to be returned.  Now returns basenames instead of
	full pathnames.
	(gdb_cmd): Set/reset load_in_progress flag.
	(call_wrapper): Don't pop up dialog for errors in
	downloads; just abort download.
	(gdbtk_load_hash): Set return value correctly.

        -  Keith Seitz  <keiths@onions.cygnus.com>

	* gdbtk.c (gdbtk_init): Define the ui_loop_hook so that it can be
	called by routines which might block, allowing us to update the GUI.
	(gdbtk_wait): Move timer calls to annotation hooks.
	(gdbtk_init): Define the annotation hooks.
	(gdbtk_annotate_starting): New function for cygwin32 hosts.
	(gdbtk_annotate_stopped): New function for cygwin32 hosts.
	(gdbtk_annotate_exited): New function for cygwin32 hosts.
	(gdbtk_annotate_signalled): New function. for cygwin32 hosts.
	(gdbtk_init): Use gdbtk_print_frame_info hook.
	(gdbtk_print_frame_info): New function which sets current_source_symtab
	based on the given symtab and line info.
	(gdb_immediate_command): New function which does
	not buffer any
	output. (Contrast to gdb_cmd.)
	(gdb_prompt_command): New function to return gdb's prompt.
	(find_file_in_dir): New functon which searches source paths
	for a given filename.
	(gdb_find_file): New function which returns path to given file -- uses
	find_file_in_dir.
	(gdbtk_init): Install "gdb_immediate", "gdb_find_file", and
	"gdb_prompt"
 	commands into interpreter.

        -  Ian Lance Taylor  <ian@cygnus.com>

	* gdbtk.c (gdbtk_timer_going): If __CYGWIN32__, new static
	variable.
	(gdb_cmd): If __CYGWIN32__, if executing the load command, call
	gdbtk_start_timer and gdbtk_stop_timer.
	(call_wrapper): If __CYGWIN32__, if the timer is going, turn it
	off.  Clear load_in_progress.
	(x_event): If load_in_progress, quit if download_cancel_ok.
	(gdbtk_start_timer): Set gdbtk_timer_going.
	(gdbtk_stop_timer): Clear gdbtk_timer_going.
	(gdbtk_wait): Call x_event.
	(gdbtk_init): Call ide_create_win_grab_command if
	__CYGIN32__.
	(gdb_clear_file): Clear stop_pc.
1998-03-22 23:02:10 +00:00
Jason Molenda
94ec3e76cb Wed Mar 4 16:50:18 1998 Jason Molenda (crash@bugshack.cygnus.com)
* gdbtk.c (gdb_listfiles): Fix thinko in last change.
1998-03-05 00:51:00 +00:00
Jason Molenda
d7363521cf Wed Mar 4 15:34:49 1998 Jason Molenda (crash@bugshack.cygnus.com)
* gdbtk.c (gdb_listfiles): Allocate space for 'files' dynamically.
1998-03-04 23:35:30 +00:00
Keith Seitz
a5f4fbff1d * tracepoint.c (tracepoint_operation): Call the modify_tracepoint_hook
if it exists.
        Remove static declaration of free_actions.

        * tracepoint.h: Add declaration of free_actions.

        * gdbtk.c (gdbtk_modify_tracepoint): Define new tracepoint modification
hook.
        (gdbtk_print_frame_info): Define this hook so that current_source_symtab
        is set properly.
        (gdb_actions_command): Use free_actions () from tracepoint.c/h.
1998-02-11 02:33:22 +00:00
Keith Seitz
d001edb7ba * gdbtk.c (gdb_actions_command): Make note of next action
before freeing all references to it.
1998-01-26 19:41:39 +00:00
Martin Hunt
0776b0b0da Sat Jan 24 23:52:08 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk.c: Merge from Foundry branch.
	(TclDebug): New debugging function.
	(gdb_loc): For frames, find address of calling function
	instead of whatever is on the stack (usually the next
	instruction).
	(gdb_listfiles): Takes an optional pathname argument and
	returns an alphabetized list of basenames of files in the
	path.
1998-01-25 08:56:08 +00:00
Keith Seitz
11f91b2bbc * symfile.c: Define two new hooks for symbol reading: "pre_add_symbol_hook"
and "post_add_symbol_hook". These hooks are called before we begin reading
        symbols, and after we finish.
        (generic_load): Use new symbol reading hooks and get rid of compiler warning.
        * gdbtk.c (gdbtk_init): Add hooks for pre- and post-symbol reading.
        (gdbtk_pre_add_symbol): New function: the pre-add-symbol hook.
        (gdbtk_post_add_symbol): New function: the post-add-symbol hook.
        (find_file_in_dir): New function. Moved the guts of gdb_find_file_command
        into here to allow its use by others.
        (gdb_loc): Use find_file_in_dir to return the real path to the file
        (or "N/A" if we can't find it).
        * configure.in (TIX_LIB_EXT): Define new variable for those special cases
        when TCL_SHLIB_SUFFIX is not enough to specify the dependency.
        * configure: Regenerate.
1998-01-23 20:54:35 +00:00
Keith Seitz
0422b59e83 * gdbtk.c (gdb_immediate_command): New function which does not buffer an
y
        output. (Contrast to gdb_cmd.)
        (gdbtk_init): Install "gdb_immediate" command into interpreter.
1998-01-15 20:43:37 +00:00
Michael Snyder
43b043cf65 Fri Jan 2 16:56:16 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
[From Keith Seitz  (kseitz@cygnus.com)]
        * actiondlg.tcl (change): handle '$' in register names.
        gdbtk.c (gdb_actions_command): extract and save step count
        from "while-stepping" command
1998-01-02 17:01:29 +00:00
Felix Lee
06434f5f16 sanitization fixes. (files not mentioned, fences misspelled) 1997-12-11 04:18:47 +00:00
Keith Seitz
4f17e6eb48 * gdbtk.c (gdb_get_tracepoint_info): use info in struct
symtab_and_line, not struct tracepoint
          arrange data more like gdb_get_breakpoint_info
          (tracepoint_notify): use info in struct symtab_and_line,
          not struct tracepoint
          (gdbtk_init): add command "gdb_get_tracepoint_list" into
          interpreter
          (gdb_get_tracepoint_list): new function
1997-12-11 03:05:13 +00:00