9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] OT: Acid question?
@ 2006-09-14 14:41 ISHWAR RATTAN
  2006-09-14 16:33 ` Skip Tavakkolian
  2006-09-14 23:56 ` Russ Cox
  0 siblings, 2 replies; 11+ messages in thread
From: ISHWAR RATTAN @ 2006-09-14 14:41 UTC (permalink / raw)
  To: 9fans


I am trying to learn how to use acid for source
level debugging using the built-in functions. I waould like
to know how to display/exmine the varibales used in the
program. Sample code for context:
  void main()
  {
    int a, b, c;
    a = 12;
    b = 21;
    c = a + b;
    print("c: %d\n", c);
    exits(nil);
  }

  program is compiled and acid is called on the image:
  acid: new()
  ..
  acid: bpset(print)
  ..
  acid: next()
  ..
  at this point a = 12 has been executed. How to examine
  the value in acid?

-ishwar



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] OT: Acid question?
  2006-09-14 14:41 [9fans] OT: Acid question? ISHWAR RATTAN
@ 2006-09-14 16:33 ` Skip Tavakkolian
  2006-09-14 17:59   ` Tharaneedharan Vilwanathan
  2006-09-14 20:24   ` ISHWAR RATTAN
  2006-09-14 23:56 ` Russ Cox
  1 sibling, 2 replies; 11+ messages in thread
From: Skip Tavakkolian @ 2006-09-14 16:33 UTC (permalink / raw)
  To: 9fans

*(main:a\D)

/sys/doc/acid.ps
/sys/doc/acidpaper.ps

> I am trying to learn how to use acid for source
> level debugging using the built-in functions. I waould like
> to know how to display/exmine the varibales used in the
> program. Sample code for context:
>   void main()
>   {
>     int a, b, c;
>     a = 12;
>     b = 21;
>     c = a + b;
>     print("c: %d\n", c);
>     exits(nil);
>   }
> 
>   program is compiled and acid is called on the image:
>   acid: new()
>   ..
>   acid: bpset(print)
>   ..
>   acid: next()
>   ..
>   at this point a = 12 has been executed. How to examine
>   the value in acid?
> 
> -ishwar



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] OT: Acid question?
  2006-09-14 16:33 ` Skip Tavakkolian
@ 2006-09-14 17:59   ` Tharaneedharan Vilwanathan
  2006-09-14 19:13     ` ISHWAR RATTAN
  2006-09-14 20:24   ` ISHWAR RATTAN
  1 sibling, 1 reply; 11+ messages in thread
From: Tharaneedharan Vilwanathan @ 2006-09-14 17:59 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Acid Tutorial by Tad Hunt also may be useful. I see it in
/doc/acidtut.pdf in Inferno release but I couldnt find a web link.

regards
dharani

