Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <bauerman@br.ibm.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: Tom Tromey <tromey@redhat.com>,
	        gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: Python pretty-printing [5/6]
Date: Thu, 09 Apr 2009 15:41:00 -0000	[thread overview]
Message-ID: <1239291665.30578.24.camel@localhost.localdomain> (raw)
In-Reply-To: <49DE11F7.9000501@redhat.com>

El jue, 09-04-2009 a las 16:19 +0100, Phil Muldoon escribió:
> Thiago Jung Bauermann wrote:
> > I found one potential problem, which could cause the function to return
> > NULL without an exception being set (it's not the case I thought of
> > before, I think): suppose there's no objfile Python object when this
> > function is called, to the ALL_OBJFILES loop will skip all objs, then
> > the gdb module has no pretty_printers attribute, or the pretty_printers
> > value is not a list object. In that case, the function will return NULL
> > without a Python exception being set. Can it happen?
> 
> This would require the gdb.pretty_printers attribute in the code to be 
> changed from a list to something else (or removed for the not existing 
> scenario).  Anyway it would require a conscious code change on behalf of 
> another author, and not an environmental change. It could happen if 
> somebody changed the code, but I suspect (in this scenario) it would 
> fail long before it reached here.

I wonder if the pretty printing code in general would be better off
manipulating pretty_printers as a Sequence object, instead of a List.
After all, the OO people say you never know when you want to change your
implementation from a List to a FunkyStringOfObjects. :-)

I think me asking this to be changed would be pedantic, though. I agree
with you in that there's no real problem here.

> I'm in the middle of this right now. I'm putting the finishing touches 
> on the optional string fetch parameter from the comments posted to the 
> archer list, and will start work on fixing string output.

Awesome! I'm owing you an e-mail reply. Will do right now.
-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center


  reply	other threads:[~2009-04-09 15:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02 20:57 Tom Tromey
2009-04-03 15:29 ` Eli Zaretskii
2009-04-09  0:29   ` Tom Tromey
2009-04-04 16:39 ` Thiago Jung Bauermann
2009-04-09  0:52   ` Tom Tromey
2009-04-09 15:00     ` Thiago Jung Bauermann
2009-04-09 15:19       ` Phil Muldoon
2009-04-09 15:41         ` Thiago Jung Bauermann [this message]
2009-04-09 16:18           ` Tom Tromey
2009-04-09 15:44       ` Tom Tromey
2009-04-09 19:37     ` Tom Tromey
2009-04-09 22:09       ` Thiago Jung Bauermann
2009-04-09 22:36         ` Tom Tromey
2009-04-07 18:32 ` Joel Brobecker
2009-04-07 18:41   ` Tom Tromey
2009-04-07 20:38     ` Joel Brobecker
2009-04-09  1:08 ` Tom Tromey
2009-04-09  7:40   ` Eli Zaretskii
2009-04-09 16:16     ` Tom Tromey
2009-04-09 16:41       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1239291665.30578.24.camel@localhost.localdomain \
    --to=bauerman@br.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@redhat.com \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox