+2016-11-08  Tom Tromey  <tom@tromey.com>
+
+       * python/py-framefilter.c (py_print_frame): Use
+       get_addr_from_python.  Check for errors when getting line number.
+
 2016-11-08  Yao Qi  <yao.qi@linaro.org>
 
        * ada-lang.h (ada_val_print): Remove second parameter.  Remove
 
 
          if (paddr != Py_None)
            {
-             address = PyLong_AsLong (paddr);
+             if (get_addr_from_python (paddr, &address) < 0)
+               {
+                 Py_DECREF (paddr);
+                 do_cleanups (cleanup_stack);
+                 return EXT_LANG_BT_ERROR;
+               }
+
              has_addr = 1;
            }
          Py_DECREF (paddr);
            }
          else if (PyLong_Check (py_func))
            {
-             CORE_ADDR addr = PyLong_AsUnsignedLongLong (py_func);
+             CORE_ADDR addr;
              struct bound_minimal_symbol msymbol;
 
-             if (PyErr_Occurred ())
+             if (get_addr_from_python (py_func, &addr) < 0)
                {
                  do_cleanups (cleanup_stack);
                  return EXT_LANG_BT_ERROR;
          if (py_line != Py_None)
            {
              line = PyLong_AsLong (py_line);
+             if (PyErr_Occurred ())
+               {
+                 do_cleanups (cleanup_stack);
+                 return EXT_LANG_BT_ERROR;
+               }
+
              TRY
                {
                  ui_out_text (out, ":");
 
+2016-11-08  Tom Tromey  <tom@tromey.com>
+
+       * gdb.python/py-framefilter.py (ElidingFrameDecorator.address):
+       New method.
+
 2016-10-29  Manish Goregaokar  <manish@mozilla.com>
 
     * gdb.rust/simple.exp: Add tests for `sizeof(expr)`
 
     def elided(self):
         return iter(self.elided_frames)
 
+    def address (self):
+        # Regression test for an overflow in the python layer.
+        bitsize = 8 * gdb.lookup_type('void').pointer().sizeof
+        mask = (1 << bitsize) - 1
+        return 0xffffffffffffffff & mask
+
 class ElidingIterator:
     def __init__(self, ii):
         self.input_iterator = ii