Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-debug-dev] CDT Debugger Disassembly view

Hi,

I work on a CDT based debugger and I'm looking into a source lookup
problem.
More specifically the source lookup in the disassembly view, the
corresponding source lookup in the editor works fine in my case.
In our debugger the CDI function ICDITarget.getMixedInstructions() is
returning an already looked up name,
Say if the elf/dwarf file contained c:\build_path\test.c, and that maps
on the debug machine to d:\workspace\debug_path\test.c, then our
debugger already performed the mapping and the stackframe is returning
d:\workspace\debug_path\test.c.
It's not clear to me if this is expected, the description in
ICDITarget.getMixedInstructions does not mention what kind of paths
(already resolved or not) it does expect. Anyway, as we are returning
the real path, I would expect the lookup to be simple, but it actually
fails in DisassemblyBlock.createSourceLines. The
AbstractSourceLookupDirector is creating for my case an
ExternalTranslationUnit, and then this does not match any of the checked
entries in the createSourceLines function.
Therefore the source lookup fails, and the debugger just displays a
failure message as source information in the disassmbly view.

So I wonder what the cleanest fix for my problem is.
One simple fix which works for me is to also expect ICElement's in
DisassemblyBlock.createSourceLines and get the filename from that API.
I'm wondering if there is a better fix though.

Thanks for any help,
Mike Caraman


Back to the top