在gdb里面用print errno有时会:
Cannot access memory at address 0x8

这是由于errno本身是一个宏,而gdb有时不能正确的处理errno这个宏。
可以试试如下命令:
p *__errno_location()


相关文章:

  • 2021-09-19
  • 2022-02-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2022-01-31
  • 2021-08-16
  • 2022-12-23
相关资源
相似解决方案