(lp1 (ccopy_reg _reconstructor p2 (cpygments.token _TokenType p3 c__builtin__ tuple p4 (S'Comment' p5 S'Multiline' p6 ttRp7 (dp8 S'subtypes' p9 c__builtin__ set p10 ((ltRp11 sS'parent' p12 g2 (g3 g4 (g5 ttRp13 (dp14 g12 g2 (g3 g4 (ttRp15 (dp16 g5 g13 sS'Name' p17 g2 (g3 g4 (g17 ttRp18 (dp19 S'Function' p20 g2 (g3 g4 (g17 g20 ttRp21 (dp22 g9 g10 ((ltRp23 sg12 g18 sbsS'Exception' p24 g2 (g3 g4 (g17 g24 ttRp25 (dp26 g9 g10 ((ltRp27 sg12 g18 sbsS'Tag' p28 g2 (g3 g4 (g17 g28 ttRp29 (dp30 g9 g10 ((ltRp31 sg12 g18 sbsS'Constant' p32 g2 (g3 g4 (g17 g32 ttRp33 (dp34 g9 g10 ((ltRp35 sg12 g18 sbsg12 g15 sS'Pseudo' p36 g2 (g3 g4 (g17 g36 ttRp37 (dp38 g9 g10 ((ltRp39 sg12 g18 sbsS'Attribute' p40 g2 (g3 g4 (g17 g40 ttRp41 (dp42 g9 g10 ((ltRp43 sg12 g18 sbsS'Label' p44 g2 (g3 g4 (g17 g44 ttRp45 (dp46 g9 g10 ((ltRp47 sg12 g18 sbsS'Blubb' p48 g2 (g3 g4 (g17 g48 ttRp49 (dp50 g9 g10 ((ltRp51 sg12 g18 sbsS'Entity' p52 g2 (g3 g4 (g17 g52 ttRp53 (dp54 g9 g10 ((ltRp55 sg12 g18 sbsS'Builtin' p56 g2 (g3 g4 (g17 g56 ttRp57 (dp58 g9 g10 ((lp59 g2 (g3 g4 (g17 g56 g36 ttRp60 (dp61 g9 g10 ((ltRp62 sg12 g57 sbatRp63 sg36 g60 sg12 g18 sbsS'Other' p64 g2 (g3 g4 (g17 g64 ttRp65 (dp66 g9 g10 ((ltRp67 sg12 g18 sbsS'Identifier' p68 g2 (g3 g4 (g17 g68 ttRp69 (dp70 g9 g10 ((ltRp71 sg12 g18 sbsS'Variable' p72 g2 (g3 g4 (g17 g72 ttRp73 (dp74 g12 g18 sS'Global' p75 g2 (g3 g4 (g17 g72 g75 ttRp76 (dp77 g9 g10 ((ltRp78 sg12 g73 sbsS'Instance' p79 g2 (g3 g4 (g17 g72 g79 ttRp80 (dp81 g9 g10 ((ltRp82 sg12 g73 sbsS'Anonymous' p83 g2 (g3 g4 (g17 g72 g83 ttRp84 (dp85 g9 g10 ((ltRp86 sg12 g73 sbsg9 g10 ((lp87 g84 ag80 ag76 ag2 (g3 g4 (g17 g72 S'Class' p88 ttRp89 (dp90 g9 g10 ((ltRp91 sg12 g73 sbatRp92 sg88 g89 sbsg9 g10 ((lp93 g2 (g3 g4 (g17 S'Decorator' p94 ttRp95 (dp96 g9 g10 ((ltRp97 sg12 g18 sbag41 ag33 ag37 ag2 (g3 g4 (g17 S'Namespace' p98 ttRp99 (dp100 g9 g10 ((ltRp101 sg12 g18 sbag69 ag57 ag73 ag65 ag49 ag53 ag21 ag2 (g3 g4 (g17 S'Property' p102 ttRp103 (dp104 g9 g10 ((ltRp105 sg12 g18 sbag45 ag29 ag25 ag2 (g3 g4 (g17 g88 ttRp106 (dp107 g9 g10 ((ltRp108 sg12 g18 sbatRp109 sg102 g103 sg88 g106 sg94 g95 sg98 g99 sbsS'Keyword' p110 g2 (g3 g4 (g110 ttRp111 (dp112 S'Pervasive' p113 g2 (g3 g4 (g110 g113 ttRp114 (dp115 g9 g10 ((ltRp116 sg12 g111 sbsg32 g2 (g3 g4 (g110 g32 ttRp117 (dp118 g9 g10 ((ltRp119 sg12 g111 sbsg12 g15 sg98 g2 (g3 g4 (g110 g98 ttRp120 (dp121 g9 g10 ((ltRp122 sg12 g111 sbsg36 g2 (g3 g4 (g110 g36 ttRp123 (dp124 g9 g10 ((ltRp125 sg12 g111 sbsS'Reserved' p126 g2 (g3 g4 (g110 g126 ttRp127 (dp128 g9 g10 ((ltRp129 sg12 g111 sbsS'Declaration' p130 g2 (g3 g4 (g110 g130 ttRp131 (dp132 g9 g10 ((ltRp133 sg12 g111 sbsg72 g2 (g3 g4 (g110 g72 ttRp134 (dp135 g9 g10 ((ltRp136 sg12 g111 sbsg9 g10 ((lp137 g117 ag127 ag2 (g3 g4 (g110 S'Type' p138 ttRp139 (dp140 g9 g10 ((ltRp141 sg12 g111 sbag114 ag131 ag134 ag120 ag123 atRp142 sg138 g139 sbsS'Generic' p143 g2 (g3 g4 (g143 ttRp144 (dp145 S'Prompt' p146 g2 (g3 g4 (g143 g146 ttRp147 (dp148 g9 g10 ((ltRp149 sg12 g144 sbsg12 g15 sS'Deleted' p150 g2 (g3 g4 (g143 g150 ttRp151 (dp152 g9 g10 ((ltRp153 sg12 g144 sbsS'Traceback' p154 g2 (g3 g4 (g143 g154 ttRp155 (dp156 g9 g10 ((ltRp157 sg12 g144 sbsS'Emph' p158 g2 (g3 g4 (g143 g158 ttRp159 (dp160 g9 g10 ((ltRp161 sg12 g144 sbsS'Output' p162 g2 (g3 g4 (g143 g162 ttRp163 (dp164 g9 g10 ((ltRp165 sg12 g144 sbsS'Subheading' p166 g2 (g3 g4 (g143 g166 ttRp167 (dp168 g9 g10 ((ltRp169 sg12 g144 sbsS'Error' p170 g2 (g3 g4 (g143 g170 ttRp171 (dp172 g9 g10 ((ltRp173 sg12 g144 sbsg9 g10 ((lp174 g163 ag159 ag171 ag167 ag155 ag151 ag2 (g3 g4 (g143 S'Heading' p175 ttRp176 (dp177 g9 g10 ((ltRp178 sg12 g144 sbag2 (g3 g4 (g143 S'Inserted' p179 ttRp180 (dp181 g9 g10 ((ltRp182 sg12 g144 sbag2 (g3 g4 (g143 S'Strong' p183 ttRp184 (dp185 g9 g10 ((ltRp186 sg12 g144 sbag147 atRp187 sg183 g184 sg179 g180 sg175 g176 sbsS'Text' p188 g2 (g3 g4 (g188 ttRp189 (dp190 g9 g10 ((lp191 g2 (g3 g4 (g188 S'Symbol' p192 ttRp193 (dp194 g9 g10 ((ltRp195 sg12 g189 sbag2 (g3 g4 (g188 S'Whitespace' p196 ttRp197 (dp198 g9 g10 ((ltRp199 sg12 g189 sbatRp200 sg192 g193 sg196 g197 sg12 g15 sbsS'Punctuation' p201 g2 (g3 g4 (g201 ttRp202 (dp203 g9 g10 ((lp204 g2 (g3 g4 (g201 S'Indicator' p205 ttRp206 (dp207 g9 g10 ((ltRp208 sg12 g202 sbatRp209 sg205 g206 sg12 g15 sbsS'Token' p210 g15 sS'Number' p211 g2 (g3 g4 (S'Literal' p212 g211 ttRp213 (dp214 S'Bin' p215 g2 (g3 g4 (g212 g211 g215 ttRp216 (dp217 g9 g10 ((ltRp218 sg12 g213 sbsS'Binary' p219 g2 (g3 g4 (g212 g211 g219 ttRp220 (dp221 g9 g10 ((ltRp222 sg12 g213 sbsg12 g2 (g3 g4 (g212 ttRp223 (dp224 S'String' p225 g2 (g3 g4 (g212 g225 ttRp226 (dp227 S'Regex' p228 g2 (g3 g4 (g212 g225 g228 ttRp229 (dp230 g9 g10 ((ltRp231 sg12 g226 sbsS'Interpol' p232 g2 (g3 g4 (g212 g225 g232 ttRp233 (dp234 g9 g10 ((ltRp235 sg12 g226 sbsS'Regexp' p236 g2 (g3 g4 (g212 g225 g236 ttRp237 (dp238 g9 g10 ((ltRp239 sg12 g226 sbsg12 g223 sS'Heredoc' p240 g2 (g3 g4 (g212 g225 g240 ttRp241 (dp242 g9 g10 ((ltRp243 sg12 g226 sbsS'Double' p244 g2 (g3 g4 (g212 g225 g244 ttRp245 (dp246 g9 g10 ((ltRp247 sg12 g226 sbsg192 g2 (g3 g4 (g212 g225 g192 ttRp248 (dp249 g9 g10 ((ltRp250 sg12 g226 sbsS'Escape' p251 g2 (g3 g4 (g212 g225 g251 ttRp252 (dp253 g9 g10 ((ltRp254 sg12 g226 sbsS'Character' p255 g2 (g3 g4 (g212 g225 g255 ttRp256 (dp257 g9 g10 ((ltRp258 sg12 g226 sbsS'Interp' p259 g2 (g3 g4 (g212 g225 g259 ttRp260 (dp261 g9 g10 ((ltRp262 sg12 g226 sbsS'Backtick' p263 g2 (g3 g4 (g212 g225 g263 ttRp264 (dp265 g9 g10 ((ltRp266 sg12 g226 sbsS'Char' p267 g2 (g3 g4 (g212 g225 g267 ttRp268 (dp269 g9 g10 ((ltRp270 sg12 g226 sbsS'Single' p271 g2 (g3 g4 (g212 g225 g271 ttRp272 (dp273 g9 g10 ((ltRp274 sg12 g226 sbsg64 g2 (g3 g4 (g212 g225 g64 ttRp275 (dp276 g9 g10 ((ltRp277 sg12 g226 sbsS'Doc' p278 g2 (g3 g4 (g212 g225 g278 ttRp279 (dp280 g9 g10 ((ltRp281 sg12 g226 sbsg9 g10 ((lp282 g275 ag2 (g3 g4 (g212 g225 S'Atom' p283 ttRp284 (dp285 g9 g10 ((ltRp286 sg12 g226 sbag245 ag268 ag260 ag279 ag241 ag264 ag233 ag248 ag237 ag229 ag272 ag256 ag252 atRp287 sg283 g284 sbsg12 g15 sg211 g213 sS'Scalar' p288 g2 (g3 g4 (g212 g288 ttRp289 (dp290 g9 g10 ((lp291 g2 (g3 g4 (g212 g288 S'Plain' p292 ttRp293 (dp294 g9 g10 ((ltRp295 sg12 g289 sbatRp296 sg12 g223 sg292 g293 sbsg64 g2 (g3 g4 (g212 g64 ttRp297 (dp298 g9 g10 ((ltRp299 sg12 g223 sbsS'Date' p300 g2 (g3 g4 (g212 g300 ttRp301 (dp302 g9 g10 ((ltRp303 sg12 g223 sbsg9 g10 ((lp304 g301 ag226 ag297 ag213 ag289 atRp305 sbsS'Decimal' p306 g2 (g3 g4 (g212 g211 g306 ttRp307 (dp308 g9 g10 ((ltRp309 sg12 g213 sbsS'Float' p310 g2 (g3 g4 (g212 g211 g310 ttRp311 (dp312 g9 g10 ((ltRp313 sg12 g213 sbsS'Hex' p314 g2 (g3 g4 (g212 g211 g314 ttRp315 (dp316 g9 g10 ((ltRp317 sg12 g213 sbsS'Integer' p318 g2 (g3 g4 (g212 g211 g318 ttRp319 (dp320 g9 g10 ((lp321 g2 (g3 g4 (g212 g211 g318 S'Long' p322 ttRp323 (dp324 g9 g10 ((ltRp325 sg12 g319 sbatRp326 sg322 g323 sg12 g213 sbsS'Octal' p327 g2 (g3 g4 (g212 g211 g327 ttRp328 (dp329 g9 g10 ((ltRp330 sg12 g213 sbsg9 g10 ((lp331 g216 ag220 ag328 ag307 ag2 (g3 g4 (g212 g211 S'Oct' p332 ttRp333 (dp334 g9 g10 ((ltRp335 sg12 g213 sbag319 ag311 ag315 atRp336 sg332 g333 sbsg212 g223 sg64 g2 (g3 g4 (g64 ttRp337 (dp338 g9 g10 ((ltRp339 sg12 g15 sbsg170 g2 (g3 g4 (g170 ttRp340 (dp341 g9 g10 ((ltRp342 sg12 g15 sbsS'Operator' p343 g2 (g3 g4 (g343 ttRp344 (dp345 g9 g10 ((lp346 g2 (g3 g4 (g343 S'Word' p347 ttRp348 (dp349 g9 g10 ((ltRp350 sg12 g344 sbatRp351 sg347 g348 sg12 g15 sbsg9 g10 ((lp352 g13 ag340 ag144 ag189 ag18 ag202 ag111 ag223 ag344 ag337 atRp353 sg225 g226 sbsS'Preproc' p354 g2 (g3 g4 (g5 g354 ttRp355 (dp356 g9 g10 ((ltRp357 sg12 g13 sbsg271 g2 (g3 g4 (g5 g271 ttRp358 (dp359 g9 g10 ((ltRp360 sg12 g13 sbsg6 g7 sg9 g10 ((lp361 g2 (g3 g4 (g5 S'Special' p362 ttRp363 (dp364 g9 g10 ((ltRp365 sg12 g13 sbag355 ag358 ag7 atRp366 sg362 g363 sbsbV=head1 NAME \u000a\u000aperl5db.pl - the perl debugger\u000a\u000a=head1 SYNOPSIS\u000a\u000a perl -d your_Perl_script\u000a\u000a=head1 DESCRIPTION\u000a\u000aAfter this routine is over, we don't have user code executing in the debugger's\u000acontext, so we can use C freely.\u000a\u000a=cut p367 tp368 a(g189 V\u000a\u000a p369 tp370 a(g358 V############################################## Begin lexical danger zone p371 tp372 a(g189 V\u000a\u000a p373 tp374 a(g358 V# 'my' variables used here could leak into (that is, be visible in) p375 tp376 a(g189 V\u000a tp377 a(g358 V# the context that the code being evaluated is executing in. This means that p378 tp379 a(g189 V\u000a tp380 a(g358 V# the code could modify the debugger's variables. p381 tp382 a(g189 V\u000a tp383 a(g358 V# tp384 a(g189 V\u000a tp385 a(g358 V# Fiddling with the debugger's context could be Bad. We insulate things as p386 tp387 a(g189 V\u000a tp388 a(g358 V# much as we can. p389 tp390 a(g189 V\u000a\u000a p391 tp392 a(g111 Vsub p393 tp394 a(g21 Veval p395 tp396 a(g189 V tp397 a(g202 V{ tp398 a(g189 V\u000a\u000a p399 tp400 a(g358 V# 'my' would make it visible from user code p401 tp402 a(g189 V\u000a p403 tp404 a(g358 V# but so does local! --tchrist p405 tp406 a(g189 V\u000a p407 tp408 a(g358 V# Remember: this localizes @DB::res, not @main::res. p409 tp410 a(g189 V\u000a p411 tp412 a(g57 Vlocal p413 tp414 a(g189 V tp415 a(g73 V@ tp416 a(g73 Vres p417 tp418 a(g202 V; tp419 a(g189 V\u000a p420 tp421 a(g202 V{ tp422 a(g189 V\u000a\u000a p423 tp424 a(g358 V# Try to keep the user code from messing with us. Save these so that p425 tp426 a(g189 V\u000a p427 tp428 a(g358 V# even if the eval'ed code changes them, we can put them back again. p429 tp430 a(g189 V\u000a p431 tp432 a(g358 V# Needed because the user could refer directly to the debugger's p433 tp434 a(g189 V\u000a p435 tp436 a(g358 V# package globals (and any 'my' variables in this containing scope) p437 tp438 a(g189 V\u000a p439 tp440 a(g358 V# inside the eval(), and we want to try to stay safe. p441 tp442 a(g189 V\u000a p443 tp444 a(g57 Vlocal p445 tp446 a(g189 V tp447 a(g73 V$ tp448 a(g73 Votrace p449 tp450 a(g189 V p451 tp452 a(g344 V= tp453 a(g189 V tp454 a(g73 V$ tp455 a(g73 Vtrace p456 tp457 a(g202 V; tp458 a(g189 V\u000a p459 tp460 a(g57 Vlocal p461 tp462 a(g189 V tp463 a(g73 V$ tp464 a(g73 Vosingle p465 tp466 a(g189 V tp467 a(g344 V= tp468 a(g189 V tp469 a(g73 V$ tp470 a(g73 Vsingle p471 tp472 a(g202 V; tp473 a(g189 V\u000a p474 tp475 a(g57 Vlocal p476 tp477 a(g189 V tp478 a(g73 V$ tp479 a(g73 Vod p480 tp481 a(g189 V p482 tp483 a(g344 V= tp484 a(g189 V tp485 a(g76 V$^D p486 tp487 a(g202 V; tp488 a(g189 V\u000a\u000a p489 tp490 a(g358 V# Untaint the incoming eval() argument. p491 tp492 a(g189 V\u000a p493 tp494 a(g202 V{ tp495 a(g189 V tp496 a(g202 V( tp497 a(g73 V$ tp498 a(g73 Vevalarg p499 tp500 a(g202 V) tp501 a(g189 V tp502 a(g344 V= tp503 a(g189 V tp504 a(g73 V$ tp505 a(g73 Vevalarg p506 tp507 a(g189 V tp508 a(g344 V=~ p509 tp510 a(g229 V /(.*)/s p511 tp512 a(g202 V; tp513 a(g189 V tp514 a(g202 V} tp515 a(g189 V\u000a\u000a p516 tp517 a(g358 V# $usercontext built in DB::DB near the comment p518 tp519 a(g189 V\u000a p520 tp521 a(g358 V# "set up the context for DB::eval ..." p522 tp523 a(g189 V\u000a p524 tp525 a(g358 V# Evaluate and save any results. p526 tp527 a(g189 V\u000a p528 tp529 a(g73 V@ tp530 a(g73 Vres p531 tp532 a(g189 V tp533 a(g344 V= tp534 a(g189 V tp535 a(g57 Veval p536 tp537 a(g189 V tp538 a(g226 V"$usercontext $evalarg;\u005cn" p539 tp540 a(g202 V; tp541 a(g189 V p542 tp543 a(g358 V# '\u005cn' for nice recursive debug p544 tp545 a(g189 V\u000a\u000a p546 tp547 a(g358 V# Restore those old values. p548 tp549 a(g189 V\u000a p550 tp551 a(g73 V$ tp552 a(g73 Vtrace p553 tp554 a(g189 V p555 tp556 a(g344 V= tp557 a(g189 V tp558 a(g73 V$ tp559 a(g73 Votrace p560 tp561 a(g202 V; tp562 a(g189 V\u000a p563 tp564 a(g73 V$ tp565 a(g73 Vsingle p566 tp567 a(g189 V tp568 a(g344 V= tp569 a(g189 V tp570 a(g73 V$ tp571 a(g73 Vosingle p572 tp573 a(g202 V; tp574 a(g189 V\u000a p575 tp576 a(g76 V$^D p577 tp578 a(g189 V p579 tp580 a(g344 V= tp581 a(g189 V tp582 a(g73 V$ tp583 a(g73 Vod p584 tp585 a(g202 V; tp586 a(g189 V\u000a p587 tp588 a(g202 V} tp589 a(g189 V\u000a\u000a p590 tp591 a(g358 V# Save the current value of $@, and preserve it in the debugger's copy p592 tp593 a(g189 V\u000a p594 tp595 a(g358 V# of the saved precious globals. p596 tp597 a(g189 V\u000a p598 tp599 a(g111 Vmy p600 tp601 a(g189 V tp602 a(g73 V$ tp603 a(g73 Vat p604 tp605 a(g189 V tp606 a(g344 V= tp607 a(g189 V tp608 a(g76 V$@ p609 tp610 a(g202 V; tp611 a(g189 V\u000a\u000a p612 tp613 a(g358 V# Since we're only saving $@, we only have to localize the array element p614 tp615 a(g189 V\u000a p616 tp617 a(g358 V# that it will be stored in. p618 tp619 a(g189 V\u000a p620 tp621 a(g57 Vlocal p622 tp623 a(g189 V tp624 a(g73 V$ tp625 a(g73 Vsaved p626 tp627 a(g202 V[ tp628 a(g319 V0 tp629 a(g202 V] tp630 a(g202 V; tp631 a(g189 V p632 tp633 a(g358 V# Preserve the old value of $@ p634 tp635 a(g189 V\u000a p636 tp637 a(g57 Veval p638 tp639 a(g189 V tp640 a(g202 V{ tp641 a(g189 V tp642 a(g344 V& tp643 a(g18 V tp644 a(g99 VDB:: p645 tp646 a(g18 Vsave p647 tp648 a(g189 V tp649 a(g202 V} tp650 a(g202 V; tp651 a(g189 V\u000a\u000a p652 tp653 a(g358 V# Now see whether we need to report an error back to the user. p654 tp655 a(g189 V\u000a p656 tp657 a(g111 Vif p658 tp659 a(g189 V tp660 a(g202 V( tp661 a(g73 V$ tp662 a(g73 Vat p663 tp664 a(g202 V) tp665 a(g189 V tp666 a(g202 V{ tp667 a(g189 V\u000a p668 tp669 a(g57 Vlocal p670 tp671 a(g189 V tp672 a(g76 V$\u005c p673 tp674 a(g189 V tp675 a(g344 V= tp676 a(g189 V tp677 a(g226 V'' p678 tp679 a(g202 V; tp680 a(g189 V\u000a p681 tp682 a(g111 Vprint p683 tp684 a(g189 V tp685 a(g73 V$ tp686 a(g73 VOUT p687 tp688 a(g189 V tp689 a(g73 V$ tp690 a(g73 Vat p691 tp692 a(g202 V; tp693 a(g189 V\u000a p694 tp695 a(g202 V} tp696 a(g189 V\u000a\u000a p697 tp698 a(g358 V# Display as required by the caller. $onetimeDump and $onetimedumpDepth p699 tp700 a(g189 V\u000a p701 tp702 a(g358 V# are package globals. p703 tp704 a(g189 V\u000a p705 tp706 a(g111 Velsif p707 tp708 a(g189 V tp709 a(g202 V( tp710 a(g73 V$ tp711 a(g73 VonetimeDump p712 tp713 a(g202 V) tp714 a(g189 V tp715 a(g202 V{ tp716 a(g189 V\u000a p717 tp718 a(g111 Vif p719 tp720 a(g189 V tp721 a(g202 V( tp722 a(g189 V tp723 a(g73 V$ tp724 a(g73 VonetimeDump p725 tp726 a(g189 V tp727 a(g348 Veq p728 tp729 a(g189 V tp730 a(g226 V'dump' p731 tp732 a(g189 V tp733 a(g202 V) tp734 a(g189 V tp735 a(g202 V{ tp736 a(g189 V\u000a p737 tp738 a(g57 Vlocal p739 tp740 a(g189 V tp741 a(g73 V$ tp742 a(g73 Voption p743 tp744 a(g202 V{ tp745 a(g18 V tp746 a(g18 VdumpDepth p747 tp748 a(g202 V} tp749 a(g189 V tp750 a(g344 V= tp751 a(g189 V tp752 a(g73 V$ tp753 a(g73 VonetimedumpDepth p754 tp755 a(g189 V\u000a p756 tp757 a(g111 Vif p758 tp759 a(g189 V tp760 a(g57 Vdefined p761 tp762 a(g189 V tp763 a(g73 V$ tp764 a(g73 VonetimedumpDepth p765 tp766 a(g202 V; tp767 a(g189 V\u000a p768 tp769 a(g18 V tp770 a(g18 Vdumpit p771 tp772 a(g202 V( tp773 a(g189 V tp774 a(g73 V$ tp775 a(g73 VOUT p776 tp777 a(g202 V, tp778 a(g189 V tp779 a(g344 V\u005c tp780 a(g73 V@ tp781 a(g73 Vres p782 tp783 a(g189 V tp784 a(g202 V) tp785 a(g202 V; tp786 a(g189 V\u000a p787 tp788 a(g202 V} tp789 a(g189 V\u000a p790 tp791 a(g111 Velsif p792 tp793 a(g189 V tp794 a(g202 V( tp795 a(g189 V tp796 a(g73 V$ tp797 a(g73 VonetimeDump p798 tp799 a(g189 V tp800 a(g348 Veq p801 tp802 a(g189 V tp803 a(g226 V'methods' p804 tp805 a(g189 V tp806 a(g202 V) tp807 a(g189 V tp808 a(g202 V{ tp809 a(g189 V\u000a p810 tp811 a(g18 V tp812 a(g18 Vmethods p813 tp814 a(g202 V( tp815 a(g189 V tp816 a(g73 V$ tp817 a(g73 Vres p818 tp819 a(g202 V[ tp820 a(g319 V0 tp821 a(g202 V] tp822 a(g189 V tp823 a(g202 V) tp824 a(g202 V; tp825 a(g189 V\u000a p826 tp827 a(g202 V} tp828 a(g189 V\u000a p829 tp830 a(g202 V} tp831 a(g189 V tp832 a(g358 V## end elsif ($onetimeDump) p833 tp834 a(g189 V\u000a p835 tp836 a(g73 V@ tp837 a(g73 Vres p838 tp839 a(g202 V; tp840 a(g189 V\u000a tp841 a(g202 V} tp842 a(g189 V tp843 a(g358 V## end sub eval p844 tp845 a(g189 V\u000a\u000a p846 tp847 a(g358 V############################################## End lexical danger zone p848 tp849 a(g189 V\u000a\u000a p850 tp851 a(g358 V# After this point it is safe to introduce lexicals. p852 tp853 a(g189 V\u000a tp854 a(g358 V# The code being debugged will be executing in its own context, and p855 tp856 a(g189 V\u000a tp857 a(g358 V# can't see the inside of the debugger. p858 tp859 a(g189 V\u000a tp860 a(g358 V# tp861 a(g189 V\u000a tp862 a(g358 V# However, one should not overdo it: leave as much control from outside as p863 tp864 a(g189 V\u000a tp865 a(g358 V# possible. If you make something a lexical, it's not going to be addressable p866 tp867 a(g189 V\u000a tp868 a(g358 V# from outside the debugger even if you know its name. p869 tp870 a(g189 V\u000a\u000a p871 tp872 a(g358 V# This file is automatically included if you do perl -d. p873 tp874 a(g189 V\u000a tp875 a(g358 V# It's probably not useful to include this yourself. p876 tp877 a(g189 V\u000a tp878 a(g358 V# tp879 a(g189 V\u000a tp880 a(g358 V# Before venturing further into these twisty passages, it is p881 tp882 a(g189 V\u000a tp883 a(g358 V# wise to read the perldebguts man page or risk the ire of dragons. p884 tp885 a(g189 V\u000a tp886 a(g358 V# tp887 a(g189 V\u000a tp888 a(g358 V# (It should be noted that perldebguts will tell you a lot about p889 tp890 a(g189 V\u000a tp891 a(g358 V# the underlying mechanics of how the debugger interfaces into the p892 tp893 a(g189 V\u000a tp894 a(g358 V# Perl interpreter, but not a lot about the debugger itself. The new p895 tp896 a(g189 V\u000a tp897 a(g358 V# comments in this code try to address this problem.) p898 tp899 a(g189 V\u000a\u000a p900 tp901 a(g358 V# Note that no subroutine call is possible until &DB::sub is defined p902 tp903 a(g189 V\u000a tp904 a(g358 V# (for subroutines defined outside of the package DB). In fact the same is p905 tp906 a(g189 V\u000a tp907 a(g358 V# true if $deep is not defined. p908 tp909 a(g189 V\u000a\u000a p910 tp911 a(g358 V# Enhanced by ilya@math.ohio-state.edu (Ilya Zakharevich) p912 tp913 a(g189 V\u000a\u000a p914 tp915 a(g358 V# modified Perl debugger, to be run from Emacs in perldb-mode p916 tp917 a(g189 V\u000a tp918 a(g358 V# Ray Lischner (uunet!mntgfx!lisch) as of 5 Nov 1990 p919 tp920 a(g189 V\u000a tp921 a(g358 V# Johan Vromans -- upgrade to 4.0 pl 10 p922 tp923 a(g189 V\u000a tp924 a(g358 V# Ilya Zakharevich -- patches after 5.001 (and some before ;-) p925 tp926 a(g189 V\u000a\u000a p927 tp928 a(g358 V# (We have made efforts to clarify the comments in the change log p929 tp930 a(g189 V\u000a tp931 a(g358 V# in other places; some of them may seem somewhat obscure as they p932 tp933 a(g189 V\u000a tp934 a(g358 V# were originally written, and explaining them away from the code p935 tp936 a(g189 V\u000a tp937 a(g358 V# in question seems conterproductive.. -JM) p938 tp939 a(g189 V\u000a\u000a p940 tp941 a(g7 V=head1 DEBUGGER INITIALIZATION\u000a\u000aThe debugger starts up in phases.\u000a\u000a=head2 BASIC SETUP\u000a\u000aFirst, it initializes the environment it wants to run in: turning off\u000awarnings during its own compilation, defining variables which it will need\u000ato avoid warnings later, setting itself up to not exit when the program\u000aterminates, and defaulting to printing return values for the C command.\u000a\u000a=cut p942 tp943 a(g189 V\u000a\u000a p944 tp945 a(g358 V# Needed for the statement after exec(): p946 tp947 a(g189 V\u000a tp948 a(g358 V# tp949 a(g189 V\u000a tp950 a(g358 V# This BEGIN block is simply used to switch off warnings during debugger p951 tp952 a(g189 V\u000a tp953 a(g358 V# compiliation. Probably it would be better practice to fix the warnings, p954 tp955 a(g189 V\u000a tp956 a(g358 V# but this is how it's done at the moment. p957 tp958 a(g189 V\u000a\u000a p959 tp960 a(g111 VBEGIN p961 tp962 a(g189 V tp963 a(g202 V{ tp964 a(g189 V\u000a p965 tp966 a(g73 V$ tp967 a(g73 Vini_warn p968 tp969 a(g189 V tp970 a(g344 V= tp971 a(g189 V tp972 a(g76 V$^W p973 tp974 a(g202 V; tp975 a(g189 V\u000a p976 tp977 a(g76 V$^W p978 tp979 a(g189 V p980 tp981 a(g344 V= tp982 a(g189 V tp983 a(g319 V0 tp984 a(g202 V; tp985 a(g189 V\u000a tp986 a(g202 V} tp987 a(g189 V p988 tp989 a(g358 V# Switch compilation warnings off until another BEGIN. p990 tp991 a(g189 V\u000a\u000a p992 tp993 a(g358 V# test if assertions are supported and actived: p994 tp995 a(g189 V\u000a tp996 a(g111 VBEGIN p997 tp998 a(g189 V tp999 a(g202 V{ tp1000 a(g189 V\u000a p1001 tp1002 a(g73 V$ tp1003 a(g73 Vini_assertion p1004 tp1005 a(g189 V tp1006 a(g344 V= tp1007 a(g189 V tp1008 a(g57 Veval p1009 tp1010 a(g189 V tp1011 a(g226 V"sub asserting_test : assertion {1}; 1" p1012 tp1013 a(g202 V; tp1014 a(g189 V\u000a\u000a p1015 tp1016 a(g358 V# $ini_assertion = undef => assertions unsupported, p1017 tp1018 a(g189 V\u000a p1019 tp1020 a(g358 V# " = 1 => assertions supported p1021 tp1022 a(g189 V\u000a p1023 tp1024 a(g358 V# print "\u005c$ini_assertion=$ini_assertion\u005cn"; p1025 tp1026 a(g189 V\u000a tp1027 a(g202 V} tp1028 a(g189 V\u000a\u000a p1029 tp1030 a(g57 Vlocal p1031 tp1032 a(g189 V tp1033 a(g202 V( tp1034 a(g76 V$^W p1035 tp1036 a(g202 V) tp1037 a(g189 V tp1038 a(g344 V= tp1039 a(g189 V tp1040 a(g319 V0 tp1041 a(g202 V; tp1042 a(g189 V p1043 tp1044 a(g358 V# Switch run-time warnings off during init. p1045 tp1046 a(g189 V\u000a\u000a p1047 tp1048 a(g7 V=head2 THREADS SUPPORT\u000a\u000aIf we are running under a threaded Perl, we require threads and threads::shared\u000aif the environment variable C is set, to enable proper\u000athreaded debugger control. C<-dt> can also be used to set this.\u000a\u000aEach new thread will be announced and the debugger prompt will always inform\u000ayou of each new thread created. It will also indicate the thread id in which\u000awe are currently running within the prompt like this:\u000a\u000a [tid] DB<$i>\u000a\u000aWhere C<[tid]> is an integer thread id and C<$i> is the familiar debugger\u000acommand prompt. The prompt will show: C<[0]> when running under threads, but\u000anot actually in a thread. C<[tid]> is consistent with C usage.\u000a\u000aWhile running under threads, when you set or delete a breakpoint (etc.), this\u000awill apply to all threads, not just the currently running one. When you are \u000ain a currently executing thread, you will stay there until it completes. With\u000athe current implementation it is not currently possible to hop from one thread\u000ato another.\u000a\u000aThe C and C commands are currently fairly minimal - see C and C.\u000a\u000aNote that threading support was built into the debugger as of Perl version\u000aC<5.8.6> and debugger version C<1.2.8>.\u000a\u000a=cut p1049 tp1050 a(g189 V\u000a\u000a p1051 tp1052 a(g111 VBEGIN p1053 tp1054 a(g189 V tp1055 a(g202 V{ tp1056 a(g189 V\u000a p1057 tp1058 a(g358 V# ensure we can share our non-threaded variables or no-op p1059 tp1060 a(g189 V\u000a p1061 tp1062 a(g111 Vif p1063 tp1064 a(g189 V tp1065 a(g202 V( tp1066 a(g73 V$ tp1067 a(g73 VENV p1068 tp1069 a(g202 V{ tp1070 a(g18 V tp1071 a(g18 VPERL5DB_THREADED p1072 tp1073 a(g202 V} tp1074 a(g202 V) tp1075 a(g189 V tp1076 a(g202 V{ tp1077 a(g189 V\u000a p1078 tp1079 a(g57 Vrequire p1080 tp1081 a(g189 V tp1082 a(g18 V tp1083 a(g18 Vthreads p1084 tp1085 a(g202 V; tp1086 a(g189 V\u000a p1087 tp1088 a(g57 Vrequire p1089 tp1090 a(g189 V tp1091 a(g18 V tp1092 a(g99 Vthreads:: p1093 tp1094 a(g18 Vshared p1095 tp1096 a(g202 V; tp1097 a(g189 V\u000a p1098 tp1099 a(g57 Vimport p1100 tp1101 a(g189 V tp1102 a(g18 V tp1103 a(g99 Vthreads:: p1104 tp1105 a(g18 Vshared p1106 tp1107 a(g189 V tp1108 a(g275 Vqw( p1109 tp1110 a(g275 Vshare p1111 tp1112 a(g275 V) tp1113 a(g202 V; tp1114 a(g189 V\u000a p1115 tp1116 a(g73 V$ tp1117 a(g73 VDBGR p1118 tp1119 a(g202 V; tp1120 a(g189 V\u000a p1121 tp1122 a(g18 V tp1123 a(g18 Vshare p1124 tp1125 a(g202 V( tp1126 a(g344 V\u005c tp1127 a(g73 V$ tp1128 a(g73 VDBGR p1129 tp1130 a(g202 V) tp1131 a(g202 V; tp1132 a(g189 V\u000a p1133 tp1134 a(g18 V tp1135 a(g18 Vlock p1136 tp1137 a(g202 V( tp1138 a(g73 V$ tp1139 a(g73 VDBGR p1140 tp1141 a(g202 V) tp1142 a(g202 V; tp1143 a(g189 V\u000a p1144 tp1145 a(g111 Vprint p1146 tp1147 a(g189 V tp1148 a(g226 V"Threads support enabled\u005cn" p1149 tp1150 a(g202 V; tp1151 a(g189 V\u000a p1152 tp1153 a(g202 V} tp1154 a(g189 V tp1155 a(g111 Velse p1156 tp1157 a(g189 V tp1158 a(g202 V{ tp1159 a(g189 V\u000a p1160 tp1161 a(g344 V* tp1162 a(g18 V tp1163 a(g18 Vlock p1164 tp1165 a(g189 V p1166 tp1167 a(g344 V= tp1168 a(g189 V tp1169 a(g18 V tp1170 a(g18 Vsub p1171 tp1172 a(g202 V( tp1173 a(g344 V* tp1174 a(g202 V) tp1175 a(g189 V tp1176 a(g202 V{ tp1177 a(g202 V} tp1178 a(g202 V; tp1179 a(g189 V\u000a p1180 tp1181 a(g344 V* tp1182 a(g18 V tp1183 a(g18 Vshare p1184 tp1185 a(g189 V tp1186 a(g344 V= tp1187 a(g189 V tp1188 a(g18 V tp1189 a(g18 Vsub p1190 tp1191 a(g202 V( tp1192 a(g344 V* tp1193 a(g202 V) tp1194 a(g189 V tp1195 a(g202 V{ tp1196 a(g202 V} tp1197 a(g202 V; tp1198 a(g189 V\u000a p1199 tp1200 a(g202 V} tp1201 a(g189 V\u000a tp1202 a(g202 V} tp1203 a(g189 V\u000a\u000a p1204 tp1205 a(g358 V# This would probably be better done with "use vars", but that wasn't around p1206 tp1207 a(g189 V\u000a tp1208 a(g358 V# when this code was originally written. (Neither was "use strict".) And on p1209 tp1210 a(g189 V\u000a tp1211 a(g358 V# the principle of not fiddling with something that was working, this was p1212 tp1213 a(g189 V\u000a tp1214 a(g358 V# left alone. p1215 tp1216 a(g189 V\u000a tp1217 a(g57 Vwarn p1218 tp1219 a(g202 V( tp1220 a(g189 V p1221 tp1222 a(g358 V# Do not ;-) p1223 tp1224 a(g189 V\u000a p1225 tp1226 a(g358 V# These variables control the execution of 'dumpvar.pl'. p1227 tp1228 a(g189 V\u000a p1229 tp1230 a(g73 V$ tp1231 a(g99 Vdumpvar:: p1232 tp1233 a(g73 VhashDepth p1234 tp1235 a(g202 V, tp1236 a(g189 V\u000a p1237 tp1238 a(g73 V$ tp1239 a(g99 Vdumpvar:: p1240 tp1241 a(g73 VarrayDepth p1242 tp1243 a(g202 V, tp1244 a(g189 V\u000a p1245 tp1246 a(g73 V$ tp1247 a(g99 Vdumpvar:: p1248 tp1249 a(g73 VdumpDBFiles p1250 tp1251 a(g202 V, tp1252 a(g189 V\u000a p1253 tp1254 a(g73 V$ tp1255 a(g99 Vdumpvar:: p1256 tp1257 a(g73 VdumpPackages p1258 tp1259 a(g202 V, tp1260 a(g189 V\u000a p1261 tp1262 a(g73 V$ tp1263 a(g99 Vdumpvar:: p1264 tp1265 a(g73 VquoteHighBit p1266 tp1267 a(g202 V, tp1268 a(g189 V\u000a p1269 tp1270 a(g73 V$ tp1271 a(g99 Vdumpvar:: p1272 tp1273 a(g73 VprintUndef p1274 tp1275 a(g202 V, tp1276 a(g189 V\u000a p1277 tp1278 a(g73 V$ tp1279 a(g99 Vdumpvar:: p1280 tp1281 a(g73 VglobPrint p1282 tp1283 a(g202 V, tp1284 a(g189 V\u000a p1285 tp1286 a(g73 V$ tp1287 a(g99 Vdumpvar:: p1288 tp1289 a(g73 VusageOnly p1290 tp1291 a(g202 V, tp1292 a(g189 V\u000a\u000a p1293 tp1294 a(g358 V# used to save @ARGV and extract any debugger-related flags. p1295 tp1296 a(g189 V\u000a p1297 tp1298 a(g73 V@ tp1299 a(g73 VARGS p1300 tp1301 a(g202 V, tp1302 a(g189 V\u000a\u000a p1303 tp1304 a(g358 V# used to control die() reporting in diesignal() p1305 tp1306 a(g189 V\u000a p1307 tp1308 a(g73 V$ tp1309 a(g99 VCarp:: p1310 tp1311 a(g73 VCarpLevel p1312 tp1313 a(g202 V, tp1314 a(g189 V\u000a\u000a p1315 tp1316 a(g358 V# used to prevent multiple entries to diesignal() p1317 tp1318 a(g189 V\u000a p1319 tp1320 a(g358 V# (if for instance diesignal() itself dies) p1321 tp1322 a(g189 V\u000a p1323 tp1324 a(g73 V$ tp1325 a(g73 Vpanic p1326 tp1327 a(g202 V, tp1328 a(g189 V\u000a\u000a p1329 tp1330 a(g358 V# used to prevent the debugger from running nonstop p1331 tp1332 a(g189 V\u000a p1333 tp1334 a(g358 V# after a restart p1335 tp1336 a(g189 V\u000a p1337 tp1338 a(g73 V$ tp1339 a(g73 Vsecond_time p1340 tp1341 a(g202 V, tp1342 a(g189 V\u000a p1343 tp1344 a(g202 V) tp1345 a(g189 V\u000a p1346 tp1347 a(g111 Vif p1348 tp1349 a(g189 V tp1350 a(g319 V0 tp1351 a(g202 V; tp1352 a(g189 V\u000a\u000a p1353 tp1354 a(g111 Vforeach p1355 tp1356 a(g189 V tp1357 a(g111 Vmy p1358 tp1359 a(g189 V tp1360 a(g73 V$ tp1361 a(g73 Vk tp1362 a(g189 V tp1363 a(g202 V( tp1364 a(g57 Vkeys p1365 tp1366 a(g189 V tp1367 a(g202 V( tp1368 a(g73 V% tp1369 a(g73 VINC p1370 tp1371 a(g202 V) tp1372 a(g202 V) tp1373 a(g189 V tp1374 a(g202 V{ tp1375 a(g189 V\u000a p1376 tp1377 a(g344 V& tp1378 a(g18 V tp1379 a(g18 Vshare p1380 tp1381 a(g202 V( tp1382 a(g344 V\u005c tp1383 a(g73 V$ tp1384 a(g99 Vmain:: p1385 tp1386 a(g202 V{ tp1387 a(g226 V'_<' p1388 tp1389 a(g344 V. tp1390 a(g73 V$ tp1391 a(g73 Vfilename p1392 tp1393 a(g202 V} tp1394 a(g202 V) tp1395 a(g202 V; tp1396 a(g189 V\u000a tp1397 a(g202 V} tp1398 a(g202 V; tp1399 a(g189 V\u000a\u000a p1400 tp1401 a(g358 V# Command-line + PERLLIB: p1402 tp1403 a(g189 V\u000a tp1404 a(g358 V# Save the contents of @INC before they are modified elsewhere. p1405 tp1406 a(g189 V\u000a tp1407 a(g73 V@ tp1408 a(g73 Vini_INC p1409 tp1410 a(g189 V tp1411 a(g344 V= tp1412 a(g189 V tp1413 a(g73 V@ tp1414 a(g73 VINC p1415 tp1416 a(g202 V; tp1417 a(g189 V\u000a\u000a p1418 tp1419 a(g358 V# This was an attempt to clear out the previous values of various p1420 tp1421 a(g189 V\u000a tp1422 a(g358 V# trapped errors. Apparently it didn't help. XXX More info needed! p1423 tp1424 a(g189 V\u000a tp1425 a(g358 V# $prevwarn = $prevdie = $prevbus = $prevsegv = ''; # Does not help?! p1426 tp1427 a(g189 V\u000a\u000a p1428 tp1429 a(g358 V# We set these variables to safe values. We don't want to blindly turn p1430 tp1431 a(g189 V\u000a tp1432 a(g358 V# off warnings, because other packages may still want them. p1433 tp1434 a(g189 V\u000a tp1435 a(g73 V$ tp1436 a(g73 Vtrace p1437 tp1438 a(g189 V tp1439 a(g344 V= tp1440 a(g189 V tp1441 a(g73 V$ tp1442 a(g73 Vsignal p1443 tp1444 a(g189 V tp1445 a(g344 V= tp1446 a(g189 V tp1447 a(g73 V$ tp1448 a(g73 Vsingle p1449 tp1450 a(g189 V tp1451 a(g344 V= tp1452 a(g189 V tp1453 a(g319 V0 tp1454 a(g202 V; tp1455 a(g189 V p1456 tp1457 a(g358 V# Uninitialized warning suppression p1458 tp1459 a(g189 V\u000a p1460 tp1461 a(g358 V# (local $^W cannot help - other packages!). p1462 tp1463 a(g189 V\u000a\u000a p1464 tp1465 a(g358 V# Default to not exiting when program finishes; print the return p1466 tp1467 a(g189 V\u000a tp1468 a(g358 V# value when the 'r' command is used to return from a subroutine. p1469 tp1470 a(g189 V\u000a tp1471 a(g73 V$ tp1472 a(g73 Vinhibit_exit p1473 tp1474 a(g189 V tp1475 a(g344 V= tp1476 a(g189 V tp1477 a(g73 V$ tp1478 a(g73 Voption p1479 tp1480 a(g202 V{ tp1481 a(g18 V tp1482 a(g18 VPrintRet p1483 tp1484 a(g202 V} tp1485 a(g189 V tp1486 a(g344 V= tp1487 a(g189 V tp1488 a(g319 V1 tp1489 a(g202 V; tp1490 a(g189 V\u000a\u000a p1491 tp1492 a(g7 V=head1 OPTION PROCESSING\u000a\u000aThe debugger's options are actually spread out over the debugger itself and \u000aC; some of these are variables to be set, while others are \u000asubs to be called with a value. To try to make this a little easier to\u000amanage, the debugger uses a few data structures to define what options\u000aare legal and how they are to be processed.\u000a\u000aFirst, the C<@options> array defines the I of all the options that\u000aare to be accepted.\u000a\u000a=cut p1493 tp1494 a(g189 V\u000a\u000a p1495 tp1496 a(g73 V@ tp1497 a(g73 Voptions p1498 tp1499 a(g189 V tp1500 a(g344 V= tp1501 a(g189 V tp1502 a(g275 Vqw( p1503 tp1504 a(g275 V\u000a CommandSet\u000a hashDepth arrayDepth dumpDepth\u000a DumpDBFiles DumpPackages DumpReused\u000a compactDump veryCompact quote\u000a HighBit undefPrint globPrint\u000a PrintRet UsageOnly frame\u000a AutoTrace TTY noTTY\u000a ReadLine NonStop LineInfo\u000a maxTraceLen recallCommand ShellBang\u000a pager tkRunning ornaments\u000a signalLevel warnLevel dieLevel\u000a inhibit_exit ImmediateStop bareStringify\u000a CreateTTY RemotePort windowSize\u000a DollarCaretP OnlyAssertions WarnAssertions\u000a p1505 tp1506 a(g275 V) tp1507 a(g202 V; tp1508 a(g189 V\u000a\u000a p1509 tp1510 a(g73 V@ tp1511 a(g73 VRememberOnROptions p1512 tp1513 a(g189 V tp1514 a(g344 V= tp1515 a(g189 V tp1516 a(g275 Vqw( p1517 tp1518 a(g275 VDollarCaretP OnlyAssertions p1519 tp1520 a(g275 V) tp1521 a(g202 V; tp1522 a(g189 V\u000a\u000a p1523 tp1524 a(g7 V=pod\u000a\u000aSecond, C lists the variables that each option uses to save its\u000astate.\u000a\u000a=cut p1525 tp1526 a(g189 V\u000a\u000a p1527 tp1528 a(g73 V% tp1529 a(g73 VoptionVars p1530 tp1531 a(g189 V tp1532 a(g344 V= tp1533 a(g189 V tp1534 a(g202 V( tp1535 a(g189 V\u000a p1536 tp1537 a(g18 V tp1538 a(g18 VhashDepth p1539 tp1540 a(g189 V p1541 tp1542 a(g344 V= tp1543 a(g344 V> tp1544 a(g189 V tp1545 a(g344 V\u005c tp1546 a(g73 V$ tp1547 a(g99 Vdumpvar:: p1548 tp1549 a(g73 VhashDepth p1550 tp1551 a(g202 V, tp1552 a(g189 V\u000a p1553 tp1554 a(g18 V tp1555 a(g18 VarrayDepth p1556 tp1557 a(g189 V p1558 tp1559 a(g344 V= tp1560 a(g344 V> tp1561 a(g189 V tp1562 a(g344 V\u005c tp1563 a(g73 V$ tp1564 a(g99 Vdumpvar:: p1565 tp1566 a(g73 VarrayDepth p1567 tp1568 a(g202 V, tp1569 a(g189 V\u000a p1570 tp1571 a(g18 V tp1572 a(g18 VCommandSet p1573 tp1574 a(g189 V p1575 tp1576 a(g344 V= tp1577 a(g344 V> tp1578 a(g189 V tp1579 a(g344 V\u005c tp1580 a(g73 V$ tp1581 a(g73 VCommandSet p1582 tp1583 a(g202 V, tp1584 a(g189 V\u000a p1585 tp1586 a(g18 V tp1587 a(g18 VDumpDBFiles p1588 tp1589 a(g189 V p1590 tp1591 a(g344 V= tp1592 a(g344 V> tp1593 a(g189 V tp1594 a(g344 V\u005c tp1595 a(g73 V$ tp1596 a(g99 Vdumpvar:: p1597 tp1598 a(g73 VdumpDBFiles p1599 tp1600 a(g202 V, tp1601 a(g189 V\u000a p1602 tp1603 a(g18 V tp1604 a(g18 VDumpPackages p1605 tp1606 a(g189 V p1607 tp1608 a(g344 V= tp1609 a(g344 V> tp1610 a(g189 V tp1611 a(g344 V\u005c tp1612 a(g73 V$ tp1613 a(g99 Vdumpvar:: p1614 tp1615 a(g73 VdumpPackages p1616 tp1617 a(g202 V, tp1618 a(g189 V\u000a p1619 tp1620 a(g18 V tp1621 a(g18 VDumpReused p1622 tp1623 a(g189 V p1624 tp1625 a(g344 V= tp1626 a(g344 V> tp1627 a(g189 V tp1628 a(g344 V\u005c tp1629 a(g73 V$ tp1630 a(g99 Vdumpvar:: p1631 tp1632 a(g73 VdumpReused p1633 tp1634 a(g202 V, tp1635 a(g189 V\u000a p1636 tp1637 a(g18 V tp1638 a(g18 VHighBit p1639 tp1640 a(g189 V p1641 tp1642 a(g344 V= tp1643 a(g344 V> tp1644 a(g189 V tp1645 a(g344 V\u005c tp1646 a(g73 V$ tp1647 a(g99 Vdumpvar:: p1648 tp1649 a(g73 VquoteHighBit p1650 tp1651 a(g202 V, tp1652 a(g189 V\u000a p1653 tp1654 a(g18 V tp1655 a(g18 VundefPrint p1656 tp1657 a(g189 V p1658 tp1659 a(g344 V= tp1660 a(g344 V> tp1661 a(g189 V tp1662 a(g344 V\u005c tp1663 a(g73 V$ tp1664 a(g99 Vdumpvar:: p1665 tp1666 a(g73 VprintUndef p1667 tp1668 a(g202 V, tp1669 a(g189 V\u000a p1670 tp1671 a(g18 V tp1672 a(g18 VglobPrint p1673 tp1674 a(g189 V p1675 tp1676 a(g344 V= tp1677 a(g344 V> tp1678 a(g189 V tp1679 a(g344 V\u005c tp1680 a(g73 V$ tp1681 a(g99 Vdumpvar:: p1682 tp1683 a(g73 VglobPrint p1684 tp1685 a(g202 V, tp1686 a(g189 V\u000a p1687 tp1688 a(g18 V tp1689 a(g18 VUsageOnly p1690 tp1691 a(g189 V p1692 tp1693 a(g344 V= tp1694 a(g344 V> tp1695 a(g189 V tp1696 a(g344 V\u005c tp1697 a(g73 V$ tp1698 a(g99 Vdumpvar:: p1699 tp1700 a(g73 VusageOnly p1701 tp1702 a(g202 V, tp1703 a(g189 V\u000a p1704 tp1705 a(g18 V tp1706 a(g18 VCreateTTY p1707 tp1708 a(g189 V p1709 tp1710 a(g344 V= tp1711 a(g344 V> tp1712 a(g189 V tp1713 a(g344 V\u005c tp1714 a(g73 V$ tp1715 a(g73 VCreateTTY p1716 tp1717 a(g202 V, tp1718 a(g189 V\u000a p1719 tp1720 a(g18 V tp1721 a(g18 VbareStringify p1722 tp1723 a(g189 V tp1724 a(g344 V= tp1725 a(g344 V> tp1726 a(g189 V tp1727 a(g344 V\u005c tp1728 a(g73 V$ tp1729 a(g99 Vdumpvar:: p1730 tp1731 a(g73 VbareStringify p1732 tp1733 a(g202 V, tp1734 a(g189 V\u000a p1735 tp1736 a(g18 V tp1737 a(g18 Vframe p1738 tp1739 a(g189 V p1740 tp1741 a(g344 V= tp1742 a(g344 V> tp1743 a(g189 V tp1744 a(g344 V\u005c tp1745 a(g73 V$ tp1746 a(g73 Vframe p1747 tp1748 a(g202 V, tp1749 a(g189 V\u000a p1750 tp1751 a(g18 V tp1752 a(g18 VAutoTrace p1753 tp1754 a(g189 V p1755 tp1756 a(g344 V= tp1757 a(g344 V> tp1758 a(g189 V tp1759 a(g344 V\u005c tp1760 a(g73 V$ tp1761 a(g73 Vtrace p1762 tp1763 a(g202 V, tp1764 a(g189 V\u000a p1765 tp1766 a(g18 V tp1767 a(g18 Vinhibit_exit p1768 tp1769 a(g189 V p1770 tp1771 a(g344 V= tp1772 a(g344 V> tp1773 a(g189 V tp1774 a(g344 V\u005c tp1775 a(g73 V$ tp1776 a(g73 Vinhibit_exit p1777 tp1778 a(g202 V, tp1779 a(g189 V\u000a p1780 tp1781 a(g18 V tp1782 a(g18 VmaxTraceLen p1783 tp1784 a(g189 V p1785 tp1786 a(g344 V= tp1787 a(g344 V> tp1788 a(g189 V tp1789 a(g344 V\u005c tp1790 a(g73 V$ tp1791 a(g73 Vmaxtrace p1792 tp1793 a(g202 V, tp1794 a(g189 V\u000a p1795 tp1796 a(g18 V tp1797 a(g18 VImmediateStop p1798 tp1799 a(g189 V tp1800 a(g344 V= tp1801 a(g344 V> tp1802 a(g189 V tp1803 a(g344 V\u005c tp1804 a(g73 V$ tp1805 a(g73 VImmediateStop p1806 tp1807 a(g202 V, tp1808 a(g189 V\u000a p1809 tp1810 a(g18 V tp1811 a(g18 VRemotePort p1812 tp1813 a(g189 V p1814 tp1815 a(g344 V= tp1816 a(g344 V> tp1817 a(g189 V tp1818 a(g344 V\u005c tp1819 a(g73 V$ tp1820 a(g73 Vremoteport p1821 tp1822 a(g202 V, tp1823 a(g189 V\u000a p1824 tp1825 a(g18 V tp1826 a(g18 VwindowSize p1827 tp1828 a(g189 V p1829 tp1830 a(g344 V= tp1831 a(g344 V> tp1832 a(g189 V tp1833 a(g344 V\u005c tp1834 a(g73 V$ tp1835 a(g73 Vwindow p1836 tp1837 a(g202 V, tp1838 a(g189 V\u000a p1839 tp1840 a(g18 V tp1841 a(g18 VWarnAssertions p1842 tp1843 a(g189 V tp1844 a(g344 V= tp1845 a(g344 V> tp1846 a(g189 V tp1847 a(g344 V\u005c tp1848 a(g73 V$ tp1849 a(g73 Vwarnassertions p1850 tp1851 a(g202 V, tp1852 a(g189 V\u000a tp1853 a(g202 V) tp1854 a(g202 V; tp1855 a(g189 V\u000a\u000a p1856 tp1857 a(g7 V=pod\u000a\u000aThird, C<%optionAction> defines the subroutine to be called to process each\u000aoption.\u000a\u000a=cut p1858 tp1859 a(g189 V \u000a\u000a p1860 tp1861 a(g73 V% tp1862 a(g73 VoptionAction p1863 tp1864 a(g189 V tp1865 a(g344 V= tp1866 a(g189 V tp1867 a(g202 V( tp1868 a(g189 V\u000a p1869 tp1870 a(g18 V tp1871 a(g18 VcompactDump p1872 tp1873 a(g189 V p1874 tp1875 a(g344 V= tp1876 a(g344 V> tp1877 a(g189 V tp1878 a(g344 V\u005c tp1879 a(g344 V& tp1880 a(g18 V tp1881 a(g99 Vdumpvar:: p1882 tp1883 a(g18 VcompactDump p1884 tp1885 a(g202 V, tp1886 a(g189 V\u000a p1887 tp1888 a(g18 V tp1889 a(g18 VveryCompact p1890 tp1891 a(g189 V p1892 tp1893 a(g344 V= tp1894 a(g344 V> tp1895 a(g189 V tp1896 a(g344 V\u005c tp1897 a(g344 V& tp1898 a(g18 V tp1899 a(g99 Vdumpvar:: p1900 tp1901 a(g18 VveryCompact p1902 tp1903 a(g202 V, tp1904 a(g189 V\u000a p1905 tp1906 a(g18 V tp1907 a(g18 Vquote p1908 tp1909 a(g189 V p1910 tp1911 a(g344 V= tp1912 a(g344 V> tp1913 a(g189 V tp1914 a(g344 V\u005c tp1915 a(g344 V& tp1916 a(g18 V tp1917 a(g99 Vdumpvar:: p1918 tp1919 a(g18 Vquote p1920 tp1921 a(g202 V, tp1922 a(g189 V\u000a p1923 tp1924 a(g18 V tp1925 a(g18 VTTY p1926 tp1927 a(g189 V p1928 tp1929 a(g344 V= tp1930 a(g344 V> tp1931 a(g189 V tp1932 a(g344 V\u005c tp1933 a(g344 V& tp1934 a(g18 V tp1935 a(g18 VTTY p1936 tp1937 a(g202 V, tp1938 a(g189 V\u000a p1939 tp1940 a(g18 V tp1941 a(g18 VnoTTY p1942 tp1943 a(g189 V p1944 tp1945 a(g344 V= tp1946 a(g344 V> tp1947 a(g189 V tp1948 a(g344 V\u005c tp1949 a(g344 V& tp1950 a(g18 V tp1951 a(g18 VnoTTY p1952 tp1953 a(g202 V, tp1954 a(g189 V\u000a p1955 tp1956 a(g18 V tp1957 a(g18 VReadLine p1958 tp1959 a(g189 V p1960 tp1961 a(g344 V= tp1962 a(g344 V> tp1963 a(g189 V tp1964 a(g344 V\u005c tp1965 a(g344 V& tp1966 a(g18 V tp1967 a(g18 VReadLine p1968 tp1969 a(g202 V, tp1970 a(g189 V\u000a p1971 tp1972 a(g18 V tp1973 a(g18 VNonStop p1974 tp1975 a(g189 V p1976 tp1977 a(g344 V= tp1978 a(g344 V> tp1979 a(g189 V tp1980 a(g344 V\u005c tp1981 a(g344 V& tp1982 a(g18 V tp1983 a(g18 VNonStop p1984 tp1985 a(g202 V, tp1986 a(g189 V\u000a p1987 tp1988 a(g18 V tp1989 a(g18 VLineInfo p1990 tp1991 a(g189 V p1992 tp1993 a(g344 V= tp1994 a(g344 V> tp1995 a(g189 V tp1996 a(g344 V\u005c tp1997 a(g344 V& tp1998 a(g18 V tp1999 a(g18 VLineInfo p2000 tp2001 a(g202 V, tp2002 a(g189 V\u000a p2003 tp2004 a(g18 V tp2005 a(g18 VrecallCommand p2006 tp2007 a(g189 V tp2008 a(g344 V= tp2009 a(g344 V> tp2010 a(g189 V tp2011 a(g344 V\u005c tp2012 a(g344 V& tp2013 a(g18 V tp2014 a(g18 VrecallCommand p2015 tp2016 a(g202 V, tp2017 a(g189 V\u000a p2018 tp2019 a(g18 V tp2020 a(g18 VShellBang p2021 tp2022 a(g189 V p2023 tp2024 a(g344 V= tp2025 a(g344 V> tp2026 a(g189 V tp2027 a(g344 V\u005c tp2028 a(g344 V& tp2029 a(g18 V tp2030 a(g18 VshellBang p2031 tp2032 a(g202 V, tp2033 a(g189 V\u000a p2034 tp2035 a(g18 V tp2036 a(g18 Vpager p2037 tp2038 a(g189 V p2039 tp2040 a(g344 V= tp2041 a(g344 V> tp2042 a(g189 V tp2043 a(g344 V\u005c tp2044 a(g344 V& tp2045 a(g18 V tp2046 a(g18 Vpager p2047 tp2048 a(g202 V, tp2049 a(g189 V\u000a p2050 tp2051 a(g18 V tp2052 a(g18 VsignalLevel p2053 tp2054 a(g189 V p2055 tp2056 a(g344 V= tp2057 a(g344 V> tp2058 a(g189 V tp2059 a(g344 V\u005c tp2060 a(g344 V& tp2061 a(g18 V tp2062 a(g18 VsignalLevel p2063 tp2064 a(g202 V, tp2065 a(g189 V\u000a p2066 tp2067 a(g18 V tp2068 a(g18 VwarnLevel p2069 tp2070 a(g189 V p2071 tp2072 a(g344 V= tp2073 a(g344 V> tp2074 a(g189 V tp2075 a(g344 V\u005c tp2076 a(g344 V& tp2077 a(g18 V tp2078 a(g18 VwarnLevel p2079 tp2080 a(g202 V, tp2081 a(g189 V\u000a p2082 tp2083 a(g18 V tp2084 a(g18 VdieLevel p2085 tp2086 a(g189 V p2087 tp2088 a(g344 V= tp2089 a(g344 V> tp2090 a(g189 V tp2091 a(g344 V\u005c tp2092 a(g344 V& tp2093 a(g18 V tp2094 a(g18 VdieLevel p2095 tp2096 a(g202 V, tp2097 a(g189 V\u000a p2098 tp2099 a(g18 V tp2100 a(g18 VtkRunning p2101 tp2102 a(g189 V p2103 tp2104 a(g344 V= tp2105 a(g344 V> tp2106 a(g189 V tp2107 a(g344 V\u005c tp2108 a(g344 V& tp2109 a(g18 V tp2110 a(g18 VtkRunning p2111 tp2112 a(g202 V, tp2113 a(g189 V\u000a p2114 tp2115 a(g18 V tp2116 a(g18 Vornaments p2117 tp2118 a(g189 V p2119 tp2120 a(g344 V= tp2121 a(g344 V> tp2122 a(g189 V tp2123 a(g344 V\u005c tp2124 a(g344 V& tp2125 a(g18 V tp2126 a(g18 Vornaments p2127 tp2128 a(g202 V, tp2129 a(g189 V\u000a p2130 tp2131 a(g18 V tp2132 a(g18 VRemotePort p2133 tp2134 a(g189 V p2135 tp2136 a(g344 V= tp2137 a(g344 V> tp2138 a(g189 V tp2139 a(g344 V\u005c tp2140 a(g344 V& tp2141 a(g18 V tp2142 a(g18 VRemotePort p2143 tp2144 a(g202 V, tp2145 a(g189 V\u000a p2146 tp2147 a(g18 V tp2148 a(g18 VDollarCaretP p2149 tp2150 a(g189 V p2151 tp2152 a(g344 V= tp2153 a(g344 V> tp2154 a(g189 V tp2155 a(g344 V\u005c tp2156 a(g344 V& tp2157 a(g18 V tp2158 a(g18 VDollarCaretP p2159 tp2160 a(g202 V, tp2161 a(g189 V\u000a p2162 tp2163 a(g18 V tp2164 a(g18 VOnlyAssertions p2165 tp2166 a(g344 V= tp2167 a(g344 V> tp2168 a(g189 V tp2169 a(g344 V\u005c tp2170 a(g344 V& tp2171 a(g18 V tp2172 a(g18 VOnlyAssertions p2173 tp2174 a(g202 V, tp2175 a(g189 V\u000a tp2176 a(g202 V) tp2177 a(g202 V; tp2178 a(g189 V\u000a\u000a p2179 tp2180 a(g7 V=pod\u000a\u000aLast, the C<%optionRequire> notes modules that must be Cd if an\u000aoption is used.\u000a\u000a=cut p2181 tp2182 a(g189 V\u000a\u000a p2183 tp2184 a(g358 V# Note that this list is not complete: several options not listed here p2185 tp2186 a(g189 V\u000a tp2187 a(g358 V# actually require that dumpvar.pl be loaded for them to work, but are p2188 tp2189 a(g189 V\u000a tp2190 a(g358 V# not in the table. A subsequent patch will correct this problem; for p2191 tp2192 a(g189 V\u000a tp2193 a(g358 V# the moment, we're just recommenting, and we are NOT going to change p2194 tp2195 a(g189 V\u000a tp2196 a(g358 V# function. p2197 tp2198 a(g189 V\u000a tp2199 a(g73 V% tp2200 a(g73 VoptionRequire p2201 tp2202 a(g189 V tp2203 a(g344 V= tp2204 a(g189 V tp2205 a(g202 V( tp2206 a(g189 V\u000a p2207 tp2208 a(g18 V tp2209 a(g18 VcompactDump p2210 tp2211 a(g189 V tp2212 a(g344 V= tp2213 a(g344 V> tp2214 a(g189 V tp2215 a(g226 V'dumpvar.pl' p2216 tp2217 a(g202 V, tp2218 a(g189 V\u000a p2219 tp2220 a(g18 V tp2221 a(g18 VveryCompact p2222 tp2223 a(g189 V tp2224 a(g344 V= tp2225 a(g344 V> tp2226 a(g189 V tp2227 a(g226 V'dumpvar.pl' p2228 tp2229 a(g202 V, tp2230 a(g189 V\u000a p2231 tp2232 a(g18 V tp2233 a(g18 Vquote p2234 tp2235 a(g189 V p2236 tp2237 a(g344 V= tp2238 a(g344 V> tp2239 a(g189 V tp2240 a(g226 V'dumpvar.pl' p2241 tp2242 a(g202 V, tp2243 a(g189 V\u000a tp2244 a(g202 V) tp2245 a(g202 V; tp2246 a(g189 V\u000a\u000a p2247 tp2248 a(g7 V=pod\u000a\u000aThere are a number of initialization-related variables which can be set\u000aby putting code to set them in a BEGIN block in the C environment\u000avariable. These are:\u000a\u000a=over 4\u000a\u000a=item C<$rl> - readline control XXX needs more explanation\u000a\u000a=item C<$warnLevel> - whether or not debugger takes over warning handling\u000a\u000a=item C<$dieLevel> - whether or not debugger takes over die handling\u000a\u000a=item C<$signalLevel> - whether or not debugger takes over signal handling\u000a\u000a=item C<$pre> - preprompt actions (array reference)\u000a\u000a=item C<$post> - postprompt actions (array reference)\u000a\u000a=item C<$pretype>\u000a\u000a=item C<$CreateTTY> - whether or not to create a new TTY for this debugger\u000a\u000a=item C<$CommandSet> - which command set to use (defaults to new, documented set)\u000a\u000a=back\u000a\u000a=cut p2249 tp2250 a(g189 V\u000a\u000a p2251 tp2252 a(g358 V# These guys may be defined in $ENV{PERL5DB} : p2253 tp2254 a(g189 V\u000a tp2255 a(g73 V$ tp2256 a(g73 Vrl p2257 tp2258 a(g189 V p2259 tp2260 a(g344 V= tp2261 a(g189 V tp2262 a(g319 V1 tp2263 a(g189 V p2264 tp2265 a(g111 Vunless p2266 tp2267 a(g189 V tp2268 a(g57 Vdefined p2269 tp2270 a(g189 V tp2271 a(g73 V$ tp2272 a(g73 Vrl p2273 tp2274 a(g202 V; tp2275 a(g189 V\u000a tp2276 a(g73 V$ tp2277 a(g73 VwarnLevel p2278 tp2279 a(g189 V p2280 tp2281 a(g344 V= tp2282 a(g189 V tp2283 a(g319 V1 tp2284 a(g189 V p2285 tp2286 a(g111 Vunless p2287 tp2288 a(g189 V tp2289 a(g57 Vdefined p2290 tp2291 a(g189 V tp2292 a(g73 V$ tp2293 a(g73 VwarnLevel p2294 tp2295 a(g202 V; tp2296 a(g189 V\u000a tp2297 a(g73 V$ tp2298 a(g73 VdieLevel p2299 tp2300 a(g189 V p2301 tp2302 a(g344 V= tp2303 a(g189 V tp2304 a(g319 V1 tp2305 a(g189 V p2306 tp2307 a(g111 Vunless p2308 tp2309 a(g189 V tp2310 a(g57 Vdefined p2311 tp2312 a(g189 V tp2313 a(g73 V$ tp2314 a(g73 VdieLevel p2315 tp2316 a(g202 V; tp2317 a(g189 V\u000a tp2318 a(g73 V$ tp2319 a(g73 VsignalLevel p2320 tp2321 a(g189 V tp2322 a(g344 V= tp2323 a(g189 V tp2324 a(g319 V1 tp2325 a(g189 V p2326 tp2327 a(g111 Vunless p2328 tp2329 a(g189 V tp2330 a(g57 Vdefined p2331 tp2332 a(g189 V tp2333 a(g73 V$ tp2334 a(g73 VsignalLevel p2335 tp2336 a(g202 V; tp2337 a(g189 V\u000a tp2338 a(g73 V$ tp2339 a(g73 Vpre p2340 tp2341 a(g189 V p2342 tp2343 a(g344 V= tp2344 a(g189 V tp2345 a(g344 V[] p2346 tp2347 a(g189 V p2348 tp2349 a(g111 Vunless p2350 tp2351 a(g189 V tp2352 a(g57 Vdefined p2353 tp2354 a(g189 V tp2355 a(g73 V$ tp2356 a(g73 Vpre p2357 tp2358 a(g202 V; tp2359 a(g189 V\u000a tp2360 a(g73 V$ tp2361 a(g73 Vpost p2362 tp2363 a(g189 V p2364 tp2365 a(g344 V= tp2366 a(g189 V tp2367 a(g344 V[] p2368 tp2369 a(g189 V p2370 tp2371 a(g111 Vunless p2372 tp2373 a(g189 V tp2374 a(g57 Vdefined p2375 tp2376 a(g189 V tp2377 a(g73 V$ tp2378 a(g73 Vpost p2379 tp2380 a(g202 V; tp2381 a(g189 V\u000a tp2382 a(g73 V$ tp2383 a(g73 Vpretype p2384 tp2385 a(g189 V p2386 tp2387 a(g344 V= tp2388 a(g189 V tp2389 a(g344 V[] p2390 tp2391 a(g189 V p2392 tp2393 a(g111 Vunless p2394 tp2395 a(g189 V tp2396 a(g57 Vdefined p2397 tp2398 a(g189 V tp2399 a(g73 V$ tp2400 a(g73 Vpretype p2401 tp2402 a(g202 V; tp2403 a(g189 V\u000a tp2404 a(g73 V$ tp2405 a(g73 VCreateTTY p2406 tp2407 a(g189 V p2408 tp2409 a(g344 V= tp2410 a(g189 V tp2411 a(g319 V3 tp2412 a(g189 V p2413 tp2414 a(g111 Vunless p2415 tp2416 a(g189 V tp2417 a(g57 Vdefined p2418 tp2419 a(g189 V tp2420 a(g73 V$ tp2421 a(g73 VCreateTTY p2422 tp2423 a(g202 V; tp2424 a(g189 V\u000a tp2425 a(g73 V$ tp2426 a(g73 VCommandSet p2427 tp2428 a(g189 V p2429 tp2430 a(g344 V= tp2431 a(g189 V tp2432 a(g226 V'580' p2433 tp2434 a(g189 V tp2435 a(g111 Vunless p2436 tp2437 a(g189 V tp2438 a(g57 Vdefined p2439 tp2440 a(g189 V tp2441 a(g73 V$ tp2442 a(g73 VCommandSet p2443 tp2444 a(g202 V; tp2445 a(g189 V\u000a\u000a p2446 tp2447 a(g18 V tp2448 a(g18 Vshare p2449 tp2450 a(g202 V( tp2451 a(g73 V$ tp2452 a(g73 Vrl p2453 tp2454 a(g202 V) tp2455 a(g202 V; tp2456 a(g189 V\u000a tp2457 a(g18 V tp2458 a(g18 Vshare p2459 tp2460 a(g202 V( tp2461 a(g73 V$ tp2462 a(g73 VwarnLevel p2463 tp2464 a(g202 V) tp2465 a(g202 V; tp2466 a(g189 V\u000a tp2467 a(g18 V tp2468 a(g18 Vshare p2469 tp2470 a(g202 V( tp2471 a(g73 V$ tp2472 a(g73 VdieLevel p2473 tp2474 a(g202 V) tp2475 a(g202 V; tp2476 a(g189 V\u000a tp2477 a(g18 V tp2478 a(g18 Vshare p2479 tp2480 a(g202 V( tp2481 a(g73 V$ tp2482 a(g73 VsignalLevel p2483 tp2484 a(g202 V) tp2485 a(g202 V; tp2486 a(g189 V\u000a tp2487 a(g18 V tp2488 a(g18 Vshare p2489 tp2490 a(g202 V( tp2491 a(g73 V$ tp2492 a(g73 Vpre p2493 tp2494 a(g202 V) tp2495 a(g202 V; tp2496 a(g189 V\u000a tp2497 a(g18 V tp2498 a(g18 Vshare p2499 tp2500 a(g202 V( tp2501 a(g73 V$ tp2502 a(g73 Vpost p2503 tp2504 a(g202 V) tp2505 a(g202 V; tp2506 a(g189 V\u000a tp2507 a(g18 V tp2508 a(g18 Vshare p2509 tp2510 a(g202 V( tp2511 a(g73 V$ tp2512 a(g73 Vpretype p2513 tp2514 a(g202 V) tp2515 a(g202 V; tp2516 a(g189 V\u000a tp2517 a(g18 V tp2518 a(g18 Vshare p2519 tp2520 a(g202 V( tp2521 a(g73 V$ tp2522 a(g73 Vrl p2523 tp2524 a(g202 V) tp2525 a(g202 V; tp2526 a(g189 V\u000a tp2527 a(g18 V tp2528 a(g18 Vshare p2529 tp2530 a(g202 V( tp2531 a(g73 V$ tp2532 a(g73 VCreateTTY p2533 tp2534 a(g202 V) tp2535 a(g202 V; tp2536 a(g189 V\u000a tp2537 a(g18 V tp2538 a(g18 Vshare p2539 tp2540 a(g202 V( tp2541 a(g73 V$ tp2542 a(g73 VCommandSet p2543 tp2544 a(g202 V) tp2545 a(g202 V; tp2546 a(g189 V\u000a\u000a p2547 tp2548 a(g7 V=pod\u000a\u000aThe default C, C, and C handlers are set up.\u000a\u000a=cut p2549 tp2550 a(g189 V\u000a\u000a p2551 tp2552 a(g18 V tp2553 a(g18 VwarnLevel p2554 tp2555 a(g202 V( tp2556 a(g73 V$ tp2557 a(g73 VwarnLevel p2558 tp2559 a(g202 V) tp2560 a(g202 V; tp2561 a(g189 V\u000a tp2562 a(g18 V tp2563 a(g18 VdieLevel p2564 tp2565 a(g202 V( tp2566 a(g73 V$ tp2567 a(g73 VdieLevel p2568 tp2569 a(g202 V) tp2570 a(g202 V; tp2571 a(g189 V\u000a tp2572 a(g18 V tp2573 a(g18 VsignalLevel p2574 tp2575 a(g202 V( tp2576 a(g73 V$ tp2577 a(g73 VsignalLevel p2578 tp2579 a(g202 V) tp2580 a(g202 V; tp2581 a(g189 V\u000a\u000a p2582 tp2583 a(g7 V=pod\u000a\u000aThe pager to be used is needed next. We try to get it from the\u000aenvironment first. if it's not defined there, we try to find it in\u000athe Perl C. If it's not there, we default to C. We\u000athen call the C function to save the pager name.\u000a\u000a=cut p2584 tp2585 a(g189 V\u000a\u000a p2586 tp2587 a(g358 V# This routine makes sure $pager is set up so that '|' can use it. p2588 tp2589 a(g189 V\u000a tp2590 a(g18 V tp2591 a(g18 Vpager p2592 tp2593 a(g202 V( tp2594 a(g189 V\u000a\u000a p2595 tp2596 a(g358 V# If PAGER is defined in the environment, use it. p2597 tp2598 a(g189 V\u000a p2599 tp2600 a(g57 Vdefined p2601 tp2602 a(g189 V tp2603 a(g73 V$ tp2604 a(g73 VENV p2605 tp2606 a(g202 V{ tp2607 a(g18 V tp2608 a(g18 VPAGER p2609 tp2610 a(g202 V} tp2611 a(g189 V\u000a p2612 tp2613 a(g202 V? tp2614 a(g189 V tp2615 a(g73 V$ tp2616 a(g73 VENV p2617 tp2618 a(g202 V{ tp2619 a(g18 V tp2620 a(g18 VPAGER p2621 tp2622 a(g202 V} tp2623 a(g189 V\u000a\u000a p2624 tp2625 a(g358 V# If not, see if Config.pm defines it. p2626 tp2627 a(g189 V\u000a p2628 tp2629 a(g202 V: tp2630 a(g189 V tp2631 a(g57 Veval p2632 tp2633 a(g189 V tp2634 a(g202 V{ tp2635 a(g189 V tp2636 a(g57 Vrequire p2637 tp2638 a(g189 V tp2639 a(g18 V tp2640 a(g18 VConfig p2641 tp2642 a(g189 V tp2643 a(g202 V} tp2644 a(g189 V\u000a p2645 tp2646 a(g344 V&& p2647 tp2648 a(g189 V tp2649 a(g57 Vdefined p2650 tp2651 a(g189 V tp2652 a(g73 V$ tp2653 a(g99 VConfig:: p2654 tp2655 a(g73 VConfig p2656 tp2657 a(g202 V{ tp2658 a(g18 V tp2659 a(g18 Vpager p2660 tp2661 a(g202 V} tp2662 a(g189 V\u000a p2663 tp2664 a(g202 V? tp2665 a(g189 V tp2666 a(g73 V$ tp2667 a(g99 VConfig:: p2668 tp2669 a(g73 VConfig p2670 tp2671 a(g202 V{ tp2672 a(g18 V tp2673 a(g18 Vpager p2674 tp2675 a(g202 V} tp2676 a(g189 V\u000a\u000a p2677 tp2678 a(g358 V# If not, fall back to 'more'. p2679 tp2680 a(g189 V\u000a p2681 tp2682 a(g202 V: tp2683 a(g189 V tp2684 a(g226 V'more' p2685 tp2686 a(g189 V\u000a p2687 tp2688 a(g202 V) tp2689 a(g189 V\u000a p2690 tp2691 a(g111 Vunless p2692 tp2693 a(g189 V tp2694 a(g57 Vdefined p2695 tp2696 a(g189 V tp2697 a(g73 V$ tp2698 a(g73 Vpager p2699 tp2700 a(g202 V; tp2701 a(g189 V\u000a\u000a p2702 tp2703 a(g7 V=pod\u000a\u000aWe set up the command to be used to access the man pages, the command\u000arecall character (C unless otherwise defined) and the shell escape\u000acharacter (C unless otherwise defined). Yes, these do conflict, and\u000aneither works in the debugger at the moment.\u000a\u000a=cut p2704 tp2705 a(g189 V\u000a\u000a p2706 tp2707 a(g18 V tp2708 a(g18 Vsetman p2709 tp2710 a(g202 V( tp2711 a(g202 V) tp2712 a(g202 V; tp2713 a(g189 V\u000a\u000a p2714 tp2715 a(g358 V# Set up defaults for command recall and shell escape (note: p2716 tp2717 a(g189 V\u000a tp2718 a(g358 V# these currently don't work in linemode debugging). p2719 tp2720 a(g189 V\u000a tp2721 a(g344 V& tp2722 a(g18 V tp2723 a(g18 VrecallCommand p2724 tp2725 a(g202 V( tp2726 a(g226 V"!" p2727 tp2728 a(g202 V) tp2729 a(g189 V tp2730 a(g111 Vunless p2731 tp2732 a(g189 V tp2733 a(g57 Vdefined p2734 tp2735 a(g189 V tp2736 a(g73 V$ tp2737 a(g73 Vprc p2738 tp2739 a(g202 V; tp2740 a(g189 V\u000a tp2741 a(g344 V& tp2742 a(g18 V tp2743 a(g18 VshellBang p2744 tp2745 a(g202 V( tp2746 a(g226 V"!" p2747 tp2748 a(g202 V) tp2749 a(g189 V p2750 tp2751 a(g111 Vunless p2752 tp2753 a(g189 V tp2754 a(g57 Vdefined p2755 tp2756 a(g189 V tp2757 a(g73 V$ tp2758 a(g73 Vpsh p2759 tp2760 a(g202 V; tp2761 a(g189 V\u000a\u000a p2762 tp2763 a(g7 V=pod\u000a\u000aWe then set up the gigantic string containing the debugger help.\u000aWe also set the limit on the number of arguments we'll display during a\u000atrace.\u000a\u000a=cut p2764 tp2765 a(g189 V\u000a\u000a p2766 tp2767 a(g18 V tp2768 a(g18 Vsethelp p2769 tp2770 a(g202 V( tp2771 a(g202 V) tp2772 a(g202 V; tp2773 a(g189 V\u000a\u000a p2774 tp2775 a(g358 V# If we didn't get a default for the length of eval/stack trace args, p2776 tp2777 a(g189 V\u000a tp2778 a(g358 V# set it here. p2779 tp2780 a(g189 V\u000a tp2781 a(g73 V$ tp2782 a(g73 Vmaxtrace p2783 tp2784 a(g189 V tp2785 a(g344 V= tp2786 a(g189 V tp2787 a(g319 V400 p2788 tp2789 a(g189 V tp2790 a(g111 Vunless p2791 tp2792 a(g189 V tp2793 a(g57 Vdefined p2794 tp2795 a(g189 V tp2796 a(g73 V$ tp2797 a(g73 Vmaxtrace p2798 tp2799 a(g202 V; tp2800 a(g189 V\u000a\u000a p2801 tp2802 a(g7 V=head2 SETTING UP THE DEBUGGER GREETING\u000a\u000aThe debugger I helps to inform the user how many debuggers are\u000arunning, and whether the current debugger is the primary or a child.\u000a\u000aIf we are the primary, we just hang onto our pid so we'll have it when\u000aor if we start a child debugger. If we are a child, we'll set things up\u000aso we'll have a unique greeting and so the parent will give us our own\u000aTTY later.\u000a\u000aWe save the current contents of the C environment variable\u000abecause we mess around with it. We'll also need to hang onto it because\u000awe'll need it if we restart.\u000a\u000aChild debuggers make a label out of the current PID structure recorded in\u000aPERLDB_PIDS plus the new PID. They also mark themselves as not having a TTY\u000ayet so the parent will give them one later via C.\u000a\u000a=cut p2803 tp2804 a(g189 V\u000a\u000a p2805 tp2806 a(g358 V# Save the current contents of the environment; we're about to p2807 tp2808 a(g189 V\u000a tp2809 a(g358 V# much with it. We'll need this if we have to restart. p2810 tp2811 a(g189 V\u000a tp2812 a(g73 V$ tp2813 a(g73 Vini_pids p2814 tp2815 a(g189 V tp2816 a(g344 V= tp2817 a(g189 V tp2818 a(g73 V$ tp2819 a(g73 VENV p2820 tp2821 a(g202 V{ tp2822 a(g18 V tp2823 a(g18 VPERLDB_PIDS p2824 tp2825 a(g202 V} tp2826 a(g202 V; tp2827 a(g189 V\u000a\u000a p2828 tp2829 a(g111 Vif p2830 tp2831 a(g189 V tp2832 a(g202 V( tp2833 a(g189 V tp2834 a(g57 Vdefined p2835 tp2836 a(g189 V tp2837 a(g73 V$ tp2838 a(g73 VENV p2839 tp2840 a(g202 V{ tp2841 a(g18 V tp2842 a(g18 VPERLDB_PIDS p2843 tp2844 a(g202 V} tp2845 a(g189 V tp2846 a(g202 V) tp2847 a(g189 V tp2848 a(g202 V{ tp2849 a(g189 V\u000a\u000a p2850 tp2851 a(g358 V# We're a child. Make us a label out of the current PID structure p2852 tp2853 a(g189 V\u000a p2854 tp2855 a(g358 V# recorded in PERLDB_PIDS plus our (new) PID. Mark us as not having p2856 tp2857 a(g189 V\u000a p2858 tp2859 a(g358 V# a term yet so the parent will give us one later via resetterm(). p2860 tp2861 a(g189 V\u000a p2862 tp2863 a(g73 V$ tp2864 a(g73 Vpids p2865 tp2866 a(g189 V tp2867 a(g344 V= tp2868 a(g189 V tp2869 a(g226 V"[$ENV{PERLDB_PIDS}]" p2870 tp2871 a(g202 V; tp2872 a(g189 V\u000a p2873 tp2874 a(g73 V$ tp2875 a(g73 VENV p2876 tp2877 a(g202 V{ tp2878 a(g18 V tp2879 a(g18 VPERLDB_PIDS p2880 tp2881 a(g202 V} tp2882 a(g189 V tp2883 a(g344 V. tp2884 a(g344 V= tp2885 a(g189 V tp2886 a(g226 V"->$$" p2887 tp2888 a(g202 V; tp2889 a(g189 V\u000a p2890 tp2891 a(g73 V$ tp2892 a(g73 Vterm_pid p2893 tp2894 a(g189 V tp2895 a(g344 V= tp2896 a(g189 V tp2897 a(g344 V- tp2898 a(g319 V1 tp2899 a(g202 V; tp2900 a(g189 V\u000a tp2901 a(g202 V} tp2902 a(g189 V tp2903 a(g358 V## end if (defined $ENV{PERLDB_PIDS... p2904 tp2905 a(g189 V\u000a tp2906 a(g111 Velse p2907 tp2908 a(g189 V tp2909 a(g202 V{ tp2910 a(g189 V\u000a\u000a p2911 tp2912 a(g358 V# We're the parent PID. Initialize PERLDB_PID in case we end up with a p2913 tp2914 a(g189 V\u000a p2915 tp2916 a(g358 V# child debugger, and mark us as the parent, so we'll know to set up p2917 tp2918 a(g189 V\u000a p2919 tp2920 a(g358 V# more TTY's is we have to. p2921 tp2922 a(g189 V\u000a p2923 tp2924 a(g73 V$ tp2925 a(g73 VENV p2926 tp2927 a(g202 V{ tp2928 a(g18 V tp2929 a(g18 VPERLDB_PIDS p2930 tp2931 a(g202 V} tp2932 a(g189 V tp2933 a(g344 V= tp2934 a(g189 V tp2935 a(g226 V"$$" p2936 tp2937 a(g202 V; tp2938 a(g189 V\u000a p2939 tp2940 a(g73 V$ tp2941 a(g73 Vpids p2942 tp2943 a(g189 V p2944 tp2945 a(g344 V= tp2946 a(g189 V tp2947 a(g226 V"{pid=$$}" p2948 tp2949 a(g202 V; tp2950 a(g189 V\u000a p2951 tp2952 a(g73 V$ tp2953 a(g73 Vterm_pid p2954 tp2955 a(g189 V p2956 tp2957 a(g344 V= tp2958 a(g189 V tp2959 a(g76 V$$ p2960 tp2961 a(g202 V; tp2962 a(g189 V\u000a tp2963 a(g202 V} tp2964 a(g189 V\u000a\u000a p2965 tp2966 a(g73 V$ tp2967 a(g73 Vpidprompt p2968 tp2969 a(g189 V tp2970 a(g344 V= tp2971 a(g189 V tp2972 a(g226 V'' p2973 tp2974 a(g202 V; tp2975 a(g189 V\u000a\u000a p2976 tp2977 a(g358 V# Sets up $emacs as a synonym for $slave_editor. p2978 tp2979 a(g189 V\u000a tp2980 a(g344 V* tp2981 a(g18 V tp2982 a(g18 Vemacs p2983 tp2984 a(g189 V tp2985 a(g344 V= tp2986 a(g189 V tp2987 a(g73 V$ tp2988 a(g73 Vslave_editor p2989 tp2990 a(g189 V tp2991 a(g111 Vif p2992 tp2993 a(g189 V tp2994 a(g73 V$ tp2995 a(g73 Vslave_editor p2996 tp2997 a(g202 V; tp2998 a(g189 V p2999 tp3000 a(g358 V# May be used in afterinit()... p3001 tp3002 a(g189 V\u000a\u000a p3003 tp3004 a(g7 V=head2 READING THE RC FILE\u000a\u000aThe debugger will read a file of initialization options if supplied. If \u000arunning interactively, this is C<.perldb>; if not, it's C.\u000a\u000a=cut p3005 tp3006 a(g189 V \u000a\u000a p3007 tp3008 a(g358 V# As noted, this test really doesn't check accurately that the debugger p3009 tp3010 a(g189 V\u000a tp3011 a(g358 V# is running at a terminal or not. p3012 tp3013 a(g189 V\u000a\u000a p3014 tp3015 a(g111 Vif p3016 tp3017 a(g189 V tp3018 a(g202 V( tp3019 a(g189 V tp3020 a(g344 V- tp3021 a(g18 V tp3022 a(g18 Ve tp3023 a(g189 V tp3024 a(g226 V"/dev/tty" p3025 tp3026 a(g189 V tp3027 a(g202 V) tp3028 a(g189 V tp3029 a(g202 V{ tp3030 a(g189 V p3031 tp3032 a(g358 V# this is the wrong metric! p3033 tp3034 a(g189 V\u000a p3035 tp3036 a(g73 V$ tp3037 a(g73 Vrcfile p3038 tp3039 a(g189 V tp3040 a(g344 V= tp3041 a(g189 V tp3042 a(g226 V".perldb" p3043 tp3044 a(g202 V; tp3045 a(g189 V\u000a tp3046 a(g202 V} tp3047 a(g189 V\u000a tp3048 a(g111 Velse p3049 tp3050 a(g189 V tp3051 a(g202 V{ tp3052 a(g189 V\u000a p3053 tp3054 a(g73 V$ tp3055 a(g73 Vrcfile p3056 tp3057 a(g189 V tp3058 a(g344 V= tp3059 a(g189 V tp3060 a(g226 V"perldb.ini" p3061 tp3062 a(g202 V; tp3063 a(g189 V\u000a tp3064 a(g202 V} tp3065 a(g189 V\u000a\u000a p3066 tp3067 a(g7 V=pod\u000a\u000aThe debugger does a safety test of the file to be read. It must be owned\u000aeither by the current user or root, and must only be writable by the owner.\u000a\u000a=cut p3068 tp3069 a(g189 V\u000a\u000a p3070 tp3071 a(g358 V# This wraps a safety test around "do" to read and evaluate the init file. p3072 tp3073 a(g189 V\u000a tp3074 a(g358 V# tp3075 a(g189 V\u000a tp3076 a(g358 V# This isn't really safe, because there's a race p3077 tp3078 a(g189 V\u000a tp3079 a(g358 V# between checking and opening. The solution is to p3080 tp3081 a(g189 V\u000a tp3082 a(g358 V# open and fstat the handle, but then you have to read and p3083 tp3084 a(g189 V\u000a tp3085 a(g358 V# eval the contents. But then the silly thing gets p3086 tp3087 a(g189 V\u000a tp3088 a(g358 V# your lexical scope, which is unfortunate at best. p3089 tp3090 a(g189 V\u000a tp3091 a(g111 Vsub p3092 tp3093 a(g21 Vsafe_do p3094 tp3095 a(g189 V tp3096 a(g202 V{ tp3097 a(g189 V\u000a p3098 tp3099 a(g111 Vmy p3100 tp3101 a(g189 V tp3102 a(g73 V$ tp3103 a(g73 Vfile p3104 tp3105 a(g189 V tp3106 a(g344 V= tp3107 a(g189 V tp3108 a(g57 Vshift p3109 tp3110 a(g202 V; tp3111 a(g189 V\u000a\u000a p3112 tp3113 a(g358 V# Just exactly what part of the word "CORE::" don't you understand? p3114 tp3115 a(g189 V\u000a p3116 tp3117 a(g57 Vlocal p3118 tp3119 a(g189 V tp3120 a(g73 V$ tp3121 a(g73 VSIG p3122 tp3123 a(g202 V{ tp3124 a(g60 V__WARN__ p3125 tp3126 a(g202 V} tp3127 a(g202 V; tp3128 a(g189 V\u000a p3129 tp3130 a(g57 Vlocal p3131 tp3132 a(g189 V tp3133 a(g73 V$ tp3134 a(g73 VSIG p3135 tp3136 a(g202 V{ tp3137 a(g60 V__DIE__ p3138 tp3139 a(g202 V} tp3140 a(g202 V; tp3141 a(g189 V\u000a\u000a p3142 tp3143 a(g111 Vunless p3144 tp3145 a(g189 V tp3146 a(g202 V( tp3147 a(g189 V tp3148 a(g18 V tp3149 a(g18 Vis_safe_file p3150 tp3151 a(g202 V( tp3152 a(g73 V$ tp3153 a(g73 Vfile p3154 tp3155 a(g202 V) tp3156 a(g189 V tp3157 a(g202 V) tp3158 a(g189 V tp3159 a(g202 V{ tp3160 a(g189 V\u000a p3161 tp3162 a(g18 V tp3163 a(g99 VCORE:: p3164 tp3165 a(g18 Vwarn p3166 tp3167 a(g189 V tp3168 a(g226 V< command is invoked, it\u000atries to capture all of the state it can into environment variables, and\u000athen sets C. When we start executing again, we check to see\u000aif C is there; if so, we reload all the information that\u000athe R command stuffed into the environment variables.\u000a\u000a PERLDB_RESTART - flag only, contains no restart data itself. \u000a PERLDB_HIST - command history, if it's available\u000a PERLDB_ON_LOAD - breakpoints set by the rc file\u000a PERLDB_POSTPONE - subs that have been loaded/not executed, and have actions\u000a PERLDB_VISITED - files that had breakpoints\u000a PERLDB_FILE_... - breakpoints for a file\u000a PERLDB_OPT - active options\u000a PERLDB_INC - the original @INC\u000a PERLDB_PRETYPE - preprompt debugger actions\u000a PERLDB_PRE - preprompt Perl code\u000a PERLDB_POST - post-prompt Perl code\u000a PERLDB_TYPEAHEAD - typeahead captured by readline()\u000a\u000aWe chug through all these variables and plug the values saved in them\u000aback into the appropriate spots in the debugger.\u000a\u000a=cut p3777 tp3778 a(g189 V\u000a\u000a p3779 tp3780 a(g111 Vif p3781 tp3782 a(g189 V tp3783 a(g202 V( tp3784 a(g189 V tp3785 a(g57 Vexists p3786 tp3787 a(g189 V tp3788 a(g73 V$ tp3789 a(g73 VENV p3790 tp3791 a(g202 V{ tp3792 a(g18 V tp3793 a(g18 VPERLDB_RESTART p3794 tp3795 a(g202 V} tp3796 a(g189 V tp3797 a(g202 V) tp3798 a(g189 V tp3799 a(g202 V{ tp3800 a(g189 V\u000a\u000a p3801 tp3802 a(g358 V# We're restarting, so we don't need the flag that says to restart anymore. p3803 tp3804 a(g189 V\u000a p3805 tp3806 a(g57 Vdelete p3807 tp3808 a(g189 V tp3809 a(g73 V$ tp3810 a(g73 VENV p3811 tp3812 a(g202 V{ tp3813 a(g18 V tp3814 a(g18 VPERLDB_RESTART p3815 tp3816 a(g202 V} tp3817 a(g202 V; tp3818 a(g189 V\u000a\u000a p3819 tp3820 a(g358 V# $restart = 1; p3821 tp3822 a(g189 V\u000a p3823 tp3824 a(g73 V@ tp3825 a(g73 Vhist p3826 tp3827 a(g189 V p3828 tp3829 a(g344 V= tp3830 a(g189 V tp3831 a(g18 V tp3832 a(g18 Vget_list p3833 tp3834 a(g202 V( tp3835 a(g226 V'PERLDB_HIST' p3836 tp3837 a(g202 V) tp3838 a(g202 V; tp3839 a(g189 V\u000a p3840 tp3841 a(g73 V% tp3842 a(g73 Vbreak_on_load p3843 tp3844 a(g189 V tp3845 a(g344 V= tp3846 a(g189 V tp3847 a(g18 V tp3848 a(g18 Vget_list p3849 tp3850 a(g202 V( tp3851 a(g226 V"PERLDB_ON_LOAD" p3852 tp3853 a(g202 V) tp3854 a(g202 V; tp3855 a(g189 V\u000a p3856 tp3857 a(g73 V% tp3858 a(g73 Vpostponed p3859 tp3860 a(g189 V p3861 tp3862 a(g344 V= tp3863 a(g189 V tp3864 a(g18 V tp3865 a(g18 Vget_list p3866 tp3867 a(g202 V( tp3868 a(g226 V"PERLDB_POSTPONE" p3869 tp3870 a(g202 V) tp3871 a(g202 V; tp3872 a(g189 V\u000a\u000a p3873 tp3874 a(g18 V tp3875 a(g18 Vshare p3876 tp3877 a(g202 V( tp3878 a(g73 V@ tp3879 a(g73 Vhist p3880 tp3881 a(g202 V) tp3882 a(g202 V; tp3883 a(g189 V\u000a p3884 tp3885 a(g18 V tp3886 a(g18 Vshare p3887 tp3888 a(g202 V( tp3889 a(g73 V@ tp3890 a(g73 Vtruehist p3891 tp3892 a(g202 V) tp3893 a(g202 V; tp3894 a(g189 V\u000a p3895 tp3896 a(g18 V tp3897 a(g18 Vshare p3898 tp3899 a(g202 V( tp3900 a(g73 V% tp3901 a(g73 Vbreak_on_load p3902 tp3903 a(g202 V) tp3904 a(g202 V; tp3905 a(g189 V\u000a p3906 tp3907 a(g18 V tp3908 a(g18 Vshare p3909 tp3910 a(g202 V( tp3911 a(g73 V% tp3912 a(g73 Vpostponed p3913 tp3914 a(g202 V) tp3915 a(g202 V; tp3916 a(g189 V\u000a\u000a p3917 tp3918 a(g358 V# restore breakpoints/actions p3919 tp3920 a(g189 V\u000a p3921 tp3922 a(g111 Vmy p3923 tp3924 a(g189 V tp3925 a(g73 V@ tp3926 a(g73 Vhad_breakpoints p3927 tp3928 a(g189 V tp3929 a(g344 V= tp3930 a(g189 V tp3931 a(g18 V tp3932 a(g18 Vget_list p3933 tp3934 a(g202 V( tp3935 a(g226 V"PERLDB_VISITED" p3936 tp3937 a(g202 V) tp3938 a(g202 V; tp3939 a(g189 V\u000a p3940 tp3941 a(g111 Vfor p3942 tp3943 a(g189 V tp3944 a(g202 V( tp3945 a(g189 V tp3946 a(g319 V0 tp3947 a(g189 V tp3948 a(g344 V.. p3949 tp3950 a(g189 V tp3951 a(g73 V$# p3952 tp3953 a(g73 Vhad_breakpoints p3954 tp3955 a(g189 V tp3956 a(g202 V) tp3957 a(g189 V tp3958 a(g202 V{ tp3959 a(g189 V\u000a p3960 tp3961 a(g111 Vmy p3962 tp3963 a(g189 V tp3964 a(g73 V% tp3965 a(g73 Vpf p3966 tp3967 a(g189 V tp3968 a(g344 V= tp3969 a(g189 V tp3970 a(g18 V tp3971 a(g18 Vget_list p3972 tp3973 a(g202 V( tp3974 a(g226 V"PERLDB_FILE_$_" p3975 tp3976 a(g202 V) tp3977 a(g202 V; tp3978 a(g189 V\u000a p3979 tp3980 a(g73 V$ tp3981 a(g73 Vpostponed_file p3982 tp3983 a(g202 V{ tp3984 a(g189 V tp3985 a(g73 V$ tp3986 a(g73 Vhad_breakpoints p3987 tp3988 a(g202 V[ tp3989 a(g73 V$ tp3990 a(g73 V_ tp3991 a(g202 V] tp3992 a(g189 V tp3993 a(g202 V} tp3994 a(g189 V tp3995 a(g344 V= tp3996 a(g189 V tp3997 a(g344 V\u005c tp3998 a(g73 V% tp3999 a(g73 Vpf p4000 tp4001 a(g189 V tp4002 a(g111 Vif p4003 tp4004 a(g189 V tp4005 a(g73 V% tp4006 a(g73 Vpf p4007 tp4008 a(g202 V; tp4009 a(g189 V\u000a p4010 tp4011 a(g202 V} tp4012 a(g189 V\u000a\u000a p4013 tp4014 a(g358 V# restore options p4015 tp4016 a(g189 V\u000a p4017 tp4018 a(g111 Vmy p4019 tp4020 a(g189 V tp4021 a(g73 V% tp4022 a(g73 Vopt p4023 tp4024 a(g189 V tp4025 a(g344 V= tp4026 a(g189 V tp4027 a(g18 V tp4028 a(g18 Vget_list p4029 tp4030 a(g202 V( tp4031 a(g226 V"PERLDB_OPT" p4032 tp4033 a(g202 V) tp4034 a(g202 V; tp4035 a(g189 V\u000a p4036 tp4037 a(g111 Vmy p4038 tp4039 a(g189 V tp4040 a(g202 V( tp4041 a(g189 V tp4042 a(g73 V$ tp4043 a(g73 Vopt p4044 tp4045 a(g202 V, tp4046 a(g189 V tp4047 a(g73 V$ tp4048 a(g73 Vval p4049 tp4050 a(g189 V tp4051 a(g202 V) tp4052 a(g202 V; tp4053 a(g189 V\u000a p4054 tp4055 a(g111 Vwhile p4056 tp4057 a(g189 V tp4058 a(g202 V( tp4059 a(g189 V tp4060 a(g202 V( tp4061 a(g189 V tp4062 a(g73 V$ tp4063 a(g73 Vopt p4064 tp4065 a(g202 V, tp4066 a(g189 V tp4067 a(g73 V$ tp4068 a(g73 Vval p4069 tp4070 a(g189 V tp4071 a(g202 V) tp4072 a(g189 V tp4073 a(g344 V= tp4074 a(g189 V tp4075 a(g57 Veach p4076 tp4077 a(g189 V tp4078 a(g73 V% tp4079 a(g73 Vopt p4080 tp4081 a(g189 V tp4082 a(g202 V) tp4083 a(g189 V tp4084 a(g202 V{ tp4085 a(g189 V\u000a p4086 tp4087 a(g73 V$ tp4088 a(g73 Vval p4089 tp4090 a(g189 V tp4091 a(g344 V=~ p4092 tp4093 a(g189 V tp4094 a(g229 Vs/[\u005c\u005c\u005c']/\u005c\u005c$1/g p4095 tp4096 a(g202 V; tp4097 a(g189 V\u000a p4098 tp4099 a(g18 V tp4100 a(g18 Vparse_options p4101 tp4102 a(g202 V( tp4103 a(g226 V"$opt'$val'" p4104 tp4105 a(g202 V) tp4106 a(g202 V; tp4107 a(g189 V\u000a p4108 tp4109 a(g202 V} tp4110 a(g189 V\u000a\u000a p4111 tp4112 a(g358 V# restore original @INC p4113 tp4114 a(g189 V\u000a p4115 tp4116 a(g73 V@ tp4117 a(g73 VINC p4118 tp4119 a(g189 V p4120 tp4121 a(g344 V= tp4122 a(g189 V tp4123 a(g18 V tp4124 a(g18 Vget_list p4125 tp4126 a(g202 V( tp4127 a(g226 V"PERLDB_INC" p4128 tp4129 a(g202 V) tp4130 a(g202 V; tp4131 a(g189 V\u000a p4132 tp4133 a(g73 V@ tp4134 a(g73 Vini_INC p4135 tp4136 a(g189 V tp4137 a(g344 V= tp4138 a(g189 V tp4139 a(g73 V@ tp4140 a(g73 VINC p4141 tp4142 a(g202 V; tp4143 a(g189 V\u000a\u000a p4144 tp4145 a(g358 V# return pre/postprompt actions and typeahead buffer p4146 tp4147 a(g189 V\u000a p4148 tp4149 a(g73 V$ tp4150 a(g73 Vpretype p4151 tp4152 a(g189 V p4153 tp4154 a(g344 V= tp4155 a(g189 V tp4156 a(g202 V[ tp4157 a(g189 V tp4158 a(g18 V tp4159 a(g18 Vget_list p4160 tp4161 a(g202 V( tp4162 a(g226 V"PERLDB_PRETYPE" p4163 tp4164 a(g202 V) tp4165 a(g189 V tp4166 a(g202 V] tp4167 a(g202 V; tp4168 a(g189 V\u000a p4169 tp4170 a(g73 V$ tp4171 a(g73 Vpre p4172 tp4173 a(g189 V p4174 tp4175 a(g344 V= tp4176 a(g189 V tp4177 a(g202 V[ tp4178 a(g189 V tp4179 a(g18 V tp4180 a(g18 Vget_list p4181 tp4182 a(g202 V( tp4183 a(g226 V"PERLDB_PRE" p4184 tp4185 a(g202 V) tp4186 a(g189 V tp4187 a(g202 V] tp4188 a(g202 V; tp4189 a(g189 V\u000a p4190 tp4191 a(g73 V$ tp4192 a(g73 Vpost p4193 tp4194 a(g189 V p4195 tp4196 a(g344 V= tp4197 a(g189 V tp4198 a(g202 V[ tp4199 a(g189 V tp4200 a(g18 V tp4201 a(g18 Vget_list p4202 tp4203 a(g202 V( tp4204 a(g226 V"PERLDB_POST" p4205 tp4206 a(g202 V) tp4207 a(g189 V tp4208 a(g202 V] tp4209 a(g202 V; tp4210 a(g189 V\u000a p4211 tp4212 a(g73 V@ tp4213 a(g73 Vtypeahead p4214 tp4215 a(g189 V tp4216 a(g344 V= tp4217 a(g189 V tp4218 a(g18 V tp4219 a(g18 Vget_list p4220 tp4221 a(g202 V( tp4222 a(g189 V tp4223 a(g226 V"PERLDB_TYPEAHEAD" p4224 tp4225 a(g202 V, tp4226 a(g189 V tp4227 a(g73 V@ tp4228 a(g73 Vtypeahead p4229 tp4230 a(g189 V tp4231 a(g202 V) tp4232 a(g202 V; tp4233 a(g189 V\u000a tp4234 a(g202 V} tp4235 a(g189 V tp4236 a(g358 V## end if (exists $ENV{PERLDB_RESTART... p4237 tp4238 a(g189 V\u000a\u000a p4239 tp4240 a(g7 V=head2 SETTING UP THE TERMINAL\u000a\u000aNow, we'll decide how the debugger is going to interact with the user.\u000aIf there's no TTY, we set the debugger to run non-stop; there's not going\u000ato be anyone there to enter commands.\u000a\u000a=cut p4241 tp4242 a(g189 V\u000a\u000a p4243 tp4244 a(g111 Vif p4245 tp4246 a(g189 V tp4247 a(g202 V( tp4248 a(g73 V$ tp4249 a(g73 Vnotty p4250 tp4251 a(g202 V) tp4252 a(g189 V tp4253 a(g202 V{ tp4254 a(g189 V\u000a p4255 tp4256 a(g73 V$ tp4257 a(g73 Vrunnonstop p4258 tp4259 a(g189 V tp4260 a(g344 V= tp4261 a(g189 V tp4262 a(g319 V1 tp4263 a(g202 V; tp4264 a(g189 V\u000a p4265 tp4266 a(g18 V tp4267 a(g18 Vshare p4268 tp4269 a(g202 V( tp4270 a(g73 V$ tp4271 a(g73 Vrunnonstop p4272 tp4273 a(g202 V) tp4274 a(g202 V; tp4275 a(g189 V\u000a tp4276 a(g202 V} tp4277 a(g189 V\u000a\u000a p4278 tp4279 a(g7 V=pod\u000a\u000aIf there is a TTY, we have to determine who it belongs to before we can\u000aproceed. If this is a slave editor or graphical debugger (denoted by\u000athe first command-line switch being '-emacs'), we shift this off and\u000aset C<$rl> to 0 (XXX ostensibly to do straight reads).\u000a\u000a=cut p4280 tp4281 a(g189 V\u000a\u000a p4282 tp4283 a(g111 Velse p4284 tp4285 a(g189 V tp4286 a(g202 V{ tp4287 a(g189 V\u000a\u000a p4288 tp4289 a(g358 V# Is Perl being run from a slave editor or graphical debugger? p4290 tp4291 a(g189 V\u000a p4292 tp4293 a(g358 V# If so, don't use readline, and set $slave_editor = 1. p4294 tp4295 a(g189 V\u000a p4296 tp4297 a(g73 V$ tp4298 a(g73 Vslave_editor p4299 tp4300 a(g189 V tp4301 a(g344 V= tp4302 a(g189 V\u000a p4303 tp4304 a(g202 V( tp4305 a(g189 V tp4306 a(g202 V( tp4307 a(g189 V tp4308 a(g57 Vdefined p4309 tp4310 a(g189 V tp4311 a(g73 V$ tp4312 a(g99 Vmain:: p4313 tp4314 a(g73 VARGV p4315 tp4316 a(g202 V[ tp4317 a(g319 V0 tp4318 a(g202 V] tp4319 a(g189 V tp4320 a(g202 V) tp4321 a(g189 V tp4322 a(g348 Vand p4323 tp4324 a(g189 V tp4325 a(g202 V( tp4326 a(g189 V tp4327 a(g73 V$ tp4328 a(g99 Vmain:: p4329 tp4330 a(g73 VARGV p4331 tp4332 a(g202 V[ tp4333 a(g319 V0 tp4334 a(g202 V] tp4335 a(g189 V tp4336 a(g348 Veq p4337 tp4338 a(g189 V tp4339 a(g226 V'-emacs' p4340 tp4341 a(g189 V tp4342 a(g202 V) tp4343 a(g189 V tp4344 a(g202 V) tp4345 a(g202 V; tp4346 a(g189 V\u000a p4347 tp4348 a(g73 V$ tp4349 a(g73 Vrl p4350 tp4351 a(g189 V tp4352 a(g344 V= tp4353 a(g189 V tp4354 a(g319 V0 tp4355 a(g202 V, tp4356 a(g189 V tp4357 a(g57 Vshift p4358 tp4359 a(g202 V( tp4360 a(g73 V@ tp4361 a(g99 Vmain:: p4362 tp4363 a(g73 VARGV p4364 tp4365 a(g202 V) tp4366 a(g189 V tp4367 a(g111 Vif p4368 tp4369 a(g189 V tp4370 a(g73 V$ tp4371 a(g73 Vslave_editor p4372 tp4373 a(g202 V; tp4374 a(g189 V\u000a\u000a p4375 tp4376 a(g358 V#require Term::ReadLine; p4377 tp4378 a(g189 V\u000a\u000a p4379 tp4380 a(g7 V=pod\u000a\u000aWe then determine what the console should be on various systems:\u000a\u000a=over 4\u000a\u000a=item * Cygwin - We use C instead of a separate device.\u000a\u000a=cut p4381 tp4382 a(g189 V\u000a\u000a p4383 tp4384 a(g111 Vif p4385 tp4386 a(g189 V tp4387 a(g202 V( tp4388 a(g189 V tp4389 a(g76 V$^O p4390 tp4391 a(g189 V tp4392 a(g348 Veq p4393 tp4394 a(g189 V tp4395 a(g226 V'cygwin' p4396 tp4397 a(g189 V tp4398 a(g202 V) tp4399 a(g189 V tp4400 a(g202 V{ tp4401 a(g189 V\u000a\u000a p4402 tp4403 a(g358 V# /dev/tty is binary. use stdin for textmode p4404 tp4405 a(g189 V\u000a p4406 tp4407 a(g57 Vundef p4408 tp4409 a(g189 V tp4410 a(g73 V$ tp4411 a(g73 Vconsole p4412 tp4413 a(g202 V; tp4414 a(g189 V\u000a p4415 tp4416 a(g202 V} tp4417 a(g189 V\u000a\u000a p4418 tp4419 a(g7 V=item * Unix - use C.\u000a\u000a=cut p4420 tp4421 a(g189 V\u000a\u000a p4422 tp4423 a(g111 Velsif p4424 tp4425 a(g189 V tp4426 a(g202 V( tp4427 a(g189 V tp4428 a(g344 V- tp4429 a(g18 V tp4430 a(g18 Ve tp4431 a(g189 V tp4432 a(g226 V"/dev/tty" p4433 tp4434 a(g189 V tp4435 a(g202 V) tp4436 a(g189 V tp4437 a(g202 V{ tp4438 a(g189 V\u000a p4439 tp4440 a(g73 V$ tp4441 a(g73 Vconsole p4442 tp4443 a(g189 V tp4444 a(g344 V= tp4445 a(g189 V tp4446 a(g226 V"/dev/tty" p4447 tp4448 a(g202 V; tp4449 a(g189 V\u000a p4450 tp4451 a(g202 V} tp4452 a(g189 V\u000a\u000a p4453 tp4454 a(g7 V=item * Windows or MSDOS - use C.\u000a\u000a=cut p4455 tp4456 a(g189 V\u000a\u000a p4457 tp4458 a(g111 Velsif p4459 tp4460 a(g189 V tp4461 a(g202 V( tp4462 a(g189 V tp4463 a(g76 V$^O p4464 tp4465 a(g189 V tp4466 a(g348 Veq p4467 tp4468 a(g189 V tp4469 a(g226 V'dos' p4470 tp4471 a(g189 V tp4472 a(g348 Vor p4473 tp4474 a(g189 V tp4475 a(g344 V- tp4476 a(g18 V tp4477 a(g18 Ve tp4478 a(g189 V tp4479 a(g226 V"con" p4480 tp4481 a(g189 V tp4482 a(g348 Vor p4483 tp4484 a(g189 V tp4485 a(g76 V$^O p4486 tp4487 a(g189 V tp4488 a(g348 Veq p4489 tp4490 a(g189 V tp4491 a(g226 V'MSWin32' p4492 tp4493 a(g189 V tp4494 a(g202 V) tp4495 a(g189 V tp4496 a(g202 V{ tp4497 a(g189 V\u000a p4498 tp4499 a(g73 V$ tp4500 a(g73 Vconsole p4501 tp4502 a(g189 V tp4503 a(g344 V= tp4504 a(g189 V tp4505 a(g226 V"con" p4506 tp4507 a(g202 V; tp4508 a(g189 V\u000a p4509 tp4510 a(g202 V} tp4511 a(g189 V\u000a\u000a p4512 tp4513 a(g7 V=item * MacOS - use C if this is the MPW version; C if not.\u000a\u000aNote that Mac OS X returns C, not C. Also note that the debugger doesn't do anything special for C. Maybe it should.\u000a\u000a=cut p4514 tp4515 a(g189 V\u000a\u000a p4516 tp4517 a(g111 Velsif p4518 tp4519 a(g189 V tp4520 a(g202 V( tp4521 a(g189 V tp4522 a(g76 V$^O p4523 tp4524 a(g189 V tp4525 a(g348 Veq p4526 tp4527 a(g189 V tp4528 a(g226 V'MacOS' p4529 tp4530 a(g189 V tp4531 a(g202 V) tp4532 a(g189 V tp4533 a(g202 V{ tp4534 a(g189 V\u000a p4535 tp4536 a(g111 Vif p4537 tp4538 a(g189 V tp4539 a(g202 V( tp4540 a(g189 V tp4541 a(g73 V$ tp4542 a(g99 VMacPerl:: p4543 tp4544 a(g73 VVersion p4545 tp4546 a(g189 V tp4547 a(g344 V!~ p4548 tp4549 a(g189 V tp4550 a(g229 V/MPW/ p4551 tp4552 a(g189 V tp4553 a(g202 V) tp4554 a(g189 V tp4555 a(g202 V{ tp4556 a(g189 V\u000a p4557 tp4558 a(g73 V$ tp4559 a(g73 Vconsole p4560 tp4561 a(g189 V tp4562 a(g344 V= tp4563 a(g189 V\u000a p4564 tp4565 a(g226 V"Dev:Console:Perl Debug" p4566 tp4567 a(g202 V; tp4568 a(g189 V p4569 tp4570 a(g358 V# Separate window for application p4571 tp4572 a(g189 V\u000a p4573 tp4574 a(g202 V} tp4575 a(g189 V\u000a p4576 tp4577 a(g111 Velse p4578 tp4579 a(g189 V tp4580 a(g202 V{ tp4581 a(g189 V\u000a p4582 tp4583 a(g73 V$ tp4584 a(g73 Vconsole p4585 tp4586 a(g189 V tp4587 a(g344 V= tp4588 a(g189 V tp4589 a(g226 V"Dev:Console" p4590 tp4591 a(g202 V; tp4592 a(g189 V\u000a p4593 tp4594 a(g202 V} tp4595 a(g189 V\u000a p4596 tp4597 a(g202 V} tp4598 a(g189 V tp4599 a(g358 V## end elsif ($^O eq 'MacOS') p4600 tp4601 a(g189 V\u000a\u000a p4602 tp4603 a(g7 V=item * VMS - use C.\u000a\u000a=cut p4604 tp4605 a(g189 V\u000a\u000a p4606 tp4607 a(g111 Velse p4608 tp4609 a(g189 V tp4610 a(g202 V{ tp4611 a(g189 V\u000a\u000a p4612 tp4613 a(g358 V# everything else is ... p4614 tp4615 a(g189 V\u000a p4616 tp4617 a(g73 V$ tp4618 a(g73 Vconsole p4619 tp4620 a(g189 V tp4621 a(g344 V= tp4622 a(g189 V tp4623 a(g226 V"sys\u005c$command" p4624 tp4625 a(g202 V; tp4626 a(g189 V\u000a p4627 tp4628 a(g202 V} tp4629 a(g189 V\u000a\u000a p4630 tp4631 a(g7 V=pod\u000a\u000a=back\u000a\u000aSeveral other systems don't use a specific console. We C\u000afor those (Windows using a slave editor/graphical debugger, NetWare, OS/2\u000awith a slave editor, Epoc).\u000a\u000a=cut p4632 tp4633 a(g189 V\u000a\u000a p4634 tp4635 a(g111 Vif p4636 tp4637 a(g189 V tp4638 a(g202 V( tp4639 a(g189 V tp4640 a(g202 V( tp4641 a(g189 V tp4642 a(g76 V$^O p4643 tp4644 a(g189 V tp4645 a(g348 Veq p4646 tp4647 a(g189 V tp4648 a(g226 V'MSWin32' p4649 tp4650 a(g189 V tp4651 a(g202 V) tp4652 a(g189 V tp4653 a(g348 Vand p4654 tp4655 a(g189 V tp4656 a(g202 V( tp4657 a(g189 V tp4658 a(g73 V$ tp4659 a(g73 Vslave_editor p4660 tp4661 a(g189 V tp4662 a(g348 Vor p4663 tp4664 a(g189 V tp4665 a(g57 Vdefined p4666 tp4667 a(g189 V tp4668 a(g73 V$ tp4669 a(g73 VENV p4670 tp4671 a(g202 V{ tp4672 a(g18 V tp4673 a(g18 VEMACS p4674 tp4675 a(g202 V} tp4676 a(g189 V tp4677 a(g202 V) tp4678 a(g189 V tp4679 a(g202 V) tp4680 a(g189 V tp4681 a(g202 V{ tp4682 a(g189 V\u000a\u000a p4683 tp4684 a(g358 V# /dev/tty is binary. use stdin for textmode p4685 tp4686 a(g189 V\u000a p4687 tp4688 a(g73 V$ tp4689 a(g73 Vconsole p4690 tp4691 a(g189 V tp4692 a(g344 V= tp4693 a(g189 V tp4694 a(g57 Vundef p4695 tp4696 a(g202 V; tp4697 a(g189 V\u000a p4698 tp4699 a(g202 V} tp4700 a(g189 V\u000a\u000a p4701 tp4702 a(g111 Vif p4703 tp4704 a(g189 V tp4705 a(g202 V( tp4706 a(g189 V tp4707 a(g76 V$^O p4708 tp4709 a(g189 V tp4710 a(g348 Veq p4711 tp4712 a(g189 V tp4713 a(g226 V'NetWare' p4714 tp4715 a(g189 V tp4716 a(g202 V) tp4717 a(g189 V tp4718 a(g202 V{ tp4719 a(g189 V\u000a\u000a p4720 tp4721 a(g358 V# /dev/tty is binary. use stdin for textmode p4722 tp4723 a(g189 V\u000a p4724 tp4725 a(g73 V$ tp4726 a(g73 Vconsole p4727 tp4728 a(g189 V tp4729 a(g344 V= tp4730 a(g189 V tp4731 a(g57 Vundef p4732 tp4733 a(g202 V; tp4734 a(g189 V\u000a p4735 tp4736 a(g202 V} tp4737 a(g189 V\u000a\u000a p4738 tp4739 a(g358 V# In OS/2, we need to use STDIN to get textmode too, even though p4740 tp4741 a(g189 V\u000a p4742 tp4743 a(g358 V# it pretty much looks like Unix otherwise. p4744 tp4745 a(g189 V\u000a p4746 tp4747 a(g111 Vif p4748 tp4749 a(g189 V tp4750 a(g202 V( tp4751 a(g189 V tp4752 a(g57 Vdefined p4753 tp4754 a(g189 V tp4755 a(g73 V$ tp4756 a(g73 VENV p4757 tp4758 a(g202 V{ tp4759 a(g18 V tp4760 a(g18 VOS2_SHELL p4761 tp4762 a(g202 V} tp4763 a(g189 V tp4764 a(g348 Vand p4765 tp4766 a(g189 V tp4767 a(g202 V( tp4768 a(g189 V tp4769 a(g73 V$ tp4770 a(g73 Vslave_editor p4771 tp4772 a(g189 V tp4773 a(g348 Vor p4774 tp4775 a(g189 V tp4776 a(g73 V$ tp4777 a(g73 VENV p4778 tp4779 a(g202 V{ tp4780 a(g18 V tp4781 a(g18 VWINDOWID p4782 tp4783 a(g202 V} tp4784 a(g189 V tp4785 a(g202 V) tp4786 a(g189 V tp4787 a(g202 V) tp4788 a(g189 V\u000a p4789 tp4790 a(g202 V{ tp4791 a(g189 V p4792 tp4793 a(g358 V# In OS/2 p4794 tp4795 a(g189 V\u000a p4796 tp4797 a(g73 V$ tp4798 a(g73 Vconsole p4799 tp4800 a(g189 V tp4801 a(g344 V= tp4802 a(g189 V tp4803 a(g57 Vundef p4804 tp4805 a(g202 V; tp4806 a(g189 V\u000a p4807 tp4808 a(g202 V} tp4809 a(g189 V\u000a\u000a p4810 tp4811 a(g358 V# EPOC also falls into the 'got to use STDIN' camp. p4812 tp4813 a(g189 V\u000a p4814 tp4815 a(g111 Vif p4816 tp4817 a(g189 V tp4818 a(g202 V( tp4819 a(g189 V tp4820 a(g76 V$^O p4821 tp4822 a(g189 V tp4823 a(g348 Veq p4824 tp4825 a(g189 V tp4826 a(g226 V'epoc' p4827 tp4828 a(g189 V tp4829 a(g202 V) tp4830 a(g189 V tp4831 a(g202 V{ tp4832 a(g189 V\u000a p4833 tp4834 a(g73 V$ tp4835 a(g73 Vconsole p4836 tp4837 a(g189 V tp4838 a(g344 V= tp4839 a(g189 V tp4840 a(g57 Vundef p4841 tp4842 a(g202 V; tp4843 a(g189 V\u000a p4844 tp4845 a(g202 V} tp4846 a(g189 V\u000a\u000a p4847 tp4848 a(g7 V=pod\u000a\u000aIf there is a TTY hanging around from a parent, we use that as the console.\u000a\u000a=cut p4849 tp4850 a(g189 V\u000a\u000a p4851 tp4852 a(g73 V$ tp4853 a(g73 Vconsole p4854 tp4855 a(g189 V tp4856 a(g344 V= tp4857 a(g189 V tp4858 a(g73 V$ tp4859 a(g73 Vtty p4860 tp4861 a(g189 V tp4862 a(g111 Vif p4863 tp4864 a(g189 V tp4865 a(g57 Vdefined p4866 tp4867 a(g189 V tp4868 a(g73 V$ tp4869 a(g73 Vtty p4870 tp4871 a(g202 V; tp4872 a(g189 V\u000a\u000a p4873 tp4874 a(g7 V=head2 SOCKET HANDLING \u000a\u000aThe debugger is capable of opening a socket and carrying out a debugging\u000asession over the socket.\u000a\u000aIf C was defined in the options, the debugger assumes that it\u000ashould try to start a debugging session on that port. It builds the socket\u000aand then tries to connect the input and output filehandles to it.\u000a\u000a=cut p4875 tp4876 a(g189 V\u000a\u000a p4877 tp4878 a(g358 V# Handle socket stuff. p4879 tp4880 a(g189 V\u000a\u000a p4881 tp4882 a(g111 Vif p4883 tp4884 a(g189 V tp4885 a(g202 V( tp4886 a(g189 V tp4887 a(g57 Vdefined p4888 tp4889 a(g189 V tp4890 a(g73 V$ tp4891 a(g73 Vremoteport p4892 tp4893 a(g189 V tp4894 a(g202 V) tp4895 a(g189 V tp4896 a(g202 V{ tp4897 a(g189 V\u000a\u000a p4898 tp4899 a(g358 V# If RemotePort was defined in the options, connect input and output p4900 tp4901 a(g189 V\u000a p4902 tp4903 a(g358 V# to the socket. p4904 tp4905 a(g189 V\u000a p4906 tp4907 a(g57 Vrequire p4908 tp4909 a(g189 V tp4910 a(g18 V tp4911 a(g99 VIO:: p4912 tp4913 a(g18 VSocket p4914 tp4915 a(g202 V; tp4916 a(g189 V\u000a p4917 tp4918 a(g73 V$ tp4919 a(g73 VOUT p4920 tp4921 a(g189 V tp4922 a(g344 V= tp4923 a(g189 V tp4924 a(g111 Vnew p4925 tp4926 a(g189 V tp4927 a(g18 V tp4928 a(g99 VIO:: p4929 tp4930 a(g99 VSocket:: p4931 tp4932 a(g18 VINET p4933 tp4934 a(g202 V( tp4935 a(g189 V\u000a p4936 tp4937 a(g18 V tp4938 a(g18 VTimeout p4939 tp4940 a(g189 V p4941 tp4942 a(g344 V= tp4943 a(g344 V> tp4944 a(g189 V tp4945 a(g226 V'10' p4946 tp4947 a(g202 V, tp4948 a(g189 V\u000a p4949 tp4950 a(g18 V tp4951 a(g18 VPeerAddr p4952 tp4953 a(g189 V tp4954 a(g344 V= tp4955 a(g344 V> tp4956 a(g189 V tp4957 a(g73 V$ tp4958 a(g73 Vremoteport p4959 tp4960 a(g202 V, tp4961 a(g189 V\u000a p4962 tp4963 a(g18 V tp4964 a(g18 VProto p4965 tp4966 a(g189 V p4967 tp4968 a(g344 V= tp4969 a(g344 V> tp4970 a(g189 V tp4971 a(g226 V'tcp' p4972 tp4973 a(g202 V, tp4974 a(g189 V\u000a p4975 tp4976 a(g202 V) tp4977 a(g202 V; tp4978 a(g189 V\u000a p4979 tp4980 a(g111 Vif p4981 tp4982 a(g189 V tp4983 a(g202 V( tp4984 a(g189 V tp4985 a(g344 V! tp4986 a(g73 V$ tp4987 a(g73 VOUT p4988 tp4989 a(g189 V tp4990 a(g202 V) tp4991 a(g189 V tp4992 a(g202 V{ tp4993 a(g189 V tp4994 a(g57 Vdie p4995 tp4996 a(g189 V tp4997 a(g226 V"Unable to connect to remote host: $remoteport\u005cn" p4998 tp4999 a(g202 V; tp5000 a(g189 V tp5001 a(g202 V} tp5002 a(g189 V\u000a p5003 tp5004 a(g73 V$ tp5005 a(g73 VIN p5006 tp5007 a(g189 V tp5008 a(g344 V= tp5009 a(g189 V tp5010 a(g73 V$ tp5011 a(g73 VOUT p5012 tp5013 a(g202 V; tp5014 a(g189 V\u000a p5015 tp5016 a(g202 V} tp5017 a(g189 V tp5018 a(g358 V## end if (defined $remoteport) p5019 tp5020 a(g189 V\u000a\u000a p5021 tp5022 a(g7 V=pod\u000a\u000aIf no C was defined, and we want to create a TTY on startup,\u000athis is probably a situation where multiple debuggers are running (for example,\u000aa backticked command that starts up another debugger). We create a new IN and\u000aOUT filehandle, and do the necessary mojo to create a new TTY if we know how\u000aand if we can.\u000a\u000a=cut p5023 tp5024 a(g189 V\u000a\u000a p5025 tp5026 a(g358 V# Non-socket. p5027 tp5028 a(g189 V\u000a p5029 tp5030 a(g111 Velse p5031 tp5032 a(g189 V tp5033 a(g202 V{ tp5034 a(g189 V\u000a\u000a p5035 tp5036 a(g358 V# Two debuggers running (probably a system or a backtick that invokes p5037 tp5038 a(g189 V\u000a p5039 tp5040 a(g358 V# the debugger itself under the running one). create a new IN and OUT p5041 tp5042 a(g189 V\u000a p5043 tp5044 a(g358 V# filehandle, and do the necessary mojo to create a new tty if we p5045 tp5046 a(g189 V\u000a p5047 tp5048 a(g358 V# know how, and we can. p5049 tp5050 a(g189 V\u000a p5051 tp5052 a(g18 V tp5053 a(g18 Vcreate_IN_OUT p5054 tp5055 a(g202 V( tp5056 a(g319 V4 tp5057 a(g202 V) tp5058 a(g189 V tp5059 a(g111 Vif p5060 tp5061 a(g189 V tp5062 a(g73 V$ tp5063 a(g73 VCreateTTY p5064 tp5065 a(g189 V tp5066 a(g344 V& tp5067 a(g189 V tp5068 a(g319 V4 tp5069 a(g202 V; tp5070 a(g189 V\u000a p5071 tp5072 a(g111 Vif p5073 tp5074 a(g189 V tp5075 a(g202 V( tp5076 a(g73 V$ tp5077 a(g73 Vconsole p5078 tp5079 a(g202 V) tp5080 a(g189 V tp5081 a(g202 V{ tp5082 a(g189 V\u000a\u000a p5083 tp5084 a(g358 V# If we have a console, check to see if there are separate ins and p5085 tp5086 a(g189 V\u000a p5087 tp5088 a(g358 V# outs to open. (They are assumed identiical if not.) p5089 tp5090 a(g189 V\u000a\u000a p5091 tp5092 a(g111 Vmy p5093 tp5094 a(g189 V tp5095 a(g202 V( tp5096 a(g189 V tp5097 a(g73 V$ tp5098 a(g73 Vi tp5099 a(g202 V, tp5100 a(g189 V tp5101 a(g73 V$ tp5102 a(g73 Vo tp5103 a(g189 V tp5104 a(g202 V) tp5105 a(g189 V tp5106 a(g344 V= tp5107 a(g189 V tp5108 a(g57 Vsplit p5109 tp5110 a(g189 V tp5111 a(g229 V/,/ p5112 tp5113 a(g202 V, tp5114 a(g189 V tp5115 a(g73 V$ tp5116 a(g73 Vconsole p5117 tp5118 a(g202 V; tp5119 a(g189 V\u000a p5120 tp5121 a(g73 V$ tp5122 a(g73 Vo tp5123 a(g189 V tp5124 a(g344 V= tp5125 a(g189 V tp5126 a(g73 V$ tp5127 a(g73 Vi tp5128 a(g189 V tp5129 a(g111 Vunless p5130 tp5131 a(g189 V tp5132 a(g57 Vdefined p5133 tp5134 a(g189 V tp5135 a(g73 V$ tp5136 a(g73 Vo tp5137 a(g202 V; tp5138 a(g189 V\u000a\u000a p5139 tp5140 a(g358 V# read/write on in, or just read, or read on STDIN. p5141 tp5142 a(g189 V\u000a p5143 tp5144 a(g57 Vopen p5145 tp5146 a(g202 V( tp5147 a(g189 V tp5148 a(g18 V tp5149 a(g18 VIN p5150 tp5151 a(g202 V, tp5152 a(g189 V p5153 tp5154 a(g226 V"+<$i" p5155 tp5156 a(g189 V tp5157 a(g202 V) tp5158 a(g189 V\u000a p5159 tp5160 a(g344 V|| p5161 tp5162 a(g189 V tp5163 a(g57 Vopen p5164 tp5165 a(g202 V( tp5166 a(g189 V tp5167 a(g18 V tp5168 a(g18 VIN p5169 tp5170 a(g202 V, tp5171 a(g189 V tp5172 a(g226 V"<$i" p5173 tp5174 a(g189 V tp5175 a(g202 V) tp5176 a(g189 V\u000a p5177 tp5178 a(g344 V|| p5179 tp5180 a(g189 V tp5181 a(g57 Vopen p5182 tp5183 a(g202 V( tp5184 a(g189 V tp5185 a(g18 V tp5186 a(g18 VIN p5187 tp5188 a(g202 V, tp5189 a(g189 V tp5190 a(g226 V"<&STDIN" p5191 tp5192 a(g189 V tp5193 a(g202 V) tp5194 a(g202 V; tp5195 a(g189 V\u000a\u000a p5196 tp5197 a(g358 V# read/write/create/clobber out, or write/create/clobber out, p5198 tp5199 a(g189 V\u000a p5200 tp5201 a(g358 V# or merge with STDERR, or merge with STDOUT. p5202 tp5203 a(g189 V\u000a p5204 tp5205 a(g57 Vopen p5206 tp5207 a(g202 V( tp5208 a(g189 V tp5209 a(g18 V tp5210 a(g18 VOUT p5211 tp5212 a(g202 V, tp5213 a(g189 V tp5214 a(g226 V"+>$o" p5215 tp5216 a(g189 V tp5217 a(g202 V) tp5218 a(g189 V\u000a p5219 tp5220 a(g344 V|| p5221 tp5222 a(g189 V tp5223 a(g57 Vopen p5224 tp5225 a(g202 V( tp5226 a(g189 V tp5227 a(g18 V tp5228 a(g18 VOUT p5229 tp5230 a(g202 V, tp5231 a(g189 V tp5232 a(g226 V">$o" p5233 tp5234 a(g189 V tp5235 a(g202 V) tp5236 a(g189 V\u000a p5237 tp5238 a(g344 V|| p5239 tp5240 a(g189 V tp5241 a(g57 Vopen p5242 tp5243 a(g202 V( tp5244 a(g189 V tp5245 a(g18 V tp5246 a(g18 VOUT p5247 tp5248 a(g202 V, tp5249 a(g189 V tp5250 a(g226 V">&STDERR" p5251 tp5252 a(g189 V tp5253 a(g202 V) tp5254 a(g189 V\u000a p5255 tp5256 a(g344 V|| p5257 tp5258 a(g189 V tp5259 a(g57 Vopen p5260 tp5261 a(g202 V( tp5262 a(g189 V tp5263 a(g18 V tp5264 a(g18 VOUT p5265 tp5266 a(g202 V, tp5267 a(g189 V tp5268 a(g226 V">&STDOUT" p5269 tp5270 a(g189 V tp5271 a(g202 V) tp5272 a(g202 V; tp5273 a(g189 V p5274 tp5275 a(g358 V# so we don't dongle stdout p5276 tp5277 a(g189 V\u000a\u000a p5278 tp5279 a(g202 V} tp5280 a(g189 V tp5281 a(g358 V## end if ($console) p5282 tp5283 a(g189 V\u000a p5284 tp5285 a(g111 Velsif p5286 tp5287 a(g189 V tp5288 a(g202 V( tp5289 a(g189 V tp5290 a(g348 Vnot p5291 tp5292 a(g189 V tp5293 a(g57 Vdefined p5294 tp5295 a(g189 V tp5296 a(g73 V$ tp5297 a(g73 Vconsole p5298 tp5299 a(g189 V tp5300 a(g202 V) tp5301 a(g189 V tp5302 a(g202 V{ tp5303 a(g189 V\u000a\u000a p5304 tp5305 a(g358 V# No console. Open STDIN. p5306 tp5307 a(g189 V\u000a p5308 tp5309 a(g57 Vopen p5310 tp5311 a(g202 V( tp5312 a(g189 V tp5313 a(g18 V tp5314 a(g18 VIN p5315 tp5316 a(g202 V, tp5317 a(g189 V tp5318 a(g226 V"<&STDIN" p5319 tp5320 a(g189 V tp5321 a(g202 V) tp5322 a(g202 V; tp5323 a(g189 V\u000a\u000a p5324 tp5325 a(g358 V# merge with STDERR, or with STDOUT. p5326 tp5327 a(g189 V\u000a p5328 tp5329 a(g57 Vopen p5330 tp5331 a(g202 V( tp5332 a(g189 V tp5333 a(g18 V tp5334 a(g18 VOUT p5335 tp5336 a(g202 V, tp5337 a(g189 V p5338 tp5339 a(g226 V">&STDERR" p5340 tp5341 a(g189 V tp5342 a(g202 V) tp5343 a(g189 V\u000a p5344 tp5345 a(g344 V|| p5346 tp5347 a(g189 V tp5348 a(g57 Vopen p5349 tp5350 a(g202 V( tp5351 a(g189 V tp5352 a(g18 V tp5353 a(g18 VOUT p5354 tp5355 a(g202 V, tp5356 a(g189 V tp5357 a(g226 V">&STDOUT" p5358 tp5359 a(g189 V tp5360 a(g202 V) tp5361 a(g202 V; tp5362 a(g189 V p5363 tp5364 a(g358 V# so we don't dongle stdout p5365 tp5366 a(g189 V\u000a p5367 tp5368 a(g73 V$ tp5369 a(g73 Vconsole p5370 tp5371 a(g189 V tp5372 a(g344 V= tp5373 a(g189 V tp5374 a(g226 V'STDIN/OUT' p5375 tp5376 a(g202 V; tp5377 a(g189 V\u000a p5378 tp5379 a(g202 V} tp5380 a(g189 V tp5381 a(g358 V## end elsif (not defined $console) p5382 tp5383 a(g189 V\u000a\u000a p5384 tp5385 a(g358 V# Keep copies of the filehandles so that when the pager runs, it p5386 tp5387 a(g189 V\u000a p5388 tp5389 a(g358 V# can close standard input without clobbering ours. p5390 tp5391 a(g189 V\u000a p5392 tp5393 a(g73 V$ tp5394 a(g73 VIN p5395 tp5396 a(g189 V tp5397 a(g344 V= tp5398 a(g189 V tp5399 a(g344 V\u005c tp5400 a(g344 V* tp5401 a(g18 V tp5402 a(g18 VIN p5403 tp5404 a(g202 V, tp5405 a(g189 V tp5406 a(g73 V$ tp5407 a(g73 VOUT p5408 tp5409 a(g189 V tp5410 a(g344 V= tp5411 a(g189 V tp5412 a(g344 V\u005c tp5413 a(g344 V* tp5414 a(g18 V tp5415 a(g18 VOUT p5416 tp5417 a(g189 V tp5418 a(g111 Vif p5419 tp5420 a(g189 V tp5421 a(g73 V$ tp5422 a(g73 Vconsole p5423 tp5424 a(g189 V tp5425 a(g348 Vor p5426 tp5427 a(g189 V tp5428 a(g348 Vnot p5429 tp5430 a(g189 V tp5431 a(g57 Vdefined p5432 tp5433 a(g189 V tp5434 a(g73 V$ tp5435 a(g73 Vconsole p5436 tp5437 a(g202 V; tp5438 a(g189 V\u000a p5439 tp5440 a(g202 V} tp5441 a(g189 V tp5442 a(g358 V## end elsif (from if(defined $remoteport)) p5443 tp5444 a(g189 V\u000a\u000a p5445 tp5446 a(g358 V# Unbuffer DB::OUT. We need to see responses right away. p5447 tp5448 a(g189 V\u000a p5449 tp5450 a(g111 Vmy p5451 tp5452 a(g189 V tp5453 a(g73 V$ tp5454 a(g73 Vprevious p5455 tp5456 a(g189 V tp5457 a(g344 V= tp5458 a(g189 V tp5459 a(g57 Vselect p5460 tp5461 a(g202 V( tp5462 a(g73 V$ tp5463 a(g73 VOUT p5464 tp5465 a(g202 V) tp5466 a(g202 V; tp5467 a(g189 V\u000a p5468 tp5469 a(g76 V$| p5470 tp5471 a(g189 V tp5472 a(g344 V= tp5473 a(g189 V tp5474 a(g319 V1 tp5475 a(g202 V; tp5476 a(g189 V p5477 tp5478 a(g358 V# for DB::OUT p5479 tp5480 a(g189 V\u000a p5481 tp5482 a(g57 Vselect p5483 tp5484 a(g202 V( tp5485 a(g73 V$ tp5486 a(g73 Vprevious p5487 tp5488 a(g202 V) tp5489 a(g202 V; tp5490 a(g189 V\u000a\u000a p5491 tp5492 a(g358 V# Line info goes to debugger output unless pointed elsewhere. p5493 tp5494 a(g189 V\u000a p5495 tp5496 a(g358 V# Pointing elsewhere makes it possible for slave editors to p5497 tp5498 a(g189 V\u000a p5499 tp5500 a(g358 V# keep track of file and position. We have both a filehandle p5501 tp5502 a(g189 V\u000a p5503 tp5504 a(g358 V# and a I/O description to keep track of. p5505 tp5506 a(g189 V\u000a p5507 tp5508 a(g73 V$ tp5509 a(g73 VLINEINFO p5510 tp5511 a(g189 V tp5512 a(g344 V= tp5513 a(g189 V tp5514 a(g73 V$ tp5515 a(g73 VOUT p5516 tp5517 a(g189 V p5518 tp5519 a(g111 Vunless p5520 tp5521 a(g189 V tp5522 a(g57 Vdefined p5523 tp5524 a(g189 V tp5525 a(g73 V$ tp5526 a(g73 VLINEINFO p5527 tp5528 a(g202 V; tp5529 a(g189 V\u000a p5530 tp5531 a(g73 V$ tp5532 a(g73 Vlineinfo p5533 tp5534 a(g189 V tp5535 a(g344 V= tp5536 a(g189 V tp5537 a(g73 V$ tp5538 a(g73 Vconsole p5539 tp5540 a(g189 V tp5541 a(g111 Vunless p5542 tp5543 a(g189 V tp5544 a(g57 Vdefined p5545 tp5546 a(g189 V tp5547 a(g73 V$ tp5548 a(g73 Vlineinfo p5549 tp5550 a(g202 V; tp5551 a(g189 V\u000a p5552 tp5553 a(g358 V# share($LINEINFO); # <- unable to share globs p5554 tp5555 a(g189 V\u000a p5556 tp5557 a(g18 V tp5558 a(g18 Vshare p5559 tp5560 a(g202 V( tp5561 a(g73 V$ tp5562 a(g73 Vlineinfo p5563 tp5564 a(g202 V) tp5565 a(g202 V; tp5566 a(g189 V p5567 tp5568 a(g358 V# p5569 tp5570 a(g189 V\u000a\u000a p5571 tp5572 a(g7 V=pod\u000a\u000aTo finish initialization, we show the debugger greeting,\u000aand then call the C subroutine if there is one.\u000a\u000a=cut p5573 tp5574 a(g189 V\u000a\u000a p5575 tp5576 a(g358 V# Show the debugger greeting. p5577 tp5578 a(g189 V\u000a p5579 tp5580 a(g73 V$ tp5581 a(g73 Vheader p5582 tp5583 a(g189 V tp5584 a(g344 V=~ p5585 tp5586 a(g189 V tp5587 a(g229 Vs/.Header: ([^,]+),v(\u005cs+\u005cS+\u005cs+\u005cS+).*$/$1$2/ p5588 tp5589 a(g202 V; tp5590 a(g189 V\u000a p5591 tp5592 a(g111 Vunless p5593 tp5594 a(g189 V tp5595 a(g202 V( tp5596 a(g73 V$ tp5597 a(g73 Vrunnonstop p5598 tp5599 a(g202 V) tp5600 a(g189 V tp5601 a(g202 V{ tp5602 a(g189 V\u000a p5603 tp5604 a(g57 Vlocal p5605 tp5606 a(g189 V tp5607 a(g76 V$\u005c p5608 tp5609 a(g189 V tp5610 a(g344 V= tp5611 a(g189 V tp5612 a(g226 V'' p5613 tp5614 a(g202 V; tp5615 a(g189 V\u000a p5616 tp5617 a(g57 Vlocal p5618 tp5619 a(g189 V tp5620 a(g76 V$, p5621 tp5622 a(g189 V tp5623 a(g344 V= tp5624 a(g189 V tp5625 a(g226 V'' p5626 tp5627 a(g202 V; tp5628 a(g189 V\u000a p5629 tp5630 a(g111 Vif p5631 tp5632 a(g189 V tp5633 a(g202 V( tp5634 a(g189 V tp5635 a(g73 V$ tp5636 a(g73 Vterm_pid p5637 tp5638 a(g189 V tp5639 a(g348 Veq p5640 tp5641 a(g189 V tp5642 a(g226 V'-1' p5643 tp5644 a(g189 V tp5645 a(g202 V) tp5646 a(g189 V tp5647 a(g202 V{ tp5648 a(g189 V\u000a p5649 tp5650 a(g111 Vprint p5651 tp5652 a(g189 V tp5653 a(g73 V$ tp5654 a(g73 VOUT p5655 tp5656 a(g189 V tp5657 a(g226 V"\u005cnDaughter DB session started...\u005cn" p5658 tp5659 a(g202 V; tp5660 a(g189 V\u000a p5661 tp5662 a(g202 V} tp5663 a(g189 V\u000a p5664 tp5665 a(g111 Velse p5666 tp5667 a(g189 V tp5668 a(g202 V{ tp5669 a(g189 V\u000a p5670 tp5671 a(g111 Vprint p5672 tp5673 a(g189 V tp5674 a(g73 V$ tp5675 a(g73 VOUT p5676 tp5677 a(g189 V tp5678 a(g226 V"\u005cnLoading DB routines from $header\u005cn" p5679 tp5680 a(g202 V; tp5681 a(g189 V\u000a p5682 tp5683 a(g111 Vprint p5684 tp5685 a(g189 V tp5686 a(g73 V$ tp5687 a(g73 VOUT p5688 tp5689 a(g189 V tp5690 a(g202 V( tp5691 a(g189 V\u000a p5692 tp5693 a(g226 V"Editor support " p5694 tp5695 a(g202 V, tp5696 a(g189 V\u000a p5697 tp5698 a(g73 V$ tp5699 a(g73 Vslave_editor p5700 tp5701 a(g189 V tp5702 a(g202 V? tp5703 a(g189 V tp5704 a(g226 V"enabled" p5705 tp5706 a(g189 V tp5707 a(g202 V: tp5708 a(g189 V tp5709 a(g226 V"available" p5710 tp5711 a(g202 V, tp5712 a(g189 V tp5713 a(g226 V".\u005cn" p5714 tp5715 a(g189 V\u000a p5716 tp5717 a(g202 V) tp5718 a(g202 V; tp5719 a(g189 V\u000a p5720 tp5721 a(g111 Vprint p5722 tp5723 a(g189 V tp5724 a(g73 V$ tp5725 a(g73 VOUT p5726 tp5727 a(g189 V\u000a tp5728 a(g226 V"\u005cnEnter h or `h h' for help, or `$doccmd perldebug' for more help.\u005cn\u005cn" p5729 tp5730 a(g202 V; tp5731 a(g189 V\u000a p5732 tp5733 a(g202 V} tp5734 a(g189 V tp5735 a(g358 V## end else [ if ($term_pid eq '-1') p5736 tp5737 a(g189 V\u000a p5738 tp5739 a(g202 V} tp5740 a(g189 V tp5741 a(g358 V## end unless ($runnonstop) p5742 tp5743 a(g189 V\u000a tp5744 a(g202 V} tp5745 a(g189 V tp5746 a(g358 V## end else [ if ($notty) p5747 tp5748 a(g189 V\u000a\u000a p5749 tp5750 a(g358 V# XXX This looks like a bug to me. p5751 tp5752 a(g189 V\u000a tp5753 a(g358 V# Why copy to @ARGS and then futz with @args? p5754 tp5755 a(g189 V\u000a tp5756 a(g73 V@ tp5757 a(g73 VARGS p5758 tp5759 a(g189 V tp5760 a(g344 V= tp5761 a(g189 V tp5762 a(g73 V@ tp5763 a(g73 VARGV p5764 tp5765 a(g202 V; tp5766 a(g189 V\u000a tp5767 a(g111 Vfor p5768 tp5769 a(g189 V tp5770 a(g202 V( tp5771 a(g73 V@ tp5772 a(g73 Vargs p5773 tp5774 a(g202 V) tp5775 a(g189 V tp5776 a(g202 V{ tp5777 a(g189 V\u000a p5778 tp5779 a(g358 V# Make sure backslashes before single quotes are stripped out, and p5780 tp5781 a(g189 V\u000a p5782 tp5783 a(g358 V# keep args unless they are numeric (XXX why?) p5784 tp5785 a(g189 V\u000a p5786 tp5787 a(g358 V# s/\u005c'/\u005c\u005c\u005c'/g; # removed while not justified understandably p5788 tp5789 a(g189 V\u000a p5790 tp5791 a(g358 V# s/(.*)/'$1'/ unless /^-?[\u005cd.]+$/; # ditto p5792 tp5793 a(g189 V\u000a tp5794 a(g202 V} tp5795 a(g189 V\u000a\u000a p5796 tp5797 a(g358 V# If there was an afterinit() sub defined, call it. It will get p5798 tp5799 a(g189 V\u000a tp5800 a(g358 V# executed in our scope, so it can fiddle with debugger globals. p5801 tp5802 a(g189 V\u000a tp5803 a(g111 Vif p5804 tp5805 a(g189 V tp5806 a(g202 V( tp5807 a(g189 V tp5808 a(g57 Vdefined p5809 tp5810 a(g189 V tp5811 a(g344 V& tp5812 a(g18 V tp5813 a(g18 Vafterinit p5814 tp5815 a(g189 V tp5816 a(g202 V) tp5817 a(g189 V tp5818 a(g202 V{ tp5819 a(g189 V p5820 tp5821 a(g358 V# May be defined in $rcfile p5822 tp5823 a(g189 V\u000a p5824 tp5825 a(g344 V& tp5826 a(g18 V tp5827 a(g18 Vafterinit p5828 tp5829 a(g202 V( tp5830 a(g202 V) tp5831 a(g202 V; tp5832 a(g189 V\u000a tp5833 a(g202 V} tp5834 a(g189 V\u000a\u000a p5835 tp5836 a(g358 V# Inform us about "Stack dump during die enabled ..." in dieLevel(). p5837 tp5838 a(g189 V\u000a tp5839 a(g73 V$ tp5840 a(g73 VI_m_init p5841 tp5842 a(g189 V tp5843 a(g344 V= tp5844 a(g189 V tp5845 a(g319 V1 tp5846 a(g202 V; tp5847 a(g189 V\u000a tp5848 a.