<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>LLDB on Kelly Dev</title><link>https://kelly-chui.github.io/tags/lldb/</link><description>Recent content in LLDB on Kelly Dev</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 20 Nov 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://kelly-chui.github.io/tags/lldb/index.xml" rel="self" type="application/rss+xml"/><item><title>Swift. Xcode 디버깅과 LLDB 기본 명령어</title><link>https://kelly-chui.github.io/posts/swift-xcode-lldb-debugging/</link><pubDate>Wed, 20 Nov 2024 00:00:00 +0000</pubDate><guid>https://kelly-chui.github.io/posts/swift-xcode-lldb-debugging/</guid><description>&lt;h2 id="lldb가-뭔가요"&gt;LLDB가 뭔가요&lt;/h2&gt;
&lt;p&gt;LLVM + Debugger&lt;/p&gt;
&lt;p&gt;LLVM 위에서 동작하는 디버거&lt;/p&gt;
&lt;h3 id="llvmlow-level-virtual-machine"&gt;LLVM(Low Level Virtual Machine)&lt;/h3&gt;
&lt;img alt="image.png" loading="lazy" src="https://kelly-chui.github.io/posts/swift-xcode-lldb-debugging/image-001-optimized-image.webp"&gt;&lt;p&gt;프로그래밍 언어를 CPU 아키텍처가 이해할 수 있도록 컴파일 하는 과정을 생각해보면 (프로그래밍 언어의 종류 * CPU 아키텍처의 종류) 만큼의 경우의 수가 생긴다.&lt;/p&gt;
&lt;p&gt;LLVM은 LLVM-IR이라는 중간 언어를 만들어서 프로그래밍 언어를 LLVM-IR로 변역하고 이 LLVM-IR을 CPU 아키텍처에 맞는 기계어로 번역하게 해주는 역할을 함 어려운건 여기까지!&lt;/p&gt;
&lt;h2 id="xcode-debugging"&gt;XCode Debugging&lt;/h2&gt;
&lt;h3 id="breakpoint"&gt;BreakPoint&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;브레이크 포인트가 걸린 라인 직전 까지 실행 됨&lt;/li&gt;
&lt;li&gt;활성화/비활성화 할 수 있음&lt;/li&gt;
&lt;li&gt;다양한 옵션 지정 가능 (이름, LLDB 커맨드, 로그 작성 등등)…&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="debugging-bar"&gt;Debugging Bar&lt;/h3&gt;
&lt;img alt="image.png" loading="lazy" src="https://kelly-chui.github.io/posts/swift-xcode-lldb-debugging/image-002-optimized-image.webp"&gt;&lt;ul&gt;
&lt;li&gt;Disable/enable breakpoints: 브레이크 포인트들을 활성화/비활성화&lt;/li&gt;
&lt;li&gt;Pause/continue execution: 다음 브레이크 포인트가 나올 때 까지 진행&lt;/li&gt;
&lt;li&gt;Step over: 다음 라인으로 넘어가기&lt;/li&gt;
&lt;li&gt;Step into: 현재 브레이크 포인트가 걸려있는 메소드로 들어가기&lt;/li&gt;
&lt;li&gt;Step out: 현재 메소드에서 벗어나기&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="lldb-직접-사용해보기"&gt;LLDB 직접 사용해보기&lt;/h2&gt;
&lt;h3 id="print-p"&gt;Print: &lt;code&gt;p&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;현재 메모리 상태에 있는 것을 출력한다.&lt;/p&gt;</description></item></channel></rss>