[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC][PATCH 08/14 v7] make gdb_id() generally avialable
From: |
Wen Congyang |
Subject: |
[Qemu-devel] [RFC][PATCH 08/14 v7] make gdb_id() generally avialable |
Date: |
Thu, 01 Mar 2012 10:50:43 +0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4 |
The following patch also needs this API, so make it generally avialable
Signed-off-by: Wen Congyang <address@hidden>
---
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
- [Qemu-devel] [RFC][PATCH 00/14 v7] introducing a new, dedicated memory dump mechanism, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 01/14 v7] Add API to create memory mapping list, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 02/14 v7] Add API to check whether a physical address is I/O address, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 03/14 v7] target-i386: implement cpu_get_memory_mapping(), Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 04/14 v7] Add API to get memory mapping, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 05/14 v7] target-i386: Add API to write elf notes to core file, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 06/14 v7] target-i386: Add API to write cpu status to core file, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 07/14 v7] target-i386: add API to get dump info, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 08/14 v7] make gdb_id() generally avialable,
Wen Congyang <=
- [Qemu-devel] [RFC][PATCH 09/14 v7] introduce a new monitor command 'dump' to dump guest's memory, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 10/14 v7] support to cancel the current dumping, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 11/14 v7] support to query dumping status, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 12/14 v7] run dump at the background, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 13/14 v7] support detached dump, Wen Congyang, 2012/02/29
- [Qemu-devel] [RFC][PATCH 14/14 v7] allow user to dump a fraction of the memory, Wen Congyang, 2012/02/29
- Re: [Qemu-devel] [RFC][PATCH 00/14 v7] introducing a new, dedicated memory dump mechanism, HATAYAMA Daisuke, 2012/02/29