We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1e6f49 commit 57f08e1Copy full SHA for 57f08e1
src/memory-analyzer/gdb_api.cpp
@@ -59,7 +59,15 @@ gdb_apit::~gdb_apit()
59
60
size_t gdb_apit::query_malloc_size(const std::string &pointer_expr)
61
{
62
+#ifdef __linux__
63
write_to_gdb("-var-create tmp * malloc_usable_size(" + pointer_expr + ")");
64
+#elif __APPLE__
65
+ write_to_gdb("-var-create tmp * malloc_size(" + pointer_expr + ")");
66
+#else
67
+ // Under non-linux/OSX system we simple return 1, i.e. as if the \p
68
+ // pointer_expr was not dynamically allocated.
69
+ return 1;
70
+#endif
71
72
if(!was_command_accepted())
73
0 commit comments