GDB (xrefs)

Functions
tui-winsource.c File Reference
`#include "defs.h"`
`#include <ctype.h>`
`#include "symtab.h"`
`#include "frame.h"`
`#include "breakpoint.h"`
`#include "value.h"`
`#include "source.h"`
`#include "objfiles.h"`
`#include "filenames.h"`
`#include "tui/tui.h"`
`#include "tui/tui-data.h"`
`#include "tui/tui-stack.h"`
`#include "tui/tui-win.h"`
`#include "tui/tui-wingeneral.h"`
`#include "tui/tui-winsource.h"`
`#include "tui/tui-source.h"`
`#include "tui/tui-disasm.h"`
`#include "gdb_curses.h"`

Go to the source code of this file.

## Functions
void | tui_display_main (void)
void | tui_update_source_window (struct tui_win_info *win_info, struct gdbarch *gdbarch, struct symtab *s, struct tui_line_or_address line_or_addr, int noerror)
void | tui_update_source_window_as_is (struct tui_win_info *win_info, struct gdbarch *gdbarch, struct symtab *s, struct tui_line_or_address line_or_addr, int noerror)
void | tui_update_source_windows_with_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
void | tui_update_source_windows_with_line (struct symtab *s, int line)
void | tui_clear_source_content (struct tui_win_info *win_info, int display_prompt)
void | tui_erase_source_content (struct tui_win_info *win_info, int display_prompt)
static void | tui_show_source_line (struct tui_win_info *win_info, int lineno)
void | tui_show_source_content (struct tui_win_info *win_info)
void | tui_horizontal_source_scroll (struct tui_win_info *win_info, enum tui_scroll_direction direction, int num_to_scroll)
void | tui_set_is_exec_point_at (struct tui_line_or_address l, struct tui_win_info *win_info)
void | tui_update_all_breakpoint_info (void)
int | tui_update_breakpoint_info (struct tui_win_info *win, int current_only)
enum tui_status | tui_set_exec_info_content (struct tui_win_info *win_info)
void | tui_show_exec_info_content (struct tui_win_info *win_info)
void | tui_erase_exec_info_content (struct tui_win_info *win_info)
void | tui_clear_exec_info_content (struct tui_win_info *win_info)
void | tui_update_exec_info (struct tui_win_info *win_info)
enum tui_status | tui_alloc_source_buffer (struct tui_win_info *win_info)
int | tui_line_is_displayed (int line, struct tui_win_info *win_info, int check_threshold)
int | tui_addr_is_displayed (CORE_ADDR addr, struct tui_win_info *win_info, int check_threshold)

## Function Documentation

## ◆ tui_addr_is_displayed()

int tui_addr_is_displayed | ( | CORE_ADDR | addr,
|  | struct tui_win_info * | win_info,
|  | int | check_threshold
| ) |  |

Definition at line 665 of file tui-winsource.c.

References tui_line_or_address::addr, tui_gen_win_info::content, tui_gen_win_info::content_size, tui_win_info::generic, tui_source_element::line_or_addr, tui_line_or_address::loa, LOA_ADDRESS, SCROLL_THRESHOLD, tui_which_element::source, tui_line_or_address::u, and tui_win_element::which_element.

Referenced by tui_show_frame_info().

## ◆ tui_alloc_source_buffer()

enum tui_status tui_alloc_source_buffer | ( | struct tui_win_info * | win_info | ) |

Definition at line 602 of file tui-winsource.c.

References tui_gen_win_info::content, tui_win_info::generic, tui_gen_win_info::height, tui_source_element::line, tui_which_element::source, SRC_WIN, tui_alloc_content(), TUI_SUCCESS, tui_win_element::which_element, tui_gen_win_info::width, and xmalloc().

Referenced by tui_set_disassem_content(), and tui_set_source_content().

## ◆ tui_clear_exec_info_content()

void tui_clear_exec_info_content | ( | struct tui_win_info * | win_info | ) |

Definition at line 585 of file tui-winsource.c.

References tui_gen_win_info::content_in_use, tui_win_info::detail, tui_source_info::execution_info, tui_win_info::source_info, and tui_erase_exec_info_content().

Referenced by tui_update_source_window_as_is(), and tui_update_source_windows_with_addr().

## ◆ tui_clear_source_content()

void tui_clear_source_content | ( | struct tui_win_info * | win_info,
|  | int | display_prompt
| ) |  |

Definition at line 210 of file tui-winsource.c.

References tui_gen_win_info::content, tui_gen_win_info::content_in_use, tui_gen_win_info::content_size, tui_win_info::generic, tui_source_element::has_break, tui_source_element::is_exec_point, tui_which_element::source, tui_erase_source_content(), and tui_win_element::which_element.

Referenced by tui_show_frame_info(), tui_update_source_window_as_is(), and tui_update_source_windows_with_addr().

## ◆ tui_display_main()

void tui_display_main | ( | void |  | ) |

Definition at line 44 of file tui-winsource.c.

References find_pc_line_symtab(), symtab_to_fullname(), tui_get_begin_asm_address(), tui_source_windows(), tui_update_locator_fullname(), and tui_update_source_windows_with_addr().

Referenced by tui_inferior_exit(), and tui_new_objfile_hook().

## ◆ tui_erase_exec_info_content()

void tui_erase_exec_info_content | ( | struct tui_win_info * | win_info | ) |

Definition at line 575 of file tui-winsource.c.

References tui_win_info::detail, exec_info, tui_source_info::execution_info, tui_gen_win_info::handle, tui_win_info::source_info, and tui_refresh_win().

Referenced by tui_clear_exec_info_content(), and tui_refresh_all_win().

## ◆ tui_erase_source_content()

void tui_erase_source_content | ( | struct tui_win_info * | win_info,
|  | int | display_prompt
| ) |  |

Definition at line 231 of file tui-winsource.c.

References EMPTY_SOURCE_PROMPT, tui_win_info::generic, tui_gen_win_info::handle, tui_gen_win_info::height, NO_DISASSEM_STRING, NO_SRC_STRING, SRC_WIN, tui_check_and_display_highlight_if_needed(), tui_refresh_win(), tui_set_source_content_nil(), tui_gen_win_info::type, and tui_gen_win_info::width.

Referenced by tui_adjust_win_heights(), tui_clear_source_content(), tui_resize_all(), and tui_show_source_content().

## ◆ tui_horizontal_source_scroll()

void tui_horizontal_source_scroll | ( | struct tui_win_info * | win_info,
|  | enum tui_scroll_direction | direction,
|  | int | num_to_scroll
| ) |  |

Definition at line 316 of file tui-winsource.c.

References tui_gen_win_info::content, tui_win_info::detail, find_pc_line_symtab(), tui_source_info::gdbarch, tui_win_info::generic, get_current_source_symtab_and_line(), get_frame_pc(), get_selected_frame(), tui_source_info::horizontal_offset, LEFT_SCROLL, tui_source_element::line_or_addr, offset, tui_which_element::source, tui_win_info::source_info, SRC_WIN, symtab_and_line::symtab, tui_update_source_window_as_is(), tui_gen_win_info::type, and tui_win_element::which_element.

Referenced by tui_scroll_left(), and tui_scroll_right().

## ◆ tui_line_is_displayed()

int tui_line_is_displayed | ( | int | line,
|  | struct tui_win_info * | win_info,
|  | int | check_threshold
| ) |  |

Definition at line 635 of file tui-winsource.c.

References tui_gen_win_info::content, tui_gen_win_info::content_size, tui_win_info::generic, tui_line_or_address::line_no, tui_source_element::line_or_addr, tui_line_or_address::loa, LOA_LINE, SCROLL_THRESHOLD, tui_which_element::source, tui_line_or_address::u, and tui_win_element::which_element.

Referenced by tui_show_frame_info().

## ◆ tui_set_exec_info_content()

enum tui_status tui_set_exec_info_content | ( | struct tui_win_info * | win_info | ) |

Definition at line 495 of file tui-winsource.c.

References tui_gen_win_info::content, tui_gen_win_info::content_size, tui_win_info::detail, tui_source_info::execution_info, tui_win_info::generic, tui_source_element::has_break, tui_gen_win_info::height, tui_source_element::is_exec_point, memset(), tui_which_element::simple_string, tui_which_element::source, tui_win_info::source_info, tui_alloc_content(), TUI_BP_BREAK_POS, TUI_BP_DISABLED, TUI_BP_ENABLED, TUI_BP_HARDWARE, TUI_BP_HIT, TUI_BP_HIT_POS, TUI_EXEC_POS, TUI_EXECINFO_SIZE, TUI_FAILURE, TUI_SUCCESS, tui_update_breakpoint_info(), tui_gen_win_info::type, and tui_win_element::which_element.

Referenced by tui_update_exec_info().

## ◆ tui_set_is_exec_point_at()

void tui_set_is_exec_point_at | ( | struct tui_line_or_address | l,
|  | struct tui_win_info * | win_info
| ) |  |

Definition at line 362 of file tui-winsource.c.

References tui_line_or_address::addr, tui_gen_win_info::content, gdb_assert, tui_win_info::generic, tui_source_element::is_exec_point, tui_line_or_address::line_no, tui_source_element::line_or_addr, tui_line_or_address::loa, LOA_ADDRESS, LOA_LINE, tui_which_element::source, tui_refresh_win(), tui_show_source_line(), tui_line_or_address::u, and tui_win_element::which_element.

Referenced by tui_show_frame_info().

## ◆ tui_show_exec_info_content()

void tui_show_exec_info_content | ( | struct tui_win_info * | win_info | ) |

Definition at line 555 of file tui-winsource.c.

References tui_gen_win_info::content, tui_gen_win_info::content_in_use, tui_gen_win_info::content_size, tui_win_info::detail, exec_info, tui_source_info::execution_info, tui_gen_win_info::handle, tui_which_element::simple_string, tui_win_info::source_info, tui_refresh_win(), and tui_win_element::which_element.

Referenced by tui_update_exec_info().

## ◆ tui_show_source_content()

void tui_show_source_content | ( | struct tui_win_info * | win_info | ) |

Definition at line 296 of file tui-winsource.c.

References tui_gen_win_info::content_in_use, tui_gen_win_info::content_size, tui_win_info::generic, tui_check_and_display_highlight_if_needed(), tui_erase_source_content(), tui_refresh_win(), and tui_show_source_line().

Referenced by show_source_disasm_command(), show_source_or_disasm_and_command(), tui_refresh_all_win(), and tui_update_source_window_as_is().

## ◆ tui_show_source_line()

static void tui_show_source_line | ( | struct tui_win_info * | win_info,
|  | int | lineno
| ) |  |
| static

Definition at line 272 of file tui-winsource.c.

References tui_gen_win_info::content, tui_win_info::generic, tui_gen_win_info::handle, tui_source_element::is_exec_point, tui_source_element::line, tui_which_element::source, tui_win_element::which_element, and tui_gen_win_info::width.

Referenced by tui_set_is_exec_point_at(), and tui_show_source_content().

## ◆ tui_update_all_breakpoint_info()

void tui_update_all_breakpoint_info | ( | void |  | ) |

Definition at line 401 of file tui-winsource.c.

References tui_list::list, tui_source_windows(), tui_update_breakpoint_info(), and tui_update_exec_info().

Referenced by tui_event_create_breakpoint(), tui_event_delete_breakpoint(), and tui_event_modify_breakpoint().

## ◆ tui_update_breakpoint_info()

int tui_update_breakpoint_info | ( | struct tui_win_info * | win,
|  | int | current_only
| ) |  |

Definition at line 425 of file tui-winsource.c.

References tui_line_or_address::addr, bp, bp_disabled, bp_hardware_breakpoint, breakpoint_chain, tui_gen_win_info::content, tui_gen_win_info::content_size, tui_win_info::detail, tui_source_info::fullname, gdb_assert, tui_win_info::generic, tui_source_element::has_break, tui_source_element::line, tui_line_or_address::line_no, tui_source_element::line_or_addr, tui_line_or_address::loa, LOA_ADDRESS, LOA_LINE, loc, tui_which_element::source, tui_win_info::source_info, symtab_to_fullname(), TUI_BP_CONDITIONAL, TUI_BP_DISABLED, TUI_BP_ENABLED, TUI_BP_HARDWARE, TUI_BP_HIT, TUI_DISASM_WIN, TUI_SRC_WIN, tui_line_or_address::u, and tui_win_element::which_element.

Referenced by tui_set_exec_info_content(), tui_update_all_breakpoint_info(), and tui_update_source_window_as_is().

## ◆ tui_update_exec_info()

void tui_update_exec_info | ( | struct tui_win_info * | win_info | ) |

Definition at line 595 of file tui-winsource.c.

References tui_set_exec_info_content(), and tui_show_exec_info_content().

Referenced by tui_refresh_all_win(), tui_show_frame_info(), tui_update_all_breakpoint_info(), and tui_update_source_window_as_is().

## ◆ tui_update_source_window()

void tui_update_source_window | ( | struct tui_win_info * | win_info,
|  | struct gdbarch * | gdbarch,
|  | struct symtab * | s,
|  | struct tui_line_or_address | line_or_addr,
|  | int | noerror
| ) |  |

Definition at line 71 of file tui-winsource.c.

References tui_win_info::detail, tui_source_info::horizontal_offset, tui_win_info::source_info, and tui_update_source_window_as_is().

Referenced by make_visible_with_new_height(), tui_show_disassem(), tui_show_disassem_and_update_source(), and tui_show_frame_info().

## ◆ tui_update_source_window_as_is()

void tui_update_source_window_as_is | ( | struct tui_win_info * | win_info,
|  | struct gdbarch * | gdbarch,
|  | struct symtab * | s,
|  | struct tui_line_or_address | line_or_addr,
|  | int | noerror
| ) |  |

Definition at line 87 of file tui-winsource.c.

References tui_line_or_address::addr, tui_gen_win_info::content_size, EMPTY_SOURCE_PROMPT, tui_win_info::generic, symtab_and_line::line, tui_line_or_address::line_no, symtab_and_line::pspace, set_current_source_symtab_and_line(), SRC_DISASSEM_COMMAND, SRC_WIN, symtab_and_line::symtab, SYMTAB_PSPACE, tui_clear_exec_info_content(), tui_clear_source_content(), tui_current_layout(), TUI_DISASM_WIN, TUI_FAILURE, tui_set_disassem_content(), tui_set_source_content(), tui_set_win_focus_to(), tui_show_source_content(), TUI_SRC_WIN, tui_update_breakpoint_info(), tui_update_exec_info(), tui_win_with_focus(), tui_gen_win_info::type, and tui_line_or_address::u.

Referenced by tui_horizontal_source_scroll(), tui_show_symtab_source(), tui_update_source_window(), and tui_vertical_disassem_scroll().

## ◆ tui_update_source_windows_with_addr()

void tui_update_source_windows_with_addr | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | addr
| ) |  |

Definition at line 135 of file tui-winsource.c.

References tui_line_or_address::addr, DISASSEM_COMMAND, DISASSEM_DATA_COMMAND, EMPTY_SOURCE_PROMPT, find_pc_line(), symtab_and_line::line, tui_line_or_address::line_no, tui_line_or_address::loa, LOA_LINE, SRC_DISASSEM_COMMAND, symtab_and_line::symtab, tui_clear_exec_info_content(), tui_clear_source_content(), tui_current_layout(), tui_show_disassem(), tui_show_disassem_and_update_source(), tui_show_symtab_source(), tui_source_windows(), and tui_line_or_address::u.

Referenced by tui_display_main(), tui_set_layout(), tui_show_assembly(), and tui_update_source_windows_with_line().

## ◆ tui_update_source_windows_with_line()

void tui_update_source_windows_with_line | ( | struct symtab * | s,
|  | int | line
| ) |  |

Definition at line 176 of file tui-winsource.c.

References DISASSEM_COMMAND, DISASSEM_DATA_COMMAND, find_line_pc(), get_objfile_arch(), tui_line_or_address::line_no, tui_line_or_address::loa, LOA_LINE, SRC_DISASSEM_COMMAND, SYMTAB_OBJFILE, tui_current_layout(), tui_show_disassem(), tui_show_symtab_source(), tui_update_source_windows_with_addr(), and tui_line_or_address::u.

Referenced by tui_show_source().