/* regs_query_register_name() returns the name of a register from its offset in struct pt_regs. If the @offset is invalid, this returns NULL;  */
const char* regs_query_register_name(unsigned int offset)
/* regs_query_register_name() returns the name of a register from its offset in struct pt_regs. If the @offset is invalid, this returns NULL;  */
const char* regs_query_register_name(unsigned int offset)
{
	const struct pt_regs_offset *roff;
	for (roff = regoffset_table; roff->name != NULL; roff++)
		if (roff->offset == offset)
			return roff->name;
	return NULL;
}