2020-08-21 12:27:15 +03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-21 12:27:15 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/Optional.h>
|
|
|
|
|
#include <AK/Types.h>
|
2022-09-14 00:56:13 +02:00
|
|
|
#include <LibDebug/DebugSession.h>
|
2020-08-21 12:27:15 +03:00
|
|
|
|
2020-08-25 04:33:07 +01:00
|
|
|
namespace Debug::StackFrameUtils {
|
|
|
|
|
|
2020-08-21 12:27:15 +03:00
|
|
|
struct StackFrameInfo {
|
|
|
|
|
FlatPtr return_address;
|
|
|
|
|
FlatPtr next_ebp;
|
|
|
|
|
};
|
|
|
|
|
|
2021-11-19 16:13:07 +02:00
|
|
|
Optional<StackFrameInfo> get_info(ProcessInspector const&, FlatPtr current_ebp);
|
2020-08-21 12:27:15 +03:00
|
|
|
|
|
|
|
|
}
|