From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [patch] cleanup: Remove INVALID_ENTRY_POINT (+FR-V modification)
Date: Sat, 31 Oct 2009 15:41:00 -0000 [thread overview]
Message-ID: <200910311542.13318.pedro@codesourcery.com> (raw)
In-Reply-To: <20091031150829.GA27608@host0.dyn.jankratochvil.net>
On Saturday 31 October 2009 15:08:29, Jan Kratochvil wrote:
> @@ -316,7 +320,7 @@ entry_point_address (void)
> struct gdbarch *gdbarch;
> CORE_ADDR entry_point;
>
> - if (symfile_objfile == NULL)
> + if (symfile_objfile == NULL || !symfile_objfile->ei.entry_point_p)
> return 0;
Previously, when we had a main symbol file, but the entry point was
invalid (how common is that?), we'd return ~0 here, but now we'll
return 0. Is there potential for breakage? inside_entry_func for
instance could trigger false positives more often. Makes me wonder about
exposing the invalid-entry-point-ity to callers. Say, by adding a new
entry_point_address_p(), or better, adjusting the interface to:
/* If there's a valid and known entry point, fills ENTRY_P with it
and return true; otherwise return false. */
int entry_point_address (CORE_ADDR *entry_p);
Otherwise looks ok to me.
--
Pedro Alves
next prev parent reply other threads:[~2009-10-31 15:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-31 15:08 Jan Kratochvil
2009-10-31 15:41 ` Pedro Alves [this message]
2009-10-31 19:51 ` Jan Kratochvil
2009-10-31 21:07 ` Pedro Alves
2009-11-02 14:51 ` Jan Kratochvil
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=200910311542.13318.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/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