From: Joel Brobecker Date: Tue, 3 Dec 2013 06:04:32 +0000 (+0400) Subject: GDB/MI: Document support for -exec-run --start in -list-features X-Git-Tag: gdb-7.7-release~239 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72bfa06c56ec662b4262cc264f45462ccda6a5d6;p=external%2Fbinutils.git GDB/MI: Document support for -exec-run --start in -list-features This adds "exec-run-start-option" in the output of the -list-features commands, allowing front-ends to easily determine whether -exec-run supports the --start option. gdb/ChangeLog: * mi/mi-main.c (mi_cmd_list_features): add "exec-run-start-option". * NEWS: Expand the entry documenting the new -exec-run --start option to mention the corresponding new entry in the output of "-list-features". gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Document the new "exec-run-start-option" entry in the output of the "-list-features" command. gdb/testsuite/ChangeLog: * gdb.mi/mi-start.exp: Add test verifying that -list-features contains "exec-run-start-option". --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9401312..f8790e7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2013-12-10 Joel Brobecker + * mi/mi-main.c (mi_cmd_list_features): add "exec-run-start-option". + * NEWS: Expand the entry documenting the new -exec-run --start + option to mention the corresponding new entry in the output of + "-list-features". + +2013-12-10 Joel Brobecker + * windows-nat.c (handle_load_dll): Add comments. (windows_ensure_ntdll_loaded): New function. (do_initial_windows_stuff): Use windows_ensure_ntdll_loaded. diff --git a/gdb/NEWS b/gdb/NEWS index ae84e00..eff057f 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -191,7 +191,9 @@ show code-cache ** The -exec-run command now accepts an optional "--start" option. When used, the command follows the same semantics as the "start" command, stopping the program's execution at the start of its - main subprogram. + main subprogram. Support for this feature can be verified using + the "-list-features" command, which should contain + "exec-run-start-option". ** The new commands -catch-assert and -catch-exceptions insert catchpoints stopping the program when Ada exceptions are raised. diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 7a7ab1b..c6bdfdb 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,9 @@ +2013-12-10 Joel Brobecker + + * gdb.texinfo (GDB/MI Miscellaneous Commands): Document the new + "exec-run-start-option" entry in the output of the "-list-features" + command. + 2013-12-04 Eli Zaretskii * gdb.texinfo (i386): Fix yesterday's commit. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 87d5145..7dfa9f6 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -35261,6 +35261,9 @@ Indicates support for the @code{-info-gdb-mi-command} command. Indicates support for the "undefined-command" error code in error result records, produced when trying to execute an undefined @sc{gdb/mi} command (@pxref{GDB/MI Result Records}). +@item exec-run-start-option +Indicates that the @code{-exec-run} command supports the @option{--start} +option (@pxref{GDB/MI Program Execution}). @end table @subheading The @code{-list-target-features} Command diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 07f1dc1..63456cd 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -1818,6 +1818,7 @@ mi_cmd_list_features (char *command, char **argv, int argc) ui_out_field_string (uiout, NULL, "language-option"); ui_out_field_string (uiout, NULL, "info-gdb-mi-command"); ui_out_field_string (uiout, NULL, "undefined-command-error-code"); + ui_out_field_string (uiout, NULL, "exec-run-start-option"); #if HAVE_PYTHON if (gdb_python_initialized) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d5d11f4..08f6b27 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-12-10 Joel Brobecker + + * gdb.mi/mi-start.exp: Add test verifying that -list-features + contains "exec-run-start-option". + 2013-12-08 Yao Qi * lib/gdb.exp (support_complex_tests): Use gdb_produce_source. diff --git a/gdb/testsuite/gdb.mi/mi-start.exp b/gdb/testsuite/gdb.mi/mi-start.exp index 98dfef4..0cd759f 100644 --- a/gdb/testsuite/gdb.mi/mi-start.exp +++ b/gdb/testsuite/gdb.mi/mi-start.exp @@ -41,6 +41,12 @@ mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load ${binfile} +# First, verify that the debugger correctly advertises support +# for the --start option of the -exec-run command. +mi_gdb_test "-list-features" \ + "\\^done,features=\\\[.*\"exec-run-start-option\".*\\\]" \ + "-list-features includes \"exec-run-start-option\"" + mi_run_cmd "--start" mi_expect_stop "breakpoint-hit" "main" "" ".*mi-start.c" "$decimal" \ { "" "disp=\"del\"" } "run to main"