Reverse-engineering tools like cutter/iaito are perfect for analyzing/debugging x86 code, with powerful features like trace sessions that allows debugging both forwards and backwards.
Readers/students/TAs will be greatly empowered by such tools and have a much easier time debugging compiler output compared to dealing with GDB directly.
An example of tracing, continuing to a breakpoint, then stepping backwards:
Reverse-engineering tools like cutter/iaito are perfect for analyzing/debugging x86 code, with powerful features like trace sessions that allows debugging both forwards and backwards. Readers/students/TAs will be greatly empowered by such tools and have a much easier time debugging compiler output compared to dealing with GDB directly. An example of tracing, continuing to a breakpoint, then stepping backwards: