Commit Graph

1170 Commits

Author SHA1 Message Date
John Polstra
2e280533a1 Add bmakefiles for building binutils from the contrib tree.
This finishes up the binutils import.  But I am leaving it disabled
in "src/gnu/usr.bin/Makefile" for now.  It is not used by anything
yet, so I'll take this opportunity to run one more round of tests
before enabling it.
1998-03-01 23:41:17 +00:00
Steve Price
ad42b1082d Build perl header files for machine/* too.
PR:		672
Submitted by:	Jun Kuriyama <kuriyama@opt.phys.waseda.ac.jp>
1998-02-21 04:06:24 +00:00
Jordan K. Hubbard
fd8d085898 Correct spammage from MACHINE_ARCH commit - you don't want to
*replace* the SUBDIR list in that case, you want to augment it.
Also move a stray .endif to its proper location.  Heh, no wonder my
release builds were falling over! ;)
1998-02-20 16:14:37 +00:00
Bruce Evans
e5eb0d8db1 Don't create an unused obj directory. 1998-02-20 11:18:57 +00:00
John Birrell
d975ec253b No binutils yet 8-(, and a few programs that need porting to alpha.
Make them i386 specific for now.
1998-02-19 09:34:59 +00:00
Steve Price
98add50f23 The ' character is treated differently as the first character of a line.
PR:		5754
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
1998-02-15 17:03:58 +00:00
Bruce Evans
5983a0d1cf Fixed printing of %fs and %gs for live kernels.
Only print the current pcb on startup.  Printing it every time a utility
routine was called messed up the register dump for live kernels.
1998-02-13 02:45:26 +00:00
Alexander Langer
0ce28c3a85 catman(1) is now invoked by /etc/periodic/weekly/330.catman. 1998-02-07 05:17:47 +00:00
John Polstra
663690b388 Implement dladdr. 1998-02-06 16:46:46 +00:00
Daniel O'Callaghan
ed158e7e93 Submitted by: Alex Nash
Style nit - extraneous space.
1998-02-04 07:04:44 +00:00
Steve Price
f4308c9940 setpwent and endpwent have a return type of void, so change this
to work like newer versions of perl.

Reviewed by:	Bruce Evans
1998-02-01 22:04:49 +00:00
Peter Wemm
60271a1905 comment that pvcs_to_rcs is left out since it needs perl5 1998-01-26 04:33:03 +00:00
Peter Wemm
73b41018e1 Add libdiff 1998-01-26 04:21:52 +00:00
Peter Wemm
d92c069870 Build the internal libified diff 1998-01-26 04:14:21 +00:00
Peter Wemm
8be324b9b3 Update options.h as per configure generated version 1998-01-26 04:02:05 +00:00
Peter Wemm
6eccce856f Update config.h 1998-01-26 03:59:21 +00:00
John Birrell
44626f8fec Make machine dependent asm code machine dependent. 8-) 1998-01-25 09:52:32 +00:00
John Birrell
3b306d567c Change MACHINE -> MACHINE_ARCH so that the design make sense on those
machines where the processor chip determines the compiler, and where
multiple machines use the same architecture.
1998-01-25 09:49:00 +00:00
Andrey A. Chernov
2aee32e1f8 Add PATCH_INDEX_FIRST environment variable to do the same as -I option 1998-01-22 07:44:04 +00:00
Andrey A. Chernov
0b00e7b2c0 Update usage line with new option 1998-01-21 15:15:39 +00:00
Andrey A. Chernov
8bf2e8c7e2 Add -I or --index-first option to take Index: precedence over context diff,
as it was in hacked FreeBSD version
1998-01-21 15:10:14 +00:00
Andrey A. Chernov
249a716c6c Resurrect patch 2.1 without FreeBSD Index: hack 1998-01-21 14:37:27 +00:00
Bruce Evans
9bb4a86cf0 Fixed accesses to addresses between VM_MAXUSER_ADDRESS (normally
0xefbfe000) and kernel_start (normally 0xf0100000).

Things are unnecessarily (?) difficult because procfs is used to
access user addresses in the live-kernel case although we must have
access to /dev/mem to work at all, and whatever works for the
dead-kernel case should work in all cases (modulo volatility of
live kernel variables).  We used the wrong range [0, kernel_start)
for user addresses.  Procfs should only work up to VM_MAXUSER_ADDRESS,
but it bogusly works for reads up to the address 2 pages higher
(the user area, including the kernel stack, is mapped to where the
user area used to be (WTUAUTB)).  Procfs can not work at all for
addresses between WTUAUTB and kernel_start.

Now we use procfs only to access addresses up to VM_MAXUSER_ADDRESS.
Higher addresses are translated normally using kvtophys(), so the
user ptd is used for addresses below the real kernel start (0xf0000000;
see INKERNEL()) and nothing is found WTUAUTB.

Strange accesses that cross the user-kernel boundary are now handled,
but such ranges are currently always errors because they necessarily
overlap the hole WTUAUTB.

Short reads are still not handled.
1998-01-19 15:27:56 +00:00
Bruce Evans
04822660a1 Removed `kstack' and associated mistranslations in kvtophys().
Correct translations would have been null.  However, kstack was
the top of the kernel stack instead of the base of the kernel stack
like it was when the kernel exported it, so the area above the
kernel stack was mistranslated and the kernel stack was not
translated.  This bug was depended on to compensate for the wrong
value of kstack - to read the pcb, instead of just using the address
of the pcb, we used the mistranslated address of kstack, which
happened to be the same (curpcb = kstack - 0x2000).

This area is simpler than it used to be now that the kernel stack
address is per-process.  The code still seems to be more complicated
than necessary - the `found_pcb == 0' case seems to be unused.
1998-01-19 14:27:41 +00:00
Bruce Evans
8c2c0a1d2f Fixed endless loop for `p/x *(int *)0xf0000000'. kvm_uread() in
gdb was cloned from the buggy version of kvm_uread() in libkvm and
had the same bugs.  It looped endlessly on EOF and checked errno
without setting it in the lseek() error check.  The first bug caused
gdb to loop endlessly for reads from addresses between the end of
the user area and the start of the kernel text.  kvm_uread() should
not be used for addresses beyond the end of the user area, but is
due to bugs elsewhere.
1998-01-18 13:18:55 +00:00
Bruce Evans
941b2747b6 Don't override FRAME_CHAIN(). If the current frame is valid, then
the previous frame is in the usual place even for traps, interrupts
and syscalls in the kernel, because the assembly language stubs
don't change the frame pointer.  The previous frame is just not for
the calling function.  We may as well depend on this as on magic to
determine the trap frame address.  The magic is in FRAME_SAVED_PC()
which elides the correct number of stubs (1) to go back to a pc that
matches the previous frame.

Removing fbsd_kern_frame_chain() fixes bugs in it.  Xsyscall was
misspelled as _Xsyscall (gdb removes one leading underscore), so
the tf_syscall frame type was never found.  This was harmless
because tf_normal works in all cases in fbsd_kern_frame_chain()
and Xsyscall is spelled correctly in fbsd_kern_frame_saved_pc()
where it matters.  There were style bugs on almost every line,
starting with a primary indent of 7.
1998-01-18 12:35:48 +00:00
Bruce Evans
82f143c642 Fixed sloppy definitions of SIGTRAMP_START and SIGTRAMP_END. The old
range was a little too large.
1998-01-18 11:51:48 +00:00
Bruce Evans
d76f78c43c Pass the system name to dmesg. Rev.1.7 only works when the symbols in
/kernel aren't too different form those in the kernel being debugged.
1998-01-17 17:07:53 +00:00
John Birrell
a3f1de88b2 More i386 -> ${MACHINE} changes to make this Makefile machine
independent. It makes it look like you can get aout on alpha, but
that's just your imagination. The makefile above gives you no choice.
1998-01-11 04:13:25 +00:00
John Birrell
df13e7f694 Replace i386 references with ${MACHINE} to make this makefile almost
machine independent, with the only dependency being the binary format
to build. We only expect to build ELF on alpha although we'll need
ECOFF compatibility with Digital Unix.
1998-01-11 04:10:26 +00:00
John Polstra
6d7a71ba59 Make the ".set" directive copy the aux field when the expression
reduces to a relocatable symbol plus an offset.  This preserves
the symbol type information (function vs. object).  It is important
for SVR4-style weak symbols, e.g., "#pragma weak foo=bar".  Without
this change, the linker complains that the jmpslot entry is not a
function.
1998-01-10 05:36:35 +00:00
Daniel O'Callaghan
09a3feaf70 PR: gnu/4385
Submitted by:	Robert Eckardt <roberte@MEP.Ruhr-Uni-Bochum.de>
Sundry man page fixes; handle Central European Summer Time (CEST);
usage fixes in line with man page fixes.
1998-01-05 11:32:39 +00:00
Andrey A. Chernov
78dd9df206 Upgrade to 2.5 (contrib version) 1998-01-04 21:41:46 +00:00
Andrey A. Chernov
1f374e009f Back out Index over +++/--- precedence.
It maybe right, if patch was FreeBSD-own program, but it break compatibility
with pre-existent patches in other systems.
The example is big ncurses patch which don't apply on FreeBSD
due to "fixed" precedence.
1998-01-03 23:42:56 +00:00
Alexander Langer
1295abe226 Removed /etc/ld.so.conf reference from FILES section (people get
confused when they can't find it), but leave the reference to it
as being a standard filename (which doesn't imply that it exists).

Discussed with:	jkh
1998-01-01 02:31:47 +00:00
Daniel O'Callaghan
52ebfb9d0f Submitted by: Peter Hawkins <peter@clari.net.au>
Actually implement --norecurse as documented in the man page.
1997-12-30 10:23:09 +00:00
Wolfram Schneider
6043106601 Check argument filename length before copying.
$ gzip `perl -e 'for(1..10240){ print "a"}'`
1997-12-27 03:38:39 +00:00
Wolfram Schneider
9c8ac6c742 Workaround to avoid a strange core dump.
gzip < /dev/null | perl -npe 's/\003\003/\003\225/' | gzip -d
1997-12-26 21:12:26 +00:00
Wolfram Schneider
1132c08dd8 Do not install the z*grep man pages if grep was linked with -lz. 1997-12-26 01:53:58 +00:00
Tim Vanderhoek
dfb9495b2a Use consistent spelling,
writeable -> writable (recall prior debate over this? :-)
	initialise -> initialize
	recognise -> recognize

Merry Christmas! :)
1997-12-25 09:36:42 +00:00
Wolfram Schneider
15ec2a04f8 When called as `zgrep', the -Z argument is assumed. Make a
link from zgrep to grep.

Pointed out by: Tim Vanderhoek <hoek@hwcn.org> and
                Mike Smith <mike@smith.net.au>
1997-12-21 19:15:12 +00:00
Wolfram Schneider
00caa62588 Added zgrep.libz. This version of zgrep(1) depend on a
grep(1) linked with libz.
1997-12-20 19:20:33 +00:00
Wolfram Schneider
50cb810d2e Added a sparc category to the list. 1997-12-20 18:54:22 +00:00
Wolfram Schneider
a6f4e3c4dc Added builtin decompression using zlib library, option -Z.
Enabled this new feature with the makefile variable GREP_LIBZ. If
you don't like it, compile with `make GREP_LIBZ='.

grep + zlib has several advantages:

- the shell script zgrep(1) will be basically a one line
  exec grep -Z "$@"

- no shell script, no bugs. The current zgrep implementations
  have many bugs and some grep options are no supported.

- no shell script, no security risks.

- it is a magnitude faster than a shell script

Also fixed:
0 -> STDIN_FILENO
Close a file descriptor only if the open call was successfully. It does
not hurt for the open(2) function, but the gzclose(3) function
died in free() to free up (not) allocated memory.
1997-12-20 18:46:09 +00:00
Bruce Evans
a821e7134b Exec dmesg and awk to print everything in the message buffer
following "panic:" or "Fatal trap".  `panicstr' is still printed,
although it is redundant if there is a valid message buffer and
incomplete if it contains `%'s.  I think the awk command belongs
here and not in a script since a standard format with complete
messages is good for bug reports.
1997-12-19 21:37:18 +00:00
Bruce Evans
c26f14e2b9 Fixed missing dependency on version.c.
Fixed some style bugs ($@ is not recommended ...).
1997-12-18 15:22:12 +00:00
Bruce Evans
c0e045a84d <bsd.prog.mk> has always included ../Makefile.inc, and there are no
complications involving .PATH or dependencies, so don't include it here.
1997-12-17 20:22:34 +00:00
Bruce Evans
cee45d9aa8 <bsd.prog.mk> has included ../Makefile.inc for a long time, and there
are no complications involving .PATH or dependencies, so don't include
it here.
1997-12-17 19:57:35 +00:00
Bruce Evans
f34b67af93 Don't use LDDESTDIR. Just put the -L arg in LDADD. 1997-12-17 15:11:43 +00:00
Bruce Evans
45c9cb5439 Use BINOWN, etc. instead of bin, etc. so that (this part of)
`BINOWN=... make world' can be run by users other than root.
1997-12-17 12:04:53 +00:00
Wolfram Schneider
8873fd5457 Use getopts instead getopt(1). This should fix the problem
with whitespaces in pattern.
PR:	5211
1997-12-07 01:00:56 +00:00
John Polstra
6210388a93 Make emacs work again. This is a workaround for the fact that the
emacs a.out file, self-generated by emacs's "unexec" function in
"unexsunos4.c", is invalid.  In particular, its "_end" symbol has
the wrong value.  The dynamic linker was using the value of that
symbol to initialize its sbrk break level.

The workaround is to peek at the executable's a.out header in
memory, and calculate what "_end" should be based on the segment
sizes.

I will work out a fix for emacs and send it to the FSF.  This
dynamic linker workaround is still worthwhile, if only to avoid
forcing all emacs users to build a new version.

Note: xemacs gives a bogus warning at startup, for related reasons.
The warning is harmless and can safely be ignored.  I will send a
patch to the xemacs maintainers to get rid of it, and meanwhile
add a patch file to our port.
1997-12-05 02:06:37 +00:00
Steve Price
edec52ad1a Remove manpath.[ch] here and use the ones in ../manpath instead. 1997-11-30 20:08:27 +00:00
Steve Price
580e97a9d8 Resurrect manpath.c here. 1997-11-30 19:55:16 +00:00
Steve Price
609e31cc38 Remove this copy of manpath.c and add the .PATH directive to get to
the same file in ${.CURDIR}/../man.

Suggested by:	Bruce Evans
1997-11-30 17:17:29 +00:00
Steve Price
bab06090f9 Always call gripe_reading_mp_config with the required arguments.
PR:		3894
Submitted by:	Stephen Clawson <sclawson@marker.cs.utah.edu>
1997-11-30 01:01:47 +00:00
John Polstra
08bdd3d27d Get rid of the dynamic linker's internal malloc package, and arrange
things so that it uses the same malloc as is used by the program
being executed.  This has several advantages, the big one being
that you can now debug core dumps from dynamically linked programs
and get useful information out of them.  Until now, that didn't
work.  The internal malloc package placed the tables describing
the loaded shared libraries in a mapped region of high memory that
was not written to core files.  Thus the debugger had no way of
determining what was loaded where in memory.  Now that the dynamic
linker uses the application's malloc package (normally, but not
necessarily, the system malloc), its tables end up in the regular
heap area where they will be included in core dumps.  The debugger
now works very well indeed, thank you very much.

Also ...

Bring the program a little closer to conformance with style(9).
There is still a long way to go.

Add minimal const correctness changes to get rid of compiler warnings
caused by the recent const changes in <dlfcn.h> and <link.h>.

Improve performance by eliminating redundant calculations of symbols'
hash values.
1997-11-29 03:32:48 +00:00
John Polstra
873954b327 In the "ldd -v" output, display the N_AUX information for each
symbol.  It indicates whether the symbol refers to a function or a
data object.
1997-11-28 19:34:27 +00:00
Bruce Evans
a964cd4bba Implemented "info float" for core files.
Implemented reading of %fs and %gs from core files.

Print weird floating point values better.  We have to convert long
doubles to doubles here because of limitations and bugs in printf()
and floatformat_to_double() (long doubles aren't really supported
and naive converion to double causes exceptions).  Conversion loses
information about weird formats (everything becomes a quiet NaN),
and printf() doesn't know about different types of NaNs anyway.
1997-11-23 09:18:18 +00:00
John Polstra
14b94d0464 Add missing argument detected by "-Wformat". 1997-11-18 03:37:45 +00:00
Andrey A. Chernov
5a77e9d43b Define PR_PROGRAM properly 1997-10-29 17:35:54 +00:00
Andrey A. Chernov
53d4d0e441 Switch to contrib version 1997-10-29 16:58:20 +00:00
Andrey A. Chernov
e4b6c3604e Switch to contrib version 1997-10-29 16:50:42 +00:00
Andrey A. Chernov
cd56389a5d Switch to contrib version 1997-10-29 16:36:57 +00:00
James Raynard
be4ad1aa3f Remove yet another superfluous file. 1997-10-26 12:53:16 +00:00
Andrey A. Chernov
a1838c23b7 Add -funsigned-char to CFLAGS (for ctype macros) 1997-10-26 12:20:45 +00:00
Andrey A. Chernov
5a90c8dbf2 Add (unsigned char) cast to ctype macros 1997-10-23 02:44:23 +00:00
Andrey A. Chernov
93bb056022 Add (unsigned char) cast to ctype macros 1997-10-23 02:22:51 +00:00
Andrey A. Chernov
62fe88f9af Add unsigned char cast to ctype macros 1997-10-23 02:08:16 +00:00
Andrey A. Chernov
8b50620f9a Add (unsigned char) casts to ctype macros 1997-10-23 01:43:00 +00:00
Andrey A. Chernov
d4efecb283 Do not use gawk random, we have better one in libc 1997-10-15 14:01:31 +00:00
James Raynard
4475598f18 Makefile for contributed version of awk. 1997-10-14 18:32:38 +00:00
James Raynard
60e8807fae Remove old version of awk. 1997-10-14 18:29:32 +00:00
Peter Wemm
5c97f357a9 #include <machine/tss.h> explicitly 1997-10-10 12:53:27 +00:00
Peter Wemm
67b76a559b If kerberos is installed and enabled in make.conf, activate cvs's kserver
hooks.  This is a lot safer than 'cvs pserver'.
1997-10-10 04:03:17 +00:00
Jordan K. Hubbard
97fe7f477f Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by:	<many different folks>
Submitted by:	Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>
1997-10-05 09:40:24 +00:00
Joerg Wunsch
b71ec8cc29 Nevermind... Wolfram already did it, but added the file (IMHO wrong)
to the contrib area so i didn't see it.
NB: RELENG_2_2 is still missing it (what's why i didn't see it in the
first place).
1997-09-29 14:27:55 +00:00
Joerg Wunsch
5b9dc35332 Add a stub man page for psroff(1). 1997-09-29 14:24:35 +00:00
Poul-Henning Kamp
d030d2d2ae Many places in the code NULL is used in integer context, where
plain 0 should be used.  This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.

PR:		2752
Submitted by:	Arne Henrik Juul <arnej@imf.unit.no>
1997-09-18 14:08:40 +00:00
Joerg Wunsch
c6850a7698 Sigh, there's always one more buffer overflow. :-(
This one hinted to by the recently posted exploit (although not exploited by
it).
1997-09-16 08:33:52 +00:00
Wolfram Schneider
753da33042 Add a genclass.1 manpage. 1997-09-15 19:18:59 +00:00
Wolfram Schneider
11210c4ed5 Add a simple manpage. 1997-09-15 16:08:56 +00:00
Andrey A. Chernov
40d7476321 Fix neqn building:
1) Move it after Makefile.inc included since it uses DIST_DIR from there
2) Add neqn.sh dependance
1997-09-15 01:56:29 +00:00
Wolfram Schneider
c455f09b2d Add a simple manpage. 1997-09-14 23:43:22 +00:00
Wolfram Schneider
f6b31571f6 spelling corrections.
PR: docs/4450
Submitted by: josh@quick.net
1997-09-13 16:01:53 +00:00
John Polstra
170fa4e888 Touch up the code that implements "ldd -v".
Bring the style of sods.c into better conformance.  Add code to
print the contents of each datum being relocated.  Correct the logic
that distinguishes between programs, shared libraries, and object
files.  Make the entire program "-Wall" clean.
1997-09-02 21:54:39 +00:00
John-Mark Gurney
46657c7e77 fix a few spelling changes
Submitted by: Josh Gilliam

Closes PR's: 4429, 4431-4438

PS: He has agreed to submit all contrib fixes back to the original author.
1997-08-30 12:22:49 +00:00
John-Mark Gurney
0abdc26a0d fix misspelling
Submitted-by: Josh Gilliam

Closes PR:4426
1997-08-30 11:08:06 +00:00
Søren Schmidt
cf302734e1 Dont use an internal function called warn it clashes with libc.
Allows ELF compile.
1997-08-29 16:14:20 +00:00
David E. O'Brien
e983bbadc0 Real skeleton manpage for install-info
(someone that actually knows what it really does (I don't use info) really
should try to put some meat in this)
1997-08-29 09:10:22 +00:00
Joerg Wunsch
bc151cdc8c Major Ooops. I've overlooked a few calls to scanident() in my last commit.
Submitted by:	rbezuide@oskar.nanoteq.co.za (Reinier Bezuidenhout)
1997-08-27 17:18:30 +00:00
Steve Price
bd673ff4e7 .Ar -l -> .Fl l
PR:		docs/3682
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
1997-08-23 21:59:41 +00:00
Steve Price
3511ae5bba Add missing *roff macros to correct display about -V option.
PR:		docs/4162
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp
1997-08-23 15:50:53 +00:00
John-Mark Gurney
ffc946a350 bin to BIN{OWN,GRP} and add Id line 1997-08-23 05:26:32 +00:00
Peter Wemm
d1eca759eb Fix missed optimisation in "Attic/" stripping code in $CVSHeader$
Submitted by: jdp
1997-08-22 06:59:08 +00:00
Peter Wemm
d4ba5766dd Add -R (rescan or refresh) option to rescan and rebuild the hints
file based on the previous list of directories stored there which
should overcome a weakness of the '-m' switch which can only add
libs.  This is an ideal way of updating the hints list after adding
or removing a shlib since it will remove entries that are gone and
doesn't need to have all the directories spelled out each time.
(eg: rm -f /usr/lib/libtcl75*; ldconfig -R)  This only works for
version 2 hints files (which we've been generating for a year or
so) which store the path.
1997-08-22 04:42:12 +00:00
David E. O'Brien
88d1479a58 Added to RELENG_2_2 via tagging. 1997-08-21 08:26:55 +00:00
John-Mark Gurney
0426565f90 change bin to BINOWN and BINGRP
Reviewed-by: joerg
1997-08-21 03:28:07 +00:00
Nate Williams
39f2a9e2db - In dlsym(), if the lookup fails using the original symbol, prepend an
underscore and try looking it up again.  This is a non-issue if we
  switch to ELF.

Reviewed by:	sef, jdp
1997-08-19 23:33:45 +00:00
Peter Wemm
0b5711950f Redo the $CVSHeader$ support to use code from David Dawes as in XFree86.
The stuff I hacked together didn't strip out "/Attic/" for files
on branches when the HEAD version was cvs rm'ed.
1997-08-19 11:17:37 +00:00