Commit Graph

2939 Commits

Author SHA1 Message Date
Ed Schouten
69eb6d71d0 Add support for diffs generated by Perforce.
It basically picks the filenames from the "====" line and strips off the
# revision number.
2009-08-23 12:23:24 +00:00
Ken Smith
cf48cc9f69 Make head 9.0-CURRENT in preparation for lifting code freeze.
Approved by:	re (implicit)
2009-08-22 23:44:37 +00:00
Alexander Kabaev
d48890cfb8 Back out previous revision until better tested fix is ready.
Approved by: re (impliciti, by approving previos check-in)
2009-06-29 01:33:59 +00:00
Alexander Kabaev
a162c9ae9c Eliminate .text relocations in shared libraries compiled with stack protector.
Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC generates
local calls to this function which result in absolute relocations put into
position-independent code segment, making dynamic loader do extra work everys
time given shared library is being relocated and making affected text pages
non-shareable.

Reviewed by:        kib
Approved by:        re (kensmith)
2009-06-28 23:51:39 +00:00
Jamie Gritton
de6f37045c Add libjail, a (somewhat) simpler interface to the jail_set and jail_get
system calls and the security.jail.param sysctls.

Approved by:	bz (mentor)
2009-06-24 18:18:35 +00:00
Brian Somers
c33b82645a Don't set $PATH - if the caller doesn't have /bin and /usr/bin in their
PATH then they can expect things to break.

PR:		135417
MFC after:	3 weeks
2009-06-14 06:09:33 +00:00
Stephane E. Potvin
9ab20e104c Change the internal buffer used to store input lines from a static buffer
to a dynamically allocated one in order to support input lines of
arbitrary length.

Approved by:	kan (mentor)
MFC after:	1 month
2009-05-08 02:18:46 +00:00
David Schultz
14b55f2f95 Fix build breakage due to the interplay between r189801 and r189824.
In particular, vendor sources that aren't ready for gnu99 should
still be compiled with gnu89. (Before r189824, these would have
generated warnings if you tried to compile them in gnu99 mode,
but the warnings went unheeded due to -Wno-error.)
2009-03-14 22:50:03 +00:00
David Schultz
8bc369a3e1 Define a macro for POSIX.1-2008 here until a future groff import
includes one.
2009-02-28 05:47:41 +00:00
Rafal Jaworowski
ab8b490a63 Initial gdbserver support for PowerPC.
Obtained from:	Juniper Networks, Semihalf
2009-02-23 18:22:49 +00:00
David E. O'Brien
b29362d8dd For files not named on the command line, only the basename is compared
to the exclude pattern.
Change this so that "grep --exclude='*/.svn/*' -[Rr] foo *" DWIM.

Obtained from:	dave+news001@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Dave Gibson)
Obtained from:	comp.unix.questions [Thu, 15 Mar 2007 18:54:38 +0000]
Obtained from:	http://unix.derkeiler.com/Newsgroups/comp.unix.questions/2007-03/msg00046.html
2009-01-30 00:22:08 +00:00
Ken Smith
3fdaf2d2f9 Remove the /usr/X11R6 paths. It has been long enough since the X stuff
moved to /usr/local.

Checked with:	des (last person to have fiddled with this)
MFC after:	1 month
2008-12-30 16:00:36 +00:00
Ruslan Ermilov
e5022d8c10 Added FreeBSD 6.4. 2008-12-13 16:13:37 +00:00
Ruslan Ermilov
99e1e6f30a Added FreeBSD 7.1. 2008-12-13 15:47:46 +00:00
Warner Losh
5abe265777 Push mips support into the tree. 2008-12-11 08:20:34 +00:00
Warner Losh
d7aeea2745 Push mips support for ld into the tree. 2008-12-11 08:18:45 +00:00
Warner Losh
7932522f76 Push mips support for as into the tree. 2008-12-11 08:15:14 +00:00
Konstantin Belousov
20e76cb365 Add strndup(3) prototype to string.h.
This change was erronously ommitted from the r185690, and attempt
to simply add the prototype to string.h has revealed that several
contributed programs defined local prototypes for strndup(), controlled
by autoconfed config.h. So, manually change #undef HAVE_STRNDUP to
#define HAVE_STRNDUP 1. Next import of the corresponding program would
regenerate config.h, overriding the changes in this commit.

No objections from: kan
2008-12-08 21:04:24 +00:00
Rafal Jaworowski
c7b4433263 Initial gdbserver support for ARM.
Obtained from:	Juniper Networks, Semihalf
2008-11-17 16:32:57 +00:00
David E. O'Brien
ee81baecd8 Document what the sed trick is for.
Remove an embedded <TAB>, and use same style for both files.
2008-10-16 18:09:27 +00:00
Dag-Erling Smørgrav
ba377f119f Enable UTF-8.
MFC after:	1 week
2008-10-08 13:16:20 +00:00
John Baldwin
27f38446be Oops, initialize sections and sections_end to NULL.
Submitted by:	Navdeep Parhar
MFC after:	1 week
2008-10-02 20:42:10 +00:00
Konstantin Belousov
42003afced Differentiate between interrupt frames, trap interrupt frames and timer
frame in the kgdb, to allow it to properly backtrace over the interrupt
stacks.

Noted and reviewed by:	tegge
Tested by:	pho
MFC after:	1 week
2008-09-27 15:58:37 +00:00
John Baldwin
59c47d99be Use existing GDB routines for parsing the section table of klds in
the 'add-kld' command instead of doing it more by hand.

MFC after:	1 week
2008-09-25 19:32:03 +00:00
Sam Leffler
690f477d75 add new build knobs and jigger some existing controls to improve
control over the result of buildworld and installworld; this especially
helps packaging systems such as nanobsd

Reviewed by:	various (posted to arch)
MFC after:	1 month
2008-09-21 22:02:26 +00:00
Marcel Moolenaar
93898f2b2d Widen psaddr_t from uintptr_t to uint64_t. This results in an
ABI change on ILP32 platforms and relating to events.  However
it's harmless on little-endian ILP32 platforms in the sense
that it doesn't cause breakages.  Old ILP32 thread libraries
write a 32-bit th_p and new thread libraries write a 64-bit
th_p.  But due to the fact that we have an unused 32-bit data
field right after th_p and that field is always initialized to
zero, little-endian ILP32 machines effectively have a valid
64-bit th_p by accident. Likewise for new thread libraries and
old libthread_db: little endian ILP32 is unaffected.

At this time we don't support big-endian threaded applications
in GDB, so the breakage for the ILP32 case goes unnoticed.
2008-09-14 16:52:42 +00:00
David E. O'Brien
4bdc01a9f9 Add FreeBSD/MIPS support to GCC. 2008-09-01 18:46:03 +00:00
David E. O'Brien
5555bfc259 GDB isn't building on MIPS. Temporarily disable, to revisit soon. 2008-09-01 18:18:19 +00:00
David E. O'Brien
9dec52bfb2 Turn cc_tools/Makefile and Makefile.tgt into a "linear" read. Shared
parts of the configuration aren't duplicated, and arch-specific exceptions
are made "in-place".  Also clean up the FreeBSD/amd64 config a little.
2008-08-31 23:38:28 +00:00
Rui Paulo
a9435ff4dd Enable EFI target.
While there, make use of the DEFAULT_VECTOR variable.
2008-08-31 09:17:27 +00:00
Doug Rabson
8f55a568f6 Add an implementation of the RPCSEC_GSS authentication protocol for RPC. This
is based on an old implementation from the University of Michigan with lots of
changes and fixes by me and the addition of a Solaris-compatible API.

Sponsored by:	Isilon Systems
Reviewed by:	alfred
2008-08-06 14:02:05 +00:00
Olivier Houchard
7aab344dc1 Unbreak the arm build, by spelling LIBSRCS correctly. 2008-08-02 12:33:39 +00:00
Olivier Houchard
21fb986f16 Do not build fbsd-threads.c if we're building a cross-debugger.
MFC after:	3 days
2008-08-02 01:21:04 +00:00
Peter Wemm
c6acfe86c7 Merge gnu cpio 2.6 -> 2.8 changes. Unfortunately, we have massive
conflicts due to radically different approaches to security and bug fixes.
In some cases I re-started from the vendor version and reimplemented our
patches.  Fortunately, this is not enabled by default in -current.
2008-07-10 02:08:00 +00:00
David E. O'Brien
3c46f7891b Instead of using .POSIX:, use the cool looking "@:" rule.
Submitted by:	ru
2008-06-27 14:59:23 +00:00
John Baldwin
ad335b4edf Catch up to recentish kgdb changes:
- Use ptid_get_pid() rather than ptid_get_tid() (part of the changes to
  let 'tid' work for remote kgdb).
- Add a stub kgdb_trgt_new_objfile() hook.

Silence from:	obrien, mips@
2008-06-18 14:23:28 +00:00
Doug Barton
6973701a00 1. Make the BSD version of cpio the default [1]
a. The BSD version will be built and installed unless
WITHOUT_BSD_CPIO is defined.
b. The GNU version will not be built or installed unless
WITH_GNU_CPIO is defined. If this is defined, the symlink
in /usr/bin will be to the GNU version whether the BSD
version is present or not.

When these changes are MFCed the defaults should be flipped.

2. Add a knob to disable the building of GNU grep. This will
make it easier for those that want to test the BSD version in
the ports.

Approved by:	kientzle [1]
2008-06-16 05:48:15 +00:00
Tim Kientzle
e761102df3 Install GNU cpio as 'gcpio', symlink to 'cpio' unless WITH_BSDCPIO is
defined.
2008-05-26 17:21:12 +00:00
David E. O'Brien
486b0cc401 Add Juniper's copyright. 2008-05-20 22:58:47 +00:00
David E. O'Brien
aa4a28bd31 MIPS arch target kgdb(1) support.
Obtained from: Juniper Networks.
2008-05-20 22:54:42 +00:00
Ruslan Ermilov
d0010c62b2 Add support for bzip2-compressed manpages.
PR:		bin/120730
Submitted by:	ighighi AT gmail DOT com
MFC after:	1 week
2008-05-14 17:18:12 +00:00
Ruslan Ermilov
6ccf134528 Add an ability to run man(1) on local files (the argument should
contain a `/' character); based on the submission in the PR.

PR:		bin/120730
MFC after:	1 week
2008-05-14 17:08:31 +00:00
John Baldwin
084bc6a480 Trim unneeded header. 2008-05-09 19:00:40 +00:00
Doug Rabson
33f1219925 Fix conflicts after heimdal-1.1 import and add build infrastructure. Import
all non-style changes made by heimdal to our own libgssapi.
2008-05-07 13:53:12 +00:00
John Baldwin
774bd9bf03 Go back to fondling FILE internals. 2008-05-05 16:12:28 +00:00
Marcel Moolenaar
4655d57927 Lower WARNS to avoid warning about type-punned casting. 2008-05-04 04:13:35 +00:00
Marcel Moolenaar
0aca787a7b Unbreak build: gnu sort has been configured to grope inside struct
__sFILE. It's opaque now, so add a function that returns the pending
output bytes.

Pointy hat: jhb
2008-05-03 23:36:00 +00:00
John Baldwin
53df73db45 - Change how the vmcore target maps FreeBSD thread IDs to GDB ptids. We
now only use the TID and ignore the PID and use pid_to_ptid() to build a
  ptid treating the TID as a PID.  The benefit of this is that the vmcore
  target now uses the same scheme as GDB's remote targets.  As a result,
  the 'tid' command now works for remote targets (however, it only accepts
  TIDs and not addresses of 'struct thread' objects).
- Use gdb_thread_select() to do the actual thread switch for the 'tid' and
  'proc' commands.  This now gives the same UI feedback when switching
  threads as the GDB 'thread' command rather than providing no visual
  output at all.

MFC after:	1 week
2008-05-01 20:36:48 +00:00
John Baldwin
3461a0f244 Rework how kgdb manages kernel and vmcore files to be a bit more gdb-ish
so that kgdb can be used more like a normal gdb:
- Load the kernel via the standard 'exec' target and allow it to be changed
  via the 'file' command.
  - Instead of explicitly loading the kernel file as the mail symbol file
    during startup, just pass it to gdb_main() as the executable file.
  - Change the kld support (via shared libraries) to cache the address of
    the linker_files and linker_kernel_file variables in addition to the
    offsets of various members in 'struct linker_file'.
  - When a new symbol file is loaded, recompute the addresses and offsets
    used by the kld support code.
  - When a new symbol file is loaded, recalculate the ofs_fix variable to
    account for the different ways a trapframe can be passed to trap
    frame handlers in i386.  This is done by adding a MD
    kgdb_trgt_new_objfile() hook that is empty on all but i386.
  - Don't use the directory name of the kernel specified on the command
    line to find kernel modules in the kld support code.  Instead,
    extract the filename of the current executable via exec_bfd.  Now
    the 'kernel' variable is private to main.c again.
  - Make the 'add-kld' command explicitly fail if no executable is loaded.
- Make the support for vmcores a real core-dump target that opens the
  kernel and vmcore on open and closes the kvm connection when closed, etc.
  - The 'core' command can now be used to select a vmcore to use, either
    a crash dump file or /dev/mem for live debugging.
  - The 'detach' command can be used to detach from a vmcore w/o attaching
    to a new one.
  - kgdb no longer explicitly opens a core dump during startup and no longer
    has to use an atexit() hook to close the kvm connection on shutdown.
  - Symbols for kld's are automatically loaded anytime a core is opened.
    Also, the unread portion of dmesg is dumped just as it was done on kgdb
    startup previously.
- Don't require either a remote target or core dump if a kernel is specified.
  You can now just run 'kgdb kernel' similar to running gdb on an executable
  and later connect to a remote target or core dump.
- Use a more relaxed way to verify remote targets specified via -r.
  Instead of explicitly allowing a few non-file target specifications,
  just assume that if stat() on the arg and on "/dev/" + arg both fail
  that is some non-file target and pass it to gdb.
- Don't use a custom interpreter.  The existing kgdb_init() hook and the
  target_new_objfile() hook give us sufficient hooks during startup to
  setup kgdb-specific behavior now.
- Always add the 'proc', 'tid', and 'add-kld' commands on startup and not
  just if we have a core dump.  Currently the 'proc' and 'tid' commands do
  not work for remote targets (I will fix at least 'tid' in the next round
  of changes though).  However, the 'add-kld' command works fine for
  loading symbols for a kernel module on a remote target.
- Always setup the 'kld' shared library target operations instead of just
  if we have a core dump.  Although symbols for kernel modules are not
  automatically loaded when connecting to a remote target, you can do
  'info sharedlibrary' after connecting to the remote target and kgdb will
  find all the modules.  You can then use the 'sharedlibrary' command to
  load symbols from the module files.
- Change kthr_init() to free the existing list of kthr objects before
  generating a new one.  This allows it to be invoked multiple times
  w/o leaking memory.

MFC after:	1 week
2008-04-29 20:32:45 +00:00
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