From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH v2 07/13] gdb: add frame_id::user_created_p
Date: Tue, 13 Dec 2022 22:34:35 -0500 [thread overview]
Message-ID: <20221214033441.499512-8-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20221214033441.499512-1-simon.marchi@polymtl.ca>
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
---
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 142488f7319d..929be98eed4a 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;
+ /* 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 ba06f9b0b3e4..1010f82d4738 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -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 ());
--
2.38.1
next prev parent reply other threads:[~2022-12-14 3:41 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 3:34 [PATCH v2 00/13] Make frame_info_ptr automatic Simon Marchi
2022-12-14 3:34 ` [PATCH v2 01/13] gdb: move type_map_instance to compile/compile.c Simon Marchi
2022-12-14 3:34 ` [PATCH v2 02/13] gdb: move compile_instance to compile/compile.h Simon Marchi
2022-12-14 3:34 ` [PATCH v2 03/13] gdb: remove language.h include from frame.h Simon Marchi
2022-12-14 3:34 ` [PATCH v2 04/13] gdb: move sect_offset and cu_offset to dwarf2/types.h Simon Marchi
2022-12-14 3:34 ` [PATCH v2 05/13] gdb: move call site types to call-site.h Simon Marchi
2022-12-14 3:34 ` [PATCH v2 06/13] gdb: move frame_info_ptr to frame.{c,h} Simon Marchi
2022-12-20 17:01 ` Bruno Larsen
2023-01-03 18:59 ` Simon Marchi
2022-12-14 3:34 ` Simon Marchi [this message]
2022-12-14 3:34 ` [PATCH v2 08/13] gdb: add user-created frames to stash Simon Marchi
2022-12-14 3:34 ` [PATCH v2 09/13] gdb: add create_new_frame(frame_id) overload Simon Marchi
2022-12-14 3:34 ` [PATCH v2 10/13] gdb: make it possible to restore selected user-created frames Simon Marchi
2022-12-14 3:34 ` [PATCH v2 11/13] gdb: make user-created frames reinflatable Simon Marchi
2023-01-23 12:57 ` Tom de Vries
2023-01-23 14:34 ` Luis Machado
2023-01-24 3:55 ` Simon Marchi
2023-01-24 8:22 ` Luis Machado
2023-01-25 3:45 ` Simon Marchi
2023-01-30 8:49 ` Luis Machado
2023-01-30 16:20 ` Simon Marchi
2022-12-14 3:34 ` [PATCH v2 12/13] gdb: make frame_info_ptr grab frame level and id on construction Simon Marchi
2022-12-14 3:34 ` [PATCH v2 13/13] gdb: make frame_info_ptr auto-reinflatable Simon Marchi
2022-12-20 16:57 ` [PATCH v2 00/13] Make frame_info_ptr automatic Bruno Larsen
2023-01-03 19:00 ` Simon Marchi
2023-01-03 19:09 ` Simon Marchi
2023-01-18 18:10 ` Tom Tromey
2023-01-19 3:40 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221214033441.499512-8-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).