Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

some c::b/gdb file/path issues (encountered branch "splitting debugger in two")

<< < (2/2)

cbexaminr:
Well, poking at this a bit further, I now believe the way gdb handles its canonicalization of paths is not the most reliable approach for all platforms.

It appears to try to canonicalize them according to the platform its hosted on.  Unfortunately, in the case of windows, the canonical paths are not the only legitimate absolute paths, (basically, the difference between \ and /.)  And, codeblocks on windows, appears to construct its paths, at least those passed to gdb, with (forward) /'s.

I'm not sure of the depth of the problem, but some code I've hacked together in the (gdb) source.c/openp() routine, to perform 'internal' conversion of hybrid paths to absolute with all '/', results in my being able to set breakpoints from the codeblocks editor without having them pend(ing).  With the exception of one (breakpoint'd) line that appears to have an incorrect address locatiion, the breakpoints will trigger.  (So I currently assume there's something funky about that particular liine in the debug info, or something about the code generated.)

Even if codeblocks were to reverse the path segment separators it uses on windows from / to \, I don't know if that would help - I'm not sure gdb necessarily always attempts and achieves its (previously existing) internal conversions (by the point where I've hacked), and thus might still miss finding the paths passed by C::B...  I suspect such failure, because the paths I see passed back to c::b don't appear to have been corrected, at points that I think they should have been (i.e. not at all), suggesting there's some early exit from some of the paths in gdb's gdb_realpath() and xfullpath(), before its actually converted.

The path to a solution currently seems to be unpleasantly covered with thorns...

[edit: some of that is actually handled by routines in libiberty.]

oBFusCATed:
Probably a better place to discuss the internals of gdb is the gdb's mailing list, here we could not help you much, unfortunately :(

ollydbg:
@cbexaminr
Just a reminder, I found the same issue, with the relative path and absolute path problem.

see:
Re: Debugger initialization commands to debug in wxWidgets

and hopefully, it can be fixed :D

Navigation

[0] Message Index

[*] Previous page

Go to full version