History log of /external/valgrind/coregrind/m_debuginfo/readdwarf.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ed39800a83baf5bffbe391f3974eb2af0f415f80 21-Jun-2017 Elliott Hughes <enh@google.com> Upgrade to valgrind 3.13.0 (15 June 2017).

Release 3.13.0 (15 June 2017)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3.13.0 is a feature release with many improvements and the usual collection of
bug fixes.

This release supports X86/Linux, AMD64/Linux, ARM32/Linux, ARM64/Linux,
PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux,
MIPS64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android,
X86/Solaris, AMD64/Solaris and AMD64/MacOSX 10.12.

* ==================== CORE CHANGES ===================

* The translation cache size has been increased to keep up with the demands of
large applications. The maximum number of sectors has increased from 24 to
48. The default number of sectors has increased from 16 to 32 on all
targets except Android, where the increase is from 6 to 12.

* The amount of memory that Valgrind can use has been increased from 64GB to
128GB. In particular this means your application can allocate up to about
60GB when running on Memcheck.

* Valgrind's default load address has been changed from 0x3800'0000 to
0x5800'0000, so as to make it possible to load larger executables. This
should make it possible to load executables of size at least 1200MB.

* A massive spaceleak caused by reading compressed debuginfo files has been
fixed. Valgrind should now be entirely usable with gcc-7.0 "-gz" created
debuginfo.

* The C++ demangler has been updated.

* Support for demangling Rust symbols has been added.

* A new representation of stack traces, the "XTree", has been added. An XTree
is a tree of stacktraces with data associated with the stacktraces. This is
used by various tools (Memcheck, Helgrind, Massif) to report on the heap
consumption of your program. Reporting is controlled by the new options
--xtree-memory=none|allocs|full and --xtree-memory-file=<file>.

A report can also be produced on demand using the gdbserver monitor command
'xtmemory [<filename>]>'. The XTree can be output in 2 formats: 'callgrind
format' and 'massif format. The existing visualisers for these formats (e.g.
callgrind_annotate, KCachegrind, ms_print) can be used to visualise and
analyse these reports.

Memcheck can also produce XTree leak reports using the Callgrind file
format. For more details, see the user manual.

* ================== PLATFORM CHANGES =================

* ppc64: support for ISA 3.0B and various fixes for existing 3.0 support

* amd64: fixes for JIT failure problems on long AVX2 code blocks

* amd64 and x86: support for CET prefixes has been added

* arm32: a few missing ARMv8 instructions have been implemented

* arm64, mips64, mips32: an alternative implementation of Load-Linked and
Store-Conditional instructions has been added. This is to deal with
processor implementations that implement the LL/SC specifications strictly
and as a result cause Valgrind to hang in certain situations. The
alternative implementation is automatically enabled at startup, as required.
You can use the option --sim-hints=fallback-llsc to force-enable it if you
want.

* Support for OSX 10.12 has been improved.

* On Linux, clone handling has been improved to honour CLONE_VFORK that
involves a child stack. Note however that CLONE_VFORK | CLONE_VM is handled
like CLONE_VFORK (by removing CLONE_VM), so applications that depend on
CLONE_VM exact semantics will (still) not work.

* The TileGX/Linux port has been removed because it appears to be both unused
and unsupported.

* ==================== TOOL CHANGES ====================

* Memcheck:

- Memcheck should give fewer false positives when running optimised
Clang/LLVM generated code.

- Support for --xtree-memory and 'xtmemory [<filename>]>'.

- New command line options --xtree-leak=no|yes and --xtree-leak-file=<file>
to produce the end of execution leak report in a xtree callgrind format
file.

- New option 'xtleak' in the memcheck leak_check monitor command, to produce
the leak report in an xtree file.

* Massif:

- Support for --xtree-memory and 'xtmemory [<filename>]>'.

- For some workloads (typically, for big applications), Massif memory
consumption and CPU consumption has decreased significantly.

* Helgrind:

- Support for --xtree-memory and 'xtmemory [<filename>]>'.

- addition of client request VALGRIND_HG_GNAT_DEPENDENT_MASTER_JOIN, useful
for Ada gnat compiled applications.

* ==================== OTHER CHANGES ====================

* For Valgrind developers: in an outer/inner setup, the outer Valgrind will
append the inner guest stacktrace to the inner host stacktrace. This helps
to investigate the errors reported by the outer, when they are caused by the
inner guest program (such as an inner regtest). See README_DEVELOPERS for
more info.

* To allow fast detection of callgrind files by desktop environments and file
managers, the format was extended to have an optional first line that
uniquely identifies the format ("# callgrind format"). Callgrind creates
this line now, as does the new xtree functionality.

* File name template arguments (such as --log-file, --xtree-memory-file, ...)
have a new %n format letter that is replaced by a sequence number.

* "--version -v" now shows the SVN revision numbers from which Valgrind was
built.

* ==================== FIXED BUGS ====================

The following bugs have been fixed or resolved. Note that "n-i-bz"
stands for "not in bugzilla" -- that is, a bug that was reported to us
but never got a bugzilla entry. We encourage you to file bugs in
bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather
than mailing the developers (or mailing lists) directly -- bugs that
are not entered into bugzilla tend to get forgotten about or ignored.

To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
where XXXXXX is the bug number as listed below.

