This is the mail archive of the gdb-patches@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: [RFA/RFC Prec] Add process record skip 6/6 (doc)


On Tue, Aug 25, 2009 at 03:03, Eli Zaretskii<eliz@gnu.org> wrote:
>> From: Hui Zhu <teawater@gmail.com>
>> Date: Mon, 24 Aug 2009 16:49:42 +0800
>> Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com
>>
>> 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.
>
> So we currently support record skip of only 3 functions, the ones
> mentioned above, is that right? ?In 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.

What do you think about the doc like this:
The record skip support following functions:
I386-Linux printf, memcpy, memset.

>
>> 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.
>
> Do we lose any information because of skip? ?If 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,  he will need setp by step without skip like in before.
For example, debug the libc.

Thanks,
Hui


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