Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
aac77c98
Commit
aac77c98
authored
Feb 21, 2007
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 22, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Added an ANSI copy of the module name (useful for next patches).
parent
33c8ffc3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
40 deletions
+45
-40
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+5
-1
dwarf.c
dlls/dbghelp/dwarf.c
+4
-4
elf_module.c
dlls/dbghelp/elf_module.c
+12
-12
module.c
dlls/dbghelp/module.c
+4
-3
msc.c
dlls/dbghelp/msc.c
+1
-1
pe_module.c
dlls/dbghelp/pe_module.c
+1
-1
symbol.c
dlls/dbghelp/symbol.c
+17
-17
type.c
dlls/dbghelp/type.c
+1
-1
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
aac77c98
...
...
@@ -311,12 +311,16 @@ struct process;
struct
module
{
IMAGEHLP_MODULE64
module
;
/* ANSI copy of module.ModuleName for efficiency */
char
module_name
[
MAX_PATH
];
struct
module
*
next
;
enum
module_type
type
:
16
;
unsigned
short
is_virtual
:
1
;
/* specific information for debug types */
struct
elf_module_info
*
elf_info
;
struct
dwarf2_module_info_s
*
dwarf2_info
;
/* memory allocation pool */
struct
pool
pool
;
...
...
dlls/dbghelp/dwarf.c
View file @
aac77c98
...
...
@@ -328,12 +328,12 @@ static const char* dwarf2_debug_traverse_ctx(const dwarf2_traverse_context_t* ct
return
wine_dbg_sprintf
(
"ctx(%p)"
,
ctx
->
data
);
}
static
const
char
*
dwarf2_debug_ctx
(
const
dwarf2_parse_context_t
*
ctx
)
static
const
char
*
dwarf2_debug_ctx
(
const
dwarf2_parse_context_t
*
ctx
)
{
return
wine_dbg_sprintf
(
"ctx(%p,%s)"
,
ctx
,
ctx
->
module
->
module
.
ModuleN
ame
);
return
wine_dbg_sprintf
(
"ctx(%p,%s)"
,
ctx
,
ctx
->
module
->
module
_n
ame
);
}
static
const
char
*
dwarf2_debug_di
(
const
dwarf2_debug_info_t
*
di
)
static
const
char
*
dwarf2_debug_di
(
const
dwarf2_debug_info_t
*
di
)
{
return
wine_dbg_sprintf
(
"debug_info(abbrev:%p,symt:%p)"
,
di
->
abbrev
,
di
->
symt
);
...
...
@@ -1749,7 +1749,7 @@ static void dwarf2_set_line_number(struct module* module, unsigned long address,
if
(
!
file
||
!
(
psrc
=
vector_at
(
v
,
file
-
1
)))
return
;
TRACE
(
"%s %lx %s %u
\n
"
,
module
->
module
.
ModuleN
ame
,
address
,
source_get
(
module
,
*
psrc
),
line
);
TRACE
(
"%s %lx %s %u
\n
"
,
module
->
module
_n
ame
,
address
,
source_get
(
module
,
*
psrc
),
line
);
if
(
!
(
symt
=
symt_find_nearest
(
module
,
address
))
||
symt
->
symt
.
tag
!=
SymTagFunction
)
return
;
func
=
(
struct
symt_function
*
)
symt
;
...
...
dlls/dbghelp/elf_module.c
View file @
aac77c98
...
...
@@ -453,8 +453,8 @@ static const Elf32_Sym* elf_lookup_symtab(const struct module* module,
}
if
(
!
result
&&
!
(
result
=
weak_result
))
{
FIXME
(
"Couldn't find symbol %s!%s in symtab
\n
"
,
module
->
module
.
ModuleN
ame
,
name
);
FIXME
(
"Couldn't find symbol %s!%s in symtab
\n
"
,
module
->
module
_n
ame
,
name
);
return
NULL
;
}
return
result
->
symp
;
...
...
@@ -491,18 +491,18 @@ static void elf_finish_stabs_info(struct module* module, struct hash_table* symt
{
if
(((
struct
symt_function
*
)
sym
)
->
address
!=
module
->
elf_info
->
elf_addr
&&
((
struct
symt_function
*
)
sym
)
->
address
!=
module
->
elf_info
->
elf_addr
+
symp
->
st_value
)
FIXME
(
"Changing address for %p/%s!%s from %08lx to %08lx
\n
"
,
sym
,
module
->
module
.
ModuleName
,
sym
->
hash_elt
.
name
,
FIXME
(
"Changing address for %p/%s!%s from %08lx to %08lx
\n
"
,
sym
,
module
->
module
_name
,
sym
->
hash_elt
.
name
,
((
struct
symt_function
*
)
sym
)
->
address
,
module
->
elf_info
->
elf_addr
+
symp
->
st_value
);
if
(((
struct
symt_function
*
)
sym
)
->
size
&&
((
struct
symt_function
*
)
sym
)
->
size
!=
symp
->
st_size
)
FIXME
(
"Changing size for %p/%s!%s from %08lx to %08x
\n
"
,
sym
,
module
->
module
.
ModuleN
ame
,
sym
->
hash_elt
.
name
,
FIXME
(
"Changing size for %p/%s!%s from %08lx to %08x
\n
"
,
sym
,
module
->
module
_n
ame
,
sym
->
hash_elt
.
name
,
((
struct
symt_function
*
)
sym
)
->
size
,
symp
->
st_size
);
((
struct
symt_function
*
)
sym
)
->
address
=
module
->
elf_info
->
elf_addr
+
symp
->
st_value
;
((
struct
symt_function
*
)
sym
)
->
size
=
symp
->
st_size
;
}
else
FIXME
(
"Couldn't find %s!%s
\n
"
,
module
->
module
.
ModuleN
ame
,
sym
->
hash_elt
.
name
);
}
else
FIXME
(
"Couldn't find %s!%s
\n
"
,
module
->
module
_n
ame
,
sym
->
hash_elt
.
name
);
break
;
case
SymTagData
:
switch
(((
struct
symt_data
*
)
sym
)
->
kind
)
...
...
@@ -517,14 +517,14 @@ static void elf_finish_stabs_info(struct module* module, struct hash_table* symt
{
if
(((
struct
symt_data
*
)
sym
)
->
u
.
var
.
offset
!=
module
->
elf_info
->
elf_addr
&&
((
struct
symt_data
*
)
sym
)
->
u
.
var
.
offset
!=
module
->
elf_info
->
elf_addr
+
symp
->
st_value
)
FIXME
(
"Changing address for %p/%s!%s from %08lx to %08lx
\n
"
,
sym
,
module
->
module
.
ModuleName
,
sym
->
hash_elt
.
name
,
FIXME
(
"Changing address for %p/%s!%s from %08lx to %08lx
\n
"
,
sym
,
module
->
module
_name
,
sym
->
hash_elt
.
name
,
((
struct
symt_function
*
)
sym
)
->
address
,
module
->
elf_info
->
elf_addr
+
symp
->
st_value
);
((
struct
symt_data
*
)
sym
)
->
u
.
var
.
offset
=
module
->
elf_info
->
elf_addr
+
symp
->
st_value
;
((
struct
symt_data
*
)
sym
)
->
kind
=
(
ELF32_ST_BIND
(
symp
->
st_info
)
==
STB_LOCAL
)
?
DataIsFileStatic
:
DataIsGlobal
;
}
else
FIXME
(
"Couldn't find %s!%s
\n
"
,
module
->
module
.
ModuleN
ame
,
sym
->
hash_elt
.
name
);
}
else
FIXME
(
"Couldn't find %s!%s
\n
"
,
module
->
module
_n
ame
,
sym
->
hash_elt
.
name
);
break
;
default:
;
}
...
...
@@ -619,7 +619,7 @@ static int elf_new_wine_thunks(struct module* module, struct hash_table* ht_symt
if
((
xsize
||
ste
->
symp
->
st_size
)
&&
(
kind
==
(
ELF32_ST_BIND
(
ste
->
symp
->
st_info
)
==
STB_LOCAL
)
?
DataIsFileStatic
:
DataIsGlobal
))
FIXME
(
"Duplicate in %s: %s<%08x-%08x> %s<%s-%s>
\n
"
,
module
->
module
.
ModuleN
ame
,
module
->
module
_n
ame
,
ste
->
ht_elt
.
name
,
addr
,
ste
->
symp
->
st_size
,
symt
->
hash_elt
.
name
,
wine_dbgstr_longlong
(
xaddr
),
wine_dbgstr_longlong
(
xsize
));
...
...
@@ -1014,7 +1014,7 @@ static BOOL elf_load_debug_info_from_map(struct module* module,
const
BYTE
*
dw2_debug_line
;
const
BYTE
*
dw2_debug_loclist
;
TRACE
(
"Loading Dwarf2 information for %s
\n
"
,
module
->
module
.
ModuleN
ame
);
TRACE
(
"Loading Dwarf2 information for %s
\n
"
,
module
->
module
_n
ame
);
dw2_debug
=
(
const
BYTE
*
)
elf_map_section
(
fmap
,
debug_sect
);
dw2_debug_abbrev
=
(
const
BYTE
*
)
elf_map_section
(
fmap
,
debug_abbrev_sect
);
...
...
dlls/dbghelp/module.c
View file @
aac77c98
...
...
@@ -82,6 +82,7 @@ static void module_fill_module(const char* in, char* out, size_t size)
void
module_set_module
(
struct
module
*
module
,
const
char
*
name
)
{
module_fill_module
(
name
,
module
->
module
.
ModuleName
,
sizeof
(
module
->
module
.
ModuleName
));
strcpy
(
module
->
module_name
,
module
->
module
.
ModuleName
);
}
static
const
char
*
get_module_type
(
enum
module_type
type
,
BOOL
virtual
)
...
...
@@ -519,7 +520,7 @@ BOOL module_remove(struct process* pcs, struct module* module)
{
struct
module
**
p
;
TRACE
(
"%s (%p)
\n
"
,
module
->
module
.
ModuleN
ame
,
module
);
TRACE
(
"%s (%p)
\n
"
,
module
->
module
_n
ame
,
module
);
hash_table_destroy
(
&
module
->
ht_symbols
);
hash_table_destroy
(
&
module
->
ht_types
);
HeapFree
(
GetProcessHeap
(),
0
,
(
char
*
)
module
->
sources
);
...
...
@@ -592,7 +593,7 @@ BOOL WINAPI SymEnumerateModules(HANDLE hProcess,
{
if
(
!
(
dbghelp_options
&
SYMOPT_WINE_WITH_ELF_MODULES
)
&&
module
->
type
==
DMT_ELF
)
continue
;
if
(
!
EnumModulesCallback
(
module
->
module
.
ModuleName
,
if
(
!
EnumModulesCallback
(
module
->
module
_name
,
module
->
module
.
BaseOfImage
,
UserContext
))
break
;
}
...
...
@@ -616,7 +617,7 @@ BOOL WINAPI SymEnumerateModules64(HANDLE hProcess,
{
if
(
!
(
dbghelp_options
&
SYMOPT_WINE_WITH_ELF_MODULES
)
&&
module
->
type
==
DMT_ELF
)
continue
;
if
(
!
EnumModulesCallback
(
module
->
module
.
ModuleName
,
if
(
!
EnumModulesCallback
(
module
->
module
_name
,
module
->
module
.
BaseOfImage
,
UserContext
))
break
;
}
...
...
dlls/dbghelp/msc.c
View file @
aac77c98
...
...
@@ -2417,7 +2417,7 @@ static BOOL codeview_process_info(const struct process* pcs,
}
default:
ERR
(
"Unknown CODEVIEW signature %.4s in module %s
\n
"
,
(
const
char
*
)
signature
,
msc_dbg
->
module
->
module
.
ModuleN
ame
);
(
const
char
*
)
signature
,
msc_dbg
->
module
->
module
_n
ame
);
break
;
}
if
(
ret
)
...
...
dlls/dbghelp/pe_module.c
View file @
aac77c98
...
...
@@ -178,7 +178,7 @@ static BOOL pe_load_msc_debug_info(const struct process* pcs,
misc
->
DataType
!=
IMAGE_DEBUG_MISC_EXENAME
)
{
WINE_ERR
(
"-Debug info stripped, but no .DBG file in module %s
\n
"
,
module
->
module
.
ModuleN
ame
);
module
->
module
_n
ame
);
}
else
{
...
...
dlls/dbghelp/symbol.c
View file @
aac77c98
...
...
@@ -130,8 +130,8 @@ struct symt_compiland* symt_new_compiland(struct module* module,
{
struct
symt_compiland
*
sym
;
TRACE_
(
dbghelp_symt
)(
"Adding compiland symbol %s:%s
\n
"
,
module
->
module
.
ModuleN
ame
,
source_get
(
module
,
src_idx
));
TRACE_
(
dbghelp_symt
)(
"Adding compiland symbol %s:%s
\n
"
,
module
->
module
_n
ame
,
source_get
(
module
,
src_idx
));
if
((
sym
=
pool_alloc
(
&
module
->
pool
,
sizeof
(
*
sym
))))
{
sym
->
symt
.
tag
=
SymTagCompiland
;
...
...
@@ -151,9 +151,9 @@ struct symt_public* symt_new_public(struct module* module,
struct
symt_public
*
sym
;
struct
symt
**
p
;
TRACE_
(
dbghelp_symt
)(
"Adding public symbol %s:%s @%lx
\n
"
,
module
->
module
.
ModuleN
ame
,
name
,
address
);
if
((
dbghelp_options
&
SYMOPT_AUTO_PUBLICS
)
&&
TRACE_
(
dbghelp_symt
)(
"Adding public symbol %s:%s @%lx
\n
"
,
module
->
module
_n
ame
,
name
,
address
);
if
((
dbghelp_options
&
SYMOPT_AUTO_PUBLICS
)
&&
symt_find_nearest
(
module
,
address
)
!=
NULL
)
return
NULL
;
if
((
sym
=
pool_alloc
(
&
module
->
pool
,
sizeof
(
*
sym
))))
...
...
@@ -186,8 +186,8 @@ struct symt_data* symt_new_global_variable(struct module* module,
struct
symt
**
p
;
DWORD64
tsz
;
TRACE_
(
dbghelp_symt
)(
"Adding global symbol %s:%s @%lx %p
\n
"
,
module
->
module
.
ModuleN
ame
,
name
,
addr
,
type
);
TRACE_
(
dbghelp_symt
)(
"Adding global symbol %s:%s @%lx %p
\n
"
,
module
->
module
_n
ame
,
name
,
addr
,
type
);
if
((
sym
=
pool_alloc
(
&
module
->
pool
,
sizeof
(
*
sym
))))
{
sym
->
symt
.
tag
=
SymTagData
;
...
...
@@ -202,7 +202,7 @@ struct symt_data* symt_new_global_variable(struct module* module,
{
if
(
tsz
!=
size
)
FIXME
(
"Size mismatch for %s.%s between type (%s) and src (%lu)
\n
"
,
module
->
module
.
ModuleName
,
name
,
module
->
module
_name
,
name
,
wine_dbgstr_longlong
(
tsz
),
size
);
}
if
(
compiland
)
...
...
@@ -223,8 +223,8 @@ struct symt_function* symt_new_function(struct module* module,
struct
symt_function
*
sym
;
struct
symt
**
p
;
TRACE_
(
dbghelp_symt
)(
"Adding global function %s:%s @%lx-%lx
\n
"
,
module
->
module
.
ModuleN
ame
,
name
,
addr
,
addr
+
size
-
1
);
TRACE_
(
dbghelp_symt
)(
"Adding global function %s:%s @%lx-%lx
\n
"
,
module
->
module
_n
ame
,
name
,
addr
,
addr
+
size
-
1
);
assert
(
!
sig_type
||
sig_type
->
tag
==
SymTagFunctionType
);
if
((
sym
=
pool_alloc
(
&
module
->
pool
,
sizeof
(
*
sym
))))
...
...
@@ -309,8 +309,8 @@ struct symt_data* symt_add_func_local(struct module* module,
struct
symt_data
*
locsym
;
struct
symt
**
p
;
TRACE_
(
dbghelp_symt
)(
"Adding local symbol (%s:%s): %s %p
\n
"
,
module
->
module
.
ModuleName
,
func
->
hash_elt
.
name
,
TRACE_
(
dbghelp_symt
)(
"Adding local symbol (%s:%s): %s %p
\n
"
,
module
->
module
_name
,
func
->
hash_elt
.
name
,
name
,
type
);
assert
(
func
);
...
...
@@ -424,8 +424,8 @@ struct symt_thunk* symt_new_thunk(struct module* module,
{
struct
symt_thunk
*
sym
;
TRACE_
(
dbghelp_symt
)(
"Adding global thunk %s:%s @%lx-%lx
\n
"
,
module
->
module
.
ModuleN
ame
,
name
,
addr
,
addr
+
size
-
1
);
TRACE_
(
dbghelp_symt
)(
"Adding global thunk %s:%s @%lx-%lx
\n
"
,
module
->
module
_n
ame
,
name
,
addr
,
addr
+
size
-
1
);
if
((
sym
=
pool_alloc
(
&
module
->
pool
,
sizeof
(
*
sym
))))
{
...
...
@@ -455,7 +455,7 @@ struct symt_data* symt_new_constant(struct module* module,
struct
symt_data
*
sym
;
TRACE_
(
dbghelp_symt
)(
"Adding constant value %s:%s
\n
"
,
module
->
module
.
ModuleN
ame
,
name
);
module
->
module
_n
ame
,
name
);
if
((
sym
=
pool_alloc
(
&
module
->
pool
,
sizeof
(
*
sym
))))
{
...
...
@@ -877,7 +877,7 @@ static BOOL sym_enum(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR Mask,
{
if
(
pair
.
requested
->
type
==
DMT_PE
&&
module_get_debug
(
&
pair
))
{
if
(
regexec
(
&
mod_regex
,
pair
.
requested
->
module
.
ModuleN
ame
,
0
,
NULL
,
0
)
==
0
&&
if
(
regexec
(
&
mod_regex
,
pair
.
requested
->
module
_n
ame
,
0
,
NULL
,
0
)
==
0
&&
symt_enum_module
(
&
pair
,
&
sym_regex
,
se
))
break
;
}
...
...
@@ -892,7 +892,7 @@ static BOOL sym_enum(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR Mask,
!
module_get_containee
(
pair
.
pcs
,
pair
.
requested
)
&&
module_get_debug
(
&
pair
))
{
if
(
regexec
(
&
mod_regex
,
pair
.
requested
->
module
.
ModuleN
ame
,
0
,
NULL
,
0
)
==
0
&&
if
(
regexec
(
&
mod_regex
,
pair
.
requested
->
module
_n
ame
,
0
,
NULL
,
0
)
==
0
&&
symt_enum_module
(
&
pair
,
&
sym_regex
,
se
))
break
;
}
...
...
dlls/dbghelp/type.c
View file @
aac77c98
...
...
@@ -164,7 +164,7 @@ struct symt_udt* symt_new_udt(struct module* module, const char* typename,
{
struct
symt_udt
*
sym
;
TRACE_
(
dbghelp_symt
)(
"Adding udt %s:%s
\n
"
,
module
->
module
.
ModuleN
ame
,
typename
);
TRACE_
(
dbghelp_symt
)(
"Adding udt %s:%s
\n
"
,
module
->
module
_n
ame
,
typename
);
if
((
sym
=
pool_alloc
(
&
module
->
pool
,
sizeof
(
*
sym
))))
{
sym
->
symt
.
tag
=
SymTagUDT
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment