The current object navigation is a 'one-step-at-a-time' approach for stepping into and out of object map hierarchy layers. Consider a simple case of a 3-dimensional simple array.
() # top
\
+- c0 # component
\
+- function0 # sub-component slot
\
+ v_xyz # unsigned[3][5][7]
Here is an example session ( available in git@github.com:tactcomplabs/sst-ext-tests.git devel branch):
$ cd tests/core-debug
$ sst --interactive-start=0 omni.py -- --function0=dbgsst15.OMArrays
# Hey Billy, can you tell me what's in v_xyz[2][4][6] and v_xyz[1][2][3]?
# Sure Pop! Give me a few minutes and I'll get back to you
> confirm false
> cd c0
> cd function0
> cd v_xyz
> pwd
> cd 2
> cd 4
> pwd
c0/function0/v_xyz/2/4 (double [7])
> ls
0/ (double [5][7])
1/ (double [5][7])
2/ (double [5][7])
> cd 2
> ls
0/ (double [7])
1/ (double [7])
2/ (double [7])
3/ (double [7])
4/ (double [7])
> cd 4
> pwd
c0/function0/v_xyz/2/4 (double [7])
> ls
0 = 99.00000000000000000 (double)
1 = 100.00000000000000000 (double)
2 = 101.00000000000000000 (double)
3 = 102.00000000000000000 (double)
4 = 103.00000000000000000 (double)
5 = 104.00000000000000000 (double)
6 = 105.00000000000000000 (double)
> cd ..
> cd ..
> pwd
c0/function0/v_xyz (double [3][5][7])
> cd 1
> cd 2
> pwd
c0/function0/v_xyz/1/2 (double [7])
> ls
0 = 50.00000000000000000 (double)
1 = 51.00000000000000000 (double)
2 = 52.00000000000000000 (double)
3 = 53.00000000000000000 (double)
4 = 54.00000000000000000 (double)
5 = 55.00000000000000000 (double)
6 = 56.00000000000000000 (double)
# It's 105 and 53...I think... oh wait, let me go back and check!
Part 1: The basic chdir/cd requirements
-
Provide symbol / to represent the top level instead of ()
-
Allow long path strings to be specified in the cd command (other commands can follow)
example: cd c0/function0/v_xyz/2/4 ( this should support tabed auto-completion )
-
Allow for use of . and .. to be used in the relative path.
example: `cd ../1/4
-
Allow for absolute paths from the top level
example cd /c0/function0/v_xyz/2/4
Note: See SimpleDebugger::cd_name_stack which navigates us to our last position when we re-enter inter
active mode. This feature is intended to refresh the objmap which is not needed for simple navigation.
Part 2: Building a better UI
Once we have the ability to specify paths, we can create our own user directory stack, just like in bash. To support this, we should add the commands:
`pushd`, `popd`, and `dirs`
Part 3: Testing
Please add tests to sst-ext-tests/tests-core-debug of the form cd_*.sh using a current example like type-arrays.sh.
The current object navigation is a 'one-step-at-a-time' approach for stepping into and out of object map hierarchy layers. Consider a simple case of a 3-dimensional simple array.
Here is an example session ( available in
git@github.com:tactcomplabs/sst-ext-tests.gitdevelbranch):Part 1: The basic chdir/cd requirements
Provide symbol
/to represent the top level instead of()Allow long path strings to be specified in the
cdcommand (other commands can follow)example:
cd c0/function0/v_xyz/2/4( this should supporttabed auto-completion )Allow for use of
.and..to be used in the relative path.example: `cd ../1/4
Allow for absolute paths from the top level
example
cd /c0/function0/v_xyz/2/4Note: See
SimpleDebugger::cd_name_stackwhich navigates us to our last position when we re-enter interactive mode. This feature is intended to refresh the objmap which is not needed for simple navigation.
Part 2: Building a better UI
Once we have the ability to specify paths, we can create our own user directory stack, just like in bash. To support this, we should add the commands:
Part 3: Testing
Please add tests to
sst-ext-tests/tests-core-debugof the formcd_*.shusing a current example liketype-arrays.sh.