Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] What's the correct way to access debug targets?

Hi,

I posted this question on the CDT forum and was advised it's more a question for
the dev mailing list, so hopefully it'll be more relevant here, and someone can
shed some light on this :-

I'm writing a debug plugin in which I want to be able to connect back to a
source file from the displayed data, i.e. taking a displayed value as an
address, then opening the relevant source file and jumping to the correct line.

I can get an IDebugTarget object from the launch manager, but this type of
object doesn't have any methods (as far as I can see) to convert my address to a
file path and line number reference.

I'm converting it to a CDebugTarget, and using that to access an ICDITarget, and
between the two of these I have the ability to create an IAddress object via
getAddressFactory().createAddress, and use that for getAddressForSource().

However, the use of CDebugTarget is giving warnings :-

    Discouraged access: The type CDebugTarget is not accessible due to
restriction on required library...

Although my code works correctly, I'd prefer not to have these warnings, so if
anyone can advise on an alternative I'd be very grateful.

Regards,

David P.




Back to the top