News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Acclimation Help

Started by mathguy, September 21, 2011, 06:40:10 PM

Previous topic - Next topic

mathguy

Okay.  Now I've really done it.  I had it all working just fine.  Now, all of the sudden when I'm debugging, the debugger just hangs at the DLL call.  In the debug window it says that it's loading the DLL but nothing happens after that.  If I put a breakpoint at the entrypoint of the DLL, of course, it never gets there.  Yet the DLL produced by the build works just fine in production.  I don't know what I did or why it is hanging.  I swear that all is as it was before.  Any ideas?  I've been bangin' my head against the wall for a while now.

mathguy

Still sleuthing this one.  If I just run the debugger without trying to stop at or in the DLL, it runs and works.  It's if I try to step over or into the DLL that the debugger freezes.

TimoVJL

Can you select Debug -> Break and then F5 Continue ?
May the source be with you

mathguy

No, Break is greyed out!?

CommonTater

Is there debugging code in the DLL?

mathguy

Yes, I believe so.  When I build it, I have the debug set to Full.  I see it writing the debug info too.  Is it possible that it's not there?  What should I check to see if it is?  Also, would that make the debugger hang?

CommonTater

#36
Quote from: mathguy on October 18, 2011, 10:00:06 PM
Yes, I believe so.  When I build it, I have the debug set to Full.  I see it writing the debug info too.  Is it possible that it's not there?  What should I check to see if it is?  Also, would that make the debugger hang?

Don't forget that you have to turn on debugging info in both the compiler and the linker before the POIDE tool can give you source code level debugging.

If you look in the ADDINS forum you will find a tool rel-dbg-prf that switches the modes for you.  It creates 3 little buttons on your project's toolbar ... just select the DLL project and click the dbg button... makes it real easy.



mathguy

CT,

Yep, I have them all set and still it hangs at the DLL call in the test program if I step and it won't stop at any of the breakpoints within the DLL if I do a Run with a breakpoint after the call.  It will stop at that breakpoint and I can tell the DLL ran fine.  Stumped.

Thank you for the add-in tip.  I will look at that.

CommonTater

You might try debugging the DLL project using your executable as a "helper" app...

Load the DLL project and make it the active one...

Project -> Project Options -> Executable Helper ...  put in your program's name.
Then recompile with debugging turned on and Run...

mathguy

CT,

Thank you.  It executed but did not catch any of the breakpoints, etc.  It sure is acting like there's no debug information but during the build I even get "Writing Debug Info" in the build window.  Something is very puzzling here.  I will keep digging.

Thank you for all of your help and attention on this.  It is greatly appreciated!

CommonTater

Quote from: mathguy on October 19, 2011, 06:23:28 PM
CT,

Thank you.  It executed but did not catch any of the breakpoints, etc.  It sure is acting like there's no debug information but during the build I even get "Writing Debug Info" in the build window.  Something is very puzzling here.  I will keep digging.

Thank you for all of your help and attention on this.  It is greatly appreciated!

DLL project...
Project -> Project options -> Compiler -> Debug Information -> Full

For 32 bit project...
Project -> Project options -> Linker -> Debug information -> CodeView & Coff

for 64 bit project
Project -> Project options -> Linker -> Debug information -> CodeView

Now run the DLL with it's executable helper...

If it's not stopping at the breakpoints... perhaps it's not actually reaching the breakpoints...