Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Support for additional file format

Hi Didier,

Here are my thoughts on that:

Yes, we do want to support symbol reader multiplexor.

Multiplexing by context makes sense and should not be very difficult to do. Mixing different formats for same context is more difficult - it would require the multiplexer to analyze memory maps before calling a symbol reader. I'd suggest to do simple per-context multiplexing first.

Multiplexer needs to be optional. At least in two cases I want to be able to build the agent without the multiplexer: lightweight agent (ENABLE_SymbolsProxy=1), and Linux user mode agent. I suggest ENABLE_SymbolsMux configuration option, which is mutually exclusive with ENABLE_SymbolsProxy.

I would add symbols_mux.c that implements symbols API and also provides additional API symbols_mux.h that allows to register a symbol reader for a context. The implementation can use context_extension() to add registration data to context objects.

Adding conditional compilation (ENABLE_SymbolsMux) into symbols_elf.c would allow to use it both with and without the multiplexer.

> I suspect there are additional changes that will be required to handle transitions
> between ELF & PE format in the same stack frame if we want to support this.

I'm not sure what you mean by "same stack frame". Two frames in same stack could belong to different symbol files, and this should work fine with the multiplexer.

Regards,
Eugene

-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Didier Brachet
Sent: Wednesday, December 12, 2012 6:02 AM
To: tcf-dev@xxxxxxxxxxx
Subject: [tcf-dev] Support for additional file format

Hi All,

We would need a TCF agent that supports several file formats. In our
case, we would like to build an agent running on Windows that would
support both ELF and PE (Portable Executable) file formats for the same
debug session (ideally we would like to be able to mix PE & ELF for the
same context or at least to be able to have a different file format for
each context).

There is currently some code in the TCF agent to support PE using the
Microsoft Debug Help Library for Windows native debugging support;
however it is not possible to use this support with different TCF
context interface (JTAG for example) without duplication some code and
it is not possible to have support for both PE & ELF in the same agent.

We would like to update the TCF agent code (symbols & line numbers
services as far as I know) to support multiple file formats by adding a
multiplexer on top of symbols and line number services. I suspect there
are additional changes that will be required to handle transitions
between ELF & PE format in the same stack frame if we want to support this.

Does this make sense, do you foresee any issue?

Thanks,
Didier


_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/tcf-dev



This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.




Back to the top