public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add native GNU/Linux support for ARC in GDB
@ 2020-11-12 13:48 Shahab Vahedi
  2020-11-12 13:48 ` [PATCH 1/2] arc: Take into account the REGNUM in supply/collect gdb hooks Shahab Vahedi
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Shahab Vahedi @ 2020-11-12 13:48 UTC (permalink / raw)
  To: gdb-patches; +Cc: Shahab Vahedi, Shahab Vahedi, Anton Kolesov, Francois Bedard

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-12-22 11:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 13:48 [PATCH 0/2] Add native GNU/Linux support for ARC in GDB Shahab Vahedi
2020-11-12 13:48 ` [PATCH 1/2] arc: Take into account the REGNUM in supply/collect gdb hooks Shahab Vahedi
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
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
2020-12-07 16:37   ` [PATCH v2 1/2] arc: Take into account the REGNUM in supply/collect gdb hooks Shahab Vahedi
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
2020-12-10 19:13     ` Tom Tromey
2020-12-10 19:33       ` Shahab Vahedi
2020-12-22 11:21 ` [PUSHED v2 1/2] arc: Take into account the REGNUM in supply/collect gdb hooks Shahab Vahedi
2020-12-22 11:21   ` [PUSHED v2 2/2] gdb: Add native support for ARC in GNU/Linux Shahab Vahedi

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).