[uClinux-dev] Compiler Error in user/gdb Tree

2009-11-10 Thread Wilfried Busalski
Hi

I need a little help. If I compile the uClinux-dist 0090618 with patch 
20090810 I got the  errors below.
What is the reason?
What can I do ?

===
ucfront-gcc 
m68k-uclinux-gcc -m5307 -DCONFIG_COLDFIRE -c -Wall -Os -g -fomit-frame-pointer 
 -pipe -fno-common -fno-builtin -Wall   -DEMBED -msep-data -Dlinux -D__linux__ 
 -Dunix -D__uClinux__-I. -I../gdb/gdbserver 
-I../gdb/gdbserver/../regformats 
 -I../gdb/gdbserver/../../include -I../../bfd -I../gdb/gdbserver/../../bfd 
../gdb/gdbserver/thread-db.c
../gdb/gdbserver/thread-db.c:43: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '*' token
../gdb/gdbserver/thread-db.c:46: warning: type defaults to 'int' in 
declaration of 'td_thrhandle_t'
../gdb/gdbserver/thread-db.c:46: error: expected ';', ',' or ')' before '*' 
token
../gdb/gdbserver/thread-db.c:49: error: expected ')' before 'err'
../gdb/gdbserver/thread-db.c: In function 'thread_db_create_event':
../gdb/gdbserver/thread-db.c:137: error: 'td_event_msg_t' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:137: error: (Each undeclared identifier is 
reported only once
../gdb/gdbserver/thread-db.c:137: error: for each function it appears in.)
../gdb/gdbserver/thread-db.c:137: error: expected ';' before 'msg'
../gdb/gdbserver/thread-db.c:138: error: 'td_err_e' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:138: error: expected ';' before 'err'
../gdb/gdbserver/thread-db.c:148: error: 'err' undeclared (first use in this 
function)
../gdb/gdbserver/thread-db.c:148: warning: implicit declaration of function 
'td_ta_event_getmsg'
../gdb/gdbserver/thread-db.c:148: error: 'thread_agent' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:148: error: 'msg' undeclared (first use in this 
function)
../gdb/gdbserver/thread-db.c:149: error: 'TD_OK' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:151: warning: implicit declaration of function 
'thread_db_err_str'
../gdb/gdbserver/thread-db.c:162: warning: implicit declaration of function 
'find_new_threads_callback'
../gdb/gdbserver/thread-db.c: In function 'thread_db_enable_reporting':
../gdb/gdbserver/thread-db.c:181: error: 'td_thr_events_t' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:181: error: expected ';' before 'events'
../gdb/gdbserver/thread-db.c:182: error: 'td_notify_t' undeclared (first use 
in this function)
../gdb/gdbserver/thread-db.c:182: error: expected ';' before 'notify'
../gdb/gdbserver/thread-db.c:183: error: 'td_err_e' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:183: error: expected ';' before 'err'
../gdb/gdbserver/thread-db.c:186: warning: implicit declaration of function 
'td_event_emptyset'
../gdb/gdbserver/thread-db.c:186: error: 'events' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:187: warning: implicit declaration of function 
'td_event_addset'
../gdb/gdbserver/thread-db.c:187: error: 'TD_CREATE' undeclared (first use 
in this function)
../gdb/gdbserver/thread-db.c:195: error: 'err' undeclared (first use in this 
function)
../gdb/gdbserver/thread-db.c:195: warning: implicit declaration of function 
'td_ta_set_event'
../gdb/gdbserver/thread-db.c:195: error: 'thread_agent' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:196: error: 'TD_OK' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:199: warning: format '%s' expects type 'char 
*', but argument 2 has type 'int'
../gdb/gdbserver/thread-db.c:204: warning: implicit declaration of function 
'td_ta_event_addr'
../gdb/gdbserver/thread-db.c:204: error: 'notify' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:208: warning: format '%s' expects type 'char 
*', but argument 2 has type 'int'
../gdb/gdbserver/thread-db.c: In function 'find_one_thread':
../gdb/gdbserver/thread-db.c:236: error: 'td_thrhandle_t' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:236: error: expected ';' before 'th'
../gdb/gdbserver/thread-db.c:237: error: 'td_thrinfo_t' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:237: error: expected ';' before 'ti'
../gdb/gdbserver/thread-db.c:238: error: 'td_err_e' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:238: error: expected ';' before 'err'
../gdb/gdbserver/thread-db.c:248: error: 'err' undeclared (first use in this 
function)
../gdb/gdbserver/thread-db.c:248: warning: implicit declaration of function 
'td_ta_map_lwp2thr'
../gdb/gdbserver/thread-db.c:248: error: 'thread_agent' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:248: error: 'th' undeclared (first use in this 
function)
../gdb/gdbserver/thread-db.c:249: error: 'TD_OK' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:251: warning: format '%s' expects type 'char 
*', but argument 3 

RE: [uClinux-dev] Compiler Error in user/gdb Tree

2009-11-10 Thread Dan Snyder
You need to enable pthreads debugging support in your uClibc configuration.

Change to your uClibc directory and make menuconfig.  In General Library 
Settings enable pthreads debugging support.  Change back to your uClinux-dist 
directory and make clean  make.

- Dan

 
-Original Message-
From: uclinux-dev-boun...@uclinux.org [mailto:uclinux-dev-boun...@uclinux.org] 
On Behalf Of Wilfried Busalski
Sent: Tuesday, November 10, 2009 2:44 AM
To: uclinux-dev@uclinux.org
Subject: [uClinux-dev] Compiler Error in user/gdb Tree

Hi

I need a little help. If I compile the uClinux-dist 0090618 with patch 
20090810 I got the  errors below.
What is the reason?
What can I do ?

===
ucfront-gcc 
m68k-uclinux-gcc -m5307 -DCONFIG_COLDFIRE -c -Wall -Os -g -fomit-frame-pointer 
 -pipe -fno-common -fno-builtin -Wall   -DEMBED -msep-data -Dlinux -D__linux__ 
 -Dunix -D__uClinux__-I. -I../gdb/gdbserver 
-I../gdb/gdbserver/../regformats 
 -I../gdb/gdbserver/../../include -I../../bfd -I../gdb/gdbserver/../../bfd 
../gdb/gdbserver/thread-db.c
../gdb/gdbserver/thread-db.c:43: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '*' token
../gdb/gdbserver/thread-db.c:46: warning: type defaults to 'int' in 
declaration of 'td_thrhandle_t'
../gdb/gdbserver/thread-db.c:46: error: expected ';', ',' or ')' before '*' 
token
../gdb/gdbserver/thread-db.c:49: error: expected ')' before 'err'
../gdb/gdbserver/thread-db.c: In function 'thread_db_create_event':
../gdb/gdbserver/thread-db.c:137: error: 'td_event_msg_t' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:137: error: (Each undeclared identifier is 
reported only once
../gdb/gdbserver/thread-db.c:137: error: for each function it appears in.)
../gdb/gdbserver/thread-db.c:137: error: expected ';' before 'msg'
../gdb/gdbserver/thread-db.c:138: error: 'td_err_e' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:138: error: expected ';' before 'err'
../gdb/gdbserver/thread-db.c:148: error: 'err' undeclared (first use in this 
function)
../gdb/gdbserver/thread-db.c:148: warning: implicit declaration of function 
'td_ta_event_getmsg'
../gdb/gdbserver/thread-db.c:148: error: 'thread_agent' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:148: error: 'msg' undeclared (first use in this 
function)
../gdb/gdbserver/thread-db.c:149: error: 'TD_OK' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:151: warning: implicit declaration of function 
'thread_db_err_str'
../gdb/gdbserver/thread-db.c:162: warning: implicit declaration of function 
'find_new_threads_callback'
../gdb/gdbserver/thread-db.c: In function 'thread_db_enable_reporting':
../gdb/gdbserver/thread-db.c:181: error: 'td_thr_events_t' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:181: error: expected ';' before 'events'
../gdb/gdbserver/thread-db.c:182: error: 'td_notify_t' undeclared (first use 
in this function)
../gdb/gdbserver/thread-db.c:182: error: expected ';' before 'notify'
../gdb/gdbserver/thread-db.c:183: error: 'td_err_e' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:183: error: expected ';' before 'err'
../gdb/gdbserver/thread-db.c:186: warning: implicit declaration of function 
'td_event_emptyset'
../gdb/gdbserver/thread-db.c:186: error: 'events' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:187: warning: implicit declaration of function 
'td_event_addset'
../gdb/gdbserver/thread-db.c:187: error: 'TD_CREATE' undeclared (first use 
in this function)
../gdb/gdbserver/thread-db.c:195: error: 'err' undeclared (first use in this 
function)
../gdb/gdbserver/thread-db.c:195: warning: implicit declaration of function 
'td_ta_set_event'
../gdb/gdbserver/thread-db.c:195: error: 'thread_agent' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:196: error: 'TD_OK' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:199: warning: format '%s' expects type 'char 
*', but argument 2 has type 'int'
../gdb/gdbserver/thread-db.c:204: warning: implicit declaration of function 
'td_ta_event_addr'
../gdb/gdbserver/thread-db.c:204: error: 'notify' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:208: warning: format '%s' expects type 'char 
*', but argument 2 has type 'int'
../gdb/gdbserver/thread-db.c: In function 'find_one_thread':
../gdb/gdbserver/thread-db.c:236: error: 'td_thrhandle_t' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:236: error: expected ';' before 'th'
../gdb/gdbserver/thread-db.c:237: error: 'td_thrinfo_t' undeclared (first 
use in this function)
../gdb/gdbserver/thread-db.c:237: error: expected ';' before 'ti'
../gdb/gdbserver/thread-db.c:238: error: 'td_err_e' undeclared (first use in 
this function)
../gdb/gdbserver/thread-db.c:238: error: expected ';' before 'err'

