From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18857 invoked by alias); 13 Jan 2014 15:23:12 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 18830 invoked by uid 48); 13 Jan 2014 15:23:11 -0000 From: "tromey at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug sim/16442] New: sims not target-async Date: Mon, 13 Jan 2014 15:23:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: sim X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q1/txt/msg00046.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16442 Bug ID: 16442 Summary: sims not target-async Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: sim Assignee: unassigned at sourceware dot org Reporter: tromey at redhat dot com Currently the sims don't implement target-async, but they could. There are three ways to do it. The first way keeps the current restriction that only a single sim can be used at a time. The idea is simple -- run the simulator code in a separate thread, doing whatever locking is needed on the gdb side. On the sim side this may need a bit of auditing to make sure that the code is "thread safe enough"; plus some minor changes to prevent the sims from installing their own signal handlers. The second way would also be to use multiple threads, but do more auditing on the simulator code to (1) let multiple instances of a given simulator run at once, and (2) let multiple simulators be built and linked in (or dlopen'd) at the same time. The third idea is to add a minimal RSP stub to the various drivers (run.c, nrun.c, plus there is at least one custom one in tree) and change "target sim" to be a wrapper around "target remote". Some tricks -- perhaps threads again -- are needed here to make C-c work properly; also this may break the sim command completion functionality. -- You are receiving this mail because: You are on the CC list for the bug.