Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: jian shen <vicshen@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: gdb cannot call help function in replay mode
Date: Thu, 27 Jun 2013 01:48:00 -0000	[thread overview]
Message-ID: <CAC5CAUqBx+BzMjtF0E=b_6et_ToA6sDjkZ5JhhFKA7UZGWp58g@mail.gmail.com> (raw)
In-Reply-To: <20130626184518.GA3080@host2.jankratochvil.net>

On Thu, Jun 27, 2013 at 2:45 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:

>> In real project, I have some helper function to dump what a handle is.  But in
>> replay mode, I could not call such functions.  This limitation makes the replay
>> mode almost unusable to me.  Any suggestion?
>
> You should use Python Pretty Printer instead.  This will also work for core
> file analysis where you also cannot call inferior functions.
>
>
> Jan

Thanks, I got it.
But sometimes the code is from another library which I don't have the
source code.
They only provide a set of API to query or process the handles.  In
this way it's not
easy to write Python Pretty Printer.

Is it possible that gdb could be enhanced that in replay mode, when
the function is
interactively called from gdb, it pretend to write the necessary info
to continue the call,
but after the call is finished, every written memory is rolled back,
and nothing is
actually written, and no execution log is changed.  Is it doable?

In my understanding, it's always meaningless to write anything in replay mode.
So it's not perfect just give warning that it will make the replay
mode unusable.
It's better that the written is completely not allowed in replay mode.

Or anyone has better idea?

Thanks,
Jian


      reply	other threads:[~2013-06-27  1:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25  4:11 jian shen
2013-06-26 18:45 ` Jan Kratochvil
2013-06-27  1:48   ` jian shen [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='CAC5CAUqBx+BzMjtF0E=b_6et_ToA6sDjkZ5JhhFKA7UZGWp58g@mail.gmail.com' \
    --to=vicshen@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=jan.kratochvil@redhat.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