From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9972 invoked by alias); 28 Jan 2008 10:56:10 -0000 Received: (qmail 9962 invoked by uid 22791); 28 Jan 2008 10:56:09 -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; Mon, 28 Jan 2008 10:55:37 +0000 Received: from ICSMULLER (laocoon.u-strasbg.fr [130.79.112.72]) by ics.u-strasbg.fr (Postfix) with ESMTP id 3E3B618701A; Mon, 28 Jan 2008 12:01:58 +0100 (CET) From: "Pierre Muller" To: "'Joel Brobecker'" , Cc: "'Pedro Alves'" References: <20080126005319.GD21874@adacore.com> In-Reply-To: <20080126005319.GD21874@adacore.com> Subject: RE: Our next GDB release (GDB version 6.8) Date: Mon, 28 Jan 2008 10:56:00 -0000 Message-ID: <000501c8619c$5261e940$f725bbc0$@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-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: 2008-01/txt/msg00282.txt.bz2 I would really like to have the call to __main fixed ! This would allow to get consistent behavior between linux and cygwin/mingw32 for the 'start' command as skip_prologue would really go up to the first real instruction. Pedro proposed a patch for this, http://sourceware.org/ml/gdb-patches/2007-10/msg00361.html which is not perfect in the sense that it is i386 specific, while this should be processor independent. But supporting this for all compilers might require much bigger changes, like adding a processor independent layer to skip_prologue, that would be able to just call process_is_call (CORE_ADDR pc, char *func_name) that would return pc if it is not a call instruction or the CORE_ADDR after the call instruction if pc points to a call instruction, and func_name would return the function name if the call points to a existing function (the second argument type might also be a psymbol struct, or something similar...) This could be used for __main _alloca, but probably also for _mcount for executables containing profiling information. The reason this change is probably much bigger is that it would require to add a new processor_is_call function to the tdep struct, and restructure the skip_prologue. Is it reasonable to hope for inclusion of this patch before the branch? Pierre Muller PS: I would also like my small second patch about BINOP_INTDIV http://sourceware.org/ml/gdb-patches/2008-01/msg00606.html