[OpenSIPS-Devel] trying to examine presence/timer crash
Juha Heinanen
jh at tutpro.com
Sun Sep 26 14:56:05 CEST 2010
i tried to figure out why i'm getting the presence/timer crashes, but
don't know how to access the argument value of a function.
(gdb) where
#0 0xb758e3e3 in db_mysql_val2bind (v=0xbfcbdf3c, binds=0x8188190, i=1)
at val.c:274
#1 0xb758993e in db_mysql_do_prepared_query (conn=<value optimized out>,
v=<value optimized out>, n=2, uv=0x0, un=0, query=<value optimized out>)
at dbase.c:443
#2 0xb758b0dd in db_mysql_delete (_h=0x817c1a0, _k=0xbfcbdf70,
_o=0xbfcbdf64, _v=0xbfcbdf28, _n=2) at dbase.c:893
#3 0xb723dea4 in msg_watchers_clean (ticks=3600, param=0x0)
at subscribe.c:484
#4 0x080b64cf in timer_ticker () at timer.c:325
#5 run_timer_process () at timer.c:395
#6 start_timer_processes () at timer.c:475
#7 0x08069ea3 in main_loop (argc=16, argv=0xbfcbe134) at main.c:867
#8 main (argc=16, argv=0xbfcbe134) at main.c:1388
i would like know what struct db_val_t* argument v of of
db_mysql_do_prepared_query function contains:
static int db_mysql_do_prepared_query(const db_con_t* conn, const str *query,
const db_val_t* v, int n, const db_val_t* uv, int un)
i go to frame 1
(gdb) frame 1
#1 0xb758993e in db_mysql_do_prepared_query (conn=<value optimized out>,
v=<value optimized out>, n=2, uv=0x0, un=0, query=<value optimized out>)
at dbase.c:443
443 if (db_mysql_val2bind( v+i , mysql_bind, i)<0 ) {
and check args:
(gdb) info args
conn = <value optimized out>
v = <value optimized out>
n = 2
uv = 0x0
un = 0
query = <value optimized out>
(gdb) whatis v
type = const db_val_t *
but when i try to print type field of first v value, i get an error:
(gdb) print v->type
Cannot access memory at address 0x0
same for other fields of v.
what is it that i'm doing wrong?
-- juha
More information about the Devel
mailing list