Commit Graph

3667 Commits

Author SHA1 Message Date
John Baldwin
4d6cae0d4d If the quiet flag is specified (-q), don't dump the unread portion of
the message buffer on startup.
2008-01-28 20:31:30 +00:00
John Baldwin
4496b3577d Move the code for working with kld's out into its own file. 2008-01-24 19:11:13 +00:00
Ruslan Ermilov
c4579b502b Remove one more alpha leftover. 2008-01-24 07:43:09 +00:00
Ed Maste
b2f965152c Include the thread name (in addition to the proc name) in "info threads." 2008-01-18 18:57:27 +00:00
John Baldwin
933785a027 Add a new 'add-kld <kld>' command to kgdb to make it easier to analyze
crash dumps with kernel modules.  The command is basically a wrapper
around add-symbol-file except that it uses the kernel linker data
structures and the ELF section headers of the kld to calculate the
section addresses add-symbol-file needs.

The 'kld' parameter may either be an absolute path or a relative path.
kgdb looks for the kld in several locations checking for variants with
".symbols" or ".debug" suffixes in each location.  The first location it
tries is just opening the specified path (this handles absolute paths and
looks for the kld relative to the current directory otherwise).  Next
it tries to find the module in the same directory of the kernel image
being used.  If that fails it extracts the kern.module_path from the
kernel being debugged and looks in each of those paths.

The upshot is that for the common cases of debugging /boot/kernel/kernel
where the module is in either /boot/kernel or /boot/modules one can merely
do 'add-kld foo.ko'.

MFC after:	1 week
2008-01-17 21:43:12 +00:00
David E. O'Brien
d74c91c758 Use a phony .POSIX target. This seems to be the way to
turn off the stuff in src/usr.bin/make/main.c rev 1.161.
2008-01-16 17:16:36 +00:00
David E. O'Brien
6949c01e6b Use our standard verbose spelling of rules variables.
(as a nice side affect, this will make gnu/usr.bin/cvs/contrib/Makefile
have a later date than contrib/cvs/contrib/Makefile.in - which will help
the build break after the 1.11.22 CVS import...)
2008-01-13 09:45:53 +00:00
David E. O'Brien
8b7d87e7fb Disable contrib - there is weirdness going on with it. 2008-01-13 08:58:25 +00:00
David E. O'Brien
2a670e33ba Reenable cvs with the build. 2008-01-13 06:56:31 +00:00
David E. O'Brien
946debc579 Disable CVS from the build. 2008-01-13 05:49:03 +00:00
Joseph Koshy
9be5e0002a Tweak -lpmc's name. 2007-11-27 10:00:33 +00:00
Ken Smith
c0bb7d9461 While checking over the libraries for 7.0-REL Kris found the following
libraries had not had their versions bumped relative to 6.3-REL but
had indeed been changed.  We need to bump their version so they can be
properly added to the compat6x port:

	libasn1.so.8 libgssapi.so.8 libhdb.so.8 libkadm5clnt.so.8
	libkadm5srv.so.8 libkafs5.so.8 libkrb5.so.8 libobjc.so.2

MFC After:	1 day
2007-11-20 04:20:32 +00:00
Andrey A. Chernov
f6d6295dd9 Use LC_ALL=C before awk generating "optionlist"
(and before two other awk calls, just to be safe)
Without it sorting is broken for locales with ASCII collating equivalence
like (v,w) in sv_SE
2007-11-18 11:59:44 +00:00
Olivier Houchard
796677a89e Add thread support for arm.
MFC After:	1 week
2007-11-17 21:30:03 +00:00
Olivier Houchard
fdad867fc6 There's no reason why we couldn't attach to a live process on arm.
MFC After:	1 week
2007-11-17 18:41:04 +00:00
John Baldwin
f157925999 Teach kgdb how to handle double fault frames on i386:
- Save td_oncpu in 'struct kthr' so the i386 target code can see which CPU
  a thread is running on.
- Add a new frame unwinder for double fault frames.  This unwinder is used
  when "dblfault_handler" is encountered in the stack.  It uses the CPU of
  the current thread to lookup the base address of the TSS used for the
  double fault from the GDT.  It then fetches the various registers out
  of the TSS similar to how the current trapframe unwinder fetches
  registers out of the trapframe.

MFC after:	3 days
2007-11-16 22:17:37 +00:00
Ruslan Ermilov
d2bf7b5d31 Added ".Lb libkse" support to mdoc(7).
Reviewed by:	deischen, davidxu
2007-10-22 10:01:58 +00:00
Ruslan Ermilov
be36b09afa Introduce FreeBSD 8.0 to mdoc(7). 2007-10-15 08:06:42 +00:00
Ruslan Ermilov
281fc7f295 Back out last commit -- it breaks sparc64 build which has
more than one .c file in SRCS.
2007-10-13 05:50:43 +00:00
David E. O'Brien
d80f4b0e33 style.Makefile(5) 2007-10-12 18:15:40 +00:00
David E. O'Brien
1d2c824f26 Minor tweak to finding BEG/END source. 2007-10-12 18:14:41 +00:00
David E. O'Brien
feaa2b360f style.Makefile(5) 2007-10-12 18:03:00 +00:00
David E. O'Brien
29e0f3f543 Welcome FreeBSD 8. 2007-10-12 17:49:12 +00:00
Rong-En Fan
224803e1fd - After gcc 4.2 import, include/objc/objc-api.h requires objc-decls.h which
we did not install. Install objc-decls.h to fix.

PR:		116943
Reported by:	beech
Submitted by:	vanilla on -current, kan
MFC after:	1 week
2007-10-12 02:52:46 +00:00
Marius Strobl
a8efe9e273 Disable TLS for arm and sparc64 here as binutils 2.15 predate GNU TLS
support for these. This is in line with gnu/lib/libgomp/config.h and
gnu/lib/libstdc++/config.h.

Reviewed by:	cognet, obrien
Approved by:	re (kensmith)
2007-10-08 18:59:34 +00:00
Ruslan Ermilov
d95f0f9848 FreeBSD 6.2 is now known to mdoc.
Approved by:	re (kensmith)
2007-10-04 04:39:06 +00:00
Marcel Moolenaar
af025ea9a7 Force -O1 compilation when targeted for ia64. GCC 4 generates
bad code at -O2. Since this is likely caused by the low-level
optimizer, testing TARGET_ARCH rather than MACHINE_ARCH should
handle ia64 cross-compilation as well. With this work-around
in place, we can release using the current GCC and Binutils
code at the default optimization level on ia64.

Approved by: re (kensmith)
2007-09-26 01:31:28 +00:00
Edwin Groothuis
e06a060ed3 Fix possible uninitialized variable insert due to previous commit.
Pointy hat to: me and my absence of -Wall in my CFLAGS.

MFC will happen at the same time of the earlier commit.

Thanks to ru@ for spotting.

Approved by:	re (Ken Smith), grog@ (mentor)
2007-09-25 21:41:22 +00:00
Edwin Groothuis
085ca02717 man(1) can't handle compressed included files.
Some ports will install with compressed manpages. man handles
	this by looking for the .gz version of a man source file.
	It is also common to include other files with the .so
	directive where commands or functions share a man page.
	Traditionally ports have had to handle this by either not
	compressing the manpages, or using the _MLINKS macro in the
	port makefile to create symlinks to the actual source file,
	rather than using .so versions. Notably, the current version
	of Xorg port breaks. See ports/113096 and ports/115845.

