This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dwarf, step over


John Smith <ds0163@gmail.com> writes:

> Im working on a C source level debugger. The debug info available in elf
> format. How could be 'step over' implemented?
> The problem is at 'Point1', anyway I can wait for the
> next source line (reading it from the .debug_line table).
>
> Thanks
>
>
> ...
> if (a == 1)
>  x = 1; //Point1
> else if (a == 2)
>  x = 1;
>
> z = 1;
> ...

This question is not appropriate for the gcc@gcc.gnu.org mailing list,
which is for the developers of gcc.

I really don't know where to ask questions about developing a debugger.

If I were writing a debugger, I would probably just single step until
the debug info indicated that I had entered a different line number.
But that might be too slow.  I don't know what actual debuggers do.
Fortunately you can simply look at the source code for gdb to see what
it does.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]