From: Simon Marchi <simon.marchi@polymtl.ca>
To: John Baldwin <jhb@freebsd.org>, gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH 18/24] gdb: migrate i386 and amd64 to the new gdbarch_pseudo_register_write
Date: Sun, 12 Nov 2023 21:59:26 -0500 [thread overview]
Message-ID: <5b47b771-1b0c-465f-8a6e-04d45cea6d3f@polymtl.ca> (raw)
In-Reply-To: <a6d05085-9ede-42fc-8de8-c23ee37af1a4@FreeBSD.org>
On 11/11/23 15:16, John Baldwin wrote:
> On 11/7/23 9:01 PM, Simon Marchi wrote:
>> From: Simon Marchi <simon.marchi@efficios.com>
>>
>> Make i386 and amd64 use the new gdbarch_pseudo_register_write. This
>> fixes writing to pseudo registers in non-current frames for those
>> architectures.
>>
>> Change-Id: I4977e8fe12d2cef116f8834c34cdf6fec618554f
>> ---
>> gdb/amd64-tdep.c | 39 +++----------
>> gdb/i386-tdep.c | 146 +++++++++++++++++------------------------------
>> gdb/i386-tdep.h | 6 +-
>> gdb/value.c | 3 +-
>> gdb/value.h | 6 +-
>> 5 files changed, 66 insertions(+), 134 deletions(-)
>>
>> diff --git a/gdb/value.c b/gdb/value.c
>> index 51dca972a587..5c18bb17a781 100644
>> --- a/gdb/value.c
>> +++ b/gdb/value.c
>> @@ -4062,7 +4062,8 @@ pseudo_to_raw_part (frame_info_ptr next_frame,
>> gdb::array_view<const gdb_byte> pseudo_buf,
>> int raw_reg_num, int raw_offset)
>> {
>> - int raw_reg_size = register_size (get_frame_arch (next_frame), raw_reg_num);
>> + int raw_reg_size
>> + = register_size (frame_unwind_arch (next_frame), raw_reg_num);
>> /* When overflowing a register, put_frame_register_bytes writes to the
>> subsequent registers. We don't want that behavior here, so make sure
>> diff --git a/gdb/value.h b/gdb/value.h
>> index 6a74d4e2c2ee..3b3cb9c00982 100644
>> --- a/gdb/value.h
>> +++ b/gdb/value.h
>> @@ -1664,7 +1664,7 @@ value *pseudo_from_raw_part (frame_info_ptr next_frame, int pseudo_reg_num,
>> /* Write PSEUDO_BUF, the contents of a pseudo register, to part of raw register
>> RAW_REG_NUM starting at RAW_OFFSET. */
>> -void pseudo_to_raw_part (frame_info_ptr this_frame,
>> +void pseudo_to_raw_part (frame_info_ptr next_frame,
>> gdb::array_view<const gdb_byte> pseudo_buf,
>> int raw_reg_num, int raw_offset);
>> @@ -1680,7 +1680,7 @@ value *pseudo_from_concat_raw (frame_info_ptr next_frame, int pseudo_reg_num,
>> /* Write PSEUDO_BUF, the contents of a pseudo register, to the two raw registers
>> RAW_REG_1_NUM and RAW_REG_2_NUM. */
>> -void pseudo_to_concat_raw (frame_info_ptr this_frame,
>> +void pseudo_to_concat_raw (frame_info_ptr next_frame,
>> gdb::array_view<const gdb_byte> pseudo_buf,
>> int raw_reg_1_num, int raw_reg_2_num);
>> @@ -1693,7 +1693,7 @@ value *pseudo_from_concat_raw (frame_info_ptr next_frame, int pseudo_reg_num,
>> /* Write PSEUDO_BUF, the contents of a pseudo register, to the tthreewo raw
>> registers RAW_REG_1_NUM, RAW_REG_2_NUM and RAW_REG_3_NUM. */
>> -void pseudo_to_concat_raw (frame_info_ptr this_frame,
>> +void pseudo_to_concat_raw (frame_info_ptr next_frame,
>> gdb::array_view<const gdb_byte> pseudo_buf,
>> int raw_reg_1_num, int raw_reg_2_num,
>> int raw_reg_3_num);
>
> Should these value.[ch] changes be part of the previous patch (17) instead?
Oh, you're right, will fix.
> Otherwise, the amd64/i386 parts look good to me.
Thanks,
Simon
next prev parent reply other threads:[~2023-11-13 2:59 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 5:00 [PATCH 00/24] Fix reading and writing pseudo registers in non-current frames Simon Marchi
2023-11-08 5:00 ` [PATCH 01/24] gdb: don't handle i386 k registers as pseudo registers Simon Marchi
2023-11-11 19:29 ` John Baldwin
2023-11-08 5:00 ` [PATCH 02/24] gdb: use reg_buffer_common throughout gdbsupport/common-regcache.h Simon Marchi
2023-11-11 19:42 ` John Baldwin
2023-11-08 5:00 ` [PATCH 03/24] gdb: make store_integer take an array_view Simon Marchi
2023-11-08 5:00 ` [PATCH 04/24] gdb: simplify conditions in regcache::{read,write,raw_collect,raw_supply}_part Simon Marchi
2023-11-08 5:00 ` [PATCH 05/24] gdb: change regcache interface to use array_view Simon Marchi
2023-11-13 13:43 ` Andrew Burgess
2023-11-13 14:00 ` Andrew Burgess
2023-11-13 16:47 ` Simon Marchi
2023-11-08 5:00 ` [PATCH 06/24] gdb: fix bugs in {get,put}_frame_register_bytes Simon Marchi
2023-11-13 15:00 ` Andrew Burgess
2023-11-13 19:51 ` Simon Marchi
2023-11-08 5:00 ` [PATCH 07/24] gdb: make put_frame_register take an array_view Simon Marchi
2023-11-08 5:00 ` [PATCH 08/24] gdb: change value_of_register and value_of_register_lazy to take the next frame Simon Marchi
2023-11-08 5:00 ` [PATCH 09/24] gdb: remove frame_register Simon Marchi
2023-11-08 5:00 ` [PATCH 10/24] gdb: make put_frame_register take the next frame Simon Marchi
2023-11-08 5:00 ` [PATCH 11/24] gdb: make put_frame_register_bytes " Simon Marchi
2023-11-08 5:00 ` [PATCH 12/24] gdb: make get_frame_register_bytes " Simon Marchi
2023-11-08 5:00 ` [PATCH 13/24] gdb: add value::allocate_register Simon Marchi
2023-11-08 5:00 ` [PATCH 14/24] gdb: read pseudo register through frame Simon Marchi
2023-11-11 20:11 ` John Baldwin
2023-11-08 5:00 ` [PATCH 15/24] gdb: change parameter name in frame_unwind_register_unsigned declaration Simon Marchi
2023-11-08 5:01 ` [PATCH 16/24] gdb: rename gdbarch_pseudo_register_write to gdbarch_deprecated_pseudo_register_write Simon Marchi
2023-11-14 12:12 ` Andrew Burgess
2023-11-14 15:16 ` Simon Marchi
2023-11-08 5:01 ` [PATCH 17/24] gdb: add gdbarch_pseudo_register_write that takes a frame Simon Marchi
2023-11-14 12:20 ` Andrew Burgess
2023-11-14 15:20 ` Simon Marchi
2023-11-08 5:01 ` [PATCH 18/24] gdb: migrate i386 and amd64 to the new gdbarch_pseudo_register_write Simon Marchi
2023-11-11 20:16 ` John Baldwin
2023-11-13 2:59 ` Simon Marchi [this message]
2023-11-08 5:01 ` [PATCH 19/24] gdb: make aarch64_za_offsets_from_regnum return za_offsets Simon Marchi
2023-11-08 5:01 ` [PATCH 20/24] gdb: add missing raw register read in aarch64_sme_pseudo_register_write Simon Marchi
2023-11-08 5:01 ` [PATCH 21/24] gdb: migrate aarch64 to new gdbarch_pseudo_register_write Simon Marchi
2023-11-08 5:01 ` [PATCH 22/24] gdb: migrate arm to gdbarch_pseudo_register_read_value Simon Marchi
2023-11-08 5:01 ` [PATCH 23/24] gdb: migrate arm to new gdbarch_pseudo_register_write Simon Marchi
2023-11-08 5:01 ` [PATCH 24/24] gdb/testsuite: add tests for unwinding of pseudo registers Simon Marchi
2023-11-08 5:16 ` [PATCH 00/24] Fix reading and writing pseudo registers in non-current frames Simon Marchi
2023-11-09 3:05 ` Simon Marchi
2023-11-08 11:57 ` Luis Machado
2023-11-08 15:47 ` Simon Marchi
2023-11-08 17:08 ` Luis Machado
2023-11-08 19:34 ` Simon Marchi
2023-11-09 19:04 ` Simon Marchi
2023-11-13 13:10 ` Luis Machado
2023-11-13 15:08 ` Luis Machado
2023-11-11 20:26 ` John Baldwin
2023-11-13 3:03 ` Simon Marchi
2023-12-01 16:27 Simon Marchi
2023-12-01 16:27 ` [PATCH 18/24] gdb: migrate i386 and amd64 to the new gdbarch_pseudo_register_write 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=5b47b771-1b0c-465f-8a6e-04d45cea6d3f@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=jhb@freebsd.org \
--cc=simon.marchi@efficios.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).