bug-bash
[Top][All Lists]
Advanced

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

Re: turning on file+line for functions with shopt -s extdebug gives erro


From: L A Walsh
Subject: Re: turning on file+line for functions with shopt -s extdebug gives error
Date: Wed, 27 Feb 2019 13:19:29 -0800
User-agent: Thunderbird


On 2/26/2019 7:00 AM, Chet Ramey wrote:
> On 2/25/19 3:15 PM, L A Walsh wrote:
>
>   
>> I don't see where function-tracing and error tracing are defined.
>>     
>
> set -o functrace/set -T
> set -o errtrace/set -E
>
>   
>> Are they defined "somewhere"?  Maybe a short note as to what they
>> are might be added to the manpage where the terms are used (under
>> description of shopt+extdebug)?
>>     
>
> They're described in the FUNCTIONS section, since they affect function
> behavior...
>
> 5.     Function tracing is  enabled:  command  substitu-
>        tion, shell functions, and subshells invoked with
>        ( command ) inherit the DEBUG and RETURN traps.
> 6.     Error tracing is enabled:  command  substitution,
>        shell  functions,  and  subshells  invoked with (
>        command ) inherit the ERR trap.
>
> To be clear, you're suggesting that I add something to the `extdebug'
> section to explain how these features can be enabled separately from
> `extdebug'?
----
 
  Not exactly, just that "set -o func/errtrace and -T/-F are under "set".

  A "forward pointer" to the behavior described under 'shopt-extdebug'
would be useful.  If you are reading from top to bottom, something
under "set-T" saying:

     "SEE ALSO, behavior description under 'shopt-extdebug', below"


===============


On 2/26/2019 4:26 PM, L A Walsh wrote:
> On 2/26/2019 7:00 AM, Chet Ramey wrote:
>   
>
>> The debugger is very impressive. It's a separate project, so you should
>> probably contact the author with your suggestions.
>>   
>>     
> Yes, think I mentioned that at the beginning of this chain.
>   
---
Actually said in 1st note & 2nd note of this chain:

On 2/25/2019 12:15 PM, L A Walsh wrote:
>  Nevertheless, despite its shortcomings, the debugger is impressive
> for what it does in pure shell.
>   
   and

On 2/25/2019 12:15 PM, L A Walsh wrote:
>  FWIW, I've found the debugger to be an impressive bit of
> of shell programming.
>   

================



   More important than the doc forward-definition suggestion, is the
ability for bash to toggle behaviors independent of invoking the
debugger (From (On 2/26/2019 4:26 PM, L A Walsh wrote:), reposting:)

The part about turning on filenames+line numbers for function definitions
is in bash.  If those aren't on, the debugger can't find them.

Also, the desire to retain the original source format of code is another
"in bash" issue.  Perhaps it could be tied or related to the turning on
of function definition locations.

Both of those are issues "in bash" before a bash debugger has ever
been invoked.

Thanks!
Linda

p.s. in regards to contacting the author of bashdb, I've left more than
one comment in the 'issues' section, though 1st time around I wasn't
clear enough in my communications (bet that is a surprise!-sigh).














reply via email to

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