SlideShare a Scribd company logo
Frame 0x0C
Presenter: Dmitry Vostokov
Sponsors
Debugging.TV
• Multithreading
• Multiple exceptions
• Diagnostic Console reports
• GDB commands for thread navigation
Topics
© 2012 DumpAnalysis.org + TraceAnalysis.org
Multiple Exceptions
© 2012 DumpAnalysis.org + TraceAnalysis.org
void * thread_one (void *arg)
{
int *p = NULL;
*p = 1;
return 0;
}
void * thread_two (void *arg)
{
int *p = NULL;
*p = 2;
return 0;
}
int main(int argc, const char * argv[])
{
pthread_t threadID_one, threadID_two;
pthread_create (&threadID_one, NULL, thread_one, NULL);
pthread_create (&threadID_two, NULL, thread_two, NULL);
sleep(3);
return 0;
}
Crash Report
© 2012 DumpAnalysis.org + TraceAnalysis.org
Crashed Thread: 2
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff854e0e42 __semwait_signal + 10
1 libsystem_c.dylib 0x00007fff8ababdea nanosleep + 164
2 libsystem_c.dylib 0x00007fff8ababc2c sleep + 61
3 MultipleThreads 0x000000010f523ec3 main + 99 (main.c:36)
4 MultipleThreads 0x000000010f523df4 start + 52
Thread 1:
0 MultipleThreads 0x000000010f523e1e thread_one + 30 (main.c:16)
1 libsystem_c.dylib 0x00007fff8abf58bf _pthread_start + 335
2 libsystem_c.dylib 0x00007fff8abf8b75 thread_start + 13
Thread 2 Crashed:
0 MultipleThreads 0x000000010f523e4e thread_two + 30 (main.c:24)
1 libsystem_c.dylib 0x00007fff8abf58bf _pthread_start + 335
2 libsystem_c.dylib 0x00007fff8abf8b75 thread_start + 13
Thread 2 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x00007fff854e10c2 rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x000000010f780f10 rsp: 0x000000010f780f10
r8: 0x00007fff754c3fb8 r9: 0x0000000000000001 r10: 0x00007fff8abf8b94 r11: 0x0000000000000202
r12: 0x0000000000001303 r13: 0x000000010f781000 r14: 0x0000000000000000 r15: 0x000000010f523e30
rip: 0x000000010f523e4e rfl: 0x0000000000010217 cr2: 0x0000000000000000
GDB Output
© 2012 DumpAnalysis.org + TraceAnalysis.org
(gdb) info threads
3 0x00000001062ffe4e in thread_two (arg=0x0)
at /MultipleThreads/main.c:24
2 0x00000001062ffe1e in thread_one (arg=0x0)
at /MultipleThreads/main.c:16
* 1 0x00007fff854e0e42 in __semwait_signal ()
(gdb) thread 2
[Switching to thread 2 (core thread 1)]
0x00000001062ffe1e in thread_one (arg=0x0)
at /MultipleThreads/main.c:16
16 *p = 1;
(gdb) disassemble 0x00000001062ffe1e
Dump of assembler code for function thread_one:
0x00000001062ffe00 <thread_one+0>: push %rbp
0x00000001062ffe01 <thread_one+1>: mov %rsp,%rbp
0x00000001062ffe04 <thread_one+4>: mov $0x0,%rax
0x00000001062ffe0e <thread_one+14>: mov %rdi,-0x8(%rbp)
0x00000001062ffe12 <thread_one+18>: movq $0x0,-0x10(%rbp)
0x00000001062ffe1a <thread_one+26>: mov -0x10(%rbp),%rdi
0x00000001062ffe1e <thread_one+30>: movl $0x1,(%rdi)
0x00000001062ffe24 <thread_one+36>: pop %rbp
0x00000001062ffe25 <thread_one+37>: retq
End of assembler dump.
(gdb) info registers rdi
rdi 0x0 0
!Ad Hardcore Technical Support Training
© 2012 DumpAnalysis.org + TraceAnalysis.org
Training Schedule
April 11-16, 2012 Accelerated Windows Memory Dump Analysis
April 20-23, 2012 Advanced Windows Memory Dump Analysis
May 11-14, 2012 Accelerated .NET Memory Dump Analysis
June 22, 2012
Introduction to Pattern-Driven Software
Diagnostics (Free Webinar)
July 20-23, 2012 Accelerated Windows Software Trace Analysis
July 27-30, 2012 Accelerated Mac OS X Core Dump Analysis
Debugging.TV

