will be under maintenance from Friday, Oct. 3rd at 6pm (PST) thru Sunday, Oct 5th at 11pm (PST). login, registration, community posting and commenting functionalities will be disabled.
Home > Community > Blogs > System Design and Verification > blazing a trail with ubuntu
Login with a Cadence account.
Not a member yet?
Create a permanent login account to make interactions with Cadence more convenient.

Register | Membership benefits
Get email delivery of the System Design and Verification blog (individual posts).


* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

Blazing a Trail With Ubuntu

Comments(0)Filed under: debugging, linux, SystemC, System Design and Verification, Ubuntu, SystemC debugging, debug, Virtual System Platform

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.



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



Leave a Comment

E-mail (will not be published)
 I have read and agree to the Terms of use and Community Guidelines.
Community Guidelines
The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.