From: Khoo Yit Phang <khooyp@cs.umd.edu>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Khoo Yit Phang <khooyp@cs.umd.edu>,
GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Warn about data-directory when failing to import Python "gdb" module
Date: Sat, 22 Sep 2012 18:37:00 -0000 [thread overview]
Message-ID: <852B272B-AEEE-49AB-8AFC-C1EAB2B5A1EF@cs.umd.edu> (raw)
In-Reply-To: <20120922133033.GA31924@host2.jankratochvil.net>
[-- Attachment #1: Type: text/plain, Size: 823 bytes --]
Hi Jan,
On Sep 22, 2012, at 9:30 AM, Jan Kratochvil wrote:
> ------------------------------------------------------------------------------
> Python Exception <type 'exceptions.ImportError'> No module named gdb:
>
> warning: Could not load the Python gdb module from `dfasdfsa/python'.
> You may need to provide the -data-directory flag to GDB.
> Limited Python support is available from the _gdb module.
> For more information about GDB dependencies on external files
> see the "Data Files" section in the GDB manual. E.g., run from the shell:
> info "(gdb)Data Files"
> ------------------------------------------------------------------------------
Thanks for pointing out this style, it looks good to me, and it's nice to be consistent. I've updated my patch with it.
Yit
September 22, 2012
[-- Attachment #2: warn-gdb-python-compat.txt --]
[-- Type: text/plain, Size: 949 bytes --]
gdb/ChangeLog
2012-09-22 Khoo Yit Phang <khooyp@cs.umd.edu>
* gdb/python.c (finish_python_initialization): Augment the warning
when importing "gdb" fails, to check that data-directory is set
correctly.
diff --git a/gdb/python/python.c b/gdb/python/python.c
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1506,7 +1506,12 @@
gdbpy_print_stack ();
warning (_("Could not load the Python gdb module from `%s'."),
gdb_pythondir);
- warning (_("Limited Python support is available from the _gdb module."));
+ printf_filtered(_("\
+You may need to provide the -data-directory flag to GDB.\n\
+Limited Python support is available from the _gdb module.\n\
+For more information about GDB dependencies on external files\n\
+see the \"Data Files\" section in the GDB manual. E.g., run from the shell:\n\
+\tinfo \"(gdb)Data Files\"\n"));
do_cleanups (cleanup);
return;
}
next prev parent reply other threads:[~2012-09-22 18:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 19:36 Khoo Yit Phang
2012-09-17 20:23 ` Jan Kratochvil
2012-09-17 20:28 ` Khoo Yit Phang
2012-09-17 20:36 ` Jan Kratochvil
2012-09-17 20:58 ` Joel Brobecker
2012-09-17 21:04 ` Khoo Yit Phang
2012-09-18 20:40 ` Khoo Yit Phang
2012-09-22 13:30 ` Jan Kratochvil
2012-09-22 18:37 ` Khoo Yit Phang [this message]
2012-10-06 20:56 ` Ping! " Khoo Yit Phang
2012-09-18 6:17 ` Eli Zaretskii
2012-09-18 11:58 ` Jan Kratochvil
2012-09-18 12:21 ` Eli Zaretskii
2012-09-18 13:54 ` Joel Brobecker
2012-09-18 15:38 ` Khoo Yit Phang
2012-09-18 15:44 ` Jan Kratochvil
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=852B272B-AEEE-49AB-8AFC-C1EAB2B5A1EF@cs.umd.edu \
--to=khooyp@cs.umd.edu \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@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