-
Notifications
You must be signed in to change notification settings - Fork 12
Expand filename shown in backtrace #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jansorg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this!
When I run this branch with my test sources, then I'm seeing this error.
I looked at it, but couldn't spot the problem.
For my review, only minor notes so far.
[jansorg@Island sources]$ ../../bashdb --style colorful -L ../.. main.bash
bash debugger, bashdb, release 5.2-1.1.2
Copyright 2002-2004, 2006-2012, 2014, 2016-2019, 2021, 2023-2024 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
../../lib/filecache.sh: Zeile 247: _Dbg_filenames["$fullname"]: Falscher Feldindex.
hello world
Debugged program terminated normally. Use q to quit or R to restart.
bashdb<0>
| adjusted_pos=$(_Dbg_frame_adjusted_pos 0) | ||
| filename=$(_Dbg_file_canonic "${BASH_SOURCE[$adjusted_pos]}") | ||
| filename="${BASH_SOURCE[$adjusted_pos]}" | ||
| resolved_filename="${_Dbg_file2canonic[$filename]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this have a local or typeset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are correct. Should be corrected now.
lib/file.sh
Outdated
| typeset dirname="${_Dbg_dir[i]}" | ||
| if [[ "$basename" == '\$cdir' ]] ; then | ||
| basename=$_Dbg_cdir | ||
| dirname=$_Dbg_cdir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are correct. Should be handled now.
lib/file.sh
Outdated
| dirname=$_Dbg_cdir | ||
| elif [[ "$basename" == '\$cwd' ]] ; then | ||
| basename=$(pwd) | ||
| dirname=$(pwd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are correct; this should be handled now.
Co-authored-by: Joachim Ansorg <github@ja-dev.eu>
|
Superseded by #54 |
Towards addressing problem in screenshot 1. Regression tests fail, so more work is needed.