Re: [mpls-linux-general] GDB tracing result
Status: Beta
Brought to you by:
jleu
|
From: James R. L. <jl...@mi...> - 2005-03-13 18:16:24
|
Ahh. Good debugging. It's been a while since I've used the 'null' driver,
I'll duplicate and try and fix it.
On Sun, Mar 13, 2005 at 03:50:34PM +0800, ?????x wrote:
> Hi James,
>=20
> 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 m=
pls_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-mp=
ls/zebra/mpls_null.c". After I add this part. Then I pass the compile.
> int
> mpls_ctrl_tunnel_register(struct interface *ifp, int update)
>=20
> {
>=20
> return 0;
>=20
> }
>=20
> =20
>=20
> int
>=20
> mpls_ctrl_tunnel_unregister(struct interface *ifp)
>=20
> {
>=20
> return 0;
>=20
> }
>=20
>=20
>=20
> Back to the problem (can't run zebra) I am facing now.
> I try to use GDB. Below is some information from GDB.
>=20
> [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 conditi=
ons.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for detail=
s.
> This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread=
_db library "/lib/tls/libthread_db.so.1".
>=20
> (gdb)
>=20
> (gdb) run
> Starting program: /root/tim/testing/newtry/quagga-mpls/zebra/zebra
>=20
> 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_li=
b.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
>=20
>=20
> Thanks
>=20
> Timothy
> 2005.03.13
--=20
James R. Leu
jl...@mi...
|