Closed blitzerr closed 4 years ago
@bjorn3 @nbaksalyar r?
@nbaksalyar @bjorn3 the build is failing on test target::linux::writemem::tests::write_protected_memory ... FAILED
This patch should not impact that, right ?
Strange.
It didn't fail earlier but after rebasing ..
@bjorn3 and @nbaksalyar You comments are addressed and rebased with the latest.
the build is failing on test target::linux::writemem::tests::write_protected_memory ... FAILED
Hmm, probably an intermittent error related to #95 - I'll try to run separate fuzz-like tests with that.
@nbaksalyar r?
Please run cargo fmt
.
Hmm, the build seems to be failing:
error[E0252]: the name `HighlightAndComplete` is defined multiple times
--> examples/repl.rs:30:9
|
29 | use repl_tools::HighlightAndComplete;
| -------------------------------- previous import of the trait `HighlightAndComplete` here
30 | use repl_tools::HighlightAndComplete;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `HighlightAndComplete` reimported here
|
= note: `HighlightAndComplete` must be defined only once in the type namespace of this module
https://travis-ci.com/github/headcrab-rs/headcrab/jobs/383054168#L426-L444
Thanks @blitzerr!
My first PR merged :D. Thank you @nbaksalyar and @bjorn3
Fixes: #100
change summary
(+) Print source lines when pausing on a breakpoint. (+) New command
list
orl
(+) Some code refactoring. (+) Syntax highlighting of code snippet.currently if you debug your program with lldb, and say your program stops at the set breakpoint, lldb will print the source line and not just filename and line number. It might be more clear with an example, so here goes one:
Before this PR, the behavior of headcrab for a similar steps of execution would have been:
So, you can see, after cont(inuing) to the next breakpoint, headcrab is silent. You have to give the command
bt
to print the backtrace.After the change, the output will be something like this:
So, as you can see, now when we pause at the break-point, we also print the source code around it.