* Execute code in python pretty printers
@ 2009-06-28 19:14 Niko Sams
2009-06-29 17:08 ` Tom Tromey
0 siblings, 1 reply; 9+ messages in thread
From: Niko Sams @ 2009-06-28 19:14 UTC (permalink / raw)
To: gdb
Hi,
I'm writing pretty printers for various Qt classes.
For QModelIndex I'd like to show the parent QModelIndex as child. The
parent isn't
saved in the QModelIndex object direclty - instead QModelIndex asks
the model for it's parent.
Basically it returns this->model->parent(this).
QAbstractItemModel::parent is a virtual function implemented
differently in every model.
So to find out the parent the method has to be executed.
Is this possible?
Niko
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Execute code in python pretty printers
2009-06-28 19:14 Execute code in python pretty printers Niko Sams
@ 2009-06-29 17:08 ` Tom Tromey
2009-06-29 17:18 ` Niko Sams
2009-06-29 17:51 ` Paul Pluzhnikov
0 siblings, 2 replies; 9+ messages in thread
From: Tom Tromey @ 2009-06-29 17:08 UTC (permalink / raw)
To: Niko Sams; +Cc: gdb
>>>>> "Niko" == Niko Sams <niko.sams@gmail.com> writes:
Niko> For QModelIndex I'd like to show the parent QModelIndex as
Niko> child.
This reads very strangely :)
Niko> So to find out the parent the method has to be executed.
Niko> Is this possible?
No, we have not implemented inferior function calls on Value yet.
Note that even when it does work, it is not the friendliest thing to
do. Doing this prevents your pretty-printers from working with core
files.
Tom
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Execute code in python pretty printers
2009-06-29 17:08 ` Tom Tromey
@ 2009-06-29 17:18 ` Niko Sams
2009-06-29 18:25 ` Tom Tromey
2009-06-29 17:51 ` Paul Pluzhnikov
1 sibling, 1 reply; 9+ messages in thread
From: Niko Sams @ 2009-06-29 17:18 UTC (permalink / raw)
To: gdb
On Mon, Jun 29, 2009 at 19:07, Tom Tromey<tromey@redhat.com> wrote:
>>>>>> "Niko" == Niko Sams <niko.sams@gmail.com> writes:
>
> Niko> For QModelIndex I'd like to show the parent QModelIndex as
> Niko> child.
>
> This reads very strangely :)
>
> Niko> So to find out the parent the method has to be executed.
> Niko> Is this possible?
>
> No, we have not implemented inferior function calls on Value yet.
ok, at least this means it should be possible...
Is this planned for 7.0?
> Note that even when it does work, it is not the friendliest thing to
> do. Doing this prevents your pretty-printers from working with core
> files.
I see. And I guess there is no way around it.
But better it works for normal debug session than never.
Niko
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Execute code in python pretty printers
2009-06-29 17:18 ` Niko Sams
@ 2009-06-29 18:25 ` Tom Tromey
0 siblings, 0 replies; 9+ messages in thread
From: Tom Tromey @ 2009-06-29 18:25 UTC (permalink / raw)
To: Niko Sams; +Cc: gdb
>>>>> "Niko" == Niko Sams <niko.sams@gmail.com> writes:
Tom> No, we have not implemented inferior function calls on Value yet.
Niko> ok, at least this means it should be possible...
Niko> Is this planned for 7.0?
I don't have any concrete plan to implement it.
I don't know whether anybody else is working on it at the moment.
Tom
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Execute code in python pretty printers
2009-06-29 17:08 ` Tom Tromey
2009-06-29 17:18 ` Niko Sams
@ 2009-06-29 17:51 ` Paul Pluzhnikov
2009-06-29 18:26 ` Tom Tromey
2009-06-29 19:13 ` Niko Sams
1 sibling, 2 replies; 9+ messages in thread
From: Paul Pluzhnikov @ 2009-06-29 17:51 UTC (permalink / raw)
To: tromey; +Cc: Niko Sams, gdb
On Mon, Jun 29, 2009 at 10:07 AM, Tom Tromey<tromey@redhat.com> wrote:
> Niko> So to find out the parent the method has to be executed.
> Niko> Is this possible?
>
> No, we have not implemented inferior function calls on Value yet.
But I believe it *is* possible (if ugly):
http://sourceware.org/ml/archer/2009-q2/msg00197.html
--
Paul Pluzhnikov
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Execute code in python pretty printers
2009-06-29 17:51 ` Paul Pluzhnikov
@ 2009-06-29 18:26 ` Tom Tromey
2009-06-29 21:36 ` Paul Pluzhnikov
2009-06-29 19:13 ` Niko Sams
1 sibling, 1 reply; 9+ messages in thread
From: Tom Tromey @ 2009-06-29 18:26 UTC (permalink / raw)
To: Paul Pluzhnikov; +Cc: Niko Sams, gdb
>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:
Paul> On Mon, Jun 29, 2009 at 10:07 AM, Tom Tromey<tromey@redhat.com> wrote:
Niko> So to find out the parent the method has to be executed.
Niko> Is this possible?
>>
>> No, we have not implemented inferior function calls on Value yet.
Paul> But I believe it *is* possible (if ugly):
Paul> http://sourceware.org/ml/archer/2009-q2/msg00197.html
This reminds me -- I'm curious about the crashes you were seeing.
Could you file a bug report?
I wonder whether these make will it difficult to implement the feature
in a real way later one.
Tom
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Execute code in python pretty printers
2009-06-29 17:51 ` Paul Pluzhnikov
2009-06-29 18:26 ` Tom Tromey
@ 2009-06-29 19:13 ` Niko Sams
2009-06-29 19:18 ` Paul Pluzhnikov
1 sibling, 1 reply; 9+ messages in thread
From: Niko Sams @ 2009-06-29 19:13 UTC (permalink / raw)
To: Paul Pluzhnikov; +Cc: tromey, gdb
On Mon, Jun 29, 2009 at 19:50, Paul Pluzhnikov<ppluzhnikov@google.com> wrote:
> On Mon, Jun 29, 2009 at 10:07 AM, Tom Tromey<tromey@redhat.com> wrote:
>
>> Niko> So to find out the parent the method has to be executed.
>> Niko> Is this possible?
>>
>> No, we have not implemented inferior function calls on Value yet.
>
> But I believe it *is* possible (if ugly):
> http://sourceware.org/ml/archer/2009-q2/msg00197.html
hmm... that doesn't work for me:
NameError: global name 'parse_and_eval' is not defined
Niko
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-06-29 21:36 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-28 19:14 Execute code in python pretty printers Niko Sams
2009-06-29 17:08 ` Tom Tromey
2009-06-29 17:18 ` Niko Sams
2009-06-29 18:25 ` Tom Tromey
2009-06-29 17:51 ` Paul Pluzhnikov
2009-06-29 18:26 ` Tom Tromey
2009-06-29 21:36 ` Paul Pluzhnikov
2009-06-29 19:13 ` Niko Sams
2009-06-29 19:18 ` Paul Pluzhnikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox