public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Alan Hayward <alan.hayward@arm.com>
To: gdb-patches@sourceware.org
Cc: nd@arm.com,	Alan Hayward <alan.hayward@arm.com>
Subject: [PATCH v2 0/3] Support large registers in regcache transfer_regset
Date: Thu, 21 Jun 2018 09:39:00 -0000	[thread overview]
Message-ID: <20180621093802.79342-1-alan.hayward@arm.com> (raw)

Support core file reading/writing where the register size is either greater
or smaller than the space allocated to it in the core file.

This will prevent assert failures on Aarch64 SVE.

Whilst writing this patch I spotted potential issue for aarch64. The 32bit
CPSR register has a 64bit slot in the core file. The existing transfer_regset
did not ensure the extra 32bits were null padded.

This version addresses all the review comments for V1, and splits up into
smaller chunks.

Patch 1 will enble patch 3 to use unsigned ints.
Patch 2 is a cleanup of exisiting code.
Patch 3 fixes the two issues.

I did not update read_part/write_part to use unsigned ints as that would
have required spiralled out to quite a few target file changes.

Tested by generating cores on aarch64 and aarch64 sve, both via gdb and the
kernel, then ensuring the cores load back on the both systems.
Checked cores on x86 still look ok.
Ran make check on x86 and aarch64.


Alan Hayward (3):
  Use unsigned ints in regcache_map_entry All current uses of
    regcache_map_entry use static hard coded values.
  Avoid memcpys in regcache read_part/write_part for full registers.
  Use partial register read/writes in transfer_regset

 gdb/regcache.c | 189 ++++++++++++++++++++++++++++++++++++++++-----------------
 gdb/regcache.h |  26 ++++++--
 2 files changed, 154 insertions(+), 61 deletions(-)

-- 
2.15.2 (Apple Git-101.1)

             reply	other threads:[~2018-06-21  9:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21  9:39 Alan Hayward [this message]
2018-06-21  9:38 ` [PATCH v2 1/3] Use unsigned ints in regcache_map_entry Alan Hayward
2018-06-21 13:27   ` Simon Marchi
2018-06-21 13:52     ` Simon Marchi
2018-06-21 15:19       ` Alan Hayward
2018-06-21 15:34         ` Simon Marchi
2018-06-21 17:32           ` Simon Marchi
2018-06-21 19:52             ` Alan Hayward
2018-06-21  9:39 ` [PATCH v2 3/3] Use partial register read/writes in transfer_regset Alan Hayward
2018-06-21 14:16   ` Simon Marchi
2018-06-21 19:56     ` Alan Hayward
2018-06-21 15:02   ` Simon Marchi
2018-06-21  9:39 ` [PATCH v2 2/3] Avoid memcpys in regcache read_part/write_part for full registers Alan Hayward
2018-06-21 14:00   ` Simon Marchi

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=20180621093802.79342-1-alan.hayward@arm.com \
    --to=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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).