aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-12-20 08:41:55 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-01-06 07:59:49 -0300
commit65ccd641bacea33be23d51da737c2de7543d0f5e (patch)
treea3dbd16426b4a51dcb8450ede9d47c5a90e58a66 /sysdeps
parentc1fc366ec9e78e17ad3e2ecdb4c4cc662decc32b (diff)
downloadglibc-65ccd641bacea33be23d51da737c2de7543d0f5e.tar.xz
glibc-65ccd641bacea33be23d51da737c2de7543d0f5e.zip
debug: Remove catchsegv and libSegfault (BZ #14913)
Trapping SIGSEGV within the process is error-prone, adds security issues, and modern analysis design tends to happen out of the process (either by attaching a debugger or by post-mortem analysis). The libSegfault also has some design problems, it uses non async-signal-safe function (backtrace) on signal handler. There are multiple alternatives if users do want to use similar functionality, such as sigsegv gnulib module or libsegfault.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/register-dump.h19
-rw-r--r--sysdeps/powerpc/powerpc32/register-dump.h120
-rw-r--r--sysdeps/powerpc/powerpc64/register-dump.h124
-rw-r--r--sysdeps/unix/sysv/linux/alpha/register-dump.h239
-rw-r--r--sysdeps/unix/sysv/linux/arm/register-dump.h135
-rw-r--r--sysdeps/unix/sysv/linux/csky/register-dump.h190
-rw-r--r--sysdeps/unix/sysv/linux/i386/register-dump.h250
-rw-r--r--sysdeps/unix/sysv/linux/ia64/register-dump.h180
-rw-r--r--sysdeps/unix/sysv/linux/m68k/register-dump.h176
-rw-r--r--sysdeps/unix/sysv/linux/mips/register-dump.h120
-rw-r--r--sysdeps/unix/sysv/linux/riscv/register-dump.h63
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h128
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h131
-rw-r--r--sysdeps/unix/sysv/linux/segfault.c2
-rw-r--r--sysdeps/unix/sysv/linux/sh/register-dump.h263
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h342
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h273
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/register-dump.h345
18 files changed, 0 insertions, 3100 deletions
diff --git a/sysdeps/generic/register-dump.h b/sysdeps/generic/register-dump.h
deleted file mode 100644
index 9d6b2a3b0b..0000000000
--- a/sysdeps/generic/register-dump.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Dump registers.
- Copyright (C) 1998-2022 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-/* In general we cannot do anything. */
diff --git a/sysdeps/powerpc/powerpc32/register-dump.h b/sysdeps/powerpc/powerpc32/register-dump.h
deleted file mode 100644
index ea1335fd02..0000000000
--- a/sysdeps/powerpc/powerpc32/register-dump.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Dump registers.
- Copyright (C) 1998-2022 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <sys/uio.h>
-#include <_itoa.h>
-
-/* This prints out the information in the following form: */
-static const char dumpform[] = "\
-Register dump:\n\
-fp0-3: 0000030%0000031% 0000032%0000033% 0000034%0000035% 0000036%0000037%\n\
-fp4-7: 0000038%0000039% 000003a%000003b% 000003c%000003d% 000003e%000003f%\n\
-fp8-11: 0000040%0000041% 0000042%0000043% 0000044%0000045% 0000046%0000047%\n\
-fp12-15: 0000048%0000049% 000004a%000004b% 000004c%000004d% 000004e%000004f%\n\
-fp16-19: 0000050%0000051% 0000052%0000053% 0000054%0000055% 0000056%0000057%\n\
-fp20-23: 0000058%0000059% 000005a%000005b% 000005c%000005d% 000005e%000005f%\n\
-fp24-27: 0000060%0000061% 0000062%0000063% 0000064%0000065% 0000066%0000067%\n\
-fp28-31: 0000068%0000069% 000006a%000006b% 000006c%000006d% 000006e%000006f%\n\
-r0 =0000000% sp =0000001% r2 =0000002% r3 =0000003% trap=0000028%\n\
-r4 =0000004% r5 =0000005% r6 =0000006% r7 =0000007% sr0=0000020% sr1=0000021%\n\
-r8 =0000008% r9 =0000009% r10=000000a% r11=000000b% dar=0000029% dsi=000002a%\n\
-r12=000000c% r13=000000d% r14=000000e% r15=000000f% r3*=0000022%\n\
-r16=0000010% r17=0000011% r18=0000012% r19=0000013%\n\
-r20=0000014% r21=0000015% r22=0000016% r23=0000017% lr=0000024% xer=0000025%\n\
-r24=0000018% r25=0000019% r26=000001a% r27=000001b% mq=0000027% ctr=0000023%\n\
-r28=000001c% r29=000001d% r30=000001e% r31=000001f% fscr=0000071% ccr=0000026%\n\
-";
-
-/* Most of the fields are self-explanatory. 'sr0' is the next
- instruction to execute, from SRR0, which may have some relationship
- with the instruction that caused the exception. 'r3*' is the value
- that will be returned in register 3 when the current system call
- returns. 'sr1' is SRR1, bits 16-31 of which are copied from the MSR:
-
- 16 - External interrupt enable
- 17 - Privilege level (1=user, 0=supervisor)
- 18 - FP available
- 19 - Machine check enable (if clear, processor locks up on machine check)
- 20 - FP exception mode bit 0 (FP exceptions recoverable)
- 21 - Single-step trace enable
- 22 - Branch trace enable
- 23 - FP exception mode bit 1
- 25 - exception prefix (if set, exceptions are taken from 0xFFFnnnnn,
- otherwise from 0x000nnnnn).
- 26 - Instruction address translation enabled.
- 27 - Data address translation enabled.
- 30 - Exception is recoverable (otherwise, don't try to return).
- 31 - Little-endian mode enable.
-
- 'Trap' is the address of the exception:
-
- 00200 - Machine check exception (memory parity error, for instance)
- 00300 - Data access exception (memory not mapped, see dsisr for why)
- 00400 - Instruction access exception (memory not mapped)
- 00500 - External interrupt
- 00600 - Alignment exception (see dsisr for more information)
- 00700 - Program exception (illegal/trap instruction, FP exception)
- 00800 - FP unavailable (should not be seen by user code)
- 00900 - Decrementer exception (for instance, SIGALRM)
- 00A00 - I/O controller interface exception
- 00C00 - System call exception (for instance, kill(3)).
- 00E00 - FP assist exception (optional FP instructions, etc.)
-
- 'dar' is the memory location, for traps 00300, 00400, 00600, 00A00.
- 'dsisr' has the following bits under trap 00300:
- 0 - direct-store error exception
- 1 - no page table entry for page
- 4 - memory access not permitted
- 5 - trying to access I/O controller space or using lwarx/stwcx on
- non-write-cached memory
- 6 - access was store
- 9 - data access breakpoint hit
- 10 - segment table search failed to find translation (64-bit ppcs only)
- 11 - I/O controller instruction not permitted
- For trap 00400, the same bits are set in SRR1 instead.
- For trap 00600, bits 12-31 of the DSISR set to allow emulation of
- the instruction without actually having to read it from memory.
-*/
-
-#define xtoi(x) (x >= 'a' ? x + 10 - 'a' : x - '0')
-
-static void
-register_dump (int fd, struct sigcontext *ctx)
-{
- char buffer[sizeof (dumpform)];
- char *bufferpos;
- unsigned regno;
- unsigned *regs = (unsigned *)(ctx->regs);
-
- memcpy(buffer, dumpform, sizeof (dumpform));
-
- /* Generate the output. */
- while ((bufferpos = memchr (buffer, '%', sizeof (dumpform))))
- {
- regno = xtoi (bufferpos[-1]) | xtoi (bufferpos[-2]) << 4;
- memset (bufferpos-2, '0', 3);
- _itoa_word (regs[regno], bufferpos+1, 16, 0);
- }
-
- /* Write the output. */
- write (fd, buffer, sizeof (buffer) - 1);
-}
-
-
-#define REGISTER_DUMP \
- register_dump (fd, ctx)
diff --git a/sysdeps/powerpc/powerpc64/register-dump.h b/sysdeps/powerpc/powerpc64/register-dump.h
deleted file mode 100644
index 73454e5d34..0000000000
--- a/sysdeps/powerpc/powerpc64/register-dump.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/* Dump registers.
- Copyright (C) 1998-2022 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <sys/uio.h>
-#include <_itoa.h>
-
-/* This prints out the information in the following form: */
-static const char dumpform[] = "\
-Register dump:\n\
-sr0=000000000000020% sr1=000000000000021% dar=000000000000029% dsi=000002a%\n\
-lr=000000000000024% ctr=000000000000023% gr3*=000000000000022% trap=0000028%\n\
-ccr=0000026% xer=0000025%\n\
-gr0-3: 000000000000000% 000000000000001% 000000000000002% 000000000000003%\n\
-gr4-7: 000000000000004% 000000000000005% 000000000000006% 000000000000007%\n\
-gr8-11: 000000000000008% 000000000000009% 00000000000000a% 00000000000000b%\n\
-gr12-15: 00000000000000c% 00000000000000d% 00000000000000e% 00000000000000f%\n\
-gr16-19: 000000000000010% 000000000000011% 000000000000012% 000000000000013%\n\
-gr20-23: 000000000000014% 000000000000015% 000000000000016% 000000000000017%\n\
-gr24-27: 000000000000018% 000000000000019% 00000000000001a% 00000000000001b%\n\
-gr28-31: 00000000000001c% 00000000000001d% 00000000000001e% 00000000000001f%\n\
-fscr=000000000000050%\n\
-fp0-3: 000000000000030% 000000000000031% 000000000000032% 000000000000033%\n\
-fp4-7: 000000000000034% 000000000000035% 000000000000036% 000000000000037%\n\
-fp8-11: 000000000000038% 000000000000038% 00000000000003a% 00000000000003b%\n\
-fp12-15: 00000000000003c% 00000000000003d% 00000000000003e% 00000000000003f%\n\
-fp16-19: 000000000000040% 000000000000041% 000000000000042% 000000000000043%\n\
-fp20-23: 000000000000044% 000000000000045% 000000000000046% 000000000000047%\n\
-fp24-27: 000000000000048% 000000000000049% 00000000000004a% 00000000000004b%\n\
-fp28-31: 00000000000004c% 00000000000004d% 00000000000004e% 00000000000004f%\n\
-";
-
-/* Most of the fields are self-explanatory. 'sr0' is the next
- instruction to execute, from SRR0, which may have some relationship
- with the instruction that caused the exception. 'r3*' is the value
- that will be returned in register 3 when the current system call
- returns. 'sr1' is SRR1, bits 16-31 of which are copied from the MSR:
-
- 16 - External interrupt enable
- 17 - Privilege level (1=user, 0=supervisor)
- 18 - FP available
- 19 - Machine check enable (if clear, processor locks up on machine check)
- 20 - FP exception mode bit 0 (FP exceptions recoverable)
- 21 - Single-step trace enable
- 22 - Branch trace enable
- 23 - FP exception mode bit 1
- 25 - exception prefix (if set, exceptions are taken from 0xFFFnnnnn,
- otherwise from 0x000nnnnn).
- 26 - Instruction address translation enabled.
- 27 - Data address translation enabled.
- 30 - Exception is recoverable (otherwise, don't try to return).
- 31 - Little-endian mode enable.
-
- 'Trap' is the address of the exception:
-
- 00200 - Machine check exception (memory parity error, for instance)
- 00300 - Data access exception (memory not mapped, see dsisr for why)
- 00400 - Instruction access exception (memory not mapped)
- 00500 - External interrupt
- 00600 - Alignment exception (see dsisr for more information)
- 00700 - Program exception (illegal/trap instruction, FP exception)
- 00800 - FP unavailable (should not be seen by user code)
- 00900 - Decrementer exception (for instance, SIGALRM)
- 00A00 - I/O controller interface exception
- 00C00 - System call exception (for instance, kill(3)).
- 00E00 - FP assist exception (optional FP instructions, etc.)
-
- 'dar' is the memory location, for traps 00300, 00400, 00600, 00A00.
- 'dsisr' has the following bits under trap 00300:
- 0 - direct-store error exception
- 1 - no page table entry for page
- 4 - memory access not permitted
- 5 - trying to access I/O controller space or using lwarx/stwcx on
- non-write-cached memory
- 6 - access was store
- 9 - data access breakpoint hit
- 10 - segment table search failed to find translation (64-bit ppcs only)
- 11 - I/O controller instruction not permitted
- For trap 00400, the same bits are set in SRR1 instead.
- For trap 00600, bits 12-31 of the DSISR set to allow emulation of
- the instruction without actually having to read it from memory.
-*/
-
-#define xtoi(x) (x >= 'a' ? x + 10 - 'a' : x - '0')
-
-static void
-register_dump (int fd, struct sigcontext *ctx)
-{
- char buffer[sizeof (dumpform)];
- char *bufferpos;
- unsigned regno;
- unsigned long *regs = (unsigned long *)(ctx->regs);
-
- memcpy(buffer, dumpform, sizeof (dumpform));
-
- /* Generate the output. */
- while ((bufferpos = memchr (buffer, '%', sizeof (dumpform))))
- {
- regno = xtoi (bufferpos[-1]) | xtoi (bufferpos[-2]) << 4;
- memset (bufferpos-2, '0', 3);
- _itoa_word (regs[regno], bufferpos+1, 16, 0);
- }
-
- /* Write the output. */
- write (fd, buffer, sizeof (buffer) - 1);
-}
-
-
-#define REGISTER_DUMP \
- register_dump (fd, ctx)
diff --git a/sysdeps/unix/sysv/linux/alpha/register-dump.h b/sysdeps/unix/sysv/linux/alpha/register-dump.h
deleted file mode 100644
index 5ecdd0c2ac..0000000000
--- a/sysdeps/unix/sysv/linux/alpha/register-dump.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/* Dump registers.
- Copyright (C) 2004-2022 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <string.h>
-#include <ucontext.h>
-#include <sys/uio.h>
-#include <_itoa.h>
-
-/* We will print the register dump in this format:
-
- V0: XXXXXXXXXXXXXXXX T0: XXXXXXXXXXXXXXXX T1: XXXXXXXXXXXXXXXX
- T2: XXXXXXXXXXXXXXXX T3: XXXXXXXXXXXXXXXX T4: XXXXXXXXXXXXXXXX
- T5: XXXXXXXXXXXXXXXX T6: XXXXXXXXXXXXXXXX T7: XXXXXXXXXXXXXXXX
- S0: XXXXXXXXXXXXXXXX S1: XXXXXXXXXXXXXXXX S2: XXXXXXXXXXXXXXXX
- S3: XXXXXXXXXXXXXXXX S4: XXXXXXXXXXXXXXXX S5: XXXXXXXXXXXXXXXX
- S6: XXXXXXXXXXXXXXXX A0: XXXXXXXXXXXXXXXX A1: XXXXXXXXXXXXXXXX
- A2: XXXXXXXXXXXXXXXX A3: XXXXXXXXXXXXXXXX A4: XXXXXXXXXXXXXXXX
- A5: XXXXXXXXXXXXXXXX T8: XXXXXXXXXXXXXXXX T9: XXXXXXXXXXXXXXXX
- T10: XXXXXXXXXXXXXXXX T11: XXXXXXXXXXXXXXXX RA: XXXXXXXXXXXXXXXX
- T12: XXXXXXXXXXXXXXXX AT: XXXXXXXXXXXXXXXX GP: XXXXXXXXXXXXXXXX
- SP: XXXXXXXXXXXXXXXX PC: XXXXXXXXXXXXXXXX
-
- FP0: XXXXXXXXXXXXXXXX FP1: XXXXXXXXXXXXXXXX FP2: XXXXXXXXXXXXXXXX
- FP3: XXXXXXXXXXXXXXXX FP4: XXXXXXXXXXXXXXXX FP5: XXXXXXXXXXXXXXXX
- FP6: XXXXXXXXXXXXXXXX FP7: XXXXXXXXXXXXXXXX FP8: XXXXXXXXXXXXXXXX
- FP9: XXXXXXXXXXXXXXXX FP10: XXXXXXXXXXXXXXXX FP11: XXXXXXXXXXXXXXXX
- FP12: XXXXXXXXXXXXXXXX FP13: XXXXXXXXXXXXXXXX FP14: XXXXXXXXXXXXXXXX
- FP15: XXXXXXXXXXXXXXXX FP16: XXXXXXXXXXXXXXXX FP17: XXXXXXXXXXXXXXXX
- FP18: XXXXXXXXXXXXXXXX FP19: XXXXXXXXXXXXXXXX FP20: XXXXXXXXXXXXXXXX
- FP21: XXXXXXXXXXXXXXXX FP22: XXXXXXXXXXXXXXXX FP23: XXXXXXXXXXXXXXXX
- FP24: XXXXXXXXXXXXXXXX FP25: XXXXXXXXXXXXXXXX FP26: XXXXXXXXXXXXXXXX
- FP27: XXXXXXXXXXXXXXXX FP28: XXXXXXXXXXXXXXXX FP29: XXXXXXXXXXXXXXXX
- FP30: XXXXXXXXXXXXXXXX FPCR: XXXXXXXXXXXXXXXX
-
- TA0: XXXXXXXXXXXXXXXX TA1: XXXXXXXXXXXXXXXX TA2: XXXXXXXXXXXXXXXX
-*/
-
-static void
-hexvalue (unsigned long int value, char *buf, size_t len)
-{
- char *cp = _itoa_word (value, buf + len, 16, 0);
- while (cp > buf)
- *--cp = '0';
-}
-
-static void
-register_dump (int fd, struct ucontext_t *ctx)
-{
- struct iovec iov[31 * 2 + 2 /* REGS + PC. */
- + 31 * 2 + 2 /* FREGS + FPCR. */
- + (3 * 2) /* TA0, TA1, TA3. */
- + 1 /* '\n'. */];
- size_t nr = 0;
-
-#define ADD_STRING(str) \
- iov[nr].iov_base = (char *) str; \
- iov[nr].iov_len = strlen (str); \
- ++nr
-#define ADD_MEM(str, len) \
- iov[nr].iov_base = str; \
- iov[nr].iov_len = len; \
- ++nr
-
- char regs[31][16];
- char pc[16];
- for (int i = 0; i < 31; i++)
- hexvalue (ctx->uc_mcontext.sc_regs[i], regs[i], 16);
- hexvalue (ctx->uc_mcontext.sc_pc, pc, 16);
-
- /* Generate the output. */
- ADD_STRING ("Register dump:\n\n V0: ");
- ADD_MEM (regs[0], 16);
- ADD_STRING (" T0: ");
- ADD_MEM (regs[1], 16);
- ADD_STRING (" T1: ");
- ADD_MEM (regs[2], 16);
- ADD_STRING ("\n T2: ");
- ADD_MEM (regs[3], 16);
- ADD_STRING (" T3: ");
- ADD_MEM (regs[4], 16);
- ADD_STRING (" T4: ");
- ADD_MEM (regs[5], 16);
- ADD_STRING ("\n T5: ");
- ADD_MEM (regs[6], 16);
- ADD_STRING (" T6: ");
- ADD_MEM (regs[7], 16);
- ADD_STRING (" T7: ");
- ADD_MEM (regs[8], 16);
- ADD_STRING ("\n S0: ");
- ADD_MEM (regs[9], 16);
- ADD_STRING (" S1: ");
- ADD_MEM (regs[10], 16);
- ADD_STRING (" S2: ");
- ADD_MEM (regs[11], 16);
- ADD_STRING ("\n S3: ");
- ADD_MEM (regs[12], 16);
- ADD_STRING (" S4: ");
- ADD_MEM (regs[13], 16);
- ADD_STRING (" S5: ");
- ADD_MEM (regs[14], 16);
- ADD_STRING ("\n S6: ");
- ADD_MEM (regs[15], 16);
- ADD_STRING (" A0: ");
- ADD_MEM (regs[16], 16);
- ADD_STRING (" A1: ");
- ADD_MEM (regs[17], 16);
- ADD_STRING ("\n A2: ");
- ADD_MEM (regs[18], 16);
- ADD_STRING (" A3: ");
- ADD_MEM (regs[19], 16);
- ADD_STRING (" A4: ");
- ADD_MEM (regs[20], 16);
- ADD_STRING ("\n A5: ");
- ADD_MEM (regs[21], 16);
- ADD_STRING (" T8: ");
- ADD_MEM (regs[22], 16);
- ADD_STRING (" T9: ");
- ADD_MEM (regs[23], 16);
- ADD_STRING ("\n T10: ");
- ADD_MEM (regs[24], 16);
- ADD_STRING (" T11: ");
- ADD_MEM (regs[25], 16);
- ADD_STRING (" RA: ");
- ADD_MEM (regs[26], 16);
- ADD_STRING ("\n T12: ");
- ADD_MEM (regs[27], 16);
- ADD_STRING (" AT: ");
- ADD_MEM (regs[28], 16);
- ADD_STRING (" GP: ");
- ADD_MEM (regs[29], 16);
- ADD_STRING ("\n SP: ");
- ADD_MEM (regs[30], 16);
- ADD_STRING (" PC: ");
- ADD_MEM (pc, 16);
-
- char fpregs[31][16];
- char fpcr[16];
- for (int i = 0; i < 31; i++)
- hexvalue (ctx->uc_mcontext.sc_fpregs[i], fpregs[i], 16);
- hexvalue (ctx->uc_mcontext.sc_fpcr, fpcr, 16);
-
- ADD_STRING ("\n\n FP0: ");
- ADD_MEM (fpregs[0], 16);
- ADD_STRING (" FP1: ");
- ADD_MEM (fpregs[1], 16);
- ADD_STRING (" FP2: ");
- ADD_MEM (fpregs[2], 16);
- ADD_STRING ("\n FP3: ");
- ADD_MEM (fpregs[3], 16);
- ADD_STRING (" FP4: ");
- ADD_MEM (fpregs[4], 16);
- ADD_STRING (" FP5: ");
- ADD_MEM (fpregs[5], 16);
- ADD_STRING ("\n FP6: ");
- ADD_MEM (fpregs[6], 16);
- ADD_STRING (" FP7: ");
- ADD_MEM (fpregs[7], 16);
- ADD_STRING (" FP8: ");
- ADD_MEM (fpregs[8], 16);
- ADD_STRING ("\n FP9: ");
- ADD_MEM (fpregs[9], 16);
- ADD_STRING (" FP10: ");
- ADD_MEM (fpregs[10], 16);
- ADD_STRING (" FP11: ");
- ADD_MEM (fpregs[11], 16);
- ADD_STRING ("\n FP12: ");
- ADD_MEM (fpregs[12], 16);
- ADD_STRING (" FP13: ");
- ADD_MEM (fpregs[13], 16);
- ADD_STRING (" FP14: ");
- ADD_MEM (fpregs[14], 16);
- ADD_STRING ("\n FP15: ");
- ADD_MEM (fpregs[15], 16);
- ADD_STRING (" FP16: ");
- ADD_MEM (fpregs[16], 16);
- ADD_STRING (" FP17: ");
- ADD_MEM (fpregs[17], 16);
- ADD_STRING ("\n FP18: ");
- ADD_MEM (fpregs[18], 16);
- ADD_STRING (" FP19: ");
- ADD_MEM (fpregs[19], 16);
- ADD_STRING (" FP20: ");
- ADD_MEM (fpregs[20], 16);
- ADD_STRING ("\n FP21: ");
- ADD_MEM (fpregs[21], 16);
- ADD_STRING (" FP22: ");
- ADD_MEM (fpregs[22], 16);
- ADD_STRING (" FP23: ");
- ADD_MEM (fpregs[23], 16);
- ADD_STRING ("\n FP24: ");
- ADD_MEM (fpregs[24], 16);
- ADD_STRING (" FP25: ");