summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/gdbthread.h
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2017-09-15 00:27:53 -0400
committerSergio Durigan Junior <sergiodj@redhat.com>2017-09-26 12:50:25 -0400
commit75352e283fb2b265d14c750859156943f6eb2693 (patch)
treed0468abb84ef47c1ca35c27d788d5f9a6a12d739 /gdb/gdbserver/gdbthread.h
parent5007d765ae09c10c7f3b18bb16841b9d2d59e181 (diff)
downloadbinutils-gdb-75352e283fb2b265d14c750859156943f6eb2693.tar.gz
Use "switch_to_thread" more thoroughly on gdbserver
This is a technical debt that I left when I ported "switch_to_thread" to gdbserver. It's a simple patch that converts occurences of: current_thread = find_thread_ptid (ptid); to: switch_to_thread (ptid); This patch also converts a simple "if" to a "gdb_assert" on gdbserver's version of "switch_to_thread": gdb_assert (ptid != minus_one_ptid); This change makes the code more similar to what GDB already does. Regtested on BuildBot. gdb/gdbserver/ChangeLog: 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com> * gdbthread.h: Include "common-gdbthread.h". * inferiors.c (switch_to_thread): Use "gdb_assert" instead of "if" when validating the ptid. * remote-utils.c: Include "gdbthread.h". (prepare_resume_reply): Use "switch_to_thread". * target.c (done_accessing_memory): Likewise.
Diffstat (limited to 'gdb/gdbserver/gdbthread.h')
-rw-r--r--gdb/gdbserver/gdbthread.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/gdbserver/gdbthread.h b/gdb/gdbserver/gdbthread.h
index 04cc47ba719..a864f958848 100644
--- a/gdb/gdbserver/gdbthread.h
+++ b/gdb/gdbserver/gdbthread.h
@@ -19,6 +19,7 @@
#ifndef GDB_THREAD_H
#define GDB_THREAD_H
+#include "common-gdbthread.h"
#include "inferiors.h"
struct btrace_target_info;