You must get rid of register.c and once you've removed the dissectors
from the Makefile. You shouldn't need to move their source files
elsewhere as the make-reg-dot-c.py script is invoked only on
$(DISSECTOR_SRC).
You must probably pay attention to cases where some dissectors export
dedicated methods and structs (e.g., the charsets structure in
packet-wap.c) in the cases where you want to physically remove
dissector source code.
Regards,
Olivier
----- Original Message -----
From: "Jaime Fournier"
| Remove it from the Makefile.am and rerun autogun.sh
| Then configure/make.
| The problem is the makefiles, and register.c are
| created from this. Also move the file, as I believe
| register script might still pick it up.
|
| --- CHARBONNIER Christophe wrote:
| > Hi,
| >
| > I'm still trying to remove some dissectors in
| > tethereal.
| >
| > This time, I go on removing just ONE dissector:
| > packet-rwall.c
| > I removed all the references to that particular
| > dissector in either
| > Makefile and register.c
| >
| > The compilation phase ends up successfully,
| > but when I start tethereal, it complains:
| >
| > ** ERROR **: file packet.c: line 593
| > (dissector_add): assertion failed:
| > (sub_dissectors)
| > aborting...
| > Aborted (core dumped)
| >
| > With the help of gdb (output dumped below) I could
| > determine that this
| > is the "tcp.port" registration that ends up badly.
| > Could someone explain that to me ????
| >
| > Thanxs in advance
| > Christophe
| >
| > _____
| >
| > create_dissector_handle (dissector=0x86992c8,
| > proto=15) at packet.c:1507
| > 1507 }
| > (gdb)
| > proto_reg_handoff_acap () at packet-acap.c:192
| > 192 dissector_add("tcp.port", TCP_PORT_ACAP,
| > acap_handle);
| > (gdb)
| >
| > Breakpoint 1, dissector_add (name=0x82f06e3
| > "tcp.port", pattern=674,
| > handle=0x86f92d0) at packet.c:589
| > 589 dissector_table_t sub_dissectors =
| > find_dissector_table(
| > name);
| > (gdb)
| > find_dissector_table (name=0x82f06e3 "tcp.port") at
| > packet.c:551
| > 551 g_assert(dissector_tables);
| > (gdb)
| > 552 return g_hash_table_lookup(
| > dissector_tables, name );
| > (gdb)
| > 553 }
| > (gdb)
| > dissector_add (name=0x82f06e3 "tcp.port",
| > pattern=674, handle=0x86f92d0)
| > at packet.c:593
| > 593 g_assert( sub_dissectors);
| > (gdb)
| > 589 dissector_table_t sub_dissectors =
| > find_dissector_table(
| > name);
| > (gdb)
| > 593 g_assert( sub_dissectors);
| > (gdb)
| > 0x082dca77 610
| > g_assert_not_reached();
| > (