PR:		bin/115850
Submitted by:	Callum Gibson <callumgibson@optusnet.com.au>
Approved by:	re@ (ken smith), grog@ (mentor)
MFC after:	1 week
2007-09-20 21:37:29 +00:00
David E. O'Brien
557c18457f Catch up with the demise of /usr/X11R6
Approved by:	re(ken)
2007-09-19 14:21:18 +00:00
David E. O'Brien
6a859d67c1 Reduce diff to vendor for maintance purposes.
Approved by:	re(ken)
2007-09-19 14:19:32 +00:00
Thomas Quinot
a0b65c7be0 In the case of a native build, set NATIVE to yes so that the code circuits
that need to be activated specifically for the case of a native linker
actually are enabled. Specifically, this makes ld(1) look for shared
libraries in LD_LIBRARY_PATH in the native case, as documented in the
man page.

PR:		gnu/96481
Approved by:	re (kensmith)
MFC after:	2 weeks
2007-09-19 12:17:39 +00:00
Olivier Houchard
65875b1f58 Make gcc default to big endian when building it for a big endian target.
This was lost while migrating to gcc4.

Reported by:	Michael Reifenberger <mike at Reifenberger dot com>
Approved by:	re (blanket)
2007-09-18 23:34:42 +00:00
Andrey A. Chernov
680e3e034b Fix stack overflow with too many items return list in 'dialog' program.
(Noticed in ghostscript-gpl core dump)

Approved by:    re@ (bmah)
2007-08-24 16:26:24 +00:00
John Baldwin
4ba3dab395 NMIs now come from 'nmi_calltrap' rather than 'calltrap', so teach 'kgdb'
to treat the frame under 'nmi_calltrap' as a trapframe.

MFC after:	3 days
Approved by:	re (bmah)
2007-08-22 20:28:13 +00:00
Alexander Kabaev
203ab4d0c3 Install etx/numeric_traits.h.
PR:		gnu/115250
Approved by:	re (blanket)
2007-08-16 23:02:00 +00:00
Alexander Kabaev
a602382caf Remove comment that was added by mistakes and which prevented _eprintf
and gcc_bcmp to be added to static libgcc.a.

Approved by:	re (kensmith)
2007-08-14 20:49:57 +00:00
Rong-En Fan
27cfc42fc5 - Bump share library version which were missed in last bump
Reported by: 	     jhb
Discussed with:	     deischen, des, doubg, harti
Approved by:	     re (kensmith)
2007-06-18 18:47:54 +00:00
Xin LI
9ba2645aa7 Fix build on arm: time_t on arm is 64 bits while long is
32 bits, so subsequent compile time assertion:

	sizeof inf->stat.st_mtime <= sizeof sec

Would fail because of that.  This change is suitable for
general consumption as well, but fix it in our local
patchset as we are near a code freeze.

Submitted by:	cognet
2007-06-17 00:43:50 +00:00
Xin LI
b6ee6822f3 Update build skeleton after diffutils 2.8.7 update. 2007-06-15 07:09:34 +00:00
Philip Paeps
3a787f042c Don't lie about saved reports.
PR:		gnu/89777
Submitted by:	edwin
MFC after:	1 day
2007-06-02 18:06:08 +00:00
Alexander Kabaev
88843a0a1e Install omp.h file.
Submitted by:	Pieter de Goeje (pieter at degoejes dot nl)
2007-05-31 13:21:30 +00:00
Alexander Kabaev
ba25c97b24 Fix compiles when user chooses to disable both ObjC and C++ support in
GCC.

Reported by: bz
2007-05-28 00:25:07 +00:00
Ruslan Ermilov
0effeaaec3 Don't forget to clean generated ssp.h. 2007-05-22 10:40:58 +00:00
Ruslan Ermilov
4c520cd4c6 Back out the addition of -static to LDFLAGS; I'm pretty confident
that the build failure was caused by a computer/sources date/time
mismatch that caused GCC tools to be mistakenly rebuilt again at
an inappropriate time during buildworld, re-linking them against
new libraries instead of host's installed libraries and thus making
them not runnable by the host.  Normally they are only built in
the early stage of buildworld (build-tools) that links them against
shared libraries of the host, but if either the system clock or
modification date/time on source files is set incorrectly, make(1)
can be foolished into thinking that tools are stale and will rebuild
them again, now in the "target" environment which is not suitable
for building helper apps that are to be run during buildworld.

OK'ed by:	kan
2007-05-21 12:04:16 +00:00
Alexander Kabaev
1b156a4077 Fix the fallout from over-zealous obsolete files removal. Use correct
atomicity.h file for arm and powerpc.
2007-05-19 15:41:01 +00:00
Scott Long
ad08d9331d Work-around for upgrading from a pre-symbol-versioned world.
Blame-to: cperciva
2007-05-19 07:56:08 +00:00
Alexander Kabaev
68e56eb18e Do not compile hash_compat.c. 2007-05-19 05:52:28 +00:00
Alexander Kabaev
afb57df680 Update bmake glue to build GCC 4.2.
Also:
        Switch FreeBSD to use libgcc_s.so.1.

        Use dl_iterate_phdr to locate shared objects' exception frame
        info instead of depending on older register_frame_info machinery.
        This allows us to avoid depending on libgcc_s.so.1 in binaries
        that do not use exception handling directly. As an additional
        benefit it breaks circular libc <=> libgcc_s.so.1 dependency too.

        Build newly added libgomp.so.1 library, the runtime support
        bits for OpenMP.

        Build LGPLed libssp library. Our libc provides our own
        BSD-licensed SSP callbacks implementation, so this library
        is only built to benefit applications that have hadcoded
        knowledge of libssp.so and libssp_nonshared.a. When linked
        in from command line, these libraries override libc
        implementation.
2007-05-19 04:25:59 +00:00
Alexander Kabaev
44f3233714 Remove extern int verbose declaration. It is declared static in the
only file it is used in.
2007-05-19 03:23:43 +00:00
Alexander Kabaev
520d6ec0d8 Fix static/extern mismatch by patching corresponding tdep files
in-place.
2007-05-19 03:22:19 +00:00
Marcel Moolenaar
28db227dc2 Add threading support. 2007-05-01 18:29:34 +00:00
Alexander Kabaev
04d56e6287 Minor Makefile cleanup. Do not use Makefile variables named 'version' and
'target'. Latter is problematic in particular as apparently FreeBSD's
bsd.prog.mk re-defines it under some circumstances. This causes an
unexpected failures like -dumpmachine not working for cc while working
fine for c++.

Do not re-define IN_GCC in multipe places, it gets inherited from
Makefile.in anyway.

PR:		gnu/110143
Submitted by:	usleepless at gmail
2007-03-12 00:28:06 +00:00
Konstantin Belousov
0a592d0535 Unbreak the kgdb stepping over the special frames on i386 after rev. 1.117 of
i386/i386/exception.s.

No objections from:	marcel
2007-03-01 13:56:08 +00:00
Konstantin Belousov
d7eb5fb599 Rename lookup() to kgdb_lookup() and make it global (for use in trgt_i386.c).
No objections from:	marcel
2007-03-01 13:55:15 +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
Marcel Moolenaar
6c7ef9a0f8 Fix PowerPC-targeted cross-builds performed on 64-bit platforms.
Only PowerPC supports both 32-bit and 64-bit targets and the
BFD_DEFAULT_TARGET_SIZE is used by the binutils code to reflect
the preferred ABI. We define BFD_DEFAULT_TARGET_SIZE for all
platforms, but based on the build machine. As such 64-bit build
machines defined BFD_DEFAULT_TARGET_SIZE incorrectly for 32-bit
targets, but since this only affects PowerPC it went unnoticed
for a long time.
The fix is to define BFD_DEFAULT_TARGET_SIZE based on the target
architecture.

PR: amd64/102996
MFC after: 1 month
2007-02-11 07:15:06 +00:00
Xin LI
5ded07e693 Remove GNU gzip left-offs, they are no longer necessary. 2007-01-31 03:44:42 +00:00
Xin LI
9a9ea25f4a Replace the GNU gzip with a slightly modified NetBSD gzip. The
NetBSD version is a feature-to-feature re-implementation of GNU
gzip using the freely-redistributable zlib and this version is
expected to be mostly bug-to-bug compatible with the GNU
implementation.

 - Because this is a piece of mature code and we want to make
   changes so it is added directly rather than importing to
   src/contrib.
 - Connect newly added code to src/usr.bin/ and rescue/rescue
   build.
 - Disconnect the GNU gzip code from build for now, they will
   be eventually removed completely.
 - Provide two new src.conf(5) knobs, WITHOUT_BZIP2_SUPPORT and
   WITHOUT_BZIP2.

Tested by:	kris (full exp-7 pointyhat build)
Approved by:	core (importing a 4-clause BSD licensed file)
Approved by:	re (adding new utility during -HEAD code slush)
2007-01-26 10:19:08 +00:00
Craig Rodrigues
c4b1628e07 Try to avoid a possible infinite loop when parsing an invalid kernel dump file.
PR:		108229
Submitted by:	Jessica Han <jessicah juniper net>
Reviewed by:	marcel
MFC after:	1 week
2007-01-25 06:39:25 +00:00
Andrey A. Chernov
b1b027ee15 Change RL_LIBRARY_VERSION 2006-12-31 09:27:16 +00:00
Andrey A. Chernov
82fe6057d5 Update config 2006-12-31 09:26:00 +00:00
Ruslan Ermilov
bf2a133f37 -mdoc knows about FreeBSD 7.0 as well.
Reminded by:	ceri
2006-12-29 06:22:13 +00:00
Ruslan Ermilov
a804cd3659 Markup revision. 2006-12-25 15:09:06 +00:00
Ruslan Ermilov
4f54ae7af3 FreeBSD 5.5 is part of official -mdoc. 2006-12-25 09:09:47 +00:00
Ruslan Ermilov
0321d7f9a8 Fix markup, remove a dummy BUGS section. 2006-12-24 23:07:11 +00:00
Ruslan Ermilov
f54222f069 Add missing articles. 2006-12-23 23:26:05 +00:00
Ruslan Ermilov
5adba4ff85 Teach mdoc(7) about FreeBSD/arm and FreeBSD 6.3; both needed by the
npe(4) manpage.
2006-12-05 17:01:23 +00:00
Joseph Koshy
3eb1a62e69 MFP4: Add an implementation of the ELF(3) and GELF(3) API set.
Bump __FreeBSD_version.

Reviewed by:	jb
2006-11-11 17:16:35 +00:00
David E. O'Brien
55738a1aa4 Remove gratuitous white space change. 2006-11-06 02:49:19 +00:00
David E. O'Brien
ffe2c5e5a5 Allow one to force with issue with 'TARGET_BIG_ENDIAN'. 2006-11-06 02:32:29 +00:00
Philip Paeps
089d90279a Fix vim syntax highlighting. Vim complained about the (comment). The syntax
file is also called "sendpr", not "send-pr".
2006-11-01 12:13:08 +00:00
Ruslan Ermilov
afa56e7db8 Bump document date for the previous change. 2006-10-21 17:39:35 +00:00
John-Mark Gurney
870fe2a280 Turn on gdbserver for the arch that supports it.. 2006-10-21 17:27:36 +00:00
John Baldwin
a5146161ae Trim trailing whitespace. 2006-10-16 20:07:23 +00:00
John Baldwin
62f6176c27 Restore the 'proc' and 'tid' commands which allow one to switch to the
first thread in a process or to a specific thread via PIDs and TIDs,
respectively.

Submitted by:	kan
Approved by:	marcel
2006-10-16 20:06:32 +00:00
Ceri Davies
fd717a30ea Update the FILES section which has been wrong for some time.
MFC after:	3 days
2006-10-15 11:50:11 +00:00
Ceri Davies
9eacd2a880 Add the sun4v category.
Reminded by:	ru
MFC After:	1 re approval
2006-10-15 11:43:42 +00:00
Olivier Houchard
ca8022c580 Don't build the libgcc with functions already included in the libc to
unbreak the build.
We'll switch back to the libgcc functions and get rid of the libsoftfloat
later.
2006-10-12 16:43:15 +00:00
David E. O'Brien
1d60a995b9 Document '-w' from main.c rev. 1.11. 2006-10-11 14:42:43 +00:00
Tom Rhodes
1c6b148eb1 Add the -P option back, but with a note that it is not supported on FreeBSD.
Requested by:	ru
2006-10-11 09:52:32 +00:00
Tom Rhodes
ca56b49e0e grep -P xxx file.txt
"The -P option is not supported"
Removed from the manual page via this commit.

PR:	99831
2006-10-10 01:57:25 +00:00
Kip Macy
777552aef6 Temporarily add newer copy of tc-sparc.c to build to
support building of sun4v. This can be removed once
the binutils import happens.

Reviewed by: kan
Approved by: rwatson (mentor)
2006-10-09 04:52:14 +00:00
David E. O'Brien
d3fbc8d9c0 The ARM platform does the setjmp/longjmp type of exception handling. 2006-10-05 20:55:37 +00:00
Warner Losh
c23b8029f1 Enable gdb on the arm. Some time ago I committed it, but had forgotten to
enable it here.

Noticed by: cognet
2006-10-03 00:03:30 +00:00
Ruslan Ermilov
cf35cbe5d9 Fix build due to the incomplete removal of demangle.h. 2006-09-30 12:52:15 +00:00
Alexander Kabaev
2972ed120b Reduce diffs with file generated by FSF configure. 2006-09-22 15:08:07 +00:00
Ruslan Ermilov
f6b0ef28b7 Prepare to pick up manpages from their new location. 2006-09-21 07:52:41 +00:00
Alexander Kabaev
7614e6f347 Bump __FreeBSD_cc_version in case someone cares for differences between
GCC 3.4.4 and GCC 3.4.6 on -current.
2006-09-21 03:27:07 +00:00
Simon L. B. Nielsen
789cb6fc6a Correct multiple vulnerabilities in gzip(1).
Security:	FreeBSD-SA-06:21.gzip
2006-09-19 14:06:20 +00:00
Warner Losh
a817992dfc Add additional support for generating code for the arm. There's still
a few issues in other parts of the tree, but those will be resolved
separately.

Submitted by: cogenet@
Reviewed by: kan@, obrien@
MFC After: 5 days
2006-09-18 17:08:32 +00:00
Ruslan Ermilov
d0cca13549 This is not needed since src/gnu/usr.bin/cc/cc_int/Makefile,v 1.34. 2006-09-16 09:09:44 +00:00
Ruslan Ermilov
979df1f5dd Remove vestiges of GNU tar. 2006-09-15 08:04:23 +00:00
Warner Losh
5d20c54439 A TARGET_CPU_DEFAULT of xscale for arm results in illegal instructions
during buildworld.  Comment it out for now.
2006-09-15 05:21:06 +00:00
Warner Losh
38ede4873d Remove redundant default vector
Submitted by: ru@
2006-09-14 08:21:20 +00:00
Warner Losh
280075717e Add cross debug support to arm.
Submitted by: cognet@
2006-09-14 07:51:52 +00:00
Warner Losh
4c808aa2bb fix the build: add missing end of line cont character 2006-09-14 07:48:16 +00:00
Warner Losh
70e66c2fbd scripts for the arm port.
Submitted by: cognet@
Reviewed by: obrien and kan
2006-09-14 07:46:32 +00:00
Warner Losh
a8e874edc2 Fix the build and minor cleanup. 2006-09-14 07:44:05 +00:00
Warner Losh
f6b979e59e .end -> .endif 2006-09-14 07:02:17 +00:00