GDB (xrefs)

Functions
/tmp/gdb-8.1/gdb/source.h File Reference

Go to the source code of this file.

## Functions
int | find_and_open_source (const char *filename, const char *dirname, char **fullname)
int | open_source_file (struct symtab *s)
gdb::unique_xmalloc_ptr< char > | rewrite_source_path (const char *path)
const char * | symtab_to_fullname (struct symtab *s)
const char * | symtab_to_filename_for_display (struct symtab *symtab)
void | find_source_lines (struct symtab *s, int desc)
int | get_first_line_listed (void)
int | get_lines_to_list (void)
struct symtab_and_line | get_current_source_symtab_and_line (void)
void | set_default_source_symtab_and_line (void)
symtab_and_line | set_current_source_symtab_and_line (const symtab_and_line &sal)
void | clear_current_source_symtab_and_line (void)
void | add_substitute_path_rule (char *, char *)

## Function Documentation

## ◆ add_substitute_path_rule()

void add_substitute_path_rule | ( | char * | ,
|  | char * |
| ) |  |

Definition at line 1790 of file source.c.

References substitute_path_rule::from, substitute_path_rule::next, substitute_path_rules, substitute_path_rule::to, and XNEW.

Referenced by captured_main_1(), and set_substitute_path_command().

## ◆ clear_current_source_symtab_and_line()

void clear_current_source_symtab_and_line | ( | void |  | ) |

Definition at line 232 of file source.c.

References current_source_line, and current_source_symtab.

Referenced by clear_symtab_users(), and objfile::~objfile().

## ◆ find_and_open_source()

int find_and_open_source | ( | const char * | filename,
|  | const char * | dirname,
|  | char ** | fullname
| ) |  |

Definition at line 1012 of file source.c.

References cdir_len, DIRNAME_SEPARATOR, gdb_open_cloexec(), gdb_realpath(), OPEN_MODE, openp(), OPF_RETURN_REALPATH, OPF_SEARCH_IN_PATH, rewrite_source_path(), source_path, and xfree().

Referenced by open_source_file(), psymtab_to_fullname(), and symtab_to_fullname().

## ◆ find_source_lines()

void find_source_lines | ( | struct symtab * | s,
|  | int | desc
| ) |  |

Definition at line 1186 of file source.c.

References _, do_cleanups(), exec_bfd, exec_bfd_mtime, gdb_assert, symtab::line_charpos, make_cleanup(), myread(), symtab::nlines, perror_with_name(), size, SYMTAB_OBJFILE, symtab_to_filename_for_display(), warning(), xfree(), xmalloc(), XNEWVEC, and xrealloc().

Referenced by forward_search_command(), get_filename_and_charpos(), print_source_lines_base(), reverse_search_command(), and tui_set_source_content().

## ◆ get_current_source_symtab_and_line()

struct symtab_and_line get_current_source_symtab_and_line | ( | void |  | ) |

Definition at line 171 of file source.c.

References current_source_line, current_source_pspace, current_source_symtab, and symtab_and_line::pspace.

Referenced by decode_line_with_current_source(), default_macro_scope(), edit_command(), extract_display_start_addr(), gdbpy_decode_line(), get_expr_block_and_pc(), initialize_defaults(), list_command(), make_visible_with_new_height(), mi_cmd_file_list_exec_source_file(), parse_breakpoint_sals(), parse_exp_in_context_1(), tui_horizontal_source_scroll(), tui_show_source(), tui_vertical_source_scroll(), and objfile::~objfile().

## ◆ get_first_line_listed()

int get_first_line_listed | ( | void |  | ) |

Definition at line 141 of file source.c.

References first_line_listed.

Referenced by list_command().

## ◆ get_lines_to_list()

int get_lines_to_list | ( | void |  | ) |

Definition at line 162 of file source.c.

References lines_to_list.

Referenced by edit_command(), and list_command().

## ◆ open_source_file()

int open_source_file | ( | struct symtab * | s | ) |

Definition at line 1113 of file source.c.

References symtab::filename, find_and_open_source(), symtab::fullname, and SYMTAB_DIRNAME.

Referenced by forward_search_command(), get_filename_and_charpos(), print_source_lines_base(), reverse_search_command(), and tui_set_source_content().

## ◆ rewrite_source_path()

gdb::unique_xmalloc_ptr<char> rewrite_source_path | ( | const char * | path | ) |

Definition at line 990 of file source.c.

References substitute_path_rule::from, get_substitute_path_rule(), substitute_path_rule::to, and xmalloc().

Referenced by find_and_open_source(), psymtab_to_fullname(), and symtab_to_fullname().

## ◆ set_current_source_symtab_and_line()

symtab_and_line set_current_source_symtab_and_line | ( | const symtab_and_line & | sal | ) |

Definition at line 209 of file source.c.

References clear_lines_listed_range(), current_source_line, current_source_pspace, current_source_symtab, symtab_and_line::end, symtab_and_line::line, symtab_and_line::pc, symtab_and_line::pspace, and symtab_and_line::symtab.

Referenced by set_current_sal_from_frame(), tui_show_disassem_and_update_source(), and tui_update_source_window_as_is().

## ◆ set_default_source_symtab_and_line()

void set_default_source_symtab_and_line | ( | void |  | ) |

Definition at line 193 of file source.c.

References _, current_source_symtab, error(), have_full_symbols(), have_partial_symbols(), and select_source_symtab().

Referenced by create_sals_line_offset(), edit_command(), gdbpy_decode_line(), list_command(), and mi_cmd_file_list_exec_source_file().

## ◆ symtab_to_filename_for_display()

const char* symtab_to_filename_for_display | ( | struct symtab * | symtab | ) |

Definition at line 1168 of file source.c.

References _, symtab::filename, filename_display_absolute, filename_display_basename, filename_display_relative, filename_display_string, internal_error(), and symtab_to_fullname().

Referenced by bkscm_print_block_syms_progress_smob(), btrace_call_history_src_line(), build_address_symbolic(), debug_symtab_name(), decode_line_2(), do_mixed_source_and_assembly(), dump_objfile(), dump_symtab_1(), edit_command(), error_in_psymtab_expansion(), find_source_lines(), fixup_go_packaging(), forward_search_command(), ftrace_print_filename(), gdbscm_symtab_filename(), info_checkpoints_command(), info_frame_command(), info_line_command(), list_command(), maintenance_check_symtabs(), maintenance_info_line_tables(), maintenance_info_symtabs(), maintenance_print_symbols(), mi_cmd_file_list_exec_source_file(), mi_cmd_file_list_exec_source_files(), print_breakpoint_location(), print_frame(), print_one_static_tracepoint_marker(), print_sal_location(), print_source_lines_base(), print_symbol_info(), psymtab_to_symtab_1(), rbreak_command(), resolve_sal_pc(), reverse_search_command(), sal_macro_scope(), salpy_str(), say_where(), set_traceframe_context(), stpy_get_filename(), stpy_str(), stscm_print_symtab_smob(), symtab_symbol_info(), tfind_line_command(), tui_set_source_content(), update_static_tracepoint(), and user_select_syms().

## ◆ symtab_to_fullname()

const char* symtab_to_fullname | ( | struct symtab * | s | ) |

Definition at line 1131 of file source.c.

References symtab::filename, find_and_open_source(), symtab::fullname, rewrite_source_path(), SLASH_STRING, and SYMTAB_DIRNAME.

Referenced by add_sal_to_sals(), canonical_to_fullform(), clear_command(), convert_linespec_to_sals(), create_sals_line_offset(), skiplist_entry::do_skip_file_p(), skiplist_entry::do_skip_gfile_p(), edit_command(), find_line_symtab(), ftrace_function_switched(), gdbpy_rbreak(), gdbscm_symtab_fullname(), info_sources_command(), is_known_support_routine(), iterate_over_some_symtabs(), maintenance_print_one_line_table(), mi_cmd_file_list_exec_source_file(), mi_cmd_file_list_exec_source_files(), print_breakpoint_location(), print_frame(), print_one_static_tracepoint_marker(), print_source_lines_base(), rbreak_command(), search_symbols(), skip_file_command(), stpy_fullname(), symtab_to_filename_for_display(), tui_display_main(), tui_set_source_content(), tui_show_disassem_and_update_source(), tui_show_frame_info(), tui_update_breakpoint_info(), and update_static_tracepoint().