[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/31527] gdb is not working for UNC path
From: |
simon.cook at embecosm dot com |
Subject: |
[Bug binutils/31527] gdb is not working for UNC path |
Date: |
Mon, 15 Apr 2024 13:18:14 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31527
Simon Cook <simon.cook at embecosm dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #15460|0 |1
is obsolete| |
--- Comment #14 from Simon Cook <simon.cook at embecosm dot com> ---
Created attachment 15464
--> https://sourceware.org/bugzilla/attachment.cgi?id=15464&action=edit
V2 Patch to fix issue, and cover more path variants
I've thought about this more over the weekend, and refactored this a bit more
to make it more robust, and more accurately cover relative paths when the
current working directory isn't a DOS path. I've updated the comments to
explain the methodology, but essentially these conversions are done based on
the input string:
- \\?\ -> don't touch, already in form
- \\xyz\... -> \\?\UNC\xyz\... (keeping a single \ after UNC to keep it a valid
input)
- C:\xyz... -> \\?\C:\...
- test.o, ../test.o, etc. -> check current working directory for correct
prefix, such that if e.g. CWD is C:\ we end up with \\?\C:\test.o, or
\\server\share\ becomes \\?\UNC\server\share\test.o
I've done some more testing with a small program feeding various strings into
_bfd_real_fopen both when running from local disk and network share and I think
the output is now correct in all cases. I did think could this be simplified as
it feels like I'm repeating myself, but the side effect of the early tests
being on char strings and the later tests being on wchar_t strings as provided
by Windows is a bit unfortunate.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/31527] gdb is not working for UNC path, (continued)
- [Bug binutils/31527] gdb is not working for UNC path, zhiqxion at qti dot qualcomm.com, 2024/04/08
- [Bug binutils/31527] gdb is not working for UNC path, simon.cook at embecosm dot com, 2024/04/08
- [Bug binutils/31527] gdb is not working for UNC path, zhiqxion at qti dot qualcomm.com, 2024/04/08
- [Bug binutils/31527] gdb is not working for UNC path, simon.cook at embecosm dot com, 2024/04/09
- [Bug binutils/31527] gdb is not working for UNC path, nickc at redhat dot com, 2024/04/10
- [Bug binutils/31527] gdb is not working for UNC path, tromey at sourceware dot org, 2024/04/10
- [Bug binutils/31527] gdb is not working for UNC path, zhiqxion at qti dot qualcomm.com, 2024/04/11
- [Bug binutils/31527] gdb is not working for UNC path, zhiqxion at qti dot qualcomm.com, 2024/04/11
- [Bug binutils/31527] gdb is not working for UNC path, simon.cook at embecosm dot com, 2024/04/11
- [Bug binutils/31527] gdb is not working for UNC path, nickc at redhat dot com, 2024/04/11
- [Bug binutils/31527] gdb is not working for UNC path,
simon.cook at embecosm dot com <=
- [Bug binutils/31527] gdb is not working for UNC path, cvs-commit at gcc dot gnu.org, 2024/04/15
- [Bug binutils/31527] gdb is not working for UNC path, nickc at redhat dot com, 2024/04/15
- [Bug binutils/31527] gdb is not working for UNC path, pexu at sourceware dot mail.kapsi.fi, 2024/04/16
- [Bug binutils/31527] gdb is not working for UNC path, simon.cook at embecosm dot com, 2024/04/16
- [Bug binutils/31527] gdb is not working for UNC path, nickc at redhat dot com, 2024/04/16