On Aug 20, 2010, at 7:22 AM, Xiaohui Liu wrote:

> Actually, I'm trying to change 4 bit link estimation (4bitle) to estimate 
> some link delay related information. At the beginning, 4bitle is working 
> fine. However, after I add the blue fields (nothing else), 4bitle seems to 
> malfunction. Hope this helps clarify my question.

You need to be more precise. "Malfunction" is not helpful when it comes to 
debugging.

Sorry to say this, but you're going about debugging this all wrong. You're 
confusing a symptom (when you change the structure) with a diagnosis (what's 
going wrong in the program). This kind of debugging is just throwing darts in 
the dark: it doesn't get you to the bottom of the problem.

There are two possibilities:

1) More likely: there is a memory access bug in your code. When you change the 
structure definition, the compiler places the differently sized structure in a 
different place in memory. E.g., next to the memory with the bug. One way to 
help diagnose this is to examine what variables are near the structure in the 
two different executables (nm, objdump, etc.).

2) Much less likely: there is a compiler bug on access to the structure. The 
way to diagnose this is to look at the generated assembly.

Effective diagnosis requires, in both cases, a clear understanding of what the 
memory access error is and how it manifests.

Regardless, chances are this bug has nothing to do with nesC, and is really 
just a low-level C bug. That is, unless nesc1 is doing something weird (very 
unlikely). You can check this by looking at app.c.

Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to