aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/tracepoint.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5a4b719..a1442f9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2004-01-02 Pawel Ostrowski <pasza@zodiac.mimuw.edu.pl>
+
+ * tracepoint.c (validate_actionline): Fix segv at EOF
+
2004-01-07 Michael Chastain <mec.gnu@mindspring.com>
* hpread.c (hpread_read_struct_type): Call SET_FIELD_PHYSNAME
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 6e33841..713bf14 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -914,6 +914,10 @@ validate_actionline (char **line, struct tracepoint *t)
struct cleanup *old_chain = NULL;
char *p;
+ /* if EOF is typed, *line is NULL */
+ if (*line == NULL)
+ return END;
+
for (p = *line; isspace ((int) *p);)
p++;