Comment #0 by lucien.perregaux — 2020-08-13T15:29:29Z
program:
---
module bar;
void main()
{
foo(2, "hi");
}
void foo(int i, string s)
{
}
---
DMD:
---
(gdb) b _Dmain
Breakpoint 1 at 0x3f6a4: file src/main.d, line 5.
(gdb) r
Starting program: main
Breakpoint 1, D main () at src/main.d:5
5 foo(2, "hi");
(gdb) s
bar.foo(int, immutable(char)[]) (s=..., i=2) at src/main.d:11
11 }
---
LDC:
---
(gdb) b _Dmain
Breakpoint 1 at 0x744: file main.d, line 5.
(gdb) r
Starting program: main
Breakpoint 1, D main () at main.d:5
5 foo(2, "hi");
(gdb) s
bar.foo(int, immutable(char)[]) (i=0, s=...) at main.d:8
8 void foo(int i, string s)
(gdb)
---
DMD says "(s=..., i=2)" instead of "(i=2, s=...)".
Comment #1 by dlang-bot — 2020-08-26T16:06:53Z
@Luhrel created dlang/dmd pull request #11630 "Fix Issue 21158 - DWARF: function arguments are represented in reverse order" mentioning this issue:
- Issue 21158 - DWARF: function arguments are represented in reverse order
https://github.com/dlang/dmd/pull/11630
Comment #2 by robert.schadek — 2024-12-13T19:11:03Z