Debugging add-ons under Linux

Tecplot's Add-on Developer's Kit

Moderators: davetaflin, salter, steve, jprenaud, straton, Chris Idso

jim

Debugging add-ons under Linux

Postby jim » Thu Dec 21, 2006 12:37 pm

This is apparently not documented:

1. Compile a debug version of the addon.
2. Start up tecplot with the debug enabled addon loaded.
3. In another shell, go to the source directory where you have your addon and type the following:

ddd $TEC360HOME/bin/tecplot.shared

4. Choose "File/Attach to Process". ddd should automatically "pick" the correct process to attach to. Press "Attach".
5. At this point you are debugging the tecplot application which has your addon attached. Any gdb command will work.
One useful thing to do is

(gdb) list mymodule.c:100

This will dive into the module called "mymodule.c" starting at line 10the module called "mymodule.c" starting at line 100. In ddd you can then scroll through the source and set breakpoints etc. When you are ready to roll press the "Cont" button.[/list]

barry.mukund
Experienced user
Posts: 17
Joined: Fri Jan 04, 2008 11:12 am
Location: Santa Clara
Contact:

Re: Debugging add-ons under Linux

Postby barry.mukund » Wed Jan 09, 2008 12:36 pm

I did find this docuented in adkum.pdf.

If you wan to use your own favorite debugger, do this:

1. Find <Tecplot_installation_bin_dir>/tecplot.sh
file and edit the DEBUGCMD variable and introduce your own debugger.
In my case, I use totalview.

2. If you want to copy tecplot.sh and create your own version (so that the
original is not modified), then you need to do additional step to get
tec360 to work with your debugger.
So, the steps are:
2-a) Copy the tecplot.sh file, modify it to say "your_own_tecplot.sh"
2-b) modify the "tec360" link to point to "your_own_tecplot.sh"
(Do "man ln" to find out how to do this: Basically, do
ln -s <full_path_to_your_own_tecplot> tec360
This will create a soft link to tec360)
2-c) run tec360 as before and it should start with your debugger

3. If you use "-loadaddon" command or any other command to load your
add-on, then these will be ignored. You have to manually add your
add-on after starting the debug version.


Barry[/list]


Return to “Add-on Developer's Kit (ADK)”

Who is online

Users browsing this forum: No registered users and 1 guest