Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, msnyder@vmware.com
Subject: Re: [Precord RFA/RFC] Check Linux sys_brk release memory in process  	record and replay.
Date: Wed, 06 May 2009 02:13:00 -0000	[thread overview]
Message-ID: <daef60380905051913q7579eed8pe8b514e72145859c@mail.gmail.com> (raw)
In-Reply-To: <83d4ane6kb.fsf@gnu.org>

Hi Eli,

On Wed, May 6, 2009 at 02:41, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Tue, 5 May 2009 21:07:13 +0800
>> From: Hui Zhu <teawater@gmail.com>
>> Cc: Michael Snyder <msnyder@vmware.com>
>>
>> 15            sbrk (-10);
>> (gdb)
>> The next instruction is syscall brk.  It will release the memory that
>> will cause process record target get error.  Do you want to stop the
>> inferior?([y] or n)
>
> Does every sbrk call with a negative argument cause an error in
> process record target?  What is the reason for that error?
>
> I'm asking because the message wording sounds very threatening.  It
> probably needs rephrasing, but I need to understand the reasons better
> to suggest how.
>

Yes, I think we need it.
If inferior release some memory, the replay will got big error because
prec will set memory old value to this memory.
But we are lucky, glibc memory manage (malloc and free) try to doesn't
call sbrk to release the memory most of time.  I try to let use malloc
and free to let glibc to call sbrk to release the memory, but I
failed.

>>       * gdbarch.sh (process_record_reset): This interface point to
>>       the function that reset the architecture process record and
>>       replay.
>
> I think "reset" is not the best name for this.  How about
> "initialize"?

This interface will be call each time when prec open, so it will reset
the old value.
I think initialize looks like just call once.  For example
"_initialize_infcall".


Thanks,
Hui


  reply	other threads:[~2009-05-06  2:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-05 13:07 Hui Zhu
2009-05-05 13:09 ` Hui Zhu
2009-05-05 18:41 ` Eli Zaretskii
2009-05-06  2:13   ` Hui Zhu [this message]
2009-05-06  3:14     ` Eli Zaretskii
2009-05-06  3:35       ` Hui Zhu
2009-05-06 18:28         ` Eli Zaretskii
2009-05-07  2:21           ` Hui Zhu
2009-05-07  3:20             ` Eli Zaretskii
2009-05-11  7:06               ` Hui Zhu
2009-06-09  2:17                 ` Hui Zhu
2009-06-13 22:56                   ` Michael Snyder
2009-06-14  9:26                     ` Hui Zhu
2009-06-14 17:42                       ` Michael Snyder
2009-06-15  8:04                         ` Hui Zhu
2009-06-15 17:52                           ` Michael Snyder

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=daef60380905051913q7579eed8pe8b514e72145859c@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --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