[Ltrace-devel] [PATCH 00/11] libdl support in ltrace - please test!

Joe Damato ice799 at gmail.com
Mon Nov 8 23:47:33 UTC 2010


List,

I've broken apart my lib-dl changes into a series of smaller patches to make
reading and understanding them a bit less painful. Not sure I'll squash these
prior to pulling code into the official repository, but for now I think keeping
them separate so people can read them is probably preferred.

These should apply to my master at http://github.com/ice799/ltrace.

I added a simple unit test for these changes that should run automaticall when
you run "make check."

I have tested these on x86_64 and x86 Ubuntu VMs.

I have no idea if this code works on other architectures and would appreciate
testers.

Thanks,
Joe

Joe Damato (11):
  Keep a count of the number of -x options passed on the command line.
  Add umovebytes to move a range of bytes from the traced process to
    ltrace
  Store the address and size of the ELF object's DYNAMIC section
  Add base_addr to store the base address of an ELF object.
  Adjust in_load_libraries to have an out parameter for a discovered
    symbol.
  Create a function find_dynamic_entry_addr.
  Extend the -x option.
  Make some functions and datastructures global. Definitely a hack.
  Add support for tracing functions in libraries loaded at runtime (via
    libdl).
  Cleanup and documentation.
  Add a simple libdl test

 .gitignore                                |    1 +
 ChangeLog                                 |   74 +++++-----
 README                                    |    1 +
 common.h                                  |   18 ++-
 defs.h                                    |    2 +-
 handle_event.c                            |    5 +-
 ltrace-elf.c                              |  139 ++++++++++++-----
 ltrace-elf.h                              |    4 +
 ltrace.1                                  |    9 +-
 options.c                                 |   17 ++-
 options.h                                 |    2 +
 sysdeps/README                            |    1 +
 sysdeps/linux-gnu/events.c                |    8 +-
 sysdeps/linux-gnu/proc.c                  |  243 +++++++++++++++++++++++++++++
 sysdeps/linux-gnu/trace.c                 |   36 +++++
 testsuite/ltrace.minor/libdl-simple-lib.c |    4 +
 testsuite/ltrace.minor/libdl-simple.c     |   24 +++
 testsuite/ltrace.minor/libdl-simple.exp   |   52 ++++++
 18 files changed, 548 insertions(+), 92 deletions(-)
 create mode 100644 testsuite/ltrace.minor/libdl-simple-lib.c
 create mode 100644 testsuite/ltrace.minor/libdl-simple.c
 create mode 100644 testsuite/ltrace.minor/libdl-simple.exp




More information about the Ltrace-devel mailing list