From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12553 invoked by alias); 4 Apr 2006 23:02:19 -0000 Received: (qmail 12544 invoked by uid 22791); 4 Apr 2006 23:02:19 -0000 X-Spam-Check-By: sourceware.org Received: from dsl027-180-168.sfo1.dsl.speakeasy.net (HELO sunset.davemloft.net) (216.27.180.168) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 04 Apr 2006 23:02:17 +0000 Received: from localhost ([127.0.0.1] ident=davem) by sunset.davemloft.net with esmtp (Exim 4.60) (envelope-from ) id 1FQuXb-000321-TL for gdb@sources.redhat.com; Tue, 04 Apr 2006 16:02:27 -0700 Date: Tue, 04 Apr 2006 23:02:00 -0000 Message-Id: <20060404.160227.69457417.davem@davemloft.net> To: gdb@sources.redhat.com Subject: Unreasonable expectation in gdb.base/break.exp From: "David S. Miller" Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00021.txt.bz2 When compiled with optimizations enabled, this testcase expects that stopping at main() will result in the place being somewhere within the source file of main(). This is not necessarily the case. In my case on sparc-*-linux*, the instruction that starts main() in this situation is part of the inline expansion of strtol(), via the inline expansion of atoi(), in the stdlib.h header file so that is the place GDB reports that it is at when the breakpoint on main() is hit. This causes the break.exp testcase to fail. I think this is perfectly reasonable and correct behavior on both gdb's and gcc's part, and this check in break.exp should be made a little bit more leanient. Any objections?