With 20090630 there still is this weird problem where setting a field of a
type within an array seems to set another array index to have the same
value.

The following is a portion of kshdb/lib/frame.sh at
http://github.com/rocky/kshdb/blob/fee5df975764e4238cdb1e5407a662ea3e7e146d/lib/frame.shwhere
there is this definition:


typeset -T Frame_t=(
>     filename=''
>     # integer lineno=0
>     lineno=0
>     fn=''
>     to_file_line()
>     {
>         print -r "file \`${_.filename}' at line ${_.lineno}"
>     }
> )
> ...
> Frame_t -a _Dbg_frame_stack
>

When kshdb from that github source is run on this program
( cd /tmp
  x=1
  ( cd
     z=1
     x=3
  )
)
b=1

if the "lineno" field  is declared "integer lineno" we get this:



$ ./kshdb -L . /tmp/foo.sh
ksh Shell Debugger, release 0.03git

Copyright 2008, 2009 Rocky Bernstein
This is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.

(/tmp/foo.sh:125):
cd /tmp
kshdb<(1)> where
->0 in file `/tmp/foo.sh' at line 125
##1 in file `/src/external-vcs/kshdb/kshdb' at line 125

whereas without the "integer" declaration we get this which is correct:

$ ./kshdb -L . /tmp/foo.sh
ksh Shell Debugger, release 0.03git

Copyright 2008, 2009 Rocky Bernstein
This is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.

(/tmp/foo.sh:1):
cd /tmp
kshdb<(1)> where
->0 in file `/tmp/foo.sh' at line 1
##1 in file `/src/external-vcs/kshdb/kshdb' at line 125

So somehow setting _Dbg_frame_stack[1].lineno to 125 seems to also set
_Dbg_frame_stack[0].lineno to the same value, but only if lineno is declared
"integer".

I haven't isolated this largish program into a small test case that shows
the problem yet, but I thought I'd mention the problem which exists and
existed in 20090515, and 20090505.

On Tue, Jun 30, 2009 at 5:18 PM, Glenn Fowler <[email protected]> wrote:

>
> 2009-06-30 beta source tarballs have been posted at
>
>        http://www.research.att.com/sw/download/beta/
>
> this includes all ksh93t+ patches since the last release
>
> _______________________________________________
> ast-users mailing list
> [email protected]
> https://mailman.research.att.com/mailman/listinfo/ast-users
>
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to