From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3Prf-0003Cy-H1 for qemu-devel@nongnu.org; Fri, 02 Mar 2012 05:37:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3PrX-0002fr-SO for qemu-devel@nongnu.org; Fri, 02 Mar 2012 05:37:31 -0500 Received: from [222.73.24.84] (port=27179 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3PrX-0002fZ-HF for qemu-devel@nongnu.org; Fri, 02 Mar 2012 05:37:23 -0500 Message-ID: <4F50A333.3050904@cn.fujitsu.com> Date: Fri, 02 Mar 2012 18:38:43 +0800 From: Wen Congyang MIME-Version: 1.0 References: <4F509A00.80207@cn.fujitsu.com> In-Reply-To: <4F509A00.80207@cn.fujitsu.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1 Subject: [Qemu-devel] [RFC][PATCH 10/16 v8] make gdb_id() generally avialable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel , Jan Kiszka , Dave Anderson , HATAYAMA Daisuke , Luiz Capitulino , Eric Blake The following patch also needs this API, so make it generally avialable Signed-off-by: Wen Congyang --- gdbstub.c | 9 --------- gdbstub.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 7d470b6..046b036 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 -- 1.7.1