From: ahaas@neosoft.com
To: gdb-patches@cygnus.com
Subject: [PATCH] Demangling fixes
Date: Thu, 01 Apr 1999 00:00:00 -0000 [thread overview]
Message-ID: <19990315112522.A22156@localhost.neosoft.com> (raw)
Hi.
The latest gdb snapshot gdb-4.17.86 has numerous failures in the
demangling tests. The enclosed patch fixes all but one demangle test failure
for me.
The problem was in libiberty/cplus-dem.c - the function 'demangle_prefix'
was being to greedy when working on a mangled name like
"__dt__11T5__pt__2_iFv" when demangling in 'arm' or 'hp' style. A simple
'if' block fixes the problem.
Enjoy.
Art Haas
==========================================
--- gdb-4.17.86/libiberty/cplus-dem.c.orig Wed Feb 10 19:49:17 1999
+++ gdb-4.17.86/libiberty/cplus-dem.c Mon Mar 15 10:45:43 1999
@@ -2237,13 +2237,16 @@
}
else
{
- const char *tmp;
/* Look for the LAST occurrence of __, allowing names to have
the '__' sequence embedded in them.*/
- while ((tmp = mystrstr (scan+2, "__")) != NULL)
- scan = tmp;
- if (*(scan + 2) == '\0')
- success = 0;
+ if (!(ARM_DEMANGLING || HP_DEMANGLING))
+ {
+ const char *tmp;
+ while ((tmp = mystrstr (scan+2, "__")) != NULL)
+ scan = tmp;
+ }
+ if (*(scan + 2) == '\0')
+ success = 0;
else
demangle_function_name (work, mangled, declp, scan);
}
WARNING: multiple messages have this Message-ID
From: ahaas@neosoft.com
To: gdb-patches@cygnus.com
Subject: [PATCH] Demangling fixes
Date: Mon, 15 Mar 1999 09:25:00 -0000 [thread overview]
Message-ID: <19990315112522.A22156@localhost.neosoft.com> (raw)
Message-ID: <19990315092500.L22O2rTXzShh2pU5XMYvb7ZFyAN0eUnOtIebjqhsydk@z> (raw)
Hi.
The latest gdb snapshot gdb-4.17.86 has numerous failures in the
demangling tests. The enclosed patch fixes all but one demangle test failure
for me.
The problem was in libiberty/cplus-dem.c - the function 'demangle_prefix'
was being to greedy when working on a mangled name like
"__dt__11T5__pt__2_iFv" when demangling in 'arm' or 'hp' style. A simple
'if' block fixes the problem.
Enjoy.
Art Haas
==========================================
--- gdb-4.17.86/libiberty/cplus-dem.c.orig Wed Feb 10 19:49:17 1999
+++ gdb-4.17.86/libiberty/cplus-dem.c Mon Mar 15 10:45:43 1999
@@ -2237,13 +2237,16 @@
}
else
{
- const char *tmp;
/* Look for the LAST occurrence of __, allowing names to have
the '__' sequence embedded in them.*/
- while ((tmp = mystrstr (scan+2, "__")) != NULL)
- scan = tmp;
- if (*(scan + 2) == '\0')
- success = 0;
+ if (!(ARM_DEMANGLING || HP_DEMANGLING))
+ {
+ const char *tmp;
+ while ((tmp = mystrstr (scan+2, "__")) != NULL)
+ scan = tmp;
+ }
+ if (*(scan + 2) == '\0')
+ success = 0;
else
demangle_function_name (work, mangled, declp, scan);
}
next reply other threads:[~1999-04-01 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-01 0:00 ahaas [this message]
1999-03-15 9:25 ` ahaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990315112522.A22156@localhost.neosoft.com \
--to=ahaas@neosoft.com \
--cc=gdb-patches@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox