DuckDB 源码配置

DuckDB 源码配置

源码编译

sudo apt-get update && sudo apt-get install -y git g++ cmake ninja-build libssl-dev
git clone git@github.com:duckdb/duckdb.git
cd duckdb
make debug/release

issue

当我们编译 debug 版本的时候可能会出现如下图所示的问题:

img

vscode 调试配置

到源码下的 examples/embedded-c++ 文件夹,修改 CMakeLists.txt 文件

img

添加第 7 行和 第 9 行代码,用于添加调试信息。

cmake .
make -j

launch.json 文件设置

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
        "name": "(gdb) start",
        "type": "cppdbg",
        "request": "launch",
        "program":"${workspaceFolder}/examples/embedded-c++/example",
        "args": [],
        "stopAtEntry": false,
        "cwd":"${fileDirname}",
        "environment": [],
        "externalConsole": false,
        "MIMode":"gdb",
        "setupCommands":[
            {
                "description":"为gdb 启用整齐打印",
                "text":"-enable-pretty-printing",
                "ignoreFailures": true
            },
            {
                "description": "将反汇编风格设置为Intel",
                "text": "-gdb-set disassembly-flavor intel",
                "ignoreFailures": true
            }
        ]
        }
    ]
}

Reference

posted on   LambdaQ  阅读(371)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
· 全程使用 AI 从 0 到 1 写了个小工具
· 从文本到图像:SSE 如何助力 AI 内容实时呈现?(Typescript篇)
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示