This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch+7.12.1 1/2] Code cleanup: write_exp_msymbol: +is_tls
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 11 Oct 2016 16:27:18 +0200
- Subject: Re: [patch+7.12.1 1/2] Code cleanup: write_exp_msymbol: +is_tls
- Authentication-results: sourceware.org; auth=none
- References: <20161009185641.GA13645@host1.jankratochvil.net> <CAH=s-PMPJp9wQbwJHNWzWFmCy4gFhpMvKKr3xftF4OEADgp-2A@mail.gmail.com>
On Tue, 11 Oct 2016 16:21:58 +0200, Yao Qi wrote:
> On Sun, Oct 9, 2016 at 7:56 PM, Jan Kratochvil
> <jan.kratochvil@redhat.com> wrote:
> > --- a/gdb/parse.c
> > +++ b/gdb/parse.c
> >
> > /* The minimal symbol might point to a function descriptor;
> > resolve it to the actual code address instead. */
> > pc = gdbarch_convert_from_func_ptr_addr (gdbarch, addr, ¤t_target);
> > - if (pc != addr)
> > + if (!is_tls && pc != addr)
>
> It does have functionality change.
Ah, you are right.
> This should be moved to patch #2?
It is unrelated to patch #2, it could be a new patch #3 (or patch #1.5).
In fact if (tls) then gdbarch_convert_from_func_ptr_addr should not be even
called so this patch is also wrong (suboptimal).
Let's forget about this patch hunk now.
Jan