Skip to content

Commit 5c74801

Browse files
committed
[GR-40956] PyCharm debugging improvements
PullRequest: graalpython/2435
2 parents cb0f159 + fcb916d commit 5c74801

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PosixConstants.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -125,6 +125,7 @@ public final class PosixConstants {
125125
public static final MandatoryIntConstant W_OK;
126126
public static final MandatoryIntConstant X_OK;
127127
public static final MandatoryIntConstant F_OK;
128+
public static final MandatoryIntConstant EX_OK;
128129
public static final MandatoryIntConstant RTLD_LAZY;
129130
public static final MandatoryIntConstant RTLD_NOW;
130131
public static final MandatoryIntConstant RTLD_GLOBAL;
@@ -349,6 +350,7 @@ public final class PosixConstants {
349350
W_OK = reg.createMandatoryInt("W_OK");
350351
X_OK = reg.createMandatoryInt("X_OK");
351352
F_OK = reg.createMandatoryInt("F_OK");
353+
EX_OK = reg.createMandatoryInt("EX_OK");
352354
RTLD_LAZY = reg.createMandatoryInt("RTLD_LAZY");
353355
RTLD_NOW = reg.createMandatoryInt("RTLD_NOW");
354356
RTLD_GLOBAL = reg.createMandatoryInt("RTLD_GLOBAL");
@@ -486,7 +488,7 @@ public final class PosixConstants {
486488
flockType = new IntConstant[]{F_RDLCK, F_WRLCK, F_UNLCK};
487489
direntType = new IntConstant[]{DT_UNKNOWN, DT_FIFO, DT_CHR, DT_DIR, DT_BLK, DT_REG, DT_LNK, DT_SOCK, DT_WHT};
488490
waitOptions = new IntConstant[]{WNOHANG, WUNTRACED};
489-
accessMode = new IntConstant[]{R_OK, W_OK, X_OK, F_OK};
491+
accessMode = new IntConstant[]{R_OK, W_OK, X_OK, F_OK, EX_OK};
490492
rtld = new IntConstant[]{RTLD_LAZY, RTLD_NOW, RTLD_GLOBAL, RTLD_LOCAL};
491493
socketFamily = new IntConstant[]{AF_UNSPEC, AF_INET, AF_INET6, AF_PACKET, AF_UNIX};
492494
socketType = new IntConstant[]{SOCK_DGRAM, SOCK_STREAM};

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PosixConstantsDarwin.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -115,6 +115,7 @@ static void getConstants(PosixConstants.Registry constants) {
115115
constants.put("W_OK", 0x00000002);
116116
constants.put("X_OK", 0x00000001);
117117
constants.put("F_OK", 0x00000000);
118+
constants.put("EX_OK", 0x00000000);
118119
constants.put("RTLD_LAZY", 0x00000001);
119120
constants.put("RTLD_NOW", 0x00000002);
120121
constants.put("RTLD_GLOBAL", 0x00000008);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PosixConstantsLinux.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -118,6 +118,7 @@ static void getConstants(PosixConstants.Registry constants) {
118118
constants.put("W_OK", 0x00000002);
119119
constants.put("X_OK", 0x00000001);
120120
constants.put("F_OK", 0x00000000);
121+
constants.put("EX_OK", 0x00000000);
121122
constants.put("RTLD_LAZY", 0x00000001);
122123
constants.put("RTLD_NOW", 0x00000002);
123124
constants.put("RTLD_GLOBAL", 0x00000100);

graalpython/lib-python/3/dis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ def _get_instructions_bytes(code, varnames=None, names=None, constants=None,
318318
arguments.
319319
320320
"""
321+
return # Truffle change: GR-40956
321322
labels = findlabels(code)
322323
starts_line = None
323324
for offset, op, arg in _unpack_opargs(code):

graalpython/lib-python/3/os.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,3 +1112,6 @@ def add_dll_directory(path):
11121112
cookie,
11131113
nt._remove_dll_directory
11141114
)
1115+
1116+
1117+
__file__ = f"{__graalpython__.stdlib_home}/os.py"

scripts/gen_native_cfg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2021, 2021, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -183,6 +183,7 @@
183183
x W_OK
184184
x X_OK
185185
x F_OK
186+
x EX_OK
186187
187188
[rtld]
188189
x RTLD_LAZY

0 commit comments

Comments
 (0)