Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Windows版php-srcデバッグ方法
Search
てきめん tekimen
PRO
June 11, 2024
1
97
Windows版php-srcデバッグ方法
msys:
https://www.msys2.org/
msysのlldbを使うとデバッグできることがわかったのでスライドを作った
てきめん tekimen
PRO
June 11, 2024
Tweet
Share
More Decks by てきめん tekimen
See All by てきめん tekimen
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
830
PHP 8.5の裏話
youkidearitai
PRO
0
110
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
240
PHP Internals わいわい #3 mb_*関数を作ってみよう
youkidearitai
PRO
0
120
PHP Internals わいわい #1 の資料
youkidearitai
PRO
1
1.5k
mb_trim関数を作りました
youkidearitai
PRO
1
1.3k
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
990
文字とはなにか - PHPの文字コード処理について - PHP Lovers Meetup #5
youkidearitai
PRO
1
350
はじめてのOSSコントリビュート
youkidearitai
PRO
11
4.9k
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
620
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
54
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Music & Morning Musume
bryan
46
7k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
71
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
43
Transcript
PHP Internals わいわい Windows番外編
コンパイルの前段階 • Windowsを用意します • コマンドプロンプトで頑張ります • Visual C++ 2019をインストールします –
https://visualstudio.microsoft.com/ja/vs/older-down loads/ – (追記: 最近になってVisual C++ 2022で動くようになりまし た。その際にはvs17と読み替えてください)
PHPのコンパイルの準備 > cd C:\ > git clone https://github.com/php/php-sdk-binary-tools php- sdk
> cd php-sdk > .\phpsdk-vc16-x64.bat > phpsdk_buildtree phpdev > cd vc16\x64 > git clone https://github.com/php/php-src
PHPのコンパイルの準備 > cd php-src > .\buildconf.bat -f > .\configure.bat --enable-debug
--enable-mbstring > nmake > nmake test > x64\Debug_TS\php.exe -v #これで実行できる!
デバッグ手法 msysをインストールします https://www.msys2.org/ msysから起動し、lldbのインストールをします $ pacman -S mingw-w64-x86_64-lldb コマンドプロンプトで以下を叩き、レッツデバッグ! C:\msys64\mingw64\bin\lldb.exe
x64\Debug_TS\php.exe (環境変数通しておくと良いですね)
テストについて https://www.phpinternalsbook.com/tests/runn ing_the_test_suite.html > x64\Debug_TS\php.exe run-tests.php # すべて のテストを行う >
x64\Debug_TS\php.exe run-tests.php -P ext/mbstring # mbstring拡張のみテストする
テストファイルについて https://www.phpinternalsbook.com/tests/phpt _file_structure.html .phptファイルを使ってテストを行います
あとはPHP Internals Bookに従いましょう • レッツコントリビュート! • これだけじゃ厳しいのはわかってるのであとはよし なに