25 #include "pips_config.h"
48 #define DV_SUFFIX ".daVinci"
66 fprintf(
out,
"l(\"%s\",n(\"\",[a(\"OBJECT\",\"%s\")],[", name, name);
73 fprintf(
out,
" l(\"%s->%s\",e(\"\",[],r(\"%s\")))",
74 name, module_called, module_called);
127 free(dir_name), dir_name = NULL;
155 pips_debug(7,
"global call graph requested for %s (PROGRAM)\n", name);
182 free(dir_name), dir_name=NULL;
static hash_table seen
static function to store whether a module has been seen during the recursive generation of the daVinc...
static void init_seen(void)
static void close_seen(void)
static bool seen_p(string m)
static void set_as_seen(string m)
bool graph_of_calls(const string name)
to be called by pipsmake.
bool full_graph_of_calls(string name)
To be called by pipsmake.
static void recursive_append(FILE *out, string name)
generates into "out" a davinci node for module "name", and recurse to its not yet seen callees.
static void node(FILE *out, string name)
Build for module name a node and link to its successors.
bool db_resource_p(const char *rname, const char *oname)
true if exists and in loaded or stored state.
size_t gen_array_nitems(const gen_array_t a)
void * gen_array_item(const gen_array_t a, size_t i)
void gen_array_free(gen_array_t a)
FILE * safe_fopen(const char *filename, const char *what)
int safe_fclose(FILE *stream, const char *filename)
#define NIL
The empty list (nil in Lisp)
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
gen_array_t db_get_module_list(void)
Get an array of all the modules (functions, procedures and compilation units) of a workspace.
#define DB_PUT_FILE_RESOURCE
Put a file resource into the current workspace database.
hash_table hash_table_make(hash_key_type key_type, size_t size)
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
bool hash_defined_p(const hash_table htp, const void *key)
true if key has e value in htp.
#define full_name(dir, name)
string db_build_file_resource_name(const char *rname, const char *oname, const char *suffix)
returns an allocated file name for a file resource.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define hash_table_undefined
Value of an undefined hash_table.
#define PROGRAM_RESOURCE_OWNER
string db_get_current_workspace_directory(void)
struct _newgen_struct_callees_ * callees
#define callees_callees(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
The structure used to build lists in NewGen.