[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 03/46] windbg: modified windbgkd.h
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v4 03/46] windbg: modified windbgkd.h |
Date: |
Fri, 12 Jan 2018 09:44:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
On 11/12/2017 14:21, Mihail Abakumov wrote:
> Added useful name arrays of some defines. Not used yet. Needs for the future.
>
> Signed-off-by: Mihail Abakumov <address@hidden>
> Signed-off-by: Pavel Dovgalyuk <address@hidden>
> Signed-off-by: Dmitriy Koltunov <address@hidden>
> ---
> include/exec/windbgkd.h | 83
> +++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 83 insertions(+)
>
> diff --git a/include/exec/windbgkd.h b/include/exec/windbgkd.h
> index b8f98925e7..5008cbb729 100755
> --- a/include/exec/windbgkd.h
> +++ b/include/exec/windbgkd.h
> @@ -870,4 +870,87 @@ typedef struct _DBGKD_TRACE_IO {
> } u;
> } DBGKD_TRACE_IO, *PDBGKD_TRACE_IO;
>
> +__attribute__ ((unused)) /* maybe unused */
> +static const char *kd_api_names[] = {
Please put this in windbgstub-utils.c...
> + "DbgKdReadVirtualMemoryApi",
> + "DbgKdWriteVirtualMemoryApi",
> + "DbgKdGetContextApi",
> + "DbgKdSetContextApi",
> + "DbgKdWriteBreakPointApi",
> + "DbgKdRestoreBreakPointApi",
> + "DbgKdContinueApi",
> + "DbgKdReadControlSpaceApi",
> + "DbgKdWriteControlSpaceApi",
> + "DbgKdReadIoSpaceApi",
> + "DbgKdWriteIoSpaceApi",
> + "DbgKdRebootApi",
> + "DbgKdContinueApi2",
> + "DbgKdReadPhysicalMemoryApi",
> + "DbgKdWritePhysicalMemoryApi",
> + "DbgKdQuerySpecialCallsApi",
> + "DbgKdSetSpecialCallApi",
> + "DbgKdClearSpecialCallsApi",
> + "DbgKdSetInternalBreakPointApi",
> + "DbgKdGetInternalBreakPointApi",
> + "DbgKdReadIoSpaceExtendedApi",
> + "DbgKdWriteIoSpaceExtendedApi",
> + "DbgKdGetVersionApi",
> + "DbgKdWriteBreakPointExApi",
> + "DbgKdRestoreBreakPointExApi",
> + "DbgKdCauseBugCheckApi",
> + "",
> + "",
> + "",
> + "",
> + "",
> + "",
> + "DbgKdSwitchProcessor",
> + "DbgKdPageInApi",
> + "DbgKdReadMachineSpecificRegister",
> + "DbgKdWriteMachineSpecificRegister",
> + "OldVlm1",
> + "OldVlm2",
> + "DbgKdSearchMemoryApi",
> + "DbgKdGetBusDataApi",
> + "DbgKdSetBusDataApi",
> + "DbgKdCheckLowMemoryApi",
> + "DbgKdClearAllInternalBreakpointsApi",
> + "DbgKdFillMemoryApi",
> + "DbgKdQueryMemoryApi",
> + "DbgKdSwitchPartition",
> + "DbgKdUnknownApi"
> +};
> +
> +__attribute__ ((unused)) /* maybe unused */
> +static const char *kd_packet_type_names[] = {
... same here...
> + "PACKET_TYPE_UNUSED",
> + "PACKET_TYPE_KD_STATE_CHANGE32",
> + "PACKET_TYPE_KD_STATE_MANIPULATE",
> + "PACKET_TYPE_KD_DEBUG_IO",
> + "PACKET_TYPE_KD_ACKNOWLEDGE",
> + "PACKET_TYPE_KD_RESEND",
> + "PACKET_TYPE_KD_RESET",
> + "PACKET_TYPE_KD_STATE_CHANGE64",
> + "PACKET_TYPE_KD_POLL_BREAKIN",
> + "PACKET_TYPE_KD_TRACE_IO",
> + "PACKET_TYPE_KD_CONTROL_REQUEST",
> + "PACKET_TYPE_KD_FILE_IO",
> + "PACKET_TYPE_MAX"
> +};
> +
> +#define KD_API_NAME(id) ({ \
... and make this a function instead of a macro.
Paolo
> + QEMU_BUILD_BUG_ON(ARRAY_SIZE(kd_api_names) == \
> + DbgKdMaximumManipulate - DbgKdMinimumManipulate + 2); \
> + (id >= DbgKdMinimumManipulate && id < DbgKdMaximumManipulate) ? \
> + kd_api_names[id - DbgKdMinimumManipulate] : \
> + kd_api_names[DbgKdMaximumManipulate - DbgKdMinimumManipulate]; \
> +})
> +
> +#define KD_PKT_TYPE_NAME(id) ({ \
> + QEMU_BUILD_BUG_ON(ARRAY_SIZE(kd_packet_type_names) == PACKET_TYPE_MAX); \
> + (id >= 0 && id < PACKET_TYPE_MAX) ? \
> + kd_packet_type_names[id] : \
> + kd_packet_type_names[PACKET_TYPE_MAX - 1]; \
> +})
> +
> #endif
>
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v4 03/46] windbg: modified windbgkd.h,
Paolo Bonzini <=