Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
1bd693b1
Commit
1bd693b1
authored
13 years ago
by
eric pouech
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
winedbg: Enhance algorithm to look up for memory data inside a minidump.
parent
a672a51c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
programs/winedbg/tgt_minidump.c
+30
-9
30 additions, 9 deletions
programs/winedbg/tgt_minidump.c
with
30 additions
and
9 deletions
programs/winedbg/tgt_minidump.c
+
30
−
9
View file @
1bd693b1
...
...
@@ -103,22 +103,43 @@ static BOOL tgt_process_minidump_read(HANDLE hProcess, const void* addr,
{
MINIDUMP_MEMORY_LIST
*
mml
=
stream
;
MINIDUMP_MEMORY_DESCRIPTOR
*
mmd
=
&
mml
->
MemoryRanges
[
0
];
int
i
;
int
i
,
found
=
-
1
;
SIZE_T
ilen
,
prev_len
=
0
;
/* There's no reason that memory ranges inside a minidump do not overlap.
* So be smart when looking for a given memory range (either grab a
* range that covers the whole requested area, or if none, the range that
* has the largest overlap with requested area)
*/
for
(
i
=
0
;
i
<
mml
->
NumberOfMemoryRanges
;
i
++
,
mmd
++
)
{
if
(
get_addr64
(
mmd
->
StartOfMemoryRange
)
<=
(
DWORD_PTR
)
addr
&&
(
DWORD_PTR
)
addr
<
get_addr64
(
mmd
->
StartOfMemoryRange
)
+
mmd
->
Memory
.
DataSize
)
{
len
=
min
(
len
,
get_addr64
(
mmd
->
StartOfMemoryRange
)
+
mmd
->
Memory
.
DataSize
-
(
DWORD_PTR
)
addr
);
memcpy
(
buffer
,
(
char
*
)
private_data
(
dbg_curr_process
)
->
mapping
+
mmd
->
Memory
.
Rva
+
(
DWORD_PTR
)
addr
-
get_addr64
(
mmd
->
StartOfMemoryRange
),
len
);
if
(
rlen
)
*
rlen
=
len
;
return
TRUE
;
ilen
=
min
(
len
,
get_addr64
(
mmd
->
StartOfMemoryRange
)
+
mmd
->
Memory
.
DataSize
-
(
DWORD_PTR
)
addr
);
if
(
ilen
==
len
)
/* whole range is matched */
{
found
=
i
;
prev_len
=
ilen
;
break
;
}
if
(
found
==
-
1
||
ilen
>
prev_len
)
/* partial match, keep largest one */
{
found
=
i
;
prev_len
=
ilen
;
}
}
}
if
(
found
!=
-
1
)
{
mmd
=
&
mml
->
MemoryRanges
[
found
];
memcpy
(
buffer
,
(
char
*
)
private_data
(
dbg_curr_process
)
->
mapping
+
mmd
->
Memory
.
Rva
+
(
DWORD_PTR
)
addr
-
get_addr64
(
mmd
->
StartOfMemoryRange
),
prev_len
);
if
(
rlen
)
*
rlen
=
prev_len
;
return
TRUE
;
}
}
/* FIXME: this is a dirty hack to let the last frame in a bt to work
* However, we need to check who's to blame, this code or the current
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment