Memmove causing program crashes, giving SIGTRAP in GDB(?)

Eliot Moss moss@cs.umass.edu
Thu Feb 26 13:25:53 GMT 2026


On 2/26/2026 6:02 AM, KENNON J CONRAD via Cygwin wrote:

> Thanks for checking and sharing your thoughts.  This is what I would expect, so at least I'm not crazy :)
> I really need to see the values of the registers in memmove, hopefully it's just a matter of continuing to learn gdb.

The command is "info registers", of "info r" for short.  You can also print an
individual register using (say) "print $rax" (prefix the register name by $)
or "info r rax".  If you're stepping, you can set up a *layout* that shows all
the register values as you step along.

You also might consider using a reverse debugging tool like the "undo" debugger.
They track enough information to allow them to (effectively) execute backwards
from a point.  Not sure if any work under cygwin, though.

By the way, I got the commands for printing individual registers with a simple
web search :-) ...

HTH -- Eliot Moss


More information about the Cygwin mailing list