Silverfrost Forums

Welcome to our forums

Inconsistent results when Pause-ing sdbg

3 Aug 2005 10:49 #252

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

5 Aug 2005 8:50 #260

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 😦(

Andy

Please login to reply.