public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: John Baldwin <jhb@FreeBSD.org>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 04/11] Add a new gdbarch method to resolve the address of TLS variables.
Date: Thu, 07 Mar 2019 16:08:00 -0000	[thread overview]
Message-ID: <02c8a44b-b1d2-0f0f-9b6f-72a0fb673f83@simark.ca> (raw)
In-Reply-To: <4db33aead3f31532b7d4e165d9786df792a4d925.1549672588.git.jhb@FreeBSD.org>

On 2019-02-08 7:40 p.m., John Baldwin wrote:
> Permit TLS variable addresses to be resolved purely by an ABI rather
> than requiring a target method.  This doesn't try the target method if
> the ABI function is present (even if the ABI function fails) to
> simplify error handling.

I don't see anything wrong with the patch (and the comment you removed 
in target_translate_tls_address hints it is right), but again I am not 
very familiar with how TLS works, so I wouldn't spot if anything was 
conceptually wrong with this approach.  I would appreciate if another 
maintainer could take a look and give their opinion.

> diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
> index afc4da7cdd..09097bcbaf 100755
> --- a/gdb/gdbarch.sh
> +++ b/gdb/gdbarch.sh
> @@ -602,6 +602,7 @@ m;int;remote_register_number;int regno;regno;;default_remote_register_number;;0
>   
>   # Fetch the target specific address used to represent a load module.
>   F;CORE_ADDR;fetch_tls_load_module_address;struct objfile *objfile;objfile
> +M;CORE_ADDR;get_thread_local_address;ptid_t ptid, CORE_ADDR lm_addr, CORE_ADDR offset;ptid, lm_addr, offset

Could you document the method, especially the meaning of the parameters?

Simon

  reply	other threads:[~2019-03-07 16:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-09  0:42 [PATCH v2 00/11] Support for thread-local variables on FreeBSD John Baldwin
2019-02-09  0:42 ` [PATCH v2 03/11] Handle an edge case for minisym TLS variable lookups John Baldwin
2019-02-09  0:42 ` [PATCH v2 02/11] Support fs_base and gs_base on FreeBSD/i386 John Baldwin
2019-02-09  0:42 ` [PATCH v2 07/11] Add a helper function to resolve TLS variable addresses for FreeBSD John Baldwin
2019-03-07 16:18   ` Simon Marchi
2019-02-09  0:42 ` [PATCH v2 09/11] Support TLS variables on FreeBSD/i386 John Baldwin
2019-02-09  0:42 ` [PATCH v2 08/11] Support TLS variables on FreeBSD/amd64 John Baldwin
2019-02-09  0:42 ` [PATCH v2 01/11] Support the fs_base and gs_base registers on i386 John Baldwin
2019-02-09  0:42 ` [PATCH v2 11/11] Support TLS variables on FreeBSD/powerpc John Baldwin
2019-03-07 16:26   ` Simon Marchi
2019-02-09  0:42 ` [PATCH v2 06/11] Add a more general version of lookup_struct_elt_type John Baldwin
2019-02-09  1:08   ` John Baldwin
2019-02-11 10:27     ` Philipp Rudo
2019-02-11 17:44       ` John Baldwin
2019-03-07 15:53   ` Simon Marchi
2019-03-08  0:04     ` John Baldwin
2019-03-08  0:32       ` Pedro Alves
2019-03-08 18:39         ` John Baldwin
2019-02-09  0:50 ` [PATCH v2 04/11] Add a new gdbarch method to resolve the address of TLS variables John Baldwin
2019-03-07 16:08   ` Simon Marchi [this message]
2019-03-07 23:50     ` John Baldwin
2019-03-08  2:55       ` Simon Marchi
2019-03-08 18:39         ` John Baldwin
2019-02-09  0:50 ` [PATCH v2 05/11] Remove code disabled since at least 1999 from lookup_struct_elt_type John Baldwin
2019-03-07 16:25   ` Simon Marchi
2019-02-09  0:50 ` [PATCH v2 10/11] Support TLS variables on FreeBSD/riscv John Baldwin
2019-02-22 17:22 ` [PING][PATCH v2 00/11] Support for thread-local variables on FreeBSD John Baldwin
2019-03-12 20:21   ` Simon Marchi

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=02c8a44b-b1d2-0f0f-9b6f-72a0fb673f83@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).