[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 10/15] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu()
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH 10/15] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic |
Date: |
Wed, 19 May 2021 20:12:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
Forgot to Cc Alex...
On 5/17/21 1:55 PM, Philippe Mathieu-Daudé wrote:
> gdb_exit() and gdb_set_stop_cpu() prototypes don't have to be
> target specific. Remove this limitation to be able to build
> softmmu/cpus.c and softmmu/runstate.c once for all targets.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> include/exec/gdbstub.h | 23 ++++++++++++-----------
> 1 file changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
> index a024a0350df..84b1f2ff2aa 100644
> --- a/include/exec/gdbstub.h
> +++ b/include/exec/gdbstub.h
> @@ -45,17 +45,6 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const char
> *fmt, ...);
> */
> void gdb_do_syscallv(gdb_syscall_complete_cb cb, const char *fmt, va_list
> va);
> int use_gdb_syscalls(void);
> -void gdb_set_stop_cpu(CPUState *cpu);
> -
> -/**
> - * gdb_exit: exit gdb session, reporting inferior status
> - * @code: exit code reported
> - *
> - * This closes the session and sends a final packet to GDB reporting
> - * the exit status of the program. It also cleans up any connections
> - * detritus before returning.
> - */
> -void gdb_exit(int code);
>
> #ifdef CONFIG_USER_ONLY
> /**
> @@ -177,6 +166,18 @@ static inline uint8_t * gdb_get_reg_ptr(GByteArray *buf,
> int len)
> */
> int gdbserver_start(const char *port_or_device);
>
> +/**
> + * gdb_exit: exit gdb session, reporting inferior status
> + * @code: exit code reported
> + *
> + * This closes the session and sends a final packet to GDB reporting
> + * the exit status of the program. It also cleans up any connections
> + * detritus before returning.
> + */
> +void gdb_exit(int code);
> +
> +void gdb_set_stop_cpu(CPUState *cpu);
> +
> /**
> * gdb_has_xml:
> * This is an ugly hack to cope with both new and old gdb.
>
- Re: [RFC PATCH 05/15] accel/kvm: Simplify user-mode #ifdef'ry, (continued)
- [RFC PATCH 06/15] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header, Philippe Mathieu-Daudé, 2021/05/17
- [RFC PATCH 08/15] softmmu/cpu-timers: Remove unused 'exec/exec-all.h' header, Philippe Mathieu-Daudé, 2021/05/17
- [RFC PATCH 09/15] softmmu/runstate: Clean headers, Philippe Mathieu-Daudé, 2021/05/17
- [RFC PATCH 07/15] softmmu/globals: Remove unused 'hw/i386/*' headers, Philippe Mathieu-Daudé, 2021/05/17
- [RFC PATCH 10/15] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic, Philippe Mathieu-Daudé, 2021/05/17
- [RFC PATCH 11/15] exec/cpu: Make address_space_init/reloading_memory_map target agnostic, Philippe Mathieu-Daudé, 2021/05/17
- [RFC PATCH 12/15] sysemu/kvm: Make kvm_on_sigbus() / kvm_on_sigbus_vcpu() target agnostic, Philippe Mathieu-Daudé, 2021/05/17
- [RFC PATCH 13/15] sysemu/memory_mapping: Become target-agnostic, Philippe Mathieu-Daudé, 2021/05/17
- [RFC PATCH 14/15] softmmu/cpus: Extract QMP command handlers to cpus-qmp.c, Philippe Mathieu-Daudé, 2021/05/17