749 |
@node GDB Graphical Interface |
@node GDB Graphical Interface |
750 |
@subsection GDB Graphical Interface |
@subsection GDB Graphical Interface |
751 |
|
|
752 |
|
@findex gdb-mouse-set-clear-breakpoint |
753 |
|
@findex gdb-mouse-toggle-breakpoint |
754 |
By default, the command @code{gdb} starts GDB using a graphical |
By default, the command @code{gdb} starts GDB using a graphical |
755 |
interface where you view and control the program's data using Emacs |
interface where you view and control the program's data using Emacs |
756 |
windows. You can still interact with GDB through the GUD buffer, but |
windows. You can still interact with GDB through the GUD buffer, but |
856 |
when it is disabled. Text-only terminals correspondingly display |
when it is disabled. Text-only terminals correspondingly display |
857 |
a @samp{B} or @samp{b}. |
a @samp{B} or @samp{b}. |
858 |
|
|
859 |
@item @kbd{d} |
@item d |
860 |
@kindex d @r{(GDB breakpoints buffer)} |
@kindex d @r{(GDB breakpoints buffer)} |
861 |
@findex gdb-delete-breakpoint |
@findex gdb-delete-breakpoint |
862 |
Delete the breakpoint at the current line (@code{gdb-delete-breakpoint}). |
Delete the breakpoint at the current line (@code{gdb-delete-breakpoint}). |
876 |
of the nested subroutine calls (@dfn{stack frames}) now active in the |
of the nested subroutine calls (@dfn{stack frames}) now active in the |
877 |
program. @xref{Backtrace,,info stack, gdb, The GNU debugger}. |
program. @xref{Backtrace,,info stack, gdb, The GNU debugger}. |
878 |
|
|
879 |
The selected frame is displayed in reverse contrast. Move point to |
@findex gdb-frames-select |
880 |
any frame in the stack and type @key{RET} to select it (@code{gdb-frames-select}) |
The selected frame number is displayed in reverse contrast. Move |
881 |
and display the associated source in the source buffer. Alternatively, |
point to any frame in the stack and type @key{RET} to select it |
882 |
click @kbd{Mouse-2} to make the selected frame become the current one. |
(@code{gdb-frames-select}) and display the associated source in the |
883 |
If the locals buffer is displayed then its contents update to display |
source buffer. Alternatively, click @kbd{Mouse-2} on a frame to |
884 |
the variables that are local to the new frame. |
select it. If the locals buffer is displayed then its contents update |
885 |
|
to display the variables that are local to the new frame. |
886 |
|
|
887 |
@node Watch Expressions |
@node Watch Expressions |
888 |
@subsubsection Watch Expressions |
@subsubsection Watch Expressions |
889 |
@cindex Watching expressions in GDB |
@cindex Watching expressions in GDB |
890 |
|
|
891 |
|
@findex gud-watch |
892 |
If you want to see how a variable changes each time your program stops |
If you want to see how a variable changes each time your program stops |
893 |
then place the cursor over the variable name and click on the watch |
then place the cursor over the variable name and click on the watch |
894 |
icon in the tool bar (@code{gud-watch}). |
icon in the tool bar (@code{gud-watch}). |
898 |
format. To expand or contract a complex data type, click @kbd{Mouse-2} |
format. To expand or contract a complex data type, click @kbd{Mouse-2} |
899 |
on the tag to the left of the expression. |
on the tag to the left of the expression. |
900 |
|
|
|
@kindex RET @r{(GDB speedbar)} |
|
901 |
@findex gdb-var-delete |
@findex gdb-var-delete |
902 |
With the cursor over the root expression of a complex data type, type |
With the cursor over the root expression of a complex data type, type |
903 |
@kbd{D} to delete it from the speedbar |
@kbd{D} to delete it from the speedbar |
904 |
(@code{gdb-var-delete}). |
(@code{gdb-var-delete}). |
905 |
|
|
906 |
|
@kindex RET @r{(GDB speedbar)} |
907 |
@findex gdb-edit-value |
@findex gdb-edit-value |
908 |
With the cursor over a simple data type or an element of a complex |
With the cursor over a simple data type or an element of a complex |
909 |
data type which holds a value, type @key{RET} or click @kbd{Mouse-2} to edit |
data type which holds a value, type @key{RET} or click @kbd{Mouse-2} to edit |
910 |
its value. A prompt for a new value appears in the mini-buffer |
its value. A prompt for a new value appears in the mini-buffer |
911 |
(@code{gdb-edit-value}). |
(@code{gdb-edit-value}). |
912 |
|
|
913 |
|
@vindex gdb-show-changed-values |
914 |
If you set the variable @code{gdb-show-changed-values} to |
If you set the variable @code{gdb-show-changed-values} to |
915 |
non-@code{nil} (the default value), then Emacs will use |
non-@code{nil} (the default value), Emacs will use |
916 |
font-lock-warning-face to display values that have recently changed in |
font-lock-warning-face to display values that have recently changed in |
917 |
the speedbar. |
the speedbar. |
918 |
|
|
919 |
|
@vindex gdb-use-colon-colon-notation |
920 |
If you set the variable @code{gdb-use-colon-colon-notation} to a |
If you set the variable @code{gdb-use-colon-colon-notation} to a |
921 |
non-@code{nil} value, then, in C, Emacs will use the |
non-@code{nil} value then, in C, Emacs will use the |
922 |
FUNCTION::VARIABLE format to display variables in the speedbar. |
@var{function}::@var{variable} format to display variables in the |
923 |
Since this does not work for variables defined in compound statements, |
speedbar. Since this does not work for variables defined in compound |
924 |
the default value is @code{nil}. |
statements, the default value is @code{nil}. |
925 |
|
|
926 |
@node Other GDB User Interface Buffers |
@node Other GDB User Interface Buffers |
927 |
@subsubsection Other Buffers |
@subsubsection Other Buffers |
928 |
|
|
929 |
@table @asis |
@table @asis |
930 |
@item Input/Output Buffer |
@item Input/Output Buffer |
931 |
|
@vindex gdb-use-inferior-io-buffer |
932 |
If the variable @code{gdb-use-inferior-io-buffer} is non-@code{nil}, |
If the variable @code{gdb-use-inferior-io-buffer} is non-@code{nil}, |
933 |
the executable program that is being debugged takes its input and |
the executable program that is being debugged takes its input and |
934 |
displays its output here. Some of the commands from shell mode are |
displays its output here. Some of the commands from shell mode are |
943 |
separately to examine their values. @xref{Watch Expressions}. |
separately to examine their values. @xref{Watch Expressions}. |
944 |
|
|
945 |
@item Registers Buffer |
@item Registers Buffer |
946 |
|
@findex toggle-gdb-all-registers |
947 |
The registers buffer displays the values held by the registers |
The registers buffer displays the values held by the registers |
948 |
(@pxref{Registers,,, gdb, The GNU debugger}). Press @key{SPC} to |
(@pxref{Registers,,, gdb, The GNU debugger}). Press @key{SPC} to |
949 |
toggle the display of floating point registers. |
toggle the display of floating point registers |
950 |
|
(@code{toggle-gdb-all-registers}). |
951 |
|
|
952 |
@item Assembler Buffer |
@item Assembler Buffer |
953 |
The assembler buffer displays the current frame as machine code. An |
The assembler buffer displays the current frame as machine code. An |
956 |
appear in the fringe or margin. |
appear in the fringe or margin. |
957 |
|
|
958 |
@item Threads Buffer |
@item Threads Buffer |
959 |
|
@findex gdb-threads-select |
960 |
The threads buffer displays a summary of all threads currently in your |
The threads buffer displays a summary of all threads currently in your |
961 |
program (@pxref{Threads,,, gdb, The GNU debugger}). Move point to |
program (@pxref{Threads,,, gdb, The GNU debugger}). Move point to any |
962 |
any thread in the list and press @key{RET} to make it become the |
thread in the list and press @key{RET} to select it |
963 |
current thread (@code{gdb-threads-select}) and display the associated |
(@code{gdb-threads-select}) and display the associated source in the |
964 |
source in the source buffer. Alternatively, click @kbd{Mouse-2} to |
source buffer. Alternatively, click @kbd{Mouse-2} on a thread to |
965 |
make the selected thread become the current one. |
select it. If the locals buffer is displayed then its contents update |
966 |
|
to display the variables that are local to the new thread. |
967 |
|
|
968 |
@item Memory Buffer |
@item Memory Buffer |
|
|
|
969 |
The memory buffer allows the user to examine sections of program |
The memory buffer allows the user to examine sections of program |
970 |
memory (@pxref{Memory,,, gdb, The GNU debugger}). Click @kbd{Mouse-1} |
memory (@pxref{Memory,,, gdb, The GNU debugger}). Click @kbd{Mouse-1} |
971 |
on the appropriate part of the header line to change the starting |
on the appropriate part of the header line to change the starting |