This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb cannot call help function in replay mode


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]