How can I debug runtime library interpositioned process?
问题 I'm now studying library interpositioning with C in Ubuntu 18.04, and I'm testing two simple codes to wrap strlen : "mystrlen.c", "mystrlenTest.c". Here is the code I wrote: mystrlen.c #ifdef RUNTIME #define _GNU_SOURCE #include <stdio.h> #include <string.h> #include <dlfcn.h> /* strlen wrapper function */ size_t strlen(const char *str) { size_t (*strlenp)(const char *) = NULL; printf("%s\n", *str); strlenp = dlsym(RTLD_NEXT, "strlen"); // Get address of libc strlen printf("length: %ld\n",