Unix Programming - GDB help

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > March 2006 > GDB help





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author GDB help
novice

2006-03-13, 2:48 am

While using GDB if i am inside a for loop which
will repeat for 255 times and i want to jump to
the line next to for loop, then what's the command.
Thanks in advance for those who reply.

Andrei Voropaev

2006-03-13, 2:48 am

On 2006-03-13, novice <novice.sam@gmail.com> wrote:
> While using GDB if i am inside a for loop which
> will repeat for 255 times and i want to jump to
> the line next to for loop, then what's the command.


The simplest way. Set breakpoint on the desired command, and then hit
'c'.


--
Minds, like parachutes, function best when open
Madhav

2006-03-13, 2:48 am

novice wrote:
> While using GDB if i am inside a for loop which
> will repeat for 255 times and i want to jump to
> the line next to for loop, then what's the command.
> Thanks in advance for those who reply.


at the gdb prompt, just say

gdb> b <line_no_after_the_loop>

That will take you to the line after the loop.

Madhav

2006-03-13, 2:48 am

Madhav wrote:
> novice wrote:
>
> at the gdb prompt, just say
>
> gdb> b <line_no_after_the_loop>
>
> That will take you to the line after the loop.


and after that you have to use "continue" as Andrie pointed out.

Bjorn Reese

2006-03-13, 7:51 am

novice wrote:
> While using GDB if i am inside a for loop which
> will repeat for 255 times and i want to jump to
> the line next to for loop, then what's the command.


(gdb) help until
Execute until the program reaches a source line greater than the current
or a specified location (same args as break command) within the current
frame.

--
mail1dotstofanetdotdk
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com