Commit Graph

3158 Commits

Author SHA1 Message Date
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
Donna Robinson
23523d0ca9 Added some more targets to the docs.
Removed 'the' from 'the default' in 'parial' opt to be consistent
Added opt info for --avoid-strlen-errors (was missing)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4017
2005-06-25 14:43:05 +00:00
Julian Seward
be47f84a2e A small program to read .dot files created by auxprogs/gen-mdg and
compute the strongly connected components in them.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4016
2005-06-25 14:42:34 +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
2d8a34e0f1 Another "make dist" fix from Ralf Wildenhues.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4011
2005-06-24 15:20:52 +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
Nicholas Nethercote
f3b8c7430e Broaden a couple of suppressions so vgtest_ume passes on my machine.
(I wrote this in a commit message the other day, but I'd actually
edited the generated default.supp file rather than the glibc-2.2.supp.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4008
2005-06-24 03:26:54 +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
Donna Robinson
a9b1a6cc57 Added some targets for massif & core options
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4005
2005-06-23 15:30:31 +00:00
Cerion Armour-Brown
98d330a363 Added DivU32,DivS32 to memcheck translation (lazy)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4004
2005-06-23 15:28:34 +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
Donna Robinson
f322c81aac Removed ante-deluvian file
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3998
2005-06-22 23:49:00 +00:00
Nicholas Nethercote
f57e78915d I forgot to remove this a while back.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3997
2005-06-22 18:38:41 +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
Nicholas Nethercote
514f201d55 Added VG_() prefixes to functions exported from m_ume to avoid
namespace pollution.

Also broadened a couple of _dl_* suppressions so that vgtest_ume
passes on my machine.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3993
2005-06-21 23:03:36 +00:00
Nicholas Nethercote
82a9510ad7 Rename ume.c/ume.h as m_ume.c/pub_core_ume.h to be consistent with
all the other modules.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3992
2005-06-21 22:47:54 +00:00
Nicholas Nethercote
16c5981b48 Move VG_(resume_scheduler) to m_signals, and make it local. Reduces
m_signals' dependence on m_scheduler.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3991
2005-06-21 22:27:19 +00:00
Nicholas Nethercote
40a921359c Move VKI_SIGVGKILL and VKI_SIGVGRTUSERMAX out of vki-linux.h since they're
not really from the kernel and they're defined in terms of VG_(max_signal),
which is in m_signals.  Renamed them with the VG_ prefix too, since they're
now not part of the kernel interface.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3990
2005-06-21 22:23:59 +00:00
Tom Hughes
971844953a Redirect the correct address to the vtime vsyscall instead of
redirecting the vgettimofday address to two different places.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3989
2005-06-21 13:26:17 +00:00
Julian Seward
149e115ccb Fix bug causing TINVALs to throw away huge numbers of translations
unnecessarily.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3988
2005-06-21 12:52:38 +00:00
Julian Seward
10a5136151 ppc32-linux build fix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3987
2005-06-21 10:11:36 +00:00
Julian Seward
7d2e233b74 Get ppc32 stage2 linked in the right place, so stage2 can actually start.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3986
2005-06-21 10:07:25 +00:00
Julian Seward
aa449301b4 Un-break the build on ppc32-linux. This whole multiplatform
development deal is much more fragile than single-platform ..



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3985
2005-06-21 09:56:56 +00:00
Nicholas Nethercote
f24d5fa167 wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3984
2005-06-21 04:26:24 +00:00
Nicholas Nethercote
c866712f82 Moved VG_(first_matching_thread_stack), removing m_threadstate's dependency
on m_machine.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3983
2005-06-21 04:01:51 +00:00
Nicholas Nethercote
ba17e79287 Slight reduce m_syswrap's dependence on m_signals by moving
VG_(client_signal_OK)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3982
2005-06-21 03:52:49 +00:00
Nicholas Nethercote
0097c7053a Remove redundancy.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3981
2005-06-21 03:36:01 +00:00
Nicholas Nethercote
493731937c Attempt to fix the stage2.lds borkage.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3980
2005-06-21 03:30:51 +00:00
Nicholas Nethercote
35fc371349 Malloc replacement worked very much like a 'need', but wasn't one.
I've changed it so it now is, which makes it consistent with the
other 'needs'.  Because of this, I was also able to invert the dependence
between m_mallocfree and m_tooliface, which is related to setting
the redzone size for client heap blocks.  As a result, m_tooliface
now doesn't depend on anything except pub_core_basics.h, hooray!
 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3979
2005-06-21 03:20:17 +00:00
Nicholas Nethercote
8220768b9f Tweaked m_tooliface to reduce its dependencies on other things:
- VG_(sanity_check_needs)() now returns a message to m_main if it fails, 
  for m_main to print and abort, rather than printing an error message and
  aborting itself.  This removes the dependency on m_libcprint and
  m_libcassert.

- Passing in an extra param to VG_(sanity_check_needs)() that says if
  shadow memory has been allocated, rather than using
  VG_(get_shadow_size)().  This removes the dependency on m_aspacemgr.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3978
2005-06-21 01:54:38 +00:00
Julian Seward
b36f48842a Simplify the implementation of m_trampoline and the stuff that refers
to it.  Now there are no more offsets and no copying of code into the
stack.  We just redirect directly to entry points in m_syscalls.S.

This will mess up pointercheck, since the redirect targets are now in
Valgrind's address space, not the client's.  But pointercheck is hosed
anyway, and I'd rather back off to something simple whilst ppc32 is
stabilised.  When the address space management stuff is overhauled
then pointercheck may or may not get reinstated, and if it does then
the trampoline stuff will need revisiting.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3977
2005-06-21 01:41:34 +00:00
Nicholas Nethercote
78acf96da0 Don't #include pub_core_stacktrace.h in pub_core_execontext.h. So
a few places have to #include pub_core_stacktrace.h themselves, but
that's ok because explicit is better.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3976
2005-06-21 00:33:19 +00:00