Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. Getting Symbols Working

Getting Symbols Working

Scheduled Pinned Locked Moved Visual Studio
csharpc++visual-studiodebugginghelp
9 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Craig Longman
    wrote on last edited by
    #1

    I have VS 2008 installed. I have an issue and I'm trying to track down the win32 functions that are invoking it. I want to see the function names for user32.dll and ntdll.dll, among others. I've really tried everything I can think of to get this to work, but nothing seems to work. Most of the sources are for c# and various components around c#. I've tried re-running the VC2008 install to see if I missed something, but 'yay', it fails to load the installation components during the setup startup. I'm on Win7 64bit, VS2008 32bit trying to write/debug a 32bit DLL written in C++. It's remarkably frustrating, as everything I've read seems to indicate it should 'just work', and yet... Pointers/suggestions greatly appreciated.

    L 1 Reply Last reply
    0
    • C Craig Longman

      I have VS 2008 installed. I have an issue and I'm trying to track down the win32 functions that are invoking it. I want to see the function names for user32.dll and ntdll.dll, among others. I've really tried everything I can think of to get this to work, but nothing seems to work. Most of the sources are for c# and various components around c#. I've tried re-running the VC2008 install to see if I missed something, but 'yay', it fails to load the installation components during the setup startup. I'm on Win7 64bit, VS2008 32bit trying to write/debug a 32bit DLL written in C++. It's remarkably frustrating, as everything I've read seems to indicate it should 'just work', and yet... Pointers/suggestions greatly appreciated.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Craig Longman wrote:

      I have an issue and I'm trying to track down the win32 functions that are invoking it. I want to see the function names for user32.dll and ntdll.dll, among others.

      Could you try clarifying what you mean here, I cannot quite figure out what your problem is.

      It's time for a new signature.

      C 1 Reply Last reply
      0
      • L Lost User

        Craig Longman wrote:

        I have an issue and I'm trying to track down the win32 functions that are invoking it. I want to see the function names for user32.dll and ntdll.dll, among others.

        Could you try clarifying what you mean here, I cannot quite figure out what your problem is.

        It's time for a new signature.

        C Offline
        C Offline
        Craig Longman
        wrote on last edited by
        #3

        Of course. What I see in the call stack is something like:

        >user32.dll!75956238()

        I'd rather see:

        Main.dll!CPluginPP::SubclassDialogWndProc0(HWND__ * hWnd=0x000204f2, unsigned int uiMsg=5, unsigned int wParam=0, long lParam=31130780) Line 256

        Or at least the module, function/method and parameter list.

        L 1 Reply Last reply
        0
        • C Craig Longman

          Of course. What I see in the call stack is something like:

          >user32.dll!75956238()

          I'd rather see:

          Main.dll!CPluginPP::SubclassDialogWndProc0(HWND__ * hWnd=0x000204f2, unsigned int uiMsg=5, unsigned int wParam=0, long lParam=31130780) Line 256

          Or at least the module, function/method and parameter list.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          I do not think that this information is available; system libraries are not distributed with debug information, so the debugger cannot provide what you want. You can get some information about the function names by using the Dependency Walker[^] program, which can also link you to the MSDN documentation for the functions.

          Just say 'NO' to evaluated arguments for diadic functions! Ash

          C 1 Reply Last reply
          0
          • L Lost User

            I do not think that this information is available; system libraries are not distributed with debug information, so the debugger cannot provide what you want. You can get some information about the function names by using the Dependency Walker[^] program, which can also link you to the MSDN documentation for the functions.

            Just say 'NO' to evaluated arguments for diadic functions! Ash

            C Offline
            C Offline
            Craig Longman
            wrote on last edited by
            #5

            I'm pretty sure you can... it really doesn't need debugging information in the DLL, just the PDB that has addresses for functions and parameter information to interpret the stack. Having stack optimisation disabled can help, and I think that they system DLLs are compiled like that anyway. There are all sorts of bits of information out there, but even just loading directly from the microsoft symbol server doesn't work. I'm sure some simple step is being missed, unless there just really isn't one for Win7 64 yet. Or if I can't debug it properly as I'm on 64bit but developing 32bit... More things to try and wade through. If anyone has had success on win7 64, please shout out. Thanks,

            CraigL

            L 1 Reply Last reply
            0
            • C Craig Longman

              I'm pretty sure you can... it really doesn't need debugging information in the DLL, just the PDB that has addresses for functions and parameter information to interpret the stack. Having stack optimisation disabled can help, and I think that they system DLLs are compiled like that anyway. There are all sorts of bits of information out there, but even just loading directly from the microsoft symbol server doesn't work. I'm sure some simple step is being missed, unless there just really isn't one for Win7 64 yet. Or if I can't debug it properly as I'm on 64bit but developing 32bit... More things to try and wade through. If anyone has had success on win7 64, please shout out. Thanks,

              CraigL

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Craig Longman wrote:

              it really doesn't need debugging information in the DLL, just the PDB

              Sure, except such files are never part of the commercial Windows distributions. As far as I am aware the only way to get them is by signing up to one of Microsoft's special category programs, such as Beta tester/developer or similar. They then give you access to all sorts of extra tools and resources not available to Joe Public. I can't remember how you get on to such a program but think it may be connected to MSDN subscriptions.

              Just say 'NO' to evaluated arguments for diadic functions! Ash

              C 1 Reply Last reply
              0
              • L Lost User

                Craig Longman wrote:

                it really doesn't need debugging information in the DLL, just the PDB

                Sure, except such files are never part of the commercial Windows distributions. As far as I am aware the only way to get them is by signing up to one of Microsoft's special category programs, such as Beta tester/developer or similar. They then give you access to all sorts of extra tools and resources not available to Joe Public. I can't remember how you get on to such a program but think it may be connected to MSDN subscriptions.

                Just say 'NO' to evaluated arguments for diadic functions! Ash

                C Offline
                C Offline
                Craig Longman
                wrote on last edited by
                #7

                You might be thinking of checked builds, when there all the parameter validation/integrity is checked in all the system calls. The symbol files are relatively freely available. Microsoft has symbol servers that you can point VS to (http://referencesource.microsoft.com/symbols) or you can download the symbols for either retail or checked from here: http://www.microsoft.com/whdc/devtools/debugging/symbolpkg.mspx Unfortunately, I can't seem to get the common ones like user32.dll recognized. Some of the more esoteric ones seem to load fine though. Although both my build and the install seem to be for Win7 v6.1 build 7600, for some reason it's not matching checksums. I guess I'll probably end up setting up an XP machine to do this if I need it, I guess Win7 is perhaps too new to have proper symbols available. Or the OEM ones are different, or something. Frustrating.

                L 1 Reply Last reply
                0
                • C Craig Longman

                  You might be thinking of checked builds, when there all the parameter validation/integrity is checked in all the system calls. The symbol files are relatively freely available. Microsoft has symbol servers that you can point VS to (http://referencesource.microsoft.com/symbols) or you can download the symbols for either retail or checked from here: http://www.microsoft.com/whdc/devtools/debugging/symbolpkg.mspx Unfortunately, I can't seem to get the common ones like user32.dll recognized. Some of the more esoteric ones seem to load fine though. Although both my build and the install seem to be for Win7 v6.1 build 7600, for some reason it's not matching checksums. I guess I'll probably end up setting up an XP machine to do this if I need it, I guess Win7 is perhaps too new to have proper symbols available. Or the OEM ones are different, or something. Frustrating.

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Craig Longman wrote:

                  You might be thinking of checked builds

                  Possibly, it's a long time since I saw a system like this. Personally I have never had the need for symbol tables of system libraries, as I have never had a bug in any of my programs that wasn't my fault.

                  Just say 'NO' to evaluated arguments for diadic functions! Ash

                  C 1 Reply Last reply
                  0
                  • L Lost User

                    Craig Longman wrote:

                    You might be thinking of checked builds

                    Possibly, it's a long time since I saw a system like this. Personally I have never had the need for symbol tables of system libraries, as I have never had a bug in any of my programs that wasn't my fault.

                    Just say 'NO' to evaluated arguments for diadic functions! Ash

                    C Offline
                    C Offline
                    Craig Longman
                    wrote on last edited by
                    #9

                    Hehehe... then you've been lucky. =) However, the symbols aren't much good for that, but they are very helpful to see why you're being called. I'm currently working on a plug-in, and I don't always know why the host app is doing something, and have some named function trace can be very helpful indeed.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups