Skip to content

[LLDB] Modifying expression code in MakeLoadImageUtilityFunction to be more consistent #4090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ PlatformPOSIX::MakeLoadImageUtilityFunction(ExecutionContext &exe_ctx,
const char *error_str;
};

extern void *memcpy(void *, const void *, size_t size);
extern size_t strlen(const char *);
extern "C" void *memcpy(void *, const void *, size_t size);
extern "C" size_t strlen(const char *);


void * __lldb_dlopen_wrapper (const char *name,
Expand Down Expand Up @@ -624,7 +624,7 @@ PlatformPOSIX::MakeLoadImageUtilityFunction(ExecutionContext &exe_ctx,
DiagnosticManager diagnostics;

auto utility_fn_or_error = process->GetTarget().CreateUtilityFunction(
std::move(expr), dlopen_wrapper_name, eLanguageTypeObjC, exe_ctx);
std::move(expr), dlopen_wrapper_name, eLanguageTypeC_plus_plus, exe_ctx);
if (!utility_fn_or_error) {
std::string error_str = llvm::toString(utility_fn_or_error.takeError());
error.SetErrorStringWithFormat("dlopen error: could not create utility"
Expand Down