Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* A question about data-directory
@ 2010-08-30 22:46 Srinath Avadhanula
  2010-08-30 23:00 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Srinath Avadhanula @ 2010-08-30 22:46 UTC (permalink / raw)
  To: gdb

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/>.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-31 13:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30 22:46 A question about data-directory Srinath Avadhanula
2010-08-30 23:00 ` Daniel Jacobowitz
2010-08-30 23:22   ` Srinath Avadhanula
2010-08-31 13:08     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox