Add more debug code into swig internals
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12928 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
023d597862
commit
1ca411b423
4 changed files with 30 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ static List *directories = 0; /* List of include directories */
|
|||
static String *lastpath = 0; /* Last file that was included */
|
||||
static List *pdirectories = 0; /* List of pushed directories */
|
||||
static int dopush = 1; /* Whether to push directories */
|
||||
static int file_debug = 1;
|
||||
|
||||
/* This functions determine whether to push/pop dirs in the preprocessor */
|
||||
void Swig_set_push_dir(int push) {
|
||||
|
|
@ -173,6 +174,9 @@ static FILE *Swig_open_file(const_String_or_char_ptr name, int sysfile, int use_
|
|||
cname = Char(name);
|
||||
filename = NewString(cname);
|
||||
assert(filename);
|
||||
if (file_debug) {
|
||||
Printf(stdout, " Open: %s\n", filename);
|
||||
}
|
||||
f = fopen(Char(filename), "r");
|
||||
if (!f && use_include_path) {
|
||||
spath = Swig_search_path_any(sysfile);
|
||||
|
|
@ -386,3 +390,10 @@ char *Swig_file_dirname(const_String_or_char_ptr filename) {
|
|||
*(++c) = 0;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Swig_file_debug()
|
||||
*/
|
||||
void Swig_file_debug_set() {
|
||||
file_debug = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,6 +388,7 @@ extern int ParmList_is_compactdefargs(ParmList *p);
|
|||
extern void Swig_typemap_debug(void);
|
||||
extern void Swig_typemap_search_debug_set(void);
|
||||
extern void Swig_typemap_used_debug_set(void);
|
||||
extern void Swig_typemap_register_debug_set(void);
|
||||
|
||||
extern String *Swig_typemap_lookup(const_String_or_char_ptr tmap_method, Node *n, const_String_or_char_ptr lname, Wrapper *f);
|
||||
extern String *Swig_typemap_lookup_out(const_String_or_char_ptr tmap_method, Node *n, const_String_or_char_ptr lname, Wrapper *f, String *actioncode);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ extern char *Swig_file_suffix(const_String_or_char_ptr filename);
|
|||
extern char *Swig_file_basename(const_String_or_char_ptr filename);
|
||||
extern char *Swig_file_filename(const_String_or_char_ptr filename);
|
||||
extern char *Swig_file_dirname(const_String_or_char_ptr filename);
|
||||
extern void Swig_file_debug_set();
|
||||
|
||||
/* Delimiter used in accessing files and directories */
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ char cvsroot_typemap_c[] = "$Id$";
|
|||
|
||||
static int typemap_search_debug = 0;
|
||||
static int typemaps_used_debug = 0;
|
||||
static int typemap_register_debug = 0;
|
||||
static int in_typemap_search_multi = 0;
|
||||
|
||||
static void replace_embedded_typemap(String *s, ParmList *parm_sublist, Wrapper *f, Node *file_line_node);
|
||||
|
|
@ -191,9 +192,14 @@ static void typemap_register(const_String_or_char_ptr tmap_method, ParmList *par
|
|||
String *tm_method;
|
||||
SwigType *type;
|
||||
String *pname;
|
||||
|
||||
if (!parms)
|
||||
return;
|
||||
|
||||
if (typemap_register_debug) {
|
||||
Printf(stdout, "Registering - %s\n", tmap_method);
|
||||
Swig_print_node(parms);
|
||||
}
|
||||
|
||||
tm_method = typemap_method_name(tmap_method);
|
||||
|
||||
/* Register the first type in the parameter list */
|
||||
|
|
@ -2064,3 +2070,13 @@ void Swig_typemap_used_debug_set(void) {
|
|||
typemaps_used_debug = 1;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Swig_typemap_register_debug_set()
|
||||
*
|
||||
* Turn on typemaps used debug display
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
void Swig_typemap_register_debug_set(void) {
|
||||
typemap_register_debug = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue