Anyone using efficient algorithm or HW support for NEXT/STEP?
Wendy Peikes
wendyp@cisco.com
Fri Sep 27 14:05:00 GMT 2002
Here at Cisco, we've gotten both the host (started with gnu gdb 5.0)
and target gdb working for arm-elf.
(Note: I'd be glad to answer any questions about the arm gdb host
side and help with target-side questions)
We're (my target-side colleague and myself) are wondering if someone
is using a better algorithm for the NEXT and STEP commands:
Our gdb's single stepping is very slow. Current implementation (A)
(Note: applies, in general, to all platforms, not just to arm):
1- restore user installed breakpoints
2- command to single step.
3- ack and set temp breakpoint(s).
For arm, sets two temp breakpoints on branches and function calls;
one at the destination and one at next instruction. These cover
conditional execution either way it may go.
4- exception signal
5- remove breakpoints
6- collect regs to see where we are.
7- if still between start addr and stop addr, repeat,
if == stop addr: stop
8 - if in another function, determine return addr and
set breakpoint there
9 - continue
10 - go to 4
When it could be more efficient, simpler, and more robust to do B:
1- restore user installed breakpoints
2- set a temp breakpoint at stop addr
3 - continue
4- exception signal
5- collect regs and display where we are
Is anyone out there using a more efficient algorithm similar to B?
Also, is anyone using hardware single-stepping or hardware-assisted
stepping? For which platforms?
Thank you much for your help,
Wendy Peikes
Cisco Systems
Software Tools Group
GDB Support
More information about the Gdb
mailing list