[ltrace-commits] 04/40: added some optional debug printing
Petr Machata
pmachata-guest at moszumanska.debian.org
Sun May 11 22:38:52 UTC 2014
This is an automated email from the git hooks/post-receive script.
pmachata-guest pushed a commit to branch master
in repository ltrace.
commit fb8b285acdce0b67484c88e5f03bef6209970044
Author: Dima Kogan <dima at secretsauce.net>
Date: Tue Apr 22 04:20:32 2014 -0700
added some optional debug printing
---
dwarf_prototypes.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dwarf_prototypes.c b/dwarf_prototypes.c
index 36c44b9..87081c8 100644
--- a/dwarf_prototypes.c
+++ b/dwarf_prototypes.c
@@ -28,7 +28,10 @@
#include "options.h"
#include "filter.h"
-#if 0
+
+//#define DUMP_PROTOTYPES
+
+#if 1
#define complain( die, format, ... ) \
fprintf(stderr, "%s() die '%s' @ 0x%lx: " format "\n", \
__func__, dwarf_diename(die), dwarf_dieoffset(die), \
@@ -74,7 +77,9 @@ static bool dump_dwarf_tree(Dwarf_Die* die)
{
return _dump_dwarf_tree( die, 0 );
}
+#endif
+#ifdef DUMP_PROTOTYPES
static bool _dump_ltrace_tree( const struct arg_type_info* info, int indent )
{
if( indent > 7 )
@@ -633,6 +638,11 @@ static bool getPrototype(struct prototype* proto, Dwarf_Die* subroutine)
return false;
}
+#ifdef DUMP_PROTOTYPES
+ fprintf(stderr, "Adding argument:\n");
+ dump_ltrace_tree(arg_type_info);
+#endif
+
next_prototype_argument: ;
int res = dwarf_siblingof(&arg_die, &arg_die);
if( res == 0 ) continue; /* sibling exists */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/ltrace.git
More information about the ltrace-commits
mailing list