public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Nick Garnett <nickg@ecoscentric.com>
To: "Fahd Abidi" <fabidi@ultsol.com>
Cc: "Grant Edwards" <grante@visi.com>,  <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] Re: Trying to Debug Ecos using GDB
Date: Thu, 13 Apr 2006 09:37:00 -0000	[thread overview]
Message-ID: <m3lku97r69.fsf@xl5.calivar.com> (raw)
In-Reply-To: <81C69D96BDD30640952C7A404004AA2543A5A8@ultsol01.tewks.ultsol.local>

"Fahd Abidi" <fabidi@ultsol.com> writes:

> Yes the kernel is built with debug symbols. I checked the libtarget.a
> file with objdump -s and saw disassembly and source code. So its in
> there. Libtarget.a is 17mb, if I strip it of symbols using objcopy -g
> then it drops to 1.7mb.
> 
> When I go to the steps of linking with my application the final hello
> executable leaves out the symbols from the kernel.
> 
> I may not be following what Andrew is saying, as far as I can tell I
> have included the debug symbols from all Parts of the kernel that are
> used, the appropriate setting in the kernel to enable debug bits is set.
> The -g CFLAG bit is set in the top level of the ecos project, so all
> debug symbols should be added.
> 
> The resulting hello executable only has source info for hello.c no other
> sources are in that executable. I checked the compiler output and saw
> the -g flag getting passed to the application as well.

How are you detecting that the symbols are not there? Full debug info
should be included in the executable by default.

If I run nm on a typical test executable I see all the kernel
symbols. For example:

$ arm-elf-nm -CSn tm_basic | grep Cyg_Thread
62007de4 00000564 T Cyg_Thread::Cyg_Thread(unsigned int, void (*)(unsigned int), unsigned int, char*, unsigned int, unsigned int)
62008348 00000564 T Cyg_Thread::Cyg_Thread(unsigned int, void (*)(unsigned int), unsigned int, char*, unsigned int, unsigned int)
620088ac 00000088 T Cyg_Thread::check_this(cyg_assert_class_zeal) const
62008934 00000180 T Cyg_Thread::reinitialize()
62008ab4 00000130 T Cyg_Thread::~Cyg_Thread()
62008be4 00000130 T Cyg_Thread::~Cyg_Thread()
62008d14 00000064 T Cyg_Thread::exit()
62008d78 00000034 T Cyg_HardwareThread::thread_entry(Cyg_Thread*)
62008dac 00000118 T Cyg_Thread::sleep()
62008ec4 00000108 T Cyg_Thread::wake()
62008fcc 00000128 T Cyg_Thread::suspend()
620090f4 00000120 T Cyg_Thread::resume()
62009214 0000011c T Cyg_Thread::force_resume()
62009330 0000014c T Cyg_Thread::kill()
6200947c 00000224 T Cyg_Thread::set_priority(int)
620096a0 0000011c T Cyg_Thread::delay(unsigned long long)
620097bc 00000020 T Cyg_Thread::deliver_exception(int, unsigned int)
620097dc 0000010c T Cyg_ThreadTimer::alarm(Cyg_Alarm*, unsigned int)
62009a98 00000010 t _GLOBAL__I.11100__ZN18Cyg_HardwareThread12thread_entryEP10Cyg_Thread
62009aa8 00000010 t _GLOBAL__D.11100__ZN18Cyg_HardwareThread12thread_entryEP10Cyg_Thread
6200a154 0000003c T Cyg_ThreadQueue_Implementation::enqueue(Cyg_Thread*)
6200a190 00000078 T Cyg_ThreadQueue_Implementation::remove(Cyg_Thread*)
6200a460 00000040 T Cyg_Scheduler_Implementation::set_need_reschedule(Cyg_Thread*)
6200a4a0 000002e4 T Cyg_Scheduler_Implementation::add_thread(Cyg_Thread*)
6200a784 000001e8 T Cyg_Scheduler_Implementation::rem_thread(Cyg_Thread*)
6200a96c 00000014 T Cyg_Scheduler_Implementation::set_idle_thread(Cyg_Thread*, unsigned int)
6200a980 00000004 T Cyg_Scheduler_Implementation::register_thread(Cyg_Thread*)
6200a984 00000004 T Cyg_Scheduler_Implementation::deregister_thread(Cyg_Thread*)
6200ad38 00000054 T Cyg_ThreadQueue_Implementation::dequeue()
6200b488 000000e8 T Cyg_Scheduler::thread_entry(Cyg_Thread*)
6200b668 0000002c T Cyg_SchedThread::Cyg_SchedThread(Cyg_Thread*, unsigned int)
6200b694 00000090 T Cyg_SchedThread::set_inherited_priority(int, Cyg_Thread*)
6200b724 00000018 T Cyg_SchedThread::relay_inherited_priority(Cyg_Thread*, Cyg_ThreadQueue*)
6200b7d4 000000b0 T Cyg_SchedThread::inherit_priority(Cyg_Thread*)
6200b884 00000004 T Cyg_SchedThread::relay_priority(Cyg_Thread*, Cyg_ThreadQueue*)
620135ac 00000020 r Cyg_Thread::reinitialize()::__PRETTY_FUNCTION__
620135cc 00000020 r Cyg_Thread::sleep()::__PRETTY_FUNCTION__
620135ec 0000001b r Cyg_Thread::suspend()::__PRETTY_FUNCTION__
62013608 0000001a r Cyg_Thread::resume()::__PRETTY_FUNCTION__
62013624 00000020 r Cyg_Thread::force_resume()::__PRETTY_FUNCTION__
62013644 0000002c r Cyg_Thread::set_priority(int)::__PRETTY_FUNCTION__
62013b94 0000003b r Cyg_Scheduler_Implementation::add_thread(Cyg_Thread*)::__PRETTY_FUNCTION__
62013bd0 0000003b r Cyg_Scheduler_Implementation::rem_thread(Cyg_Thread*)::__PRETTY_FUNCTION__
62013f2c 00000048 r Cyg_SchedThread::set_inherited_priority(int, Cyg_Thread*)::__PRETTY_FUNCTION__
62013fa8 00000034 r Cyg_SchedThread::inherit_priority(Cyg_Thread*)::__PRETTY_FUNCTION__
62015024 00000004 D Cyg_Thread::thread_list
621a736c 00000008 B Cyg_Thread::exception_control


What happens if you try that on your hello executable?


-- 
Nick Garnett                                 eCos Kernel Architect
http://www.ecoscentric.com            The eCos and RedBoot experts


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

  reply	other threads:[~2006-04-13  9:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-13  0:38 Fahd Abidi
2006-04-13  9:37 ` Nick Garnett [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-04-13 13:12 Fahd Abidi
2006-04-12 20:40 [ECOS] " Fahd Abidi
2006-04-12 20:45 ` Andrew Lunn
2006-04-12 21:59   ` [ECOS] " Grant Edwards
2006-04-12 21:58 ` Grant Edwards
2006-04-12 20:18 [ECOS] " Fahd Abidi
2006-04-12 20:20 ` Andrew Lunn
2006-04-12 21:54   ` [ECOS] " Grant Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3lku97r69.fsf@xl5.calivar.com \
    --to=nickg@ecoscentric.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=fabidi@ultsol.com \
    --cc=grante@visi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).