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: Sun, 03 Mar 2019 07:00:57 -0800
User-agent: Thunderbird


On 3/1/2019 6:15 PM, Robert Elz wrote:
>     Date:        Fri, 1 Mar 2019 11:00:41 -0500
>     From:        Chet Ramey <chet.ramey@case.edu>
>     Message-ID:  <91e964e9-a7e3-4f4e-ae9f-9ff3e3627bce@case.edu>
>
>   | It's wasteful and not particularly useful to have
>   | the function definition text stored internally when you can regenerate an
>   | equivalent form from the compiled function definition.
>
> I actually much prefer to see the shell regenerated form - if I want the
> original I have the sources, but seeing the shell "reverse compiled" form
> gives a different perspective to the code, and sometimes allows bugs to be
> made obvious which get hidden by the formatting of the original.
>   
----
    To be clear, I've never suggested getting rid of the reformatted
display,
but if you are looking for the source of a bug, and single stepping through
the program, it does help if what you see matches what is in the file.

     Also, the source file may not no longer correspond to the reformatted
version it may have:

-  been moved, unmounted or mounted over,
-  been edited, (or)
-  be inaccessible due to a change in access.

    You think you have sources, but how many times have you entered
a script before it was written to disk, for example?







reply via email to

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