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

Here are some scenarios that should be supported:

1) Sources compiled on one host and IDE is used on another. Could be cross
platform, meaning problems with / and \, besides the path mapping.
Breakpoints are set by user using host path.

2) Combination of gcc and gdb makes paths like /bar/foo/../a.c and gdb does
not convert them to canonicalized name for comparison.
Breakpoints are set by user using canonic file name. Meaning unless IDE does
something setting /bar/a.c would fail.

3) Breakpoint is set on the file not within the set of debugged binary,
while basename of a file match one of the files within the set (correct
behaviour: breakpoint set should fail)

-----Original Message-----
From: dsdp-dd-dev-bounces@xxxxxxxxxxx
[mailto:dsdp-dd-dev-bounces@xxxxxxxxxxx] On Behalf Of Tobias Södergren XT
Sent: March 3, 2008 3:41 AM
To: Device Debugging developer discussions
Subject: RE: [dsdp-dd-dev] GDB source lookup issues

Hi Pawel and others,
I'm not sure that Elena Laskavaia's issue applies to dsdp-dd:

This is what happens in CDT:

MIBreakInsert[] createMIBreakInsert(LocationBreakpoint bkpt)
	ICDILocator locator = bkpt.getLocator();
	String file = locator.getFile();
	if (file != null) {
		file = new File(file).getName(); // <-- Just using the

This is what happens in DD:

void breakpointAdded(final IBreakpoint breakpoint)
	final List<Map<String, Object>> attrsArray = 
fBreakpointManager.isEnabled()); // <-- Creating attributes
	for (final IBreakpointsTargetDMContext dmc : fPlatformBPs.keySet())
		installBreakpoint(dmc, breakpoint, attrsArray, new
RequestMonitor(getExecutor(), countingRm));

void addBreakpoint(.., Map<String, Object> attributes, ...)
	String location = formatLocation(attributes) // <-- Using attributes

String formatLocation(..)
	String location = (String)  getProperty(attributes, ADDRESS,
	if (!fileName.equals(NULL_STRING)) {
		if (lineNumber != -1) {
			location = fileName + ":" + lineNumber;
		} else {
			location = fileName + ":" + function;
	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.


-----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:

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.

dsdp-dd-dev mailing list
dsdp-dd-dev mailing list

Back to the top