/* Definitions for frame unwinder, for GDB, the GNU debugger.
- Copyright (C) 2003-2015 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
This file is part of GDB.
{
res = unwinder->sniffer (unwinder, this_frame, this_cache);
}
- CATCH (ex, RETURN_MASK_ERROR)
+ CATCH (ex, RETURN_MASK_ALL)
{
+ /* Catch all exceptions, caused by either interrupt or error.
+ Reset *THIS_CACHE. */
+ *this_cache = NULL;
if (ex.error == NOT_AVAILABLE_ERROR)
{
/* This usually means that not even the PC is available,
}
else
{
+ /* Don't set *THIS_CACHE to NULL here, because sniffer has to do
+ so. */
do_cleanups (old_cleanup);
return 0;
}
mark_value_bytes_optimized_out (val, 0, TYPE_LENGTH (type));
VALUE_LVAL (val) = lval_register;
VALUE_REGNUM (val) = regnum;
- VALUE_FRAME_ID (val) = get_frame_id (frame);
+ VALUE_NEXT_FRAME_ID (val)
+ = get_frame_id (get_next_frame_sentinel_okay (frame));
return val;
}