File: dbg-main.inc.in

package info (click to toggle)
bashdb 3.1.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,252 kB
  • ctags: 117
  • sloc: sh: 4,880; pascal: 3,186; lisp: 484; makefile: 315; ansic: 294
file content (57 lines) | stat: -rw-r--r-- 2,115 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# dbg-main.inc - Bourne Again Shell Debugger Main Include

#   Copyright (C) 2002, 2003, 2004, 2005, 2006 Rocky Bernstein 
#   rockyb@users.sourceforge.net
#
#   Bash is free software; you can redistribute it and/or modify it under
#   the terms of the GNU General Public License as published by the Free
#   Software Foundation; either version 2, or (at your option) any later
#   version.
#
#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
#   for more details.
#   
#   You should have received a copy of the GNU General Public License along
#   with Bash; see the file COPYING.  If not, write to the Free Software
#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.

typeset -r _Dbg_main_ver=\
'$Id: dbg-main.inc.in,v 1.5 2007/10/14 03:53:24 rockyb Exp $'

# Are we using a debugger-enabled bash? If not let's stop right here.
if [[ -z "${BASH_SOURCE[0]}" ]] ; then 
  echo "Sorry, you need to use a debugger-enabled version of bash." 2>&1
  exit 2
fi

# $_Dbg_libdir could have been set by bashdb script.
# If not, set if "bash --debugger"
prefix=@prefix@  # cygwin gets PKGDATADIR wrong
[ -z $_Dbg_libdir ] && typeset _Dbg_libdir=@PKGDATADIR@

# Note: "init" comes first and "cmds" has to come after "io". Otherwise 
# these are sorted alphabetically.
typeset -r _Dbg_includes="init brk complete file fns help hist info log io 
cmds commands list stack set show sig"

for file in $_Dbg_includes ; do 
  source ${_Dbg_libdir}/dbg-${file}.inc
done

if [[ ${_Dbg_libdir:0:1} == '.' ]] ; then
    # Relative file name
    _Dbg_libdir=$(_Dbg_expand_filename ${_Dbg_init_cwd}/${_Dbg_libdir})
fi

[ -n "$BASHDB_RESTART_FILE" ] \
   && [ -r "$BASHDB_RESTART_FILE" ] &&  source $BASHDB_RESTART_FILE

trap '_Dbg_debug_trap_handler 0 "$BASH_COMMAND" "$@"' DEBUG
# echo '*** we were here***'  # uncomment to test that we were run.

#;;; Local Variables: ***
#;;; mode:shell-script ***
#;;; eval: (sh-set-shell "bash") ***
#;;; End: ***