]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix quoting in gdb-add-index.sh
authorTom Tromey <tromey@adacore.com>
Tue, 10 Sep 2024 17:05:04 +0000 (11:05 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 13 Sep 2024 16:16:29 +0000 (10:16 -0600)
commit24e5f9742611dbda04bb7e40c94c48637ecc0a21
treec357302799f56404c7867ad65cdee984dd6f99a2
parentc7e57281af00830d6d147ed8e4b87d17e6ad4b7b
Fix quoting in gdb-add-index.sh

When the filename quoting change was merged into the AdaCore tree, we
saw a regression in a test setup that uses the DWARF 5 index (that is
running gdb-add-index), and a filename with a space in it.

Initially I thought this was a change in the 'file' command -- but
looking again, I found out that 'file' has worked this way for a
while, and our immediate error was caused by the (documented) change
to "save gdb-index".

While I'm not sure why this test was working previously, it seems to
me that gdb-add-index.sh requires a change to quote the arguments to
"file" and "save gdb-index".

While working on this, though, it seemed to me that multiple other
spots needed quoting for the script to work correctly.  And, I was
unable to get quoting working correctly in the objcopy calls, so I
split it into multiple different invocations.

Approved-by: Kevin Buettner <kevinb@redhat.com>
gdb/contrib/gdb-add-index.sh