1 /* Native-dependent code for Linux/x86.
2 Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
26 #include "gdb_assert.h"
27 #include <sys/ptrace.h>
29 #include <sys/procfs.h>
35 #ifdef HAVE_SYS_DEBUGREG_H
36 #include <sys/debugreg.h>
40 #define DR_FIRSTADDR 0
55 /* Prototypes for supply_gregset etc. */
58 /* Prototypes for i387_supply_fsave etc. */
61 /* Prototypes for local functions. */
62 static void dummy_sse_values (void);
66 /* The register sets used in Linux ELF core-dumps are identical to the
67 register sets in `struct user' that is used for a.out core-dumps,
68 and is also used by `ptrace'. The corresponding types are
69 `elf_gregset_t' for the general-purpose registers (with
70 `elf_greg_t' the type of a single GP register) and `elf_fpregset_t'
71 for the floating-point registers.
73 Those types used to be available under the names `gregset_t' and
74 `fpregset_t' too, and this file used those names in the past. But
75 those names are now used for the register sets used in the
76 `mcontext_t' type, and have a different size and layout. */
78 /* Mapping between the general-purpose registers in `struct user'
79 format and GDB's register array layout. */
88 /* Which ptrace request retrieves which registers?
89 These apply to the corresponding SET requests as well. */
90 #define GETREGS_SUPPLIES(regno) \
91 (0 <= (regno) && (regno) <= 15)
92 #define GETFPREGS_SUPPLIES(regno) \
93 (FP0_REGNUM <= (regno) && (regno) <= LAST_FPU_CTRL_REGNUM)
94 #define GETFPXREGS_SUPPLIES(regno) \
95 (FP0_REGNUM <= (regno) && (regno) <= MXCSR_REGNUM)
97 /* Does the current host support the GETREGS request? */
98 int have_ptrace_getregs
=
99 #ifdef HAVE_PTRACE_GETREGS
106 /* Does the current host support the GETFPXREGS request? The header
107 file may or may not define it, and even if it is defined, the
108 kernel will return EIO if it's running on a pre-SSE processor.
110 My instinct is to attach this to some architecture- or
111 target-specific data structure, but really, a particular GDB
112 process can only run on top of one kernel at a time. So it's okay
113 for this to be a simple variable. */
114 int have_ptrace_getfpxregs
=
115 #ifdef HAVE_PTRACE_GETFPXREGS
123 /* Support for the user struct. */
125 /* Return the address of register REGNUM. BLOCKEND is the value of
126 u.u_ar0, which should point to the registers. */
129 register_u_addr (CORE_ADDR blockend
, int regnum
)
131 return (blockend
+ 4 * regmap
[regnum
]);
134 /* Return the size of the user struct. */
139 return (sizeof (struct user
));
143 /* Fetching registers directly from the U area, one at a time. */
145 /* FIXME: kettenis/2000-03-05: This duplicates code from `inptrace.c'.
146 The problem is that we define FETCH_INFERIOR_REGISTERS since we
147 want to use our own versions of {fetch,store}_inferior_registers
148 that use the GETREGS request. This means that the code in
149 `infptrace.c' is #ifdef'd out. But we need to fall back on that
150 code when GDB is running on top of a kernel that doesn't support
151 the GETREGS request. I want to avoid changing `infptrace.c' right
155 #define PT_READ_U PTRACE_PEEKUSR
158 #define PT_WRITE_U PTRACE_POKEUSR
161 /* Default the type of the ptrace transfer to int. */
162 #ifndef PTRACE_XFER_TYPE
163 #define PTRACE_XFER_TYPE int
166 /* Registers we shouldn't try to fetch. */
167 #define OLD_CANNOT_FETCH_REGISTER(regno) ((regno) >= NUM_GREGS)
169 /* Fetch one register. */
172 fetch_register (int regno
)
174 /* This isn't really an address. But ptrace thinks of it as one. */
176 char mess
[128]; /* For messages */
178 unsigned int offset
; /* Offset of registers within the u area. */
179 char buf
[MAX_REGISTER_RAW_SIZE
];
182 if (OLD_CANNOT_FETCH_REGISTER (regno
))
184 memset (buf
, '\0', REGISTER_RAW_SIZE (regno
)); /* Supply zeroes */
185 supply_register (regno
, buf
);
189 /* Overload thread id onto process id */
190 if ((tid
= TIDGET (inferior_ptid
)) == 0)
191 tid
= PIDGET (inferior_ptid
); /* no thread id, just use process id */
193 offset
= U_REGS_OFFSET
;
195 regaddr
= register_addr (regno
, offset
);
196 for (i
= 0; i
< REGISTER_RAW_SIZE (regno
); i
+= sizeof (PTRACE_XFER_TYPE
))
199 *(PTRACE_XFER_TYPE
*) & buf
[i
] = ptrace (PT_READ_U
, tid
,
200 (PTRACE_ARG3_TYPE
) regaddr
, 0);
201 regaddr
+= sizeof (PTRACE_XFER_TYPE
);
204 sprintf (mess
, "reading register %s (#%d)",
205 REGISTER_NAME (regno
), regno
);
206 perror_with_name (mess
);
209 supply_register (regno
, buf
);
212 /* Fetch register values from the inferior.
213 If REGNO is negative, do this for all registers.
214 Otherwise, REGNO specifies which register (so we can save time). */
217 old_fetch_inferior_registers (int regno
)
221 fetch_register (regno
);
225 for (regno
= 0; regno
< NUM_REGS
; regno
++)
227 fetch_register (regno
);
232 /* Registers we shouldn't try to store. */
233 #define OLD_CANNOT_STORE_REGISTER(regno) ((regno) >= NUM_GREGS)
235 /* Store one register. */
238 store_register (int regno
)
240 /* This isn't really an address. But ptrace thinks of it as one. */
242 char mess
[128]; /* For messages */
244 unsigned int offset
; /* Offset of registers within the u area. */
247 if (OLD_CANNOT_STORE_REGISTER (regno
))
252 /* Overload thread id onto process id */
253 if ((tid
= TIDGET (inferior_ptid
)) == 0)
254 tid
= PIDGET (inferior_ptid
); /* no thread id, just use process id */
256 offset
= U_REGS_OFFSET
;
258 regaddr
= register_addr (regno
, offset
);
259 for (i
= 0; i
< REGISTER_RAW_SIZE (regno
); i
+= sizeof (PTRACE_XFER_TYPE
))
262 ptrace (PT_WRITE_U
, tid
, (PTRACE_ARG3_TYPE
) regaddr
,
263 *(PTRACE_XFER_TYPE
*) & registers
[REGISTER_BYTE (regno
) + i
]);
264 regaddr
+= sizeof (PTRACE_XFER_TYPE
);
267 sprintf (mess
, "writing register %s (#%d)",
268 REGISTER_NAME (regno
), regno
);
269 perror_with_name (mess
);
274 /* Store our register values back into the inferior.
275 If REGNO is negative, do this for all registers.
276 Otherwise, REGNO specifies which register (so we can save time). */
279 old_store_inferior_registers (int regno
)
283 store_register (regno
);
287 for (regno
= 0; regno
< NUM_REGS
; regno
++)
289 store_register (regno
);
295 /* Transfering the general-purpose registers between GDB, inferiors
298 /* Fill GDB's register array with the general-purpose register values
302 supply_gregset (elf_gregset_t
*gregsetp
)
304 elf_greg_t
*regp
= (elf_greg_t
*) gregsetp
;
307 for (i
= 0; i
< NUM_GREGS
; i
++)
308 supply_register (i
, (char *) (regp
+ regmap
[i
]));
311 /* Fill register REGNO (if it is a general-purpose register) in
312 *GREGSETPS with the value in GDB's register array. If REGNO is -1,
313 do this for all registers. */
316 fill_gregset (elf_gregset_t
*gregsetp
, int regno
)
318 elf_greg_t
*regp
= (elf_greg_t
*) gregsetp
;
321 for (i
= 0; i
< NUM_GREGS
; i
++)
322 if ((regno
== -1 || regno
== i
))
323 *(regp
+ regmap
[i
]) = *(elf_greg_t
*) ®isters
[REGISTER_BYTE (i
)];
326 #ifdef HAVE_PTRACE_GETREGS
328 /* Fetch all general-purpose registers from process/thread TID and
329 store their values in GDB's register array. */
336 if (ptrace (PTRACE_GETREGS
, tid
, 0, (int) ®s
) < 0)
340 /* The kernel we're running on doesn't support the GETREGS
341 request. Reset `have_ptrace_getregs'. */
342 have_ptrace_getregs
= 0;
346 perror_with_name ("Couldn't get registers");
349 supply_gregset (®s
);
352 /* Store all valid general-purpose registers in GDB's register array
353 into the process/thread specified by TID. */
356 store_regs (int tid
, int regno
)
360 if (ptrace (PTRACE_GETREGS
, tid
, 0, (int) ®s
) < 0)
361 perror_with_name ("Couldn't get registers");
363 fill_gregset (®s
, regno
);
365 if (ptrace (PTRACE_SETREGS
, tid
, 0, (int) ®s
) < 0)
366 perror_with_name ("Couldn't write registers");
371 static void fetch_regs (int tid
) {}
372 static void store_regs (int tid
, int regno
) {}
377 /* Transfering floating-point registers between GDB, inferiors and cores. */
379 /* Fill GDB's register array with the floating-point register values in
383 supply_fpregset (elf_fpregset_t
*fpregsetp
)
385 i387_supply_fsave ((char *) fpregsetp
);
389 /* Fill register REGNO (if it is a floating-point register) in
390 *FPREGSETP with the value in GDB's register array. If REGNO is -1,
391 do this for all registers. */
394 fill_fpregset (elf_fpregset_t
*fpregsetp
, int regno
)
396 i387_fill_fsave ((char *) fpregsetp
, regno
);
399 #ifdef HAVE_PTRACE_GETREGS
401 /* Fetch all floating-point registers from process/thread TID and store
402 thier values in GDB's register array. */
405 fetch_fpregs (int tid
)
407 elf_fpregset_t fpregs
;
409 if (ptrace (PTRACE_GETFPREGS
, tid
, 0, (int) &fpregs
) < 0)
410 perror_with_name ("Couldn't get floating point status");
412 supply_fpregset (&fpregs
);
415 /* Store all valid floating-point registers in GDB's register array
416 into the process/thread specified by TID. */
419 store_fpregs (int tid
, int regno
)
421 elf_fpregset_t fpregs
;
423 if (ptrace (PTRACE_GETFPREGS
, tid
, 0, (int) &fpregs
) < 0)
424 perror_with_name ("Couldn't get floating point status");
426 fill_fpregset (&fpregs
, regno
);
428 if (ptrace (PTRACE_SETFPREGS
, tid
, 0, (int) &fpregs
) < 0)
429 perror_with_name ("Couldn't write floating point status");
434 static void fetch_fpregs (int tid
) {}
435 static void store_fpregs (int tid
, int regno
) {}
440 /* Transfering floating-point and SSE registers to and from GDB. */
442 #ifdef HAVE_PTRACE_GETFPXREGS
444 /* Fill GDB's register array with the floating-point and SSE register
445 values in *FPXREGSETP. */
448 supply_fpxregset (elf_fpxregset_t
*fpxregsetp
)
450 i387_supply_fxsave ((char *) fpxregsetp
);
453 /* Fill register REGNO (if it is a floating-point or SSE register) in
454 *FPXREGSETP with the value in GDB's register array. If REGNO is
455 -1, do this for all registers. */
458 fill_fpxregset (elf_fpxregset_t
*fpxregsetp
, int regno
)
460 i387_fill_fxsave ((char *) fpxregsetp
, regno
);
463 /* Fetch all registers covered by the PTRACE_GETFPXREGS request from
464 process/thread TID and store their values in GDB's register array.
465 Return non-zero if successful, zero otherwise. */
468 fetch_fpxregs (int tid
)
470 elf_fpxregset_t fpxregs
;
472 if (! have_ptrace_getfpxregs
)
475 if (ptrace (PTRACE_GETFPXREGS
, tid
, 0, (int) &fpxregs
) < 0)
479 have_ptrace_getfpxregs
= 0;
483 perror_with_name ("Couldn't read floating-point and SSE registers");
486 supply_fpxregset (&fpxregs
);
490 /* Store all valid registers in GDB's register array covered by the
491 PTRACE_SETFPXREGS request into the process/thread specified by TID.
492 Return non-zero if successful, zero otherwise. */
495 store_fpxregs (int tid
, int regno
)
497 elf_fpxregset_t fpxregs
;
499 if (! have_ptrace_getfpxregs
)
502 if (ptrace (PTRACE_GETFPXREGS
, tid
, 0, &fpxregs
) == -1)
506 have_ptrace_getfpxregs
= 0;
510 perror_with_name ("Couldn't read floating-point and SSE registers");
513 fill_fpxregset (&fpxregs
, regno
);
515 if (ptrace (PTRACE_SETFPXREGS
, tid
, 0, &fpxregs
) == -1)
516 perror_with_name ("Couldn't write floating-point and SSE registers");
521 /* Fill the XMM registers in the register array with dummy values. For
522 cases where we don't have access to the XMM registers. I think
523 this is cleaner than printing a warning. For a cleaner solution,
524 we should gdbarchify the i386 family. */
527 dummy_sse_values (void)
529 /* C doesn't have a syntax for NaN's, so write it out as an array of
531 static long dummy
[4] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff };
532 static long mxcsr
= 0x1f80;
535 for (reg
= 0; reg
< 8; reg
++)
536 supply_register (XMM0_REGNUM
+ reg
, (char *) dummy
);
537 supply_register (MXCSR_REGNUM
, (char *) &mxcsr
);
542 static int fetch_fpxregs (int tid
) { return 0; }
543 static int store_fpxregs (int tid
, int regno
) { return 0; }
544 static void dummy_sse_values (void) {}
546 #endif /* HAVE_PTRACE_GETFPXREGS */
549 /* Transferring arbitrary registers between GDB and inferior. */
551 /* Check if register REGNO in the child process is accessible.
552 If we are accessing registers directly via the U area, only the
553 general-purpose registers are available.
554 All registers should be accessible if we have GETREGS support. */
557 cannot_fetch_register (int regno
)
559 if (! have_ptrace_getregs
)
560 return OLD_CANNOT_FETCH_REGISTER (regno
);
564 cannot_store_register (int regno
)
566 if (! have_ptrace_getregs
)
567 return OLD_CANNOT_STORE_REGISTER (regno
);
571 /* Fetch register REGNO from the child process. If REGNO is -1, do
572 this for all registers (including the floating point and SSE
576 fetch_inferior_registers (int regno
)
580 /* Use the old method of peeking around in `struct user' if the
581 GETREGS request isn't available. */
582 if (! have_ptrace_getregs
)
584 old_fetch_inferior_registers (regno
);
588 /* Linux LWP ID's are process ID's. */
589 if ((tid
= TIDGET (inferior_ptid
)) == 0)
590 tid
= PIDGET (inferior_ptid
); /* Not a threaded program. */
592 /* Use the PTRACE_GETFPXREGS request whenever possible, since it
593 transfers more registers in one system call, and we'll cache the
594 results. But remember that fetch_fpxregs can fail, and return
600 /* The call above might reset `have_ptrace_getregs'. */
601 if (! have_ptrace_getregs
)
603 old_fetch_inferior_registers (-1);
607 if (fetch_fpxregs (tid
))
613 if (GETREGS_SUPPLIES (regno
))
619 if (GETFPXREGS_SUPPLIES (regno
))
621 if (fetch_fpxregs (tid
))
624 /* Either our processor or our kernel doesn't support the SSE
625 registers, so read the FP registers in the traditional way,
626 and fill the SSE registers with dummy values. It would be
627 more graceful to handle differences in the register set using
628 gdbarch. Until then, this will at least make things work
634 internal_error (__FILE__
, __LINE__
,
635 "Got request for bad register number %d.", regno
);
638 /* Store register REGNO back into the child process. If REGNO is -1,
639 do this for all registers (including the floating point and SSE
642 store_inferior_registers (int regno
)
646 /* Use the old method of poking around in `struct user' if the
647 SETREGS request isn't available. */
648 if (! have_ptrace_getregs
)
650 old_store_inferior_registers (regno
);
654 /* Linux LWP ID's are process ID's. */
655 if ((tid
= TIDGET (inferior_ptid
)) == 0)
656 tid
= PIDGET (inferior_ptid
); /* Not a threaded program. */
658 /* Use the PTRACE_SETFPXREGS requests whenever possible, since it
659 transfers more registers in one system call. But remember that
660 store_fpxregs can fail, and return zero. */
663 store_regs (tid
, regno
);
664 if (store_fpxregs (tid
, regno
))
666 store_fpregs (tid
, regno
);
670 if (GETREGS_SUPPLIES (regno
))
672 store_regs (tid
, regno
);
676 if (GETFPXREGS_SUPPLIES (regno
))
678 if (store_fpxregs (tid
, regno
))
681 /* Either our processor or our kernel doesn't support the SSE
682 registers, so just write the FP registers in the traditional
684 store_fpregs (tid
, regno
);
688 internal_error (__FILE__
, __LINE__
,
689 "Got request to store bad register number %d.", regno
);
694 i386_linux_dr_get (int regnum
)
699 /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
700 multi-threaded processes here. For now, pretend there is just
702 tid
= PIDGET (inferior_ptid
);
704 /* FIXME: kettenis/2001-03-27: Calling perror_with_name if the
705 ptrace call fails breaks debugging remote targets. The correct
706 way to fix this is to add the hardware breakpoint and watchpoint
707 stuff to the target vectore. For now, just return zero if the
708 ptrace call fails. */
710 value
= ptrace (PT_READ_U
, tid
,
711 offsetof (struct user
, u_debugreg
[regnum
]), 0);
714 perror_with_name ("Couldn't read debug register");
723 i386_linux_dr_set (int regnum
, unsigned long value
)
727 /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
728 multi-threaded processes here. For now, pretend there is just
730 tid
= PIDGET (inferior_ptid
);
733 ptrace (PT_WRITE_U
, tid
,
734 offsetof (struct user
, u_debugreg
[regnum
]), value
);
736 perror_with_name ("Couldn't write debug register");
740 i386_linux_dr_set_control (unsigned long control
)
742 i386_linux_dr_set (DR_CONTROL
, control
);
746 i386_linux_dr_set_addr (int regnum
, CORE_ADDR addr
)
748 gdb_assert (regnum
>= 0 && regnum
<= DR_LASTADDR
- DR_FIRSTADDR
);
750 i386_linux_dr_set (DR_FIRSTADDR
+ regnum
, addr
);
754 i386_linux_dr_reset_addr (int regnum
)
756 gdb_assert (regnum
>= 0 && regnum
<= DR_LASTADDR
- DR_FIRSTADDR
);
758 i386_linux_dr_set (DR_FIRSTADDR
+ regnum
, 0L);
762 i386_linux_dr_get_status (void)
764 return i386_linux_dr_get (DR_STATUS
);
768 /* Interpreting register set info found in core files. */
770 /* Provide registers to GDB from a core file.
772 (We can't use the generic version of this function in
773 core-regset.c, because Linux has *three* different kinds of
774 register set notes. core-regset.c would have to call
775 supply_fpxregset, which most platforms don't have.)
777 CORE_REG_SECT points to an array of bytes, which are the contents
778 of a `note' from a core file which BFD thinks might contain
779 register contents. CORE_REG_SIZE is its size.
781 WHICH says which register set corelow suspects this is:
782 0 --- the general-purpose register set, in elf_gregset_t format
783 2 --- the floating-point register set, in elf_fpregset_t format
784 3 --- the extended floating-point register set, in elf_fpxregset_t format
786 REG_ADDR isn't used on Linux. */
789 fetch_core_registers (char *core_reg_sect
, unsigned core_reg_size
,
790 int which
, CORE_ADDR reg_addr
)
792 elf_gregset_t gregset
;
793 elf_fpregset_t fpregset
;
798 if (core_reg_size
!= sizeof (gregset
))
799 warning ("Wrong size gregset in core file.");
802 memcpy (&gregset
, core_reg_sect
, sizeof (gregset
));
803 supply_gregset (&gregset
);
808 if (core_reg_size
!= sizeof (fpregset
))
809 warning ("Wrong size fpregset in core file.");
812 memcpy (&fpregset
, core_reg_sect
, sizeof (fpregset
));
813 supply_fpregset (&fpregset
);
817 #ifdef HAVE_PTRACE_GETFPXREGS
819 elf_fpxregset_t fpxregset
;
822 if (core_reg_size
!= sizeof (fpxregset
))
823 warning ("Wrong size fpxregset in core file.");
826 memcpy (&fpxregset
, core_reg_sect
, sizeof (fpxregset
));
827 supply_fpxregset (&fpxregset
);
834 /* We've covered all the kinds of registers we know about here,
835 so this must be something we wouldn't know what to do with
836 anyway. Just ignore it. */
842 /* The instruction for a Linux system call is:
846 static const unsigned char linux_syscall
[] = { 0xcd, 0x80 };
848 #define LINUX_SYSCALL_LEN (sizeof linux_syscall)
850 /* The system call number is stored in the %eax register. */
851 #define LINUX_SYSCALL_REGNUM 0 /* %eax */
853 /* We are specifically interested in the sigreturn and rt_sigreturn
856 #ifndef SYS_sigreturn
857 #define SYS_sigreturn 0x77
859 #ifndef SYS_rt_sigreturn
860 #define SYS_rt_sigreturn 0xad
863 /* Offset to saved processor flags, from <asm/sigcontext.h>. */
864 #define LINUX_SIGCONTEXT_EFLAGS_OFFSET (64)
866 /* Resume execution of the inferior process.
867 If STEP is nonzero, single-step it.
868 If SIGNAL is nonzero, give it that signal. */
871 child_resume (ptid_t ptid
, int step
, enum target_signal signal
)
873 int pid
= PIDGET (ptid
);
875 int request
= PTRACE_CONT
;
878 /* Resume all threads. */
879 /* I think this only gets used in the non-threaded case, where "resume
880 all threads" and "resume inferior_ptid" are the same. */
881 pid
= PIDGET (inferior_ptid
);
885 CORE_ADDR pc
= read_pc_pid (pid_to_ptid (pid
));
886 unsigned char buf
[LINUX_SYSCALL_LEN
];
888 request
= PTRACE_SINGLESTEP
;
890 /* Returning from a signal trampoline is done by calling a
891 special system call (sigreturn or rt_sigreturn, see
892 i386-linux-tdep.c for more information). This system call
893 restores the registers that were saved when the signal was
894 raised, including %eflags. That means that single-stepping
895 won't work. Instead, we'll have to modify the signal context
896 that's about to be restored, and set the trace flag there. */
898 /* First check if PC is at a system call. */
899 if (read_memory_nobpt (pc
, (char *) buf
, LINUX_SYSCALL_LEN
) == 0
900 && memcmp (buf
, linux_syscall
, LINUX_SYSCALL_LEN
) == 0)
902 int syscall
= read_register_pid (LINUX_SYSCALL_REGNUM
,
905 /* Then check the system call number. */
906 if (syscall
== SYS_sigreturn
|| syscall
== SYS_rt_sigreturn
)
908 CORE_ADDR sp
= read_register (SP_REGNUM
);
910 unsigned long int eflags
;
912 if (syscall
== SYS_rt_sigreturn
)
913 addr
= read_memory_integer (sp
+ 8, 4) + 20;
915 /* Set the trace flag in the context that's about to be
917 addr
+= LINUX_SIGCONTEXT_EFLAGS_OFFSET
;
918 read_memory (addr
, (char *) &eflags
, 4);
920 write_memory (addr
, (char *) &eflags
, 4);
925 if (ptrace (request
, pid
, 0, target_signal_to_host (signal
)) == -1)
926 perror_with_name ("ptrace");
930 /* Register that we are able to handle Linux ELF core file formats. */
932 static struct core_fns linux_elf_core_fns
=
934 bfd_target_elf_flavour
, /* core_flavour */
935 default_check_format
, /* check_format */
936 default_core_sniffer
, /* core_sniffer */
937 fetch_core_registers
, /* core_read_registers */
942 _initialize_i386_linux_nat (void)
944 add_core_fns (&linux_elf_core_fns
);