From: Doug Evans <dje@google.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: tromey@redhat.com, gdb-patches@sourceware.org
Subject: Re: [RFA] info auto-load-scripts, plus warning change
Date: Sat, 14 May 2011 19:48:00 -0000 [thread overview]
Message-ID: <BANLkTinY3FHKjDytDXDXZ6mv99f7Fyk6eQ@mail.gmail.com> (raw)
In-Reply-To: <83pqnlg3se.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 915 bytes --]
On Sat, May 14, 2011 at 12:05 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Fri, 13 May 2011 15:23:57 -0700
>> From: Doug Evans <dje@google.com>
>> Cc: gdb-patches@sourceware.org
>>
>> +Print the list of all scripts that gdb auto-loaded, or tried to auto-load.
> ^^^
> This should be "@value{GDBN}".
>
> Btw, is it useful to include names of scripts that GDB _tried_ to
> auto-load, if the auto-load failed? Or maybe the "Loaded" field will
> then say "No"? In the latter case, the manual should say so.
>
> Thanks.
How about this?
2011-05-14 Doug Evans <dje@google.com>
* python/py-autoload.c (print_script): Print "Missing" instead of
"No" for missing scripts.
(info_auto_load_scripts): Tweak "Loaded" column to fit "Missing".
doc/
* gdb.texinfo (Auto-loading): Document printing of missing scripts.
[-- Attachment #2: gdb-110514-info-auto-load-3.patch.txt --]
[-- Type: text/plain, Size: 2767 bytes --]
2011-05-14 Doug Evans <dje@google.com>
* python/py-autoload.c (print_script): Print "Missing" instead of
"No" for missing scripts.
(info_auto_load_scripts): Tweak "Loaded" column to fit "Missing".
doc/
* gdb.texinfo (Auto-loading): Document printing of missing scripts.
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.838
diff -u -p -r1.838 gdb.texinfo
--- doc/gdb.texinfo 13 May 2011 22:36:07 -0000 1.838
+++ doc/gdb.texinfo 14 May 2011 19:39:50 -0000
@@ -23601,14 +23601,25 @@ Show whether auto-loading of Python scri
@kindex info auto-load-scripts
@cindex print list of auto-loaded scripts
@item info auto-load-scripts [@var{regexp}]
-Print the list of all scripts that gdb auto-loaded, or tried to auto-load.
+Print the list of all scripts that @value{GDBN} auto-loaded.
+
+Also printed is the list of scripts that were mentioned in
+the @code{.debug_gdb_scripts} section and were not found
+(@pxref{.debug_gdb_scripts section}).
+This is useful because their names are not printed when @value{GDBN}
+tries to load them and fails. There may be many of them, and printing
+an error message for each one is problematic.
+
If @var{regexp} is supplied only scripts with matching names are printed.
+Example:
+
@smallexample
(gdb) info auto-load-scripts
-Loaded Script
- Yes py-section-script.py
- full name: /tmp/py-section-script.py
+Loaded Script
+Yes py-section-script.py
+ full name: /tmp/py-section-script.py
+Missing my-foo-pretty-printers.py
@end smallexample
@end table
Index: python/py-auto-load.c
===================================================================
RCS file: /cvs/src/src/gdb/python/py-auto-load.c,v
retrieving revision 1.9
diff -u -p -r1.9 py-auto-load.c
--- python/py-auto-load.c 13 May 2011 22:11:47 -0000 1.9
+++ python/py-auto-load.c 14 May 2011 19:39:50 -0000
@@ -497,7 +497,7 @@ print_script (struct loaded_script *scri
chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- ui_out_field_string (uiout, "loaded", script->full_path ? "Yes" : "No");
+ ui_out_field_string (uiout, "loaded", script->full_path ? "Yes" : "Missing");
ui_out_field_string (uiout, "script", script->name);
ui_out_text (uiout, "\n");
@@ -569,7 +569,7 @@ info_auto_load_scripts (char *pattern, i
make_cleanup_ui_out_table_begin_end (uiout, 2, nr_scripts,
"AutoLoadedScriptsTable");
- ui_out_table_header (uiout, 6, ui_center, "loaded", "Loaded");
+ ui_out_table_header (uiout, 7, ui_left, "loaded", "Loaded");
ui_out_table_header (uiout, 70, ui_left, "script", "Script");
ui_out_table_body (uiout);
next prev parent reply other threads:[~2011-05-14 19:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 21:17 Doug Evans
2011-05-12 20:51 ` Tom Tromey
2011-05-13 22:24 ` Doug Evans
2011-05-14 7:08 ` Eli Zaretskii
2011-05-14 19:48 ` Doug Evans [this message]
2011-05-14 20:51 ` Eli Zaretskii
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=BANLkTinY3FHKjDytDXDXZ6mv99f7Fyk6eQ@mail.gmail.com \
--to=dje@google.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.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