2016-10-06 Sandra Loosemore PR gdb/20569 gdb/ * exceptions.c (exception_print_same): Moved here from exec.c. Fixed message comparison. * exceptions.h (exception_print_same): Declare. * exec_file_locate_attach (exception_print_same): Delete copy here. (exec_file_locate_attach): Rename exec_file and full_exec_path variables to avoid confusion between target and host pathnames. Move pathname processing logic to exec_file_find. Do not return early if pathname lookup fails; guard symbol_file_add_main call instead. * infrun.c (follow_exec): Split and rename execd_pathname variable to avoid confusion between target and host pathnames. Replace brokenpathname copy with cleanup to free malloc'ed string. Warn if pathname lookup fails. Pass target pathname to target_follow_exec, not hostpathname. Borrow exception-handling logic from exec_file_locate_attach. * solib.c (exec_file_find): Incorporate fallback logic for relative pathnames formerly in exec_file_locate_attach.