Discussion:
[Bug gdb/19637] New: bound_registers.py uses type "long", but long merged with "int" in python3
douglas.j.anderson at gmail dot com
2016-02-14 19:34:35 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19637

Bug ID: 19637
Summary: bound_registers.py uses type "long", but long merged
with "int" in python3
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: douglas.j.anderson at gmail dot com
Target Milestone: ---

Created attachment 8987
--> https://sourceware.org/bugzilla/attachment.cgi?id=8987&action=edit
diff to use "int" type instead of "long"

When using gdb's register view, I get the following exception:

Python Exception <class 'NameError'> name 'long' is not defined:

Using Ubuntu 15.10 with:

$ gdb --version
GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10

$ python3 --version
Python 3.4.3+

I've confirmed the issue still exists with gdb HEAD

The attached diff against git HEAD fixed the issue.

-Doug
--
You are receiving this mail because:
You are on the CC list for the bug.
douglas.j.anderson at gmail dot com
2016-03-13 17:51:05 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19637

Douglas Anderson <douglas.j.anderson at gmail dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |douglas.j.anderson at gmail dot co
| |m
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2016-05-24 15:34:59 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19637

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
I think it's better to be adaptive like printing.py:

if sys.version_info[0] > 2:
# Python 3 removed basestring and long
basestring = str
long = int


... because long is better on Python 2.

Also patches have to be submitted to the patch list.
--
You are receiving this mail because:
You are on the CC list for the bug.
jonah at kichwacoders dot com
2016-11-20 10:08:26 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19637

Jonah Graham <jonah at kichwacoders dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |jonah at kichwacoders dot com

--- Comment #2 from Jonah Graham <jonah at kichwacoders dot com> ---
As a cross reference the identification of this issue affected Emacs here:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-02/msg00849.html and CDT
here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=506382
--
You are receiving this mail because:
You are on the CC list for the bug.
jonah at kichwacoders dot com
2016-11-20 20:48:52 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19637

--- Comment #3 from Jonah Graham <jonah at kichwacoders dot com> ---
Sent a patch to the gdb-patches:
https://sourceware.org/ml/gdb-patches/2016-11/msg00597.html
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2017-03-17 14:58:50 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19637

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Pedro Alves <***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7503099f3e29739d34cb1224d54fba96404e6e61

commit 7503099f3e29739d34cb1224d54fba96404e6e61
Author: Jonah Graham <***@kichwacoders.com>
Date: Fri Mar 17 14:57:44 2017 +0000

Fix PR gdb/19637: bound_registers.py: Add support for Python 3

Fix this the same way gdb/python/lib/gdb/printing.py handles it.

gdb/Changelog:
2017-03-17 Jonah Graham <***@kichwacoders.com>

PR gdb/19637
* python/lib/gdb/printer/bound_registers.py: Add support for
Python 3.
--
You are receiving this mail because:
You are on the CC list for the bug.
palves at redhat dot com
2017-03-17 15:01:16 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19637

Pedro Alves <palves at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |palves at redhat dot com
Resolution|--- |FIXED
Target Milestone|--- |8.0

--- Comment #5 from Pedro Alves <palves at redhat dot com> ---
Fix pushed.
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2017-03-22 11:23:38 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19637

--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Yao Qi <***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9d736fbf01d20bc03804fa0cb49d99fdf6628fab

commit 9d736fbf01d20bc03804fa0cb49d99fdf6628fab
Author: Jonah Graham <***@kichwacoders.com>
Date: Wed Mar 22 11:19:44 2017 +0000

Import sys in gdb/python/lib/gdb/printer/bound_registers.py

Pick up missing bits from the patch merged in.

2017-03-22 Jonah Graham <***@kichwacoders.com>

PR gdb/19637
* python/lib/gdb/printer/bound_registers.py: Import sys.
--
You are receiving this mail because:
You are on the CC list for the bug.
orlandoarias at gmail dot com
2018-09-15 09:45:30 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19637

Orlando Arias <orlandoarias at gmail dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |orlandoarias at gmail dot com

--- Comment #7 from Orlando Arias <orlandoarias at gmail dot com> ---
*** Bug 21079 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...