Jump to content

Using Debug mode.


Recommended Posts

I don't know how autotools flow works. But in case you can use CMake, it is very easy to complie in debug mode, just add -DCMAKE_BUILD_TYPE=Debug when generating Makefile.

 

$ mkdir build_debug
$ cd build_debug
$ cmake ../ -DCMAKE_BUILD_TYPE=Debug
$ make -j8 simple_fifo
$ gdb ./examples/sysc/simple_fifo/simple_fifo 

 

Link to comment
Share on other sites

If you use the Makefile provided along the simple_fifo example, it should get compiled with debug symbols. On the console, you should see that the .cpp files get compiled with the "-g" switch. To actually make use of the debugging symbols, you have to execute the example in a debugger such as gdb (as Roman already pointed out).

By the way, "make -d" does not influence which flags are passed to the C++ compiler. It just makes the output of make itself more verbose.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...