]> git.ipfire.org Git - thirdparty/elfutils.git/commit
addr2line: -C should not try to handle optional (ignored) argument
authorMark Wielaard <mark@klomp.org>
Sun, 22 Jan 2023 19:50:53 +0000 (20:50 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 30 Jan 2023 21:01:48 +0000 (22:01 +0100)
commitc6b38c2d670f7db732a34fd8e65e94942801c0f8
tree4f499e420ed9316ef891e07e650464c82b094a83
parent8d77b719333fb47722a5684f9e0d3f23257346d3
addr2line: -C should not try to handle optional (ignored) argument

The --demangle option takes an option (ignored) argument. Since -C
is the short option of --demangle it also takes that optional
argument. But that means that something like -Cfi is like -C got
fi as argument, while the user expects -Cfi to be like -C -f -i.

Separate the --demangle and -C options. --demangle still takes
an optional (ignored) argument, but -C doesn't take any arguments
so -Cfi acts the same as -fiC.

Also fix --target, -b, so that it is properly ignored (and not
accidentially enables demangling).

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/addr2line.c
tests/ChangeLog
tests/Makefile.am
tests/run-addr2line-C-test.sh [new file with mode: 0755]