ReportLiveObjects getting the logs programmatically - directx-11

I have my app using IDXGIDebug::ReportLiveObjects to report some memory leaks. But I'd like to pipe these logs through my own log system.
I could not find much info online. Anyone knows how I could access these DXGI logs programmatically besides looking at the visual studio output window.

As far as I can tell, there isn't a way to do this. ReportLiveObjects likely uses OutputDebugString or DbgPrint under the hood, and these go directly to the process's attached debugger. While some tools do have the ability to tap into these streams, all filtering has to be done by the program capturing the data, meaning you get to deal with not just the output of ReportLiveObjects, but the output of Visual Studio, of any drivers that get loaded and check for a debugger, and quite possibly the system itself. In all honesty, it's probably easier to simply dump the log file to VS's output window, then save the contents of the window as a log file.

Related

How do I monitor the status of a program running in Windows 10?

I know we look at the list of process with tasklist command.
However, what I would like to know is what happens within the process.
First part:
For example, I am running MS Word.
So I click on "File" button. It will cause the drop down box to open.
However, what happens in OS and is there anyway of monitoring this?
(Like a debugger or a log message to track the action that will show like
"MouseClicked Button File" and "Drop down opened")
Second part (If there is no solution to the first part):
As programmers we write programs in different languages like java, C/C++ and so on but all of them are compiled into .exe/.jar files.
So I should be right to say that all of this compiled are readable by the OS so we should be able to write the program to create a software that will be able to do the above all of them are read by the OS.
Third Part:
Please give me some tips to start working on this project that will show the status of a running program.

VS Console window does not show all results

I am using VS express 2012 to run a code that display content of many files. I found that first files content do not show and when I debug step by step I found that the content show on the console window and disappear when other results show, which means they get pushed out of the window. of course I scroll up and I find the latest files only not all. Is there any option control this feature? and how can I see all results?
To avoid this you should convert your console application to a Windows Forms one and put all the output on a TextBox. Just execute the command on the Form load and redirect all the output to the TextBox.
It's not much work IMHO.
This is the nature of a console application, no different than if you were to echo data to the Windows command prompt. If there is too much data then of course it will scroll off the visible screen.

How do I get windbg to save my session state?

I just started a new task at a "lower level" in the platform stack, and I'm getting started with windbg. I'm so far quite happy with the pure power of the debugger. However, I wish it would just save my session default, like the VS debugger does. What I want is that whenever I ".restart", or re-open windbg, it works just like I left it: same bp's, same sxe state, same files open in the same places, etc.
I know about "save workspace" which seems to do what I want, but it's manual, and I have to do it every time I make a change to the workspace state.
Is there a way to just have windbg do this automatically?
It should prompt the first time you close the session and ask you if you want to save your workspace, there is a checkbox like the image here.
If you click yes this time and the box 'Don't ask again in this WinDbg session' then it will automatically save your workspace, similarly you can also clear the workspaces if it's erroneously saved some breakpoints or paths that you are no longer interested.
Also you can set this in the options like so:
Microsoft NTDebugging Blog. Uncovering How Workspaces Work in WinDbg.

Windows NTSD Debugger

I am doing some debugging of a crash dump file using NTSD. Is it possible to redirect all the output that I am seeing on console now to a txt file? I am getting all the call stacks of all the threads however can't see that information in a debugger window.
Thanks
Look at the .logopen and .logclose commands. You should be able to do .logopen foo.txt, issue your command (which I'm assuming is ~*k), and then when it's done, do .logclose.

Where does Internet Explorer 8 store its crash dumps?

I am fighting a bug which does not reproduce on my machine, but repeats every time on my client's machine. I've tried everything, and now I am looking for any debug data (or whatever) that IE8 leaves after a crash. Google and Microsoft searches gave me nothing. Where does Internet Explorer 8 store its crash dumps? It definetely sends something to Microsoft after a crash, how can I see it?
There is a post here that will show you how to generate a mini dump
http://www.vistax64.com/windows-updates/227276-mshtml-dll-internet-explorer-8-crash-3.html
To generate a minidump:
Download and install the "Debugging Tools" package
From the folder where you installed it, run WinDBG.exe as admin (right-click, "run as admin...").
Press F6, sort "by executable", find IEXPLORE.EXE, select, OK. (It's easier if you have only one instance of IEXPLORE running at this time.)
It'll spew out a whole bunch of numbers and eventually dump you on a prompt at the bottom of the page. Just type G and press enter. This attaches the debugger to the IEXPLORE process but then lets it "Go" and continue to do its thang.
Do whatever you need to do to repro the crash.
This time, a crash condition will cause the debugger to "break into" the IEXPLORE process and suspend all its actions. In other words, instead of seeing the same crash message you'll see the debugger take over and IEXPLORE will look like it's frozen.
Ignore all the spew again and wait for the prompt at the bottom of the WinDBG window, then type this:
.dump /m IE1.dmp
If you don't give it a full path, the IE1.dmp file will be created in the same folder where you installed the debugger package. If you zip up that minidump and upload it here, I or someone else may be able to dig more info out of it.

Resources