print_gdb.d (ldc-1.32.1) | : | print_gdb.d (ldc-1.32.2) | ||
---|---|---|---|---|
// REQUIRES: atleast_gdb80 | // REQUIRES: atleast_gdb80 | |||
// This test fails due to newer version of GDB, see https://github.com/ldc-devel | ||||
opers/ldc/issues/4389 | ||||
// XFAIL: FreeBSD | ||||
// RUN: %ldc %_gdb_dflags -I%S -g -of=%t %s %S/inputs/import_a.d %S/inputs/impor t_b.d | // RUN: %ldc %_gdb_dflags -I%S -g -of=%t %s %S/inputs/import_a.d %S/inputs/impor t_b.d | |||
// RUN: sed -e "/^\\/\\/ GDB:/!d" -e "s,// GDB:,," %s >%t.gdb | // RUN: sed -e "/^\\/\\/ GDB:/!d" -e "s,// GDB:,," %s >%t.gdb | |||
// RUN: env LANG=C gdb %t --batch -x %t.gdb >%t.out 2>&1 | // RUN: env LANG=C gdb %t --batch -x %t.gdb >%t.out 2>&1 | |||
// RUN: FileCheck %s -check-prefix=CHECK < %t.out | // RUN: FileCheck %s -check-prefix=CHECK < %t.out | |||
module print_gdb; | module print_gdb; | |||
import inputs.import_a; | import inputs.import_a; | |||
__gshared int globVal = 987; | __gshared int globVal = 987; | |||
enum eA { ABC = 2, ZYX } | enum eA { ABC = 2, ZYX } | |||
struct sA | struct sA { | |||
{ | ||||
static int someVal = 246; | static int someVal = 246; | |||
} | } | |||
struct sB | struct sB { | |||
{ | ||||
uint k = 9; | uint k = 9; | |||
uint memberFunc(uint a) { return k*k+a; } | uint memberFunc(uint a) { return k*k+a; } | |||
static staticFunc(uint b) { return b * 2; } | static staticFunc(uint b) { return b * 2; } | |||
} | } | |||
class cC | class cC { | |||
{ | ||||
char c = '0'; | char c = '0'; | |||
char classMemberFunc(byte a) { return cast(char)(cast(byte)c+a); } | char classMemberFunc(byte a) { return cast(char)(cast(byte)c+a); } | |||
static classStaticFunc(byte b) { return cast(char)(cast(byte)'a' + b); } | static classStaticFunc(byte b) { return cast(char)(cast(byte)'a' + b); } | |||
mixin mix; | mixin mix; | |||
} | } | |||
struct templatedStruct(T) | struct templatedStruct(T) { | |||
{ | ||||
T z; | T z; | |||
T pal(T m) { return z * m; } | T pal(T m) { return z * m; } | |||
} | } | |||
mixin template mix() | mixin template mix() | |||
{ | { | |||
uint mixedVal = 5; | uint mixedVal = 5; | |||
} | } | |||
double foo(double plus) | double foo(double plus) | |||
End of changes. 5 change blocks. | ||||
8 lines changed or deleted | 9 lines changed or added |