aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-09-23Make ltrace build again.HEADmastermainElliott Hughes
It's still not very useful, but we do now build enough of elfutils with clang that we can build this, and my other makefile changes here let ltrace actually decode some of the function arguments (though there's some gaps because it's expecting glibc which has far less _FORTIFY_SOURCE than we do, for example). Test: manual Change-Id: I8ff9cb267b917aa052ac8cc3a2eec05be3d14479
2015-07-30Merge "package version metadata for external/"android-wear-n-preview-3android-wear-n-preview-2android-wear-n-preview-1android-n-preview-5android-n-preview-4android-n-preview-3android-n-preview-2android-n-preview-1android-n-mr2-preview-2android-n-mr2-preview-1android-n-mr1-preview-2android-n-mr1-preview-1android-n-iot-release-smart-display-r2android-n-iot-release-smart-displayandroid-n-iot-release-polk-at1android-n-iot-release-lg-thinq-wk7android-n-iot-release-ihome-igv1android-n-iot-preview-4android-cts_7.1_r1android-cts-7.1_r9android-cts-7.1_r8android-cts-7.1_r7android-cts-7.1_r6android-cts-7.1_r5android-cts-7.1_r4android-cts-7.1_r3android-cts-7.1_r29android-cts-7.1_r28android-cts-7.1_r27android-cts-7.1_r26android-cts-7.1_r25android-cts-7.1_r24android-cts-7.1_r23android-cts-7.1_r22android-cts-7.1_r21android-cts-7.1_r20android-cts-7.1_r2android-cts-7.1_r19android-cts-7.1_r18android-cts-7.1_r17android-cts-7.1_r16android-cts-7.1_r15android-cts-7.1_r14android-cts-7.1_r13android-cts-7.1_r12android-cts-7.1_r11android-cts-7.1_r10android-cts-7.1_r1android-cts-7.0_r9android-cts-7.0_r8android-cts-7.0_r7android-cts-7.0_r6android-cts-7.0_r5android-cts-7.0_r4android-cts-7.0_r33android-cts-7.0_r32android-cts-7.0_r31android-cts-7.0_r30android-cts-7.0_r3android-cts-7.0_r29android-cts-7.0_r28android-cts-7.0_r27android-cts-7.0_r26android-cts-7.0_r25android-cts-7.0_r24android-cts-7.0_r23android-cts-7.0_r22android-cts-7.0_r21android-cts-7.0_r20android-cts-7.0_r2android-cts-7.0_r19android-cts-7.0_r18android-cts-7.0_r17android-cts-7.0_r16android-cts-7.0_r15android-cts-7.0_r14android-cts-7.0_r13android-cts-7.0_r12android-cts-7.0_r11android-cts-7.0_r10android-cts-7.0_r1android-7.1.2_r9android-7.1.2_r8android-7.1.2_r6android-7.1.2_r5android-7.1.2_r4android-7.1.2_r39android-7.1.2_r38android-7.1.2_r37android-7.1.2_r36android-7.1.2_r33android-7.1.2_r32android-7.1.2_r30android-7.1.2_r3android-7.1.2_r29android-7.1.2_r28android-7.1.2_r27android-7.1.2_r25android-7.1.2_r24android-7.1.2_r23android-7.1.2_r2android-7.1.2_r19android-7.1.2_r18android-7.1.2_r17android-7.1.2_r16android-7.1.2_r15android-7.1.2_r14android-7.1.2_r13android-7.1.2_r12android-7.1.2_r11android-7.1.2_r10android-7.1.2_r1android-7.1.1_r9android-7.1.1_r8android-7.1.1_r7android-7.1.1_r61android-7.1.1_r60android-7.1.1_r6android-7.1.1_r59android-7.1.1_r58android-7.1.1_r57android-7.1.1_r56android-7.1.1_r55android-7.1.1_r54android-7.1.1_r53android-7.1.1_r52android-7.1.1_r51android-7.1.1_r50android-7.1.1_r49android-7.1.1_r48android-7.1.1_r47android-7.1.1_r46android-7.1.1_r45android-7.1.1_r44android-7.1.1_r43android-7.1.1_r42android-7.1.1_r41android-7.1.1_r40android-7.1.1_r4android-7.1.1_r39android-7.1.1_r38android-7.1.1_r35android-7.1.1_r33android-7.1.1_r32android-7.1.1_r31android-7.1.1_r3android-7.1.1_r28android-7.1.1_r27android-7.1.1_r26android-7.1.1_r25android-7.1.1_r24android-7.1.1_r23android-7.1.1_r22android-7.1.1_r21android-7.1.1_r20android-7.1.1_r2android-7.1.1_r17android-7.1.1_r16android-7.1.1_r15android-7.1.1_r14android-7.1.1_r13android-7.1.1_r12android-7.1.1_r11android-7.1.1_r10android-7.1.1_r1android-7.1.0_r7android-7.1.0_r6android-7.1.0_r5android-7.1.0_r4android-7.1.0_r3android-7.1.0_r2android-7.1.0_r1android-7.0.0_r9android-7.0.0_r8android-7.0.0_r7android-7.0.0_r6android-7.0.0_r5android-7.0.0_r4android-7.0.0_r36android-7.0.0_r35android-7.0.0_r34android-7.0.0_r33android-7.0.0_r32android-7.0.0_r31android-7.0.0_r30android-7.0.0_r3android-7.0.0_r29android-7.0.0_r28android-7.0.0_r27android-7.0.0_r24android-7.0.0_r21android-7.0.0_r19android-7.0.0_r17android-7.0.0_r15android-7.0.0_r14android-7.0.0_r13android-7.0.0_r12android-7.0.0_r11android-7.0.0_r10android-7.0.0_r1nougat-releasenougat-mr2.3-releasenougat-mr2.2-releasenougat-mr2.1-releasenougat-mr2-security-releasenougat-mr2-releasenougat-mr2-pixel-releasenougat-mr2-devnougat-mr1.8-releasenougat-mr1.7-releasenougat-mr1.6-releasenougat-mr1.5-releasenougat-mr1.4-releasenougat-mr1.3-releasenougat-mr1.2-releasenougat-mr1.1-releasenougat-mr1-volantis-releasenougat-mr1-security-releasenougat-mr1-releasenougat-mr1-flounder-releasenougat-mr1-devnougat-mr1-cts-releasenougat-mr0.5-releasenougat-iot-releasenougat-dr1-releasenougat-devnougat-cts-releasenougat-bugfix-releasen-preview-2n-preview-1n-mr2-preview-1n-mr1-preview-1n-iot-preview-4Bill Napier
2015-06-22Disable ltrace build.android-wear-7.1.1_r1android-n-iot-preview-2nougat-mr1-wear-releasen-iot-preview-2Elliott Hughes
Change-Id: Ic601f4b03add21135f9179b82e478c1c5d91da54
2015-06-02package version metadata for external/Damien Miller
This will be used for automated notification of external vulnerability reports. Change-Id: Iee30634e4b64caf97b3222126a4f913b5c11fb78
2015-04-15Remove libunwind-ptrace dependency.android-m-preview-2android-m-preview-1android-m-previewandroid-lego-6.0.1_r2android-lego-6.0.1_r1android-cts-6.0_r9android-cts-6.0_r8android-cts-6.0_r7android-cts-6.0_r6android-cts-6.0_r5android-cts-6.0_r4android-cts-6.0_r32android-cts-6.0_r31android-cts-6.0_r30android-cts-6.0_r3android-cts-6.0_r29android-cts-6.0_r28android-cts-6.0_r27android-cts-6.0_r26android-cts-6.0_r25android-cts-6.0_r24android-cts-6.0_r23android-cts-6.0_r22android-cts-6.0_r21android-cts-6.0_r20android-cts-6.0_r2android-cts-6.0_r19android-cts-6.0_r18android-cts-6.0_r17android-cts-6.0_r16android-cts-6.0_r15android-cts-6.0_r14android-cts-6.0_r13android-cts-6.0_r12android-cts-6.0_r1android-6.0.1_r9android-6.0.1_r81android-6.0.1_r80android-6.0.1_r8android-6.0.1_r79android-6.0.1_r78android-6.0.1_r77android-6.0.1_r74android-6.0.1_r73android-6.0.1_r72android-6.0.1_r70android-6.0.1_r7android-6.0.1_r69android-6.0.1_r68android-6.0.1_r67android-6.0.1_r66android-6.0.1_r65android-6.0.1_r63android-6.0.1_r62android-6.0.1_r61android-6.0.1_r60android-6.0.1_r59android-6.0.1_r58android-6.0.1_r57android-6.0.1_r56android-6.0.1_r55android-6.0.1_r54android-6.0.1_r53android-6.0.1_r52android-6.0.1_r51android-6.0.1_r50android-6.0.1_r5android-6.0.1_r49android-6.0.1_r48android-6.0.1_r47android-6.0.1_r46android-6.0.1_r45android-6.0.1_r43android-6.0.1_r42android-6.0.1_r41android-6.0.1_r40android-6.0.1_r4android-6.0.1_r33android-6.0.1_r32android-6.0.1_r31android-6.0.1_r30android-6.0.1_r3android-6.0.1_r28android-6.0.1_r27android-6.0.1_r26android-6.0.1_r25android-6.0.1_r24android-6.0.1_r22android-6.0.1_r21android-6.0.1_r20android-6.0.1_r18android-6.0.1_r17android-6.0.1_r16android-6.0.1_r13android-6.0.1_r12android-6.0.1_r11android-6.0.1_r10android-6.0.1_r1android-6.0.0_r7android-6.0.0_r6android-6.0.0_r5android-6.0.0_r41android-6.0.0_r4android-6.0.0_r3android-6.0.0_r26android-6.0.0_r25android-6.0.0_r24android-6.0.0_r23android-6.0.0_r2android-6.0.0_r13android-6.0.0_r12android-6.0.0_r11android-6.0.0_r1master-soongmarshmallow-releasemarshmallow-mr3-releasemarshmallow-mr2-releasemarshmallow-mr1-releasemarshmallow-mr1-devmarshmallow-dr1.6-releasemarshmallow-dr1.5-releasemarshmallow-dr1.5-devmarshmallow-dr-releasemarshmallow-dr-lego-releasemarshmallow-dr-dragon-releasemarshmallow-dr-devmarshmallow-devmarshmallow-cts-releaseChristopher Ferris
Change-Id: I2bc07526df79bcbda57b850d077350859afe92f8
2015-02-15Remove unnecessary manual include path entries.Elliott Hughes
We pick up elfutils and libunwind headers for free by linking the libraries. Change-Id: Icd5006766ac9dc8a208a22f762865ee60f82a455
2015-02-05Use the libcxxabi __cxa_demangle.Elliott Hughes
Bug: 18930951 Change-Id: I5b2cc82f2bc4fcb95de0a0ef7ecf4ab0178d20fb
2014-09-04Remove makefile cruft.Elliott Hughes
The files that need _GNU_SOURCE define it themselves, and bionic now correctly takes that to imply the latest _POSIX_C_SOURCE (which this _wasn't_ getting, leading to a missing declaration for open_memstream). Bug: 17361504 Change-Id: Idd1c2abb6818d5216a7cdcdbaa235a113447831f
2014-04-09Build ltrace for x86 and x86-64.android-wear-5.1.1_r1android-wear-5.1.0_r1android-wear-5.0.0_r1android-l-preview_r2android-cts-5.1_r9android-cts-5.1_r8android-cts-5.1_r7android-cts-5.1_r6android-cts-5.1_r5android-cts-5.1_r4android-cts-5.1_r3android-cts-5.1_r28android-cts-5.1_r27android-cts-5.1_r26android-cts-5.1_r25android-cts-5.1_r24android-cts-5.1_r23android-cts-5.1_r22android-cts-5.1_r21android-cts-5.1_r20android-cts-5.1_r2android-cts-5.1_r19android-cts-5.1_r18android-cts-5.1_r17android-cts-5.1_r16android-cts-5.1_r15android-cts-5.1_r14android-cts-5.1_r13android-cts-5.1_r10android-cts-5.1_r1android-cts-5.0_r9android-cts-5.0_r8android-cts-5.0_r7android-cts-5.0_r6android-cts-5.0_r5android-cts-5.0_r4android-cts-5.0_r3android-5.1.1_r9android-5.1.1_r8android-5.1.1_r7android-5.1.1_r6android-5.1.1_r5android-5.1.1_r4android-5.1.1_r38android-5.1.1_r37android-5.1.1_r36android-5.1.1_r35android-5.1.1_r34android-5.1.1_r33android-5.1.1_r30android-5.1.1_r3android-5.1.1_r29android-5.1.1_r28android-5.1.1_r26android-5.1.1_r25android-5.1.1_r24android-5.1.1_r23android-5.1.1_r22android-5.1.1_r20android-5.1.1_r2android-5.1.1_r19android-5.1.1_r18android-5.1.1_r17android-5.1.1_r16android-5.1.1_r15android-5.1.1_r14android-5.1.1_r13android-5.1.1_r12android-5.1.1_r10android-5.1.1_r1android-5.1.0_r5android-5.1.0_r4android-5.1.0_r3android-5.1.0_r1android-5.0.2_r3android-5.0.2_r1android-5.0.1_r1android-5.0.0_r7android-5.0.0_r6android-5.0.0_r5.1android-5.0.0_r5android-5.0.0_r4android-5.0.0_r3android-5.0.0_r2android-5.0.0_r1lollipop-wear-releaselollipop-releaselollipop-mr1-wfc-releaselollipop-mr1-releaselollipop-mr1-fi-releaselollipop-mr1-devlollipop-mr1-cts-releaselollipop-devlollipop-cts-releasel-previewElliott Hughes
(Needs a bionic <sys/user.h> change.) Bug: 13889008 Change-Id: Id2d067af58eae01fb4b9ddaeef749ed79b8a9a37
2014-04-08Merge "Re-add stpcpy call."Christopher Ferris
2014-04-07ltrace: Temporarily disable ltrace on x86.Mohamad Ayyash
We need to fix the dependency on user_fpregs_struct. Change-Id: Iaa1212bed9fa018fb3f151a2edc987f92de6e49b
2014-04-07ltrace: Build ltrace on arm, arm64 and x86 only.Mohamad Ayyash
Change-Id: Ic9345c28f5b02da43600c6ec2086c8c734f54ebd
2014-04-08Merge "ltrace: Fix the mips build."Mohamad Ayyash
2014-04-07ltrace: Fix the mips build.Mohamad Ayyash
1) Fix missing error.h in plt.c. 2) Add a TODO to fix missing relplt_count in mips plt.c. 3) Enforce operator precedence between * and != which is apparently incorrect for the mips compiler. Change-Id: I2d5d925566daf81a0380724bc103570c80e381e7
2014-04-07Re-add stpcpy call.Christopher Ferris
Change-Id: I1e80c3ee1693452f8f1669027fcd0a225e986eb2
2014-04-07ltrace: Get it to build on Android (Android.mk and missing functions)Mohamad Ayyash
- Add Android.mk. - Work around missing stpcpy() and rindex(). Change-Id: Iffdd707b22a84b1a1c6a802574ded05b289cee0a
2014-04-04Add missing #include stdio.hdann frazier
Include stdio.h in files that use fprintf() Signed-off-by: dann frazier <dannf@debian.org>
2014-04-04add missing <stdint.h> includedann frazier
aarch64's fetch.c uses the uintptr_t typedef defined by stdint.h without including it. This doesn't currently cause a build failure because stdint.h is indirectly included via proc.h. Signed-off-by: dann frazier <dannf@debian.org>
2014-03-17Add MODULE_LICENSE_GPL and NOTICE filesConley Owens
Change-Id: Idc777be3224fb1533183d645f3974c77fec28c0c
2014-02-28Add --config to man, drop -X from options.cPetr Machata
2014-02-13Initialize struct process.e_machine and .e_class for secondary threadsPetr Machata
2014-02-05Add some stuff to libc.so.confPetr Machata
2014-02-05Update NEWS, READMEPetr Machata
2014-02-05Implement aarch64 supportPetr Machata
- IFUNC support is not implemented, the rest works well. The only other failure is in wide char functions, and that occurs on x86_64 as well.
2014-02-05Set child stack alignment in trace-clone.cPetr Machata
- This is important on aarch64, which requires 16-byte aligned stack pointer. This might be relevant on other arches as well, I suspect we just happened to get the 16-byte boundary in some cases.
2014-02-05Force use of SYS_open on aarch64 as wellPetr Machata
- That system call is not implemented on aarch64, but we don't care, we are only calling it to see if the parameters get decoded properly. So call using the "syscall" wrapper, and hard-code SYS_open value on aarch64, where glibc doesn't define it.
2014-02-05Rewrite system_calls.expPetr Machata
- Port this to new style test case - Be more clever about what syscalls were invoked from main, as opposed to the multitude of calls that the dynamic linker typically makes - Allow some basic calls to come in XXXat variants (e.g. openat instead of open), such is the case on aarch64.
2014-02-05Add some missing system calls to syscalls.confPetr Machata
2014-02-05Improve HFA-related test casesPetr Machata
- Moved a bunch of preexisting HFA tests to a separate test case (and converted them to new style in the process). Added another bunch of HFA tests.
2014-01-14Manpage and --help clarificationsPetr Machata
2014-01-10Don't crash untraced calls via PLT in prelinked PPC64 binariesPetr Machata
In prelinked binaries, ltrace has to unprelinks PLT slots in order to catch calls done through PLT. This makes the calls done through these slots invalid, because the special first PLT slot is not initialized, and dynamic linker SIGSEGVs because of this. Ltrace relies on arranging breakpoints such that the dynamic linker is not actually entered, and moves PC around itself to simulate the effects of a call through PLT. Originally, arch_elf_add_plt_entry was called only for symbols that were actually traced. Later this was changed and it's now called for all PLT entries, and the resulting candidate list is filtered afterwards. This gives backends a chance to rename the symbol, as is useful with IRELATIVE PLT calls, where symbol name may not be available at all. But the PPC backend was never updated to reflect this, and unresolved all symbols for which arch_elf_add_plt_entry was called, thus rendering _all_ PLT slots invalid, even those that weren't later procted by breakpoints. Thus calls done through any untraced slots failed. This patch fixes this problem by deferring the unprelinking of PLT slots into the on_install hook of breakpoints.
2014-01-10Add a new per-breakpoint callback on_installPetr Machata
2014-01-10Drop unused function enable_all_breakpointsPetr Machata
2014-01-10Type umovebytes properlyPetr Machata
2014-01-10Initialize libsym early in trace.c to help the compiler.Mark Wielaard
GCC 4.4.7 isn't smart enough to realize own_libsym will always be zero when it sees the goto done which might jump over the initialization of libsym. And so will produce a warning like: cc1: warnings being treated as errors trace.c: In function ‘ifunc_ret_hit’: trace.c:1433: error: ‘libsym’ may be used uninitialized in this function
2014-01-10Add support for using elfutils as unwinder.Mark Wielaard
This adds support for using elfutils as unwinder with -w. Since elfutils 0.158 elfutils contains a simple unwinder interface that matches nicely on the ltrace backtrace support. The code reuses the libunwind infrastructure already in ltrace where possible (by defining HAVE_UNWINDER which is 1 if either libunwind or elfutils is used). It also reuses the ltrace proc_add_library callback to keep track of the ELF files mapped for the unwinder. The current implementation matches the output as if libunwind was used. But elfutils can also provide some more information since it can lookup the DWARF debuginfo. So if the source info of an address can be found through elfutils the backtrace will also include this as an additional output line per frame.
2014-01-10Type proc_each_breakpoint properlyPetr Machata
2014-01-10Fix a problem in tracing across fork on PPC64Petr Machata
In order to avoid single-stepping through large portions of the dynamic linker, ltrace remembers at which address the instruction that resolved a PLT slot is. It then puts a breakpoint to this address so that it can fast-forward to that address next time it needs to catch a PLT slot being resolved. When a process is cloned, the pointer to this breakpoint is simply copied over to the new process, instead of being looked up in the new process structures. This patches fixes this.
2014-01-09minor fixes in manpagesJuan Cespedes
2014-01-07NitsPetr Machata
- Fix some coding style issues in output.c - Add a couple items to TODO
2014-01-07Fix infinite loop in stack unwindLuca Clementi
This bug was introduced in af452c6 Reported-by: Petr Machata <pmachata@redhat.com>
2014-01-05Minor fixes in manpagesJuan Cespedes
2014-01-05check return value of unw_get_reg and unw_get_proc_nameLuca Clementi
Before printng the current procedure name and IP verify their validity
2013-12-30Drop debian/ directoryJuan Cespedes
Every distribution should create its own specific files
2013-11-27Support IRELATIVE relocations on s390Petr Machata
2013-11-27On s390{,x}, r2 is scrambled after syscall entryPetr Machata
This was caught by system_call_params.exp test case: exe->mount("source", "target", "filesystemtype", 0, nil <unfinished ...> mount@SYS("", "target", "filesystemtype", 0, nil) = -2 <... mount resumed> = -1 Note how the first parameter disappears--r2 now holds syscall number (21 in this case), and the original value is stored in orig_gpr2 in save area.
2013-11-26On x86{,_64}, PLT entries may not be ordered by their relocationPetr Machata
- In general they are. But IRELATIVE relocations are sorted to come last, and PLT entries are not sorted accordingly.
2013-11-21Consider exec and exit events an end of outstanding callsPetr Machata
- This cleans up a lot of stuff. The actual substance is addition of account_current_callstack in handle_event.c (which however uses those cleaned-up interfaces). - trace-exec.exp was extended to check that the exec syscall can be seen in -c output. That's one of the symptoms of what this fixes. - This hides dict_opt_c in summary.c. It also gets rid of the global variable current_time_spent--instead, the information is passed via a function argument in a struct timedelta (so that we never confuse absolute time with relative). callstack_element.time_spent was renamed to .enter_time, as that is what it has always been.
2013-11-14Update NEWSPetr Machata
2013-11-13Add a test case for wide character functionsPetr Machata