advertise Fxn called twice - why?

In the driver_init routine, I register the driver like this

mydriver_init (void *dll_hdl, dispatch_t *dpp, io_net_self_t *ion, char
ion->reg (dll_hdl, entry, reg_hdl, cell, lan);
advertise (reg_hdl, ,);

  1. In the above, my advertise fxn gets invoked twice. I don’t understand
  2. I debug the driver using gdb.

(gdb) run

(gdb)set solib-search-path /mydirectory/
(gdb)set auto-solib-add 1
In another shell, I do
mount -Tio-net -oif=en0:11.2 /lib/dll/
mount -Tio-net /mydirectory/

If I press Ctl C, in the gdb, i am unable to press any key in the keyboard
till i close the shell where i run gdb.
Why it happens so? what shd i do to avoid this?