# 概述

Source: [https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html](https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html)

子系统是指在 Qualcomm^®^ SoC 上具有自己的独立执行环境的处理器。本指南介绍了受影响子系统的工具、示例日志和故障排除方法。在诊断和排除此类异常时，了解子系统中出现的差异以及检查错误的方法是非常有用的。

以下是 SoC 上的重要子系统： 

Table : SoC 上的子系统

| 子系统 (Subsystem) | 说明 |
| --- | --- |
| 应用处理器子系统 (APSS) | 这是主子系统。它将 Linux 内核作为 high-level OS (HLOS) 来运行。 |
| 应用数字信号处理器 (aDSP) | 此子系统也称为低功耗音频子系统 (LPASS)。 |
| 计算数字信号处理器 (cDSP) | 此子系统也称为 Compute DSP。 |
| Qualcomm^®^ 受信任执行环境 (TEE)/TrustZone (TZ) | 有关此子系统的更多信息，参见 [Qualcomm Linux 安全指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-11)。 |
| 无线局域网处理器子系统 (WPSS) | 有关此子系统的更多信息，参见 [Qualcomm Linux Wi-Fi 指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-14/introduction.html)。 |
| Always On 处理器 (AOP) | 该子系统可以调节设备的电源。 |

除了应用处理器，与所有其他子系统相关的软件也称为 non-HLOS。

要了解子系统的启动流程，参见 [Qualcomm Linux 启动指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-4)。

Note: 
                
参见 Qualcomm^®^ Linux^®^支持的[硬件 SoC](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-115/soc.html)。

## 调试工作流

Source: [https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html](https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html)

由于 Qualcomm SoC 中有多个子系统，因此首先需要确定发生问题的子系统，以便对相关的子系统进行调试。

应用处理器为主子系统，可以检测其他子系统何时发生崩溃。例如，如果 aDSP 处理器子系统崩溃，则内核日志会捕获子系统重启 (SSR) 崩溃错误日志。因此，要确定必须调试的子系统，必须先验证内核调试消息。

下图显示了识别错误和要调试的组件的工作流程。
Figure : 识别受影响子系统的工作流程
        <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- 由 Microsoft Visio, SVG Export 生成 Debug-workflow.svg Page-1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="12.0417in" height="6.98958in" viewbox="0 0 867.002 503.25" xml:space="preserve" color-interpolation-filters="sRGB" class="st16"><v:documentproperties v:langid="2052">	<v:userdefs>		<v:ud v:nameu="msvNoAutoConnect" v:val="VT0(0):26"></v:ud>	</v:userdefs></v:documentproperties>
