From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17377 invoked by alias); 28 Sep 2009 09:54:43 -0000 Received: (qmail 17366 invoked by uid 22791); 28 Sep 2009 09:54:42 -0000 X-SWARE-Spam-Status: No, hits=0.7 required=5.0 tests=AWL,BAYES_50,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ybbsmtp07.mail.ogk.yahoo.co.jp (HELO ybbsmtp07.mail.ogk.yahoo.co.jp) (124.83.153.127) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 28 Sep 2009 09:54:36 +0000 Received: (qmail 46012 invoked by alias); 28 Sep 2009 09:54:34 -0000 Received: from unknown (HELO masahiro) (219.36.42.48 with poptime) by ybbsmtp07.mail.ogk.yahoo.co.jp with SMTP; 28 Sep 2009 09:54:34 -0000 X-Apparently-From: Message-ID: <9C016D89352D4911AEF2AE5F6E415F92@masahiro> From: "m mariga" To: References: <3100D422DF3A4D7B9D337FD86D646F40@masahiro> <4A65D8D3.9060400@dallaway.org.uk> <3F8ED0BDC83C43259ADD0DDE963395DF@masahiro> <4A671AEE.2000101@dallaway.org.uk> <407D126036C3460AB7AA0264475F04E0@masahiro> <4A6971F2.1030100@dallaway.org.uk> <095F57A600314F7E86F6731FCC889A3D@masahiro> <87D23C72FA344A339A61EA9D3E333467@masahiro> <4AA0DFEB.2020800@dallaway.org.uk> <5D7EE4D955F443C7946FC40DB7EE93C1@masahiro> <4AA4EE58.2050100@dallaway.org.uk> Date: Mon, 28 Sep 2009 09:54:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] About h8000 eCos GDB-Stub X-SW-Source: 2009-09/txt/msg00257.txt.bz2 Hello, I am still struggling to resolve why not breaking at cyg_start in Insight. As I am further involved,the problem's aspect became more about eCos's h8000 GDB-Stub, so let me change my Mailing list subject title from "How to set GDB Stub Options in order to run insight ?" to "About h8000 eCos GDB-Stub". First I re-state my problem. I am working on eCos 3.0 using Akizuki H8/3068 Network board. That board's CPU is H8/3069F. I succeeded to install FreeBSD stack and ran TCP/IP test programs. But when I tried to use Insight or GDB,it does not stop at cyg_start breaking point. I start up Insight like next line. $ h8300-elf-insight.exe nc_test_slave.elf --- GDB commands log on console window (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. ---end GDB commands log on console window I perused remote-5.log and learned GDB-Stub does not operate properly.. ---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 ---end of excerpts of remote-5.log When GDB send $Z0, GDB-Stub should replace address's code with TRAP,but in case of h8000 GDB-Stub does nothing. So GDB try to replace address's code by $X411dda,2:\x01\x80. But \x01\x80 is never H8's undefined codes but Sleep Command,so CPU sleeps at top of cyg_start and never stops. I studied \ecos-3.0\packages\hal\common\v3_0\src\generic-stub.c,and found __process_packet() function looked likely place. It's 1494-1566 lines read, #if defined(CYGNUM_HAL_BREAKPOINT_LIST_SIZE) && (CYGNUM_HAL_BREAKPOINT_LIST_SIZE > 0) case 'Z': is_Z = 1; case 'z': { char *ptr = &packet[1]; target_register_t ztype, addr, length; There was no CYGNUM_HAL_BREAKPOINT_LIST_SIZE option in h8000 cdl file. I tentatively commented out defined(CYGNUM_HAL_BREAKPOINT_LIST_SIZE) line and ran,but there was no change in GDB command's log. Apparantly there are something missing.Would you please teach me the best way to insert $Z0 operation in h8000 GDB-Stub ? Also,although I inserted diag_printf() in __process_packet function, nothing appeared on console window. I do not know why diag_printf() did nothing,or am I looking wrong place at all ? Please teach me how to trace codes in generic-stub.c. Are there any way to display on Insight console window ? Thank you in advance. m mariga -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss