|
From: <sv...@va...> - 2005-09-22 12:41:47
|
Author: sewardj
Date: 2005-09-22 13:41:42 +0100 (Thu, 22 Sep 2005)
New Revision: 4721
Log:
- x86 build fix
- change ownership (V -> C) of trampoline page after initial debuginfo
read, not before
Modified:
branches/ASPACEM/coregrind/m_main.c
branches/ASPACEM/coregrind/m_redir.c
branches/ASPACEM/coregrind/m_syswrap/syswrap-x86-linux.c
branches/ASPACEM/coregrind/pub_core_redir.h
Modified: branches/ASPACEM/coregrind/m_main.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
--- branches/ASPACEM/coregrind/m_main.c 2005-09-22 11:34:48 UTC (rev 4720=
)
+++ branches/ASPACEM/coregrind/m_main.c 2005-09-22 12:41:42 UTC (rev 4721=
)
@@ -2120,10 +2120,8 @@
// p: aspacem [so can change ownership of sysinfo pages]
//--------------------------------------------------------------
if (!need_help) {=20
- Bool setup_redirects_succeeded;
VG_(debugLog)(1, "main", "Initialise redirects\n");
- setup_redirects_succeeded =3D VG_(setup_code_redirect_table)();
- vg_assert(setup_redirects_succeeded);
+ VG_(setup_code_redirect_table)();
}
=20
//--------------------------------------------------------------
@@ -2214,6 +2212,25 @@
}
=20
//--------------------------------------------------------------
+ // Tell aspacem of ownership change of the asm helpers, so that
+ // m_translate allows them to be translated. However, only do this
+ // after the initial debug info read, since making a hole in the
+ // address range for the stage2 binary confuses the debug info reader=
.
+ // p: aspacem
+ //--------------------------------------------------------------
+ { Bool change_ownership_v_c_OK;
+ Addr co_start =3D VG_PGROUNDDN( (Addr)&VG_(trampoline_stuff_start=
) );
+ Addr co_endPlus =3D VG_PGROUNDUP( (Addr)&VG_(trampoline_stuff_end) =
);
+ VG_(debugLog)(1,"redir",
+ "transfer ownership V -> C of 0x%llx .. 0x%llx\n",
+ (ULong)co_start, (ULong)co_endPlus-1 );
+
+ change_ownership_v_c_OK=20
+ =3D VG_(am_change_ownership_v_to_c)( co_start, co_endPlus - co_s=
tart );
+ vg_assert(change_ownership_v_c_OK);
+ }
+
+ //--------------------------------------------------------------
// Tell the tool about the initial client memory permissions
// p: aspacem
// p: mallocfree
Modified: branches/ASPACEM/coregrind/m_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
--- branches/ASPACEM/coregrind/m_redir.c 2005-09-22 11:34:48 UTC (rev 472=
0)
+++ branches/ASPACEM/coregrind/m_redir.c 2005-09-22 12:41:42 UTC (rev 472=
1)
@@ -32,7 +32,6 @@
=20
#include "pub_core_basics.h"
#include "pub_core_debuglog.h"
-#include "pub_core_aspacemgr.h" // VG_(am_change_ownership_v_to_c)
#include "pub_core_debuginfo.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
@@ -342,7 +341,7 @@
return r->to_addr;
}
=20
-Bool VG_(setup_code_redirect_table) ( void )
+void VG_(setup_code_redirect_table) ( void )
{
#if defined(VGP_x86_linux)
/* Redirect _dl_sysinfo_int80, which is glibc's default system call
@@ -373,15 +372,6 @@
#else
# error Unknown platform
#endif
-
- { Addr co_start =3D VG_PGROUNDDN( (Addr)&VG_(trampoline_stuff_start=
) );
- Addr co_endPlus =3D VG_PGROUNDUP( (Addr)&VG_(trampoline_stuff_end) =
);
- VG_(debugLog)(1,"redir",
- "transfer ownership V -> C of 0x%llx .. 0x%llx\n",
- (ULong)co_start, (ULong)co_endPlus-1 );
- return=20
- VG_(am_change_ownership_v_to_c)( co_start, co_endPlus - co_start=
);
- }
}
=20
/* Z-decode a symbol into library:func form, eg=20
Modified: branches/ASPACEM/coregrind/m_syswrap/syswrap-x86-linux.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
--- branches/ASPACEM/coregrind/m_syswrap/syswrap-x86-linux.c 2005-09-22 1=
1:34:48 UTC (rev 4720)
+++ branches/ASPACEM/coregrind/m_syswrap/syswrap-x86-linux.c 2005-09-22 1=
2:41:42 UTC (rev 4721)
@@ -40,7 +40,6 @@
#include "pub_core_debuglog.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
-#include "pub_core_libcmman.h"
#include "pub_core_libcprint.h"
#include "pub_core_libcproc.h"
#include "pub_core_libcsignal.h"
Modified: branches/ASPACEM/coregrind/pub_core_redir.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
--- branches/ASPACEM/coregrind/pub_core_redir.h 2005-09-22 11:34:48 UTC (=
rev 4720)
+++ branches/ASPACEM/coregrind/pub_core_redir.h 2005-09-22 12:41:42 UTC (=
rev 4721)
@@ -68,9 +68,8 @@
// before translating a basic block.
extern Addr VG_(code_redirect) ( Addr orig );
=20
-/* Set up some default redirects. Returns False if failed, in which
- case the start-up of Valgrind can be considered to have failed. */
-extern Bool VG_(setup_code_redirect_table) ( void );
+/* Set up some default redirects. */
+extern void VG_(setup_code_redirect_table) ( void );
=20
extern void VG_(resolve_existing_redirs_with_seginfo)(SegInfo *si);
=20
|