From: Daniel Jacobowitz <drow@false.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit] Ignore SEGVs from win32 IsBad* functions
Date: Sun, 27 Mar 2005 15:42:00 -0000 [thread overview]
Message-ID: <20050327154340.GA22694@nevyn.them.org> (raw)
In-Reply-To: <01c532bb$Blat.v2.4$589bb600@zahav.net.il>
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 <cgf@gnu.org>
> >
> > + {
> > + 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
next prev parent reply other threads:[~2005-03-27 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-27 5:21 Christopher Faylor
2005-03-27 10:56 ` Eli Zaretskii
2005-03-27 15:42 ` Daniel Jacobowitz [this message]
2005-03-27 19:31 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050327154340.GA22694@nevyn.them.org \
--to=drow@false.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox