diff options
Diffstat (limited to 'gdb/p-exp.y')
-rw-r--r-- | gdb/p-exp.y | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/p-exp.y b/gdb/p-exp.y index b130e970e4b..8efb45019f4 100644 --- a/gdb/p-exp.y +++ b/gdb/p-exp.y @@ -947,6 +947,8 @@ yylex () retry: + prev_lexptr = lexptr; + tokstart = lexptr; explen = strlen (lexptr); /* See if it is a special token of length 3. */ @@ -1481,5 +1483,8 @@ void yyerror (msg) char *msg; { + if (prev_lexptr) + lexptr = prev_lexptr; + error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); } |