public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: <gdb-patches@sourceware.org>
Cc: Pedro Alves <palves@redhat.com>, Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH] Use thread_info and inferior pointers more throughout
Date: Thu, 14 Feb 2019 15:45:00 -0000	[thread overview]
Message-ID: <87lg2iidbf.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <d138ac33-ecb0-46e4-04b9-f221a5713845@redhat.com>

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

Hi!

On Thu, 21 Jun 2018 17:20:54 +0100, Pedro Alves <palves@redhat.com> wrote:
> >From 00431a78b28f913a9d5c912c49680e39cfd20847 Mon Sep 17 00:00:00 2001
> From: Pedro Alves <palves@redhat.com>
> Date: Thu, 21 Jun 2018 17:09:31 +0100
> Subject: [PATCH] Use thread_info and inferior pointers more throughout

> -void
> -detach_inferior (int pid)
> -{
> -  detach_inferior (find_inferior_pid (pid));
> -}

Pushed to master the attached commit
c29ee8d45ec2113821c006a18cfedb9023ef9ce1 '[gdb, hurd] Repair build after
"Use thread_info and inferior pointers more throughout"'.


Grüße
 Thomas



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gdb-hurd-Repair-build-after-Use-thread_info-and-infe.patch --]
[-- Type: text/x-diff, Size: 1929 bytes --]

From c29ee8d45ec2113821c006a18cfedb9023ef9ce1 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue, 24 Jul 2018 18:04:18 +0200
Subject: [PATCH] [gdb, hurd] Repair build after "Use thread_info and inferior
 pointers more throughout"

..., that is commit 00431a78b28f913a9d5c912c49680e39cfd20847 causing:

    [...]/gdb/gnu-nat.c: In member function 'virtual void gnu_nat_target::detach(inferior*, int)':
    [...]/gdb/gnu-nat.c:2284:23: error: invalid conversion from 'int' to 'inferior*' [-fpermissive]
       detach_inferior (pid);
                           ^
    In file included from [...]/gdb/gnu-nat.c:61:0:
    [...]/gdb/inferior.h:523:13: note:   initializing argument 1 of 'void detach_inferior(inferior*)'
     extern void detach_inferior (inferior *inf);
                 ^~~~~~~~~~~~~~~

Fixed by inlining the removed code.

	gdb/
	* gnu-nat.c (gnu_nat_target::detach): Instead of
	'detach_inferior (pid)' call
	'detach_inferior (find_inferior_pid (pid))'.
---
 gdb/ChangeLog | 4 ++++
 gdb/gnu-nat.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2974d7275c..71c61bc909 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2019-02-14  Thomas Schwinge  <thomas@codesourcery.com>
 
+	* gnu-nat.c (gnu_nat_target::detach): Instead of
+	'detach_inferior (pid)' call
+	'detach_inferior (find_inferior_pid (pid))'.
+
 	* configure.nat [gdb_host == i386gnu] (NATDEPFILES): Add
 	'nat/fork-inferior.o'.
 	* gnu-nat.c: #include "nat/fork-inferior.h".
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 5a47cb7d63..67cc95c68d 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -2279,7 +2279,7 @@ gnu_nat_target::detach (inferior *inf, int from_tty)
   inf_detach (gnu_current_inf);
 
   inferior_ptid = null_ptid;
-  detach_inferior (pid);
+  detach_inferior (find_inferior_pid (pid));
 
   maybe_unpush_target ();
 }
-- 
2.19.2


  parent reply	other threads:[~2019-02-14 15:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 18:07 Pedro Alves
2018-06-07 18:28 ` Tom Tromey
2018-06-21 15:57   ` Pedro Alves
2018-06-21 16:21     ` Pedro Alves
2018-06-25 10:18       ` Ulrich Weigand
2018-06-25 10:23         ` Pedro Alves
2018-06-27 11:34       ` Ulrich Weigand
2018-06-27 12:43         ` [PATCH] Fix Cell debugging regression (Re: [PATCH] Use thread_info and inferior pointers more throughout) Pedro Alves
2018-06-27 13:12           ` Ulrich Weigand
2018-06-27 13:17             ` Pedro Alves
2018-06-27 15:30               ` [PATCH v2] " Pedro Alves
2018-06-27 16:05                 ` Ulrich Weigand
2018-06-27 16:25                   ` Pedro Alves
2019-02-14 15:45       ` Thomas Schwinge [this message]
2018-06-27 18:16 ` Possible regression on gdb.multi/multi-arch-exec.exp (was: " Sergio Durigan Junior
2018-06-27 18:39   ` Keith Seitz
2018-06-28 12:09   ` Possible regression on gdb.multi/multi-arch-exec.exp Pedro Alves
2018-06-28 16:02     ` [pushed] Fix follow-exec regression / crash (Re: Possible regression on gdb.multi/multi-arch-exec.exp) Pedro Alves
2018-06-28 16:37       ` Sergio Durigan Junior

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=87lg2iidbf.fsf@euler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).