This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: gdb debug on ipaq



On 26-Jun-2001 Weilong Li wrote:
> I make redboot running on ipaq, and on linux host
> machine, I am tring to run thread0 in tests directory
> on ipaq. I typed
>#> arm-elf-gdb thread0
> 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=i586-pc-linux-gnu
> --target=arm-elf"...
> (gdb) target remote 192.168.1.20:9000
> Remote debugging using 192.168.1.20:9000
> 0x50046f30 in ?? ()
> (gdb) load
> Loading section .rom_vectors, size 0x40 lma 0x20000
> Loading section .text, size 0x651c lma 0x20040
> Loading section .rodata, size 0x444 lma 0x2655c
> Loading section .data, size 0xae8 lma 0x269a0
> Start address 0x20040 , load size 29832
> Transfer rate: 238656 bits in <1 sec, 298 bytes/write.
> (gdb) continue
> Continuing.
> PASS:<Thread 0 OK>
> EXIT:<done>
> 
> All the messages above are shown on the host machine,
> nothing is showing on ipaq. Also, after the loading
> of the program, the redboot stucks on ipaq, I cannot
> input any character using stylus.
> 

This is the expected behaviour.  eCos programs do not "terminate",
but rather simply stop.

To get control back to GDB or RedBoot, press the reset button
on the bottom of the unit, or type ^C to GDB.

> Another question is that I am trying to convert
> redboot mode to gdb mode by typing "$" under
> redboot prompt, however, it seems I cannot
> type in the "$" character, though I can type in
> any other character. I don't know why.

The '$' is special in that it tells RedBoot that a GDB protocol
packet is coming.  The only point where you cannot type '$' and
have RedBoot see it directly is at the start of a command line.
The '$' can appear anywhere else on the line.

Once RedBoot sees the '$', it switches to GDB protocol mode.
This is a silent protocol, i.e. characters are not echoed,
thus you won't see anything happen on your screen, but GDB is
actually waiting for a complete command.

Here are some examples (run on the iPAQ):
  RedBoot> abc$
  ** Error: Illegal command: "abc$"

In this case, I typed '$g#67' which is the GDB command to dump the registers
from the machine.
  RedBoot> +$0100000001000000e4ef00005000000003000000500000000000000064f000005000000000
430100000000009cc90000a0c9000090c9000024e60450c07104500000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000d3000020# f1

Note that the only way to get back to RedBoot is to reset the unit.

Also notice that if you managed to get into GDB mode using the
touch screen (with the stylus), it would still work, but you'd
be entering GDB commands from the touch pad - probably not very
useful.  The GDB protocol is really designed to be run from the
GDB [host] program.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]