dbx variables not working

823 Views Asked by At

I am debugging a piece of code which has complex data structures in it. I want to use dbx variables to hold the values of these structures to avoid pointer indirection every time to see the contents. When I do, something like set $myTemp=*ptr->curValue, it does not give any error, but issuing a display command does not show up myTemp. Also when I execute print $myTemp, I get no output and no error either. Doing print myTemp(without dollar sign) gives error which goes like "myTemp not defined in local scope ..". Any ideas what could be wrong here. I am using solaris 10 here.

2

There are 2 best solutions below

0
On

I think you have a syntax error. Dbx uses the ksh shell syntax and you are using a dollar sign prefix on the name of the variable (according to your description).

Instead of saying:

set $foo=bar

say this:

set foo=bar
0
On

You don't have to use set in dbx. You can just specify the variablename=thevalue, also no spaces. Otherwise it gets all honked up.