9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Kenji Arisawa <arisawa@ar.aichi-u.ac.jp>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] validateaddress
Date: Wed, 12 Aug 2009 15:48:40 +0900	[thread overview]
Message-ID: <1B2326AB-19A1-4C73-9BA6-0033FA0191F8@ar.aichi-u.ac.jp> (raw)
In-Reply-To: <dd6fe68a0908110827t5b32ef44r2b8f3645ae8f12de@mail.gmail.com>


Thanks Russ,

ar% ps
...
none        1236297 49979:50   0:00      172K Running  validateaddress
...
ar% acid 1236297
/proc/1236297/text:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
acid: bpset(strcmp)
Waiting...
1236297: exception 50	klook+0x7a	MOVL	0x8(DX),DX
acid: loop 1,20 do { cont(); print("strcmp '", *(*strcmp:s1\s), "'
'",*(*strcmp:s2\s), "'\n"); }
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

1236297: breakpoint	strcmp+0x3	MOVL	s1+0x0(FP),BP
1236297: breakpoint	strcmp	SUBL	$0xc,SP
strcmp 'in' 'prompt'

acid: acid: bpdel(strcmp)
acid: bpset(klook)
acid: cont();
<stdin>:5: (error) msg: pid=1236297 startstop: interrupted
acid: bpdel(klook)


Kenji Arisawa


On 2009/08/12, at 0:27, Russ Cox wrote:

> acid pid
>
> bpset(strcmp)
> loop 1,20 do { cont(); print("strcmp '", *(*strcmp:s1\s), "' '",
> *(*strcmp:s2\s), "'\n"); }
> bpdel(strcmp)
>
> also
>
> bpset(klook)
> cont();
> # wait a while, see if you hit the breakpoint, probably not
> DEL (to stop acid if it didn't hit the breakpoint)
> bpdel(klook)
>
> if you do hit the klook breakpoint then try
> the same sequence but with yyparse instead
> of klook.
>
> the goal is to find some function that isn't being
> repeatedly called.  that helps narrow down the
> source of the infinite loop to code inside that
> function or the ones it calls.
>
> russ
>




  reply	other threads:[~2009-08-12  6:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10  6:11 Kenji Arisawa
2009-08-10 17:13 ` erik quanstrom
2009-08-11  3:57   ` Kenji Arisawa
2009-08-11  4:07     ` erik quanstrom
2009-08-11  5:26       ` Kenji Arisawa
2009-08-11 15:27         ` Russ Cox
2009-08-12  6:48           ` Kenji Arisawa [this message]
2009-08-12 14:59             ` Russ Cox
2009-08-13  1:39               ` Kenji Arisawa
2009-08-13  2:15                 ` Russ Cox

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=1B2326AB-19A1-4C73-9BA6-0033FA0191F8@ar.aichi-u.ac.jp \
    --to=arisawa@ar.aichi-u.ac.jp \
    --cc=9fans@9fans.net \
    /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).