Aloha-- A little assistance would be welcome with configuring the GDB Debugger with Eclipse. When debugging a c++ program and initializing GDB through Eclipse, GDB prints a console warning (copy attached) that it is unable to find "dynamic linker breakpoint function," and "Could not load shared library symbols for 13 libraries." Pressing ahead with debugging, GDB starts but hangs on a call to a Bluetooth function declared in bluetooth.h, which is located in .../sysroots/i586-pokey-linux/user/include/bluetooth. Command line queries to GDB through a terminal to the Edison target using the show sysroot and show solib-search-path commands returned no paths for either (e.g., GDB returns a message: "The current system root is ' ' .") I tried entering the iotdk sysroot path ( ".../iotdk-ide-mac/devkit-x86/sysroots/i586-poke-linux"), but no change in behavior. I am at a loss figuring out what libraries GDB wants or how to set them. Any insight would be appreciated.
I would like to replicate the behavior you have with your code so I will ask you some questions
1. Could you post a snippet of your code?
2. Which Eclipse IDE version you have? Go to Help > About Eclipse Platform
3. Are you using the default debugger or are you installing another one from a repository or another software?
4. Are you adding the –lbluetooth flag in Project > Properties > Cross GCC Linker > Miscellaneous > Linker Flags ?. If you haven't, do not copy and paste the –lbluetooth text from here due to format issues when there are pasted characters in Eclipse, please write it yourself in order to avoid these problems, then click on Apply and OK.
Let me know about this so I could replicate it in case the linker flag don't solve the issue.
Thanks for the quick response. Regrettably, I cannot replicate the hang today, though GDB continues to give me the startup warning attached to my original post. I will continue to work, and if it repeats I will report back to the forum. Until then, feel free to close this report. Best regards, Stuart
P.s.: Yes, the linker flag -lbluetooth was set; otherwise the program won't compile.
The attached, skeleton program (Sketch_Report_8.cpp) should demonstrate the GDB hang. On my machine, the program compiles, but GDB hangs at line 25. When lines 36-39 are commented out, GDB runs until line 30 and then hangs. When GDB initializes, it gives the warning attached to my original post.
Any insight would be appreciated.
I have problems while compiling your code, specifically with the tasks related to the libraries StateMachine_1_2.h and Contact.h.
The first problem shown by Eclipse is line 25, where GDB stops in your machine. I commented lines 36-39 but didn't have a different outcome.
I suggest you to look into your custom libraries.
Also, I'm not sure if you forget to attach the StateMachine_1_2.cpp or if the library doesn't need it.
Thanks for your help with my puzzle. Apologies: in my earlier post I attached the header file twice when I meant to attach both header and source file. (I was trying to make it as easy for you as possible.) The source file is attached and, hopefully, you can compile the program. In this form, the class is just a container for a single variable with a constructor, accessor, and mutator. Any enlightenment would be welcome.
I added the StateMachine_1_2.cpp file but I'm still unable to compile and run your code.
Have you tried to add in your code all the functions and operations that are handled by the libraries in order to check if the problems is while the code links the libraries? The problem seems to be directly related with them I suggest you to debug them.
I hope the good Karma you are building by helping people like me rewards you in this life or the next.
Your suggestion was helpful in narrowing the problem, but I still suspect the cause of the hang in my system is a GDB environment setting. The attached source file compiles and runs, but the GDB debugger hangs on the first statement in main. Following your suggestion, I stripped out all class declarations and found a group of 3 statements that reliably cause the hang on my system (Eclipse, default GDB as discussed in earlier posts). The attached file is pretty much just those three statements. Commenting them out lets GDB run. I hope it compiles on your system as it does on mine. I added a few comments in the file about the three statements that you might find helpful.
We discovered earlier that the default version of Eclipse that downloads from the Intel site was not pre-configured to link to the bluetooth libraries. I wonder whether GDB needs an environment setting to let if find whatever it needs (as suggested by the error message attached to my earlier post).
As always, any enlightenment would be much appreciated.
I would like to know if you have tried to update it or add it manually. The problem could be that the GDB is not a full version as you mentioned. I suggest you to contact https://eclipse.org/org/foundation/contact.php Eclipse - Contact to ask if there is a way to include a full version of the debugger in the Eclipse Version Luna SR2 (4.4.2). The default debugger may need a package or setting in order to link all its requirements/files and I think they could help you with this.