Stacks & Breaks
  • Home
    • Home #1
      • Infinite Scroll Load More
      • Infinite Load More Posts
      • Home Featured Video
      • Home with Left Sidebar
      • Home with Sticky Sidebar
      • Standard Layout
      • Classic Layout
    • Home #2
      • Grid Layout
      • Grid with Sidebar
      • Grid 2 Columns Layout
      • List Layout
      • Masonry Layout
      • Masonry with Sidebar
      • Masonry 2 Columns Layout
      • Boxed Layout
      • Overlay Layout
    • Home #3
      • Mixed Layout
      • Mixed Style 2 Layout
      • Photography Layout
      • Magazine Layout 1
      • Magazine Layout 2
      • Magazine Layout 3
      • 1st Overlay Then Grid
      • 1st Overlay Then List
      • 1st Standard Then Grid
    • Home #4
      • 1st Standard Grid Sidebar
      • 1st Standard Then Grid 2
      • 1st Standard Then List
      • 1st Standard Then Boxed
      • 1st Classic Then Grid
      • 1st Classic Grid Sidebar
      • 1st Classic Then Grid 2
      • 1st Classic Then List
      • 1st Classic Then Boxed
  • Sliders
    • Slider #1
      • Home with Slider 1
      • Home with Slider 2
      • Home with Slider 3
      • Home with Slider 4
      • Home with Slider 5
      • Home with Slider 6
      • Home with Slider 7
      • Home with Slider 8
      • Home with Slider 9
    • Slider #2
      • Home with Slider 10
      • Home with Slider 11
      • Home with Slider 12
      • Home with Slider 13
      • Home with Slider 14
      • Home with Slider 15
      • Home with Slider 16
      • Home with Slider 17
      • Home with Slider 18
    • Slider #3
    • Slider #4
      • Home with Slider 28
      • Home with Slider 29
      • Home with Slider 30
      • Home with Slider 35
      • Home with Slider 36
      • Home with Slider 37
      • Home with Slider 38
      • Home Penci Slider 1
      • Home Penci Slider 2
  • Features
  • Coding
  • Guide
  • Resources
  • Portfolio
    • Masonry 3 Columns
    • Masonry 2 Columns
    • Masonry with Sidebar
    • Grid 3 Columns
    • Grid with Sidebar
    • Grid 2 Columns
    • Single Portfolio
  • Shop
  • Home with Slider 19
  • Home with Slider 20
  • Home with Slider 21
  • Home with Slider 22
  • Home with Slider 23
  • Home with Slider 24
  • Home with Slider 25
  • Home with Slider 26
  • Home with Slider 27
  • Post Templates
  • Headers
  • Menu Item Style 2
  • Real Awesome Gallery
  • Post Formats
  • Pages
  • Typography
  • Template Style 1
  • Template Style 2
  • Template Style 3
  • Style 3 with Parallax
  • Template Style 4
  • Style 4 with Parallax
  • Template Style 5
  • Style 5 with Parallax
  • Template Style 6
  • Style 6 with Parallax
  • Template Style 7
  • Style 7 with Parallax
  • Template Style 8
  • Style 8 with Parallax
  • Template Style 9
  • Style 9 with Parallax
  • Template Style 10
  • Style 10 with Parallax
  • Header Style 1
  • Header Style 2
  • Header Style 3
  • Header Style 4 (Centerd)
  • Header Style 5 (Centerd)
  • Header Style 6
  • Header Style 7
  • Header Style 8
  • Header Style 9
  • Standard Post
  • Gallery Post
  • Video Post
  • Audio Post
  • Quote Post
  • Link Post
  • Youtube Post
  • Vimeo Post
  • Soundcloud Audio
  • Self-hosted Audio
  • About me
  • Contact Me
  • Page Left Sidebar
  • Page Full Width
  • Page 404

Latest Video

Popular Posts

  • 1

    Computer Architecture (Windows/Intel): What a system debug engineer needs to know?

    November 2, 2020
  • 2

    Courses to Jumpstart Your Development Career

    January 25, 2019
  • 3

    Wireshark Basics Playlist

    November 2, 2020
@2021 - All Right Reserved. Designed and Developed by PenciDesign
Debugging

Creating a memory dump along with symbols using WinDbg

by dnaadmin November 2, 2020
written by dnaadmin

We can create a dump file from a running application or active driver crash using WinDbg. After the dump file is collected, it can be copied to another machine to analyze and debug the problem (with symbols ofcourse). Here is a quick trick to get both, the dump and symbols.

First, to get a dump file with all information we using dump command. The .dump command creates a user-mode or kernel-mode crash dump file.

Syntax (please refer to msdn for  more details on the options)

.dump Options FileName

.dump /?

Usage

0:000> .dump /mfht c:\Dumpfile.dmp

Creating c:\Dumpfile.dmp – mini user dump

Dump successfully written

.dump command has several options, but if we want a minidump with all information we just need to use /mfht where it saves full memory (accessible committed pages), data about handles and additional thread times for !runaway and .ttime commands.

After collecting the dump file we open it on the debugging machine using WinDbg and reload the symbols again. Then we use the .dumpcab command. The .dumpcab command creates a CAB file containing the current dump file. This is supported in both user mode and kernel mode across all platforms.

Syntax

.dumpcab [-a] CabName

Parameters

-a
Causes all currently loaded symbols to be included in the CAB file. For minidumps, all loaded images will be included as well. Use lml to determine which symbols and images are loaded.

CabName
The CAB file name, including extension. CabName can include an absolute or relative path; relative paths are relative to the directory in which the debugger was started. It is recommended that you choose the extension .cab.

Usage

0:001> .dumpcab -a c:\fulldump

Creating a cab file can take a VERY VERY long time. Ctrl-C can only interrupt the command after a file has been added to the cab.  Adding C:\Dumpfile.dmp – added  Adding c:\publicsymbols\wntdll.pdb\E06BEA155E9748BEA818E2D0DD2FED952\wntdll.pdb – added Wrote c:\downloads\fulldump

The file fulldump.cab now has the dump file and all related symbols so we can copy it to another machine, unpack, load the dumps/symbols and start a debugging session.

November 2, 2020 0 comments
0 FacebookTwitterPinterestEmail
Debugging

Integer Divide by Zero leading to UNEXPECTED_KERNEL_MODE_TRAP (0x7f)

by dnaadmin November 2, 2020
written by dnaadmin

It is easily recognizable in process crash dumps by the processor instruction that caused this exception type (DIV or IDIV):


FAULTING_IP:
DLL!FindHighestID+278
1b2713c4 f775e4 div dword ptr [ebp-0×1c]

EXCEPTION_RECORD: ffffffff — (.exr ffffffffffffffff)
ExceptionAddress: 1b2713c4 (DLL!FindHighestID+0x00000278)
ExceptionCode: c0000094 (Integer divide-by-zero)
ExceptionFlags: 00000000
NumberParameters: 0

or

FAULTING_IP:
Application+263d8
004263d8 f7fe idiv eax,esi

EXCEPTION_RECORD: ffffffff — (.exr 0xffffffffffffffff)
ExceptionAddress: 004263d8 (Application+0x000263d8)
ExceptionCode: c0000094 (Integer divide-by-zero)
ExceptionFlags: 00000000
NumberParameters: 0

ERROR_CODE: (NTSTATUS) 0xc0000094 – {EXCEPTION} Integer division by zero.

This is a kernel mode counterpart of Divide by Zero pattern in user mode. It manifests under different bugchecks, for example:

1: kd> !analyze -v

[…]

UNEXPECTED_KERNEL_MODE_TRAP (7f)
This means a trap occurred in kernel mode, and it’s a trap of a kind that the kernel isn’t allowed to have/catch (bound trap) or that is always instant death (double fault). The first number in the bugcheck params is the number of the trap (8 = double fault, etc) Consult an Intel x86 family manual to learn more about what these traps are. Here is a *portion* of those codes:
If kv shows a taskGate
use .tss on the part before the colon, then kv.
Else if kv shows a trapframe
use .trap on that value
Else
.trap on the appropriate frame will show where the trap was taken
(on x86, this will be the ebp that goes with the procedure KiTrap)
Endif
kb will then show the corrected stack.
Arguments:
Arg1: 00000000, EXCEPTION_DIVIDED_BY_ZERO
Arg2: 00000000
Arg3: 00000000
Arg4: 00000000

[…]

TRAP_FRAME: a8954c8c — (.trap 0xffffffffa8954c8c)
ErrCode = 00000000
eax=ffffffff ebx=00000000 ecx=00000005 edx=00000000 esi=00000000 edi=00000000
eip=975c42cd esp=a8954d00 ebp=a8954d4c iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010246
win32k!NtGdiEnumObjects+0xc6:
975c42cd f7f6 div eax,esi
Resetting default scope

PROCESS_NAME: Application.EXE

[…]

STACK_TEXT:
a8954c2c 81ac2b76 0000007f 5317512a 975c42cd nt!KeBugCheck+0x14
a8954c80 81899808 a8954c8c a8954d4c 975c42cd nt!Ki386CheckDivideByZeroTrap+0×44
a8954c80 975c42cd a8954c8c a8954d4c 975c42cd nt!KiTrap00+0×88
a8954d4c 81898a7a 062102ce 00000001 00000000 Driver!EnumObjects+0xc6
a8954d4c 77a59a94 062102ce 00000001 00000000 nt!KiFastCallEntry+0×12a
WARNING: Frame IP not in any known module. Following frames may be wrong.
0012ca70 00000000 00000000 00000000 00000000 0×77a59a94

0: kd> !analyze -v

[…]

SYSTEM_SERVICE_EXCEPTION (3b)
An exception happened while executing a system service routine.
Arguments:
Arg1: 00000000c0000094, Exception code that caused the bugcheck
Arg2: fffff9600025ba6d, Address of the exception record for the exception that caused the bugcheck
Arg3: fffff8800ac361d0, Address of the context record for the exception that caused the bugcheck
Arg4: 0000000000000000, zero.

[…]

EXCEPTION_CODE: (NTSTATUS) 0xc0000094 – {EXCEPTION} Integer division by zero.

FAULTING_IP:
Driver!EnumObjects+e9
fffff960`0025ba6d f7f6 div eax,esi

CONTEXT: fffff8800ac361d0 — (.cxr 0xfffff8800ac361d0)
rax=00000000ffffffff rbx=0000000000000000 rcx=0000000000000000
rdx=0000000000000000 rsi=0000000000000000 rdi=0000000000000000
rip=fffff9600025ba6d rsp=fffff8800ac36ba0 rbp=fffff8800ac36ca0
r8=0000000000000000 r9=0000000000000000 r10=0000000005892f18
r11=fffff900c28379e0 r12=0000000000000000 r13=0000000000000002
r14=0000000000000001 r15=0000000000000000
iopl=0 nv up ei ng nz na po nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00010286
Driver!EnumObjects+0xe9:
fffff960`0025ba6d f7f6 div eax,esi
Resetting default scope

[…]

STACK_TEXT:
fffff880`0ac36ba0 fffff800`01682993 Driver!EnumObjects+0xe9
fffff880`0ac36c20 00000000`748a1b3a nt!KiSystemServiceCopyEnd+0x13
00000000`001cdf08 00000000`00000000 0x748a1b3a

 

November 2, 2020 0 comments
0 FacebookTwitterPinterestEmail
ArchitectureDebugging

Computer Architecture (Windows/Intel): What a system debug engineer needs to know?

by dnaadmin November 2, 2020
written by dnaadmin
YotuWP warning: API Key was removed, please contact to your admin about this issues.
November 2, 2020 0 comments
0 FacebookTwitterPinterestEmail
Guide

How To Code Like A Perfect Team

by dnaadmin January 25, 2019
written by dnaadmin

Lommodo ligula eget dolor. Aenean massa. Cum sociis que penatibus et magnis dis parturient montes lorem, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla onsequat massa quis enim la. Donec pede justo fringilla vel aliquet nec vulputate eget. Lorem ispum dolore siamet ipsum dolor.

Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumquer nihil impedit quo minus id quod maxime placeat facere.

Continue Reading
January 25, 2019 0 comments
0 FacebookTwitterPinterestEmail
Backend

Getting Started with Backend Development 101

by dnaadmin January 25, 2019
written by dnaadmin

Lommodo ligula eget dolor. Aenean massa. Cum sociis que penatibus et magnis dis parturient montes lorem, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla onsequat massa quis enim la. Donec pede justo fringilla vel aliquet nec vulputate eget. Lorem ispum dolore siamet ipsum dolor.

Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumquer nihil impedit quo minus id quod maxime placeat facere.

