2025-04-18 21:34:35 +03:00
|
|
|
namespace X86Disassembler.Analysers;
|
2025-04-18 16:29:53 +03:00
|
|
|
|
2025-04-18 21:34:35 +03:00
|
|
|
/// <summary>
|
|
|
|
/// Represents a disassembled function with its control flow graph
|
|
|
|
/// </summary>
|
2025-04-18 16:29:53 +03:00
|
|
|
public class AsmFunction
|
|
|
|
{
|
2025-04-18 21:34:35 +03:00
|
|
|
/// <summary>
|
|
|
|
/// The starting address of the function
|
|
|
|
/// </summary>
|
2025-04-18 16:29:53 +03:00
|
|
|
public ulong Address { get; set; }
|
|
|
|
|
2025-04-18 21:34:35 +03:00
|
|
|
/// <summary>
|
|
|
|
/// The list of basic blocks that make up the function
|
|
|
|
/// </summary>
|
|
|
|
public List<InstructionBlock> Blocks { get; set; } = [];
|
2025-04-18 16:29:53 +03:00
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
{
|
2025-04-19 02:12:46 +03:00
|
|
|
return $"{Address:X8}\n{string.Join("\n", Blocks)}";
|
2025-04-18 16:29:53 +03:00
|
|
|
}
|
|
|
|
}
|