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

[no subject]



clone() is the system call to Linux to create a thread.  I knew
that pthreads did this.  My thought was that there was a reason
why pthreads was able to allow GDB to function and then a program
that just uses clone() does not.  

Have you issued the GDB thread commands?

<a  rel="nofollow" href="http://www.delorie.com/gnu/docs/gdb/gdb_25.html";>http://www.delorie.com/gnu/docs/gdb/gdb_25.html</a>



On Tue, 2005-04-12 at 15:50, pras at cycloeastern.com wrote:
&gt; You might be onto something here !!!
&gt; 
&gt; #0  0x02c399d0 in clone () from /lib/tls/libc.so.6
&gt; #1  0x002a68d7 in do_clone () from /lib/tls/libpthread.so.0
&gt; #2  0x002a6526 in create_thread () from /lib/tls/libpthread.so.0
&gt; #3  0x002a5f87 in pthread_create@@GLIBC_2.1 () from /lib/tls/libpthread.so.0
&gt; #4  0x002a601c in pthread_create at GLIBC_2.0 () from /lib/tls/libpthread.so.0
&gt; #5  0x002edf3a in VISThread::_create_thread () from /usr/BDP/lib/libvport_r.so
&gt; #6  0x002ee0bc in VISThread::run () from /usr/BDP/lib/libvport_r.so
&gt; #7  0x013f9588 in VISManager::cleanup () from /usr/BDP/lib/liborb_r.so
&gt; #8  0x013fa063 in VISManager::sig_handler () from /usr/BDP/lib/liborb_r.so
&gt; #9  0x013fa4a1 in VISThreadSignal::begin () from /usr/BDP/lib/liborb_r.so
&gt; #10 0x002ec749 in VISThread::_start () from /usr/BDP/lib/libvport_r.so
&gt; #11 0x002a5dec in start_thread () from /lib/tls/libpthread.so.0
&gt; #12 0x02c39a2a in clone () from /lib/tls/libc.so.6
&gt; 
&gt; Here is my stack.
&gt; 
&gt; It appears as though pthreads use close as well ?
&gt; 
&gt; 
&gt; 
&gt; On Tue, Apr 12, 2005 at 12:21:14PM -0400, Christopher Fowler wrote:
&gt; &gt; Are you using clone() to do threads.  A friend and I had a similar
&gt; &gt; problem last week.  However he just started his program and we
&gt; &gt; chose to use pthreads instead of clone() directly.  When we did that
&gt; &gt; He was able to debug the threads.  For some reason GDB would go stupid
&gt; &gt; when we just used clone().  We did not have time to figure out why.
&gt; &gt; 
&gt; &gt; 
&gt; &gt; On Tue, 2005-04-12 at 12:29, pras at cycloeastern.com wrote:
&gt; &gt; &gt; All,
&gt; &gt; &gt; 
&gt; &gt; &gt; I work for a company in that has started using Linux for one of its projects
&gt; &gt; &gt; that has traditionally in the past been running on all other big iron *nixes.
&gt; &gt; &gt; 
&gt; &gt; &gt; We just got our first build on RH Enterprise Linux AS release 3 (Taroon Update 4),
&gt; &gt; &gt; and gdb attemptys fail miserably.
&gt; &gt; &gt; 
&gt; &gt; &gt; Background info:
&gt; &gt; &gt; 
&gt; &gt; &gt; The product is written in C/C++ and is compiled with gcc 3.2.3
&gt; &gt; &gt; The gdb version is as follows:
&gt; &gt; &gt; GNU gdb Red Hat Linux (6.1post-1.20040607.52rh)
&gt; &gt; &gt; 
&gt; &gt; &gt; I am able to attach to a process and see the stack using backtrace or bt. frame command
&gt; &gt; &gt; works and even break command works.
&gt; &gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; When I try to do a 'cont', the server process which is supposed to execute continuously exists normally.
&gt; &gt; &gt; 
&gt; &gt; &gt; This is what I see
&gt; &gt; &gt; 
&gt; &gt; &gt; (gdb) cont
&gt; &gt; &gt; Continuing.
&gt; &gt; &gt; [New Thread -1245635664 (LWP 8226)]
&gt; &gt; &gt; [Thread -1220756560 (LWP 7953) exited]
&gt; &gt; &gt; 
&gt; &gt; &gt; Program exited normally.
&gt; &gt; &gt; (gdb)
&gt; &gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; Do you guys know what might be going wrong ?
&gt; &gt; 
&gt; &gt; _______________________________________________
&gt; &gt; Ale mailing list
&gt; &gt; Ale at ale.org
&gt; &gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00259" href="msg00259.html">[ale] GDB problem on RH AS 3</a></strong>
<ul><li><em>From:</em> pras at cycloeastern.com (pras at cycloeastern.com)</li></ul></li>
<li><strong><a name="00261" href="msg00261.html">[ale] GDB problem on RH AS 3</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
<li><strong><a name="00268" href="msg00268.html">[ale] GDB problem on RH AS 3</a></strong>
<ul><li><em>From:</em> pras at cycloeastern.com (pras at cycloeastern.com)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00268.html">[ale] GDB problem on RH AS 3</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00270.html">[ale] mailto is not a registered protocol......HUH ?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00268.html">[ale] GDB problem on RH AS 3</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00263.html">[ale] rackmount stuff</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00269"><strong>Date</strong></a></li>
<li><a href="threads.html#00269"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>