This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/20624] gdb.Value doesn't support Python floordiv operator, //


https://sourceware.org/bugzilla/show_bug.cgi?id=20624

Johan Tufvesson <tuben at lysator dot liu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tuben at lysator dot liu.se

--- Comment #3 from Johan Tufvesson <tuben at lysator dot liu.se> ---
I am running a pre-built version for ARM (from
https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads), and have
problem with this. I don't know if that distribution has added any patch for
this behavior but this works with their 7.10.1 release (part of their gcc
"5.4-2016q3" toolchain):

(gdb) py print gdb.Value(1)//1
1

but does not work for their 7.12.0 (part of their gcc "6.2-2016q4" toolchain):

(gdb) py print gdb.Value(1)//1
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for //: 'gdb.Value' and 'int'
Error while executing Python code.

I don't blame the GDB project if the ARM people have added (and later removed)
a patch for this behavior, but I think the behavior of not allowing // is
wrong.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]