From: Hui Zhu <teawater@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com
Subject: Re: [RFA/RFC Prec] Add process record skip 6/6 (doc)
Date: Mon, 24 Aug 2009 09:53:00 -0000 [thread overview]
Message-ID: <daef60380908240149n6ed65a95u6bd75750eee21854@mail.gmail.com> (raw)
In-Reply-To: <8363cefkkp.fsf@gnu.org>
On Mon, Aug 24, 2009 at 02:31, Eli Zaretskii<eliz@gnu.org> wrote:
>> From: Hui Zhu <teawater@gmail.com>
>> Date: Sun, 23 Aug 2009 11:33:28 +0800
>> Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com
>>
>> I make a new patch that have some introduction about record skip entry.
>> What do you think about it?
>
> Thanks. This is much better, but I still don't understand something:
>
>> +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.
>
> Which function is that? The 3 "rec skip" commands you document here
> don't give the user a way to specify any functions. So how does
> process record know what function(s) to skip?
Because the change of each function is special, function
record_skip_entry_create need a special record function pointer for
each function that want to skip. For example, in
"5-skip-record-i386-linux.txt".
+ record_skip_entry_create (gdbarch, "printf",
+ i386_linux_process_record_simple_function);
+ record_skip_entry_create (gdbarch, "memset",
+ i386_linux_process_record_memset);
+ record_skip_entry_create (gdbarch, "memcpy",
+ i386_linux_process_record_memset);
i386_linux_process_record_simple_function is for printf.
i386_linux_process_record_memset is for memset and memcpy.
>
>> 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.
>
> Why is this feature useful?
My introduce is not very clear.
Without the skip, to record a function, it need record all the insn change:
1. It need step by step. Speed is low.
2. It need record the change of each insn, it will need a lot of memory.
With the skip, to record a function, it just record the change in the
begin of function, after that, continue.
1. It doesn't need step by step. Speed is hight.
2. it doesn't need record the each insn, it will not need a lot of memory.
Could you help me make this introduce clear?
>
>> +Show the status of record skip.
>
> Will this produce a list of all rec skip entries, or will it just show
> the status of the ``current'' record skip (whatever ``current'' may
> mean in this context)? If it shows a list, how about an example of
> what this list looks like?
This is a example:
(top-gdb) record skip
Process record is not skip.
Id Enb Address What
1 y 0xb7c07330 printf
2 y 0xb7c334b0 memset
3 y 0xb7c339a0 memcpy
(top-gdb) record skip disable 3
(top-gdb) record skip
Process record is not skip.
Id Enb Address What
1 y 0xb7c07330 printf
2 y 0xb7c334b0 memset
3 n 0xb7c339a0 memcpy
(top-gdb) record skip enable
(top-gdb) record skip
Process record is not skip.
Id Enb Address What
1 y 0xb7c07330 printf
2 y 0xb7c334b0 memset
3 y 0xb7c339a0 memcpy
>
> Once I understand these issues, I will be able to suggest how to
> reword this text to be more clear, and also improve the markup.
I will try to make the the doc more clear with your help. Thanks a lot. :)
Hui
next prev parent reply other threads:[~2009-08-24 8:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-19 8:15 Hui Zhu
2009-08-19 18:45 ` Eli Zaretskii
2009-08-23 3:52 ` Hui Zhu
2009-08-23 22:48 ` Eli Zaretskii
2009-08-24 9:53 ` Hui Zhu [this message]
2009-08-24 19:14 ` Eli Zaretskii
2009-08-25 4:25 ` Hui Zhu
2009-08-26 17:54 ` Eli Zaretskii
2009-08-31 13:59 ` Hui Zhu
2009-08-31 17:41 ` Eli Zaretskii
2009-09-01 8:57 ` Hui Zhu
2009-09-01 17:12 ` Eli Zaretskii
2009-09-02 12:01 ` Hui Zhu
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=daef60380908240149n6ed65a95u6bd75750eee21854@mail.gmail.com \
--to=teawater@gmail.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=green@moxielogic.com \
--cc=msnyder@vmware.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