Originally Posted by knudfl
ptypes2tcl.cc is the second link in post # 10 ( April 2004 version.)
The file ptypes2tcl.cc in ns-2.33 is quite different. ( Is attached.)
I am trying to patch GPSR with ns-2.33, at Ubuntu 12.04.
Now I am stuck with segmentation fault, as given below.
g++ -Wl,-export-dynamic -o common/ptypes2tcl common/ptypes2tcl.o
./common/ptypes2tcl > gen/ptypes.cc
Segmentation fault (core dumped)
make: *** [gen/ptypes.cc] Error 139
I had referred the thread and tried to find the fault by using gdb mand I got the following result
root@chakraborty-desktop:/home/chakraborty/ns/ns-allinone-2.33/ns-2.33# gdb ./common/ptypes2tcl
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /home/chakraborty/ns/ns-allinone-2.33/ns-2.33/common/ptypes2tcl...(no debugging symbols found)...done.
Starting program: /home/chakraborty/ns/ns-allinone-2.33/ns-2.33/common/ptypes2tcl
static const char code = "\n\
global ptype pvals\n\
set ptype(error) -1\n\
set pvals(-1) error\n\
set ptype(tcp) 0\n\
set pvals(0) tcp\n\
set pvals(57) smac\n\
set ptype(xcp) 58\n\
set pvals(58) xcp\n\
set ptype(hdlc) 59\n\
set pvals(59) HDLC\n\
set ptype(belllabstrace) 60\n\
set pvals(60) BellLabsTrace\n\
Program received signal SIGSEGV, Segmentation fault.
0x080489b5 in lcase(char const*) ()
#0 0x080489b5 in lcase(char const*) ()
#1 0x08048a6e in main ()
I examined the code but could not find the fault, also matched it with your linked files in #14
Should I go for compiler Upgrade.
Please help me in this regard.