* gdbcmd.h (detachlist): Declare.
* infcmd.c (_initialize_infcmd): Define "detach" as prefix command. * linux-fork.c (_initialize_linux_fork): Rename "detach-checkpoint" to "detach checkpoint" and "detach-fork" to "detach fork". * cli/cli-cmds.c (detachlist): Define. (init_cmd_lists): Initialize it. * cli/cli-cmds.h (detachlist): Declare. doc/: * gdb.texinfo (Processes): Rename "detach-fork" to "detach fork". testsuite/: * gdb.base/multi-forks.exp: Use "detach fork" instead of "detach-fork".
This commit is contained in:
parent
86157c2070
commit
f73adfeb8b
10 changed files with 51 additions and 15 deletions
|
@ -1,3 +1,15 @@
|
||||||
|
2006-10-27 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* gdbcmd.h (detachlist): Declare.
|
||||||
|
* infcmd.c (_initialize_infcmd): Define "detach" as prefix
|
||||||
|
command.
|
||||||
|
* linux-fork.c (_initialize_linux_fork): Rename
|
||||||
|
"detach-checkpoint" to "detach checkpoint" and "detach-fork" to
|
||||||
|
"detach fork".
|
||||||
|
* cli/cli-cmds.c (detachlist): Define.
|
||||||
|
(init_cmd_lists): Initialize it.
|
||||||
|
* cli/cli-cmds.h (detachlist): Declare.
|
||||||
|
|
||||||
2006-10-25 Jim Blandy <jimb@codesourcery.com>
|
2006-10-25 Jim Blandy <jimb@codesourcery.com>
|
||||||
|
|
||||||
* p-valprint.c (pascal_object_print_value): Add 'static' keyword
|
* p-valprint.c (pascal_object_print_value): Add 'static' keyword
|
||||||
|
|
|
@ -122,6 +122,10 @@ struct cmd_list_element *stoplist;
|
||||||
|
|
||||||
struct cmd_list_element *deletelist;
|
struct cmd_list_element *deletelist;
|
||||||
|
|
||||||
|
/* Chain containing all defined detach subcommands. */
|
||||||
|
|
||||||
|
struct cmd_list_element *detachlist;
|
||||||
|
|
||||||
/* Chain containing all defined "enable breakpoint" subcommands. */
|
/* Chain containing all defined "enable breakpoint" subcommands. */
|
||||||
|
|
||||||
struct cmd_list_element *enablebreaklist;
|
struct cmd_list_element *enablebreaklist;
|
||||||
|
@ -1089,6 +1093,7 @@ init_cmd_lists (void)
|
||||||
togglelist = NULL;
|
togglelist = NULL;
|
||||||
stoplist = NULL;
|
stoplist = NULL;
|
||||||
deletelist = NULL;
|
deletelist = NULL;
|
||||||
|
detachlist = NULL;
|
||||||
enablebreaklist = NULL;
|
enablebreaklist = NULL;
|
||||||
setlist = NULL;
|
setlist = NULL;
|
||||||
unsetlist = NULL;
|
unsetlist = NULL;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Header file for GDB CLI command implementation library.
|
/* Header file for GDB CLI command implementation library.
|
||||||
Copyright (c) 2000 Free Software Foundation, Inc.
|
Copyright (c) 2000,2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -39,6 +39,10 @@ extern struct cmd_list_element *disablelist;
|
||||||
|
|
||||||
extern struct cmd_list_element *deletelist;
|
extern struct cmd_list_element *deletelist;
|
||||||
|
|
||||||
|
/* Chain containing all defined detach subcommands. */
|
||||||
|
|
||||||
|
extern struct cmd_list_element *detachlist;
|
||||||
|
|
||||||
/* Chain containing all defined toggle subcommands. */
|
/* Chain containing all defined toggle subcommands. */
|
||||||
|
|
||||||
extern struct cmd_list_element *togglelist;
|
extern struct cmd_list_element *togglelist;
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2006-10-27 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* gdb.texinfo (Processes): Rename "detach-fork" to "detach fork".
|
||||||
|
|
||||||
2006-10-21 Eli Zaretskii <eliz@gnu.org>
|
2006-10-21 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
* gdb.texinfo (Breakpoints, Set Watchpoints): Elaborate and
|
* gdb.texinfo (Breakpoints, Set Watchpoints): Elaborate and
|
||||||
|
|
|
@ -2574,13 +2574,13 @@ as shown in the first field of the @samp{info forks} display.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
To quit debugging one of the forked processes, you can either detach
|
To quit debugging one of the forked processes, you can either detach
|
||||||
from it by using the @w{@code{detach-fork}} command (allowing it to
|
from it by using the @w{@code{detach fork}} command (allowing it to
|
||||||
run independently), or delete (and kill) it using the
|
run independently), or delete (and kill) it using the
|
||||||
@w{@code{delete fork}} command.
|
@w{@code{delete fork}} command.
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@kindex detach-fork @var{fork-id}
|
@kindex detach fork @var{fork-id}
|
||||||
@item detach-fork @var{fork-id}
|
@item detach fork @var{fork-id}
|
||||||
Detach from the process identified by @value{GDBN} fork number
|
Detach from the process identified by @value{GDBN} fork number
|
||||||
@var{fork-id}, and remove it from the fork list. The process will be
|
@var{fork-id}, and remove it from the fork list. The process will be
|
||||||
allowed to run independently.
|
allowed to run independently.
|
||||||
|
|
|
@ -50,6 +50,10 @@ extern struct cmd_list_element *disablelist;
|
||||||
|
|
||||||
extern struct cmd_list_element *deletelist;
|
extern struct cmd_list_element *deletelist;
|
||||||
|
|
||||||
|
/* Chain containing all defined detach subcommands. */
|
||||||
|
|
||||||
|
extern struct cmd_list_element *detachlist;
|
||||||
|
|
||||||
/* Chain containing all defined toggle subcommands. */
|
/* Chain containing all defined toggle subcommands. */
|
||||||
|
|
||||||
extern struct cmd_list_element *togglelist;
|
extern struct cmd_list_element *togglelist;
|
||||||
|
|
|
@ -2123,10 +2123,11 @@ directory, or (if not found there) using the source file search path\n\
|
||||||
(see the \"directory\" command). You can also use the \"file\" command\n\
|
(see the \"directory\" command). You can also use the \"file\" command\n\
|
||||||
to specify the program, and to load its symbol table."));
|
to specify the program, and to load its symbol table."));
|
||||||
|
|
||||||
add_com ("detach", class_run, detach_command, _("\
|
add_prefix_cmd ("detach", class_run, detach_command, _("\
|
||||||
Detach a process or file previously attached.\n\
|
Detach a process or file previously attached.\n\
|
||||||
If a process, it is no longer traced, and it continues its execution. If\n\
|
If a process, it is no longer traced, and it continues its execution. If\n\
|
||||||
you were debugging a file, the file is closed and gdb no longer accesses it."));
|
you were debugging a file, the file is closed and gdb no longer accesses it."),
|
||||||
|
&detachlist, "detach ", 0, &cmdlist);
|
||||||
|
|
||||||
add_com ("disconnect", class_run, disconnect_command, _("\
|
add_com ("disconnect", class_run, disconnect_command, _("\
|
||||||
Disconnect from a target.\n\
|
Disconnect from a target.\n\
|
||||||
|
|
|
@ -693,11 +693,12 @@ Argument 'n' is checkpoint ID, as displayed by 'info checkpoints'."));
|
||||||
Delete a fork/checkpoint (experimental)."),
|
Delete a fork/checkpoint (experimental)."),
|
||||||
&deletelist);
|
&deletelist);
|
||||||
|
|
||||||
/* Detach-checkpoint command: release the process to run independantly,
|
/* Detach checkpoint command: release the process to run independently,
|
||||||
and remove it from the fork list. */
|
and remove it from the fork list. */
|
||||||
|
|
||||||
add_com ("detach-checkpoint", class_obscure, detach_fork_command, _("\
|
add_cmd ("checkpoint", class_obscure, detach_fork_command, _("\
|
||||||
Detach from a fork/checkpoint (experimental)."));
|
Detach from a fork/checkpoint (experimental)."),
|
||||||
|
&detachlist);
|
||||||
|
|
||||||
/* Info checkpoints command: list all forks/checkpoints
|
/* Info checkpoints command: list all forks/checkpoints
|
||||||
currently under gdb's control. */
|
currently under gdb's control. */
|
||||||
|
@ -709,7 +710,7 @@ Detach from a fork/checkpoint (experimental)."));
|
||||||
interchangeably). */
|
interchangeably). */
|
||||||
|
|
||||||
add_alias_cmd ("fork", "checkpoint", class_obscure, 1, &deletelist);
|
add_alias_cmd ("fork", "checkpoint", class_obscure, 1, &deletelist);
|
||||||
add_com_alias ("detach-fork", "detach-checkpoint", class_obscure, 1);
|
add_alias_cmd ("fork", "checkpoint", class_obscure, 1, &detachlist);
|
||||||
add_info_alias ("forks", "checkpoints", 0);
|
add_info_alias ("forks", "checkpoints", 0);
|
||||||
|
|
||||||
/* "fork <n>" (by analogy to "thread <n>"). */
|
/* "fork <n>" (by analogy to "thread <n>"). */
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2006-10-27 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* gdb.base/multi-forks.exp: Use "detach fork" instead of
|
||||||
|
"detach-fork".
|
||||||
|
|
||||||
2006-10-18 Daniel Jacobowitz <dan@codesoucery.com>
|
2006-10-18 Daniel Jacobowitz <dan@codesoucery.com>
|
||||||
|
|
||||||
* lib/gdbserver-support.exp (gdb_target_cmd): Anchor the ends
|
* lib/gdbserver-support.exp (gdb_target_cmd): Anchor the ends
|
||||||
|
|
|
@ -128,14 +128,14 @@ gdb_test "restart 0" " main .*" "restart final"
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test detach-fork
|
# Test detach fork
|
||||||
#
|
#
|
||||||
|
|
||||||
# [assumes we're at #0]
|
# [assumes we're at #0]
|
||||||
gdb_test "detach-fork 1" "Detached .*" "Detach 1"
|
gdb_test "detach fork 1" "Detached .*" "Detach 1"
|
||||||
gdb_test "detach-fork 2" "Detached .*" "Detach 2"
|
gdb_test "detach fork 2" "Detached .*" "Detach 2"
|
||||||
gdb_test "detach-fork 3" "Detached .*" "Detach 3"
|
gdb_test "detach fork 3" "Detached .*" "Detach 3"
|
||||||
gdb_test "detach-fork 4" "Detached .*" "Detach 4"
|
gdb_test "detach fork 4" "Detached .*" "Detach 4"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test delete fork
|
# Test delete fork
|
||||||
|
|
Loading…
Add table
Reference in a new issue