Attach to target pid/tid on remote lldb connect ##debug (#17847)

This commit is contained in:
yossizap 2020-11-01 00:42:31 +00:00 committed by GitHub
parent 7e744440a6
commit ac229c3216
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,9 +233,10 @@ int gdbr_connect(libgdbr_t *g, const char *host, int port) {
}
}
if (g->remote_type == GDB_REMOTE_TYPE_LLDB) {
ret = gdbr_connect_lldb (g);
if ((ret = gdbr_connect_lldb (g)) < 0) {
goto end;
}
}
// Query the thread / process id
g->stub_features.qC = true;
g->pid = g->tid = 0;
@ -249,7 +250,7 @@ int gdbr_connect(libgdbr_t *g, const char *host, int port) {
// Check if vCont is supported
gdbr_check_vcont (g);
// Set pid/thread for operations other than "step" and "continue"
if (gdbr_select (g, g->pid, 0) < 0) {
if (gdbr_select (g, g->pid, g->tid) < 0) {
// return -1;
}
// Set thread for "step" and "continue" operations