]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: add frame_id::user_created_p
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 14 Dec 2022 03:34:35 +0000 (22:34 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 20 Jan 2023 19:48:57 +0000 (14:48 -0500)
Later in this series, we'll need to differentiate frame ids for regular
frames (obtained from the target state and unwinding from it) vs frame
ids for user-created frames (created with create_new_frame).  Add the
frame_id::user_created_p field to indicate a frame is user-created, and
set it in create_new_frame.

The field is otherwise not used yet, so not changes in behavior are
expected.

Change-Id: I60de3ce581ed01bf0fddb30dff9bd932840120c3
Reviewed-By: Bruno Larsen <blarsen@redhat.com>
gdb/frame-id.h
gdb/frame.c

index e8b9a795403a32b30b435cf05ac599232db93f9a..5978d99bba8c967a494e2a4a53429486ee987ed9 100644 (file)
@@ -99,6 +99,10 @@ struct frame_id
   unsigned int code_addr_p : 1;
   unsigned int special_addr_p : 1;
 
+  /* True if this frame was created from addresses given by the user (see
+     create_new_frame) rather than through unwinding.  */
+  unsigned int user_created_p : 1;
+
   /* It is non-zero for a frame made up by GDB without stack data
      representation in inferior, such as INLINE_FRAME or TAILCALL_FRAME.
      Caller of inlined function will have it zero, each more inner called frame
index b5f48399703996c535bf8d109f313936de94fc63..4dcfad37cd7e8428310eb730ff6dfe7cb2e12561 100644 (file)
@@ -1953,6 +1953,7 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
 
   fi->this_id.p = frame_id_status::COMPUTED;
   fi->this_id.value = frame_id_build (addr, pc);
+  fi->this_id.value.user_created_p = 1;
 
   frame_debug_printf ("  -> %s", fi->to_string ().c_str ());