unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Douglas Anderson <douglasjanderson@gmail.com>
To: immerrr again <immerrr@gmail.com>
Cc: 22657@debbugs.gnu.org
Subject: bug#22657: 24.5; "Python Exception <class 'NameError'> name 'long' is not defined" while using gdb registers buffer
Date: Sun, 14 Feb 2016 12:22:47 -0700	[thread overview]
Message-ID: <CAFBY8F2eCmdVrcA6G3yZzvdD-5p7i5mKyEZ+P9W=cgtJkjDVDA@mail.gmail.com> (raw)
In-Reply-To: <CAFKGYcMeGRLmMkt4OHifuwQCqu++EpYZt7rrr300_O=8DOqWsw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]

Nice hint, yeah that helped me find it:

index 9ff94aa..63b3fdf 100644
--- a/gdb/python/lib/gdb/printer/bound_registers.py
+++ b/gdb/python/lib/gdb/printer/bound_registers.py
@@ -25,7 +25,7 @@ class MpxBound128Printer:
     def to_string (self):
         upper = self.val["ubound"]
         lower = self.val["lbound"]
-        size  = (long) ((upper) - (lower))
+        size  = (int) ((upper) - (lower))
         if size > -1:
             size = size + 1
         result = '{lbound = %s, ubound = %s} : size %s' % (lower, upper,
size)

I'll submit that patch to gdb, that fixed the exception.

Thanks,
-Doug

On Sun, Feb 14, 2016 at 11:20 AM, immerrr again <immerrr@gmail.com> wrote:

> On Sun, Feb 14, 2016 at 9:11 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >>
> >> Breakpoint 1, 0x000000000040053a in main ()
> >> (gdb) Python Exception <class 'NameError'> name 'long' is not defined:
> >> Python Exception <class 'NameError'> name 'long' is not defined:
> >> Python Exception <class 'NameError'> name 'long' is not defined:
> >> Python Exception <class 'NameError'> name 'long' is not defined:
> >>
>
> NameError means something is undefined, so probably gdb is executing
> scripts using python3 and some script doesn't account for the fact
> that only "long" and "int" types got merged  in Python3 world and
> "long" no longer exists.
>

[-- Attachment #2: Type: text/html, Size: 2089 bytes --]

  reply	other threads:[~2016-02-14 19:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-14  5:00 bug#22657: 24.5; "Python Exception <class 'NameError'> name 'long' is not defined" while using gdb registers buffer Douglas Anderson
2016-02-14 16:34 ` Eli Zaretskii
2016-02-14 17:22   ` Douglas Anderson
2016-02-14 18:11     ` Eli Zaretskii
2016-02-14 18:20       ` immerrr again
2016-02-14 19:22         ` Douglas Anderson [this message]
2016-02-14 19:28           ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAFBY8F2eCmdVrcA6G3yZzvdD-5p7i5mKyEZ+P9W=cgtJkjDVDA@mail.gmail.com' \
    --to=douglasjanderson@gmail.com \
    --cc=22657@debbugs.gnu.org \
    --cc=douglas.j.anderson@gmail.com \
    --cc=immerrr@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).