• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Blogs
  2. Verification
  3. Blazing a Trail With Ubuntu
jasona
jasona

Community Member

Blog Activity
Options
  • Subscribe by email
  • More
  • Cancel
SystemC debugging
Virtual System Platform
debug
Ubuntu
SystemC
debugging
linux
System Design and Verification

Blazing a Trail With Ubuntu

23 May 2011 • 3 minute read

One of the most popular blogs I wrote is running Incisive on Ubuntu. I have had a number of questions and comments, as well as thanks for pointing out some of details on how to make everything work. One person even had the suggestion to start a user group! In the article, now over a year old, I used Ubuntu 9.10, which was probably the newest version at the time. One of the great things about Ubuntu is the rapid progress that occurs when new versions are released every six months. I thought it was time to update some additional tips for the newest versions because things change quite rapidly in the Linux world.

Today, I will update on a couple of things I ran into on Ubuntu 10.10 and next time I will cover another interesting topic from Ubuntu 11.04.

When I first tried 10.10 I applied the same techniques from the article on 9.10. The first issue I had was a compilation problem when using the Cadence supplied g++ on SystemC code.  The error looks like the screen shot below.

 

<p">">

 

The solution has already been posted as a comment on the previous article (the 4th comment). Removing the features.h files from the gcc installation tree makes the error disappear! If anybody can explain the details it would be interesting to know more.

The next trouble with 10.10 is also SystemC related. This is somewhat expected since I’m using primarily SystemC every day now since the launch of the Cadence Virtual System Platform. When I tried to use SystemC debugging it didn’t work. Since a lot of stuff happens behind the scenes it’s sometimes head banging to figure out why things don’t work. My code was compiled and run using ncsc_run, a utility that makes SystemC compilation and execution easy. When I tried to use the graphical debug (-GIU or –layout cdebug) -- yes the great stuff I write about before -- it didn’t work. There is another mode that doesn’t use the GUI that can be starting using –GDB as an option to ncsc_run. This actually worked fine, but is pretty hard to use since it's only a command line gdb on C++. Since the non-GUI mode worked, but the GUI mode didn’t work I was convinced there should be any easy solution. Here is what happened with the GUI mode:

 

 
After thinking about it, I decided to just try to attach gdb to ncsim directly and see what happens since I knew the GUI was probably doing something like an attach command the non-GUI which was probably stating the simulator directly. When I tried the attach command, I got the error shown below.

 

The error message was the key to the fix. It turns out many people had this problem and it was easy to fix. It is due to a change in the Linux kernel to try to tighten security and stop malware from inspecting running processes. There are multiple solutions, but I chose to edit the file /etc/sysctl.d/10-ptrace.conf and change the 1 to a 0 and reboot the machine. After this all is well and SystemC debugging works as expected.

Here is a link from Ubuntu on the topic. A simple web search for the error message will turn up many stories of people who couldn’t use gdb to debug their favorite programs and how they fixed it.

Next time I’ll explain some interesting things in Ubuntu 11.04, including one that relates to cross compilation of software for ARM platforms.

Jason Andrews

 

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information