Re: gdb single stepping takes ages
Luis Machado <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 06/18/2014 08:24 AM, Tim Sander wrote:
> Hi
>
> I am currently using openocd as a gdbserver backend for debugging an embedded
> target with gdb 7.7. When i want to step over a single line with -exec-next:
>
> for(int a=0; a<1000000;a++){ };
>
> the time taken for the step is linear to the maximum count number and takes in
> my setup about 1 second for one increment of a. Setting a temp breakpoint in
> the next line and continuing works much faster.
>
> So is there a way improve the stepping speed in such situations?
>
> Best regards
> Tim
>
>
In that case i'd use "until <line number>" to skip the loop. Stepping
through the loop *will* take a long time since GDB instruction-steps its
way out of there (for reasons explained in the Remote Debugging mail you
mentioned in the other mail).
Luis