|
From: Dirk M. <mu...@kd...> - 2003-12-17 13:21:18
|
CVS commit by mueller: ignore A .cvsignore 1.1 |
|
From: Jeremy F. <je...@go...> - 2003-12-23 01:15:34
|
CVS commit by fitzhardinge:
Make sure we use gcc's ld, not whatever random ld we happen to find in the path.
M +1 -1 Makefile.am 1.3
--- valgrind/coregrind/x86/Makefile.am #1.2:1.3
@@ -14,5 +14,5 @@
# Extract ld's default linker script and hack it to our needs
stage2.lds: Makefile
- ld --verbose | sed \
+ $(CC) -Wl,--verbose -nostdlib 2>&1 | sed \
-e '1,/^=====\+$$/d' \
-e '/^=====\+$$/d' \
|
|
From: Jeremy F. <je...@go...> - 2003-12-24 01:51:42
|
CVS commit by fitzhardinge:
It seems newer linkers have scripts which mention the base address twice
on one line.
M +1 -1 Makefile.am 1.4
--- valgrind/coregrind/x86/Makefile.am #1.3:1.4
@@ -18,3 +18,3 @@
-e '/^=====\+$$/d' \
-e 's/ENTRY(_start)/ENTRY(_ume_entry)/' \
- -e 's/0x08048000/kickstart_base/' > $@ || rm -f $@
+ -e 's/0x08048000/kickstart_base/g' > $@ || rm -f $@
|
|
From: Jeremy F. <je...@go...> - 2004-01-19 21:47:58
|
CVS commit by fitzhardinge:
Add some comments
M +9 -4 ume_go.c 1.3
--- valgrind/coregrind/x86/ume_go.c #1.2:1.3
@@ -27,9 +27,14 @@
#include "ume_arch.h"
+/*
+ Jump to a particular EIP with a particular ESP. This is intended
+ to simulate the initial CPU state when the kernel starts an program
+ after exec; it therefore also clears all the other registers.
+ */
void ume_go(addr_t eip, addr_t esp)
{
- asm volatile ("movl %1, %%esp;"
- "pushl %%eax;"
- "xorl %%eax,%%eax;"
+ asm volatile ("movl %1, %%esp;" /* set esp */
+ "pushl %%eax;" /* push esp */
+ "xorl %%eax,%%eax;" /* clear registers */
"xorl %%ebx,%%ebx;"
"xorl %%ecx,%%ecx;"
@@ -43,4 +48,4 @@ void ume_go(addr_t eip, addr_t esp)
/* we should never get here */
for(;;)
- ;
+ asm volatile("ud2");
}
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 15:42:32
|
CVS commit by nethercote:
Makefile.am minor correction
M +0 -1 Makefile.am 1.6
--- valgrind/coregrind/x86/Makefile.am #1.5:1.6
@@ -4,5 +4,4 @@
EXTRA_DIST = \
ume_archdefs.c \
- ume_archdefs.h \
ume_entry.S \
ume_go.c
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-03 14:24:30
|
CVS commit by nethercote:
Removed x86/ume_arch_defs.c, which just defined the never-used variable
CLIENT_START.
M +0 -1 Makefile.am 1.8
R ume_archdefs.c 1.2
--- valgrind/coregrind/x86/Makefile.am #1.7:1.8
@@ -12,5 +12,4 @@
EXTRA_DIST = \
- ume_archdefs.c \
ume_entry.S \
ume_go.c
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 16:10:36
|
CVS commit by nethercote: Arch-abstraction: - add file for x86-specific signal stuff. Should have gone in with the last commit, whoops. A signal.c 1.1 [GPL (v2+)] |
|
From: Nicholas N. <nj...@ca...> - 2004-10-14 10:58:35
|
CVS commit by nethercote:
Since we use "-Wl,-e,_ume_entry" when linking stage2, there is no need to
rename "_start" as "_ume_entry" in stage2.lds.
M +0 -1 Makefile.am 1.13
--- valgrind/coregrind/x86/Makefile.am #1.12:1.13
@@ -27,4 +27,3 @@
-e '1,/^=====\+$$/d' \
-e '/^=====\+$$/d' \
- -e 's/ENTRY(_start)/ENTRY(_ume_entry)/' \
-e 's/0x08048000/kickstart_base/g' > $@ || rm -f $@
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-25 11:25:35
|
CVS commit by nethercote:
Fix for 91844...
M +13 -2 libpthread.c 1.3
--- valgrind/coregrind/x86/libpthread.c #1.2:1.3
@@ -97,5 +97,16 @@ Bool VGA_(has_tls)(void)
void VGA_(thread_create)(arch_thread_aux_t *aux)
{
- if (VGA_(has_tls)) {
+ // Weirdness alert: I tried removing this call to get_gs() by using a
+ // call to VGA_(has_tls)() in the condition, and Jeroen Witmond
+ // experienced mysterious regtest failures (some of the pth_* ones) on
+ // on of his machines:
+ //
+ // 'Linux DoornRoosje 2.4.26-1-386 #1 Tue Aug // 24
+ // 13:31:19 JST 2004 i686 GNU/Linux' (Debian sarge)
+ //
+ // I don't understand what the difference is either. Compiler bug? --njn
+ int gs = get_gs();
+
+ if ((gs & 7) == 3) {
tcbhead_t *tcb = get_tcb();
@@ -108,5 +119,5 @@ void VGA_(thread_create)(arch_thread_aux
aux->tls_data = allocate_tls(NULL);
- aux->tls_segment = get_gs() >> 3;
+ aux->tls_segment = gs >> 3;
aux->sysinfo = tcb->sysinfo;
|
|
From: Tom H. <th...@cy...> - 2004-10-25 16:59:49
|
CVS commit by thughes:
Actually call VGA_(has_tls) rather than just testing the function
address - this replaces Nick's replacing of the has_tls call with
an inline version.
BUG: 91844
M +2 -13 libpthread.c 1.4
--- valgrind/coregrind/x86/libpthread.c #1.3:1.4
@@ -97,16 +97,5 @@ Bool VGA_(has_tls)(void)
void VGA_(thread_create)(arch_thread_aux_t *aux)
{
- // Weirdness alert: I tried removing this call to get_gs() by using a
- // call to VGA_(has_tls)() in the condition, and Jeroen Witmond
- // experienced mysterious regtest failures (some of the pth_* ones) on
- // on of his machines:
- //
- // 'Linux DoornRoosje 2.4.26-1-386 #1 Tue Aug // 24
- // 13:31:19 JST 2004 i686 GNU/Linux' (Debian sarge)
- //
- // I don't understand what the difference is either. Compiler bug? --njn
- int gs = get_gs();
-
- if ((gs & 7) == 3) {
+ if (VGA_(has_tls)()) {
tcbhead_t *tcb = get_tcb();
@@ -119,5 +108,5 @@ void VGA_(thread_create)(arch_thread_aux
aux->tls_data = allocate_tls(NULL);
- aux->tls_segment = gs >> 3;
+ aux->tls_segment = get_gs() >> 3;
aux->sysinfo = tcb->sysinfo;
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-25 20:21:51
|
CVS commit by nethercote: comment wibbles M +1 -1 signal.c 1.4 M +1 -1 state.c 1.10 M +1 -1 x86_private.h 1.2 --- valgrind/coregrind/x86/signal.c #1.3:1.4 @@ -1,5 +1,5 @@ /*--------------------------------------------------------------------*/ -/*--- x86 signals, etc. signal.c ---*/ +/*--- x86 signals, etc. x86/signal.c ---*/ /*--------------------------------------------------------------------*/ --- valgrind/coregrind/x86/state.c #1.9:1.10 @@ -1,5 +1,5 @@ /*--------------------------------------------------------------------*/ -/*--- x86 registers, etc. state.c ---*/ +/*--- x86 registers, etc. x86/state.c ---*/ /*--------------------------------------------------------------------*/ --- valgrind/coregrind/x86/x86_private.h #1.1:1.2 @@ -1,5 +1,5 @@ /*--------------------------------------------------------------------*/ -/*--- Private x86 specific header. x86/private.h ---*/ +/*--- Private x86 specific header. x86/x86_private.h ---*/ /*--------------------------------------------------------------------*/ |
|
From: Nicholas N. <nj...@ca...> - 2004-10-26 11:24:33
|
CVS commit by nethercote: comment wibble M +1 -1 x86_private_asm.h 1.2 --- valgrind/coregrind/x86/x86_private_asm.h #1.1:1.2 @@ -1,5 +1,5 @@ /*--------------------------------------------------------------------*/ -/*--- Private x86 specific header. x86/x86_private_asm.h ---*/ +/*--- Private arch-specific asm stuff. x86/x86_private_asm.h ---*/ /*--------------------------------------------------------------------*/ |
|
From: Nicholas N. <nj...@ca...> - 2004-10-26 15:04:53
|
CVS commit by nethercote: whoops, unbreak build M +1 -0 dispatch.S 1.2 --- valgrind/coregrind/x86/dispatch.S #1.1:1.2 @@ -31,4 +31,5 @@ #include "core_asm.h" +#include "x86_private_asm.h" |
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:39:21
|
CVS commit by nethercote: comment wibble M +1 -2 helpers.S 1.2 --- valgrind/coregrind/x86/helpers.S #1.1:1.2 @@ -1,5 +1,4 @@ ##--------------------------------------------------------------------## -##--- Support routines for the JITter output. ---## -##--- x86/helpers.S ---## +##--- Support routines for the JITter output. x86/helpers.S ---## ##--------------------------------------------------------------------## |
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:41:21
|
CVS commit by nethercote:
Make computations more understandable.
M +6 -6 state.c 1.12
--- valgrind/coregrind/x86/state.c #1.11:1.12
@@ -510,16 +510,16 @@ void VGA_(thread_initial_stack)(ThreadId
/* push two args */
- esp -= 8;
+ esp -= 2 * sizeof(UWord);
SET_PTHREQ_ESP(tid, esp);
- VG_TRACK ( new_mem_stack, esp, 2 * 4 );
+ VG_TRACK ( new_mem_stack, esp, 2 * sizeof(UWord) );
VG_TRACK ( pre_mem_write, Vg_CorePThread, tid, "new thread: stack",
- esp, 2 * 4 );
+ esp, 2 * sizeof(UWord) );
/* push arg and (bogus) return address */
- *(UWord*)(esp+4) = arg;
+ *(UWord*)(esp+sizeof(UWord)) = arg;
*(UWord*)(esp) = ret;
- VG_TRACK ( post_mem_write, esp, 2 * 4 );
+ VG_TRACK ( post_mem_write, esp, 2 * sizeof(UWord) );
}
|
|
From: Jeremy F. <je...@go...> - 2005-02-02 00:07:54
|
CVS commit by fitzhardinge:
Initialize the d-flag in the initial thread.
M +1 -0 state.c 1.17
--- valgrind/coregrind/x86/state.c #1.16:1.17
@@ -67,4 +67,5 @@ void VGA_(init_thread)( ThreadId tid, Ad
arch->m_ebp = 0;
arch->m_eflags = 0;
+ arch->m_dflag = 1;
arch->m_eip = init_eip;
|
|
From: Jeremy F. <je...@go...> - 2005-02-10 00:24:41
|
CVS commit by fitzhardinge:
Make generation of core_arch_asm_offsets.h to work in a cross-build
environment. Distribute a native-built .dist version, and just copy
that if we can't run gen_offsets on the build machine.
M +21 -3 Makefile.am 1.23
--- valgrind/coregrind/x86/Makefile.am #1.22:1.23
@@ -16,5 +16,5 @@
jmp_with_stack.c \
libpthread.c \
- gen_offsets.c core_arch_asm_offsets.h
+ gen_offsets.c core_arch_asm_offsets.h.dist
BUILT_SOURCES = stage2.lds core_arch_asm_offsets.h
@@ -45,5 +45,23 @@
-e 's/0x08048000/kickstart_base/g' > $@ || rm -f $@
-# offsets
+# Generate offsets
+# Only update the existing core_arch_asm_offsets if gen_offsets ran,
+# and it produced a different file. Otherwise preserve the existing file.
core_arch_asm_offsets.h: gen_offsets
- ./gen_offsets > $@ || rm -f $@
+ -./gen_offsets > $@.new
+ @if [ -s $@.new ] && ! cmp $@ $@.new >/dev/null 2>&1; then \
+ echo Updated $@; \
+ mv $@.new $@; \
+ else \
+ rm -f $@.new; \
+ fi
+ @if ! [ -s $@ ]; then \
+ if ! cp $(srcdir)/$@.dist $@; then \
+ echo "Couldn't create $@"; exit 1; \
+ else \
+ echo "Copied $(srcdir)/$@.dist"; \
+ fi; \
+ fi
+
+core_arch_asm_offsets.h.dist: core_arch_asm_offsets.h
+ cp $< $@
|
|
From: Jeremy F. <je...@go...> - 2005-02-10 00:27:05
|
CVS commit by fitzhardinge:
Remove unused libpthread.c
M +0 -1 Makefile.am 1.24
R libpthread.c 1.5
--- valgrind/coregrind/x86/Makefile.am #1.23:1.24
@@ -15,5 +15,4 @@
EXTRA_DIST = \
jmp_with_stack.c \
- libpthread.c \
gen_offsets.c core_arch_asm_offsets.h.dist
|
|
From: Jeremy F. <je...@go...> - 2005-02-25 05:39:59
|
CVS commit by fitzhardinge:
Oops. I've had this sitting in my tree for ages, but forgot to check it in.
Properly restore the signal mask on return from a signal handler.
M +1 -0 signal.c 1.15
--- valgrind/coregrind/x86/signal.c #1.14:1.15
@@ -554,4 +554,5 @@ static Bool restore_vg_sigframe(ThreadSt
tst->sig_mask = frame->mask;
+ tst->eff_sig_mask = frame->mask;
if (VG_(needs).shadow_regs) {
|
|
From: Dirk M. <mu...@kd...> - 2005-02-27 00:17:19
|
CVS commit by mueller:
C90 style comments -> C89 style comments
M +17 -16 core_arch.h 1.25
M +1 -1 core_arch_asm.h 1.4
--- valgrind/coregrind/x86/core_arch.h #1.24:1.25
@@ -32,6 +32,6 @@
#define __X86_CORE_ARCH_H
-#include "core_arch_asm.h" // arch-specific asm stuff
-#include "tool_arch.h" // arch-specific tool stuff
+#include "core_arch_asm.h"
+#include "tool_arch.h"
/* ---------------------------------------------------------------------
@@ -39,5 +39,5 @@
------------------------------------------------------------------ */
-// Accessors for the arch_thread_t
+/* Accessors for the arch_thread_t */
#define ARCH_INSTR_PTR(regs) ((regs).m_eip)
#define ARCH_STACK_PTR(regs) ((regs).m_esp)
@@ -65,19 +65,19 @@
#define ARCH_CLREQ_RET(regs) ((regs).m_edx)
-// Accessors for the ThreadState
+/* Accessors for the ThreadState */
#define R_CLREQ_RET R_EDX
#define R_PTHREQ_RET R_EDX
-// Stack frame layout and linkage
+/* Stack frame layout and linkage */
#define FIRST_STACK_FRAME(ebp) (ebp)
#define STACK_FRAME_RET(ebp) (((UWord*)ebp)[1])
#define STACK_FRAME_NEXT(ebp) (((UWord*)ebp)[0])
-// Offsets of interesting registers
+/* Offsets of interesting registers */
#define VGOFF_INSTR_PTR VGOFF_(m_eip)
#define VGOFF_STACK_PTR VGOFF_(m_esp)
#define VGOFF_FRAME_PTR VGOFF_(m_ebp)
-// Get stack pointer and frame pointer
+/* Get stack pointer and frame pointer */
#define ARCH_GET_REAL_STACK_PTR(esp) do { \
asm("movl %%esp, %0" : "=r" (esp)); \
@@ -164,5 +164,5 @@ extern const Char VG_(helper_cmpxchg8b)[
------------------------------------------------------------------ */
-// XXX: eventually this will be x86-private, not seen by the core(?)
+/* XXX: eventually this will be x86-private, not seen by the core(?) */
/* This is the hardware-format for a segment descriptor, ie what the
@@ -197,11 +197,11 @@ typedef struct _LDT_ENTRY {
------------------------------------------------------------------ */
-// Total number of spill slots available for register allocation.
+/* Total number of spill slots available for register allocation. */
#define VG_MAX_SPILLSLOTS 24
-// Valgrind's stack size, in words.
+/* Valgrind's stack size, in words. */
#define VG_STACK_SIZE_W 16384
-// Base address of client address space.
+/* Base address of client address space. */
#define CLIENT_BASE 0x00000000ul
@@ -255,8 +255,9 @@ struct i387_fxsave_struct {
-// Architecture-specific part of a ThreadState
-// XXX: eventually this should be made abstract, ie. the fields not visible
-// to the core... then VgLdtEntry can be made non-visible to the core
-// also.
+/* Architecture-specific part of a ThreadState
+ XXX: eventually this should be made abstract, ie. the fields not visible
+ to the core... then VgLdtEntry can be made non-visible to the core
+ also.
+*/
typedef struct {
/* Saved machine context. Note the FPU state, %EIP and segment
@@ -332,5 +333,5 @@ arch_thread_t;
void VGA_(signal_return)(ThreadId tid, Bool isRT);
-#endif // __X86_CORE_ARCH_H
+#endif /* __X86_CORE_ARCH_H */
/*--------------------------------------------------------------------*/
--- valgrind/coregrind/x86/core_arch_asm.h #1.3:1.4
@@ -58,5 +58,5 @@
-#endif // __X86_CORE_ARCH_ASM_H
+#endif /* __X86_CORE_ARCH_ASM_H */
/*--------------------------------------------------------------------*/
|
|
From: Dirk M. <mu...@kd...> - 2005-03-01 01:10:38
|
CVS commit by mueller:
fix compile (gcc 4.0)
M +1 -1 helpers.S 1.6
--- valgrind/coregrind/x86/helpers.S #1.5:1.6
@@ -64,5 +64,5 @@
ud2
- # We can point our sysinfo stuff here
+ /* We can point our sysinfo stuff here */
.align 16
syscall_start:
|
|
From: Julian S. <js...@ac...> - 2005-03-24 02:29:03
|
CVS commit by jseward: Fix 'make distcheck'. M +1 -1 Makefile.am 1.25 --- valgrind/coregrind/x86/Makefile.am #1.24:1.25 @@ -18,5 +18,5 @@ BUILT_SOURCES = stage2.lds core_arch_asm_offsets.h -CLEANFILES = stage2.lds core_arch_asm_offsets.h +CLEANFILES = stage2.lds core_arch_asm_offsets.h core_arch_asm_offsets.h.dist libarch_a_SOURCES = \ |