Commits

Yit Phang Khoo committed 11b5d38

Update warn-gdb-python-compat based on review: better warning text.

Comments (0)

Files changed (1)

warn-gdb-python-compat

 # HG changeset patch
-# Parent 950bea52b3f79760d10a339ba1495326c081b411
+# Parent e8a1a1fe660cc0c282d4b55876e2df29fd68627a
 Augment the warning when importing "gdb" fails, to check that data-directory is set correctly.
 
 diff --git a/gdb/ChangeLog b/gdb/ChangeLog
 --- a/gdb/ChangeLog
 +++ b/gdb/ChangeLog
 @@ -1,3 +1,9 @@
-+2012-09-17  Khoo Yit Phang  <khooyp@cs.umd.edu>
++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.
 +
- 2012-09-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
+ 2012-09-22  Yao Qi  <yao@codesourcery.com>
  
- 	* common/linux-ptrace.c: Change __i386__ to __i386__ || __x86_64__.
+ 	* remote.c (remote_get_trace_status): Remove setting default
 diff --git a/gdb/python/python.c b/gdb/python/python.c
 --- a/gdb/python/python.c
 +++ b/gdb/python/python.c
-@@ -1484,6 +1484,7 @@
+@@ -1506,7 +1506,12 @@
        gdbpy_print_stack ();
        warning (_("Could not load the Python gdb module from `%s'."),
  		 gdb_pythondir);
-+      warning (_("Please make sure that data-directory is set correctly."));
-       warning (_("Limited Python support is available from the _gdb module."));
+-      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;
+     }