Commit 6d82a21
committed
[lldb] Add support for PC-less scripted frames (llvm#170805)
Scripted frames that materialize Python functions or other non-native
code are PC-less by design, meaning they don't have valid program
counter values. Previously, these frames would display invalid addresses
(`0xffffffffffffffff`) in backtrace output.
This patch updates `FormatEntity` to detect and suppress invalid address
display for PC-less frames, adds fallback to frame methods when symbol
context is unavailable, and modifies `StackFrame::GetSymbolContext` to
skip PC-based symbol resolution for invalid addresses.
The changes enable PC-less frames to display cleanly with proper
function names, file paths, and line numbers, and allow for source
display of foreign sources (like Python). Includes comprehensive test
coverage demonstrating frames pointing to Python source files.
Signed-off-by: Med Ismail Bennani <[email protected]>
(cherry picked from commit 96c733e)1 parent 7b6a6bf commit 6d82a21
File tree
11 files changed
+553
-179
lines changed- lldb
- include/lldb/Target
- source
- Core
- Plugins/Process/scripted
- Target
- test/API/functionalities
- scripted_frame_provider
- scripted_process
11 files changed
+553
-179
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1692 | 1692 | | |
1693 | 1693 | | |
1694 | 1694 | | |
1695 | | - | |
| 1695 | + | |
1696 | 1696 | | |
1697 | 1697 | | |
1698 | | - | |
1699 | 1698 | | |
1700 | 1699 | | |
1701 | 1700 | | |
| |||
1816 | 1815 | | |
1817 | 1816 | | |
1818 | 1817 | | |
1819 | | - | |
1820 | | - | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
1821 | 1822 | | |
1822 | | - | |
1823 | | - | |
1824 | | - | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
1825 | 1827 | | |
1826 | | - | |
1827 | | - | |
1828 | | - | |
1829 | | - | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
1830 | 1831 | | |
1831 | | - | |
1832 | | - | |
1833 | | - | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
1834 | 1836 | | |
1835 | | - | |
1836 | | - | |
1837 | | - | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
1838 | 1844 | | |
1839 | 1845 | | |
1840 | | - | |
1841 | | - | |
1842 | | - | |
1843 | | - | |
1844 | | - | |
1845 | | - | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
1849 | 1858 | | |
1850 | 1859 | | |
1851 | 1860 | | |
1852 | | - | |
1853 | | - | |
1854 | | - | |
1855 | | - | |
1856 | | - | |
1857 | | - | |
1858 | | - | |
1859 | | - | |
1860 | | - | |
1861 | | - | |
1862 | | - | |
1863 | | - | |
1864 | | - | |
1865 | | - | |
1866 | | - | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
1867 | 1879 | | |
1868 | | - | |
1869 | | - | |
1870 | | - | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
1871 | 1889 | | |
1872 | 1890 | | |
1873 | | - | |
1874 | | - | |
1875 | | - | |
1876 | | - | |
1877 | | - | |
1878 | | - | |
1879 | | - | |
1880 | | - | |
1881 | | - | |
1882 | | - | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
1883 | 1903 | | |
1884 | 1904 | | |
1885 | 1905 | | |
| |||
1906 | 1926 | | |
1907 | 1927 | | |
1908 | 1928 | | |
1909 | | - | |
1910 | | - | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
1911 | 1932 | | |
1912 | | - | |
1913 | | - | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
1914 | 1936 | | |
1915 | | - | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
1916 | 1949 | | |
1917 | 1950 | | |
1918 | 1951 | | |
| |||
1954 | 1987 | | |
1955 | 1988 | | |
1956 | 1989 | | |
1957 | | - | |
| 1990 | + | |
1958 | 1991 | | |
1959 | 1992 | | |
1960 | 1993 | | |
1961 | 1994 | | |
1962 | | - | |
1963 | 1995 | | |
1964 | 1996 | | |
1965 | 1997 | | |
| |||
1983 | 2015 | | |
1984 | 2016 | | |
1985 | 2017 | | |
1986 | | - | |
1987 | | - | |
1988 | | - | |
1989 | | - | |
1990 | | - | |
| 2018 | + | |
| 2019 | + | |
1991 | 2020 | | |
1992 | 2021 | | |
1993 | 2022 | | |
| |||
0 commit comments