WinDbg и стек
От: Блондинко Беларусь  
Дата: 20.08.08 08:38
Оценка:
Насколько я понимаю, !DumpHeap у WinDbg смотри только кучу. Можно ли как-то получить информацию по содержимому стека?
Re: WinDbg и стек
От: Сергей Мухин Россия  
Дата: 20.08.08 08:51
Оценка:
Здравствуйте, Блондинко, Вы писали:

Б>Насколько я понимаю, !DumpHeap у WinDbg смотри только кучу. Можно ли как-то получить информацию по содержимому стека?


k — и ее производные

вообще то у него help есть

Viewing the Call Stack
The call stack is the chain of function calls that have led to the current location of the program counter. The top function on the call stack is the current function, the next function is the function that called the current function, and so on.

The call stack also preserves some facts whenever a function calls a new function. These facts vary from processor to processor, but typically they include the following:

The name or location of the function called.
The return address. (This address is typically the assembly instruction immediately after the address that the function was called from.)
The parameters that were passed to the function.
The base pointer for the stack frame.
To display the call stack, you can use the following methods:

The k (Display Stack Backtrace) command is the basic stack trace command. This command displays the base pointer for the stack frame, the return address, and the name of the function. If source line information is available, k also displays source modules and line numbers.
The kb (Display Stack Backtrace) command displays the same stack as the k command and displays the first three parameters that were passed to the function.
The kp (Display Stack Backtrace) command displays the same stack as the kb command and displays a full listing of the parameters that were passed to each function.
The kv (Display Stack Backtrace) command displays the same stack as the kb command and displays additional frame pointer omission (FPO) information. On an x86-based processor, this command also displays calling convention information. On an Itanium-based processor, this command also displays nonvolatile registers.
The kd (Display Stack Backtrace) command displays the raw stack data, without any formatting.
(WinDbg only) The Calls window displays call stack information. You can customize this window to display different stack data. You can also use this window to quickly jump to the corresponding function in a Source window or Disassembly window.

If you try to display the call stack at the very beginning of a function (before the function prolog has been executed), you probably see incorrect results. The debugger uses the frame register to compute the current backtrace, and this register is not set correctly for a function until its prolog has been executed.

The call stack that is displayed is based on the current program counter, unless you change the register context. For more information about how to change the register context, see Changing Contexts.

A variety of problems can make it difficult to obtain an accurate stack trace. For more information about this matter, see Getting a Stack Trace.
---
С уважением,
Сергей Мухин
Re[2]: WinDbg и стек
От: Блондинко Беларусь  
Дата: 20.08.08 08:55
Оценка:
Здравствуйте, Сергей Мухин, Вы писали:

СМ>Здравствуйте, Блондинко, Вы писали:


Б>>Насколько я понимаю, !DumpHeap у WinDbg смотри только кучу. Можно ли как-то получить информацию по содержимому стека?


Я имела в виду стек памяти — в частности, мне нужна статисктика по ValueType, направила стопы в сторону DumpVC, но он просит MT и конкретный адрес, а мне бы по всем
Re[3]: WinDbg и стек
От: Сергей Мухин Россия  
Дата: 20.08.08 09:05
Оценка: +1
Здравствуйте, Блондинко, Вы писали:

Б>>>Насколько я понимаю, !DumpHeap у WinDbg смотри только кучу. Можно ли как-то получить информацию по содержимому стека?


Б>Я имела в виду стек памяти — в частности, мне нужна статистика по ValueType, направила стопы в сторону DumpVC, но он просит MT и конкретный адрес, а мне бы по всем


что такое "стек памяти"?
---
С уважением,
Сергей Мухин
Re[4]: WinDbg и стек
От: Tom Россия http://www.RSDN.ru
Дата: 20.08.08 09:10
Оценка:
СМ>что такое "стек памяти"?
И по конкретнее опиши что надо в итоге
Народная мудрось
всем все никому ничего(с).
Re[5]: WinDbg и стек
От: Блондинко Беларусь  
Дата: 20.08.08 11:01
Оценка:
Здравствуйте, Tom, Вы писали:

СМ>>что такое "стек памяти"?

Tom>И по конкретнее опиши что надо в итоге

Я забыла уточнить важную деталь: дебажу .NET приложение, ползуюсь sos.dll, соответственно речь идет о managed памяти
Стек — я имею в виду то место, где хранятся ValueType, нужно посмотреть, какие и сколько.
Re[6]: WinDbg и стек
От: orangy Россия
Дата: 20.08.08 13:29
Оценка:
Здравствуйте, Блондинко, Вы писали:

Б>Стек — я имею в виду то место, где хранятся ValueType, нужно посмотреть, какие и сколько.

ValueType может быть не только на стеке, а, например, в составе RefType.
... << RSDN@Home 1.2.0 alpha rev. 655>>
"Develop with pleasure!"
Re[6]: WinDbg и стек
От: Кирилл Осенков Украина
Дата: 22.08.08 04:27
Оценка:
Здравствуйте, Блондинко, Вы писали:

Б>Стек — я имею в виду то место, где хранятся ValueType, нужно посмотреть, какие и сколько.


!CLRStack

!CLRStack -l (shows stack with locals)
!CLRStack -p (shows stack with parameters)
!CLRStack -l -p (shows both parameters and locals)
Re[7]: WinDbg и стек
От: Кирилл Осенков Украина
Дата: 22.08.08 04:43
Оценка:
КО>!CLRStack

Вот ещё хорошая ссылка по теме:
http://geekswithblogs.net/.netonmymind/archive/2006/03/14/72262.aspx
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.