B.7. Changes in ltrace

Red Hat Developer Toolset 3.0 is distributed with ltrace 0.7.91, which provides a number of bug fixes and feature enhancements over the Red Hat Enterprise Linux system version. Below is a comprehensive list of new features in this release.

B.7.1. Changes Since Red Hat Enterprise Linux 6.6

A number of bugs have been fixed, and many features have been added since the release of ltrace in Red Hat Enterprise Linux 6.6:
  • A number of bugs relating to parameter passing were fixed. This includes support for structures passed in registers and fixes for displaying arguments of nested calls. The argument-fetching backends were reimplemented to address a number of issues.
  • The tools for selecting what is traced have been improved to be more consistent. It is now possible to trace calls from as well as into the main binary, any shared libraries, or modules loaded using the dlopen function. It also allows for using globs and regular expressions for selecting whole sets of symbols at the same time. For example, to trace all calls to functions named function* that libexample* makes, use:
    ltrace -e function\*@libexample\*
    To trace all calls to functions that libexample* exports, use:
    ltrace -l libexample\*
  • A new approach to prototype discovery has been added. It allows prototype libraries to be supplied with shared libraries. When a shared library is mapped in, ltrace looks up the corresponding prototype library and finds its call prototypes there.
  • The syntax of prototype libraries was generalized. A new concept of lens has been introduced, which separates the way data types are to be formatted from the different kinds of data types. This allows for declaring, for example, that a function expects a char parameter, but that parameter should be formatted as an enum or in hexadecimal. It is now also possible to express zero-terminated (NUL, NULL) arrays.
  • Unwinder support has been added, so that the user can request a stack trace to be shown for each traced call.
  • Support for tracing IFUNC symbols has been added. These are special symbols that resolve to one of possible implementations after the first call is made. ltrace now re-seats related breakpoints after an IFUNC call finishes. It also supports tracing the related IRELATIVE PLT slots.