NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Attaching gdb session to a service launched from rc.d



On 1/25/19 4:59 PM, Germain wrote:
I was not seeing all my threads (but one double, instead of the main one)

Hi,


So I am still on that; and this is still happening.

Basically:

I have a service that runs three threads.

When I attach a debugger session to it, I see two of them being a `identical'.

There call stack are exactly the same, even though the software is designed to have all of them different.


I was doubting my own code so what I did was inspect the address of a local variable in each call stack to verify that it was identical.


(gdb) thr 1
[Switching to thread 1 (LWP 1)]
#0  0x00007d9e5e43e52a in accept () from /usr/lib/libc.so.12
(gdb) frame 3
#3  0x00007d9e5f004b5d in Forward () at forward.cpp:144
(gdb) p &ipAddress
$1 = (char (*)[16]) 0x7d9e5d7efe50
(gdb) thr 2
[Switching to thread 2 (LWP 3)]
#0  0x00007d9e5e43e52a in accept () from /usr/lib/libc.so.12
(gdb) frame 3
#3  0x00007d9e5f004b5d in Forward () at forward.cpp:144
(gdb) p &ipAddress
$2 = (char (*)[16]) 0x7d9e5d7efe50
(gdb) l
139
140            else
141            {
142                SocketFwd = Server(frwdprt, time_out);
143                char ipAddress[INET_ADDRSTRLEN];
144                ssl = Accept(SocketFwd, frwd_ssl_cntx, ipAddress);
145
146                if (    stop    )
147
148                    break    ;


-bash-4.4$  uname -a
NetBSD germ 8.0_RC1 NetBSD 8.0_RC1 (GENERIC) #0: Sat May 12 10:44:25 UTC 2018 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64


I am thinking of just upgrading the whole system,


Germain



Home | Main Index | Thread Index | Old Index