]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Minor 64-bit cleanups, mostly comments.
authorNicholas Nethercote <njn@valgrind.org>
Mon, 29 Nov 2004 15:45:31 +0000 (15:45 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Mon, 29 Nov 2004 15:45:31 +0000 (15:45 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3140

coregrind/linux/syscalls.c
coregrind/vg_dwarf.c
coregrind/vg_scheduler.c
coregrind/vg_signals.c

index 84bab5b6a7385ff3897b0cc8db776312b940427d..726dc1d1f583f960e2d8d68e2ac4df0394512536 100644 (file)
@@ -253,6 +253,8 @@ PRE(sys_syslog, MayBlock)
    PRINT("sys_syslog (%d, %p, %d)", ARG1,ARG2,ARG3);
    PRE_REG_READ3(long, "syslog", int, type, char *, bufp, int, len);
    switch (ARG1) {
+   // The kernel uses magic numbers here, rather than named constants,
+   // therefore so do we.
    case 2: case 3: case 4:
       PRE_MEM_WRITE( "syslog(bufp)", ARG2, ARG3);
       break;
index aff343f8d1273c2db0eb6abb37d3222ca5e20d14..cbb90df3d2d7f612f96d2cdaec2e15ad016dae1f 100644 (file)
@@ -202,6 +202,8 @@ int process_extended_line_op( SegInfo *si, Char*** fnames,
 
     case DW_LNE_set_address:
       /* XXX: Pointer size could be 8 */
+      // (and there may be other 32-bit assumptions within this file?
+      //  not sure...  --njn)
       vg_assert(pointer_size == 4);
       adr = *((Addr *)data);
       if (0) VG_(printf)("smr.a := %p\n", adr );
index 7d193feb4f8908ce6c2ff29b57f0def062d54f77..dfc2913cf5883d1952076cef696c7edb822d1185 100644 (file)
@@ -426,7 +426,7 @@ void VG_(scheduler_init) ( void )
    vg_assert(tid_main == 1); 
    VG_(threads)[tid_main].status = VgTs_Runnable;
 
-   VG_(threads)[tid_main].stack_highest_word = VG_(clstk_end) - 4;
+   VG_(threads)[tid_main].stack_highest_word = VG_(clstk_end) - sizeof(UWord);
    VG_(threads)[tid_main].stack_base = VG_(clstk_base);
    VG_(threads)[tid_main].stack_size = VG_(client_rlimit_stack).rlim_cur;
 
@@ -1824,7 +1824,7 @@ void do__apply_in_new_thread ( ThreadId parent_tid,
       VG_(threads)[tid].stack_size = new_stk_szb;
       VG_(threads)[tid].stack_highest_word
          = new_stack + new_stk_szb 
-                     - VG_AR_CLIENT_STACKBASE_REDZONE_SZB; /* - ??? */;
+                     - VG_AR_CLIENT_STACKBASE_REDZONE_SZB; /* - sizeof(UWord) ??? */;
    }
 
    /* Having got memory to hold the thread's stack:
index 0093c4dfa33b6a5db6884ddb6c085cc75eabdeda..b8eb72f069d52e10325c1c251493aa1d8b8a44d5 100644 (file)
@@ -981,6 +981,9 @@ void VG_(kill_self)(Int sigNo)
 
 // Core dumping is disabled until someone can work out how to abstract out
 // the arch-specific and word-size-specific parts neatly.
+//
+// Note that the code below is not 64-bit clean!
+//
 #if 0
 /*
   Dump core