aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1994-09-16 22:57:37 +0000
committerStu Grossman <grossman@cygnus>1994-09-16 22:57:37 +0000
commit637b166117dbbd3df6eedaec2873a45b4d10b3cc (patch)
tree2bd4a6d9d5e8a31d2b58bbf41a81052b74198074 /gdb/defs.h
parent2d0546410d0e67caa4b51e755968070389681a44 (diff)
downloadgdb-637b166117dbbd3df6eedaec2873a45b4d10b3cc.zip
gdb-637b166117dbbd3df6eedaec2873a45b4d10b3cc.tar.gz
gdb-637b166117dbbd3df6eedaec2873a45b4d10b3cc.tar.bz2
* defs.h (QUIT): Call interactive_hook to allow GUI to interrupt.
Also, add decl for symtab_to_filename. * gdbtk.c: Replace calls to full_filename with symtab_to_filename. * gdbtk.tcl: New routine pc_to_line replaces in line code. New routine decr replaces in line code. * (create_file_win): Use catch to handle open failures more elegantly. Also, create special window to display file open failure message. Move opening of file prior to creation of text widget. * (create_asm_win): Add PC as argument. We now base disassembly on PC instead of function name, since function names can be ambiguous (usually seen with shared libs). Also, use catch to simplify code where we don't care about failures. * source.c (symtab_to_filename): New. Returns the file associated with a symtab. * top.c: Define interactive_hook. Called during QUIT to animate the GUI.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h40
1 files changed, 11 insertions, 29 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index 4e98e21..36baf7f 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -66,7 +66,7 @@ extern int sevenbit_strings;
extern void quit PARAMS ((void));
-#define QUIT { if (quit_flag) quit (); }
+#define QUIT { if (quit_flag) quit (); if (interactive_hook) interactive_hook (); }
/* Command classes are top-level categories into which commands are broken
down for "help" purposes.
@@ -119,6 +119,13 @@ struct cleanup
PTR arg;
};
+/* Needed for various prototypes */
+
+#ifdef __STDC__
+struct symtab;
+struct breakpoint;
+#endif
+
/* From blockframe.c */
extern int inside_entry_func PARAMS ((CORE_ADDR));
@@ -310,6 +317,8 @@ extern void directory_command PARAMS ((char *, int));
extern void init_source_path PARAMS ((void));
+extern char *symtab_to_filename PARAMS ((struct symtab *));
+
/* From findvar.c */
extern int read_relative_register_raw_bytes PARAMS ((int, char *));
@@ -318,26 +327,6 @@ extern int read_relative_register_raw_bytes PARAMS ((int, char *));
extern char *tilde_expand PARAMS ((char *));
-/* Control types for commands */
-
-enum misc_command_type
-{
- ok_command,
- end_command,
- else_command,
- nop_command,
-};
-
-enum command_control_type
-{
- simple_control,
- break_control,
- continue_control,
- while_control,
- if_control,
- invalid_control
-};
-
/* Structure for saved commands lines
(for breakpoints, defined commands, etc). */
@@ -345,9 +334,6 @@ struct command_line
{
struct command_line *next;
char *line;
- enum command_control_type control_type;
- int body_count;
- struct command_line **body_list;
};
extern struct command_line *read_command_lines PARAMS ((void));
@@ -832,11 +818,6 @@ extern CORE_ADDR push_word PARAMS ((CORE_ADDR, unsigned LONGEST));
/* Hooks for alternate command interfaces. */
-#ifdef __STDC__
-struct symtab;
-struct breakpoint;
-#endif
-
extern void (*init_ui_hook) PARAMS ((void));
extern void (*command_loop_hook) PARAMS ((void));
extern void (*fputs_unfiltered_hook) PARAMS ((const char *linebuffer));
@@ -848,6 +829,7 @@ extern void (*create_breakpoint_hook) PARAMS ((struct breakpoint *b));
extern void (*delete_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
extern void (*enable_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
extern void (*disable_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
+extern void (*interactive_hook) PARAMS ((void));
/* Inhibit window interface if non-zero. */