From: Jiong Wang <jiong.wang@foss.arm.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: GDB <gdb-patches@sourceware.org>
Subject: Re: [AArch64][5/6] Implement gdbarch_core_read_description
Date: Wed, 09 Aug 2017 15:43:00 -0000 [thread overview]
Message-ID: <5b77a77e-e0e0-a420-6f8e-ae8c3e967d68@foss.arm.com> (raw)
In-Reply-To: <2848920b-e1be-0c00-d9f6-4737055e33a1@foss.arm.com>
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
On 09/08/17 15:57, Jiong Wang wrote:
>
>> This patch doesn't depend on other patches, so it can go in now.
>>
> I had committed this patch after addressing all comments, but just reverted.
>
> it's my bad haven't give it a quick build. It depends on AT_HWCAP defined in patch 1 and the value needs to be synced with kernel...
>
Sorry, the issue should be two header files are missing.
"auxv.h" to declare target_auxv_search and "elf/common.h" to define AT_HWCAP
(I miss read the buildbot error message as something like missing "HWCAP_APIA"...)
This patch was splitted from patch 6, I forget to move those two header files to
this patch.
Attached patch fixed this and passed gdb cross build, OK for master?
gdb/
2017-08-09 Jiong Wang <jiong.wang@arm.com>
* aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
(aarch64_linux_core_read_description): New function.
(aarch64_linux_init_abi): Register gdbarch_core_read_description.
[-- Attachment #2: k.patch --]
[-- Type: text/x-patch, Size: 1273 bytes --]
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index d2ca70a..847454f 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -45,6 +45,8 @@
#include "record-full.h"
#include "linux-record.h"
+#include "auxv.h"
+#include "elf/common.h"
/* Signal frame handling.
@@ -231,6 +233,20 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
NULL, cb_data);
}
+/* Implement the "core_read_description" gdbarch method. */
+
+static const struct target_desc *
+aarch64_linux_core_read_description (struct gdbarch *gdbarch,
+ struct target_ops *target, bfd *abfd)
+{
+ CORE_ADDR aarch64_hwcap = 0;
+
+ if (target_auxv_search (target, AT_HWCAP, &aarch64_hwcap) != 1)
+ return NULL;
+
+ return tdesc_aarch64;
+}
+
/* Implementation of `gdbarch_stap_is_single_operand', as defined in
gdbarch.h. */
@@ -1018,6 +1034,8 @@ aarch64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_iterate_over_regset_sections
(gdbarch, aarch64_linux_iterate_over_regset_sections);
+ set_gdbarch_core_read_description
+ (gdbarch, aarch64_linux_core_read_description);
/* SystemTap related. */
set_gdbarch_stap_integer_prefixes (gdbarch, stap_integer_prefixes);
next prev parent reply other threads:[~2017-08-09 15:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <c8484136-c4f2-cda2-6a0d-f8293b111cdd@foss.arm.com>
2017-08-09 12:17 ` [AArch64][3/6] DWARF unwinder support for signed return address Jiong Wang
2017-08-10 11:08 ` Pedro Alves
2017-08-10 13:35 ` Jiong Wang
2017-08-09 12:18 ` [AArch64][4/6] Prologue scan " Jiong Wang
2017-08-09 12:18 ` [AArch64][5/6] Implement gdbarch_core_read_description Jiong Wang
2017-08-09 14:22 ` Yao Qi
2017-08-09 14:57 ` Jiong Wang
2017-08-09 15:43 ` Jiong Wang [this message]
2017-08-09 16:04 ` Yao Qi
2017-08-09 16:40 ` Jiong Wang
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=5b77a77e-e0e0-a420-6f8e-ae8c3e967d68@foss.arm.com \
--to=jiong.wang@foss.arm.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.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