* gdb cross compilation, error from gdb/tui module.... please help.
@ 2010-10-27 15:36 paawan oza
2010-10-27 16:14 ` Baurzhan Ismagulov
0 siblings, 1 reply; 12+ messages in thread
From: paawan oza @ 2010-10-27 15:36 UTC (permalink / raw)
To: gdb
Hi,
I am working on reversible debugging on arm....at the first step there are
couple of hurdles, please help.
-> I have donwload arm tool chain from
http://www.codesourcery.com/sgpp/lite/arm/portal/package3696/public/arm-none-linux-gnueabi/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
-> tried to compile gdb (at the first point it threw 'termcap library not
found')
-> so I cross compiled ncurses-5.5 and kept libraries along with other arm
libraries.
-> and gdb went on with more compilation stuffs and finally it threw following.
arm-none-linux-gnueabi-gcc -g -O2 -I. -I. -I./common -I./config
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode
-I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include
-I../libdecnumber -I./../libdecnumber -I./gnulib -Ignulib -DMI_OUT=1 -DTUI=1
-Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
-Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch
-Wno-char-subscripts -c -o mi-getopt.o -MT mi-getopt.o -MMD -MP -MF
.deps/mi-getopt.Tpo ./mi/mi-getopt.c
arm-none-linux-gnueabi-gcc -g -O2 -I. -I. -I./common -I./config
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode
-I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include
-I../libdecnumber -I./../libdecnumber -I./gnulib -Ignulib -DMI_OUT=1 -DTUI=1
-Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
-Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch
-Wno-char-subscripts -c -o tui-command.o -MT tui-command.o -MMD -MP -MF
.deps/tui-command.Tpo ./tui/tui-command.c
In file included from ./tui/tui-command.c:26:
./tui/tui-data.h:38: error: expected specifier-qualifier-list before 'WINDOW'
In file included from ./tui/tui-command.c:27:
./tui/tui-win.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'tui_border_ulcorner'
./tui/tui-win.h:41: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'tui_border_urcorner'
./tui/tui-win.h:42: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'tui_border_lrcorner'
./tui/tui-win.h:43: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'tui_border_llcorner'
./tui/tui-win.h:44: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'tui_border_vline'
./tui/tui-win.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'tui_border_hline'
./tui/tui-command.c: In function 'tui_dispatch_ctrl_char':
./tui/tui-command.c:80: error: 'WINDOW' undeclared (first use in this function)
./tui/tui-command.c:80: error: (Each undeclared identifier is reported only once
./tui/tui-command.c:80: error: for each function it appears in.)
./tui/tui-command.c:80: error: 'w' undeclared (first use in this function)
./tui/tui-command.c:80: error: 'struct tui_gen_win_info' has no member named
'handle'
./tui/tui-command.c:85: warning: implicit declaration of function 'wgetch'
./tui/tui-command.c:86: error: 'ERR' undeclared (first use in this function)
./tui/tui-command.c:93: error: 'KEY_PPAGE' undeclared (first use in this
function)
./tui/tui-command.c:95: error: 'KEY_NPAGE' undeclared (first use in this
function)
./tui/tui-command.c:113: error: 'KEY_DOWN' undeclared (first use in this
function)
./tui/tui-command.c:114: error: 'KEY_SF' undeclared (first use in this function)
./tui/tui-command.c:117: error: 'KEY_UP' undeclared (first use in this function)
./tui/tui-command.c:118: error: 'KEY_SR' undeclared (first use in this function)
./tui/tui-command.c:121: error: 'KEY_RIGHT' undeclared (first use in this
function)
./tui/tui-command.c:124: error: 'KEY_LEFT' undeclared (first use in this
function)
make[2]: *** [tui-command.o] Error 1
make[2]: Leaving directory `/home/oza/mk_patch/gdb/gdb-7.2/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/home/oza/mk_patch/gdb/gdb-7.2'
make: *** [all] Error 2
1) does it have something to do with the compaitibility with ncurses library
version ?
folowing is the list of ncurses arm libaries which were copied.
libform.a libform_g.a libmenu.a libmenu_g.a libncurses++.a libncurses.a
libncurses_g.a libpanel.a libpanel_g.a
please help..
Regards,
Oza.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: gdb cross compilation, error from gdb/tui module.... please help. 2010-10-27 15:36 gdb cross compilation, error from gdb/tui module.... please help paawan oza @ 2010-10-27 16:14 ` Baurzhan Ismagulov 2010-10-28 4:02 ` gdb cross compilation, error from gdb/tui module.... please help. <readline comilation error after disabling tui> paawan oza 0 siblings, 1 reply; 12+ messages in thread From: Baurzhan Ismagulov @ 2010-10-27 16:14 UTC (permalink / raw) To: paawan oza; +Cc: gdb On Wed, Oct 27, 2010 at 08:36:15AM -0700, paawan oza wrote: > ./tui/tui-data.h:38: error: expected specifier-qualifier-list before 'WINDOW' It doesn't answer your question, but if you don't need tui, you can configure --disable-tui. FWIW, I never use it, let alone on arm; does anybody really use it? With kind regards, Baurzhan. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: gdb cross compilation, error from gdb/tui module.... please help. <readline comilation error after disabling tui> 2010-10-27 16:14 ` Baurzhan Ismagulov @ 2010-10-28 4:02 ` paawan oza 2010-10-28 9:43 ` gdb cross compilation, error from gdb/tui module paawan oza 0 siblings, 1 reply; 12+ messages in thread From: paawan oza @ 2010-10-28 4:02 UTC (permalink / raw) To: Baurzhan Ismagulov, gdb I ran into readline error now. gdb is configured as below.... > ./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi >--build=i686-pc-linux-gnu --disable-tui > make <snippet> arm-none-linux-gnueabi-gcc -g -O2 -I. -I. -I./common -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_Carm-none-linux-gnueabi-gcc -g -O2 \ -o gdb gdb.o libgdb.a \ ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lm ../libiberty/libiberty.a gnulib/libgnu.a -ldl -Wl,--dynamic-list=./proc-service.list libgdb.a(utils.o): In function `init_page_info': /home/oza/mk_patch/gdb/gdb-7.2/gdb/utils.c:2102: undefined reference to `tgetnum' ../readline/libreadline.a(display.o): In function `_rl_clear_screen': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2091: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `_rl_clear_to_eol': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2062: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `cr': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2211: undefined reference to `tputs' /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2211: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `_rl_move_vert': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:1789: undefined reference to `tputs' ../readline/libreadline.a(display.o):/home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:1805: more undefined references to `tputs' follow ../readline/libreadline.a(display.o): In function `insert_some_chars': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2116: undefined reference to `tgoto' /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2117: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `delete_chars': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2166: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `insert_some_chars': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2142: undefined reference to `tputs' /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2133: undefined reference to `tputs' /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2126: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `delete_chars': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2159: undefined reference to `tgoto' /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2160: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `rl_redisplay': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:984: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `cr': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2211: undefined reference to `tputs' ../readline/libreadline.a(terminal.o): In function `_rl_set_cursor': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:756: undefined reference to `tputs' ../readline/libreadline.a(terminal.o): In function `_rl_control_keypad': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:730: undefined reference to `tputs' ../readline/libreadline.a(terminal.o):/home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:718: more undefined references to `tputs' follow ../readline/libreadline.a(terminal.o): In function `_rl_get_screen_size': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:282: undefined reference to `tgetnum' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:263: undefined reference to `tgetnum' ../readline/libreadline.a(terminal.o): In function `_rl_init_terminal_io': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:468: undefined reference to `tgetent' ../readline/libreadline.a(terminal.o): In function `get_term_capabilities': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:414: undefined reference to `tgetstr' ../readline/libreadline.a(terminal.o): In function `_rl_init_terminal_io': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:534: undefined reference to `tgetflag' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:549: undefined reference to `tgetflag' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:534: undefined reference to `tgetflag' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:549: undefined reference to `tgetflag' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:461: undefined reference to `BC' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:461: undefined reference to `UP' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:461: undefined reference to `PC' collect2: ld returned 1 exit status make[2]: *** [gdb] Error 1 make[2]: Leaving directory `/home/oza/mk_patch/gdb/gdb-7.2/gdb' make[1]: *** [all-gdb] Error 2 make[1]: Leaving directory `/home/oza/mk_patch/gdb/gdb-7.2' make: *** [all] Error 2 PS: using vmware on x86. Regards, Oza. ----- Original Message ---- From: Baurzhan Ismagulov <ibr@radix50.net> To: paawan oza <paawan1982@yahoo.com> Cc: gdb@sourceware.org Sent: Wed, October 27, 2010 9:43:44 PM Subject: Re: gdb cross compilation, error from gdb/tui module.... please help. On Wed, Oct 27, 2010 at 08:36:15AM -0700, paawan oza wrote: > ./tui/tui-data.h:38: error: expected specifier-qualifier-list before 'WINDOW' It doesn't answer your question, but if you don't need tui, you can configure --disable-tui. FWIW, I never use it, let alone on arm; does anybody really use it? With kind regards, Baurzhan. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: gdb cross compilation, error from gdb/tui module 2010-10-28 4:02 ` gdb cross compilation, error from gdb/tui module.... please help. <readline comilation error after disabling tui> paawan oza @ 2010-10-28 9:43 ` paawan oza 2010-10-28 10:18 ` Pedro Alves 0 siblings, 1 reply; 12+ messages in thread From: paawan oza @ 2010-10-28 9:43 UTC (permalink / raw) To: Baurzhan Ismagulov, gdb Hi, following problem is no more there. can somebody clarify following... ? If I try ./configure --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --build=i686-pc-linux-gnu --disable-tui and build gdb that means.... -> gdb is able to rn on loinux host with x86 arch ? -> and using target sim command I can debug arm binaries. ? -> but if modify arm-tdep.c then will I be able to test the implementation (process record, non-linux-ABI part) ? Regards, Oza. ----- Original Message ---- From: paawan oza <paawan1982@yahoo.com> To: Baurzhan Ismagulov <ibr@radix50.net>; gdb@sourceware.org Sent: Thu, October 28, 2010 9:32:17 AM Subject: Re: gdb cross compilation, error from gdb/tui module.... please help. <readline comilation error after disabling tui> I ran into readline error now. gdb is configured as below.... > ./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi >--build=i686-pc-linux-gnu --disable-tui > make <snippet> arm-none-linux-gnueabi-gcc -g -O2 -I. -I. -I./common -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_Carm-none-linux-gnueabi-gcc -g -O2 \ -o gdb gdb.o libgdb.a \ ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lm ../libiberty/libiberty.a gnulib/libgnu.a -ldl -Wl,--dynamic-list=./proc-service.list libgdb.a(utils.o): In function `init_page_info': /home/oza/mk_patch/gdb/gdb-7.2/gdb/utils.c:2102: undefined reference to `tgetnum' ../readline/libreadline.a(display.o): In function `_rl_clear_screen': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2091: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `_rl_clear_to_eol': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2062: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `cr': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2211: undefined reference to `tputs' /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2211: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `_rl_move_vert': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:1789: undefined reference to `tputs' ../readline/libreadline.a(display.o):/home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:1805: more undefined references to `tputs' follow ../readline/libreadline.a(display.o): In function `insert_some_chars': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2116: undefined reference to `tgoto' /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2117: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `delete_chars': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2166: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `insert_some_chars': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2142: undefined reference to `tputs' /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2133: undefined reference to `tputs' /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2126: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `delete_chars': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2159: undefined reference to `tgoto' /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2160: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `rl_redisplay': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:984: undefined reference to `tputs' ../readline/libreadline.a(display.o): In function `cr': /home/oza/mk_patch/gdb/gdb-7.2/readline/display.c:2211: undefined reference to `tputs' ../readline/libreadline.a(terminal.o): In function `_rl_set_cursor': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:756: undefined reference to `tputs' ../readline/libreadline.a(terminal.o): In function `_rl_control_keypad': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:730: undefined reference to `tputs' ../readline/libreadline.a(terminal.o):/home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:718: more undefined references to `tputs' follow ../readline/libreadline.a(terminal.o): In function `_rl_get_screen_size': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:282: undefined reference to `tgetnum' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:263: undefined reference to `tgetnum' ../readline/libreadline.a(terminal.o): In function `_rl_init_terminal_io': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:468: undefined reference to `tgetent' ../readline/libreadline.a(terminal.o): In function `get_term_capabilities': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:414: undefined reference to `tgetstr' ../readline/libreadline.a(terminal.o): In function `_rl_init_terminal_io': /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:534: undefined reference to `tgetflag' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:549: undefined reference to `tgetflag' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:534: undefined reference to `tgetflag' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:549: undefined reference to `tgetflag' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:461: undefined reference to `BC' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:461: undefined reference to `UP' /home/oza/mk_patch/gdb/gdb-7.2/readline/terminal.c:461: undefined reference to `PC' collect2: ld returned 1 exit status make[2]: *** [gdb] Error 1 make[2]: Leaving directory `/home/oza/mk_patch/gdb/gdb-7.2/gdb' make[1]: *** [all-gdb] Error 2 make[1]: Leaving directory `/home/oza/mk_patch/gdb/gdb-7.2' make: *** [all] Error 2 PS: using vmware on x86. Regards, Oza. ----- Original Message ---- From: Baurzhan Ismagulov <ibr@radix50.net> To: paawan oza <paawan1982@yahoo.com> Cc: gdb@sourceware.org Sent: Wed, October 27, 2010 9:43:44 PM Subject: Re: gdb cross compilation, error from gdb/tui module.... please help. On Wed, Oct 27, 2010 at 08:36:15AM -0700, paawan oza wrote: > ./tui/tui-data.h:38: error: expected specifier-qualifier-list before 'WINDOW' It doesn't answer your question, but if you don't need tui, you can configure --disable-tui. FWIW, I never use it, let alone on arm; does anybody really use it? With kind regards, Baurzhan. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: gdb cross compilation, error from gdb/tui module 2010-10-28 9:43 ` gdb cross compilation, error from gdb/tui module paawan oza @ 2010-10-28 10:18 ` Pedro Alves 2010-10-28 11:13 ` paawan oza 0 siblings, 1 reply; 12+ messages in thread From: Pedro Alves @ 2010-10-28 10:18 UTC (permalink / raw) To: gdb; +Cc: paawan oza, Baurzhan Ismagulov On Thursday 28 October 2010 10:43:11, paawan oza wrote: > If I try > ./configure --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi > --build=i686-pc-linux-gnu --disable-tui > and build gdb that means.... > > -> gdb is able to rn on loinux host with x86 arch ? Yes. > -> and using target sim command I can debug arm binaries. ? No, --target=arm-none-linux-gnueabi does not include "target sim". Look at gdb/configure.tgt for "gdb_sim=../sim/arm". You'll need --target=arm-eabi or arm-elf. > -> but if modify arm-tdep.c then will I be able to test the implementation > (process record, non-linux-ABI part) ? Supposedly. If you want to work on the linux part as well, and if running a native arm gdb is too much for your arm board, you can use process record on x86 connected to an arm-linux gdbserver ("target remote ...") running on the arm board. That'll be slow, but should work. -- Pedro Alves ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: gdb cross compilation, error from gdb/tui module 2010-10-28 10:18 ` Pedro Alves @ 2010-10-28 11:13 ` paawan oza 2010-10-28 11:27 ` Pedro Alves 0 siblings, 1 reply; 12+ messages in thread From: paawan oza @ 2010-10-28 11:13 UTC (permalink / raw) To: Pedro Alves; +Cc: Baurzhan Ismagulov, gdb If you want to work on the linux part as well, and if running a native arm gdb is too much for your arm board, you can use process record on x86 connected to an arm-linux gdbserver ("target remote ...") running on the arm board. That'll be slow, but should work. Oza: 1) as I do not have arm target/board, everything to be done on host either by vmware, qemu et... whichever support arm-linux-kernel on x86 host...and then inside that I can compile gdb fully for arm and do linux ABI part, hope that way it works out. but I ahev not got any setup as of now, as I am working on the first part on arm insns. (non-OS-ABI part) 2) If I correctly understand, the nomenclature 'arm-tdep', does it mean arm-target-depedent, and when I try to compile gdb with --target=arm-eabi or arm-elf, it also compile arm-tdep.c as a packge of simulator. Is My understanding correct ? Thank you for your inputs. Regards, Oza. ----- Original Message ---- From: Pedro Alves <pedro@codesourcery.com> To: gdb@sourceware.org Cc: paawan oza <paawan1982@yahoo.com>; Baurzhan Ismagulov <ibr@radix50.net> Sent: Thu, October 28, 2010 3:48:09 PM Subject: Re: gdb cross compilation, error from gdb/tui module On Thursday 28 October 2010 10:43:11, paawan oza wrote: > If I try > ./configure --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi > --build=i686-pc-linux-gnu --disable-tui > and build gdb that means.... > > -> gdb is able to rn on loinux host with x86 arch ? Yes. > -> and using target sim command I can debug arm binaries. ? No, --target=arm-none-linux-gnueabi does not include "target sim". Look at gdb/configure.tgt for "gdb_sim=../sim/arm". You'll need --target=arm-eabi or arm-elf. > -> but if modify arm-tdep.c then will I be able to test the implementation > (process record, non-linux-ABI part) ? Supposedly. If you want to work on the linux part as well, and if running a native arm gdb is too much for your arm board, you can use process record on x86 connected to an arm-linux gdbserver ("target remote ...") running on the arm board. That'll be slow, but should work. -- Pedro Alves ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: gdb cross compilation, error from gdb/tui module 2010-10-28 11:13 ` paawan oza @ 2010-10-28 11:27 ` Pedro Alves 2010-10-28 11:57 ` paawan oza 0 siblings, 1 reply; 12+ messages in thread From: Pedro Alves @ 2010-10-28 11:27 UTC (permalink / raw) To: paawan oza; +Cc: Baurzhan Ismagulov, gdb On Thursday 28 October 2010 12:13:12, paawan oza wrote: > 2) If I correctly understand, the nomenclature 'arm-tdep', does it mean > arm-target-depedent, and when I try to compile gdb with --target=arm-eabi or > arm-elf, it also compile arm-tdep.c as a packge of simulator. Is My > understanding correct ? Yes. -- Pedro Alves ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: gdb cross compilation, error from gdb/tui module 2010-10-28 11:27 ` Pedro Alves @ 2010-10-28 11:57 ` paawan oza 2010-10-28 12:11 ` Pedro Alves 0 siblings, 1 reply; 12+ messages in thread From: paawan oza @ 2010-10-28 11:57 UTC (permalink / raw) To: Pedro Alves, Baurzhan Ismagulov, gdb gdb hangs with target sim for following configuration.... following is the sample program void a(int t) { printf("%d\n",t); } int main() { a(6); } and I have cross compiled it with tool chain at following location http://www.codesourcery.com/sgpp/lite/arm/portal/package3696/public/arm-none-linux-gnueabi/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 ./gdb GNU gdb (GDB) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Setting up the environment for debugging gdb. No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] .gdbinit:8: Error in sourced command file: Argument required (one or more breakpoint numbers). (gdb) target sim Connected to the simulator. (gdb) file ./a.out warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration of GDB. Attempting to continue with the default arm settings. Reading symbols from /home/oza/mk_patch/gdb/gdb-7.2/gdb/a.out...done. (gdb) load Loading section .interp, size 0x13 vma 0x8134 Loading section .note.ABI-tag, size 0x20 vma 0x8148 Loading section .hash, size 0x28 vma 0x8168 Loading section .dynsym, size 0x50 vma 0x8190 Loading section .dynstr, size 0x43 vma 0x81e0 Loading section .gnu.version, size 0xa vma 0x8224 Loading section .gnu.version_r, size 0x20 vma 0x8230 Loading section .rel.dyn, size 0x8 vma 0x8250 Loading section .rel.plt, size 0x20 vma 0x8258 Loading section .init, size 0xc vma 0x8278 Loading section .plt, size 0x44 vma 0x8284 Loading section .text, size 0x15c vma 0x82c8 Loading section .fini, size 0x8 vma 0x8424 Loading section .rodata, size 0x8 vma 0x842c Loading section .ARM.exidx, size 0x8 vma 0x8434 Loading section .eh_frame, size 0x4 vma 0x843c Loading section .init_array, size 0x4 vma 0x10440 Loading section .fini_array, size 0x4 vma 0x10444 Loading section .jcr, size 0x4 vma 0x10448 Loading section .dynamic, size 0xe8 vma 0x1044c Loading section .got, size 0x20 vma 0x10534 Loading section .data, size 0x8 vma 0x10554 Start address 0x82c8 Transfer rate: 8480 bits in <1 sec. (gdb) start Temporary breakpoint 1 at 0x83a4: file ./test.c, line 8. Starting program: /home/oza/mk_patch/gdb/gdb-7.2/gdb/a.out .... .... .... <I never get prompt back, and it is just hanging> then I collected gdb's backtrace using another gdb...and I got following... (gdb) bt #0 0x081f82b9 in ARMul_Emulate32 (state=0x83e1920) at ./armemu.c:918 #1 0x081e42c1 in ARMul_DoProg (state=0x83e1920) at arminit.c:241 #2 0x081d8eb2 in sim_resume (sd=0x1, step=0, siggnal=0) at wrapper.c:228 #3 0x080959d7 in gdbsim_wait (ops=0x835ae40, ptid={pid = -1, lwp = 0, tid = 0}, status=0xbfffc8c8, options=0) at remote-sim.c:705 #4 0x08139c9b in target_wait (ptid={pid = -1, lwp = 0, tid = 0}, status=0xbfffc8c8, options=0) at target.c:2219 #5 0x0810ecf4 in wait_for_inferior (treat_exec_as_sigtrap=0) at infrun.c:2529 #6 0x0810f403 in proceed (addr=4294967295, siggnal=TARGET_SIGNAL_DEFAULT, step=0) at infrun.c:2064 #7 0x0810499b in continue_1 (all_threads=0) at infcmd.c:689 #8 0x08104aad in continue_command (args=0x0, from_tty=1) at infcmd.c:781 #9 0x080559e2 in execute_command (p=0x8361181 "", from_tty=1) at top.c:422 #10 0x0811efa7 in command_handler (command=0x8361180 "c") at event-top.c:498 #11 0x0811fb3c in command_line_handler (rl=0x83ec078 "\020\uffff>\b \uffff>\b") at event-top.c:702 #12 0x08212ac4 in rl_callback_read_char () at callback.c:205 #13 0x0811f01b in rl_callback_read_char_wrapper (client_data=0x0) at event-top.c:178 #14 0x0811ec1e in handle_file_event (data={ptr = 0x0, integer = 0}) at event-loop.c:817 #15 0x0811df75 in process_event () at event-loop.c:399 #16 0x0811eb5b in gdb_do_one_event (data=0x0) at event-loop.c:464 #17 0x08119443 in catch_errors (func=0x811e960 <gdb_do_one_event>, func_args=0x0, errstring=0x829c415 "", mask=6) at exceptions.c:518 #18 0x0811e64a in start_event_loop () at event-loop.c:488 #19 0x0811ff2b in cli_command_loop () at event-top.c:211 #20 0x0804beeb in captured_command_loop (data=0x0) at ./main.c:227 #21 0x08119443 in catch_errors (func=0x804bee0 <captured_command_loop>, func_args=0x0, errstring=0x829c415 "", mask=6) at exceptions.c:518 #22 0x0804c674 in captured_main (data=0xbfffcce4) at ./main.c:910 #23 0x08119443 in catch_errors (func=0x804bf20 <captured_main>, func_args=0xbfffcce4, errstring=0x829c415 "", mask=6) at exceptions.c:518 #24 0x0804bcb1 in gdb_main (args=0xbfffcce4) at ./main.c:919 #25 0x0804bc75 in main (argc=Cannot access memory at address 0x0 ) at gdb.c:34 any idea how to get the arm binaries correctly getting worked under arm simulator ? Regards, Oza. ----- Original Message ---- From: Pedro Alves <pedro@codesourcery.com> To: paawan oza <paawan1982@yahoo.com> Cc: Baurzhan Ismagulov <ibr@radix50.net>; gdb@sourceware.org Sent: Thu, October 28, 2010 4:57:12 PM Subject: Re: gdb cross compilation, error from gdb/tui module On Thursday 28 October 2010 12:13:12, paawan oza wrote: > 2) If I correctly understand, the nomenclature 'arm-tdep', does it mean > arm-target-depedent, and when I try to compile gdb with --target=arm-eabi or > arm-elf, it also compile arm-tdep.c as a packge of simulator. Is My > understanding correct ? Yes. -- Pedro Alves ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: gdb cross compilation, error from gdb/tui module 2010-10-28 11:57 ` paawan oza @ 2010-10-28 12:11 ` Pedro Alves 2010-10-28 12:46 ` paawan oza 0 siblings, 1 reply; 12+ messages in thread From: Pedro Alves @ 2010-10-28 12:11 UTC (permalink / raw) To: paawan oza; +Cc: Baurzhan Ismagulov, gdb On Thursday 28 October 2010 12:56:57, paawan oza wrote: > and I have cross compiled it with tool chain at following location > http://www.codesourcery.com/sgpp/lite/arm/portal/package3696/public/arm-none-linux-gnueabi/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 ^^^^^^^^^^^^^^^^^^^^^^ > This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf". ^^^^^^^ > warning: A handler for the OS ABI "GNU/Linux" is not built into this ... > any idea how to get the arm binaries correctly getting worked under arm > simulator ? I suppose you'll get better results with a compiler that matches your target... Try building gdb with --target=arm-eabi, and to use the arm-eabi compiler, not the arm-linux-gnueabi compiler. -- Pedro Alves ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: gdb cross compilation, error from gdb/tui module 2010-10-28 12:11 ` Pedro Alves @ 2010-10-28 12:46 ` paawan oza 2010-10-28 13:11 ` Pedro Alves 0 siblings, 1 reply; 12+ messages in thread From: paawan oza @ 2010-10-28 12:46 UTC (permalink / raw) To: Pedro Alves; +Cc: Baurzhan Ismagulov, gdb same results with arm-eabi linux-ghot:/home/oza/mk_patch/gdb/gdb-7.2/gdb # arm-none-linux-gnueabi-gcc -g ./test.c ./test.c: In function 'main': ./test.c:3: warning: incompatible implicit declaration of built-in function 'printf' linux-ghot:/home/oza/mk_patch/gdb/gdb-7.2/gdb # file ./a.out ./a.out: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14, dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped linux-ghot:/home/oza/mk_patch/gdb/gdb-7.2/gdb # ./gdb GNU gdb (GDB) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-eabi". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Setting up the environment for debugging gdb. No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] .gdbinit:8: Error in sourced command file: Argument required (one or more breakpoint numbers). (gdb) target sim Connected to the simulator. (gdb) file ./a.out warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration of GDB. Attempting to continue with the default arm settings. Reading symbols from /home/oza/mk_patch/gdb/gdb-7.2/gdb/a.out...done. (gdb) load Loading section .interp, size 0x13 vma 0x8134 Loading section .note.ABI-tag, size 0x20 vma 0x8148 Loading section .hash, size 0x28 vma 0x8168 Loading section .dynsym, size 0x50 vma 0x8190 Loading section .dynstr, size 0x41 vma 0x81e0 Loading section .gnu.version, size 0xa vma 0x8222 Loading section .gnu.version_r, size 0x20 vma 0x822c Loading section .rel.dyn, size 0x8 vma 0x824c Loading section .rel.plt, size 0x20 vma 0x8254 Loading section .init, size 0xc vma 0x8274 Loading section .plt, size 0x44 vma 0x8280 Loading section .text, size 0x138 vma 0x82c4 Loading section .fini, size 0x8 vma 0x83fc Loading section .rodata, size 0xc vma 0x8404 Loading section .ARM.exidx, size 0x8 vma 0x8410 Loading section .eh_frame, size 0x4 vma 0x8418 Loading section .init_array, size 0x4 vma 0x1041c Loading section .fini_array, size 0x4 vma 0x10420 Loading section .jcr, size 0x4 vma 0x10424 Loading section .dynamic, size 0xe8 vma 0x10428 Loading section .got, size 0x20 vma 0x10510 Loading section .data, size 0x8 vma 0x10530 Start address 0x82c4 Transfer rate: 8208 bits in <1 sec. (gdb) start Temporary breakpoint 1 at 0x8378: file ./test.c, line 3. Starting program: /home/oza/mk_patch/gdb/gdb-7.2/gdb/a.out <here it hangs> Regards, Oza. ----- Original Message ---- From: Pedro Alves <pedro@codesourcery.com> To: paawan oza <paawan1982@yahoo.com> Cc: Baurzhan Ismagulov <ibr@radix50.net>; gdb@sourceware.org Sent: Thu, October 28, 2010 5:41:38 PM Subject: Re: gdb cross compilation, error from gdb/tui module On Thursday 28 October 2010 12:56:57, paawan oza wrote: > and I have cross compiled it with tool chain at following location >http://www.codesourcery.com/sgpp/lite/arm/portal/package3696/public/arm-none-linux-gnueabi/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 >2 ^^^^^^^^^^^^^^^^^^^^^^ > This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf". ^^^^^^^ > warning: A handler for the OS ABI "GNU/Linux" is not built into this ... > any idea how to get the arm binaries correctly getting worked under arm > simulator ? I suppose you'll get better results with a compiler that matches your target... Try building gdb with --target=arm-eabi, and to use the arm-eabi compiler, not the arm-linux-gnueabi compiler. -- Pedro Alves ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: gdb cross compilation, error from gdb/tui module 2010-10-28 12:46 ` paawan oza @ 2010-10-28 13:11 ` Pedro Alves 2010-10-28 14:06 ` paawan oza 0 siblings, 1 reply; 12+ messages in thread From: Pedro Alves @ 2010-10-28 13:11 UTC (permalink / raw) To: paawan oza; +Cc: Baurzhan Ismagulov, gdb On Thursday 28 October 2010 13:46:41, paawan oza wrote: > same results with arm-eabi ... > linux-ghot:/home/oza/mk_patch/gdb/gdb-7.2/gdb # arm-none-linux-gnueabi-gcc -g ... But I suggested: "I suppose you'll get better results with a compiler that matches your target..." "... and to use the arm-eabi compiler, not the arm-linux-gnueabi compiler." -- Pedro Alves ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: gdb cross compilation, error from gdb/tui module 2010-10-28 13:11 ` Pedro Alves @ 2010-10-28 14:06 ` paawan oza 0 siblings, 0 replies; 12+ messages in thread From: paawan oza @ 2010-10-28 14:06 UTC (permalink / raw) To: Pedro Alves; +Cc: Baurzhan Ismagulov, gdb but it is bare metal tool chain, I tried to compile sample application with that but got linker error as follows. /home/oza/mk_patch/gdb/gdb-7.2/gdb # arm-none-eabi-gcc -g ./test.c /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol _start; defaulting to 00008018 /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r': sbrkr.c:(.text+0x18): undefined reference to `_sbrk' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): In function `_write_r': writer.c:(.text+0x20): undefined reference to `_write' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): In function `_close_r': closer.c:(.text+0x18): undefined reference to `_close' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r': fstatr.c:(.text+0x1c): undefined reference to `_fstat' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): In function `_isatty_r': isattyr.c:(.text+0x18): undefined reference to `_isatty' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r': lseekr.c:(.text+0x20): undefined reference to `_lseek' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r': readr.c:(.text+0x20): undefined reference to `_read' collect2: ld returned 1 exit status 8 ----- Original Message ---- From: Pedro Alves <pedro@codesourcery.com> To: paawan oza <paawan1982@yahoo.com> Cc: Baurzhan Ismagulov <ibr@radix50.net>; gdb@sourceware.org Sent: Thu, October 28, 2010 6:41:37 PM Subject: Re: gdb cross compilation, error from gdb/tui module On Thursday 28 October 2010 13:46:41, paawan oza wrote: > same results with arm-eabi ... > linux-ghot:/home/oza/mk_patch/gdb/gdb-7.2/gdb # arm-none-linux-gnueabi-gcc -g ... But I suggested: "I suppose you'll get better results with a compiler that matches your target..." "... and to use the arm-eabi compiler, not the arm-linux-gnueabi compiler." -- Pedro Alves ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-10-28 14:06 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-10-27 15:36 gdb cross compilation, error from gdb/tui module.... please help paawan oza 2010-10-27 16:14 ` Baurzhan Ismagulov 2010-10-28 4:02 ` gdb cross compilation, error from gdb/tui module.... please help. <readline comilation error after disabling tui> paawan oza 2010-10-28 9:43 ` gdb cross compilation, error from gdb/tui module paawan oza 2010-10-28 10:18 ` Pedro Alves 2010-10-28 11:13 ` paawan oza 2010-10-28 11:27 ` Pedro Alves 2010-10-28 11:57 ` paawan oza 2010-10-28 12:11 ` Pedro Alves 2010-10-28 12:46 ` paawan oza 2010-10-28 13:11 ` Pedro Alves 2010-10-28 14:06 ` paawan oza
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox