aboutsummaryrefslogtreecommitdiff
path: root/gdb/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/parse.c')
-rw-r--r--gdb/parse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/parse.c b/gdb/parse.c
index efac0de..e8bb112 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -252,7 +252,11 @@ parser_state::parse_error (const char *msg)
if (this->prev_lexptr)
this->lexptr = this->prev_lexptr;
- error (_("A %s in expression, near `%s'."), msg, this->lexptr);
+ if (*this->lexptr == '\0')
+ error (_("A %s in expression, near the end of `%s'."),
+ msg, this->start_of_input);
+ else
+ error (_("A %s in expression, near `%s'."), msg, this->lexptr);
}