Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
eabe3eae
Unverified
Commit
eabe3eae
authored
Sep 19, 2020
by
David CARLIER
Committed by
GitHub
Sep 19, 2020
Browse files
debug.c: NetBSD build warning fix. (#7810)
The symbol base address is a const on this system.
parent
b002d2b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/debug.c
View file @
eabe3eae
...
@@ -1647,13 +1647,14 @@ void dumpCodeAroundEIP(void *eip) {
...
@@ -1647,13 +1647,14 @@ void dumpCodeAroundEIP(void *eip) {
/* Find the address of the next page, which is our "safety"
/* Find the address of the next page, which is our "safety"
* limit when dumping. Then try to dump just 128 bytes more
* limit when dumping. Then try to dump just 128 bytes more
* than EIP if there is room, or stop sooner. */
* than EIP if there is room, or stop sooner. */
void
*
base
=
(
void
*
)
info
.
dli_saddr
;
unsigned
long
next
=
((
unsigned
long
)
eip
+
sz
)
&
~
(
sz
-
1
);
unsigned
long
next
=
((
unsigned
long
)
eip
+
sz
)
&
~
(
sz
-
1
);
unsigned
long
end
=
(
unsigned
long
)
eip
+
128
;
unsigned
long
end
=
(
unsigned
long
)
eip
+
128
;
if
(
end
>
next
)
end
=
next
;
if
(
end
>
next
)
end
=
next
;
len
=
end
-
(
unsigned
long
)
info
.
dli_saddr
;
len
=
end
-
(
unsigned
long
)
base
;
serverLogHexDump
(
LL_WARNING
,
"dump of function"
,
serverLogHexDump
(
LL_WARNING
,
"dump of function"
,
info
.
dli_saddr
,
len
);
base
,
len
);
dumpX86Calls
(
info
.
dli_saddr
,
len
);
dumpX86Calls
(
base
,
len
);
}
}
}
}
}
}
...
...
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