More Related Content

PDF
Debugging TV Frame 0x0D
PPTX
Egor Bogatov - .NET Core intrinsics and other micro-optimizations
PPT
W8_2: Inside the UoS Educational Processor
PDF
Exploring the x64
PDF
Gpus graal
PDF
Powered by Python - PyCon Germany 2016
PPTX
Programmation pic 16F877
PDF
Cluj.py Meetup: Extending Python in C
Debugging TV Frame 0x0D
Egor Bogatov - .NET Core intrinsics and other micro-optimizations
W8_2: Inside the UoS Educational Processor
Exploring the x64
Gpus graal
Powered by Python - PyCon Germany 2016
Programmation pic 16F877
Cluj.py Meetup: Extending Python in C

What's hot (20)

PPTX
ISCA Final Presentaiton - Compilations
PDF
Cluj Big Data Meetup - Big Data in Practice
PPTX
C++ via C#
PDF
0 to 31337 Real Quick: Lessons Learned by Reversing the Flare-On Challenge
PDF
One definition rule - что это такое, и как с этим жить
PDF
Tensor Core
PPTX
Nicety of java 8 multithreading for advanced, Max Voronoy
PPTX
Games no Windows (FATEC 2015)
PPTX
Fantastic caches and where to find them
PDF
The CppCat Analyzer Checks TortoiseGit
PDF
Java lejos-multithreading
PDF
A Case for Relativistic Programming
PDF
Ceph Day SF 2015 - Big Data Applications and Tuning in Ceph
PDF
SFO15-500: VIXL
PDF
C coroutine
PDF
4Developers 2018: Beyond c++17 (Mateusz Pusz)
PDF
All I know about rsc.io/c2go
PDF
Lab programs FOR 8TH SEM EC SUBJECT BY LOHITH KUMAR |11GUEE6018
PDF
Understanding the nodejs event loop
PDF
C言語静的解析ツールと Ruby 1.9 trunk
ISCA Final Presentaiton - Compilations
Cluj Big Data Meetup - Big Data in Practice
C++ via C#
0 to 31337 Real Quick: Lessons Learned by Reversing the Flare-On Challenge
One definition rule - что это такое, и как с этим жить
Tensor Core
Nicety of java 8 multithreading for advanced, Max Voronoy
Games no Windows (FATEC 2015)
Fantastic caches and where to find them
The CppCat Analyzer Checks TortoiseGit
Java lejos-multithreading
A Case for Relativistic Programming
Ceph Day SF 2015 - Big Data Applications and Tuning in Ceph
SFO15-500: VIXL
C coroutine
4Developers 2018: Beyond c++17 (Mateusz Pusz)
All I know about rsc.io/c2go
Lab programs FOR 8TH SEM EC SUBJECT BY LOHITH KUMAR |11GUEE6018
Understanding the nodejs event loop
C言語静的解析ツールと Ruby 1.9 trunk
Ad

Similar to Debugging TV Frame 0x0C (20)

PDF
20140531 serebryany lecture01_fantastic_cpp_bugs
PDF
20140531 serebryany lecture01_fantastic_cpp_bugs
PDF
Debugging TV Frame 0x0A
PDF
Debugging TV Frame 0x12
PDF
System Programming - Threading
PDF
ARM uVisor Debug Refinement Project(debugging facility improvements)
PPT
PDF
"You shall not pass : anti-debug methodics"
PDF
Consider the fork_examplec code under Example code for pr.pdf
PPTX
Essentials of Multithreaded System Programming in C++
PPTX
Putting a Fork in Fork (Linux Process and Memory Management)
PPTX
Introduction to Debuggers
PDF
20140531 serebryany lecture02_find_scary_cpp_bugs
PDF
40d5984d819aaa72e55aa10376b73bde_MIT6_087IAP10_lec12.pdf
PPTX
Os lectures
ODP
Отладка в GDB
PDF
Debugging TV Frame 0x0F
PDF
Crash Dump Analysis 101
PDF
Let's write a Debugger!
PDF
Basic Multithreading using Posix Threads
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs
Debugging TV Frame 0x0A
Debugging TV Frame 0x12
System Programming - Threading
ARM uVisor Debug Refinement Project(debugging facility improvements)
"You shall not pass : anti-debug methodics"
Consider the fork_examplec code under Example code for pr.pdf
Essentials of Multithreaded System Programming in C++
Putting a Fork in Fork (Linux Process and Memory Management)
Introduction to Debuggers
20140531 serebryany lecture02_find_scary_cpp_bugs
40d5984d819aaa72e55aa10376b73bde_MIT6_087IAP10_lec12.pdf
Os lectures
Отладка в GDB
Debugging TV Frame 0x0F
Crash Dump Analysis 101
Let's write a Debugger!
Basic Multithreading using Posix Threads
Ad

More from Dmitry Vostokov (20)

PDF
Accelerated Windows Debugging 3 training public slides
PDF
Accelerated .NET Memory Dump Analysis training public slides
PDF
Debugging TV Frame 0x1C
PDF
Debugging TV Frame 0x1A
PDF
Debugging TV Frame 0x34
PDF
Debugging TV Frame 0x33
PDF
Debugging TV Frame 0x31
PDF
Debugging TV Frame 0x25
PDF
Debugging TV Frame 0x24
PDF
Debugging TV Frame 0x21
PDF
Debugging TV Frame 0x20
PDF
Debugging TV Frame 0x19
PDF
Debugging TV Frame 0x18
PDF
Debugging TV Frame 0x17
PDF
Debugging TV Frame 0x16
PDF
Debugging TV Frame 0x15
PDF
Debugging TV Frame 0x14
PDF
Debugging TV Frame 0x13
PDF
Debugging TV Frame 0x11
PDF
Debugging TV Frame 0x10
Accelerated Windows Debugging 3 training public slides
Accelerated .NET Memory Dump Analysis training public slides
Debugging TV Frame 0x1C
Debugging TV Frame 0x1A
Debugging TV Frame 0x34
Debugging TV Frame 0x33
Debugging TV Frame 0x31
Debugging TV Frame 0x25
Debugging TV Frame 0x24
Debugging TV Frame 0x21
Debugging TV Frame 0x20
Debugging TV Frame 0x19
Debugging TV Frame 0x18
Debugging TV Frame 0x17
Debugging TV Frame 0x16
Debugging TV Frame 0x15
Debugging TV Frame 0x14
Debugging TV Frame 0x13
Debugging TV Frame 0x11
Debugging TV Frame 0x10

Recently uploaded (20)

PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Cost to Outsource Software Development in 2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Digital Strategies for Manufacturing Companies
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Transform Your Business with a Software ERP System
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Computer Software and OS of computer science of grade 11.pptx
Upgrade and Innovation Strategies for SAP ERP Customers
Cost to Outsource Software Development in 2025
Design an Analysis of Algorithms II-SECS-1021-03
Digital Strategies for Manufacturing Companies
PTS Company Brochure 2025 (1).pdf.......
wealthsignaloriginal-com-DS-text-... (1).pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Wondershare Filmora 15 Crack With Activation Key [2025
How to Choose the Right IT Partner for Your Business in Malaysia
L1 - Introduction to python Backend.pptx
Transform Your Business with a Software ERP System
Digital Systems & Binary Numbers (comprehensive )
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Operating system designcfffgfgggggggvggggggggg
Why Generative AI is the Future of Content, Code & Creativity?

Debugging TV Frame 0x0C

  • 1. Frame 0x0C Presenter: Dmitry Vostokov Sponsors Debugging.TV
  • 2. • Multithreading • Multiple exceptions • Diagnostic Console reports • GDB commands for thread navigation Topics © 2012 DumpAnalysis.org + TraceAnalysis.org
  • 3. Multiple Exceptions © 2012 DumpAnalysis.org + TraceAnalysis.org void * thread_one (void *arg) { int *p = NULL; *p = 1; return 0; } void * thread_two (void *arg) { int *p = NULL; *p = 2; return 0; } int main(int argc, const char * argv[]) { pthread_t threadID_one, threadID_two; pthread_create (&threadID_one, NULL, thread_one, NULL); pthread_create (&threadID_two, NULL, thread_two, NULL); sleep(3); return 0; }
  • 4. Crash Report © 2012 DumpAnalysis.org + TraceAnalysis.org Crashed Thread: 2 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 Thread 0:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff854e0e42 __semwait_signal + 10 1 libsystem_c.dylib 0x00007fff8ababdea nanosleep + 164 2 libsystem_c.dylib 0x00007fff8ababc2c sleep + 61 3 MultipleThreads 0x000000010f523ec3 main + 99 (main.c:36) 4 MultipleThreads 0x000000010f523df4 start + 52 Thread 1: 0 MultipleThreads 0x000000010f523e1e thread_one + 30 (main.c:16) 1 libsystem_c.dylib 0x00007fff8abf58bf _pthread_start + 335 2 libsystem_c.dylib 0x00007fff8abf8b75 thread_start + 13 Thread 2 Crashed: 0 MultipleThreads 0x000000010f523e4e thread_two + 30 (main.c:24) 1 libsystem_c.dylib 0x00007fff8abf58bf _pthread_start + 335 2 libsystem_c.dylib 0x00007fff8abf8b75 thread_start + 13 Thread 2 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x00007fff854e10c2 rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x000000010f780f10 rsp: 0x000000010f780f10 r8: 0x00007fff754c3fb8 r9: 0x0000000000000001 r10: 0x00007fff8abf8b94 r11: 0x0000000000000202 r12: 0x0000000000001303 r13: 0x000000010f781000 r14: 0x0000000000000000 r15: 0x000000010f523e30 rip: 0x000000010f523e4e rfl: 0x0000000000010217 cr2: 0x0000000000000000
  • 5. GDB Output © 2012 DumpAnalysis.org + TraceAnalysis.org (gdb) info threads 3 0x00000001062ffe4e in thread_two (arg=0x0) at /MultipleThreads/main.c:24 2 0x00000001062ffe1e in thread_one (arg=0x0) at /MultipleThreads/main.c:16 * 1 0x00007fff854e0e42 in __semwait_signal () (gdb) thread 2 [Switching to thread 2 (core thread 1)] 0x00000001062ffe1e in thread_one (arg=0x0) at /MultipleThreads/main.c:16 16 *p = 1; (gdb) disassemble 0x00000001062ffe1e Dump of assembler code for function thread_one: 0x00000001062ffe00 <thread_one+0>: push %rbp 0x00000001062ffe01 <thread_one+1>: mov %rsp,%rbp 0x00000001062ffe04 <thread_one+4>: mov $0x0,%rax 0x00000001062ffe0e <thread_one+14>: mov %rdi,-0x8(%rbp) 0x00000001062ffe12 <thread_one+18>: movq $0x0,-0x10(%rbp) 0x00000001062ffe1a <thread_one+26>: mov -0x10(%rbp),%rdi 0x00000001062ffe1e <thread_one+30>: movl $0x1,(%rdi) 0x00000001062ffe24 <thread_one+36>: pop %rbp 0x00000001062ffe25 <thread_one+37>: retq End of assembler dump. (gdb) info registers rdi rdi 0x0 0
  • 6. !Ad Hardcore Technical Support Training © 2012 DumpAnalysis.org + TraceAnalysis.org Training Schedule April 11-16, 2012 Accelerated Windows Memory Dump Analysis April 20-23, 2012 Advanced Windows Memory Dump Analysis May 11-14, 2012 Accelerated .NET Memory Dump Analysis June 22, 2012 Introduction to Pattern-Driven Software Diagnostics (Free Webinar) July 20-23, 2012 Accelerated Windows Software Trace Analysis July 27-30, 2012 Accelerated Mac OS X Core Dump Analysis