blob: deda9d887451cf6eb094e71a4c4846d359178cd1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
id = 714
title = "Command line arguments are not passed correctly with user-space semihosting"
state = "closed"
created_at = "2021-11-10T17:03:25.288Z"
closed_at = "2022-05-25T18:15:55.187Z"
labels = ["Closed::Fixed", "linux-user", "target: arm"]
url = "https://gitlab.com/qemu-project/qemu/-/issues/714"
host-os = "Ubuntu 20.04 WSL2 on Windows 10 (also experienced on native Ubuntu 20.04 and containerised)"
host-arch = "x86_64"
qemu-version = "qemu-arm version 6.1.90 (v6.2.0-rc0-10-gb30187ef02d)"
guest-os = "n/a"
guest-arch = "n/a"
description = """The emulated process always receives a value of 1 for `argc`, with `argv[0]` returning seemingly random characters (in Ubuntu packaged qemu 5.2), but correlating with command-line input (output below from master built qemu 6.1):
```
$ qemu-arm -cpu cortex-m7 ./a.out 123 test
argc: 1
argv:
- @@@
$ qemu-arm -cpu cortex-m7 ./a.out
argc: 1
argv:
[0] @
```"""
reproduce = """1. Compile the following program with [ARM embedded toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads):
```cpp
#include <iostream>
int main(int argc, char* argv[]) {
\tstd::cout << "argc: " << argc << "\\n";
\tstd::cout << "argv: \\n";
\tfor (int i = 0; i < argc; i++)
\t\tstd::cout << " [" << i << "] " << argv[i] << "\\n";
\treturn 0;
}
```
```
$ $CXX --version
arm-none-eabi-g++ (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ $CXX main.cpp --specs=rdimon.specs -mcpu=cortex-m7
```
2. Run in user-space (semihosted):
```
$ qemu-arm -cpu cortex-m7 ./a.out
```"""
additional = "n/a"
|