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

Report thread-id in response to ? packet #105

Merged
Merged
Changes from all commits
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
12 changes: 11 additions & 1 deletion src/stub/core_impl/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,17 @@ impl<T: Target, C: Connection> GdbStubImpl<T, C> {
// TODO: Improve the '?' response based on last-sent stop reason.
// this will be particularly relevant when working on non-stop mode.
Base::QuestionMark(_) => {
res.write_str("S05")?;
// Reply with a valid thread-id or GDB issues a warning when more
// than one thread is active
res.write_str("T05thread:")?;
res.write_specific_thread_id(SpecificThreadId {
pid: self
.features
.multiprocess()
.then(|| SpecificIdKind::WithId(FAKE_PID)),
tid: SpecificIdKind::WithId(self.get_sane_any_tid(target)?),
})?;
res.write_str(";")?;
HandlerStatus::Handled
}
Base::qAttached(cmd) => {
Expand Down