* [PATCH] Demangling patch #2
1999-04-01 0:00 [PATCH] Demangling patch #2 ahaas
@ 1999-03-15 13:23 ` ahaas
1999-03-15 19:11 ` Stan Shebs
1 sibling, 0 replies; 4+ messages in thread
From: ahaas @ 1999-03-15 13:23 UTC (permalink / raw)
To: gdb-patches
Hi.
After a bit of poking around, I was able to find and fix the remaining
error in the demangling tests. The test that failed was trying to
demangle
add__XTPfTFPd_f_FcT1
into
add<float *,float (double *)>(char, char)
The problem was the 'forgetting_types' field in the work structure was
never decremented, causing problems when remember_types() was called.
I'm resending the entire patch to 'cplus-dem.c' which cured the
demangling problems. The first part of it was sent earlier today (Mar 15),
the little bit on the end cures the bug above.
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 13:59:59 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);
}
@@ -3893,6 +3896,7 @@
if (work->previous_argument)
string_delete (work->previous_argument);
work->previous_argument = saved_previous_argument;
+ --work->forgetting_types;
work->nrepeats = saved_nrepeats;
return result;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Demangling patch #2
1999-04-01 0:00 [PATCH] Demangling patch #2 ahaas
1999-03-15 13:23 ` ahaas
@ 1999-03-15 19:11 ` Stan Shebs
1999-04-01 0:00 ` Stan Shebs
1 sibling, 1 reply; 4+ messages in thread
From: Stan Shebs @ 1999-03-15 19:11 UTC (permalink / raw)
To: ahaas; +Cc: gdb-patches
From: ahaas@neosoft.com
Date: Mon, 15 Mar 1999 14:31:51 -0600
I'm resending the entire patch to 'cplus-dem.c' which cured the
demangling problems. The first part of it was sent earlier today (Mar 15),
the little bit on the end cures the bug above.
Thanks for the patch! I started looking at this myself, but hadn't
gotten very far yet. -s
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Demangling patch #2
@ 1999-04-01 0:00 ahaas
1999-03-15 13:23 ` ahaas
1999-03-15 19:11 ` Stan Shebs
0 siblings, 2 replies; 4+ messages in thread
From: ahaas @ 1999-04-01 0:00 UTC (permalink / raw)
To: gdb-patches
Hi.
After a bit of poking around, I was able to find and fix the remaining
error in the demangling tests. The test that failed was trying to
demangle
add__XTPfTFPd_f_FcT1
into
add<float *,float (double *)>(char, char)
The problem was the 'forgetting_types' field in the work structure was
never decremented, causing problems when remember_types() was called.
I'm resending the entire patch to 'cplus-dem.c' which cured the
demangling problems. The first part of it was sent earlier today (Mar 15),
the little bit on the end cures the bug above.
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 13:59:59 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);
}
@@ -3893,6 +3896,7 @@
if (work->previous_argument)
string_delete (work->previous_argument);
work->previous_argument = saved_previous_argument;
+ --work->forgetting_types;
work->nrepeats = saved_nrepeats;
return result;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Demangling patch #2
1999-03-15 19:11 ` Stan Shebs
@ 1999-04-01 0:00 ` Stan Shebs
0 siblings, 0 replies; 4+ messages in thread
From: Stan Shebs @ 1999-04-01 0:00 UTC (permalink / raw)
To: ahaas; +Cc: gdb-patches
From: ahaas@neosoft.com
Date: Mon, 15 Mar 1999 14:31:51 -0600
I'm resending the entire patch to 'cplus-dem.c' which cured the
demangling problems. The first part of it was sent earlier today (Mar 15),
the little bit on the end cures the bug above.
Thanks for the patch! I started looking at this myself, but hadn't
gotten very far yet. -s
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-04-01 0:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-01 0:00 [PATCH] Demangling patch #2 ahaas
1999-03-15 13:23 ` ahaas
1999-03-15 19:11 ` Stan Shebs
1999-04-01 0:00 ` Stan Shebs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox