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>
|
|
|
|
|
|
|
|
|
|
#include "LibDebug/DebugSession.h"
|
|
|
|
|
|
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-06-19 15:33:03 +03:00
|
|
|
Optional<StackFrameInfo> get_info(DebugSession const&, FlatPtr current_ebp);
|
2020-08-21 12:27:15 +03:00
|
|
|
|
|
|
|
|
}
|