[kernel] Use symbol table in stack traces

Now using the symbol table built by build_symbol_table.py in the kernel
when printing stack traces.
This commit is contained in:
2020-08-09 17:27:51 -07:00
parent 0d94776c46
commit bbb9aae198
12 changed files with 137 additions and 12 deletions

View File

@@ -21,7 +21,8 @@ struct disk_header
enum class file_flags : uint16_t
{
executable = 0x01
executable = 0x01,
symbols = 0x02
};
struct file_header

View File

@@ -36,6 +36,9 @@ public:
/// Whether this file is an executable
bool executable() const;
/// Whether this file is a symbol table
bool symbols() const;
private:
const file_header *m_header;
void const *m_data;

View File

@@ -22,6 +22,11 @@ file::executable() const {
return bitfield_has(m_header->flags, file_flags::executable);
}
bool
file::symbols() const {
return bitfield_has(m_header->flags, file_flags::symbols);
}
disk::disk(const void *start)
{