Commit Graph

2256 Commits

Author SHA1 Message Date
Nicholas Nethercote
5cc18c19a2 Moved the variable VGOFF_(m_eip) from x86, and moved it (and its
computation) into the generic core, because it's needed by the dispatch
loop of all archs.  Also renamed it VG_(instr_ptr_offset), which is
clearer.  Since it was the last use of the VGOFF_ prefix, I removed that
prefix.  

Also cleaned up the ARM stubs slightly, by removing some of the copied,
commented-out x86 code which has since fallen out of date with the real
x86 code and was thus misleading.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3123
2004-11-27 14:27:21 +00:00
Nicholas Nethercote
c40ff3902e Fix a couple of minor ARM things -- frame pointer is R11, it seems, and
programs get loaded at 0x00008000.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3122
2004-11-27 13:42:42 +00:00
Nicholas Nethercote
6677759f45 Rename $VG_ARCH/signal.c and $VG_ARCH/signals.c, to make
coregrind/vg_signals.c.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3121
2004-11-27 13:37:33 +00:00
Nicholas Nethercote
4399d9700f Added beginnings of an ARM port, to the point where it compiles. It does not
run, though.  There are lots of stubs to be filled in.  (The asm ones currently
just have "swi" in them, which seems to cause seg faults.) 

Also, some of the macros are decided dubious, especially:

  ARCH_* are bogus
  SYSCALL_RET is bogus
  PLATFORM_SET_SYSCALL_RESULT is bogus
  not sure about SET_SYSCALL_RETVAL
  FIRST_STACK_FRAME et al -- bogus?
  VG_MAX_JUMPS ?

And in stage2.lds, the 0x8048000 is almost certainly wrong


This required some tweakings of the core:
- some of the vki_*.h kernel types were fixed up

- had to disable the AM_PROG_CC_C_O macro in configure.in, because automake
  (autoconf?) didn't like it...

- some "#ifdef __x86__" guards were introduced, for nasty x86 things I don't
  yet know how to factor out (trampoline page muck, sysinfo page muck).

- fixed a minor stupidity in vg_proxylwp.c.

- moved the ptrace wrapper into the x86-linux part

- had to change the intercept mangling scheme, to use 'J' instead of '$' as the
  escape char because GCC didn't like '$'.  This is all very dubious, and only
  works because none of our intercepted symbols contains a 'J'.  To be fixed up
  ASAP.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3120
2004-11-26 19:34:36 +00:00
Julian Seward
26e2eb2b4a When doing pessimistic lazy propagation through a dirty helper call,
do not consider inputs from those parts of the guest state marked as
read (or modified) which which are declared to be always-defined, and
dually do write outputs to those parts of the guest state written (or
modified) which are declared to be always-defined.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3119
2004-11-26 19:17:47 +00:00
Nicholas Nethercote
64af386b3e Simplified the way Cachegrind configures the caches; it was really
strange before.  Also aborting if any command-line-provided cache
configuration is unacceptable, rather than falling back on defaults;
it's simpler and arguably better than just emitting a warning.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3118
2004-11-26 18:36:02 +00:00
Julian Seward
4c21141359 More debug printing for redirections (disabled).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3117
2004-11-26 15:06:13 +00:00
Julian Seward
45c0182176 When creating a child, copy the parent's .vex/.vex_shadow into it so
as to give it a sane starting state.  This may not be the Right
Answer, but it fixes regtest failure 'susphello' and doesn't break
anything else.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3116
2004-11-26 15:04:24 +00:00
Nicholas Nethercote
e8c0f0e619 Disable core dumps, and remove the previous attempts at factoring out
the arch-specific bits, which were just plain wrong.  This is a problem for a
later day.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3115
2004-11-26 14:07:24 +00:00
Julian Seward
ccf7094e69 When VEX bombs, exit in a more understandable way.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3114
2004-11-26 13:49:59 +00:00
Julian Seward
544e6d1d14 Move declarations of some thread-return-code values from Valgrind to
VEX.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3113
2004-11-26 13:25:17 +00:00
Nicholas Nethercote
1d8a68900b Fix this test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3112
2004-11-26 12:54:07 +00:00
Nicholas Nethercote
dc4ad41b16 Rename arch_thread_aux_t --> ThreadArchAux, to match ThreadArchState.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3111
2004-11-26 12:44:19 +00:00
Julian Seward
4517436fe7 Second (failed) attempt to get cmdline2 to work right.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3110
2004-11-26 12:37:10 +00:00
Julian Seward
0af14fc436 Update expected output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3109
2004-11-26 12:00:02 +00:00
Julian Seward
78e6eed82a Fix overly-restrictive assertion causing many threaded programs to
fail.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3108
2004-11-26 11:57:41 +00:00
Nicholas Nethercote
9171a07599 Reinstated Helgrind and Cachegrind; at least, they are included in
compilation now.  They both don't work, as I made the minimal changes
necessary to get them compiling (eg. both of the TL_(instrument)()
functions were commented out and replaced with a stub).

This means that 'make dist' should more or less work again, which is
necessary for my playing with the XML documentation.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3107
2004-11-26 11:30:14 +00:00
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
596305a4fb Forgot to remove this line when I removed the x86-specific tests the
other day.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3105
2004-11-26 10:42:26 +00:00
Nicholas Nethercote
fdccda9d04 Removed mc_helpers.S, which is no longer used.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3104
2004-11-26 10:35:44 +00:00
Julian Seward
9015db7090 run_thread_for_a_while: ensure the guest state layout of the thread
which we're just about to run matches Vex's assumptions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3103
2004-11-25 22:50:17 +00:00
Nicholas Nethercote
ad9d745590 Reinstate Massif.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3102
2004-11-25 18:04:54 +00:00
Nicholas Nethercote
ead76e69ac Removing the insn_* tests from helgrind, memcheck, addrcheck and
cachegrind, because having them there doesn't add anything beyond that
tested in 'none'.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3101
2004-11-25 17:47:43 +00:00
Julian Seward
f22c255940 Fix another potentially-failing use of get_current_tid(), in
proxy_sendsig().  Fixes the pth_blockesig regression test.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3100
2004-11-24 21:24:24 +00:00
Nicholas Nethercote
3004b39874 Remove now-unnecessary macro.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3099
2004-11-24 18:58:41 +00:00
Nicholas Nethercote
f35aa3afc8 Whoops, unbreak syscall number checking.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3098
2004-11-24 18:31:40 +00:00
Nicholas Nethercote
9680327dd9 Cleanups:
- move things around so that each arch doesn't duplicate stuff to do with
  VG_(do_thread_syscall)().
- enum PXState doesn't need to be visible outside vg_proxylwp.c



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3097
2004-11-24 18:14:41 +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
398ce0c269 Cleanups, mostly for the baseBlock removal.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3095
2004-11-24 16:43:43 +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
ef30c84f5f Update comments for the renaming of arch_thread_t.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3092
2004-11-24 10:55:37 +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
230e9ae419 Clean slightly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3089
2004-11-23 19:10:18 +00:00
Nicholas Nethercote
45ef5a7794 Remove out-of-date comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3088
2004-11-23 18:42:54 +00:00
Nicholas Nethercote
a228498ff4 Comment-only changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3087
2004-11-23 18:19:29 +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
f8c1231b7b Several unrelated changes:
- don't use AS_STRING_HELP, as older autoconfs don't like it
- fix a minor stupidity about the GDB path
- allow amd64 as a platform (wee!)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3085
2004-11-23 17:52:24 +00:00
Nicholas Nethercote
9f2118c217 Fix this regression test to account for the fact that FP regs are now
checked for definedness errors lazily, just like integer regs.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3084
2004-11-23 17:19:53 +00:00
Nicholas Nethercote
f7d26d172b Make these work again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3083
2004-11-23 17:13:58 +00:00
Nicholas Nethercote
df5bff4df4 Make Vex less verbose, so the regression tests work again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3082
2004-11-23 17:10:15 +00:00
Nicholas Nethercote
6cc0d4c473 Add a mandatory --with-vex option to configure script.
Also, fix a Makefile so that Memcheck's regtests all build again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3081
2004-11-23 16:31:56 +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
Julian Seward
046709cedf Add enough gunk to configure.in to get through ./configure on
armv4l-unknown-linux-gnu.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3079
2004-11-23 01:17:29 +00:00
Julian Seward
8b477e3dd8 Get rid of the high/low baseblock distinction. Pointless in a way
since baseblock itself will soon enough bite the dust.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3078
2004-11-23 00:50:25 +00:00
Julian Seward
f91c2f24bb Get rid of the machinery for registering helper functions. VEX calls
them directly.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3077
2004-11-23 00:40:33 +00:00
Julian Seward
cf98fcdf2f Point back to my VEX tree. This needs to be fixed with high priority.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3076
2004-11-23 00:39:29 +00:00
Julian Seward
166033939c Do our own implementations of strchrnul() and rawmemchr().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3075
2004-11-23 00:20:17 +00:00
Nicholas Nethercote
86751c1c2e Removed now-defunct read/write checks for FPU ops.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3074
2004-11-22 21:29:38 +00:00