Commit 64aa88f
committed
[lldb][windows] print an error if python.dll is not in the DLL search path (llvm#164893)
This is a follow up to llvm#162509.
Using the `SearchPathW` API, we can ensure that the correct version of
Python is installed before `liblldb` is loaded (and `python.dll`
subsequently). If it's not, we try to add it to the search path with the
methods introduced in llvm#162509.
If that fails or if that method is `#ifdef`'d out, we print an error
which will appear before lldb crashes due to the missing dll.
Before llvm#162509, when invoked
from Powershell, lldb would silently crash (no error message/crash
report). After llvm#162509, it
crashes without any indications that the root cause is the missing
python.dll. With this patch, we print the error before crashing.1 parent f8a6917 commit 64aa88f
3 files changed
+65
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
116 | 122 | | |
117 | 123 | | |
118 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
| 447 | + | |
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
| |||
457 | 458 | | |
458 | 459 | | |
459 | 460 | | |
460 | | - | |
| 461 | + | |
461 | 462 | | |
462 | 463 | | |
463 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
464 | 467 | | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
| 468 | + | |
| 469 | + | |
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
472 | 473 | | |
473 | | - | |
| 474 | + | |
474 | 475 | | |
475 | 476 | | |
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
479 | 480 | | |
480 | | - | |
| 481 | + | |
481 | 482 | | |
482 | 483 | | |
483 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
484 | 528 | | |
485 | 529 | | |
486 | 530 | | |
| |||
786 | 830 | | |
787 | 831 | | |
788 | 832 | | |
789 | | - | |
790 | | - | |
| 833 | + | |
| 834 | + | |
791 | 835 | | |
792 | 836 | | |
793 | 837 | | |
| |||
0 commit comments