From: Peter Bergner <bergner@linux.ibm.com>
To: Alan Hayward <Alan.Hayward@arm.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
nd <nd@arm.com>
Subject: Re: [PATCH 2/2] gdbserver: Add linux_get_hwcap
Date: Tue, 02 Apr 2019 22:00:00 -0000 [thread overview]
Message-ID: <4b84367d-bae9-55ef-4878-de585ee3b85d@linux.ibm.com> (raw)
In-Reply-To: <20190325120542.92123-2-alan.hayward@arm.com>
On 3/25/19 7:05 AM, Alan Hayward wrote:
> * linux-ppc-low.c (ppc_get_auxv): Remove function.
[snip]
> diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
> index 1b695e53fe..8deb0ce068 100644
> --- a/gdb/gdbserver/linux-ppc-low.c
> +++ b/gdb/gdbserver/linux-ppc-low.c
> @@ -323,43 +323,6 @@ ppc_set_pc (struct regcache *regcache, CORE_ADDR pc)
> }
> }
>
> -
> -static int
> -ppc_get_auxv (unsigned long type, unsigned long *valp)
> -{
> - const struct target_desc *tdesc = current_process ()->tdesc;
> - int wordsize = register_size (tdesc, 0);
> - unsigned char *data = (unsigned char *) alloca (2 * wordsize);
> - int offset = 0;
> -
> - while ((*the_target->read_auxv) (offset, data, 2 * wordsize) == 2 * wordsize)
> - {
> - if (wordsize == 4)
> - {
> - unsigned int *data_p = (unsigned int *)data;
> - if (data_p[0] == type)
> - {
> - *valp = data_p[1];
> - return 1;
> - }
> - }
> - else
> - {
> - unsigned long *data_p = (unsigned long *)data;
> - if (data_p[0] == type)
> - {
> - *valp = data_p[1];
> - return 1;
> - }
> - }
> -
> - offset += 2 * wordsize;
> - }
> -
> - *valp = 0;
> - return 0;
> -}
> -
> #ifndef __powerpc64__
> static int ppc_regmap_adjusted;
> #endif
> @@ -944,8 +907,8 @@ ppc_arch_setup (void)
>
> /* The value of current_process ()->tdesc needs to be set for this
> call. */
> - ppc_get_auxv (AT_HWCAP, &ppc_hwcap);
> - ppc_get_auxv (AT_HWCAP2, &ppc_hwcap2);
> + ppc_hwcap = linux_get_hwcap (features.wordsize);
> + ppc_hwcap2 = linux_get_hwcap2 (features.wordsize);
>
> features.isa205 = ppc_linux_has_isa205 (ppc_hwcap);
>
You have removed ppc_get_auxv(), but I'm still seeing uses of it that
function which are causing build errors (powerpc64le-linux):
/home/bergner/binutils/binutils-gdb/gdb/gdbserver/linux-ppc-low.c: In function âint is_elfv2_inferior()â:
/home/bergner/binutils/binutils-gdb/gdb/gdbserver/linux-ppc-low.c:1113:8: error: âppc_get_auxvâ was not declared in this scope
if (!ppc_get_auxv (AT_PHDR, &phdr))
Peter
next prev parent reply other threads:[~2019-04-02 22:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-25 12:05 [PATCH 1/2] " Alan Hayward
2019-03-25 12:05 ` [PATCH 2/2] gdbserver: " Alan Hayward
2019-03-25 15:41 ` Simon Marchi
2019-03-26 13:17 ` Alan Hayward
[not found] ` <353e83d9-efb3-c485-9ae6-6fc0a1f54553@simark.ca>
[not found] ` <57CEBD0C-44A5-48D1-8CEB-54584E1A1A21@arm.com>
[not found] ` <59A457A2-F464-4A05-A471-700F066114AD@arm.com>
2019-03-26 14:34 ` FW: " Alan Hayward
2019-03-28 9:50 ` Ulrich Weigand
2019-03-28 11:35 ` Alan Hayward
2019-03-29 23:12 ` Ulrich Weigand
2019-04-03 19:13 ` Pedro Franco de Carvalho
2019-04-04 13:49 ` Ulrich Weigand
2019-04-05 16:26 ` Pedro Franco de Carvalho
2019-04-05 16:39 ` Ulrich Weigand
2019-04-05 17:23 ` Pedro Franco de Carvalho
2019-04-08 9:38 ` Alan Hayward
2019-04-11 14:12 ` Pedro Franco de Carvalho
2019-03-26 14:56 ` FW: " Simon Marchi
2019-04-02 22:00 ` Peter Bergner [this message]
2019-04-04 21:22 ` Pedro Franco de Carvalho
2019-03-25 15:18 ` [PATCH 1/2] " Simon Marchi
2019-03-25 16:51 ` Alan Hayward
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=4b84367d-bae9-55ef-4878-de585ee3b85d@linux.ibm.com \
--to=bergner@linux.ibm.com \
--cc=Alan.Hayward@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=nd@arm.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