TotalView User Guide : Part II: Debugging Tools and Tasks : Examining and Editing Data and Program Elements : Changing a Variable’s Data Type : Type-Casting Examples : Displaying the argv Array
Displaying the argv Array
Typically, argv is the second argument passed to main(), and it is either a char **argv or char *argv[ ]. Suppose argv points to an array of three pointers to character strings. Here is how you can edit its type to display an array of three pointers:
1 Select the type string for argv.
CLI: dprint argv
2 Edit the type string by using the field editor commands. Change it to:
$string*[3]*
CLI: dprint {($string*[3]*)argv}
3 To display the array, dive on the value field for argv.
Figure 141: Editing the argv Argument