LLDB 详解

iOS 调试技巧——LLDB 当我们的项目过大时,就会使我们项目的编译好使过长,如何在项目运行时进项代码调试,熟练使用LLDB就可以解决这个难题,大幅度提高我们的开发效率。 1、什么是 LLDB? LLDB是英文Low Lever Debug的缩写,是XCode内置的为我们开发者提供的调试工具,它与LLVM编译器一起,存在于主窗口底部的控制台中,能够带给我们更丰富的流程控制和数据检测的调试功能。 2、LLDB的简单使用 2.1... 阅读详情
AI摘要

本文详细介绍苹果开源的高性能源代码级调试器LLDB。涵盖其编译器集成优势、主要功能、命令格式等内容,并深入讲解变量操作、控制流程、断点及观察点设置等实用技巧。

LLDB 详解

LLDB,全称为Low-Level Debugger,是苹果公司开发的一款开源、高性能的源代码级调试器。作为Clang和LLVM项目的一部分,LLDB被设计为C、C++、Objective-C和Swift等编程语言的原生调试器。它提供了丰富的功能和灵活的接口,使得开发者能够有效地定位和修复代码中的错误。

编译器集成优势

LLDB将调试信息转换为Clang类型,以便利用Clang编译器基础设施。这允许LLDB在表达式中支持最新的C、C++、Objective-C语言功能和运行时,而无需重新实现任何此功能。它还利用编译器在使函数调用表达式、解码指令和提取指令详细信息等时处理所有ABI细节。

LLDB的主要优点有:

  1. C、C++、Objective-C的最新语言支持。
  2. 可以声明局部变量和类型的多行表达式。
  3. 当支持时,使用JIT作为表达式。
  4. 当无法使用JIT时,评估表达式中间表示(IR)。

LLDB 的主要功能

  • 断点设置:在特定的代码行或函数处设置断点,控制程序的执行流程。
  • 变量查看与修改:在运行时查看和修改变量的值,包括基本类型、结构体、类和数组等。
  • 内存查看:检查和修改内存内容,帮助理解程序的数据布局。
  • 线程和进程控制:管理线程和进程的执行状态,如暂停、继续、切换线程和终止进程。
  • 表达式计算:在调试环境中计算复杂的表达式,支持多种编程语言的语法。
  • 堆栈回溯:查看函数调用栈,追踪代码执行路径。
  • 插件支持:通过插件系统扩展LLDB的功能,以满足特定的调试需求。
  • 脚本编写:使用Python或Swift编写自定义调试脚本,自动化调试过程。

命令格式

<noun> <verb> [-option [option-value]] [argument [argument...]]
// [] 项为可选项
<命令> <子命令> [-选项 [选项值]] [参数 [参数值...]]

原始(raw)命令

LLDB支持不带命令选项(options)的原始(raw)命令,原始命令会将命令后面的所有东西当做参数(arguement)传递。不过很多原始命令也可以带命令选项,当你使用命令选项的时候,需要区分命令选项和参数。

常用的 expression 就是 raw 命令,一般情况下我们使用 expression 打印一个东西是这样的:

这里写图片描述

选项终止符: –

「选项」可以放在命令行的任何位置,但是如果参数以“-”开头,则必须通过添加选项终止符--来告诉 LLDB 你已经完成了当前命令的选项。

// 选项: -stop-at-entry, 参数:-program_arg
process launch --stop-at-entry -- -program_arg value

当我们想用 expression 打印一个对象的时候。需要使用 -O 命令选项,我们应该用 – 将命令选项和参数区分:

这里写图片描述

该命令可以简写为 po。

LLDB 中的变量

在 LLDB 中定义变量时,需要在变量前面添加$符号。定义好变量后就可以像平常一样使用变量,调用方法。方法调用时,LLDB 无法确定返回值的类型,需要自己指定。

// 定义变量array
(lldb) e NSArray *$array = @[@"I", @"love", @"LLDB"]
  
(lldb) po $array
<__NSArrayI 0x600000ffdb00>(
I,
love,
LLDB
)
  
// 调用方法
(lldb) po [$array count]
3
(lldb) po [[$array objectAtIndex:1] uppercaseString]
LOVE

(lldb) e int $b = 0
(lldb) po $b
0

// 不指定返回值
(lldb) po [[$array objectAtIndex:$b] characterAtIndex:0]
0x0000000000000049

