From: Daniel Jacobowitz Date: Tue, 13 Jan 2004 21:31:43 +0000 (+0000) Subject: * infrun.c (follow_fork_mode_ask): Remove. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea1dd7bc40deeb43d44eefa7eed8662bd5d68892;p=binutils-gdb.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 03aea9e6b6d..8b4bcb1a5e9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2004-01-13 Daniel Jacobowitz + + * 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. + 2004-01-13 Andrew Cagney * configure.in: Update copyright year. 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);