Windows Debuggers: Part 1: A WinDbg Tutorial

深入大模型-52-Harness综述之(二)四大子系统 一个Harness都由四个子系统拼成,Agentic Loop是主干,四个子系统是Tool系统、Memory & Context、Guardrails,再加上一个把它们优雅组织起来的Skill系统。 阅读详情
 

Table of contents

Introduction

In my professional career, I have seen most of us use Visual Studio for debugging but not many of the other debuggers that come for free. You may want such a debugger for many reasons, for example, on your home PC which you do not use for development but on which a certain program crashes from time to time. From the stack dump, you can figure out if IE crashed because of a third party plug-in.

I did not find any good quick starters for WinDbg. This article discusses WinDbg with examples. I assume you know the basic concepts of debugging – stepping in, stepping out, breakpoints and what it means to do remote debugging.

Note that this is meant to be a Getting Started document, which you can read and start using WinDbg. To know more about specific commands, consult the WinDbg documentation. You can use the commands presented in this document with any debugger provided by Microsoft, e.g. from the Command window of Visual Studio .NET.

This article is based on WinDbg 6.3.

This is the first of a series of articles on debugging. In my next article, I shall explain how to write debugger extension DLLs.

Overview of Debuggers

A brief overview of the Windows debuggers that you can download for free from here:

  • KD – Kernel debugger. You want to use this to remote debug OS problems like blue screens. You want it if you develop device drivers.
  • CDB – Command-line debugger. This is a console application.
  • NTSD – NT debugger. This is a user-mode debugger that you can use to debug your user-mode applications. Effectively, this is Windows-style UI added to CDB.
  • Windbg – wraps KD and NTSD with a decent UI. WinDbg can function both as a kernel-mode and user-mode debugger.
  • Visual Studio, Visual Studio .NET – use the same debugging engine as KD and NTSD and offer richer UI than WinDbg for debugging purposes.

Comparison of Debuggers

FeatureKDNTSDWinDbgVisual Studio .NET
     
Kernel-mode debuggingYNYN
User-mode debugging YYY
Unmanaged debuggingYYYY
Managed debugging YYY
Remote debuggingYYYY
Attach to processYYYY
Detach from process in Win2K and XPYYYY
SQL debuggingNNNY

WinDbg

WinDbg is a debugger that wraps NTSD and KD with a better UI. It provides command-line options like starting minimized (-m), attach to a process by pid (-p) and auto-open crash files (-z). It supports three types of commands:

  • regular commands (e.g.: k). The regular commands are to debug processes.
  • dot commands (e.g.: .sympath). The dot commands are to control the debugger.
  • extension commands (e.g.: !handle) – these are custom commands that you can add to WinDbg; they are implemented as exported functions in extension DLLs.

PDB files

PDB files are program database files generated by the linker. Private PDB files contain information about private and public symbols, source lines, types, locals and globals. Public PDB files do not contain types, local and source line information.

Debugging Scenarios

Remote Debugging

Doing remote debugging using WinDbg is easy and can be done in one of a number of ways. In the following, ‘debugging server’ is the debugger running on the machine where you’d like to debug; ‘debugging client’ is the debugger controlling the session.

  • Using the debugger: You need CDB, NTSD or WinDbg on the server. A WinDbg client can connect to any of CDB, NTSD and WinDbg, and vice versa. The server and client have choices of TCP and named pipes for communication protocol.
    • To start a server:
      • WinDbg –server npipe:pipe=pipename (note: multiple clients can connect), or
      • from within WinDbg: .server npipe:pipe=pipename (note: single client can connect)

      You can start multiple server sessions using multiple protocols. You can password-protect a session.

    • To connect from a client:
      • WinDbg -remote npipe:server=Server, pipe=PipeName[,password=Password]
      • from within WinDbg: File->Connect to Remote Session: for connection string, enter npipe:server=Server, pipe=PipeName [,password=Password]
  • Using remote.exe: remote.exe uses named pipes for communicating. If you use a console-based application like KD, CDB or NTSD, you could use remote.exe to do remote debugging. Note: use at q (not q) to quit the client without quitting the server dot
    • To start a server:
      • Remote.exe /s “cdb –p <pid>” test1
    • To connect from a client:
      • Remote.exe /c <machinename> test1

    test1 above is the arbitrary named pipe name we chose.

