Commit Graph

1873 Commits

Author SHA1 Message Date
Nicholas Nethercote
4a8d89cfdc Fix grammar
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2708
2004-09-13 11:18:13 +00:00
Nicholas Nethercote
e0a284d9d7 Remove suppression files that have never been used, and don't get included in
"make dist".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2707
2004-09-13 11:05:11 +00:00
Tom Hughes
ea28504761 When augmenting the argument vector from the VALGRIND_OPTS environment
variable and/or the .valgrindrc files, make sure that enough space is
allocated for all the old arguments, not just those that are arguments
to valgrind itself.

CCMAIL: 88604-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2706
2004-09-13 10:20:34 +00:00
Tom Hughes
3ea691a627 Only mark the section of the stack that has actually been used as
off limits otherwise we can try and invalidate a vast area of memory
if there is no stack limit.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2705
2004-09-12 22:48:59 +00:00
Nicholas Nethercote
9e21de1c3f wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2704
2004-09-11 23:51:50 +00:00
Nicholas Nethercote
68da16321d Arch-abstraction:
- in vg_symtab2.c, abstract out mentions of specific registers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2703
2004-09-11 23:48:22 +00:00
Nicholas Nethercote
2d90ddba44 Fix minor off-by-one error.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2701
2004-09-11 23:27:09 +00:00
Nicholas Nethercote
5e8f6e1293 vg_replace_malloc.c doesn't need to be included in "make dist", because it's
generated from vg_replace_malloc.c.base.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2700
2004-09-11 23:07:22 +00:00
Nicholas Nethercote
6bfdfff36c Arch-abstraction:
- previous Cachegrind rearrangement broke "make distcheck";  this commit
  fixed it again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2699
2004-09-11 18:27:43 +00:00
Nicholas Nethercote
67d6dc6e2b Arch-abstraction:
- In Cachegrind, abstract out x86-specific use of CPUID to find cache
  configuration.  Required adding a cachegrind/x86/ directory, and fiddling
  a bit with the build system.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2698
2004-09-11 16:45:27 +00:00
Tom Hughes
8adabd3253 Add support for the SIOCGPGRP ioctl and mark SIOCSPGRP as non-blocking
to avoid older kernels returning EPERM due to it being run in a separate
thread. This fixes bug #89198.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2697
2004-09-11 15:33:17 +00:00
Nicholas Nethercote
7615eab7a2 Arch-abstraction:
- abstract out some inline asm


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2696
2004-09-11 15:30:33 +00:00
Tom Hughes
bb199f64d1 Removed result checks from ioctl POST handlers as the POST handler is
not called unless PostOnFail is set so the checks are redundant.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2695
2004-09-11 15:14:59 +00:00
Nicholas Nethercote
eb41aa73c3 Arch-abstraction:
- abstract out some direct naming of registers


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2694
2004-09-11 15:11:47 +00:00
Tom Hughes
7d1259db4d Add system call wrappers for some CD related ioctls. Based on a
patch from Peter Jones <pjones@redhat.com>.

CCMAIL: 89263-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2693
2004-09-11 15:07:14 +00:00
Tom Hughes
0867191adf Add system call wrappers for the TIOCMBIS/TIOCMBIC/TIOMSET ioctls. Based
on a patch from Tobias Blomberg <blomman@ludd.ltu.se>.

CCMAIL: 88886-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2692
2004-09-11 14:37:04 +00:00
Tom Hughes
838ac82f4c Add system call wrappers for sched_{get,set}affinity. Based on patch
from Daryll Strauss <daryll@daryll.net>.

CCMAIL: 89139-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2691
2004-09-11 14:29:19 +00:00
Tom Hughes
99fcaf843d Make the virtualise setrlimit(RLIMIT_DATA) return EPERM when an attempt
is made to raise either the soft or hard limit above the current hard
limit rather than just allowing it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2690
2004-09-11 14:19:25 +00:00
Tom Hughes
2aad0526df Virtualise the stack rlimit for the main thread and make valgrind enforce
that limit when growing the stack. Also add a message when the stack in any
thread overflows.

CCMAIL: 73818-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2689
2004-09-11 14:16:57 +00:00
Nicholas Nethercote
c7da0ece1e Arch-abstraction:
- abstractify various uses of the stack pointer


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2688
2004-09-11 13:34:08 +00:00
Nicholas Nethercote
12722a3822 Arch-abstraction:
- minor tweaks for handling client requests on PPC


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2687
2004-09-11 13:17:02 +00:00
Nicholas Nethercote
35bfcd9d8b Slightly more informative error msgs for some cl reqs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2686
2004-09-11 13:06:55 +00:00
Nicholas Nethercote
db64449073 Arch-abstraction:
- added x86-linux/core_platform.h
- factored out getting/setting of system call arguments, put it in
  platform-specific part.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2685
2004-09-10 17:42:11 +00:00
Nicholas Nethercote
6c9df6f79e Whoops, file should be called ".cvsignore", not ".cvgsigore".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2684
2004-09-10 16:34:24 +00:00
Nicholas Nethercote
0792fdf54d Arch-abstraction:
- add a new file x86/x86_private.h, a header for the x86-specific stuff that is
  not seen by the core.
- move some LDT function decls into x86_private.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2683
2004-09-10 16:31:11 +00:00
Nicholas Nethercote
d544b7d93d Arch-abstraction:
- move some LDT constants into the x86-specific code.
- abstract out uses of LDT and TLS in vg_scheduler into the x86-specific code.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2682
2004-09-10 15:33:32 +00:00
Nicholas Nethercote
a8d85f7180 Arch-abstraction:
- create coregrind/x86-linux/ directory.
- move vg_unistd.h into x86-linux/, because it's platform-dependent.  Also
  rename it as vki_unistd.h to make clear it's a kernel interface thing.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2681
2004-09-10 14:23:59 +00:00
Nicholas Nethercote
0a67ac22b4 Redo the regs setting for db-attach, in a way that works for PPC, which doesn't
support ptrace(SETREGS,...).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2678
2004-09-09 13:40:31 +00:00
Jeremy Fitzhardinge
4773c10ae7 Use C89 compatible local declaration.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2677
2004-09-09 08:10:42 +00:00
Jeremy Fitzhardinge
b23ba8257f Pull permissions checking out into a separate function to clean
things up a bit.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2676
2004-09-08 20:05:29 +00:00
Jeremy Fitzhardinge
0d40146c88 When loading a -fpie executable, put it where info.exebase wants it, since
it doesn't have a useful address in its phdrs.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2675
2004-09-08 20:05:02 +00:00
Jeremy Fitzhardinge
8a1746826d Use MAP_NORESERVE for potentially large mappings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2674
2004-09-08 20:03:51 +00:00
Nicholas Nethercote
e2385fed91 minor fixes
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2673
2004-09-07 23:15:37 +00:00
Nicholas Nethercote
d897ba2bd1 To get 32-bit programs working on Opteron, VG_(valgrind_end) was recently
changed to name the last byte in Valgrind's section, rather than one past the
last byte.  This was because the last byte is 0xffffffff, and so one past gave
0x0, which screwed things up.

However, when this change was made, all the places where VG_(valgrind_end) is
used weren't adjusted appropriately.  So this commit makes those adjustments.
It also renames the variable as VG_(valgrind_last), which makes the difference
between it and the other VG_(*_end) variables much clearer.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2672
2004-09-07 23:04:49 +00:00
Nicholas Nethercote
0c56e65d07 Arch-abstraction:
- factored out pointercheck setup.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2671
2004-09-07 22:38:23 +00:00
Nicholas Nethercote
d5e1fb3c1d Arch-abstraction:
- factored out the setting of machine registers used when attaching the
  debugger.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2670
2004-09-07 22:22:39 +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
2a1a81befa Arch-abstraction: arch-neutralise the startup message.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2667
2004-09-06 15:34:37 +00:00
Nicholas Nethercote
f10521610a Arch-abstraction: minor name change of params.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2666
2004-09-06 15:14:46 +00:00
Nicholas Nethercote
a906ab7cf4 Remove unnecessary #includes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2665
2004-09-05 22:25:13 +00:00
Nicholas Nethercote
80a9f0fe45 Arch-abstraction:
- replaced some x86-specific register mentions with arch-neutral ones.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2664
2004-09-05 22:02:33 +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
04ae0fb5c2 Move env variables out of core_asm.h into core.h, where they should be.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2662
2004-09-05 20:39:51 +00:00
Nicholas Nethercote
8762c939f2 Simplify calculation of VG_(shadow_end) to avoid an obscure bug on Paul M's PPC
port caused by rounding errors.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2661
2004-09-04 15:53:35 +00:00
Nicholas Nethercote
49eea042c1 Arch-abstraction: introduce constants for min and max instruction sizes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2660
2004-09-04 15:28:37 +00:00
Nicholas Nethercote
b392873e38 Removed x86/ume_archdefs.h; moved CLIENT_BASE into x86/core_arch.h.
(CLIENT_BASE wasn't really part of UME.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2659
2004-09-03 23:25:33 +00:00
Nicholas Nethercote
e8b7f64002 Removed x86/ume_arch_defs.c, which just defined the never-used variable
CLIENT_START.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2658
2004-09-03 14:24:22 +00:00
Nicholas Nethercote
eea34ddbd6 Avoid spurious warning about using posix_memalign()
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2657
2004-09-03 14:04:40 +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