diff options
author | Pierre Muller <muller@ics.u-strasbg.fr> | 2002-04-25 14:51:29 +0000 |
---|---|---|
committer | Pierre Muller <muller@ics.u-strasbg.fr> | 2002-04-25 14:51:29 +0000 |
commit | 623bcf543319be5010968003e804d2768a991f99 (patch) | |
tree | 2564b2854dc0e052962f443a1b0fec1c53d7864e /gdb/p-exp.y | |
parent | 9cddf4c586e92b83b7185ad1611594751adf347f (diff) | |
download | gdb-623bcf543319be5010968003e804d2768a991f99.tar.gz |
2002-04-25 Pierre Muller <muller@ics.u-strasbg.fr>
* p-exp.y: Also use new prev_lexptr variable
to improve error reporting. Based on Michael Snyder
2002-04-24 dated patch to c-exp.y.
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); } |