hashcat Forum
Debugging - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Developer (https://hashcat.net/forum/forum-39.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-40.html)
+--- Thread: Debugging (/thread-10117.html)



Debugging - ziq - 05-20-2021

Hello. I have a troubles with debugging my kernel. Kernel hasn't pass self-testingĀ and I can't find error in computed values. If I write simply

Code:
const u32 digest32[8] = { ctx.h[0], ctx.h[1], ctx.h[2], ctx.h[3], ctx.h[4], ctx.h[5], ctx.h[6], ctx.h[7] };

printf ("%08x\n", digest32);

I don't get anything in console and log output. How should it look like? Where does printf print?


RE: Debugging - philsmd - 05-20-2021

you can't really print a pointer like this (well actually you could sometimes if you just print the address with %p or similar)


you need to print the single elements/items of the array digest32[0] up to digest32[7]

you also need to make sure that you are debugging correctly with/within the correct kernel function (is it the correct file and function) and furthermore you must of course make sure that the kernels aren't cached (remove the kernels directory or use make clean, before every new test). Several of this important steps (clearing the cache etc) are explained in the dev guide/manual (under docs, hashcat-plugin-development-guide.md).


RE: Debugging - ziq - 05-20-2021

I tried
Code:
make clean && make
and anyway I don't get anything in console output.


RE: Debugging - parasonic666 - 09-21-2021

+1 here

I'm also trying to debug a kernel in current git 6.2.4 version and put some printf() in the code.
However, I cannot see the output on the console, no matter if buidling with DEBUG:1 or not. And yes, the kernel is freshly removed/rebuilt.