From: Simon Marchi <simon.marchi@ericsson.com>
To: <gdb-patches@sourceware.org>
Subject: Re: [PATCH 5/7] Pass ptid to target_fetch_registers
Date: Wed, 08 Mar 2017 21:08:00 -0000 [thread overview]
Message-ID: <567c2be1-ddbc-6728-c122-f78ca1728e09@ericsson.com> (raw)
In-Reply-To: <20170308164140.7281-6-simon.marchi@ericsson.com>
On 17-03-08 11:41 AM, Simon Marchi wrote:
> This patch adds a ptid parameter to the target_fetch_registers and the
> to_fetch_registers method of target_ops. The implementations are
> therefore expected to rely on this and not on inferior_ptid.
I managed to build GDB on FreeBSD, and it showed I had forgotten a few spots
in bsd-kvm.c. Consider this diff to be part of the patch as well:
diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c
index 7ca59ba2b9..2eac0d5289 100644
--- a/gdb/bsd-kvm.c
+++ b/gdb/bsd-kvm.c
@@ -98,7 +98,7 @@ bsd_kvm_open (const char *arg, int from_tty)
add_thread_silent (bsd_kvm_ptid);
inferior_ptid = bsd_kvm_ptid;
- target_fetch_registers (get_current_regcache (), -1);
+ target_fetch_registers (get_current_regcache (), inferior_ptid, -1);
reinit_frame_cache ();
print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC, 1);
@@ -297,7 +297,7 @@ bsd_kvm_proc_cmd (char *arg, int fromtty)
if (kvm_read (core_kd, addr, &bsd_kvm_paddr, sizeof bsd_kvm_paddr) == -1)
error (("%s"), kvm_geterr (core_kd));
- target_fetch_registers (get_current_regcache (), -1);
+ target_fetch_registers (get_current_regcache (), inferior_ptid, -1);
reinit_frame_cache ();
print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC, 1);
@@ -317,7 +317,7 @@ bsd_kvm_pcb_cmd (char *arg, int fromtty)
bsd_kvm_paddr = (struct pcb *)(u_long) parse_and_eval_address (arg);
- target_fetch_registers (get_current_regcache (), -1);
+ target_fetch_registers (get_current_regcache (), inferior_ptid, -1);
reinit_frame_cache ();
print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC, 1);
next prev parent reply other threads:[~2017-03-08 21:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 16:42 [PATCH 0/7] Pass ptid to target_ops register methods Simon Marchi
2017-03-08 16:42 ` [PATCH 3/7] Define and use typedefs for bsd_uthread_ops fields Simon Marchi
2017-03-08 16:42 ` [PATCH 6/7] Pass ptid to target_store_registers Simon Marchi
2017-03-08 16:42 ` [PATCH 4/7] Pass down ptid in bsd_uthread_ops layer Simon Marchi
2017-03-08 16:42 ` [PATCH 1/7] windows: Don't use current_thread for register fetch/store Simon Marchi
2017-03-08 16:42 ` [PATCH 2/7] Add overload of s390_inferior_tid with a parameter Simon Marchi
2017-03-08 16:42 ` [PATCH 5/7] Pass ptid to target_fetch_registers Simon Marchi
2017-03-08 21:08 ` Simon Marchi [this message]
2017-03-08 16:42 ` [PATCH 7/7] Pass ptid to to_prepare_to_store Simon Marchi
2017-03-08 17:03 ` [PATCH 0/7] Pass ptid to target_ops register methods Simon Marchi
2017-03-08 23:31 ` Pedro Alves
2017-03-10 16:06 ` Simon Marchi
2017-03-10 17:12 ` Ulrich Weigand
2017-03-10 17:51 ` 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=567c2be1-ddbc-6728-c122-f78ca1728e09@ericsson.com \
--to=simon.marchi@ericsson.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