[Top][All Lists]

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

turning on file+line for functions with shopt -s extdebug gives error

From: L A Walsh
Subject: turning on file+line for functions with shopt -s extdebug gives error
Date: Sun, 24 Feb 2019 18:39:54 -0800
User-agent: Thunderbird

This is odd....I wanted to turn on the file+line numbers on the function
defs...thought it might help the debugger as it gets confused when
functions are already in memory, but when I did that, now I get
a weird error on login:
/usr/share/bashdb/init/require.sh: line 17: _Dbg_requires: unbound variable

I looked at the file -- and could work around:
if [[ -z _Dbg_requires ]] ; then

with this:
if [[ -z ${_Dbg_requires:-""} ]] ; then

Even though later in the code it defines it to be a map(hash).

But once I did that, then I got:

/usr/share/bashdb/init/opts.sh: line 100: _Dbg_tmpdir: unbound variable

Am concerned I'll end up chasing a bunch of problems, but
more to the point -- why is it calling the bashdb anyway?

I looked under extdebug effects under shopt and don't see anything
about bashdb being invoked.

I do see something about "function tracing" and "error tracing"
being turned on == but couldn't find either of those words
defined in the rest of the manpage.

I saw that it might try to call a DEBUG trap, and if it didn't
return 0 unexpected things might happen, so made sure to install
a Trap handler with:
trap : DEBUG

which returns 0 all the time.

So why is bashdb being called?  Is it going to be updated?


reply via email to

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