From patchwork Tue Mar 26 14:44:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 31991 Received: (qmail 28510 invoked by alias); 26 Mar 2019 14:53:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 27683 invoked by uid 89); 26 Mar 2019 14:53:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=Frame, Settings, HContent-Transfer-Encoding:8bit, documents X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Mar 2019 14:53:17 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E2397116C7D; Tue, 26 Mar 2019 10:44:09 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DfdLX51N3wNy; Tue, 26 Mar 2019 10:44:09 -0400 (EDT) Received: from murgatroyd.Home (174-29-37-56.hlrn.qwest.net [174.29.37.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 8C2C9116C5F; Tue, 26 Mar 2019 10:44:09 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 8/8] Update Ravenscar documentation Date: Tue, 26 Mar 2019 08:44:04 -0600 Message-Id: <20190326144404.6670-9-tromey@adacore.com> In-Reply-To: <20190326144404.6670-1-tromey@adacore.com> References: <20190326144404.6670-1-tromey@adacore.com> MIME-Version: 1.0 This documents some recent Ravenscar changes, and further documents the known limitation where stepping through the runtime initialization code does not work properly. gdb/doc/ChangeLog 2019-03-26 Tom Tromey * gdb.texinfo (Ravenscar Profile): Add examples. Document runtime initialization limitation. --- gdb/doc/ChangeLog | 5 +++++ gdb/doc/gdb.texinfo | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 4c1d5e8294f..4d7f510f300 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -17298,6 +17298,33 @@ using the Ravenscar Profile. @end table +When Ravenscar task-switching is enabled, Ravenscar tasks are +announced by @value{GDBN} as if they were threads: + +@smallexample +(gdb) continue +[New Ravenscar Thread 0x2b8f0] +@end smallexample + +Both Ravenscar tasks and the underlying CPU threads will show up in +the output of @code{info threads}: + +@smallexample +(gdb) info threads + Id Target Id Frame + 1 Thread 1 (CPU#0 [running]) simple () at simple.adb:10 + 2 Thread 2 (CPU#1 [running]) 0x0000000000003d34 in __gnat_initialize_cpu_devices () + 3 Thread 3 (CPU#2 [running]) 0x0000000000003d28 in __gnat_initialize_cpu_devices () + 4 Thread 4 (CPU#3 [halted ]) 0x000000000000c6ec in system.task_primitives.operations.idle () +* 5 Ravenscar Thread 0x2b8f0 simple () at simple.adb:10 + 6 Ravenscar Thread 0x2f150 0x000000000000c6ec in system.task_primitives.operations.idle () +@end smallexample + +One known limitation of the Ravenscar support in @value{GDBN} is that +it isn't currently possible to single-step through the runtime +initialization sequence. If you need to debug this code, you should +use @code{set ravenscar task-switching off}. + @node Ada Settings @subsubsection Ada Settings @cindex Ada settings