Using WinDbg with TTD enabled, how to play back to the moment of creation of some managed object?
Lets say I do have its address obtained using !clrstack -a
or !dso
Play back to the moment of creation of some managed object in WinDbg TTD
145 Views Asked by Serg Kryvonos At
1
There are 1 best solutions below
Related Questions in CLR
- Best way to pass an environment variable to several config files
- Openshift context path
- KeyStore file is not found in jar, although present in jar
- phpseclib of how to get PID and kill
- Unable to connect database of lamp instance from servlet running on tomcat instance of google cloud
- Spring and Tomcat: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
- How can I get a custom header from the client in Tomcat?
- why lost Mysql connection pool after a period?
- Eclipse Java EE + Bitnami Tomcat Stack
- Service not starting using Spring-boot during integration tests
Related Questions in WINDBG
- Best way to pass an environment variable to several config files
- Openshift context path
- KeyStore file is not found in jar, although present in jar
- phpseclib of how to get PID and kill
- Unable to connect database of lamp instance from servlet running on tomcat instance of google cloud
- Spring and Tomcat: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
- How can I get a custom header from the client in Tomcat?
- why lost Mysql connection pool after a period?
- Eclipse Java EE + Bitnami Tomcat Stack
- Service not starting using Spring-boot during integration tests
Related Questions in HISTORICAL-DEBUGGING
- Best way to pass an environment variable to several config files
- Openshift context path
- KeyStore file is not found in jar, although present in jar
- phpseclib of how to get PID and kill
- Unable to connect database of lamp instance from servlet running on tomcat instance of google cloud
- Spring and Tomcat: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
- How can I get a custom header from the client in Tomcat?
- why lost Mysql connection pool after a period?
- Eclipse Java EE + Bitnami Tomcat Stack
- Service not starting using Spring-boot during integration tests
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There are several ways of doing this. If you have the address of the object and want to go back to its creation you can use a ba (break on access). When an object is created the Method Table address is written into the first word (4 bytes for 32-bit, 8 bytes for 64-bit). So adding a breakpoint per write access and going backwards will stop at the object creation. Another way is to add breakpoints pointing to all constructors of the object and also going backwards. Also notice that all of this can also be done by a 'dx' command filtering by breakpoint address or constructor call.
Imagine you have this output:
Approach 1: And you want to stop when this object is created you can use (for 32-bit use w4):
Using 'dx' (notice that the address must be in C++ format, starting wit '0x'):
Again, for 32-bit use address+4 on the second parameter. The option -g will show in a grid format.
Approach 2:
Get the address(es) of the constructors by listing the methods table of the class:
You may simply set the breakpoint at the 'Entry' address (or use !sos.bpmd) and go backwards:
Or use 'dx' to show all occasions where the code was called (note that the code was again adjusted to look like C++ '0x' and also that is in quotes):
Hope it works for you.