summaryrefslogtreecommitdiff
path: root/include/mach_debug
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-03-15 02:08:08 -0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-04-03 00:26:49 +0200
commite2d9c96609b6bd328bfa8bb6e8c0f0b259485a2f (patch)
tree15e3b7cfed600576375ce6e79b160ac1bd57cff6 /include/mach_debug
parent984576eb09fdc554a934fb62c404c1b69b3ee68b (diff)
Use c_string to define symtab_name_t.
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. Message-Id: <ZBFgyJp+Pcb7zFhf@mars.tail36e24.ts.net>
Diffstat (limited to 'include/mach_debug')
-rw-r--r--include/mach_debug/mach_debug.defs35
-rw-r--r--include/mach_debug/mach_debug_types.defs2
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];