Commit 71e601e
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)
Co-authored-by: Victor Stinner <[email protected]>
1 parent 407f3dd commit 71e601e
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 | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
937 | | - | |
938 | | - | |
| 937 | + | |
| 938 | + | |
939 | 939 | | |
940 | | - | |
941 | | - | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
942 | 947 | | |
943 | 948 | | |
944 | 949 | | |
945 | 950 | | |
946 | 951 | | |
947 | 952 | | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
948 | 958 | | |
949 | 959 | | |
950 | | - | |
| 960 | + | |
| 961 | + | |
951 | 962 | | |
952 | 963 | | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
957 | 970 | | |
958 | 971 | | |
959 | 972 | | |
960 | 973 | | |
961 | 974 | | |
962 | | - | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
963 | 978 | | |
964 | 979 | | |
965 | | - | |
| 980 | + | |
966 | 981 | | |
967 | 982 | | |
968 | 983 | | |
| |||
981 | 996 | | |
982 | 997 | | |
983 | 998 | | |
984 | | - | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
985 | 1002 | | |
986 | | - | |
| 1003 | + | |
987 | 1004 | | |
988 | 1005 | | |
989 | 1006 | | |
| |||
1742 | 1759 | | |
1743 | 1760 | | |
1744 | 1761 | | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
1745 | 1765 | | |
1746 | 1766 | | |
1747 | 1767 | | |
| |||
0 commit comments