caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Pierre Weis <pierre.weis@inria.fr>
To: stein@eecs.harvard.edu (Lex Stein)
Cc: pierre.weis@inria.fr, caml-list@inria.fr
Subject: Re: [Caml-list] debugger losing contact with debuggee process
Date: Mon, 21 Oct 2002 08:58:11 +0200 (MET DST)	[thread overview]
Message-ID: <200210210658.IAA32153@pauillac.inria.fr> (raw)
In-Reply-To: <Pine.BSF.4.44.0210200815490.98557-100000@bowser.eecs.harvard.edu> from Lex Stein at "Oct 20, 102 08:48:39 am"

> > The information that ocamldebug gave you is helpful : it provides the
> > mean to go back way before the bus error (Time 290000), and ensures
> > that the bus error will appear before Time 300000. To go (go) just before
> > the bus error and ask for a backtrace then (bt) is just a matter of
> > dichotomy and is very fast. Once your very near the bus error you can
> > step use instruction stepping (s) and print (p) and next event (n) to
> > understand what happens.
> 
> Yes, but then I need to start up the program again, goto time 290000 and
> step through the code until I hit the bus error. Then I need to note which
> time it happened at, reload the program again, goto that time, and do a
> backtrace.

You need not to reload the program (as mentioned in your trace the
debugger automatically reconnects to the nearest check point).

> The stepping through the code part is of concern to me. There are 10000
> events between time 290000 and 300000. Am I really expect to press "n"
> 10000 times (this is the worst case, but the expected number is 5000,
> which is still a large number for an interactive human operation)? I think
> not.

Dichotomy is there to prevent you for this fastidious task.

> So I jump forward to 295000, see if the core dump happens between
> 290000 and 295000, and repeat. Is this the suggested approach? This is a
> binary search to find the location of the fault. I like O(log n)
> operations, but I like O(1) operations better. Loading up a core dump file
> and doing a backtrace is an O(1) operation for me.

Yes, but there is no such feature in the debugger. Sorry for that.

> Another concern I have with the approach of goto time 290000 is that the
> fault is caused by an external event (receiving an RPC) so it will not
> always be at the same time. What would I do first, the goto or trigger the
> external event ? Both would seem to be problematic.

Yes, our debugger is tuned towards debugging of deterministic
programs. The first thing you should do to use it is to tune your
program to become deterministic first.

Anyhow debugging nn deterministic programs is extremely challenging
and we don't know how to do it in general. (Also our debugger is not
able to help you for that.)

> Your help is appreciated.

You're welcome.

Regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


       reply	other threads:[~2002-10-21  6:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.BSF.4.44.0210200815490.98557-100000@bowser.eecs.harvard.edu>
2002-10-21  6:58 ` Pierre Weis [this message]
2002-10-19  9:16 [Caml-list] Array.resize ? Eray Ozkural
2002-10-19 22:15 ` [Caml-list] debugger losing contact with debuggee process Lex Stein
2002-10-20 10:06   ` Pierre Weis
2002-10-21  9:11   ` Xavier Leroy

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=200210210658.IAA32153@pauillac.inria.fr \
    --to=pierre.weis@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=stein@eecs.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).