bug-bash
[Top][All Lists]
Advanced

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

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


From: Chet Ramey
Subject: Re: Can't get debug info for functions with '[' in the name
Date: Mon, 30 Oct 2017 16:32:03 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 10/30/17 2:56 PM, PJ Eby wrote:

> Bash Version: 4.4
> Patch Level: 12
> Release Status: release
> 
> Description:
> 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.
> 
> Repeat-By:
> shopt -s extdebug; declare -F some[name]
> 
> Fix:
> In builtins/declare.def, the strchr('[') should be &&'d with (flags_on
> & att_function) == 0

Thanks for the report; good catch.

Chet



-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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