From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17409 invoked by alias); 25 Sep 2015 23:52:05 -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 17400 invoked by uid 89); 25 Sep 2015 23:52:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.2 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: DUB004-OMC1S12.hotmail.com Received: from dub004-omc1s12.hotmail.com (HELO DUB004-OMC1S12.hotmail.com) (157.55.0.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Fri, 25 Sep 2015 23:52:03 +0000 Received: from DUB122-W18 ([157.55.0.239]) by DUB004-OMC1S12.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Fri, 25 Sep 2015 16:51:59 -0700 X-TMN: [SfK60cZ3YQIyXM9M2vPaIOXEi5LuHuyu] Message-ID: From: Juha To: "gdb@sourceware.org" Subject: Bare metal gdb stub/server implementation Date: Fri, 25 Sep 2015 23:52:00 -0000 In-Reply-To: References: Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg00025.txt.bz2 I have tried to find the answer by googling, in manuals and tried asking in freenode chat (#gdb) but haven't come up with an answer... =A0 Where could I find the "right" way to handle things like process IDs and thread IDs in a bare metal case, where there really are no processes or thr= eads? =A0 I'm trying to put together a standalone gdb stub/server for Raspberry Pi B2. (I'm not sure what to call it: it has stub functionality, but is standalone and as such works like a server.) =A0 I have started with a single core, and maybe one day I'll expand to all 4 c= ores. =A0 Should I fake the gdb client that there are processes or threads? If, then which way would be better: single process with 4 threads (=3D cores) or 4 processes without multithreading support? Maybe there is still a better o= ption? =A0 Also, now, when my 'stub' starts and gdb client asks for reason for halt ('= ?'), I respond that a program has finished (W 00). Is that a good choise? =A0 -Juha Aaltonen =20=09=09=20=09=20=20=20=09=09=20=20