Re: [RFA] Add interface for registering JITed code

Thiago Jung Bauermann
2009-07-31T15:00:17Z

Ok, I had one night's sleep over this, and just re-read the thread. :-)

Em Quinta-feira 30 Julho 2009 15:01:17 Thiago Jung Bauermann escreveu:
> Em Quinta-feira 30 Julho 2009 12:12:50 Tom Tromey escreveu:
> > >>>>> "Reid" == Reid Kleckner <rnk@mit.edu> writes:
> >
> > Tom> Yeah. This would work if you had two JITs in a process, say loaded
> > Tom> dynamically, and the various __jit symbols had hidden visibility.
> >
> > Reid> I think if someone has that use case, then they can write a client
> > Reid> side library that wraps the __jit symbols and make the two JITs
> > call Reid> that.
> >
> > Yeah, I changed my mind, let's not worry about it. If it ever comes up,
> > we can deal with it then without breaking compatibility.
>
> If/when someone wants to add another scripting language to GDB, we will be
> bitten by this issue. I can see that happening already. :-)

I still think this will happen soon enough ...

> You're saying that the current patch is extensible to deal with that?

... but I agree with Reid in that the inferior (or client) can deal with that
case internally (also it seems fair, since it is the client who wanted to have
two JITs in the first place. :-) ). It is nice that the GDB-facing interface is
as simple as possible.

Also the protocol is versioned. That is awesome. I don't have worries
regarding this issue.

> Also, changing subjects: it is important that this feature works on core
> files, or at least is forward-compatible with such a feature. I think this
> needs to be thought through before the patch goes in.

I still think that the patch needs to be tested with a core file scenario
before it is checked in. Since said scenario is similar to attaching to a
running process, it will likely magically work, though.
--
[]'s
Thiago Jung Bauermann