Flavio Cruz, le dim. 04 févr. 2024 01:43:48 -0500, a ecrit: > +/* Recognizing signal handler frames. */ > + > +/* When the GNU/Hurd libc calls a signal handler, the return address points > + inside the trampoline assembly snippet. > + > + If the trampoline function name can not be identified, we resort to > reading > + memory from the process in order to identify it. */ > + > +static const gdb_byte gnu_sigtramp_code[] = > +{ > +/* rpc_wait_trampoline: */ > + 0x48, 0xc7, 0xc0, 0xe7, 0xff, 0xff, 0xff, /* mov $-25,%rax */ > + 0x0f, 0x05, /* syscall */ > + 0x49, 0x89, 0x04, 0x24, /* mov %rax,(%r12) */
0x48, 0x89, 0xdc /* mov %rbx,%rsp */ is missing here? > + CORE_ADDR sigcontext_addr; > + > + /* The sigcontext structure address is passed as the third argument to > + the signal handler. */ > + read_memory (sp + 8, buf, 8); on x86_64 it would rather be through registers > + sigcontext_addr = extract_unsigned_integer (buf, 8, byte_order); > + return sigcontext_addr + AMD64_GNU_SIGCONTEXT_THREAD_STATE_OFFSET; > + } > + > + error (_("Couldn't recognize signal trampoline.")); > + return 0; > +} > +/* From <bits/sigcontext.h>. */ > +static int amd64_gnu_sc_reg_offset[] = I didn't check these :o) The rest looks sane indeed. Samuel