Julian Seward [Mon, 20 Jun 2005 18:14:27 +0000 (18:14 +0000)]
Although it doesn't actually matter from a generated-code point of
view, it doesn't make much sense for the args to
VG_(mk_SysRes_{x86,amd64}_linux) to be stated as unsigned; therefore
make them signed.
guest-ppc32
~~~~~~~~~~
- store-with-update instrs: Valgrind pagefault handler expects faulting address >= current stack ptr, so we need to update the stack ptr register _before_ storing the old stack ptr
- branch_ctr_ok (bad calc for 'branch if %ctr zero' case)
- mcrf: scanning bitfields in the wrong direction
- on spotting the magic sequence, delta += 24
- updated DIPs for +ve-only args
host-ppc32
~~~~~~~~~
- fixed CMov reg usage
- fixed Pin_Call in emit_PPC32Instr(): we already know how far we're jumping
- fixed Pin_Goto in emit_PPC32Instr(): vassert right range of jump deltas
other-ppc32
~~~~~~~~~~
- exported OFFSET_ppc32_(various) for valgrind
Move VG_(get_memory_from_mmap_for_client) out of m_aspacemgr into
m_libcmman, next to VG_(get_memory_from_mmap). Removes the (direct)
dependence of m_mallocfree on m_aspacemgr.
Moved VG_(start_debugger) out of m_main.c into its own module,
m_debugger. This removes the dependence of m_signals.c and m_errormgr.c
on m_main.c. It required also moving VG_(clexecfd) out of m_main.c; I put
it in m_libcproc.c which seemed like an ok-but-not-great choice.
Move VG_(sanity_check_general) out of m_main.c into scheduler.c.
Removes the dependence of m_scheduler/ on m_main.c; reduces the
dependence of m_signals.c on m_main.c.
Julian Seward [Sun, 19 Jun 2005 15:58:33 +0000 (15:58 +0000)]
Un-break the build on SuSE 9.1 (x86). It seems that something in
<fcntl.h> messes up stuff acquired indirectly from vki-x86-linux.h.
This fix is therefore a kludge; it merely puts our defines ahead of
the glibc ones. The right solution is to entirely remove the glibc
dependency.
Don't #include <sys/stat.h>, which was causing problems due to
it redefining certain names which clashed with field names in vki*.h.
There are plenty more glibc-isms that can be removed from m_main.c.
- Broke part of m_scheduler off into a new module m_threadstate. It
contains ThreadState, VG_(threads)[] and some basic operations on the
thread table. All simple stuff, the complex stuff stays in m_scheduler.
This avoids lots of circular dependencies between m_scheduler and other
modules.
- Managed to finally remove core.h and tool.h, double hurrah!
- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
include by every single C file.
- Lots of little cleanups and changes related to the above.
- I even did a small amount of documentation updating.
Make the stage2.lds building platform-independent by not trying to match
an exact address (idea from Paul Mackerras' PPC port). Thus it could be
moved into coregrind/Makefile.am.
Let me know if this breaks anything on other platforms.
Tom Hughes [Sat, 18 Jun 2005 11:58:18 +0000 (11:58 +0000)]
Make do_syscall_WRK take UWord arguments and return UWord results to
avoid inappropriate truncations on 64 bit systems. Also make it static
as it is not used anywhere else.
Moved the code trampoline stuff into a new module, m_trampoline. Not
certain this was the right thing to do, but that stuff sure as hell
didn't fit in any of the existing modules.
Renamed the m_syscalls module m_syswrap, which better describes what it
does and better distinguishes it from m_syscall. Did everything for this
except renaming the m_syscalls/ directory -- I'll do that shortly, I don't
think Subversion can handle renaming a directory and files within that
directory at the same time.
- Renamed VG_INTERCEPT as VG_REPLACE_FUNCTION to make its purpose
clearer.
- Renamed VG_WRAPPER as VG_NOTIFY_ON_LOAD to make its purpose cleare.
Started calling that stuff "load notification".
- Moved various things into m_redir.c, a much more sensible place for
them. This reduced the number of exported functions overall. Renamed
intercept_demangle() as Z_decode() as part of this.
- Improved the documentation of this stuff, especially in
pub_core_redir.c.
- Got --run-libc-freeres=yes working again. It was doing nothing.
- Renamed vg_inject.so as vg_preload_core.so to match
vg_preload_<tool>.so
- Renamed vg_intercept.c as vg_preloaded.c. (I kept the "vg_" prefix
because this filename can appear in stack traces, so the "vg_" is a
useful hint for users that it belongs to Valgrind.)
- Removed all the Memcheck-specific calls to add_redirect_sym_to_sym()
from VG_(setup_redirect_table)(), instead using VG_REPLACE_FUNCTION in
mac_replace_strmem.c, just like vg_replace_malloc.c. This is the
right way to do it. This required moving some of
coregrind/pub_core_redir.h into the newly added
include/pub_tool_redir.h. add_redirect_sym_to_sym() is no longer
used...
- Now only handing off symbols to m_redir for inspection/decoding after
they have been deemed to be interesting by the symbol table reader.
- Factored out commonality between the add_redirect_*_to_* functions
into add_redirect_X_to_X().
- Added "Zh", meaning '-' ('h' for "hyphen"), to the Z-decoding scheme,
to handle sonames like "ld-linux-x86-64.so.2".
- Added a FAQ explaining the newly found issue of glibc aliasing
sometimes causing the wrong function name to appear in stack traces.
- Added a new regtest strchr.c. It's possible this will fail on some
platforms. If so, an alternative output file can be provided, but
I'd like to see it in practice first.
It's possible that there will be minor breakage on other
platforms/setups, but it should be minimal and easily fixable.
Plus some ordinary cleanups in symtab.c:
- Removed the old optimisation from VG_(addStr)() whereby it kept track
of the previous 5 added strings and avoiding duplicating any of them.
Turns out it was barely having any effect any more, and just
complicated things.
- Made read_symtab() more readable, by introducing a new variable
"sym_name" and introducing the auxiliary function
is_symbol_interesting().
- renamed the module variable 'segInfo' as 'segInfo_list' to make it
more obvious it's a module variable and not just some ordinary local
variable (which was an easy mistake to make).
Julian Seward [Tue, 14 Jun 2005 21:51:14 +0000 (21:51 +0000)]
Complete the merge of Eric Estievenart's DWARF2 directory-reading
patch. This actually requires a major restructuring of the DWARF2
line number reading stuff.
Julian Seward [Mon, 13 Jun 2005 17:39:06 +0000 (17:39 +0000)]
Updates to the rest of the debuginfo module to track directory names.
The only interesting part is a change of signature of
VG_(get_filename_linenum) so that callers can optionally request
directory info too.
Julian Seward [Mon, 13 Jun 2005 17:33:27 +0000 (17:33 +0000)]
Partially merge in a (heavily modified) patch from Eric Estievenart
which adds support for reading directory names from DWARF2 debug info.
Also rework the representation of file and directory tables in the
DWARF2 reader. This removes a longstanding but only-just-discovered
curiousity that the previous code expanded the filename table one
entry at a time, so that reading file names from a DWARF2 object was
quadratic in the number of file names. It's now N log N.
Donna Robinson [Sun, 12 Jun 2005 10:23:23 +0000 (10:23 +0000)]
mc-tech-docs.xml:
- fixed link to comply with house-style
mc-manual.xml:
- rm'd unhelpful sentence + it's footnote
quick-start-guide.xml:
- fixed up some section ids + xreflabels
so we don't get cool filenames like 'bk01s02.html'.