There are guides available. Search for ‘Linux kernel debugging’ or ‘Linux module debugging’, depending on which you are more interested in. And, of course, learn about the relevant parts of the kernel.
You might have a look at Debugging kernel and modules via gdb¶. The kernel.org site has a wealth of information.
I’m not running your configuration so can’t tell you with the assurance that I have it working but Forwarding ports with firewalld appears to address port forwarding to rootless podman using firewalld. If that doesn’t work for you you might need to clarify what your firewalld configuration is that obscures the client IP. I wouldn’t expect a simple port mapping to affect IP address.