public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH 2/2] gdb: use put_frame_register instead of put_frame_register_bytes in pseudo_to_concat_raw
Date: Mon, 18 Dec 2023 15:02:47 -0500	[thread overview]
Message-ID: <20231218200256.28489-2-simon.marchi@efficios.com> (raw)
In-Reply-To: <20231218200256.28489-1-simon.marchi@efficios.com>

Here, we write single complete registers, we don't need the
functionality of put_frame_register_bytes, use put_frame_register
instead.

Change-Id: I987867a27249db4f792a694b47ecb21c44f64d08
---
 gdb/value.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/gdb/value.c b/gdb/value.c
index bca3fd07425f..7523af142348 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -4123,13 +4123,13 @@ pseudo_to_concat_raw (frame_info_ptr next_frame,
   gdbarch *arch = frame_unwind_arch (next_frame);
 
   int raw_reg_1_size = register_size (arch, raw_reg_1_num);
-  put_frame_register_bytes (next_frame, raw_reg_1_num, 0,
-			    pseudo_buf.slice (src_offset, raw_reg_1_size));
+  put_frame_register (next_frame, raw_reg_1_num,
+		      pseudo_buf.slice (src_offset, raw_reg_1_size));
   src_offset += raw_reg_1_size;
 
   int raw_reg_2_size = register_size (arch, raw_reg_2_num);
-  put_frame_register_bytes (next_frame, raw_reg_2_num, 0,
-			    pseudo_buf.slice (src_offset, raw_reg_2_size));
+  put_frame_register (next_frame, raw_reg_2_num,
+		      pseudo_buf.slice (src_offset, raw_reg_2_size));
   src_offset += raw_reg_2_size;
 
   gdb_assert (src_offset == pseudo_buf.size ());
@@ -4177,18 +4177,18 @@ pseudo_to_concat_raw (frame_info_ptr next_frame,
   gdbarch *arch = frame_unwind_arch (next_frame);
 
   int raw_reg_1_size = register_size (arch, raw_reg_1_num);
-  put_frame_register_bytes (next_frame, raw_reg_1_num, 0,
-			    pseudo_buf.slice (src_offset, raw_reg_1_size));
+  put_frame_register (next_frame, raw_reg_1_num,
+		      pseudo_buf.slice (src_offset, raw_reg_1_size));
   src_offset += raw_reg_1_size;
 
   int raw_reg_2_size = register_size (arch, raw_reg_2_num);
-  put_frame_register_bytes (next_frame, raw_reg_2_num, 0,
-			    pseudo_buf.slice (src_offset, raw_reg_2_size));
+  put_frame_register (next_frame, raw_reg_2_num,
+		      pseudo_buf.slice (src_offset, raw_reg_2_size));
   src_offset += raw_reg_2_size;
 
   int raw_reg_3_size = register_size (arch, raw_reg_3_num);
-  put_frame_register_bytes (next_frame, raw_reg_3_num, 0,
-			    pseudo_buf.slice (src_offset, raw_reg_3_size));
+  put_frame_register (next_frame, raw_reg_3_num,
+		      pseudo_buf.slice (src_offset, raw_reg_3_size));
   src_offset += raw_reg_3_size;
 
   gdb_assert (src_offset == pseudo_buf.size ());
-- 
2.43.0


  reply	other threads:[~2023-12-18 20:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-18 20:02 [PATCH 1/2] gdb: remove stale comment in value_assign Simon Marchi
2023-12-18 20:02 ` Simon Marchi [this message]
2023-12-19 15:06   ` [PATCH 2/2] gdb: use put_frame_register instead of put_frame_register_bytes in pseudo_to_concat_raw Tom Tromey
2023-12-19 16:12     ` Simon Marchi
2023-12-19 15:05 ` [PATCH 1/2] gdb: remove stale comment in value_assign Tom Tromey

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=20231218200256.28489-2-simon.marchi@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    /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).