162848 --log-file output isn't split when a program forks
340777 Illegal instruction on mips (ar71xx)
341481 MIPS64: Iop_CmpNE32 triggers false warning on MIPS64 platforms
342040 Valgrind mishandles clone with CLONE_VFORK | CLONE_VM that clones
to a different stack.
344139 x86 stack-seg overrides, needed by the Wine people
344524 store conditional of guest applications always fail - observed on
Octeon3(MIPS)
348616 Wine/valgrind: noted but unhandled ioctl 0x5390 [..] (DVD_READ_STRUCT)
352395 Please provide SVN revision info in --version -v
352767 Wine/valgrind: noted but unhandled ioctl 0x5307 [..] (CDROMSTOP)
356374 Assertion 'DRD_(g_threadinfo)[tid].pt_threadid !=
INVALID_POSIX_THREADID' failed
358213 helgrind/drd bar_bad testcase hangs or crashes with new glibc pthread
barrier implementation
358697 valgrind.h: Some code remains even when defining NVALGRIND
359202 Add musl libc configure/compile
360415 amd64 instructions ADCX and ADOX are not implemented in VEX
== 372828 (vex amd64->IR: 0x66 0xF 0x3A 0x62 0x4A 0x10)
360429 unhandled ioctl 0x530d with no size/direction hints (CDROMREADMODE1)
362223 assertion failed when .valgrindrc is a directory instead of a file
367543 bt/btc/btr/bts x86/x86_64 instructions are poorly-handled wrt flags
367942 Segfault vgPlain_do_sys_sigaction (m_signals.c:1138)
368507 can't malloc chunks larger than about 34GB
368529 Android arm target link error, missing atexit and pthread_atfork
368863 WARNING: unhandled arm64-linux syscall: 100 (get_robust_list)
368865 WARNING: unhandled arm64-linux syscall: 272 (kcmp)
368868 disInstr(arm64): unhandled instruction 0xD53BE000 = cntfrq_el0 (ARMv8)
368917 WARNING: unhandled arm64-linux syscall: 218 (request_key)
368918 WARNING: unhandled arm64-linux syscall: 127 (sched_rr_get_interval)
368922 WARNING: unhandled arm64-linux syscall: 161 (sethostname)
368924 WARNING: unhandled arm64-linux syscall: 84 (sync_file_range)
368925 WARNING: unhandled arm64-linux syscall: 130 (tkill)
368926 WARNING: unhandled arm64-linux syscall: 97 (unshare)
369459 valgrind on arm64 violates the ARMv8 spec (ldxr/stxr)
370028 Reduce the number of compiler warnings on MIPS platforms
370635 arm64 missing syscall getcpu
371225 Fix order of timer_{gettime,getoverrun,settime} syscalls on arm64
371227 Clean AArch64 syscall table
371412 Rename wrap_sys_shmat to sys_shmat like other wrappers
371471 Valgrind complains about non legit memory leaks on placement new (C++)
371491 handleAddrOverrides() is [incorrect] when ASO prefix is used
371503 disInstr(arm64): unhandled instruction 0xF89F0000
371869 support '%' in symbol Z-encoding
371916 execution tree xtree concept
372120 c++ demangler demangles symbols which are not c++
372185 Support of valgrind on ARMv8 with 32 bit executable
372188 vex amd64->IR: 0x66 0xF 0x3A 0x62 0x4A 0x10 0x10 0x48 (PCMPxSTRx $0x10)
372195 Power PC, xxsel instruction is not always recognized.
372504 Hanging on exit_group
372600 process loops forever when fatal signals are arriving quickly
372794 LibVEX (arm32 front end): 'Assertion szBlg2 <= 3' failed
373046 Stacks registered by core are never deregistered
373069 memcheck/tests/leak_cpp_interior fails with GCC 5.1+
373086 Implement additional Xen hypercalls
373192 Calling posix_spawn in glibc 2.24 completely broken
373488 Support for fanotify API on ARM64 architecture
== 368864 WARNING: unhandled arm64-linux syscall: 262 (fanotify_init)
373555 Rename BBPTR to GSPTR as it denotes guest state pointer only
373938 const IRExpr arguments for matchIRExpr()
374719 some spelling fixes
374963 increase valgrind's load address to prevent mmap failure
375514 valgrind_get_tls_addr() does not work in case of static TLS
375772 +1 error in get_elf_symbol_info() when computing value of 'hi' address
for ML_(find_rx_mapping)()
375806 Test helgrind/tests/tc22_exit_w_lock fails with glibc 2.24
375839 Temporary storage exhausted, with long sequence of vfmadd231ps insns
== 377159 "vex: the `impossible' happened" still present
== 375150 Assertion 'tres.status == VexTransOK' failed
== 378068 valgrind crashes on AVX2 function in FFmpeg
376142 Segfaults on MIPS Cavium Octeon boards
376279 disInstr(arm64): unhandled instruction 0xD50320FF
376455 Solaris: unhandled syscall lgrpsys(180)
376518 Solaris: unhandled fast trap getlgrp(6)
376611 ppc64 and arm64 don't know about prlimit64 syscall
376729 PPC64, remove R2 from the clobber list
== 371668
376956 syswrap of SNDDRV and DRM_IOCTL_VERSION causing some addresses
to be wrongly marked as addressable
377066 Some Valgrind unit tests fail to compile on Ubuntu 16.10 with
PIE enabled by default
377376 memcheck/tests/linux/getregset fails with glibc2.24
377427 PPC64, lxv instruction failing on odd destination register
377478 PPC64: ISA 3.0 setup fixes
377698 Missing memory check for futex() uaddr arg for FUTEX_WAKE
and FUTEX_WAKE_BITSET, check only 4 args for FUTEX_WAKE_BITSET,
and 2 args for FUTEX_TRYLOCK_PI
377717 Fix massive space leak when reading compressed debuginfo sections
377891 Update Xen 4.6 domctl wrappers
377930 fcntl syscall wrapper is missing flock structure check
378524 libvexmultiarch_test regression on s390x and ppc64
378535 Valgrind reports INTERNAL ERROR in execve syscall wrapper
378673 Update libiberty demangler
378931 Add ISA 3.0B additional isnstructions, add OV32, CA32 setting support
379039 syscall wrapper for prctl(PR_SET_NAME) must not check more than 16 bytes
379094 Valgrind reports INTERNAL ERROR in rt_sigsuspend syscall wrapper
379371 UNKNOWN task message [id 3444, to mach_task_self(), reply 0x603]
(task_register_dyld_image_infos)
379372 UNKNOWN task message [id 3447, to mach_task_self(), reply 0x603]
(task_register_dyld_shared_cache_image_info)
379390 unhandled syscall: mach:70 (host_create_mach_voucher_trap)
379473 MIPS: add support for rdhwr cycle counter register
379504 remove TileGX/Linux port
379525 Support more x86 nop opcodes
379838 disAMode(x86): not an addr!
379703 PC ISA 3.0 fixes: stxvx, stxv, xscmpexpdp instructions
379890 arm: unhandled instruction: 0xEBAD 0x1B05 (sub.w fp, sp, r5, lsl #4)
379895 clock_gettime does not execute POST syscall wrapper
379925 PPC64, mtffs does not set the FPCC and C bits in the FPSCR correctly
379966 WARNING: unhandled amd64-linux syscall: 313 (finit_module)
380200 xtree generated callgrind files refer to files without directory name
380202 Assertion failure for cache line size (cls == 64) on aarch64.
380397 s390x: __GI_strcspn() replacement needed
n-i-bz Fix pub_tool_basics.h build issue with g++ 4.4.7.

(3.13.0.RC1: 2 June 2017, vex r3386, valgrind r16434)
(3.13.0.RC2: 9 June 2017, vex r3389, valgrind r16443)
(3.13.0: 14 June 2017, vex r3396, valgrind r16446)

Bug: N/A
Test: manual
Change-Id: Id4498a49f462c3689cbcb35c15f96a8c7e3cea17
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
a0664b9ca67b594bd6f570a61d3301167a24750c 19-Apr-2017 Elliott Hughes <enh@google.com> Upgrade to valgrind 3.12.0.

Release 3.12.0 (20 October 2016)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3.12.0 is a feature release with many improvements and the usual
collection of bug fixes.

This release supports X86/Linux, AMD64/Linux, ARM32/Linux,
ARM64/Linux, PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux,
MIPS32/Linux, MIPS64/Linux, ARM/Android, ARM64/Android,
MIPS32/Android, X86/Android, X86/Solaris, AMD64/Solaris, X86/MacOSX
10.10 and AMD64/MacOSX 10.10. There is also preliminary support for
X86/MacOSX 10.11/12, AMD64/MacOSX 10.11/12 and TILEGX/Linux.

* ================== PLATFORM CHANGES =================

* POWER: Support for ISA 3.0 has been added

* mips: support for O32 FPXX ABI has been added.
* mips: improved recognition of different processors
* mips: determination of page size now done at run time

* amd64: Partial support for AMD FMA4 instructions.

* arm, arm64: Support for v8 crypto and CRC instructions.

* Improvements and robustification of the Solaris port.

* Preliminary support for MacOS 10.12 (Sierra) has been added.

Whilst 3.12.0 continues to support the 32-bit x86 instruction set, we
would prefer users to migrate to 64-bit x86 (a.k.a amd64 or x86_64)
where possible. Valgrind's support for 32-bit x86 has stagnated in
recent years and has fallen far behind that for 64-bit x86
instructions. By contrast 64-bit x86 is well supported, up to and
including AVX2.

* ==================== TOOL CHANGES ====================

* Memcheck:

- Added meta mempool support for describing a custom allocator which:
- Auto-frees all chunks assuming that destroying a pool destroys all
objects in the pool
- Uses itself to allocate other memory blocks

- New flag --ignore-range-below-sp to ignore memory accesses below
the stack pointer, if you really have to. The related flag
--workaround-gcc296-bugs=yes is now deprecated. Use
--ignore-range-below-sp=1024-1 as a replacement.

* DRD:

- Improved thread startup time significantly on non-Linux platforms.

* DHAT

- Added collection of the metric "tot-blocks-allocd"

* ==================== OTHER CHANGES ====================

* Replacement/wrapping of malloc/new related functions is now done not just
for system libraries by default, but for any globally defined malloc/new
related function (both in shared libraries and statically linked alternative
malloc implementations). The dynamic (runtime) linker is excluded, though.
To only intercept malloc/new related functions in
system libraries use --soname-synonyms=somalloc=nouserintercepts (where
"nouserintercepts" can be any non-existing library name).
This new functionality is not implemented for MacOS X.

* The maximum number of callers in a suppression entry is now equal to
the maximum size for --num-callers (500).
Note that --gen-suppressions=yes|all similarly generates suppressions
containing up to --num-callers frames.

* New and modified GDB server monitor features:

- Valgrind's gdbserver now accepts the command 'catch syscall'.
Note that you must have GDB >= 7.11 to use 'catch syscall' with
gdbserver.

* New option --run-cxx-freeres=<yes|no> can be used to change whether
__gnu_cxx::__freeres() cleanup function is called or not. Default is
'yes'.

* Valgrind is able to read compressed debuginfo sections in two formats:
- zlib ELF gABI format with SHF_COMPRESSED flag (gcc option -gz=zlib)
- zlib GNU format with .zdebug sections (gcc option -gz=zlib-gnu)

* Modest JIT-cost improvements: the cost of instrumenting code blocks
for the most common use case (x86_64-linux, Memcheck) has been
reduced by 10%-15%.

* Improved performance for programs that do a lot of discarding of
instruction address ranges of 8KB or less.

* The C++ symbol demangler has been updated.

* More robustness against invalid syscall parameters on Linux.

* ==================== FIXED BUGS ====================

The following bugs have been fixed or resolved. Note that "n-i-bz"
stands for "not in bugzilla" -- that is, a bug that was reported to us
but never got a bugzilla entry. We encourage you to file bugs in
bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather
than mailing the developers (or mailing lists) directly -- bugs that
are not entered into bugzilla tend to get forgotten about or ignored.

To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
where XXXXXX is the bug number as listed below.

191069 Exiting due to signal not reported in XML output
199468 Suppressions: stack size limited to 25
while --num-callers allows more frames
212352 vex amd64 unhandled opc_aux = 0x 2, first_opcode == 0xDC (FCOM)
278744 cvtps2pd with redundant RexW
303877 valgrind doesn't support compressed debuginfo sections.
345307 Warning about "still reachable" memory when using libstdc++ from gcc 5
348345 Assertion fails for negative lineno
351282 V 3.10.1 MIPS softfloat build broken with GCC 4.9.3 / binutils 2.25.1
351692 Dumps created by valgrind are not readable by gdb (mips32 specific)
351804 Crash on generating suppressions for "printf" call on OS X 10.10
352197 mips: mmap2() not wrapped correctly for page size > 4096
353083 arm64 doesn't implement various xattr system calls
353084 arm64 doesn't support sigpending system call
353137 www: update info for Supported Platforms
353138 www: update "The Valgrind Developers" page
353370 don't advertise RDRAND in cpuid for Core-i7-4910-like avx2 machine
== 365325
== 357873
353384 amd64->IR: 0x66 0xF 0x3A 0x62 0xD1 0x62 (pcmpXstrX $0x62)
353398 WARNING: unhandled amd64-solaris syscall: 207
353660 XML in auxwhat tag not escaping reserved symbols properly
353680 s390x: Crash with certain glibc versions due to non-implemented TBEGIN
353727 amd64->IR: 0x66 0xF 0x3A 0x62 0xD1 0x72 (pcmpXstrX $0x72)
353802 ELF debug info reader confused with multiple .rodata sections
353891 Assert 'bad_scanned_addr < VG_ROUNDDN(start+len, sizeof(Addr))' failed
353917 unhandled amd64-solaris syscall fchdir(120)
353920 unhandled amd64-solaris syscall: 170
354274 arm: unhandled instruction: 0xEBAD 0x0AC1 (sub.w sl, sp, r1, lsl #3)
354392 unhandled amd64-solaris syscall: 171
354797 Vbit test does not include Iops for Power 8 instruction support
354883 tst->os_state.pthread - magic_delta assertion failure on OSX 10.11
== 361351
== 362920
== 366222
354933 Fix documentation of --kernel-variant=android-no-hw-tls option
355188 valgrind should intercept all malloc related global functions
355454 do not intercept malloc related symbols from the runtime linker
355455 stderr.exp of test cases wrapmalloc and wrapmallocstatic overconstrained
356044 Dwarf line info reader misinterprets is_stmt register
356112 mips: replace addi with addiu
356393 valgrind (vex) crashes because isZeroU happened
== 363497
== 364497
356676 arm64-linux: unhandled syscalls 125, 126 (sched_get_priority_max/min)
356678 arm64-linux: unhandled syscall 232 (mincore)
356817 valgrind.h triggers compiler errors on MSVC when defining NVALGRIND
356823 Unsupported ARM instruction: stlex
357059 x86/amd64: SSE cvtpi2ps with memory source does transition to MMX state
357338 Unhandled instruction for SHA instructions libcrypto Boring SSL
357673 crash if I try to run valgrind with a binary link with libcurl
357833 Setting RLIMIT_DATA to zero breaks with linux 4.5+
357871 pthread_spin_destroy not properly wrapped
357887 Calls to VG_(fclose) do not close the file descriptor
357932 amd64->IR: accept redundant REX prefixes for {minsd,maxsd} m128, xmm.
358030 support direct socket calls on x86 32bit (new in linux 4.3)
358478 drd/tests/std_thread.cpp doesn't build with GCC6
359133 Assertion 'eltSzB <= ddpa->poolSzB' failed
359181 Buffer Overflow during Demangling
359201 futex syscall "skips" argument 5 if op is FUTEX_WAIT_BITSET
359289 s390x: popcnt (B9E1) not implemented
359472 The Power PC vsubuqm instruction doesn't always give the correct result
359503 Add missing syscalls for aarch64 (arm64)
359645 "You need libc6-dbg" help message could be more helpful
359703 s390: wire up separate socketcalls system calls
359724 getsockname might crash - deref_UInt should call safe_to_deref
359733 amd64 implement ld.so strchr/index override like x86
359767 Valgrind does not support the IBM POWER ISA 3.0 instructions, part 1/5
359829 Power PC test suite none/tests/ppc64/test_isa_2_07.c uses
uninitialized data
359838 arm64: Unhandled instruction 0xD5033F5F (clrex)
359871 Incorrect mask handling in ppoll
359952 Unrecognised PCMPESTRM variants (0x70, 0x19)
360008 Contents of Power vr registers contents is not printed correctly when
the --vgdb-shadow-registers=yes option is used
360035 POWER PC instruction bcdadd and bcdsubtract generate result with
non-zero shadow bits
360378 arm64: Unhandled instruction 0x5E280844 (sha1h s4, s2)
360425 arm64 unsupported instruction ldpsw
== 364435
360519 none/tests/arm64/memory.vgtest might fail with newer gcc
360571 Error about the Android Runtime reading below the stack pointer on ARM
360574 Wrong parameter type for an ashmem ioctl() call on Android and ARM64
360749 kludge for multiple .rodata sections on Solaris no longer needed
360752 raise the number of reserved fds in m_main.c from 10 to 12
361207 Valgrind does not support the IBM POWER ISA 3.0 instructions, part 2/5
361226 s390x: risbgn (EC59) not implemented
361253 [s390x] ex_clone.c:42: undefined reference to `pthread_create'
361354 ppc64[le]: wire up separate socketcalls system calls
361615 Inconsistent termination for multithreaded process terminated by signal
361926 Unhandled Solaris syscall: sysfs(84)
362009 V dumps core on unimplemented functionality before threads are created
362329 Valgrind does not support the IBM POWER ISA 3.0 instructions, part 3/5
362894 missing (broken) support for wbit field on mtfsfi instruction (ppc64)
362935 [AsusWRT] Assertion 'sizeof(TTEntryC) <= 88' failed
362953 Request for an update to the Valgrind Developers page
363680 add renameat2() support
363705 arm64 missing syscall name_to_handle_at and open_by_handle_at
363714 ppc64 missing syscalls sync, waitid and name_to/open_by_handle_at
363858 Valgrind does not support the IBM POWER ISA 3.0 instructions, part 4/5
364058 clarify in manual limitations of array overruns detections
364413 pselect sycallwrapper mishandles NULL sigmask
364728 Power PC, missing support for several HW registers in
get_otrack_shadow_offset_wrk()
364948 Valgrind does not support the IBM POWER ISA 3.0 instructions, part 5/5
365273 Invalid write to stack location reported after signal handler runs
365912 ppc64BE segfault during jm-insns test (RELRO)
366079 FPXX Support for MIPS32 Valgrind
366138 Fix configure errors out when using Xcode 8 (clang 8.0.0)
366344 Multiple unhandled instruction for Aarch64
(0x0EE0E020, 0x1AC15800, 0x4E284801, 0x5E040023, 0x5E056060)
367995 Integration of memcheck with custom memory allocator
368120 x86_linux asm _start functions do not keep 16-byte aligned stack pointer
368412 False positive result for altivec capability check
368416 Add tc06_two_races_xml.exp output for ppc64
368419 Perf Events ioctls not implemented
368461 mmapunmap test fails on ppc64
368823 run_a_thread_NORETURN assembly code typo for VGP_arm64_linux target
369000 AMD64 fma4 instructions unsupported.
369169 ppc64 fails jm_int_isa_2_07 test
369175 jm_vec_isa_2_07 test crashes on ppc64
369209 valgrind loops and eats up all memory if cwd doesn't exist.
369356 pre_mem_read_sockaddr syscall wrapper can crash with bad sockaddr
369359 msghdr_foreachfield can crash when handling bad iovec
369360 Bad sigprocmask old or new sets can crash valgrind
369361 vmsplice syscall wrapper crashes on bad iovec
369362 Bad sigaction arguments crash valgrind
369383 x86 sys_modify_ldt wrapper crashes on bad ptr
369402 Bad set/get_thread_area pointer crashes valgrind
369441 bad lvec argument crashes process_vm_readv/writev syscall wrappers
369446 valgrind crashes on unknown fcntl command
369439 S390x: Unhandled insns RISBLG/RISBHG and LDE/LDER
369468 Remove quadratic metapool algorithm using VG_(HT_remove_at_Iter)
370265 ISA 3.0 HW cap stuff needs updating
371128 BCD add and subtract instructions on Power BE in 32-bit mode do not work
n-i-bz Fix incorrect (or infinite loop) unwind on RHEL7 x86 and amd64
n-i-bz massif --pages-as-heap=yes does not report peak caused by mmap+munmap
n-i-bz false positive leaks due to aspacemgr merging heap & non heap segments
n-i-bz Fix ppoll_alarm exclusion on OS X
n-i-bz Document brk segment limitation, reference manual in limit reached msg.
n-i-bz Fix clobber list in none/tests/amd64/xacq_xrel.c [valgrind r15737]
n-i-bz Bump allowed shift value for "add.w reg, sp, reg, lsl #N" [vex r3206]
n-i-bz amd64: memcheck false positive with shr %edx
n-i-bz arm3: Allow early writeback of SP base register in "strd rD, [sp, #-16]"
n-i-bz ppc: Fix two cases of PPCAvFpOp vs PPCFpOp enum confusion
n-i-bz arm: Fix incorrect register-number constraint check for LDAEX{,B,H,D}
n-i-bz DHAT: added collection of the metric "tot-blocks-allocd"

(3.12.0.RC1: 20 October 2016, vex r3282, valgrind r16094)
(3.12.0.RC2: 20 October 2016, vex r3282, valgrind r16096)
(3.12.0: 21 October 2016, vex r3282, valgrind r16098)

Bug: http://b/37470713
Bug: http://b/29251682
Test: ran runtests-arm(64)?.sh and the bug reporter's specific binary (32- and 64-bit)
Change-Id: I43ccbea946d89fc4ae9f355181ac5061d6ce4453
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
b3a1e4bffbdbbf38304f216af405009868f43628 21-Aug-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates, to include 2015. No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
c6e5d76e9eea8625f385ff844545c688c91938da 06-Aug-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15500 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
8eb8bab992e3998c33770b0cdb16059a8b918a06 21-Jul-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Bug 345248 - add support for Solaris OS in valgrind

Authors of this port:
Petr Pavlu setup@dagobah.cz
Ivo Raisr ivosh@ivosh.net
Theo Schlossnagle theo@omniti.com



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
ad4e979f408239dabbaae955d8ffcb84a51a5c85 05-Jul-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix typos in source code. Patch by Dmitriy (olshevskiy87@bk.ru).
Fixes BZ #349874


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15394 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
5690824568ed50e767ad4af4fd10313134141a39 30-Apr-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> DW_CFA_def_cfa_expression: don't push the CFA on the stack before
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
112711afefcfcd43680c7c4aa8d38ef180e8811e 10-Apr-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a port to Linux/TileGx. Zhi-Gang Liu (zliu@tilera.com)
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
b6ba6d288e6000a8f95fba1dea671e0b53e26043 20-Mar-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Do not reuse Creg_IA_* for s390. Add dedicated entries Creg_S390_...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15025 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
237fd431ca0261d28ee5dec6d005af237002d0e0 09-Feb-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a bug introduced in r14913.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14925 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
45ee036d5512d088f138c143e8be8c1002e452e4 06-Feb-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix undefined behaviours when shifting.
Found by libubsan.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14913 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
c505820a8b10066dcbdcc7ab36b8ae55bd671575 17-Dec-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove two fixed-size buffers in the dwarf readers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14820 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
5f9db7f60ecfb14dfef483a8f8cf91473c7e3b06 06-Dec-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Eliminate fixed size buffer 'the_CIEs' and allocate it dynamically.
Part of fixing BZ #337869.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14800 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
3297124fa2116737066ac3cd709f18fdd5405163 23-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> 2 pints later: more coregrind constification.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14659 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
518850bf0da07ed3e2244e307268ae0fd80e93a8 23-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Constify coregrind.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14656 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
1ef70c6f00ab1b50d1936f77037e9923d8ed8c59 22-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Change VG_(allocEltDedupPA) to return a pointer to const. The reason is
that once an element has been allocated and added to the pool it must
not be modified afterwards. See the documentation in pub_tool_deduppoolalloc.h
The rest of the patch is ripple.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14654 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
91ed8ccd3dae8a6abfaa45cc0d250df47b45187f 15-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Tidy up m_xarray.c.
VG_(newXA) and VG_(cloneXA) never return NULL. Remove pointless asserts.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14539 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
666ee9df4c2b6d801b199b8168208dbb46573c9d 09-Aug-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> This patch implements reading the directory information for source
files in the dwarf3 reader.
Basically, the change consists in replacing in the DiInlLoc struct
const HChar* filename; /* caller source filename */
by
UInt fndn_ix; /* index in di->fndnpool of caller source
dirname/filename */

A similar change is done in DiVariable struct, as the
read_filename_Table code is shared between the inline info reader
and the varinfo reader.
Note however that outputting dirname in variable description
is not done. Unclear if that is desired or not.
It should be trivially doable however.
Replacing filename by fndn_ix implies a bunch of semi-mechanical
changes.

The code to read the directory names is in the new function
static
XArray* read_dirname_xa (struct _DebugInfo* di, const HChar *compdir,
Cursor *c,
Bool td3 )

Note that readdwarf.c and readdwarf3.c have significant duplicated
logic. Would be nice to integrate these 2 dwarf readers in one
single reader. This function is directly inspired from
an equivalent piece of code in readdwarf.c.

Modified memcheck/tests/varinfo5.vgtest to test the dirname appears
in the inlined functions.


Impact on memory is neglectable (a few Kb on a big executable).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14245 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
cae0cc22b83ffb260ee8379e92099c5a701944cb 08-Aug-2014 carll <carll@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit is for Bugzilla 334384. The Bugzilla contains patch 1 of 3
to add PPC64 LE support. The other two patches can be found in Bugzillas
334834 and 334836. The commit does not have a VEX commit associated with it.

POWER PC, add initial Little Endian support

The IBM POWER processor now supports both Big Endian and Little Endian.
This patch renames the #defines with the name ppc64 to ppc64be for the BE
specific code. This patch adds the Little Endian #define ppc64le to the

Additionally, a few functions are renamed to remove BE from the name if the
function is used by BE and LE. Functions that are BE specific have BE put
in the name.

The goals of this patch is to make sure #defines, function names and
variables consistently use PPC64/ppc64 if it refers to BE and LE,
PPC64BE/ppc64be if it is specific to BE, PPC64LE/ppc64le if it is LE
specific. The patch does not break the code for PPC64 Big Endian.

The test files memcheck/tests/atomic_incs.c, tests/power_insn_available.c
and tests/power_insn_available.c are also updated to the new #define
definition for PPC64 BE.

Signed-off-by: Carl Love <carll@us.ibm.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14238 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
59e1f3c79e870a978d24add86db6d8c5450c8b63 14-Jul-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> This patch decreases significantly the memory needed to store the lineloc info.

On a big executable, the trunk needs:
dinfo: 134873088/71438336 max/curr mmap'd, 134607808/66717872 max/curr

With the patch, we have:
dinfo: 99065856/56836096 max/curr mmap'd, 97883776/51663656 max/curr

So, peak dinfo memory decreases by about 36Mb, and final by 15Mb.

(for info, valgrind 3.9.0 uses
dinfo: 158941184/109666304 max/curr mmap'd, 156775944/107590656 max/curr
So, compared to 3.9.0, dinfo peak decreases by about 40%, and the final
memory is divided by more than 2).

The memory decrease is obtained by:

* using a dedup pool to store filename/dirname pair for the loctab source/line
information.
As typically, there is not a lot of such pairs, typically a UShort is
good enough to identify a fn/dn pair in a dedup pool.
To avoid losing memory due to alignment, the fndn indexes are stored
in a "parallel" array to the DiLoc loctab array, with entries having
1, or 2 or 4 bytes according to the nr of fn/dn pairs in the dedup pool.
See priv_storage.h comments for details.

(there was a extensible WordArray local implementation in readdwarf.c.
As with this change, we use an xarray, the local implementation was
removed).

* the memory needed for --read-inline-info is slightly decreased (-2Mb)
by removing the (unused) dirname from the DiInlLoc struct.
Handling dirname for inlined function caller implies to rework
the dwarf3 parser read_filename_table common to the var and inlinfo parser.
Waiting for this to be done, the dirname component is removed from DiInlLoc.

* the stabs reader (readstabs.c) is broken since 3.9.0.
For this change, the code has been updated to make it compile with the new
DiLoc/FnDn dedup pool. As the code is completely broken, a vg_assert(0)
has been put at the begin of the stabs reader.

* the pdb reader (readpdb.c) has been trivially updated and should still work.
It has not been tested (how do we test this ?).
A follow-up patch will be done to avoid doing too many calls to
ML_(addFnDn) : instead of having one call per ML_(addLineInfo), one
should have a single call done when reading the filename table.

This has also be tested in an outer/inner setup, to verify no
memory leak/bugs.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14158 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
5c3dba227192de63d86f65ec7d9597c132818c37 05-Jul-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> This patch decreases significantly the memory needed to store the cfsi info.

On a big executable, the trunk needs:
dinfo: 155844608/106737664 max/curr mmap'd 155572624/102276760 max/curr

With the patch, we have:
dinfo: 134873088/70389760 max/curr mmap'd 134607808/66717512 max/curr

So, peak dinfo memory decreases by 21Mb, and final by 36Mb.

The memory decrease is obtained by:

* using a dedup pool to store the machine dependent part (cfsi_m)
of the cfsi information as this information is highly duplicated.
For x86 and arm64, the duplication factor of cfsi machine dependent
part is very high (up to a factor 60).
For arm64, it is more like a factor 3.
A 'variable size' (1, 2 or 4 bytes) is automatically used to identify
the cfsi_m, if there is less than or more than 255/64K different cfsi_m.

* not storing explicitely the length of a range for which a cfsi_m
is to be used: in a large majority of the cases, ranges are
consecutive, and so the end of a range is just one byte before
the start of the next range.
So, we do not store the length of the ranges.
If there is a hole between 2 ranges, the hole is stored explicitely
as a range in which we have no cfsi_m information.
On x86 and amd64, we have quite some holes (something like one hole
every 7 cfsi). On arm64, we have very few holes (less than one hole
every 50 cfsi).
Even with the nr of holes on x86/amd64, it is more memory efficient
to store the holes rather than to store the length of each cfsi.

* Merging consecutive ranges that have the same cfsi_m info:
Many cfsi are "mergeable": there is no hole between 2 cfsi, and their
machine dependent part is identical
(I guess the unwind info needed by valgrind is subset of the full
unwind info, and so, the cfsi entries are not merged by the compiler,
but can be merged for simple unwind). Depending on the platform
(x86, amd64, arm64) and of the library/object file, we can have a
significant nr of mergeable entries.


The patch is not very small, but a lot is mechanical changes.

The patch has been compiled and tested on x86/amd64/ppc32/ppc64
(but ppc does not use cfsi so that just verifies it compiles).
It has been compiled on arm64, and "tested" by launching valgrind on
one executable.
It has not been compiled on s390 and mips.
With some luck, maybe it will compile on these platforms.
And if that uses the whole provision of luck for 2014, it might even work
on these platforms :).
If it does not compile, the fix should be straightforward.
Runtime problems might be more tricky (but arm64 "worked out of the box"
once x86/amd64 were ok).

This has also be tested in an outer/inner setup, to verify no memory leak/bugs.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14129 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
821283b2110420321fd3f60afcc799b287788c68 13-Jan-2014 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Initial implementation of CFI based stack unwinding for arm64-linux.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13774 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
f0c1250e324f6684757c6a15545366447ef1d64f 12-Jan-2014 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for ARMv8 AArch64 (the 64 bit ARM instruction set).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13770 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
0f157ddb404bcde7815a1c5bf2d7e41c114f3d73 18-Oct-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates (20XY-2012 ==> 20XY-2013)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
b36d316856c187f298b1f8f4aae704587e6c4124 19-Sep-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Recent libxul.so on ARM has more than 5000 CIEs. Increase N_CIEs,
therefore.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13565 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
5d616dfbb8439dfd51a40ddf1dba970938baa1eb 02-Jul-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r13421:HEAD from branches/DISRV. This merges the debuginfo-server
stuff into the trunk.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13440 a5019735-40e9-0310-863c-91ae7b9d1cf9
087eb382b98836e558457408f086d3701f94186f 26-Apr-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Increase size of the CIEs array to 5000.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13378 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
b22a1a4c4fdc4c8076284687a94123f08573df80 19-Apr-2013 petarj <petarj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Calculate offsets in read_dwarf2_lineblock based on is64

Reading header length and values in external line info was incorrect at
some places as it used offsets based on dw64 that came from .debug_info.
Instead, offsets should be calculated based on is64 from .debug_line.
This issue surfaced in MIPS64 port, and it was discussed at:

https://bugs.kde.org/show_bug.cgi?id=313267#c20


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13373 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
4c3b2379fb2cb97f762617df7770b042b1f8a59c 17-Apr-2013 mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9> Simplify read_unitinfo_dwarf2. Only try to read the first DIE.

Bug #305513. We should only read the first DIE of a compilation unit.
Each compilation unit header is followed by a single DW_TAG_compile_unit
(or DW_TAG_partial_unit, but those aren't important here) and its children.
There is no reason to read any of the children at this point. If the first
DIE isn't a DW_TAG_compile_unit we are done, none of the child DIEs will
provide any useful information.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13369 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
58d9ce4730d95103c9388be264a170ab852432a9 11-Apr-2013 mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9> read_unitinfo_dwarf2 DW_FORM_ref_addr is address size in DWARF version 2.

Bug #305513 contained a patch for some extra robustness checks. But
the real cause of crashing in the read_unitinfo_dwarf2 DWARF reader
seemed to have been this issue where DWARF version 2 DWZ partial_units
were read and DW_FORM_ref_addr had an unexpected size. This combination
is rare. DWARF version 4 is the current default version of GCC.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13367 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
4df0bfc0614379192c780c944415dc420d9cfe8e 28-Feb-2013 petarj <petarj@a5019735-40e9-0310-863c-91ae7b9d1cf9> mips: adding MIPS64LE support to Valgrind

Necessary changes to Valgrind to support MIPS64LE on Linux.
Minor cleanup/style changes embedded in the patch as well.
The change corresponds to r2687 in VEX.
Patch written by Dejan Jevtic and Petar Jovanovic.

More information about this issue:
https://bugs.kde.org/show_bug.cgi?id=313267


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13292 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
6bd9dc18c043927c1196caba20a327238a179c42 23-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changes to allow compilation with -Wwrite-strings. That compiler option
is not used for testcases, just for valgrind proper.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13137 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
1636d33c13958b9c0e7d3059cdd5005746418eb2 15-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Char/HChar fixups for m_debuginfo and m_gdbserver.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13122 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
40628facff2285b0fce592381c6e26fdcd2a1252 21-Sep-2012 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement some extra DW_OPs - more constants and some unary operators.
Patch from Mark Wielaard on BZ#307038.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13010 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
f6716dd8f025c9ace67541f3360d7f4523496d8a 21-Sep-2012 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Rename CfiOp to CfiBinop in preparation for adding unary operators.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13009 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
79fb23144578d24ddabb49d1c9d2b8e0c58240f8 21-Sep-2012 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> When processing DW_OP_plus_uconst make sure we record an add, not
whatever binary operation we happened to see last.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13008 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
3aab0adbce0414db42bc9ae509e0a86133143725 24-Aug-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix skipping of block forms when this code is compiled by gcc 4.8 -- it
has always been incorrect, modifying 'p' twice between sequence points.
Fixes #305513. (Mark Wielaard, mjw@redhat.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12892 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
03f8d3fc25f5a45c5826259d1b33b7f310117279 05-Aug-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to include 2012.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
f7c9714ea0cde18daaecb896278e85e780d3bd75 14-Jul-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Initial support for DWZ compressed debuginfo -- don't crash, at least,
when reading it. Bug 302901 comment 3. (Jakub Jelinek, jakub@redhat.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12742 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
5db15403e889d4db339b342bc2a824ef0bfaa654 07-Jun-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mips-valgrind@rt-rk.com, Bug 270777.

Valgrind: changes to existing files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12616 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
d935068fc7b53c8a826b3436cdfccd5b7d446903 05-Apr-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for reading DWARF4 .debug_types sections. Fixes #284124.
(Tom Tromey, tromey@redhat.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12491 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
87a1fa5fd47ba309d196e5c8127bf2d98c8bfa65 20-Feb-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> ARM/Thumb only: fix a bug in which stack unwinding halts in some
functions that do FP arithmetic. This is due to the Dwarf3 CFI
mentioning Dwarf registers above N_CFI_REGS, in particular FP
registers, which have values of about 80. This fixes the problem by
increasing N_CFI_REGS to a level that covers all known registers.
(n-i-bz)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12393 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
ec062e8d96a361af9905b5447027819dfbfee01a 23-Oct-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update all copyright dates, from 20xy-2010 to 20xy-2011.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
ba4ce2f444ed31687d539a081b06dd76cdd4a39c 03-Oct-2011 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix another read_UInt that should be read_Addr.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12089 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
fd892fc2654e6eae5e40f401a230e0fb80d6362f 02-Oct-2011 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add read_Addr and use it so that we work on systems where an address
is bigger that an int.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12084 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
b4dd5b4d16fe556d465fcec53f72e059da1ce511 02-Oct-2011 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Avoid using direct access to read multi-byte values from DWARF files
and use read_Type routines instead as they work rather better on strict
aligned (or semi-strict a la ARM) machines. Fixes #282527.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12083 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
d32fb2b481ee4eda50a62e49d25199e0174940e0 02-Oct-2011 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move read_<type> routines from readdwarf.c to be module level
routines in misc.c so that other parts of the debuginfo module
can access them.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12081 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
a5acac39bf3be7546222b1316faee5ee524be0d1 20-Sep-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> A refactoring change; no functional effect. struct _DebugInfo
contains a bunch of fields which are used as a very simple state
machine that observes mmap calls and decides when to read debuginfo
for the associated file. This change moves these fields into their
own structure, struct _DebugInfoFSM, for cleanness, so as to make it
clear they have a common purpose.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12041 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
0b98239b3e0abd430dbc913454d63c7e3d8c8b12 05-Jul-2011 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement some extra DWARF ops that gcc 4.6.1 seems to use. Fixes #275284.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11856 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
452e89a9f847975609b3ad318943830f2cce841c 30-May-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle ELF objects with two .eh_frame sections. This fixes a problem
handling libxul.so when linked by gold on x86_64. (n-i-bz)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11790 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
dd2932b2699cdf758b5ff875bfb5d1c725cf08e6 10-May-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Back out r11705, which was an attempt to make reading of line number
info created by LLVM 2.9 work properly. As per long discussion in
#272189, this isn't actually possible -- LLVM 2.9 creates bogus line
number info, and the bogusness can't be worked around at the Valgrind
end.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11738 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
ad15ace7c226d62b766aa9ece832f935e6717337 09-May-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> read_dwarf2_lineblock: debug printing fix (no functional change)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11733 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
06938afc5606be015c4793da47d70ef987ef631d 21-Apr-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make reading of line number info from LLVM-2.9-generated Dwarf3 work.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11705 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
d2be8cc17fed04cbd701e9a2cc1cf365ff45cc44 28-Mar-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove a bunch more warnings generated by gcc-4.6 about dead
assignments ("[-Wunused-but-set-variable]"), on ppc32-linux and
ppc64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11674 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
c7ffc94890e120c72d5802487b1092425323dc02 28-Mar-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix up most but not all warnings generated by gcc-4.6 about
dead assignments ("[-Wunused-but-set-variable]").



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11673 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
b5b87408c0c99f9f6938d8cd921e2a5f420577c4 07-Mar-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>). Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
a2b2bb8a4030a07821ad18915339a3cd9983ccc9 30-Sep-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make readdwarf.c big endianess safe to enable unwinding on big endian
systems. (Christian Borntraeger, borntraeger@de.ibm.com). Fixes
#248893.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11391 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
fa5ce5616a17e79828fbc79f30b02b5085151e3c 24-Sep-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> On arm-linux, add r7 to the set of registers that the CFI unwinder
knows how to unwind. This is important when unwinding Thumb code
the CFA is often stated as being at some offset from r7.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11377 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
987a765d9c5be7da6832aed3a22786520867137f 23-Sep-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> DW_CFA_advance_loc{,1,2,4} fail to multiply the delta by
code_alignment_factor, thereby assuming it is 1. This happens to be
OK on amd64-linux and s390x-linux because it really is 1, but on
arm-linux it is 2, and hence the boundaries between code-unwind areas
are simply wrong after any of DW_CFA_advance_loc{,1,2,4} are
processed. This patch provides the obvious fix.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11376 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
9eecbbb9a9cbbd30b903c09a9e04d8efc20bda33 03-May-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to 2010.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
fba428cd266b8a39db641c5fd9523daa8939bed0 28-Apr-2010 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add some basic DWARF4 support. Based on patch from Jakub Jelinek
but with support for VLIW architectures with multiple opcodes per
instruction removed. Fixes #233595.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11106 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
d2aac89707eddf73bccf7c09a1472b3bb6a5ec32 01-Jan-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> initUnwindContext: put back into the loop, some initialisations for
ARM which were originally in the loop but inadvertantly got lifted out
during recent merging. This appears to make stack unwinding work
again on ARM-Linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10988 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
9365e3f48bc3efe2486bf4bc04111a2d89db5520 01-Jan-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Unbreak stack unwinding on x86-linux and amd64-linux following merge
of ARM CFI unwinding in r10986.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10987 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
3026f71684a930286186aa10fef266c304672e8f 01-Jan-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make the Dwarf3 CFI stack unwinding machinery work on arm-linux
too. This is a first step towards making not be completely
x86/amd64-linux specific, and so replaces some x86/amd64-specific
stuff with more general constructions:

* structure 'DiCfSI', into which the info is summarised, has been
made target-specific (ugh), since the sets of registers to be
unwound differ on different targets.

* enum CfiReg and the CFIC_ constants have been expanded
accordingly, to handle both arm and x86/amd64 registers.

The abbreviation "IA" (Intel Architecture) has been used in a
few places where the x86 and amd64 definitions are shared.

* the CFI reader/summariser in readdwarf.c has been expanded &
generalised appropriately.

* the DiCfSI evaluator in debuginfo.c, VG_(use_CFI_info), has
also been generalised appropriately.

The main change is that instead of passing around triples
of (IP, SP, BP) values, a new structure 'D3UnwindRegs' is
passed around instead. This is defined differently for IA and
ARM and succeeds in hiding at least some of the differences
where we don't care about them.

Note also, D3UnwindRegs duplicates, in purpose and structure,
structure 'RegSummary' in priv_d3basics.h. This will be tidied
up in due course.

This commit almost certainly breaks stack unwinding on amd64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10986 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
e32a3b09418ce96a27a39044da1e853f5ce52994 03-Dec-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Double the size of some table to do with reading CIEs.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10964 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
3c9cf3442185b5891e15450d6e3058aeff6796fe 12-Nov-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Various improvements to DWARF handling to cope with changes in recent
versions of gcc as shipped with Fedora 12. Specific changes include:

- Vastly increase the number of opcodes we understand how to
evaluate when processing a location expression.

- Process frame unwind data from the debug_frame ELF section as
well as the eh_frame section.

- Handle version 3 CIEs in frame unwind data.

- Handle the compact form of DW_AT_data_member_location which just
gives a constant offset from the start of it's base type instead
of a full location expression.

Based on patches from Jakub Jelinek on bugs #210479 and #210566.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10939 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
de1b03da8168ecaa16d0fa05f83066f334c6948e 03-Aug-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Patch to remember/restore CFA state on DW_CFA_{remember,restore}_state.
In addition to that it fixes a bug in restore_ctx handling, where it
was restoring the state from the same stack level in restore_ctx
context as is current in ctx, which is wrong, the CIE likely has no
DW_CFA_remember_state at all, while the FDE could have one.
(Jakub Jelinek). This is #200029, patch in comment #2.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10697 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
d8011772ac0520edc193899f995e166ba70f14e9 03-Aug-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Use Dwarf3 section version numbers as specified in Appendix F of the
Dwarf3 standard. (Jakub Jelinek). This is #200029, patch in comment
#1.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10696 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
738856f99eea33d86ce91dcb1d6cd5b151e307ca 15-Jul-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge coregrind/ changes from branches/MESSAGING_TIDYUP r10464.

This commit tidies up and rationalises what could be called the
"messaging" system -- that part of V to do with presenting output to
the user. In particular it brings significant improvements to XML
output.

Changes are:

* XML and normal text output now have separate file descriptors,
which solves longstanding problems for XML consumers caused by
the XML output getting polluted by unexpected non-XML output.

* This also means that we no longer have to hardwire all manner
of output settings (verbosity, etc) when XML is requested.

* The XML output format has been revised, cleaned up, and made
more suitable for use by error detecting tools in general
(various Memcheck-specific features have been removed). XML
output is enabled for Ptrcheck and Helgrind, and Memcheck is
updated to the new format.

* One side effect is that the behaviour of VG_(message) has been
made to be consistent with printf: it no longer automatically
adds a newline at the end of the output. This means multiple
calls to it can be used to build up a single line message; or a
single call can write a multi-line message. The ==pid==
preamble is automatically inserted at each newline.

* VG_(message)(Vg_UserMsg, ..args..) now has the abbreviated form
VG_(UMSG)(..args..); ditto VG_(DMSG) for Vg_DebugMsg and
VG_(EMSG) for Vg_DebugExtraMsg. A couple of other useful
printf derivatives have been added to pub_tool_libcprint.h,
most particularly VG_(vcbprintf).

* There's a small change in the core-tool interface to do with
error handling: VG_(needs_tool_errors) has a new method
void (*before_pp_Error)(Error* err) which, if non-NULL, is
called just before void (*pp_Error)(Error* err). This is to
give tools the chance to look at errors before any part of them
is printed, so they can print any XML preamble they like.

* coregrind/m_errormgr.c has been overhauled and cleaned up, and
is a bit simpler and more commented. In particular pp_Error
and VG_(maybe_record_error) are significantly changed.

The diff is huge, but mostly very boring. Most of the changes
are of the form

- VG_(message)(Vg_UserMsg, "this is a message %d", n);
+ VG_(message)(Vg_UserMsg, "this is a message %d\n", n);

Unfortunately as a result of this, it touches a large number
of source files.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10465 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
8b68b64759254d514d98328c496cbd88cde4c9a5 24-Jun-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
preprocessor, rather than via the build system. This is more consistent
(we use the pre-processor for small arch/OS/platform-specific chunks
within files) and makes the build system much simpler, as the sources for
all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out. If a
new platform is implemented, you need to add 11 extra Makefile.am lines.
Previously it was over 100 lines.

- Vex has been autotoolised. Dependency checking now works in Vex (no more
incomplete builds). Parallel builds now also work. --with-vex no longer
works; it's little use and a pain to support. VEX/Makefile is still in
the Vex repository and gets overwritten at configure-time; it should
probably be renamed Makefile-gcc to avoid possible problems, such as
accidentally committing a generated Makefile. There's a bunch of hacky
copying to deal with the fact that autotools don't handle same-named files
in different directories. Julian plans to rename the files to avoid this
problem.

- Various small Makefile.am things have been made more standard automake
style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
own.

- The existing five top-level Makefile.am include files have been
consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
headers separating sections, declarations relating to the same things next
to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed. And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
f76d27a697a7b0bf3b84490baf60623fc96a23af 28-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge the DARWIN branch onto the trunk.

I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts. So instead I just took the diff between
the branch and trunk at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
3d026b18e0b41e5f13336f1997054f56cbd89da0 21-May-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle DW_CFA_{remember,restore}_state. This requires having a stack
of currently on-the-go register rules, rather than just one.

gcc doesn't appear to generate these (it's pretty darn obscure), but
they do turn up a piece of handwritten assembly somewhere in the
depths of Python-2.6 on amd64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10075 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
80b8b09c2b5107b955909a89f15e1f88852e7bc6 08-Apr-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle DW_CFA_same_value opcodes in DWARF CFI data.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9520 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
4c245e595b9f6300d3120408ca873f7115d9cc7d 16-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix all the non-VEX problems identified with the Clang Static Analyzer.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9416 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
9f207460d70d38c46c9e81996a3dcdf90961c6db 10-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated copyright years.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
402c9eed11b9b60c6e134d05db938e395466cf99 09-Mar-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Keep track of the svma and bias values for the debug data separately
as they may be different to those for other sections of the ELF file
if we have separated debug information and the main file has been
prelinked since they were split. Fixes bug #185816.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9329 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
1dcee097db02f9ef3ba355162c4373d90d0e895c 24-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove a number of unused parameters, found with -Wunused-parameter.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9248 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
13596ffd2407e45060ce430dfe087ac44ad4d22e 26-Jan-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle a couple of artefacts generated by gcc-4.4: DW_OP_reg{0..31}
and DW_OP_const1s.

--> 3_4_BRANCH




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9057 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
588658b13b5ad77672f323d48fe9da0ca60b0bcb 22-Jan-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't assume that all global variables are in the data section - we
now cope with variables in the text, data, sdata and bss sections.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9021 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
9c606bd8634cd6b67bb41fa645b5c639668cfa2d 18-Sep-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge all remaining changes from branches/PTRCHECK. These are some
relatively minor extensions to m_debuginfo, a major overhaul of
m_debuginfo/readdwarf3.c to get its space usage under control, and
changes throughout the system to enable heap-use profiling.

The majority of the merged changes were committed into
branches/PTRCHECK as the following revs: 8591 8595 8598 8599 8601 and
8161.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8621 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
a0b6b2cf9abc7b0d87be1215a245eaccc0452af9 07-Jul-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged FORMATCHECK branch (r8368) to trunk.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8369 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
b8b79addf04dd5d0b558916e26df0b1927cbd758 03-Mar-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in the DATASYMS branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7540 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
4d474d086188fd1f29fa97dbd84d8ea2e589a9b8 11-Feb-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates ("200X-2007" --> "200X-2008").


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
c153bf6a502f49184c61af3ae779a09d50c15359 14-Jan-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle DW_OP_plus_uconst. Possibly fixes #155091 (not yet confirmed
by reporter).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7347 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
1ff57e6a7669ea9ccebd7cc8883e02b477e8597b 20-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Be more robust against malformed DWARF2 line number information: don't
assert when a reference is made to a filename not in the filename
table. Fixes #150380 and #129937.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7191 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
bd7aca648dd9ee152dbdc4474b533a55e543514c 01-Sep-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle DW_OP_deref in DWARF3 expressions. Fixes #147285.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6793 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
7888e2204fff6e7429236b4227ed16594e7743b9 28-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle DW_CFA_def_cfa_expression; also DW_OP_mul.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6627 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
19dc88f90d0e19a1463797dd99f6792a42f961d3 28-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fill in a few more DWARF3 'expression' related cases.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6626 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
261e4ce7d6f537a5800b6576637e5f9465407961 27-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Barf more elegantly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6623 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
c4217cd6b977a21385a2f5f0559318392a73dc1b 27-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make the leb readers 64-bit clean. That should guard against another
couple of decades of Moore's law.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6621 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
72427fa91a5e05e3323b5a8a407bd8d7b04c75cc 27-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add limited support for DWARF3 'expressions' in stack-unwind (CFI)
info (DW_CFA_def_cfa_expression, DW_CFA_expression,
DW_CFA_val_expression). Mechanism to support all of these is in place
although only DW_CFA_val_expression is currently connected up.

This is really nasty. The basic idea is to partially evaluate each
expression at the debuginfo-reading time by running it on a stack
machine in which each stack element is an expression tree. If the
expression can be 'run' successfully, the tree (dag, really) remaining
at the top of the stack is massaged and put into the DiCfSI record for
that address range. At unwind time the tree is evaluated if needed.
Such cases are in fact extremely rare and so the vast majority of
unwindings use the same mechanism as before.

As a result of all this:

* some obscure cases in glibc-2.5's libpthread.so unwind when they
didn't before

* --debug-dump=frames produces identical output to that of readelf
for libc-2.5.so and associated libpthread.so

* All the action centers around the new type CfiExpr, which is a
union expression-tree type in the same style as IRExpr et al

* Many dark corners of the CFI reader have been looked at and
(re-)validated



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6620 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
94ef4a4208c19994029f8975649e2f762c028e32 25-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Comment-only change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6617 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
ddf006d7198dbfc0b02cd975360722bb0a15dc82 25-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> CFI reader: make reading of 'encoded addresses' be much more in
line with the DWARF3 spec and also with binutils/readelf.c:

- Update some comments

- Get rid of kludge_then_addDiCfSI; apparently no longer needed

- Pass the SegInfo's text_bias around in the AddressDecodingInfo,
so that ...

- read_encoded_Addr can set 'base' to the text_bias when handling
DW_EH_PE_absptr. This is the central change of this commit and
appears (to me) to be what DWARF3 requires. (The spec is less
than clear ..)

- don't use read_encoded_Addr to read the FDE arange field since
read_encoded_Addr's adding-on of a 'base' value is meaningless
here - the arange is not an address, but a value saying how many
bytes the FDE covers. Instead just read a little-endian value of
the right size. This is in accordance with DWARF3 and with
readelf.c. Add new function read_le_encoded_literal to make
this possible.

I believe this is all correct, and it's certainly much better than it
was. But given that the DWARF3 spec isn't as formal as it should be,
it's hard to be sure.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6611 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
461d6c69908dade34a67afe34b09f54cce74d5a3 23-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make the frame unwinder able to handle 64-bit DWARF (untested :-(
mostly by a lot of comparison of this code vs that of
binutils-2.17/binutils/dwarf.c vs the relevant specs.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6610 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
687bbf6d72a26d7f7f35f672a67ca2bbe1455a8d 16-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Improve --debug-dump=frames output.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6600 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
8c90d27dc7e301e79bc008d1941bd0bc0dc8f362 16-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Correctly handle DW_CFA_def_cfa_sf (existing code fails to scale
offset by data_a_f).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6599 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
3646a495f974e4aacf329e7539a0d584962ff6f6 16-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Non-functional (debug printing only) change:

Implement GNU binutils 'readelf' style output for --debug-dump=lines
(fully) and --debug-dump=frames (partially).

Initial testing with --debug-dump=lines shows our DWARF2 line number
reader behaves identically to readelf for all examples I tried so far.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6597 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
f767d967b9ef331dcd7d0cd4584f6570cd829333 12-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Essentially non-functional tidyings and improvements to debuginfo
reading. Two sets of changes:

* New flags for debugging the readers.
--debug-dump=syms
--debug-dump=line
--debug-dump=frames

These (currently accepted but nonfunctional) are intended to
create output in the style of (that is, identical to)
/usr/bin/readelf --syms
/usr/bin/readelf --debug-dump=line
/usr/bin/readelf --debug-dump=frames
respectively. The plan is that flaws in these readers can then
be easily found by diff-ing the output against that from readelf.

Also, a new flag --trace-symtab-patt=<object filename pattern>
which is used to limit all debuginfo-related debug info to the
set of shared object names matching the given pattern. This
facilitates extracting the debuginfo details of one specific
shared object, which is usually what is required, rather than
having to wade through megabytes of junk from every object in
the process.

* Propagate the avma/svma/image address-naming scheme
(as described at the top of debuginfo.c) through large parts of
readelf.c and readdwarf.c.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6588 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
301901f43437bbf2b02d0df49f6bcfde27485936 12-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle DW_CFA_undefined (produced by PathScale 2.4 on amd64-linux)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6510 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
3891dd4124828c451c0e36c89a5c6f0f2ac56f71 12-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> ML_(read_callframe_info_dwarf2): deal better with CIEs with no
augmentation (has to do with read_encoded_Addr). This "fix" is a
kludge and may be replaced in future by something cleaner. See
extensive comment addition for the whole sorry tale.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6509 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
c6d3f6f0aec8607dded979fd15a9876a486ec682 11-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Non-functional change: rename a bunch of variables and field names
that hold various kinds of addresses during debuginfo reading, so as
to make it easier to understand. See comment at top of debuginfo.c.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6506 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
9ebd6e0c607fa30301b1325874eb8de871c21cc5 08-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
1936f8b3b201839583a39d0514049bcb1e3c3c2b 16-Nov-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> CFI reader: when decoding the single (address) argument to
DW_CFA_set_loc, take into account any encoding info conveyed by the
augmentation string. See big comment in the code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6356 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
e4b0bf07b0ee0a18eacc5aba91686ab5fc1d327b 06-Jun-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
534e2019b34f2be1ae10a3b35961704030617893 12-Apr-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Properly handle external debuginfo (.gnu_debuglink) for stripped and
prelinked libraries (patch from L. David Baron).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5841 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
d69222cb20119a410b777665e16873a2391f9344 08-Apr-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fold in a patch which appeared in FC5's default valgrind build, which
causes V to ignore more DWARF3 CFA expressions on amd64 and so gets
rid of complaints from the CFA reader. Why didn't Red Hat push this
patch upstream? I don't know.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5838 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c
eadcd86d1b0f59efed44c162ef4378ccfb528290 04-Apr-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Cleanup/restructure m_debuginfo, as described in
coregrind/m_debuginfo/README.txt.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5823 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/readdwarf.c