From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Aleksandar Ristovski <aristovski@qnx.com>
Subject: Re: ptid from core section
Date: Fri, 05 Jun 2009 13:43:00 -0000 [thread overview]
Message-ID: <200906051444.37443.pedro@codesourcery.com> (raw)
In-Reply-To: <h093v1$d1h$1@ger.gmane.org>
On Thursday 04 June 2009 19:31:58, Aleksandar Ristovski wrote:
> Pedro Alves wrote:
> > This is mostly OK as far as I'm concerned. One question though:
> >
> >> (ptid_from_core_section, core_section_name_from_ptid): New
> >> functions.
> >
> > Is there still a reason the former takes bfd and bfd section pointers,
> > instead of being a mirror of the latter (say, ptid_from_core_section_name)?
> >
>
> Not a good reason. I just used what was available at the
> calling site. The attached patch makes arguments of the two
> new callbacks symmetrical (as much as was possible) as well
> as makes their names symmetrical.
>
> This time, gdbarch.[ch] included.
>
>
Hmm, sorry I missed something before...
AFAICS, core_gdbarch can end up being left NULL. Most code
that accesses it in corelow.c handles it's NULL-ness, while your
change adds some unconditional accesses. The path of
least resistence to fix this, is to move the callback defaults
to corelow.c, make the new callbacks optional, and check
for 'core_gdbarch && gdbarch_foo_p (core_gdbarch)' predicates
before calling the optional callbacks.
( This does raise the question of which gdbarch is the best in these
case: core_gdbarch; the executable's gdbarch; the more refined
target_gdbarch, which in turn is refined from current_gdbarch
through core_read_description. Yuk. )
--
Pedro Alves
next prev parent reply other threads:[~2009-06-05 13:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-01 15:56 Aleksandar Ristovski
2009-06-03 14:41 ` Pedro Alves
2009-06-03 16:59 ` Aleksandar Ristovski
2009-06-03 18:41 ` Pedro Alves
2009-06-04 18:32 ` Aleksandar Ristovski
2009-06-05 13:43 ` Pedro Alves [this message]
2009-06-05 14:04 ` Aleksandar Ristovski
2009-06-05 14:39 ` Pedro Alves
2009-06-05 14:53 ` Aleksandar Ristovski
2009-06-05 16:26 ` Pedro Alves
2009-06-05 17:54 ` Aleksandar Ristovski
2009-06-05 19:00 ` Pedro Alves
2009-06-05 19:03 ` Aleksandar Ristovski
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=200906051444.37443.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=aristovski@qnx.com \
--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