Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1adbe826
Commit
1adbe826
authored
Mar 15, 2011
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Display a valid source file when reporting an error about a missing source file.
parent
77eefaed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
source.c
programs/winedbg/source.c
+20
-12
No files found.
programs/winedbg/source.c
View file @
1adbe826
...
...
@@ -199,31 +199,39 @@ static int source_display(const char* sourcefile, int start, int end)
if
(
dbg_interactiveP
)
{
char
zbuf
[
256
];
for
(;;)
{
size_t
len
;
/*
* Still couldn't find it. Ask user for path to add.
*/
snprintf
(
zbuf
,
sizeof
(
zbuf
),
"Enter path to file '%s'
: "
,
sourcefile
);
snprintf
(
zbuf
,
sizeof
(
zbuf
),
"Enter path to file '%s' (<cr> to end search)
: "
,
sourcefile
);
input_read_line
(
zbuf
,
tmppath
,
sizeof
(
tmppath
));
if
(
tmppath
[
strlen
(
tmppath
)
-
1
]
!=
'/'
)
{
strcat
(
tmppath
,
"/"
);
if
(
!
(
len
=
strlen
(
tmppath
)))
break
;
/* append '/' if missing at the end */
if
(
tmppath
[
len
-
1
]
!=
'/'
&&
tmppath
[
len
-
1
]
!=
'\\'
)
tmppath
[
len
++
]
=
'/'
;
strcpy
(
&
tmppath
[
len
],
basename
);
if
(
GetFileAttributesA
(
tmppath
)
!=
INVALID_FILE_ATTRIBUTES
)
break
;
dbg_printf
(
"Unable to access file '%s'
\n
"
,
tmppath
);
}
/*
* Now append the base file name.
*/
strcat
(
tmppath
,
basename
);
}
else
tmppath
[
0
]
=
'\0'
;
else
{
dbg_printf
(
"Unable to access file '%s'
\n
"
,
sourcefile
);
tmppath
[
0
]
=
'\0'
;
}
if
(
GetFileAttributesA
(
tmppath
)
==
INVALID_FILE_ATTRIBUTES
)
if
(
!
tmppath
[
0
]
)
{
/*
* OK, I guess the user doesn't really want to see it
* after all.
*/
ol
=
source_add_file
(
sourcefile
,
NULL
);
dbg_printf
(
"Unable to open file '%s'
\n
"
,
tmppath
);
return
FALSE
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment