Re: [PATCH] arm reversible : <phase_2_complete>

Yao Qi
2011-08-11T01:34:34Z

On 08/11/2011 01:08 AM, chandra krishnappa wrote:
> Kindly suggest some steps or operations which confirms the basic host and target communication is working fine..
>
> I am stuck up with connection itself....
>
> 1. Copied "gdbserver" ( ARM compiled ) on to target board.
> ./gdbserver 192.168.1.2:9876 ../from_host/test_arm
>
> 2. start gdb from host system
> personal@computer:~/Desktop/gdb-7.3/gdb-7.3$ ./gdb/gdb
> GNU gdb (GDB) 7.3
> Copyright (C) 2011 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-linux".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> (gdb) target remote 192.168.1.6:9876
> Remote debugging using 192.168.1.6:9876
> warning: Can not parse XML target description; XML support was disabled at compile time
> 0x400007b0 in ?? ()
> (gdb) continue
> Continuing.
> Cannot access memory at address 0x0
> [Inferior 1 (Remote target) exited normally]
>
>

Your step 2 looks incorrect to me. You should fire gdb with debuggee
program, like ./gdb test_arm.

>
> On the remote target the complete program is just executing and showing the results...
>
> Not able to debug the program step by step not even any break..
>
> Am searching for some step by step host : target gdb setup through cris-cross cables...
>
> I dont have serial port on my laptop, generally there are more articles on serial connections... seems that used by most ..
>

Your connection between host gdb and gdbserver works. serial port is
usually used to connect with bare mental board which doesn't have
network connection. You don't need to have a serial port in this case.

>
> Parallel I am looking at running dejagnu testsuite for x86 locally.. thinking of extend the x86 execution method of connection of host and target for ARM Board..
>

dejagnu naturally supports remote testing, so you don't have to invent
the wheel again. What you need here is a board file. Here is an example,

# gdbserver running over ssh.
load_generic_config "gdbserver"
process_multilib_options ""

# The default compiler for this target on host machine.
set_board_info compiler
"/home/yao/toolchain/fsf-gcc-trunk/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc"

set_board_info rsh_prog /usr/bin/ssh
set_board_info rcp_prog /usr/bin/scp
set_board_info protocol standard
set_board_info hostname your.target.host.name or ip address
set_board_info username yao
# gdbserver's location on your target board.
set_board_info gdb_server_prog /home/yao/gdbserver
# We will be using the standard GDB remote protocol
set_board_info gdb_protocol "remote"
# Use techniques appropriate to a stub
set_board_info use_gdb_stub 1
# This gdbserver can only run a process once per session.
set_board_info gdb,do_reload_on_run 1
# There's no support for argument-passing (yet).
set_board_info noargs 1
# Can't do input (or output) in the current gdbserver.
set_board_info gdb,noinferiorio 1
# Can't do hardware watchpoints, in general
set_board_info gdb,no_hardware_watchpoints 1

If your board has ssh, you can use this board file with minor changes
(such as location of gdbserver and gcc). If your board doesn't have
ssh, IIRC, dejagnu also support telnet and rsh to access remote boards.
You can find more from google.

You can save the board file as arm.exp, or whatever you prefer, and set
dejagnu a little bit so that this board file can be used when you run
`make check'. Please reference this wiki page on how to use a new board
file in gdb tests.

Testing gdbserver in a native configuration

http://sourceware.org/gdb/wiki/TestingGDB#Testing_gdbserver_in_a_native_configuration

--
Yao (é½å°§)