diff --git a/command/backtrace.sh b/command/backtrace.sh index 4e1564c..4e8bba7 100644 --- a/command/backtrace.sh +++ b/command/backtrace.sh @@ -129,7 +129,8 @@ function _Dbg_do_backtrace { if (( frame_start == 0 )) ; then ((count--)) ; adjusted_pos=$(_Dbg_frame_adjusted_pos 0) - filename=$(_Dbg_file_canonic "${BASH_SOURCE[$adjusted_pos]}") + filename=$(_Dbg_resolve_expand_filename "${BASH_SOURCE[$adjusted_pos]}") + filename=$(_Dbg_adjust_filename "$filename") _Dbg_frame_print $(_Dbg_frame_prefix 0) '0' '' "$filename" "$_Dbg_frame_last_lineno" '' fi @@ -168,7 +169,8 @@ function _Dbg_do_backtrace { else lineno=${BASH_LINENO[$adjusted_pos-1]} fi - filename=$(_Dbg_file_canonic "${BASH_SOURCE[$adjusted_pos]}") + filename=$(_Dbg_resolve_expand_filename "${BASH_SOURCE[$adjusted_pos]}") + filename=$(_Dbg_adjust_filename "$filename") _Dbg_msg "($_Dbg_parm_str) called from file \`$filename'" "at line $lineno" if (( show_source )) ; then _Dbg_get_source_line $lineno "${BASH_SOURCE[$adjusted_pos]}" diff --git a/command/load.sh b/command/load.sh index cd3591e..d83be41 100644 --- a/command/load.sh +++ b/command/load.sh @@ -2,7 +2,7 @@ # Debugger load SCRIPT command. # # Copyright (C) 2002-2006, 2008, 2010-2011, 2018-2019 Rocky -# Bernstein +# 2024 Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -54,6 +54,8 @@ _Dbg_do_load() { _Dbg_readin "$_Dbg_full_filename" _Dbg_msg "File $_Dbg_full_filename loaded." + _Dbg_file2canonic["${_Dbg_filename}"]="$_Dbg_full_filename" + else _Dbg_errmsg "Couldn't resolve or read $_Dbg_filename" return 3