HelenOS sources
This source file includes following definitions.
- debug_line_program_create
#ifndef DWARFS_LINE_H_
#define DWARFS_LINE_H_
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <debug/sections.h>
struct debug_line_program_header {
uint64_t unit_length;
uint64_t header_length;
const uint8_t *unit_end;
const uint8_t *header_end;
const uint8_t *standard_opcode_lengths;
size_t standard_opcode_lengths_size;
unsigned width;
uint16_t version;
uint8_t minimum_instruction_length;
bool default_is_stmt;
int8_t line_base;
uint8_t line_range;
uint8_t opcode_base;
union {
struct {
const uint8_t *include_directories;
const uint8_t *include_directories_end;
const uint8_t *file_names;
} v3;
struct {
uint64_t directories_count;
uint64_t file_names_count;
const uint8_t *directory_entry_format;
const uint8_t *directory_entry_format_end;
const uint8_t *directories;
const uint8_t *directories_end;
const uint8_t *file_name_entry_format;
const uint8_t *file_name_entry_format_end;
const uint8_t *file_names;
const uint8_t *file_names_end;
uint8_t address_size;
uint8_t segment_selector_size;
uint8_t directory_entry_format_count;
uint8_t file_name_entry_format_count;
uint8_t maximum_operations_per_instruction;
} v5;
};
};
struct debug_line_program {
const struct debug_line_program_header *hdr;
const uint8_t *program;
const uint8_t *program_end;
uintptr_t address;
int op_advance;
int file;
int line;
int column;
bool end_sequence;
bool truncated;
};
static inline struct debug_line_program debug_line_program_create(const uint8_t *program,
const uint8_t *const program_end,
const struct debug_line_program_header *hdr)
{
return (struct debug_line_program) {
.hdr = hdr,
.program = program,
.program_end = program_end,
.end_sequence = true,
.truncated = false,
};
}
extern bool debug_line_get_address_info(debug_sections_t *scs, uintptr_t addr, int op_index, const char **file, const char **dir, int *line, int *col);
#endif
HelenOS homepage, sources at GitHub