On Fri, Jun 19, 2009 at 02:48:15PM -0700, Mike Shapiro wrote: > On Fri, Jun 19, 2009 at 02:45:43PM -0700, Jonathan Adams wrote: > > On Fri, Jun 19, 2009 at 01:08:01PM -0300, Rafael Vanoni wrote: > > > I'm making some small changes to mdb_modapi.c and I'd like to know if > > > there's a way to check whether the running instance is debugging a core > > > file or a live target. Looking through the target flags, I didn't see > > > anything like that. But I was wondering if there is something in another > > > part of the target, or even in mdb_t structure that has that information. > > > > Out of curiosity, what kind of changes are you making? > > > > Cheers, > > - jonathan > > Along same lines: > > - mdb_prop_postmortem already answers that question for you > and is part of the module API
If you just want to know if you're debugging a snapshot (core or KMDB) v.s. a live system changing underneath you, you can use mdb_get_state() and compare it with the MDB_STATE_* values. Cheers, - jonathan