Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vAttach: get vAttach working with multi-process (#129)
* vAttach: get vAttach working with multi-process Get vAttach working to the point where it is now possible to switch processes by running `attach [PID]` in GDB. Signed-off-by: Sean Cross <sean@xobs.io> * base: move `report_stop_reason` into its own function Create a central place for reporting the stop reason. This will be used when GDB issues a `QuestionMark` packet. Signed-off-by: Sean Cross <sean@xobs.io> * extended_mode: use `report_stop_reason` for vAttach When attaching to a process, report the stop reason using the new `report_stop_reason()` function. This enables attaching to processes without hardcoding the `S00` response. Signed-off-by: Sean Cross <sean@xobs.io> * base: qC: return self.current_mem_tid if it's set If self.current_mem_tid is set to a value other than the default sentinal value, return the current thread ID. Otherwise, look through the list of active threads and return the first active one. Signed-off-by: Sean Cross <sean@xobs.io> --------- Signed-off-by: Sean Cross <sean@xobs.io>
- Loading branch information
Showing
6 changed files
with
138 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use super::prelude::*; | ||
|
||
#[derive(Debug)] | ||
pub struct qC; | ||
|
||
impl<'a> ParseCommand<'a> for qC { | ||
#[inline(always)] | ||
fn from_packet(buf: PacketBuf<'a>) -> Option<Self> { | ||
if !buf.into_body().is_empty() { | ||
return None; | ||
} | ||
Some(qC) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters