Commit Graph

1847 Commits

Author SHA1 Message Date
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
Nicholas Nethercote
c8b2709153 Tweaked comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2655
2004-09-02 16:25:49 +00:00
Nicholas Nethercote
397446e355 Arch-abstraction:
- removing the directories arch/x86-linux and arch/x86-freebsd, the contents of
  which were never actually used.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2654
2004-09-02 16:05:20 +00:00
Nicholas Nethercote
214cef4573 Arch-abstraction: add comment explaining header hierarchy.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2653
2004-09-02 16:02:58 +00:00
Nicholas Nethercote
3a59d9013f Update docs for filename change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2652
2004-09-02 15:50: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
2221d976a8 Arch-abstraction: whoops II, forgot to add the (residual) vg_skin.h, which just
points to tool.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2649
2004-09-02 08:55:34 +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
Nicholas Nethercote
13a74aa53a Arch-abstraction: renamed "vg_skin.h" as "tool.h". Kept a residual vg_skin.h
(which just #includes tool.h) for backward-compatibility.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2647
2004-09-02 08:51:43 +00:00
Nicholas Nethercote
fef3e74483 Remove unnecessary #include statement.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2646
2004-09-02 08:18:07 +00:00
Nicholas Nethercote
6a5de86389 Arch-abstraction: renamed "vg_include.h" as "core.h" (a few that I missed in
my previous commit).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2645
2004-09-02 08:10:13 +00:00
Robert Walsh
ef335b7ad1 Fix some vg_include.h references.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2644
2004-09-02 00:31:02 +00:00
Nicholas Nethercote
ba210a6364 Arch-abstraction step: renamed "vg_include.h" as "core.h".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2643
2004-09-01 23:58:16 +00:00
Nicholas Nethercote
a32b040099 Update .cvsignore for recently added regression tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2642
2004-09-01 23:34:37 +00:00
Nicholas Nethercote
acd57ac595 Use Makefile.am includes. This gets rid of 110 lines of repetitive Makefile.am
cruft, yay!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2641
2004-09-01 23:20:49 +00:00
Nicholas Nethercote
a03b974a90 'valgrind' (ie. stage1) does not need to be installed in $PREFIX/lib/valgrind/;
$PREFIX/bin/ is enough.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2640
2004-09-01 11:33:35 +00:00
Tom Hughes
19bd50ea16 Move the include of linux/fs.h before the include of sys/un.h as the
latter includes string.h on some older systems which then causes
problems when linux/fs.h includes linux/string.h due to it turning
various string functions into pre-processor macros.

This was the problem behind bug #87820 which actually had nothing to
do with gcc 2.95 and everything to do with the glibc and kernel
headers that the system had installed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2639
2004-09-01 07:31:12 +00:00
Tom Hughes
9a416ac766 Make some of the parallel port ioctls conditional as older systems
don't have them defined.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2638
2004-09-01 07:29:08 +00:00
Julian Seward
5980962b82 HEAD now reports 2.3.0.CVS.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2637
2004-08-31 16:26:27 +00:00
Julian Seward
ee716258dc --> 2.2.0
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2635
2004-08-31 00:15:19 +00:00
Julian Seward
9e22a94ec3 version -> 2.2.0
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2634
2004-08-31 00:15:02 +00:00
Julian Seward
3e72b87999 Hopefully final changes for 2.2.0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2633
2004-08-31 00:14:02 +00:00
Julian Seward
d4262b160d Add comments about limitations wrt self-modifying code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2632
2004-08-31 00:13:10 +00:00
Tom Hughes
476075730e Add vki_itimerspec definition for POSIX timer support.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2631
2004-08-30 20:31:35 +00:00
Tom Hughes
0cd1d01031 Add support for POSIIX clocks and timers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2630
2004-08-30 19:50:02 +00:00
Nicholas Nethercote
78cb64cc71 Print a message if shadow memory cannot be allocated, rather than just
asserting.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2629
2004-08-30 19:36:42 +00:00