mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +00:00
strace: Interpret errno codes for pointer-like return codes
This commit is contained in:
parent
81b6be4bf4
commit
4512e89159
1 changed files with 6 additions and 1 deletions
|
@ -386,7 +386,12 @@ public:
|
||||||
|
|
||||||
void format_result(void* res)
|
void format_result(void* res)
|
||||||
{
|
{
|
||||||
m_builder.appendff(") = {}\n", res);
|
if (res == MAP_FAILED)
|
||||||
|
m_builder.append(") = MAP_FAILED\n");
|
||||||
|
else if (FlatPtr(res) > FlatPtr(-EMAXERRNO))
|
||||||
|
m_builder.appendff(") = {} {}\n", res, errno_name(-static_cast<int>(FlatPtr(res))));
|
||||||
|
else
|
||||||
|
m_builder.appendff(") = {}\n", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
void format_result()
|
void format_result()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue