Commit Graph

27 Commits

Author SHA1 Message Date
John Baldwin
624e4d168d - Add a global variable 'fbsdcoreops_suppress_target' that can be set to
force the FreeBSD multithreaded core target to not register any target
  for handling core dumps.  This is analogous to the
  'coreops_suppress_target' variable that GDB provides for suppressing the
  default core dump target.  KGDB will use this new variable so it can
  provide its own core dump target that uses libkvm to work with vmcore
  files.
- Adjust the long name and documentation of the FreeBSD multithreaded core
  dump target so it better matches what GDB's core dump target uses.

MFC after:	1 week
Reviewed by:	davidxu, marcel
2008-04-29 17:47:25 +00:00
Ed Maste
5a16cfaeb6 Avoid writing uninitialized stack data into a thread's MMX/SSE state by
first getting the current state with td_thr_getxmmregs_p.  Without this,
debugging a threaded app that uses libthr resulted in kernel panics or
spurious SIGFPEs for me.

(As of revision 1.6, sys/i386/i386/ptrace_machdep.c masks off the
reserved bits in the mxcsr register, which prevents the kernel panics.)

Architectures without PT_GETXMMREGS are not affected.

MFC after:      1 week
2007-02-20 18:10:13 +00:00
Ruslan Ermilov
ea59cd4167 Clean the product of patch(1). 2006-04-10 09:00:19 +00:00
David Xu
d56a014b6e Introduce a new proc service routine ps_linfo() to get LWP info. 2006-02-07 02:29:55 +00:00
David Xu
9224f6b811 1. Eliminate compile warnings.
2. Add command 'thread signal' to print out current thread's signal mask
   and pending signals.
2006-02-06 06:07:56 +00:00
Marcel Moolenaar
c67d07416a Add a kluge to allow kgdb(1) to inject its own frame sniffer in the
list of frame sniffers so that trapframes can be detected. The kluge
is needed because this version of gdb only supports appending a
sniffer to the list of sniffers and the moment kgdb gets a chance to
add its own frame sniffer, the target's default frame sniffer is
already in the list. Since the default frame sniffer claims any
frame thrown at it, kgdb's frame sniffer never gets to smell (a
process much akin to tasting, but with lesser chance of hurling :-)

This commit adds dummy frame sniffers that never claim a frame and
as such don't fix anything yet. However, we now have frame sniffers
and they are being called, so it's just a matter of adding meat to
the bones and we'll be able to properly unwind across trapframes.

MFC after: 1 week
2005-09-10 18:25:53 +00:00
Doug Rabson
8d7681bb7f Add support for XMM registers in GDB for x86 processors that support
SSE (or its successors).

Reviewed by: marcel, davidxu
MFC After: 2 weeks
2005-05-31 09:43:04 +00:00
David Xu
e8595f94cd Don't try to enable event reporting for core file, it is not writable. 2005-05-06 11:01:15 +00:00
David Xu
e6e653cd66 Report events from thread library. 2005-04-12 03:04:04 +00:00
David Xu
0d6c666e74 Print thread address.
PR: threads/76821
2005-04-05 11:40:58 +00:00
David E. O'Brien
01950bb64f Use the system gnuregex library vs. building GNU regex bits into libiberty
and using them.

Reviewed by:	marcel,imp
Desired by:	ache
2005-02-14 12:10:14 +00:00
Peter Edwards
ad93bc4a36 When grabbing registers for an lwp, fake the inferior's pid using the
lwp ID before invoking the underlying target operation.

For corefiles, we rely on gdb internals to do this, and it uses the
pid as an index, rather than the lwpid, so previously, backtraces
for multithreaded core files wasn't working correctly. For processes,
we currently use ptrace directly, so fixup that code to also use
the pid directly.

Discussed With: marcel, davidxu
MFC After: 4 days
2005-01-11 14:53:16 +00:00
Marcel Moolenaar
6add7f75e4 Source changes to allow building a cross-debugger. Move solib.c and
solib-svr4.c to the MD makefiles because they are native files for
alpha and sparc64, but target files for amd64, i386 and ia64.

Note that kgdb(1) does not yet build as a cross-debugger due to
libkvm.
2004-12-05 06:59:01 +00:00
Marcel Moolenaar
3edecb0846 Fix previous commit. GDB_CROSS_DEBUGGER needs to be defined for all
subdirectories.
2004-12-05 04:08:22 +00:00
Marcel Moolenaar
20a9661305 Makefile (only) changes to allow building a cross debugger. 2004-11-30 05:12:37 +00:00
David Xu
ba4030c7ad Always set current thread when activating thread debugger,
the current thread may already be added by fbsd_find_new_threads,
this can result that current thread is not set correctly.
2004-11-15 13:06:01 +00:00
Marcel Moolenaar
8170ab332c Prepare for a subsequent import: If the first letter of the filename
changes, start on a new line. Insertion of a filename will keep the
diff limited to the block of filenames that have the same first letter
instead of creating a huge diff. While here, move remote.c after the
remote-*.c files and move tui.c after the tui-*.c files. This matches
the order of ls(1) and makes it easier to compare object files created
by a stock gdb(1) build with the list of files we have here.

This is a non-functional change only.
2004-11-09 06:02:48 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
David Xu
a1ad8d2ae7 Only compile fbsd-thread.c on amd64 and i386, other architectures
have not been tested yet.
2004-08-22 10:59:33 +00:00
David Xu
44f53819a6 Fix comments, most are style fix. 2004-08-22 09:05:57 +00:00
David Xu
386c57b571 Fix some text messages. 2004-08-22 08:48:56 +00:00
David Xu
97dc8984f9 Add code to support statically linked binary and .core file of threaded
program.
2004-08-22 05:53:38 +00:00
David Xu
d771a99114 1. Add some code check if thread suspending or resuming is failed.
2. Add code to retrieve thread tls address.
2004-08-08 22:45:36 +00:00
Marcel Moolenaar
6ec5fc1963 o ps_pd{read|write} and ps_pt{read|write} are obsolete interface
functions. Only ps_p{read|write} remains.
o  Remove ps_getpid. We don't need it now.
2004-07-17 17:08:13 +00:00
David Xu
794adb75ee ptrace's first parameter is command not pid. pointy hat to me. 2004-07-16 06:11:48 +00:00
David Xu
2136835712 Add libthread_db assisted debugging support module. 2004-07-15 04:51:04 +00:00
Marcel Moolenaar
a855a971e8 Add bmake glue for gdb 6.1.1. Supports alpha, amd64, i386, ia64
and sparc64.

Note that the debugger doesn't support threading, nor kernel
debugging yet.
2004-06-25 06:48:54 +00:00