Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: regression: FYI: fix 'this' lookup for lambdas
Date: Mon, 20 Jun 2011 17:53:00 -0000	[thread overview]
Message-ID: <m3liww8k5k.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20110619081237.GA26190@host1.jankratochvil.net> (Jan	Kratochvil's message of "Sun, 19 Jun 2011 10:12:37 +0200")

>>>>> "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


      reply	other threads:[~2011-06-20 17:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 20:46 Tom Tromey
2011-06-19  8:12 ` regression: " Jan Kratochvil
2011-06-20 17:53   ` Tom Tromey [this message]

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=m3liww8k5k.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.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