Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dsdp-dd-dev] GDB source lookup issues

Just to clarify, GDB does not use BreakpointsMediator yet, it still uses MIBreakpiontsManager. This is significant, because MIBreakpointsManager performs the reverse source lookup using the ISourceLookup service MiBreakpointsManager.determineDebuggerPath(). I agree that tests would be very helpful here. I'm rather worried though about managing platform-specific tests. Currently, the test suite assumes that it can run on any platform and behave the same way. These tests (to deal with windows source lookup) will at least require using a compiler on a windows windows host. Perhaps we need to create a org.eclipse.dd.tests.gdb.win32 plugin and place these tests there? Any other suggestions?

Cheers,
Pawel

Tobias Södergren XT wrote:
Hi Pawel and others,
I'm not sure that Elena Laskavaia's issue applies to dsdp-dd:

This is what happens in CDT:

*.cdt.debug.mi.core.cdi.BreakpointManager:
MIBreakInsert[] createMIBreakInsert(LocationBreakpoint bkpt)
...
	ICDILocator locator = bkpt.getLocator();
	String file = locator.getFile();
	if (file != null) {
		file = new File(file).getName(); // <-- Just using the filename
} ...

This is what happens in DD:

*.dd.dsf.debug.service.BreakpointsMediator:
void breakpointAdded(final IBreakpoint breakpoint)
...
final List<Map<String, Object>> attrsArray = fAttributeTranslator.getBreakpointAttributes(breakpoint, fBreakpointManager.isEnabled()); // <-- Creating attributes
...
	for (final IBreakpointsTargetDMContext dmc : fPlatformBPs.keySet()) {
		installBreakpoint(dmc, breakpoint, attrsArray, new RequestMonitor(getExecutor(), countingRm));
	}

*.dd.mi.service.MIBreakpoints:
void addBreakpoint(.., Map<String, Object> attributes, ...)
...
	String location = formatLocation(attributes) // <-- Using attributes
...

String formatLocation(..)
...
	String location = (String)  getProperty(attributes, ADDRESS, NULL_STRING);
...
	if (!fileName.equals(NULL_STRING)) {
		if (lineNumber != -1) {
location = fileName + ":" + lineNumber; //$NON-NLS-1$ } else {
			location = fileName + ":" + function;   //$NON-NLS-1$
		}
	}
	return location;
...

So whatever is returned from the fAttributeTranslator.getBreakpointAttributes(), is used "umodified".

That said, there seem to be a lot of discussion about source lookup issues. Would it be possible to create unit tests that explains the existing problems? I'm having a hard time understanding the all the underlying problem from the discussions on the mailing lists. There seem to be a lot of "common" knowledge of issues which _hopefully_ could be expressed in tests.


Cheers,
Tobias

-----Original Message-----
From: dsdp-dd-dev-bounces@xxxxxxxxxxx [mailto:dsdp-dd-dev-bounces@xxxxxxxxxxx] On Behalf Of Pawel Piech
Sent: den 26 februari 2008 22:56
To: Device Debugging developer discussions
Subject: [dsdp-dd-dev] GDB source lookup issues

Hi Tobias and All,
I'm want to cross-post the following discussion from cdt-dev, which we mentioned in this mornings DSF-GDB meeting: http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg11583.html

It seems that Windows and cross platform development with GDB could be much improved if this source lookup issue was addressed.  If after fixing bug 219920 source lookup continues to be a problem for your use cases, I recommend that you follow up and contribute to fixing this issue in CDT.

Cheers,
Pawel
_______________________________________________
dsdp-dd-dev mailing list
dsdp-dd-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-dd-dev
_______________________________________________
dsdp-dd-dev mailing list
dsdp-dd-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-dd-dev



Back to the top