aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2024-05-16 16:50:22 -0400
committerSimon Marchi <simon.marchi@efficios.com>2024-07-15 14:34:12 -0400
commit3bae94c0fb82d5eb9c36c926534fced6db198d82 (patch)
treea0e9eb77343407a84b9f4d1d8c8694b6ef55ba88 /gdb/tui
parent9c067e28448f0314d1b0440945e16382a226fd7b (diff)
downloadgdb-3bae94c0fb82d5eb9c36c926534fced6db198d82.zip
gdb-3bae94c0fb82d5eb9c36c926534fced6db198d82.tar.gz
gdb-3bae94c0fb82d5eb9c36c926534fced6db198d82.tar.bz2
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 <tom@tromey.com> Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-disasm.c3
-rw-r--r--gdb/tui/tui-hooks.c3
-rw-r--r--gdb/tui/tui-source.c5
-rw-r--r--gdb/tui/tui-winsource.c10
4 files changed, 12 insertions, 9 deletions
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 2f25fed..53be866 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -393,7 +393,8 @@ tui_get_begin_asm_address (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
|| have_partial_symbols (current_program_space))
{
set_default_source_symtab_and_line ();
- struct symtab_and_line sal = get_current_source_symtab_and_line ();
+ symtab_and_line sal
+ = get_current_source_symtab_and_line (current_program_space);
if (sal.symtab != nullptr)
find_line_pc (sal.symtab, sal.line, &addr);
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index e6673ab..25358d0 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -127,7 +127,8 @@ tui_refresh_frame_and_register_information ()
/* Make sure that the source window is displayed. */
tui_add_win_to_layout (SRC_WIN);
- struct symtab_and_line sal = get_current_source_symtab_and_line ();
+ symtab_and_line sal
+ = get_current_source_symtab_and_line (current_program_space);
tui_update_source_windows_with_line (sal);
}
}
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 444c0f7..ee64e41 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -136,7 +136,8 @@ tui_source_window::do_scroll_vertical (int num_to_scroll)
if (!m_content.empty ())
{
struct symtab *s;
- struct symtab_and_line cursal = get_current_source_symtab_and_line ();
+ symtab_and_line cursal
+ = get_current_source_symtab_and_line (current_program_space);
struct gdbarch *arch = m_gdbarch;
if (cursal.symtab == NULL)
@@ -220,7 +221,7 @@ void
tui_source_window::display_start_addr (struct gdbarch **gdbarch_p,
CORE_ADDR *addr_p)
{
- struct symtab_and_line cursal = get_current_source_symtab_and_line ();
+ symtab_and_line cursal = get_current_source_symtab_and_line (current_program_space);
*gdbarch_p = m_gdbarch;
find_line_pc (cursal.symtab, m_start_line_or_addr.u.line_no, addr_p);
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index 80297e5..b08fca7 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -440,8 +440,8 @@ tui_source_window_base::rerender ()
if (!m_content.empty ())
{
- struct symtab_and_line cursal
- = get_current_source_symtab_and_line ();
+ symtab_and_line cursal
+ = get_current_source_symtab_and_line (current_program_space);
if (m_start_line_or_addr.loa == LOA_LINE)
cursal.line = m_start_line_or_addr.u.line_no;
@@ -451,8 +451,8 @@ tui_source_window_base::rerender ()
}
else if (deprecated_safe_get_selected_frame () != NULL)
{
- struct symtab_and_line cursal
- = get_current_source_symtab_and_line ();
+ symtab_and_line cursal
+ = get_current_source_symtab_and_line (current_program_space);
frame_info_ptr frame = deprecated_safe_get_selected_frame ();
struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -492,7 +492,7 @@ tui_source_window_base::refill ()
if (this == tui_src_win ())
{
- sal = get_current_source_symtab_and_line ();
+ sal = get_current_source_symtab_and_line (current_program_space);
if (sal.symtab == NULL)
{
frame_info_ptr fi = deprecated_safe_get_selected_frame ();