I found out about the debug build cmake option, with
cmake -DCMAKE_BUILD_TYPE=Debug ...and I was able to get into the PLlot code, at
least someI replaced the code with the code from the PLplot wxwidgets demo,
just to make sure the error is not on my code.and the stack call isvoid
Plot(wxPLplotwindow<WXWINDOW> *plotwindow){wxPLplotstream* pls =
plotwindow->GetStream();...pls->adv( 0 );then inside adv()plstream::adv( PLINT
page ){set_stream();the segmentation fault happens herehowever in the linux
build I *cannot* step into set_stream();I wonder why, I was able to step into
here but not further , it makes no senseCould it be because of the use of
templates in the PLPlot wxWidgets code?----- Original Message -----
From: Pedro Vicente
To: plplot-devel@lists.sourceforge.net
Sent: Thursday, December 08, 2016 1:52 AM
Subject: [Plplot-devel] build PLPlot with debug symbols in linux / cmake
Hi Alan
I have a wxWidgets application that I developed for Windows and Linux that
uses PLplot .
I started having a segfault on the *Linux* only version.
Debugging in Windows is a breeze with Visual Studio.
For Linux I was able to make a QtCreator project to debug (yes, Qt debugging
wxWidgets !)
However when I try to step into the PLplot code, there is no step into,
because probably debugging symbols were not built
I used the following cmake call
cmake .. -G "Unix Makefiles" -DBUILD_SHARED_LIBS:BOOL=OFF
-DENABLE_f95:BOOL=OFF -DENABLE_tcl:BOOL=OFF -DENABLE_tk:BOOL=OFF
-DCMAKE_INSTALL_PREFIX:PATH=/data/data127/pvicente/install/plplot-5.11.1
-DPL_HAVE_PTHREAD:BOOL=OFF -DPLD_xwin:BOOL=OFF -DPLD_wxwidgets:BOOL=ON
-DwxWidgets_ROOT_DIR:PATH=/data/data127/pvicente/install/wxwidgets-3.1.0
-DwxWidgets_LIB_DIR:PATH=/data/data127/pvicente/install/wxwidgets-3.1.0/lib
-DwxWidgets_CONFIGURATION=mswud -DENABLE_MIX_CXX=ON
-DwxWidgets_EXCLUDE_COMMON_LIBRARIES:BOOL=OFF
this is more probably a cmake question, but I am not that familiar with
cmake, so the question is,
how can I add debug symbols to PLPlot for the above cmake call?
The code is attached
The segfault happens when I try to get into the init() call here
wx_PLplotstream* pls = frame->GetStream();
pls->init();
The weird thing is that I have nearly identical code for other application
that works fine
when I was learning the PLplot code , and the app was just exiting for unknow
reasons I found out that the init() call is dependent on at least 2 pallete and
2 font
files to read from several "standard" locations.
Since I develop cross platforms and in many machines I ended up doing a svn
repository with those 4 files at the same location as the program, like that
they are always found.
but that is not the cause here, because those file are found (by the way, is
there a way to eliminate the need to read those files?)
The Qt project is also attached in case anyone needs a Qt project to debug
wxWidgets and PLPlot
thanks
-Pedro
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel