新しい GDB は、システム コールで壊れる可能性があります。
(gdb) help catch syscall
Catch system calls by their names and/or numbers.
Arguments say which system calls to catch. If no arguments
are given, every system call will be caught.
Arguments, if given, should be one or more system call names
(if your system supports that), or system call numbers.
例:
$ gdb /bin/true
(gdb) catch syscall exit_group
Catchpoint 1 (syscall 'exit_group' [231])
(gdb) run
Starting program: /usr/bin/true
Catchpoint 1 (call to syscall exit_group), 0x00000038464baa09 in __GI__exit (status=status@entry=0)
at ../sysdeps/unix/sysv/linux/_exit.c:33
33 INLINE_SYSCALL (exit_group, 1, status);
XML ファイルは、syscall 名と番号のマッピングを提供します。たとえばexit_group
、x86-64 Linux の syscall 番号は 231 です。