Hello,
this concerns the first post i made in this forum.
Create new console project with main like this:
int main(void) {
printf("Hello ");
puts("world!");
}
, set a breakpoint on line 'printf("Hello ");' and start the debugger. It doesnt stop on the breakpoint.
When you set a breakpoint on 'puts("world!");', is works [independent whether there is a breakpoint on the printf-line].
The problem is, that you start the program in the debugger using 'start'. [Well, you choose the command according to the m_ManualBreakOnEntry, but it is always true]. It set's one-time breakpoint on the main function -- to be exact, on the first codeline [not on variable declarations] in the main function. The program reaches main, this breakpoint stop the execution and is deleted immediately. Therefore you start debugging by 'start', some queries ['info program'] and a call 'cont'.
But if there is a user-defined breakpoint on the beggining of the main function, it gets passed by! Yout implicit 'cont' jumps over it!
Problem is that if there are more than one breakpoint on one line, GDB stops only once.
Fixing this issue probably wont be easy -- you could start with 'run', but you wouldnt be able to call info program immediately after the debugging.
Or, when a breakpoint of the first codeline of main is detected, you should not call 'cont' immedately after the start. But detecting whether a user-defined breakpoint is on the first codeline of main may be kindof tricky...
What is your idea?