aboutsummaryrefslogtreecommitdiff
path: root/gprof/cg_dfn.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-02-01 08:24:16 +0000
committerAlan Modra <amodra@gmail.com>2002-02-01 08:24:16 +0000
commit1355568ab48a9dcfd079493f7deb5e1c5e88015b (patch)
tree9b1cc576a383708096f9c89c5800bd25f6126768 /gprof/cg_dfn.c
parent48fa4a5def1116273c2c2a236939e96eb9b6231a (diff)
downloadgdb-1355568ab48a9dcfd079493f7deb5e1c5e88015b.zip
gdb-1355568ab48a9dcfd079493f7deb5e1c5e88015b.tar.gz
gdb-1355568ab48a9dcfd079493f7deb5e1c5e88015b.tar.bz2
* alpha.c (alpha_find_call): Warning fixes.
* mips.c (mips_find_call): Likewise. * sparc.c (sparc_find_call): Likewise. * basic_blocks.c: Warning fixes. Eliminate DEFUN. * call_graph.c: Likewise. * cg_arcs.c: Likewise. * cg_dfn.cp: Likewise. * gprof.c: Likewise. * gprof.h: Likewise. * hist.c: Likewise. * search_list.c: Likewise. * source.c: Likewise. * source.h: Likewise. * sym_ids.c: Likewise. * symtab.c: Likewise. * symtab.h: Likewise. * utils.c: Likewise. * cg_print.c: Likewise. (struct function_map, symbol_map, symbol_map_count): Move declaration to.. * corefile: ..here. * corefile.c: Warning fixes. Eliminate DEFUN. (struct function_map): Remove declaration. * gmon_io.c: Warning fixes. Eliminate DEFUN. (gmon_io_read_64): Make static. (gmon_io_write_64): Likewise. (gmon_read_raw_arc): Likewise. (gmon_write_raw_arc): Likewise. (gmon_io_write_8): Don't pass char, pass int param. * gmon_io.h (gmon_io_write_8): Likewise. and a few copyright dates that should have been done previously.
Diffstat (limited to 'gprof/cg_dfn.c')
-rw-r--r--gprof/cg_dfn.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/gprof/cg_dfn.c b/gprof/cg_dfn.c
index ace8328..463f22e 100644
--- a/gprof/cg_dfn.c
+++ b/gprof/cg_dfn.c
@@ -34,6 +34,12 @@ typedef struct
}
DFN_Stack;
+static boolean is_numbered PARAMS ((Sym *));
+static boolean is_busy PARAMS ((Sym *));
+static void find_cycle PARAMS ((Sym *));
+static void pre_visit PARAMS ((Sym *));
+static void post_visit PARAMS ((Sym *));
+
DFN_Stack *dfn_stack = NULL;
int dfn_maxdepth = 0;
int dfn_depth = 0;
@@ -44,7 +50,8 @@ int dfn_counter = DFN_NAN;
* Is CHILD already numbered?
*/
static boolean
-DEFUN (is_numbered, (child), Sym * child)
+is_numbered (child)
+ Sym *child;
{
return child->cg.top_order != DFN_NAN && child->cg.top_order != DFN_BUSY;
}
@@ -54,7 +61,8 @@ DEFUN (is_numbered, (child), Sym * child)
* Is CHILD already busy?
*/
static boolean
-DEFUN (is_busy, (child), Sym * child)
+is_busy (child)
+ Sym *child;
{
if (child->cg.top_order == DFN_NAN)
{
@@ -71,7 +79,8 @@ DEFUN (is_busy, (child), Sym * child)
* depth-first number).
*/
static void
-DEFUN (find_cycle, (child), Sym * child)
+find_cycle (child)
+ Sym *child;
{
Sym *head = 0;
Sym *tail;
@@ -194,7 +203,8 @@ DEFUN (find_cycle, (child), Sym * child)
* the stack and mark it busy.
*/
static void
-DEFUN (pre_visit, (parent), Sym * parent)
+pre_visit (parent)
+ Sym *parent;
{
++dfn_depth;
@@ -218,7 +228,8 @@ DEFUN (pre_visit, (parent), Sym * parent)
* and number functions if PARENT is head of a cycle.
*/
static void
-DEFUN (post_visit, (parent), Sym * parent)
+post_visit (parent)
+ Sym *parent;
{
Sym *member;
@@ -252,7 +263,8 @@ DEFUN (post_visit, (parent), Sym * parent)
* Given this PARENT, depth first number its children.
*/
void
-DEFUN (cg_dfn, (parent), Sym * parent)
+cg_dfn (parent)
+ Sym *parent;
{
Arc *arc;