Skip to content

Show local values #84

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 15 commits into from
Aug 15, 2020
Merged

Show local values #84

merged 15 commits into from
Aug 15, 2020

Conversation

bjorn3
Copy link
Contributor

@bjorn3 bjorn3 commented Aug 14, 2020

Starting program: tests/testees/hello
Stopped(Pid(4471), SIGTRAP)
> _patch_breakpoint_function
> cont
Stopped(Pid(4471), SIGTRAP)
> si
Stopped(Pid(4471), SIGTRAP)
> si
Stopped(Pid(4471), SIGTRAP)
> si
Stopped(Pid(4471), SIGTRAP)
> bt
00005555555592db hello::main /home/bjorn/Documenten/headcrab/tests/testees/hello.rs:24
0000555555559396 std::rt::lang_start::{{closure}} /home/bjorn/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
0000555555562d68 std::panicking::try /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7/src/libstd/panicking.rs:275
                 std::panic::catch_unwind /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7/src/libstd/panic.rs:394
                 std::rt::lang_start_internal /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7/src/libstd/rt.rs:51
> locals
00000000000052db hello::main /home/bjorn/Documenten/headcrab/tests/testees/hello.rs:24
     var = 42
     reg_var = const 43
_ZN5hello4main17hd078db076938ab99E:
DW_TAG_subprogram
  DW_AT_low_pc
  DW_AT_high_pc
  DW_AT_frame_base
  DW_AT_linkage_name
  DW_AT_name
  DW_AT_decl_file
  DW_AT_decl_line
  DW_AT_main_subprogram
  DW_TAG_lexical_block
[...]

@bjorn3 bjorn3 requested a review from nbaksalyar August 14, 2020 17:39
Copy link
Member

@nbaksalyar nbaksalyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, thank you! The repl example is starting to feel like a real thing 🎉

I left one minor comment about Frame::print_debuginfo, but since this PR is already huge, I think it's better to merge it sooner and address details afterwards.

}

pub fn print_debuginfo(&self) {
println!(
Copy link
Member

@nbaksalyar nbaksalyar Aug 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later, we probably can replace this with impl<'a> fmt::Display for Frame<'a>, then it can be printed/formatted into a string.

@nbaksalyar nbaksalyar merged commit 4eab929 into headcrab-rs:master Aug 15, 2020
@bjorn3 bjorn3 deleted the dwarf_locals branch August 16, 2020 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants