Patchwork [RFC,10/14,v9] make gdb_id() generally avialable

login
register
mail settings
Submitter Wen Congyang
Date March 14, 2012, 2:10 a.m.
Message ID <4F5FFE11.6080806@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/146528/
State New
Headers show

Comments

Wen Congyang - March 14, 2012, 2:10 a.m.
The following patch also needs this API, so make it generally avialable

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
 gdbstub.c |    9 ---------
 gdbstub.h |    9 +++++++++
 2 files changed, 9 insertions(+), 9 deletions(-)

Patch

diff --git a/gdbstub.c b/gdbstub.c
index ef95ac2..7522b42 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1939,15 +1939,6 @@  static void gdb_set_cpu_pc(GDBState *s, target_ulong pc)
 #endif
 }
 
-static inline int gdb_id(CPUState *env)
-{
-#if defined(CONFIG_USER_ONLY) && defined(CONFIG_USE_NPTL)
-    return env->host_tid;
-#else
-    return env->cpu_index + 1;
-#endif
-}
-
 static CPUState *find_cpu(uint32_t thread_id)
 {
     CPUState *env;
diff --git a/gdbstub.h b/gdbstub.h
index d82334f..f30bfe8 100644
--- a/gdbstub.h
+++ b/gdbstub.h
@@ -30,6 +30,15 @@  void gdb_register_coprocessor(CPUState *env,
                               gdb_reg_cb get_reg, gdb_reg_cb set_reg,
                               int num_regs, const char *xml, int g_pos);
 
+static inline int gdb_id(CPUState *env)
+{
+#if defined(CONFIG_USER_ONLY) && defined(CONFIG_USE_NPTL)
+    return env->host_tid;
+#else
+    return env->cpu_index + 1;
+#endif
+}
+
 #endif
 
 #ifdef CONFIG_USER_ONLY