1994-06-03 17:25:08 +00:00
|
|
|
/* Top level stuff for GDB, the GNU debugger.
|
|
|
|
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994
|
|
|
|
Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
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
|
1995-08-02 03:41:12 +00:00
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
1994-06-03 17:25:08 +00:00
|
|
|
|
|
|
|
/* From top.c. */
|
|
|
|
extern char *line;
|
|
|
|
extern int linesize;
|
|
|
|
extern FILE *instream;
|
1994-06-23 00:08:09 +00:00
|
|
|
extern char gdb_dirbuf[1024];
|
1994-06-03 17:25:08 +00:00
|
|
|
extern int inhibit_gdbinit;
|
|
|
|
extern int epoch_interface;
|
|
|
|
extern char gdbinit[];
|
|
|
|
|
|
|
|
/* Generally one should use catch_errors rather than manipulating these
|
|
|
|
directly. The exception is main(). */
|
1998-01-05 15:36:49 +00:00
|
|
|
#if defined(HAVE_SIGSETJMP)
|
|
|
|
#define SIGJMP_BUF sigjmp_buf
|
|
|
|
#define SIGSETJMP(buf) sigsetjmp(buf, 1)
|
|
|
|
#define SIGLONGJMP(buf,val) siglongjmp(buf,val)
|
|
|
|
#else
|
|
|
|
#define SIGJMP_BUF jmp_buf
|
|
|
|
#define SIGSETJMP(buf) setjmp(buf)
|
|
|
|
#define SIGLONGJMP(buf,val) longjmp(buf,val)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern SIGJMP_BUF error_return;
|
|
|
|
extern SIGJMP_BUF quit_return;
|
1994-06-03 17:25:08 +00:00
|
|
|
|
|
|
|
extern void print_gdb_version PARAMS ((GDB_FILE *));
|
|
|
|
|
|
|
|
extern void source_command PARAMS ((char *, int));
|
|
|
|
extern void cd_command PARAMS ((char *, int));
|
|
|
|
extern void read_command_file PARAMS ((FILE *));
|
|
|
|
extern void init_history PARAMS ((void));
|
|
|
|
extern void command_loop PARAMS ((void));
|
* tracepoint.c (set_raw_tracepoint): make sure there's a trailing slash on
the directory name
* Merge (lots) with foundry-971118-build
* Makefile.in (install-only): install the new gdbtk, not the old
* top.h: add declaration of get_prompt
* top.c (get_prompt): new function
* gdbtk.c (gdbtk_call_command): also run idle hooks for class_trace
commands
(gdbtk_init): add new commands "gdb_get_locals", "gdb_get_args",
"gdb_get_function", "gdb_get_line", "gdb_get_file",
"gdb_tracepoint_exists", "gdb_get_tracepoint_info", "gdb_actions",
and "gdb_prompt"
(gdb_get_vars_command): new function
(gdb_get_line_command): new function
(gdb_get_file_command): new function
(gdb_get_function_command): new function
(gdb_get_tracepoint_info): new function
(gdbtk_create_tracepoint): new function
(gdbtk_delete_tracepoint): new function
(tracepoint_notify): new function
(tracepoint_exists): new function
(gdb_actions_command): new function
(gdb_tracepoint_exists_command): new function
(gdb_prompt_command): new function
* main.tcl: initialize gdbtk_state(readline)
* console.tcl (invoke): get realine working
(activate): add prompt argument for readline
(setprompt): add prompt argument for readline
* interface.tcl (gdbtk_tcl_readline): hack to get readline working
* lots: Merge with foundry-971118-build
* console.tcl (setprompt): get prompt from gdb
* prefs.tcl (pref_set_defaults): add tracepoint defaults
* interface.tcl (gdbtk_tcl_tracepoint): new function
* src.tcl (constructor): set default behavior of left click, make
a tracepoint dot, too
(fill_files): "new" function: ripped out of "location"
(location): use fill_files instead
(do_bp): add support for tracepoints
(bp_line): add support for tracepoints
(set_tracepoint): new function
(config_win): add "Set tracepoint here" to right-click menu
* actiondlg.tcl: new file to help with tracepoint data collection actions
* tracedlg.tcl: new file to help with tracepoints
1997-11-26 22:38:10 +00:00
|
|
|
extern int quit_confirm PARAMS ((void));
|
|
|
|
extern void quit_force PARAMS ((char *, int));
|
1994-06-03 17:25:08 +00:00
|
|
|
extern void quit_command PARAMS ((char *, int));
|
1998-12-10 21:25:43 +00:00
|
|
|
|
|
|
|
/* This function returns a pointer to the string that is used
|
|
|
|
by gdb for its command prompt. */
|
* tracepoint.c (set_raw_tracepoint): make sure there's a trailing slash on
the directory name
* Merge (lots) with foundry-971118-build
* Makefile.in (install-only): install the new gdbtk, not the old
* top.h: add declaration of get_prompt
* top.c (get_prompt): new function
* gdbtk.c (gdbtk_call_command): also run idle hooks for class_trace
commands
(gdbtk_init): add new commands "gdb_get_locals", "gdb_get_args",
"gdb_get_function", "gdb_get_line", "gdb_get_file",
"gdb_tracepoint_exists", "gdb_get_tracepoint_info", "gdb_actions",
and "gdb_prompt"
(gdb_get_vars_command): new function
(gdb_get_line_command): new function
(gdb_get_file_command): new function
(gdb_get_function_command): new function
(gdb_get_tracepoint_info): new function
(gdbtk_create_tracepoint): new function
(gdbtk_delete_tracepoint): new function
(tracepoint_notify): new function
(tracepoint_exists): new function
(gdb_actions_command): new function
(gdb_tracepoint_exists_command): new function
(gdb_prompt_command): new function
* main.tcl: initialize gdbtk_state(readline)
* console.tcl (invoke): get realine working
(activate): add prompt argument for readline
(setprompt): add prompt argument for readline
* interface.tcl (gdbtk_tcl_readline): hack to get readline working
* lots: Merge with foundry-971118-build
* console.tcl (setprompt): get prompt from gdb
* prefs.tcl (pref_set_defaults): add tracepoint defaults
* interface.tcl (gdbtk_tcl_tracepoint): new function
* src.tcl (constructor): set default behavior of left click, make
a tracepoint dot, too
(fill_files): "new" function: ripped out of "location"
(location): use fill_files instead
(do_bp): add support for tracepoints
(bp_line): add support for tracepoints
(set_tracepoint): new function
(config_win): add "Set tracepoint here" to right-click menu
* actiondlg.tcl: new file to help with tracepoint data collection actions
* tracedlg.tcl: new file to help with tracepoints
1997-11-26 22:38:10 +00:00
|
|
|
extern char *get_prompt PARAMS((void));
|
1998-12-10 21:25:43 +00:00
|
|
|
|
|
|
|
/* This function copies the specified string into the string that
|
|
|
|
is used by gdb for its command prompt. */
|
|
|
|
extern void set_prompt PARAMS ((char *));
|
1994-06-03 17:25:08 +00:00
|
|
|
|
|
|
|
/* From random places. */
|
|
|
|
extern int mapped_symbol_files;
|
|
|
|
extern int readnow_symbol_files;
|
|
|
|
#define ALL_CLEANUPS ((struct cleanup *)0)
|