Commit Graph

3287 Commits

Author SHA1 Message Date
Nicholas Nethercote
dc09fec388 Introduced get_pszB() to cover several common cases.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4154
2005-07-17 18:12:00 +00:00
Nicholas Nethercote
b04d33383d tweaks
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4153
2005-07-17 18:00:57 +00:00
Nicholas Nethercote
325aa03f8a Introduce get_bszB() and get_bszB_as_is() to factor out some common
combinations of function calls.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4152
2005-07-17 17:55:42 +00:00
Nicholas Nethercote
c7461d15cd Replace is_inuse_bszB() with is_inuse_block(), which is higher-level
and thus makes the code that uses it easier to understand.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4151
2005-07-17 17:20:30 +00:00
Nicholas Nethercote
7fb39f11e8 Rename 'other' as 'other_b' to make the fact it's a block more clear.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4150
2005-07-17 17:12:24 +00:00
Nicholas Nethercote
fad8fd1571 Make VG_(percentify)() cope if the denominator is zero.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4149
2005-07-17 16:16:41 +00:00
Nicholas Nethercote
234a4c5d54 Fix comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4148
2005-07-17 16:12:59 +00:00
Cerion Armour-Brown
fbf125e1c8 xml output for tool=none is fine too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4147
2005-07-13 14:18:24 +00:00
Nicholas Nethercote
1b5839b47a Fixed bug #88678 -- debug info is now correctly gathered for files
containing spaces.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4146
2005-07-12 23:28:59 +00:00
Nicholas Nethercote
d5349f32e6 Remove dead code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4145
2005-07-10 16:57:24 +00:00
Nicholas Nethercote
f866282919 Remove very old info about the CVS repo at Sourceforge.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4144
2005-07-10 15:10:29 +00:00
Julian Seward
cc206745a8 Get rid of endianness assumptions in the PRRAn macro, which is
important for doing checks of scalar syscall args.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4143
2005-07-10 00:55:26 +00:00
Julian Seward
f13ea11bf8 Clean up endianness macros a bit. Now pub_tool_basics.h defines
VG_LITTLEENDIAN or VG_BIGENDIAN and that's what should be used.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4142
2005-07-10 00:53:42 +00:00
Julian Seward
aa9e22bf1f Fix up ppc32-linux stack unwinding.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4141
2005-07-09 22:51:08 +00:00
Julian Seward
8bbf43ab9c Add comments from PaulM.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4140
2005-07-09 10:43:45 +00:00
Julian Seward
2aa48b8c3a Another seemingly-small but critical change imported from 2.4.0-ppc:
don't read symbols from sections with w permissions.  For some reason
ppc-linux maps executables three times, not twice as on x86, and if
the w flag is ignored, we wind up reading debug info twice, getting
wrong redirections, and then it all goes to hell in a handbasket.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4139
2005-07-09 10:36:25 +00:00
Julian Seward
eeb4b800cd Import sigframe stuff from Paul's tree. With this and the other changes
today, it's possible to run bash on ppc32-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4138
2005-07-08 18:28:40 +00:00
Julian Seward
838feccb32 Oops, this really should have been part of r4136.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4137
2005-07-08 18:27:22 +00:00
Julian Seward
f0a3bf7e08 Fix/reinstate a whole bunch of syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4136
2005-07-08 18:26:37 +00:00
Julian Seward
48bba19840 Assertion-failure-avoiding hacks from Paul's tree. I don't know why
these are necessary, but they are.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4135
2005-07-08 18:25:13 +00:00
Julian Seward
38c03a213e A longer gdb-attach delay for ppc
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4134
2005-07-08 18:24:04 +00:00
Julian Seward
1ef4de1022 Check the obvious ..
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4133
2005-07-08 18:23:40 +00:00
Julian Seward
1f69df95cc Comment wibble.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4132
2005-07-08 09:46:53 +00:00
Julian Seward
cdf83f1302 Don't bomb cachegrind at startup.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4131
2005-07-08 09:45:43 +00:00
Nicholas Nethercote
91c18e835e Add a simple random number generator to m_libcbase so we don't have
to use the one from glibc.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4130
2005-07-08 04:08:59 +00:00
Julian Seward
87b4da1f0b Create and use bigendian versions of MC_(helperc_{LOAD,STORE}V{2,4,8}).
This involved some serious nastyness from the Department of Cpp Abuse.

Memcheck still bombs on ppc32 for unknown reasons.

