From: Nicholas Nethercote Date: Tue, 30 Nov 2004 16:50:48 +0000 (+0000) Subject: More AMD64 start-up hurdles: X-Git-Tag: svn/VALGRIND_3_0_0~1152 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=287eca27b93787f19ee2b4604f82e13c3c9e9c7e;p=thirdparty%2Fvalgrind.git More AMD64 start-up hurdles: - Fix bogus assertion in vg_transtab.c - Do null implementation of --pointercheck We now reach the dispatch loop! git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3166 --- diff --git a/coregrind/amd64/state.c b/coregrind/amd64/state.c index 0143dd092b..b78a09ed90 100644 --- a/coregrind/amd64/state.c +++ b/coregrind/amd64/state.c @@ -215,29 +215,8 @@ UInt *VGA_(reg_addr_from_tst)(Int regno, ThreadArchState *arch) Bool VGA_(setup_pointercheck)(void) { - I_die_here; -#if 0 - vki_modify_ldt_t ldt = { - VG_POINTERCHECK_SEGIDX, // entry_number - VG_(client_base), // base_addr - (VG_(client_end)-VG_(client_base)) / VKI_PAGE_SIZE, // limit - 1, // seg_32bit - 0, // contents: data, RW, non-expanding - 0, // ! read_exec_only - 1, // limit_in_pages - 0, // ! seg not present - 1, // useable - }; - int ret = VG_(do_syscall)(__NR_modify_ldt, 1, &ldt, sizeof(ldt)); - if (ret < 0) { - VG_(message)(Vg_UserMsg, - "Warning: ignoring --pointercheck=yes, " - "because modify_ldt failed (errno=%d)", -ret); - return False; - } else { - return True; - } -#endif + VG_(message)(Vg_DebugMsg, "ignoring --pointercheck (unimplemented)"); + return True; } /*------------------------------------------------------------*/ diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index ad8247cb3d..d0db0bcf1b 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -2698,7 +2698,6 @@ int main(int argc, char **argv) VGP_POPCC(VgpSched); - //-------------------------------------------------------------- // Finalisation: cleanup, messages, etc. Order no so important, only // affects what order the messages come. diff --git a/coregrind/vg_transtab.c b/coregrind/vg_transtab.c index 7a9871bf6b..16d452585d 100644 --- a/coregrind/vg_transtab.c +++ b/coregrind/vg_transtab.c @@ -513,6 +513,7 @@ void VG_(add_to_trans_tab) ( Addr orig_addr, Int orig_size, tte->trans_addr, tte->trans_size); */ + // paranoia vg_assert(offsetof(TCEntry, payload) == PAYLOAD_OFFSET); vg_assert(trans_size > 0); @@ -647,7 +648,7 @@ void VG_(init_tt_tc) ( void ) Int s; /* Otherwise lots of things go wrong... */ - vg_assert(PAYLOAD_OFFSET == sizeof(TCEntry)); + vg_assert(offsetof(TCEntry, payload) == PAYLOAD_OFFSET); /* Figure out how big each sector should be. */ vg_tc_sector_szB