On 9/14/06, Skip Tavakkolian <9nut@9netics.com> wrote:
> *(main:a\D)
>
> /sys/doc/acid.ps
> /sys/doc/acidpaper.ps
>
> > I am trying to learn how to use acid for source
> > level debugging using the built-in functions. I waould like
> > to know how to display/exmine the varibales used in the
> > program. Sample code for context:
> >   void main()
> >   {
> >     int a, b, c;
> >     a = 12;
> >     b = 21;
> >     c = a + b;
> >     print("c: %d\n", c);
> >     exits(nil);
> >   }
> >
> >   program is compiled and acid is called on the image:
> >   acid: new()
> >   ..
> >   acid: bpset(print)
> >   ..
> >   acid: next()
> >   ..
> >   at this point a = 12 has been executed. How to examine
> >   the value in acid?
> >
> > -ishwar
>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] OT: Acid question?
  2006-09-14 17:59   ` Tharaneedharan Vilwanathan
@ 2006-09-14 19:13     ` ISHWAR RATTAN
  2006-09-14 21:49       ` Tharaneedharan Vilwanathan
  0 siblings, 1 reply; 11+ messages in thread
From: ISHWAR RATTAN @ 2006-09-14 19:13 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I had looked through /sys/doc/acid.* and was unable to find
the information there. Maybe it is something trivial :-(

-ishwar

On Thu, 14 Sep 2006, Tharaneedharan Vilwanathan wrote:

> Acid Tutorial by Tad Hunt also may be useful. I see it in
> /doc/acidtut.pdf in Inferno release but I couldnt find a web link.
>
> regards
> dharani
>
> On 9/14/06, Skip Tavakkolian <9nut@9netics.com> wrote:
>> *(main:a\D)
>> 
>> /sys/doc/acid.ps
>> /sys/doc/acidpaper.ps
>> 
>> > I am trying to learn how to use acid for source
>> > level debugging using the built-in functions. I waould like
>> > to know how to display/exmine the varibales used in the
>> > program. Sample code for context:
>> >   void main()
>> >   {
>> >     int a, b, c;
>> >     a = 12;
>> >     b = 21;
>> >     c = a + b;
>> >     print("c: %d\n", c);
>> >     exits(nil);
>> >   }
>> >
>> >   program is compiled and acid is called on the image:
>> >   acid: new()
>> >   ..
>> >   acid: bpset(print)
>> >   ..
>> >   acid: next()
>> >   ..
>> >   at this point a = 12 has been executed. How to examine
>> >   the value in acid?
>> >
>> > -ishwar
>> 
>> 
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] OT: Acid question?
  2006-09-14 16:33 ` Skip Tavakkolian
  2006-09-14 17:59   ` Tharaneedharan Vilwanathan
@ 2006-09-14 20:24   ` ISHWAR RATTAN
  2006-09-14 20:40     ` Axel Belinfante
  1 sibling, 1 reply; 11+ messages in thread
From: ISHWAR RATTAN @ 2006-09-14 20:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

acid: *(main:a\D)

produces:
<stdin:23:(error) colon: local variable not found

-ishwar


On Thu, 14 Sep 2006, Skip Tavakkolian wrote:

> *(main:a\D)
>
> /sys/doc/acid.ps
> /sys/doc/acidpaper.ps
>
>> I am trying to learn how to use acid for source
>> level debugging using the built-in functions. I waould like
>> to know how to display/exmine the varibales used in the
>> program. Sample code for context:
>>   void main()
>>   {
>>     int a, b, c;
>>     a = 12;
>>     b = 21;
>>     c = a + b;
>>     print("c: %d\n", c);
>>     exits(nil);
>>   }
>>
>>   program is compiled and acid is called on the image:
>>   acid: new()
>>   ..
>>   acid: bpset(print)
>>   ..
>>   acid: next()
>>   ..
>>   at this point a = 12 has been executed. How to examine
>>   the value in acid?
>>
>> -ishwar
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] OT: Acid question?
  2006-09-14 20:24   ` ISHWAR RATTAN
@ 2006-09-14 20:40     ` Axel Belinfante
  2006-09-14 20:55       ` Gabriel Diaz
  2006-09-14 21:06       ` ISHWAR RATTAN
  0 siblings, 2 replies; 11+ messages in thread
From: Axel Belinfante @ 2006-09-14 20:40 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

you may want to try using the -N flag of 8c
(I guess you did not, and thus your variables were optimized away)

of course I may be completely wrong - trying to learn something here too...

Axel

> acid: *(main:a\D)
> 
> produces:
> <stdin:23:(error) colon: local variable not found
> 
> -ishwar
> 
> 
> On Thu, 14 Sep 2006, Skip Tavakkolian wrote:
> 
> > *(main:a\D)
> >
> > /sys/doc/acid.ps
> > /sys/doc/acidpaper.ps
> >
> >> I am trying to learn how to use acid for source
> >> level debugging using the built-in functions. I waould like
> >> to know how to display/exmine the varibales used in the
> >> program. Sample code for context:
> >>   void main()
> >>   {
> >>     int a, b, c;
> >>     a = 12;
> >>     b = 21;
> >>     c = a + b;
> >>     print("c: %d\n", c);
> >>     exits(nil);
> >>   }
> >>
> >>   program is compiled and acid is called on the image:
> >>   acid: new()
> >>   ..
> >>   acid: bpset(print)
> >>   ..
> >>   acid: next()
> >>   ..
> >>   at this point a = 12 has been executed. How to examine
> >>   the value in acid?
> >>
> >> -ishwar
> >


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] OT: Acid question?
  2006-09-14 20:40     ` Axel Belinfante
@ 2006-09-14 20:55       ` Gabriel Diaz
  2006-09-14 21:06       ` ISHWAR RATTAN
  1 sibling, 0 replies; 11+ messages in thread
From: Gabriel Diaz @ 2006-09-14 20:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello

I think Axel is right.

without -N i can found a in AX b in CX, etc.

with -N you can do what geoff suggested:
*(main:a)\d

the paper http://plan9.bell-labs.com/sys/doc/acidpaper.html says:

"Acid provides library functions to step through source level
statements and functions. Furthermore, addresses in Acid expressions
can be specified by source file and line."


is that sentence talking about the 'main:a' string? or is just like
'file.c:line' ? (i can't found the correct syntax if the second one is
accepted).

slds.

gabi

On 9/14/06, Axel Belinfante <Axel.Belinfante@cs.utwente.nl> wrote:
> you may want to try using the -N flag of 8c
> (I guess you did not, and thus your variables were optimized away)
>
> of course I may be completely wrong - trying to learn something here too...
>
> Axel
>
> > acid: *(main:a\D)
> >
> > produces:
> > <stdin:23:(error) colon: local variable not found
> >
> > -ishwar
> >
> >
> > On Thu, 14 Sep 2006, Skip Tavakkolian wrote:
> >
> > > *(main:a\D)
> > >
> > > /sys/doc/acid.ps
> > > /sys/doc/acidpaper.ps
> > >
> > >> I am trying to learn how to use acid for source
> > >> level debugging using the built-in functions. I waould like
> > >> to know how to display/exmine the varibales used in the
> > >> program. Sample code for context:
> > >>   void main()
> > >>   {
> > >>     int a, b, c;
> > >>     a = 12;
> > >>     b = 21;
> > >>     c = a + b;
> > >>     print("c: %d\n", c);
> > >>     exits(nil);
> > >>   }
> > >>
> > >>   program is compiled and acid is called on the image:
> > >>   acid: new()
> > >>   ..
> > >>   acid: bpset(print)
> > >>   ..
> > >>   acid: next()
> > >>   ..
> > >>   at this point a = 12 has been executed. How to examine
> > >>   the value in acid?
> > >>
> > >> -ishwar
> > >
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] OT: Acid question?
  2006-09-14 20:40     ` Axel Belinfante
  2006-09-14 20:55       ` Gabriel Diaz
@ 2006-09-14 21:06       ` ISHWAR RATTAN
  1 sibling, 0 replies; 11+ messages in thread
From: ISHWAR RATTAN @ 2006-09-14 21:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Thanks -N flag did the trick.

-ishwar

On Thu, 14 Sep 2006, Axel Belinfante wrote:

> you may want to try using the -N flag of 8c
> (I guess you did not, and thus your variables were optimized away)
>
> of course I may be completely wrong - trying to learn something here too...
>
> Axel
>
>> acid: *(main:a\D)
>>
>> produces:
>> <stdin:23:(error) colon: local variable not found
>>
>> -ishwar
>>
>>
>> On Thu, 14 Sep 2006, Skip Tavakkolian wrote:
>>
>>> *(main:a\D)
>>>
>>> /sys/doc/acid.ps
>>> /sys/doc/acidpaper.ps
>>>
>>>> I am trying to learn how to use acid for source
>>>> level debugging using the built-in functions. I waould like
>>>> to know how to display/exmine the varibales used in the
>>>> program. Sample code for context:
>>>>   void main()
>>>>   {
>>>>     int a, b, c;
>>>>     a = 12;
>>>>     b = 21;
>>>>     c = a + b;
>>>>     print("c: %d\n", c);
>>>>     exits(nil);
>>>>   }
>>>>
>>>>   program is compiled and acid is called on the image:
>>>>   acid: new()
>>>>   ..
>>>>   acid: bpset(print)
>>>>   ..
>>>>   acid: next()
>>>>   ..
>>>>   at this point a = 12 has been executed. How to examine
>>>>   the value in acid?
>>>>
>>>> -ishwar
>>>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] OT: Acid question?
  2006-09-14 19:13     ` ISHWAR RATTAN
