* GDB support for 'Run to Line'
@ 2009-04-15 19:57 Marc Khouzam
2009-04-15 19:58 ` Daniel Jacobowitz
2009-04-15 21:22 ` Jan Kratochvil
0 siblings, 2 replies; 4+ messages in thread
From: Marc Khouzam @ 2009-04-15 19:57 UTC (permalink / raw)
To: gdb
Hi,
I'm trying to figure out if GDB has support for the 'Run to Line'
feature
of Eclipse, where the user selects a line and the inferior resumes until
that
line.
GDB's 'until' does not seem to be the right choice since it only stops
if the
location is in the same frame.
GDB's 'advance' is better, but it stops if the current frame exists.
Anything else that I could use to 'run to line' anywhere in the program?
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB support for 'Run to Line'
2009-04-15 19:57 GDB support for 'Run to Line' Marc Khouzam
@ 2009-04-15 19:58 ` Daniel Jacobowitz
2009-04-16 7:00 ` Marc Khouzam
2009-04-15 21:22 ` Jan Kratochvil
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2009-04-15 19:58 UTC (permalink / raw)
To: Marc Khouzam; +Cc: gdb
On Wed, Apr 15, 2009 at 03:48:01PM -0400, Marc Khouzam wrote:
> Hi,
>
> I'm trying to figure out if GDB has support for the 'Run to Line'
> feature
> of Eclipse, where the user selects a line and the inferior resumes until
> that
> line.
>
> GDB's 'until' does not seem to be the right choice since it only stops
> if the
> location is in the same frame.
>
> GDB's 'advance' is better, but it stops if the current frame exists.
Isn't this just tbreak + continue?
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB support for 'Run to Line'
2009-04-15 19:57 GDB support for 'Run to Line' Marc Khouzam
2009-04-15 19:58 ` Daniel Jacobowitz
@ 2009-04-15 21:22 ` Jan Kratochvil
1 sibling, 0 replies; 4+ messages in thread
From: Jan Kratochvil @ 2009-04-15 21:22 UTC (permalink / raw)
To: Marc Khouzam; +Cc: gdb
On Wed, 15 Apr 2009 21:48:01 +0200, Marc Khouzam wrote:
> GDB's 'advance' is better, but it stops if the current frame exists.
>
> Anything else that I could use to 'run to line' anywhere in the program?
If it was a question and not a feature request then:
cat >>~/.gdbinit <<EOH
define runto
tbreak $arg0
cont
end
EOH
Regards,
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: GDB support for 'Run to Line'
2009-04-15 19:58 ` Daniel Jacobowitz
@ 2009-04-16 7:00 ` Marc Khouzam
0 siblings, 0 replies; 4+ messages in thread
From: Marc Khouzam @ 2009-04-16 7:00 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
> > Hi,
> >
> > I'm trying to figure out if GDB has support for the 'Run to Line' feature
> > of Eclipse, where the user selects a line and the inferior resumes until
> > that line.
> >
> > GDB's 'until' does not seem to be the right choice since it only stops
> > if the location is in the same frame.
> >
> > GDB's 'advance' is better, but it stops if the current frame exists.
>
> Isn't this just tbreak + continue?
Problem is that if another breakpoint is hit first, this temporary one
will remain and will hit later, unexpectedly to the user. I would have to remove
that temp bp myself in that case.
Of course, one way to do run to line is to disable all other bps until that line is reached.
This is a preference in Eclipse, so I have to support both ways.
Now, with non-stop, I don't think disabling all bps (even for a short while) is a good
idea anymore. I would need to disable all bps for a particular thread only. I don't think
GDB allows me to do this. This was doing to be a future question of mine on the list :-)
But if tbreak + continue + cleanup is my best option, that is what I'll look into.
Thanks
Marc
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-16 0:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-15 19:57 GDB support for 'Run to Line' Marc Khouzam
2009-04-15 19:58 ` Daniel Jacobowitz
2009-04-16 7:00 ` Marc Khouzam
2009-04-15 21:22 ` Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox