Re: gdb cannot call help function in replay mode
jian shen <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CAC5CAUqBx+BzMjtF0E=b_6et_ToA6sDjkZ5JhhFKA7UZGWp58g@mail.gmail.com> |
On Thu, Jun 27, 2013 at 2:45 AM, Jan Kratochvil <[email protected]> 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