public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug sim/16442] New: sims not target-async
@ 2014-01-13 15:23 tromey at redhat dot com
  2014-03-14  0:46 ` [Bug sim/16442] " vapier at gentoo dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2014-01-13 15:23 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug sim/16442] sims not target-async
  2014-01-13 15:23 [Bug sim/16442] New: sims not target-async tromey at redhat dot com
@ 2014-03-14  0:46 ` vapier at gentoo dot org
  2015-03-29 22:16 ` vapier at gentoo dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: vapier at gentoo dot org @ 2014-03-14  0:46 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16442

Mike Frysinger <vapier at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vapier at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug sim/16442] sims not target-async
  2014-01-13 15:23 [Bug sim/16442] New: sims not target-async tromey at redhat dot com
  2014-03-14  0:46 ` [Bug sim/16442] " vapier at gentoo dot org
@ 2015-03-29 22:16 ` vapier at gentoo dot org
  2022-11-29 16:22 ` tromey at sourceware dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: vapier at gentoo dot org @ 2015-03-29 22:16 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16442

--- Comment #1 from Mike Frysinger <vapier at gentoo dot org> ---
all enhancements should be routed through nrun from now on.  the run interface
is being killed off, and ports that have custom entries (like erc32) simply
wouldn't get support for this new functionality imo.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug sim/16442] sims not target-async
  2014-01-13 15:23 [Bug sim/16442] New: sims not target-async tromey at redhat dot com
  2014-03-14  0:46 ` [Bug sim/16442] " vapier at gentoo dot org
  2015-03-29 22:16 ` vapier at gentoo dot org
@ 2022-11-29 16:22 ` tromey at sourceware dot org
  2022-12-10 12:25 ` vapier at gentoo dot org
  2023-06-13 17:21 ` mark at klomp dot org
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2022-11-29 16:22 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16442

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
See also bug #7505.
I lean toward the RSP approach nowadays; we could remove remote-sim
entirely.  The only really tricky thing here, I think, is handling
the sim-specific gdbarch register remapping:

Method(
    comment="""
MAP a GDB RAW register number onto a simulator register number.  See
also include/...-sim.h.
""",
    type="int",
    name="register_sim_regno",
    params=[("int", "reg_nr")],
    predefault="legacy_register_sim_regno",
    invalid=False,
)

This is used in a few arches, search for set_gdbarch_register_sim_regno.

Probably the best approach is to just change the sims to use XML
register sets like everything else.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug sim/16442] sims not target-async
  2014-01-13 15:23 [Bug sim/16442] New: sims not target-async tromey at redhat dot com
                   ` (2 preceding siblings ...)
  2022-11-29 16:22 ` tromey at sourceware dot org
@ 2022-12-10 12:25 ` vapier at gentoo dot org
  2023-06-13 17:21 ` mark at klomp dot org
  4 siblings, 0 replies; 6+ messages in thread
From: vapier at gentoo dot org @ 2022-12-10 12:25 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16442

--- Comment #3 from Mike Frysinger <vapier at gentoo dot org> ---
seems we're getting a little off topic from the bug as defined ("sims not
target-async").  i've looked at the xml/regnum issue in the past to see if it
could be cleaned up.  i filed bug 29869 to track that work & my thoughts.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug sim/16442] sims not target-async
  2014-01-13 15:23 [Bug sim/16442] New: sims not target-async tromey at redhat dot com
                   ` (3 preceding siblings ...)
  2022-12-10 12:25 ` vapier at gentoo dot org
@ 2023-06-13 17:21 ` mark at klomp dot org
  4 siblings, 0 replies; 6+ messages in thread
From: mark at klomp dot org @ 2023-06-13 17:21 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16442

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at klomp dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-13 17:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-13 15:23 [Bug sim/16442] New: sims not target-async tromey at redhat dot com
2014-03-14  0:46 ` [Bug sim/16442] " vapier at gentoo dot org
2015-03-29 22:16 ` vapier at gentoo dot org
2022-11-29 16:22 ` tromey at sourceware dot org
2022-12-10 12:25 ` vapier at gentoo dot org
2023-06-13 17:21 ` mark at klomp dot org

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).