IMPLEMENT
Jdb_ipc_gate::Jdb_ipc_gate()
- : Jdb_kobject_handler(Ipc_gate_obj::static_kobj_type)
+ : Jdb_kobject_handler((Ipc_gate_obj*)0)
{
Jdb_kobject::module()->register_handler(this);
}
PUBLIC
-Kobject *
-Jdb_ipc_gate::follow_link(Kobject *o)
+Kobject_common *
+Jdb_ipc_gate::follow_link(Kobject_common *o)
{
- Ipc_gate_obj *g = Kobject::dcast<Ipc_gate_obj *>(o);
- return static_cast<Kobject*>(g->thread());
+ Ipc_gate_obj *g = cxx::dyn_cast<Ipc_gate_obj *>(Kobject::from_dbg(o->dbg_info()));
+ return g->thread() ? Kobject::from_dbg(g->thread()->dbg_info()) : o;
}
PUBLIC
bool
-Jdb_ipc_gate::show_kobject(Kobject *, int)
+Jdb_ipc_gate::show_kobject(Kobject_common *, int)
{ return true; }
PUBLIC
-int
-Jdb_ipc_gate::show_kobject_short(char *buf, int max, Kobject *o)
+void
+Jdb_ipc_gate::show_kobject_short(String_buffer *buf, Kobject_common *o)
{
- Ipc_gate_obj *g = Kobject::dcast<Ipc_gate_obj*>(o);
+ Ipc_gate_obj *g = cxx::dyn_cast<Ipc_gate_obj*>(Kobject::from_dbg(o->dbg_info()));
if (!g)
- return 0;
+ return;
- return snprintf(buf, max, " L=%s%08lx\033[0m D=%lx",
- (g->id() & 3) ? JDB_ANSI_COLOR(lightcyan) : "",
- g->id(), g->thread() ? g->thread()->dbg_id() : 0);
+ buf->printf(" L=%s%08lx\033[0m D=%lx",
+ (g->id() & 3) ? JDB_ANSI_COLOR(lightcyan) : "",
+ g->id(), g->thread() ? g->thread()->dbg_info()->dbg_id() : 0);
}
PUBLIC
char const *
-Jdb_ipc_gate::kobject_type() const
+Jdb_ipc_gate::kobject_type(Kobject_common *) const
{
return JDB_ANSI_COLOR(magenta) "Gate" JDB_ANSI_COLOR(default);
}