aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2002-04-25 14:51:29 +0000
committerPierre Muller <muller@sourceware.org>2002-04-25 14:51:29 +0000
commit24467a8686c09546ee59303b30ca12589b6b9bd6 (patch)
tree798aee7eb688cb097eb9b085c62126d33952e90b
parent6c95717af00ff1764a1636af5472768712a9cddb (diff)
downloadgdb-24467a8686c09546ee59303b30ca12589b6b9bd6.zip
gdb-24467a8686c09546ee59303b30ca12589b6b9bd6.tar.gz
gdb-24467a8686c09546ee59303b30ca12589b6b9bd6.tar.bz2
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.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/p-exp.y5
2 files changed, 11 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7454f51..1ae21c4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2002-04-25 Jason Thorpe <thorpej@wasabisystems.com>
* alpha-tdep.c (alpha_breakpoint_from_pc): New function.
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index b130e97..8efb450 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);
}