Hi~~ I got some problem when I’m using cuda-gdb, here is my code.
__device__ static domino_set_key(char *key,int saved_key_len, unsigned char * salt_and_digest)
{
unsigned char *offset = salt_and_digest+6;
unsigned char key_digest[DIGEST_SIZE];
domino_big_md((unsigned char*)key,saved_key_len,key_digest);
...
}
__global__ void domino_crack(unsigned char *glb_salt_and_digest, cipher_binary_struct *cipher_binary, unsigned int *calNum)
{
...
char key[TEST_SIZE] = {'1','2','3','4','5'};
unsigned char salt_and_digest[40];
for(int i = 0; i < 40; i++)
{
salt_and_digest[i] = glb_salt_and_digest[i];
}
...
dominosec_set_key(key,TEST_SIZE,salt_and_digest);
...
}
In the kernel, I set the char array salt_and_digest and key, and pass the pointer to dominosec_set_key,but when I try to print key and salt_and_digest in dominosec_set_key,I got the following error:
warning: Variable is not live at this point. Returning garbage value.
$4 = 0xfffb3000000000 <Address 0xfffb3000000000 out of bounds>
Can someone tell me what might be the reason?
Thank you in advance!