aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@geoffk.org>2007-05-06 00:25:11 +0000
committerGeoffrey Keating <geoffk@geoffk.org>2007-05-06 00:25:11 +0000
commit8bf955e1b8d2d5d6327d28ab8c97c2c012b8f4cd (patch)
treebbaea2b42606a8920bda22b339c0420e5f7a8c3e /libiberty/cp-demangle.c
parentf362a2117579f7134fef4d74bdfd89846a8b73c2 (diff)
downloadgdb-8bf955e1b8d2d5d6327d28ab8c97c2c012b8f4cd.zip
gdb-8bf955e1b8d2d5d6327d28ab8c97c2c012b8f4cd.tar.gz
gdb-8bf955e1b8d2d5d6327d28ab8c97c2c012b8f4cd.tar.bz2
* cp-demangle.c (d_name): Detect local-source-name.
(d_prefix): Likewise. (d_unqualified_name): Implement local-source-name.
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r--libiberty/cp-demangle.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 5c930c6..992b358 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -1100,6 +1100,9 @@ d_name (struct d_info *di)
case 'Z':
return d_local_name (di);
+ case 'L':
+ return d_unqualified_name (di);
+
case 'S':
{
int subst;
@@ -1220,7 +1223,8 @@ d_prefix (struct d_info *di)
if (IS_DIGIT (peek)
|| IS_LOWER (peek)
|| peek == 'C'
- || peek == 'D')
+ || peek == 'D'
+ || peek == 'L')
dc = d_unqualified_name (di);
else if (peek == 'S')
dc = d_substitution (di, 1);
@@ -1254,6 +1258,9 @@ d_prefix (struct d_info *di)
/* <unqualified-name> ::= <operator-name>
::= <ctor-dtor-name>
::= <source-name>
+ ::= <local-source-name>
+
+ <local-source-name> ::= L <source-name> <discriminator>
*/
static struct demangle_component *
@@ -1275,6 +1282,19 @@ d_unqualified_name (struct d_info *di)
}
else if (peek == 'C' || peek == 'D')
return d_ctor_dtor_name (di);
+ else if (peek == 'L')
+ {
+ struct demangle_component * ret;
+
+ d_advance (di, 1);
+
+ ret = d_source_name (di);
+ if (ret == NULL)
+ return NULL;
+ if (! d_discriminator (di))
+ return NULL;
+ return ret;
+ }
else
return NULL;
}