Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@imgtec.com>
To: John Baldwin <jhb@freebsd.org>
Cc: <gdb-patches@sourceware.org>, Yao Qi <qiyaoltc@gmail.com>
Subject: Re: [PATCH] Move initialize_tdesc_mips* calls from mips-linux-nat.c to mips-linux-tdep.c
Date: Tue, 16 May 2017 13:44:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.00.1705161435310.2590@tp.orcam.me.uk> (raw)
In-Reply-To: <3174656.5xSoUNdgyV@ralph.baldwin.cx>

On Wed, 10 May 2017, John Baldwin wrote:

> >  Why?  These descriptions are only used in the native case, otherwise 
> > gdbserver supplies its own.  The current arrangement has worked for some 
> > 12 years now.
> 
> Target descriptions (in general) might be determined purely by a core dump's
> contents.  For example, in my out-of-tree patches for CHERI MIPS I added
> target descriptions for the CHERI capability registers and then use those
> target descriptions instead of the default for FreeBSD/mips core dumps that
> contain a special "capregs" note (this is implemented via a gdbarch
> "core_read_description" method).  For native binaries I depend on a working
> ptrace op to determine if the native CPU supports the registers via
> the "read_description" target method.
> 
> If core dumps of Linux binaries on processors with DSP registers included
> those registers in process cores then you would need a similar method for
> the Linux MIPS gdbarch that worked similar to mips_linux_read_description
> to select the appropriate target description for process cores.

 Your explanation makes sense to me, although as you have also observed a 
target description corresponding to a core dump may not necessarily be the 
same as one produced for a live target that core dump has been obtained 
from, because for various reasons the lists of registers included in each 
may be different.  For these cases where there is no difference, I see no 
sense to duplicate code of course.

 But such details would have to be included in the description of a patch
proposed, IMHO.

  Maciej


      reply	other threads:[~2017-05-16 13:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-09 10:07 Yao Qi
2017-05-10 11:52 ` Maciej W. Rozycki
2017-05-10 16:16   ` Yao Qi
2017-05-16 14:01     ` Maciej W. Rozycki
2017-05-10 16:19   ` John Baldwin
2017-05-16 13:44     ` Maciej W. Rozycki [this message]

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=alpine.DEB.2.00.1705161435310.2590@tp.orcam.me.uk \
    --to=macro@imgtec.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@freebsd.org \
    --cc=qiyaoltc@gmail.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