Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Markus Metzger <markus.t.metzger@intel.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 3/3] btrace: pretend we're not replaying when generating a core file
Date: Tue, 24 Jun 2014 13:19:00 -0000	[thread overview]
Message-ID: <53A97AF5.3020804@redhat.com> (raw)
In-Reply-To: <1403599872-25299-3-git-send-email-markus.t.metzger@intel.com>

Hi Markus,

On 06/24/2014 09:51 AM, Markus Metzger wrote:
> When generating a core file using the "generate-core-file" command while
> replaying with the btrace record target, we won't be able to access all
> registers and all memory.  This leads to an assertion.

Please paste the gdb output showing the assertion in question here in
the commit log for future reference.

> 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.



>  
> +/* The to_prepare_to_generate_core target method.  */
> +
> +static void
> +record_btrace_prepare_to_generate_core (struct target_ops *self)
> +{
> +  record_btrace_generating_corefile = 1;
> +}
> +
> +/* The to_done_generating_core target method.  */
> +
> +static void
> +record_btrace_done_generating_core (struct target_ops *self)
> +{
> +  record_btrace_generating_corefile = 0;

This flag should also be cleared in record_btrace_open,
in case the target was previously abruptly closed between
the record_btrace_prepare_to_generate_core
and record_btrace_done_generating_core calls.

OK with that change.

Thank you.

-- 
Pedro Alves


  reply	other threads:[~2014-06-24 13:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24  8:51 [PATCH v2 1/3] make_corefile_notes: have caller free returned memory Markus Metzger
2014-06-24  8:51 ` [PATCH v2 2/3] gcore, target: allow target to prepare/cleanup for/after core file generation Markus Metzger
2014-06-24 13:11   ` Pedro Alves
2014-06-24  8:52 ` [PATCH v2 3/3] btrace: pretend we're not replaying when generating a core file Markus Metzger
2014-06-24 13:19   ` Pedro Alves [this message]
2014-06-24 12:58 ` [PATCH v2 1/3] make_corefile_notes: have caller free returned memory Pedro Alves
2014-06-24 13:44 ` Tom Tromey
2014-06-24 14:18   ` Metzger, Markus T

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=53A97AF5.3020804@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@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