Sweden-Number/dlls/dbghelp
Eric Pouech 99c7818097 dbghelp: Introduce symt_find_symbol_at().
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: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-04 21:27:25 +02:00
..
tests dbghelp/tests: Enable compilation with long types. 2022-02-24 20:22:21 +01:00
Makefile.in dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
coff.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
cpu_arm.c
cpu_arm64.c dbghelp: Ensure all adresses are stored at least in DWORD_PTR. 2021-09-10 20:22:11 +02:00
cpu_i386.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
cpu_x86_64.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
dbghelp.c dbghelp: Introduce symt_find_symbol_at(). 2022-05-04 21:27:25 +02:00
dbghelp.spec dbghelp: Implement SymEnumTypesByName(W). 2021-12-10 22:00:17 +01:00
dbghelp_private.h dbghelp: Introduce symt_find_symbol_at(). 2022-05-04 21:27:25 +02:00
dwarf.c dbghelp: Introduce symt_find_symbol_at(). 2022-05-04 21:27:25 +02:00
dwarf.h dbghelp/dwarf: Add definitions of some GNU extensions for FORMs. 2021-09-14 21:35:52 +02:00
elf_module.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
image.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
image_private.h dbghelp: Added support for locating a .dwz file (GNU extension) attached to a debug file. 2021-09-16 22:22:44 +02:00
macho_module.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
minidump.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
module.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
msc.c dbghelp: Introduce symt_find_symbol_at(). 2022-05-04 21:27:25 +02:00
path.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
pe_module.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
source.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
stabs.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
stack.c dbghelp: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
storage.c
symbol.c dbghelp: Introduce symt_find_symbol_at(). 2022-05-04 21:27:25 +02:00
type.c dbghelp: Implement SymEnumTypesByName(W). 2021-12-10 22:00:17 +01:00
version.rc
wdbgexts.h