hardwired absolute path names. People can always arrange $PATH
such that these tools are found.
Fixes BZ #294065. Patch by Austin English <austinenglish@gmail.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15652
Use seg->start instead of a as DebugInfoMapping avma. Normally seg->start
equals a. But when it is not then the size of the map might extend beyond
the segment (and not actually cover the start of the segment). When another
ELF file is them mapped right after this then it triggers an overlap purge
of the DebugInfo. In the case the mapping was for libc or ld.so this then
removes all intercepts causing "bad things".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15398
e.g. perf/memrw is improved by 2% to 3% with this patch.
The unwinding code on x86 is trying to unwind using
either the %ebp-chain or CFI unwinding.
If these 2 techniques fail, then it tries to unwind
using FPO (PDB) debug info.
However, unless running wine or similar, there will never be
such FPO/PDB info.
The function VG_(use_FPO_info) is thus called for nothing
for each 'end of stack'. This function scans all the loaded di
to find a debug info that has some FP, to not find anything.
With this patch, the unwind code on x86 will only call VG_(use_FPO_info) if
some FPO/PDB info was loaded.
The fact that FPO/PDB info was loaded is cached and updated similarly to
cfi cache : each time new debug info is loaded, the cache value is refreshed
using the debuginfo generation.
The patch also changes the name of VG_(CF_info_generation)
to VG_(debuginfo_generation), as this generation is changed for
any kind of load or unload of debug info, not only for CFI based debug
info
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15293
On these platforms, implement read_/write_<type> by doing a direct
access, rather than calling a function that will read or write
'byte per byte'.
For platforms that do not have efficient unaligned access,
or that do not support at all unaligned access, call function
readUAS_/writeUAS_<type> that works as before.
Currently, direct acecss is activated only for x86 and amd64.
Unclear what other platforms support (efficiently) unaligned access.
On unwind intensive code (such as perf/memrw on amd64), this patch
gives up to 5% improvement.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15290
evaluation starts. For DW_CFA_val_expression and DW_CFA_expression
doing so is correct, but not for DW_CFA_def_cfa_expression.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15160
Valgrind aspects, to match vex r3124.
See bug 339778 - Linux/TileGx platform support to Valgrind
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15080
(1) In r14664 VG_(get_fnname_if_entry) was changed to always
return a function name, even if that function was *not* an
entry. That broke callgrind and was also confusing because
it contradicts what "get_fnname_if_entry" suggests.
(2) In r14189 a function call was removed because it was considered
redundant which it was not.
Both bugs were hunted down by Joseph Weidendorfer.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15003
code. Previously functions exceeding that size were observed in the
field. Assert for 100x that amount.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14997
the amount of file-reading resulting from DiImage-cache misses.
CACHE_N_ENTRIES:
Increase the DiImage cache size from 256KB to 8MB to deal with
drastically worse locality when reading inline info. The 256KB
setting dates from befre inline-info-reading days.
is_in_CEnt: remove a conditional branch from the hot path (of |get|,
effectively)
set_CEnt: marginally improve debug printing
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14977
loop forever. In particular, it will do that when two symbols have
exactly the same address range but differ in their .isText attribute.
Fixes#342117.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14948
to help with MSVC2013 compiled code. Variant of a patch from
Mark Browning (mabrowningrr@gmail.com). Fixes#211529.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14942
output from /usr/bin/strings, so as to not get confused by substrings
".pdb" and ".PDB" when they don't appear at the end of a line.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14938
address space manager. Callers should neither modify the string nor
free it (as the string resides is statically allocated memory). That
calls for a const HChar *
The type change exposed two bugs. One in m_addrinfo.c and one in
m_debuginfo.c. In both cases the returned string could possibly be freed later
on. So we need to strdup it first. Now fixed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14886
something != NULL. Testing fieldRs for NULL-ness was confusing static
analysis. It usually takes such tests as evidence that the pointer
can in fact be NULL and may report false positives as a consequence.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14845
the dirname_available parameter. It's redundant. The value
of the returned directory name can be tested instead.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14814
Left justification of strings in myvprintf_str was mixed up.
Now fixed and %s formats changed accordingly.
In function myvprintf_int64: the local buffer was not large
enough to hold ULONG_MAX in binary notation. Numbers were
truncated at 39 digits.
Testcases added.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14808
Use proper initialisation functions for the type and variable parser.
Add functions to release the dynamically allocated functions.
No longer maintain content of popped-off stack entries as that is
essentially freed memory and complicates matters unnecessarily.
Part of fixing BZ #337869.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14801
Two things:
- remove the buffer argument from VG_(DebugInfo_sect_kind)
- allocate AddrInfo::SectKind::objname dynamically
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14719
In the non-XML part buf_dirname was read without observing the
know_dirinfo guard. Now fixed. Initialise buf_dirname nevertheless.
Also remove a dead assignment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14707
(a) the 2nd argument must not be NULL
This was true anyhow and requiring it allows us to simplify the function
by eliminating the local buffer.
(b) the memory pointed to by the 2nd argument is always initialised
In the past the output file name was not initialised in case VG_(open)
failed 10 times in a row. The call sites in m_main.c and m_gdbserver/target.c
were reading the uninitialised filename unconditionally. This was spotted
by IBM's BEAM checker.
Fix call sites, eliminate some magic constants along the way.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14706