Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado <luisgpm@linux.vnet.ibm.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Vinay Sridhar <vinay@linux.vnet.ibm.com>, gdb-patches@sources.redhat.com
Subject: Re: [patch] Re: Accessing tls variables across files causes a bug
Date: Mon, 04 Aug 2008 19:36:00 -0000	[thread overview]
Message-ID: <1217877435.29334.98.camel@gargoyle> (raw)
In-Reply-To: <20080802171807.GA2755@host0.dyn.jankratochvil.net>

Thanks for working on this. Just a few cosmetic comments.

On Sat, 2008-08-02 at 19:18 +0200, Jan Kratochvil wrote:
>      block = BLOCKVECTOR_BLOCK (bv, block_index);
>      sym = lookup_block_symbol (block, name, linkage_name, domain);
> -    if (sym)
> +    if (sym != NULL)

Shouldn't we just leave it as "if (sym)"?

>        {
> -	block_found = block;
> -	return fixup_symbol_section (sym, objfile);
> +	sym_best = sym;
> +	if (SYMBOL_CLASS (sym) != LOC_UNRESOLVED
> +	    && SYMBOL_CLASS (sym) != LOC_OPTIMIZED_OUT)
> +	  break;
>        }
>    }

> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ ./gdb/testsuite/gdb.threads/tls2.c	2 Aug 2008 17:05:40 -0000
> @@ -0,0 +1,28 @@
> +/* This testcase is part of GDB, the GNU debugger.
> +
> +   Copyright 2008 Free Software Foundation, Inc.
> +
> +   This program is free software; you can redistribute it and/or
> modify
> +   it under the terms of the GNU General Public License as published
> by
> +   the Free Software Foundation; either version 3 of the License, or
> +   (at your option) any later version.
> +
> +   This program is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +   GNU General Public License for more details.
> +
> +   You should have received a copy of the GNU General Public License
> +   along with this program.  If not, see
> <http://www.gnu.org/licenses/>.
> +
> +   Please email any bugs, comments, and/or additions to this file to:
> +   bug-gdb@prep.ai.mit.edu  */

This header is probably very old. Newer testcases have a more up-to-date
header. For example, gdb.opt/clobbered-registers-O2.c.

The patch works for me, getting rid of the memory access error when
trying to inspect the extern tls variable.

Regards,
Luis


  reply	other threads:[~2008-08-04 19:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1217480020.4755.1.camel@vinaysridhar.in.ibm.com>
2008-08-02 17:18 ` Jan Kratochvil
2008-08-04 19:36   ` Luis Machado [this message]
2008-08-05 13:26     ` [patch] Finish removing <bug-gdb@prep.ai.mit.edu> (PR gdb/1543) Jan Kratochvil
2008-08-06 12:13       ` Daniel Jacobowitz
2008-08-04 19:40   ` [patch] Re: Accessing tls variables across files causes a bug Ulrich Weigand
2008-08-05  8:39   ` Vinay Sridhar
2008-08-05 12:22     ` Daniel Jacobowitz
2008-08-06 11:16       ` Vinay Sridhar
2008-08-06 11:25         ` Daniel Jacobowitz
2008-08-06 11:43         ` Jan Kratochvil
2008-08-06 15:20           ` Jan Kratochvil
2008-08-27  4:37             ` Vinay Sridhar
2009-06-12 17:06             ` [resolved] " Jan Kratochvil

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=1217877435.29334.98.camel@gargoyle \
    --to=luisgpm@linux.vnet.ibm.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jan.kratochvil@redhat.com \
    --cc=vinay@linux.vnet.ibm.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