LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-25-2005, 04:57 PM   #1
aleanil
LQ Newbie
 
Registered: Oct 2005
Posts: 1

Rep: Reputation: 0
Regading debugging the SPICE code


Hai everybody,

My name is anil ale. I am new to this group. I hope someone can help me.

I have source code for the spice . I installed spice in Redhat linux. Now its running good. My problem is how the spice is converting the netlist to data structure and calculating the output and plotting the graph.

I want to know how it is choosing the alogritham.

I want to debugg the code when i run the netlist in the spice.

Is there anyway to see the path, how the spice is giving output.

I tried using the gdb. but it is giving error. The error is as follows

[anil@lnx anil]$ gdb ngspice test.net
GNU gdb Red Hat Linux (6.3.0.0-1.62rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

"/usr1/home/anil/test.net" is not a core dump: File format not recognized
(gdb) run
Starting program: /usr1/home/anil/ngspice/bin/ngspice

Program received signal SIGSEGV, Segmentation fault.
0x0806731a in baseaddr () at resource.c:463
463 x = *at;
(gdb)


this type of error is coming

Hope some one can help me

Thanks in advance

regards,
anil
 
Old 10-26-2005, 01:10 PM   #2
helmut_hed
Member
 
Registered: Jul 2003
Location: San Francisco, CA, USA
Distribution: Kubuntu Hardy
Posts: 103

Rep: Reputation: 15
The gdb invocation is wrong. I believe you want to do this:

gdb ngspice
...
run test.net

the "run" command can be used to provide the command line arguments to the program being run.

You can also use "--args":

gdb --args ngspice test.net

and that will do it all on the command line, but you probably want to set breakpoints, etc. before running.

Good luck,
Jeff
PS: all this I got from "info gdb".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Debugging and Linux Kernel Debugging Igor007 Programming 0 09-30-2005 10:33 AM
Regading ound Card, can somebody help me?? augfi Linux - Software 3 09-12-2003 03:28 AM
Code for Debugging virender Linux - General 1 02-04-2003 12:34 PM
linux debugging without source code Newbie123 Programming 2 03-10-2002 01:12 PM
debugging without source code Newbie123 Linux - Newbie 3 03-10-2002 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration