Stepping through working and buggy code simultaniously with gdb
===

I have a C code that has a bug and an older version that does not show the bug. Now, I'd like to use two gdb sessions simultaneously, side by side, to step though the codes. I am looking for a way to do that without having to type, say, `n` in each gdb session. In other words I am looking for a method to link the sessions that when I press a gdb command in one it will be propagated to the other. Can that be done?

Thanks.