- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在调试使用 GDB (arm-none-eabi-gdb) 在 Rust 中编译的程序。有一次,我想写入一个内存地址,如下所示:
(gdb) set *((int *) 0x24040000) = 0x0000CAFE
syntax error in expression, near `) 0x24040000) = 0x0000CAFE'.
set *(0x24040000 as *mut i32) = 0x0000CAFE
最佳答案
是的,这取决于语言,语言是从加载的源文件的文件名中推导出来的。
报价the manual :
If you are not interested in seeing the value of the assignment, use the
set
command instead of theset
is really the same as
Language-specific information is built into GDB for some languages, allowing you to express operations like the above in your program’s native language, and allowing GDB to output values in a manner consistent with the syntax of your program’s native language. The language you use to build expressions is called the working language.
There are two ways to control the working language—either have GDB set it automatically, or select it manually yourself. You can use the set language command for either purpose. On startup, GDB defaults to setting the language automatically.
[..] most of the time GDB infers the language from the name of the file.
关于gdb: Actor 取决于编译的语言,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55457338/
我是一名优秀的程序员,十分优秀!