lrb@hpfcso.HP.COM (Larry Bruns) (12/01/90)
How do you get CVW to show symbolic info for Windows internal routines? Of course I realize there is no copy of the source to see. I just would like to see the publicly-known labels (of the Windows routines) displayed. In the SDK "Tools" Manual, Section 7.3.2, it states in the 3rd or 4th paragraph how to do this. I followed directions exactly, but it refuses to load the symbols for the KRNL286.EXE or KRNL386.EXE files - giving me an "Access Denied" error message, apparently due to the fact that Windows locks all access (even read access) to its executable files at startup time. Thanks for any tips, Larry Bruns PS - I hear that Microsoft is "considering" adding On-Line telephone support for the SDK. But no word as to when.
poffen@sj.ate.slb.com (Russ Poffenberger) (12/04/90)
In article <7450002@hpfcso.HP.COM> lrb@hpfcso.HP.COM (Larry Bruns) writes: >How do you get CVW to show symbolic info for Windows internal routines? >Of course I realize there is no copy of the source to see. I just would >like to see the publicly-known labels (of the Windows routines) displayed. > >In the SDK "Tools" Manual, Section 7.3.2, it states in the 3rd or 4th >paragraph how to do this. I followed directions exactly, but it refuses >to load the symbols for the KRNL286.EXE or KRNL386.EXE files - giving me >an "Access Denied" error message, apparently due to the fact that Windows >locks all access (even read access) to its executable files at startup >time. > >Thanks for any tips, >Larry Bruns > Do you have the debugging version of windows installed? (Using the .BAT file n2d?) Russ Poffenberger DOMAIN: poffen@sj.ate.slb.com Schlumberger Technologies UUCP: {uunet,decwrl,amdahl}!sjsca4!poffen 1601 Technology Drive CIS: 72401,276 San Jose, Ca. 95110 (408)437-5254
lrb@hpfcso.HP.COM (Larry Bruns) (12/08/90)
Well, I got an answer to my question from the Microsoft On-Line support
people. I will post it here in case anyone else is interested:
-When I installed Windows, it added the "share" command into my AUTOEXEC.BAT,
(or maybe it just asked me to add it - I don't remember which). When WIN3.0
starts up, it locks KRNL386.EXE (even for read access), thus also locking
away all the debug information I need! The solution was to *NOT* do the
call to share.exe, thus preventing Windows from locking access to the file
and so enabling CVW to open it later to read the debugging symbols out of it.
I also gave CVW the names of the GDI.EXE and USER.EXE DLL's, and was able to
see all the symbols I wanted.
Other CVW tips I have gleaned from hard experience:
-When debugging a DLL w/ symbolic info in it (made by using MASM's /ZI option,
CL's /Zi option, and LINK's /CO option), I didn't see any of my DLL's symbols
when bringing up (under CVW) an application that invoked the DLL. Even when
I stepped through the code into the DLL, I could not see any of my routine
names. The solution I discovered was:
-Bring up CVW.
-Have it invoke your Windows app (the one that uses the DLL).
-Enter the name of your DLL at the CVW startup prompt that asks for any
DLL's or other executables w/ debug info.
-Run thru the app, or at least far enough into it so that the DLL code is
invoked at least once.
-Completely exit the app and CVW.
-Run CVW a second time, again entering the name of your app and the DLL.
(Also enter KRNL{23}86, GDI and USER at the startup prompts to see names of
all Windows routines that you call).
-You should now be able to see the names of all your symbols, even before
starting the run through your app,
-To see any symbols at all, you need to check the "Show Symbolic Names" box
in the CVW "Option" / "Source Window" menu. (Also, make sure you have the
debugging versions of KRNL{23}86.EXE, GDI.EXE and USER.EXE installed).
-When a source window is open and you want to have the window show a
particular routine which has a known sybolic name, you will find that the
"Search" menu's "Label" option no longer works in finding a label! I used
to use this all the time in CodeView 5.1 (for DOS that is, not Windows) to
go to any label/function/procedure name, whether it was in a C or an ASM
module. But now in CVW, I could only get it to find labels in C code for
which I *also* had all of the source code loaded. I discovered that Micro-
soft had broken this for their CodeView-for-DOS 6.0 release as well. This
does not make any sense to me - why can I *see* my public label right there
in the code window, but yet not be able to tell it to *go* there? I called
their support line (for CV 6.0, of course, since there is no phone support
for CVW yet), and they could verify that it was indeed broken, but could
not give me any help other than that. After a lot of frustration due to
having to continuously use the Page Up/Down keys for moving around in the
code, I finally found the solution myself: There is a command you can
type in from the command window - the "v" command - which will move the
window to the labeled routine that you want to see. Example: v LOADICON
(BTW: you don't have to use the caps if you turn off the "Case Sensitivity"
option in the Options menu).
-I have a Windows app that prints logging info directly to the CRT (thus
bypassing Windows and overwriting parts of my Windows display). It looks
messy but shows me what I need. When I run that same app under CVW, the
logging info is printed in what looks like Greek! The solution was to
run my app once (puts Greek on the screen), then start up a background
DOS partition and immediately hot-key from it back to Windows. Now when
I run my app a second time, it looks fine. I have no idea why this works.
(However, this solution only works in 286 mode).
Larry Bruns