Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Pedro Alves <palves@redhat.com>
Cc: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Remove some unnecessary inferior_ptid setting/restoring  when fetching/storing registers
Date: Thu, 23 Mar 2017 17:39:00 -0000	[thread overview]
Message-ID: <a8811dc96c51cbe962e2a1dae792c753@polymtl.ca> (raw)
In-Reply-To: <8cc3a2c4-391a-c001-56f5-80f366096e3f@redhat.com>

On 2017-03-23 12:19, Pedro Alves wrote:
> On 03/22/2017 05:29 PM, Simon Marchi wrote:
>> Now that the to_fetch_registers, to_store_registers and
>> to_prepare_to_store target methods don't rely on the value of
>> inferior_ptid anymore, we can remove a bunch of now unnecessary 
>> setting
>> and restoring of inferior_ptid.
>> 
>> The asserts added recently in target_fetch_registers and
>> target_store_registers, which validate that inferior_ptid matches the
>> regcache's ptid, must go away.  It's the whole point of this effort, 
>> to
>> not require inferior_ptid to have a particular value when calling 
>> these
>> functions.
>> 
>> One thing that I noticed is how sol-thread.c's ps_lgetregs and friends
>> use the current value of inferior_ptid instead of what's passed as
>> argument (ph->ptid), unlike proc-service.c's versions of the same
>> functions.  Is it expected?  I left it like this in the current patch,
>> but unless there's a good reason for it to be that way, I guess we
>> should make it use the parameter.
> 
> Probably no good reason.
> 
> 
>> 
>> gdb/ChangeLog:
>> 
>> 	* fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
>> 	inferior_ptid.
>> 	* proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
>> 	ps_lsetfpregs): Likewise.
>> 	* regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
>> 	* sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
>> 	ps_lsetfpregs): Likewise.
>> 	* target.c (target_fetch_registers, target_store_registers):
>> 	Remove asserts.
> 
> LGTM.

Thanks, pushed.


      parent reply	other threads:[~2017-03-23 17:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 17:29 Simon Marchi
2017-03-22 17:51 ` Simon Marchi
2017-03-23 17:00   ` Pedro Alves
     [not found] ` <8cc3a2c4-391a-c001-56f5-80f366096e3f@redhat.com>
2017-03-23 17:39   ` Simon Marchi [this message]

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=a8811dc96c51cbe962e2a1dae792c753@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@ericsson.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