summaryrefslogtreecommitdiff
path: root/Libraries/LibDebug/DebugInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibDebug/DebugInfo.h')
-rw-r--r--Libraries/LibDebug/DebugInfo.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Libraries/LibDebug/DebugInfo.h b/Libraries/LibDebug/DebugInfo.h
index de9de2ddff..9208dea102 100644
--- a/Libraries/LibDebug/DebugInfo.h
+++ b/Libraries/LibDebug/DebugInfo.h
@@ -47,6 +47,8 @@ public:
bool operator==(const SourcePosition& other) const { return file_path == other.file_path && line_number == other.line_number; }
bool operator!=(const SourcePosition& other) const { return !(*this == other); }
+
+ static SourcePosition from_line_info(const LineProgram::LineInfo&);
};
struct VariableInfo {
@@ -80,7 +82,7 @@ public:
bool is_function { false };
String name;
u32 address_low { 0 };
- u32 address_high { 0 };
+ u32 address_high { 0 }; // Non-inclusive - the lowest address after address_low that's not in this scope
Vector<Dwarf::DIE> dies_of_variables;
};
@@ -104,6 +106,8 @@ public:
}
String name_of_containing_function(u32 address) const;
+ Vector<SourcePosition> source_lines_in_scope(const VariablesScope&) const;
+ Optional<VariablesScope> get_containing_function(u32 address) const;
private:
void prepare_variable_scopes();