public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Andrew Burgess <aburgess@redhat.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 3/5] gdb: remove get_tdesc_info
Date: Fri, 3 Feb 2023 11:05:13 -0500	[thread overview]
Message-ID: <d4180578-2e6b-e4f4-13f8-6fb2ce10d699@polymtl.ca> (raw)
In-Reply-To: <874js2sq3c.fsf@redhat.com>

On 2/3/23 10:53, Andrew Burgess wrote:
> Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
>> Remove this function, since it's now a trivial access to
>> inferior::tdesc_info.
>>
>> Change-Id: I3e88a8214034f1a4163420b434be11f51eef462c
>> ---
>>  gdb/target-descriptions.c | 28 ++++++++++------------------
>>  1 file changed, 10 insertions(+), 18 deletions(-)
>>
>> diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
>> index 049e42c7ea77..0561a8098c5c 100644
>> --- a/gdb/target-descriptions.c
>> +++ b/gdb/target-descriptions.c
>> @@ -436,14 +436,6 @@ struct tdesc_arch_data
>>    gdbarch_register_reggroup_p_ftype *pseudo_register_reggroup_p = NULL;
>>  };
>>  
>> -/* Get the inferior INF's target description info.  */
>> -
>> -static struct target_desc_info *
>> -get_tdesc_info (struct inferior *inf)
>> -{
>> -  return &inf->tdesc_info;
>> -}
>> -
>>  /* A handle for architecture-specific data associated with the
>>     target description (see struct tdesc_arch_data).  */
>>  
>> @@ -472,8 +464,8 @@ target_desc_info_from_user_p (struct target_desc_info *info)
>>  void
>>  copy_inferior_target_desc_info (struct inferior *destinf, struct inferior *srcinf)
>>  {
>> -  struct target_desc_info *src = get_tdesc_info (srcinf);
>> -  struct target_desc_info *dest = get_tdesc_info (destinf);
>> +  struct target_desc_info *src = &srcinf->tdesc_info;
>> +  struct target_desc_info *dest = &destinf->tdesc_info;
>>  
>>    *dest = *src;
> 
> Would:
> 
>   destinf->tdesc_info = srcinf->tdesc_info;
> 
> not be better now?

For others: this disappears in the next patch anyway.

Simon

  reply	other threads:[~2023-02-03 16:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03 14:21 [PATCH 0/5] Some target_desc_info cleanups Simon Marchi
2023-02-03 14:21 ` [PATCH 1/5] gdb: move target_desc_info to inferior.h Simon Marchi
2023-02-03 14:21 ` [PATCH 2/5] gdb: change inferior::tdesc_info to non-pointer Simon Marchi
2023-02-03 14:21 ` [PATCH 3/5] gdb: remove get_tdesc_info Simon Marchi
2023-02-03 15:53   ` Andrew Burgess
2023-02-03 16:05     ` Simon Marchi [this message]
2023-02-03 14:21 ` [PATCH 4/5] gdb: remove copy_inferior_target_desc_info Simon Marchi
2023-02-03 15:54   ` Andrew Burgess
2023-02-03 16:05     ` Simon Marchi
2023-02-03 14:21 ` [PATCH 5/5] gdb: make target_desc_info_from_user_p a method of target_desc_info Simon Marchi
2023-02-06 18:41   ` Pedro Alves
2023-02-06 19:13     ` Simon Marchi
2023-02-03 15:56 ` [PATCH 0/5] Some target_desc_info cleanups Andrew Burgess
2023-02-03 16:07   ` 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=d4180578-2e6b-e4f4-13f8-6fb2ce10d699@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=aburgess@redhat.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).