Commit Graph

2191 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
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
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
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
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
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
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
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
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
Nicholas Nethercote
f41f28519b Tweak debug output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4103
2005-07-03 20:22:39 +00:00
Nicholas Nethercote
e67b65d0eb Changed m_hashtable.c to allow the size of the hash table to be specified
when it is created.  Fortunately this didn't affect code outside this
module except for the calls to VG_(HT_construct)().

As a result, we save some memory because not all tables have to be as big
as the ones needed for malloc/free tracking.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4100
2005-07-03 17:53:11 +00:00
Nicholas Nethercote
dd80a229b4 whoops
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4099
2005-07-03 17:10:04 +00:00
Nicholas Nethercote
fbf8653c8b Removed the remnants of the attempt at an ARM port, because it had
bit-rotted badly and was clogging up the code.

I put the useful remnants in docs/porting-to-ARM in case anyone ever
wants to try porting to ARM again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4092
2005-07-02 23:13:59 +00:00
Julian Seward
e0387c7153 Make the unique tags printed on XML errors actually unique.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4091
2005-07-02 21:16:30 +00:00
Nicholas Nethercote
d50a75cd1a Fixed 'make dist'. In particular, all the arch/platform-specific files
get included in the distro now, not just the ones for the arch/platform
that the distro tarball is built on.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4085
2005-07-02 17:36:11 +00:00
Julian Seward
543c26c8cb Try to make (client) clone() work for ppc32-linux. I don't know if I
was successful for real uses of clone, but fork-disguised-as-clone
appears to work now.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4082
2005-07-02 11:27:02 +00:00
Julian Seward
40bed2ce44 A few more syscalls for ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4081
2005-07-02 10:13:34 +00:00
Julian Seward
148e947e00 Implement VG_(getsockname), VG_(getpeername), VG_(getsockopt) for ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4080
2005-07-02 10:13:05 +00:00
Nicholas Nethercote
142a621c4e ah, crap
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4079
2005-07-02 02:56:02 +00:00
Nicholas Nethercote
60dbf0cbc8 Remove unnecesary #includes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4078
2005-07-02 01:59:28 +00:00
Cerion Armour-Brown
2fe8821489 Reinstated a couple more syscalls
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4076
2005-07-01 22:06:55 +00:00
Julian Seward
56e6d3f332 Reinstate wrappers for epoll_{create,wait,ctl}.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4074
2005-07-01 08:39:38 +00:00
Nicholas Nethercote
4e8bcf9076 Move the last remaining tests out of corecheck.
Also introduced VG_(showing_core_errors)() to make core error display
more consistent.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4073
2005-07-01 04:15:36 +00:00
Julian Seward
cd1ddc2f74 Restrict assertion to cache lines we know we need.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4068
2005-06-30 12:11:19 +00:00
Julian Seward
2f997267fa ppc32-linux: Vex implements dcbz correctly now. No need to mess with
the auxv to fool glibc into not using it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4067
2005-06-30 12:10:45 +00:00
Julian Seward
f7c9f26dcb Track Vex API change in r1233 (VexSubArch -> VexArchInfo).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4066
2005-06-30 11:50:11 +00:00
Nicholas Nethercote
7a4e062807 Avoid compiler warning.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4064
2005-06-30 04:09:11 +00:00