]> rtime.felk.cvut.cz Git - l4.git/blobdiff - kernel/fiasco/src/jdb/jdb_ipc_gate.cpp
Update
[l4.git] / kernel / fiasco / src / jdb / jdb_ipc_gate.cpp
index 4553fbfd54d1f22e34db39cb33d05d2f20523016..f6fcfc7c06a2de114cec63e63fe0e3cb46209e26 100644 (file)
@@ -21,40 +21,40 @@ public:
 
 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);
 }