From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28283 invoked by alias); 15 Nov 2009 19:04:52 -0000 Received: (qmail 28194 invoked by uid 22791); 15 Nov 2009 19:04:51 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 15 Nov 2009 19:03:47 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAFJ3jB2026816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 15 Nov 2009 14:03:46 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAFJ3hmu007990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 15 Nov 2009 14:03:45 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id nAFJ3h0m001174; Sun, 15 Nov 2009 20:03:43 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id nAFJ3gnY001172; Sun, 15 Nov 2009 20:03:42 +0100 Date: Mon, 16 Nov 2009 06:36:00 -0000 From: Jan Kratochvil To: ranjith kumar Cc: gdb@sourceware.org Subject: Re: changing gdb's behaviour on breakpoints Message-ID: <20091115190342.GA970@host0.dyn.jankratochvil.net> References: <31cff80d0911151045r710d2c20k5fb2c9f4d5a86f55@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31cff80d0911151045r710d2c20k5fb2c9f4d5a86f55@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00149.txt.bz2 On Sun, 15 Nov 2009 19:45:30 +0100, ranjith kumar wrote: > 1) We know that when the program( being debugged by gdb) hits a > breakpoint, the execution of the program > will be stopped and gdb will displays a message like > > " Breakpoint 2829, process_event () at event-loop.c:298 > 298 if (check_async_ready ()) > (top-gdb) " > > and gdb waits for input from the user. > > Is is possible to change this behaviour? > I want gdb to just display the message, but not to wait for the input > from the user, and must continue the > program automatically. + > 2) I have gdb's sorce code. Which function of gdb's source code will > be called when the program hits a brakpoint? > Which function of gdb's source code will be called when gdb continues > the program? Yes, see: $ info '(gdb)Break Commands' > 3) By the way is the 'gdb' single threaded program? If not please tell > me when it will create other threads? gdb itself it singlethreaded but it handles multithreaded debuggees fine. Getting gdb itself multithreaded could bring better performance on multicore hosts in some cases but it will bring no new functionality. Making gdb itself multithreaded has various blockers due to its internal infrastructure. Regards, Jan