• Eric Pouech's avatar
    dbghelp: Introduce symt_find_symbol_at(). · 99c78180
    Eric Pouech authored
    To be used in place of symt_find_nearest().
    symt_find_symbol_at() ensures that the address passed is within the
    boundaries of the returned symbol (while find_nearest() doesn't).
    
    This fixes erroneous backtraces in debugger like:
    $ ./wine winedbg notepad
    WineDbg starting on pid 0104
    RtlDefaultNpAcl () at Z:\home\eric\work\wine\dlls\ntdll\sec.c:1731
    0x00000170054805 ntdll+0x54805 [Z:\home\eric\work\wine\dlls\ntdll\sec.c:1731]: ret
    1731    }
    Wine-dbg>bt
    Backtrace:
    =>0 0x00000170054805 RtlDefaultNpAcl+0x2d5(pAcl=<internal error>) [Z:\home\eric\work\wine\dlls\ntdll\sec.c:1731] in ntdll (0x000001700701a4)
      1 0x0000017002d6c4 __wine_pop_frame(pAcl=<internal error>) [Z:\home\eric\work\wine\include\wine\exception.h:273] in ntdll (0x000001700701a4)
      2 0x0000017002d6c4 process_breakpoint+0x84() [Z:\home\eric\work\wine\dlls\ntdll\loader.c:3912] in ntdll (0x000001700701a4)
      3 0x000001700354c9 LdrInitializeThunk+0x509(context=<register R13 not accessible in this frame>, unknown2=<internal error>, unknown3=<internal error>, unknown4=<internal error>) [Z:\home\eric\work\wine\dlls\ntdll\loader.c:4200] in ntdll (0x000001700701a4)
    
    where RtlDefaultNpAcl() has nothing to do here (it's the symbol below RIP
    and we don't have a symbol with debug information for that address).
    Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    99c78180
Name
Last commit
Last update
..
tests Loading commit data...
Makefile.in Loading commit data...
coff.c Loading commit data...
cpu_arm.c Loading commit data...
cpu_arm64.c Loading commit data...
cpu_i386.c Loading commit data...
cpu_x86_64.c Loading commit data...
dbghelp.c Loading commit data...
dbghelp.spec Loading commit data...
dbghelp_private.h Loading commit data...
dwarf.c Loading commit data...
dwarf.h Loading commit data...
elf_module.c Loading commit data...
image.c Loading commit data...
image_private.h Loading commit data...
macho_module.c Loading commit data...
minidump.c Loading commit data...
module.c Loading commit data...
msc.c Loading commit data...
path.c Loading commit data...
pe_module.c Loading commit data...
source.c Loading commit data...
stabs.c Loading commit data...
stack.c Loading commit data...
storage.c Loading commit data...
symbol.c Loading commit data...
type.c Loading commit data...
version.rc Loading commit data...
wdbgexts.h Loading commit data...