forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Inconsistent results when Pause-ing sdbg

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Wed Aug 03, 2005 11:49 am    Post subject: Inconsistent results when Pause-ing sdbg Reply with quote

When running an application under control of sdbg, to break into a normal running condition it is necessary to click Pause in the "Waiting" dialogue. The expected result of doing this in my experience is that the source window highlights the last of the winio@ statements defining the main window, allowing me to examine any of the variables that are in scope for the main program unit.

The application I am trying to debug at the moment only does this some of the time. Other times when I click Pause, sdbg opens up a window of assembler with a RETN statement highlighted. I can't reproduce the problem reliably yet, but when it does happen, it's always the same statement of assembler that is the culprit. Also, when it happens, I can't recover reliably My best bet is to try Restart Program from the sdbg menu, but as often as not that results in a message that "the task being debugged could not be shut down". All other options result in the same message with higher probability.

I appreciate it's difficult to be sure without code, but is this more likely to indicate a problem with my code or a problem with sdbg/Plato? I should say that the app runs seemingly without problems when sdbg is not involved.

Andy
Back to top
View user's profile Send private message Send e-mail
Anonymous
Guest





PostPosted: Thu Aug 04, 2005 4:33 pm    Post subject: Inconsistent results when Pause-ing sdbg Reply with quote

When you press the 'Pause', SDBG sends a message to your program asking it to pause and then waits half a second for it to happen. If it doe snot happen then the process is suspended with an API call (SuspendThread). The reason SDBG first asks politely is that there is a good chance that issuing a SuspendThread will stop the program in the OS somewhere -- which makes producing any sensible debug information difficult (to say the least).

It sounds like in your case the SuspectThread is being called and your app is in a strange place -- on a kernel call maybe. Do you have any idea what the program is doing at the time?

Robert
Back to top
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Fri Aug 05, 2005 9:50 am    Post subject: Inconsistent results when Pause-ing sdbg Reply with quote

Thanks, Robert - it's always good to know what's going on behind the scenes.

"It sounds like in your case the SuspectThread is being called and your app is in a strange place -- on a kernel call maybe. Do you have any idea what the program is doing at the time?"

Well, nothing - ostensibly - I wait for results to appear in the main window and then click Pause. Maybe I should look a bit closer at where in my code I'm window_update@ing.

I have now discovered that actually it's not the disaster I thought it was - I can just click Run in the debugger and carry on! Your behind-the-scenes explanation not only accounts for this, but also accounts for why the debugger would report an inability to shut down the task being debugged. I've been conditioned to associating windows of assembler and "The task being debugged could not be shut down" messages with irrecoverable problems ...

I do still have a "Groundhog Day" oddity associated with this project; I don't know if it's associated with the above stuff or not. I have set breakpoints that I don't seem to be able to clear:

0 - There is a breakpoint marked in a certain line in one of the source files in Plato
1 - I start the app from within Plato, the debugger starts, and execution breaks at the marked line
2 - I select Run-Cancel All Breakpoints from the debugger menu (and the line highlighting changes colour accordingly)
3 - I click Run so that the main window gets posted
4 - I close the main window down
5 - I close the debugger main window down
6 - GOTO 0

Annoying ... I have found myself getting annoyed before at not being able to clear breakpoints from within Plato, but it was never a real issue until now; I just had to remember to Run-Cancel All Breakpoints from within the debugger. Doesn't work here though Sad(

Andy
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group