Repository navigation
Commit bbfceba
kdb: Get rid of confusing diag msg from "rd" if current task has no regs
If you switch to a sleeping task with the "pid" command and then type
"rd", kdb tells you this:
No current kdb registers. You may need to select another task
diag: -17: Invalid register name
The first message makes sense, but not the second. Fix it by just
returning 0 after commands accessing the current registers finish if
we've already printed the "No current kdb registers" error.
While fixing kdb_rd(), change the function to use "if" rather than
"ifdef". It cleans the function up a bit and any modern compiler will
have no trouble handling still producing good code.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20191109111624.5.I121f4c6f0c19266200bf6ef003de78841e5bfc3d@changeid
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>1 parent 9441d5f commit bbfceba
1 file changed
Lines changed: 13 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
547 | | - | |
548 | | - | |
| 546 | + | |
| 547 | + | |
549 | 548 | | |
550 | 549 | | |
551 | 550 | | |
| |||
1836 | 1835 | | |
1837 | 1836 | | |
1838 | 1837 | | |
1839 | | - | |
1840 | | - | |
| 1838 | + | |
1841 | 1839 | | |
1842 | 1840 | | |
1843 | 1841 | | |
| |||
1846 | 1844 | | |
1847 | 1845 | | |
1848 | 1846 | | |
1849 | | - | |
1850 | | - | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
1851 | 1855 | | |
1852 | 1856 | | |
1853 | 1857 | | |
| |||
1889 | 1893 | | |
1890 | 1894 | | |
1891 | 1895 | | |
1892 | | - | |
1893 | | - | |
1894 | | - | |
1895 | 1896 | | |
1896 | | - | |
1897 | | - | |
1898 | 1897 | | |
1899 | 1898 | | |
1900 | 1899 | | |
| |||
1928 | 1927 | | |
1929 | 1928 | | |
1930 | 1929 | | |
1931 | | - | |
1932 | | - | |
1933 | | - | |
| 1930 | + | |
| 1931 | + | |
1934 | 1932 | | |
1935 | 1933 | | |
1936 | 1934 | | |
| |||
0 commit comments