gdb files with same name.

1)Brief introduction 

When we have two files with same, i.e.*/src/search.cpp  & */util/search.cpp. 

If we set break point in serach.cpp. The break point will be valid in both.

When the program is running, it will stop at the break point where it runs across.

If we want to set break point at only one file. We have to add the path of the file ahead.

2) Experiment

a. gdb same file, same function in same class. The  executive funciton is decided on build time.
but the file is from different source. first is from the building tool, and the second one is from plugin.
The prjecter said the program will run across the plugin as default when it comes to this situation.
eltwise experiment:
It shows that breakpoint is set at the ops/eltwise.cpp, but when execute it, the program stop at plugin/eltwise.cpp.

b. Now we will setup two same files in different folder with same function in it.  The excutive function is decided on run time.
Let we see what happens.
Experiment: Bias_add bias_add.cpp with BuilderParams in folder named bias_add1 and bias_add2 each.
we use score to switch which will be called.

It raised error because of the multi definiation of the plugin class in the period of compiling.
Then let's changes the class name to another.

Now we have two different class from the files have the same name .

3)In one word.
Break point will set to all the files, 
The progrommme will stop at the break point when it flows across.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值