Sorry for the wrong email. I am learning how to debug from Keqin.

      Jian LIU
----
email to: gjk.liu@...9...


2013/4/19 Jian Liu <gjk.liu@...9...>
可钦:

除了Gnode在物理机上的调试外,花时间把下面的事情也调研、试一试。

* Fiasco.OC在物理机上的调试。

      Jian LIU
----
email to: gjk.liu@...9...


2013/4/19 Keqin Sun <keqin@...189...>
Hi,
    I want to debug nic_drv on a real machine using gdb_monitor. But gdb showed this:

(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...

and my run srcript is:
#
# Build
#

build { core init drivers/timer
        drivers/pci
        app/gdb_monitor
        drivers/uart
        drivers/nic }

create_boot_directory

#
# Generate config
#

install_config {
<config verbose="yes">
        <parent-provides>
                <service name="ROM"/>
                <service name="RAM"/>
                <service name="IRQ"/>
                <service name="IO_MEM"/>
                <service name="IO_PORT"/>
                <service name="CAP"/>
                <service name="PD"/>
                <service name="RM"/>
                <service name="CPU"/>
                <service name="LOG"/>
                <service name="SIGNAL"/>
        </parent-provides>
        <default-route>
                <any-service> <parent/> <any-child/> </any-service>
        </default-route>
        <start name="timer">
                <resource name="RAM" quantum="1M"/>
                <provides> <service name="Timer"/> </provides>
        </start>
        <start name="uart_drv">
                <resource name="RAM" quantum="2M"/>
                <provides> <service name="Terminal"/> </provides>
#is that service name "Terminal" should be "/dev/ttyS0" ?
                <config>
                        <policy label="gdb_monitor" uart="1"/>
                </config>
        </start>
        <start name="pci_drv">
                <resource name="RAM" quantum="2M"/>
                <provides><service name="PCI"/></provides>
        </start>
        <start name="gdb_monitor">
                <resource name="RAM" quantum="5M"/>
                <provides><service name="Nic" /></provides>
                <config>
                        <target name="nic_drv"/>
                        <preserve name="RAM" quantum="2M"/>
                </config>
        </start>
</config>}

#
# Boot image
#

build_boot_image { core init timer
        ld.lib.so libc.lib.so libc_log.lib.so libc_lock_pipe.lib.so libc_terminal.lib.so
        uart_drv pci_drv
        gdb_monitor nic_drv }

set local_port 5555

#append qemu_args " -nographic "
append qemu_args " -m 128 -nographic "

# connect comport 0 to stdio
append qemu_args " -net nic,model=e1000 -net user "
append qemu_args " -serial mon:stdio "

# connect comport 1 with TCP port $local_port
append qemu_args " -serial chardev:uart "
append qemu_args " -chardev
socket,id=uart,port=$local_port,host=localhost,server,nowait "

#run_genode_until forever
run_genode_until {.*Remote debugging using /dev/ttyS0.*} 30
#run_genode_until {.*Remote debugging using /dev/terminal.*} 30

#exec [terminal] -e "[gdb] bin/nic_drv -ex \"target remote localhost:$local_port\" " &
#exec [terminal] -e "[gdb] bin/nic_drv -ex \"target remote localhost:$local_port\" " &
interact


Is that correct?

Maybe the serial was occupied by the system output?


keqin



------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Genode-main mailing list
Genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main