along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-
-/* Local non-gdb includes. */
-#include "annotate.h"
-#include "block.h"
-#include "command.h"
-#include "dummy-frame.h"
-#include "frame-base.h"
-#include "frame-unwind.h"
#include "frame.h"
+#include "target.h"
+#include "value.h"
+#include "inferior.h" /* for inferior_ptid */
+#include "regcache.h"
+#include "user-regs.h"
#include "gdb_obstack.h"
-#include "gdbcmd.h"
+#include "dummy-frame.h"
+#include "sentinel-frame.h"
#include "gdbcore.h"
-#include "gdbthread.h"
-#include "hashtab.h"
-#include "inferior.h"
-#include "inline-frame.h"
+#include "annotate.h"
#include "language.h"
-#include "objfiles.h"
+#include "frame-unwind.h"
+#include "frame-base.h"
+#include "command.h"
+#include "gdbcmd.h"
#include "observable.h"
-#include "regcache.h"
-#include "sentinel-frame.h"
-#include "target.h"
+#include "objfiles.h"
+#include "gdbthread.h"
+#include "block.h"
+#include "inline-frame.h"
#include "tracepoint.h"
-#include "user-regs.h"
+#include "hashtab.h"
#include "valprint.h"
-#include "value.h"
/* The sentinel frame terminates the innermost end of the frame chain.
If unwound, it returns the information needed to construct an
different ways that a PC could be unwound. */
prev_gdbarch = frame_unwind_arch (this_frame);
- TRY
+ try
{
pc = gdbarch_unwind_pc (prev_gdbarch, this_frame);
pc_p = 1;
}
- CATCH (ex, RETURN_MASK_ERROR)
+ catch (const gdb_exception_error &ex)
{
if (ex.error == NOT_AVAILABLE_ERROR)
{
this_frame->level);
}
else
- throw_exception (ex);
+ throw;
}
- END_CATCH
if (pc_p)
{
if (prev_frame->level == 0)
return prev_frame;
- TRY
+ try
{
compute_frame_id (prev_frame);
if (!frame_stash_add (prev_frame))
prev_frame = NULL;
}
}
- CATCH (ex, RETURN_MASK_ALL)
+ catch (const gdb_exception &ex)
{
prev_frame->next = NULL;
this_frame->prev = NULL;
- throw_exception (ex);
+ throw;
}
- END_CATCH
return prev_frame;
}
{
struct frame_info *prev_frame = NULL;
- TRY
+ try
{
prev_frame = get_prev_frame_always_1 (this_frame);
}
- CATCH (ex, RETURN_MASK_ERROR)
+ catch (const gdb_exception_error &ex)
{
if (ex.error == MEMORY_ERROR)
{
Allocate using stack local STOP_STRING then assign the
pointer to the frame, this allows the STOP_STRING on the
frame to be of type 'const char *'. */
- size = strlen (ex.message) + 1;
+ size = ex.message->size () + 1;
stop_string = (char *) frame_obstack_zalloc (size);
- memcpy (stop_string, ex.message, size);
+ memcpy (stop_string, ex.what (), size);
this_frame->stop_string = stop_string;
}
prev_frame = NULL;
}
else
- throw_exception (ex);
+ throw;
}
- END_CATCH
return prev_frame;
}
gdb_assert (frame->next != NULL);
- TRY
+ try
{
*pc = frame_unwind_pc (frame->next);
}
- CATCH (ex, RETURN_MASK_ERROR)
+ catch (const gdb_exception_error &ex)
{
if (ex.error == NOT_AVAILABLE_ERROR)
return 0;
else
- throw_exception (ex);
+ throw;
}
- END_CATCH
return 1;
}
CORE_ADDR *pc)
{
- TRY
+ try
{
*pc = get_frame_address_in_block (this_frame);
}
- CATCH (ex, RETURN_MASK_ERROR)
+ catch (const gdb_exception_error &ex)
{
if (ex.error == NOT_AVAILABLE_ERROR)
return 0;
- throw_exception (ex);
+ throw;
}
- END_CATCH
return 1;
}
a PC that is guaranteed to be inside the frame's code
block. */
- TRY
+ try
{
pc = get_frame_address_in_block (frame);
pc_p = 1;
}
- CATCH (ex, RETURN_MASK_ERROR)
+ catch (const gdb_exception_error &ex)
{
if (ex.error != NOT_AVAILABLE_ERROR)
- throw_exception (ex);
+ throw;
}
- END_CATCH
if (pc_p)
{