* pretty printing with python
@ 2011-05-02 13:55 Klaus Rudolph
2011-05-02 14:32 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Klaus Rudolph @ 2011-05-02 13:55 UTC (permalink / raw)
To: gdb
Hi all,
I want to start with writing a pretty printer for gdb, but can't find a startup for my own printer.
First: All example contains a line
import gdb.printing
But this results in
Traceback (most recent call last):
File "/home/krud/projekte/myppc8000/ppc_8000_938/test.py", line 3, in <module>
import gdb.printing
ImportError: No module named printing
Must I write that file (which?) myself. Is there an extra download for the printers? Could I install some additional stuff?
Sorry for my confusion!
I hope you could give me a startpoint for the printer things...
Thanks
Klaus
--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pretty printing with python
2011-05-02 13:55 pretty printing with python Klaus Rudolph
@ 2011-05-02 14:32 ` Tom Tromey
2011-05-03 5:07 ` Klaus Rudolph
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2011-05-02 14:32 UTC (permalink / raw)
To: Klaus Rudolph; +Cc: gdb
>>>>> "Klaus" == Klaus Rudolph <lts-rudolph@gmx.de> writes:
Klaus> I want to start with writing a pretty printer for gdb, but can't
Klaus> find a startup for my own printer.
Klaus> First: All example contains a line
Klaus> import gdb.printing
Klaus> But this results in
Klaus> Traceback (most recent call last):
Klaus> File "/home/krud/projekte/myppc8000/ppc_8000_938/test.py", line 3, in <module>
Klaus> import gdb.printing
Klaus> ImportError: No module named printing
This means your GDB is too old. `gdb.printing' is not in any release
yet; it will make its debut in 7.3.
You can write printers so that they work with both the new- and
old-styles here. The libstdc++ printers do this.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pretty printing with python
2011-05-02 14:32 ` Tom Tromey
@ 2011-05-03 5:07 ` Klaus Rudolph
2011-05-03 13:35 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Klaus Rudolph @ 2011-05-03 5:07 UTC (permalink / raw)
To: gdb
> This means your GDB is too old. `gdb.printing' is not in any release
> yet; it will make its debut in 7.3.
>
> You can write printers so that they work with both the new- and
> old-styles here. The libstdc++ printers do this.
>
How can I enable the libstdc++ printers. Where can I find the files, which contains the "code". Use these printers also python? Is there any special configure/compile option to have printers enabled? Is there a beginner introduction to these topic anywhere?
Can anyone provide a little more of information?
Thanks
Klaus
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pretty printing with python
2011-05-03 5:07 ` Klaus Rudolph
@ 2011-05-03 13:35 ` Tom Tromey
0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2011-05-03 13:35 UTC (permalink / raw)
To: Klaus Rudolph; +Cc: gdb
>>>>> "Klaus" == Klaus Rudolph <lts-rudolph@gmx.de> writes:
Klaus> How can I enable the libstdc++ printers. Where can I find the
Klaus> files, which contains the "code". Use these printers also python?
Klaus> Is there any special configure/compile option to have printers
Klaus> enabled? Is there a beginner introduction to these topic
Klaus> anywhere?
The instructions are here:
http://sourceware.org/gdb/wiki/STLSupport
Specifically, the first bullet point.
I think many Linux distros ship these and enable them by default.
Yes, these printers are in Python.
There is documentation about writing, installing, and activating
printers in the GDB manual. It is online on the GDB web site.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-03 13:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-02 13:55 pretty printing with python Klaus Rudolph
2011-05-02 14:32 ` Tom Tromey
2011-05-03 5:07 ` Klaus Rudolph
2011-05-03 13:35 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox