aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorChong Yidong2009-12-29 13:06:16 -0500
committerChong Yidong2009-12-29 13:06:16 -0500
commit26e533e2d9e4c6bdf010d34e9686ee2e6c84a84a (patch)
treeef7f01c7c9cf6c5220e617c1ab3cc490be29aac1 /doc
parent659e4408a49d7ced1cbdfff3ca89a10413d642ac (diff)
downloademacs-26e533e2d9e4c6bdf010d34e9686ee2e6c84a84a.tar.gz
emacs-26e533e2d9e4c6bdf010d34e9686ee2e6c84a84a.zip
* doc/emacs/misc.texi (Shell): Document async-shell-command.
* doc/emacs/building.texi (Grep Searching): Document zrgrep. * doc/emacs/mini.texi (Completion Options): * doc/lispref/minibuf.texi (Completion Styles): Document `initials' style.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog8
-rw-r--r--doc/emacs/building.texi248
-rw-r--r--doc/emacs/mini.texi13
-rw-r--r--doc/emacs/misc.texi8
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/minibuf.texi8
6 files changed, 226 insertions, 63 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 62000a556c3..f6dfdc91e0f 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,11 @@
12009-12-29 Chong Yidong <cyd@stupidchicken.com>
2
3 * misc.texi (Shell): Document async-shell-command.
4
5 * building.texi (Grep Searching): Document zrgrep.
6
7 * mini.texi (Completion Options): Mention `initals' completion style.
8
12009-12-24 Chong Yidong <cyd@stupidchicken.com> 92009-12-24 Chong Yidong <cyd@stupidchicken.com>
2 10
3 * emacs.texi (Top): Update node listing. 11 * emacs.texi (Top): Update node listing.
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 343eb646a83..619e1b0271d 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -356,8 +356,10 @@ listed in the buffer named @samp{*grep*}.
356@item M-x grep-find 356@item M-x grep-find
357@itemx M-x find-grep 357@itemx M-x find-grep
358@itemx M-x rgrep 358@itemx M-x rgrep
359Run @code{grep} via @code{find}, with user-specified arguments, and 359Run @code{grep} via @code{find}, and collect output in the buffer
360collect output in the buffer named @samp{*grep*}. 360named @samp{*grep*}.
361@item M-x zrgrep
362Run @code{zgrep} and collect output in the buffer named @samp{*grep*}.
361@item M-x kill-grep 363@item M-x kill-grep
362Kill the running @code{grep} subprocess. 364Kill the running @code{grep} subprocess.
363@end table 365@end table
@@ -400,21 +402,22 @@ the @code{find-grep-dired} command, in @ref{Dired and Find}.
400 402
401@findex lgrep 403@findex lgrep
402@findex rgrep 404@findex rgrep
405@findex zrgrep
403 The commands @kbd{M-x lgrep} (local grep) and @kbd{M-x rgrep} 406 The commands @kbd{M-x lgrep} (local grep) and @kbd{M-x rgrep}
404(recursive grep) are more user-friendly versions of @code{grep} and 407(recursive grep) are more user-friendly versions of @code{grep} and
405@code{grep-find}, which prompt separately for the regular expression 408@code{grep-find}, which prompt separately for the regular expression
406to match, the files to search, and the base directory for the search. 409to match, the files to search, and the base directory for the search.
407Case sensitivity of the search is controlled by the 410Case sensitivity of the search is controlled by the current value of
408current value of @code{case-fold-search}. 411@code{case-fold-search}. The command @kbd{M-x zrgrep} is similar to
412@code{rgrep}, but it calls @code{zgrep} instead of @code{grep} to
413search the contents of gzipped files.
409 414
410These commands build the shell commands based on the variables 415 These commands build the shell commands based on the variables
411@code{grep-template} (for @code{lgrep}) and @code{grep-find-template} 416@code{grep-template} (for @code{lgrep}) and @code{grep-find-template}
412(for @code{rgrep}). 417(for @code{rgrep}). The files to search can use aliases defined in
418the variable @code{grep-files-aliases}.
413 419
414The files to search can use aliases defined in the variable 420 Subdirectories listed in the variable
415@code{grep-files-aliases}.
416
417Subdirectories listed in the variable
418@code{grep-find-ignored-directories} such as those typically used by 421@code{grep-find-ignored-directories} such as those typically used by
419various version control systems, like CVS and arch, are automatically 422various version control systems, like CVS and arch, are automatically
420skipped by @code{rgrep}. 423skipped by @code{rgrep}.
@@ -854,11 +857,12 @@ multiple programs within one Emacs session.
854* Source Buffers:: Use the mouse in the fringe/margin to 857* Source Buffers:: Use the mouse in the fringe/margin to
855 control your program. 858 control your program.
856* Breakpoints Buffer:: A breakpoint control panel. 859* Breakpoints Buffer:: A breakpoint control panel.
860* Threads Buffer:: Displays your threads.
857* Stack Buffer:: Select a frame from the call stack. 861* Stack Buffer:: Select a frame from the call stack.
858* Other GDB-UI Buffers:: Input/output, locals, registers, 862* Other GDB-UI Buffers:: Input/output, locals, registers,
859 assembler, threads and memory buffers. 863 assembler, threads and memory buffers.
860* Watch Expressions:: Monitor variable values in the speedbar. 864* Watch Expressions:: Monitor variable values in the speedbar.
861* Reverse Debugging:: Execute and reverse debug your program. 865* Multithreaded Debugging:: Debugging programs with several threads.
862@end menu 866@end menu
863 867
864@node GDB-UI Layout 868@node GDB-UI Layout
@@ -883,7 +887,7 @@ displays the following frame layout:
883|--------------------------------+--------------------------------+ 887|--------------------------------+--------------------------------+
884| Primary Source buffer | I/O buffer for debugged pgm | 888| Primary Source buffer | I/O buffer for debugged pgm |
885|--------------------------------+--------------------------------+ 889|--------------------------------+--------------------------------+
886| Stack buffer | Breakpoints/Threads buffer | 890| Stack buffer | Breakpoints/Thread buffer |
887+--------------------------------+--------------------------------+ 891+--------------------------------+--------------------------------+
888@end group 892@end group
889@end smallexample 893@end smallexample
@@ -1011,10 +1015,92 @@ Visit the source line for the current breakpoint
1011Visit the source line for the breakpoint you click on. 1015Visit the source line for the breakpoint you click on.
1012@end table 1016@end table
1013 1017
1018@vindex gdb-show-threads-by-default
1014When @code{gdb-many-windows} is non-@code{nil}, the breakpoints buffer 1019When @code{gdb-many-windows} is non-@code{nil}, the breakpoints buffer
1015shares its window with the threads buffer. To switch from one to the 1020shares its window with the threads buffer. To switch from one to the
1016other click with @kbd{Mouse-1} on the relevant button in the header 1021other click with @kbd{Mouse-1} on the relevant button in the header
1017line. 1022line, or press @kbd{TAB} inside that buffer. If
1023@code{gdb-show-threads-by-default} is non-@code{nil}, the threads
1024buffer, rather than the breakpoints buffer, is shown at start up.
1025
1026@node Threads Buffer
1027@subsubsection Threads Buffer
1028
1029@findex gdb-select-thread
1030The threads buffer displays a summary of all threads currently in your
1031program (@pxref{Threads, Threads, Debugging programs with multiple
1032threads, gdb, The GNU debugger}). Move point to any thread in the list
1033and press @key{RET} to select it (@code{gdb-select-thread}) and
1034display the associated source in the primary source buffer.
1035Alternatively, click @kbd{Mouse-2} on a thread to select it. Contents
1036of all GDB buffers are updated whenever you select a thread.
1037
1038 You can customize variables under @code{gdb-buffers} group to select
1039fields included in threads buffer.
1040
1041@table @code
1042@item gdb-thread-buffer-verbose-names
1043@vindex gdb-thread-buffer-verbose-names
1044Show long thread names like @samp{Thread 0x4e2ab70 (LWP 1983)} in
1045threads buffer.
1046
1047@item gdb-thread-buffer-arguments
1048@vindex gdb-thread-buffer-arguments
1049Show arguments of thread top frames in threads buffer.
1050
1051@item gdb-thread-buffer-locations
1052@vindex gdb-thread-buffer-locations
1053Show file information or library names in threads buffer.
1054
1055@item gdb-thread-buffer-addresses
1056@vindex gdb-thread-buffer-addresses
1057Show addresses for thread frames in threads buffer.
1058@end table
1059
1060 It’s possible to observe information for several threads
1061simultaneously (in addition to buffers which show information for
1062currently selected thread) using the following keys from the threads
1063buffer.
1064
1065@table @kbd
1066@item d
1067@kindex d @r{(GDB threads buffer)}
1068@findex gdb-display-disassembly-for-thread
1069Display disassembly buffer for the thread at current line.
1070(@code{gdb-display-disassembly-for-thread})
1071
1072@item f
1073@kindex f @r{(GDB threads buffer)}
1074@findex gdb-display-stack-for-thread
1075Display stack buffer for the thread at current line.
1076(@code{gdb-display-stack-for-thread}).
1077
1078@item l
1079@kindex l @r{(GDB threads buffer)}
1080@findex gdb-display-locals-for-thread
1081Display locals buffer for the thread at current line.
1082(@code{gdb-display-locals-for-thread}).
1083
1084@item r
1085@kindex r @r{(GDB threads buffer)}
1086@findex gdb-display-registers-for-thread
1087Display registers buffer for the thread at current line.
1088(@code{gdb-display-registers-for-thread}).
1089@end table
1090
1091Pressing their upper-case counterparts, @kbd{D}, @kbd{F} ,@kbd{L} and
1092@kbd{R} displays the corresponding buffer in a new frame.
1093
1094 When you create a buffer showing information about some specific
1095thread, it becomes bound to that thread and keeps showing actual
1096information while you debug your program. Every GDB buffer contains a
1097number of thread it shows information for in its mode name. Thread
1098number is also included in the buffer name of bound buffers to prevent
1099buffer names clashing.
1100
1101Further commands are available in the threads buffer which depend on the
1102mode of GDB that is used for controlling execution of your program.
1103(@pxref{Multithreaded Debugging, Stopping and Starting Multi-threaded Programs}).
1018 1104
1019@node Stack Buffer 1105@node Stack Buffer
1020@subsubsection Stack Buffer 1106@subsubsection Stack Buffer
@@ -1051,7 +1137,7 @@ as are the commands to send signals to the debugged program.
1051@item Locals Buffer 1137@item Locals Buffer
1052The locals buffer displays the values of local variables of the 1138The locals buffer displays the values of local variables of the
1053current frame for simple data types (@pxref{Frame Info, Frame Info, 1139current frame for simple data types (@pxref{Frame Info, Frame Info,
1054Information on a frame, gdb, The GNU debugger}). Press @key{RET} or 1140Information on a frame, gdb, The GNU debugger}). Press @key{RET} or
1055click @kbd{Mouse-2} on the value if you want to edit it. 1141click @kbd{Mouse-2} on the value if you want to edit it.
1056 1142
1057Arrays and structures display their type only. With GDB 6.4 or later, 1143Arrays and structures display their type only. With GDB 6.4 or later,
@@ -1070,27 +1156,12 @@ With GDB 6.4 or later, recently changed register values display with
1070press @key{SPC} to toggle the display of floating point registers 1156press @key{SPC} to toggle the display of floating point registers
1071(@code{toggle-gdb-all-registers}). 1157(@code{toggle-gdb-all-registers}).
1072 1158
1073@item Assembler Buffer 1159@item Disassembly Buffer
1074The assembler buffer displays the current frame as machine code. An 1160The disassembly buffer displays the current frame as machine code. An
1075arrow points to the current instruction, and you can set and remove 1161arrow points to the current instruction, and you can set and remove
1076breakpoints as in a source buffer. Breakpoint icons also appear in 1162breakpoints as in a source buffer. Breakpoint icons also appear in
1077the fringe or margin. 1163the fringe or margin.
1078 1164
1079@item Threads Buffer
1080@findex gdb-threads-select
1081The threads buffer displays a summary of all threads currently in your
1082program (@pxref{Threads, Threads, Debugging programs with multiple
1083threads, gdb, The GNU debugger}). Move point to any thread in the
1084list and press @key{RET} to select it (@code{gdb-threads-select}) and
1085display the associated source in the primary source buffer.
1086Alternatively, click @kbd{Mouse-2} on a thread to select it. If the
1087locals buffer is visible, its contents update to display the variables
1088that are local in the new thread.
1089
1090When there is more than one main thread and the threads buffer is
1091present, Emacs displays the selected thread number in the mode line of
1092many of the GDB-UI Buffers.
1093
1094@item Memory Buffer 1165@item Memory Buffer
1095The memory buffer lets you examine sections of program memory 1166The memory buffer lets you examine sections of program memory
1096(@pxref{Memory, Memory, Examining memory, gdb, The GNU debugger}). 1167(@pxref{Memory, Memory, Examining memory, gdb, The GNU debugger}).
@@ -1103,8 +1174,9 @@ size for these data items.
1103 1174
1104When @code{gdb-many-windows} is non-@code{nil}, the threads buffer 1175When @code{gdb-many-windows} is non-@code{nil}, the threads buffer
1105shares its window with the breakpoints buffer, and the locals buffer 1176shares its window with the breakpoints buffer, and the locals buffer
1106with the registers buffer. To switch from one to the other click with 1177with the registers buffer. To switch from one to the other click with
1107@kbd{Mouse-1} on the relevant button in the header line. 1178@kbd{Mouse-1} on the relevant button in the header line or press
1179@kbd{TAB} inside the buffer.
1108 1180
1109@node Watch Expressions 1181@node Watch Expressions
1110@subsubsection Watch Expressions 1182@subsubsection Watch Expressions
@@ -1172,26 +1244,96 @@ expressions updates, set @code{gdb-speedbar-auto-raise} to
1172non-@code{nil}. This can be useful if you are debugging with a full 1244non-@code{nil}. This can be useful if you are debugging with a full
1173screen Emacs frame. 1245screen Emacs frame.
1174 1246
1175@node Reverse Debugging 1247@node Multithreaded Debugging
1176@subsubsection Reverse Debugging 1248@subsubsection Stopping and Starting Multi-threaded Programs
1177 1249@cindex Multithreaded debugging in GDB
1178 The GDB tool bar shares many buttons with the other GUD debuggers 1250
1179for tasks like stepping and printing expressions. It also has a 1251@subsubheading All-stop Debugging
1180further set of buttons that allow reverse debugging (@pxref{Process 1252
1181Record and Replay, , ,gdb, The GNU debugger}). This is useful when it 1253In all-stop mode, whenever your program stops, @emph{all} threads of
1182takes a long time to reproduce the conditions where your program fails 1254execution stop. Likewise, whenever you restart the program, all
1183or for transient problems, like race conditions in multi-threaded 1255threads start executing. @xref{All-Stop Mode, , All-Stop Mode, gdb,
1184programs, where a failure might otherwise be hard to reproduce. 1256The GNU debugger}. You can enable this behaviour in Emacs by setting
1185 1257@code{gdb-non-stop-setting} to @code{nil} before starting a debugging
1186To use reverse debugging, set a breakpoint slightly before the 1258session.
1187location of interest and run your program to that point. Enable 1259
1188process recording by clicking on the record button. At this point, a 1260@subsubheading Non-stop Debugging
1189new set of buttons appear. These buttons allow program execution in 1261@cindex Non-stop debugging in GDB
1190the reverse direction. Run your program over the code where the 1262
1191problem occurs, and then use the new set of buttons to retrace your 1263For some multi-threaded targets, GDB supports a further mode of
1192steps, examine values, and analyze the problem. When analysis is 1264operation in which you can examine stopped program threads in the
1193complete, turn off process recording by clicking on the record button 1265debugger while other threads continue to execute freely.
1194again. 1266@xref{Non-Stop Mode, , Non-Stop Mode, gdb, The GNU debugger}.
1267This is referred to as @dfn{non-stop} mode.
1268
1269Versions of GDB prior to 7.0 do not support non-stop mode and it does
1270not work on all targets. In such cases, Emacs uses all-stop mode
1271regardless of the value of @code{gdb-non-stop-setting}.
1272
1273@vindex gdb-non-stop-setting
1274If the variable @code{gdb-non-stop-setting} is non-@code{nil} (the
1275default value), Emacs tries to start GDB in non-stop mode. Note that
1276GDB debugging session needs to be restarted for change of this setting
1277to take effect.
1278
1279@vindex gdb-switch-when-another-stopped
1280When a thread stops in non-stop mode, Emacs automatically switches to
1281that thread. It may be undesirable to allow switching of current
1282thread when some other stopped thread is already selected. Set
1283@code{gdb-switch-when-another-stopped} to @code{nil} to prevent this.
1284
1285@vindex gdb-switch-reasons
1286Emacs can decide whether or not to switch to the stopped thread
1287depending on the reason which caused the stop. Customize
1288@code{gdb-switch-reasons} to select stop reasons which make Emacs
1289switch thread.
1290
1291@vindex gdb-stopped-hooks
1292The variable @code{gdb-stopped-hooks} allows you to execute your
1293functions whenever some thread stops.
1294
1295 In non-stop mode, you can switch between different modes for GUD
1296execution control commands.
1297
1298@vindex gdb-gud-control-all-threads
1299@table @dfn
1300@item Non-stop/A
1301
1302When @code{gdb-gud-control-all-threads} is @code{t} (the default
1303value), interruption and continuation commands apply to all threads,
1304so you can halt or continue all your threads with one command using
1305@code{gud-stop-subjob} and @code{gud-cont}, respectively. The
1306@samp{Go} button is shown on the toolbar when at least one thread is
1307stopped, whereas @samp{Stop} button is shown when at least one thread
1308is running.
1309
1310@item Non-stop/T
1311
1312When @code{gdb-gud-control-all-threads} is @code{nil}, only the
1313current thread is stopped/continued. @samp{Go} and @samp{Stop}
1314buttons on the GUD toolbar are shown depending on the state of current
1315thread.
1316@end table
1317
1318You can change the current value of @code{gdb-gud-control-all-threads}
1319from the tool bar or from @samp{GUD->GDB-MI} menu.
1320
1321 Stepping commands always apply to the current thread.
1322
1323@subsubheading Fine Thread Control
1324
1325 In non-stop mode, you can interrupt/continue your threads without
1326selecting them. Hitting @kbd{i} in threads buffer interrupts thread
1327under point, @kbd{c} continues it, @kbd{s} steps through. More such
1328commands may be added in the future.
1329
1330Combined with creating bound buffers for any thread, this allows you
1331to change and track state of many threads in the same time.
1332
1333 Note that when you interrupt a thread, it stops with @samp{signal
1334received} reason. If that reason is included in your
1335@code{gdb-switch-reasons} (it is by default), Emacs will switch to
1336that thread.
1195 1337
1196@node Executing Lisp 1338@node Executing Lisp
1197@section Executing Lisp Expressions 1339@section Executing Lisp Expressions
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index 37d483d3f9d..0dd01f2b0c0 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -456,12 +456,13 @@ default value is @code{nil}).
456using the variable @code{completion-styles}. Its value should be a 456using the variable @code{completion-styles}. Its value should be a
457list of symbols, each representing a @dfn{completion style}; valid 457list of symbols, each representing a @dfn{completion style}; valid
458style symbols are @code{basic}, @code{partial-completion}, 458style symbols are @code{basic}, @code{partial-completion},
459@code{emacs22}, and @code{emacs21}. When completing, Emacs attempts 459@code{emacs22}, @code{emacs21}, and @code{initials}. When completing,
460to use the first completion style in the list; if this does not return 460Emacs attempts to use the first completion style in the list; if this
461any completion alternatives, it tries the next completion style in the 461does not return any completion alternatives, it tries the next
462list, and so on. The completion rules described in @ref{Completion 462completion style in the list, and so on. The completion rules
463Commands} correspond to the default value of @code{completion-styles}, 463described in @ref{Completion Commands} correspond to the default value
464which is @code{(basic partial-completion emacs22)}. 464of @code{completion-styles}, which is @code{(basic partial-completion
465emacs22)}.
465 466
466@cindex Icomplete mode 467@cindex Icomplete mode
467@findex icomplete-mode 468@findex icomplete-mode
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 616ed0051d5..112af066fe8 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -485,6 +485,9 @@ Run the shell command line @var{cmd} and display the output
485Run the shell command line @var{cmd} with region contents as input; 485Run the shell command line @var{cmd} with region contents as input;
486optionally replace the region with the output 486optionally replace the region with the output
487(@code{shell-command-on-region}). 487(@code{shell-command-on-region}).
488@item M-& @var{cmd} @key{RET}
489Run the shell command line @var{cmd} asynchronously, and display the
490output (@code{async-shell-command}).
488@item M-x shell 491@item M-x shell
489Run a subshell with input and output through an Emacs buffer. 492Run a subshell with input and output through an Emacs buffer.
490You can then give commands interactively. 493You can then give commands interactively.
@@ -542,6 +545,11 @@ command's exit status (0 means success), when it is called from a Lisp
542program. You do not get any status information for an asynchronous 545program. You do not get any status information for an asynchronous
543command, since it hasn't finished yet when @code{shell-command} returns. 546command, since it hasn't finished yet when @code{shell-command} returns.
544 547
548 You can also type @kbd{M-&} (@code{async-shell-command}) to execute
549a shell command asynchronously. This behaves exactly like calling
550@code{shell-command} with @samp{&}, except that you do not need to add
551the @samp{&} to the shell command line.
552
545@kindex M-| 553@kindex M-|
546@findex shell-command-on-region 554@findex shell-command-on-region
547 @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!} but 555 @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!} but
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 36848e395d2..8e88e5026e8 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12009-12-29 Chong Yidong <cyd@stupidchicken.com>
2
3 * minibuf.texi (Completion Styles): Document `initials' style.
4
12009-12-25 Chong Yidong <cyd@stupidchicken.com> 52009-12-25 Chong Yidong <cyd@stupidchicken.com>
2 6
3 * frames.texi (Resources): Describe inhibit-x-resources. 7 * frames.texi (Resources): Describe inhibit-x-resources.
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 28dc9e8ba3d..4ded2749986 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -1589,13 +1589,13 @@ procedure is used for listing completions, via the
1589@var{all-completions} functions. 1589@var{all-completions} functions.
1590@end defvar 1590@end defvar
1591 1591
1592 By default, @code{completion-styles-alist} contains four pre-defined 1592 By default, @code{completion-styles-alist} contains five pre-defined
1593completion styles: @code{basic}, a basic completion style; 1593completion styles: @code{basic}, a basic completion style;
1594@code{partial-completion}, which does partial completion (completing 1594@code{partial-completion}, which does partial completion (completing
1595each word in the input separately); @code{emacs22}, which performs 1595each word in the input separately); @code{emacs22}, which performs
1596completion according to the rules used in Emacs 22; and 1596completion according to the rules used in Emacs 22; @code{emacs21},
1597@code{emacs21}, which performs completion according to the rules used 1597which performs completion according to the rules used in Emacs 21; and
1598in Emacs 21. 1598@code{initials}, which completes acronyms and initialisms.
1599 1599
1600@node Programmed Completion 1600@node Programmed Completion
1601@subsection Programmed Completion 1601@subsection Programmed Completion