1124 Commits

Author SHA1 Message Date
Nicholas Nethercote
73852e1a20 Put VALGRIND_INTERNAL_PRINTF and VALGRIND_INTERNAL_PRINTF_BACKTRACE back in
vg_include.h, where they must be otherwise vg_libtpthread.c has problems.
Added a comment explaining why they must be in vg_include.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2576
2004-08-09 11:15:10 +00:00
Nicholas Nethercote
1246163aab Make VG_(last_run_tid) and VG_(sigstack) local.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2575
2004-08-07 18:16:56 +00:00
Nicholas Nethercote
1094bdc522 De-globalise a few more counters.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2574
2004-08-07 17:52:25 +00:00
Nicholas Nethercote
5b829e7c84 Made cpu-feature detection simpler -- got rid of the confusing global state,
put it all into static state within a single function.  Also, now the callers
of get_cpu_features() don't have to worry about whether it's been called
before.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2572
2004-08-06 17:06:14 +00:00
Nicholas Nethercote
e4c301a9a1 Make error messages more informative.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2571
2004-08-05 12:16:13 +00:00
Nicholas Nethercote
c53c7b1fce handle_SCSS_change() need not be global.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2570
2004-08-04 15:31:30 +00:00
Nicholas Nethercote
35c5699f60 Remove sigshutdown_actions(), a hangover from the --stop-after days.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2569
2004-08-04 15:26:38 +00:00
Nicholas Nethercote
8d4eec319f VG_(get_current_thread_state) doesn't exist, remove declaration.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2568
2004-08-04 14:14:52 +00:00
Nicholas Nethercote
69a2d35283 is_valid_or_empty_tid() doesn't need to be global.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2567
2004-08-04 14:03:16 +00:00
Nicholas Nethercote
4ecbc561da Comment changes only -- compacting
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2566
2004-08-04 10:37:49 +00:00
Nicholas Nethercote
ca80aae259 comment wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2564
2004-08-04 09:57:31 +00:00
Nicholas Nethercote
982a0ff98e Remove VG_() from name of local function.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2563
2004-08-03 23:44:12 +00:00
Nicholas Nethercote
a545bc15cc Tweaked sanity-checking: made function naming more consistent, removed
unnecessarily global functions from vg_include.h, etc.

Also tweaked printing of malloc stats.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2562
2004-08-03 23:14:00 +00:00
Nicholas Nethercote
12a9939d3f Tweak stats printing -- use more consistent function names, improve output
formatting slightly, etc.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2561
2004-08-03 18:08:50 +00:00
Nicholas Nethercote
4842cf8a3f alloc_UCodeBlock didn't need to be in vg_include.h. Also tweaked how it works
slightly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2560
2004-08-03 17:39:06 +00:00
Nicholas Nethercote
c72417803f Moved *definitions* of VALGRIND_INTERNAL_PRINTF and
VALGRIND_INTERNAL_PRINTF_BACKTRACE from vg_include.h to vg_messages.c.  The
*declarations* stayed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2559
2004-08-03 17:26:39 +00:00
Nicholas Nethercote
a71a3c84a5 Simplified the interface to VG_(translate)(), and merged it with
create_translation_for().  Cut about 40 lines of code as a side-effect.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2558
2004-08-03 17:16:51 +00:00
Nicholas Nethercote
e8a789067b Put UCodeBlock get functions in a more sensible place -- moved from vg_needs.c
to vg_translate.c, where the other UCodeBlock functions live.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2557
2004-08-03 15:49:50 +00:00
Nicholas Nethercote
ac6d31fd77 Removed 6 global variables from vg_include.h without even having to add
anything, just by moving VG_(helper_offset)() from vg_from_ucode.c to
vg_main.c.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2556
2004-08-03 15:45:46 +00:00
Nicholas Nethercote
38ff4e69d1 Comment changes only: s/skin/tool/
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2555
2004-08-03 13:29:09 +00:00
Nicholas Nethercote
7bdbf7377f Factor out differences between VG_(system) and PRE(execve). Required moving
mash_colon_env() from vg_syscalls.c to vg_mylibc.c.  Saved 20 lines of code.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2554
2004-08-03 13:08:31 +00:00
Nicholas Nethercote
b960eb25f7 comment wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2553
2004-08-02 16:54:01 +00:00
Nicholas Nethercote
75a8dd5ba2 Removed cruft from vg_scheduler.c:
� things not used any more, eg. global variables
 - removed some things from vg_include.h, making them local -- functions,
   variables and macros
 - other minor clean-ups


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2552
2004-08-02 16:27:40 +00:00
Nicholas Nethercote
3ef40799ac Scheduler counts don't need to be in vg_include.h. Replace with a print
function.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2551
2004-08-02 15:27:22 +00:00
Nicholas Nethercote
033827c0fd whoops, forgot to remove these in the last commit
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2550
2004-08-02 15:19:55 +00:00
Nicholas Nethercote
f8aacadc2b sanity_*_count don't need to be in vg_include.h.
Also hide the reg-alloc counters, and replace with a printing function.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2549
2004-08-02 15:17:43 +00:00
Nicholas Nethercote
11f790685a Sanity counters don't need to be in vg_include.h.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2548
2004-08-02 15:07:57 +00:00
Nicholas Nethercote
16ae73470f Tweak to remove another global variable from vg_include.h
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2547
2004-08-02 13:15:26 +00:00
Nicholas Nethercote
c1804774f3 Make VG_(n_errs_found) local; replace globally with a 'get' function. Renamed
vg_n_errs_suppressed too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2546
2004-08-02 12:36:01 +00:00
Nicholas Nethercote
bde70741c7 Make the Supp and Error types local to vg_errcontext.h; they don't need to be
global.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2545
2004-08-02 12:21:09 +00:00
Nicholas Nethercote
a48bf03eba Fold VG_(send_signal_to_thread)() into vg_scheduler.c, so it doesn't need to be
exported any more.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2544
2004-08-02 12:10:01 +00:00
Nicholas Nethercote
35ea93fb9e Factor out commonality between VG_(synth_fault*)().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2543
2004-08-01 23:06:22 +00:00
Nicholas Nethercote
8e9e99f943 Replaced three global variables in vg_include.h with a single global function;
much neater.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2542
2004-08-01 22:59:18 +00:00
Nicholas Nethercote
9a31e70a79 Cleaned up vg_include.h:
- removed various things that are no longer used
- made (module-)local some things that were global
- improved the formatting in places

Removed about 160 lines of code, and non-trivially reduced the number
of global entities.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2541
2004-08-01 22:36:40 +00:00
Nicholas Nethercote
877d4dd0bd Fix bug #86254 -- symtab sorting was going array in very obscure circumstances
due to a signed/unsigned int problem.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2540
2004-08-01 20:24:46 +00:00
Nicholas Nethercote
baa56adb18 Remove redundant duplicates of stuff in vg_kerneliface.h.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2539
2004-07-30 23:44:30 +00:00
Nicholas Nethercote
0aa2e82fd5 Removed unused VG_AR_CLIENT_STACKBASE_REDZONE_SZW.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2538
2004-07-30 23:36:37 +00:00
Nicholas Nethercote
1eb570df2c Restructured the as_*() functions so they are simpler and there is no implicit
global state -- the state is threaded explicitly through via function arguments
and return values.  ume.c now has no global variables, which is nice.

Also removed a redundant as_pad() call in stage2's main() which meant
layout_client_space() could be merged with layout_remaining_space().

Also removed a couple of no-longer-used variables and #defines.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2537
2004-07-30 21:50:15 +00:00
Tom Hughes
f10c38f7e5 Modify the ipc system call so that only those calls which may block
are treated as blocking.

This fixes bug #86000 because shmat is no longer treated as blocking
and it is therefore no longer possible for two threads to try and use
the same address for the shared memory segment.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2536
2004-07-29 22:40:07 +00:00
Tom Hughes
1afbb3fc45 Modified the fcntl system call so that only those reason codes which
can block (ie F_SETLKW) are treated as blocking.

This resolves the F_SETOWN problem described in bug #85969.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2535
2004-07-29 21:20:11 +00:00
Tom Hughes
b5f08d077f Add support for allowing the POST function for a system call to be called
even when the system call fails, and allow the PRE function to modify the
system call flags.

Also fix nanosleep so that it only marks the returned time as defined
if the system call exited with EINTR due to be interrupted.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2534
2004-07-29 17:44:23 +00:00
Nicholas Nethercote
3dc7eebda2 Merge equivalent if statements.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2533
2004-07-28 16:03:29 +00:00
Jeremy Fitzhardinge
5cb175294a Fix the skiplist brokenness Nick found:
- use a simple memset to initialize the next pointer vector
 - fix some previously unexercised code as a result of the above
Still haven't verified we're actually getting skipping, but it doesn't
crash with a make regtest.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2532
2004-07-27 21:49:23 +00:00
Nicholas Nethercote
4421ac53b7 Added some comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2531
2004-07-26 15:43:57 +00:00
Nicholas Nethercote
c4a06df097 Rename 'argv0' and 'argv1' to the more meaningful 'interp_name' and
'interp_args'.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2530
2004-07-26 15:32:47 +00:00
Nicholas Nethercote
7f9a4f8c64 Neaten up ume.h: don't export readelf(), mapelf, and struct elfinfo; improve
formatting too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2529
2004-07-26 15:28:33 +00:00
Nicholas Nethercote
8375190f69 Remove accidental double assignment. Also don't assume that VG_(client_base)
is zero.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2528
2004-07-26 12:44:35 +00:00
Nicholas Nethercote
dbc191490a Er, actually make this test meaningful. It now aborts correctly if you try to
launch stage2 directly, rather than giving an obscure error about the tool
later on.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2527
2004-07-26 11:11:56 +00:00
Nicholas Nethercote
1c5c73edea Remove unused global variable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2526
2004-07-26 10:22:33 +00:00
Nicholas Nethercote
38e314e56c make non-exported function static
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2525
2004-07-26 10:05:55 +00:00