]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
gen-cdef: compatibility with GDB 8.2+
authorPetr Špaček <petr.spacek@nic.cz>
Wed, 2 Jan 2019 13:56:07 +0000 (14:56 +0100)
committerPetr Špaček <petr.spacek@nic.cz>
Wed, 9 Jan 2019 09:07:45 +0000 (10:07 +0100)
scripts/gen-cdefs.sh

index 7fef241148c63b1f6af4803fe2eaea32ea2024e7..0627fa40bbc73fc7170edf7be297c546702c747f 100755 (executable)
@@ -58,6 +58,8 @@ grep -v '^#\|^$' | while read -r ident; do
        fi
        # LuaJIT FFI blows up on "uint" type
        output="$(echo "$output" | sed 's/\buint\b/unsigned int/g')"
+       # GDB 8.2+ added source line prefix to output
+       output="$(echo "$output" | sed 's/^[0-9]\+:[[:space:]]*//g')"
 
        # abort on empty output
        if [ -z "$(echo "$output" | tr -d "\n;")" ]; then