From: Michael Snyder <msnyder@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com, Roland McGrath <roland@redhat.com>
Subject: Re: [rfa/threads] Convert thread event descriptors to code addrs
Date: Tue, 25 Nov 2003 22:02:00 -0000 [thread overview]
Message-ID: <3FC3D186.1080604@redhat.com> (raw)
In-Reply-To: <3FC3C5EE.2090201@redhat.com>
Andrew Cagney wrote:
> Hello,
>
> For PPC64 every function has two minimal symbols vis:
>
> .__nptl_create_event: the start address
> __nptl_create_event: the descriptor
>
> This patch modifies ps_pglobal_lookup so that it always returns the
> function's start address. Doing this ensures that libthread_db and
> GDB's thread code are "on the same page" when it comes to the true
> address of the thread-create and thread-death breakpoints.
>
> The alternative would be to modify libthread_db so that it knew that
> PPC64 symbol were special but I suspect that it doesn't want to know
> about such underlying details.
>
> ok for mainline?
Yes, with typo correction noted below.
> ------------------------------------------------------------------------
>
> 2003-11-25 Andrew Cagney <cagney@redhat.com>
>
> * proc-service.c (ps_pglobal_lookup): Convert function descriptors
> into code addresses using gdbarch_convert_from_func_ptr_addr.
>
> Index: ./gdb/proc-service.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/proc-service.c,v
> retrieving revision 1.7
> diff -u -r1.7 proc-service.c
> --- ./gdb/proc-service.c 24 Feb 2002 22:31:19 -0000 1.7
> +++ ./gdb/proc-service.c 25 Nov 2003 20:59:49 -0000
> @@ -181,7 +181,13 @@
> if (ms == NULL)
> return PS_NOSYM;
>
> - *sym_addr = SYMBOL_VALUE_ADDRESS (ms);
> + /* Get the addres, make certain that any descriptors are converted
"address".
> + into corresponding code addresses. (For PPC64, the symbol
> + "__nptl_create_event" points at a function descriptor while this
> + code needs the corresponding function's start address.) */
> + *sym_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
> + SYMBOL_VALUE_ADDRESS (ms),
> + ¤t_target);
> return PS_OK;
> }
>
next prev parent reply other threads:[~2003-11-25 22:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-25 21:13 Andrew Cagney
2003-11-25 22:02 ` Michael Snyder [this message]
2003-11-25 22:27 ` Roland McGrath
2003-11-25 22:46 ` Andrew Cagney
2003-11-25 23:00 ` Roland McGrath
2003-11-25 23:00 ` Roland McGrath
2003-11-25 23:39 ` Andrew Cagney
2003-11-26 4:26 ` Daniel Jacobowitz
2003-12-01 15:56 ` Andrew Cagney
2003-12-01 16:01 ` Daniel Jacobowitz
2003-12-03 4:09 ` Andrew Cagney
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=3FC3D186.1080604@redhat.com \
--to=msnyder@redhat.com \
--cc=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=roland@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