--On Thursday, May 13, 2004 21:26:50 -0400 Tom Lane <[EMAIL PROTECTED]> wrote:

Larry Rosenman <[EMAIL PROTECTED]> writes:
I ran a quick C test:

Where does it leave the "ptr" pointing to?

$ cc -O -o test3 test3.c $ ./test3 num=nan errno=0 ptr=8049682, points to N num=inf errno=0 ptr=8049686, points to f $ cat test3.c #include <stdlib.h> #include <stdio.h> #include <errno.h> int main(int argc,char **argv) { double num; char *input="NaN"; char *border1="/////////////////////////////"; char *input2="inf"; char *border2="/////////////////////////////"; char **ptr;

 num=strtod(input,ptr);
 printf("num=%g\n",num);
 printf("errno=%ld\n",errno);
 printf("ptr=%p, points to %s\n",*ptr,*ptr);
 num=strtod(input2,ptr);
 printf("num=%g\n",num);
 printf("errno=%ld\n",errno);
 printf("ptr=%p, points to %s\n",*ptr,*ptr);
 exit(0);
}
$



So, how's the easiest way to trace PG's float4in stuff?

gdb is my favorite ...

and (without installing it), how can I grab gdb on the gmake test backend(s)?



--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Attachment: pgp00000.pgp
Description: PGP signature



Reply via email to