bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH gnumach] Use c_string to define symtab_name_t.


From: Samuel Thibault
Subject: Re: [PATCH gnumach] Use c_string to define symtab_name_t.
Date: Mon, 3 Apr 2023 00:27:10 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Flavio Cruz, le mer. 15 mars 2023 02:08:08 -0400, a ecrit:
> As mentioned in 5447f965, the c_string type correctly uses
> msgt_size/msgt_number, resulting in a more compact ABI that doesn't
> require mach_msg_type_long_t.
> 
> I redefined host_load_symbol_table with a new Id since this is just a
> debug RPC and is not used anywhere.
> ---
>  include/mach_debug/mach_debug.defs       | 35 +++++++++++++-----------
>  include/mach_debug/mach_debug_types.defs |  2 +-
>  2 files changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/include/mach_debug/mach_debug.defs 
> b/include/mach_debug/mach_debug.defs
> index c8e8b1b4..8f3456dd 100644
> --- a/include/mach_debug/mach_debug.defs
> +++ b/include/mach_debug/mach_debug.defs
> @@ -135,22 +135,8 @@ routine host_virtual_physical_table_info(
>  skip;        /* host_virtual_physical_table_info */
>  #endif       /* !defined(MACH_VM_DEBUG) || MACH_VM_DEBUG */
>  
> -#if  !defined(MACH_KDB) || MACH_KDB
> -/*
> - *   Loads a symbol table for an external file into the kernel debugger.
> - *   The symbol table data is an array of characters.  It is assumed that
> - *   the caller and the kernel debugger agree on its format.
> - */
> -
> -routine host_load_symbol_table(
> -             host            : host_priv_t;
> -             task            : task_t;
> -             name            : symtab_name_t;
> -             symtab          : pointer_t);
> -
> -#else        /* !defined(MACH_KDB) || MACH_KDB */
> -skip;        /* host_load_symbol_table */
> -#endif       /* !defined(MACH_KDB) || MACH_KDB */
> +/* The old host_load_symbol_table with a different ABI for symtab_name_t */
> +skip;
>  
>  #if  !defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG
>  
> @@ -214,3 +200,20 @@ routine host_slab_info(
>               host            : host_t;
>       out     info            : cache_info_array_t,
>                                       CountInOut, Dealloc);
> +
> +#if  !defined(MACH_KDB) || MACH_KDB
> +/*
> + *   Loads a symbol table for an external file into the kernel debugger.
> + *   The symbol table data is an array of characters.  It is assumed that
> + *   the caller and the kernel debugger agree on its format.
> + */
> +
> +routine host_load_symbol_table(
> +             host            : host_priv_t;
> +             task            : task_t;
> +             name            : symtab_name_t;
> +             symtab          : pointer_t);
> +
> +#else        /* !defined(MACH_KDB) || MACH_KDB */
> +skip;        /* host_load_symbol_table */
> +#endif       /* !defined(MACH_KDB) || MACH_KDB */
> diff --git a/include/mach_debug/mach_debug_types.defs 
> b/include/mach_debug/mach_debug_types.defs
> index fd940384..3e38ccae 100644
> --- a/include/mach_debug/mach_debug_types.defs
> +++ b/include/mach_debug/mach_debug_types.defs
> @@ -102,7 +102,7 @@ type vm_page_info_t = struct {
>  };
>  type vm_page_info_array_t = array[] of vm_page_info_t;
>  
> -type symtab_name_t = (MACH_MSG_TYPE_STRING_C, 8*32);
> +type symtab_name_t = c_string[32];
>  
>  type kernel_debug_name_t = c_string[*: 64];
>  
> -- 
> 2.39.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]