[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:
@@ -21,7 +21,8 @@ struct disk_header
|
||||
|
||||
enum class file_flags : uint16_t
|
||||
{
|
||||
executable = 0x01
|
||||
executable = 0x01,
|
||||
symbols = 0x02
|
||||
};
|
||||
|
||||
struct file_header
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user