Re: [patch gdb]: Fix some DOS-path related issues in gdb

Mark Kettenis
2011-03-23T11:09:43Z

> Date: Wed, 23 Mar 2011 11:39:33 +0100
> From: Kai Tietz <ktietz70@googlemail.com>
>
> 2011/3/3 Eli Zaretskii <eliz@gnu.org>:
> >> Date: Thu, 3 Mar 2011 18:58:32 +0400
> >> From: Joel Brobecker <brobecker@adacore.com>
> >> Cc: Kai Tietz <ktietz70@googlemail.com>, gdb-patches@sourceware.org
> >>
> >> > I didn't know that the Windows 64bit target can use ELF debug info.
> >> > Can it? =A0With what toolchains?
> >> >
> >> > As for mdebugread.c, I always thought it was MIPS specific. =A0What
> >> > other platforms use it?
> >>
> >> These would still be pertinent in the case of cross debugging, no?
> >> If the files were cross-compiled on Windows, the debug info would
> >> contain file paths that follow the Windows convention...
> >
> > Is that use-case even practical? =A0Who would develop on Windows if they
> > have Linux or Irix?
> >
> > Anyway, if others don't mind to have DOS-ism in mdebugread.c and
> > elfread.c, I don't object.
> >
>
> Hello,
>
> I have updated patch against current trunk. Additionally I replaced
> the strrchr-patterns by lbasename. As now some time has pasted, I
> would like to kindly ask, if this patch is ok, or if there are still
> objections?

You continue to make it hard for me to review your diffs by sending
them as base64-encoded MIME attachments. But the solib-som.c bit
should be dropped. It's a HP-UX native-only bit.

> 2011-03-23 Kai Tietz
>
> * breakpoint.c (clear_command): Use filename_cmp
> instead of strcmp for comparision.
> * buildsym.c (watch_main_source_file_lossage): Likewise.
> (patch_subfile_names): Use IS_DIR_SEPARATOR instead of
> checking just for slash.
> * dbxread.c (read_dbx_symtab): Use lbasename instead of
> strrchr and filename_cmp instead of strcmp for filenames.
> (add_old_header_file): Use filename_cmp
> instead of strcmp for comparision.
> * exec.c (exec_set_section_address): Likewise.
> * macrotab.c (macro_lookup_inclusion): Likewise.
> (macro_lookup_inclusion): Likewise.
> * elfread.c (_initialize_elfread): Likewise.
> (elfstab_offset_sections): Likewise.
> (elfstab_offset_sections): Use lbasename instead of
> strrchr.
> * mdebugread.c (parse_partial_symbols): Likewise.
> (arse_partial_symbols): Use filename_(n)cmp instead of
> str(n)cmp for comparision.
> * minsyms.c (lookup_minimal_symbol): Likewise.
> * psymtab.c (read_psymtabs_with_filename): Likewise.
> * solib-som.c (match_main): Likewise.
> * solib.c (solib_read_symbols): Likewise.
> (reload_shared_libraries_1): Likewise.
> * symmisc.c (maintenance_print_symbols): Likewise.
> * symfile.c (separate_debug_file_exists): Likewise.
> (reread_symbols): Likewise.
> (find_separate_debug_file_by_debuglink): Likewise.
> * remote-fileio.c (remote_fileio_func_rename): Likewise.
> * source.c (add_path): Likewise.
> * symtab.c (filename_seen): Likewise.
> (file_matches): Likewise.
> (print_symbol_info): Likewise.
> (maybe_add_partial_symtab_filename): Likewise.
> (make_source_files_completion_list): Likewise.
> * xml-support.c (fetch_xml_builtin): Likewise.
> * xml-syscall.c (init_sysinfo): Likewise.
> * dwarf2read.c (find_file_and_directory): Use IS_ABSOLUTE_PATH.
> * windows-nat.c (_initialize_check_for_gdb_ini): Use
> IS_DIR_SEPARATOR for checking for trailing path separator.
>
> Regards,
> Kai
>
> --90e6ba5bb9ddf94d87049f23f904
> Content-Type: text/plain; charset=US-ASCII; name="gdb_filename.txt"
> Content-Disposition: attachment; filename="gdb_filename.txt"
> Content-Transfer-Encoding: base64
> X-Attachment-Id: f_glm4fqsk0
>
> SW5kZXg6IGdkYi9icmVha3BvaW50LmMKPT09PT09PT09PT09PT09PT09PT09
> PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
> PQotLS0gZ2RiLm9yaWcvYnJlYWtwb2ludC5jCTIwMTEtMDMtMjMgMTA6MzE6
> NTkuNjM1MTU5MzAwICswMTAwCisrKyBnZGIvYnJlYWtwb2ludC5jCTIwMTEt
> MDMtMjMgMTA6NTY6MTcuMDE0NzIzMDAwICswMTAwCkBAIC0zOSw2ICszOSw3