Server will display who all are connected from which servers and commands executed. You can quit the server by issuing ‘qq’; or quit the client using File->Exit. You’d need to belong to the “Debugger Users” user group and the server has to allow remote connectivity if you want to remote-debug.

Just-in-time Debugging

The section “Enabling Postmortem Debugging” in the WinDbg documentation discusses this well. In short, you can set WinDbg as the default JIT debugger by running Windbg –I. This sets the registry key HKLMSoftwareMicrosoftWindows NTCurrentVersionAeDebug to WinDbg. To set WinDbg as the default managed debugger, you’d need to set these registry keys explicitly:

  • HKLMSoftwareMicrosoft.NETFrameworkDbgJITDebugLaunchSetting to 2
  • HKLMSoftwareMicrosoft.NETFrameworkDbgManagedDebugger to Windbg.

With the JIT setting, WinDbg will be launched if an application throws an exception while not being debugged and does not handle the exception itself.

64-bit Debugging

All these debuggers support 64-bit debugging on AMD64 and IA64.

Managed Debugging

WinDbg 6.3+ supports managed debugging, with the Whidbey .NET CLR. There is a good discussion on managed debugging in the documentation. Remember that there are no PDBs with managed code since managed code is compiled to ILASM; the debugger talks to the CLR to query extra information.

Points to note:

You can set a breakpoint at a managed code function only after it has been invoked at least once; because that is when it is JIT-compiled to ASM code. Keep in mind:

  • Complications with function addresses and hence breakpoints:
    • The CLR can discard compiled code, so function addresses may change.
    • The same code may be multiply compiled if multiple app domains do not share the code. If you set a breakpoint, it gets set for the app domain of the current thread.
    • Specialization of generics can cause multiple addresses for the same function.
  • Complications with data layout and hence data inspection:
    • The CLR may change data layout arbitrarily at runtime, so field offsets in a structure may change over time.
    • Type information is loaded only on first use, so you may not be able to inspect a data field if it has not been used yet.
  • Complications with debugger commands:
    • When tracing through managed code, you would pass through chunks of runtime code like the JIT compiler code because you stepped into a function for the first time, or, when transitioning from managed to unmanaged code.

Debugging Services

You can debug a service just as any other application using WinDbg, both after starting the service by attaching to the service process, and, by using WinDbg as a JIT debugger and programmatically calling DbgBreakPoint or DebugBreak, or an ASM int 3 on x86.

Debugging Exceptions

A debugger gets notified of each exception twice – it is notified the first time before the application gets a chance to handle the exception (‘first chance exception’); if the application does not handle the exception, the debugger is given a chance to handle the exception ( ‘second-chance exception’). If the debugger does not handle a second-chance exception, the application quits.

.lastevent, or, !analyze –v will show you the exception record and stack trace of the function where the exception occurred.

You can also use the .exr, .cxr and .ecxr commands to display the exception and context records. Note also that you can change the first-chance handling option for an exception using the sxe, sxd, sxn and sxi commands.

WinDbg Features

Debugger Extension DLLs

Debugger extensions are DLLs that you can hook up with a debugger to execute custom commands from within the debugger. There are certain functions that a DLL needs to implement and some requirements that a DLL needs to meet in order to qualify as an extension DLL. In the next article, we shall learn how to write an extension DLL yourself. The bang (!) commands are commands executed from your extension DLLs. Note that extension DLLs are loaded in the process space of the debugger.

Dump Files

You can take snapshot information of a process using the dump facility. A mini-dump is usually small, unless you take a full-memory minidump (.dump /mf). It is useful to dump handle information also, as .dump/mfh. A mini-dump contains information about all threads including their stacks and list of loaded modules. A full dump contains more information, like that of the process heap.

Crash Dump Analysis

If your Windows OS crashes, it dumps the physical memory contents and all process information to a dump file, configured through System->Control Panel->Advanced->’Startup and Recovery’. It is also possible to take dumps of any live process by breaking into it. You can also take a dump of any process (.dump) that terminates abnormally by configuring WinDbg as a JIT debugger. Note that figuring out bugs in the code from a crash dump could be an involved process.

