This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/3] btrace: pretend we're not replaying when generating a core file
- From: Pedro Alves <palves at redhat dot com>
- To: Markus Metzger <markus dot t dot metzger at intel dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 04 Jun 2014 18:03:03 +0100
- Subject: Re: [PATCH 3/3] btrace: pretend we're not replaying when generating a core file
- Authentication-results: sourceware.org; auth=none
- References: <1400761183-21956-1-git-send-email-markus dot t dot metzger at intel dot com> <1400761183-21956-3-git-send-email-markus dot t dot metzger at intel dot com>
On 05/22/2014 01:19 PM, Markus Metzger wrote:
> Use the gcore_start and gcore_end observers to pretend that we are not
> replaying while generating a core file. This will forward fetch and store
> registers as well as xfer memory calls to the target beneath.
Using observers for this doesn't sound ideal to me -- e.g., mid-term as
we go multi-target, and make more things async (and potentially parallel,
even) we'd have to make the observer know which target is the current, and
whether it's record-btrace anyway. As this is a target-side detail, I think
we should instead have a pair of target_prepare_to_generate_core /
target_done_generating_core target hooks. Not much unlike target_prepare_to_store.
Could you try that please?
--
Pedro Alves