This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to generate a map file?


Water He wrote:
> Thanks!
> Another question: how can I get line number in source code file via an responding instruction address. Using 'nm', i can just locate it to a function.
> Can 'nm' do it?

Nope. But objdump can, e.g.

powerpc-eabi-objdump -drS redboot.elf

but the output can be awkward to read.

Obviously your source files must be the same as when you built the
executable to get sensible output. It will print out /mywork/foo.c line
145 whatever that file or line actually is, irrespective of whether it's
changed since the executable was built!

Jifl
-- 
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]