Bug 1449588
Summary: | Can ltrace be built with backtrace support? | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Peter Edwards <thatsafunnyname> |
Component: | ltrace | Assignee: | DJ Delorie <dj> |
Status: | CLOSED ERRATA | QA Contact: | Edjunior Barbosa Machado <emachado> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.2 | CC: | codonell, emachado, jolsa, law, mbenitez, mcermak, mjw, mnewsome, mrezanin, pbonzini |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | ltrace-0.7.91-15.el7 | Doc Type: | Enhancement |
Doc Text: |
Feature: Backtrace support
Reason: Backtraces tell the user not just what function was called, but the context from which the call happened.
Result: "ltrace -w 4 /bin/prog" (for example) will list the call stack for each traced call it displays, up to a maximum of 4.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-10-30 10:16:43 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1565233 |
Description
Peter Edwards
2017-05-10 10:24:12 UTC
Note that upstream supports -w backtraces using elfutils libdw (I provided a patch for that some years ago): commit dfefa9f057857735a073ea655f5cb34351032c8e Author: Mark Wielaard <mjw> Date: Tue Jan 7 21:00:44 2014 +0100 Add support for using elfutils as unwinder. 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. (In reply to Mark Wielaard from comment #9) > Note that upstream supports -w backtraces using elfutils libdw (I provided a > patch for that some years ago): I assume that means we can get the same functionality with just elfutils then? You don't say, but I assume this is what you mean. (In reply to Carlos O'Donell from comment #10) > (In reply to Mark Wielaard from comment #9) > > Note that upstream supports -w backtraces using elfutils libdw (I provided a > > patch for that some years ago): > > I assume that means we can get the same functionality with just elfutils > then? You don't say, but I assume this is what you mean. Yes, that is what I meant for ltrace (on the architectures RHEL cares about). There are some differences between the libunwind and elfutils libdw unwinder. The elfutils one is only for "out of process" unwinding (core files or other processes through ptrace), libunwind also contains an in-process unwinder. And libunwind supports a couple of architectures that elfutils libdw doesn't. But elfutils does support all main architectures supported by RHEL. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:3133 |