To analyze a dump, follow these steps:

Step 1: In WinDbg, File->’Open Crash Dump’, and point to the dump file

Step 2: WinDbg will show you the instruction your app was executing when it crashed.

Step 3: Set your symbol path and source path properly. If you cannot match symbols, you could have a hard time figuring out control flow. If you can match the symbols to source code of the appropriate version, it should be easy to figure out the bug at this point. Note that private symbol files have line number information and will blindly show the line in your source code without further checks; if your source is not version-matched properly, you’d not see the correct source code matching the assembly code. If you have public PDB files, you’ll see the last public function (on the call stack) that was invoked.

Note that debugging drivers or managed code is much different. Refer to [2] for debugging techniques for device drivers.

WinDbg Settings

Symbol Files and Directories

You need symbols in order to be able to do effective debugging. Symbol files could be in an older COFF format or the PDB format. PDBs are program database files and contain public symbols. These debuggers allow you to mention a list of URIs where they would look for symbols for loaded binaries.

OS symbols are usually installed in the %SYSTEMDIR%Symbols directory. Driver symbols (.DBG or .PDB files) are usually in the same folder as the driver (.sys file). Private symbol files contain information about functions, local and global variables, and line information to correlate assembly code to source code; symbol files that are usually made available to customers are public symbol files – these files contain information about public members only.

You can set symbol directories through File->Symbol File Path, or using .sympath from the WinDbg command window. To add reference to a symbol server on the web, add:

SRV*downstream_store*http://msdl.microsoft.com/download/symbols

to your .sympath, thus:

.sympath+ SRV*c:tmp*http://msdl.microsoft.com/download/symbols

Where c:tmp is the download_store where necessary symbols will be downloaded and stored. Note that this particular symbol server exposes public symbols only.

The debugger matches information like filename, timestamp and checksum when matching a PDB with a binary (DLL or exe). If you have symbol information, you’d be able to see function names and their arguments in your call stack. If the binaries and PDBs are from your application, you’d additionally have information about private functions, local variables and type information.

The sympath can consist of multiple URIs. Sympath is initialized from the _NT_SYMBOL_PATH system environment variable.

Source Code Directories

You can set source code directories through File->Source File Path, or using .srcpath from the WinDbg command window. If you set source code directories, the debugger will pull up matching source code based on line number information from the PDB files during debugging.

Breakpoints, Tracing

  • Set soft breakpoints using the bp commands or using the toolbar breakpoint icon.
  • Set hard breakpoints using code like DbgBreakPoint() or KdBreakPoint().
  • Use tracing routines DbgPrint, KdPrint, OutputDebugString to print out to the WinDbg output window, from debugger extension DLLs.

Commands

Basic Commands

The help file that comes with the WinDbg installation documents commands well, but the following basic commands should get you started:

FeatureCommandWhat Does it DoExample / CommentsSee Also Related Commands
     
Stack traceK, KB xDisplays stack trace of current thread (x frames). Kb causes the display to include the first three parameters passed to each function. KP, Kp, or KV
Frame.frame X   
Register watchRDisplays register set. reax – displays the eax register.  
SteptTrace = Step into (F11)  
 pStep over (F10)  
 Step outShift + F11  
DisassembleuUnassemble next few instructions  
 u <start_address>Unassemble instructions at start_address  
 u <start_address>

<end_address>

Unassemble instructions from start_address till end_address  
BreakpointsBlList breakpoints.  
 be, bd, bcEnable / disable / clear breakpoint.  
 bpSet a breakpoint.  
 buSet unresolved breakpoint. Breakpoint is resolved by symbolic name, not absolute address. Use this to set breakpoint at a function whose containing module has not yet been loaded.bu foo 
     
Comment*Ignores the command* Hello World 
ContinueG <address_X / symbol>Go. Resumes execution until address_X  
 GHGo, exception handled  
 GNGo, exception not handled  
