Re: [PATCH] Fix compile error due to [[noreturn]] with clang

Tom Tromey
2024-10-25T15:36:41Z

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

Simon> But nowadays, --enable-targets=all builds the sim for all targets (that
Simon> have a sim), not only the main target. Would it be possible to build
Simon> remote-sim.o in that case, and use the simulator for any target, from a
Simon> single --enable-targets=all gdb build?

Andreas pointed out why this doesn't work today, but I wanted to mention
that I think we should have a goal of removing remote-sim.o entirely.

In particular I think the the sim should run as a separate process and
talk to gdb via the remote protocol. "target sim" would be
reimplemented as "target remote | arch-name-whatever".

This way, the sim could be made multi-target-capable and also wouldn't
block the goal of always using target async.

I started work on this a bit, turning gdbserver into a library and
writing a gdbserver target layer for the sim. However, I'm a little
blocked on figuring out how to handle register descriptions. There's
also the gdbarch "register_sim_regno" hook to remove.

IMO the sims are a bit of an albatross. Mike did a bunch of work on
them a while ago, but for the most part they don't seem to be actively
developed.

Tom