LLDB 常用命令

2023-11-17

LLDB 小结

简介

LLDB 是新一代高性能调试器,其是一组可重用组件的集合,这些组件大多是 LLVM 工程中的类库,如 Clang 表达式解析器或 LLVM 反汇编程序等。LLDB 是 Xcode 中默认的调试器,并且支持调试 C/C++ 程序,详情参考官方文档

LLDB 命令

LLDB 的命令格式不同于 GDB 的命令格式的随意,而是统一为如下格式:

<命令名称> <命令动作> [-可选项 [可选项的值]] [参数1 [参数2···]]

需要注意的是,不管是命令名称、命令动作、可选项还是参数,它们都是由空格分隔的,所以如果,参数本身包含由空格符号,那么,使用双引号来包裹参数,如果,参数中包含有反斜杠或双引号,那么使用反斜杠对它们进行转义。

多个可选项在命令行中的顺序并不是固定的,但是如果可选项后的参数是以 - 开始的,那么需要使用 -- 标记可选项的结束,如下面的命令:

(lldb) process launch --stop-at-entry -- -program_arg_1 value -program_arg_2 value

//可选项顺序可以不固定
(lldb) breakpoint set -l 34 -f UIView+Theme.m
(lldb) breakpoint set -f UIView+Theme.m -l 35

开启调试

打开命令行,使用如下命令:

Martin-mini:Applications hanxuejian$ lldb zoom.us.app/
(lldb) target create "zoom.us.app/"
Current executable set to 'zoom.us.app/' (i386).

或者

Martin-mini:Applications hanxuejian$ lldb
(lldb) file zoom.us.app/
Current executable set to 'zoom.us.app/' (i386).
(lldb) quit
Martin-mini:Applications hanxuejian$ 

或者使用 Xcode 进入调试模式。

结束调试

(lldb) quit

设置命令别名

对于常用的命令,可以设置别名,使其简单化,如:

(lldb) breakpoint set --file foo.c --line 12

(lldb) command alias bfl breakpoint set -f %1 -l %2 
(lldb) bfl foo.c 12

取消命令的别名

(lldb) command unalias b
(lldb) command alias b breakpoint

设置断点

  1. 指定文件及代码行

    (lldb) breakpoint set --file foo.c --line 12 
    (lldb) breakpoint set -f foo.c -l 12
  2. 指定函数名称

    (lldb) breakpoint set --name foo 
    (lldb) breakpoint set -n foo
    (lldb) breakpoint set --name foo --name bar
  3. 指定方法名称

    (lldb) breakpoint set --method foo 
    (lldb) breakpoint set -M foo
  4. 指定 OC 选择器

    (lldb) breakpoint set --selector alignLeftEdges: 
    (lldb) breakpoint set -S alignLeftEdges:
  5. 指定映像文件

    (lldb) breakpoint set --shlib foo.dylib --name foo 
    (lldb) breakpoint set -s foo.dylib -n foo
    
    //--shlib 可以重复使用
    (lldb) breakpoint set --shlib foo.dylib --name foo --shlib foo1.dylib --name foo1

编辑断点

  1. 查看设置的断点

    (lldb) breakpoint list

    如下面的例子:

    (lldb) breakpoint set -M load
    Breakpoint 12: 25 locations.
    (lldb) breakpoint list
    Current breakpoints:
    12: name = 'load', locations = 25, resolved = 25, hit count = 0
      12.1: where = MobileCoreServices`_LSPreferences::load(), address = 0x00000001072bc684, resolved, hit count = 0 
      12.2: where = libicucore.A.dylib`icu::CollationRoot::load(UErrorCode&), address = 0x00000001074eef18, resolved, hit count = 0 
      12.3: where = libicucore.A.dylib`icu::VTimeZone::load(icu::VTZReader&, UErrorCode&), address = 0x00000001075c2b34, resolved, hit count = 0 
      12.4: where = WebCore`WebCore::CachedFont::load(WebCore::CachedResourceLoader&, WebCore::ResourceLoaderOptions const&), address = 0x000000010aa16a20, resolved, hit count = 0 
      12.5: where = WebCore`WebCore::CachedImage::load(WebCore::CachedResourceLoader&, WebCore::ResourceLoaderOptions const&), address = 0x000000010aa18170, resolved, hit count = 0 
      12.6: where = WebCore`WebCore::CachedResource::load(WebCore::CachedResourceLoader&, WebCore::ResourceLoaderOptions const&), address = 0x000000010aa1dc40, resolved, hit count = 0 
      12.7: where = WebCore`WebCore::CachedSVGDocumentReference::load(WebCore::CachedResourceLoader&, WebCore::ResourceLoaderOptions const&), address = 0x000000010aa2ad20, resolved, hit count = 0 
      12.8: where = WebCore`WebCore::CSSFontFace::load(), address = 0x000000010aafab20, resolved, hit count = 0 
      12.9: where = WebCore`WebCore::CSSFontFaceSource::load(WebCore::CSSFontSelector&), address = 0x000000010ab028a0, resolved, hit count = 0 
      12.10: where = WebCore`WebCore::FontFace::load(), address = 0x000000010ad5a2a0, resolved, hit count = 0 
      12.11: where = WebCore`WebCore::FontFaceSet::load(WTF::String const&, WTF::String const&, WebCore::DOMPromise<WTF::Vector<WTF::RefPtr<WebCore::FontFace>, 0ul, WTF::CrashOnOverflow, 16ul> >&&), address = 0x000000010ad5ad60, resolved, hit count = 0 
      12.12: where = WebCore`WebCore::FrameLoader::load(WebCore::DocumentLoader*), address = 0x000000010ad9fc70, resolved, hit count = 0 
      12.13: where = WebCore`WebCore::HRTFDatabaseLoader::load(), address = 0x000000010ae22e20, resolved, hit count = 0 
      12.14: where = WebCore`WebCore::HTMLMediaElement::load(), address = 0x000000010ae7e7f0, resolved, hit count = 0 
      12.15: where = WebCore`WebCore::JSFontFace::load(JSC::ExecState&), address = 0x000000010b1017f0, resolved, hit count = 0 
      12.16: where = WebCore`WebCore::MediaPlayer::load(WebCore::URL const&, WebCore::ContentType const&, WTF::String const&), address = 0x000000010b3d3ad0, resolved, hit count = 0 
      12.17: where = WebCore`WebCore::NullMediaPlayerPrivate::load(WTF::String const&), address = 0x000000010b3d6820, resolved, hit count = 0 
      12.18: where = WebCore`WebCore::MediaPlayerPrivateAVFoundation::load(WTF::String const&), address = 0x000000010b3d7880, resolved, hit count = 0 
      12.19: where = WebCore`WebCore::TextTrackLoader::load(WebCore::URL const&, WTF::String const&, bool), address = 0x000000010b8d89d0, resolved, hit count = 0 
      12.20: where = WebCore`WebCore::FrameLoader::load(WebCore::FrameLoadRequest const&), address = 0x000000010ada2570, resolved, hit count = 0 
      12.21: where = NLP`NL::SpotlightQueryConverter::load(NLSearchAppContext), address = 0x000000010fc3a4ca, resolved, hit count = 0 
      12.22: where = NLP`NL::SearchDateDisplayFormatter::load(), address = 0x000000010fc7c354, resolved, hit count = 0 
      12.23: where = libmarisa.dylib`marisa::Trie::load(char const*), address = 0x000000010fda4618, resolved, hit count = 0 
      12.24: where = JavaScriptCore`JSC::DFG::ByteCodeParser::load(unsigned int, unsigned int, JSC::DFG::GetByOffsetMethod const&, JSC::DFG::NodeType), address = 0x0000000110184900, resolved, hit count = 0 
      12.25: where = JavaScriptCore`JSC::DFG::ByteCodeParser::load(unsigned int, JSC::ObjectPropertyConditionSet const&, JSC::DFG::NodeType), address = 0x0000000110184ad0, resolved, hit count = 0 
    
    (lldb)

    在使用命令设置断点时,符合条件的断点可能不止一个,并且,如果新加载文件后,符合条件的断点可能还会增加。当然,设置不存在的断点,断点信息也可以查看得到,但是其 locations 为 0 。

    (lldb) breakpoint set --file test.m --line 100
    Breakpoint 13: no locations (pending).
    WARNING:  Unable to resolve breakpoint to any actual locations.
    (lldb) breakpoint list
    Current breakpoints:
    13: file = 'test.m', line = 100, exact_match = 0, locations = 0 (pending)
  2. 将断点置为不可用

    (lldb) breakpoint disable 1
    1 breakpoints disabled.
  3. 将断点置为可用

    (lldb) breakpoint enable 1
    1 breakpoints enabled.
  4. 删除断点

    (lldb) breakpoint delete 1
    1 breakpoints deleted; 0 breakpoint locations disabled.
  5. 为断点添加命令或脚本

    (lldb) breakpoint command add
    Enter your debugger command(s).  Type 'DONE' to end.
    > bt
    > DONE
    (lldb) breakpoint command list 2
    Breakpoint 2:
        Breakpoint commands:
          bt
    (lldb) 

    从下面的错误命令可知断点所支持的语言:

    (lldb) breakpoint command add -s OC
    error: invalid enumeration value, valid values are: "command", "python", "default-script"

观察变量

  1. 设置观察变量

    (lldb) watchpoint set variable backgroundColor
    Watchpoint created: Watchpoint 2: addr = 0x7fff52dcdb38 size = 8 state = enabled type = w
        declare @ '/Users/hanxuejian/Downloads/ThemeChange-master/TestTheme/TestTheme/UIView+Theme.m:31'
        watchpoint spec = 'backgroundColor'
        new value: 0x000061000007e780
  2. 查看观察变量

    (lldb) watchpoint list
    Number of supported hardware watchpoints: 4
    Current watchpoints:
    Watchpoint 1: addr = 0x7fff52dcd6d8 size = 8 state = disabled type = w
        declare @ '/Users/hanxuejian/Downloads/ThemeChange-master/TestTheme/TestTheme/UIView+Theme.m:31'
        watchpoint spec = 'backgroundColor'
        old value: 0xffff8067ddcff720
        new value: 0xffff8067ddcff720
    Watchpoint 2: addr = 0x7fff52dcdb38 size = 8 state = enabled type = w
        declare @ '/Users/hanxuejian/Downloads/ThemeChange-master/TestTheme/TestTheme/UIView+Theme.m:31'
        watchpoint spec = 'backgroundColor'
        new value: 0x000061000007e780
  3. 设置查看条件

    (lldb) watchpoint set variable num
    Watchpoint created: Watchpoint 1: addr = 0x10f932558 size = 4 state = enabled type = w
        declare @ '/Users/hanxuejian/Downloads/ThemeChange-master/TestTheme/TestTheme/UIView+Theme.m:31'
        watchpoint spec = 'num'
        new value: 16
    
    //添加条件
    (lldb) watchpoint modify -c "(num == 25)"
    (lldb) watchpoint list
    Number of supported hardware watchpoints: 4
    Current watchpoints:
    Watchpoint 1: addr = 0x10f932558 size = 4 state = enabled type = w
        declare @ '/Users/hanxuejian/Downloads/ThemeChange-master/TestTheme/TestTheme/UIView+Theme.m:31'
        watchpoint spec = 'num'
        old value: 20
        new value: 21
        condition = '(num == 25)'
    
    //条件达成
    2018-03-21 19:11:44.302 TestTheme[6938:828079] XPC connection interrupted
    
    Watchpoint 1 hit:
    old value: 21
    new value: 25

开始程序

使用 LLDB 调试程序,可以直接加载可执行程序,或者绑定已经在执行的程序,而后开始进行调试。

如下面的例子,先创建一个简单 C 程序。

#include <stdio.h>
int main(int argc, char const *argv[])
{ 
    int i = 1;
    while(true) {
        char *c = "this is a test";
        printf("%s %i\n", c,i++);   
    }
    return 0;
}

编辑后,保存为 test.cpp 文件,然后在命令行中执行下面的命令:

gcc test.cpp -o test

得到可执行文件,而后执行下面的命令。

(lldb) target create test
Current executable set to 'test' (x86_64).
(lldb) process launch test
Process 7169 launched: '/Users/hanxuejian/Desktop/Temp/test' (x86_64)
this is a test 1
this is a test 2
this is a test 3
this is a test 4

当然,也可以先运行 test 可执行文件,而后使用下面的命令进行调试绑定。

(lldb) process attach --pid 7232 
(lldb) process attach --name test 
(lldb) process attach --name test --waitfor

但是要注意的是,如果存在两个名称相同的进程,那么绑定是无法成功的。

线程控制

在加载进程开始调试后,当执行到设置断点时,可以使用 thread 命令控制代码的执行。

  1. 线程继续执行

    (lldb) thread continue 
    Resuming thread 0x2c03 in process 46915 
    Resuming process 46915 
    (lldb)
  2. 线程进入、单步执行或跳出

    (lldb) thread step-in    
    (lldb) thread step-over  
    (lldb) thread step-out
  3. 单步指令的执行

    (lldb) thread step-inst  
    (lldb) thread step-over-ins
  4. 执行指定代码行数直到退出当前帧

    (lldb) thread until 100
  5. 查看线程列表,第一个线程为当前执行线程

    (lldb) thread list
    Process 46915 state is Stopped
    * thread #1: tid = 0x2c03, 0x00007fff85cac76a, where = libSystem.B.dylib`__getdirentries64 + 10, stop reason = signal = SIGSTOP, queue = com.apple.main-thread
      thread #2: tid = 0x2e03, 0x0000
  6. 查看当前线程栈

    (lldb) thread backtrace
    thread #1: tid = 0x2c03, stop reason = breakpoint 1.1, queue = com.apple.main-thread
     frame #0: 0x0000000100010d5b, where = Sketch`-[SKTGraphicView alignLeftEdges:] + 33 at /Projects/Sketch/SKTGraphicView.m:1405
     frame #1: 0x00007fff8602d152, where = AppKit`-[NSApplication sendAction:to:from:] + 95
     frame #2: 0
    
    //查看所有线程的调用栈
    (lldb) thread backtrace all
  7. 设置当前线程

    (lldb) thread select 2

帧状态

查看当前线程中当前帧(或者说方法/函数)中的变量/参数,可以使用 frame 命令。

  1. 查看本地变量及参数

    (lldb) frame variable 
    (ViewController *) self = 0x00007f8289d08b50
    (SEL) _cmd = "testCoreGraphics"
    (TestView *) view = 0x00007f828c102760
    
    //指定要查看的变量
    ((lldb) frame variable self->isa
    (Class) self->isa = ViewController
  2. 打印对象

    (lldb) frame variable -o self
    (ViewController *) self = 0x00007f8289d08b50 <ViewController: 0x7f8289d08b50>
  3. 选择栈中的方法

    (lldb) frame select 2
    frame #2: 0x000000010ca7446c UIKit`-[UIViewController loadViewIfRequired] + 1235
    UIKit`-[UIViewController loadViewIfRequired]:
        0x10ca7446c <+1235>: movl   (%r14), %eax
        0x10ca7446f <+1238>: testl  %eax, %eax
        0x10ca74471 <+1240>: je     0x10ca7447f               ; <+1254>
        0x10ca74473 <+1242>: cmpl   $0x70000, %eax            ; imm = 0x70000 
    (lldb) 

修改变量或调用函数

使用 expression 命令可以在调试过程中修改变量的值,或者执行函数。

  1. 修改变量值

    (lldb) expression a
    (int) $0 = 9
    (lldb) frame variable a
    (int) a = 9
    (lldb) expression a=10
    (int) $1 = 10
    (lldb) frame variable a
    (int) a = 10
    (lldb) 
  2. 调用函数

    (lldb) expression printf("execute function %i",a)
    (int) $2 = 19
    execute function 10

    对于执行结果都会自动保存,以备他用。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

LLDB 常用命令 的相关文章

  • LLDB 常用命令

    LLDB 小结 简介 LLDB 是新一代高性能调试器 其是一组可重用组件的集合 这些组件大多是 LLVM 工程中的类库 如 Clang 表达式解析器或 LLVM 反汇编程序等 LLDB 是 Xcode 中默认的调试器 并且支持调试 C C
  • 无法在控制台(调试区域)使用 po 命令

    突然我开始随机收到此消息 但非常频繁 表达式产生错误 警告 var folders 53 0z4yfqt16tvbcn0z7f2385n80000gn T expr3 d271e2 swift 3 9 警告 变量 lldb error re
  • LLDB po 抱怨错误:表达式解析失败:错误:无法实现自我类型

    这是一个使用 cocoapods 的 iOS 应用程序 Xcode 14 和 Xcode 13 4 1 行为相同 我正在使用静态库 使用 Xcode 14 新的 lldb cmdswift healthcheck print SwiftAS
  • 如何更改 Xcode 调试窗口中浮点数和双精度数的显示格式?

    我在 Xcode 中调试 C 并在函数中设置断点来检查各种双精度值 Xcode 坚持使用科学计数法来显示它们 这确实很痛苦 我需要查看十进制表示形式 右键单击 查看值 菜单选项Decimal 做一些奇怪的事情 任何人都知道如何让它在我想看到
  • 当我运行程序时,LLDB 产生“数据包返回错误 8”

    我一直在尝试使用 LLDB 查找程序中分段错误的位置 我一直在使用 Ubuntu shellrepl it并使用编译我的代码clang 7 pthread std c 17 o main main cpp g并且程序编译成功 接下来 我跑l
  • 错误:在“UIView *”类型的对象上找不到属性“frame”

    我正在调试我的代码并尝试使用以下方法计算视图的大小 p view frame size height 但我收到此错误 错误 在 UIView 类型的对象上找不到属性 frame 错误 1 解析表达式时出错 你们中的任何人都知道为什么或者如何
  • 在 LLDB 中保存断点

    如何在 lldb 中保存断点 这是 gdb 具有的功能 我怀疑 lldb 也具有它 但我无法在帮助中找到它 这是如何在 gdb 中完成的 让 gdb 保存断点列表 https stackoverflow com questions 5014
  • 有没有办法对所有按钮 touchUpInside 方法断点?

    有时 当您的项目包含非常不受托管的代码时 就会发生这种情况 因此您无法弄清楚如何解决一个简单的问题 在大多数情况下 调试器可以帮助我们到达根源 我只是想知道 xcode 调试器有多强大 当我使用像 OllyDbg 这样的 asm 调试器时
  • Qt 调试器在 Mac 上运行时卡住

    我昨天更新了 Xcode 现在我无法在 Qt 中调试代码 因为它总是卡在 运行 状态 我在 Mac OS X 10 10 5 和 Xcode 7 0 上使用 LLDB None
  • 使用特定队列调用dispatch_async时的符号断点

    我正在调试项目中涉及中央调度的问题 在调试过程中 如果有一种在工作被分派到特定队列时收到通知的方法 将会非常有帮助 有没有办法设置符号断点dispatch async有一个条件可以检查调度队列参数是否与我有权访问的其他队列相同 以下是设置条
  • 如何获取 LLDB 中所有线程的回溯?

    LLDB 相当于什么thread apply all bt in GDB LLDB对应的命令很简单bt all See https lldb llvm org use map html examining thread state http
  • 如何从 lldb 执行一个块(由指针标识)

    我在 iOS 模拟器的 lldb 调试器中 并且有一个块的地址 我想尝试执行它 我尝试了想到的第一件事 见下文 但它不起作用 有没有办法做到这一点 lldb po 0x2c7140 int 2 2912576 lt NSGlobalBloc
  • 在 Cocoa 程序中访问 Swift REPL

    我可以将 LLDB 附加到用 Swift 编写的程序并访问 REPL 无论是从 Xcode 内还是通过运行 lldb n ProcessName lldb repl 1 gt 但是 如果我将 LLDB 附加到没有 Swift 运行时的进程
  • iOS 模拟器应用程序的终端命令行调试?

    是否可以在 Mac OS X 下的终端命令行中使用 GDB 或 LLDB 来调试在 iOS 模拟器上运行的应用程序 例如 不是从 Xcode 的 GUI 或控制台内部 而是使用外部命令行或进程 如果是这样 怎么办 您需要在模拟器的 Spri
  • 当调试器设置为 LLDB 时,Xcode 4 挂起附加到(应用程序名称)

    当我在模拟器中运行应用程序时 Xcode 挂在 附加到 应用程序名称 上 但这仅在调试器设置为 LLDB 时发生 当调试器设置为 GDB 时 应用程序运行良好 产品 gt 编辑方案 gt 运行 gt 调试器 如何修复此问题以使用 LLDB
  • 当多个 Rust 源文件共享相同名称时,我可以设置 LLDB 断点吗?

    背景 在 Rust 中 您通常有多个名为mod rs 例如 app name src main rs foo mod rs bar mod rs Problem 我找不到区分的方法mod rs设置 LLDB 断点时来自另一个 cargo b
  • -[NSRangeException raise] 上的符号异常断点

    在 Xcode 中添加符号断点为您提供了一个示例模板 NSException raise 我想做同样的事情但是具体来说 on NSRangeException raise 原因是我想断点only关于特定数组边界异常 例如 Terminati
  • LLVM环境变量在哪里或者LLVM环境是如何配置的?

    作为上下文 我有一台 Mac 我在工作中使用它使用各种自定义构建脚本进行开发 我现在尝试使用同一台机器来玩一些个人 Xcode 项目 第一步 我在 Xcode 11 3 1 中创建一个新的 Single View App 项目 并尝试在我连
  • 如何修复 lldb 在运行调用后立即停止的问题?

    我在 Mojave 上使用 lldb 和 Xcode 10 2 1 一旦命令 运行 到 lldb 就会发生这种情况 lldb target create
  • LLDB 在地址处中断

    我为这个可能微不足道的问题表示歉意 但我遇到了麻烦 因为谷歌一遍又一遍地给我相同的不适用的答案 我正在尝试在 LLDB 中设置断点 阅读文档后 我可以选择停止在源代码中的某一行或某个符号上 我想要做的是在某个内存位置设置断点 也不读取或写入

随机推荐

  • 前端实战:小实例5——锚点导航

    前言 锚点定位用于网站某一模块的定位 让用户能够通过锚点直接跳到相应模块 从而实现页面内跳转 常在网页内容较长时使用 多个锚点显示可用一个无序列表显示 利用 ul 和 li 标签 在 li 标签中使用 a 标签实现锚点 对应标签用法可查看
  • Spring Boot + Elasticsearch实现大批量数据集下中文的精确匹配-案例剖析

    缘由 数据存储在MYSQ库中 数据基本维持不变 但数据量又较大 几千万 放在MYSQL中查询效率上较慢 寻求一种简单有效的方式提高查询效率 MYSQL并不擅长大规模数据量下的数据查询 技术方案 考虑后期同样会使用到es 此次直接结合spri
  • Python-修改excel的某一列

    import xlrd 导入模块 from xlutils copy import copy 导入copy模块 rb xlrd open workbook 111 xls formatting info True 打开weng xls文件
  • matlab 点云随机采样到固定点数

    目录 一 采样滤波 1 算法概述 二 代码示例 三 结果展示 一 采样滤波 1 算法概述 给定固定采样点的个数 将点云下采样至给定的点数 二 代码示例 clc clear
  • ElasticSearch6.x 之字段类型

    本文转载至 https blog csdn net chengyuqiang article details 79048800 字段类型概述 字符串类型 1 string string类型在ElasticSearch 旧版本中使用较多 从E
  • 大数据跟区块链之间相互促进关系体现在哪?

    大数据 人工智能和区块链这几个词都是当下非常流行的科技名词 他们不仅拥有各自的特点 还能互相利用跟相互促进 大数据跟人工智能的结合会有什么样的好处 大数据和区块链的结合又能带来什么 今天本文就来跟大家聊聊大数据跟区块链这方面的知识 以供大家
  • HTTP服务器

    HTTP服务器 一 HTTP服务器概述 1 HTTP服务器分类 1 1 JBOSS服务器 1 2 Glassfish服务器 1 3 Weblogic服务器 1 4 Websphere服务器 1 5 Tomcat服务器 1 5 1 Tomca
  • 安装命令 - install

    说明 Linux C C 项目构建过程 有个必要的步骤 install 在Makefile中时常会有一个专门的recipe来做这件事 安装流程需要做以下类型事情 文件的拷贝 最基本 目录结构的创建 程序的strip 文件的属性 权限 owe
  • 将GB2312编码的字符串转换为ISO-8859-1编码的字符串

    例如 String s1 你好 String s2 new String s1 getBytes GB2312 ISO 8859 1
  • PyTorch确保每次复现结果一样

    在代码最前面加入已下代码 torch manual seed seed torch cuda manual seed seed torch cuda manual seed all seed if you are using multi G
  • JAVA中的深情哥-Exception(异常)-上

    文章目录 目录 文章目录 前言 一 Exception的起源 二 异常类 三 自定义异常 总结 前言 大家好 我是最爱吃兽奶 今天给大家介绍一下java中的深情哥 Exception 秋风依依秋水寒 一点离愁两黯然 今生默默唯轻舞 为卿踏破
  • es6查根据对象的某个字段查找到值

    前言 es6查根据对象的某个字段查找到值 实现效果 var 新数组 旧数组 filter item gt item value 0 var arr value 0 label 建筑企业资质 value 1 label 承装 修 试 valu
  • KindEditor在php环境下上传图片功能集成

    KindEditor 是一套开源的在线HTML编辑器 后台可与 Java NET PHP ASP 等程序集成 为实现图文混排的编辑效果 我们通常都会用到编辑器的图片上传功能 本文会简单讲一下KinEditor的基本使用 主要说明如何在php
  • nodejs以太坊Dapp开发中文资料收集(精选版)

    区块链技术是趋势 会Nodejs 想做区块链相关 选择了以太坊这个平台 网上资料虽然多少能搜到 但是鱼龙混杂 重复错误百出 不够系统 在几天的搜寻筛选之后 整理了以下中文以太坊智能合约开发资料 有不足或者补充的请留言 互相交流共同进步 1
  • C/C++ 两个感叹号连用

    两个 是为了把非0值转换成1 而0值还是0 如下表 0 1 0 1 0 1 10 0 1
  • 无代码开发和低代码开发的本质区别

    目录 一 两者的概念区别 二 两者面向的人群不同 三 集成能力的区别 四 扩展能力的区别 五 选购建议 无代码和低代码开发都是目前新兴的一种软件开发方式 一 两者的概念区别 低代码开发 Low Code Development 是一种通过使
  • linux下的mtd

    通过 proc虚拟文件系统读取MTD分区表 cat proc mtd 具体由linux drivers mtd下的mtdcore c文件中的mtd read proc函数来实现 读出来的结果类似如下 dev size erasesize n
  • 特殊的喜好

    喜好测试是一种测试气味 您在其中断言某些内容与测试内容无关 例如 在运行时更改其安排集合的算法时 尝试声明集合中项目的顺序可能会导致失望 同样 断言错误消息的确切测试 除非是测试消息的构造 否则如果以某种测试不关心的方式改进消息 则可能导致
  • MySQL第六讲 MySQL分库分表方案

    分库分表概念 分库分表就是业务系统将数据写请求分发到master节点 而读请求分发到slave 节点的一种方案 可以大大提高整个数据库集群的性能 但是要注意 分库分表的 一整套逻辑全部是由客户端自行实现的 而对于MySQL集群 数据主从同步
  • LLDB 常用命令

    LLDB 小结 简介 LLDB 是新一代高性能调试器 其是一组可重用组件的集合 这些组件大多是 LLVM 工程中的类库 如 Clang 表达式解析器或 LLVM 反汇编程序等 LLDB 是 Xcode 中默认的调试器 并且支持调试 C C