Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
84cd15a0
Commit
84cd15a0
authored
May 15, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
May 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Replace realloc() with HeapReAlloc().
parent
ce5bb8b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
gdbproxy.c
programs/winedbg/gdbproxy.c
+10
-2
No files found.
programs/winedbg/gdbproxy.c
View file @
84cd15a0
...
...
@@ -823,12 +823,20 @@ static void get_thread_info(struct gdb_context* gdbctx, unsigned tid,
enum
packet_return
{
packet_error
=
0x00
,
packet_ok
=
0x01
,
packet_done
=
0x02
,
packet_last_f
=
0x80
};
static
char
*
packet_realloc
(
char
*
buf
,
int
size
)
{
if
(
!
buf
)
return
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
buf
,
size
);
}
static
void
packet_reply_grow
(
struct
gdb_context
*
gdbctx
,
size_t
size
)
{
if
(
gdbctx
->
out_buf_alloc
<
gdbctx
->
out_len
+
size
)
{
gdbctx
->
out_buf_alloc
=
((
gdbctx
->
out_len
+
size
)
/
32
+
1
)
*
32
;
gdbctx
->
out_buf
=
realloc
(
gdbctx
->
out_buf
,
gdbctx
->
out_buf_alloc
);
gdbctx
->
out_buf
=
packet_
realloc
(
gdbctx
->
out_buf
,
gdbctx
->
out_buf_alloc
);
}
}
...
...
@@ -2105,7 +2113,7 @@ static int fetch_data(struct gdb_context* gdbctx)
{
#define STEP 128
if
(
gdbctx
->
in_len
+
STEP
>
gdbctx
->
in_buf_alloc
)
gdbctx
->
in_buf
=
realloc
(
gdbctx
->
in_buf
,
gdbctx
->
in_buf_alloc
+=
STEP
);
gdbctx
->
in_buf
=
packet_
realloc
(
gdbctx
->
in_buf
,
gdbctx
->
in_buf_alloc
+=
STEP
);
#undef STEP
if
(
gdbctx
->
trace
&
GDBPXY_TRC_LOWLEVEL
)
fprintf
(
stderr
,
"%d %d %*.*s
\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