Commit Graph

32 Commits

Author SHA1 Message Date
Alexander Kabaev
e9bc68ba9c In dtrace lexer, do not unput token if it is EOF.
This is harmless with OpenSolaris fex and yacc, but with FreeBSD
causes '\xff' symbol to be physically put into input buffer, causing
subsequent syntax error.

MFC after: 1 week
2010-06-11 04:38:14 +00:00
John Baldwin
1149b79dac Correct the sense of the "use32" terenary operator so that it uses
'lib32' for 32-bit binaries on amd64 and 'lib' for 64-bit binaries.
Remove an #ifdef __i386__ that defined use32 to the wrong value on
i386 to workaround the bug in the terenary operator.

MFC after:	1 month
2009-01-16 22:16:54 +00:00
Craig Rodrigues
56b3556343 Merge latest DTrace changes from Perforce.
Approved by:	jb
2008-11-05 19:35:09 +00:00
Warner Losh
d80d601555 Mips doesn't have a long double that's different in size from double. 2008-09-18 19:54:02 +00:00
John Birrell
187379693c * Handle the different ioctl design.
* Add a couple of FreeBSD action extensions.
2008-04-26 05:09:19 +00:00
John Birrell
41ec19c071 Make this file compile cleanly. 2008-04-26 05:07:54 +00:00
John Birrell
2c981f99ef Leave out some header files. 2008-04-26 05:07:07 +00:00
John Birrell
2693feb411 * Handle building on FreeBSD for i386 and amd64.
* Add stubs for the other FreeBSD arches.
* Make the file compile cleanly.
2008-04-26 05:05:48 +00:00
John Birrell
5fe26f7c08 * Make this file compile cleanly.
* Add FreeBSD constructor/destructor definitions.
2008-04-26 05:03:22 +00:00
John Birrell
fb24b944be * Add FreeBSD action extensions.
* Get the kernel module file name rather than hard-coding it like on Solaris.
* Use FreeBSD's process library API.
* Handle FreeBSD's different lock types.
* Get the list of loaded providers via a syscall.
2008-04-26 05:01:29 +00:00
John Birrell
132df6e9ab * Handle the different ioctl design.
* Make this file compile cleanly.
2008-04-26 04:57:45 +00:00
John Birrell
5ec5669275 There is a lot of commented out code here which applies to future work
for userland tracing.

For now we need the basic functions to be in place so that DTrace can
be used for kernel tracing.
2008-04-26 04:56:46 +00:00
John Birrell
84098f48c6 Leave out a header file. 2008-04-26 04:54:58 +00:00
John Birrell
cccc7d47c0 Merge FreeBSD include file changes with some code that should have come
in on the vendor branch.
2008-04-26 04:53:24 +00:00
John Birrell
bbda5851ce * Use FreeBSD's process library instead of the Solaris one.
* There are a few placeholders in here for which there isn't libproc
  support code yet. This is relevent to userland tracing. This set of
  commits is designed to get kernel tracing up and running, with the
  userland stuff to follow later.
2008-04-26 04:51:45 +00:00
John Birrell
d46d190310 Leave out the hook that Solaris has into it's rtld. 2008-04-26 04:49:02 +00:00
John Birrell
f5a736457d * Add a couple of action definitions for FreeBSD extensions.
* Handle the different ioctl design.
* Add support for the get and set error location.
* Add support for freopen().
2008-04-26 04:47:16 +00:00
John Birrell
cd14ec8113 * Handle the different ioctl design.
* Make the file compile cleanly.
2008-04-26 04:44:34 +00:00
John Birrell
768c574fc0 There are many places in libdtrace where errno can be set. When an
error is returned all the way back to the dtrace app, it's hard to
figure out where that error came from.

Add a couple of functions to get and set the error location which can
be optionally compiled into the library.
2008-04-26 04:43:19 +00:00
John Birrell
79673c5671 Add some error definitions for FreeBSD action extensions. 2008-04-26 04:40:38 +00:00
John Birrell
f1e56186ea * Make this file compile cleanly.
* Use FreeBSD's kld syscalls to get kernel module information instead
  of using an object file system like Solaris uses.
2008-04-26 04:39:26 +00:00
John Birrell
d9ce014461 * Handle the different ioctl design.
* Use FreeBSD's process library API.
* Make the file compile cleanly.
2008-04-26 04:37:01 +00:00
John Birrell
40de299f6b Just leave out a few includes to compile this on FreeBSD. 2008-04-26 04:34:50 +00:00
John Birrell
b29602e4d8 * Get the maximum number of CPUs via a sysctl.
* Handle the different ioctl design.
* Support the freopen() changes.
* Use functions in FreeBSD's process library rather than the CDDL
  library that Solaris has which sits on top of their process file
  system and is therefore unsuitable for use on FreeBSD. The libproc
  API for FreeBSD is deliberately different to that on Solaris because
  Sun wouldn't release the libproc.h header under a BSD license.
2008-04-26 04:33:15 +00:00
John Birrell
51e031e870 * Define YY_INPUT for flex since input() can't be re-defined.
* On FreeBSD define both LITTLE_ENDIAN and BIG_ENDIAN and then set the
  BYTE_ORDER to the one we are using. On Solaris they define one or
  the other but not both. For us to keep using FreeBSD header files,
  we need to use endian definitions the same way we do in pure BSD
  code.
2008-04-26 04:26:23 +00:00
John Birrell
df5c121dfe Handle the different level of indirection between ioctl on SYSV vs BSD. 2008-04-26 04:20:11 +00:00
John Birrell
29f89dfce7 freopen() on FreeBSD behaves differently to the Solaris one. 2008-04-26 04:18:35 +00:00
John Birrell
1cbe5a9868 * Use a portable POSIX timed wait.
* Handle the different ioctl format.
2008-04-26 04:16:17 +00:00
John Birrell
a76c5ce792 * Fix a function prototype.
* Allow for the different level of indirection between SYSV's ioctl and BSD's.
* Map a couple of sysconf definitions to one that FreeBSD has.
2008-04-26 04:13:23 +00:00
John Birrell
abb532f661 'echo' behaviour differs between SYSV and BSD. 2008-04-26 04:03:58 +00:00
John Birrell
20594ebf90 This commit was generated by cvs2svn to compensate for changes in r178528,
which included commits to RCS files with non-trunk default branches.
2008-04-26 00:54:52 +00:00
John Birrell
6ff6d951ad This commit was generated by cvs2svn to compensate for changes in r178479,
which included commits to RCS files with non-trunk default branches.
2008-04-25 09:04:09 +00:00