By default pahole doesn't prints structs/classes that are only defined
inside functions, so add a knob to aks for that.
This is for the benefit of ctfdwdiff, as in CTF we don't have
expressiveness to tell that a struct is only defined inside a function,
its all in the global table.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
CTF doesn't have support for multiple array dimensions, so it flattens
the arrays.
This caused a large number of false positives in ctfdwdiff, so introduce
this conf_fprintf option, use it in pahole and ctfdwdiff.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
So that I can run it with:
find . -type d | while read dir ; do cd $dir ; ls *.o 2> /dev/null |
while read file ; do ctfdwdiff $file ; done ; cd - ; done
for instance.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
First it gets a file with DWARF info, converts that to CTF and adds
a ".SUNW_ctf" ELF section to the file with DWARF info. Double debugging
foo! Pay for one, take two!
For tcp_input.o for instance, the result is:
[acme@doppio pahole]$ cat /tmp/tcp_input.o.diff
--- /tmp/tcp_input.o.ctf.c 2009-03-19 19:48:23.000000000 -0300
+++ /tmp/tcp_input.o.dwarf.c 2009-03-19 19:48:23.000000000 -0300
@@ -1811,7 +1811,7 @@
/* XXX 6 bytes hole, try to pack */
- void (*call)(const struct marker *, void *); /* 24 8 */
+ void (*call)(const struct marker *, void *, ...); /* 24 8 */
struct marker_probe_closure single; /* 32 16 */
struct marker_probe_closure * multi; /* 48 8 */
const char * tp_name; /* 56 8 */
[acme@doppio pahole]$
Now back to figuring out how to encode a VARARGS marker in CTF...
Ah, to use the script just do:
./ctfdwdiff foo.o
Some will crash, but we're working hard for fuller customer
satisfaction.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>