* PATCH to stabsread.c:read_member_functions
@ 2002-01-17 7:07 Jason Merrill
2002-01-17 7:14 ` Daniel Jacobowitz
2002-01-17 7:15 ` Daniel Jacobowitz
0 siblings, 2 replies; 3+ messages in thread
From: Jason Merrill @ 2002-01-17 7:07 UTC (permalink / raw)
To: gdb-patches; +Cc: Jason Merrill
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
This patch fixes gdb.c++/classes.exp:ptype Static when used with gcc 3.x
and stabs output. The code in question was never correct, just a likely
guess; in particular, it got things wrong even with the v2 output for
Static::ii, where the plain function name ("ii") was the same as the
mangled form of the argument list (int, int == "ii"). For v3, we don't try
to do minimal output, so it will always guess wrong.
OK? Should I just remove the bad code rather than comment it out?
2002-01-17 Jason Merrill <jason@redhat.com>
* stabsread.c (read_member_functions): Never guess that the given
physname for a static member function is a stub.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 691 bytes --]
*** stabsread.c.~1~ Wed Jan 16 18:52:33 2002
--- stabsread.c Thu Jan 17 15:01:35 2002
*************** read_member_functions (struct field_info
*** 3206,3216 ****
--- 3206,3221 ----
case '?':
/* static member function. */
new_sublist->fn_field.voffset = VOFFSET_STATIC;
+ #if 0
+ /* This was a kludge to try to get the right answer for gcc
+ v2 stabs output. In v3 we don't try to avoid writing out
+ full mangled names, so this just causes problems. */
if (strncmp (new_sublist->fn_field.physname,
main_fn_name, strlen (main_fn_name)))
{
new_sublist->fn_field.is_stub = 1;
}
+ #endif
break;
default:
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: PATCH to stabsread.c:read_member_functions
2002-01-17 7:07 PATCH to stabsread.c:read_member_functions Jason Merrill
@ 2002-01-17 7:14 ` Daniel Jacobowitz
2002-01-17 7:15 ` Daniel Jacobowitz
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-01-17 7:14 UTC (permalink / raw)
To: gdb-patches
On Thu, Jan 17, 2002 at 03:06:49PM +0000, Jason Merrill wrote:
> This patch fixes gdb.c++/classes.exp:ptype Static when used with gcc 3.x
> and stabs output. The code in question was never correct, just a likely
> guess; in particular, it got things wrong even with the v2 output for
> Static::ii, where the plain function name ("ii") was the same as the
> mangled form of the argument list (int, int == "ii"). For v3, we don't try
> to do minimal output, so it will always guess wrong.
>
> OK? Should I just remove the bad code rather than comment it out?
>
> 2002-01-17 Jason Merrill <jason@redhat.com>
>
> * stabsread.c (read_member_functions): Never guess that the given
> physname for a static member function is a stub.
>
Not OK, I think. v2 -does- do minimal output, right? We are not
dropping v2 support.
I've been meaning to fix this since I added the test. The proper fix
might be to either:
- know when to expect minimal output. Does v2 ever not do it? What
about other C++ compilers?
- Check if it is a valid mangled name. Will that work - can the
argument list ever be a valid mangled name in its own right?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: PATCH to stabsread.c:read_member_functions
2002-01-17 7:07 PATCH to stabsread.c:read_member_functions Jason Merrill
2002-01-17 7:14 ` Daniel Jacobowitz
@ 2002-01-17 7:15 ` Daniel Jacobowitz
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-01-17 7:15 UTC (permalink / raw)
To: gdb-patches
On Thu, Jan 17, 2002 at 03:06:49PM +0000, Jason Merrill wrote:
> This patch fixes gdb.c++/classes.exp:ptype Static when used with gcc 3.x
> and stabs output. The code in question was never correct, just a likely
> guess; in particular, it got things wrong even with the v2 output for
> Static::ii, where the plain function name ("ii") was the same as the
> mangled form of the argument list (int, int == "ii"). For v3, we don't try
> to do minimal output, so it will always guess wrong.
>
> OK? Should I just remove the bad code rather than comment it out?
>
> 2002-01-17 Jason Merrill <jason@redhat.com>
>
> * stabsread.c (read_member_functions): Never guess that the given
> physname for a static member function is a stub.
>
Oh, and did you test the results of this on a v2/stabs testsuite? If
not, please do so.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-01-17 15:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-17 7:07 PATCH to stabsread.c:read_member_functions Jason Merrill
2002-01-17 7:14 ` Daniel Jacobowitz
2002-01-17 7:15 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox