This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A question about data-directory


Hi,

I am trying to play around the python pretty-printing stuff in 7.1
(sweet!). However, I cannot seem to get my pretty printers loaded as
documented here:

http://sourceware.org/gdb/current/onlinedocs/gdb/objfile_002dgdb_002epy-file.html#objfile_002dgdb_002epy-file

I think I am unclear on what "real-name" means. I tried the following setup.

/tmp/test/test.cpp ? ? ?# source file
/tmp/test/test ? ? ? ? ? ?# executable
/tmp/test/data/python/auto-load/test-gdb.py ? ?# auto-loadable file.
/tmp/test/data/python/auto-load/test.py ? ? ? ? ?# auto-loadable file.
/tmp/test/data/python/auto-load/test ? ? ? ? ? ? ?# auto-loadable file.
/tmp/test/data/python/auto-load/test.o           # auto-loadable file.

I basically created as many variants of the executable as I could
think of. All of these files are simple python scripts which contain a
single line "print 'getting here'"

I then started GDB and within it

(gdb) set data-directory /tmp/test/data
(gdb) file test
Reading symbols from /tmp/test/test...done.
(gdb)

I was expecting the output from the auto-load script to say 'getting
here' before getting back to the prompt. If I place test-gdb.py in the
same directory as the executable (i.e. at /tmp/test/test-gdb.py) then
I do get a line saying 'getting here'.

Could you please let me know what I am doing wrong?

Regards,
Srinath

PS: This is the version I am using:

savadhan@mint /tmp/test $ gdb --version
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]