Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#52597 - [gdb][gdb-common] Python exception dumping MPX registers

Attached to Project: Arch Linux
Opened by Orlando Arias (vonPalitroque) - Tuesday, 17 January 2017, 15:28 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 24 January 2017, 05:26 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


When attempting to dump information on the MPX bound registers, gdb throws a python exception, as long is not defined.

The issue occurs because gdb was compiled with Python 3 support. However, long and int were merged in Python 3 and long removed. The file at fault is:


By changing the line

size = (long) ((upper) - (lower))


size = (int) ((upper) - (lower))

the problem is resolved.

Additional info:
* gdb-common 7.12-4
* gdb 7.12

Steps to reproduce:
** In order to reproduce this bug, an MPX-enabled processor is needed **
1) run gdb
$ gdb ./myprogram.elf

2) set a breakpoint anywere
(gdb) break main

3) run the program
(gdb) run

4) dump register information for a bounds register, error occurs
(gdb) info reg bnd0
Python Exception <class 'NameError'> name 'long' is not defined:
Python Exception <class 'NameError'> name 'long' is not defined:

4') should see information on register, example:
(gdb) info reg bnd0
bnd0 {lbound = 0x0, ubound = 0xffffffffffffffff} : size = -1 {lbound = 0x0, ubound = 0xffffffffffffffff} : size = -1

Thank you. Cheers,
This task depends upon

Comment by Anatol Pomozov (anatolik) - Tuesday, 24 January 2017, 17:15 GMT
Please report this issue upstream
Comment by Orlando Arias (vonPalitroque) - Tuesday, 24 January 2017, 17:30 GMT

A bug report has been filed at [1]. Thank you.