Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Is break execution available in GDB under the remote protocol?
@ 2001-04-26 10:01 Stephen Smith
  2001-04-26 10:59 ` Quality Quorum
  2001-04-26 11:09 ` J.T. Conklin
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen Smith @ 2001-04-26 10:01 UTC (permalink / raw)
  To: GDB

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"

Stephen


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is break execution available in GDB under the remote protocol?
  2001-04-26 10:01 Is break execution available in GDB under the remote protocol? Stephen Smith
@ 2001-04-26 10:59 ` Quality Quorum
  2001-04-26 11:09 ` J.T. Conklin
  1 sibling, 0 replies; 3+ messages in thread
From: Quality Quorum @ 2001-04-26 10:59 UTC (permalink / raw)
  To: Stephen Smith; +Cc: GDB

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is break execution available in GDB under the remote protocol?
  2001-04-26 10:01 Is break execution available in GDB under the remote protocol? Stephen Smith
  2001-04-26 10:59 ` Quality Quorum
@ 2001-04-26 11:09 ` J.T. Conklin
  1 sibling, 0 replies; 3+ messages in thread
From: J.T. Conklin @ 2001-04-26 11:09 UTC (permalink / raw)
  To: Stephen Smith; +Cc: GDB

>>>>> "Stephen" == Stephen Smith <ischis2@home.com> writes:
Stephen> I just received and email wondering there is an easy way to
Stephen> cause a process under test to be easily halted.  

Depending on the value of remotebreak, the remote protocol sends
either a ^C or a serial break when ^C is hit at the console.  As
long has the target has an interrupt driven debug channel, it 
should be easy to detect one or the other and stop program execution.

        --jtc

-- 
J.T. Conklin
RedBack Networks


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-26 11:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-26 10:01 Is break execution available in GDB under the remote protocol? Stephen Smith
2001-04-26 10:59 ` Quality Quorum
2001-04-26 11:09 ` J.T. Conklin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox