* [RFA]: Clean up C++ type handling in linespec parsing
@ 2001-03-15 19:09 Jim Blandy
2001-03-16 1:36 ` Fernando Nasser
0 siblings, 1 reply; 4+ messages in thread
From: Jim Blandy @ 2001-03-15 19:09 UTC (permalink / raw)
To: gdb-patches
2001-03-15 Jim Blandy <jimb@redhat.com>
* linespec.c (find_methods): Just call CHECK_TYPEDEF on t, rather
than asking for sym_class's type; that's circuitous. Remove
sym_class, since the last use of it is gone. (This is a minor
revision of a change from Dan Berlin.)
Index: gdb/linespec.c
===================================================================
RCS file: /cvs/src/src/gdb/linespec.c,v
retrieving revision 1.6
diff -c -c -r1.6 linespec.c
*** gdb/linespec.c 2001/03/14 18:36:45 1.6
--- gdb/linespec.c 2001/03/16 02:06:33
***************
*** 104,126 ****
{
int i1 = 0;
int ibase;
- struct symbol *sym_class;
char *class_name = type_name_no_tag (t);
/* Ignore this class if it doesn't have a name. This is ugly, but
unless we figure out how to get the physname without the name of
the class, then the loop can't do any good. */
if (class_name
! && (sym_class = lookup_symbol (class_name,
! (struct block *) NULL,
! STRUCT_NAMESPACE,
! (int *) NULL,
! (struct symtab **) NULL)))
{
int method_counter;
! /* FIXME: Shouldn't this just be CHECK_TYPEDEF (t)? */
! t = SYMBOL_TYPE (sym_class);
/* Loop over each method name. At this level, all overloads of a name
are counted as a single name. There is an inner loop which loops over
--- 104,122 ----
{
int i1 = 0;
int ibase;
char *class_name = type_name_no_tag (t);
/* Ignore this class if it doesn't have a name. This is ugly, but
unless we figure out how to get the physname without the name of
the class, then the loop can't do any good. */
if (class_name
! && (lookup_symbol (class_name, (struct block *) NULL,
! STRUCT_NAMESPACE, (int *) NULL,
! (struct symtab **) NULL)))
{
int method_counter;
! CHECK_TYPEDEF (t);
/* Loop over each method name. At this level, all overloads of a name
are counted as a single name. There is an inner loop which loops over
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA]: Clean up C++ type handling in linespec parsing
2001-03-15 19:09 [RFA]: Clean up C++ type handling in linespec parsing Jim Blandy
@ 2001-03-16 1:36 ` Fernando Nasser
2001-03-16 6:35 ` Elena Zannoni
0 siblings, 1 reply; 4+ messages in thread
From: Fernando Nasser @ 2001-03-16 1:36 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb-patches, Elena Zannoni
OK with me. Lets ask Elena.
Elena, I know that you would like to move this to some language land,
but maybe its better get it fixed anyway.
Fernando
Jim Blandy wrote:
>
> 2001-03-15 Jim Blandy <jimb@redhat.com>
>
> * linespec.c (find_methods): Just call CHECK_TYPEDEF on t, rather
> than asking for sym_class's type; that's circuitous. Remove
> sym_class, since the last use of it is gone. (This is a minor
> revision of a change from Dan Berlin.)
>
> Index: gdb/linespec.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/linespec.c,v
> retrieving revision 1.6
> diff -c -c -r1.6 linespec.c
> *** gdb/linespec.c 2001/03/14 18:36:45 1.6
> --- gdb/linespec.c 2001/03/16 02:06:33
> ***************
> *** 104,126 ****
> {
> int i1 = 0;
> int ibase;
> - struct symbol *sym_class;
> char *class_name = type_name_no_tag (t);
>
> /* Ignore this class if it doesn't have a name. This is ugly, but
> unless we figure out how to get the physname without the name of
> the class, then the loop can't do any good. */
> if (class_name
> ! && (sym_class = lookup_symbol (class_name,
> ! (struct block *) NULL,
> ! STRUCT_NAMESPACE,
> ! (int *) NULL,
> ! (struct symtab **) NULL)))
> {
> int method_counter;
>
> ! /* FIXME: Shouldn't this just be CHECK_TYPEDEF (t)? */
> ! t = SYMBOL_TYPE (sym_class);
>
> /* Loop over each method name. At this level, all overloads of a name
> are counted as a single name. There is an inner loop which loops over
> --- 104,122 ----
> {
> int i1 = 0;
> int ibase;
> char *class_name = type_name_no_tag (t);
>
> /* Ignore this class if it doesn't have a name. This is ugly, but
> unless we figure out how to get the physname without the name of
> the class, then the loop can't do any good. */
> if (class_name
> ! && (lookup_symbol (class_name, (struct block *) NULL,
> ! STRUCT_NAMESPACE, (int *) NULL,
> ! (struct symtab **) NULL)))
> {
> int method_counter;
>
> ! CHECK_TYPEDEF (t);
>
> /* Loop over each method name. At this level, all overloads of a name
> are counted as a single name. There is an inner loop which loops over
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA]: Clean up C++ type handling in linespec parsing
2001-03-16 1:36 ` Fernando Nasser
@ 2001-03-16 6:35 ` Elena Zannoni
2001-03-20 8:21 ` Jim Blandy
0 siblings, 1 reply; 4+ messages in thread
From: Elena Zannoni @ 2001-03-16 6:35 UTC (permalink / raw)
To: Fernando Nasser; +Cc: Jim Blandy, gdb-patches, Elena Zannoni
Fernando Nasser writes:
> OK with me. Lets ask Elena.
>
> Elena, I know that you would like to move this to some language land,
> but maybe its better get it fixed anyway.
>
:-) true. Fine by me, check it in.
Elena
> Fernando
>
>
> Jim Blandy wrote:
> >
> > 2001-03-15 Jim Blandy <jimb@redhat.com>
> >
> > * linespec.c (find_methods): Just call CHECK_TYPEDEF on t, rather
> > than asking for sym_class's type; that's circuitous. Remove
> > sym_class, since the last use of it is gone. (This is a minor
> > revision of a change from Dan Berlin.)
> >
> > Index: gdb/linespec.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/linespec.c,v
> > retrieving revision 1.6
> > diff -c -c -r1.6 linespec.c
> > *** gdb/linespec.c 2001/03/14 18:36:45 1.6
> > --- gdb/linespec.c 2001/03/16 02:06:33
> > ***************
> > *** 104,126 ****
> > {
> > int i1 = 0;
> > int ibase;
> > - struct symbol *sym_class;
> > char *class_name = type_name_no_tag (t);
> >
> > /* Ignore this class if it doesn't have a name. This is ugly, but
> > unless we figure out how to get the physname without the name of
> > the class, then the loop can't do any good. */
> > if (class_name
> > ! && (sym_class = lookup_symbol (class_name,
> > ! (struct block *) NULL,
> > ! STRUCT_NAMESPACE,
> > ! (int *) NULL,
> > ! (struct symtab **) NULL)))
> > {
> > int method_counter;
> >
> > ! /* FIXME: Shouldn't this just be CHECK_TYPEDEF (t)? */
> > ! t = SYMBOL_TYPE (sym_class);
> >
> > /* Loop over each method name. At this level, all overloads of a name
> > are counted as a single name. There is an inner loop which loops over
> > --- 104,122 ----
> > {
> > int i1 = 0;
> > int ibase;
> > char *class_name = type_name_no_tag (t);
> >
> > /* Ignore this class if it doesn't have a name. This is ugly, but
> > unless we figure out how to get the physname without the name of
> > the class, then the loop can't do any good. */
> > if (class_name
> > ! && (lookup_symbol (class_name, (struct block *) NULL,
> > ! STRUCT_NAMESPACE, (int *) NULL,
> > ! (struct symtab **) NULL)))
> > {
> > int method_counter;
> >
> > ! CHECK_TYPEDEF (t);
> >
> > /* Loop over each method name. At this level, all overloads of a name
> > are counted as a single name. There is an inner loop which loops over
>
> --
> Fernando Nasser
> Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario M4P 2C9
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA]: Clean up C++ type handling in linespec parsing
2001-03-16 6:35 ` Elena Zannoni
@ 2001-03-20 8:21 ` Jim Blandy
0 siblings, 0 replies; 4+ messages in thread
From: Jim Blandy @ 2001-03-20 8:21 UTC (permalink / raw)
To: Elena Zannoni; +Cc: Fernando Nasser, gdb-patches
Elena Zannoni <ezannoni@cygnus.com> writes:
> Fernando Nasser writes:
> > OK with me. Lets ask Elena.
> >
> > Elena, I know that you would like to move this to some language land,
> > but maybe its better get it fixed anyway.
>
> :-) true. Fine by me, check it in.
Thanks. I've committed this.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-03-20 8:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-15 19:09 [RFA]: Clean up C++ type handling in linespec parsing Jim Blandy
2001-03-16 1:36 ` Fernando Nasser
2001-03-16 6:35 ` Elena Zannoni
2001-03-20 8:21 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox