aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-10-24 16:16:09 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-11-10 11:33:16 -0500
commit45eca9d9f36985672cb2303b4ea0b3c855961c1d (patch)
treec492e6d0c1c2e00c052464f5aaf0ceeb2b5c1afe /gdb
parent73cafdbd1ddd6ebfa21d737e3b69ae5aafd70c23 (diff)
downloadgdb-45eca9d9f36985672cb2303b4ea0b3c855961c1d.zip
gdb-45eca9d9f36985672cb2303b4ea0b3c855961c1d.tar.gz
gdb-45eca9d9f36985672cb2303b4ea0b3c855961c1d.tar.bz2
gdb: use frame_id_p instead of comparing to null_frame_id in frame_info_ptr::reinflate
The assertion gdb_assert (m_cached_id != null_frame_id); is always true, as comparing equal to null_frame_id is always false (it's the first case in frame_id::operator==, not sure why it's not this way, but that's what it is). Replace the comparison with a call to frame_id_p. Approved-By: Tom Tromey <tom@tromey.com> Change-Id: I93986e6a85ac56353690792552e5b3b4cedec7fb
Diffstat (limited to 'gdb')
-rw-r--r--gdb/frame-info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/frame-info.c b/gdb/frame-info.c
index 8479120..584222d 100644
--- a/gdb/frame-info.c
+++ b/gdb/frame-info.c
@@ -39,7 +39,7 @@ frame_info_ptr::prepare_reinflate ()
void
frame_info_ptr::reinflate ()
{
- gdb_assert (m_cached_id != null_frame_id);
+ gdb_assert (frame_id_p (m_cached_id));
if (m_ptr == nullptr)
m_ptr = frame_find_by_id (m_cached_id).get ();