Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aleksandar Ristovski <aristovski@qnx.com>
To: gdb-patches@sources.redhat.com
Subject: Re: ptid from core section
Date: Fri, 05 Jun 2009 14:04:00 -0000	[thread overview]
Message-ID: <h0b8l4$udu$1@ger.gmane.org> (raw)
In-Reply-To: <200906051444.37443.pedro@codesourcery.com>

Pedro Alves wrote:
> 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

In core_open, there is already a gdbarch callback which 
doesn't check for its NULL-ness (piece added by me), namely 
gdbarch_target_signal_from_host.

What are the circumstances under which core_gdbarch would 
not be found? If we are opening a core from a system gdb was 
not configured for?


> 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. )
> 


-- 
Aleksandar Ristovski
QNX Software Systems


  reply	other threads:[~2009-06-05 14:04 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
2009-06-05 14:04           ` Aleksandar Ristovski [this message]
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='h0b8l4$udu$1@ger.gmane.org' \
    --to=aristovski@qnx.com \
    --cc=gdb-patches@sources.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