Author: florian
Date: Sat Nov 15 21:54:28 2014
New Revision: 14727
Log:
Merge from trunk.
Added:
branches/BUF_REMOVAL/coregrind/m_compiler.c
- copied unchanged from r14726, trunk/coregrind/m_compiler.c
branches/BUF_REMOVAL/coregrind/pub_core_guest.h
- copied unchanged from r14726, trunk/coregrind/pub_core_guest.h
branches/BUF_REMOVAL/darwin14.supp
- copied unchanged from r14726, trunk/darwin14.supp
branches/BUF_REMOVAL/include/pub_tool_guest.h
- copied unchanged from r14726, trunk/include/pub_tool_guest.h
branches/BUF_REMOVAL/memcheck/tests/linux/ioctl-tiocsig.c
- copied unchanged from r14726, trunk/memcheck/tests/linux/ioctl-tiocsig.c
branches/BUF_REMOVAL/memcheck/tests/linux/ioctl-tiocsig.stderr.exp
- copied unchanged from r14726, trunk/memcheck/tests/linux/ioctl-tiocsig.stderr.exp
branches/BUF_REMOVAL/memcheck/tests/linux/ioctl-tiocsig.vgtest
- copied unchanged from r14726, trunk/memcheck/tests/linux/ioctl-tiocsig.vgtest
Modified:
branches/BUF_REMOVAL/ (props changed)
branches/BUF_REMOVAL/Makefile.am
branches/BUF_REMOVAL/Makefile.tool-tests.am
branches/BUF_REMOVAL/Makefile.vex.am
branches/BUF_REMOVAL/NEWS
branches/BUF_REMOVAL/README.android
branches/BUF_REMOVAL/auxprogs/ (props changed)
branches/BUF_REMOVAL/cachegrind/cg_main.c
branches/BUF_REMOVAL/cachegrind/cg_merge.c
branches/BUF_REMOVAL/callgrind/bbcc.c
branches/BUF_REMOVAL/callgrind/debug.c
branches/BUF_REMOVAL/callgrind/dump.c
branches/BUF_REMOVAL/callgrind/events.c
branches/BUF_REMOVAL/callgrind/events.h
branches/BUF_REMOVAL/callgrind/fn.c
branches/BUF_REMOVAL/callgrind/global.h
branches/BUF_REMOVAL/callgrind/main.c
branches/BUF_REMOVAL/callgrind/sim.c
branches/BUF_REMOVAL/configure.ac
branches/BUF_REMOVAL/coregrind/Makefile.am
branches/BUF_REMOVAL/coregrind/fixup_macho_loadcmds.c
branches/BUF_REMOVAL/coregrind/launcher-linux.c
branches/BUF_REMOVAL/coregrind/m_addrinfo.c
branches/BUF_REMOVAL/coregrind/m_aspacemgr/aspacemgr-common.c
branches/BUF_REMOVAL/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/BUF_REMOVAL/coregrind/m_aspacemgr/priv_aspacemgr.h
branches/BUF_REMOVAL/coregrind/m_coredump/coredump-elf.c
branches/BUF_REMOVAL/coregrind/m_debugger.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/d3basics.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/debuginfo.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/image.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/misc.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/priv_d3basics.h
branches/BUF_REMOVAL/coregrind/m_debuginfo/priv_image.h
branches/BUF_REMOVAL/coregrind/m_debuginfo/priv_misc.h
branches/BUF_REMOVAL/coregrind/m_debuginfo/priv_readelf.h
branches/BUF_REMOVAL/coregrind/m_debuginfo/priv_readpdb.h
branches/BUF_REMOVAL/coregrind/m_debuginfo/priv_storage.h
branches/BUF_REMOVAL/coregrind/m_debuginfo/priv_tytypes.h
branches/BUF_REMOVAL/coregrind/m_debuginfo/readdwarf.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/readdwarf3.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/readelf.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/readmacho.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/readpdb.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/storage.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/tytypes.c
branches/BUF_REMOVAL/coregrind/m_debuglog.c
branches/BUF_REMOVAL/coregrind/m_deduppoolalloc.c
branches/BUF_REMOVAL/coregrind/m_demangle/demangle.c
branches/BUF_REMOVAL/coregrind/m_errormgr.c
branches/BUF_REMOVAL/coregrind/m_execontext.c
branches/BUF_REMOVAL/coregrind/m_gdbserver/m_gdbserver.c
branches/BUF_REMOVAL/coregrind/m_gdbserver/target.c
branches/BUF_REMOVAL/coregrind/m_gdbserver/valgrind-low-arm.c
branches/BUF_REMOVAL/coregrind/m_hashtable.c
branches/BUF_REMOVAL/coregrind/m_initimg/initimg-linux.c
branches/BUF_REMOVAL/coregrind/m_libcassert.c
branches/BUF_REMOVAL/coregrind/m_libcbase.c
branches/BUF_REMOVAL/coregrind/m_libcfile.c
branches/BUF_REMOVAL/coregrind/m_libcprint.c
branches/BUF_REMOVAL/coregrind/m_libcproc.c
branches/BUF_REMOVAL/coregrind/m_libcsignal.c
branches/BUF_REMOVAL/coregrind/m_machine.c
branches/BUF_REMOVAL/coregrind/m_main.c
branches/BUF_REMOVAL/coregrind/m_options.c
branches/BUF_REMOVAL/coregrind/m_oset.c
branches/BUF_REMOVAL/coregrind/m_rangemap.c
branches/BUF_REMOVAL/coregrind/m_redir.c
branches/BUF_REMOVAL/coregrind/m_replacemalloc/vg_replace_malloc.c
branches/BUF_REMOVAL/coregrind/m_sbprofile.c
branches/BUF_REMOVAL/coregrind/m_scheduler/scheduler.c
branches/BUF_REMOVAL/coregrind/m_scheduler/ticket-lock-linux.c
branches/BUF_REMOVAL/coregrind/m_sparsewa.c
branches/BUF_REMOVAL/coregrind/m_stacktrace.c
branches/BUF_REMOVAL/coregrind/m_syswrap/priv_syswrap-darwin.h
branches/BUF_REMOVAL/coregrind/m_syswrap/priv_syswrap-generic.h
branches/BUF_REMOVAL/coregrind/m_syswrap/priv_syswrap-linux.h
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-amd64-darwin.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-amd64-linux.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-arm-linux.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-arm64-linux.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-darwin.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-generic.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-linux.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-main.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-mips32-linux.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-mips64-linux.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-ppc32-linux.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-ppc64-linux.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-s390x-linux.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-x86-linux.c
branches/BUF_REMOVAL/coregrind/m_tooliface.c
branches/BUF_REMOVAL/coregrind/m_translate.c
branches/BUF_REMOVAL/coregrind/m_transtab.c
branches/BUF_REMOVAL/coregrind/m_ume/main.c
branches/BUF_REMOVAL/coregrind/m_wordfm.c
branches/BUF_REMOVAL/coregrind/m_xarray.c
branches/BUF_REMOVAL/coregrind/pub_core_aspacemgr.h
branches/BUF_REMOVAL/coregrind/pub_core_basics.h
branches/BUF_REMOVAL/coregrind/pub_core_debuginfo.h
branches/BUF_REMOVAL/coregrind/pub_core_demangle.h
branches/BUF_REMOVAL/coregrind/pub_core_libcassert.h
branches/BUF_REMOVAL/coregrind/pub_core_libcfile.h
branches/BUF_REMOVAL/coregrind/pub_core_libcprint.h
branches/BUF_REMOVAL/coregrind/pub_core_libcsignal.h
branches/BUF_REMOVAL/coregrind/pub_core_options.h
branches/BUF_REMOVAL/coregrind/pub_core_redir.h
branches/BUF_REMOVAL/coregrind/pub_core_stacktrace.h
branches/BUF_REMOVAL/coregrind/pub_core_threadstate.h
branches/BUF_REMOVAL/coregrind/pub_core_tooliface.h
branches/BUF_REMOVAL/coregrind/pub_core_transtab.h
branches/BUF_REMOVAL/coregrind/vg_preloaded.c
branches/BUF_REMOVAL/coregrind/vgdb.c
branches/BUF_REMOVAL/docs/internals/3_10_BUGSTATUS.txt
branches/BUF_REMOVAL/docs/xml/manual-core.xml
branches/BUF_REMOVAL/drd/drd_error.c
branches/BUF_REMOVAL/drd/drd_malloc_wrappers.c
branches/BUF_REMOVAL/drd/tests/std_thread2.supp
branches/BUF_REMOVAL/exp-bbv/bbv_main.c
branches/BUF_REMOVAL/exp-bbv/tests/amd64-linux/Makefile.am
branches/BUF_REMOVAL/exp-bbv/tests/amd64-linux/ll.vgtest
branches/BUF_REMOVAL/exp-dhat/dh_main.c
branches/BUF_REMOVAL/exp-sgcheck/h_intercepts.c
branches/BUF_REMOVAL/exp-sgcheck/pc_common.c
branches/BUF_REMOVAL/exp-sgcheck/pc_common.h
branches/BUF_REMOVAL/exp-sgcheck/sg_main.c
branches/BUF_REMOVAL/exp-sgcheck/tests/bad_percentify.c
branches/BUF_REMOVAL/exp-sgcheck/tests/hackedbz2.c
branches/BUF_REMOVAL/helgrind/hg_errors.c
branches/BUF_REMOVAL/helgrind/hg_errors.h
branches/BUF_REMOVAL/helgrind/hg_intercepts.c
branches/BUF_REMOVAL/helgrind/hg_main.c
branches/BUF_REMOVAL/helgrind/libhb_core.c
branches/BUF_REMOVAL/include/Makefile.am
branches/BUF_REMOVAL/include/pub_tool_addrinfo.h
branches/BUF_REMOVAL/include/pub_tool_basics.h
branches/BUF_REMOVAL/include/pub_tool_debuginfo.h
branches/BUF_REMOVAL/include/pub_tool_deduppoolalloc.h
branches/BUF_REMOVAL/include/pub_tool_errormgr.h
branches/BUF_REMOVAL/include/pub_tool_execontext.h
branches/BUF_REMOVAL/include/pub_tool_hashtable.h
branches/BUF_REMOVAL/include/pub_tool_libcprint.h
branches/BUF_REMOVAL/include/pub_tool_oset.h
branches/BUF_REMOVAL/include/pub_tool_rangemap.h
branches/BUF_REMOVAL/include/pub_tool_sparsewa.h
branches/BUF_REMOVAL/include/pub_tool_tooliface.h
branches/BUF_REMOVAL/include/pub_tool_wordfm.h
branches/BUF_REMOVAL/include/pub_tool_xarray.h
branches/BUF_REMOVAL/include/vki/vki-darwin.h
branches/BUF_REMOVAL/include/vki/vki-linux.h
branches/BUF_REMOVAL/include/vki/vki-scnums-amd64-linux.h
branches/BUF_REMOVAL/include/vki/vki-scnums-arm-linux.h
branches/BUF_REMOVAL/include/vki/vki-scnums-arm64-linux.h
branches/BUF_REMOVAL/include/vki/vki-scnums-darwin.h
branches/BUF_REMOVAL/include/vki/vki-scnums-mips32-linux.h
branches/BUF_REMOVAL/include/vki/vki-scnums-mips64-linux.h
branches/BUF_REMOVAL/include/vki/vki-scnums-ppc32-linux.h
branches/BUF_REMOVAL/include/vki/vki-scnums-ppc64-linux.h
branches/BUF_REMOVAL/include/vki/vki-scnums-s390x-linux.h
branches/BUF_REMOVAL/include/vki/vki-scnums-x86-linux.h
branches/BUF_REMOVAL/lackey/lk_main.c
branches/BUF_REMOVAL/massif/ms_main.c
branches/BUF_REMOVAL/massif/tests/long-names.c
branches/BUF_REMOVAL/memcheck/mc_errors.c
branches/BUF_REMOVAL/memcheck/mc_include.h
branches/BUF_REMOVAL/memcheck/mc_machine.c
branches/BUF_REMOVAL/memcheck/mc_main.c
branches/BUF_REMOVAL/memcheck/mc_malloc_wrappers.c
branches/BUF_REMOVAL/memcheck/tests/badaddrvalue.stderr.exp
branches/BUF_REMOVAL/memcheck/tests/badaddrvalue.vgtest
branches/BUF_REMOVAL/memcheck/tests/linux/ (props changed)
branches/BUF_REMOVAL/memcheck/tests/linux/Makefile.am
branches/BUF_REMOVAL/memcheck/tests/manuel1.stderr.exp
branches/BUF_REMOVAL/memcheck/tests/manuel1.vgtest
branches/BUF_REMOVAL/memcheck/tests/manuel2.stderr.exp
branches/BUF_REMOVAL/memcheck/tests/manuel2.stderr.exp64
branches/BUF_REMOVAL/memcheck/tests/manuel2.vgtest
branches/BUF_REMOVAL/memcheck/tests/manuel3.vgtest
branches/BUF_REMOVAL/memcheck/tests/origin5-bz2.c
branches/BUF_REMOVAL/memcheck/tests/threadname.c
branches/BUF_REMOVAL/memcheck/tests/threadname.stderr.exp
branches/BUF_REMOVAL/memcheck/tests/unit_oset.c
branches/BUF_REMOVAL/memcheck/tests/varinfo6.c
branches/BUF_REMOVAL/memcheck/tests/x86/pushfpopf_s.S
branches/BUF_REMOVAL/memcheck/tests/x86/tronical.S
branches/BUF_REMOVAL/none/tests/amd64/Makefile.am
branches/BUF_REMOVAL/none/tests/arm64/fp_and_simd.c
branches/BUF_REMOVAL/none/tests/arm64/fp_and_simd.stdout.exp
branches/BUF_REMOVAL/none/tests/arm64/memory.c
branches/BUF_REMOVAL/none/tests/arm64/memory.stdout.exp
branches/BUF_REMOVAL/none/tests/cmdline1.stdout.exp
branches/BUF_REMOVAL/none/tests/cmdline2.stdout.exp
branches/BUF_REMOVAL/none/tests/execve.c
branches/BUF_REMOVAL/none/tests/filter_cmdline1
branches/BUF_REMOVAL/none/tests/map_unmap.c
branches/BUF_REMOVAL/none/tests/mips64/fpu_arithmetic.c
branches/BUF_REMOVAL/none/tests/mips64/fpu_arithmetic.vgtest
branches/BUF_REMOVAL/none/tests/mips64/fpu_branches.c
branches/BUF_REMOVAL/none/tests/mips64/fpu_branches.vgtest
branches/BUF_REMOVAL/none/tests/mips64/fpu_control_word.c
branches/BUF_REMOVAL/none/tests/mips64/fpu_control_word.vgtest
branches/BUF_REMOVAL/none/tests/mips64/fpu_load_store.c
branches/BUF_REMOVAL/none/tests/mips64/fpu_load_store.vgtest
branches/BUF_REMOVAL/none/tests/mips64/load_store_unaligned.c
branches/BUF_REMOVAL/none/tests/mips64/load_store_unaligned.vgtest
branches/BUF_REMOVAL/none/tests/mips64/macro_fpu.h
branches/BUF_REMOVAL/none/tests/mips64/move_instructions.c
branches/BUF_REMOVAL/none/tests/mips64/move_instructions.vgtest
branches/BUF_REMOVAL/none/tests/mips64/round.c
branches/BUF_REMOVAL/none/tests/mips64/round.vgtest
branches/BUF_REMOVAL/none/tests/mips64/rounding_mode.h
branches/BUF_REMOVAL/none/tests/mips64/test_fcsr.c
branches/BUF_REMOVAL/none/tests/mips64/test_fcsr.vgtest
branches/BUF_REMOVAL/none/tests/rlimit64_nofile.vgtest
branches/BUF_REMOVAL/none/tests/x86/cpuid_s.S
branches/BUF_REMOVAL/perf/bz2.c
branches/BUF_REMOVAL/shared/vg_replace_strmem.c
branches/BUF_REMOVAL/tests/mips_features.c
Modified: branches/BUF_REMOVAL/Makefile.am
==============================================================================
--- branches/BUF_REMOVAL/Makefile.am (original)
+++ branches/BUF_REMOVAL/Makefile.am Sat Nov 15 21:54:28 2014
@@ -45,7 +45,7 @@
exp-sgcheck.supp \
darwin9.supp darwin9-drd.supp \
darwin10.supp darwin10-drd.supp \
- darwin11.supp darwin12.supp darwin13.supp \
+ darwin11.supp darwin12.supp darwin13.supp darwin14.supp \
bionic.supp
DEFAULT_SUPP_FILES = @DEFAULT_SUPP@
Modified: branches/BUF_REMOVAL/Makefile.tool-tests.am
==============================================================================
--- branches/BUF_REMOVAL/Makefile.tool-tests.am (original)
+++ branches/BUF_REMOVAL/Makefile.tool-tests.am Sat Nov 15 21:54:28 2014
@@ -39,6 +39,10 @@
CXXFLAGS += -Wno-unused-private-field # drd/tests/tsan_unittest.cpp
endif
+# Compile testcases without -Wcast-qual
+CFLAGS += -Wno-cast-qual
+CXXFLAGS += -Wno-cast-qual
+
check-local: build-noinst_DSYMS
clean-local: clean-noinst_DSYMS
Modified: branches/BUF_REMOVAL/Makefile.vex.am
==============================================================================
--- branches/BUF_REMOVAL/Makefile.vex.am (original)
+++ branches/BUF_REMOVAL/Makefile.vex.am Sat Nov 15 21:54:28 2014
@@ -73,6 +73,7 @@
# This is very uggerly. Need to sed out both "xyzzyN" and
# "xyzzy$N" since gcc on different targets emits the constants
# differently -- with a leading $ on x86/amd64 but none on ppc32/64.
+# ICC also emits the constants differently with a leading # #define
pub/libvex_guest_offsets.h: auxprogs/genoffsets.c \
pub/libvex_basictypes.h \
pub/libvex_guest_x86.h \
@@ -91,7 +92,8 @@
$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
-O -S -o auxprogs/genoffsets.s \
$(srcdir)/auxprogs/genoffsets.c
- grep xyzzy auxprogs/genoffsets.s | grep "^#define" \
+ grep xyzzy auxprogs/genoffsets.s | grep "^[# ]*#define" \
+ | sed "s/# #define/#define/g" \
| sed "s/xyzzy\\$$//g" \
| sed "s/xyzzy#//g" \
| sed "s/xyzzy//g" \
Modified: branches/BUF_REMOVAL/NEWS
==============================================================================
--- branches/BUF_REMOVAL/NEWS (original)
+++ branches/BUF_REMOVAL/NEWS Sat Nov 15 21:54:28 2014
@@ -14,6 +14,11 @@
* ==================== OTHER CHANGES ====================
+* Option --error-markers=<begin>,<end> can be used to mark
+ the begin/end of errors in textual output mode, to facilitate
+ searching/extracting errors in output files mixing valgrind
+ errors with program output.
+
* ==================== FIXED BUGS ====================
The following bugs have been fixed or resolved. Note that "n-i-bz"
@@ -27,11 +32,52 @@
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
where XXXXXX is the bug number as listed below.
-338731 ppc: Fix testuite build for toolchains not supporting -maltivec
-339020 ppc64: memcheck/tests/ppc64/power_ISA2_05 failing in nightly build
-339156 - gdbsrv not called for fatal signal
-n-i-bz Old STABS code is still being compiled, but never used. Remove it.
-n-i-bz Fix compilation on distros with glibc < 2.5
+333051 mmap of huge pages fails due to incorrect alignment
+335440 arm64: ld1 (single structure) is not implemented
+335713 arm64: unhanded instruction: prfm (immediate)
+338731 ppc: Fix testuite build for toolchains not supporting -maltivec
+338995 shmat with hugepages (SHM_HUGETLB) fails with EINVAL
+339020 ppc64: memcheck/tests/ppc64/power_ISA2_05 failing in nightly build
+339156 gdbsrv not called for fatal signal
+339442 Fix testsuite build failure on OS X 10.9
+339645 Use correct tag names in sys_getdents/64 wrappers
+339182 ppc64: AvSplat ought to load destination vector register with 16/16
+ bytes stored prior
+339433 ppc64 lxvw4x instruction uses four 32-byte loads
+339442 OS X 10.9 testsuite build failure: threadname.c:6:10:
+ fatal error: 'sys/prctl.h' file not found
+339542 Support compilation with Intel's ICC compiler
+339688 Mac-specific ASM does not support .version directive (cpuid,
+ tronical and pushfpopf tests)
+339706 Fix false positive for ioctl(TIOCSIG) on linux
+339721 assertion 'check_sibling == sibling' failed in readdwarf3.c ...
+339789 Fix none/tests/execve test on Mac OS X 10.9
+339808 Fix none/tests/rlimit64_nofile test on Mac OS X 10.9
+339853 arm64 times syscall unknown
+339855 arm64 unhandled getsid/setsid syscalls
+339858 arm64 dmb sy not implemented
+339926 Unhandled instruction 0x1E674001 (frintx) on aarm64
+339927 Unhandled instruction 0x9E7100C6 (fcvtmu) on aarch64
+339938 disInstr(arm64): unhandled instruction 0x4F8010A4 (fmla)
+ == 339950
+339940 unhandled syscall: 83 (sys_fdatasync) + patch
+340028 unhandled syscalls for arm64 (msync, pread64, setreuid and setregid)
+340033 arm64: unhandled instruction for dmb ishld and some other
+ isb-dmb-dsb variants...
+340036 arm64: Unhandled instruction ld4 (multiple structures, no offset)
+340115 Fix none/tests/cmdline[1|2] tests on systems which define TMPDIR
+340236 4 unhandled syscalls on aarch64/arm64: mknodat (33), fchdir
+ (50), chroot (51), fchownat (54)
+340430 Fix some grammatical weirdness in the manual.
+340509 arm64: unhandled instruction fcvtas
+340630 arm64: fchmod (52) and fchown (55) syscalls not recognized
+340632 arm64: unhandled instruction fcvtas
+340788 warning: unhandled syscall: 318 (getrandom)
+340922 arm64: unhandled getgroups/setgroups syscalls
+n-i-bz Provide implementations of certain compiler builtins to support
+ compilers who may not provide those
+n-i-bz Old STABS code is still being compiled, but never used. Remove it.
+n-i-bz Fix compilation on distros with glibc < 2.5
Release 3.10.0 (10 September 2014)
Modified: branches/BUF_REMOVAL/README.android
==============================================================================
--- branches/BUF_REMOVAL/README.android (original)
+++ branches/BUF_REMOVAL/README.android Sat Nov 15 21:54:28 2014
@@ -3,8 +3,8 @@
since there are important details further down regarding crash
avoidance and GPU support.
-These notes were last updated on 3 Sept 2014, for Valgrind SVN
-revision 14439/2941.
+These notes were last updated on 4 Nov 2014, for Valgrind SVN
+revision 14689/2987.
These instructions are known to work, or have worked at some time in
the past, for:
@@ -25,29 +25,37 @@
Android 4.3 running on android mips emulator.
Android 4.0.4 running on BROADCOM bcm7425
+arm64:
+ Android 4.5 (?) running on ARM Juno
+
On android-arm, GDBserver might insert breaks at wrong addresses.
Feedback on this welcome.
Other configurations and toolchains might work, but haven't been tested.
Feedback is welcome.
+Toolchain:
+
+ For arm32, x86 and mips32 you need the android-ndk-r6 native
+ development kit. r6b and r7 give a non-completely-working build;
+ see http://code.google.com/p/android/issues/detail?id=23203
+ For the android emulator, the versions needed and how to install
+ them are described in README.android_emulator.
+
+ You can get android-ndk-r6 from
+ http://dl.google.com/android/ndk/android-ndk-r6-linux-x86.tar.bz2
-You need the android-ndk-r6 native development kit. r6b and r7
-give a non-completely-working build; see
-http://code.google.com/p/android/issues/detail?id=23203
-For the android emulator, the versions needed and how to
-install them are described in README.android_emulator.
-
-You can get android-ndk-r6 from
-http://dl.google.com/android/ndk/android-ndk-r6-linux-x86.tar.bz2
-Install it somewhere. Doesn't matter where. Then:
+ For arm64 (aarch64) you need the android-ndk-r10c NDK, from
+ http://dl.google.com/android/ndk/android-ndk-r10c-linux-x86_64.bin
+
+Install the NDK somewhere. Doesn't matter where. Then:
# Modify this (obviously). Note, this "export" command is only done
# so as to reduce the amount of typing required. None of the commands
# below read it as part of their operation.
#
-export NDKROOT=/path/to/android-ndk-r6
+export NDKROOT=/path/to/android-ndk-r<version>
# Then cd to the root of your Valgrind source tree.
@@ -76,6 +84,11 @@
export LD=$NDKROOT/toolchains/mipsel-linux-android-4.8/prebuilt/linux-x86_64/bin/mipsel-linux-android-ld
export CC=$NDKROOT/toolchains/mipsel-linux-android-4.8/prebuilt/linux-x86_64/bin/mipsel-linux-android-gcc
+# For ARM64 (AArch64)
+export AR=$NDKROOT/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-ar
+export LD=$NDKROOT/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-ld
+export CC=$NDKROOT/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc
+
# Do configuration stuff. Don't mess with the --prefix in the
# configure command below, even if you think it's wrong.
@@ -110,6 +123,13 @@
--host=mipsel-linux-android --target=mipsel-linux-android \
--with-tmpdir=/sdcard
+# for ARM64 (AArch64)
+CPPFLAGS="--sysroot=$NDKROOT/platforms/android-21/arch-arm64" \
+ CFLAGS="--sysroot=$NDKROOT/platforms/android-21/arch-arm64" \
+ ./configure --prefix=/data/local/Inst \
+ --host=aarch64-unknown-linux --target=aarch64-unknown-linux \
+ --with-tmpdir=/sdcard
+
# At the end of the configure run, a few lines of details
# are printed. Make sure that you see these two lines:
@@ -126,6 +146,10 @@
# Platform variant: android
# Primary -DVGPV string: -DVGPV_mips32_linux_android=1
#
+# For ARM64 (AArch64):
+# Platform variant: android
+# Primary -DVGPV string: -DVGPV_arm64_linux_android=1
+#
# If you see anything else at this point, something is wrong, and
# either the build will fail, or will succeed but you'll get something
# which won't work.
@@ -133,8 +157,8 @@
# Build, and park the install tree in `pwd`/Inst
#
-make -j2
-make -j2 install DESTDIR=`pwd`/Inst
+make -j4
+make -j4 install DESTDIR=`pwd`/Inst
# To get the install tree onto the device:
Modified: branches/BUF_REMOVAL/cachegrind/cg_main.c
==============================================================================
--- branches/BUF_REMOVAL/cachegrind/cg_main.c (original)
+++ branches/BUF_REMOVAL/cachegrind/cg_main.c Sat Nov 15 21:54:28 2014
@@ -97,7 +97,7 @@
typedef struct {
HChar* file;
- HChar* fn;
+ const HChar* fn;
Int line;
}
CodeLoc;
@@ -190,7 +190,7 @@
// Get a permanent string; either pull it out of the string table if it's
// been encountered before, or dup it and put it into the string table.
-static HChar* get_perm_string(HChar* s)
+static HChar* get_perm_string(const HChar* s)
{
HChar** s_ptr = VG_(OSetGen_Lookup)(stringTable, &s);
if (s_ptr) {
@@ -207,9 +207,8 @@
/*--- CC table operations ---*/
/*------------------------------------------------------------*/
-static void get_debug_info(Addr instr_addr, HChar **dir,
- HChar **file,
- HChar **fn, UInt* line)
+static void get_debug_info(Addr instr_addr, const HChar **dir,
+ const HChar **file, const HChar **fn, UInt* line)
{
Bool found_dirname;
Bool found_file_line = VG_(get_filename_linenum)(
@@ -220,17 +219,13 @@
Bool found_fn = VG_(get_fnname)(instr_addr, fn);
if (!found_file_line) {
- *file = (HChar *)"???"; // FIXME: constification
+ *file = "???";
*line = 0;
}
if (!found_fn) {
- *fn = (HChar *)"???"; // FIXME: constification
+ *fn = "???";
}
- if (!found_dirname) {
- *dir = (HChar *)""; // FIXME: constification
- }
-
if (found_file_line) {
if (found_fn) full_debugs++;
else file_line_debugs++;
@@ -244,7 +239,7 @@
// Returns a pointer to the line CC, creates a new one if necessary.
static LineCC* get_lineCC(Addr origAddr)
{
- HChar *file, *dir, *fn;
+ const HChar *fn, *file, *dir;
UInt line;
CodeLoc loc;
LineCC* lineCC;
@@ -259,6 +254,7 @@
} else {
VG_(sprintf)(absfile, "%s", file);
}
+
loc.file = absfile;
loc.fn = fn;
loc.line = line;
@@ -1378,9 +1374,10 @@
static void fprint_CC_table_and_calc_totals(void)
{
- Int i, fd;
- SysRes sres;
- HChar *currFile = NULL, *currFn = NULL;
+ Int i;
+ VgFile *fp;
+ HChar *currFile = NULL;
+ const HChar *currFn = NULL;
LineCC* lineCC;
// Setup output filename. Nb: it's important to do this now, ie. as late
@@ -1391,9 +1388,9 @@
HChar* cachegrind_out_file =
VG_(expand_file_name)("--cachegrind-out-file", clo_cachegrind_out_file);
- sres = VG_(open)(cachegrind_out_file, VKI_O_CREAT|VKI_O_TRUNC|VKI_O_WRONLY,
- VKI_S_IRUSR|VKI_S_IWUSR);
- if (sr_isError(sres)) {
+ fp = VG_(fopen)(cachegrind_out_file, VKI_O_CREAT|VKI_O_TRUNC|VKI_O_WRONLY,
+ VKI_S_IRUSR|VKI_S_IWUSR);
+ if (fp == NULL) {
// If the file can't be opened for whatever reason (conflict
// between multiple cachegrinded processes?), give up now.
VG_(umsg)("error: can't open cache simulation output file '%s'\n",
@@ -1402,40 +1399,36 @@
VG_(free)(cachegrind_out_file);
return;
} else {
- fd = sr_Res(sres);
VG_(free)(cachegrind_out_file);
}
// "desc:" lines (giving I1/D1/LL cache configuration). The spaces after
// the 2nd colon makes cg_annotate's output look nicer.
- VG_(fdprintf)(fd, "desc: I1 cache: %s\n"
+ VG_(fprintf)(fp, "desc: I1 cache: %s\n"
"desc: D1 cache: %s\n"
"desc: LL cache: %s\n",
I1.desc_line, D1.desc_line, LL.desc_line);
// "cmd:" line
- VG_(fdprintf)(fd, "cmd: %s", VG_(args_the_exename));
+ VG_(fprintf)(fp, "cmd: %s", VG_(args_the_exename));
for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
HChar* arg = * (HChar**) VG_(indexXA)( VG_(args_for_client), i );
- if (arg) {
- VG_(fdprintf)(fd, " %s", arg);
- }
+ VG_(fprintf)(fp, " %s", arg);
}
// "events:" line
if (clo_cache_sim && clo_branch_sim) {
- VG_(fdprintf)(fd, "\nevents: Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw "
+ VG_(fprintf)(fp, "\nevents: Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw "
"Bc Bcm Bi Bim\n");
}
else if (clo_cache_sim && !clo_branch_sim) {
- VG_(fdprintf)(fd, "\nevents: Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw "
+ VG_(fprintf)(fp, "\nevents: Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw "
"\n");
}
else if (!clo_cache_sim && clo_branch_sim) {
- VG_(fdprintf)(fd, "\nevents: Ir "
- "Bc Bcm Bi Bim\n");
+ VG_(fprintf)(fp, "\nevents: Ir Bc Bcm Bi Bim\n");
}
else {
- VG_(fdprintf)(fd, "\nevents: Ir\n");
+ VG_(fprintf)(fp, "\nevents: Ir\n");
}
// Traverse every lineCC
@@ -1449,7 +1442,7 @@
// the whole strings would have to be checked.
if ( lineCC->loc.file != currFile ) {
currFile = lineCC->loc.file;
- VG_(fdprintf)(fd, "fl=%s\n", currFile);
+ VG_(fprintf)(fp, "fl=%s\n", currFile);
distinct_files++;
just_hit_a_new_file = True;
}
@@ -1459,13 +1452,13 @@
// in the old file, hence the just_hit_a_new_file test).
if ( just_hit_a_new_file || lineCC->loc.fn != currFn ) {
currFn = lineCC->loc.fn;
- VG_(fdprintf)(fd, "fn=%s\n", currFn);
+ VG_(fprintf)(fp, "fn=%s\n", currFn);
distinct_fns++;
}
// Print the LineCC
if (clo_cache_sim && clo_branch_sim) {
- VG_(fdprintf)(fd, "%u %llu %llu %llu"
+ VG_(fprintf)(fp, "%u %llu %llu %llu"
" %llu %llu %llu"
" %llu %llu %llu"
" %llu %llu %llu %llu\n",
@@ -1477,7 +1470,7 @@
lineCC->Bi.b, lineCC->Bi.mp);
}
else if (clo_cache_sim && !clo_branch_sim) {
- VG_(fdprintf)(fd, "%u %llu %llu %llu"
+ VG_(fprintf)(fp, "%u %llu %llu %llu"
" %llu %llu %llu"
" %llu %llu %llu\n",
lineCC->loc.line,
@@ -1486,7 +1479,7 @@
lineCC->Dw.a, lineCC->Dw.m1, lineCC->Dw.mL);
}
else if (!clo_cache_sim && clo_branch_sim) {
- VG_(fdprintf)(fd, "%u %llu"
+ VG_(fprintf)(fp, "%u %llu"
" %llu %llu %llu %llu\n",
lineCC->loc.line,
lineCC->Ir.a,
@@ -1494,7 +1487,7 @@
lineCC->Bi.b, lineCC->Bi.mp);
}
else {
- VG_(fdprintf)(fd, "%u %llu\n",
+ VG_(fprintf)(fp, "%u %llu\n",
lineCC->loc.line,
lineCC->Ir.a);
}
@@ -1520,7 +1513,7 @@
// Summary stats must come after rest of table, since we calculate them
// during traversal. */
if (clo_cache_sim && clo_branch_sim) {
- VG_(fdprintf)(fd, "summary:"
+ VG_(fprintf)(fp, "summary:"
" %llu %llu %llu"
" %llu %llu %llu"
" %llu %llu %llu"
@@ -1532,7 +1525,7 @@
Bi_total.b, Bi_total.mp);
}
else if (clo_cache_sim && !clo_branch_sim) {
- VG_(fdprintf)(fd, "summary:"
+ VG_(fprintf)(fp, "summary:"
" %llu %llu %llu"
" %llu %llu %llu"
" %llu %llu %llu\n",
@@ -1541,7 +1534,7 @@
Dw_total.a, Dw_total.m1, Dw_total.mL);
}
else if (!clo_cache_sim && clo_branch_sim) {
- VG_(fdprintf)(fd, "summary:"
+ VG_(fprintf)(fp, "summary:"
" %llu"
" %llu %llu %llu %llu\n",
Ir_total.a,
@@ -1549,12 +1542,12 @@
Bi_total.b, Bi_total.mp);
}
else {
- VG_(fdprintf)(fd, "summary:"
+ VG_(fprintf)(fp, "summary:"
" %llu\n",
Ir_total.a);
}
- VG_(close)(fd);
+ VG_(fclose)(fp);
}
static UInt ULong_width(ULong n)
@@ -1570,8 +1563,8 @@
static void cg_fini(Int exitcode)
{
- static HChar buf1[128], buf2[128], buf3[128], buf4[123];
- static HChar fmt[128]; // large enough
+ static HChar buf1[128], buf2[128], buf3[128], buf4[123]; // FIXME
+ static HChar fmt[128]; // OK; large enough
CacheCC D_total;
BranchCC B_total;
Modified: branches/BUF_REMOVAL/cachegrind/cg_merge.c
==============================================================================
--- branches/BUF_REMOVAL/cachegrind/cg_merge.c (original)
+++ branches/BUF_REMOVAL/cachegrind/cg_merge.c Sat Nov 15 21:54:28 2014
@@ -157,23 +157,16 @@
// every invocation. Caller must not free it.
static const char *readline ( SOURCE* s )
{
- static char *line = NULL;
- static size_t linesiz;
-
- if (line == NULL) {
- linesiz = 1000;
- line = malloc(linesiz * sizeof *line);
- if (line == NULL)
- mallocFail(s, "readline:");
- }
+ static char *line = NULL;
+ static size_t linesiz = 0;
int ch, i = 0;
- line[0] = 0;
+
while (1) {
ch = getc(s->fp);
if (ch != EOF) {
- if (i == linesiz - 1) {
- linesiz += 1000;
+ if (i + 1 >= linesiz) {
+ linesiz += 500;
line = realloc(line, linesiz * sizeof *line);
if (line == NULL)
mallocFail(s, "readline:");
@@ -195,7 +188,7 @@
}
}
}
- return line[0] != 0 ? line : NULL;
+ return i == 0 ? NULL : line;
}
static Bool streqn ( const char* s1, const char* s2, size_t n )
@@ -487,7 +480,7 @@
return True;
}
-// str is a line of digits, starting with a line number. Parse it,
+// str is a line of integers, starting with a line number. Parse it,
// returning the first number in *lnno and the rest in a newly
// allocated Counts struct. If lnno is non-NULL, treat the first
// number as a line number and assign it to *lnno instead of
@@ -497,22 +490,19 @@
{
Bool ok;
Counts* counts;
- Int n_tmpC = 0, tmpCsize = 50;
- ULong *tmpC = malloc(tmpCsize * sizeof *tmpC);
- if (tmpC == NULL)
- mallocFail(s, "splitUpCountsLine:");
-
+ ULong *tmpC = NULL;
+ UInt n_tmpC = 0, tmpCsize = 0;
while (1) {
- ok = parse_ULong( &tmpC[n_tmpC], &str );
- if (!ok)
- break;
- n_tmpC++;
if (n_tmpC >= tmpCsize) {
tmpCsize += 50;
tmpC = realloc(tmpC, tmpCsize * sizeof *tmpC);
if (tmpC == NULL)
mallocFail(s, "splitUpCountsLine:");
}
+ ok = parse_ULong( &tmpC[n_tmpC], &str );
+ if (!ok)
+ break;
+ n_tmpC++;
}
if (*str != 0)
parseError(s, "garbage in counts line");
@@ -622,8 +612,8 @@
static CacheProfFile* parse_CacheProfFile ( SOURCE* s )
{
Int i;
- char** tmp_desclines;
- unsigned tmp_desclines_size;
+ char** tmp_desclines = NULL;
+ unsigned tmp_desclines_size = 0;
char* p;
int n_tmp_desclines = 0;
CacheProfFile* cpf;
@@ -636,11 +626,6 @@
if (cpf == NULL)
mallocFail(s, "parse_CacheProfFile(1)");
- tmp_desclines_size = 100;
- tmp_desclines = malloc(tmp_desclines_size * sizeof *tmp_desclines);
- if (tmp_desclines == NULL)
- mallocFail(s, "parse_CacheProfFile(1)");
-
// Parse "desc:" lines
while (1) {
line = readline(s);
Modified: branches/BUF_REMOVAL/callgrind/bbcc.c
==============================================================================
--- branches/BUF_REMOVAL/callgrind/bbcc.c (original)
+++ branches/BUF_REMOVAL/callgrind/bbcc.c Sat Nov 15 21:54:28 2014
@@ -338,24 +338,23 @@
/* String is returned in a dynamically allocated buffer. Caller is
responsible for free'ing it. */
-static HChar* mangled_cxt(Context* cxt, Int rec_index)
+static HChar* mangled_cxt(const Context* cxt, Int rec_index)
{
- SizeT size = 200;
- HChar *mangled = CLG_MALLOC("cl.bbcc.mcxt", size);
Int i, p;
- if (!cxt) return VG_(strcpy)(mangled, "(no context)");
+ if (!cxt) return VG_(strdup)("cl.bbcc.mcxt", "(no context)");
- grow_buffer(&mangled, &size, VG_(strlen)(cxt->fn[0]->name) + 1);
+ /* Overestimate the number of bytes we need to hold the string. */
+ SizeT need = 20; // rec_index + nul-terminator
+ for (i = 0; i < cxt->size; ++i)
+ need += VG_(strlen)(cxt->fn[i]->name) + 1; // 1 for leading '
+
+ HChar *mangled = CLG_MALLOC("cl.bbcc.mcxt", need);
p = VG_(sprintf)(mangled, "%s", cxt->fn[0]->name);
- if (rec_index >0) {
- grow_buffer(&mangled, &size, p + 1 + 11 + 1);
+ if (rec_index >0)
p += VG_(sprintf)(mangled+p, "'%d", rec_index +1);
- }
- for(i=1;i<cxt->size;i++) {
- grow_buffer(&mangled, &size, p + 1 + VG_(strlen)(cxt->fn[i]->name) + 1);
+ for(i=1;i<cxt->size;i++)
p += VG_(sprintf)(mangled+p, "'%s", cxt->fn[i]->name);
- }
return mangled;
}
@@ -419,14 +418,16 @@
CLG_DEBUGIF(3)
CLG_(print_bbcc)(-2, bbcc);
- // FIXME: mangled_cxt returns a pointer to a dynamically allocated buffer
- // that should be freed.
+ HChar *mangled_orig = mangled_cxt(orig->cxt, orig->rec_index);
+ HChar *mangled_bbcc = mangled_cxt(bbcc->cxt, bbcc->rec_index);
CLG_DEBUG(2,"- clone_BBCC(%p, %d) for BB %#lx\n"
" orig %s\n"
" new %s\n",
orig, rec_index, bb_addr(orig->bb),
- mangled_cxt(orig->cxt, orig->rec_index),
- mangled_cxt(bbcc->cxt, bbcc->rec_index));
+ mangled_orig,
+ mangled_bbcc);
+ CLG_FREE(mangled_orig);
+ CLG_FREE(mangled_bbcc);
CLG_(stat).bbcc_clones++;
Modified: branches/BUF_REMOVAL/callgrind/debug.c
==============================================================================
--- branches/BUF_REMOVAL/callgrind/debug.c (original)
+++ branches/BUF_REMOVAL/callgrind/debug.c Sat Nov 15 21:54:28 2014
@@ -373,8 +373,7 @@
/* dump out an address with source info if available */
void CLG_(print_addr)(Addr addr)
{
- HChar *fl_buf, *dir_buf;
- HChar *fn_buf;
+ const HChar *fn_buf, *fl_buf, *dir_buf;
const HChar* obj_name;
DebugInfo* di;
UInt ln, i=0, opos=0;
@@ -445,12 +444,6 @@
return VG_(malloc)(cc,s);
}
-void* CLG_(realloc)(const HChar* cc, void *p, UWord s, const HChar* f)
-{
- CLG_DEBUG(3, "Realloc(%lu) in %s.\n", s, f);
- return VG_(realloc)(cc,p,s);
-}
-
#else /* CLG_ENABLE_DEBUG */
void CLG_(print_bbno)(void) {}
Modified: branches/BUF_REMOVAL/callgrind/dump.c
==============================================================================
--- branches/BUF_REMOVAL/callgrind/dump.c (original)
+++ branches/BUF_REMOVAL/callgrind/dump.c Sat Nov 15 21:54:28 2014
@@ -124,83 +124,70 @@
}
-/* POZOR! VORSICHT! XIAO XIN! KIKEN! OBS!
- FIXME: Previously the code here used buffered (32k buffer) output when
- writing to a file descriptor. This output machinery has been
- replaced with VG_(fdprintf) which does not employ a buffer.
- If the files are large enough the unbuffered output could cause a
- performance degradation. Needs to be looked at before the branch
- is merged to trunk. May have to add VG_(fopen) etc if needed.
-*/
-
-static void print_obj(Int fd, const HChar* prefix, obj_node* obj)
+static void print_obj(VgFile *fp, const HChar* prefix, obj_node* obj)
{
- //int n;
-
if (CLG_(clo).compress_strings) {
CLG_ASSERT(obj_dumped != 0);
if (obj_dumped[obj->number])
- /*n =*/ VG_(fdprintf)(fd, "%s(%d)\n", prefix, obj->number);
+ VG_(fprintf)(fp, "%s(%d)\n", prefix, obj->number);
else {
- /*n =*/ VG_(fdprintf)(fd, "%s(%d) %s\n", prefix,
- obj->number, obj->name);
+ VG_(fprintf)(fp, "%s(%d) %s\n", prefix, obj->number, obj->name);
}
}
else
- /*n =*/ VG_(fdprintf)(fd, "%s%s\n", prefix, obj->name);
+ VG_(fprintf)(fp, "%s%s\n", prefix, obj->name);
#if 0
/* add mapping parameters the first time a object is dumped
* format: mp=0xSTART SIZE 0xOFFSET */
if (!obj_dumped[obj->number]) {
obj_dumped[obj->number];
- VG_(fdprintf)(fd, "mp=%p %p %p\n",
- pos->obj->start, pos->obj->size, pos->obj->offset);
+ VG_(fprintf)(fp, "mp=%p %p %p\n",
+ pos->obj->start, pos->obj->size, pos->obj->offset);
}
#else
obj_dumped[obj->number] = True;
#endif
}
-static void print_file(Int fd, const char *prefix, file_node* file)
+static void print_file(VgFile *fp, const char *prefix, const file_node* file)
{
if (CLG_(clo).compress_strings) {
CLG_ASSERT(file_dumped != 0);
if (file_dumped[file->number])
- VG_(fdprintf)(fd, "%s(%d)\n", prefix, file->number);
+ VG_(fprintf)(fp, "%s(%d)\n", prefix, file->number);
else {
- VG_(fdprintf)(fd, "%s(%d) %s\n", prefix,
- file->number, file->name);
+ VG_(fprintf)(fp, "%s(%d) %s\n", prefix, file->number, file->name);
file_dumped[file->number] = True;
}
}
else
- VG_(fdprintf)(fd, "%s%s\n", prefix, file->name);
+ VG_(fprintf)(fp, "%s%s\n", prefix, file->name);
}
/*
* tag can be "fn", "cfn", "jfn"
*/
-static void print_fn(Int fd, const HChar* tag, fn_node* fn)
+static void print_fn(VgFile *fp, const HChar* tag, const fn_node* fn)
{
- VG_(fdprintf)(fd, "%s=",tag);
+ VG_(fprintf)(fp, "%s=",tag);
if (CLG_(clo).compress_strings) {
CLG_ASSERT(fn_dumped != 0);
if (fn_dumped[fn->number])
- VG_(fdprintf)(fd, "(%d)\n", fn->number);
+ VG_(fprintf)(fp, "(%d)\n", fn->number);
else {
- VG_(fdprintf)(fd, "(%d) %s\n", fn->number, fn->name);
+ VG_(fprintf)(fp, "(%d) %s\n", fn->number, fn->name);
fn_dumped[fn->number] = True;
}
}
else
- VG_(fdprintf)(fd, "%s\n", fn->name);
+ VG_(fprintf)(fp, "%s\n", fn->name);
}
-static void print_mangled_fn(Int fd, const HChar* tag,
+static void print_mangled_fn(VgFile *fp, const HChar* tag,
Context* cxt, int rec_index)
{
- Int i;
+ int i;
if (CLG_(clo).compress_strings && CLG_(clo).compress_mangled) {
@@ -209,7 +196,8 @@
CLG_ASSERT(cxt_dumped != 0);
if (cxt_dumped[cxt->base_number+rec_index]) {
- VG_(fdprintf)(fd, "%s=(%d)\n", tag, cxt->base_number + rec_index);
+ VG_(fprintf)(fp, "%s=(%d)\n",
+ tag, cxt->base_number + rec_index);
return;
}
@@ -219,7 +207,8 @@
CLG_ASSERT(cxt->fn[i-1]->pure_cxt != 0);
n = cxt->fn[i-1]->pure_cxt->base_number;
if (cxt_dumped[n]) continue;
- VG_(fdprintf)(fd, "%s=(%d) %s\n", tag, n, cxt->fn[i-1]->name);
+ VG_(fprintf)(fp, "%s=(%d) %s\n",
+ tag, n, cxt->fn[i-1]->name);
cxt_dumped[n] = True;
last = cxt->fn[i-1]->pure_cxt;
@@ -227,40 +216,41 @@
/* If the last context was the context to print, we are finished */
if ((last == cxt) && (rec_index == 0)) return;
- VG_(fdprintf)(fd, "%s=(%d) (%d)", tag,
+ VG_(fprintf)(fp, "%s=(%d) (%d)", tag,
cxt->base_number + rec_index,
cxt->fn[0]->pure_cxt->base_number);
if (rec_index >0)
- VG_(fdprintf)(fd, "'%d", rec_index +1);
+ VG_(fprintf)(fp, "'%d", rec_index +1);
for(i=1;i<cxt->size;i++)
- VG_(fdprintf)(fd, "'(%d)", cxt->fn[i]->pure_cxt->base_number);
- VG_(fdprintf)(fd, "\n");
+ VG_(fprintf)(fp, "'(%d)",
+ cxt->fn[i]->pure_cxt->base_number);
+ VG_(fprintf)(fp, "\n");
cxt_dumped[cxt->base_number+rec_index] = True;
return;
}
- VG_(fdprintf)(fd, "%s=", tag);
+ VG_(fprintf)(fp, "%s=", tag);
if (CLG_(clo).compress_strings) {
CLG_ASSERT(cxt_dumped != 0);
if (cxt_dumped[cxt->base_number+rec_index]) {
- VG_(fdprintf)(fd, "(%d)\n", cxt->base_number + rec_index);
+ VG_(fprintf)(fp, "(%d)\n", cxt->base_number + rec_index);
return;
}
else {
- VG_(fdprintf)(fd, "(%d) ", cxt->base_number + rec_index);
+ VG_(fprintf)(fp, "(%d) ", cxt->base_number + rec_index);
cxt_dumped[cxt->base_number+rec_index] = True;
}
}
- VG_(fdprintf)(fd, "%s", cxt->fn[0]->name);
+ VG_(fprintf)(fp, "%s", cxt->fn[0]->name);
if (rec_index >0)
- VG_(fdprintf)(fd, "'%d", rec_index +1);
+ VG_(fprintf)(fp, "'%d", rec_index +1);
for(i=1;i<cxt->size;i++)
- VG_(fdprintf)(fd, "'%s", cxt->fn[i]->name);
+ VG_(fprintf)(fp, "'%s", cxt->fn[i]->name);
- VG_(fdprintf)(fd, "\n");
+ VG_(fprintf)(fp, "\n");
}
@@ -270,7 +260,7 @@
* the <last> position, update <last>
* Return True if something changes.
*/
-static Bool print_fn_pos(int fd, FnPos* last, BBCC* bbcc)
+static Bool print_fn_pos(VgFile *fp, FnPos* last, BBCC* bbcc)
{
Bool res = False;
@@ -283,7 +273,7 @@
if (!CLG_(clo).mangle_names) {
if (last->rec_index != bbcc->rec_index) {
- VG_(fdprintf)(fd, "rec=%d\n\n", bbcc->rec_index);
+ VG_(fprintf)(fp, "rec=%d\n\n", bbcc->rec_index);
last->rec_index = bbcc->rec_index;
last->cxt = 0; /* reprint context */
res = True;
@@ -297,12 +287,12 @@
if (curr_from == 0) {
if (last_from != 0) {
/* switch back to no context */
- VG_(fdprintf)(fd, "frfn=(spontaneous)\n");
+ VG_(fprintf)(fp, "frfn=(spontaneous)\n");
res = True;
}
}
else if (last_from != curr_from) {
- print_fn(fd, "frfn", curr_from);
+ print_fn(fp, "frfn", curr_from);
res = True;
}
last->cxt = bbcc->cxt;
@@ -310,20 +300,20 @@
}
if (last->obj != bbcc->cxt->fn[0]->file->obj) {
- print_obj(fd, "ob=", bbcc->cxt->fn[0]->file->obj);
+ print_obj(fp, "ob=", bbcc->cxt->fn[0]->file->obj);
last->obj = bbcc->cxt->fn[0]->file->obj;
res = True;
}
if (last->file != bbcc->cxt->fn[0]->file) {
- print_file(fd, "fl=", bbcc->cxt->fn[0]->file);
+ print_file(fp, "fl=", bbcc->cxt->fn[0]->file);
last->file = bbcc->cxt->fn[0]->file;
res = True;
}
if (!CLG_(clo).mangle_names) {
if (last->fn != bbcc->cxt->fn[0]) {
- print_fn(fd, "fn", bbcc->cxt->fn[0]);
+ print_fn(fp, "fn", bbcc->cxt->fn[0]);
last->fn = bbcc->cxt->fn[0];
res = True;
}
@@ -333,7 +323,7 @@
if ((last->rec_index != bbcc->rec_index) ||
(last->cxt != bbcc->cxt)) {
- print_mangled_fn(fd, "fn", bbcc->cxt, bbcc->rec_index);
+ print_mangled_fn(fp, "fn", bbcc->cxt, bbcc->rec_index);
last->fn = bbcc->cxt->fn[0];
last->rec_index = bbcc->rec_index;
res = True;
@@ -372,8 +362,7 @@
static /* __inline__ */
Bool get_debug_pos(BBCC* bbcc, Addr addr, AddrPos* p)
{
- HChar *file;
- HChar *dir;
+ const HChar *file, *dir;
Bool found_file_line, found_dirname;
int cachepos = addr % DEBUG_CACHE_SIZE;
@@ -390,12 +379,9 @@
&found_dirname,
&(p->line));
if (!found_file_line) {
- file = (HChar *)"???"; // FIXME: constification
+ file = "???";
p->line = 0;
}
- if (! found_dirname) {
- dir = (HChar *)"???"; // FIXME: constification
- }
p->file = CLG_(get_file_node)(bbcc->bb->obj, dir, file);
debug_cache_info[cachepos] = found_file_line;
@@ -447,7 +433,8 @@
* print position change inside of a BB (last -> curr)
* this doesn't update last to curr!
*/
-static void fprint_apos(Int fd, AddrPos* curr, AddrPos* last, file_node* func_file)
+static void fprint_apos(VgFile *fp, AddrPos* curr, AddrPos* last,
+ file_node* func_file)
{
CLG_ASSERT(curr->file != 0);
CLG_DEBUG(2, " print_apos(file '%s', line %d, bb %#lx, addr %#lx) fnFile '%s'\n",
@@ -458,14 +445,14 @@
/* if we switch back to orig file, use fe=... */
if (curr->file == func_file)
- print_file(fd, "fe=", curr->file);
+ print_file(fp, "fe=", curr->file);
else
- print_file(fd, "fi=", curr->file);
+ print_file(fp, "fi=", curr->file);
}
if (CLG_(clo).dump_bbs) {
if (curr->line != last->line) {
- VG_(fdprintf)(fd, "ln=%d\n", curr->line);
+ VG_(fprintf)(fp, "ln=%d\n", curr->line);
}
}
}
@@ -479,24 +466,24 @@
* This doesn't set last to curr afterwards!
*/
static
-void fprint_pos(Int fd, AddrPos* curr, AddrPos* last)
+void fprint_pos(VgFile *fp, const AddrPos* curr, const AddrPos* last)
{
if (0) //CLG_(clo).dump_bbs)
- VG_(fdprintf)(fd, "%lu ", curr->addr - curr->bb_addr);
+ VG_(fprintf)(fp, "%lu ", curr->addr - curr->bb_addr);
else {
if (CLG_(clo).dump_instr) {
int diff = curr->addr - last->addr;
if ( CLG_(clo).compress_pos && (last->addr >0) &&
(diff > -100) && (diff < 100)) {
if (diff >0)
- VG_(fdprintf)(fd, "+%d ", diff);
+ VG_(fprintf)(fp, "+%d ", diff);
else if (diff==0)
- VG_(fdprintf)(fd, "* ");
+ VG_(fprintf)(fp, "* ");
else
- VG_(fdprintf)(fd, "%d ", diff);
+ VG_(fprintf)(fp, "%d ", diff);
}
else
- VG_(fdprintf)(fd, "%#lx ", curr->addr);
+ VG_(fprintf)(fp, "%#lx ", curr->addr);
}
if (CLG_(clo).dump_bb) {
@@ -504,14 +491,14 @@
if ( CLG_(clo).compress_pos && (last->bb_addr >0) &&
(diff > -100) && (diff < 100)) {
if (diff >0)
- VG_(fdprintf)(fd, "+%d ", diff);
+ VG_(fprintf)(fp, "+%d ", diff);
else if (diff==0)
- VG_(fdprintf)(fd, "* ");
+ VG_(fprintf)(fp, "* ");
else
- VG_(fdprintf)(fd, "%d ", diff);
+ VG_(fprintf)(fp, "%d ", diff);
}
else
- VG_(fdprintf)(fd, "%#lx ", curr->bb_addr);
+ VG_(fprintf)(fp, "%#lx ", curr->bb_addr);
}
if (CLG_(clo).dump_line) {
@@ -520,14 +507,14 @@
(diff > -100) && (diff < 100)) {
if (diff >0)
- VG_(fdprintf)(fd, "+%d ", diff);
+ VG_(fprintf)(fp, "+%d ", diff);
else if (diff==0)
- VG_(fdprintf)(fd, "* ");
+ VG_(fprintf)(fp, "* ");
else
- VG_(fdprintf)(fd, "%d ", diff);
+ VG_(fprintf)(fp, "%d ", diff);
}
else
- VG_(fdprintf)(fd, "%u ", curr->line);
+ VG_(fprintf)(fp, "%u ", curr->line);
}
}
}
@@ -538,11 +525,11 @@
*/
static
-void fprint_cost(int fd, EventMapping* es, ULong* cost)
+void fprint_cost(VgFile *fp, const EventMapping* es, const ULong* cost)
{
- VG_(fdprintf)(fd, "%s\n",
- CLG_(mappingcost_as_string)(es, cost));
- return;
+ HChar *mcost = CLG_(mappingcost_as_string)(es, cost);
+ VG_(fprintf)(fp, "%s\n", mcost);
+ CLG_FREE(mcost);
}
@@ -552,7 +539,7 @@
* funcPos is the source position of the first line of actual function.
* Something is written only if cost != 0; returns True in this case.
*/
-static void fprint_fcost(Int fd, AddrCost* c, AddrPos* last)
+static void fprint_fcost(VgFile *fp, AddrCost* c, AddrPos* last)
{
CLG_DEBUGIF(3) {
CLG_DEBUG(2, " print_fcost(file '%s', line %d, bb %#lx, addr %#lx):\n",
@@ -560,10 +547,10 @@
CLG_(print_cost)(-5, CLG_(sets).full, c->cost);
}
- fprint_pos(fd, &(c->p), last);
+ fprint_pos(fp, &(c->p), last);
copy_apos( last, &(c->p) ); /* update last to current position */
- fprint_cost(fd, CLG_(dumpmap), c->cost);
+ fprint_cost(fp, CLG_(dumpmap), c->cost);
/* add cost to total */
CLG_(add_and_zero_cost)( CLG_(sets).full, dump_total_cost, c->cost );
@@ -572,7 +559,8 @@
/* Write out the calls from jcc (at pos)
*/
-static void fprint_jcc(Int fd, jCC* jcc, AddrPos* curr, AddrPos* last, ULong ecounter)
+static void fprint_jcc(VgFile *fp, jCC* jcc, AddrPos* curr, AddrPos* last,
+ ULong ecounter)
{
static AddrPos target;
file_node* file;
@@ -612,32 +600,32 @@
* which change the stack, and thus context
*/
if (last->file != target.file) {
- print_file(fd, "jfi=", target.file);
+ print_file(fp, "jfi=", target.file);
}
if (jcc->from->cxt != jcc->to->cxt) {
if (CLG_(clo).mangle_names)
- print_mangled_fn(fd, "jfn",
+ print_mangled_fn(fp, "jfn",
jcc->to->cxt, jcc->to->rec_index);
else
- print_fn(fd, "jfn", jcc->to->cxt->fn[0]);
+ print_fn(fp, "jfn", jcc->to->cxt->fn[0]);
}
if (jcc->jmpkind == jk_CondJump) {
/* format: jcnd=<followed>/<executions> <target> */
- VG_(fdprintf)(fd, "jcnd=%llu/%llu ",
+ VG_(fprintf)(fp, "jcnd=%llu/%llu ",
jcc->call_counter, ecounter);
}
else {
/* format: jump=<jump count> <target> */
- VG_(fdprintf)(fd, "jump=%llu ",
+ VG_(fprintf)(fp, "jump=%llu ",
jcc->call_counter);
}
- fprint_pos(fd, &target, last);
- VG_(fdprintf)(fd, "\n");
- fprint_pos(fd, curr, last);
- VG_(fdprintf)(fd, "\n");
+ fprint_pos(fp, &target, last);
+ VG_(fprintf)(fp, "\n");
+ fprint_pos(fp, curr, last);
+ VG_(fprintf)(fp, "\n");
jcc->call_counter = 0;
return;
@@ -648,26 +636,27 @@
/* object of called position different to object of this function?*/
if (jcc->from->cxt->fn[0]->file->obj != obj) {
- print_obj(fd, "cob=", obj);
+ print_obj(fp, "cob=", obj);
}
/* file of called position different to current file? */
if (last->file != file) {
- print_file(fd, "cfi=", file);
+ print_file(fp, "cfi=", file);
}
if (CLG_(clo).mangle_names)
- print_mangled_fn(fd, "cfn", jcc->to->cxt, jcc->to->rec_index);
+ print_mangled_fn(fp, "cfn", jcc->to->cxt, jcc->to->rec_index);
else
- print_fn(fd, "cfn", jcc->to->cxt->fn[0]);
+ print_fn(fp, "cfn", jcc->to->cxt->fn[0]);
if (!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost)) {
- VG_(fdprintf)(fd, "calls=%llu ", jcc->call_counter);
+ VG_(fprintf)(fp, "calls=%llu ",
+ jcc->call_counter);
- fprint_pos(fd, &target, last);
- VG_(fdprintf)(fd, "\n");
- fprint_pos(fd, curr, last);
- fprint_cost(fd, CLG_(dumpmap), jcc->cost);
+ fprint_pos(fp, &target, last);
+ VG_(fprintf)(fp, "\n");
+ fprint_pos(fp, curr, last);
+ fprint_cost(fp, CLG_(dumpmap), jcc->cost);
CLG_(init_cost)( CLG_(sets).full, jcc->cost );
@@ -689,7 +678,7 @@
* - JCCs of the unique jump of this BB
* returns True if something was written
*/
-static Bool fprint_bbcc(Int fd, BBCC* bbcc, AddrPos* last)
+static Bool fprint_bbcc(VgFile *fp, BBCC* bbcc, AddrPos* last)
{
InstrInfo* instr_info;
ULong ecounter;
@@ -730,8 +719,8 @@
if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) {
something_written = True;
- fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file);
- fprint_fcost(fd, currCost, last);
+ fprint_apos(fp, &(currCost->p), last, bbcc->cxt->fn[0]->file);
+ fprint_fcost(fp, currCost, last);
}
/* switch buffers */
@@ -754,16 +743,16 @@
if (jcc_count>0) {
if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) {
/* no need to switch buffers, as position is the same */
- fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file);
- fprint_fcost(fd, currCost, last);
+ fprint_apos(fp, &(currCost->p), last, bbcc->cxt->fn[0]->file);
+ fprint_fcost(fp, currCost, last);
}
get_debug_pos(bbcc, bb_addr(bb)+instr_info->instr_offset, &(currCost->p));
- fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file);
+ fprint_apos(fp, &(currCost->p), last, bbcc->cxt->fn[0]->file);
something_written = True;
for(jcc=bbcc->jmp[jmp].jcc_list; jcc; jcc=jcc->next_from) {
if (((jcc->jmpkind != jk_Call) && (jcc->call_counter >0)) ||
(!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost )))
- fprint_jcc(fd, jcc, &(currCost->p), last, ecounter);
+ fprint_jcc(fp, jcc, &(currCost->p), last, ecounter);
}
}
}
@@ -791,12 +780,12 @@
if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) {
/* no need to switch buffers, as position is the same */
- fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file);
- fprint_fcost(fd, currCost, last);
+ fprint_apos(fp, &(currCost->p), last, bbcc->cxt->fn[0]->file);
+ fprint_fcost(fp, currCost, last);
}
get_debug_pos(bbcc, bb_jmpaddr(bb), &(currCost->p));
- fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file);
+ fprint_apos(fp, &(currCost->p), last, bbcc->cxt->fn[0]->file);
something_written = True;
/* first, print skipped costs for calls */
@@ -805,9 +794,9 @@
CLG_(add_and_zero_cost)( CLG_(sets).full,
currCost->cost, bbcc->skipped );
#if 0
- VG_(fdprintf)(fd, "# Skipped\n");
+ VG_(fprintf)(fp, "# Skipped\n");
#endif
- fprint_fcost(fd, currCost, last);
+ fprint_fcost(fp, currCost, last);
}
if (jcc_count > 0)
@@ -816,7 +805,7 @@
if ( ((jcc->jmpkind != jk_Call) && (jcc->call_counter >0)) ||
(!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost )))
- fprint_jcc(fd, jcc, &(currCost->p), last, ecounter);
+ fprint_jcc(fp, jcc, &(currCost->p), last, ecounter);
}
}
@@ -824,10 +813,10 @@
if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) {
something_written = True;
- fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file);
- fprint_fcost(fd, currCost, last);
+ fprint_apos(fp, &(currCost->p), last, bbcc->cxt->fn[0]->file);
+ fprint_fcost(fp, currCost, last);
}
- if (CLG_(clo).dump_bbs) VG_(fdprintf)(fd, "\n");
+ if (CLG_(clo).dump_bbs) VG_(fprintf)(fp, "\n");
/* when every cost was immediatly written, we must have done so,
* as this function is only called when there's cost in a BBCC
@@ -1153,11 +1142,12 @@
-static void fprint_cost_ln(int fd, const HChar* prefix,
- EventMapping* em, ULong* cost)
+static void fprint_cost_ln(VgFile *fp, const HChar* prefix,
+ const EventMapping* em, const ULong* cost)
{
- VG_(fdprintf)(fd, "%s%s\n", prefix,
- CLG_(mappingcost_as_string)(em, cost));
+ HChar *mcost = CLG_(mappingcost_as_string)(em, cost);
+ VG_(fprintf)(fp, "%s%s\n", prefix, mcost);
+ CLG_FREE(mcost);
}
static ULong bbs_done = 0;
@@ -1181,12 +1171,12 @@
*
* Returns the file descriptor, and -1 on error (no write permission)
*/
-static int new_dumpfile(int tid, const HChar* trigger)
+static VgFile *new_dumpfile(int tid, const HChar* trigger)
{
Bool appending = False;
- int i, fd;
+ int i;
FullCost sum = 0;
- SysRes res;
+ VgFile *fp;
CLG_ASSERT(dumps_initialized);
CLG_ASSERT(filename != 0);
@@ -1200,25 +1190,24 @@
if (CLG_(clo).separate_threads)
VG_(sprintf)(filename+i, "-%02d", tid);
- res = VG_(open)(filename, VKI_O_WRONLY|VKI_O_TRUNC, 0);
+ fp = VG_(fopen)(filename, VKI_O_WRONLY|VKI_O_TRUNC, 0);
}
else {
VG_(sprintf)(filename, "%s", out_file);
- res = VG_(open)(filename, VKI_O_WRONLY|VKI_O_APPEND, 0);
- if (!sr_isError(res) && out_counter>1)
+ fp = VG_(fopen)(filename, VKI_O_WRONLY|VKI_O_APPEND, 0);
+ if (fp && out_counter>1)
appending = True;
}
- if (sr_isError(res)) {
- res = VG_(open)(filename, VKI_O_CREAT|VKI_O_WRONLY,
- VKI_S_IRUSR|VKI_S_IWUSR);
- if (sr_isError(res)) {
+ if (fp == NULL) {
+ fp = VG_(fopen)(filename, VKI_O_CREAT|VKI_O_WRONLY,
+ VKI_S_IRUSR|VKI_S_IWUSR);
+ if (fp == NULL) {
/* If the file can not be opened for whatever reason (conflict
between multiple supervised processes?), give up now. */
file_err();
}
}
- fd = (Int) sr_Res(res);
CLG_DEBUG(2, " new_dumpfile '%s'\n", filename);
@@ -1228,51 +1217,51 @@
if (!appending) {
/* version */
- VG_(fdprintf)(fd, "version: 1\n");
+ VG_(fprintf)(fp, "version: 1\n");
/* creator */
- VG_(fdprintf)(fd, "creator: callgrind-" VERSION "\n");
+ VG_(fprintf)(fp, "creator: callgrind-" VERSION "\n");
/* "pid:" line */
- VG_(fdprintf)(fd, "pid: %d\n", VG_(getpid)());
+ VG_(fprintf)(fp, "pid: %d\n", VG_(getpid)());
/* "cmd:" line */
- VG_(fdprintf)(fd, "cmd: %s\n", cmdbuf);
+ VG_(fprintf)(fp, "cmd: %s", cmdbuf);
}
- VG_(fdprintf)(fd, "\npart: %d\n", out_counter);
+ VG_(fprintf)(fp, "\npart: %d\n", out_counter);
if (CLG_(clo).separate_threads) {
- VG_(fdprintf)(fd, "thread: %d\n", tid);
+ VG_(fprintf)(fp, "thread: %d\n", tid);
}
/* "desc:" lines */
if (!appending) {
- VG_(fdprintf)(fd, "\n");
+ VG_(fprintf)(fp, "\n");
#if 0
/* Global options changing the tracing behaviour */
- VG_(fdprintf)(fd, "\ndesc: Option: --skip-plt=%s\n",
+ VG_(fprintf)(fp, "\ndesc: Option: --skip-plt=%s\n",
CLG_(clo).skip_plt ? "yes" : "no");
- VG_(fdprintf)(fd, "desc: Option: --collect-jumps=%s\n",
+ VG_(fprintf)(fp, "desc: Option: --collect-jumps=%s\n",
CLG_(clo).collect_jumps ? "yes" : "no");
- VG_(fdprintf)(fd, "desc: Option: --separate-recs=%d\n",
+ VG_(fprintf)(fp, "desc: Option: --separate-recs=%d\n",
CLG_(clo).separate_recursions);
- VG_(fdprintf)(fd, "desc: Option: --separate-callers=%d\n",
+ VG_(fprintf)(fp, "desc: Option: --separate-callers=%d\n",
CLG_(clo).separate_callers);
- VG_(fdprintf)(fd, "desc: Option: --dump-bbs=%s\n",
+ VG_(fprintf)(fp, "desc: Option: --dump-bbs=%s\n",
CLG_(clo).dump_bbs ? "yes" : "no");
- VG_(fdprintf)(fd, "desc: Option: --separate-threads=%s\n",
+ VG_(fprintf)(fp, "desc: Option: --separate-threads=%s\n",
CLG_(clo).separate_threads ? "yes" : "no");
#endif
- (*CLG_(cachesim).getdesc)(fd);
+ (*CLG_(cachesim).dump_desc)(fp);
}
- VG_(fdprintf)(fd, "\ndesc: Timerange: Basic block %llu - %llu\n",
+ VG_(fprintf)(fp, "\n...
[truncated message content] |