Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: Does not stop at break point in GDB-remote
@ 2009-09-15  7:16 ariga masahiro
  2009-09-15 15:16 ` Doug Evans
  0 siblings, 1 reply; 6+ messages in thread
From: ariga masahiro @ 2009-09-15  7:16 UTC (permalink / raw)
  To: gdb

Hello,

I understood a little bit of GDB remote serial protocol.
And I newly perused  remote-5.log file.

--- excerpts from remote-5.log : break,continue commands
c b cyg_start                        ; break command
c c                                  ; continue command
w $Z0,411dda,2#d3                    ; Insert (`Z0') a memory breakpoint at 
address 411dda of size 2
r +$#00
w +$m411dda,2#8a                     ; Insight gets breakpoint address's 
codes
r +$1aa2#25
w +$X411dda,2:\x01\x80#30            ; Write address 411dda codes \x01\x80
r +$OK#9a
w +$vCont?#49
r +$#00
w +$Hc0#db
r +$OK#9a
w +$c#63                              ; execute continue command
r 
+$O4E6574776F726B20737461636B207573696E6720363936333220627974657320666F72206D6973632073706163650A#0C
w +
r 
$O2020202020202020202020202020202020202020363936333220627974657320666F72206D627566730A#24
w +
r 
$O202020202020202020202020202020202020202031333932363420627974657320666F72206D62756620636C7573746572730A#DF
w +
r 
$O5B6379675F6E65745F696E69745D20496E69743A206D62696E69742830783030303030303030290A#60
w +
r 
$O5B6379675F6E65745F696E69745D20496E69743A206379675F6E65745F696E69745F646576732830783030303030303030290A#32
w +
r $O496E697420646576696365202764703833393032615F65746830270A#FC
w +
r 
$O4450383339303241202D20656570726F6D204553413A2030303A30323A63623A30313A34323A62390A#45
w +
r 
$O5B6379675F6E65745F696E69745D20496E69743A206C6F6F706174746163682830783030303030303030290A#0D
w +
r 
$O5B6379675F6E65745F696E69745D20496E69743A206966696E69742830783030303030303030290A#59
w +
r 
$O5B6379675F6E65745F696E69745D20496E69743A20646F6D61696E696E69742830783030303030303030290A#2F
w +
r 
$O5B6379675F6E65745F696E69745D20496E69743A206379675F6E65745F6164645F646F6D61696E2830783030343732386138290A#CF
w +
r $O4E657720646F6D61696E20696E7465726E657420617420307830303030303030300A#81
w +
r 
$O5B6379675F6E65745F696E69745D20496E69743A206379675F6E65745F6164645F646F6D61696E2830783030343732323938290A#CE
w +
r $O4E657720646F6D61696E20726F75746520617420307830303030303030300A#2E
w +
r 
$O5B6379675F6E65745F696E69745D20496E69743A2063616C6C5F726F7574655F696E69742830783030303030303030290A#5D
w +
r $O5B6379675F6E65745F696E69745D20446F6E650A#2D
w +
r +
w \x03                        ; Here GDB stub's reply terminated,and GDB 
sent "w \x03"
r <Timeout: -1 seconds>
End of log
---

What is "w \x03" ?
Because according to GDB remote serial protocol, it is reserved.
Any meaning ?

If you have any idea why GDB stub terminated reply,please teach me.

Masahiro Ariga



^ permalink raw reply	[flat|nested] 6+ messages in thread
* Does not stop at break point in GDB-remote
@ 2009-09-10  4:15 ariga masahiro
  0 siblings, 0 replies; 6+ messages in thread
From: ariga masahiro @ 2009-09-10  4:15 UTC (permalink / raw)
  To: gdb

[-- Attachment #1: Type: text/plain, Size: 3832 bytes --]

Hello,

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 I cannot run Insight or GDB,so please help me.
Insight person suggested me to ask GDB mailing list.

I start up Insight like next line.
$ h8300-elf-insight.exe nc_test_slave.elf

I made this nc_test_slave.elf by renaming nc_test_slave file that is 
outputted excuting "make".
Here are excerpts from makefile.
---
export PREFIX := 
/home/link/aki-net-0910-config-stub-global-common/untitled_install
XCC = h8300-elf-gcc
CFLAGS 
= -mh -mint32 -g -Wall -I$(PREFIX)/include -ffunction-sections -fdata-sections
LDFLAGS 
=  -mh -mint32 -nostartfiles -L$(PREFIX)/lib -Wl,--gc-sections -Wl,--Map -Wl,nc_test_slave.map
LIBS = -Ttarget.ld -nostdlib
LD  = $(XCC)
all: nc_test_slave
nc_test_slave.o: nc_test_slave.c
 $(XCC) -c -o $*.o $(CFLAGS) $<
nc_test_slave: nc_test_slave.o
 $(LD) $(LDFLAGS) -o $@ $@.o $(LIBS)
---

After Insight was started up,I entered next GDB commands on console window.
-- GDB commands on console window log
(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
 .
Here never stops at break point(=cyg_start).
Nothing happens,although state is "Running" and mouse_cursor is sand-glass 
form.
Nothing available(even Ctr-C does not work) except stop button on 
insight-window's main head.
When clicked stop button,appered message window saying,
"No response from target.Detach from target
(and stop debugging it)?"
And clicked YES button, then appeared next line.

Error: Watchdog timeout has expired.  Target detached.

I do not know why it does not stop at break point(=cyg_start).

For reference, I set GDB stubs options like below(sorry it's from eCos ecc 
file).
---
cdl_option CYGBLD_BUILD_GDB_STUBS {
    # Flavor: bool
    # No user value, uncomment the following line to provide one.
    # user_value 0
    # value_source default
    # Default value: 0
    # Requires: CYGSEM_HAL_ROM_MONITOR
    #     CYGSEM_HAL_ROM_MONITOR == 0
    #   --> 0
    # Requires: CYGBLD_BUILD_COMMON_GDB_STUBS
    #     CYGBLD_BUILD_COMMON_GDB_STUBS == 1
    #   --> 1
    # Requires: CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
    #     CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS == 1
    #   --> 1
    # Requires: CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
    #     CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT == 1
    #   --> 1
    # Requires: CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
    #     CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT == 1
    #   --> 1
};
---

I send remote-5.log,and map file that was created by making 
nc_test_slave.elf,both in compressed form.

I'd appreciate any help.

Masahiro Ariga

[-- Attachment #2: sendfiles.tar.bz2 --]
[-- Type: application/octet-stream, Size: 44237 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-16  7:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-15  7:16 Does not stop at break point in GDB-remote ariga masahiro
2009-09-15 15:16 ` Doug Evans
2009-09-16  6:58   ` ariga masahiro
2009-09-16  7:04     ` Hui Zhu
2009-09-16  7:25     ` Jeremy Bennett
  -- strict thread matches above, loose matches on Subject: below --
2009-09-10  4:15 ariga masahiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox