From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id 504723858C33; Fri, 20 Jan 2023 19:52:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 504723858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674244362; bh=9niWsPsxM54OyHEUklPTm2wiMmg4ItK90VrKF6yEUnU=; h=From:To:Subject:Date:From; b=XxVa9LXWiVa6A44GdlWc/crrF3BoaNxjNoDNM3IjZZLWU8nLvRT5WMU/Sx7P3uCRq LPzxy3qj40mv+VYrD256WbJUUegciXo/iSh3f7bRqHhB0n9o50A3imt+drV44qaIji R0UYchGsZB6VFw/Z5NdkVROxtBDam/ihv5u5eR1Q= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Simon Marchi To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: add frame_id::user_created_p X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: 43e8c9ce20357a12dc5ccaf9ac84eea2cb6aa39b X-Git-Newrev: 848ab2ae8afe44843b8d06676604a48e45fa8969 Message-Id: <20230120195242.504723858C33@sourceware.org> Date: Fri, 20 Jan 2023 19:52:42 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D848ab2ae8afe= 44843b8d06676604a48e45fa8969 commit 848ab2ae8afe44843b8d06676604a48e45fa8969 Author: Simon Marchi Date: Tue Dec 13 22:34:35 2022 -0500 gdb: add frame_id::user_created_p =20 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. =20 The field is otherwise not used yet, so not changes in behavior are expected. =20 Change-Id: I60de3ce581ed01bf0fddb30dff9bd932840120c3 Reviewed-By: Bruno Larsen Diff: --- gdb/frame-id.h | 4 ++++ gdb/frame.c | 1 + 2 files changed, 5 insertions(+) diff --git a/gdb/frame-id.h b/gdb/frame-id.h index e8b9a795403..5978d99bba8 100644 --- a/gdb/frame-id.h +++ b/gdb/frame-id.h @@ -99,6 +99,10 @@ struct frame_id unsigned int code_addr_p : 1; unsigned int special_addr_p : 1; =20 + /* 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 diff --git a/gdb/frame.c b/gdb/frame.c index b5f48399703..4dcfad37cd7 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1953,6 +1953,7 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc) =20 fi->this_id.p =3D frame_id_status::COMPUTED; fi->this_id.value =3D frame_id_build (addr, pc); + fi->this_id.value.user_created_p =3D 1; =20 frame_debug_printf (" -> %s", fi->to_string ().c_str ());