RE: Redhat-devel-list digest, Vol 1 #932 - 1 msg

"Gary Cote" <[email protected]>
Newsgroups gmane.linux.redhat.devel
Message-ID <[email protected]>
X-archive: no


> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of exits funnel
> Sent: Friday, May 30, 2003 1:12 PM
>
> 2)  How can I step out of the method I'm in?  I don't
> mean to force an immediate 'return' but rather to have
> the current method complete, return and leave me just
> beyond this?  For instnace, I have code similar to
> this:
>
> foo( strncpy(a, b, 50), 10 );
>
> I want to debug in foo( ) but when I do a step I end
> up in strncpy and can't get out.
>

When you say step, I'm assuming you're using the "step" command.
Try the next command. It steps over functions instead of stepping into them.

You could place a break point at the top of foo().

Or use the next command to step over strncpy and the step command to
step into foo(). You'll probably need to save the results of strncpy
off into a temp var.

> 3)  How can I specify a break point at some line in
> some source file other than the current one?
>

Syntax is as follows:

b file:line

eg.
b foo.c:1492
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.