From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18322 invoked by alias); 13 Apr 2006 09:37:05 -0000 Received: (qmail 18306 invoked by uid 22791); 13 Apr 2006 09:37:04 -0000 X-Spam-Check-By: sourceware.org Received: from anchor-post-30.mail.demon.net (HELO anchor-post-30.mail.demon.net) (194.217.242.88) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Apr 2006 09:37:01 +0000 Received: from calivar.demon.co.uk ([83.104.54.243] helo=xl5.calivar.com) by anchor-post-30.mail.demon.net with esmtp (Exim 4.42) id 1FTyFs-000EuO-00; Thu, 13 Apr 2006 09:36:53 +0000 Received: from xl5.calivar.com (localhost [127.0.0.1]) by xl5.calivar.com (Postfix) with ESMTP id E3597138754; Thu, 13 Apr 2006 10:36:46 +0100 (BST) To: "Fahd Abidi" Cc: "Grant Edwards" , References: <81C69D96BDD30640952C7A404004AA2543A5A8@ultsol01.tewks.ultsol.local> From: Nick Garnett Original-Sender: nickg@ecoscentric.com Date: Thu, 13 Apr 2006 09:37:00 -0000 In-Reply-To: <81C69D96BDD30640952C7A404004AA2543A5A8@ultsol01.tewks.ultsol.local> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Re: Trying to Debug Ecos using GDB X-SW-Source: 2006-04/txt/msg00164.txt.bz2 "Fahd Abidi" 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