This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix for PR gdb/9538 (loading of separate debuginfo and symlinks).


On Thu, Jan 12, 2012 at 9:23 AM, Doug Evans <dje@google.com> wrote:

> The symfile.c change is ok with me, modulo can you add comments for
> each of the functions?

Done.

I've also refactored the code a bit more to avoid searching the same
directory again.

> [caveat: I think it doesn't properly handle paths with dos drives, but
> the code already has that problem, so no requirement to fix that in
> this patch]

I don't think ".gnu_debuglink" is supported on non-ELF platforms, so not
handling DOS drives is likely not a problem.

> I see sepdebug.exp uses remote_exec so best use that instead of exec.

Done.

> Also, I'm not sure what the portability requirements are w.r.t. symlinks.
> Probably best to watch for errors in the "ln -s" and handle appropriately.

The test exits if gdb_gnu_strip_debug fails. I don't believe it will
currently succeed on any platform without symlinks.

Testing for errors will just add noise.

> [Even better, is there a utility routine that will create a symlink?
> All the portability concerns could be tucked away in there.]

I didn't find one.

> Also, can you use clean_restart instead of the gdb_exit/gdb_start/... sequence?

Done.

Thanks,
-- 
Paul Pluzhnikov


2012-01-11  Paul Pluzhnikov  <ppluzhnikov@google.com>

	PR gdb/9538
	* symfile.c (find_separate_debug_file): New function.
	(terminate_after_last_dir_separator): Likewise.
	(find_separate_debug_file_by_debuglink): Also try realpath.


testsuite/ChangeLog:

	PR gdb/9538
	* gdb.base/sepdebug.exp: New test.

Attachment: gdb-symlink-pr9538-20120112.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]