Re: [uClinux-dev] [PATCH] ld-elf2flt: fix option order when invoking children

2009-11-10 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 Poor getopt() implementations as found in many BSD/Darwin systems will
 stop processing options after a non-option is encountered.  That means
 ld-elf2flt has to be careful to not stick options after non-options when
 executing sub children.  In a default setup, it will invoke `elf2flt` with
 the output followed by the -a option which subsequently fails:
 elf2flt: Can't open '-a': No such file or directory

Applied,  thanks,
Davidm


 
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  ld-elf2flt.c |   13 ++---
  1 files changed, 10 insertions(+), 3 deletions(-)
 
 diff --git a/ld-elf2flt.c b/ld-elf2flt.c
 index f9b0f1a..227c90b 100644
 --- a/ld-elf2flt.c
 +++ b/ld-elf2flt.c
 @@ -76,7 +76,14 @@ static void append_sed(sed_commands_t *dst, const char 
 *pattern,
  
  /* Execute an external program COMMAND.  Write its stdout to OUTPUT,
 unless that is NULL.  Pass the trailing NULL terminated list of
 -   options, followed by all those in OPTIONS, if that is non-NULL.  */
 +   options, followed by all those in OPTIONS, if that is non-NULL.
 +   Order of options is important here as we may run on systems that
 +   do not allow options after non-options (i.e. many BSDs).  So the
 +   final command line will look like:
 +   command [options] [... va args ...]
 +   This is because [options] will (should?) never contain non-options,
 +   while non-options will always be passed via the [va args].
 + */
  static int
  execute(const char *command, const char *output, const options_t *options, 
 ...)
  {
 @@ -92,12 +99,12 @@ execute(const char *command, const char *output, const 
 options_t *options, ...)
  
   init_options(opts);
   append_option(opts, command);
 + if (options)
 + append_options(opts, options);
   va_start(args, options);
   while ((opt = va_arg(args, const char *)))
   append_option(opts, opt);
   va_end(args);
 - if (options)
 - append_options(opts, options);
   append_option(opts, NULL);
  
   fflush(stdout);
 -- 
 1.6.5.2
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Fail to start uClinux (kernel2.6) in GDB/ARMulator

2009-11-10 Thread Greg Ungerer

Hi CC Yuen,

Yuen Chi Chuen wrote:

In uClinux-dist/, after typing arm-elf-gdb linux-2.6.x/linux

I can enter GDB and then type target sim - load - run. However after 
the run command, the console only shows Starting program: 
/root/Desktop/development/ARMulator_study/uClinux-dist/linux-2.6.x/linux, 
the cursor stays here and no new messages are displayed. 
 
Could any experts help on this issue?


The old ARMulator code is buggy. I run these images on the skyeye
emulator now days. Works much better.

Regards
Greg






[r...@localhost uClinux-dist]# arm-elf-gdb -n linux-2.6.x/linux
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as --host=i686-pc-linux-gnu
--target=arm-elf...(no debugging symbols found)...
(gdb) target sim
Loaded ROM boot.rom
Loaded ROM boot.rom
Loaded ROM boot.rom
Loaded ROM boot.rom
Connected to the simulator.
(gdb) load
Loading section .text.head, size 0x190 vma 0x1008000
Loading section .init, size 0xee60 vma 0x10081a0
Loading section .text, size 0xd163c vma 0x1017000
Loading section __param, size 0x1000 vma 0x10e9000
Loading section .data, size 0x9ac0 vma 0x10ea000
Start address 0x1008000
Transfer rate: 7702368 bits/sec.
(gdb) run
Starting program: 
/root/Desktop/development/ARMulator_study/uClinux-dist/linux-2.6.x/linux






Yahoo!香港提供網上安全攻略,教你如何防範黑客!*了解更多* 
http://hk.promo.yahoo.com/security/



Yahoo!香港提供網上安全攻略,教你如何防範黑客!*了解更多* 
http://hk.promo.yahoo.com/security/






___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev



--

Greg Ungerer  --  Principal EngineerEMAIL: g...@snapgear.com
SnapGear Group, McAfee  PHONE:   +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev