From: Doug Evans <dje@google.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Add -s option to source command.
Date: Tue, 20 Apr 2010 05:38:00 -0000 [thread overview]
Message-ID: <j2ne394668d1004192238gc85dec53ve8b6ef71dd35bdb9@mail.gmail.com> (raw)
In-Reply-To: <i2g6dc9ffc81004170819q7a419333mb78775d0cec8ab3f@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1636 bytes --]
On Sat, Apr 17, 2010 at 8:19 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> 2010-04-06 Doug Evans <dje@google.com>
>>
>> Add -s option to source command.
>> * cli/cli-cmds.c (find_and_open_script): Add function comment.
>> Delete from_tty and cleanupp args. Split filep arg into file and
>> full_pathp. New arg search_path.
>> (source_script_from_stream): New function.
>> (source_script_with_search): New function.
>> (source_script): Rewrite.
>> (source_command): Parse "-s" option.
>> (init_cli_cmds): Add "-s" docs to source command help.
>> * python/python.c (source_python_script): Make file arg a const char *.
>> Don't call fclose, leave for caller.
>> * python/python.h (source_python_script): Update.
>>
>> testsuite/
>> * gdb.base/source-test.gdb: New file.
>> * gdb.base/source.exp: Add tests for "source -v" and "source -s".
>>
>> doc/
>> * gdb.texinfo (Command Files): Add docs for new "source -s" option.
>>
>
> This caused:
>
> help source^M
> Read commands from a file named FILE.^M
> ^M
> Usage: source [-s] [-v] FILE^M
> -s: search for the script in the source search path,^M
> even if FILE contains directories.^M
> -v: each command in FILE is echoed as it is executed.^M
> ^M
> Note that the file ".gdbinit" is read automatically in this way^M
> when GDB is started.^M
> (gdb) FAIL: gdb.base/help.exp: help source
Thanks. Fix checked in.
010-04-19 Doug Evans <dje@google.com>
* gdb.base/help.exp (help source): Update expected output.
[-- Attachment #2: help-1.patch.txt --]
[-- Type: text/plain, Size: 1493 bytes --]
2010-04-19 Doug Evans <dje@google.com>
* gdb.base/help.exp (help source): Update expected output.
Index: gdb.base/help.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/help.exp,v
retrieving revision 1.38
diff -u -p -r1.38 help.exp
--- gdb.base/help.exp 4 Apr 2010 23:47:16 -0000 1.38
+++ gdb.base/help.exp 20 Apr 2010 05:35:20 -0000
@@ -606,7 +606,9 @@ gdb_test "help stepi" "Step one instruct
gdb_test "help signal" "Continue program giving it signal.*" "help signal"
# test help source
# vxgdb reads .vxgdbinit
-gdb_test "help source" "Read commands from a file named FILE\.\[\r\n\]+Optional -v switch \\(before the filename\\) causes each command in\[\r\n\]+FILE to be echoed as it is executed\.\[\r\n\]+Note that the file \"\[^\"\]*\" is read automatically in this way\[\r\n\]+when GDB is started\." "help source"
+# ".-s. .-v." is written that way to avoid the complications of trying
+# to get "[-s] [-v]" through expect and tcl.
+gdb_test "help source" "Read commands from a file named FILE\.\[\r\n\]+Usage: source .-s. .-v. FILE\[\r\n\]+-s: search for the script in the source search path,\[\r\n\]+\[ \]+even if FILE contains directories\.\[\r\n\]+-v: each command in FILE is echoed as it is executed\.\[\r\n\]+Note that the file \"\[^\"\]*\" is read automatically in this way\[\r\n\]+when GDB is started\." "help source"
# test help stack
test_class_help "stack" {
"Examining the stack\..*\[\r\n\]+"
prev parent reply other threads:[~2010-04-20 5:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-06 21:58 Doug Evans
2010-04-06 23:17 ` Doug Evans
2010-04-07 20:14 ` Tom Tromey
2010-04-08 22:49 ` Doug Evans
2010-04-08 23:09 ` Sergio Durigan Junior
2010-04-09 0:13 ` Doug Evans
2010-04-09 17:15 ` Tom Tromey
2010-04-09 17:48 ` Eli Zaretskii
2010-04-10 1:29 ` Joel Brobecker
2010-04-09 7:49 ` Eli Zaretskii
2010-04-09 17:23 ` Doug Evans
2010-04-09 17:46 ` Eli Zaretskii
2010-04-09 18:12 ` Doug Evans
2010-04-09 19:31 ` Eli Zaretskii
2010-04-09 19:49 ` Doug Evans
2010-04-12 17:31 ` Doug Evans
2010-04-12 17:33 ` Doug Evans
2010-04-12 17:47 ` Tom Tromey
2010-04-12 17:54 ` Eli Zaretskii
2010-04-14 22:01 ` Doug Evans
2010-04-15 3:10 ` Eli Zaretskii
2010-04-09 17:13 ` Tom Tromey
2010-04-09 17:15 ` Doug Evans
2010-04-09 17:19 ` Tom Tromey
2010-04-17 15:20 ` H.J. Lu
2010-04-20 5:38 ` Doug Evans [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=j2ne394668d1004192238gc85dec53ve8b6ef71dd35bdb9@mail.gmail.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=hjl.tools@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox