if (fi)
{
- int start_line;
- CORE_ADDR low;
struct tui_locator_window *locator = tui_locator_win_info_ptr ();
int source_already_displayed;
CORE_ADDR pc;
return 0;
tui_show_locator_content ();
- start_line = 0;
for (struct tui_source_window_base *win_info : tui_source_windows ())
{
if (win_info == TUI_SRC_WIN)
{
- start_line = (locator->line_no -
- (win_info->viewport_height / 2)) + 1;
+ int start_line = (locator->line_no -
+ (win_info->viewport_height / 2)) + 1;
if (start_line <= 0)
start_line = 1;
- }
- else
- {
- if (find_pc_partial_function (get_frame_pc (fi),
- NULL, &low, NULL) == 0)
- {
- /* There is no symbol available for current PC. There is no
- safe way how to "disassemble backwards". */
- low = get_frame_pc (fi);
- }
- else
- low = tui_get_low_disassembly_address (get_frame_arch (fi),
- low, get_frame_pc (fi));
- }
- if (win_info == TUI_SRC_WIN)
- {
struct tui_line_or_address l;
l.loa = LOA_LINE;
}
else
{
- if (win_info == TUI_DISASM_WIN)
+ CORE_ADDR low;
+
+ if (find_pc_partial_function (get_frame_pc (fi),
+ NULL, &low, NULL) == 0)
+ {
+ /* There is no symbol available for current PC. There is no
+ safe way how to "disassemble backwards". */
+ low = get_frame_pc (fi);
+ }
+ else
+ low = tui_get_low_disassembly_address (get_frame_arch (fi),
+ low, get_frame_pc (fi));
+
+ struct tui_line_or_address a;
+
+ a.loa = LOA_ADDRESS;
+ a.u.addr = low;
+ if (!tui_addr_is_displayed (locator->addr,
+ win_info, TRUE))
+ tui_update_source_window (win_info, get_frame_arch (fi),
+ sal.symtab, a, TRUE);
+ else
{
- struct tui_line_or_address a;
-
- a.loa = LOA_ADDRESS;
- a.u.addr = low;
- if (!tui_addr_is_displayed (locator->addr,
- win_info, TRUE))
- tui_update_source_window (win_info, get_frame_arch (fi),
- sal.symtab, a, TRUE);
- else
- {
- a.u.addr = locator->addr;
- win_info->set_is_exec_point_at (a);
- }
+ a.u.addr = locator->addr;
+ win_info->set_is_exec_point_at (a);
}
}
+
tui_update_exec_info (win_info);
}