Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CDB doesn't show the line of code as WinDBG does for callstacks

I am using WinDBG 6.12.0002.633 X86.

I'm having an issue with the command-line debugger CDB not showing the same results as WinDBG for the k and kL commands.

In WinDBG, the k command correctly shows the line of code for the callstack where the kL command correctly strips that information and only shows the offset.

1:128:armce> k
Child-SP RetAddr  Call Site
761efaf4 78013cdc module_78010000!SomeModule::Foo+0xb4 [bar.cpp @ 268]

1:128:armce> kL
Child-SP RetAddr  Call Site
761efaf4 78013cdc module_78010000!SomeModule::Foo+0xb4

In CDB, the results of the k and kL are identical:

1:128:armce> k
Child-SP RetAddr  Call Site
761efaf4 78013cdc module_78010000!SomeModule::Foo+0xb4

1:128:armce> kL
Child-SP RetAddr  Call Site
761efaf4 78013cdc module_78010000!SomeModule::Foo+0xb4

What can I do to get CDB to show the line of code for the k command as WinDBG does?

like image 478
PaulH Avatar asked Jan 17 '12 16:01

PaulH


People also ask

How to attach WinDbg?

If WinDbg is already debugging one or more processes, you can attach to a running process by using the . attach (Attach to Process) command in the Debugger Command window. The debugger always starts multiple target processes simultaneously, unless some of their threads are frozen or suspended.

How do you read a stack trace WinDbg?

You can view the call stack by entering one of the k (Display Stack Backtrace) commands in the Debugger Command window.

Where is CDB EXE?

C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe.


1 Answers

Try running the command ".lines" to cause line information to be loaded. WinDBG defaults to line information being loaded, CDB and NTSD do not.

like image 192
Michael Avatar answered Sep 20 '22 08:09

Michael