[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `bash --debugger` in interactive mode
From: |
Techlive Zheng |
Subject: |
Re: `bash --debugger` in interactive mode |
Date: |
Mon, 20 Aug 2012 05:51:18 +0800 |
2012/8/20 Chet Ramey <address@hidden>:
> On 8/18/12 1:55 AM, 郑文辉(Techlive Zheng) wrote:
>> I happened to have `shopt -s extdebug` in my .bashrc recently.
>>
>> After a new bash session started, I got the following output.
>>
>> bash debugger, bashdb, release 4.2-0.8
>>
>> Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011
>> Rocky Bernstein
>> This is free software, covered by the GNU General Public License,
>> and you are
>> welcome to change it and/or distribute copies of it under certain
>> conditions.
>>
>> ** Internal debug error _Dbg_is_file(): file argument null
>> bash: _Dbg_filenames[$fullname]: bad array subscript
>>
>> I guess `--debugger` or `shopt -s extdebug` is not supposed to be run
>> under interactive mode?
>>
>> If so, maybe a detection should be done for this situation?
>
> Thanks for the report. I will put something in for the next bash release.
>
> Chet
>>
>
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/
I just want poin it out that there are some bash tricks which require
using `set -o functrace` and `shopt -s extdebug` in interactive mode
to make the DEBUG trap to be invoked in ( ) subshells, see
<https://github.com/revans/bash-it/blob/master/lib/preexec.bash#L115>,
maybe this is something that should be done in `bashdb`?