- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在 macOS 10.14 上学习汇编语言,我的汇编器 nasm 的版本是 2.14.02,链接器 ld 的版本是 ld64-409.12,调试器 lldb 的版本是 lldb-1000.11.38.2。
我有一个名为 test.asm
的源代码文件,我用
nasm -f macho64 -F dwarf -g test.asm
ld -e _start -o test test.o -lSystem
我使用 lldb 来调试:
lldb test
当我想在某行设置断点时,例如:
(lldb)b test.asm:3
事实证明:
error: parsing line table prologue at 0x00000000 (parsing ended around 0x00000006
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
我用
nm -pa test
查看调试信息,结果是:
0000000000000000 - 00 0000 SO xxxx(the directory)
0000000000000000 - 00 0000 SO test.asm
000000005c70cdfd - 03 0001 OSO xxxx/test.o
0000000000001f88 - 01 0000 BNSYM
0000000000001f88 - 01 0000 FUN _start
0000000000000078 - 00 0000 FUN
0000000000000078 - 01 0000 ENSYM
0000000000002000 - 02 0000 STSYM query_string
0000000000002014 - 02 0000 STSYM out_string
0000000000002025 - 03 0000 STSYM in_char
0000000000000000 - 01 0000 SO
0000000000002000 d query_string
0000000000002014 d out_string
0000000000000011 a out_string_len
0000000000000014 a query_string_len
0000000000002025 b in_char
0000000000001000 T __mh_execute_header
0000000000001f88 T _start
U dyld_stub_binder
如果我使用
dsymutil -dump-debug-map test
事实证明
---
triple: 'x86_64-apple-darwin'
binary-path: test
objects:
- filename: xxxx/test.o
timestamp: 1550896637
symbols:
- { sym: in_char, objAddr: 0x000000000000009D, binAddr: 0x0000000000002025, size: 0x00000000 }
- { sym: query_string, objAddr: 0x0000000000000078, binAddr: 0x0000000000002000, size: 0x00000000 }
- { sym: _start, objAddr: 0x0000000000000000, binAddr: 0x0000000000001F88, size: 0x00000078 }
- { sym: out_string, objAddr: 0x000000000000008C, binAddr: 0x0000000000002014, size: 0x00000000 }
...
如果我使用dsymutil
打包调试信息,例如:
dsymutil test
并尝试 lldb test
事实证明:
warning: (x86_64) xxxx/test empty dSYM file detected, dSYM was created with an executable with no debug info.
最佳答案
终于,我锻炼了。 LLDB支持GAS使用AT&T语法用源代码组装的程序。而如果你确实想在 macOS 上使用 intel 语法调试 NASM 用源代码组装的程序,只需使用 GDB 即可。
关于程序集 - lldb 在 macOS 上找不到正确的调试信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54838553/
例如,我有一个父类Author: class Author { String name static hasMany = [ fiction: Book,
代码如下: dojo.query(subNav.navClass).forEach(function(node, index, arr){ if(dojo.style(node, 'd
我有一个带有 Id 和姓名的学生表和一个带有 Id 和 friend Id 的 Friends 表。我想加入这两个表并找到学生的 friend 。 例如,Ashley 的 friend 是 Saman
我通过互联网浏览,但仍未找到问题的答案。应该很容易: class Parent { String name Child child } 当我有一个 child 对象时,如何获得它的 paren
我正在尝试创建一个以 Firebase 作为我的后端的社交应用。现在我正面临如何(在哪里?)找到 friend 功能的问题。 我有每个用户的邮件地址。 我可以访问用户的电话也预订。 在传统的后端中,我
我主要想澄清以下几点: 1。有人告诉我,在 iOS 5 及以下版本中,如果您使用 Game Center 设置多人游戏,则“查找 Facebook 好友”(如与好友争夺战)的功能不是内置的,因此您需要
关于redis docker镜像ENTRYPOINT脚本 docker-entrypoint.sh : #!/bin/sh set -e # first arg is `-f` or `--some-
我是一名优秀的程序员,十分优秀!