This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] fix OverflowError in backtraces with 32bit kernels
- From: Matthias Klose <doko at ubuntu dot com>
- To: gdb-patches at sourceware dot org
- Cc: Sebastien Bacher <seb128 at ubuntu dot com>, Julian Taylor <jtaylor dot debian at googlemail dot com>
- Date: Sat, 20 Feb 2016 18:19:29 +0100
- Subject: [patch] fix OverflowError in backtraces with 32bit kernels
- Authentication-results: sourceware.org; auth=none
This was reported at
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1513922
That's using i386, using "backtrace" gives those errors
"Traceback (most recent call last):
File "/usr/share/gdb/python/gdb/FrameDecorator.py", line 97, in function
if not isinstance(self._base, gdb.Frame):
SystemError: <built-in function isinstance> returned a result with an error set
#1 0xffffffff in OverflowError: Python int too large to convert to C long"
and a patch was suggested by Julian Taylor, which applies to the trunk as well.
Matthias
--- gdb-7.10.orig/gdb/python/py-framefilter.c
+++ gdb-7.10/gdb/python/py-framefilter.c
@@ -1111,7 +1111,7 @@ py_print_frame (PyObject *filter, int fl
if (paddr != Py_None)
{
- address = PyLong_AsLong (paddr);
+ address = PyLong_AsUnsignedLongLong (paddr);
has_addr = 1;
}
Py_DECREF (paddr);