WinDBG/Exts/CodeAnalyzer/gdbplus/gdb-1824/src/gdb/gdb_dep.c
// remember/restore current selected thread/frame
remember/restore current selected thread/frame
remember / restore current selected thread / frame
struct cleanup *
make_cleanup_restore_current_debug_context ()
{
	struct current_debug_context_cleanup *old
				= xmalloc (sizeof (struct current_debug_context_cleanup));
	struct frame_info* selected_frame = get_selected_frame (NULL);
	old->inferior_ptid = inferior_ptid;
	if (selected_frame)
		old->frame_num = frame_relative_level (selected_frame);
	else
		old->frame_num = 0;
	return make_cleanup (do_restore_current_debug_context_cleanup, old);
}
struct cleanup * make_cleanup_restore_current_debug_context ( ) { struct current_debug_context_cleanup * old = xmalloc ( sizeof ( struct current_debug_context_cleanup ) ) ; struct frame_info * selected_frame = get_selected_frame ( NULL ) ; old -> inferior_ptid = inferior_ptid ; if ( selected_frame ) old -> frame_num = frame_relative_level ( selected_frame ) ; else old -> frame_num = 0 ; return make_cleanup ( do_restore_current_debug_context_cleanup , old ) ; }
remember/restore current selected thread/frame
remember / restore current selected thread / frame