From: Simon Marchi <simark@simark.ca>
To: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>,
Simon Marchi <simon.marchi@efficios.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: Luis Machado <luis.machado@arm.com>,
John Baldwin <jhb@freebsd.org>,
Andrew Burgess <aburgess@redhat.com>
Subject: Re: [PATCH v2 02/24] gdb: use reg_buffer_common throughout gdbsupport/common-regcache.h
Date: Thu, 30 Nov 2023 13:01:10 -0500 [thread overview]
Message-ID: <54c72205-4fd7-464e-b2f1-c5b55134301f@simark.ca> (raw)
In-Reply-To: <DM4PR11MB730354406FCA8E144F591610C482A@DM4PR11MB7303.namprd11.prod.outlook.com>
On 11/30/23 11:11, Aktemur, Tankut Baris wrote:
> On Friday, November 24, 2023 10:26 PM, Simon Marchi wrote:
>> diff --git a/gdbserver/regcache.cc b/gdbserver/regcache.cc
>> index 2e75a948a198..336b00008be5 100644
>> --- a/gdbserver/regcache.cc
>> +++ b/gdbserver/regcache.cc
>> @@ -21,6 +21,8 @@
>> #include "gdbthread.h"
>> #include "tdesc.h"
>> #include "gdbsupport/rsp-low.h"
>> +#include "gdbsupport/gdb-checked-static-cast.h"
>> +
>> #ifndef IN_PROCESS_AGENT
>>
>> struct regcache *
>> @@ -64,7 +66,7 @@ get_thread_regcache (struct thread_info *thread, int fetch)
>>
>> /* See gdbsupport/common-regcache.h. */
>>
>> -struct regcache *
>> +reg_buffer_common *
>> get_thread_regcache_for_ptid (ptid_t ptid)
>> {
>> return get_thread_regcache (find_thread_ptid (ptid), 1);
>> @@ -307,9 +309,10 @@ register_size (const struct target_desc *tdesc, int n)
>> /* See gdbsupport/common-regcache.h. */
>>
>> int
>> -regcache_register_size (const struct regcache *regcache, int n)
>> +regcache_register_size (const reg_buffer_common *regcache, int n)
>> {
>> - return register_size (regcache->tdesc, n);
>> + return register_size
>> + (gdb::checked_static_cast<const struct regcache *> (regcache)->tdesc, n);
>> }
>>
>> static unsigned char *
>> @@ -437,13 +440,14 @@ regcache::raw_collect (int n, void *buf) const
>> }
>>
>> enum register_status
>> -regcache_raw_read_unsigned (struct regcache *regcache, int regnum,
>> +regcache_raw_read_unsigned (reg_buffer_common *reg_buf, int regnum,
>> ULONGEST *val)
>> {
>> int size;
>> + regcache *regcache = gdb::checked_static_cast<struct regcache *> (reg_buf);
>>
>> gdb_assert (regcache != NULL);
>> -
>> +
>
> Trailing space seems to have been inserted here.
Thanks, fixed.
Simon
next prev parent reply other threads:[~2023-11-30 18:01 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 21:26 [PATCH v2 00/24] Fix reading and writing pseudo registers in non-current frames Simon Marchi
2023-11-24 21:26 ` [PATCH v2 01/24] gdb: don't handle i386 k registers as pseudo registers Simon Marchi
2023-11-24 21:26 ` [PATCH v2 02/24] gdb: use reg_buffer_common throughout gdbsupport/common-regcache.h Simon Marchi
2023-11-30 11:45 ` Aktemur, Tankut Baris
2023-11-30 21:02 ` Simon Marchi
2023-11-30 16:11 ` Aktemur, Tankut Baris
2023-11-30 18:01 ` Simon Marchi [this message]
2023-11-24 21:26 ` [PATCH v2 03/24] gdb: make store_integer take an array_view Simon Marchi
2023-11-30 11:40 ` Aktemur, Tankut Baris
2023-11-30 17:51 ` Simon Marchi
2023-11-24 21:26 ` [PATCH v2 04/24] gdb: simplify conditions in regcache::{read,write,raw_collect,raw_supply}_part Simon Marchi
2023-11-24 21:26 ` [PATCH v2 05/24] gdb: change regcache interface to use array_view Simon Marchi
2023-11-30 17:58 ` Aktemur, Tankut Baris
2023-11-30 20:09 ` Simon Marchi
2023-11-24 21:26 ` [PATCH v2 06/24] gdb: fix bugs in {get,put}_frame_register_bytes Simon Marchi
2023-11-24 21:26 ` [PATCH v2 07/24] gdb: make put_frame_register take an array_view Simon Marchi
2023-11-24 21:26 ` [PATCH v2 08/24] gdb: change value_of_register and value_of_register_lazy to take the next frame Simon Marchi
2023-11-24 21:26 ` [PATCH v2 09/24] gdb: remove frame_register Simon Marchi
2023-11-24 21:26 ` [PATCH v2 10/24] gdb: make put_frame_register take the next frame Simon Marchi
2023-11-24 21:26 ` [PATCH v2 11/24] gdb: make put_frame_register_bytes " Simon Marchi
2023-11-24 21:26 ` [PATCH v2 12/24] gdb: make get_frame_register_bytes " Simon Marchi
2023-11-24 21:26 ` [PATCH v2 13/24] gdb: add value::allocate_register Simon Marchi
2023-11-24 21:26 ` [PATCH v2 14/24] gdb: read pseudo register through frame Simon Marchi
2023-11-24 21:26 ` [PATCH v2 15/24] gdb: change parameter name in frame_unwind_register_unsigned declaration Simon Marchi
2023-11-24 21:26 ` [PATCH v2 16/24] gdb: rename gdbarch_pseudo_register_write to gdbarch_deprecated_pseudo_register_write Simon Marchi
2023-11-24 21:26 ` [PATCH v2 17/24] gdb: add gdbarch_pseudo_register_write that takes a frame Simon Marchi
2023-11-24 21:26 ` [PATCH v2 18/24] gdb: migrate i386 and amd64 to the new gdbarch_pseudo_register_write Simon Marchi
2023-11-24 21:26 ` [PATCH v2 19/24] gdb: make aarch64_za_offsets_from_regnum return za_offsets Simon Marchi
2023-11-27 11:42 ` Luis Machado
2023-11-27 15:56 ` Simon Marchi
2023-11-24 21:26 ` [PATCH v2 20/24] gdb: add missing raw register read in aarch64_sme_pseudo_register_write Simon Marchi
2023-11-27 11:43 ` Luis Machado
2023-11-27 15:57 ` Simon Marchi
2023-11-24 21:26 ` [PATCH v2 21/24] gdb: migrate aarch64 to new gdbarch_pseudo_register_write Simon Marchi
2023-11-28 12:35 ` Luis Machado
2023-11-24 21:26 ` [PATCH v2 22/24] gdb: migrate arm to gdbarch_pseudo_register_read_value Simon Marchi
2023-11-27 16:42 ` Luis Machado
2023-11-24 21:26 ` [PATCH v2 23/24] gdb: migrate arm to new gdbarch_pseudo_register_write Simon Marchi
2023-11-27 16:42 ` Luis Machado
2023-11-24 21:26 ` [PATCH v2 24/24] gdb/testsuite: add tests for unwinding of pseudo registers Simon Marchi
2023-11-27 11:53 ` Luis Machado
2023-11-27 15:59 ` 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=54c72205-4fd7-464e-b2f1-c5b55134301f@simark.ca \
--to=simark@simark.ca \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jhb@freebsd.org \
--cc=luis.machado@arm.com \
--cc=simon.marchi@efficios.com \
--cc=tankut.baris.aktemur@intel.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).