Rationale:
- native doesn't report names for SymTagBaseType objects
=> so remove typename for sym_basic
- since symt_basic becomes pretty simple, it's possible to share the object
across all modules loaded in dbghelp (simplicity, memory usage reduction)
- removed dwarf basic types cache in dwarf.c as we now have a generic one
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
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>
Some internal bits of PDB files are different, so report & abort loading of
such PDB file until it's properly understood & supported (instead of
crashing).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Reading gecko's PDB generate a lot of those.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Fixes a crash when starting kernrate.exe.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Dwarf4 clarified that only FORM_sec_offset can refer to location
lists, fix dwarf2_compute_location_attr accordingly.
This fixes the 'fixme:dwarf2_parse_udt_member: Found register, while
not expecting it' messages.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
They shouldn't fail if passed address is inside a module, even if it
doesn't point to a function.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
gcc can emit functions with code spread across non contiguous code areas.
We used to register those functions with an address range enclosing all ranges
(meaning that all addresses not actually belonging to the function but
lying in that address range could be returned by dbghelp as belonging
to the function).
Work around this by registering the function with only the first range
of addresses (this will avoid the errors described above), but will
fail to mark the other address ranges as part of the function.
dbghelp doesn't seem to have explicit support of those cases, even if
pdb/codeview also support functions with multi range of addresses
(see S_SEPCODE).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Use it to reimplement dwarf2_feed_inlined_ranges.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Old version of PDB files can have a stream #4 which is not an IPI stream
Available documentation isn't 100% clear about when IPI has been
introduced.
So decide that IPI is present when header of stream looks like a type
stream header.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Requires to join DEBUG_S_INLINEES subsection with symbol annotations.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>