You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
|
2
(13) |
3
(29) |
|
4
(18) |
5
(12) |
6
(12) |
7
(22) |
8
(9) |
9
(14) |
10
(6) |
|
11
|
12
|
13
(1) |
14
(5) |
15
(11) |
16
(7) |
17
(5) |
|
18
(1) |
19
(8) |
20
(7) |
21
(12) |
22
(5) |
23
(17) |
24
(6) |
|
25
(27) |
26
(17) |
27
(2) |
28
(10) |
29
(3) |
30
(8) |
31
(20) |
|
From: Pawel K. <pk...@li...> - 2004-01-06 23:29:26
|
On Wed, 7 Jan 2004, Eyal Lebedinsky wrote: > Building valgrind, it includes <linux/timex.h> and then tries > to use the adjtimex syscall. This ends up with an undefined > error for 'cpu_has_tsc'. This did not happen with earlier > kernels. > > In file included from /usr/include/linux/timex.h:152, > from vg_unsafe.h:66, > from vg_syscalls.c:35: > /usr/include/asm/timex.h: In function `get_cycles': > /usr/include/asm/timex.h:44: `cpu_has_tsc' undeclared (first use in this > function) cpu_has_tsc is defined in cpufeature.h, so probably adding: #include <asm/cpufeature.h> to the include/asm-i386/timex.h would help. I don't have 2.4.25-pre handy, so I can't test it (nor send the patch) at the moment. pkot PS. Sorry for the duplicate, forgot to cc the lists. -- mailto:pk...@li... :: mailto:pk...@sl... http://kt.linuxnews.pl/ :: Kernel Traffic po polsku |
|
From: Eyal L. <ey...@ey...> - 2004-01-06 22:49:47
|
This is part of the current patch:
--- linux-2.4.24/include/asm-i386/timex.h 2002-11-28
23:53:15.000000000 +0000
+++ linux-2.4.25-pre4/include/asm-i386/timex.h 2004-01-06
12:43:33.000000000 +0000
@@ -40,14 +40,10 @@
static inline cycles_t get_cycles (void)
{
-#ifndef CONFIG_X86_TSC
- return 0;
-#else
- unsigned long long ret;
-
- rdtscll(ret);
+ unsigned long long ret = 0;
+ if(cpu_has_tsc)
+ rdtscll(ret);
return ret;
-#endif
}
extern unsigned long cpu_khz;
Building valgrind, it includes <linux/timex.h> and then tries
to use the adjtimex syscall. This ends up with an undefined
error for 'cpu_has_tsc'. This did not happen with earlier
kernels.
In file included from /usr/include/linux/timex.h:152,
from vg_unsafe.h:66,
from vg_syscalls.c:35:
/usr/include/asm/timex.h: In function `get_cycles':
/usr/include/asm/timex.h:44: `cpu_has_tsc' undeclared (first use in this
function)
Is this a problem with 2.4-pre or is valgrind inappropriately
messing with kernel headers?
For the moment I hacked it badly in coregrind/vg_unsafe.h:
#define cpu_has_tsc 1
#include <linux/timex.h>
--
Eyal Lebedinsky (ey...@ey...) <http://samba.org/eyal/>
|
|
From: Jeremy F. <je...@go...> - 2004-01-06 21:46:42
|
CVS commit by fitzhardinge:
Make fork test deterministic.
M +4 -0 fork.c 1.4
M +0 -2 fork.stderr.exp 1.4
M +1 -0 fork.vgtest 1.3
--- valgrind/none/tests/fork.c #1.3:1.4
@@ -2,4 +2,5 @@
#include <unistd.h>
#include <sys/types.h>
+#include <sys/wait.h>
#include <stdio.h>
@@ -17,4 +18,7 @@ int main(void)
printf("%s", pid==0 ? "X" : "XX");
+ if (pid != 0)
+ waitpid(pid, NULL, 0);
+
return 0;
}
--- valgrind/none/tests/fork.stderr.exp #1.3:1.4
@@ -1,2 +0,0 @@
-
-
--- valgrind/none/tests/fork.vgtest #1.2:1.3
@@ -1 +1,2 @@
prog: fork
+vgopts: -q
|
|
From: Dirk M. <dm...@gm...> - 2004-01-06 21:21:37
|
On Tuesday 06 January 2004 19:27, Nicholas Nethercote wrote: > > > Er, yeah. Not sure what happened there, I can remember invoking "cvs > > > remove"... done. Thanks for catching it. > > you probably forgot the '-f' parameter.. > what -f parameter? cvs rm <file> does not work unless the file is already deleted in the checkout or you use the -f parameter. |
|
From: Nicholas N. <nj...@ca...> - 2004-01-06 18:27:15
|
On Tue, 6 Jan 2004, Dirk Mueller wrote: > > Er, yeah. Not sure what happened there, I can remember invoking "cvs > > remove"... done. Thanks for catching it. > > you probably forgot the '-f' parameter.. what -f parameter? N |
|
From: Dirk M. <dm...@gm...> - 2004-01-06 18:18:13
|
On Tuesday 06 January 2004 17:09, Nicholas Nethercote wrote: > Er, yeah. Not sure what happened there, I can remember invoking "cvs > remove"... done. Thanks for catching it. you probably forgot the '-f' parameter.. |
|
From: Nicholas N. <nj...@ca...> - 2004-01-06 16:14:44
|
CVS commit by nethercote: Removed files I meant to with the last commit. R cg_sim_D1.c 1.9 R cg_sim_I1.c 1.9 R cg_sim_L2.c 1.9 R cg_sim_gen.c 1.12 |
|
From: Nicholas N. <nj...@ca...> - 2004-01-06 16:09:43
|
On Tue, 6 Jan 2004, Dirk Mueller wrote:
> > Folded cg_sim_{gen,I1,D1,L2}.c into cg_sim.c, which makes a lot more sense
> > and is shorter.
>
> Hmm, don't you want to remove those files then?
Er, yeah. Not sure what happened there, I can remember invoking "cvs
remove"... done. Thanks for catching it.
N
|
|
From: Dirk M. <dm...@gm...> - 2004-01-06 16:04:00
|
On Sunday 04 January 2004 17:56, Nicholas Nethercote wrote:
> Folded cg_sim_{gen,I1,D1,L2}.c into cg_sim.c, which makes a lot more sense
> and is shorter.
Hmm, don't you want to remove those files then?
|
|
From: Dirk M. <mu...@kd...> - 2004-01-06 16:03:10
|
CVS commit by mueller:
remove anonymous unions - not supported by older versions of gcc.
M +8 -8 stage1.c 1.5 [POSSIBLY UNSAFE: printf]
M +12 -12 stage2.c 1.6
M +0 -2 ume.c 1.7
M +1 -1 ume.h 1.3
M +5 -5 vg_stabs.c 1.5
M +6 -6 vg_symtab2.c 1.73
M +1 -1 vg_symtab2.h 1.6
M +44 -44 vg_symtypes.c 1.4
--- valgrind/coregrind/stage1.c #1.4:1.5
@@ -91,5 +91,5 @@ static void *fix_auxv(void *v_init_esp,
place when we start it */
auxv[0].a_type = AT_UME_PADFD;
- auxv[0].a_val = as_getpadfd();
+ auxv[0].u.a_val = as_getpadfd();
/* This will be needed by valgrind itself so that it can
@@ -97,10 +97,10 @@ static void *fix_auxv(void *v_init_esp,
because /proc/self/exe will go away once we unmap stage1. */
auxv[1].a_type = AT_UME_EXECFD;
- auxv[1].a_val = open("/proc/self/exe", O_RDONLY);
+ auxv[1].u.a_val = open("/proc/self/exe", O_RDONLY);
/* make sure the rest are sane */
for(i = new_entries; i < delta/sizeof(*auxv); i++) {
auxv[i].a_type = AT_IGNORE;
- auxv[i].a_val = 0;
+ auxv[i].u.a_val = 0;
}
@@ -110,25 +110,25 @@ static void *fix_auxv(void *v_init_esp,
for(; auxv->a_type != AT_NULL; auxv++) {
if (0)
- printf("doing auxv %p %4x: %d %p\n", auxv, auxv->a_type, auxv->a_val, auxv->a_ptr);
+ printf("doing auxv %p %4x: %d %p\n", auxv, auxv->a_type, auxv->u.a_val, auxv->u.a_ptr);
switch(auxv->a_type) {
case AT_PHDR:
seen |= 1;
- auxv->a_val = info->phdr;
+ auxv->u.a_val = info->phdr;
break;
case AT_PHNUM:
seen |= 2;
- auxv->a_val = info->phnum;
+ auxv->u.a_val = info->phnum;
break;
case AT_BASE:
seen |= 4;
- auxv->a_val = info->interp_base;
+ auxv->u.a_val = info->interp_base;
break;
case AT_ENTRY:
seen |= 8;
- auxv->a_val = info->entry;
+ auxv->u.a_val = info->entry;
break;
}
--- valgrind/coregrind/stage2.c #1.5:1.6
@@ -91,10 +91,10 @@ static int scan_auxv(void)
switch(auxv->a_type) {
case AT_UME_PADFD:
- as_setpadfd(auxv->a_val);
+ as_setpadfd(auxv->u.a_val);
found |= 1;
break;
case AT_UME_EXECFD:
- kp.vgexecfd = auxv->a_val;
+ kp.vgexecfd = auxv->u.a_val;
found |= 2;
break;
@@ -237,5 +237,5 @@ static Addr setup_client_stack(char **or
for(cauxv = orig_auxv; cauxv->a_type != AT_NULL; cauxv++) {
if (cauxv->a_type == AT_PLATFORM)
- stringsize += strlen(cauxv->a_ptr) + 1;
+ stringsize += strlen(cauxv->u.a_ptr) + 1;
auxsize += sizeof(*cauxv);
}
@@ -278,5 +278,5 @@ static Addr setup_client_stack(char **or
client_end - PGROUNDDN(cl_esp),
PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
+ MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
@@ -322,5 +322,5 @@ static Addr setup_client_stack(char **or
auxv->a_type = AT_IGNORE;
else
- auxv->a_val = info->phdr;
+ auxv->u.a_val = info->phdr;
break;
@@ -329,5 +329,5 @@ static Addr setup_client_stack(char **or
auxv->a_type = AT_IGNORE;
else
- auxv->a_val = info->phnum;
+ auxv->u.a_val = info->phnum;
break;
@@ -336,13 +336,13 @@ static Addr setup_client_stack(char **or
auxv->a_type = AT_IGNORE;
else
- auxv->a_val = info->interp_base;
+ auxv->u.a_val = info->interp_base;
break;
case AT_PLATFORM: /* points to a platform description string */
- auxv->a_ptr = copy_str(&strtab, orig_auxv->a_ptr);
+ auxv->u.a_ptr = copy_str(&strtab, orig_auxv->u.a_ptr);
break;
case AT_ENTRY:
- auxv->a_val = info->entry;
+ auxv->u.a_val = info->entry;
break;
@@ -374,5 +374,5 @@ static Addr setup_client_stack(char **or
need LD_PRELOAD/LD_LIBRARY_PATH to work for the client, we
set AT_SECURE to 0. */
- auxv->a_val = 0;
+ auxv->u.a_val = 0;
break;
@@ -925,5 +925,5 @@ int main(int argc, char **argv)
/* make the redzone inaccessible */
mmap((void *)client_end, REDZONE_SIZE, PROT_NONE,
- MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+ MAP_FIXED|MAP_ANON|MAP_PRIVATE, -1, 0);
munmap(CLIENT_BASE, client_size); /* make client hole */
@@ -952,5 +952,5 @@ int main(int argc, char **argv)
if (shadow_size != 0)
mmap((char *)shadow_base, shadow_size, PROT_NONE,
- MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, -1, 0);
+ MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0);
/* unpad us */
--- valgrind/coregrind/ume.c #1.6:1.7
@@ -86,7 +86,5 @@
#include <stdlib.h>
#include <unistd.h>
-#include <asm/unistd.h>
#include <sys/stat.h>
-#include <sys/sysmacros.h>
#include <dlfcn.h>
#include <assert.h>
--- valgrind/coregrind/ume.h #1.2:1.3
@@ -92,5 +92,5 @@ struct ume_auxv
int a_val;
void (*a_fcn)(void);
- };
+ } u;
};
--- valgrind/coregrind/vg_stabs.c #1.4:1.5
@@ -1013,10 +1013,10 @@ static Bool initSym(SegInfo *si, Sym *sy
case N_LCSYM:
sym->kind = SyStatic;
- sym->addr = si->offset + (Addr)val;
+ sym->u.addr = si->offset + (Addr)val;
break;
case N_PSYM:
sym->kind = SyEBPrel; /* +ve offset off EBP (erk, or ESP if no frame pointer) */
- sym->offset = val;
+ sym->u.offset = val;
break;
@@ -1026,15 +1026,15 @@ static Bool initSym(SegInfo *si, Sym *sy
else
sym->kind = SyESPrel; /* +ve off ESP when there's no frame pointer */
- sym->offset = val;
+ sym->u.offset = val;
break;
case N_RSYM:
sym->kind = SyReg;
- sym->regno = val;
+ sym->u.regno = val;
break;
case N_GSYM:
sym->kind = SyGlobal;
- sym->addr = 0; /* XXX should really look up global address */
+ sym->u.addr = 0; /* XXX should really look up global address */
break;
--- valgrind/coregrind/vg_symtab2.c #1.72:1.73
@@ -1778,5 +1778,5 @@ Variable *VG_(get_scope_variables)(Threa
if (debug && 0)
- VG_(printf)("sym->name=%s sym->kind=%d offset=%d\n", sym->name, sym->kind, sym->offset);
+ VG_(printf)("sym->name=%s sym->kind=%d offset=%d\n", sym->name, sym->kind, sym->u.offset);
switch(sym->kind) {
UInt reg;
@@ -1784,12 +1784,12 @@ Variable *VG_(get_scope_variables)(Threa
case SyGlobal:
case SyStatic:
- if (sym->addr == 0) {
+ if (sym->u.addr == 0) {
/* XXX lookup value */
}
- v->valuep = sym->addr;
+ v->valuep = sym->u.addr;
break;
case SyReg:
- v->valuep = (Addr)regaddr(tid, sym->regno);
+ v->valuep = (Addr)regaddr(tid, sym->u.regno);
break;
@@ -1798,6 +1798,6 @@ Variable *VG_(get_scope_variables)(Threa
reg = *regaddr(tid, sym->kind == SyESPrel ? R_ESP : R_EBP);
if (debug)
- VG_(printf)("reg=%p+%d=%p\n", reg, sym->offset, reg+sym->offset);
- v->valuep = (Addr)(reg + sym->offset);
+ VG_(printf)("reg=%p+%d=%p\n", reg, sym->u.offset, reg+sym->u.offset);
+ v->valuep = (Addr)(reg + sym->u.offset);
break;
--- valgrind/coregrind/vg_symtab2.h #1.5:1.6
@@ -98,5 +98,5 @@ struct _Sym {
Int regno; /* register number */
Addr addr; /* static or global address */
- };
+ } u;
};
--- valgrind/coregrind/vg_symtypes.c #1.3:1.4
@@ -152,5 +152,5 @@ struct _SymType {
void *data; /* data for resolver */
} t_unresolved;
- };
+ } u;
};
@@ -187,5 +187,5 @@ static void resolve(SymType *st)
return;
- (*st->t_unresolved.resolver)(st, st->t_unresolved.data);
+ (*st->u.t_unresolved.resolver)(st, st->u.t_unresolved.data);
if (st->kind == TyUnresolved)
@@ -201,6 +201,6 @@ SymType *VG_(st_mkunresolved)(SymType *s
st->kind = TyUnresolved;
st->size = 0;
- st->t_unresolved.resolver = resolver;
- st->t_unresolved.data = data;
+ st->u.t_unresolved.resolver = resolver;
+ st->u.t_unresolved.data = data;
return st;
@@ -212,6 +212,6 @@ void VG_(st_unresolved_setdata)(SymType
return;
- st->t_unresolved.resolver = resolver;
- st->t_unresolved.data = data;
+ st->u.t_unresolved.resolver = resolver;
+ st->u.t_unresolved.data = data;
}
@@ -247,5 +247,5 @@ SymType *VG_(st_mkint)(SymType *st, UInt
st->kind = TyInt;
st->size = size;
- st->t_scalar.issigned = isSigned;
+ st->u.t_scalar.issigned = isSigned;
return st;
@@ -260,5 +260,5 @@ SymType *VG_(st_mkfloat)(SymType *st, UI
st->kind = TyFloat;
st->size = size;
- st->t_scalar.issigned = True;
+ st->u.t_scalar.issigned = True;
return st;
@@ -286,5 +286,5 @@ SymType *VG_(st_mkpointer)(SymType *st,
st->kind = TyPointer;
st->size = sizeof(void *);
- st->t_pointer.type = ptr;
+ st->u.t_pointer.type = ptr;
return st;
@@ -299,7 +299,7 @@ SymType *VG_(st_mkrange)(SymType *st, Sy
st->kind = TyRange;
st->size = 0; /* ? */
- st->t_range.type = ty;
- st->t_range.min = min;
- st->t_range.max = max;
+ st->u.t_range.type = ty;
+ st->u.t_range.min = min;
+ st->u.t_range.max = max;
return st;
@@ -312,14 +312,14 @@ SymType *VG_(st_mkstruct)(SymType *st, U
vg_assert(st->kind == TyUnresolved || st->kind == TyUnknown || st->kind == TyStruct);
- vg_assert(st->kind != TyStruct || st->t_struct.nfield == 0);
+ vg_assert(st->kind != TyStruct || st->u.t_struct.nfield == 0);
st->kind = TyStruct;
st->size = size;
- st->t_struct.nfield = 0;
- st->t_struct.nfieldalloc = nfields;
+ st->u.t_struct.nfield = 0;
+ st->u.t_struct.nfieldalloc = nfields;
if (nfields != 0)
- st->t_struct.fields = VG_(arena_malloc)(VG_AR_SYMTAB, sizeof(StField) * nfields);
+ st->u.t_struct.fields = VG_(arena_malloc)(VG_AR_SYMTAB, sizeof(StField) * nfields);
else
- st->t_struct.fields = NULL;
+ st->u.t_struct.fields = NULL;
return st;
@@ -332,14 +332,14 @@ SymType *VG_(st_mkunion)(SymType *st, UI
vg_assert(st->kind == TyUnresolved || st->kind == TyUnknown || st->kind == TyUnion);
- vg_assert(st->kind != TyUnion || st->t_struct.nfield == 0);
+ vg_assert(st->kind != TyUnion || st->u.t_struct.nfield == 0);
st->kind = TyUnion;
st->size = size;
- st->t_struct.nfield = 0;
- st->t_struct.nfieldalloc = nfields;
+ st->u.t_struct.nfield = 0;
+ st->u.t_struct.nfieldalloc = nfields;
if (nfields != 0)
- st->t_struct.fields = VG_(arena_malloc)(VG_AR_SYMTAB, sizeof(StField) * nfields);
+ st->u.t_struct.fields = VG_(arena_malloc)(VG_AR_SYMTAB, sizeof(StField) * nfields);
else
- st->t_struct.fields = NULL;
+ st->u.t_struct.fields = NULL;
return st;
@@ -352,15 +352,15 @@ void VG_(st_addfield)(SymType *st, Char
vg_assert(st->kind == TyStruct || st->kind == TyUnion);
- if (st->t_struct.nfieldalloc == st->t_struct.nfield) {
+ if (st->u.t_struct.nfieldalloc == st->u.t_struct.nfield) {
StField *n = VG_(arena_malloc)(VG_AR_SYMTAB,
- sizeof(StField) * (st->t_struct.nfieldalloc + 2));
- VG_(memcpy)(n, st->t_struct.fields, sizeof(*n) * st->t_struct.nfield);
- if (st->t_struct.fields != NULL)
- VG_(arena_free)(VG_AR_SYMTAB, st->t_struct.fields);
- st->t_struct.nfieldalloc++;
- st->t_struct.fields = n;
+ sizeof(StField) * (st->u.t_struct.nfieldalloc + 2));
+ VG_(memcpy)(n, st->u.t_struct.fields, sizeof(*n) * st->u.t_struct.nfield);
+ if (st->u.t_struct.fields != NULL)
+ VG_(arena_free)(VG_AR_SYMTAB, st->u.t_struct.fields);
+ st->u.t_struct.nfieldalloc++;
+ st->u.t_struct.fields = n;
}
- f = &st->t_struct.fields[st->t_struct.nfield++];
+ f = &st->u.t_struct.fields[st->u.t_struct.nfield++];
f->name = name;
f->type = type;
@@ -377,6 +377,6 @@ SymType *VG_(st_mkenum)(SymType *st, UIn
st->kind = TyEnum;
- st->t_enum.ntag = 0;
- st->t_enum.tags = NULL;
+ st->u.t_enum.ntag = 0;
+ st->u.t_enum.tags = NULL;
return st;
@@ -390,6 +390,6 @@ SymType *VG_(st_mkarray)(SymType *st, Sy
st->kind = TyArray;
- st->t_array.type = type;
- st->t_array.idxtype = idxtype;
+ st->u.t_array.type = type;
+ st->u.t_array.idxtype = idxtype;
return st;
@@ -406,5 +406,5 @@ SymType *VG_(st_mktypedef)(SymType *st,
st->kind = TyTypedef;
st->name = name;
- st->t_typedef.type = type;
+ st->u.t_typedef.type = type;
return st;
@@ -419,5 +419,5 @@ SymType *VG_(st_basetype)(SymType *type,
if (type->kind == TyTypedef)
- type = type->t_typedef.type;
+ type = type->u.t_typedef.type;
}
@@ -826,7 +826,7 @@ Char *VG_(describe_addr)(ThreadId tid, A
if (debug)
- VG_(printf)(" %d fields\n", type->t_struct.nfield);
- for(i = 0; i < type->t_struct.nfield; i++) {
- StField *f = &type->t_struct.fields[i];
+ VG_(printf)(" %d fields\n", type->u.t_struct.nfield);
+ for(i = 0; i < type->u.t_struct.nfield; i++) {
+ StField *f = &type->u.t_struct.fields[i];
newvar(f->name, f->type, var->valuep + (f->offset / 8), (f->size + 7) / 8);
}
@@ -838,10 +838,10 @@ Char *VG_(describe_addr)(ThreadId tid, A
Int offset; /* offset of index for non-0-based arrays */
Int min, max; /* range of indicies we care about (0 based) */
- SymType *ty = type->t_array.type;
- vg_assert(type->t_array.idxtype->kind == TyRange);
+ SymType *ty = type->u.t_array.type;
+ vg_assert(type->u.t_array.idxtype->kind == TyRange);
- offset = type->t_array.idxtype->t_range.min;
+ offset = type->u.t_array.idxtype->u.t_range.min;
min = 0;
- max = type->t_array.idxtype->t_range.max - offset;
+ max = type->u.t_array.idxtype->u.t_range.max - offset;
if ((max-min+1) == 0) {
@@ -894,5 +894,5 @@ Char *VG_(describe_addr)(ThreadId tid, A
actually a decayed array, and treat it accordingly */
if (is_valid_addr(var->valuep))
- newvar(NULL, type->t_pointer.type, *(Addr *)var->valuep, -1);
+ newvar(NULL, type->u.t_pointer.type, *(Addr *)var->valuep, -1);
break;
|
|
From: Jeremy F. <je...@go...> - 2004-01-06 00:18:54
|
CVS commit by fitzhardinge:
Make --gdb-attach=yes work properly; rather than trying to attach gdb
to itself, Valgrind forks a child, and uses ptrace to manipulate its
state into what the client state would be at that point, and attaches
gdb to that. In addition to giving gdb clean state to inspect, it
also stops mistakes in gdb (eg, continuing) from killing your target.
It also makes gdb strictly read-only; any state changes made from within
gdb will not be reflected in the running client. Patch from Tom Hughes.
M +2 -15 vg_errcontext.c 1.49
M +2 -10 vg_include.h 1.167
M +87 -21 vg_main.c 1.137
M +1 -2 vg_signals.c 1.56
M +0 -82 vg_startup.S 1.22
--- valgrind/coregrind/vg_errcontext.c #1.48:1.49
@@ -254,19 +254,6 @@ void do_actions_on_error(Error* err, Boo
VG_(is_action_requested)( "Attach to GDB", & VG_(clo_GDB_attach) ))
{
- Addr m_eip, m_esp, m_ebp;
-
- if (VG_(is_running_thread)( err->tid )) {
- m_eip = VG_(baseBlock)[VGOFF_(m_eip)];
- m_esp = VG_(baseBlock)[VGOFF_(m_esp)];
- m_ebp = VG_(baseBlock)[VGOFF_(m_ebp)];
- } else {
- ThreadState* tst = & VG_(threads)[ err->tid ];
- m_eip = tst->m_eip;
- m_esp = tst->m_esp;
- m_ebp = tst->m_ebp;
- }
- VG_(printf)("starting gdb with eip=%p esp=%p ebp=%p\n",
- m_eip, m_esp, m_ebp);
- VG_(swizzle_esp_then_start_GDB)( m_eip, m_esp, m_ebp );
+ VG_(printf)("starting gdb\n");
+ VG_(start_GDB)( err->tid );
}
/* Or maybe we want to generate the error's suppression? */
--- valgrind/coregrind/vg_include.h #1.166:1.167
@@ -1451,9 +1451,6 @@ extern Addr VG_(sysinfo_page_addr);
extern void VG_(mash_colon_env)(Char *varp, const Char *pattern);
-/* Something of a function looking for a home ... start up GDB. This
- is called from VG_(swizzle_esp_then_start_GDB) and so runs on the
- *client's* stack. This is necessary to give GDB the illusion that
- the client program really was running on the real cpu. */
-extern void VG_(start_GDB_whilst_on_client_stack) ( void );
+/* Something of a function looking for a home ... start up GDB. */
+extern void VG_(start_GDB) ( Int tid );
/* VG_(bbs_done) in include/vg_skin.h */
@@ -1683,9 +1680,4 @@ extern Int VG_(clone) ( Int (*fn)(void *
extern void VG_(switch_to_real_CPU) ( void );
-extern void VG_(swizzle_esp_then_start_GDB) ( Addr m_eip_at_error,
- Addr m_esp_at_error,
- Addr m_ebp_at_error );
-
-
/* ---------------------------------------------------------------------
Exports of vg_dispatch.S
--- valgrind/coregrind/vg_main.c #1.136:1.137
@@ -32,4 +32,11 @@
#include "vg_include.h"
+#include <stdlib.h>
+#include <sys/ptrace.h>
+#include <sys/signal.h>
+#include <sys/user.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
/* ---------------------------------------------------------------------
Compute offsets into baseBlock. See comments in vg_include.h.
@@ -1746,16 +1753,70 @@ void VG_(mash_colon_env)(Char *varp, con
}
-/* RUNS ON THE CLIENT'S STACK, but on the real CPU. Start GDB and get
- it to attach to this process. Called if the user requests this
- service after an error has been shown, so she can poke around and
- look at parameters, memory, etc. You can't meaningfully get GDB to
- continue the program, though; to continue, quit GDB. */
-void VG_(start_GDB_whilst_on_client_stack) ( void )
+/* Start GDB and get it to attach to this process. Called if the user
+ requests this service after an error has been shown, so she can
+ poke around and look at parameters, memory, etc. You can't
+ meaningfully get GDB to continue the program, though; to continue,
+ quit GDB. */
+void VG_(start_GDB) ( Int tid )
{
+ Int pid;
+
+ if ((pid = fork()) == 0)
+ {
+ ptrace(PTRACE_TRACEME, 0, NULL, NULL);
+ VG_(kkill)(VG_(getpid)(), VKI_SIGSTOP);
+ }
+ else if (pid > 0)
+ {
+ struct user_regs_struct regs;
+ Int status;
Int res;
- UChar buf[100];
+
+ if (VG_(is_running_thread)( tid )) {
+ regs.xcs = VG_(baseBlock)[VGOFF_(m_cs)];
+ regs.xss = VG_(baseBlock)[VGOFF_(m_ss)];
+ regs.xds = VG_(baseBlock)[VGOFF_(m_ds)];
+ regs.xes = VG_(baseBlock)[VGOFF_(m_es)];
+ regs.xfs = VG_(baseBlock)[VGOFF_(m_fs)];
+ regs.xgs = VG_(baseBlock)[VGOFF_(m_gs)];
+ regs.eax = VG_(baseBlock)[VGOFF_(m_eax)];
+ regs.ebx = VG_(baseBlock)[VGOFF_(m_ebx)];
+ regs.ecx = VG_(baseBlock)[VGOFF_(m_ecx)];
+ regs.edx = VG_(baseBlock)[VGOFF_(m_edx)];
+ regs.esi = VG_(baseBlock)[VGOFF_(m_esi)];
+ regs.edi = VG_(baseBlock)[VGOFF_(m_edi)];
+ regs.ebp = VG_(baseBlock)[VGOFF_(m_ebp)];
+ regs.esp = VG_(baseBlock)[VGOFF_(m_esp)];
+ regs.eflags = VG_(baseBlock)[VGOFF_(m_eflags)];
+ regs.eip = VG_(baseBlock)[VGOFF_(m_eip)];
+ } else {
+ ThreadState* tst = & VG_(threads)[ tid ];
+
+ regs.xcs = tst->m_cs;
+ regs.xss = tst->m_ss;
+ regs.xds = tst->m_ds;
+ regs.xes = tst->m_es;
+ regs.xfs = tst->m_fs;
+ regs.xgs = tst->m_gs;
+ regs.eax = tst->m_eax;
+ regs.ebx = tst->m_ebx;
+ regs.ecx = tst->m_ecx;
+ regs.edx = tst->m_edx;
+ regs.esi = tst->m_esi;
+ regs.edi = tst->m_edi;
+ regs.ebp = tst->m_ebp;
+ regs.esp = tst->m_esp;
+ regs.eflags = tst->m_eflags;
+ regs.eip = tst->m_eip;
+ }
+
+ if ((res = VG_(waitpid)(pid, &status, 0)) == pid &&
+ WIFSTOPPED(status) && WSTOPSIG(status) == SIGSTOP &&
+ ptrace(PTRACE_SETREGS, pid, NULL, ®s) == 0 &&
+ ptrace(PTRACE_DETACH, pid, NULL, SIGSTOP) == 0) {
+ UChar buf[VG_(strlen)(VG_(clo_GDB_path)) + 100];
VG_(sprintf)(buf, "%s -nw /proc/%d/fd/%d %d",
- VG_(clo_GDB_path), VG_(getpid)(), VG_(clexecfd), VG_(getpid)());
+ VG_(clo_GDB_path), VG_(main_pid), VG_(clexecfd), pid);
VG_(message)(Vg_UserMsg, "starting GDB with cmd: %s", buf);
res = VG_(system)(buf);
@@ -1768,4 +1829,9 @@ void VG_(start_GDB_whilst_on_client_stac
VG_(message)(Vg_UserMsg, "");
}
+ }
+
+ VG_(kkill)(pid, VKI_SIGKILL);
+ VG_(waitpid)(pid, &status, 0);
+ }
}
--- valgrind/coregrind/vg_signals.c #1.55:1.56
@@ -1393,6 +1393,5 @@ static void vg_default_action(const vki_
if (VG_(is_action_requested)( "Attach to GDB", & VG_(clo_GDB_attach) )) {
- ThreadState* tst = & VG_(threads)[ tid ];
- VG_(swizzle_esp_then_start_GDB)( tst->m_eip, tst->m_esp, tst->m_ebp );
+ VG_(start_GDB)( tid );
}
--- valgrind/coregrind/vg_startup.S #1.21:1.22
@@ -81,86 +81,4 @@
-/*------------------------------------------------------------*/
-/*--- A function to temporarily copy %ESP/%EBP into ---*/
-/*--- %esp/%ebp and then start up GDB. ---*/
-/*------------------------------------------------------------*/
-
-/*
-extern void VG_(swizzle_esp_then_start_GDB) ( Addr m_eip_at_error,
- Addr m_esp_at_error,
- Addr m_ebp_at_error );
-*/
-
-/*--- This is clearly not re-entrant! ---*/
-.data
-vg_ebp_saved_over_GDB_start:
- .long 0
-vg_esp_saved_over_GDB_start:
- .long 0
-.text
-
-.type VG_(swizzle_esp_then_start_GDB),@function
-.global VG_(swizzle_esp_then_start_GDB)
-VG_(swizzle_esp_then_start_GDB):
-#ifdef HAVE_GAS_CFI
- .cfi_startproc
-#endif
- pushal
-
- # remember the simulators current stack/frame pointers
- movl %ebp, vg_ebp_saved_over_GDB_start
- movl %esp, vg_esp_saved_over_GDB_start
-
- # get args into regs
- movl 44(%esp), %eax # client %EBP
- movl 40(%esp), %ebx # client %ESP
- movl 36(%esp), %ecx # client %EIP
-
- # Now that we dont need to refer to simulators stack any more,
- # put %ESP into %esp
- movl %ebx, %esp
-
- ### %esp now refers to clients stack
- ### mess with the clients stack to make it look as if it
- ### called this procedure, since otherwise it will look to gdb
- ### as if the top (currently executing) stack frame of the
- ### client is missing.
-
- # push %EIP. This is a faked-up return address.
- pushl %ecx
-
- # push %EBP. This is a faked %ebp-chain pointer.
- pushl %eax
-#ifdef HAVE_GAS_CFI
- .cfi_adjust_cfa_offset 0x4
-#endif
-
- movl %esp, %ebp
-#ifdef HAVE_GAS_CFI
- .cfi_def_cfa_register ebp
-#endif
-
- call VG_(start_GDB_whilst_on_client_stack)
-
- # restore the simulators stack/frame pointer
- movl vg_ebp_saved_over_GDB_start, %ebp
- movl vg_esp_saved_over_GDB_start, %esp
-#ifdef HAVE_GAS_CFI
- .cfi_adjust_cfa_offset -0x4
-#endif
-
- popal
- ret
-#ifdef HAVE_GAS_CFI
- .cfi_endproc
-#endif
-
-# gcc puts this construction at the end of every function. I think it
-# allows the linker to figure out the size of the function. So we do
-# the same, in the vague hope that it might help GDBs navigation.
-.Lend_of_swizzle:
- .size VG_(swizzle_esp_then_start_GDB), .Lend_of_swizzle-VG_(swizzle_esp_then_start_GDB)
-
-
##--------------------------------------------------------------------##
##--- end vg_startup.S ---##
|
|
From: Jeremy F. <je...@go...> - 2004-01-06 00:16:00
|
CVS commit by fitzhardinge:
Move logfile fd into safe range.
M +1 -1 vg_main.c 1.136
--- valgrind/coregrind/vg_main.c #1.135:1.136
@@ -1069,5 +1069,5 @@ static void process_cmd_line_options ( c
VKI_S_IRUSR|VKI_S_IWUSR);
if (eventually_logfile_fd >= 0) {
- VG_(clo_logfile_fd) = eventually_logfile_fd;
+ VG_(clo_logfile_fd) = VG_(safe_fd)(eventually_logfile_fd);
break;
} else {
|