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
55a57c21
Commit
55a57c21
authored
Apr 26, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Properly handle EOF on input.
parent
87e82043
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
dbg.y
programs/winedbg/dbg.y
+4
-3
debug.l
programs/winedbg/debug.l
+4
-3
symbol.c
programs/winedbg/symbol.c
+1
-0
No files found.
programs/winedbg/dbg.y
View file @
55a57c21
...
...
@@ -472,7 +472,8 @@ int input_fetch_entire_line(const char* pfx, char** line)
do
{
if (!ReadFile(dbg_parser_input, &ch, 1, &nread, NULL) || nread == 0)
break;
return -1;
if (len + 2 > alloc)
{
while (len + 2 > alloc) alloc *= 2;
...
...
@@ -489,9 +490,9 @@ int input_fetch_entire_line(const char* pfx, char** line)
int input_read_line(const char* pfx, char* buf, int size)
{
char* line = NULL;
size_t len = 0;
len = input_fetch_entire_line(pfx, &line);
int len = input_fetch_entire_line(pfx, &line);
if (len < 0) return 0;
/* remove trailing \n */
if (len > 0 && line[len - 1] == '\n') len--;
len = min(size - 1, len);
...
...
programs/winedbg/debug.l
View file @
55a57c21
...
...
@@ -33,9 +33,9 @@
static int read_input(const char* pfx, char* buf, int size)
{
size_t
len;
static char* last_line = NULL;
static size_t last_line_idx = 0;
int
len;
static char* last_line = NULL;
static size_t last_line_idx = 0;
/* try first to fetch the remaining of an existing line */
if (last_line_idx == 0)
...
...
@@ -44,6 +44,7 @@ static size_t last_line_idx = 0;
/* no remaining chars to be read from last line, grab a brand new line up to '\n' */
lexeme_flush();
len = input_fetch_entire_line(pfx, &tmp);
if (len < 0) return 0; /* eof */
/* FIXME: should have a pair of buffers, and switch between the two, instead of
* reallocating a new one for each line
*/
...
...
programs/winedbg/symbol.c
View file @
55a57c21
...
...
@@ -360,6 +360,7 @@ enum sym_get_lval symbol_get_lvalue(const char* name, const int lineno,
if
(
i
<
1
||
i
>
sgv
.
num
)
dbg_printf
(
"Invalid choice %d
\n
"
,
i
);
}
else
return
sglv_aborted
;
}
while
(
i
<
1
||
i
>
sgv
.
num
);
/* The array is 0-based, but the choices are 1..n,
...
...
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