From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23790 invoked by alias); 27 Mar 2005 15:42:56 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 23769 invoked from network); 27 Mar 2005 15:42:51 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 27 Mar 2005 15:42:51 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DFZvQ-0005uV-Jj; Sun, 27 Mar 2005 10:43:40 -0500 Date: Sun, 27 Mar 2005 15:42:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [commit] Ignore SEGVs from win32 IsBad* functions Message-ID: <20050327154340.GA22694@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , gdb-patches@sourceware.org References: <20050327052052.GA23610@coe.casa.cgf.cx> <01c532bb$Blat.v2.4$589bb600@zahav.net.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01c532bb$Blat.v2.4$589bb600@zahav.net.il> User-Agent: Mutt/1.5.6+20040907i X-SW-Source: 2005-03/txt/msg00362.txt.bz2 On Sun, Mar 27, 2005 at 12:53:25PM +0200, Eli Zaretskii wrote: > > Date: Sun, 27 Mar 2005 00:20:52 -0500 > > From: Christopher Faylor > > > > + { > > + char *fn; > > + if (find_pc_partial_function ((CORE_ADDR) current_event.u.Exception > > + .ExceptionRecord.ExceptionAddress, > > + &fn, NULL, NULL) > > + && strncmp (fn, "KERNEL32!IsBad", strlen ("KERNEL32!IsBad")) == 0) > > + return 0; > > + } > > Nitpicking: won't it be cleaner to have a single string > "KERNEL32!IsBad", instead of mentioning it twice, and to use sizeof > instead of strlen? The only thing this saves you is the chance of typos; recent GCC versions will not only combine the strings, but also fold strlen to a constant. -- Daniel Jacobowitz CodeSourcery, LLC