Commit Graph

235 Commits

Author SHA1 Message Date
Nicholas Nethercote
f8a005fa9a Do some final "sk_" --> "tl_" changes that I missed earlier.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3106
2004-11-26 10:53:33 +00:00
Nicholas Nethercote
efed8e4671 Removed shadow_regs 'need', because it was being used only trivially in
a couple of places, and is no longer needed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3096
2004-11-24 16:57:16 +00:00
Nicholas Nethercote
feb4fbaef5 Removed all uses of register numbers (eg. arch-specific ones like R_EAX, and
arch-neutral ones like R_STACK_PTR).  Where they were used, we now always talk
about an offset into the Vex guest state, and an offset.  As a result,
the shadow register get/set functions had to change.  They now also use
an offset and size, and in an arch-neutral way.

Also, I combined the five the post_reg_write* functions into a single one that
takes a 'CorePart' parameter (plus also a ThreadId).  Also, I added more
arguments (the CorePart, and the ThreadId) to the post_mem_write event, for
consistency with the pre_mem_* events.

Also, I reduced the number of register names that must be specified by each
arch, by factoring out duplication; and shortened their names for the core (eg.
ARCH_STACK_PTR is now STACK_PTR).

Plus some related minor cleanups in syscall wrappers.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3094
2004-11-24 16:30:22 +00:00
Nicholas Nethercote
971687bad3 Cleanups for baseBlock removal: fix some comments, remove two decls
that are no longer needed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3093
2004-11-24 11:57:51 +00:00
Nicholas Nethercote
6f5dd2c9a5 Remove unneeded comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3091
2004-11-24 10:47:42 +00:00
Julian Seward
3558db91b1 Get rid of baseBlock. Now, when generated code is running, the guest
state pointer points directly at the ThreadState.arch.vex field, thus
updating it in place and avoiding a lot of code (and time-wasting)
which copies stuff back and forth to baseBlock.

Fix zillions of other places in the system where the current thread id
is needed.  It is now passed to all needed places.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3090
2004-11-24 10:44:19 +00:00
Nicholas Nethercote
ef77be4188 Remove out-of-date comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3086
2004-11-23 18:01:21 +00:00
Nicholas Nethercote
7f0984ea02 The syscall wrappers for sys_fcntl{,64} were too simplistic -- the 3rd
arg is only used if the 2nd arg has particular values, so we were
getting false positives.  This commit makes the wrappers smarter to
account for this.  I updated the reg test too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3080
2004-11-23 14:57:49 +00:00
Nicholas Nethercote
6ca747fcc7 Move redundant function decls from core.h (they end up in tool.h
anyway).

Also remove a declaration for a no-longer-existing function from tool.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3071
2004-11-22 21:13:31 +00:00
Julian Seward
fd3934e1e5 Fix some linking problems which were preventing memcheck from starting.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3069
2004-11-22 20:51:49 +00:00
Nicholas Nethercote
8664fd5e88 Remove extended_UCode 'need', which has been obsoleted by Vex. Kept the
field in the struct for backward compatibility (but renamed it to
no_longer_used_0).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3067
2004-11-22 20:37:42 +00:00
Nicholas Nethercote
5197cfe79d Last few skin-->tool changes, in various places.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3063
2004-11-22 19:26:27 +00:00
Nicholas Nethercote
9df62e9f85 Rename macros ("SKIN"-->"TOOL")
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3062
2004-11-22 19:12:49 +00:00
Julian Seward
b3498dd85c Merge in enough changes from the old Vex tree to make stage2 link, at
least.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3061
2004-11-22 19:01:47 +00:00
Nicholas Nethercote
454ab569fe Converted the SK_ prefix to TL_ everywhere.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3060
2004-11-22 18:33:15 +00:00
Nicholas Nethercote
ceb66880ae Removed include/vg_skin.h, which has been a shell just pointing to
tool.h for a while now.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3058
2004-11-22 18:04:29 +00:00
Nicholas Nethercote
3093a1768b Renamed VG_(skin_panic) as VG_(tool_panic).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3057
2004-11-22 18:02:32 +00:00
Nicholas Nethercote
213ef621b7 Renamed functions with 'Skin' in them: SK_(pp_SkinError),
SK_(eq_SkinError), MAC_(pp_shared_SkinError)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3056
2004-11-22 17:57:07 +00:00
Nicholas Nethercote
cf9cf2a220 Renamed sk_assert() as tl_assert().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3055
2004-11-22 17:18:48 +00:00
Nicholas Nethercote
48aff7c26f Convert the 'skin_errors' need to 'tool_errors'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3053
2004-11-22 16:46:13 +00:00
Nicholas Nethercote
be2a95cff2 Minor tweaks for external tools, for Josef W.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3050
2004-11-19 15:42:49 +00:00
Nicholas Nethercote
b490e55dc8 Tweaks for keeping Josef's external Callgrind tool running, including a bumping
of the interface major version number.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3043
2004-11-18 12:58:53 +00:00
Nicholas Nethercote
126c196c21 Converted the timer_* and clock_* syscalls.
Also now checking the return value of every syscall in scalar, to make sure
that they (mostly) fail as expected.  Because occasionally one would succeed
unexpectedly and unaddressable memory would be marked as addressable, and
things would go haywire.  (The fact that the wrapper sets the memory as
addressable in these cases is a bug with the relevant wrappers;  I'll fix them
later.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3023
2004-11-16 16:15:41 +00:00
Nicholas Nethercote
c026b31697 Converted the io_* and mq_* syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3022
2004-11-16 12:58:04 +00:00
Nicholas Nethercote
ba41261f08 Converted modify_ldt() and init_module(); the old code for init_module() was
seemingly totally wrong, as the man page doesn't reflect the real kernel code.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3009
2004-11-15 16:40:40 +00:00
Nicholas Nethercote
a0ce711edb Converted more syscalls
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3004
2004-11-15 14:32:12 +00:00
Nicholas Nethercote
ad980e636a Converted a few more, including clone() which I'm not at all sure about, and
ipc() which is done too simplistically.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3002
2004-11-15 12:28:58 +00:00
Nicholas Nethercote
8e2be498fc Converted a couple more
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2991
2004-11-14 17:03:47 +00:00
Nicholas Nethercote
e0c74bbbfa converted a few more
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2987
2004-11-14 13:42:51 +00:00
Tom Hughes
8448d42efa Add support for most of the console driver ioctls. This fixes one of
the ioctls complained about in bug 93096 as well as one that came up
on the mailing list a few weeks ago.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2982
2004-11-13 00:36:15 +00:00
Nicholas Nethercote
66213608e7 converted some more
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2976
2004-11-12 19:55:08 +00:00
Nicholas Nethercote
be04c2e5d9 Remove unnecessary comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2971
2004-11-12 17:13:17 +00:00
Nicholas Nethercote
691c66f51d Converted lookup_dcookie.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2966
2004-11-12 13:29:24 +00:00
Nicholas Nethercote
9f628720a2 Converted a bunch more syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2960
2004-11-11 18:00:47 +00:00
Nicholas Nethercote
746332ff63 Minor VKI_* fixups.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2943
2004-11-06 16:31:43 +00:00
Nicholas Nethercote
1c674f8d7c Get rid of compile errors and warnings (ahem).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2925
2004-11-04 19:10:43 +00:00
Nicholas Nethercote
e59b9df749 64-bit cleanness: introduced OffT type for off_t, used it in a few important
places.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2922
2004-11-04 18:39:22 +00:00
Nicholas Nethercote
528046b537 64-bit cleanness: make the hash-table have UWord keys instead of UInt keys.
Allows addresses as keys.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2916
2004-11-04 16:39:43 +00:00
Nicholas Nethercote
d8fc746ba4 64-bit cleanness: Yet more UInt-->SizeT changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2910
2004-11-03 18:10:37 +00:00
Nicholas Nethercote
c73601d666 64-bit cleanness:
- Use SizeT instead of UInt for new_mem_stack and all the related functions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2908
2004-11-02 13:29:50 +00:00
Nicholas Nethercote
e245f2aeb0 64-bit cleanness: Converted malloc() et al to use SizeT rather than Int.
This required some tricks with casting to maintain Memcheck's silly (ie.
negative) arg checking.  The allocator was also changed accordingly. It
should now be able to allocate more than 4GB blocks on 64-bit platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2906
2004-11-02 12:36:02 +00:00
Nicholas Nethercote
db131cacab unbreak compilation...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2900
2004-11-01 19:36:46 +00:00
Nicholas Nethercote
e0ff83bc39 - Make find_auxv() word-size independent.
- Introduced a new file, basic_types.h, for the basic types (eg. Int, Word).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2896
2004-11-01 18:22:05 +00:00
Nicholas Nethercote
a11072f0f9 Do 'struct termios' properly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2891
2004-11-01 16:22:00 +00:00
Tom Hughes
459c7429d6 Ignore generated makefiles.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2889
2004-11-01 09:52:12 +00:00
Nicholas Nethercote
c4cf15dc21 Arch-abstraction:
- Added include/x86-linux/ and include/linux/ subdirectories, with Makefile.am
  files.

- Overhauled the definitions of kernel types.  include/vg_kerneliface.h is now
  three files, include/linux/vki.h, include/x86-linux/vki_arch.h, and
  include/x86-linux/vki_arch_posixtypes.h.  These files separate the
  common/Linux and x86/Linux parts cleanly.  All code is copied verbatim from
  the relevant kernel headers, except that VKI_/vki_ prefixes are added as
  necessary to distinguish them from glibc types.  (This is done consistently,
  unlike previously when some types did not have the prefixes.)

  All code is clearly marked to show which particular header file it came from,
  and the Linux version used.  (I used 2.6.8.1, the most recent stable release,
  for all of them.)

  A few of the types changed;  this is because they changed between the older
  versions of Linux and the current 2.6.8.1.  I checked that all these changes
  were ok with respect to backwards compatibility for our purposes.

- vg_unsafe.h has been removed;  we are no longer including any kernel headers,
  as we have our own copies for everything.  This is because installed kernel
  headers are not reliable, and often cause compilation problems. (bug
  #92420 is a recent example)

- Removed some no-longer-needed header-presence tests from configure.in.

- Some code in the rest of Valgrind was changed to account for some slight
  changes in the names of our VKI_/vki_ kernel constants and types.

- Updated README_MISSING_SYSCALL_OR_IOCTL accordingly.

- Fixed off-by-one error with VKI_GDT_ENTRY_TLS_MAX (merged from stable branch)

The end result is that the kernel types situation should be much clearer, and
similar files can be created relatively easily for other architectures as
necessary.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2884
2004-10-31 18:48:21 +00:00
Nicholas Nethercote
02549cec80 Code formatting changes only.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2850
2004-10-26 13:00:12 +00:00
Nicholas Nethercote
2488e54254 Comment cleanups only.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2849
2004-10-26 12:56:58 +00:00
Nicholas Nethercote
7627b3fcbe tweak
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2838
2004-10-25 19:33:26 +00:00
Nicholas Nethercote
d1f87f21f0 Arch-abstraction:
- Make Helgrind totally arch-agnostic.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2815
2004-10-20 10:58:09 +00:00