From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 412 invoked by alias); 29 Jan 2008 07:51:46 -0000 Received: (qmail 401 invoked by uid 22791); 29 Jan 2008 07:51:45 -0000 X-Spam-Check-By: sourceware.org Received: from ics.u-strasbg.fr (HELO ics.u-strasbg.fr) (130.79.112.250) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Jan 2008 07:51:26 +0000 Received: from ICSMULLER (unknown [130.79.244.152]) by ics.u-strasbg.fr (Postfix) with ESMTP id ECE6318701F; Tue, 29 Jan 2008 08:57:46 +0100 (CET) From: "Pierre Muller" To: "'Pedro Alves'" , "'gdb-patches'" References: <479EB897.5030603@portugalmail.pt> In-Reply-To: <479EB897.5030603@portugalmail.pt> Subject: RE: skip __main Date: Tue, 29 Jan 2008 08:50:00 -0000 Message-ID: <000f01c8624b$c284ee20$478eca60$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00671.txt.bz2 Hi Pedro! Thanks for resubmitting this. The problem for me is that I am currently unable to do a testsuite on cygwin, the test stays forever on gdb.threads/manythreads.exp test and the timeout does not seem to work there :( Concerning your patch: I would suggest one change: instead of using hard coded "main" name, you should use the main_name function from symtab.c source defined in symtab.h I am not really sure this is useful, (the modified main_name for GNU pascal compiler does not contain a call to __main), but it seems more logical to me. Pierre > -----Original Message----- > From: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] On Behalf Of Pedro Alves > Sent: Tuesday, January 29, 2008 6:25 AM > To: Pierre Muller; gdb-patches > Subject: skip __main > > Hi all, Pierre, > > Here's the much smaller patch I mentioned at gdb@. > > This version is about as small as it can get. First the prologue is > analysed and skipped, then line info is used to get at the first line > of user code in the function. If the function is called "main" (humm, > I shall move that into the callback, as I believe the place where > __main/__gccmain is emitted is configurable on the gcc side), call a > gdbarch method that skips the __main call. Works OK as long as nothing > is scheduled into before the __main call. That means that it should > work OK at -O0, which is enough for fixing the runto_main problems in > the testsuite. Then again, debugging code with .stabs debug info at > anything but -O0 is not pleasant anyway. > > Last time I looked at the results, it uncovered other more serious > problems, so it was a win just for that fact. > > I'm starting an overnight testrun on Cygwin, as the last time I did > that was a couple of months back. > > Any comments? Suggestions for a better gdbarch callback name? > > -- > Pedro Alves