{"id":5134,"date":"2014-03-30T19:07:00","date_gmt":"2014-03-30T19:07:00","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/gdb-is-showing-1-thread-in-non-threaded-application-collection-of-common-programming-errors\/"},"modified":"2014-03-30T19:07:00","modified_gmt":"2014-03-30T19:07:00","slug":"gdb-is-showing-1-thread-in-non-threaded-application-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/gdb-is-showing-1-thread-in-non-threaded-application-collection-of-common-programming-errors\/","title":{"rendered":"GDB is showing 1 Thread in non threaded application-Collection of common programming errors"},"content":{"rendered":"<p>I was debugging my app with gdb. I used break main So it can break when main is called. Know if I use <code>thread info<\/code> it shows that thread count is 1.<\/p>\n<p>How a thread is starting before main ? I don&#8217;t have any thread call in my call so from where thread is getting created. I am using these libs<\/p>\n<blockquote>\n<p>sqlite , curl , pcre , c-client<\/p>\n<\/blockquote>\n<p>Update I have written a sample program to test that if all program start with single thread<\/p>\n<pre><code> #include\nint main(int argc,char *argv[]){\n  std:: cout<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I was debugging my app with gdb. I used break main So it can break when main is called. Know if I use thread info it shows that thread count is 1. How a thread is starting before main ? I don&#8217;t have any thread call in my call so from where thread is getting [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5134","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5134"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5134\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}