<style>.svg-1 .st1 { marker-end: url("#mrkr5-5"); stroke: none; stroke-width: 1.5 }
.svg-1 .st2 { fill: #ffffff; fill-opacity: 1; stroke: #ffffff; stroke-opacity: 1; stroke-width: 0.37313421680881 }
.svg-1 .st3 { fill: none; stroke: #3253dc; stroke-width: 2.5 }
.svg-1 .st4 { fill: #000000; font-family: 黑体; font-size: 1.00001em }
.svg-1 .st5 { fill: #000000; font-family: Arial; font-size: 1.00001em }
.svg-1 .st6 { font-family: 黑体; font-size: 1em }
.svg-1 .st7 { marker-end: url("#mrkr5-20"); stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.25 }
.svg-1 .st8 { fill: #000000; fill-opacity: 1; stroke: #000000; stroke-opacity: 1; stroke-width: 0.47169799436448 }
.svg-1 .st9 { font-family: Arial; font-size: 1em }
.svg-1 .st10 { font-size: 1em }
.svg-1 .st11 { fill: #ffffff; stroke: none; stroke-linecap: butt; stroke-width: 7.2 }
.svg-1 .st12 { fill: none; stroke: none; stroke-width: 1 }
.svg-1 .st13 { fill: none }
.svg-1 .st14 { stroke: #3253dc; stroke-width: 2.5 }
.svg-1 .st15 { fill: #000000; font-family: 黑体; font-size: 0.75em }
.svg-1 .st16 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<defs id="Markers">	<g id="lend5">		<path d="M 2 1 L 0 0 L 1.98117 -0.993387 C 1.67173 -0.364515 1.67301 0.372641 1.98465 1.00043 " style="stroke:none"></path>	</g>	<marker id="mrkr5-5" class="st2" v:arrowtype="5" v:arrowsize="2" v:setback="4.69" refx="-4.6900014020871" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend5" transform="scale(-2.6800008011926,-2.6800008011926) "></use>	</marker>	<marker id="mrkr5-20" class="st8" v:arrowtype="5" v:arrowsize="2" v:setback="0" refx="-0" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend5" transform="scale(-2.1200005341284,-2.1200005341284) "></use>	</marker></defs><g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<v:userdefs>		<v:ud v:nameu="msvThemeOrder" v:val="VT0(0):26"></v:ud>	</v:userdefs>	<title>Page-1</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="0" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<v:layer v:name="Flowchart" v:index="0"></v:layer>	<v:layer v:name="Connector" v:index="1"></v:layer>	<g id="shape1-1" v:mid="1" v:groupcontext="shape" transform="translate(19.5014,-19.5)">		<title>shape26-1</title>		<path d="M0 503.25 L828 503.25 L828 39 L0 39 L0 503.25" class="st1"></path>	</g>	<g id="shape2-6" v:mid="2" v:groupcontext="shape" v:layermember="0" transform="translate(397.005,-437.25)">		<title>shape1-5</title>		<desc>Start</desc>		<v:custprops>			<v:cp v:nameu="Cost" v:lbl="Cost" v:prompt="" v:type="7" v:format="@" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="ProcessNumber" v:lbl="Process Number" v:prompt="" v:type="2" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Owner" v:lbl="Owner" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Function" v:lbl="Function" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>			<v:cp v:nameu="StartDate" v:lbl="Start Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="EndDate" v:lbl="End Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Status" v:lbl="Status" v:prompt="" v:type="4" v:format=";Not Started;In Progress;Completed;Deferred;Waiting on Input" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>		</v:custprops>		<v:userdefs>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="DefaultWidth" v:prompt="" v:val="VT0(1):0"></v:ud>			<v:ud v:nameu="DefaultHeight" v:prompt="" v:val="VT0(0.375):0"></v:ud>			<v:ud v:nameu="ResizeTxtHeight" v:prompt="" v:val="VT0(0.375):0"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="39.5667" cy="488.464" width="78.86" height="29.5714"></v:textrect>		<path d="M14.93 503.25 L64.21 503.25 A14.7857 14.7857 -180 0 0 64.21 473.68 L14.93 473.68 A14.7857 14.7857 -180 1 0 14.93					 503.25 Z" class="st3"></path>		<text x="27.57" y="492.36" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>起始</text>		</g>	<g id="shape3-9" v:mid="3" v:groupcontext="shape" v:layermember="0" transform="translate(369.819,-303.021)">		<title>shape2-8</title>		<desc>Panic or Bug in dmesg?</desc>		<v:custprops>			<v:cp v:nameu="Cost" v:lbl="Cost" v:prompt="" v:type="7" v:format="@" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="ProcessNumber" v:lbl="Process Number" v:prompt="" v:type="2" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Owner" v:lbl="Owner" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Function" v:lbl="Function" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>			<v:cp v:nameu="StartDate" v:lbl="Start Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="EndDate" v:lbl="End Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Status" v:lbl="Status" v:prompt="" v:type="4" v:format=";Not Started;In Progress;Completed;Deferred;Waiting on Input" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>		</v:custprops>		<v:userdefs>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="DefaultWidth" v:prompt="" v:val="VT0(1):0"></v:ud>			<v:ud v:nameu="DefaultHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>			<v:ud v:nameu="ResizeTxtHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="66.6849" cy="461.238" width="111.15" height="63.0186"></v:textrect>		<path d="M0 461.24 L66.69 419.23 L133.37 461.24 L66.69 503.25 L0 461.24 Z" class="st3"></path>		<text x="18.33" y="464.54" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist><v:lf></v:lf>dmesg <tspan class="st6">中有</tspan> Panic <tspan x="42.34" dy="1.3em" class="st6">或</tspan> Bug<tspan class="st6">？</tspan></text>		</g>	<g id="shape4-15" v:mid="4" v:groupcontext="shape" v:layermember="1" transform="translate(436.509,-387.042)">		<title>shape3-12</title>		<path d="M0.06 453.04 L0.06 471.04 L0 471.04 L0 494.9 L0 503.25" class="st7"></path>	</g>	<g id="shape5-21" v:mid="5" v:groupcontext="shape" v:layermember="0" transform="translate(177.763,-166.98)">		<title>shape4-18</title>		<desc>Subsystem restart log in dmesg?</desc>		<v:custprops>			<v:cp v:nameu="Cost" v:lbl="Cost" v:prompt="" v:type="7" v:format="@" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="ProcessNumber" v:lbl="Process Number" v:prompt="" v:type="2" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Owner" v:lbl="Owner" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Function" v:lbl="Function" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>			<v:cp v:nameu="StartDate" v:lbl="Start Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="EndDate" v:lbl="End Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Status" v:lbl="Status" v:prompt="" v:type="4" v:format=";Not Started;In Progress;Completed;Deferred;Waiting on Input" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>		</v:custprops>		<v:userdefs>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="DefaultWidth" v:prompt="" v:val="VT0(1):0"></v:ud>			<v:ud v:nameu="DefaultHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>			<v:ud v:nameu="ResizeTxtHeight" v:prompt="" v:val="VT0(0):26"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="66.6849" cy="457.236" width="111.15" height="69.021"></v:textrect>		<path d="M0 457.24 L66.69 411.22 L133.37 457.24 L66.69 503.25 L0 457.24 Z" class="st3"></path>		<text x="41.01" y="445.53" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>在<tspan class="st9"> </tspan><tspan class="st9">dmesg </tspan><tspan x="30.68" dy="1.3em" class="st10">中查看子系统<v:lf></v:lf></tspan><tspan x="36.68" dy="1.3em" class="st10">重启日志</tspan>？</text>		</g>	<g id="shape6-28" v:mid="6" v:groupcontext="shape" v:layermember="0" transform="translate(569.878,-166.25)">		<title>shape5-23</title>		<desc>Error in TrustZone?</desc>		<v:custprops>			<v:cp v:nameu="Cost" v:lbl="Cost" v:prompt="" v:type="7" v:format="@" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="ProcessNumber" v:lbl="Process Number" v:prompt="" v:type="2" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Owner" v:lbl="Owner" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Function" v:lbl="Function" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>			<v:cp v:nameu="StartDate" v:lbl="Start Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="EndDate" v:lbl="End Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Status" v:lbl="Status" v:prompt="" v:type="4" v:format=";Not Started;In Progress;Completed;Deferred;Waiting on Input" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>		</v:custprops>		<v:userdefs>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="DefaultWidth" v:prompt="" v:val="VT0(1):0"></v:ud>			<v:ud v:nameu="DefaultHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>			<v:ud v:nameu="ResizeTxtHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="66.6849" cy="457.236" width="111.15" height="69.021"></v:textrect>		<path d="M0 457.24 L66.69 411.22 L133.37 457.24 L66.69 503.25 L0 457.24 Z" class="st3"></path>		<text x="39.34" y="453.03" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>TrustZone <tspan x="18.68" dy="1.275em" class="st6">中是否存在错误</tspan><tspan class="st6">？</tspan></text>		</g>	<g id="shape7-33" v:mid="7" v:groupcontext="shape" v:layermember="1" transform="translate(244.449,-259.006)">		<title>shape6-26</title>		<desc>Yes</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="19.6706" cy="417.222" width="60.01" height="22.4037"></v:textrect>		<path d="M125.37 417.22 L0 417.22 L0 494.9 L0 503.25" class="st7"></path>		<rect v:rectcontext="textBkgnd" x="13.6707" y="409.42" width="12.0001" height="15.6047" class="st11"></rect>		<text x="13.67" y="421.12" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>是</text>		</g>	<g id="shape8-40" v:mid="8" v:groupcontext="shape" v:layermember="1" transform="translate(503.192,-258.276)">		<title>shape7-33</title>		<desc>No</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="110.063" cy="416.492" width="60.01" height="22.4037"></v:textrect>		<path d="M0 416.49 L133.37 416.49 L133.37 494.9 L133.37 503.25" class="st7"></path>		<rect v:rectcontext="textBkgnd" x="104.063" y="408.69" width="12.0001" height="15.6047" class="st11"></rect>		<text x="104.06" y="420.39" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>否</text>		</g>	<g id="group9-47" transform="translate(71.799,-35.7024)" v:mid="9" v:groupcontext="group">		<v:custprops>			<v:cp v:nameu="Cost" v:lbl="Cost" v:prompt="" v:type="7" v:format="@" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="ProcessNumber" v:lbl="Process Number" v:prompt="" v:type="2" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Owner" v:lbl="Owner" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Function" v:lbl="Function" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>			<v:cp v:nameu="StartDate" v:lbl="Start Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="EndDate" v:lbl="End Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Status" v:lbl="Status" v:prompt="" v:type="4" v:format=";Not Started;In Progress;Completed;Deferred;Waiting on Input" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>		</v:custprops>		<v:userdefs>			<v:ud v:nameu="AntiScale" v:val="VT0(1):26"></v:ud>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="DefaultWidth" v:prompt="" v:val="VT0(1):0"></v:ud>			<v:ud v:nameu="DefaultHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>			<v:ud v:nameu="ResizeTxtHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>		</v:userdefs>		<title>shape8-40</title>		<desc>Debug specific subsystem</desc>		<g id="shape10-48" v:mid="10" v:groupcontext="shape" v:layermember="0">			<title>工作表.10</title>			<path d="M0 503.25 L98.57 503.25 L98.57 429.32 L0 429.32 L0 503.25 Z" class="st12"></path>		</g>		<g id="shape11-50" v:mid="11" v:groupcontext="shape" v:layermember="0">			<title>工作表.11</title>			<rect x="0" y="429.32" width="98.57" height="73.93" class="st3"></rect>		</g>		<g id="shape12-52" v:mid="12" v:groupcontext="shape" v:layermember="0" transform="translate(9,0)">			<title>工作表.12</title>			<path d="M0 503.25 L0 429.32 L0 503.25 Z" class="st13"></path>			<path d="M0 503.25 L0 429.32" class="st14"></path>		</g>		<g id="shape13-55" v:mid="13" v:groupcontext="shape" v:layermember="0" transform="translate(89.57,0)">			<title>工作表.13</title>			<path d="M0 503.25 L0 429.32 L0 503.25 Z" class="st13"></path>			<path d="M0 503.25 L0 429.32" class="st14"></path>		</g>		<g id="shape9-58" v:mid="9" v:groupcontext="groupContent">			<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>			<v:textrect cx="49.2843" cy="466.286" width="80.58" height="73.9286"></v:textrect>			<text x="19.28" y="462.38" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>调试特定的<v:lf></v:lf><tspan x="31.28" dy="1.3em" class="st10">子系统</tspan></text>			</g>	</g>	<g id="group14-61" transform="translate(308.37,-35.7024)" v:mid="14" v:groupcontext="group">		<v:custprops>			<v:cp v:nameu="Cost" v:lbl="Cost" v:prompt="" v:type="7" v:format="@" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="ProcessNumber" v:lbl="Process Number" v:prompt="" v:type="2" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Owner" v:lbl="Owner" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Function" v:lbl="Function" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>			<v:cp v:nameu="StartDate" v:lbl="Start Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="EndDate" v:lbl="End Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Status" v:lbl="Status" v:prompt="" v:type="4" v:format=";Not Started;In Progress;Completed;Deferred;Waiting on Input" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>		</v:custprops>		<v:userdefs>			<v:ud v:nameu="AntiScale" v:val="VT0(1):26"></v:ud>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="DefaultWidth" v:prompt="" v:val="VT0(1):0"></v:ud>			<v:ud v:nameu="DefaultHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>			<v:ud v:nameu="ResizeTxtHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>		</v:userdefs>		<title>shape10-48</title>		<desc>Debug Application processor</desc>		<g id="shape15-62" v:mid="15" v:groupcontext="shape" v:layermember="0">			<title>工作表.15</title>			<path d="M0 503.25 L98.57 503.25 L98.57 429.32 L0 429.32 L0 503.25 Z" class="st12"></path>		</g>		<g id="shape16-64" v:mid="16" v:groupcontext="shape" v:layermember="0">			<title>工作表.16</title>			<rect x="0" y="429.32" width="98.57" height="73.93" class="st3"></rect>		</g>		<g id="shape17-66" v:mid="17" v:groupcontext="shape" v:layermember="0" transform="translate(9,0)">			<title>工作表.17</title>			<path d="M0 503.25 L0 429.32 L0 503.25 Z" class="st13"></path>			<path d="M0 503.25 L0 429.32" class="st14"></path>		</g>		<g id="shape18-69" v:mid="18" v:groupcontext="shape" v:layermember="0" transform="translate(89.57,0)">			<title>工作表.18</title>			<path d="M0 503.25 L0 429.32 L0 503.25 Z" class="st13"></path>			<path d="M0 503.25 L0 429.32" class="st14"></path>		</g>		<g id="shape14-72" v:mid="14" v:groupcontext="groupContent">			<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>			<v:textrect cx="49.2843" cy="466.286" width="80.58" height="73.9286"></v:textrect>			<text x="25.28" y="462.38" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>调试应用<v:lf></v:lf><tspan x="31.28" dy="1.3em" class="st10">处理器</tspan></text>			</g>	</g>	<g id="group19-75" transform="translate(586.251,-35.7024)" v:mid="19" v:groupcontext="group">		<v:custprops>			<v:cp v:nameu="Cost" v:lbl="Cost" v:prompt="" v:type="7" v:format="@" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="ProcessNumber" v:lbl="Process Number" v:prompt="" v:type="2" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Owner" v:lbl="Owner" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Function" v:lbl="Function" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>			<v:cp v:nameu="StartDate" v:lbl="Start Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="EndDate" v:lbl="End Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Status" v:lbl="Status" v:prompt="" v:type="4" v:format=";Not Started;In Progress;Completed;Deferred;Waiting on Input" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>		</v:custprops>		<v:userdefs>			<v:ud v:nameu="AntiScale" v:val="VT0(1):26"></v:ud>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="DefaultWidth" v:prompt="" v:val="VT0(1):0"></v:ud>			<v:ud v:nameu="DefaultHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>			<v:ud v:nameu="ResizeTxtHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>		</v:userdefs>		<title>shape11-56</title>		<desc>Debug Always-on processor</desc>		<g id="shape20-76" v:mid="20" v:groupcontext="shape" v:layermember="0">			<title>工作表.20</title>			<path d="M0 503.25 L98.57 503.25 L98.57 429.32 L0 429.32 L0 503.25 Z" class="st12"></path>		</g>		<g id="shape21-78" v:mid="21" v:groupcontext="shape" v:layermember="0">			<title>工作表.21</title>			<rect x="0" y="429.32" width="98.57" height="73.93" class="st3"></rect>		</g>		<g id="shape22-80" v:mid="22" v:groupcontext="shape" v:layermember="0" transform="translate(9,0)">			<title>工作表.22</title>			<path d="M0 503.25 L0 429.32 L0 503.25 Z" class="st13"></path>			<path d="M0 503.25 L0 429.32" class="st14"></path>		</g>		<g id="shape23-83" v:mid="23" v:groupcontext="shape" v:layermember="0" transform="translate(89.57,0)">			<title>工作表.23</title>			<path d="M0 503.25 L0 429.32 L0 503.25 Z" class="st13"></path>			<path d="M0 503.25 L0 429.32" class="st14"></path>		</g>		<g id="shape19-86" v:mid="19" v:groupcontext="groupContent">			<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>			<v:textrect cx="49.2843" cy="466.286" width="80.58" height="73.9286"></v:textrect>			<text x="37.28" y="455.18" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>调试<tspan class="st9"> </tspan><tspan x="21.61" dy="1.225em" class="st9">Always</tspan><tspan class="st9">-</tspan><tspan class="st9">on </tspan><tspan x="31.28" dy="1.275em" class="st10">处理器</tspan>  </text>			</g>	</g>	<g id="group24-93" transform="translate(712.239,-35.7024)" v:mid="24" v:groupcontext="group">		<v:custprops>			<v:cp v:nameu="Cost" v:lbl="Cost" v:prompt="" v:type="7" v:format="@" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="ProcessNumber" v:lbl="Process Number" v:prompt="" v:type="2" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Owner" v:lbl="Owner" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Function" v:lbl="Function" v:prompt="" v:type="0" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>			<v:cp v:nameu="StartDate" v:lbl="Start Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="EndDate" v:lbl="End Date" v:prompt="" v:type="5" v:format="" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0"></v:cp>			<v:cp v:nameu="Status" v:lbl="Status" v:prompt="" v:type="4" v:format=";Not Started;In Progress;Completed;Deferred;Waiting on Input" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>		</v:custprops>		<v:userdefs>			<v:ud v:nameu="AntiScale" v:val="VT0(1):26"></v:ud>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="DefaultWidth" v:prompt="" v:val="VT0(1):0"></v:ud>			<v:ud v:nameu="DefaultHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>			<v:ud v:nameu="ResizeTxtHeight" v:prompt="" v:val="VT0(0.75):0"></v:ud>		</v:userdefs>		<title>shape12-64</title>		<desc>Debug NoC</desc>		<g id="shape25-94" v:mid="25" v:groupcontext="shape" v:layermember="0">			<title>工作表.25</title>			<path d="M0 503.25 L98.57 503.25 L98.57 429.32 L0 429.32 L0 503.25 Z" class="st12"></path>		</g>		<g id="shape26-96" v:mid="26" v:groupcontext="shape" v:layermember="0">			<title>工作表.26</title>			<rect x="0" y="429.32" width="98.57" height="73.93" class="st3"></rect>		</g>		<g id="shape27-98" v:mid="27" v:groupcontext="shape" v:layermember="0" transform="translate(9,0)">			<title>工作表.27</title>			<path d="M0 503.25 L0 429.32 L0 503.25 Z" class="st13"></path>			<path d="M0 503.25 L0 429.32" class="st14"></path>		</g>		<g id="shape28-101" v:mid="28" v:groupcontext="shape" v:layermember="0" transform="translate(89.57,0)">			<title>工作表.28</title>			<path d="M0 503.25 L0 429.32 L0 503.25 Z" class="st13"></path>			<path d="M0 503.25 L0 429.32" class="st14"></path>		</g>		<g id="shape24-104" v:mid="24" v:groupcontext="groupContent">			<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>			<v:textrect cx="49.2843" cy="466.286" width="80.58" height="73.9286"></v:textrect>			<text x="23.61" y="470.19" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>调试<tspan class="st9"> </tspan><tspan class="st9">NoC</tspan></text>			</g>	</g>	<g id="shape29-108" v:mid="29" v:groupcontext="shape" v:layermember="1" transform="translate(121.083,-109.626)">		<title>shape13-70</title>		<desc>Yes</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="-6.73688E-006" cy="423.224" width="60.01" height="22.4037"></v:textrect>		<path d="M56.68 399.88 L0 399.88 L0 494.9 L0 503.25" class="st7"></path>		<rect v:rectcontext="textBkgnd" x="-5.99987" y="415.422" width="12.0001" height="15.6047" class="st11"></rect>		<text x="-6" y="427.13" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>是</text>		</g>	<g id="shape30-115" v:mid="30" v:groupcontext="shape" v:layermember="1" transform="translate(311.136,-109.626)">		<title>shape14-77</title>		<desc>No</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="46.5188" cy="428.304" width="60.01" height="22.4037"></v:textrect>		<path d="M0 399.88 L46.52 399.88 L46.52 494.9 L46.52 503.25" class="st7"></path>		<rect v:rectcontext="textBkgnd" x="40.5189" y="420.502" width="12.0001" height="15.6047" class="st11"></rect>		<text x="40.52" y="432.21" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>否</text>		</g>	<g id="shape31-122" v:mid="31" v:groupcontext="shape" v:layermember="1" transform="translate(406.941,-72.664)">		<title>shape16-84</title>		<desc>Nonsecure WD bite AHB timeout XPU error SMMU error No error</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="40.4981" cy="392.479" width="88.54" height="62.0036"></v:textrect>		<path d="M162.94 363.65 L40.5 363.65 L40.5 503.25 L8.35 503.25 L0 503.25" class="st7"></path>		<rect v:rectcontext="textBkgnd" x="4.99244" y="363.221" width="71.0112" height="58.5146" class="st11"></rect>		<text x="4.99" y="372" class="st15" v:langid="2052"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>非安全看门狗<tspan class="st9" v:langid="1033"> </tspan><tspan class="st9" v:langid="1033">bite<v:lf></v:lf></tspan><tspan x="21" dy="1.3em" class="st9" v:langid="1033">AHB </tspan><tspan class="st10" v:langid="1033">超时<v:lf></v:lf></tspan><tspan x="21" dy="1.3em" class="st9" v:langid="1033">XPU </tspan><tspan class="st10" v:langid="1033">错误<v:lf></v:lf></tspan><tspan x="16.5" dy="1.3em" class="st9" v:langid="1033">SMMU </tspan><tspan class="st10" v:langid="1033">错误<v:lf></v:lf></tspan><tspan x="27" dy="1.3em" class="st10" v:langid="1033">无错误</tspan></text>		</g>	<g id="shape32-138" v:mid="32" v:groupcontext="shape" v:layermember="1" transform="translate(703.251,-109.626)">		<title>shape18-95</title>		<desc>NoC error</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="58.2724" cy="422.792" width="64.02" height="22.4037"></v:textrect>		<path d="M0 400.61 L58.27 400.61 L58.27 494.9 L58.27 503.25" class="st7"></path>		<rect v:rectcontext="textBkgnd" x="32.6023" y="414.99" width="51.3402" height="15.6047" class="st11"></rect>		<text x="32.6" y="426.69" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>NoC <tspan class="st6">错误</tspan></text>		</g>	<g id="shape33-146" v:mid="33" v:groupcontext="shape" v:layermember="1" transform="translate(635.942,-109.633)">		<title>shape21-102</title>		<desc>AoP error</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="0.310242" cy="474.943" width="62.69" height="22.4037"></v:textrect>		<path d="M0.62 446.63 L0.09 494.9 L0 503.25" class="st7"></path>		<rect v:rectcontext="textBkgnd" x="-24.6978" y="467.141" width="50.0164" height="15.6047" class="st11"></rect>		<text x="-24.7" y="478.84" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>AoP <tspan class="st6">错误</tspan></text>		</g></g>
</svg>

当内核 dmesg 日志中没有 panic 标识特征时，检查证 Qualcomm TEE 诊断 (diag) 日志是否存在诸如非安全看门狗 bite、片上网络 (NoC) 等错误。以下主题介绍了一些示例内核消息，这些消息表明内核 panic、bug 和子系统崩溃问题。

### 识别内核 panic 和 bug

根据内核 dmesg 日志，可以确定该复位是内核 panic 还是 bug。下面是指示内核 panic 或 bug 的一些示例日志：

- Panic（模式：常规错误）

        18.800936: <6> Kernel panic - not syncing: Fatal exception
        18.800938: <6> SMP: stopping secondary CPUs
        18.800947: <6> CPU0: stopping
        Kernel panic - not syncing: Apps watchdog Bark received!Copy to clipboard
- Bug（模式 1：由于内存损坏而强制崩溃）

        12.899532: <6> BUG kmalloc-128 (Not tainted): Redzone overwritten
        12.905418: <6> -----------------------------------------------------------------------------Copy to clipboard
- Bug（模式 2：驱动程序强制崩溃）

        320.510769: <6> ------------[ cut here ]------------
        320.510781: <6> kernel BUG at /local/mnt/workspace/lnxbuild/project/trees_in_use/free_tree_platform_manifest_refs_tags/drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.c:955!Copy to clipboard
- Bug（模式 3：由于死锁问题导致的强制崩溃）

        [ 180.993861] BUG: spinlock lockup suspected on CPU#0, swapper/0/0
        [ 180.993883] lock: stop_lock+0x0/0x18, .magic: dead4ead, .owner: swapper/6/0, .owner_cpu: 6
        [ 181.015629] Causing a watchdog bite!Copy to clipboard

Note: 大多数 bug 之后都会发生内核 panic。有关调试内核问题的更多信息，参见 [Qualcomm Linux 内核指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-3/overview.html)。

### 识别子系统崩溃问题

确定重启的原因是否为子系统崩溃，验证内核 dmesg 日志。例如，以下日志表明，根据 qcm6490.dtsi（节点：remoteproc\_adsp: remoteproc@3000000），aDSP 子系统已崩溃。

0x000000000A27652C |   5198.790423:   qcom_q6v5_pas 3000000.remoteproc: fatal error received: err_inject_crash.c:413:Crash injected via Diag 
    0x000000000A276689 |   5198.801061:   remoteproc remoteproc2: crash detected in 3000000.remoteproc: type fatal error 
    0x000000000A2767A1 |   5198.809602:   remoteproc remoteproc2: handling crash #1 in 3000000.remoteproc 
    0x000000000A27688E |   5198.816837:   remoteproc remoteproc2: recovering 3000000.remoteproc 
    0x000000000A276971 |   5198.823784:   qcom_q6v5_pas 8a00000.remoteproc: subsystem event rejectedCopy to clipboard

### 根据 Qualcomm TEE 日志识别系统问题

此功能适用于具有授权访问权限的许可开发人员。有关 Qualcomm TEE 中指示错误的示例日志，参见 [Qualcomm Linux Debug Guide - Addendum](https://docs.qualcomm.com/bundle/resource/topics/80-70015-12A/identify_subsystem_to_be_debugged.html#identify_and_debug_errors_in_tz)。

如果 Qualcomm TEE 诊断日志没有错误，则很可能是安全看门狗 bite 问题。有关看门狗问题的更多信息，参见[硬件复位](https://docs.qualcomm.com/doc/80-70015-12SC/topic/general_system_debugging.html#reset_hardware)。

有关 Qualcomm TEE 中调试问题的信息，参见 [Qualcomm Linux 安全指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-11/debug.html)。

## 调试方法

Source: [https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html](https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html)

有两种调试方法：

- **目标上调试**
    目标上调试是调试软件问题的基本方式。这种方法十分强大，因为可以从实时设备访问大部分信息。SSH 用于将主机连接到实时设备。要设置 SSH，按照[此处](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#use-ssh)提到的步骤操作。

    有关各种目标调试功能的更多信息，参见[目标上调试功能](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-12/Debug-overview.html#on_target_debug_features)。
- **目标外调试**

    这种调试方法需要日志而不是实际设备，因此是一种方便、高效的调试方法。使用内存转储或日志工具完成调试。离线调试可使用各种类型的日志。由于 RAM 转储会捕获大部分内存区域，但获取的硬件寄存器信息非常有限，因此调试硬件相关问题是一大挑战。

    有关各种目标调试功能的更多信息，参见[目标外调试功能](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-12/Debug-overview.html#off_target_debug_features)。

## 目标上调试功能

Source: [https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html](https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html)

设备上提供了以下调试功能，可以在运行时使用：

### Perf 工具

Perf 是 Linux 中一个功能强大的工具，它可以简化性能分析。Linux 内核的 tools/perf 目录中包括此工具。

Perf 工具可用于调试系统行为的各个方面，包括 CPU 性能计数器、tracepoint、kprobe 和 uprobe（用于动态跟踪）。下面是 Perf 工具的主要功能：

Table : Perf 工具的主要功能

| 功能 | 说明 |
| --- | --- |
| CPU 性能计数器 | 这些 CPU 硬件寄存器用于跟踪已执行指令、缓存未命中和分支误预测等事件。这些事件构成了 Profile 应用程序和识别性能瓶颈的基础。 |
| TracePoint | 这些 tracepoint 放置在代码中的逻辑位置。例如，系统调用、网络事件、文件系统操作。这些 tracepoint 以最小的开销提供时间戳和堆栈跟踪等信息。 |
| 动态跟踪 | 此功能可利用 kprobe 和 uprobe 框架动态创建 tracepoint。因此，此功能可以在内核和用户空间中进行跟踪。 |

有关 Perf 工具的详细信息，参见以下内容：
- [https://perf.wiki.kernel.org/index.php/Main_Page](https://perf.wiki.kernel.org/index.php/Main_Page)
- [https://github.com/Linaro/OpenCSD/blob/master/HOWTO.md](https://github.com/Linaro/OpenCSD/blob/master/HOWTO.md)
- [https://docs.kernel.org/trace/coresight/index.html](https://docs.kernel.org/trace/coresight/index.html)
- [https://docs.kernel.org/trace/coresight/coresight-perf.html](https://docs.kernel.org/trace/coresight/coresight-perf.html)

### 子系统重启 (Subsystem restart)

子系统可在崩溃时单独重启，无需重启设备。此类重启功能称为子系统重启 (SSR)。SSR 功能可通过 Linux 内核中提供的 remoteproc 框架来实现。

为了启用完整内存转储以进行调试，默认情况下会禁用 SSR 功能。建议在商用设备上使用 SSR 功能，不要在开发阶段使用。有关 SSR 功能的详细信息，参见 [Remoteproc 子系统](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-3/features.html#remoteproc-subsystem)。

启用 SSR 功能后，将在子系统重新启动时生成 SSR 转储。由于 SSR 转储的大小小于完整内存转储的大小，因此可考虑使用 SSR 转储进行调试。但是，调试某些子系统崩溃需要整个 RAM 转储。

有关如何启用和捕获子系统转储的信息，参见[子系统转储](https://docs.qualcomm.com/doc/80-70015-12SC/topic/debugging_linux_kernel.html#subsystem_ram_dumps)。

### 强制子系统复位

此功能可用于调试需要重启子系统的用例。

此功能适用于具有授权访问权限的许可开发人员。要强制复位子系统，可以使用 QXDM Professional™ 运行 `diag` 命令。有关 QXDM Professional 命令及其用法的信息，参见 [Qualcomm Linux Debug Guide - Addendum](https://docs.qualcomm.com/bundle/resource/topics/80-70015-12A/debug-non-hlos-subsystems.html#qxdm_professional)。

## 目标外调试功能

Source: [https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html](https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html)

以下功能和工具可用于离线调试。

### RAM 转储

RAM 转储是故障发生时整个内存的拍照。可以使用各种工具分析 RAM 转储，包括 Qualcomm 崩溃分析门户 (QCAP)、RAMParser、Lauterbach
                TRACE32 模拟器和 crash utility。有关如何收集和解析 RAM 转储的信息，参见[收集并解析 RAM 转储](https://docs.qualcomm.com/doc/80-70015-12SC/topic/debugging_linux_kernel.html#collect_and_parse_ram_dumps)。

### QXDM Professional

QXDM Professional 可用于调试各种子系统。

此工具适用于具有授权访问权限的许可开发人员。有关 QXDM Professional 命令及其用法的信息，参见 [Qualcomm Linux Debug Guide - Addendum](https://docs.qualcomm.com/bundle/resource/topics/80-70015-12A/debug-non-hlos-subsystems.html#qxdm_professional)。

## 常见系统问题

Source: [https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html](https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html)

系统问题可分为以下类型之一：
- [Linux 内核空间问题](https://docs.qualcomm.com/doc/80-70015-12SC/topic/debugging_linux_kernel.html)
- [系统问题](https://docs.qualcomm.com/doc/80-70015-12SC/topic/general_system_debugging.html)
    - [看门狗问题](https://docs.qualcomm.com/doc/80-70015-12SC/topic/general_system_debugging.html#watchdog_timeout)
    - [总线 hang 和超时问题](https://docs.qualcomm.com/doc/80-70015-12SC/topic/general_system_debugging.html#erroneous_transaction_on_bus_error_and_timeout)
    - [硬件复位问题](https://docs.qualcomm.com/doc/80-70015-12SC/topic/general_system_debugging.html#reset_hardware)

## 其他问题

Source: [https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html](https://docs.qualcomm.com/doc/80-70015-12SC/topic/Debug-overview.html)

以下是您可能遇到的其他问题：
- 软件 bug 导致设备冻结问题
- Linux 应用程序相关问题
- 由于 PCB 相关硬件问题导致的随机复位

要调试 Linux 内核相关问题，参见[调试 Linux 内核空间](https://docs.qualcomm.com/doc/80-70015-12SC/topic/debugging_linux_kernel.html)。

要调试 Linux 应用程序相关问题，参见[调试 Linux 用户空间问题](https://docs.qualcomm.com/doc/80-70015-12SC/topic/using_open_source_debug_tools.html)。

Last Published: Dec 02, 2024

[Next Topic
调试 Linux 用户空间问题](https://docs.qualcomm.com/bundle/publicresource/80-70015-12SC/topics/using_open_source_debug_tools.md)