diff options
author | Tom de Vries <tdevries@suse.de> | 2021-12-07 07:51:25 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-12-07 07:51:25 +0100 |
commit | 9dec38d3b11c779e8f386050ed5046aaa4e759db (patch) | |
tree | 3be78ae3d32d3c789abb449740182b55293d0295 /gdb/infcmd.c | |
parent | af5300fe24bf2f4e032d639a5396a16c1762b77b (diff) | |
download | gdb-9dec38d3b11c779e8f386050ed5046aaa4e759db.zip gdb-9dec38d3b11c779e8f386050ed5046aaa4e759db.tar.gz gdb-9dec38d3b11c779e8f386050ed5046aaa4e759db.tar.bz2 |
[gdb/symtab] Support -readnow during reread
When running test-case gdb.base/cached-source-file.exp with target board
readnow, we run into:
...
FAIL: gdb.base/cached-source-file.exp: rerun program (the program exited)
...
The problem is that when rereading, the readnow is ignored.
Fix this by copying the readnow handling code from symbol_file_add_with_addrs
to reread_symbols.
Tested on x86_64-linux.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26800
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 984ce4e..a3752cc 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -395,7 +395,7 @@ run_command_1 (const char *args, int from_tty, enum run_how run_how) to check again here. Since reopen_exec_file doesn't do anything if the timestamp hasn't changed, I don't see the harm. */ reopen_exec_file (); - reread_symbols (); + reread_symbols (from_tty); gdb::unique_xmalloc_ptr<char> stripped = strip_bg_char (args, &async_exec); args = stripped.get (); @@ -2399,7 +2399,7 @@ setup_inferior (int from_tty) else { reopen_exec_file (); - reread_symbols (); + reread_symbols (from_tty); } /* Take any necessary post-attaching actions for this platform. */ |