Commit aadb44e
authored
python-gdb.py now handles errors on computing the line number
of a Python frame.
Changes:
* PyFrameObjectPtr.current_line_num() now catchs any Exception on
calling addr2line(), instead of failing with a surprising "<class
'TypeError'> 'FakeRepr' object is not subscriptable" error.
* All callers of current_line_num() now handle current_line_num()
returning None.
* PyFrameObjectPtr.current_line() now also catchs IndexError on
getting a line from the Python source file.
(cherry picked from commit 2e438cc)
1 parent 43308df commit aadb44e
File tree
2 files changed
+35
-13
lines changed- Misc/NEWS.d/next/Tools-Demos
- Tools/gdb
2 files changed
+35
-13
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
925 | | - | |
926 | | - | |
| 925 | + | |
| 926 | + | |
927 | 927 | | |
928 | | - | |
929 | | - | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
930 | 935 | | |
931 | 936 | | |
932 | 937 | | |
933 | 938 | | |
934 | 939 | | |
935 | 940 | | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
936 | 946 | | |
937 | 947 | | |
938 | | - | |
| 948 | + | |
| 949 | + | |
939 | 950 | | |
940 | 951 | | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
945 | 958 | | |
946 | 959 | | |
947 | 960 | | |
948 | 961 | | |
949 | 962 | | |
950 | | - | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
951 | 966 | | |
952 | 967 | | |
953 | | - | |
| 968 | + | |
954 | 969 | | |
955 | 970 | | |
956 | 971 | | |
| |||
969 | 984 | | |
970 | 985 | | |
971 | 986 | | |
972 | | - | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
973 | 990 | | |
974 | | - | |
| 991 | + | |
975 | 992 | | |
976 | 993 | | |
977 | 994 | | |
| |||
1546 | 1563 | | |
1547 | 1564 | | |
1548 | 1565 | | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
1549 | 1569 | | |
1550 | 1570 | | |
1551 | 1571 | | |
| |||
0 commit comments