aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-09-08 05:32:34 +0000
committerJeff Law <law@redhat.com>1994-09-08 05:32:34 +0000
commite52bfe0cc4170ffc303dc9b2ace1e5c656ecbab2 (patch)
treeb3c6e57011e99fd3000caa3b01b9c9f788a8640f /gdb/defs.h
parent20c9d49a4e3cfd136059b7c08acf2f16e50e3934 (diff)
downloadgdb-e52bfe0cc4170ffc303dc9b2ace1e5c656ecbab2.zip
gdb-e52bfe0cc4170ffc303dc9b2ace1e5c656ecbab2.tar.gz
gdb-e52bfe0cc4170ffc303dc9b2ace1e5c656ecbab2.tar.bz2
* defs.h (enum misc_command_type, command_control_type): Enums
for describing the command and control types. (struct command_line): Add new fields to keep track of the command type and body associated with the command. * top.c: Include value.h. Delete whitespace at the end of lines. (build_command_line, get_command_line): New functions. (execute_control_command, while_command, if_command): Likewise. (realloc_body_list, read_next_line): Likewise. (recurse_read_control_structure): Likewise. (execute_user_command): Call execute_control_command. (read_command_lines): Simplify by calling read_next_line, call read_control_structure for "if" and "while" commands. (free_command_lines): Free new fields in the command structure. (define_command): Reset control_level to zero. (init_main): Install command handlers for "if" and "while" commands.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index 728dccf..4e98e21 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -97,6 +97,7 @@ enum language
language_c, /* C */
language_cplus, /* C++ */
language_chill, /* Chill */
+ language_fortran, /* Fortran */
language_m2, /* Modula-2 */
language_asm /* Assembly language */
};
@@ -317,6 +318,26 @@ 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). */
@@ -324,6 +345,9 @@ 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));