diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-10-21 16:06:59 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-11-10 11:33:16 -0500 |
commit | 04e2ac7b2a7c5fbc0afcf151aeb8a26415ad0fac (patch) | |
tree | 5d3a91c9eeedc7c7e5f745044e85e635406c9899 /gdb/frame-info.h | |
parent | 3dc9dde26d1c279e888d1fd0361f720e5a3721f3 (diff) | |
download | gdb-04e2ac7b2a7c5fbc0afcf151aeb8a26415ad0fac.zip gdb-04e2ac7b2a7c5fbc0afcf151aeb8a26415ad0fac.tar.gz gdb-04e2ac7b2a7c5fbc0afcf151aeb8a26415ad0fac.tar.bz2 |
gdb: move frame_info_ptr method implementations to frame-info.c
I don't see any particular reason why the implementations of the
frame_info_ptr object are in the header file. It only seems to add some
complexity. Since we can't include frame.h in frame-info.h, we have to
add declarations of functions defined in frame.c, in frame-info.h. By
moving the implementations to a new frame-info.c, we can avoid that.
Change-Id: I435c828f81b8a3392c43ef018af31effddf6be9c
Reviewed-By: Bruno Larsen <blarsen@redhat.com>
Reviewed-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/frame-info.h')
-rw-r--r-- | gdb/frame-info.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/gdb/frame-info.h b/gdb/frame-info.h index 7159f82..1d2d4bd 100644 --- a/gdb/frame-info.h +++ b/gdb/frame-info.h @@ -25,12 +25,6 @@ struct frame_info; -/* Forward declarations of functions, needed for the frame_info_ptr - to work correctly. */ -extern void reinit_frame_cache (); -extern struct frame_id get_frame_id (frame_info_ptr); -extern frame_info_ptr frame_find_by_id (struct frame_id id); - /* A wrapper for "frame_info *". frame_info objects are invalidated whenever reinit_frame_cache is called. This class arranges to invalidate the pointer when appropriate. This is done to help @@ -136,20 +130,10 @@ public: } /* Cache the frame_id that the pointer will use to reinflate. */ - void prepare_reinflate () - { - m_cached_id = get_frame_id (*this); - } + void prepare_reinflate (); /* Use the cached frame_id to reinflate the pointer. */ - void reinflate () - { - gdb_assert (m_cached_id != null_frame_id); - - if (m_ptr == nullptr) - m_ptr = frame_find_by_id (m_cached_id).get (); - gdb_assert (m_ptr != nullptr); - } + void reinflate (); private: |