FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > Verilog

Verilog comp.lang.verilog newsgroup / usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-04-2004, 08:08 AM
Narendran Kumaraguru Nathan
Guest
 
Posts: n/a
Default segmentation fault - code attached

Hi all,
I'm writing a library to parse the pli format. I'm getting
segmentation fault. Please help me if you can.
Thanks,
Naren.


Hi all,
I am fairly experianced in C. I am writing a program in which I'm
getting a segmentation fault. The problem is that it is getting the
segmentation fault when executing calloc. I tried debugging it, with
no use. I tried to figure out the common reasons (1) Using a memory
location which is not allocated. (2) Using memory which is freed. (3)
Function use before declaration.
I didn't use any other debuggers or tools other than ddd. My
platform is : RH linux 2.4.20-8 & gcc -v ouputs the following

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

I don't understand what to do. I couldn't attach the program I am
developing, hence have put that in geocities with a sample input. The
files are under
http://www.geocities.com/narenkumaraguru/vcdedit/
The files are
1. main.c.c
2. vcd_read.c.c
3. vcd_read.h.c
4. Makefile.c
5. cntr.vcd.c

Since I couldn't upload files with different names, I postfixed .c
to all of them. Once downloaded please correct the names by removing
the extra .c in them.

Procedure to run it is
1. make
2. ./vcd_read

I'm aint a C wizard. The program is to parse a file format called
the VCD. It is used in VLSI for debugging and waveform dump in
particular. I was writing a library for the format.

Thanks,
Naren.
Reply With Quote
  #2 (permalink)  
Old 10-04-2004, 07:37 PM
Narendran Kumaraguru Nathan
Guest
 
Posts: n/a
Default Re: segmentation fault - code attached

Hi Guys,
I managed to fix this with the help of C veterans.
I am writing this code on behalf of TooMuch Semiconductor Solutions
Pvt. Ltd. - A startup specialising on EDA services & VLSI verification
services. Once this is done, it'll be put in their site with source
code ...
Thanks & Regards,
Naren.



[email protected] (Narendran Kumaraguru Nathan) wrote in message news:<[email protected] om>...
> Hi all,
> I'm writing a library to parse the pli format. I'm getting
> segmentation fault. Please help me if you can.
> Thanks,
> Naren.
>
>
> Hi all,
> I am fairly experianced in C. I am writing a program in which I'm
> getting a segmentation fault. The problem is that it is getting the
> segmentation fault when executing calloc. I tried debugging it, with
> no use. I tried to figure out the common reasons (1) Using a memory
> location which is not allocated. (2) Using memory which is freed. (3)
> Function use before declaration.
> I didn't use any other debuggers or tools other than ddd. My
> platform is : RH linux 2.4.20-8 & gcc -v ouputs the following
>
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --disable-checking --with-system-zlib --enable-__cxa_atexit
> --host=i386-redhat-linux
> Thread model: posix
> gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
>
> I don't understand what to do. I couldn't attach the program I am
> developing, hence have put that in geocities with a sample input. The
> files are under
> http://www.geocities.com/narenkumaraguru/vcdedit/
> The files are
> 1. main.c.c
> 2. vcd_read.c.c
> 3. vcd_read.h.c
> 4. Makefile.c
> 5. cntr.vcd.c
>
> Since I couldn't upload files with different names, I postfixed .c
> to all of them. Once downloaded please correct the names by removing
> the extra .c in them.
>
> Procedure to run it is
> 1. make
> 2. ./vcd_read
>
> I'm aint a C wizard. The program is to parse a file format called
> the VCD. It is used in VLSI for debugging and waveform dump in
> particular. I was writing a library for the format.
>
> Thanks,
> Naren.

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Verilog Netlest Reader Code, ATPG Code Robert Posey Verilog 0 11-19-2003 11:41 PM
DFTSimuLab announces new DFT and fault simulation software Karl D Verilog 0 10-14-2003 08:37 AM


All times are GMT +1. The time now is 01:49 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved