14 Commits

Author SHA1 Message Date
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
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
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
4ecc334c35 Arch-abstraction:
- Moved VG_MAX_REALREGS into x86/ part.
- Tweaked basic types so they're suitable for both 32-bit and 64-bit platforms.
  Main change was to change 'Addr' to "unsigned long" which is the same size as
  a pointer.  Had to make a couple of minor changes to accommodate this.
  Also, introduced 'UWord' and 'Word' types which will be necessary for making
  code 64-bit clean.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2669
2004-09-07 10:17:02 +00:00
Nicholas Nethercote
28864b7564 Arch-abstraction:
- moved a lot of the baseBlock initialisation into x86/, including all the
  VGOFF variables, and all the x86 asm helper functions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2668
2004-09-06 16:43:37 +00:00
Nicholas Nethercote
cc5d7881d8 Arch-abstraction: made vg_execontext.c arch-independent, based on Paul
Mackerras's work.

- introduced arch-neutral macros for getting the instruction/frame/stack
  pointers.

- renamed ExeContext.eips as ExeContext.ips

- renamed esp/ebp/eip to sp/fp/ip in several related files and arch-neutralised
  various comments

- introduced arch-neutral macros for walking the stack


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2663
2004-09-05 21:32:37 +00:00
Nicholas Nethercote
18355ff96b Arch-abstraction:
- Added include/x86/:  contains tool_arch.h, Makefile.am, .cvsignore.

- Added coregrind/x86/state.c.  Contains some arch-specific code for dealing
  with x86 registers -- eg. setting up the baseBlock, loading/saving the whole
  register state.  It is compiled into coregrind/x86/libarch.a and linked via
  ${VG_ARCH} with the core.

  Relatedly, also added coregrind/x86/{core_arch.h,core_arch_asm.h}.

- Correspondingly abstracted the register state out of ThreadState.  This
  affected every place that touches registers, and there are a lot of them.
  (Eventually all the register touching should be abstracted out in an
  arch-neutral way, but not yet;  one step at a time.)

- Added some declarations about register loading/saving functions to core.h;
  all architectures will have to provide these functions.

- Rejigged the build system so that the arch-specific stuff is all done via
  ${VG_ARCH}, rather than naming e.g. x86/ directly.  Appropriate -I arguments
  are used so that all the headers are found, etc.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2656
2004-09-03 13:45:29 +00:00
Nicholas Nethercote
3dc0e6069d Tweak some comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2651
2004-09-02 15:49:09 +00:00
Nicholas Nethercote
90369deb78 Arch-abstraction:
- renamed "vg_constants.h" as "core_asm.h".
- renamed "vg_constants_skin.h" as "tool_asm.h".
- renamed "mc_constants.h" as "mc_asm.h".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2650
2004-09-02 15:37:39 +00:00
Nicholas Nethercote
10d04230ef Arch-abstraction: Whoops, forgot to add tool.h.base. Also updated .cvsignore.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2648
2004-09-02 08:54:27 +00:00