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

Debugging virtual platform with gdb ( related with #11 ) #55

Open
Abraham-Xu opened this issue Apr 13, 2020 · 1 comment
Open

Debugging virtual platform with gdb ( related with #11 ) #55

Abraham-Xu opened this issue Apr 13, 2020 · 1 comment

Comments

@Abraham-Xu
Copy link

Quoted from #11
Hi boiihong,

You want to see how NVDLA cmodel work step by step with source code?
Currently DLA cmod code does not include debug version, so if you want to see the source code in gdb, you need to do some hack in Makefile
https://github.com/nvdla/hw/blob/nvdlav1/cmod/Makefile
CPPFLAGS ?= $(INC_FLAGS) -MMD -MP -g -fPIC -Wall -Werror -DSC_INCLUDE_DYNAMIC_PROCESSES -Wp,-w -std=c++11

After the hack, you need to re-compile the HW and VP code.
Now you can set the breakpoint inside the DLA cmod code, such as b NvdlaAxiAdaptor.cpp:60

When SW test begin, gdb will stop with breakpoint.
image

Now, you can check the DLA behavior by next command

Best Regards,
Haiqing

My Question:
Hi, Haiqing,
When I try this method, the problem I encountered is that the program can only stop before entering vp but not in vp. Is there any solution to stop at the breakpoints in cmod when vp runing? This problem puzzled me for a long time. Thank you very much!

@linbaiwpi
Copy link

Hi @Abraham-Xu

Can you explain your problem in detail? Maybe with some figures

BR,
Lin

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

2 participants