代码之家  ›  专栏  ›  技术社区  ›  Old Pro

安装GDB-break LLDB,如何修复LLDB?

  •  1
  • Old Pro  · 技术社区  · 7 年前

    在ubuntu18.04.1上,我一直在使用 lldb llnode 调试 node gdb 会更好,所以我安装了它。之后, 有限责任公司 加载失败 core

    这起作用了:

    ~$ lldb /usr/bin/node -c core
    (lldb) target create "/usr/bin/node" --core "/home/ubuntu/core"
    Core file '/home/ubuntu/core' (x86_64) was loaded.'
    

    gdb公司 :

    ~$ sudo apt install gdb
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following additional packages will be installed:
      gdbserver libbabeltrace1 libc6-dbg libdw1
    Suggested packages:
      gdb-doc
    The following NEW packages will be installed:
      gdb gdbserver libbabeltrace1 libc6-dbg libdw1
    0 upgraded, 5 newly installed, 0 to remove and 19 not upgraded.
    Need to get 8737 kB of archives.
    After this operation, 51.5 MB of additional disk space will be used.
    Do you want to continue? [Y/n] 
    Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libdw1 amd64 0.170-0.4 [203 kB]
    Get:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libbabeltrace1 amd64 1.5.5-1 [154 kB]
    Get:3 http://us-west-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 gdb amd64 8.1-0ubuntu3 [2937 kB]
    Get:4 http://us-west-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 gdbserver amd64 8.1-0ubuntu3 [282 kB]
    Get:5 http://us-west-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libc6-dbg amd64 2.27-3ubuntu1 [5161 kB]
    Fetched 8737 kB in 1s (10.8 MB/s)   
    Selecting previously unselected package libdw1:amd64.
    (Reading database ... 125740 files and directories currently installed.)
    Preparing to unpack .../libdw1_0.170-0.4_amd64.deb ...
    Unpacking libdw1:amd64 (0.170-0.4) ...
    Selecting previously unselected package libbabeltrace1:amd64.
    Preparing to unpack .../libbabeltrace1_1.5.5-1_amd64.deb ...
    Unpacking libbabeltrace1:amd64 (1.5.5-1) ...
    Selecting previously unselected package gdb.
    Preparing to unpack .../gdb_8.1-0ubuntu3_amd64.deb ...
    Unpacking gdb (8.1-0ubuntu3) ...
    Selecting previously unselected package gdbserver.
    Preparing to unpack .../gdbserver_8.1-0ubuntu3_amd64.deb ...
    Unpacking gdbserver (8.1-0ubuntu3) ...
    Selecting previously unselected package libc6-dbg:amd64.
    Preparing to unpack .../libc6-dbg_2.27-3ubuntu1_amd64.deb ...
    Unpacking libc6-dbg:amd64 (2.27-3ubuntu1) ...
    Setting up libc6-dbg:amd64 (2.27-3ubuntu1) ...
    Setting up libdw1:amd64 (0.170-0.4) ...
    Processing triggers for libc-bin (2.27-3ubuntu1) ...
    Processing triggers for man-db (2.8.3-2) ...
    Setting up gdbserver (8.1-0ubuntu3) ...
    Setting up libbabeltrace1:amd64 (1.5.5-1) ...
    Setting up gdb (8.1-0ubuntu3) ...
    Processing triggers for libc-bin (2.27-3ubuntu1) ...
    

    有限责任公司 无法再加载核心文件:

    ~$ lldb /usr/bin/node -c core
    (lldb) target create "/usr/bin/node" --core "core"
    error: core failed to load objfile for /home/ubuntu/core
    error: Unable to find process plug-in for core file '/home/ubuntu/core'
    

    我该怎么解决这个问题?我喜欢 及其附加包,然后清除并重新安装 有限责任公司 ,但这并没有解决任何问题。

    1 回复  |  直到 7 年前
        1
  •  2
  •   Old Pro    7 年前

    结果是 lldb Unable to find process plug-in 错误是错误的直接后果 failed to load objfile

    这个 可能是任何原因造成的。在某些版本中,这可能是由于权限使核心文件无法读取造成的。在我的情况下 事后诸葛亮 ,的 gdb 安装是一件麻烦事。问题的实际原因是其他进程占用了足够的内存,因此没有足够的可用内存来加载核心映像。通过停止内存占用进程释放机器上的内存,解决了这个问题。