Открыть боковую панель
Агарков Михаил Романович
ReactOS
Коммиты
555300d6
Коммит
555300d6
создал
Окт 01, 2017
по автору
Timo Kreuzer
Просмотр файлов
[RTL/x64] Support frames to skip in flags to RtlWalkFrameChain
svn path=/trunk/; revision=76019
владелец
37630ef0
Изменения
1
Скрыть пробелы
Построчно
Рядом
reactos/sdk/lib/rtl/amd64/unwind.c
Просмотр файла @
555300d6
...
...
@@ -524,11 +524,14 @@ RtlWalkFrameChain(OUT PVOID *Callers,
ULONG64
ControlPc
,
ImageBase
,
EstablisherFrame
;
ULONG64
StackLow
,
StackHigh
;
PVOID
HandlerData
;
ULONG
i
;
ULONG
i
,
FramesToSkip
;
PRUNTIME_FUNCTION
FunctionEntry
;
DPRINT
(
"Enter RtlWalkFrameChain
\n
"
);
/* The upper bits in Flags define how many frames to skip */
FramesToSkip
=
Flags
>>
8
;
/* Capture the current Context */
RtlCaptureContext
(
&
Context
);
ControlPc
=
Context
.
Rip
;
...
...
@@ -537,12 +540,12 @@ RtlWalkFrameChain(OUT PVOID *Callers,
RtlpGetStackLimits
(
&
StackLow
,
&
StackHigh
);
/* Check if we want the user-mode stack frame */
if
(
Flags
==
1
)
if
(
Flags
&
1
)
{
}
/* Loop the frames */
for
(
i
=
0
;
i
<
Count
;
i
++
)
for
(
i
=
0
;
i
<
FramesToSkip
+
Count
;
i
++
)
{
/* Lookup the FunctionEntry for the current ControlPc */
FunctionEntry
=
RtlLookupFunctionEntry
(
ControlPc
,
&
ImageBase
,
NULL
);
...
...
@@ -579,9 +582,14 @@ RtlWalkFrameChain(OUT PVOID *Callers,
break
;
}
/*
Save this frame and c
ontinue with new Rip */
/*
C
ontinue with new Rip */
ControlPc
=
Context
.
Rip
;
Callers
[
i
]
=
(
PVOID
)
ControlPc
;
/* Save value, if we are past the frames to skip */
if
(
i
>=
FramesToSkip
)
{
Callers
[
i
-
FramesToSkip
]
=
(
PVOID
)
ControlPc
;
}
}
DPRINT
(
"RtlWalkFrameChain returns %ld
\n
"
,
i
);
...
...
@@ -605,14 +613,8 @@ RtlGetCallersAddress(
* RtlWalkFrameChain -> RtlGetCallersAddress -> x -> y */
Number
=
RtlWalkFrameChain
(
Callers
,
4
,
0
);
if
(
CallersAddress
)
{
*
CallersAddress
=
(
Number
>=
3
)
?
Callers
[
2
]
:
NULL
;
}
if
(
CallersCaller
)
{
*
CallersCaller
=
(
Number
==
4
)
?
Callers
[
3
]
:
NULL
;
}
*
CallersAddress
=
(
Number
>=
3
)
?
Callers
[
2
]
:
NULL
;
*
CallersCaller
=
(
Number
==
4
)
?
Callers
[
3
]
:
NULL
;
return
;
}
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать