2141 Commits

Author SHA1 Message Date
Nicholas Nethercote
47f044d1f2 Record important info about Segments and SegInfos.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4059
2005-06-30 00:54:02 +00:00
Julian Seward
71677bc130 acroread-5.06 for x86-linux requires up to 598 CIEs. Bump the array
size accordingly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4058
2005-06-30 00:22:38 +00:00
Nicholas Nethercote
4560b81e33 Avoid magic numbers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4057
2005-06-30 00:16:02 +00:00
Julian Seward
2a0a78dffe A couple more XML cases that slipped through the net.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4056
2005-06-30 00:10:16 +00:00
Julian Seward
bef467758b XML output wibble (purely decorative)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4055
2005-06-29 23:38:33 +00:00
Julian Seward
d84d0a72ff XML printing fixes for printing to file descriptors.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4054
2005-06-29 23:15:56 +00:00
Julian Seward
dd954f7da0 It's official. I am a moron.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4053
2005-06-29 17:12:28 +00:00
Julian Seward
a609b352a9 ppc32: reinstate collection of cache-line-size info from the auxv
array at startup.  This is used in m_transtab.  However this info is
not yet fed to Vex, so it's still important to zero-out the auxv field
holding cache line size info passed to the client, so as to stop the
client's glibc using dcbz.  This will be fixed.

Also get rid of a bunch more ppc32-specific vdso stuff in m_main that
doesn't need to be done.  This now means ppc32-linux specifics in
m_main are only marginally intrusive than the x86-linux or amd64-linux
specifics in m_main.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4052
2005-06-29 10:16:14 +00:00
Julian Seward
3785945d45 Get rid of some VDSO finding stuff which was ifdef VGP_ppc32_linux but
apparently pointless as per recent mail from PaulM since ppc32-linux
does not use VDSOs yet.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4051
2005-06-29 08:46:30 +00:00
Nicholas Nethercote
8255b8049e Fix off-by-one error that was causing four leak-checking regression test
failures for me, and also fixes bug #106293 for me.  Let's hope it has 
the same effect for others.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4046
2005-06-28 22:38:24 +00:00
Nicholas Nethercote
b9bec5539d Remove all the completely unused SF_* flags. I suspect some of the
remaining ones have no interesting effect, but I left them in.

Also simplify the signature for VG_(get_memory_from_mmap_for_client)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4045
2005-06-28 22:14:53 +00:00
Nicholas Nethercote
daa92e5209 Free memory in the error case. Fixes bug #103168.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4043
2005-06-28 19:20:46 +00:00
Julian Seward
b0dc7633a7 Change scope from VG_ to ML_ various assembly symbols to do with doing
syscalls for the client.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4042
2005-06-28 19:04:51 +00:00
Julian Seward
0ca1bd00b3 Remove prototype which is not of a fn exported by this module and
in any case is actually a module-local fn for m_syswrap.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4041
2005-06-28 18:51:35 +00:00
Nicholas Nethercote
1e4188a229 Fix comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4040
2005-06-28 02:54:52 +00:00
Nicholas Nethercote
7d5f7ed468 Don't mark segments as SF_FIXED when VKI_MAP_FIXED isn't specified.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4039
2005-06-28 02:45:29 +00:00
Julian Seward
37e2360ce7 Comment wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4038
2005-06-28 00:12:31 +00:00
Nicholas Nethercote
2bc8de1439 While we're not printing stacktraces from assertion failures, might
as well disable pp_sched_status() -- which produces traces that are less
useful than the main one that has been disabled -- and break the
circular dependence between m_libcassert and m_threadstate.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4036
2005-06-26 20:50:05 +00:00
Nicholas Nethercote
1474691624 Break up VG_(show_BB_profile)(), and move half of it into m_main. This
removes m_transtab's dependence on m_translate (breaking a circular
dependence) and m_debuginfo, hooray.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4035
2005-06-26 20:44:48 +00:00
Nicholas Nethercote
1273f0df14 Combine the percentify() functions from Cachegrind and m_transtab into
a single more general one exported from m_libcprint.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4034
2005-06-26 18:43:40 +00:00
Nicholas Nethercote
7f2ab70714 Remove empty sanity check function. And clean up sanity checking in
m_scheduler a little.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4033
2005-06-26 17:26:22 +00:00
Nicholas Nethercote
88b532de40 Simplify atfork to only provide the functionality we need.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4032
2005-06-26 15:11:37 +00:00
Nicholas Nethercote
f87b53e9d9 Don't include headers from headers -- make inclusions explicit in all C
files.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4031
2005-06-26 14:48:23 +00:00
Julian Seward
f248bca126 Fix 32-bit-ish looking assumption.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4029
2005-06-26 11:56:32 +00:00
Nicholas Nethercote
c8f13ea9d3 Cleaned up m_redir.c: renamed some variables and functions, added some
comments, neatened the debugging output, avoided unexpected side-effects
in functions, tweaked code to make it clearer.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4028
2005-06-26 04:49:25 +00:00
Nicholas Nethercote
cc404a9c03 If read_lib_symbols() fails, once again discard the SegInfo.
And some other minor cleanups.






git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4027
2005-06-26 02:19:17 +00:00
Nicholas Nethercote
e7aa6b03de Made m_debuginfo not depend on m_aspacemgr, breaking the direct circular
dependence between them.  (There's still an indirect one via m_libcmman.)

As a result, I was able to move the Segment type declaration into
pub_core_aspacemgr.h, which is a much better spot.  I was also able to
remove a couple of #includes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4025
2005-06-25 20:49:33 +00:00
Nicholas Nethercote
4b4e694fef Avoid m_redir.c importing priv_symtab.h.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4024
2005-06-25 20:22:43 +00:00
Nicholas Nethercote
59b976a10e Remove unneeded cases from match_lib.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4023
2005-06-25 20:13:05 +00:00
Nicholas Nethercote
07965f509c avoid compiler warning
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4022
2005-06-25 19:52:02 +00:00
Nicholas Nethercote
58b0509c03 Rename functions to make the type involved clearer.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4021
2005-06-25 19:51:33 +00:00
Nicholas Nethercote
1708cccb0d Make the is_stage2 test work when running Valgrind in-place in a
source tree.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4020
2005-06-25 19:45:34 +00:00
Nicholas Nethercote
b6a7de7795 Remove the Segment back-pointer from SegInfo. The only place it was
being used was in resolve_redir(), and due to the way resolve_redir()
is called, the involved test was always failing anyway.  So we lose
nothing by removing it except some complexity -- there is no longer a
circularity between Segments and SegInfos.







git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4019
2005-06-25 19:33:50 +00:00
Julian Seward
e6094b5400 Do not print backtraces in assertion failures. This is an as-yet
unsuccessful attempt to remove m_libcassert from the huge cycle which
most of the modules currently live in.

VG_(get_StackTrace2) can now be privatised, but I haven't done so yet.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4018
2005-06-25 15:22:10 +00:00
Nicholas Nethercote
63bf761416 Moved the mman VG_(*_native)() functions into m_aspacemgr, and removed
the unused init_shadow_page() function.  As a result, m_aspacemgr no longer
depends on m_libcmman, breaking a circular module dependency, good!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4015
2005-06-24 22:17:38 +00:00
Nicholas Nethercote
5986d3e25f Fix bug #107524 -- epoll_ctl does not access 'events' if it's a
EPOLL_CTL_DEL invocation.

Also renamed our "struct epoll_event" to "struct vki_epoll_event" as it
should be called.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4014
2005-06-24 21:41:28 +00:00
Nicholas Nethercote
8d861507df Remove out-of-date comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4013
2005-06-24 15:40:01 +00:00
Cerion Armour-Brown
5ce68877be Enabled a bunch more syscalls
A few simple progs make it through memcheck now - bzip2, gzip, xfontsel



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4012
2005-06-24 15:26:49 +00:00
Nicholas Nethercote
128115f4df "make dist" fixes from Ralf Wildenhues.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4010
2005-06-24 13:45:56 +00:00
Nicholas Nethercote
f4ee5eee2a Moved Robert's stack tracking code out of m_aspacemgr into a new module
m_stacks, because it's a nicely distinct and stand-alone piece of
functionality.  This happily removes m_aspacemgr's dependence on
m_mallocfree (there was an apparent dependence due to the #include, even if
it didn't manifest itself in practice -- very important!) and m_options (not
so important).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4009
2005-06-24 03:28:30 +00:00
Julian Seward
de2a4b30fd Disable debug printing by default so we have any hope of getting
regtest passes on ppc32-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4007
2005-06-23 22:37:56 +00:00
Julian Seward
b0c84aea55 Kludge up wait_for_gdb even more.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4006
2005-06-23 21:37:47 +00:00
Cerion Armour-Brown
c259dd1e6d VG_() -> ML() for ppc32, amd64
(plus a few scattered ones in comments etc)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4003
2005-06-23 07:52:54 +00:00
Nicholas Nethercote
d463dd2292 Removed the VGA_/VGO_/VGP_ prefixes for arch/OS/platform-specific
things.  These made sense when the arch/OS/platform-specific code was in
one module, but as that code got mixed in with generic code the boundary
between generic and non-generic blurred, and the distinction made less
sense.  So let's get rid of them.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4002
2005-06-23 03:27:57 +00:00
Nicholas Nethercote
d35537f51f Removed some repetition in the way VG_(record_fd_open)() is called.
As part of this, VG_(resolve_filename)() no longer calls VG_(malloc)()
and so m_libcfile no longer depends on m_mallocfree.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4001
2005-06-23 02:26:47 +00:00
Julian Seward
9cb0696641 For symbols which have C-level global scope but which we regard as
module-local, use the new ML_ prefix instead of VG_.  This makes it
trivial to see which names are those exported from public module
interfaces: precisely those using VG_.

/* VG_ is for symbols exported from modules.  ML_ (module-local) is
   for symbols which are not intended to be visible outside modules,
   but which cannot be declared as C 'static's since they need to be
   visible across C files within a given module.  It is a mistake for
   a ML_ name to appear in a pub_core_*.h or pub_tool_*.h file.
   Likewise it is a mistake for a VG_ name to appear in a priv_*.h
   file. 
*/



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4000
2005-06-23 01:02:53 +00:00
Donna Robinson
b655e45a8e argh! there were loads of the little beggars ....
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3999
2005-06-23 00:17:51 +00:00
Tom Hughes
9e0e782654 Declare my_sigreturn as static. This is correct in so much as it isn't
used anywhere else, but it does cause gcc to issue a warning because
it doesn't realised that the assembly code has defined the function.

The reason for changing it to static despite the warning is that when
it is declared extern PIE builds break on amd64 because gcc generates
code that does a load from the address of the my_sigreturn symbol to
get address of the function instead of just computing the address of
the symbol. In other words it generates this:

  mov -212(%rip), %rax

to get the address of the function instead of this:

  lea -212(%rip), %rax

Obviously this breaks things because we store the wrong address as
the signal restorer when installing the signal handler...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3996
2005-06-22 12:11:42 +00:00
Nicholas Nethercote
2b8699a483 Remove VG_(getcwd_alloc)(), which can be done otherwise pretty easily.
This halves m_libcfile's dependence on m_mallocfree.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3995
2005-06-21 23:44:58 +00:00
Nicholas Nethercote
ba5255ccdc Make search_all_symtabs() work in the same way as search_all_loctabs()
and search_all_scopetabs(), ie. search through SegInfos instead of Segments.
This reduces m_debuginfo's dependency on m_aspacemgr.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3994
2005-06-21 23:09:45 +00:00