qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] Debugging QEMU NIOS2


From: Thomas Huth
Subject: Re: [Qemu-discuss] Debugging QEMU NIOS2
Date: Wed, 21 Nov 2018 12:31:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2018-11-21 11:24, Zeeshan Hayat wrote:
> Hi,
> 
> 
> I am trying to debug simple program (hello_world). I run the QEMU as,
> 
> 
>>  qemu-system-nios2 -s
> 
> 
> and run the nios aware gdb as,
> 
> 
>> nios2-elf-gdb hello
> 
> 
> and than in gdb I attach it to QEMU by,
> 
> 
>> target remote localhost:1234
> 
> 
> but when I type "continue" in gdb window, it just hangs and prints nothing. I 
>  tried to set breakpoint but still the same issue
> 
> 
> hello executable is generated as,
> 
> 
>> nios2-elf-gcc -g -o hello hello.c
> 
> 
> Where hello.c is a simple program which prints "hello world"
> 
> 
> I am not sure if I am doing something wrong here...

As Peter already mentioned in his mail yesterday, you're using the wrong
QEMU binary: qemu-system-nios2 emulates a full system, so this is e.g.
for running a Linux kernel. You're apparently trying to run a normal
user-space program, so you have to use "qemu-nios2" instead.

 HTH,
  Thomas



reply via email to

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