cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

noxmortem
Journeyman III

CodeAnalyst/CodeXL does not recognize g++ -g symbols (mingw 4.7.0)

Hello Ladies and Gentlemen!

I am trying to profile a small c++ executable which i am writing and it seems that CodeXL does not recognize the symbol information for any of the functions, which makes it pretty useless for me at the moment.

What did i miss to generate the symbols in a format which CodeXL can recognize, i thought -g when compiling and linking with g++/mingw should be sufficient.

I also tried -pg, -gddb already but they did not help either.

Someone seemed to had the exact same problem on stackoverflow but there was no response so i thought it might be a good idea to try to get some help here ont he devgurus board.

Best Wishes

Nox

0 Likes
10 Replies
ekatz
Staff

Hi Nox,

Currently CodeXL (up to version 1.2) does not support the STAB and DWARF symbols formats (on windows).

This will most likely be changed in the next version.

Best regards,

Ehud.

Thank you a lot!

At least i did not forget something I mean for my little needs gprof does the job but i still will follow the CodeXL project as i think it is really interesting.

Best Wishes,

Kevin

0 Likes
tomq
Journeyman III

Dear ekatz: could you elaborate on "soon"? I'm not looking for an exact answer, but an order of magnitude: are we talking days, weeks, months...? ...Years? I tried searching for an approximate release date for the next version, but could not find anything about it anywhere.

PS: I tried out CodeXL and was quite impressed. Kudos, amazing work. Alas it doesn't work with MinGW symbols... That makes it even more frustrating to revert to.... gprof... Which was surely at the top of the world when it came out, in 1982. 😉

0 Likes

Hi tomq,

It is actually a matter of a few months away. Soon...

tomq
Journeyman III

As far as I can tell (based on my tests, but perhaps I'm doing something wrong?), this is not supported in version 1.3 either. Perhaps in the next (minor) release =(

0 Likes

Hi tomq,

Are you using MinGW or Cywgin? Is it 32-bit or 64-bit? What version number?

Also, could you please post the full compilation command line used with GCC?

Thanks.

0 Likes
tomq
Journeyman III

Thank you for your answer, and apologies for my own late answer.

I am using MinGW, version 3.15.2. Or, using version-mingw-test.bat:

MINGWBASEDIR=C:\Qt\QtSDK\mingw

gcc version 4.4.0 (GCC)

GNU gdb 6.8

GNU ld (GNU Binutils) 2.19.1

GNU windres (GNU Binutils) 2.19.1

GNU dlltool (GNU Binutils) 2.19.1

GNU Make 3.81

#define __MINGW32_VERSION           3.15.2

#define __W32API_VERSION 3.13

The full GCC command (generated mostly by QtCreator...):

g++ -c -pipe -g -frtti -fexceptions -mthreads -DUNICODE -DQT_LARGEFILE_SUPPORT -DDEBUG -DCASSINI_WORKNAME -D_BACKWARD_BACKWARD_WARNING_H -DWINVER=0x500 -DQT_DLL -DQT_SQL_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN

I also tried the same with -ggdb instead of -g. When profiling the resulting executable with CPU: time-based sampling, both show no debug symbols (only assembly code).

Is this behavior expected for this configuration (MinGW + gcc), or a "bug" (in that case, possibly due to the specific set-up of gcc) ? Just knowing that would allow me to know whether to dig deeper or not.

0 Likes
weaselmetal
Journeyman III

I just wanted to hook in and express how important it would be for me to have CodeXL understand symbols of applications compiled with MinGW. When I learned that CodeXL supports both Linux and Windows (x64) I was superexcited since I need to analyse and compare the same program on Linux and Windows. For compilation I use gcc on Linux and MinGW on Windows. Unfortunatly, for now I can't analyse my Windows program.

When this can be done (hopefully soon), CodeXL truly is a killer-tool! Kudos!

0 Likes

We are currently working on supporting the MinGW symbols as well. This is a work in progress and will soon become available.

0 Likes

Sounds great! Can't wait for it. Need to analyse the windows program in order to finish my thesis.

Btw: Code Analyst doesn't understand MinGW symbols too, from what I've found in this forum. Is that correct?

0 Likes