- kernel core debugging for i386 (Mark Peek)
- thread debugging for i386 (Mark Peek) and alpha (Doug Rabson) Submitted by: mp,dfr
This commit is contained in:
parent
ff6bc74c1f
commit
5916819790
@ -18,12 +18,18 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* $FreeBSD$ */
|
||||
|
||||
#ifndef TM_FBSD_H
|
||||
#define TM_FBSD_H
|
||||
|
||||
#define HAVE_I387_REGS
|
||||
#include "i386/tm-i386.h"
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
/* FreeBSD/ELF uses stabs-in-ELF with the DWARF register numbering
|
||||
scheme by default, so we must redefine STAB_REG_TO_REGNUM. This
|
||||
messes up the floating-point registers for a.out, but there is not
|
||||
@ -41,38 +47,42 @@
|
||||
/* Support for longjmp. */
|
||||
|
||||
/* Details about jmp_buf. It's supposed to be an array of integers. */
|
||||
|
||||
#define JB_ELEMENT_SIZE 4 /* Size of elements in jmp_buf. */
|
||||
#define JB_PC 0 /* Array index of saved PC. */
|
||||
|
||||
/* Figure out where the longjmp will land. Store the address that
|
||||
longjmp will jump to in *ADDR, and return non-zero if successful. */
|
||||
|
||||
#define GET_LONGJMP_TARGET(addr) get_longjmp_target (addr)
|
||||
extern int get_longjmp_target (CORE_ADDR *addr);
|
||||
|
||||
|
||||
/* Support for signal handlers. */
|
||||
/* On FreeBSD, sigtramp has size 0x18 and is immediately below the
|
||||
ps_strings struct which has size 0x10 and is at the top of the
|
||||
user stack. */
|
||||
|
||||
#define IN_SIGTRAMP(pc, name) i386bsd_in_sigtramp (pc, name)
|
||||
extern int i386bsd_in_sigtramp (CORE_ADDR pc, char *name);
|
||||
#undef SIGTRAMP_START
|
||||
#undef SIGTRAMP_END
|
||||
#define SIGTRAMP_START(pc) 0xbfbfdfd8
|
||||
#define SIGTRAMP_END(pc) 0xbfbfdff0
|
||||
|
||||
/* These defines allow the recognition of sigtramps as a function name
|
||||
<sigtramp>.
|
||||
|
||||
FIXME: kettenis/2001-07-13: These should be added to the target
|
||||
vector and turned into functions when we go "multi-arch". */
|
||||
|
||||
#define SIGTRAMP_START(pc) i386bsd_sigtramp_start
|
||||
#define SIGTRAMP_END(pc) i386bsd_sigtramp_end
|
||||
extern CORE_ADDR i386bsd_sigtramp_start;
|
||||
extern CORE_ADDR i386bsd_sigtramp_end;
|
||||
extern CORE_ADDR fbsd_kern_frame_saved_pc(struct frame_info *fr);
|
||||
|
||||
/* Override FRAME_SAVED_PC to enable the recognition of signal handlers. */
|
||||
|
||||
#undef FRAME_SAVED_PC
|
||||
#define FRAME_SAVED_PC(frame) i386bsd_frame_saved_pc (frame)
|
||||
extern CORE_ADDR i386bsd_frame_saved_pc (struct frame_info *frame);
|
||||
#if __FreeBSD_version >= 500032
|
||||
#define FRAME_SAVED_PC(FRAME) \
|
||||
(kernel_debugging ? fbsd_kern_frame_saved_pc(FRAME) : \
|
||||
(((FRAME)->signal_handler_caller \
|
||||
? sigtramp_saved_pc (FRAME) \
|
||||
: read_memory_integer ((FRAME)->frame + 4, 4)) \
|
||||
))
|
||||
#else
|
||||
#define FRAME_SAVED_PC(FRAME) \
|
||||
(((FRAME)->signal_handler_caller \
|
||||
? sigtramp_saved_pc (FRAME) \
|
||||
: read_memory_integer ((FRAME)->frame + 4, 4)) \
|
||||
)
|
||||
#endif
|
||||
|
||||
/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
|
||||
#define SIGCONTEXT_PC_OFFSET 20
|
||||
|
||||
|
||||
/* Shared library support. */
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user