From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35689 invoked by alias); 24 Jul 2015 08:37:17 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 35672 invoked by uid 89); 24 Jul 2015 08:37:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f176.google.com Received: from mail-pd0-f176.google.com (HELO mail-pd0-f176.google.com) (209.85.192.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 24 Jul 2015 08:37:15 +0000 Received: by pdjr16 with SMTP id r16so10556117pdj.3 for ; Fri, 24 Jul 2015 01:37:13 -0700 (PDT) X-Received: by 10.66.62.163 with SMTP id z3mr28596433par.12.1437727032988; Fri, 24 Jul 2015 01:37:12 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id to5sm13194656pac.33.2015.07.24.01.37.10 (version=TLS1_2 cipher=AES128-SHA256 bits=128/128); Fri, 24 Jul 2015 01:37:12 -0700 (PDT) From: Yao Qi To: "Ding\, Fei" Cc: "gdb\@sourceware.org" Subject: Re: Communicate gdb with other process References: Date: Fri, 24 Jul 2015 08:37:00 -0000 In-Reply-To: (Fei Ding's message of "Fri, 24 Jul 2015 06:13:28 +0000") Message-ID: <86oaj2gde5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00041.txt.bz2 "Ding, Fei" writes: > I'd like to make Gdbserver communicate with other process, such as: > > Gdb<=3D=3D=3D>Gdbserver<=3D=3D=3D>MyProgram > > Gdbserver and MyProgram will run on the same device. > > Any suggestion for implementation? GDBserver can communicate with agent from other process by socket. You can see gdb/common/agent.c. The protocol is documented https://sourceware.org/gdb/current/onlinedocs/gdb/In_002dProcess-Agent-Prot= ocol.html --=20 Yao (=E9=BD=90=E5=B0=A7)