Re: [Anjuta-list] Debug crash
- From: Michele Bendazzoli <mickymouse mickymouse it>
- To: Anjuta-list <anjuta-list lists sourceforge net>
- Subject: Re: [Anjuta-list] Debug crash
- Date: Wed May 10 07:22:14 2006
Even more strange: if I put
struct _MMStm *stm;
all works as expected ...
But this should be exactly the same as
MMStm stm;
Because MMStm is a pointer to struct _MMStm. In fact there is the
typedef struct _MMStm *MMStm;
definition ...
This sound very strange to me ...
ciao, Michele
Michele Bendazzoli ha scritto:
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
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Anjuta-list mailing list
Anjuta-list lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/anjuta-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]