]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
More AMD64 start-up hurdles:
authorNicholas Nethercote <njn@valgrind.org>
Tue, 30 Nov 2004 16:50:48 +0000 (16:50 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Tue, 30 Nov 2004 16:50:48 +0000 (16:50 +0000)
- 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

coregrind/amd64/state.c
coregrind/vg_main.c
coregrind/vg_transtab.c

index 0143dd092b3ad3dffbf1e9003582446b0b67cb33..b78a09ed90b5ef2613958c593b66b46c0778b02e 100644 (file)
@@ -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;
 }
 
 /*------------------------------------------------------------*/
index ad8247cb3d87d45a2debf0d68947c8a6dcd341a2..d0db0bcf1ba7c34936912bfa2474ffb6312e2166 100644 (file)
@@ -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.
index 7a9871bf6b5d207a52e51d48e1b4be0bbe681632..16d452585d2b759a49eccdb17323c69b760fd253 100644 (file)
@@ -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