Sourceware Bugzilla – Bug 3364
[tracker] fstep - single step a program printing instructions, and possible file/line information et.al.
Last modified: 2008-06-11 20:04:40 UTC
fstep <program> <args> ...
Runs <program> printing each instruction as it is executed.
Once this is basically working, state should change to suspended, and bugs
against this made blockers to it.
Created attachment 1392 [details]
Attached a simple start of fstep.
Initial fstep checked in.
The following things can/should be improved:
- It is currently build right on top of the Instruction TaskObserver. It
might be better to build it on top of the new rt framework. The rt
framework can probably also handle stepping over locking sequences like
on ppc (lwarx/stwcx).
- It only steps the main task. Plumbing is in place to track other
Tasks, but nothing is connected to that yet.
- Maybe merge it completely with ftrace?
- It is partially so slow because it accesses the Task memory for every
disassambly. Maybe that can be cached? Although instruction stepping is
just slow in general. An alternative could be combining stepping with
breakpoints set on "interesting functions". Or only stepping while in
the main program map, and not in any of the shared library maps?
- It could give the name of the memory map the PC is currently in.
- It could even give the source/line-number if available.
No longer working on fstep. As pointed out in comment #4 it would be nice to
fold this into ftrace.