masayuki2009 commented on PR #11848:
URL: https://github.com/apache/nuttx/pull/11848#issuecomment-1982519892
@anchao
If I revert the second commit, it works.
```
/home/ishikawa/opensource/QEMU/qemu-8.2.0/build/qemu-system-arm -semihosting
-M sabrelite -m 1024 -smp 4 -kernel nuttx -nographic
Initial memory usage: 6252
Registering romdisk at /dev/ram0
Memory Usage after romdisk_register:
Before: 6252 After: 6308 Change: 56
Mounting ROMFS filesystem at target=/mnt/romfs with source=/dev/ram0
Memory Usage after mount:
Before: 6308 After: 6868 Change: 560
****************************************************************************
* Executing errno
****************************************************************************
Memory Usage after exec:
Before: 6868 After: 10268 Change: 3400
Wait a bit for test completion
Hello, World on stdout
Hello, World on stderr
We failed to open "aflav-sautga-ay!" errno is 2
Memory Usage after program execution:
Before: 10268 After: 9100 Change: -1168
****************************************************************************
* Executing hello
****************************************************************************
Memory Usage after exec:
Before: 9100 After: 10284 Change: 1184
Wait a bit for test completion
Getting ready to say "Hello, world"
Hello, world!
It has been said.
argc = 1
argv = 0x1082a838
argv[0] = (0x1082a840) "hello"
argv[1] = 0
Goodbye, world!
Memory Usage after program execution:
Before: 10284 After: 9100 Change: -1184
****************************************************************************
* Executing hello++1
****************************************************************************
Memory Usage after exec:
Before: 9100 After: 10028 Change: 928
Wait a bit for test completion
Hello, World!
Memory Usage after program execution:
Before: 10028 After: 9100 Change: -928
****************************************************************************
* Executing hello++2
****************************************************************************
Memory Usage after exec:
Before: 9100 After: 10596 Change: 1496
Wait a bit for test completion
main: Started. Creating MyThingSayer
CThingSayer::CThingSayer: I am!
main: Created MyThingSayer=0x1082a4c0
main: Calling MyThingSayer->Initialize
CThingSayer::Initialize: When told, I will say 'Hello, World!'
main: Calling MyThingSayer->SayThing
CThingSayer::SayThing: I am now saying 'Hello, World!'
main: Destroying MyThingSayer
CThingSayer::~CThingSayer: I cease to be
CThingSayer::~CThingSayer: I will never say 'Hello, World!' again
main: Returning
Memory Usage after program execution:
Before: 10596 After: 9100 Change: -1496
****************************************************************************
* Executing hello++3
****************************************************************************
Memory Usage after exec:
Before: 9100 After: 10708 Change: 1608
Wait a bit for test completion
CThingSayer::CThingSayer: I am!
main: Started. MyThingSayer should already exist
main: Calling MyThingSayer.Initialize
CThingSayer::Initialize: When told, I will say 'Hello, World!'
main: Calling MyThingSayer.SayThing
CThingSayer::SayThing: I am now saying 'Hello, World!'
main: Returning. MyThingSayer should be destroyed
Memory Usage after program execution:
Before: 10708 After: 9100 Change: -1608
****************************************************************************
* Executing mutex
****************************************************************************
Memory Usage after exec:
Before: 9100 After: 10740 Change: 1640
Wait a bit for test completion
Starting thread 1
Starting thread 2
Stopping threads
Thread1 Thread2
Loops 10 10
Errors 0 0
Memory Usage after program execution:
Before: 10740 After: 11356 Change: 616
****************************************************************************
* Executing pthread
****************************************************************************
Memory Usage after exec:
Before: 11356 After: 10628 Change: -728
Wait a bit for test completion
PARENT: started
PARENT: calling pthread_start with arg=305419896
CHILD: started with arg=305419896
CHILD: returning -2023406815
PARENT child exitted with -2023406815
PARENT returning success
Memory Usage after program execution:
Before: 10628 After: 11356 Change: 728
****************************************************************************
* Executing signal
****************************************************************************
Memory Usage after exec:
Before: 11356 After: 11732 Change: 376
Wait a bit for test completion
Setting up signal handlers from pid=12
Old SIGUSR1 sighandler at 0
New SIGUSR1 sighandler at 0x1082a921
Old SIGUSR2 sighandler at 0
New SIGUSR2 sighandler at 0x1082a921
Raising SIGUSR1 from pid=12
Kill-ing SIGUSR1 from pid=12
siguser_action: Received signo=10 siginfo=0x10828b28 arg=0
SIGUSR1 received
siginfo:
si_signo = 10
si_code = 0
si_errno = 4
si_value = 0
SIGUSR1 raised from pid=12
SIGUSR1 not received
Memory Usage after program execution:
Before: 11732 After: 9236 Change: -2496
****************************************************************************
* Executing struct
****************************************************************************
Memory Usage after exec:
Before: 9236 After: 10668 Change: 1432
Wait a bit for test completion
Calling getstruct()
getstruct returned 0x1082a74c
n = 42 (vs 42) PASS
pn = 0x10829fb8 (vs 0x10829fb8) PASS
*pn = 87 (vs 87) PASS
ps = 0x1082a748 (vs 0x1082a748) PASS
ps->n = 117 (vs 117) PASS
pf = 0x1082a549 (vs 0x1082a549) PASS
Calling mystruct->pf()
In dummyfunc() -- PASS
Exit-ing
Memory Usage after program execution:
Before: 10668 After: 9236 Change: -1432
****************************************************************************
* Executing task
****************************************************************************
Memory Usage after exec:
Before: 9236 After: 10980 Change: 1744
Wait a bit for test completion
Parent: Started, pid=15
Parent: Calling task_create()
Parent: Waiting for child (pid=18)
Child: execv was successful!
Child: argc=2
Child: argv[0]="child"
Child: argv[1]="Hello from your parent!"
Child: Exit-ting with status=0
Parent: Exit-ing
Memory Usage after program execution:
Before: 10980 After: 11468 Change: 488
Memory Usage End-of-Test:
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]