[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't get debug info for functions with '[' in the name

From: PJ Eby
Subject: Can't get debug info for functions with '[' in the name
Date: Mon, 30 Oct 2017 14:56:19 -0400

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-musl
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-musl' -DCONF_MACHTYPE='x86_64-pc-linux-musl'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale'
uname output: Linux 2275e25ecf5a 4.11.12-200.fc25.x86_64 #1 SMP Fri
Jul 21 16:41:43 UTC 2017 x86_64 Linux
Machine Type: x86_64-pc-linux-musl

Bash Version: 4.4
Patch Level: 12
Release Status: release

declare -F fails if function name contains '[', even if it exists.
This makes it impossible to get the line number and file for such
functions, as it is only available via declare -F (*without* -p).
This bug appears to be in all versions of bash that have arrays
enabled; in 3.2 it just fails silently, without an error message.

shopt -s extdebug; declare -F some[name]

In builtins/declare.def, the strchr('[') should be &&'d with (flags_on
& att_function) == 0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]