QuitQ   
Dumping datadvDisplay local variables.You need private symbols. 
 Dd <address>Display dword values at specified address.To see value of an int, DD <addr> L1 
 Ds, da (ASCII), du (Unicode)Dump string  
 Dt [dt module!typedef adr]Dump type. Will dump the contents of the memory using typedef as a template.  
Change / Edit ValuesEb (byte), ed (dword), ea (ASCII), eu (Unicode)Edit value of a variable  
List moduleslmList loaded modules Lmi, lml, !dlls
Threads~Lists all threads  
Command on thread n~n<command>Switch to a specific thread by thread-id and execute a command on the thread.~2kb (second thread’s stack) 
     
Search for a symbol in a moduleX module!<pattern> X blah!*foo* 
Dump.dump   
Source line display.linesTurns on source code display  
 ln adrWill show the symbol nearest to that location.  
Note:

  1. There is no “step out” (Shift+F11). You have to find the return address on the stack manually and use “g adr”. You can find this address by using “k”. If you know the function uses ebp frames you can use “g poi(ebp+4)” to step out.
  2. To inspect local variables:
    1. Use the “dv” command.
    2. Then use the “dt <variablename>” command.
    3. Note: you may not see correct values if values are stored in registers or due to FPO.

More Commands

FeatureCommandWhat Does it DoExample / CommentsSee Also Related Commands
 VertargetShows information about the system on which you are debugging.  
Data breakpoint (hardware bp)Ba

[ba r/w/e size adr]

Sets a data breakpoint. You can break on read/ write/ execute attempt of a memory location.ba w4 adr 
Exceptions.lasteventDisplays last exception record  
ExceptionsSx, Sxe, sxd, sxn, sxi exception_XEnable/ disable/ notify-only/ ignore first chance exception /event exception_X. Example of event: module unload/ thread creation.  
Display typeDtShows struct and field values.Dt x; // x: int
Dt myStruct; // struct myStruct
Dt myStruct myVar1; // shows myStruct.myVar1
 
Reload symbols.reloadReloads symbols using the symbol path you would have set.  
Source linesl+l, l+o, l+s, l+tSource line options  
 .ecxrIf you had an exception, switches context to faulting context.  
 .quit_lock   
 ;Command separator  
 ?Evaluate expression  
 |Display process information  
 .chainLists all loaded debugger extensions.  
 .echo <string>Echo/ print any stringEcho xyz 
 .exr <address_x>Display exception record at x.  
 .cxr <address_x>Display context record at x.  
 .trapDump a trap frame.  

Handy Extension Commands

  • !help – help for WinDbg extension commands.
  • !load, !unload – to load and unload debugger extension DLLs.
  • !handle – displays information about handles owned by processes.
  • !peb - shows the PEB (process environment block) including DLL information.

Example

Attached is a sample application with these example functions:

  1. Example1: Program appears hung because a thread waits indefinitely on a critical section that another thread acquired and then exited without releasing.
  2. Example2: Exception: division by zero.
  3. Example3: Execute a command every time a breakpoint is hit.
  4. Example4: Exception: null pointer access
  5. Example5: Exception: double deletion
  6. Example6: Exception: stack overflow due to infinite recursion

Suggested Exercises

  1. Exception: Array out-of-bound access
  2. Exception: Deleted pointer access
  3. Exception: Stack underflow

Epilogue

Points to Note

Please note that:

  • when you run WinDbg, attach to a process and issue kb, you’d be seeing the stack trace of the thread injected by the debugger. All debugging commands are executed in the context of the injected thread.
  • Frame Pointer Omission (FPO):

    Means that when your code is compiled, frame pointers (EBP) will not be put on the stack. This makes function calls faster and makes the EBP register available as a scratch register. The optimization option /Oy in the MSC++ compiler => FPO; /O2 or /Ox (full optimization) => /Oy.

Q & A

  1. How can I list all symbols exported by a module?

    x <module>!*

  2. How can I find help for a specific command?

    .hh <command>, or <command> /?

  3. I want a certain application x.exe to run always under WinDbg. How can I configure this?

    Create a key named x.exe under “HKLMSoftwareMicrosoftWindows NTcurrentversionimage file execution options” and add a new string value “Debugger” to it; set its value to the path of windbg.exe.

  4. I want to do something every time a breakpoint is hit. How can I do that?

    The bp command accepts a list of commands as argument that you can execute every time a breakpoint is hit. Example:

     

    bp WindbgEx1!Example3+0x3d "dd [ebp-0x14] L1; .echo hello world;g"

    (ref. attached code)

    prints the value of a local variable in each iteration of function Example3.

  5. Can I put a breakpoint that is triggered only once?

    Yes:bp /1

  6. Can I set a breakpoint such that it will start hitting only after k-1 passes?

    Yes, bp <address> k

References

  1. WinDbg documentation [from Microsoft]
  2. “The Windows 2000 Device Driver Book” – Art Baker, Jerry Lozano

About Saikat Sen


I am a software developer based in Seattle, Washington. I used to work for Lucent in New York.

Click here to view Saikat Sen's online profile.


Other popular articles:

AFC自动售检票系统与人工智能AI结合的关键应用方案 针对售检票、大客流管理、设备运维及服务优化提供了可落地的技术支持和实现细节,可作为地铁智慧交通项目的实践参考 阅读详情

相关推荐

uniapp APP分享;判断用户是否安装APP,已安装直接打开,未安装跳转下载页;uniapp 在外部打开APP(schemes)

A将某商品分享给B,B点击后判断是否安装APP,若安装直接打开,没有安装则跳转下载页;

@微你 5683

MSVC的调试技巧: Pseudoregisters

MSVC的调试技巧: Pseudoregisters- 翻译自CodeProject.com让我们从为什么写这篇文章开始. 一天, 一个学生让我帮助他解决一个调试问题. 为此我看着他单步进入代码, 当我看到如下代码: int test = GetLastError();他这样做事为了知道之前函数失败的错误代码. 每次他需要知道错误代码的时候都添加上面的代码行. 我建议他删除所有的代

rick1126的专栏 1670

机械臂电机力矩计算

设计 6 轴机械臂时,电机力矩计算是确保机械臂负载能力、运动精度和安全性的核心环节,需围绕和两大核心展开,结合机械臂结构参数(如关节长度、质量分布)、负载需求(如末端负载重量、惯性)和运动参数(如加速度、角速度)逐步推导。

ZPC8210的博客 1857

C++资源库

标准库C++标准库,包括了STL容器,算法和函数等。C++ Standard Library:是一系列类和函数的集合,使用核心语言编写,也是C++ISO自身标准的一部分。Standard Template Library:标准模板库C POSIX library : POSIX系统的C标准库规范ISO C++ Standards Committee :C++标准委员会 框架C++通用框架和库Apa...

Black-REN 482

DSPF28335:从零到一,实战GPIO与外部中断的嵌入式系统交互设计

本文以德州仪器DSPF28335芯片为例,详细讲解了嵌入式系统中GPIO与外部中断(EXTI)的实战配置方法。通过一个完整的按键控制LED并触发ADC采样的项目,深入剖析了GPIO寄存器配置、三级中断机制(外设-PIE-CPU)以及中断服务函数编写的核心要点,帮助开发者掌握嵌入式交互设计的基石,并提供了关键的避坑指南与调试清单。

weixin_29169899的博客 115

HTB_Bike靶机之模板注入

船到桥头自然直 文章目录信息收集模板引擎SSIT 模板注入后放答案 信息收集 日常 A 扫描,两个端口 22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.4 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 3072 48:ad:d5:b8:3a:9f:bc:be:f7:e8:20:1e:f6:bf:de:ae (RSA) | 256 b7:89:6c:0b:20:ed:49:b2:c1:86:7c:.

网络安全学习 798

循环嵌套(多层 for 循环)

表:order(订单表,order_id, user_id)、user(用户表,user_id, user_name)✅ 优化:先查所有订单,拿到所有 user_id 批量 in 查询,内存 join。✅ 优化:先把优惠券转 HashMap,单层循环查找(hash 查找 O (1))SQL 只有 2 次,O (1) 数据库查询,内存遍历 O (n)。需求:查询所有订单列表,同时带出每个订单对应的用户名称。需求:订单列表、优惠券列表,把订单匹配对应的优惠券名称。复杂度:O (M+N),非常快。

weixin_43732943的博客 215

第六天 界面操作及美化(6.4 使用GUI 套件)

本文介绍如何使用VIPM工具安装DMC GUI套件:首先打开VIPM并连接网络,搜索"UI"找到DMCGUI套件后下载安装;安装完成后即可在VIPM中添加控件并预览效果。该方法同样适用于下载其他UI套件,用户可根据需求设计个性化界面。整个流程包括搜索、下载、安装和使用四个简单步骤,适合快速搭建GUI界面。

weixin_38637405的博客 407

Python+Agent入门笔记(六):记忆和状态,从“一次性问答”到“能用助手”

滑动窗口的缺点很明显:被扔掉的信息就真没了。如果用户第一轮说“我不吃辣”,隔了二十轮让他推荐餐厅,模型已经忘了。定期把旧的对话压缩成一段总结,作为一条特殊的消息插进去。"""把除 system 和最近 keep_recent 条以外的消息,压缩成一条摘要。返回新的 messages 列表。"""# 把旧消息拼成纯文本,让模型总结content = f"[工具结果]把除 system 和最近 keep_recent 条以外的消息,压缩成一条摘要。返回新的 messages 列表。

qq_41241612的博客 108

【ubuntu24.04】auto remove后,重启,kernel panic ,please reboot your computer vfs unable to mount root fs

Ubuntu 24.04系统在运行auto remove后出现内核恐慌(kernel panic)无法启动,显示"VFS: unable to mount root fs"错误。该问题是由于当前内核被清除导致系统无法挂载根分区。解决步骤包括:1)尝试用GRUB菜单中的旧内核启动;2)在GRUB中临时编辑启动参数;3)使用Ubuntu启动盘进行chroot修复;4)使用Boot-Repair工具一键修复。成功启动后,需要重新安装linux-generic等元包,重建initramfs并更新

突围 1217

RH850从0搭建Autosar开发环境【2】- Davinci Configurator配置工程导入DBC与CDD文件

Davinci Configurator配置工程导入DBC与CDD文件,开始Autosar开发

weixin_42412049的博客 8153

【数据结构-5】单链表的实现

单链表,具体来说是单向的、不带头的、不循环的链表。链表由一个一个节点组成,每个节点分为数据域和指针域,数据域存放数据,指针域存放下一节点的地址。这样,就可以根据指针域中的地址找到下一个节点,节点就串起来了构成了单链表。

a bit 215

cartographer ceres后端优化

这里引用一篇文章作用一:用户可以选择使用Problem::AddParameterBlock显式添加参数块;在显式添加的时候ceres会内部进行额外的正确性检查。当Problem::AddParameterBlock()不存在时,Problem::AddResidualBlock()会隐式添加参数块,因此不需要显式调用Problem::AddParameterBlock()函数。ps:类似构造函数,显式构造函数。

南北粉面馆 804

本地chatbot4--引入LangGraph

上一节实现了chatbot的连续调用工具的功能,但目前流程还是提示词→模型→解析→调用工具(可选)→输出线性的一条路走到底(LangChain)只适合简单线性任务(问答、摘要、简单RAG)agent的本质是:“模型决定调工具→执行→结果喂回模型→再决定……直到完成”。举例:读日志 → 解析 ─失败→ 重试(≤3次) ─→ 退出│成功↓算统计 → 对比历史 → 生成报告 → [人工审核卡点] → 发送。

weixin_45859446的博客 103

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

C# 数据结构和特殊类型

.NET Core(现称.NET)提供丰富数据结构,优化性能与开发效率。日常开发首选List<T>和Dictionary<TKey,TValue>;高性能场景推荐Span<T>与Memory<T>减少内存分配;并发环境使用ConcurrentDictionary等线程安全集合;避免非泛型集合如ArrayList。

cccloveforever的博客 746

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

C++ 入门笔记(十七):list 入门 —— 为什么 list 不能 sort?

第17课:用大白话讲清 list 的双向链表结构、哨兵头、push_back 四步、迭代器封装、merge 与 splice 的区别,以及 vector 排序为什么常比 list 快。

wo_jack的博客 251

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

list

的底层是双向链表结构,双向链表中每个元素存储在互不相关的独立节点中,在节点中通过指针指向其前一个元素和后一个元素。,因此反向迭代器的实现可以借助正向迭代器,即:反向迭代器内部可以包含一个正向迭代器,对正向迭代器的接口进行包装即可。是可以在常数范围内在任意位置进行插入和删除的序列式容器,并且该容器可以前后双向迭代。迭代到该位置,在这段位置上迭代需要线性的时间开销;最大的缺陷是不支持任意位置的随机访问,比如:要访问。还需要一些额外的空间,以保存每个节点的相关联信息。个元素,必须从已知的位置。

xie0510_的博客 293

3.链表相关知识点

链表

2501_93884468的博客 436

上万数据的批量插入

当数据达到上万上十万的时候,如何批量插入

junxunfs的博客 46

软件商店常见问题标准处理流程

从底层软件源来看,/etc/apt/sources.list配置错误、源地址失效、公网与内网离线源混用、ARM64与x86_64架构源串用,以及DNS解析异常、系统代理配置错误,都会导致商店无法获取应用数据;打开该应用,确认可正常运行;软件商店作为系统内置的图形化软件分发与安装入口(UKUI桌面配套组件,底层依赖APT软件源),承担着应用软件的浏览、搜索、下载、安装、升级与卸载等核心功能,是终端软件部署与管理的关键通道。覆盖软件商店启动、页面加载、应用下载、安装、卸载、搜索、自身更新等全部业务场景。

qq_39496637的博客 307

【AI 开发从入门到进阶 · 10】收官篇:LoRA 微调、模型评估、推理加速与生产部署全链路

本文系统梳理了大模型微调与生产落地的全流程,从决策是否微调、优选LoRA技术方案,到代码实现、效果评估、推理加速与FastAPI服务封装,最终构建可迭代的生产级AI系统。强调“逐级升级”原则,倡导以数据闭环驱动优化,避免技术冲动。全系列贯穿工程化思维,提供可复用模板与实战建议,助力开发者从模型训练迈向稳定可用的AI服务部署。

信息安全领域优质创作者|操作系统领域专家 126

ARIA规范

ARIA用来补充原生HTML缺失的语义,原则:优先原生标签,ARIA仅做补充。 ARIA角色role:定义组件身份,分为地标角色、构件角色、文档角色;构件角色用于自定义弹窗、tab、下拉菜单等复杂组件; ARIA状态与属性:以aria-开头,描述组件实时状态;常用:aria-label、aria-labelledby、aria-describedby、aria-hidden、aria-expanded、aria-selected、aria-modal、aria-live; 常用场景:图标按钮用aria-l

2401_83227843的博客 471

LangGraph(03):状态归约、并行更新与消息管理

并行节点写入报错?历史消息无法清理?本文拆解 LangGraph 状态归约与消息增删改机制,带你精确控制复杂工作流状态。

专注于 Agent 工程、AI 产品、Harness Engineering、LLM 算法等方向,OpenMathModel、Nivik 等开源项目作者 142

LangGraph 的分离思想总结

LangGraph 的分离思想,本质上是对"高内聚、低耦合"这一经典工程原则在 LLM 应用领域的落地。它通过状态与逻辑分离、节点职责分离、控制流与执行分离、计算与持久化分离、编排与实现分离五个层面,把一个难以维护的"大黑盒"拆解成一组可组合、可测试、可观测的部件。理解这套分离思想,比记住 API 更重要——因为当你面对新的智能体场景时,真正指导你做出合理拆分的,正是这些分离原则。

张晨光老师的播客 413

Java基础:泛型、类型擦除与 PECS 原则

泛型允许类、接口和方法使用类型参数,把许多类型检查提前到编译期,减少显式类型转换,提高代码复用性。例如。

cjpabc的博客 464
上一篇: Huffman Tree压缩法
下一篇: Debug Tutorial Part 3: The Heap
iiprogram
博客等级 码龄25年 1068粉丝 1515原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值