Skip to content
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

Get backtrace function names from DWARF sections #3958

Merged
Merged
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
Fix: MachO#read_section? doesn't reset seek position
  • Loading branch information
ysbaddaden committed Apr 14, 2017
commit b46a8c196bb0bc03aad386ec3be5d39bbb685987
9 changes: 7 additions & 2 deletions src/debug/mach_o.cr
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ module Debug
def ==(other : UUID)
bytes == other.bytes
end

def inspect(io)
io << bytes.to_slice.hexstring
end
end

struct Section64
Expand Down Expand Up @@ -490,8 +494,9 @@ module Debug

def read_section?(name)
if sh = sections.find { |s| s.sectname == name }
@io.seek(sh.offset)
yield sh, @io
@io.seek(sh.offset) do
yield sh, @io
end
end
end
end
Expand Down