This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Is break execution available in GDB under the remote protocol?




On Thu, 26 Apr 2001, Stephen Smith wrote:

> I just received and email wondering there is an easy way to cause a process under test to be easily halted.  For
> example, let's say that I have a
> fragment of code:
> 
> {
>      SomeOtherDevelopersCode();
> 
>      /* my code that I want to debug starts here*/
>     for( i = 0; i < 23; i++ )
>    {
>         /*   I will set my breakpoint on the next line */
>          DoSomethingHere( i );
>    }
> }
> 
> The problem is that the other developer may have made a change (and in this case did)  that causes
> SomeOtherDevelopersCode() to go into a tight loop.
> In this case assume (it is true) that SomeOtherDevelopersCode() is multithreaded and so just tracing in isn't practical.
> 
> Is there a command I can run (at the console is fine) that well suspend the process under test so that I can see were
> the code is executing easily.
> 
> As the user said: " ... This reminded me of a feature that is in the much hated Microsoft Visual Studio debugger called
> break execution"

What about ^C ? Usually it works fine for host debugging and most people
support it in the gdb stubs in case of remote debugging.

> 
> Stephen
> 

Thanks,

Aleksey



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]