From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25754 invoked by alias); 27 Jun 2013 01:48:22 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 25248 invoked by uid 89); 27 Jun 2013 01:48:21 -0000 X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-we0-f178.google.com (HELO mail-we0-f178.google.com) (74.125.82.178) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 27 Jun 2013 01:48:20 +0000 Received: by mail-we0-f178.google.com with SMTP id u53so105352wes.23 for ; Wed, 26 Jun 2013 18:48:18 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.19.130 with SMTP id f2mr4529305wje.22.1372297698496; Wed, 26 Jun 2013 18:48:18 -0700 (PDT) Received: by 10.227.48.201 with HTTP; Wed, 26 Jun 2013 18:48:18 -0700 (PDT) In-Reply-To: <20130626184518.GA3080@host2.jankratochvil.net> References: <20130626184518.GA3080@host2.jankratochvil.net> Date: Thu, 27 Jun 2013 01:48:00 -0000 Message-ID: Subject: Re: gdb cannot call help function in replay mode From: jian shen To: Jan Kratochvil Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-06/txt/msg00061.txt.bz2 On Thu, Jun 27, 2013 at 2:45 AM, Jan Kratochvil 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