Add support for debugging programs using libc_r's implementation of

pthreads.
This commit is contained in:
Doug Rabson 2000-04-29 09:03:49 +00:00
parent 621372ff84
commit a052d1ca88
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59740
5 changed files with 1160 additions and 28 deletions

View file

@ -8,20 +8,20 @@ PROG= gdb
XSRCS= annotate.c ax-general.c ax-gdb.c bcache.c blockframe.c \
breakpoint.c buildsym.c c-exp.y c-lang.c c-typeprint.c \
c-valprint.c ch-exp.c ch-lang.c ch-typeprint.c ch-valprint.c \
coffread.c command.c complaints.c copying.c corefile.c \
corelow.c core-regset.c cp-valprint.c dcache.c dbxread.c demangle.c \
dwarfread.c dwarf2read.c elfread.c environ.c eval.c exec.c \
expprint.c f-exp.y f-lang.c f-typeprint.c f-valprint.c \
findvar.c fork-child.c gdbarch.c gdbtypes.c infcmd.c inflow.c \
infptrace.c infrun.c inftarg.c language.c jv-exp.y jv-lang.c \
jv-valprint.c jv-typeprint.c nlmread.c m2-lang.c m2-exp.y \
m2-typeprint.c m2-valprint.c main.c maint.c mdebugread.c \
mem-break.c minsyms.c objfiles.c parse.c printcmd.c remote.c \
remote-utils.c scm-exp.c scm-lang.c scm-valprint.c solib.c \
source.c stabsread.c stack.c symfile.c symmisc.c symtab.c \
target.c thread.c top.c tracepoint.c typeprint.c utils.c \
valarith.c valops.c valprint.c values.c version.c serial.c \
ser-unix.c ser-tcp.c callback.c
coffread.c command.c complaints.c copying.c core-regset.c \
corefile.c corelow.c cp-valprint.c dcache.c dbxread.c \
demangle.c dwarfread.c dwarf2read.c elfread.c environ.c eval.c \
exec.c expprint.c f-exp.y f-lang.c f-typeprint.c f-valprint.c \
findvar.c fork-child.c freebsd-uthread.c gdbarch.c gdbtypes.c \
infcmd.c inflow.c infptrace.c infrun.c inftarg.c language.c \
jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c nlmread.c \
m2-lang.c m2-exp.y m2-typeprint.c m2-valprint.c main.c maint.c \
mdebugread.c mem-break.c minsyms.c objfiles.c parse.c \
printcmd.c remote.c remote-utils.c scm-exp.c scm-lang.c \
scm-valprint.c solib.c source.c stabsread.c stack.c symfile.c \
symmisc.c symtab.c target.c thread.c top.c tracepoint.c \
typeprint.c utils.c valarith.c valops.c valprint.c values.c \
version.c serial.c ser-unix.c ser-tcp.c callback.c
SRCS= init.c ${XSRCS}
.if exists(${.CURDIR}/Makefile.${MACHINE_ARCH})

View file

@ -1,3 +1,4 @@
/* $FreeBSD$ */
/* Definitions to make GDB run on an Alpha box under FreeBSD. The
definitions here are used when the _target_ system is running Linux.
Copyright 1996 Free Software Foundation, Inc.
@ -34,4 +35,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef START_INFERIOR_TRAPS_EXPECTED
#define START_INFERIOR_TRAPS_EXPECTED 2
struct objfile;
void freebsd_uthread_new_objfile PARAMS ((struct objfile *objfile));
#define target_new_objfile(OBJFILE) freebsd_uthread_new_objfile (OBJFILE)
extern char *freebsd_uthread_pid_to_str PARAMS ((int pid));
#define target_pid_to_str(PID) freebsd_uthread_pid_to_str (PID)
#endif /* TM_FREEBSDALPHA_H */

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,4 @@
/* $FreeBSD$ */
/* Native-dependent code for BSD Unix running on i386's, for GDB.
Copyright 1988, 1989, 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
@ -345,20 +346,9 @@ i386_float_info ()
uaddr = (char *)&U_FPSTATE(u) - (char *)&u;
if (inferior_pid != 0 && core_bfd == NULL)
{
int *ip;
rounded_addr = uaddr & -sizeof (int);
rounded_size = (((uaddr + sizeof (struct fpstate)) - uaddr) +
sizeof (int) - 1) / sizeof (int);
skip = uaddr - rounded_addr;
ip = (int *)buf;
for (i = 0; i < rounded_size; i++)
{
*ip++ = ptrace (PT_READ_U, inferior_pid, (caddr_t)rounded_addr, 0);
rounded_addr += sizeof (int);
}
fpstatep = (struct fpstate *)(buf + skip);
int pid = inferior_pid & ((1 << 17) - 1); /* XXX extract pid from tid */
ptrace(PT_GETFPREGS, pid, &buf[0], sizeof(struct fpreg));
fpstatep = (struct fpstate *)&buf[0];
}
else
fpstatep = &pcb_savefpu;

View file

@ -1,3 +1,4 @@
/* $FreeBSD$ */
/* Target macro definitions for i386 running FreeBSD
Copyright (C) 1997 Free Software Foundation, Inc.
@ -55,4 +56,11 @@ extern CORE_ADDR fbsd_kern_frame_saved_pc (struct frame_info *);
#define SIGTRAMP_START(pc) 0xbfbfdfd8
#define SIGTRAMP_END(pc) 0xbfbfdff0
struct objfile;
void freebsd_uthread_new_objfile PARAMS ((struct objfile *objfile));
#define target_new_objfile(OBJFILE) freebsd_uthread_new_objfile (OBJFILE)
extern char *freebsd_uthread_pid_to_str PARAMS ((int pid));
#define target_pid_to_str(PID) freebsd_uthread_pid_to_str (PID)
#endif /* ifndef TM_FBSD_H */