From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3819 invoked by alias); 31 Aug 2009 13:26:35 -0000 Received: (qmail 3808 invoked by uid 22791); 31 Aug 2009 13:26:34 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_37,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f185.google.com (HELO mail-pz0-f185.google.com) (209.85.222.185) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 31 Aug 2009 13:26:26 +0000 Received: by pzk15 with SMTP id 15so2898642pzk.24 for ; Mon, 31 Aug 2009 06:26:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.131.1 with SMTP id i1mr11529wfn.339.1251725184106; Mon, 31 Aug 2009 06:26:24 -0700 (PDT) In-Reply-To: <83skfecvmz.fsf@gnu.org> References: <837hwzir3w.fsf@gnu.org> <8363cefkkp.fsf@gnu.org> <83fxbhdofo.fsf@gnu.org> <83skfecvmz.fsf@gnu.org> From: Hui Zhu Date: Mon, 31 Aug 2009 13:59:00 -0000 Message-ID: Subject: Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) To: Eli Zaretskii Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com Content-Type: multipart/mixed; boundary=000e0cd72d34f48d8004726ffae8 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-08/txt/msg00583.txt.bz2 --000e0cd72d34f48d8004726ffae8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 4132 On Thu, Aug 27, 2009 at 01:50, Eli Zaretskii wrote: >> From: Hui Zhu >> Date: Tue, 25 Aug 2009 11:47:09 +0800 >> Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com >> >> >> i386_linux_process_record_simple_function is for printf. >> >> i386_linux_process_record_memset is for memset and memcpy. >> > >> > So we currently support record skip of only 3 functions, the ones >> > mentioned above, is that right? =A0In that case, we should document >> > those functions in the manual, I think. >> >> Yes, I think after this feature in, we can add more and more functions >> to support skip. > > But then the proposed code is IMHO awfully limited, isn't it? =A0Why > not add some more general mechanism, for several broad classes of > functions (like the `simple_function' class you used for `printf'), > and let the user specify which functions she wants to skip, instead of > hard-coding the functions in GDB? > > By contrast, the suggested code will cause us to have gobs of library > functions intimately known to GDB, and will bloat the executable, for > starters. > > Also, why is this code being make Linux-specific? =A0Surely, most, if > not all, other implementations of `printf', `memset' and `memcpy' have > the exact same API and the same external effects as those you have in > glibc, no? The api is same, but the ABI for each arch and os is not same, each printf, memset or memcpy of each arch-os will get the argument from different memory and different register. And they will change different memory and reg. So it be designed to arch-os special. > >> What do you think about the doc like this: >> The record skip support following functions: >> I386-Linux printf, memcpy, memset. > > If we want to hard-code the functions, then we need something like > this in the manual: > > =A0Only some standard functions are currently supported by the > =A0@code{record skip} command; type the command without arguments to > =A0see the full list. OK. > >> > Do we lose any information because of skip? =A0If not, why don't we do >> > that always, why do we need an option to enable and disable that? >> > >> >> This is a very good question. >> It will not lose any information. >> I add a disable function because if customer want reverse debug inside >> the function, =A0he will need setp by step without skip like in before. >> For example, debug the libc. > > Okay, but then at least let's have it on by default. > Yes, all of them will set to on by default. I make a new patch. Please help me with it. Thanks, Hui 2008-08-31 Hui Zhu * gdb.texinfo (Process Record and Replay): Document 'record skip', 'record skip enable' and 'record skip disable'. --- doc/gdb.texinfo | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) --- a/doc/gdb.texinfo +++ b/doc/gdb.texinfo @@ -5214,6 +5214,31 @@ When record target runs in replay mode ( subsequent execution log and begin to record a new execution log starting from the current address. This means you will abandon the previously recorded ``future'' and begin recording a new ``future''. + +@kindex record skip +@kindex rec skip +@item record skip +The record skip entry is a special breakpoint. When the process +record and replay target start, it will be inserted to the +begin of a function. When this breakpoint break the inferior and +@value{GDBN} is in record mode, @value{GDBN} will skip record all +the execution log of this function's instructions and record the +change of memory and registers of this function as one instruction. +Show the status of record skip. + +Only some standard functions are currently supported by the +@code{record skip} command; type the command without arguments to +see the full list. + +@kindex record skip disable +@kindex rec skip disable +@item record skip disable @r{[}id@r{]} +Disable the specified record skip entry (or all record skip entries). + +@kindex record skip enable +@kindex rec skip enable +@item record skip enable @r{[}id@r{]} +Enable the specified record skip entry (or all record skip entries). @end table --000e0cd72d34f48d8004726ffae8 Content-Type: text/plain; charset=US-ASCII; name="6-skip-record-doc.txt" Content-Disposition: attachment; filename="6-skip-record-doc.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fz18u65f0 Content-length: 1883 LS0tCiBkb2MvZ2RiLnRleGluZm8gfCAgIDI1ICsrKysrKysrKysrKysrKysr KysrKysrKysKIDEgZmlsZSBjaGFuZ2VkLCAyNSBpbnNlcnRpb25zKCspCgot LS0gYS9kb2MvZ2RiLnRleGluZm8KKysrIGIvZG9jL2dkYi50ZXhpbmZvCkBA IC01MjE0LDYgKzUyMTQsMzEgQEAgV2hlbiByZWNvcmQgdGFyZ2V0IHJ1bnMg aW4gcmVwbGF5IG1vZGUgKAogc3Vic2VxdWVudCBleGVjdXRpb24gbG9nIGFu ZCBiZWdpbiB0byByZWNvcmQgYSBuZXcgZXhlY3V0aW9uIGxvZyBzdGFydGlu ZwogZnJvbSB0aGUgY3VycmVudCBhZGRyZXNzLiAgVGhpcyBtZWFucyB5b3Ug d2lsbCBhYmFuZG9uIHRoZSBwcmV2aW91c2x5CiByZWNvcmRlZCBgYGZ1dHVy ZScnIGFuZCBiZWdpbiByZWNvcmRpbmcgYSBuZXcgYGBmdXR1cmUnJy4KKwor QGtpbmRleCByZWNvcmQgc2tpcAorQGtpbmRleCByZWMgc2tpcAorQGl0ZW0g cmVjb3JkIHNraXAKK1RoZSByZWNvcmQgc2tpcCBlbnRyeSBpcyBhIHNwZWNp YWwg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