summaryrefslogtreecommitdiff
path: root/gdb/gdbtk/library/help/locals.html
blob: 058f94fd65f6b9f198a5189feb540571632f0e57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<HTML>
<HEAD>
<TITLE>Locals Window Help</TITLE>
</HEAD>
<BODY>
<H1>The Locals Window</H1>
<H2>Overview</H2>
<P>The Locals Window displays all local variables in scope. It may be used to
visualize and edit local variables.</P>

<P>Locals Window topics:
<UL>
    <LI><UL><A HREF="#menus">Variable Menu</A>
            <LI><A HREF="#menus_edit">Edit</A>
            <LI><A HREF="#menus_fmt">Format</A>
        </UL>
    <LI><UL><A HREF="#display">Locals Display</A>
            <LI><A HREF="#display_deref">Dereferencing Pointers</A>
            <LI><A HREF="#display_struct">Viewing a Structure or Class</A>
            <LI><A HREF="#display_edit">Editing a Variable</A>
            <LI><A HREF="#display_popup">Locals Pop-up Menu</A>
        </UL>
</UL></P>

<H3><A NAME="menus">Variable Menu</A></H3>
The Variable Menu gives on-screen access to the funtions of the Locals Window.
To use any of these functions, first use the left mouse button to select a
variable from the display. Then select:

<DL>
    <DT><A NAME="menus_edit">Edit</A>
        <DD>Edit the value of the variable
    <DT><A NAME="menus_fmt">Format</A>
        <DD>Change the display format of the variable
</DL>

<H3><A NAME="display">Locals Display</A></H4>
The Locals Window Display consists of a scrolled listbox which contains all
local variables, one per line. To use any of the functions of the Locals Window,
use the left mouse button to select any element from the Display.

<P>Pointers, structures, and classes appear in the display with small exapansion
box before their names. To <A NAME="display_deref">dereference pointers</A> or
<A NAME="display_struct">view the members of classes or structures</A>, click
the closed expansion box (which appears as a small plus sign, "+") to "expand"
the listing. The expansion box changes to a minus sign, "-", indicating that the
display is now open. Pointers, structures and classes may be expanded recursively
to allow multiple pointer dereferences and embedded structure viewing.

<P>The Locals Display updates after every execution of the program and highlights
in blue those variables whose values have changed.</P>

<P>The Locals Window will, by default, display all pointers in hexadecimal and all
other variables in decimal. To change the display format for a variable, select
the Format option from either the Variable Menu or the <A HREF="#display_popup">
Locals Pop-up Menu</A>.
<BR>

<H4><A NAME="display_edit">Editing a Variable</A></H4>
To edit a variable, either double-click the left mouse button on the variable in
the Display or select the Edit option from either the Variable Menu or the Locals
Pop-up Menu. To abort editing a variable's value, simply press the escape key on
the keybaord. The variable's original value is restored.
<BR>

<H4><A NAME="display_popup">Locals Pop-up Menu</A></H4>
The Locals Pop-up Menu provides quick access to the functions of the Locals Window.
To use the Locals Pop-up Menu, first select a variable from the Display (by clicking
the left mouse button on it) and click the right mouse button, choosing from the
pop-up:
<DL>
    <DT>Edit
        <DD>Edit the variable's value. See <A HREF="#display_edit"> Editing a Variable
            </A>
    <DT>Format
        <DD>Change the display format of the variable. The variable may be displayed
            as:
            <DL>
                <DT>Hex
                    <DD>hexadecimal (base 16)
                <DT>Decimal
                    <DD>decimal (base 10)
                <DT>Binary
                    <DD>binary (base 2)
                <DT>Octal
                    <DD>octal (base 8)
            </DL>
</DL>
</BODY>
</HTML>