patch-gdb_gdbserver_linux-low_c 974 B

12345678910111213141516171819202122
  1. --- gdb-7.8.orig/gdb/gdbserver/linux-low.c 2014-07-29 14:37:42.000000000 +0200
  2. +++ gdb-7.8/gdb/gdbserver/linux-low.c 2014-09-05 00:47:25.427321525 +0200
  3. @@ -4933,15 +4933,15 @@ static int
  4. linux_read_offsets (CORE_ADDR *text_p, CORE_ADDR *data_p)
  5. {
  6. unsigned long text, text_end, data;
  7. - int pid = lwpid_of (get_thread_lwp (current_inferior));
  8. + int pid = lwpid_of (current_inferior);
  9. errno = 0;
  10. - text = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) PT_TEXT_ADDR,
  11. + text = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) (PT_TEXT_ADDR),
  12. (PTRACE_TYPE_ARG4) 0);
  13. - text_end = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) PT_TEXT_END_ADDR,
  14. + text_end = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) (PT_TEXT_END_ADDR),
  15. (PTRACE_TYPE_ARG4) 0);
  16. - data = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) PT_DATA_ADDR,
  17. + data = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) (PT_DATA_ADDR),
  18. (PTRACE_TYPE_ARG4) 0);
  19. if (errno == 0)