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. C / C++ / MFC
  4. Debugging DLL problem

Debugging DLL problem

Scheduled Pinned Locked Moved C / C++ / MFC
debuggingcomtoolshelpquestion
9 Posts 4 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.
  • B Offline
    B Offline
    Bob Stanneveld
    wrote on last edited by
    #1

    Hello, I've got a little problem when I want to debug my DLL. The situation is as follows: - I've a DLL project and I've buildt a debug version of the DLL with the PDB file. - I've another project and I want to test the DLL by calling it's functions with predefined data. When I hit a application breakpoint, I want to step into the DLL's code. - The DLL and the PDB are in the same folder as the test application. The problem is that VS2005 says that no debug symbols are loaded for the DLL. Is there a way to load those symbols manually, or am I doing something wrong? Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

    D C C 3 Replies Last reply
    0
    • B Bob Stanneveld

      Hello, I've got a little problem when I want to debug my DLL. The situation is as follows: - I've a DLL project and I've buildt a debug version of the DLL with the PDB file. - I've another project and I want to test the DLL by calling it's functions with predefined data. When I hit a application breakpoint, I want to step into the DLL's code. - The DLL and the PDB are in the same folder as the test application. The problem is that VS2005 says that no debug symbols are loaded for the DLL. Is there a way to load those symbols manually, or am I doing something wrong? Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

      D Offline
      D Offline
      douglasjordan
      wrote on last edited by
      #2

      I have not done any DLL debugging with VS2005 yet, however in the past to get a DLL to step debug I had to start the debugger from the DLL project specifying the EXE that will load the DLL. If you cannot get the EXE to stop at the point you wish, just put an "_asm int 3h" inline and the debugger will stop. If its a debug build it should automatically pull in the source.

      B 1 Reply Last reply
      0
      • B Bob Stanneveld

        Hello, I've got a little problem when I want to debug my DLL. The situation is as follows: - I've a DLL project and I've buildt a debug version of the DLL with the PDB file. - I've another project and I want to test the DLL by calling it's functions with predefined data. When I hit a application breakpoint, I want to step into the DLL's code. - The DLL and the PDB are in the same folder as the test application. The problem is that VS2005 says that no debug symbols are loaded for the DLL. Is there a way to load those symbols manually, or am I doing something wrong? Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

        C Offline
        C Offline
        Chris Meech
        wrote on last edited by
        #3

        Bob Stanneveld wrote:

        The DLL and the PDB are in the same folder as the test application.

        Are they in the directory for the test applications project or are they located in the Debug sub-directory? If I remember correctly they should be in the Debug sub-directory. Chris Meech I am Canadian. [heard in a local bar] Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer] Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]

        B 1 Reply Last reply
        0
        • B Bob Stanneveld

          Hello, I've got a little problem when I want to debug my DLL. The situation is as follows: - I've a DLL project and I've buildt a debug version of the DLL with the PDB file. - I've another project and I want to test the DLL by calling it's functions with predefined data. When I hit a application breakpoint, I want to step into the DLL's code. - The DLL and the PDB are in the same folder as the test application. The problem is that VS2005 says that no debug symbols are loaded for the DLL. Is there a way to load those symbols manually, or am I doing something wrong? Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

          C Offline
          C Offline
          Chris Losinger
          wrote on last edited by
          #4

          there are two ways i handle this: 1. put the DLL project into the same solution/workspace as your app, build the DLL and the app. then the debugger will know how to find the DLL source. or 2. in your DLL project, set your test app as the startup EXE . then when you 'run' the DLL, it will start the test app, and you can put breakpoints in the DLL (but not in the test app). Cleek | Image Toolkits | Thumbnail maker

          B 1 Reply Last reply
          0
          • D douglasjordan

            I have not done any DLL debugging with VS2005 yet, however in the past to get a DLL to step debug I had to start the debugger from the DLL project specifying the EXE that will load the DLL. If you cannot get the EXE to stop at the point you wish, just put an "_asm int 3h" inline and the debugger will stop. If its a debug build it should automatically pull in the source.

            B Offline
            B Offline
            Bob Stanneveld
            wrote on last edited by
            #5

            Hello, Thanks for your reply. I think that MS changed the way the DLL's are debugged. I can't get the source, even with the __asm int 3 jump in the debugger hack... Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

            1 Reply Last reply
            0
            • C Chris Meech

              Bob Stanneveld wrote:

              The DLL and the PDB are in the same folder as the test application.

              Are they in the directory for the test applications project or are they located in the Debug sub-directory? If I remember correctly they should be in the Debug sub-directory. Chris Meech I am Canadian. [heard in a local bar] Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer] Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]

              B Offline
              B Offline
              Bob Stanneveld
              wrote on last edited by
              #6

              Hello, The DLL, PDB file and the test application are all in the same directory, but to no avail... The debug output shows that the symbols are loaded however.. :confused: Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

              1 Reply Last reply
              0
              • C Chris Losinger

                there are two ways i handle this: 1. put the DLL project into the same solution/workspace as your app, build the DLL and the app. then the debugger will know how to find the DLL source. or 2. in your DLL project, set your test app as the startup EXE . then when you 'run' the DLL, it will start the test app, and you can put breakpoints in the DLL (but not in the test app). Cleek | Image Toolkits | Thumbnail maker

                B Offline
                B Offline
                Bob Stanneveld
                wrote on last edited by
                #7

                Hello, Thanks for your reply. :-D

                Chris Losinger wrote:

                1. put the DLL project into the same solution/workspace as your app, build the DLL and the app. then the debugger will know how to find the DLL source.

                The projects are all in the same solution. I even pointed the target directory of the GUI test app to the general debug folder where VS puts all the libraries.

                Chris Losinger wrote:

                2. in your DLL project, set your test app as the startup EXE . then when you 'run' the DLL, it will start the test app, and you can put breakpoints in the DLL (but not in the test app).

                I also did this, but it didn't work. Is this a missing feature in the standard edition? Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

                C 1 Reply Last reply
                0
                • B Bob Stanneveld

                  Hello, Thanks for your reply. :-D

                  Chris Losinger wrote:

                  1. put the DLL project into the same solution/workspace as your app, build the DLL and the app. then the debugger will know how to find the DLL source.

                  The projects are all in the same solution. I even pointed the target directory of the GUI test app to the general debug folder where VS puts all the libraries.

                  Chris Losinger wrote:

                  2. in your DLL project, set your test app as the startup EXE . then when you 'run' the DLL, it will start the test app, and you can put breakpoints in the DLL (but not in the test app).

                  I also did this, but it didn't work. Is this a missing feature in the standard edition? Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

                  C Offline
                  C Offline
                  Chris Losinger
                  wrote on last edited by
                  #8

                  could be a vs05 issue, but since i've never used vs05, i can't say... Cleek | Image Toolkits | Thumbnail maker

                  B 1 Reply Last reply
                  0
                  • C Chris Losinger

                    could be a vs05 issue, but since i've never used vs05, i can't say... Cleek | Image Toolkits | Thumbnail maker

                    B Offline
                    B Offline
                    Bob Stanneveld
                    wrote on last edited by
                    #9

                    I think that it's a missing feature in the standard edition. I think that the content of the debug output window is the output of dr watson. This output says that the debug symbols are loaded, but when I hold the cursor above the DLL breakpoint, the tooltip says that there are no symbols loaded. :confused: I have to verify this somehow. Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

                    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