Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Martin Galvan <martin.galvan@tallertechnologies.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2] Python API: Fix an exception when registering a global pretty-printer in verbose mode
Date: Sat, 28 Mar 2015 20:40:00 -0000	[thread overview]
Message-ID: <CAOKbPbYcnQ-yFkh1vD3YszRCfJr4QV0dVRfdWQHpBYg=sdC2gg@mail.gmail.com> (raw)
In-Reply-To: <21760.54598.126480.383468@ruffy2.mtv.corp.google.com>

On Wed, Mar 11, 2015 at 8:52 PM, Doug Evans <dje@google.com> wrote:
> Martin Galvan writes:
>  > This patch fixes a Python exception that was being thrown when trying to register a global pretty-printer with verbose mode on:
>  >
>  >   File "/usr/share/gdb/python/gdb/printing.py", line 119, in register_pretty_printer
>  >     gdb.write("Registering global %s pretty-printer ...\n" % name)
>  > NameError: name 'name' is not defined
>  >
>  > My copyright assignment is on the works, but since this is a small patch I don't think it's necessary.
>  >
>  > Changes from v1:
>  >  * Moved printer.name to the next line so that it won't break the 80 character limit.
>  >
>  > --
>  >
>  > Changelog:
>  >
>  > 2015-03-11  Martin Galvan  <martin.galvan@tallertechnologies.com>
>  >
>  >      * python/lib/gdb/printing.py: Fix exception when registering a global pretty-printer in verbose mode.
>  >
>  > diff --git a/gdb/python/lib/gdb/printing.py b/gdb2/python/lib/gdb/printing.py
>  > index 47742a9..c935333 100644
>  > --- a/gdb/python/lib/gdb/printing.py
>  > +++ b/gdb/python/lib/gdb/printing.py
>  > @@ -116,7 +116,8 @@ def register_pretty_printer(obj, printer, replace=False):
>  >
>  >      if obj is None:
>  >          if gdb.parameter("verbose"):
>  > -            gdb.write("Registering global %s pretty-printer ...\n" % name)
>  > +            gdb.write("Registering global %s pretty-printer ...\n" %
>  > +                      printer.name)
>  >          obj = gdb
>  >      else:
>  >          if gdb.parameter("verbose"):
>
> LGTM, with two more nits.
> The ChangeLog entry > 80 char limit :-),
> and convention is to include the function name in the ChangeLog entry.
>
> E.g.,
>
> 2015-03-11  Martin Galvan  <martin.galvan@tallertechnologies.com>
>
>         * python/lib/gdb/printing.py (register_pretty_printer): Fix exception
>         when registering a global pretty-printer in verbose mode.
>
> No need to repost though.
> Ok to commit with that fixed.

Sorry to bother, but I don't have write privileges on the repository;
would you be so kind to commit this for me?

Thanks a lot!

-- 

Martin Galvan

Software Engineer

Taller Technologies Argentina

San Lorenzo 47, 3rd Floor, Office 5

Córdoba, Argentina

Phone: 54 351 4217888 / +54 351 4218211


  parent reply	other threads:[~2015-03-28 20:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 18:17 Martin Galvan
2015-03-11 23:52 ` Doug Evans
2015-03-12  0:25   ` Martin Galvan
2015-03-28 20:40   ` Martin Galvan [this message]
2016-01-01 11:33     ` Joel Brobecker
2016-01-02  1:09       ` Martin Galvan
2016-01-02  2:46         ` Joel Brobecker

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='CAOKbPbYcnQ-yFkh1vD3YszRCfJr4QV0dVRfdWQHpBYg=sdC2gg@mail.gmail.com' \
    --to=martin.galvan@tallertechnologies.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /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