A
aki
Hello ,
i have hell lot no of ways to do this, but all in vain.
let me tell what exactly i want to do .
I have a function int reportError(char *errorFormatString,
unsigned char *GT1_p,
unsigned int GT1_length,
unsigned char *GT2_p,
unsigned int GT2_length)
During execution , using gdb i can see its arguments values as :
reportError (errorFormatString=0x2b5d309c4140 "Failed to extract
NDC from GT %s to prefix %s",
GT1_p=0x612b5e "Dy\003\t2\020ÿÿ\a", GT1_length=8,
GT2_p=0x7fff8d26f030 "I\231\020", GT2_length=9)
Using gdb i can see
Value at GT2 address ie GT2_p
(gdb) x /3 0x7fff8d26f030
0x7fff8d26f030: 0x00109949 0x40302200 0x1f78d30f
So it shows the value is 49991000002230400f (byte swapped and lenght
is 9 ie 18 bytes or 18 characters)
Value at GT1 address ie GT1_p
(gdb) x /3 0x612b5e
0x612b5e: 0x09037944 0xffff1032 0x00000007
So it shows the value is 447903093210ffff (byte swapped and lenght
is 8 ie 16 bytes or 16 characters)
I want to store GT2 value 49991000002230400f and GT1 value
447903093210f in errorFormatString .
as below
"Failed to extract NDC from GT 447903093210 to prefix
49991000002230400f "
Can somebody suggest a way to do this .
Thanks in Advance.
Aki
i have hell lot no of ways to do this, but all in vain.
let me tell what exactly i want to do .
I have a function int reportError(char *errorFormatString,
unsigned char *GT1_p,
unsigned int GT1_length,
unsigned char *GT2_p,
unsigned int GT2_length)
During execution , using gdb i can see its arguments values as :
reportError (errorFormatString=0x2b5d309c4140 "Failed to extract
NDC from GT %s to prefix %s",
GT1_p=0x612b5e "Dy\003\t2\020ÿÿ\a", GT1_length=8,
GT2_p=0x7fff8d26f030 "I\231\020", GT2_length=9)
Using gdb i can see
Value at GT2 address ie GT2_p
(gdb) x /3 0x7fff8d26f030
0x7fff8d26f030: 0x00109949 0x40302200 0x1f78d30f
So it shows the value is 49991000002230400f (byte swapped and lenght
is 9 ie 18 bytes or 18 characters)
Value at GT1 address ie GT1_p
(gdb) x /3 0x612b5e
0x612b5e: 0x09037944 0xffff1032 0x00000007
So it shows the value is 447903093210ffff (byte swapped and lenght
is 8 ie 16 bytes or 16 characters)
I want to store GT2 value 49991000002230400f and GT1 value
447903093210f in errorFormatString .
as below
"Failed to extract NDC from GT 447903093210 to prefix
49991000002230400f "
Can somebody suggest a way to do this .
Thanks in Advance.
Aki