diff options
author | Andrew Stubbs <andrew.stubbs@st.com> | 2005-12-02 14:58:18 +0000 |
---|---|---|
committer | Andrew Stubbs <andrew.stubbs@st.com> | 2005-12-02 14:58:18 +0000 |
commit | 31e2b00f59ea05cf30d5a98cd48b3fdfe9e220d1 (patch) | |
tree | 15d2b2af76fce5ee3772bbe7351aeb9cdc78e904 /gdb/breakpoint.c | |
parent | 53e5f3cf290c7591f459743845dd24391d72796c (diff) | |
download | gdb-31e2b00f59ea05cf30d5a98cd48b3fdfe9e220d1.zip gdb-31e2b00f59ea05cf30d5a98cd48b3fdfe9e220d1.tar.gz gdb-31e2b00f59ea05cf30d5a98cd48b3fdfe9e220d1.tar.bz2 |
2005-12-02 Andrew Stubbs <andrew.stubbs@st.com>
* breakpoint.c (BREAK_ARGS_HELP): New mecro.
(_initialize_breakpoint): Enhance break, tbreak, hbreak and thbreak
commands' help by adding more information and using BREAK_ARGS_HELP
to duplicate the common parts. Remove now-redundant cross-references.
testsuite/
* gdb.base/help.exp (help b, help br, help bre, help brea)
(help break): Update the expected message.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 50 |
1 files changed, 33 insertions, 17 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index c8e15d9..c5a0da8e 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -7647,6 +7647,25 @@ decode_line_spec_1 (char *string, int funfirstline) return sals; } +/* This help string is used for the break, hbreak, tbreak and thbreak commands. + It is defined as a macro to prevent duplication. + COMMAND should be a string constant containing the name of the command. */ +#define BREAK_ARGS_HELP(command) \ +command" [LOCATION] [thread THREADNUM] [if CONDITION]\n\ +LOCATION may be a line number, function name, or \"*\" and an address.\n\ +If a line number is specified, break at start of code for that line.\n\ +If a function is specified, break at start of code for that function.\n\ +If an address is specified, break at that exact address.\n\ +With no LOCATION, uses current execution address of selected stack frame.\n\ +This is useful for breaking on return to a stack frame.\n\ +\n\ +THREADNUM is the number from \"info threads\".\n\ +CONDITION is a boolean expression.\n\ +\n\ +Multiple breakpoints at one place are permitted, and useful if conditional.\n\ +\n\ +Do \"help breakpoints\" for info on other commands dealing with breakpoints." + void _initialize_breakpoint (void) { @@ -7682,22 +7701,28 @@ Usage is `condition N COND', where N is an integer and COND is an\n\ expression to be evaluated whenever breakpoint N is reached.")); c = add_com ("tbreak", class_breakpoint, tbreak_command, _("\ -Set a temporary breakpoint. Args like \"break\" command.\n\ +Set a temporary breakpoint.\n\ Like \"break\" except the breakpoint is only temporary,\n\ so it will be deleted when hit. Equivalent to \"break\" followed\n\ -by using \"enable delete\" on the breakpoint number.")); +by using \"enable delete\" on the breakpoint number.\n\ +\n" +BREAK_ARGS_HELP ("tbreak"))); set_cmd_completer (c, location_completer); c = add_com ("hbreak", class_breakpoint, hbreak_command, _("\ -Set a hardware assisted breakpoint. Args like \"break\" command.\n\ +Set a hardware assisted breakpoint.\n\ Like \"break\" except the breakpoint requires hardware support,\n\ -some target hardware may not have this support.")); +some target hardware may not have this support.\n\ +\n" +BREAK_ARGS_HELP ("hbreak"))); set_cmd_completer (c, location_completer); c = add_com ("thbreak", class_breakpoint, thbreak_command, _("\ -Set a temporary hardware assisted breakpoint. Args like \"break\" command.\n\ +Set a temporary hardware assisted breakpoint.\n\ Like \"hbreak\" except the breakpoint is only temporary,\n\ -so it will be deleted when hit.")); +so it will be deleted when hit.\n\ +\n" +BREAK_ARGS_HELP ("thbreak"))); set_cmd_completer (c, location_completer); add_prefix_cmd ("enable", class_breakpoint, enable_command, _("\ @@ -7802,17 +7827,8 @@ is executing in.\n\ See also the \"delete\" command which clears breakpoints by number.")); c = add_com ("break", class_breakpoint, break_command, _("\ -Set breakpoint at specified line or function.\n\ -Argument may be line number, function name, or \"*\" and an address.\n\ -If line number is specified, break at start of code for that line.\n\ -If function is specified, break at start of code for that function.\n\ -If an address is specified, break at that exact address.\n\ -With no arg, uses current execution address of selected stack frame.\n\ -This is useful for breaking on return to a stack frame.\n\ -\n\ -Multiple breakpoints at one place are permitted, and useful if conditional.\n\ -\n\ -Do \"help breakpoints\" for info on other commands dealing with breakpoints.")); +Set breakpoint at specified line or function.\n" +BREAK_ARGS_HELP ("break"))); set_cmd_completer (c, location_completer); add_com_alias ("b", "break", class_run, 1); |