From: Simon Marchi <simon.marchi@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: <qiyaoltc@gmail.com>, Simon Marchi <simon.marchi@ericsson.com>
Subject: [PATCH] nto & lynx x86: call init_target_desc
Date: Fri, 22 Sep 2017 15:06:00 -0000 [thread overview]
Message-ID: <1506092746-17214-1-git-send-email-simon.marchi@ericsson.com> (raw)
In gdbserver, target descriptions need to be initialized by calling
init_target_desc. Because i386_create_target_description is shared with
GDB, it doesn't do that, the callers must take care of it. These two
platforms currently don't.
I am not able to build them, so I couldn't test.
gdb/gdbserver/ChangeLog:
* lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
* nto-x86-low.c (nto_x86_arch_setup): Likewise.
---
gdb/gdbserver/lynx-i386-low.c | 7 ++++++-
gdb/gdbserver/nto-x86-low.c | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/gdb/gdbserver/lynx-i386-low.c b/gdb/gdbserver/lynx-i386-low.c
index 57181d6..a7eae1d 100644
--- a/gdb/gdbserver/lynx-i386-low.c
+++ b/gdb/gdbserver/lynx-i386-low.c
@@ -293,7 +293,12 @@ lynx_i386_store_fpregset (struct regcache *regcache, const char *buf)
static void
lynx_i386_arch_setup (void)
{
- lynx_tdesc = i386_create_target_description (X86_XSTATE_SSE_MASK, false);
+ struct target_desc *tdesc
+ = i386_create_target_description (X86_XSTATE_SSE_MASK, false);
+
+ init_target_desc (tdesc);
+
+ lynx_tdesc = tdesc;
}
/* Description of all the x86-lynx register sets. */
diff --git a/gdb/gdbserver/nto-x86-low.c b/gdb/gdbserver/nto-x86-low.c
index cfa5993..48bdc53 100644
--- a/gdb/gdbserver/nto-x86-low.c
+++ b/gdb/gdbserver/nto-x86-low.c
@@ -87,7 +87,12 @@ static void
nto_x86_arch_setup (void)
{
the_low_target.num_regs = 16;
- nto_tdesc = i386_create_target_description (X86_XSTATE_SSE_MASK, false);
+ struct target_desc *tdesc
+ = i386_create_target_description (X86_XSTATE_SSE_MASK, false);
+
+ init_target_desc (tdesc);
+
+ nto_tdesc = tdesc;
}
struct nto_target_ops the_low_target =
--
2.7.4
next reply other threads:[~2017-09-22 15:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-22 15:06 Simon Marchi [this message]
2017-09-22 15:14 ` Joel Brobecker
2017-10-02 9:00 ` Simon Marchi
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=1506092746-17214-1-git-send-email-simon.marchi@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=gdb-patches@sourceware.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