From 3bae94c0fb82d5eb9c36c926534fced6db198d82 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 16 May 2024 16:50:22 -0400 Subject: gdb: pass program space to get_current_source_symtab_and_line Make the current program space reference bubble up one level. Change-Id: I6ba6dc4a2cb188720cbb61b84ab5c954aac105c6 Approved-By: Tom Tromey Reviewed-By: Thiago Jung Bauermann --- gdb/mi/mi-cmd-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/mi/mi-cmd-file.c') diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c index 3e2702e..f2fe435 100644 --- a/gdb/mi/mi-cmd-file.c +++ b/gdb/mi/mi-cmd-file.c @@ -35,7 +35,6 @@ void mi_cmd_file_list_exec_source_file (const char *command, const char *const *argv, int argc) { - struct symtab_and_line st; struct ui_out *uiout = current_uiout; if (!mi_valid_noargs ("-file-list-exec-source-file", argc, argv)) @@ -43,7 +42,8 @@ mi_cmd_file_list_exec_source_file (const char *command, /* Set the default file and line, also get them. */ set_default_source_symtab_and_line (); - st = get_current_source_symtab_and_line (); + symtab_and_line st + = get_current_source_symtab_and_line (current_program_space); /* We should always get a symtab. Apparently, filename does not need to be tested for NULL. The documentation in symtab.h -- cgit v1.1