2

I installed GDB on macOS 10.13.3 using these steps.

I can use gdb locally without any hiccups, but remote debugging is a different story.

Fortunately, I am able to set remote breakpoints and they catch and return the correct line of code. However, when I try to print the variables, I am getting bad addresses.

It appears gdb is truncating the address space from 64-bit to 32-bit (i.e. truncating 0x71fe12345678 to 0x12345678).

Is there a setting in GDB that will allow it to correctly access the 64-bit memory address space of the remote machine?

NOTE: The remote target is gdbserver v8.1 on Alpine Linux in a Docker container running on the host.

Zak
  • 12,213
  • 21
  • 59
  • 105

0 Answers0