[winedbg] info share
Eric Pouech
pouech-eric at wanadoo.fr
Sun Feb 22 14:02:44 CST 2004
The info share had been broken for some time (after that PE modules
return correct size)
This patch fixes this by 1/ fixing the computation of the ELF modules
image in memory, 2/ fixing the conditions for the PE -> ELF inclusion
(for native PE modules)
A+
-------------- next part --------------
Name: wd_emi
ChangeLog:
- fixed ELF modules' size information
- fixed containers' tests
License: X11
GenDate: 2004/02/22 19:59:52 UTC
ModifiedFiles: programs/winedbg/module.c programs/winedbg/elf.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/programs/winedbg/module.c,v
retrieving revision 1.6
diff -u -u -r1.6 module.c
--- programs/winedbg/module.c 3 Feb 2004 00:14:12 -0000 1.6
+++ programs/winedbg/module.c 22 Feb 2004 15:18:49 -0000
@@ -361,8 +361,8 @@
static inline BOOL DEBUG_IsContainer(const DBG_MODULE* wmod_cntnr,
const DBG_MODULE* wmod_child)
{
- return wmod_cntnr->load_addr < wmod_child->load_addr &&
- (DWORD)wmod_cntnr->load_addr + wmod_cntnr->size >
+ return wmod_cntnr->load_addr <= wmod_child->load_addr &&
+ (DWORD)wmod_cntnr->load_addr + wmod_cntnr->size >=
(DWORD)wmod_child->load_addr + wmod_child->size;
}
Index: programs/winedbg/elf.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/programs/winedbg/elf.c,v
retrieving revision 1.2
diff -u -u -r1.2 elf.c
--- programs/winedbg/elf.c 5 Feb 2004 01:27:38 -0000 1.2
+++ programs/winedbg/elf.c 22 Feb 2004 15:21:29 -0000
@@ -345,18 +345,12 @@
for (i = 0; i < ehptr->e_phnum; i++)
{
if (ppnt[i].p_type != PT_LOAD) continue;
- if (elf_info->size < ppnt[i].p_vaddr - delta + ppnt[i].p_memsz)
- elf_info->size = ppnt[i].p_vaddr - delta + ppnt[i].p_memsz;
+ elf_info->size += (ppnt[i].p_align <= 1) ? ppnt[i].p_memsz :
+ (ppnt[i].p_memsz + ppnt[i].p_align - 1) & ~(ppnt[i].p_align - 1);
}
for (i = 0; i < ehptr->e_shnum; i++)
{
- if (strcmp(shstrtab + spnt[i].sh_name, ".bss") == 0 &&
- spnt[i].sh_type == SHT_NOBITS)
- {
- if (elf_info->size < spnt[i].sh_addr - delta + spnt[i].sh_size)
- elf_info->size = spnt[i].sh_addr - delta + spnt[i].sh_size;
- }
if (strcmp(shstrtab + spnt[i].sh_name, ".dynamic") == 0 &&
spnt[i].sh_type == SHT_DYNAMIC)
{
More information about the wine-patches
mailing list