GDB (xrefs)
|
#include "source-cache.h"
Classes | |
struct | source_text |
Public Member Functions | |
source_cache () | |
bool | get_line_charpos (struct symtab *s, const std::vector< off_t > **offsets) |
bool | get_source_lines (struct symtab *s, int first_line, int last_line, std::string *lines_out) |
void | clear () |
Private Member Functions | |
std::string | get_plain_source_lines (struct symtab *s, const std::string &fullname) |
bool | ensure (struct symtab *s) |
Private Attributes | |
std::vector< source_text > | m_source_map |
std::unordered_map< std::string, std::vector< off_t > > | m_offset_cache |
Definition at line 36 of file source-cache.h.
|
inline |
Definition at line 40 of file source-cache.h.
|
inline |
Definition at line 65 of file source-cache.h.
References m_offset_cache, and m_source_map.
Referenced by forget_cached_source_info(), and set_style_enabled().
|
private |
Definition at line 197 of file source-cache.c.
References ext_lang_colorize(), gdb_stdout, get_plain_source_lines(), symtab::language(), m_offset_cache, m_source_map, MAX_ENTRIES, size, source_styling, symtab_to_fullname(), and use_gnu_source_highlight.
Referenced by get_line_charpos(), and get_source_lines().
bool source_cache::get_line_charpos | ( | struct symtab * | s, |
const std::vector< off_t > ** | offsets ) |
Definition at line 295 of file source-cache.c.
References ensure(), m_offset_cache, and symtab_to_fullname().
Referenced by annotate_source_line(), tui_source_window::do_scroll_vertical(), info_source_command(), last_symtab_line(), print_source_lines_base(), search_command_helper(), and tui_source_window::set_contents().
|
private |
Definition at line 93 of file source-cache.c.
References symtab::compunit(), current_program_space, program_space::ebfd_mtime, program_space::exec_bfd(), m_offset_cache, objfile::mtime, myread(), objfile::obfd, compunit_symtab::objfile(), open_source_file(), and symtab_to_filename_for_display().
Referenced by ensure().
bool source_cache::get_source_lines | ( | struct symtab * | s, |
int | first_line, | ||
int | last_line, | ||
std::string * | lines_out ) |
Definition at line 358 of file source-cache.c.
References ensure(), extract_lines(), and m_source_map.
Referenced by print_source_lines_base(), and tui_source_window::set_contents().
|
private |
Definition at line 97 of file source-cache.h.
Referenced by clear(), ensure(), get_line_charpos(), and get_plain_source_lines().
|
private |
Definition at line 93 of file source-cache.h.
Referenced by clear(), ensure(), and get_source_lines().