qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] functional ARM semihosting under GDB


From: Liviu Ionescu
Subject: Re: [Qemu-devel] [PATCH] functional ARM semihosting under GDB
Date: Fri, 14 Nov 2014 02:25:01 +0200

to test the patch, you can download an unit test application from:

        https://dl.dropboxusercontent.com/u/78151643/gcm.elf


there are two use cases:

1) standalone (usually unit tests integrated in a continuous integration system)

$ ./qemu-system-arm -machine lm3s6965evb -image gcm.elf -semihosting 
-semihosting-cmdline "gcm --gtest_output=xml:gcm.xml"

(notice the gcm.xml file created in the current folder)


2) via GDB

$ ./qemu-system-arm -machine lm3s6965evb -semihosting-target native 
-semihosting-cmdline "gcm --gtest_output=xml:gcm.xml" -gdb tcp::1234 -S

(notice the image is no longer passed here)

and from another terminal

$ arm-none-eabi-gdb gcm.elf
(gdb) target remote localhost:1234
(gdb) load
(gdb) system_reset
(gdb) break main
(gdb) continue
Breakpoint 1, main (argc=2, argv=0x200001b0 <argv_buf.5809>) at 
../gmock/src/gmock_main.cc:49
49      {
(gdb) continue
Continuing.
[Inferior 1 (Remote target) exited normally]

(notice the system_reset required after loading the image to initialise the PC 
& SP)


regards,

Liviu





reply via email to

[Prev in Thread] Current Thread [Next in Thread]