|
From: <sv...@va...> - 2005-05-14 17:11:09
|
Author: njn
Date: 2005-05-14 18:11:06 +0100 (Sat, 14 May 2005)
New Revision: 3707
Modified:
trunk/coregrind/core.h
trunk/coregrind/vg_redir.c
trunk/coregrind/vg_symtab2.c
Log:
Move resolve_redir_allsegs() to vg_redir.c, the only file that uses it,
and make it private.
Modified: trunk/coregrind/core.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/core.h 2005-05-14 17:00:25 UTC (rev 3706)
+++ trunk/coregrind/core.h 2005-05-14 17:11:06 UTC (rev 3707)
@@ -649,8 +649,6 @@
=20
extern Addr VG_(reverse_search_one_symtab) ( const SegInfo* si, const Ch=
ar* name );
=20
-extern Bool VG_(resolve_redir_allsegs)(CodeRedirect *redir);
-
extern Bool VG_(use_CFI_info) ( /*MOD*/Addr* ipP,
/*MOD*/Addr* spP,
/*MOD*/Addr* fpP,
Modified: trunk/coregrind/vg_redir.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_redir.c 2005-05-14 17:00:25 UTC (rev 3706)
+++ trunk/coregrind/vg_redir.c 2005-05-14 17:11:06 UTC (rev 3707)
@@ -265,6 +265,20 @@
return resolved;
}
=20
+static Bool resolve_redir_allsegs(CodeRedirect *redir)
+{
+ const SegInfo *si;
+
+ for(si =3D VG_(next_seginfo)(NULL);=20
+ si !=3D NULL;=20
+ si =3D VG_(next_seginfo)(si))
+ {
+ if (VG_(resolve_redir)(redir, si))
+ return True;
+ }
+ return False;
+}
+
/* Go through the complete redir list, resolving as much as possible wit=
h this SegInfo.
=20
This should be called when a new SegInfo symtab is loaded.
@@ -314,7 +328,7 @@
=20
/* Check against all existing segments to see if this redirection
can be resolved immediately */
- if (!VG_(resolve_redir_allsegs)(redir)) {
+ if (!resolve_redir_allsegs(redir)) {
/* nope, add to list */
redir->next =3D unresolved_redir;
unresolved_redir =3D redir;
@@ -344,7 +358,7 @@
=20
/* Check against all existing segments to see if this redirection
can be resolved immediately */
- if (!VG_(resolve_redir_allsegs)(redir)) {
+ if (!resolve_redir_allsegs(redir)) {
/* nope, add to list */
redir->next =3D unresolved_redir;
unresolved_redir =3D redir;
@@ -397,7 +411,7 @@
=20
/* Check against all existing segments to see if this redirection
can be resolved immediately */
- if (!VG_(resolve_redir_allsegs)(redir)) {
+ if (!resolve_redir_allsegs(redir)) {
/* nope, add to list */
redir->next =3D unresolved_redir;
unresolved_redir =3D redir;
Modified: trunk/coregrind/vg_symtab2.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_symtab2.c 2005-05-14 17:00:25 UTC (rev 3706)
+++ trunk/coregrind/vg_symtab2.c 2005-05-14 17:11:06 UTC (rev 3707)
@@ -1058,17 +1058,6 @@
VG_(arena_free)(VG_AR_SYMTAB, lib);
}
=20
-Bool VG_(resolve_redir_allsegs)(CodeRedirect *redir)
-{
- SegInfo *si;
-
- for(si =3D segInfo; si !=3D NULL; si =3D si->next)
- if (VG_(resolve_redir)(redir, si))
- return True;
-
- return False;
-}
-
//static
//void handle_wrapper( SegInfo* si, Char* symbol, ElfXX_Sym* sym)
//{
|