Hi
I'm think I'm having some problem with pointers.....
namely passing them around...Or I think ? I've used
gdb to find the following (note conn is of type MYSQL *conn).
Program received signal SIGSEGV, Segmentation fault.
0x804a53e in get_next_chunk (conn=Error accessing memory address 0xbf000a38:
Bad address.
) at fmysql.c:315
Is what I'm doing correct below. Also is there any programs or tips to
debug pointers (ie checking values, tracing). Any tips or pointers (no pun
intended) would be greatly appreciated.
Here's what I doing ...
functionA( MYSQL *conn){
struct connect conninfo;
/* Is this correct */
conninfo.conn = conn;
/* then the conninfo is then passed to a thread */
pthread_create(.....,NULL,&somefunction,(void *)&conninfo )
}
struct connect{
MYSQL *conn;
int var1;
int var2;
};