Skip to content

Branch island no dsym #139191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,15 @@ DynamicLoaderDarwin::GetStepThroughTrampolinePlan(Thread &thread,
static RegularExpression g_branch_island_regex(g_branch_island_pattern);

bool is_branch_island = g_branch_island_regex.Execute(current_name);
// FIXME: this is extra logging so I can figure out why this test is failing
// on the bot but not locally with all the same tools, etc...
if (thread_plan_sp && is_branch_island) {
if (log) {
StreamString s;
thread_plan_sp->GetDescription(&s, eDescriptionLevelVerbose);
LLDB_LOGF(log, "Am at a branch island, but already had plan: \n\t%s", s.GetData());
}
}
if (!thread_plan_sp && is_branch_island) {
thread_plan_sp = std::make_shared<ThreadPlanStepInstruction>(
thread,
Expand Down
11 changes: 9 additions & 2 deletions lldb/test/API/macosx/branch-islands/TestBranchIslands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Make sure that we can step in across an arm64 branch island
"""


import os
import lldb
import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.lldbtest import *
Expand All @@ -15,7 +15,7 @@ class TestBranchIslandStepping(TestBase):
@skipUnlessAppleSilicon
def test_step_in_branch_island(self):
"""Make sure we can step in across a branch island"""
self.build()
self.build(debug_info="dwarf")
self.main_source_file = lldb.SBFileSpec("main.c")
self.do_test()

Expand All @@ -32,6 +32,9 @@ def do_test(self):
trace_before = lldbutil.print_stacktrace(thread, True)
func_before = thread.frames[0].function

log_file_path = os.path.join(self.getBuildDir(), "step-log.txt")
self.runCmd(f"log enable -f {log_file_path} lldb step")

thread.StepInto()
stop_frame = thread.frames[0]
# This is failing on the bot, but I can't reproduce the failure
Expand Down Expand Up @@ -59,6 +62,10 @@ def do_test(self):
print(
f"\nStop disassembly:\n {lldbutil.disassemble(target, stop_frame.function)}"
)
with open(log_file_path, "r") as f:
data = f.read()
print("Step Log:")
print(data)

self.assertIn("foo", stop_frame.name, "Stepped into foo")
var = stop_frame.FindVariable("a_variable_in_foo")
Expand Down
Loading