[sheepdog] [PATCH 4/4] sheep: dump cluster info when exiting unexpectedly

MORITA Kazutaka morita.kazutaka at gmail.com
Thu Feb 28 08:07:29 CET 2013


At Thu, 28 Feb 2013 14:25:22 +0800,
Liu Yuan wrote:
> 
> On 02/28/2013 01:15 AM, MORITA Kazutaka wrote:
> > This introduces sd_dump_variable to dump a variable and call it
> > against __sys in crash_handler.
> 
> __sys is not a variable but more a compound structure. Maybe
> sd_dump_state is more proper to indicate it is internal information?

__sys is actually a variable whose type is struct cluster_info, isn't
it?

  static struct cluster_info __sys;

sd_dump_variable can be used against more things than 'state'.  We can
use it to dump any kinds of global and local variables including
integer, string, structure, array, and so on.

Perhaps, is sd_dump_expr better since what GDB actually dumps is an
expression?

Thanks,

Kazutaka



More information about the sheepdog mailing list