|
From: Nicholas N. <nj...@ca...> - 2004-11-01 18:38:11
|
CVS commit by nethercote:
Don't need to use addr_t anymore, use Addr instead, for consistency.
M +2 -2 coregrind/stage1.c 1.30
M +1 -1 coregrind/ume.c 1.37
M +10 -13 coregrind/ume.h 1.15
M +11 -11 coregrind/vg_main.c 1.226
M +1 -1 coregrind/x86/jmp_with_stack.c 1.2
M +1 -1 memcheck/tests/vgtest_ume.c 1.6
--- valgrind/coregrind/stage1.c #1.29:1.30
@@ -298,5 +298,5 @@ static void main2(void)
}
- jmp_with_stack(info.init_eip, (addr_t)esp);
+ jmp_with_stack(info.init_eip, (Addr)esp);
}
@@ -320,5 +320,5 @@ int main(int argc, char** argv)
/* move onto another stack so we can play with the main one */
- jmp_with_stack((addr_t)main2, (addr_t)stack + sizeof(stack));
+ jmp_with_stack((Addr)main2, (Addr)stack + sizeof(stack));
}
--- valgrind/coregrind/ume.c #1.36:1.37
@@ -415,5 +415,5 @@ static int load_ELF(char *hdr, int len,
info->exe_end = maxaddr + ebase;
- info->init_eip = (addr_t)entry;
+ info->init_eip = (Addr)entry;
free(e);
--- valgrind/coregrind/ume.h #1.14:1.15
@@ -55,9 +55,6 @@ void foreach_map(int (*fn)(char *start,
#endif
-/* Integer type the same size as a pointer */
-typedef ESZ(Addr) addr_t;
-
// Jump to a new 'ip' with the stack 'sp'.
-void jmp_with_stack(addr_t ip, addr_t sp) __attribute__((noreturn));
+void jmp_with_stack(Addr ip, Addr sp) __attribute__((noreturn));
/*------------------------------------------------------------*/
@@ -69,16 +66,16 @@ void jmp_with_stack(addr_t ip, addr_t sp
struct exeinfo
{
- addr_t map_base; // IN: if non-zero, base address of mappings
+ Addr map_base; // IN: if non-zero, base address of mappings
char** argv; // IN: the original argv
- addr_t exe_base; // INOUT: lowest (allowed) address of exe
- addr_t exe_end; // INOUT: highest (allowed) address
+ Addr exe_base; // INOUT: lowest (allowed) address of exe
+ Addr exe_end; // INOUT: highest (allowed) address
- addr_t phdr; // OUT: address phdr was mapped at
+ Addr phdr; // OUT: address phdr was mapped at
int phnum; // OUT: number of phdrs
- addr_t interp_base; // OUT: where interpreter (ld.so) was mapped
- addr_t entry; // OUT: entrypoint in main executable
- addr_t init_eip; // OUT: initial eip
- addr_t brkbase; // OUT: base address of brk segment
+ Addr interp_base; // OUT: where interpreter (ld.so) was mapped
+ Addr entry; // OUT: entrypoint in main executable
+ Addr init_eip; // OUT: initial eip
+ Addr brkbase; // OUT: base address of brk segment
// These are the extra args added by #! scripts
--- valgrind/coregrind/vg_main.c #1.225:1.226
@@ -402,5 +402,5 @@ static void layout_remaining_space(Addr
Int ires;
void* vres;
- addr_t client_size, shadow_size;
+ Addr client_size, shadow_size;
// VG_(valgrind_base) should have been set by scan_auxv, but if not,
@@ -420,5 +420,5 @@ static void layout_remaining_space(Addr
/* where !FIXED mmap goes */
VG_(client_mapbase) = VG_(client_base) +
- PGROUNDDN((addr_t)(client_size * CLIENT_HEAP_PROPORTION));
+ PGROUNDDN((Addr)(client_size * CLIENT_HEAP_PROPORTION));
VG_(shadow_base) = VG_(client_end) + REDZONE_SIZE;
@@ -927,5 +927,5 @@ static Addr setup_client_stack(void* ini
char *strtab; /* string table */
char *stringbase;
- addr_t *ptr;
+ Addr *ptr;
struct ume_auxv *auxv;
const struct ume_auxv *orig_auxv;
@@ -936,5 +936,5 @@ static Addr setup_client_stack(void* ini
int envc; /* total number of env vars */
unsigned stacksize; /* total client stack size */
- addr_t cl_esp; /* client stack base (initial esp) */
+ Addr cl_esp; /* client stack base (initial esp) */
/* use our own auxv as a prototype */
@@ -1022,5 +1022,5 @@ static Addr setup_client_stack(void* ini
/* ==================== copy client stack ==================== */
- ptr = (addr_t *)cl_esp;
+ ptr = (Addr*)cl_esp;
/* --- argc --- */
@@ -1029,13 +1029,13 @@ static Addr setup_client_stack(void* ini
/* --- argv --- */
if (info->interp_name) {
- *ptr++ = (addr_t)copy_str(&strtab, info->interp_name);
+ *ptr++ = (Addr)copy_str(&strtab, info->interp_name);
free(info->interp_name);
}
if (info->interp_args) {
- *ptr++ = (addr_t)copy_str(&strtab, info->interp_args);
+ *ptr++ = (Addr)copy_str(&strtab, info->interp_args);
free(info->interp_args);
}
for (cpp = orig_argv; *cpp; ptr++, cpp++) {
- *ptr = (addr_t)copy_str(&strtab, *cpp);
+ *ptr = (Addr)copy_str(&strtab, *cpp);
}
*ptr++ = 0;
@@ -1044,5 +1044,5 @@ static Addr setup_client_stack(void* ini
VG_(client_envp) = (Char **)ptr;
for (cpp = orig_envp; cpp && *cpp; ptr++, cpp++)
- *ptr = (addr_t)copy_str(&strtab, *cpp);
+ *ptr = (Addr)copy_str(&strtab, *cpp);
*ptr++ = 0;
--- valgrind/coregrind/x86/jmp_with_stack.c #1.1:1.2
@@ -32,5 +32,5 @@
after exec; it therefore also clears all the other registers.
*/
-void jmp_with_stack(addr_t eip, addr_t esp)
+void jmp_with_stack(Addr eip, Addr esp)
{
asm volatile ("movl %1, %%esp;" /* set esp */
--- valgrind/memcheck/tests/vgtest_ume.c #1.5:1.6
@@ -135,5 +135,5 @@ static void test__do_exec(void)
// fprintf(stderr, "ume_go: %p %p\n", (void*)info.init_eip, (void*)esp);
- jmp_with_stack(info.init_eip, (addr_t)esp);
+ jmp_with_stack(info.init_eip, (Addr)esp);
assert(0); // UNREACHABLE
|