[mpls-linux-general] GDB tracing result
Status: Beta
Brought to you by:
jleu
|
From: <m9...@cn...> - 2005-03-13 07:44:09
|
Hi James,
I find a small bug in quagga-mpls/zebra/mpls_null.c.
Because my kernel has no mpls enhancement. So I modify "mpls_method =3D =
mpls_netlink.o" to "mpls_method =3D mpls_null.o".
But when I compile, there was an error.
Finally I find out there was a "missing part" (shown below) in =
"quagga-mpls/zebra/mpls_null.c". After I add this part. Then I pass the =
compile.
int
mpls_ctrl_tunnel_register(struct interface *ifp, int update)
{
return 0;
}
=20
int
mpls_ctrl_tunnel_unregister(struct interface *ifp)
{
return 0;
}
Back to the problem (can't run zebra) I am facing now.
I try to use GDB. Below is some information from GDB.
[root@localhost zebra]# gdb zebra
GNU gdb Red Hat Linux (6.1post-1.20040607.41rh)
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/tls/libthread_db.so.1".
(gdb)
(gdb) run
Starting program: /root/tim/testing/newtry/quagga-mpls/zebra/zebra
Program received signal SIGSEGV, Segmentation fault.
0x0037ada3 in strlen () from /lib/tls/libc.so.6
(gdb) bt
#0 0x0037ada3 in strlen () from /lib/tls/libc.so.6
#1 0x0037aae5 in strdup () from /lib/tls/libc.so.6
#2 0x08066275 in zstrdup (type=3D0, str=3D0x0) at memory.c:115
#3 0x08058d94 in mpls_out_segment_register (out=3D0xfee52bb4) at =
mpls_lib.c:219
#4 0x0805c0f3 in netlink_mpls (snl=3D0xfee52c74, h=3D0x1) at =
rt_netlink.c:1844
#5 0x0805a8f4 in netlink_parse_info (filter=3D0x805c04e <netlink_mpls>,
nl=3D0x807f548, a=3D0xfee52c84, size=3D16384) at rt_netlink.c:435
#6 0x0805c24d in mpls_read () at rt_netlink.c:1929
#7 0x0804cae7 in main (argc=3D1, argv=3D0xfee56de4) at main.c:341
Thanks
Timothy
2005.03.13 |