Continue Reading
January 25, 2019 0 comments
0 FacebookTwitterPinterestEmail
Frontend

How To Become a Front-End Web Developer

by dnaadmin January 25, 2019
written by dnaadmin

Lommodo ligula eget dolor. Aenean massa. Cum sociis que penatibus et magnis dis parturient montes lorem, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla onsequat massa quis enim la. Donec pede justo fringilla vel aliquet nec vulputate eget. Lorem ispum dolore siamet ipsum dolor.

Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumquer nihil impedit quo minus id quod maxime placeat facere.

Continue Reading
January 25, 2019 0 comments
0 FacebookTwitterPinterestEmail
Resources

What Does Stack Overflow Want To Be

by dnaadmin January 25, 2019
written by dnaadmin

Lommodo ligula eget dolor. Aenean massa. Cum sociis que penatibus et magnis dis parturient montes lorem, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla onsequat massa quis enim la. Donec pede justo fringilla vel aliquet nec vulputate eget. Lorem ispum dolore siamet ipsum dolor.

Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumquer nihil impedit quo minus id quod maxime placeat facere.

Continue Reading
January 25, 2019 0 comments
0 FacebookTwitterPinterestEmail
Guide

9 Obstacles Between You and Your Dream Job

by dnaadmin January 25, 2019
written by dnaadmin

Lommodo ligula eget dolor. Aenean massa. Cum sociis que penatibus et magnis dis parturient montes lorem, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla onsequat massa quis enim la. Donec pede justo fringilla vel aliquet nec vulputate eget. Lorem ispum dolore siamet ipsum dolor.

Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumquer nihil impedit quo minus id quod maxime placeat facere.

Continue Reading
January 25, 2019 0 comments
0 FacebookTwitterPinterestEmail
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

Archives

  • February 2022
  • June 2021
  • November 2020
  • January 2019

Categories

  • Architecture
  • Backend
  • Basics
  • Blocks
  • Debugging
  • Device Drivers
  • Frontend
  • Guide
  • Interview
  • Network
  • Resources

Archives

  • February 2022
  • June 2021
  • November 2020
  • January 2019

Categories

  • Architecture
  • Backend
  • Basics
  • Blocks
  • Debugging
  • Device Drivers
  • Frontend
  • Guide
  • Interview
  • Network
  • Resources

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

About Me

About Me

Freelance Developer

My name is Brian, freelance developer based in London, UK. Welcome to my internet journal where I started my learning journey.

Keep in touch

Facebook Twitter Linkedin Youtube Github

Resources

  • All the “Truth” you need to know about “Truth Table”

    February 19, 2022
  • Registers & Computer Memory Primer for x86

    February 19, 2022
  • Top listing blocks and reviews

    June 29, 2021

Recent Posts

  • All the “Truth” you need to know about “Truth Table”

    February 19, 2022
  • Registers & Computer Memory Primer for x86

    February 19, 2022
  • Top listing blocks and reviews

    June 29, 2021
  • Step list block

    June 29, 2021
  • How to blocks

    June 29, 2021

Categories

  • Architecture (5)
  • Backend (6)
  • Basics (6)
  • Blocks (3)
  • Debugging (11)
  • Device Drivers (1)
  • Frontend (6)
  • Guide (6)
  • Interview (6)
  • Network (1)
  • Resources (6)

Sign Up for Weekly Newsletter

Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.

[rh_mailchimp action=”//fleek.us10.list-manage.com/subscribe/post?u=4b4bbda55bb6deb367e6f52d9&id=6b32851a5b” inputname=”b_4b4bbda55bb6deb367f52d9_6b32851a5b” flat=1 button=”Subscribe” placeholder=”Email address”]

Frontend

  • All the “Truth” you need to know about “Truth Table”

    February 19, 2022
  • Registers & Computer Memory Primer for x86

    February 19, 2022
  • Top listing blocks and reviews

    June 29, 2021
  • Step list block

    June 29, 2021

Subscribe Newsletter

  • Facebook
  • Twitter
  • Linkedin
  • Youtube
  • Email
  • Github
  • Stack-overflow

Read alsox

0x9F BugCheck with Param 3? Here is how...

November 2, 2020

Setting Symbols in WinDbg

November 2, 2020

Stuck in the Apps Debug mode for a...

November 2, 2020

Shopping Cart

Close

No products in the cart.

Close