On Tue, May 17, 2011 at 6:50 PM, Xiaohui Liu <[email protected]> wrote:

> Hi,
>
> I'm meeting the same issue again and trying to use "nm". How do I let "nm"
> display the symbols only in bss section and order by their address in
> non-decreasing fashion? This way, I can see what symbols are near the one
> I'm tracking. Thanks.
>

When you don't know how to use a tool the first thing you should try is
reading the manual.

I don't see a reference to what processor you are using (or platform which
then implies the processor), but if memory serves (yeah right), you are
using a telosb which is msp430f1611 based.

So you want to try

man msp430-objdump
man msp430-nm

You can also do:

msp430-objdump --help
msp430-nm --help


more below:


>
> On Fri, Aug 20, 2010 at 6:16 PM, Philip Levis <[email protected]> wrote:
>
>>
>> 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.).
>>
>
To see the machine code interspersed with some semblance of the source code
 (take with a grain of salt, doesn't always get it right):

msp430-objdump -d --source main.exe


To see a numerically sorted symbol table of the image:

msp430-nm -n main.exe


>
>> 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
>
>
>
>
> --
> -Xiaohui Liu
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to