aboutsummaryrefslogtreecommitdiff
path: root/gold/incremental.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-07-06 22:07:59 +0000
committerCary Coutant <ccoutant@google.com>2011-07-06 22:07:59 +0000
commite24719f6e73a89da8877536830ff047ffc4e2377 (patch)
tree64b2dfcf4bd113c3a9ace86bba993fa72b8b14de /gold/incremental.cc
parent3b2a0cf216646598c8d76c098f1734c9bb5604c7 (diff)
downloadgdb-e24719f6e73a89da8877536830ff047ffc4e2377.zip
gdb-e24719f6e73a89da8877536830ff047ffc4e2377.tar.gz
gdb-e24719f6e73a89da8877536830ff047ffc4e2377.tar.bz2
* incremental.cc (Sized_incremental_binary::setup_readers): Pass
input file index to Script_info ctor. (Sized_incremental_binary::do_file_has_changed): Find the command-line argument for files named in scripts. * incremental.h (Script_info::Script_info): New ctor with input file index. (Script_info::input_file_index): New function. (Script_info::input_file_index_): New data member. (Incremental_binary::get_library): Add const. (Incremental_binary::get_script_info): Add const. * readsyms.cc (Read_member::is_runnable): Check for this_blocker_. * testsuite/Makefile.am (incremental_test_5): New test case. (incremental_test_6): New test case. * testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/incremental.cc')
-rw-r--r--gold/incremental.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/gold/incremental.cc b/gold/incremental.cc
index 3dffbd3..0988ed4 100644
--- a/gold/incremental.cc
+++ b/gold/incremental.cc
@@ -309,7 +309,7 @@ Sized_incremental_binary<size, big_endian>::setup_readers()
break;
case INCREMENTAL_INPUT_SCRIPT:
{
- Script_info* script = new Script_info(input_file.filename());
+ Script_info* script = new Script_info(input_file.filename(), i);
this->script_map_[i] = script;
unsigned int object_count = input_file.get_object_count();
for (unsigned int j = 0; j < object_count; j++)
@@ -448,6 +448,14 @@ Sized_incremental_binary<size, big_endian>::do_file_has_changed(
{
Input_entry_reader input_file = this->inputs_reader_.input_file(n);
Incremental_disposition disp = INCREMENTAL_CHECK;
+
+ // For files named in scripts, find the file that was actually named
+ // on the command line, so that we can get the incremental disposition
+ // flag.
+ Script_info* script = this->get_script_info(n);
+ if (script != NULL)
+ n = script->input_file_index();
+
const Input_argument* input_argument = this->get_input_argument(n);
if (input_argument != NULL)
disp = input_argument->file().options().incremental_disposition();