Introduce frame_info_ptr smart pointer class

This adds frame_info_ptr, a smart pointer class.  Every instance of
the class is kept on an intrusive list.  When reinit_frame_cache is
called, the list is traversed and all the pointers are invalidated.
This should help catch the typical GDB bug of keeping a frame_info
pointer alive where a frame ID was needed instead.

Co-Authored-By: Bruno Larsen <blarsen@redhat.com>
Approved-by: Tom Tomey <tom@tromey.com>
This commit is contained in:
Tom Tromey
2022-07-25 14:06:34 -03:00
committed by Bruno Larsen
parent a0cbd6505e
commit ba380b3e51
3 changed files with 187 additions and 0 deletions

View File

@@ -20,6 +20,8 @@
#if !defined (FRAME_H)
#define FRAME_H 1
#include "frame-info.h"
/* The following is the intended naming schema for frame functions.
It isn't 100% consistent, but it is approaching that. Frame naming
schema: