dwhat

Determines what a name refers to

Format:

dwhat symbol-name

Arguments:

symbol-name

Fully or partially qualified name specifying a variable, procedure, or other source code symbol.

Description:

The dwhat command tells the CLI to display information about a named entity in a program. The displayed information contains the name of the entity and a description of the name. The examples that follow show many of the kinds of elements that this command can display.

Note:   To view information on CLI state variables or aliases, you need to use the dset or alias commands.

The focus constrains the query to a particular context.

The default width for this command is thread (t).

Command alias:

You may find the following alias useful:

Alias
Definition
Meaning
wh
{dwhat}
Determines what a name refers to.

Examples:

These examples show what the CLI displays when you enter one of the indicated commands.

dprint timeout

timeout = {
    tv_sec = 0xc0089540 (-1073179328)
    tv_usec = 0x000003ff (1023)
}

dwhat timeout

In thread 1.1:
 
Name: timeout; Type: struct timeval; Size: 8 bytes; Addr: 0x11fffefc0
    Scope: #fork_loop.cxx#snore \
        (Scope class: Any)
    Address class: auto_var (Local variable)

wh timeval

In process 1:
 
Type name: struct timeval; Size: 8 bytes; \
        Category: Structure
    Fields in type:
    {
    tv_sec        time_t    (32 bits)
    tv_usec        int    (32 bits)
    }

dlist

20        float field3_float;
21        double field3_double;
22    en_check en1;
23
24     };
25
26     main ()
27     {
28         en_check vbl;
29         check_struct s_vbl;
30    >    vbl = big;
31         s_vbl.field2_char = 3;
32         return (vbl + s_vbl.field2_char);
33    }

p vbl

vbl = big (0)

wh vbl

In thread 2.3:
 
Name: vbl; Type: enum en_check; \
        Size: 4 bytes; Addr: Register 01
    Scope: #check_structs.cxx#main \
        (Scope class: Any)
    Address class: register_var (Register variable)

wh en_check

In process 2:
 
Type name: enum en_check; Size: 4 bytes; \
        Category: Enumeration
    Enumerated values:
        big        = 0
        little        = 1
        fat        = 2
        thin        = 3

p s_vbl

s_vbl = {
    field1_int = 0x800164dc (-2147392292)
    field2_char = '\377' (0xff, or -1)
    field2_chars = "\003"
    <padding> = '\000' (0x00, or 0)
    field3_int = 0xc0006140 (-1073716928)
    field2_uchar = '\377' (0xff, or 255)
    <padding> = '\003' (0x03, or 3)
    <padding> = '\000' (0x00, or 0)
    <padding> = '\000' (0x00, or 0)


    field_sub = {
        field1_int = 0xc0002980 (-1073731200)
        <padding> = '\377' (0xff, or -1)
        <padding> = '\003' (0x03, or 3)
        <padding> = '\000' (0x00, or 0)
        <padding> = '\000' (0x00, or 0)
        field2_long = 0x0000000000000000 (0)
    ...
}

wh s_vbl

In thread 2.3:
 
Name: s_vbl; Type: struct check_struct; Size: 80 \
        bytes; Addr: 0x11ffff240
    Scope: #check_structs.cxx#main \
        (Scope class: Any)
    Address class: auto_var (Local variable)

wh check_struct

In process 2:
 
Type name: struct check_struct; Size: 80 bytes; \
        Category: Structure
    Fields in type:
    {
    field1_int        int    (32 bits)
    field2_char        char    (8 bits)
    field2_chars        <string>[2]    (16 bits)
    <padding>        <char>    (8 bits)
    field3_int        int    (32 bits)
    field2_uchar        unsigned char    (8 bits)
    <padding>        <char>[3]    (24 bits)
    field_sub        struct sub_struct (320 bits){
        field1_int   int        (32 bits)
        <padding>    <char>[4]        (32 bits)
        field2_long    long        (64 bits)
        field2_ulong    unsigned long (64 bits)
        field3_uint    unsigned int    (32 bits)
        en1    enum en_check (32 bits)
        field3_double double        (64 bits)
    }
    ...
}

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0