mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
gdbstub: rename cpu_index -> cpu_gdb_index
This is to make it clear the index is purely a gdbstub function and should not be confused with the value of cpu->cpu_index. At the same time we move the function from the header to gdbstub itself which will help with later changes. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170712105216.747-3-alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
118e226884
commit
d2a6c8570b
2 changed files with 20 additions and 15 deletions
|
|
@ -58,15 +58,6 @@ void gdb_register_coprocessor(CPUState *cpu,
|
|||
gdb_reg_cb get_reg, gdb_reg_cb set_reg,
|
||||
int num_regs, const char *xml, int g_pos);
|
||||
|
||||
static inline int cpu_index(CPUState *cpu)
|
||||
{
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
return cpu->host_tid;
|
||||
#else
|
||||
return cpu->cpu_index + 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* The GDB remote protocol transfers values in target byte order. This means
|
||||
* we can use the raw memory access routines to access the value buffer.
|
||||
* Conveniently, these also handle the case where the buffer is mis-aligned.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue