Discussion:
[Bug python/21079] New: [gdb-python] Error in handling MPX registers when using Python 3
orlandoarias at gmail dot com
2017-01-24 17:27:51 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21079

Bug ID: 21079
Summary: [gdb-python] Error in handling MPX registers when
using Python 3
Product: gdb
Version: 7.12.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: orlandoarias at gmail dot com
Target Milestone: ---

Greetings,

When GDB is compiled with Python 3 support, dumping MPX registers in IA32 and
AMD64 results in the following error:

(gdb) info reg bnd0
Python Exception <class 'NameError'> name 'long' is not defined:
Python Exception <class 'NameError'> name 'long' is not defined:
bnd0

This is because 'long' and 'int' were merged in Python 3. This issue has been
brought up before [1] but I did not see anything in the bug tracker. There was
talk of submitting patches [2] but these appear to have never made it into GDB.

The patch alone seems to be insufficient, since I get duplicate output when
printing MPX registers:

(gdb) info reg bnd0
bnd0 {lbound = 0x0, ubound = 0xffffffffffffffff} : size = -1 {lbound = 0x0,
ubound = 0xffffffffffffffff} : size = -1

Thank you for looking into this.

Cheers,
Orlando.


[1] https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-02/msg00824.html
[2] https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-02/msg00849.html
--
You are receiving this mail because:
You are on the CC list for the bug.
orlandoarias at gmail dot com
2017-01-24 17:28:09 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21079

Orlando Arias <orlandoarias at gmail dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |orlandoarias at gmail dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-15 07:52:37 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21079

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> ---
Is this still a problem?
Did you have pretty-printers installed?
Could you try again with "set python print-stack full"?
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-15 13:23:22 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21079

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2018-09-15
Ever confirmed|0 |1

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
FWIW I just tried this with the Fedora 28 /bin/gdb, and it seemed fine.
--
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=21079

Orlando Arias <orlandoarias at gmail dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |DUPLICATE

--- Comment #3 from Orlando Arias <orlandoarias at gmail dot com> ---
Greetings,

This was fixed in a rather odd way in [1] and [2]. I find it odd that we are
treating Python as if it was C with this patch, but whatever it works I guess.
Nobody seems to have closed this bug in the process, and I opened without
finding the proper duplicate. Apologies for that. Closing.

Cheers,

Orlando.

[1]
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=7503099f3e29739d34cb1224d54fba96404e6e61

[2]
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=9d736fbf01d20bc03804fa0cb49d99fdf6628fab

*** This bug has been marked as a duplicate of bug 19637 ***
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...