stefanbesler / twingrind

Call-graph profiling for TwinCAT 3
GNU General Public License v3.0
24 stars 3 forks source link

Symbol not found #5

Closed mriepl closed 1 year ago

mriepl commented 1 year ago

Hi,

if you compile you plc programm with the compiler definition "TC_SYM_WITH_NAMESPACE" you cant get access to the symbol. Because the Namspace of the Library will be added to the symbolname.

I would suggesst you to add an parameter for the symbol prefix,

Best Regards Markus

stefanbesler commented 1 year ago

Did not know about this Compiler define, is this documented by Beckhoff somewhere?

I guess you mean I should add an argument for the process and fetch python scripts? If so, np, I can do that

Am 05.10.2022 um 11:32 schrieb mriepl @.***>:

 Hi,

if you compile you plc programm with the compiler definition "TC_SYM_WITH_NAMESPACE" you cant get access to the symbol. Because the Namspace of the Library will be added to the symbolname.

I would suggesst you to add an parameter for the symbol prefix,

Best Regards Markus

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

mriepl commented 1 year ago

its not documented, but it adds the namespace to all symbols from libraries, thats it! this is neccessary if you have in two different libraries the same symbol!

yes please add an argument for the process and fetch script!

stefanbesler commented 1 year ago

You should be able to overwrite the namespace of the profiler library by using the new -N argument. If not specified, pytwingrind tries to connect to the profiler via "Profiler" (no namespace) and fallsback to using the default namespace "Twingrind.Profiler". I'll push a new release somewhen this week