// 指定返回值
(lldb) po (char)[[$array objectAtIndex:$b] characterAtIndex:0]
'I'

唯一匹配原则

LLDB的命令遵循唯一匹配原则:假如根据前n个字母已经能唯一匹配到某个命令,则只写前n个字母等效于写下完整的命令。利用该规则,可以简写一些命令。

help

好记性不如 help 命令。和平常的 pod --help ruby --help 不一样,LLDB help 本身是一个命令而不是一个选项,它可以告诉你关于某个命令(包括 help 命令)的一切信息。

(lldb) help
Debugger commands:
  apropos           -- List debugger commands related to a word or subject.
  breakpoint        -- Commands for operating on breakpoints (see 'help b' for
                       shorthand.)
  command           -- Commands for managing custom LLDB commands.
  disassemble       -- Disassemble specified instructions in the current
                       target.  Defaults to the current function for the
                       current thread and stack frame.
  dwim-print        -- Print a variable or expression.
  expression        -- Evaluate an expression on the current thread.  Displays
                       any returned value with LLDB's default formatting.
  frame             -- Commands for selecting and examing the current thread's
                       stack frames.
  gdb-remote        -- Connect to a process via remote GDB server.
                       If no host is specifed, localhost is assumed.
                       gdb-remote is an abbreviation for 'process connect
                       --plugin gdb-remote connect://<hostname>:<port>'
  gui               -- Switch into the curses based GUI mode.
  help              -- Show a list of all debugger commands, or give details
                       about a specific command.
  kdp-remote        -- Connect to a process via remote KDP server.
                       If no UDP port is specified, port 41139 is
                       assumed.
                       kdp-remote is an abbreviation for 'process connect
                       --plugin kdp-remote udp://<hostname>:<port>'
  language          -- Commands specific to a source language.
  log               -- Commands controlling LLDB internal logging.
  memory            -- Commands for operating on memory in the current target
                       process.
  platform          -- Commands to manage and create platforms.
  plugin            -- Commands for managing LLDB plugins.
  process           -- Commands for interacting with processes on the current
                       platform.
  quit              -- Quit the LLDB debugger.
  register          -- Commands to access registers for the current thread and
                       stack frame.
  script            -- Invoke the script interpreter with provided code and
                       display any results.  Start the interactive interpreter
                       if no code is supplied.
  session           -- Commands controlling LLDB session.
  settings          -- Commands for managing LLDB settings.
  source            -- Commands for examining source code described by debug
                       information for the current target process.
  statistics        -- Print statistics about a debugging session
  swift-healthcheck -- Provides logging related to the Swift expression
                       evaluator, including Swift compiler diagnostics. This
                       makes it easier to identify project misconfigurations
                       that result in module import failures in the debugger.
                       The command is meant to be run after a expression
                       evaluator failure has occurred.
  target            -- Commands for operating on debugger targets.
  thread            -- Commands for operating on one or more threads in the
                       current process.
  trace             -- Commands for loading and using processor trace
                       information.
  type              -- Commands for operating on the type system.
  version           -- Show the LLDB debugger version.
  watchpoint        -- Commands for operating on watchpoints.
Current command abbreviations (type 'help command alias' for more info):
  add-dsym  -- Add a debug symbol file to one of the target's current modules
               by specifying a path to a debug symbols file or by using the
               options to specify a module.
  attach    -- Attach to process by ID or name.
  b         -- Set a breakpoint using one of several shorthand formats.
  bt        -- Show the current thread's call stack.  Any numeric argument
               displays at most that many frames.  The argument 'all' displays
               all threads.
  c         -- Continue execution of all threads in the current process.
  call      -- Evaluate an expression on the current thread.  Displays any
               returned value with LLDB's default formatting.
  continue  -- Continue execution of all threads in the current process.
  detach    -- Detach from the current target process.
  di        -- Disassemble specified instructions in the current target. 
               Defaults to the current function for the current thread and
               stack frame.
  dis       -- Disassemble specified instructions in the current target. 
               Defaults to the current function for the current thread and
               stack frame.
  display   -- Evaluate an expression at every stop (see 'help target
               stop-hook'.)
  down      -- Select a newer stack frame.  Defaults to moving one frame, a
               numeric argument can specify an arbitrary number.
  env       -- Shorthand for viewing and setting environment variables.
  exit      -- Quit the LLDB debugger.
  f         -- Select the current stack frame by index from within the current
               thread (see 'thread backtrace'.)
  file      -- Create a target using the argument as the main executable.
  finish    -- Finish executing the current stack frame and stop after
               returning.  Defaults to current thread unless specified.
  history   -- Dump the history of commands in this session.
               Commands in the history list can be run again using "!<INDEX>". 
               "!-<OFFSET>" will re-run the command that is <OFFSET> commands
               from the end of the list (counting the current command).
  image     -- Commands for accessing information for one or more target
               modules.
  j         -- Set the program counter to a new address.
  jump      -- Set the program counter to a new address.
  kill      -- Terminate the current target process.
  l         -- List relevant source code using one of several shorthand formats.
  list      -- List relevant source code using one of several shorthand formats.
  n         -- Source level single step, stepping over calls.  Defaults to
               current thread unless specified.
  next      -- Source level single step, stepping over calls.  Defaults to
               current thread unless specified.
  nexti     -- Instruction level single step, stepping over calls.  Defaults to
               current thread unless specified.
  ni        -- Instruction level single step, stepping over calls.  Defaults to
               current thread unless specified.
  p         -- Print a variable or expression.
  parray    -- parray <COUNT> <EXPRESSION> -- lldb will evaluate EXPRESSION to
               get a typed-pointer-to-an-array in memory, and will display
               COUNT elements of that type from the array.
  po        -- Evaluate an expression on the current thread.  Displays any
               returned value with formatting controlled by the type's author.
  poarray   -- poarray <COUNT> <EXPRESSION> -- lldb will evaluate EXPRESSION to
               get the address of an array of COUNT objects in memory, and will
               call po on them.
  print     -- Print a variable or expression.
  q         -- Quit the LLDB debugger.
  r         -- Launch the executable in the debugger.
  rbreak    -- Sets a breakpoint or set of breakpoints in the executable.
  re        -- Commands to access registers for the current thread and stack
               frame.
  repl      -- Evaluate an expression on the current thread.  Displays any
               returned value with LLDB's default formatting.
  run       -- Launch the executable in the debugger.
  s         -- Source level single step, stepping into calls.  Defaults to
               current thread unless specified.
  shell     -- Run a shell command on the host.
  si        -- Instruction level single step, stepping into calls.  Defaults to
               current thread unless specified.
  sif       -- Step through the current block, stopping if you step directly
               into a function whose name matches the TargetFunctionName.
  step      -- Source level single step, stepping into calls.  Defaults to
               current thread unless specified.
  stepi     -- Instruction level single step, stepping into calls.  Defaults to
               current thread unless specified.
  t         -- Change the currently selected thread.
  tbreak    -- Set a one-shot breakpoint using one of several shorthand formats.
  undisplay -- Stop displaying expression at every stop (specified by stop-hook
               index.)
  up        -- Select an older stack frame.  Defaults to moving one frame, a
               numeric argument can specify an arbitrary number.
  v         -- Show variables for the current stack frame. Defaults to all
               arguments and local variables in scope. Names of argument,
               local, file static and file global variables can be specified.
  var       -- Show variables for the current stack frame. Defaults to all
               arguments and local variables in scope. Names of argument,
               local, file static and file global variables can be specified.
  vo        -- Show variables for the current stack frame. Defaults to all
               arguments and local variables in scope. Names of argument,
               local, file static and file global variables can be specified.
  x         -- Read from the memory of the current target process.
For more information on any command, type 'help <command-name>'.

expression

expression 命令的作用是执行一个表达式,并将表达式返回的结果输出。

  1. 执行某个表达式。 我们在代码运行过程中,可以通过执行某个表达式来动态改变程序运行的轨迹。 假如我们在运行过程中,突然想把 self.view 颜色改成红色,看看效果。我们不必写下代码,重新 run,只需暂停程序,用 expression 改变颜色,再刷新一下界面,就能看到效果。
(lldb) expression -- self.view.backgroundColor = [UIColor purpleColor];
(lldb) expression -- (void)[CAtransaction flush]
  1. 将返回值输出。 也就是说我们可以通过 expression 来打印东西。 假如我们想打印 self.view:
(lldb) expression -- self.view

print、call、po

一般情况下,我们直接用 expression 还是用得比较少的,更多时候我们用的是 print、call、po。这三个命令其实都是 expression 命令,执行某个表达式,并将执行的结果输出到控制台上。常用来动态调用方法,动态修改变量。

// 调用 description 进行打印
'call' is an abbreviation for 'expression --'
'print' is an abbreviation for 'expression --'

下面代码效果相同:

这里写图片描述

根据唯一匹配原则,如果你没有自己添加特殊的命令别名。e 也可以表示 expression 的意思,p 和 print 等价。

上面打印的都是指针,而不是对象本身。如果我们想打印对象,需要使用到命令选项:-O。为了更方便的使用,LLDB 为 expression -O 定义了一个别名:po。

// 调用 description 进行打印
'po' is an abbreviation for 'expression -O  --'

使用 po 指令动态修改变量:

// 背景颜色为 red
(lldb) po [self.view backgroundColor]
UIExtendedSRGBColorSpace 1 0 0 1
// 修改背景颜色为blue
(lldb) po [self.view setBackgroundColor:[UIColor blueColor]]
UICachedDeviceRGBColor
// 背景颜色发生改变
(lldb) po [self.view backgroundColor]
UIExtendedSRGBColorSpace 0 0 1 1
// 不用继续运行程序,马上进行渲染,模拟器/真机上也发生改变
(lldb) po [CATransaction flush]

控制流程:continue、next、step、finish

img

上图为 Xcode 里面的控制按键,其实都是与 LLDB 命令对应的,从左至右分别为:

  1. continue 按钮, 对应命令 process continue(简写 continue、c),会取消程序的暂停,允许程序正常执行。
  2. step over 按钮,对应命令 thread step-over(简写 next 、n),会以黑盒的方式执行一行代码。如果所在这行代码是一个函数调用,不会跳进这个函数,而是会执行这个函数,然后继续。
  3. step in 按钮,对应命令 thread step-in(简写 step、s),如果所在这行代码是一个函数调用,会跳进这个函数,可用来调试或检查函数调用。当前行不是函数调用时,next 和 step 效果是一样的。
  4. step out 按钮,对应命令 thread step-out(简写 finish )。如果你不小心跳进一个函数,但实际上你想跳过它,可以用该命令跳出函数。

register read / write

寄存器指令,用来查看或修改系统库函数调用参数和返回值,寄存器与 CPU 架构有关。

(lldb) register read
General Purpose Registers:
        x0 = 0x000000010140a590
        x1 = 0x000000016f0ef2b0
        x2 = 0x0000000000000001
        x3 = 0x000000016f0ef578
        x4 = 0x0000000000000010
        x5 = 0x0000000000000620
        x6 = 0x0000000280ecc620
        x7 = 0x0000000000000000
        x8 = 0x0000000100d29000  (void *)0x0000000800000003
        x9 = 0x0000000201644dc0  dyld`_main_thread
       x10 = 0x0000000000000002
       x11 = 0x0000000101414488
       x12 = 0x0000000000000002
       x13 = 0x0000000000000000
       x14 = 0x0000000249680000
       x15 = 0x00000001a954f065  UIKitCore`_OBJC_$_INSTANCE_METHODS_UIViewController(UIAlertControllerContentViewController|UIResponderChainTraversal|UIActionSheetPresentationControllerAccess|UIImagePickerControllerAdditions|PLImagePickerViewControllerInterface|ForHomeOnly|UIPopoverController_Internal|_UIMultiColumnViewController|_UIKitIsUIViewController|UIPerformsActions|UITabBarControllerItem|UISplitViewController|BinaryCompatibility|UINavigationControllerItemInternal|UINavigationControllerItem|UINavigationControllerContextualToolbar|UINavigationControllerContextToolbar_Internal|UIContainerViewControllerProtectedMethods|UIContainerViewControllerCallbacks|UIContainerViewControllerCallbacks_Internal|StateRestoration_Internal|StateRestoration|ActivityContinuationPrivate|ActivityContinuationInternal|ActivityContinuation|EmbeddedViewSupport|UIFirstResponderSupport|UICollectionViewControllerSupport|UIViewControllerTransitioning|AdaptiveSizing|AdaptiveSizing_Internal|UIViewControllerClassDumpWarning|UIKeyCommand|ForUISplitViewController|AccessibilityHUD|OrientationDebugging|NSExtensionAdditionsInternal|NSExtensionAdditions|_UIApplicationRotationFollowing|_UIAlwaysOnEnvironment|_UIFallbackEnvironment|UnwindSegueSupport|_UISheetPresentationController|ViewServices|ViewService_Internal|ViewService_StateRestoration) + 1965
       x16 = 0x00000001a8861570  UIKitCore`-[UIViewController viewDidLoad]
       x17 = 0x0000000100e1dd4c  libMainThreadChecker.dylib`__trampolines + 18880
       x18 = 0x0000000000000000
       x19 = 0x000000010140ada0
       x20 = 0x000000010140a590
       x21 = 0x00000002016bb000  UIKitCore`UIKeyboardCachedIsRightHandDrive
       x22 = 0x0000000000000000
       x23 = 0x0000000000000000
       x24 = 0x0000000000000018
       x25 = 0x0000000000000000
       x26 = 0x0000000000000000
       x27 = 0x0000000000000460
       x28 = 0x0000000201694000  UIKitCore`_MergedGlobals + 4
        fp = 0x000000016f0ef410
        lr = 0x0000000100d10644  Landmarks`-[ViewController viewDidLoad] + 100 at ViewController.m:20:5
        sp = 0x000000016f0eed10
        pc = 0x0000000100d10648  Landmarks`-[ViewController viewDidLoad] + 104 at ViewController.m:23:6
      cpsr = 0x60000000

thread backtrace

有时候我们想要了解线程堆栈信息,可以使用 thread backtrace(简写为 bt),它的作用是将线程的堆栈打印出来。

这里写图片描述

thread return

thread return 可以接受一个表达式,调用命令之后直接从当前的 frame 返回表达式的值。

这里写图片描述

效果相当于在断点位置直接调用 return NO;,不会执行断点后面的代码。

frame 相关命令

  • frame variable:打印出当前 frame 的所有变量。

  • frame info:查看当前 frame 的信息。

  • frame select:选择某个 frame。

breakpoint

调试过程中,我们用得最多的可能就是断点了。LLDB 中的断点命令也非常强大。

设置断点

breakpoint set 命令用于设置断点,LLDB 提供了很多种设置断点的方式。

使用 -n 根据方法名设置断点:

// 给所有类中的 viewWillAppear: 设置一个断点
(lldb) breakpoint set -n viewWillAppear:

设置好断点后,会为该断点生成一个编号(id),从 1 开始递增。

使用 -f 指定文件:

// 给所有类中的 viewWillAppear: 设置一个断点
(lldb) breakpoint set -f ViewController.m -n viewDidLoad

使用 -l 指定文件某一行设置断点:

// 给 ViewController.m 第 38 行设置断点
(lldb) breakpoint set -f ViewController.m -l 38

使用 -c 设置条件断点:

//  text: 方法接受一个 ret 的参数,我们想让 ret == YES 的时候程序中断
(lldb) breakpoint set -n text: -c ret == YES

使用 -o 设置单次断点:

// 如果刚刚那个断点我们只想让它中断一次
(lldb) breakpoint set -n text: -o

管理断点

  • breakpoint list:查看已经设置了哪些断点。
  • breakpoint disable x:使 id 为 x 的断点暂时失效。
  • breakpoint enable x:使 id 为 x 的断点生效。
  • breakpoint delete x:删除 d 为 x 的断点。

断点命令

breakpoint command add 命令就是给断点添加命令的命令。

假设我们需要在 ViewController 的 viewDidLoad 中查看 self.view 的值,我们首先给 -[ViewController viewDidLoad] 添加一个断点。添加成功之后,这个断点的 id 为 3,然后我们给它增加一个命令:po self.view:

这里写图片描述

-o 完整写法是 –one-liner,表示增加一条命令。添加完命令之后,每次程序执行到这个断点就可以自动打印出 self.view 的值了。

如果我们想增加多条命令,我们可以输入 breakpoint command add 3,对断点 3 增加命令,输入 DONE 表示结束:

这里写图片描述

如果想查看某个断点已有的命令,可以使用 breakpoint command list。

// 查看 id 为 3 的断点已有的命令
breakpoint command list 3

breakpoint command delete 可以让我们删除某个断点的命令:

// 删除 id 为 3 的断点的所有命令
breakpoint command delete 3

watchpoint

breakpoint 有一个孪生兄弟 watchpoint。如果说 breakpoint 是对方法生效的断点,watchpoint 就是对地址生效的断点。我们可以用 watchpoint 观察这个属性的地址。如果地址里面的东西改变了,就让程序中断。

和 breakpoint 一样,watchpoint 也有 id。失效、生效、删除的语法也和 breakpoint 一致。

watchpoint set 命令用于添加一个 watchpoint。只要这个地址中的内容变化了,程序就会中断。一般情况下,要观察变量或者属性,使用 watchpoint set variable 命令即可:

// 观察 self->_string
watchpoint set variable self->_string

watchpoint set variable 传入的是变量名。需要注意的是,这里不接受方法,所以不能使用watchpoint set variable self.string,因为 self.string 调用的是 _string 的取方法。

给 watchpoint 添加命令的方法,和 breakpoint 完全一致,这里就不赘述了。

【鸿蒙实战开发】—— LLDB高性能调试器 LLDB(Low Level Debugger)是新一代高性能调试器。详细说明参考 LLDB官方文档。当前HarmonyOS中的LLDB工具是在 llvm15.0.4 基础上适配演进出来的工具,是HUAWEI DevEco Studio工具中默认的调试器,支持调试C和C++应用。 阅读详情

相关推荐

OpenHarmony中的LLDB高性能调试器

LLDB(Low Lever Debugger)是新一代高性能调试器。详细说明参考 LLDB官方文档。当前OpenHarmony中的LLDB工具是在 llvm15.0.4 基础上适配演进出来的工具,是HUAWEI DevEco Studio工具中默认的调试器,支持调试C和C++应用。

1 1559

LLDB(一):入门指南

目录LLDB 简介LLDB 入门帮助命令与搜索命令:help 与 apropos基础命令总览 LLDB 简介 什么是 LLDB? LLDB(Low Level Debugger)是新一代高性能调试器,其是一组可重用组件的集合,这些组件大多是 LLVM 项目中的现有库,例如:Clang 表达式解析器,LLVM 反汇编程序,等等 LLDB 是 macOS 上 Xcode 中的默认调试器,Xcode 主窗口底部的控制台便是开发者与 LLDB 交互的区域。LLDB 允许开发者在程序运行的特定时刻暂停进程,查看变

Airths 的博客 1万+

LLDB调试技术详解:iOS开发必修课

LLDB是一个高性能的调试器,它是LLVM项目的一部分,支持多种编程语言,包括C、C++、Objective-C和Objective-C++。作为Xcode内置的调试器,LLDB被广泛应用于苹果生态系统下的iOS和macOS应用的开发和调试。除了苹果平台,LLDB还支持Linux、FreeBSD和Windows等操作系统,使其成为一个跨平台的调试工具。动态类型是指在程序运行时才能确定其具体类型的数据类型。

weixin_32324637的博客 808

LLDB:强大的源代码级调试工具

LLDB,全称为Low-Level Debugger,是苹果公司开发的一款开源、高性能的源代码级调试器。作为Clang和LLVM项目的一部分,LLDB被设计为C、C++、Objective-C和Swift等编程语言的原生调试器。它提供了丰富的功能和灵活的接口,使得开发者能够有效地定位和修复代码中的错误。

一起coding,一起嗨。 2899

Vim 入门到够用:Linux 文本编辑器的三种模式、常用操作与实战技巧

i 进入编辑模式Esc 退出编辑模式回到命令模式: 从命令模式进入底行模式编辑,不一定非得“打开就直接打字”。一旦你接受了“模式”这件事,后面很多操作都会顺起来。学 Vim,不要追求一次学全,先把“命令模式—编辑模式—底行模式”这条主线练熟。只要这条主线通了,后面的复制、删除、搜索、替换,都是顺手补上去的能力。

Web安全工具库 804

KUKA机器人编程实战:5分钟搞定组输入与组输出的信号配置(附代码示例)

本文详细介绍了KUKA机器人编程中组输入与组输出的信号配置方法,通过5分钟快速掌握核心技巧。文章包含信号声明语法、典型配置流程及高级应用技巧,并附有代码示例,帮助工程师高效实现机器人与外部设备的通信。

efc123456的博客 853

LLDB使用详解

https://blog.youkuaiyun.com/u012907783/article/details/53885818 LLDB的Xcode默认的调试器,它与LLVM编译器一起,带给我们更丰富的流程控制和数据检测的调试功能。平时用Xcode运行程序,实际走的都是LLDB。熟练使用LLDB,可以让你debug事半功倍 LLDB基础知识 LLDB控制台 Xcode中内嵌了LLDB控制台,在Xcod...

chenyijun的专栏 3063

免疫治疗新思路:用COMPASS算法挖掘单细胞数据中的代谢靶点(含差异分析技巧)

本文介绍了如何利用COMPASS算法从单细胞转录组数据中系统推断免疫细胞的代谢活性,为肿瘤免疫治疗提供新的靶点发现思路。文章详细阐述了COMPASS结合流平衡分析的核心原理,并提供了从差异分析到可成药性评估的完整转化路径,旨在帮助研究者精准定位代谢弱点,开发新型免疫代谢疗法。

weixin_29275257的博客 368

LLDB 命令详解

LLDB 命令详解 1.常用的LLDB指令 [,subcommand> […]] [-options [option-value]] [argument[argument…]] < command > : 命令 < subcommand > : 子命令 < action > : 命令操作 < options > : 命令参数 比如给 test 函数设置断点 breakpoint set -n test breakpo

Rio的博客 1241

基于dify平台批量分析excel格式信息

如何以表格形式批量输入一些信息,然后让大模型以对话应用形式逐条进行推理分析?请逐行分析以下数据,给出推理结果:{{input}}这里提供一个分步解决方案,结合。

knightissocool的博客 8014

FPGA面试题目笔记(一)——FPGA开发流程、亚稳态和竞争冒险、建立保持时间、异步FIFO深度等

同步异步电路、同步异步复位、时钟偏移和抖动、最小工作周期计算、触发器锁存器

H19981118的博客 1万+

LLDB详解

LLDB的Xcode默认的调试器,它与LLVM编译器一起,带给我们更丰富的流程控制和数据检测的调试功能。平时用Xcode运行程序,实际走的都是LLDB。熟练使用LLDB,可以让你debug事半功倍 LLDB基础知识 LLDB控制台 Xcode中内嵌了LLDB控制台,在Xcode中代码的下方,我们可以看到LLDB控制台。 LLDB控制台平时会输出一些log信息。如果我们想输入命令调试,必...

weixin_33690963的博客 113

手把手教你学 Simulink (1.3):探索Simulink模块库的奇妙世界

Simulink模块库按照功能分为多个类别,每个类别包含专门用于特定任务的模块。% 打开Simulink库浏览器% 或者以编程方式获取库列表disp('可用的库列表:');end常用模块(Simulink):最基础和最常用的模块信号处理模块(DSP System Toolbox):专业信号处理工具通信模块(Communications Toolbox):通信系统设计控制系统模块(Control System Toolbox):控制系统设计与分析% 创建自定义模块库。

QQ_778132974的博客 386

lldb命令详解

前言 新博客 Xcode_Debug lldb命令的格式如下 : <noun> <verb> [-options [option-value]] [argument [argument..]] 断点管理 简单地通过文件和行号进行断点 : breakpoint set --file foo.c --line 12 ...

weixin_34227447的博客 309

Python爬虫实战:公共资源交易平台招标数据采集实战 - 从零构建企业情报系统(附CSV导出 + SQLite持久化存储)!

我长期专注 Python 爬虫工程化实战,主理专栏 👉 《Python爬虫实战》:从采集策略到反爬对抗,从数据清洗到分布式调度,持续输出可复用的方法论与可落地案例。内容主打一个“能跑、能用、能扩展”,让数据价值真正做到——抓得到、洗得净、用得上。

喵手的博客 1288

Go语言全面解析:从入门到精通

Go语言是由Google开发的一种静态类型、编译型编程语言,具有简洁、高效、安全的特点。它特别适合高并发服务、云原生应用和网络编程等场景。Go采用Goroutine和Channel实现轻量级并发,性能接近C/C++。与其他语言相比,Go语法更简洁但类型更严格,编译速度快且跨平台支持好。虽然Go支持多种设计模式和编程范式,但其面向对象实现方式与传统语言不同。标准库丰富且拥有Gin、GORM等企业级框架。核心语法包括包管理、变量声明、函数定义、流程控制等,适合构建高性能后端服务和系统工具。

博哥哥的博客 4927

LLDB使用详解以及断点调试教程

LLDB是一款Xcode自带的断点调试器,绑定在Xcode底部控制台中,iOS开发的同学平时断点调试肯定对下图不会陌生 调试命令 在这里我们会经常使用po, bt这样的命令来协助调试,今天我们来详细讲述一下LLDB的各种命令 help help是最简单的命令,它会列出所有的命令以及对应的描述.如果你忘记了某个命令是做什么的,你可以使用help <command>来查看具体的细节,例如...

weixin_33835103的博客 2251

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

LLDB(三):通用参数类型详解

目录本文所使用的 LLDB 版本addressaddress-expressionalias-namearchboolbooleanbreakpoint-idbreakpoint-id-listbreakpoint-namebreakpoint-name-listbreakpt-idbreakpt-id-listbyte-sizeclass-namecmd-namecmd-optionscolumncommandcommand-optionsconnect-urlcountdescription-verbo

Airths 的博客 1573

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

LLDB(二):基础命令详解

目录本文所使用的 LLDB 版本_regexp-attach_regexp-break_regexp-bt_regexp-display_regexp-down_regexp-env_regexp-jump_regexp-list_regexp-tbreak_regexp-undisplay_regexp-upaproposbreakpointbreakpoint clearbreakpoint commandbreakpoint command addbreakpoint command deletebr

Airths 的博客 3615

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

LLDB命令详解(自用备忘)

一、命令行构造 1. 基础用法 <noun> <verb> [-options [option-value]] [argument [argument...]] 2. 在某一行打下断点: (lldb) breakpoint set --file foo.c --line 12 (lldb) breakpoint set -f foo.c

liangxiansong的博客 576

LLDB调试工具安全实践:keychain和iap命令的数据保护机制详解

在iOS应用开发和逆向工程领域,LLDB调试工具是开发者不可或缺的利器。本文将深入探讨LLDB调试工具集合中的**keychain**和**iap**命令,这两个命令在数据安全保护方面发挥着重要作用。通过了解这些命令的工作原理和安全机制,开发者可以更好地保护敏感数据,同时进行有效的调试工作。 ## 🔐 什么是LLDB调试工具? LLDB是苹果官方提供的调试器,广泛应用于iOS和macOS开发

gitblog_00049的博客 756

LLDB-QuickLook高级用法:自定义数据提供者协议详解

LLDB-QuickLook 是一款强大的调试工具,它允许开发者在调试过程中使用 macOS 的 Quick Look 功能来可视化任何对象。这款调试工具的核心功能是通过自定义数据提供者协议来扩展调试能力,让开发者能够以更直观的方式查看调试信息。无论你是 iOS 还是 macOS 开发者,掌握 LLDB-QuickLook 的自定义数据提供者协议都将极大提升你的调试效率!🚀 ## 什么是 LL

gitblog_00989的博客 1057

HelloSilicon 第三章工具链详解:LLDB 调试器 vs GDB 的完整对比

HelloSilicon 是专为 Apple Silicon Mac 设计的 ARM64 汇编入门项目,通过丰富的实例帮助开发者掌握底层编程技术。第三章重点介绍了工具链的使用,其中调试器的选择对开发效率至关重要。本文将深入对比 LLDB 与 GDB 两款调试工具,助你快速掌握 ARM64 汇编调试技巧。 ## 🧰 调试器基础:LLDB 与 GDB 的核心差异 在 ARM64 汇编开发中,调试

gitblog_00378的博客 826

swift详解之二十九------谈谈debug的一些高级用法lldb

swift详解之二十九——谈谈debug的一些高级用法lldb在软件编程中,debug是一项必须掌握的技术。怎么去打一个断点,怎么单步调试怎么step into 一个方法就不再赘述 主要来看看一些lldb常用的命令 po(print object)是LLDB的一个命令,其主要功能是输出objective-c中对象(objects)的信息p(print)其主要功能是输出原生类型(boolean、int

1384
上一篇: 关于 Please delete apps signed with your free account from this device to remain under the limit 的解决方法
下一篇: dispatch_once 详解
UestcXiye
博客等级 码龄8年 9033粉丝 1306原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

UestcXiye

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值