Skip to content

Commit

Permalink
Merge branch 'sverker/erts/multi-trace-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
sverker committed Apr 30, 2024
2 parents 81138f3 + e8bc0b5 commit c5d4e73
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions erts/emulator/beam/beam_bp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1735,18 +1735,21 @@ set_break(BpFunctions* f, Binary *match_spec, Uint break_flags,


static GenericBp*
get_bp_session(ErtsTraceSession *session, const ErtsCodeInfo *ci)
get_bp_session(ErtsTraceSession *session, const ErtsCodeInfo *ci,
int is_staging)
{
GenericBp *g = ci->gen_bp;

ASSERT(session);
if (!g)
return NULL;

if (g->to_insert) {
if (is_staging) {
ASSERT(session == erts_staging_trace_session);
ASSERT(g->to_insert->next == g);
g = g->to_insert;
if (g->to_insert) {
ASSERT(g->to_insert->next == g);
g = g->to_insert;
}
}

for ( ; g; g = g->next) {
Expand All @@ -1759,7 +1762,7 @@ get_bp_session(ErtsTraceSession *session, const ErtsCodeInfo *ci)
static GenericBp*
get_staging_bp_session(const ErtsCodeInfo *ci)
{
return get_bp_session(erts_staging_trace_session, ci);
return get_bp_session(erts_staging_trace_session, ci, 1);
}


Expand Down Expand Up @@ -2039,7 +2042,7 @@ get_memory_break(ErtsTraceSession *session, const ErtsCodeInfo *ci)
static GenericBpData*
check_break(ErtsTraceSession *session, const ErtsCodeInfo *ci, Uint break_flags)
{
GenericBp* g = get_bp_session(session, ci);
GenericBp* g = get_bp_session(session, ci, 0);

#ifndef BEAMASM
ASSERT(BeamIsOpCode(ci->u.op, op_i_func_info_IaaI));
Expand Down

0 comments on commit c5d4e73

Please sign in to comment.