summaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2004-01-13 21:31:43 +0000
committerDaniel Jacobowitz <dan@debian.org>2004-01-13 21:31:43 +0000
commit72e217c1338275441bef89fabddce878ee7d03c5 (patch)
treeb69f4f00f94375c76612100d49185f268adf6340 /gdb/infrun.c
parent699444ffd84a01e3f67dcd1d01b2819d7b9590f0 (diff)
downloadgdb-72e217c1338275441bef89fabddce878ee7d03c5.tar.gz
* infrun.c (follow_fork_mode_ask): Remove.
(follow_fork_mode_kind_names): Remove follow_fork_mode_ask. (follow_fork): Simplify and remove internal error for follow_fork_mode_ask. (_initialize_infrun): Update "set follow-fork-mode" help text.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c36
1 files changed, 3 insertions, 33 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 4e615d519e0..71c28454443 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2,7 +2,7 @@
process.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -340,12 +340,10 @@ static struct
}
pending_follow;
-static const char follow_fork_mode_ask[] = "ask";
static const char follow_fork_mode_child[] = "child";
static const char follow_fork_mode_parent[] = "parent";
static const char *follow_fork_mode_kind_names[] = {
- follow_fork_mode_ask,
follow_fork_mode_child,
follow_fork_mode_parent,
NULL
@@ -357,16 +355,7 @@ static const char *follow_fork_mode_string = follow_fork_mode_parent;
static int
follow_fork (void)
{
- const char *follow_mode = follow_fork_mode_string;
- int follow_child = (follow_mode == follow_fork_mode_child);
-
- /* Or, did the user not know, and want us to ask? */
- if (follow_fork_mode_string == follow_fork_mode_ask)
- {
- internal_error (__FILE__, __LINE__,
- "follow_inferior_fork: \"ask\" mode not implemented");
- /* follow_mode = follow_fork_mode_...; */
- }
+ int follow_child = (follow_fork_mode_string == follow_fork_mode_child);
return target_follow_fork (follow_child);
}
@@ -4075,31 +4064,12 @@ to the user would be loading/unloading of a new library.\n", &setlist), &showlis
c = add_set_enum_cmd ("follow-fork-mode",
class_run,
follow_fork_mode_kind_names, &follow_fork_mode_string,
-/* ??rehrauer: The "both" option is broken, by what may be a 10.20
- kernel problem. It's also not terribly useful without a GUI to
- help the user drive two debuggers. So for now, I'm disabling
- the "both" option. */
-/* "Set debugger response to a program call of fork \
- or vfork.\n\
- A fork or vfork creates a new process. follow-fork-mode can be:\n\
- parent - the original process is debugged after a fork\n\
- child - the new process is debugged after a fork\n\
- both - both the parent and child are debugged after a fork\n\
- ask - the debugger will ask for one of the above choices\n\
- For \"both\", another copy of the debugger will be started to follow\n\
- the new child process. The original debugger will continue to follow\n\
- the original parent process. To distinguish their prompts, the\n\
- debugger copy's prompt will be changed.\n\
- For \"parent\" or \"child\", the unfollowed process will run free.\n\
- By default, the debugger will follow the parent process.",
- */
"Set debugger response to a program call of fork \
or vfork.\n\
A fork or vfork creates a new process. follow-fork-mode can be:\n\
parent - the original process is debugged after a fork\n\
child - the new process is debugged after a fork\n\
- ask - the debugger will ask for one of the above choices\n\
-For \"parent\" or \"child\", the unfollowed process will run free.\n\
+The unfollowed process will continue to run.\n\
By default, the debugger will follow the parent process.", &setlist);
add_show_from_set (c, &showlist);