From: Shahab Vahedi via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: Shahab Vahedi <shahab.vahedi@gmail.com>,
Shahab Vahedi <shahab@synopsys.com>,
Anton Kolesov <anton.kolesov@synopsys.com>,
Francois Bedard <fbedard@synopsys.com>
Subject: [PATCH 0/2] Add native GNU/Linux support for ARC in GDB
Date: Thu, 12 Nov 2020 14:48:09 +0100 [thread overview]
Message-ID: <20201112134811.9074-1-shahab.vahedi@gmail.com> (raw)
From: Shahab Vahedi <shahab@synopsys.com>
This patch series is mainly about adding a native GNU/Linux support for
ARC in GDB ("[PATCH 2/2] gdb: Add native support for ARC in GNU/Linux").
During the process of mulling over that change, I noticed that the ARC
target support could become more efficient in some of the target hooks
in "arc-linux-tdep.c"; namely the "arc_linux_supply_*()" and the
"arc_linux_collect_v2_regset()". In those hooks, REGNUM is completely
ignored and every register is fetched/overwritten. These hooks are
used by the "arc-linux-nat.c" (the second patch) and it relies on them:
Therefore, the first patch of this series: "[PATCH 1/2]: arc: Take into
account the REGNUM in supply/collect gdb hooks".
To summarize:
[PATCH 1/2] -> Respect REGNUM in hooks.
[PATCH 2/2] -> Add native ARC GNU/Linux support while using those hooks.
One last remark: The native GDB works correctly along with this
fix [1]. Therefore, if you want to give it a try, please also apply
that patch.
[1] [PATCH] arc: Write correct "eret" value during register collection
https://sourceware.org/pipermail/gdb-patches/2020-November/173202.html
How to build:
Get the "Linux/{glibc,uClibc} ARC HS" toolchain from:
https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases
and extract it somewhere.
Update the PATHs so you can find "arc-linux-gcc":
$ export PATH=/extracted/dir/bin:$PATH
$ export LD_LIBRARY_PATH=/extracted/dir/lib:$LD_LIBRARY_PATH
$ cd /to/gdb/src
$ host=arc-snps-linux-gnu # or arc-snps-linux-uclibc
$ configure --prefix=/usr \
--host=$host \
--disable-build-with-cxx \
--disable-gas \
--disable-ld \
--disable-binutils
$ make -j $(nproc)
$ arc-linux-strip ./gdb/gdb
Anton Kolesov (1):
gdb: Add native support for ARC in GNU/Linux
Shahab Vahedi (1):
arc: Take into account the REGNUM in supply/collect gdb hooks
gdb/Makefile.in | 1 +
gdb/arc-linux-nat.c | 321 +++++++++++++++++++++++++++++++++++++++++++
gdb/arc-linux-tdep.c | 41 ++++--
gdb/configure.host | 3 +
gdb/configure.nat | 4 +
5 files changed, 361 insertions(+), 9 deletions(-)
create mode 100644 gdb/arc-linux-nat.c
--
2.29.2
next reply other threads:[~2020-11-12 13:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 13:48 Shahab Vahedi via Gdb-patches [this message]
2020-11-12 13:48 ` [PATCH 1/2] arc: Take into account the REGNUM in supply/collect gdb hooks Shahab Vahedi via Gdb-patches
2020-11-12 17:33 ` Tom Tromey
2020-11-12 17:36 ` Tom Tromey
2020-11-12 13:48 ` [PATCH 2/2] gdb: Add native support for ARC in GNU/Linux Shahab Vahedi via Gdb-patches
2020-11-12 18:03 ` Tom Tromey
2020-12-07 16:37 ` [PATCH v2 0/2] Add native GNU/Linux support for ARC in GDB Shahab Vahedi via Gdb-patches
2020-12-07 16:37 ` [PATCH v2 1/2] arc: Take into account the REGNUM in supply/collect gdb hooks Shahab Vahedi via Gdb-patches
2020-12-10 19:11 ` Tom Tromey
2020-12-07 16:37 ` [PATCH v2 2/2] gdb: Add native support for ARC in GNU/Linux Shahab Vahedi via Gdb-patches
2020-12-10 19:13 ` Tom Tromey
2020-12-10 19:33 ` Shahab Vahedi via Gdb-patches
2020-12-22 11:21 ` [PUSHED v2 1/2] arc: Take into account the REGNUM in supply/collect gdb hooks Shahab Vahedi via Gdb-patches
2020-12-22 11:21 ` [PUSHED v2 2/2] gdb: Add native support for ARC in GNU/Linux Shahab Vahedi via Gdb-patches
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=20201112134811.9074-1-shahab.vahedi@gmail.com \
--to=gdb-patches@sourceware.org \
--cc=anton.kolesov@synopsys.com \
--cc=fbedard@synopsys.com \
--cc=shahab.vahedi@gmail.com \
--cc=shahab@synopsys.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