From: Joel Brobecker <brobecker@adacore.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/7] New regs_info for aarch32
Date: Tue, 11 Aug 2015 19:40:00 -0000 [thread overview]
Message-ID: <20150811194012.GA19956@adacore.com> (raw)
In-Reply-To: <86614ve5z5.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]
Hi Yao,
> 2015-08-04 Yao Qi <yao.qi@linaro.org>
>
> * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
> * linux-aarch32-low.c: New file.
> * linux-aarch32-low.h: New file.
> * linux-arm-low.c (arm_fill_gregset): Move it to
> linux-aarch32-low.c.
> (arm_store_gregset): Likewise.
> (arm_fill_vfpregset): Call arm_fill_vfpregset_num
> (arm_store_vfpregset): Call arm_store_vfpregset_num.
> (arm_arch_setup): Check if PTRACE_GETREGSET works.
> (regs_info): Rename to regs_info_arm.
> (arm_regs_info): Return regs_info_aarch32 if
> have_ptrace_getregset is 1 and target description is
> arm_with_neon or arm_with_vfpv3.
> (initialize_low_arch): Don't call init_registers_arm_with_neon.
> Call initialize_low_arch_aarch32 instead.
This patch is causing a GDBserver build failure on some versions
of GNU/Linux (the version we support is fairly old), but also on
relatively recent versions of Android as well.
The problem is that NT_ARM_VFP is not always defined. I tried
the attached patch, which I was a bit dubious about, but seems
to work ("info float" does not error out, and print a series of zeros),
but I'm not sure whether I'm exercising the code at all. The other
alternative I was thinking of was perhaps to just #ifndef out
the entry in aarch32_regsets that needs NT_ARM_VFP. It might be
cleaner, but I haven't tried it.
gdb/gdbserver/ChangeLog:
* linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
WDYT?
Thanks!
--
Joel
[-- Attachment #2: 0001-gdbserver-linux-aarch32-low-build-failure-when-NT_AR.patch --]
[-- Type: text/x-diff, Size: 1203 bytes --]
From 6c3cc336283db01c11a89bdbfdb70cc90a7b5d3e Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Tue, 11 Aug 2015 15:28:19 -0400
Subject: [PATCH] gdbserver/linux-aarch32-low: build failure when NT_ARM_VFP
not defined
On some older versions of GNU/Linux, gdbserver now fails to build
due to an undefined reference to NT_ARM_VFP. Same issue on Android,
where this macros is undefined until Android API level 21 (Android
5.0 "Lollipop").
This patch modifies linux-aarch32-low.c to define that macros when
not already defined.
gdb/gdbserver/ChangeLog:
* linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
---
gdb/gdbserver/linux-aarch32-low.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gdb/gdbserver/linux-aarch32-low.c b/gdb/gdbserver/linux-aarch32-low.c
index 7f3b985..5876b13 100644
--- a/gdb/gdbserver/linux-aarch32-low.c
+++ b/gdb/gdbserver/linux-aarch32-low.c
@@ -27,6 +27,12 @@
#include <elf.h>
#endif
+/* Some older versions of GNU/Linux and Android do not define
+ the following macros. */
+#ifndef NT_ARM_VFP
+#define NT_ARM_VFP 0x400
+#endif
+
/* Collect GP registers from REGCACHE to buffer BUF. */
void
--
2.1.4
next prev parent reply other threads:[~2015-08-11 19:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 15:17 [PATCH 0/7] Aarch64 linux GDB remote multi-arch debugging Yao Qi
2015-07-31 15:16 ` [PATCH 1/7] Move have_ptrace_getregset to linux-low.c Yao Qi
2015-07-31 15:17 ` [PATCH 2/7] New regs_info for aarch32 Yao Qi
2015-08-03 13:58 ` Pedro Alves
2015-08-03 16:34 ` Yao Qi
2015-08-03 17:11 ` Pedro Alves
2015-08-04 9:52 ` Yao Qi
2015-08-04 10:11 ` Pedro Alves
2015-08-11 19:40 ` Joel Brobecker [this message]
2015-08-18 15:21 ` Yao Qi
2015-08-18 22:42 ` Joel Brobecker
2015-07-31 15:17 ` [PATCH 5/7] Disable Z0 packet on aarch64 on multi-arch debugging Yao Qi
2015-07-31 15:17 ` [PATCH 4/7] Get and set PC correctly on aarch64 in multi-arch Yao Qi
2015-07-31 15:17 ` [PATCH 3/7] Use arm target description and regs_info for 32-bit file on aarch64 GDBserver Yao Qi
2015-08-04 13:44 ` Yao Qi
2015-07-31 15:17 ` [PATCH 6/7] Disable tracepoint support for aarch32 Yao Qi
2015-07-31 15:17 ` [PATCH 7/7] Mention multi-arch debugging support in NEWS Yao Qi
2015-08-19 8:26 ` Yao Qi
2015-09-04 14:30 ` Yao Qi
2015-08-03 14:00 ` [PATCH 0/7] Aarch64 linux GDB remote multi-arch debugging Pedro Alves
2015-08-04 13:41 ` Yao Qi
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=20150811194012.GA19956@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).