Re: copymemory basic question
- From: "Sam Hobbs" <samuel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 4 Sep 2005 18:44:35 -0700
"Someone" <nobody@xxxxxxx> wrote in message
news:MeESe.7826$ct5.3837@xxxxxxxxxxxxx
>
> There is an easier way to see the compiled code than this by using VC++
> 6.0.
>
> Here are step by step instructions:
I have used VC (actually Visual Studio) somewhat but I have not done some of
what you have below. I understand and agree that this is worth a separate
thread so I won't go into detail here.
> - Create a new VB project, and write a sample code in Form_Click in Form1.
> - Add a MsgBox "Hello" in the code.
> - Save the project(a must).
I have used that technique before; that is, put a MessageBox in a VC program
so I can debug the program. Once that has been done, we can save the
workspace and then debug the program without using the MessageBox or MsgBox.
I would prefer to be able to create the workspace without use of the
MessageBox or MsgBox or anything like that to pause the program but I have
not figured out how to do that directly. When I do I can create a new thread
with the information.
It is possible, however, to use VS to make a "makefile" project and then we
can debug the program without needing a MessageBox or MsgBox or anything
like that to create the project or debug or whatever. By creating a project
that way, it is possible to add source files to the project, but there are
potential problems that I won't get into here.
I would prefer to have a project type that is more relevant than "makefile"
but I don't know of one.
> - Go to Project|Properties|Compile, and select "Create Symbolic Debug
> Info".
> - Compile and save.
Thank you for the "Create Symbolic Debug Info". I tried to find things like
that but overlooked it. It will likely be useful with DumpBin too.
> - Go to Build|Start Debug|Attach to process, and select your running EXE.
> - Click on Form1, this will execute Form_Click, and a message box with the
> word Hello will appear. Do not click OK yet.
> - Go to VC++ 6.0|Debug|Break.
If the VS project is created as above, then it is not necessary to do the
"Attach to process" and breaking in and such.
> - Go to View|Debug Windows, and make sure that "Call Stack" window is
> visible.
> - One of the lines in "Call Stack" shows "Form1::Form_Click()", double
> click on that, this will view the source code.
> - Now Right Click on any source line that you like, and select "Go to
> Disassembly", this will show the source and what VB compiled the code to
> in an easy to view format.
Alternatively, while debugging, it is possible to open the source file while
debugging the program and then we can click on a line as you describe to get
to the disassembly.
> It's important to note that VB6 does source level optimization, a specific
> line may be compiled differently based on the lines before it.
In the case of the OptimizedTiny function in my message, the disassembly is
not able to show anything due to the optimization.
.
- References:
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: Donald Lessau
- Re: copymemory basic question
- From: Jim Mack
- Re: copymemory basic question
- From: Donald Lessau
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: Jim Mack
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: Jim Mack
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: Donald Lessau
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: mscir
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: Tony Proctor
- Re: copymemory basic question
- From: Sam Hobbs
- Re: copymemory basic question
- From: Someone
- Re: copymemory basic question
- Prev by Date: What Msg from Win+D
- Next by Date: Re: copymemory basic question
- Previous by thread: Re: copymemory basic question
- Next by thread: Re: copymemory basic question
- Index(es):
Relevant Pages
|