Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb PR/55851: Martin Husemann: recogn...



details:   https://anonhg.NetBSD.org/src/rev/2a3539ea2ce6
branches:  trunk
changeset: 947117:2a3539ea2ce6
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Dec 11 18:25:45 2020 +0000

description:
PR/55851: Martin Husemann: recognize <symbol>.part.<n> names
This is gross; perhaps we should hide them completely (not print them
in stack traces etc.)

diffstat:

 external/gpl3/gdb/dist/gdb/c-exp.y |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r 663508afbd1c -r 2a3539ea2ce6 external/gpl3/gdb/dist/gdb/c-exp.y
--- a/external/gpl3/gdb/dist/gdb/c-exp.y        Fri Dec 11 18:23:25 2020 +0000
+++ b/external/gpl3/gdb/dist/gdb/c-exp.y        Fri Dec 11 18:25:45 2020 +0000
@@ -2608,6 +2608,8 @@
 /* Depth of parentheses.  */
 static int paren_depth;
 
+static const char PART[] = ".part.";
+
 /* Read one token, getting characters through lexptr.  */
 
 static int
@@ -2723,6 +2725,13 @@
       return c;
 
     case '.':
+      /* Gross! recognize <symbol>.part.N */
+      if (strncmp(pstate->lexptr, PART, sizeof(PART) - 1) == 0 &&
+       ISDIGIT(pstate->lexptr[sizeof(PART) - 1]) &&
+       pstate->lexptr[sizeof(PART)] == '\0')
+       {
+         break;
+       }
       /* Might be a floating point number.  */
       if (pstate->lexptr[1] < '0' || pstate->lexptr[1] > '9')
        {
@@ -2888,7 +2897,7 @@
   /* It's a name.  See how long it is.  */
   namelen = 0;
   for (c = tokstart[namelen];
-       (c == '_' || c == '$' || c_ident_is_alnum (c) || c == '<');)
+       (c == '_' || c == '$' || c == '.' || c_ident_is_alnum (c) || c == '<');)
     {
       /* Template parameter lists are part of the name.
         FIXME: This mishandles `print $a<4&&$a>3'.  */



Home | Main Index | Thread Index | Old Index