summaryrefslogtreecommitdiff
path: root/lib/perl5db.pl
Commit message (Collapse)AuthorAgeFilesLines
* end of file (^D on POSIX-likes) now behaves like q as documentedTony Cook2022-10-171-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was originally reported againt 5.36.0 where ^D would act more like 'n' than 'q': $ ~/perl/v5.36.0-clang14/bin/perl -lde 'print 1; print 2; print 3;' Loading DB routines from perl5db.pl version 1.73 Editor support available. Enter h or 'h h' for help, or 'man perldebug' for more help. main::(-e:1): print 1; print 2; print 3; DB<1> 1 main::(-e:1): print 1; print 2; print 3; DB<1> 2 main::(-e:1): print 1; print 2; print 3; DB<1> 3 (^D at each prompt) Post 80c1f1e4 this behaved a little differently, since reading ^D from the stream now sets the eof() flag readline() would return immediately after each attempt, instead of reading a command. This produced the same output as above, but only required a single ^D. But neither of these is correct, both 'q' and ^D are documented to exit the debugger, and 'q' does that, this changes eof to also exit the debugger. Unfortunately the perl5db test infrastructure doesn't support testing this, and due to the way the debugger interacts with the terminal, I don't think this is easily tested in core. I think a module like Expect or IPC::Run that can interact with a terminal would be needed.
* perl5db.pl: SpellingElvin Aslanov2022-08-051-3/+3
| | | | | | `R` command: pure man -> poor man Probably meant that: https://en.wiktionary.org/wiki/poor_man%27s#English
* Typo in "y" (PadWalker) command descriptionElvin Aslanov2022-08-041-2/+2
| | | | | | | | Fix: then -> them Also corrected "dumpvar.pl" to be rendered as a file name in POD rather than code/command. https://perldoc.perl.org/perlpod#F-used-for-filenames Bumped Perl Debugger version to pass t/porting/cmp-version.t test
* perl5dp.pl: Bump versionKarl Williamson2022-06-081-1/+1
|
* perl5db.pl: Make hyperlink in podKarl Williamson2022-06-081-1/+2
|
* lib/perl5db.pl: Give proper pod linksKarl Williamson2022-05-041-3/+7
| | | | These internal references are linkable
* lib/perl5db.pl: Add some S<> to podKarl Williamson2022-05-041-13/+14
| | | | | | | | I added these to surround some C<...> that have spaces so that the output construct is guaranteed to be on a single line. These are mostly commands to type, and it is clearer to the reader if they kept together. I didn't bother with things that were guaranteed to be at the beginning of a line, as they won't wrap anyway.
* Bump $VERSION in perl5db.plJames E Keenan2022-03-271-1/+1
|
* Perl5DB: Rmv ASCII dependencyKarl Williamson2022-03-261-4/+7
|
* Remove use of experimental regex sets warningsKarl Williamson2022-03-191-2/+1
| | | | | | | | These warnings are no longer generated; so simplify the core by not trying to turn them off. The warning is preserved so that other code need not change, but this commit also turns the default generation of it off.
* perl5db.pl needs to use :prototype() attribute to set sub prototypesPaul "LeoNerd" Evans2022-02-201-3/+3
|
* Stop setting console to "con" on non-MSWin systemsE. Choroba2022-01-191-3/+3
| | | | | | | | The condition has existed since eternity but it never made sense. Only use "con" if $^O eq 'MSWin32'. Also, remove MSDOS from the comment: it's the last forgotten mention of the OS in the whole file.
* Replace 'slave' with 'client'James E Keenan2021-12-241-33/+34
| | | | | | | | | | | | | This commit moves us a step forward on eliminating 'master/slave' terminology. Its scope is limited to those files within the Perl 5 core distribution which are not CPAN-upstream. Within that scope, we leave untouched the use of the term 'slave' in epigraphs and other literary quotations and its use in data coming from outside sources (e.g., Unicode code points). Increment $VERSION in lib/perl5db.pl. Revisions per rjbs feedback. For: https://github.com/Perl/perl5/pull/19227
* Remove DOS/DJGPP supportDagfinn Ilmari Mannsåker2021-11-021-3/+3
| | | | | | DJGPP is a port of the GNU toolchain to 32-bit x86 systems running DOS. The last known attempt to build Perl on it was on 5.20, which only got as far as building miniperl.
* Remove NetWare supportDagfinn Ilmari Mannsåker2021-10-081-8/+2
| | | | The build has been broken since 2009.
* Remove the last traces of the no longer existing cmd_l commandE. Choroba2021-10-071-4/+4
| | | | cmd_l was still mentioned in the documentation and comments.
* bump perl5db.pl $VERSION to 1.61Tony Cook2021-06-221-1/+1
|
* fix comment.Atsushi SUGAWARA2021-06-221-1/+1
|
* lib/perl5db.pl: cmd_l() no longer exists.Atsushi SUGAWARA2021-06-221-1/+1
| | | | | Subroutine cmd_l() no longer exists. Now we should call cmd_l_main().
* bump perl5db.pl's $VERSIONTony Cook2020-12-091-1/+1
|
* Allow debugger aliases that start with '-' and '.'jkahrman2020-12-091-1/+1
| | | | | Since the '.' and '-' commands don't take any arguments and don't run if any are provided, don't treat commands starting with these characters as the single commands '.' and '-'. Restores behavior that existed prior to https://github.com/Perl/perl5/commit/7fdd4f080863703d44282c6988834455d129040 (v5.27) at least back to v5.8.8 https://github.com/Perl/perl5/commit/7fdd4f080863703d44282c6988834455d129040
* perl5db.pl - remove redundant share()Richard Leach2020-10-141-1/+0
|
* Add crosslinks between perl5db.pl and perldebug-related docsDan Book2020-10-081-1/+3
|
* fix `l $var` where $var is a lexical variableTony Cook2020-08-101-273/+276
| | | | | As with `i $obj` the DB::Obj in the call stack prevented DB::eval from compiling/executing in the context of the debugged code.
* fix C<i $obj> where $obj is a lexicalTony Cook2020-08-101-32/+33
| | | | | | | | | | | | | | | the DB::eval function depends on the special behaviour of eval "" within the DB package, which evaluates the string within the context of the first non-DB sub or eval scope, working up the call stack. The debugger refactor moved handling for the 'i' command from the DB package to the DB::Obj package, so the eval in DB::eval was working in the context of the DB::Obj::cmd_i function, not in the calling scope. Fixed by moving the handling for the i command back to DB. Fixes #17661.
* perl5db: allow the recorded history item length to be configuredRicardo Signes2020-07-301-6/+6
| | | | | | | | | | | | | This requires a few small changes. 1. add a new option, which I stored in what looked like one of the standard ways 2. only store the item in terminal history if >= this length 3. only add to @hist if >= this length 4. only display hist item if >= this length I believe #4 is redundant and should be removed, but the code was already effectively there.
* Clearing DB::action at the end is no longer neededE. Choroba2020-07-301-4/+0
| | | | as it's cleared right after it's been run.
* After running an action in the debugger, turn it offE. Choroba2020-07-301-1/+2
| | | | | | | When running with "c", there was no problem, but when running with "n" or "s", once the action was executed, it kept executing on the following lines, which wasn't expected. Clearing $action here prevents this unwanted behaviour.
* Fix a bunch of repeated-word typosDagfinn Ilmari Mannsåker2020-05-221-3/+3
| | | | | Mostly in comments and docs, but some in diagnostic messages and one case of 'or die die'.
* perl5db.pl: the "i" command must load mro.pm before useRicardo Signes2020-03-231-1/+4
|
* (perl #124203) fix a similar problem with DB::lsubTony Cook2019-03-081-24/+25
|
* bump $DB::VERSION for perl5db.pl to 1.55Tony Cook2019-03-081-1/+1
|
* (perl #124203) avoid a deadlock in DB::subTony Cook2019-03-081-104/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't know how this ever worked. Previously, DB::sub() would hold a lock on $DB::DBGR for it's entire body, including the call to the subroutine being called. This could cause problems in two cases: a) on creation of a new thread, CLONE() is called in the context of the new interpreter before the new thread is created. So you'd have a sequence like: threads->new DB::sub for threads::new (lock $DBGR) call into threads::new which creates a new interpreter Cwd::CLONE() (in the new interpreter) DB::sub for Cwd::CLONE (in the new interpreter) (deadlock trying to lock $DBGR) One workaround I tried for this was to prevent pp_entersub calling DB::sub if we were cloning (by checking PL_ptr_table). This did improve matters, but wasn't needed in the final patch. Note that the recursive lock on $DBGR would have been fine if the new code was executing in the same interpreter, since the locking code simply bumps a reference count if the current interpreter already holds the lock. b) when the called subroutine blocks. For the test case this could happen with the call to $thr->join. There would be a sequence like: (parent) $thr->join (parent) DB::sub for threads::join (lock $DBGR) (parent) call threads::join and block (child) try to call main::sub1 (child) DB::sub for main::sub1 (deadlock trying to lock $DBGR) This isn't limited to threads::join obviously, one thread could be waiting for input, sleeping, or performing a complex calculation. The solution I chose here was the obvious one - don't hold the lock for the actual call. This required some rearrangement of the code and removed some duplication too.
* fix typosAlexandr Savca2018-10-091-2/+2
| | | | | | | | Committer: For porting tests: Update $VERSION in 4 files. Run: ./perl -Ilib regen/mk_invlists.pl ./perl -Ilib regen/regcharclass.pl
* lib/perl5db.pl: don't dump argless argsDavid Mitchell2017-11-151-8/+4
| | | | | | | | | | | | | | | | | | | | dump_trace() prints a stack backtrace - including caller args - by using caller() and @DB::args. However, if a sub is called using the '&foo;' argless mechanism, caller() doesn't populate @DB::args, so it continues to hold whatever it was set to previously. This might include SVs which have since been freed or re-allocated. So only display args for a particular caller depth if that sub was called with args. This was causing smoke failures in lib/perl5db.t when TERM was unset. It only started failing recently, due I guess to subtle changes in what SVs were left hanging about in @DB::args from a previous use of caller(). See http://nntp.perl.org/group/perl.perl5.porters/247032 Subject: Smoke FAIL's for lib/perl5db.t
* Debugger cmds not requiring spacesSmylers2017-09-301-2/+5
| | | | | | | | | | | | | Make debugger commands like these work again, not requiring a space between a single-letter command and a following argument which starts with punctuation: p$^V x@ARGV x\@ARGV x\%INC Regressions were in d478d7a0 and 8f144dfc.
* RT#113960: perl5db should ignore /dev/tty on non-Unix systemsJames E Keenan2017-01-041-8/+11
| | | | | | | | | If a Win32 system happens to have a \dev\tty file at the root of the current drive, we were incorrectly treating that as an indicator that the system is in fact Unix-like. Fix this by looking at the filesystem for that file only after considering all the OS platforms that we know aren't Unix-like in that way.
* Switch most open() calls to three-argument form.John Lightsey2016-12-231-9/+9
| | | | | | | | | | Switch from two-argument form. Filehandle cloning is still done with the two argument form for backward compatibility. Committer: Get all porting tests to pass. Increment some $VERSIONs. Run: ./perl -Ilib regen/mk_invlists.pl; ./perl -Ilib regen/regcharclass.pl For: RT #130122
* bump perl5db.pl's $VERSIONTony Cook2016-07-261-1/+2
| | | | | | Add a note about version numbering, since if we use X.XX_XX versions in blead it's harder to find an unused version number if the module is modified in maint.
* perl5db.pl: ensure PadWalker is loaded from standard pathsTony Cook2016-07-261-2/+8
|
* lib/perl5db.pl: Fix pod error.Karl Williamson2016-04-231-2/+2
|
* perl5db.pl version bumpJarkko Hietaniemi2016-03-021-1/+1
|
* Defaulting to VMS is probably not right.Jarkko Hietaniemi2016-03-021-3/+8
|
* amigaos4: use CONSOLE:, not VMS sys$commandAndy Broad2016-03-021-0/+8
|
* Ensure 'q' works in debugger with RemotePort.Shlomi Fish2015-12-021-2/+7
| | | | | | Patch submitted by Shlomi Fish. For: RT #126735
* Fix RT#71678 (-d a command after exit) with a test.Shlomi Fish2015-06-031-1/+4
| | | | | Credits to Heiko Eissfeldt for the reported bug, the test program and a proposed fix.
* bump perl5db.pl's $VERSIONTony Cook2015-04-161-1/+1
|
* lib/perl5db.pl: Restore noop lock prototypeJames McCoy2015-04-161-0/+1
| | | | | | | | | | | | | | | | | | cde405a6b9b86bd8110f63531b42d89590a4c56e removed the lock prototype "because it's already a do-nothing weak keyword without threads". However, that causes "perl -d threaded-script.pl" to complain lock can only be used on shared values at /usr/share/perl/5.20/perl5db.pl line 4101. BEGIN failed--compilation aborted at threaded-script.pl line 2. lock can only be used on shared values at /usr/share/perl/5.20/perl5db.pl line 2514. END failed--call queue aborted at threaded-script.pl line 2. Unbalanced scopes: 3 more ENTERs than LEAVEs because threaded-script.pl's importing of threads::shared enable's lock()'s non-noop behavior. Restoring the lock() prototype fixes the inconsistency between lock() and share() usage. Signed-off-by: James McCoy <vega.james@gmail.com>
* lib/perl5db.pl: Fix pod typoKarl Williamson2015-03-191-1/+1
|
* lib/perl5db.pl: Generalize for EBCDICKarl Williamson2015-03-191-2/+4
|