[ECOS] Re: How to set GDB Stub Options in order to run insight ?

m mariga ma_ariga@yahoo.co.jp
Sat Sep 19 01:51:00 GMT 2009


Hello,
I have known a little bit about Insight's(or GDB stub) not stopping at first 
breaking point(=cyg_start).
Also I like to ask you a new-born question.

First I re-state the problem.
Insight does not stop at first break point(=cyg_start).
I exchanged GDB commands on console window like these.
---
(gdb) set remotebaud 57600
(gdb) set remotelogfile remote-5.log
(gdb) target remote /dev/com4
Remote debugging using /dev/com4
0x000073a4 in ?? ()

(gdb) load
Loading section .text, size 0x5d58a lma 0x410000
Loading section .rodata, size 0x431e lma 0x46d58a
Loading section .data, size 0x16f8 lma 0x4718a8
Start address 0x410000, load size 405408
Transfer rate: 3 KB/sec, 63 bytes/write.

(gdb) b cyg_start
Note: breakpoints 1 (disabled), 2 (disabled), 3 (disabled) and 4 also set at 
pc 0x411dda.
Breakpoint 5 at 0x411dda: file nc_test_slave.c, line 729.

(gdb) c
Continuing.
Network stack using 69632 bytes for misc space
                    69632 bytes for mbufs
                    139264 bytes for mbuf clusters
[cyg_net_init] Init: mbinit(0x00000000)
[cyg_net_init] Init: cyg_net_init_devs(0x00000000)
Init device 'dp83902a_eth0'
DP83902A - eeprom ESA: 00:02:cb:01:42:b9
[cyg_net_init] Init: loopattach(0x00000000)
[cyg_net_init] Init: ifinit(0x00000000)
[cyg_net_init] Init: domaininit(0x00000000)
[cyg_net_init] Init: cyg_net_add_domain(0x004728a8)
New domain internet at 0x00000000
[cyg_net_init] Init: cyg_net_add_domain(0x00472298)
New domain route at 0x00000000
[cyg_net_init] Init: call_route_init(0x00000000)
[cyg_net_init] Done

At this point it should stop at break point(=cyg_start),but it never reply 
nothing.
---

I perused remote-5.log and learned GDB stub does not reply continue command.
Here are excerpts of remote-5.log.
---
c b cyg_start
c c
w $Z0,411dda,2#d3
r +$#00
w +$m411dda,2#8a
r +$1aa2#25
w +$X411dda,2:\x01\x80#30
r +$OK#9a
w +$vCont?#49
r +$#00
w +$Hc0#db
r +$OK#9a
w +$c#63
r 
+$O4E6574776F726B20737461636B207573696E6720363936333220627974657320666F72206D6973632073706163650A#0C
w +
   -- omitted --
r 
$O5B6379675F6E65745F696E69745D20496E69743A2063616C6C5F726F7574655F696E69742830783030303030303030290A#5D
w +
r $O5B6379675F6E65745F696E69745D20446F6E650A#2D
w +
r +
w \x03                ; I entered Ctr C.
r <Timeout: -1 seconds>
End of log
---

>From here my explanation is from my instant knowlegde.Pardon if I 
misunderstood.
GDB stub should cause TRAP exception at break point(cyg_start) 
address(=411dda).
But there's no TRAP reply like T05.
Because normally GDB stub refers to vector table at starting 
address(=410000) and cause TRAP exception.
But there is no vector table at my starting address,so GDB could't cause 
TRAP exception.

My current mlt_h8300_h8300h_aki3068net_ram.ldi is like next.
---
SECTIONS
{
    SECTIONS_BEGIN
    SECTION_text (ram, 0x410000, LMA_EQ_VMA)
    SECTION_fini (ram, ALIGN (0x1), LMA_EQ_VMA)
    SECTION_rodata (ram, ALIGN (0x1), LMA_EQ_VMA)
---

I tentatively changed it like next.
---
SECTIONS
{
    SECTIONS_BEGIN
    SECTION_vectors (ram, 0x410000, LMA_EQ_VMA)
    SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fini (ram, ALIGN (0x1), LMA_EQ_VMA)
---

I could built libtarget.a.
But Making of application caused next error.
h8300-elf-gcc -mh -mint32 -nostartfiles -L/home/link/aki-net-0831-ALIGN4-2/untitled_install/lib 
 -Wl,--gc-sections -Wl,--
Map -Wl,nc_test_slave.map -o nc_test_slave 
nc_test_slave.o -Ttarget.ld -nostdlib
/gnutools/lib/gcc-lib/h8300-elf/3.3.2/../../../../h8300-elf/bin/ld:target.ld:26: 
parse error
collect2: ld returned 1 exit status
make: *** [nc_test_slave] Error 1

If my deduction is correct,how should I deploy vector table at staring 
address(=0x410000) ?
I sent together log file,map file,and current rom.ldi ram.ldi rom.h ram.h 
files.

Would you please help me ?

m mariga
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sendfiles.tar.bz2
Type: application/octet-stream
Size: 44898 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20090919/3c9eaf2d/attachment.obj>
-------------- next part --------------
-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


More information about the Ecos-discuss mailing list