diff options
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 1f32a63..f2d28ca 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1317,7 +1317,7 @@ follow_exec (ptid_t ptid, const char *exec_file_target) /* Also, loading a symbol file below may trigger symbol lookups, and we don't want those to be satisfied by the libraries of the previous incarnation of this process. */ - no_shared_libraries (nullptr, 0); + no_shared_libraries (current_program_space); inferior *execing_inferior = current_inferior (); inferior *following_inferior; @@ -8245,7 +8245,8 @@ process_event_stop_test (struct execution_control_state *ecs) "it's not the start of a statement"); } } - else if (execution_direction == EXEC_REVERSE + + if (execution_direction == EXEC_REVERSE && *curr_frame_id != original_frame_id && original_frame_id.code_addr_p && curr_frame_id->code_addr_p && original_frame_id.code_addr == curr_frame_id->code_addr) @@ -9296,12 +9297,24 @@ print_stop_location (const target_waitstatus &ws) && (tp->control.step_start_function == find_pc_function (tp->stop_pc ()))) { - /* Finished step, just print source line. */ - source_flag = SRC_LINE; + symtab_and_line sal = find_frame_sal (get_selected_frame (nullptr)); + if (sal.symtab != tp->current_symtab) + { + /* Finished step in same frame but into different file, print + location and source line. */ + source_flag = SRC_AND_LOC; + } + else + { + /* Finished step in same frame and same file, just print source + line. */ + source_flag = SRC_LINE; + } } else { - /* Print location and source line. */ + /* Finished step into different frame, print location and source + line. */ source_flag = SRC_AND_LOC; } break; |