Soumettre la recherche
Mettre en ligne
Show stack trace by JCL on Delphi
•
0 j'aime
•
615 vues
H
Hikaru Fukushi
Suivre
JCLでお手軽に例外発生時のスタックトレースを取る
Lire moins
Lire la suite
Logiciels
Signaler
Partager
Signaler
Partager
1 sur 22
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
Delphi/C++Builder community resources for Japanese 2020
Delphi/C++Builder community resources for Japanese 2020
Hikaru Fukushi
Delphi Plug-ins and Components for dummies
Delphi Plug-ins and Components for dummies
Hikaru Fukushi
Delphi Countdown
Delphi Countdown
Hikaru Fukushi
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Recommandé
Delphi/C++Builder community resources for Japanese 2020
Delphi/C++Builder community resources for Japanese 2020
Hikaru Fukushi
Delphi Plug-ins and Components for dummies
Delphi Plug-ins and Components for dummies
Hikaru Fukushi
Delphi Countdown
Delphi Countdown
Hikaru Fukushi
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
Contenu connexe
En vedette
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
En vedette
(20)
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
ChatGPT webinar slides
ChatGPT webinar slides
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Show stack trace by JCL on Delphi
1.
JCLでお手軽に例外発生時の スタックトレースを取る @ゆるふぁい#0 東洋テクニカルシステム株式会社 福士 光
2.
アジェンダ • デフォルトの例外の処理 • スタックトレースが必要な状況 •
JCL Debugによるスタックトレース • JCL Debugを使ってみる • JCL Debugのまとめ • Q&A • Extra 2017/10/31 2
3.
デフォルトの例外の処理 • プログラムを実行中にエラーが発生すると例外が送出されます。 • 捕捉されなかった例外(unhandled
exception)は Applicationオブジェクトで捕捉されてエラーメッセージを表示 します。 2017/10/31 3
4.
デフォルトの例外の処理 • 例外の原因になった処理のアドレスは詳細マップファイルを生成 しておけばわかります。 2017/10/31 4
5.
スタックトレースが必要な状況 • しかし、エラーが発生した場所までの実行経路(呼び出し経路)が 複雑だったり、Systemユニットにあるような低レベルの関数のよ うに、どこから呼ばれるのかの選択肢が非常に多い箇所でエラー が発生した場合は、単に例外が発生したアドレスがわかるだけで は不十分です。 • デバッガ上で動作させているのであればIDEで呼び出し履歴を見 ればよいのですが、客先環境でしか再現しないような場合は難し い…。 2017/10/31
5
6.
スタックトレースが必要な状況 • このような場合にJCL(JEDI Code
Library)のJCL Debug を使うと簡単に例外送出箇所までのスタックトレースを取得する ことができます。 • 商用製品だとmadExceptやEurekaLogでもっといろいろで きるとは思いますが…。 • madExcept • http://www.madshi.net/madExceptDescription.htm • EurekaLog • https://www.eurekalog.com/index_delphi.php 2017/10/31 6
7.
JCL Debugによるスタックトレース • JCL(JEDI
Code Library)はJEDIプロジェクトによるライブラ リ群です。 • ビジュアルコンポーネントのJVCL(JEDI VCL)とともにインス トールされていることが多いのではないでしょうか。 • Delphiの複数バージョンがインストールされている環境ではリポ ジトリから取得してインストール、単一のバージョンのみなら GetItパッケージマネージャからインストール、Starter SKUで あればCCからダウンロードしてインストール、というのがよさそう。 2017/10/31 7
8.
JCL Debugによるスタックトレース 2017/10/31 8 •
JCL/JVCLのインストール手順は省略。 • JCLがインストールされているとプロジェ クトメニューにJCL Debug expertとい うアイテムが追加されているはずです。 • 必要な手順はたった4つです。
9.
JCL Debugを使ってみる • ステップ1:
JCL Debug expertの“Generate .jdbg files” を有効にする。 • ステップ2:“Insert JDBG data into the binary”を有効に する。 2017/10/31 9
10.
JCL Debugを使ってみる • ステップ3:
プロジェクトオプションのリンカオプションでマップ ファイルを詳細にする。 2017/10/31 10
11.
JCL Debugを使ってみる • ステップ4:
メインメニューからファイル→新規作成→その他で新 規作成ダイアログを表示して、Delphiプロジェクト→Delphiファ イルから“JCL Exception dialog for Delphi”を選択して… 2017/10/31 11
12.
JCL Debugを使ってみる • ユニット名を指定して… 2017/10/31
12
13.
JCL Debugを使ってみる • サイズは変更できたほう がいいかなと。 2017/10/31
13
14.
JCL Debugを使ってみる • ダイアログのユニットが作られま した。 •
フォントは日本語向けに変更した ほうがいいかも…(.dfmから フォント関係のものを削除すれ ばデフォルトのフォントになる)。 2017/10/31 14
15.
JCL Debugを使ってみる • いざコンパイル…すると確認ダイアログが。 •
詳細マップ作る設定にしますよ、なので “はい”でOK。 2017/10/31 15
16.
JCL Debugを使ってみる • 実行してみると… •
スタックトレースが! 2017/10/31 16
17.
JCL Debugのまとめ • いいところ •
無料 • JCL/JVCLを入れてあれば、それだけで使える • いまいちなところ • メインスレッド以外のスレッドを扱うときはTThreadからではなく TJclDebugThreadから派生していないとスタックトレースがとれない • リソースDLLで言語切り替えをしていると、言語リソースDLLのコンパイ ルでいちいちエラーになってダイアログが表示される • これ以外にもいちいちエラーダイアログが… 2017/10/31 17
18.
Q&A • これっぽっちの内容なので特にないとは思いますが… 2017/10/31 18
19.
Extra • 例外時のアドレス表示からソースコードの場所を特定するには? • 表示されたアドレスは
0x005CDF28 • CODEの配置は 0x00401000 • MAPファイル上のアドレスは 0x005CDF28 – 0x00401000 = 0x001CCF28 • “Publics by Value”で上から探す 2017/10/31 19
20.
Extra • 例外時のアドレス表示からソースコードの場所を特定するには? • “Line
numbers for”で該当アドレス付近を探す(詳細マップが必要) • Unit1.pasの31行目付近? • あった! 2017/10/31 20
21.
Extra • JCL Debugを有効にすると何が行われるのか? 2017/10/31
21
22.
ありがとうございました 2017/10/31 22
Télécharger maintenant