aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorXavier Roirand <roirand@adacore.com>2018-08-22 12:11:14 +0200
committerTom Tromey <tom@tromey.com>2018-09-19 15:23:29 -0600
commit79b32f4a3a109321cb9a99014293b0ade57535ab (patch)
treea2550c7fc090f9eb036ce16e8b621158298b0287 /gdb/python
parent07147793e678dac92f6a16f140678f9a5aed21e7 (diff)
downloadbinutils-79b32f4a3a109321cb9a99014293b0ade57535ab.zip
binutils-79b32f4a3a109321cb9a99014293b0ade57535ab.tar.gz
binutils-79b32f4a3a109321cb9a99014293b0ade57535ab.tar.bz2
Darwin: Handle unrelocated dyld.
On Darwin, debugging an helloworld program with GDB does not work and ends with: (gdb) set startup-with-shell off (gdb) start Temporary breakpoint 1 at 0x100000fb4: file /tmp/helloworld.c, line 1. Starting program: /private/tmp/helloworld [New Thread 0x2703 of process 18906] [New Thread 0x2603 of process 18906] [1]+ Stopped ./gdb/gdb /tmp/helloworld When debugging with lldb, instead of having the STOP signal, we can see that a breakpoint is not set to a proper location: Warning: Cannot insert breakpoint -1. Cannot access memory at address 0xf726 Command aborted. The inserted breakpoint is the one used when GDB has to stop the target when a shared library is loaded or unloaded. The notifier address used for adding the breakpoint is wrong thus the above failure. This notifier address is an offset relative to dyld base address, so the value calculation has to be updated to reflect this. This was tested on High Sierra by trying to run a simple "hello world" program. gdb/ChangeLog: PR gdb/20981: * solib-darwin.c (darwin_get_dyld_bfd): New function. (darwin_solib_get_all_image_info_addr_at_init): Update call. (darwin_handle_solib_event): New function. (darwin_solib_create_inferior_hook): Handle unrelocated dyld. Change-Id: I7dde5008c9158f17b78dc89bd7f4bd8a12d4a6e1
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions