Index: build/gdb-add-index |
diff --git a/build/gdb-add-index b/build/gdb-add-index |
index 687e9f5d501b0206b69bb9deaaefc219fff19c4e..475be1114b922a92c9d8e4597ff5fe329f87f4a1 100755 |
--- a/build/gdb-add-index |
+++ b/build/gdb-add-index |
@@ -38,10 +38,10 @@ function index_one_file { |
local basename=$(basename "$file") |
local should_index="${SHOULD_INDEX}" |
- local readelf_out=$(readelf -S "$file") |
+ local readelf_out=$(${CROSS_COMPILE}readelf -S "$file") |
cjhopman
2015/01/08 22:37:23
To match the naming of this elsewhere (e.g. gyp),
cleichner
2015/01/08 22:42:45
Done.
|
if [[ $readelf_out =~ "gdb_index" ]]; then |
if [ "${REMOVE_INDEX}" = 1 ]; then |
- objcopy --remove-section .gdb_index "$file" |
+ ${CROSS_COMPILE}objcopy --remove-section .gdb_index "$file" |
echo "Removed index from $basename." |
else |
echo "Skipped $basename -- already contains index." |
@@ -53,10 +53,11 @@ function index_one_file { |
local start=$(date +"%s%N") |
echo "Adding index to $basename..." |
- gdb -batch "$file" -ex "save gdb-index $DIRECTORY" -ex "quit" |
+ ${CROSS_COMPILE}gdb -batch "$file" -ex "save gdb-index $DIRECTORY" \ |
+ -ex "quit" |
local index_file="$DIRECTORY/$basename.gdb-index" |
if [ -f "$index_file" ]; then |
- objcopy --add-section .gdb_index="$index_file" \ |
+ ${CROSS_COMPILE}objcopy --add-section .gdb_index="$index_file" \ |
--set-section-flags .gdb_index=readonly "$file" "$file" |
local finish=$(date +"%s%N") |
local elappsed=$(((finish - start)/1000000)) |
scottmg
2015/01/08 22:38:59
would you mind fixing the spelling of "elapsed" wh
cleichner
2015/01/08 22:42:45
Done.
|