1 // SPDX-License-Identifier: GPL-2.0 1 2 #include <linux/ptrace.h> 3 4 /** 5 * regs_query_register_offset() - query regist 6 * @name: the name of a register 7 * 8 * regs_query_register_offset() returns the of 9 * pt_regs from its name. If the name is inval 10 */ 11 int regs_query_register_offset(const char *nam 12 { 13 const struct pt_regs_offset *roff; 14 for (roff = regoffset_table; roff->nam 15 if (!strcmp(roff->name, name)) 16 return roff->offset; 17 return -EINVAL; 18 } 19 20 /** 21 * regs_query_register_name() - query register 22 * @offset: the offset of a register in st 23 * 24 * regs_query_register_name() returns the name 25 * offset in struct pt_regs. If the @offset is 26 */ 27 const char *regs_query_register_name(unsigned 28 { 29 const struct pt_regs_offset *roff; 30 for (roff = regoffset_table; roff->nam 31 if (roff->offset == offset) 32 return roff->name; 33 return NULL; 34 } 35
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.