This is the mail archive of the gdb@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: System call support in reversible debugging


On Mon, Nov 30, 2009 at 8:27 PM, Hui Zhu <teawater@gmail.com> wrote:
> Cool! I think your explain is very clear. Thanks. ?:)
>
> Hui
>
> On Sun, Nov 29, 2009 at 01:40, Michael Snyder <msnyder@vmware.com> wrote:
>> Sean Chen wrote:
>>>
>>> On Sat, Nov 28, 2009 at 2:07 AM, Michael Snyder <msnyder@vmware.com>
>>> wrote:
>>>>
>>>> These are two separate questions. ?I think the one you started with
>>>> is can gdb record a system call, and the answer is "yes".
>>>>
>>>>
>>>> The issue with mmap has a lot of history, and rather than try to
>>>> explain it, I urge you to look up the threads which have "mmap"
>>>> or "sbrk" in the title) and read them.
>>>>
>>>>
>>>
>>> Thanks for the explanation. That is very kind of you.
>>>
>>> I am confused about the first question. How does gdb record the system
>>> call instructions? You know, they are in the kernel space? It seems
>>> that I must have made a mistake somewhere. Please help to clarify.
>>>
>>> Thanks in advance.
>>
>> Sean,
>>
>> I wish I understood this better -- maybe Hui will explain it more.
>>
>> As I understand it, each system call is recorded as if it were a
>> single instruction. ?Instead of 'tracing' into the system code,
>> we know the specific side effects for each system call, and for
>> instance if the syscall will write to a buffer we take a snapshot
>> of that buffer first.
>>
>> Michael
>>
>>
>

Hi Michael and Hui,

I am sorry for my late response.

Thanks for your explanation. So we can’t treat the system calls as a
black box and have to understand the detailed implementation of each
system call. I think we need to understand every lines of the code in
the system calls carefully enough, and care about the difference of
the Linux kernel since the code of system calls might change
frequently. Do we have any good ways to do it?

Thanks.

-- 
Best Regards,
Sean Chen


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