[Anjuta-list] Debug crash



I'm using ubuntu Dapper Drake 6.06 on a AMD64 K8 and Anjuta 1.2.4a.

in pdg.h i have this definition:

...
typedef enum {
   START_NODE,
   STOP_NODE,
   ASSIGNMENT_NODE,
   BRANCH_NODE,
   JUMP_NODE
} MMStmKind;

typedef struct _MMStm *MMStm;
struct _MMStm{ MMStmKind kind;
   gint n_istr;
   union {
     gchar seq;
     struct {
         MMStm true_stm;
MMStm false_stm; } branch;
     MMStm goto_stm;
   } stm;
   GList *next;
};
...

and in pdg.c there are two functions:

...
MMCfg parse_istruction(MMCfg cfg, gchar *istr){
   MMStm stm;
if (cfg == NULL)
       cfg = MMCfg_alloc();

   return cfg;
};
MMCfg parse_program(gchar *istr_list) {

   gchar **istr, *s;
   gint i;
istr = g_strsplit(istr_list,".",MAX_ISTR_SIZE); for(i = 0;(s = *(istr + i)) && (i<=MAX_ISTR_SIZE); i++){
       Cfg = parse_istruction(Cfg, s);
   };
return Cfg;

};
....

What happens is that when the control reach the call to parse_istruction procedure in parse_program, if I press the F6 key the function return me a MMCfg object as expected, but if i press a step into procedure (F5) button the program crash. Moreover, if I remove the "MMStm stm;" declaration from the parse_istruction procedure, I'm able to step into the procedure ...

Now, is this my fault or is a bug of debugger? I'm trying to experiment with some definition and I'm not able to see why the utilize of this definition should cause some troubles.

Thank you in advance for any advice.

Michele




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]