There are still endianness issues within these functions, I think.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4129
2005-07-08 01:29:33 +00:00
Julian Seward
44d914f206 Enable a couple more syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4128
2005-07-08 00:18:25 +00:00
Julian Seward
a3e1759850 Add a nested-functions test from Lee Kindness.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4127
2005-07-07 14:29:21 +00:00
Julian Seward
55ecc47ee6 Don't allow vex to chase into any block for which we might want to create
a self-checking translation.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4126
2005-07-07 13:52:53 +00:00
Julian Seward
14a5be1fc4 Self-modifying-code check for amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4125
2005-07-07 13:20:31 +00:00
Julian Seward
96bafc6a64 Update expected output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4124
2005-07-07 11:32:37 +00:00
Julian Seward
c855dc3352 Modify this test so it no longer uses client requests, but instead
relies on --smc-support=all to work correctly.  Hence it tests the
s-m-c support at least on x86.  Jump through various hoops to defeat
vex's basic-block-chasing optimisation, which has an annoying habit of
making this test work correctly even without --smc-support=all.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4123
2005-07-07 11:24:14 +00:00
Julian Seward
50773ee7a1 Support for self modifying code on unfriendly platforms (x86, amd64)
via the use of self-checking translations.  (Friendly platforms which
have icache-invalidation instructions we can observe, such as ppc32,
are already handled correctly.)  This should finally fix the
longstanding problem of V incorrectly handling calls of statically
nested functions (a gcc extension), and more generally make it a lot
easier to use V to debug dynamic code generation systems.

Since self-checking is a large performance overhead, there is some
control via a command line flag:

   --smc-support=none 

      Don't make any translations self-checking.

   --smc-support=stack

      Add checking code for translations taken from segments which
      have the SF_GROWDOWN flag set -- stacks, basically.
      This is the default.  It should make gcc nested functions and
      GNU Ada work correctly with no intervention from the user.

   --smc-support=all

      Make all translations self-checking.  This is expensive and 
      you want to do this if you're debugging a JIT compiler or
      some such.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4122
2005-07-07 10:05:05 +00:00
Julian Seward
cc67163f1e rm unused code
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4121
2005-07-07 08:22:51 +00:00
Julian Seward
a129ed5c4c This is x86 specific; re-home accordingly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4120
2005-07-06 20:22:16 +00:00
Julian Seward
2a50764852 smc1 is an x86-specific test; re-home it accordingly. (How did this
one evade detection for so long?)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4119
2005-07-06 20:03:43 +00:00
Julian Seward
2613087077 --time-stamp=yes is incompatible with --xml=yes, at least for the moment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4118
2005-07-06 19:46:48 +00:00
Julian Seward
613e5c540e Scan the entire BB looking for "bogus literals"* before instrumenting
any of it, so as to avoid any problems arising from switching from one
scheme to the other half-way through.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4117
2005-07-06 19:42:23 +00:00
Julian Seward
af88ef1f2d Add a regression test for memcheck's ability do deal with partially
defined operands in equality comparisons.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4116
2005-07-06 19:01:53 +00:00
Julian Seward
b59cbb45c8 Extensively re-analyse, re-check and revise the scheme for expensive
handling of integer EQ/NE, which can sometimes do better than the
naive scheme when the inputs are partially defined.  I never was
convinced it was correct before, but now I am.  Regtest to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4115
2005-07-06 18:48:59 +00:00
Nicholas Nethercote
fdeaecb9e1 Rename VG_(get_obj)() as VG_(find_seginfo) to be more consistent
with the other function names.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4114
2005-07-06 13:19:11 +00:00
Julian Seward
596670b543 This test is nonsensical for ppc; it only applies to x86 and amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4113
2005-07-06 08:38:19 +00:00
Tom Hughes
6bb6482488 Define the system call numbers for pread64 and pwrite64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4112
2005-07-06 08:17:07 +00:00
Tom Hughes
9fe595a2d3 Enable some more amd64 syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4111
2005-07-05 23:34:44 +00:00
Tom Hughes
fcf186b9c8 Sort out the mess that is pread64/pwrite64 properly. All three platforms
that we currently support use the same handlers in the kernel without any
platform specific wrappers.

The final argument is a 64 bit argument however, which means that it
requires two registers on x86 and ppc32 and only one on amd64. The
reason it works in the kernel is that x86 and ppc32 calling conventions
inside the kernel work out correctly and the values get joined together.

For our purposes we make x86 and ppc32 use the generic veneer with
five arguments and amd64 use a platform specific one with four...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4110
2005-07-05 23:25:17 +00:00
Cerion Armour-Brown
dde3a8c6d3 set default fpu, altivec control words in dispatch-ppc.S (both zero)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4109
2005-07-05 18:24:22 +00:00
Julian Seward
d8a24e8f50 Disable PIE by default (sorry Tom), even on PIE-enabled platforms. It
causes too much breakage.  PIE builds are still possible, but you have
to say --enable-pie to get them now.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4108
2005-07-05 13:44:21 +00:00
Julian Seward
0ffe0096ce Fix quoting some more. Shell script sucks.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4107
2005-07-05 00:59:08 +00:00
Julian Seward
c6407596f3 Fix quoting a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4106
2005-07-05 00:00:40 +00:00
Julian Seward
3290397af2 Check args a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4105
2005-07-04 23:54:41 +00:00