Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 22/22] [GDBserver] Multi-process + multi-arch: QNX NTO
Date: Wed, 29 May 2013 16:30:00 -0000	[thread overview]
Message-ID: <20130529163048.24586.97574.stgit@brno.lan> (raw)
In-Reply-To: <20130529162434.24586.5697.stgit@brno.lan>

This adjusts the QNX NTO port to new interfaces.

Completely untested.

2012-05-29  Pedro Alves  <palves@redhat.com>

	* nto-low.c (nto_tdesc): New global.
	(do_attach): Set the new process'es tdesc.
	* nto-low.h (struct target_desc): Forward declare.
	(nto_tdesc): Declare.
	* nto-x86-low.c (tdesc_i386): Declare.
	(nto_x86_arch_setup): Set `nto_tdesc'.
---
 gdb/gdbserver/nto-low.c     |    6 +++++-
 gdb/gdbserver/nto-low.h     |    6 ++++++
 gdb/gdbserver/nto-x86-low.c |    2 ++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/gdb/gdbserver/nto-low.c b/gdb/gdbserver/nto-low.c
index 5e4c60d..48a2cd3 100644
--- a/gdb/gdbserver/nto-low.c
+++ b/gdb/gdbserver/nto-low.c
@@ -35,6 +35,8 @@
 extern int using_threads;
 int using_threads = 1;
 
+struct target_desc *nto_tdesc;
+
 static void
 nto_trace (const char *fmt, ...)
 {
@@ -203,11 +205,13 @@ do_attach (pid_t pid)
       && (status.flags & _DEBUG_FLAG_STOPPED))
     {
       ptid_t ptid;
+      struct process_info *proc;
 
       kill (pid, SIGCONT);
       ptid = ptid_build (status.pid, status.tid, 0);
       the_low_target.arch_setup ();
-      add_process (status.pid, 1);
+      proc = add_process (status.pid, 1);
+      proc->tdesc = nto_tdesc;
       TRACE ("Adding thread: pid=%d tid=%ld\n", status.pid,
 	     ptid_get_lwp (ptid));
       nto_find_new_threads (&nto_inferior);
diff --git a/gdb/gdbserver/nto-low.h b/gdb/gdbserver/nto-low.h
index 2c450b7..1644e44 100644
--- a/gdb/gdbserver/nto-low.h
+++ b/gdb/gdbserver/nto-low.h
@@ -19,6 +19,8 @@
 #ifndef NTO_LOW_H
 #define NTO_LOW_H
 
+struct target_desc;
+
 enum regset_type
 {
   NTO_REG_GENERAL,
@@ -40,5 +42,9 @@ struct nto_target_ops
 
 extern struct nto_target_ops the_low_target;
 
+/* The inferior's target description.  This is a global because the
+   LynxOS ports support neither bi-arch nor multi-process.  */
+extern struct target_desc *nto_tdesc;
+
 #endif
 
diff --git a/gdb/gdbserver/nto-x86-low.c b/gdb/gdbserver/nto-x86-low.c
index 9163880..a389a9b 100644
--- a/gdb/gdbserver/nto-x86-low.c
+++ b/gdb/gdbserver/nto-x86-low.c
@@ -28,6 +28,7 @@
 /* Definition auto generated from reg-i386.dep.  */
 extern void init_registers_i386 ();
 extern struct reg *regs_i386;
+extern struct target_desc *tdesc_i386;
 
 const unsigned char x86_breakpoint[] = { 0xCC };
 #define x86_breakpoint_len 1
@@ -91,6 +92,7 @@ nto_x86_arch_setup (void)
 {
   init_registers_i386 ();
   the_low_target.num_regs = 16;
+  nto_tdesc = tdesc_i386;
 }
 
 struct nto_target_ops the_low_target =


  parent reply	other threads:[~2013-05-29 16:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 16:24 [PATCH 00/22] [GDBserver] Multi-process + multi-arch Pedro Alves
2013-05-29 16:25 ` [PATCH 01/22] [GDBserver] Multi-process + multi-arch: core + GNU/Linux x86* Pedro Alves
2013-05-29 19:03   ` Tom Tromey
2013-05-30 12:01     ` Pedro Alves
2013-05-29 16:25 ` [PATCH 02/22] [GDBserver] Multi-process + multi-arch: GNU/Linux IA64 Pedro Alves
2013-05-29 16:25 ` [PATCH 03/22] [GDBserver] Multi-process + multi-arch: GNU/Linux SPARC Pedro Alves
2013-05-29 16:25 ` [PATCH 04/22] [GDBserver] Multi-process + multi-arch: GNU/Linux PowerPC Pedro Alves
2013-05-29 16:26 ` [PATCH 07/22] [GDBserver] Multi-process + multi-arch: GNU/Linux ARM Pedro Alves
2013-05-29 16:26 ` [PATCH 06/22] [GDBserver] Multi-process + multi-arch: GNU/Linux MIPS Pedro Alves
2013-05-29 16:26 ` [PATCH 05/22] [GDBserver] Multi-process + multi-arch: GNU/Linux S/390 Pedro Alves
2013-05-29 16:27 ` [PATCH 11/22] [GDBserver] Multi-process + multi-arch: GNU/Linux CRIS Pedro Alves
2013-05-29 16:27 ` [PATCH 08/22] [GDBserver] Multi-process + multi-arch: GNU/Linux m68k Pedro Alves
2013-05-29 16:27 ` [PATCH 09/22] [GDBserver] Multi-process + multi-arch: GNU/Linux SH Pedro Alves
2013-05-29 16:27 ` [PATCH 10/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Blackfin Pedro Alves
2013-05-29 16:28 ` [PATCH 14/22] [GDBserver] Multi-process + multi-arch: GNU/Linux TI C6x Pedro Alves
2013-05-29 16:28 ` [PATCH 15/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Xtensa Pedro Alves
2013-05-29 16:28 ` [PATCH 12/22] [GDBserver] Multi-process + multi-arch: GNU/Linux CRISv32 Pedro Alves
2013-05-29 16:28 ` [PATCH 13/22] [GDBserver] Multi-process + multi-arch: GNU/Linux M32R Pedro Alves
2013-05-29 16:29 ` [PATCH 16/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Nios 2 Pedro Alves
2013-05-29 16:29 ` [PATCH 17/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Aarch64 Pedro Alves
2013-05-29 16:29 ` [PATCH 18/22] [GDBserver] Multi-process + multi-arch: GNU/Linux TILE-Gx Pedro Alves
2013-05-29 16:30 ` [PATCH 21/22] [GDBserver] Multi-process + multi-arch: LynxOS Pedro Alves
2013-05-29 16:30 ` Pedro Alves [this message]
2013-05-29 16:30 ` [PATCH 19/22] [GDBserver] Multi-process + multi-arch: SPU Pedro Alves
2013-05-29 17:22 ` [PATCH 20/22] [GDBserver] Multi-process + multi-arch: Windows Pedro Alves
2013-05-29 17:29 ` [PATCH 00/22] [GDBserver] Multi-process + multi-arch Pedro Alves
2013-05-30 12:13 [PATCH 00/22 v3] " Pedro Alves
2013-05-30 12:16 ` [PATCH 22/22] [GDBserver] Multi-process + multi-arch: QNX NTO Pedro Alves

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=20130529163048.24586.97574.stgit@brno.lan \
    --to=palves@redhat.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