lldb

LLDB: silently continue after python script is done executing

孤街浪徒 提交于 2021-02-10 06:26:22
问题 I've written a python script that I am attaching to a watchpoint in LLDB, such as: def wpCallback(frame, wp, internal_dict): ... and I am attaching the callback with: watchpoint command add -F commands.wpCallback watchpointID I would like execution of the program to immediately resume after wpCallback is finished. Currently, execution halts as the watchpoint normally would. Is it possible to silently continue after the function is done? Based on this answer it seems like you can do something

LLDB: silently continue after python script is done executing

人走茶凉 提交于 2021-02-10 06:26:03
问题 I've written a python script that I am attaching to a watchpoint in LLDB, such as: def wpCallback(frame, wp, internal_dict): ... and I am attaching the callback with: watchpoint command add -F commands.wpCallback watchpointID I would like execution of the program to immediately resume after wpCallback is finished. Currently, execution halts as the watchpoint normally would. Is it possible to silently continue after the function is done? Based on this answer it seems like you can do something

How to write into XMM Registers in LLDB

别等时光非礼了梦想. 提交于 2021-02-08 19:38:04
问题 I am trying to read and write values from registers in python using the LLDB API. For the General Purpose Registers, I have been using the frame.register['register name'].value to read and write register values, which works successfully for me. However, as I approach the Floating Point Registers, I found that this could not be done anymore, as some of the registers, such as the XMM registers do not have a value attribute e.g frame.register['xmm0'].value would return None . I have looked into

Can I set an LLDB breakpoint when multiple Rust source files share the same name?

白昼怎懂夜的黑 提交于 2021-02-07 12:55:25
问题 Background: In Rust, you typically have multiple source files called mod.rs . For example: app_name src main.rs foo mod.rs bar mod.rs Problem: I can't find a way to distinguish one mod.rs from another when setting an LLDB breakpoint: $ cargo build $ rust-lldb target/debug/app_name (lldb) breakpoint set -f mod.rs -l 10 Breakpoint 1: 2 locations. (lldb) breakpoint set -f foo/mod.rs -l 10 Breakpoint 2: no locations (pending). WARNING: Unable to resolve breakpoint to any actual locations. (lldb)

Lldb : Setting conditional breakpoint with string equality as condition

允我心安 提交于 2021-02-07 05:25:31
问题 I would like to set a conditional breakpoint with lldb. This is usually done using -c option : breakpoint set -f myFile.cpp -l 123 -c 'a==3' However, in my case I want to test if a std::string object is equal to a certain string value but doing this breakpoint set -f myFile.cpp -l 123 -c 'a=="hello"' does not work… Lldb does not complain (while gdb would return an error) but it ignores the condition string upon reaching the breakpoint and breaks too early… This question is similar to this one

编写Postgres扩展之二:类型和运算符

岁酱吖の 提交于 2021-02-02 06:57:45
原文: http://big-elephants.com/2015-10/writing-postgres-extensions-part-ii/ 编译:Tacey Wong 在上一篇关于编写Postgres Extensions的文章中,我们介绍了扩展PostgresQL的基础知识。现在是有趣的部分来了——开发我们自己的类型。 一个小小的免责声明 最好不要急于复制和粘贴本文中的代码。文中的代码有一些严重的bug,这些bug是为了说明解释的目的而故意留下的。如果您正在寻找可用于生产的 base36 类型定义,请查看 这里 。 复习一下base36 我们需要的是一个用于存储和检索 base36数字 的base36数据类型的可靠实现。我们已经为扩展创建了基本框架,包括base36、controler和Makefile,您可以在专门用于本系列博客文章的GitHub repo中找到它们。您可以查看我们在第1部分中得到的结果,本文中的代码可以在第2部分分支中找到。 文件名:base36.control # base36 extension comment = 'base36 datatype' default_version = '0.0.1' relocatable = true 文件名:Makefile EXTENSION = base36 # 扩展名称 DATA = base36--0

Where is the lldb executable vscode uses?

孤人 提交于 2021-01-29 17:10:52
问题 I'm having difficulty with debugging rust in vscode (It can't evaluate any expressions involving functions). I noticed that I don't have lldb installed (Ubuntu 20.04), but the debugger is still running. Where is it finding the lldb executable? Can I change the path? 来源: https://stackoverflow.com/questions/65542559/where-is-the-lldb-executable-vscode-uses

How to set a breakpoint on an assembly file using Xcode?

戏子无情 提交于 2021-01-29 05:02:52
问题 I tried "breakpoint [line number]", "breakpoint filename.s:line_number" but they don't work. Currently I have to step through all lines, and it's a hassle 回答1: As an alternative you can: 1) show memory with assembly instructions with di with explicit arguments if you need reach out further di -c 1000 ; if you need to disassemble a specific address di -s <address> 2) set a memory break point with br s -a <memory address you found in previous step> Another alternative is slightly more

How to import lldb module for python on Mac?

房东的猫 提交于 2021-01-28 11:08:20
问题 I need a lldb python library to debug my python script. I made my python environment configuration following the lldb.llvm.org's instructions. But I got some errors as follow: /Users/heping/Desktop/Scripts/.env/python-3.7.3/bin/python /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 57996 --file /Users/heping/Desktop/Scripts/RevealServerCommands.py pydev debugger: process 59879 is connecting Connected to pydev

LLDB for Swift: Access computed property or perform function call in type summary Python script

。_饼干妹妹 提交于 2021-01-28 03:45:17
问题 When I create a custom type summary using a Python script, it is possible to access ivars using value.GetChildMemberByName("<child-name>") . However, this does not work for computed properties or functions. With the frame variable command, the script that generates the summary can evaluate expressions in the current frame (e.g. value.GetFrame().EvaluateExpression(value.GetName() + ".description") ) However, this will not work when using p <some-expression> / expression -- <some-expression> as