Patch #1855 2007-01-25 15:16
domen
initialisation of variable on debugging start- Download
- 1855-initialisation.patch (401 bytes)
--- src/plugins/debuggergdb/gdb_driver.cpp 2007-01-25 16:11:54.000000000 +0100
+++ src/plugins/debuggergdb/gdb_driver.cpp 2007-01-25 16:15:38.000000000 +0100
@@ -375,7 +375,7 @@
}
#else
m_BreakOnEntry = breakOnEntry;
- m_ManualBreakOnEntry = true;
+ m_ManualBreakOnEntry = false;
if (!Manager::Get()->GetConfigManager(_T("debugger"))->ReadBool(_T("do_not_run"), false))
{
History
What is the reason for changing this variable's initial value? Is it too much to ask for a description?
Sorry complitely forgot to comment.
Without this wariable changed the program starts running automaticaly (even with don't start running the program or something like that set in debugging options) and stops at the first breakpoint for e.g. at the beginning of main function. This prevents us from debugging the part before main function - that part of code starts running on the start vector initialises some stuff and jumps to main function.
This change enables the debugger to wait on the reset vector untill you tell him to start running.
OK, I think you got something wrong.
m_ManualBreakOnEntry is an internal variable used by the driver to know if it was itself that caused the first breakpoint to hit. This is done so the driver can gather info about the program and then continue running it as normal (hitting any user breakpoints, etc).
With this patch this behavior breaks...
Have you tried starting the debugger using the "step into" command?
If this doesn't work as you expect, we should maybe look at adding a new command in the "Debug menu" to start debugging the way you want it to work.
When I wrote this patch I debugged C::B and came to this part of code and found out that it crushes because of this. Then I have seen that with a version of C::B that hasn't been patched with a patch that switched the parts which of those codes is used in Linux and which in Windows (those defines in the src), it doesn't crush. So I have changed the variable to the way it was written in the Windows(before Linux) section and it worked again.
Unfortunately I don't work for the company that wanted this anymore so I don't have access to the hardvare.
Since this patch breaks C::B and that company can still apply the patch whenever they want, I think that it should be deleted.