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: [patch] nto-procfs.c form proper ptid and thread list.
Date: Thu, 23 Oct 2008 19:55:00 -0000	[thread overview]
Message-ID: <gdqkq8$u0b$1@ger.gmane.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

Hello,

This patch will make gdb actually work on nto. Very small 
patch incorporating what Pedro suggested a few months ago 
(sorry for the delay).

Thanks,

Aleksandar Ristovski
QNX Software Systems


ChangeLog:
	* nto-procfs.c (do_attach): Form proper ptid including pid 
and tid.
	(procfs_create_inferior): Fetch list of threads.


[-- Attachment #2: nto-procfs-20081023.diff --]
[-- Type: text/x-patch, Size: 843 bytes --]

Index: gdb/nto-procfs.c
===================================================================
RCS file: /cvs/src/src/gdb/nto-procfs.c,v
retrieving revision 1.34
diff -u -p -r1.34 nto-procfs.c
--- gdb/nto-procfs.c	23 Oct 2008 17:53:17 -0000	1.34
+++ gdb/nto-procfs.c	23 Oct 2008 19:47:17 -0000
@@ -580,7 +580,7 @@ do_attach (ptid_t ptid)
       && status.flags & _DEBUG_FLAG_STOPPED)
     SignalKill (nto_node (), PIDGET (ptid), 0, SIGCONT, 0, 0);
   nto_init_solib_absolute_prefix ();
-  return ptid;
+  return ptid_build (PIDGET (ptid), 0, status.tid);
 }
 
 /* Ask the user what to do when an interrupt is received.  */
@@ -1085,6 +1085,7 @@ procfs_create_inferior (char *exec_file,
     close (fds[2]);
 
   inferior_ptid = do_attach (pid_to_ptid (pid));
+  procfs_find_new_threads ();
 
   inf = add_inferior (pid);
   inf->attach_flag = 0;

             reply	other threads:[~2008-10-23 19:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23 19:55 Aleksandar Ristovski [this message]
2008-10-23 20:06 ` 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='gdqkq8$u0b$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