Skip to content
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

Hooked GDB to JITEventListener, cleaned jitlayers GDB interface #28407

Merged
merged 1 commit into from
Aug 16, 2018

Conversation

fisiognomico
Copy link
Contributor

After #27466 we can hook GDB Listener to JITEventListener.

cc @vtjnash @vchuravy

Copy link
Member

@vchuravy vchuravy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! That does clean things up.

@@ -70,6 +71,9 @@ using namespace llvm;
#include "julia_assert.h"

RTDyldMemoryManager* createRTDyldMemoryManager(void);
using namespace llvm;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need these new namespaces?

@@ -54,7 +54,8 @@ namespace llvm {
#include <llvm/IR/DataLayout.h>
#include <llvm/Support/DynamicLibrary.h>


#include <llvm/ExecutionEngine/ExecutionEngine.h>
#include <llvm/ExecutionEngine/JITEventListener.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these includes necessary?

@fisiognomico
Copy link
Contributor Author

Sorry, I forgot them there. At CI an error very similar to #28379 appeared, I hope that after rebase they will pass.

@fisiognomico fisiognomico force-pushed the df/GDBlistener branch 2 times, most recently from 6d55c8e to aa8a558 Compare August 4, 2018 13:30
@fisiognomico
Copy link
Contributor Author

Bump! CI now passes

@@ -402,10 +336,9 @@ void JuliaOJIT::DebugObjectRegistrar::registerObject(RTDyldObjHandleT H, const O
std::move(NewBuffer));
}
else {
NotifyGDB(SavedObject);
JIT.NotifyFinalizer(*(SavedObject.getBinary()), *LO);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

@@ -70,6 +69,7 @@ using namespace llvm;
#include "julia_assert.h"

RTDyldMemoryManager* createRTDyldMemoryManager(void);
using namespace llvm::object;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary namespace

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without it I get a compilation error : Owning Binary not declared in this scope.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using the namespace can you prefix the names? If it is a lot more than a handful place the namespace is ok, but I suspect it is only in one or two places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yeah effectively it can be more convenient :D

@fisiognomico fisiognomico force-pushed the df/GDBlistener branch 2 times, most recently from 8d229b9 to ff2b0ce Compare August 12, 2018 11:22
Copy link
Member

@vchuravy vchuravy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vchuravy vchuravy merged commit d936625 into JuliaLang:master Aug 16, 2018
@KristofferC
Copy link
Member

Should this be backported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants