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

Please add more detail about how to use gdb to debug pass #29

Open
wuxiaoqiang12 opened this issue Mar 20, 2021 · 2 comments
Open

Please add more detail about how to use gdb to debug pass #29

wuxiaoqiang12 opened this issue Mar 20, 2021 · 2 comments

Comments

@wuxiaoqiang12
Copy link

I follow your guide about how to debug using gdb on ubuntu. But my gdb cannot see the source file.
I using following command:

clang -emit-llvm -S -O1 input_for_mba.c -o input_for_mba.ll
gdb --args opt -S -load-pass-plugin ../build/lib/libMBAAdd.so -passes=mba-add input_for_mba.ll
b ../lib/MBAAdd.cpp:MBAAdd::run

gdb said: No source file named ../lib/MBAAdd.cpp.

(gdb) info source
No current source file.

Please help me. thanks a lot

@banach-space
Copy link
Owner

Hi @wuxiaoqiang12 , thank for creating this issue!

The instructions in REDME.md recommend this:

b MBAAdd.cpp:MBAAdd::run

Any particular reason to use this instead:

b ../lib/MBAAdd.cpp:MBAAdd::run

? Also, there is no MBAAdd.cpp in the lib sub directory. That's why gdb is failing.

@science-enthusiast
Copy link

science-enthusiast commented Oct 12, 2023

It helps to type y (i.e., yes) as the answer to "Make breakpoint pending on future shared library load? (y or [n])" that follows "No source file named ...".

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

No branches or pull requests

3 participants