From: | Larry Rosenman <ler(at)lerctr(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] threads stuff/UnixWare |
Date: | 2004-05-14 01:31:29 |
Message-ID: | 68A93766DBACF6902C84FAA4@lerlaptop.lerctr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
--On Thursday, May 13, 2004 21:26:50 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:
> Larry Rosenman <ler(at)lerctr(dot)org> 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: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-05-14 01:35:43 | Re: [HACKERS] threads stuff/UnixWare |
Previous Message | Tom Lane | 2004-05-14 01:26:50 | Re: [HACKERS] threads stuff/UnixWare |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-05-14 01:35:43 | Re: [HACKERS] threads stuff/UnixWare |
Previous Message | Tom Lane | 2004-05-14 01:26:50 | Re: [HACKERS] threads stuff/UnixWare |