Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Support stepping through Darwin "branch islands" #139301

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 4 commits into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix the test so that the linker can't overlap the padding and branch …
…island symbols.
  • Loading branch information
jimingham committed May 9, 2025
commit c36e679d3cb038d3c194d6abb3145958340b6fbf
30 changes: 0 additions & 30 deletions 30 lldb/test/API/macosx/branch-islands/TestBranchIslands.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,38 +28,8 @@ def do_test(self):
syms = target.FindSymbols("foo.island", lldb.eSymbolTypeCode)
self.assertEqual(len(syms), 1, "We did generate an island for foo")

# Gathering some info to dump in case of failure:
trace_before = lldbutil.print_stacktrace(thread, True)
func_before = thread.frames[0].function

thread.StepInto()
stop_frame = thread.frames[0]
# This is failing on the bot, but I can't reproduce the failure
# locally. Let's see if we can dump some more info here to help
# figure out what went wrong...
if stop_frame.name.find("foo") == -1:
stream = lldb.SBStream()
print("Branch island symbols: ")
syms[0].GetDescription(stream)
for i in range(0, 6):
for sep in ["", "."]:
syms = target.FindSymbols(
f"foo.island{sep}{i}", lldb.eSymbolTypeCode
)
if len(syms) > 0:
stream.Print("\n")
syms[0].GetDescription(stream)

print(stream.GetData())
print(f"Start backtrace:")
print(trace_before)
print(f"\n'main' disassembly:\n{lldbutil.disassemble(target, func_before)}")
print("\nEnd backtrace:\n")
lldbutil.print_stacktrace(thread)
print(
f"\nStop disassembly:\n {lldbutil.disassemble(target, stop_frame.function)}"
)

self.assertIn("foo", stop_frame.name, "Stepped into foo")
var = stop_frame.FindVariable("a_variable_in_foo")
self.assertTrue(var.IsValid(), "Found the variable in foo")
2 changes: 2 additions & 0 deletions 2 lldb/test/API/macosx/branch-islands/padding1.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.text
_padding1:
.p2align 2
.byte 0x10
.space 120*1024*1024
2 changes: 2 additions & 0 deletions 2 lldb/test/API/macosx/branch-islands/padding2.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.text
_padding2:
.p2align 2
.byte 0x10
.space 120*1024*1024
2 changes: 2 additions & 0 deletions 2 lldb/test/API/macosx/branch-islands/padding3.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.text
_padding3:
.p2align 2
.byte 0x10
.space 120*1024*1024
2 changes: 2 additions & 0 deletions 2 lldb/test/API/macosx/branch-islands/padding4.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.text
_padding4:
.p2align 2
.byte 0x10
.space 120*1024*1024
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.