@ 2006-09-14 21:49       ` Tharaneedharan Vilwanathan
  0 siblings, 0 replies; 11+ messages in thread
From: Tharaneedharan Vilwanathan @ 2006-09-14 21:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

oh, i meant /doc in Inferno's root directory. If you have inferno
installed, you can check it up. Else, you need to install inferno
somewhere to see the file, I think.

dharani

On 9/14/06, ISHWAR RATTAN <rattan@cps.cmich.edu> wrote:
> I had looked through /sys/doc/acid.* and was unable to find
> the information there. Maybe it is something trivial :-(
>
> -ishwar
>
> On Thu, 14 Sep 2006, Tharaneedharan Vilwanathan wrote:
>
> > Acid Tutorial by Tad Hunt also may be useful. I see it in
> > /doc/acidtut.pdf in Inferno release but I couldnt find a web link.
> >
> > regards
> > dharani
> >
> > On 9/14/06, Skip Tavakkolian <9nut@9netics.com> wrote:
> >> *(main:a\D)
> >>
> >> /sys/doc/acid.ps
> >> /sys/doc/acidpaper.ps
> >>
> >> > I am trying to learn how to use acid for source
> >> > level debugging using the built-in functions. I waould like
> >> > to know how to display/exmine the varibales used in the
> >> > program. Sample code for context:
> >> >   void main()
> >> >   {
> >> >     int a, b, c;
> >> >     a = 12;
> >> >     b = 21;
> >> >     c = a + b;
> >> >     print("c: %d\n", c);
> >> >     exits(nil);
> >> >   }
> >> >
> >> >   program is compiled and acid is called on the image:
> >> >   acid: new()
> >> >   ..
> >> >   acid: bpset(print)
> >> >   ..
> >> >   acid: next()
> >> >   ..
> >> >   at this point a = 12 has been executed. How to examine
> >> >   the value in acid?
> >> >
> >> > -ishwar
> >>
> >>
> >
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] OT: Acid question?
  2006-09-14 14:41 [9fans] OT: Acid question? ISHWAR RATTAN
  2006-09-14 16:33 ` Skip Tavakkolian
@ 2006-09-14 23:56 ` Russ Cox
  2006-09-15  1:08   ` Benn Newman
  1 sibling, 1 reply; 11+ messages in thread
From: Russ Cox @ 2006-09-14 23:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Why is a question about acid off-topic?

Russ


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] OT: Acid question?
  2006-09-14 23:56 ` Russ Cox
@ 2006-09-15  1:08   ` Benn Newman
  0 siblings, 0 replies; 11+ messages in thread
From: Benn Newman @ 2006-09-15  1:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Russ Cox said:
> Why is a question about acid off-topic?
Because application questions on (l)unix mailing-lists would be off topic
because the application is made by some other people somewhere else, I
would guess.
> Russ
-- 
Benn Newman


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-09-15  1:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-14 14:41 [9fans] OT: Acid question? ISHWAR RATTAN
2006-09-14 16:33 ` Skip Tavakkolian
2006-09-14 17:59   ` Tharaneedharan Vilwanathan
2006-09-14 19:13     ` ISHWAR RATTAN
2006-09-14 21:49       ` Tharaneedharan Vilwanathan
2006-09-14 20:24   ` ISHWAR RATTAN
2006-09-14 20:40     ` Axel Belinfante
2006-09-14 20:55       ` Gabriel Diaz
2006-09-14 21:06       ` ISHWAR RATTAN
2006-09-14 23:56 ` Russ Cox
2006-09-15  1:08   ` Benn Newman

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).