Yao Zhao(deleted)
10/30/2007 10:03 AM
post2348
|
add this "||mapinfos[i].flags & MAP_ELF" first then
1.============
for(seg = 0, i = 0; i < num; i++) {
if(!(mapinfos[i].flags & PG_HWMAPPED) ||
(nodumpmem && !(mapinfos[i].flags & MAP_STACK
||mapinfos[i].flags & MAP_ELF)) ) {
continue;
}
if ( (nodumpphys && (mapinfos[i].flags & MAP_PHYS) && !(mapinfos[i].flags & MAP_ANON)) ) {
continue;
}
/* if we only want to dump the offending tid's stack */
if(cur_tid_only && (mapinfos[i].flags & MAP_STACK) &&
!OFFENDING_THREAD(cur_tid_base, cur_tid_size, &mapinfos[i])) {
continue;
}
memcpy(&mem[seg], &mapinfos[i], sizeof(*mem));
seg++;
}
2.==============
add || mem[j].flags & MAP_ELF
for ( j = 0; j < seg; j++ ) {
if ( lseek( fd, mem[j].vaddr, SEEK_SET ) == -1 )
goto bailout;
if ( mem[j].flags & MAP_STACK || mem[j].flags & MAP_ELF)
dump_stack_memory( fd, fp, &mem[j], &coresize );
else
if (!nodumpmem)
dump_memory( fd, fp, &mem[j], &coresize );
}
this should work.
if this doesn't work then it is possible that some areas we dumped twice, take a look dump_stack_memory should tell us.
|
|
|