This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: regression: FYI: fix 'this' lookup for lambdas
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> at least for:
Jan> -PASS: gdb.dwarf2/dw2-cp-infcall-ref-static.exp: p f()
Jan> +ERROR: Process no longer exists
Jan> +UNRESOLVED: gdb.dwarf2/dw2-cp-infcall-ref-static.exp: p f()
Thanks for the report.
Here is what I am checking in to fix this.
Tom
2011-06-20 Tom Tromey <tromey@redhat.com>
* symtab.c (lookup_language_this): End loop if block is NULL.
Index: symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.276
diff -u -r1.276 symtab.c
--- symtab.c 17 Jun 2011 20:46:47 -0000 1.276
+++ symtab.c 20 Jun 2011 17:52:27 -0000
@@ -1100,7 +1100,7 @@
if (lang->la_name_of_this == NULL || block == NULL)
return NULL;
- while (1)
+ while (block)
{
struct symbol *sym;
@@ -1108,9 +1108,11 @@
if (sym != NULL)
return sym;
if (BLOCK_FUNCTION (block))
- return NULL;
+ break;
block = BLOCK_SUPERBLOCK (block);
}
+
+ return NULL;
}
/* Behave like lookup_symbol except that NAME is the natural name