gdbserver: Remove tracepoint_action ops.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2 Marcin Kościelnicki <koriakin@0x04.net>
3
4 * tracepoint.c (struct tracepoint_action_ops): Remove.
5 (struct tracepoint_action): Remove ops.
6 (m_tracepoint_action_download, r_tracepoint_action_download)
7 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8 size and offset accordingly.
9 (m_tracepoint_action_ops, r_tracepoint_action_ops)
10 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
11 (tracepoint_action_send, tracepoint_action_download): New functions.
12 Helpers for trace action handlers.
13 (add_tracepoint_action): Remove setup actions ops.
14 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
15
16 2016-02-10 Yao Qi <yao.qi@linaro.org>
17
18 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
19
20 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
21
22 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
23 to AC_OUTPUT.
24 * configure: Regenerate.
25
26 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
27
28 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
29 void * to gdb_byte *.
30 * linux-low.c (siginfo_fixup): Likewise.
31 (linux_xfer_siginfo): Likewise.
32 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
33 Likewise.
34 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
35
36 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
37
38 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
39 to srv_tgtobj.
40 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
41 to srv_tgtobj.
42 * linux-x86-low.c [__x86_64__]: Include
43 "nat/amd64-linux-siginfo.h".
44 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
45 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
46 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
47 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
48 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
49 (cpt_si_fd, si_timerid, si_overrun): Move from
50 nat/amd64-linux-siginfo.c.
51 * Makefile.in (amd64-linux-siginfo.o:): New rule.
52
53 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
54
55 * server.c (skip_to_semicolon): Remove.
56 (process_point_options): Use strchrnul instead of
57 skip_to_semicolon.
58
59 2016-01-26 Yao Qi <yao.qi@linaro.org>
60
61 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
62 * linux-low.c (install_software_single_step_breakpoints): Don't
63 call regcache_read_pc.
64 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
65 argument pc.
66
67 2016-01-26 Yao Qi <yao.qi@linaro.org>
68
69 * linux-low.c (install_software_single_step_breakpoints): Call
70 regcache_read_pc instead of get_pc.
71
72 2016-01-26 Yao Qi <yao.qi@linaro.org>
73
74 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
75 (unblock_async_io): Rename to ...
76 (block_unblock_async_io): ... it. New function.
77 (enable_async_io): Don't install SIGIO handler. Unblock it
78 instead.
79 (disable_async_io): Don't ignore SIGIO. Block it instead.
80 (initialize_async_io): Install SIGIO handler. Don't call
81 unblock_async_io.
82
83 2016-01-26 Yao Qi <yao.qi@linaro.org>
84
85 * remote-utils.c (getpkt): If the buffer isn't empty, and the
86 first character is '\003', call *the_target->request_interrupt.
87
88 2016-01-25 Yao Qi <yao.qi@linaro.org>
89
90 * remote-utils.c (new_thread_notify): Remove.
91 (dead_thread_notify): Likewise.
92 * remote-utils.h (new_thread_notify): Remove declaration.
93 (dead_thread_notify): Likewise.
94
95 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
96
97 * gdb.trace/pending.exp: Fix expected message on continue.
98
99 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
100
101 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
102 it works properly on big-endian machines where sizeof (CORE_ADDR)
103 != sizeof (void *).
104
105 2016-01-21 Pedro Alves <palves@redhat.com>
106
107 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
108 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
109 * configure: Regenerate.
110
111 2016-01-21 Yao Qi <yao.qi@linaro.org>
112
113 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
114 is_thumb and set it according to CPSR saved on the stack.
115 (get_next_pcs_syscall_next_pc): Pass is_thumb to
116 arm_sigreturn_next_pc.
117
118 2016-01-18 Yao Qi <yao.qi@linaro.org>
119
120 * linux-low.c (linux_set_pc_64bit): New function.
121 (linux_get_pc_64bit): New function.
122 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
123 Declare.
124 * linux-sparc-low.c (debug_threads): Remove declaration.
125 (sparc_get_pc): Remove.
126 (the_low_target): Use linux_get_pc_64bit instead of
127 sparc_get_pc.
128 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
129 (the_low_target): Use linux_get_pc_64bit and
130 linux_set_pc_64bit.
131
132 2016-01-18 Yao Qi <yao.qi@linaro.org>
133
134 * linux-arm-low.c (debug_threads): Remove declaration.
135 (arm_get_pc, arm_set_pc): Remove.
136 (the_low_target): Use linux_get_pc_32bit and
137 linux_set_pc_32bit.
138 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
139 (the_low_target): Use linux_get_pc_32bit and
140 linux_set_pc_32bit.
141 * linux-cris-low.c (debug_threads): Remove declaration.
142 (cris_get_pc, cris_set_pc,): Remove.
143 (the_low_target): Use linux_get_pc_32bit and
144 linux_set_pc_32bit.
145 * linux-crisv32-low.c (debug_threads): Remove declaration.
146 (cris_get_pc, cris_set_pc): Remove.
147 (the_low_target): Use linux_get_pc_32bit and
148 linux_set_pc_32bit.
149 * linux-low.c: Include inttypes.h.
150 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
151 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
152 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
153 (the_low_target): Use linux_get_pc_32bit and
154 linux_set_pc_32bit.
155 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
156 (the_low_target): Use linux_get_pc_32bit and
157 linux_set_pc_32bit.
158 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
159 (the_low_target): Use linux_get_pc_32bit and
160 linux_set_pc_32bit.
161 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
162 (the_low_target): Use linux_get_pc_32bit and
163 linux_set_pc_32bit.
164 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
165 (the_low_target): Use linux_get_pc_32bit and
166 linux_set_pc_32bit.
167
168 2016-01-18 Gary Benson <gbenson@redhat.com>
169
170 * configure.ac (AC_FUNC_FORK): New check.
171 * config.in: Regenerate.
172 * configure: Likewise.
173
174 2016-01-14 Yao Qi <yao.qi@linaro.org>
175
176 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
177 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
178 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
179 arm_get_next_pcs_ctor.
180
181 2016-01-12 Josh Stone <jistone@redhat.com>
182 Philippe Waroquiers <philippe.waroquiers@skynet.be>
183
184 * inferiors.h: Include "gdb_vecs.h".
185 (struct process_info): Add syscalls_to_catch.
186 * inferiors.c (remove_process): Free syscalls_to_catch.
187 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
188 syscall_return stops.
189 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
190 * server.c (handle_general_set): Handle QCatchSyscalls.
191 (handle_query): Report support for QCatchSyscalls.
192 * target.h (struct target_ops): Add supports_catch_syscall.
193 (target_supports_catch_syscall): New macro.
194 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
195 (struct lwp_info): Add syscall_state.
196 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
197 Maintain syscall_state and syscalls_to_catch across exec.
198 (get_syscall_trapinfo): New function, proxy to the_low_target.
199 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
200 (linux_low_filter_event): Toggle syscall_state entry/return for
201 syscall traps, and set it ignored for all others.
202 (gdb_catching_syscalls_p): New function.
203 (gdb_catch_this_syscall_p): New function.
204 (linux_wait_1): Handle SYSCALL_SIGTRAP.
205 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
206 (linux_supports_catch_syscall): New function.
207 (linux_target_ops): Install it.
208 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
209 (the_low_target): Install it.
210
211 2016-01-12 Mike Frysinger <vapier@gentoo.org>
212
213 * acinclude.m4: Include new ../warning.m4 file.
214 * configure: Regenerated.
215 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
216
217 2016-01-12 Mike Frysinger <vapier@gentoo.org>
218
219 * ax.c (is_goto_target): Mark static.
220 * linux-low.c (register_addr): Likewise.
221 (linux_fetch_registers, linux_store_registers): Likewise.
222 * mem-break.c (any_persistent_commands): Fix old prototype.
223 (add_commands_to_breakpoint): Mark static.
224 * regcache.c (find_register_by_name): Delete unused func.
225 * remote-utils.c (hex_or_minus_one): Mark static.
226 * server.c (monitor_show_help): Mark static.
227 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
228 handle_v_requests): Likewise.
229
230 2016-01-12 Pedro Alves <palves@redhat.com>
231
232 Remove use of the registered trademark symbol throughout.
233
234 2016-01-08 Yao Qi <yao.qi@linaro.org>
235
236 * remote-utils.c (getpkt): If c is '\003', call target hook
237 request_interrupt.
238
239 2016-01-06 Yao Qi <yao.qi@linaro.org>
240
241 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
242 linux-aarch32-low.c.
243 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
244 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
245 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
246 (thumb2_breakpoint): Declare.
247 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
248 linux-aarch32-low.h.
249 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
250 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
251 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
252
253 2016-01-01 Joel Brobecker <brobecker@adacore.com>
254
255 * gdbreplay.c (gdbreplay_version): Change copyright year in
256 version message.
257 * server.c (gdbserver_version): Likewise.
258
259 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
260
261 * server.c (crc32_table): Delete.
262 (crc32): Use libiberty's xcrc32 function.
263
264 2015-12-22 Joel Brobecker <brobecker@adacore.com>
265
266 * lynx-low.c (lynx_delete_thread_callback): New function.
267 (lynx_mourn): Properly delete our process and all of its
268 threads. Remove call to clear_inferiors.
269
270 2015-12-22 Joel Brobecker <brobecker@adacore.com>
271
272 * target.c (thread_search_callback): Add check that
273 the thread_stopped target callback is not NULL before
274 calling it.
275
276 2015-12-21 Yao Qi <yao.qi@linaro.org>
277
278 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
279 arm breakpoint.
280
281 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
282
283 * server.c (handle_query): Call target_supports_software_single_step.
284
285 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
286
287 * linux-low.c (single_step): New function.
288 (linux_resume_one_lwp_throw): Call single_step.
289 (start_step_over): Likewise.
290
291 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
292
293 * Makefile.in (SFILES): Append arch/arm-linux.c,
294 arch/arm-get-next-pcs.c.
295 (arm-linux.o): New rule.
296 (arm-get-next-pcs.o): New rule.
297 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
298 arm-linux.o.
299 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
300 to linux-aarch32-low.c.
301 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
302 (arm_breakpoint_len, thumb_breakpoint): Likewise.
303 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
304 (thumb2_breakpoint_len): Likewise.
305 (arm_is_thumb_mode): Make non-static.
306 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
307 from linux-aarch32-low.c.
308 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
309 (arm_breakpoint_len, thumb_breakpoint): Likewise.
310 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
311 (thumb2_breakpoint_len): Likewise.
312 (arm_is_thumb_mode): New declaration.
313 * linux-arm-low.c: Include arch/arm-linux.h
314 aarch/arm-get-next-pcs.h, sys/syscall.h.
315 (get_next_pcs_ops): New struct.
316 (get_next_pcs_addr_bits_remove): New function.
317 (get_next_pcs_is_thumb): New function.
318 (get_next_pcs_read_memory_unsigned_integer): Likewise.
319 (arm_sigreturn_next_pc): Likewise.
320 (get_next_pcs_syscall_next_pc): Likewise.
321 (arm_gdbserver_get_next_pcs): Likewise.
322 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
323 Initialize.
324 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
325 * server.h: Include gdb_vecs.h.
326
327 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
328
329 * Makefile.in (SFILES): Append common/common-regcache.c.
330 (OBS): Append common-regcache.o.
331 (common-regcache.o): New rule.
332 * regcache.c (init_register_cache): Initialize cache to
333 REG_UNAVAILABLE.
334 (regcache_raw_read_unsigned): New function.
335 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
336 register_status enum.
337
338 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
339
340 * linux-aarch64-low.c (the_low_targets): Rename
341 breakpoint_reinsert_addr to get_next_pcs.
342 * linux-arm-low.c (the_low_targets): Likewise.
343 * linux-bfin-low.c (the_low_targets): Likewise.
344 * linux-cris-low.c (the_low_targets): Likewise.
345 * linux-crisv32-low.c (the_low_targets): Likewise.
346 * linux-low.c (can_software_single_step): Likewise.
347 (install_software_single_step_breakpoints): New function.
348 (start_step_over): Use install_software_single_step_breakpoints.
349 * linux-low.h: New CORE_ADDR vector.
350 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
351 get_next_pcs.
352 * linux-mips-low.c (the_low_targets): Likewise.
353 * linux-nios2-low.c (the_low_targets): Likewise.
354 * linux-sparc-low.c (the_low_targets): Likewise.
355
356 2015-12-17 Pedro Alves <palves@redhat.com>
357
358 * linux-low.c (linux_kill_one_lwp): Remove references to
359 LinuxThreads.
360 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
361 to 'kill'.
362 (linux_init_signals): Delete.
363 (initialize_low): Adjust.
364 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
365
366 2015-12-16 Pedro Alves <palves@redhat.com>
367
368 * configure.ac (compiler warning flags): When testing a
369 -Wno-foo option, check whether -Wfoo works instead.
370 * configure: Regenerate.
371
372 2015-12-11 Don Breazeal <donb@codesourcery.com>
373
374 * server.c (process_serial_event): Don't exit from gdbserver
375 in remote mode if there are still active inferiors.
376
377 2015-12-11 Yao Qi <yao.qi@linaro.org>
378
379 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
380 arm_breakpoint_at if the process is 32-bit.
381
382 2015-12-11 Yao Qi <yao.qi@linaro.org>
383
384 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
385 arm breakpoint.
386
387 2015-12-07 Yao Qi <yao.qi@linaro.org>
388
389 * configure.srv: Append arm.o to srv_tgtobj for
390 aarch64*-*-linux* target.
391 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
392 from linux-arm-low.c.
393 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
394 (arm_breakpoint_len, thumb_breakpoint): Likewise.
395 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
396 (thumb2_breakpoint_len): Likewise.
397 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
398 (arm_breakpoint_kinds): Likewise.
399 (arm_breakpoint_kind_from_pc): Likewise.
400 (arm_sw_breakpoint_from_kind): Likewise.
401 (arm_breakpoint_kind_from_current_state): Likewise.
402 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
403 (arm_sw_breakpoint_from_kind): Declare.
404 (arm_breakpoint_kind_from_current_state): Declare.
405 (arm_breakpoint_at): Declare.
406 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
407 arm_sw_breakpoint_from_kind if process is 32-bit.
408 (aarch64_breakpoint_kind_from_pc): New function.
409 (aarch64_breakpoint_kind_from_current_state): New function.
410 (the_low_target): Initialize fields breakpoint_kind_from_pc
411 and breakpoint_kind_from_current_state.
412 * linux-arm-low.c (arm_breakpoint_kinds): Move to
413 linux-aarch32-low.c.
414 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
415 (arm_breakpoint, arm_breakpoint_len): Likewise.
416 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
417 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
418 (arm_is_thumb_mode): Likewise.
419 (arm_breakpoint_at): Likewise.
420 (arm_breakpoint_kind_from_pc): Likewise.
421 (arm_sw_breakpoint_from_kind): Likewise.
422 (arm_breakpoint_kind_from_current_state): Likewise.
423
424 Revert:
425 2015-08-04 Yao Qi <yao.qi@linaro.org>
426
427 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
428 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
429 * server.c (extended_protocol): Remove "static".
430 * server.h (extended_protocol): Declare it.
431
432 2015-12-04 Josh Stone <jistone@redhat.com>
433
434 * target.h (struct target_ops) <arch_setup>: Rename to ...
435 (struct target_ops) <post_create_inferior>: ... this.
436 (target_arch_setup): Rename to ...
437 (target_post_create_inferior): ... this, calling post_create_inferior.
438 * server.c (start_inferior): Update target_arch_setup calls to
439 target_post_create_inferior.
440 * linux-low.c (linux_low_ptrace_options): Forward declare.
441 (linux_arch_setup): Update its comment for general use.
442 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
443 (struct linux_target_ops): Use linux_post_create_inferior.
444 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
445 to post_create_inferior.
446 * nto-low.c (struct nto_target_ops): Likewise.
447 * spu-low.c (struct spu_target_ops): Likewise.
448 * win32-low.c (struct win32_target_ops): Likewise.
449
450 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
451
452 * linux-arm-low.c: Remove duplicate arch/arm.h include.
453
454 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
455
456 * linux-arm-low.c (arm_reinsert_addr): Remove function.
457 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
458 * linux-cris-low.c (cris_reinsert_addr> Remove function.
459 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
460 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
461 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
462 * linux-mips-low.c (mips_reinsert_addr): Remove function.
463 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
464 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
465 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
466 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
467 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
468
469 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
470
471 * linux-low.c (linux_look_up_symbols): Don't call
472 linux_supports_traceclone.
473 * linux-low.h (thread_db_init): Remove use_events argument.
474 * thread-db.c (thread_db_use_event): Remove global variable.
475 (struct thread_db) <td_thr_event_enable_p>: Remove field.
476 (struct thread_db) <td_create_bp>: Remove field.
477 (thread_db_create_event): Remove function.
478 (thread_db_enable_reporting): Likewise.
479 (find_one_thread): Don't check for thread_db_use_events.
480 (attach_thread): Likewise.
481 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
482 (try_thread_db_load_1): Don't check for thread_db_use_events.
483 (thread_db_init): Remove use_events argument and thread events
484 handling.
485 (remove_thread_event_breakpoints): Remove function.
486 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
487
488 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
489
490 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
491 New function.
492 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
493 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
494 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
495 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
496 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
497 Initialize.
498 * linux-crisv32-low.c (cris_supports_hardware_single_step):
499 New function.
500 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
501 * linux-low.c (can_hardware_single_step): Use
502 supports_hardware_single_step.
503 (can_software_single_step): New function.
504 (start_step_over): Call can_software_single_step.
505 (linux_supports_hardware_single_step): New function.
506 (struct target_ops) <supports_software_single_step>: Initialize.
507 * linux-low.h (struct linux_target_ops)
508 <supports_hardware_single_step>: Initialize.
509 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
510 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
511 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
512 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
513 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
514 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
515 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
516 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
517 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
518 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
519 Initialize.
520 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
521 (struct linux_target_ops) <tile_supports_hardware_single_step>:
522 Initialize.
523 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
524 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
525 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
526 New function.
527 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
528 * target.h (struct target_ops): <supports_software_single_step>:
529 New field.
530 (target_supports_software_single_step): New macro.
531
532 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
533
534 * linux-low.c (linux_wait_1): Fix pc advance condition.
535 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
536 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
537
538 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
539
540 * linux-arm-low.c (arm_is_thumb_mode): New function.
541 (arm_breakpoint_at): Use arm_is_thumb_mode.
542 (arm_breakpoint_kind_from_current_state): New function.
543 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
544 Initialize.
545 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
546 (linux_breakpoint_kind_from_current_state): New function.
547 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
548 * linux-low.h (struct linux_target_ops)
549 <breakpoint_kind_from_current_state>: New field.
550 * target.h (struct target_ops): Likewise.
551 (target_breakpoint_kind_from_current_state): New macro.
552
553 2015-11-30 Pedro Alves <palves@redhat.com>
554
555 * linux-low.c (linux_resume): Wake up the event loop before
556 returning.
557
558 2015-11-30 Pedro Alves <palves@redhat.com>
559
560 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
561 check.
562 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
563 to -1.
564 * target.c (struct thread_search): New structure.
565 (thread_search_callback): New function.
566 (prev_general_thread): New global.
567 (prepare_to_access_memory, done_accessing_memory): New functions.
568 * target.h (prepare_to_access_memory, done_accessing_memory):
569 Replace macros with function declarations.
570
571 2015-11-30 Pedro Alves <palves@redhat.com>
572
573 PR 14618
574 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
575 report TARGET_WAITKIND_NO_RESUMED.
576 * remote-utils.c (prepare_resume_reply): Handle
577 TARGET_WAITKIND_NO_RESUMED.
578 * server.c (report_no_resumed): New global.
579 (handle_query) <qSupported>: Handle "no-resumed+". Report
580 "no-resumed+" support.
581 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
582 return error if the client doesn't support no-resumed events.
583 (push_stop_notification): New function.
584 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
585 events if the client supports them.
586
587 2015-11-30 Pedro Alves <palves@redhat.com>
588
589 * linux-low.c (thread_still_has_status_pending_p): Don't check
590 vCont;t here.
591 (lwp_resumed): New function.
592 (status_pending_p_callback): Return early if the LWP is not
593 supposed to be resumed.
594
595 2015-11-30 Pedro Alves <palves@redhat.com>
596
597 * linux-low.c (handle_extended_wait): Assert that the LWP's
598 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
599 thread create events, leave the new child's status pending.
600 (linux_low_filter_event): If GDB wants to hear about thread exit
601 events, leave the LWP marked dead and don't delete it.
602 (linux_wait_for_event_filtered): Don't check for thread exit.
603 (filter_exit_event): New function.
604 (linux_wait_1): Use it, when returning an exit event.
605 (linux_resume_one_lwp_throw): Assert that the LWP's
606 waitstatus is TARGET_WAITKIND_IGNORE.
607 * remote-utils.c (prepare_resume_reply): Handle
608 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
609 * server.c (report_thread_events): New global.
610 (handle_general_set): Handle QThreadEvents.
611 (handle_query) <qSupported>: Handle and report QThreadEvents+;
612 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
613 TARGET_WAITKIND_THREAD_EXITED.
614 * server.h (report_thread_events): Declare.
615
616 2015-11-30 Pedro Alves <palves@redhat.com>
617
618 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
619 the thread's last_resume_kind was resume_stop.
620
621 2015-11-30 Pedro Alves <palves@redhat.com>
622
623 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
624 before returning.
625
626 2015-11-30 Pedro Alves <palves@redhat.com>
627
628 * server.c (handle_v_requests): Handle vCtrlC.
629
630 2015-11-30 Pedro Alves <palves@redhat.com>
631
632 * gdbthread.h (find_any_thread_of_pid): Declare.
633 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
634 functions.
635 * server.c (handle_query): If current_thread is NULL, look for
636 another thread of the selected process.
637
638 2015-11-26 Daniel Colascione <dancol@dancol.org>
639 Simon Marchi <simon.marchi@ericsson.com>
640
641 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
642 * server.c (handle_qxfer_threads_worker): Refactor to include thread
643 name in reply.
644 * target.h (struct target_ops) <thread_name>: New field.
645 (target_thread_name): New macro.
646
647 2015-11-23 Joel Brobecker <brobecker@adacore.com>
648
649 * regcache.h (regcache_invalidate_pid): Add declaration.
650 * regcache.c (regcache_invalidate_pid): New function, extracted
651 from regcache_invalidate.
652 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
653 Add trivial documentation comment.
654 * lynx-low.c: Use regcache_invalidate_pid instead of
655 regcache_invalidate.
656
657 2015-11-23 Joel Brobecker <brobecker@adacore.com>
658
659 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
660 and Elf64_auxv_t if the target is Android.
661
662 2015-11-22 Doug Evans <xdje42@gmail.com>
663
664 * target.h: #include <sys/types.h>.
665
666 2015-11-19 Pedro Alves <palves@redhat.com>
667
668 * linux-low.c (linux_process_qsupported): Change prototype.
669 Adjust.
670 * linux-low.h (struct linux_target_ops) <process_qsupported>:
671 Change prototype.
672 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
673 and adjust to loop over all features.
674 * server.c (handle_query) <qSupported>: Adjust to call
675 target_process_qsupported once, passing it a vector of unprocessed
676 features.
677 * target.h (struct target_ops) <process_qsupported>: Change
678 prototype.
679 (target_process_qsupported): Adjust.
680
681 2015-11-19 Pedro Alves <palves@redhat.com>
682
683 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
684 mode.
685 * configure: Regenerate.
686
687 2015-11-19 Pedro Alves <palves@redhat.com>
688
689 * configure: Regenerate.
690
691 2015-11-19 Yao Qi <yao.qi@linaro.org>
692
693 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
694 type to uint32_t.
695
696 2015-11-19 Yao Qi <yao.qi@linaro.org>
697
698 * linux-aarch64-low.c (enum aarch64_operand_type): New.
699 (struct aarch64_operand): Move enum out.
700
701 2015-11-19 Yao Qi <yao.qi@linaro.org>
702
703 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
704 struct user_fpsimd_state *.
705 (aarch64_store_fpregset): Likewise.
706
707 2015-11-19 Yao Qi <yao.qi@linaro.org>
708
709 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
710 struct user_pt_regs *.
711 (aarch64_store_gregset): Likewise.
712
713 2015-11-18 Pedro Alves <palves@redhat.com>
714
715 * Makefile.in (all_object_files): Add $IPA_OBJS.
716
717 2015-11-17 Pedro Alves <palves@redhat.com>
718
719 * win32-low.c (win32_resume): Use gdb_signal_from_host,
720 GDB_SIGNAL_0 and gdb_signal_to_string.
721
722 2015-11-17 Pedro Alves <palves@redhat.com>
723
724 * win32-low.c (handle_output_debug_string): Remove parameter.
725 (win32_kill): Remove our_status local and adjust call to
726 handle_output_debug_string.
727 (get_child_debug_event): Adjust call to
728 handle_output_debug_string.
729
730 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
731
732 * linux-mips-low.c (mips_fill_gregset): Add cast.
733 (mips_store_gregset): Likewise.
734 (mips_fill_fpregset): Likewise.
735 (mips_store_fpregset): Likewise.
736
737 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
738
739 * linux-mips-low.c (mips_add_watchpoint): Rename private to
740 priv.
741
742 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
743
744 * linux-mips-low.c (mips_linux_new_thread): Change type of
745 watch_type to enum target_hw_bp_type.
746
747 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
748
749 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
750 Change return type to arm_hwbp_type.
751
752 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
753
754 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
755 (arm_store_gregset): Likewise.
756 * linux-arm-low.c (arm_get_hwcap): Likewise.
757 (arm_read_description): Likewise.
758
759 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
760
761 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
762
763 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
764
765 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
766 (ppc_fill_vsxregset): Likewise.
767 (ppc_store_vsxregset): Likewise.
768 (ppc_fill_vrregset): Likewise.
769 (ppc_store_vrregset): Likewise.
770 (ppc_fill_evrregset): Likewise.
771 (ppc_store_evrregset): Likewise.
772
773 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
774
775 * linux-ppc-low.c (ppc_usrregs_info): Remove
776 forward-declaration.
777 (ppc_arch_setup): Move lower in file.
778
779 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
780
781 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
782 (ps_pdwrite): Likewise.
783
784 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
785
786 * linux-arm-low.c (arm_new_thread): Move pointer dereference
787 to after assert checks.
788
789 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
790
791 * proc-service.c (ps_pdread): Add/adjust casts.
792 (ps_pdwrite): Add/adjust casts.
793
794 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
795
796 * server.c (handle_search_memory_1): Cast return value of
797 memmem.
798
799 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
800
801 * server.c (write_qxfer_response): Change type of data to
802 gdb_byte *.
803
804 2015-10-29 Pedro Alves <palves@redhat.com>
805
806 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
807
808 2015-10-29 Pedro Alves <palves@redhat.com>
809
810 * tracepoint.c (clear_installed_tracepoints): Add casts.
811
812 2015-10-29 Pedro Alves <palves@redhat.com>
813
814 * server.c (handle_v_cont, process_serial_event): Add enum
815 gdb_signal casts to signal parsing code.
816
817 2015-10-29 Pedro Alves <palves@redhat.com>
818
819 * linux-low.h (NULL_REGSET): Define.
820 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
821 * linux-arm-low.c (arm_regsets): Likewise.
822 * linux-crisv32-low.c (cris_regsets): Likewise.
823 * linux-m68k-low.c (m68k_regsets): Likewise.
824 * linux-mips-low.c (mips_regsets): Likewise.
825 * linux-nios2-low.c (nios2_regsets): Likewise.
826 * linux-ppc-low.c (ppc_regsets): Likewise.
827 * linux-s390-low.c (s390_regsets): Likewise.
828 * linux-sh-low.c (sh_regsets): Likewise.
829 * linux-sparc-low.c (sparc_regsets): Likewise.
830 * linux-tic6x-low.c (tic6x_regsets): Likewise.
831 * linux-tile-low.c (tile_regsets): Likewise.
832 * linux-x86-low.c (x86_regsets): Likewise.
833 * linux-xtensa-low.c (xtensa_regsets): Likewise.
834
835 2015-10-29 Pedro Alves <palves@redhat.com>
836
837 * linux-low.h (NULL_REGSET): Define.
838 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
839 * linux-arm-low.c (arm_regsets): Likewise.
840 * linux-crisv32-low.c (cris_regsets): Likewise.
841 * linux-m68k-low.c (m68k_regsets): Likewise.
842 * linux-mips-low.c (mips_regsets): Likewise.
843 * linux-nios2-low.c (nios2_regsets): Likewise.
844 * linux-ppc-low.c (ppc_regsets): Likewise.
845 * linux-s390-low.c (s390_regsets): Likewise.
846 * linux-sh-low.c (sh_regsets): Likewise.
847 * linux-sparc-low.c (sparc_regsets): Likewise.
848 * linux-tic6x-low.c (tic6x_regsets): Likewise.
849 * linux-tile-low.c (tile_regsets): Likewise.
850 * linux-x86-low.c (x86_regsets): Likewise.
851 * linux-xtensa-low.c (xtensa_regsets): Likewise.
852
853 2015-10-26 Doug Evans <dje@google.com>
854
855 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
856
857 2015-10-26 Doug Evans <dje@google.com>
858
859 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
860
861 2015-10-26 Doug Evans <dje@google.com>
862
863 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
864 for debug_printf.
865 (attach_thread, find_new_threads_callback): Ditto.
866
867 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
868
869 * mem-break.h (set_breakpoint_data): Remove.
870
871 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
872
873 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
874 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
875 (initialize_low): Remove set_breakpoint_data call.
876 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
877 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
878 (initialize_low): Remove set_breakpoint_data call.
879 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
880 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
881 (initialize_low): Remove set_breakpoint_data call.
882
883 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
884
885 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
886 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
887 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
888 * target.h (target_breakpoint_kind_from_pc): New macro.
889
890 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
891
892 * linux-low.c (default_breakpoint_kind_from_pc): New function.
893 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
894 the default breakpoint kind.
895
896 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
897
898 * linux-arm-low.c (arm_supports_z_point_type): Add software
899 breakpoint support.
900
901 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
902
903 * linux-arm-low.c: Refactor breakpoint definitions.
904 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
905 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
906
907 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
908
909 * Makefile.in: Add arm.c/o.
910 * configure.srv: Likewise.
911 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
912 (arm_breakpoint_kind_from_pc): New function.
913 (arm_sw_breakpoint_from_kind): Return proper kind.
914 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
915
916 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
917
918 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
919 removal.
920 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
921 (struct raw_breakpoint) <size>: Remove.
922 (struct raw_breakpoint) <kind>: Add.
923 (bp_size): New function.
924 (bp_opcode): Likewise.
925 (find_raw_breakpoint_at): Adjust for kind.
926 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
927 (remove_memory_breakpoint): Adjust for kind call bp_size.
928 (set_raw_breakpoint_at): Adjust for kind.
929 (set_breakpoint): Likewise.
930 (set_breakpoint_at): Call breakpoint_kind_from_pc.
931 (delete_raw_breakpoint): Adjust for kind.
932 (delete_breakpoint): Likewise.
933 (find_gdb_breakpoint): Likewise.
934 (set_gdb_breakpoint_1): Likewise.
935 (set_gdb_breakpoint): Likewise.
936 (delete_gdb_breakpoint_1): Likewise.
937 (delete_gdb_breakpoint): Likewise.
938 (uninsert_raw_breakpoint): Likewise.
939 (reinsert_raw_breakpoint): Likewise.
940 (set_breakpoint_data): Remove.
941 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
942 (check_mem_read): Adjust for kind call bp_size.
943 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
944 (clone_one_breakpoint): Adjust for kind.
945 * mem-break.h (set_gdb_breakpoint): Likewise.
946 (delete_gdb_breakpoint): Likewise.
947 * server.c (process_serial_event): Likewise.
948
949 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
950
951 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
952 (struct linux_target_ops) <breakpoint>: Remove.
953 (struct linux_target_ops) <breakpoint_len>: Remove.
954 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
955 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
956 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
957 (arm_sw_breakpoint_from_kind): New function.
958 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
959 (struct linux_target_ops) <breakpoint>: Remove.
960 (struct linux_target_ops) <breakpoint_len>: Remove.
961 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
962 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
963 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
964 (struct linux_target_ops) <breakpoint>: Remove.
965 (struct linux_target_ops) <breakpoint_len>: Remove.
966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
968 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
969 (struct linux_target_ops) <breakpoint>: Remove.
970 (struct linux_target_ops) <breakpoint_len>: Remove.
971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
973 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
974 and sw_breakpoint_from_kind to increment the pc.
975 (linux_breakpoint_kind_from_pc): New function.
976 (linux_sw_breakpoint_from_kind): New function.
977 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
978 (initialize_low): Call breakpoint_kind_from_pc and
979 sw_breakpoint_from_kind to replace breakpoint_data/len.
980 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
981 New field.
982 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
983 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
984 (struct linux_target_ops) <breakpoint>: Remove.
985 (struct linux_target_ops) <breakpoint_len>: Remove.
986 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
987 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
988 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
989 (struct linux_target_ops) <breakpoint>: Remove.
990 (struct linux_target_ops) <breakpoint_len>: Remove.
991 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
992 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
993 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
994 (struct linux_target_ops) <breakpoint>: Remove.
995 (struct linux_target_ops) <breakpoint_len>: Remove.
996 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
997 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
998 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
999 (struct linux_target_ops) <breakpoint>: Remove.
1000 (struct linux_target_ops) <breakpoint_len>: Remove.
1001 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1002 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1003 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1004 (struct linux_target_ops) <breakpoint>: Remove.
1005 (struct linux_target_ops) <breakpoint_len>: Remove.
1006 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1007 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1008 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1009 (struct linux_target_ops) <breakpoint>: Remove.
1010 (struct linux_target_ops) <breakpoint_len>: Remove.
1011 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1012 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1013 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1014 (struct linux_target_ops) <breakpoint>: Remove.
1015 (struct linux_target_ops) <breakpoint_len>: Remove.
1016 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1017 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1018 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1019 (struct linux_target_ops) <breakpoint>: Remove.
1020 (struct linux_target_ops) <breakpoint_len>: Remove.
1021 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1022 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1023 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1024 (struct linux_target_ops) <breakpoint>: Remove.
1025 (struct linux_target_ops) <breakpoint_len>: Remove.
1026 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1027 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1028 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1029 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1030 (struct linux_target_ops) <breakpoint>: Remove.
1031 (struct linux_target_ops) <breakpoint_len>: Remove.
1032 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1033 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1034 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1035 (struct linux_target_ops) <breakpoint>: Remove.
1036 (struct linux_target_ops) <breakpoint_len>: Remove.
1037 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1038 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1039
1040 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1041
1042 * linux-cris-low.c (cris_get_pc): Remove void arg.
1043
1044 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1045
1046 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1047 variable name.
1048
1049 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1050
1051 * inferiors.c (thread_pid_matches_callback): New function.
1052 (find_thread_process): New function.
1053 (remove_thread): Reset current_thread.
1054 (remove_process): Assert threads have been removed first.
1055
1056 2015-10-15 Yao Qi <yao.qi@linaro.org>
1057
1058 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1059 if it is 3.
1060 (aarch64_remove_point): Likewise.
1061 * regcache.c (regcache_register_size): New function.
1062
1063 2015-10-12 Yao Qi <yao.qi@linaro.org>
1064
1065 * linux-aarch64-low.c: Update all callers as emit_load_store
1066 is renamed to aarch64_emit_load_store.
1067
1068 2015-10-12 Yao Qi <yao.qi@linaro.org>
1069
1070 * linux-aarch64-low.c: Update all callers of function renaming
1071 from emit_insn to aarch64_emit_insn.
1072
1073 2015-10-12 Yao Qi <yao.qi@linaro.org>
1074
1075 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1076 arch/aarch64-insn.h.
1077 (struct aarch64_memory_operand): Likewise.
1078 (ENCODE): Likewise.
1079 (emit_insn): Move to arch/aarch64-insn.c.
1080 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1081 (emit_load_store): Move to arch/aarch64-insn.c.
1082 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1083 (can_encode_int32): Remove.
1084
1085 2015-10-12 Yao Qi <yao.qi@linaro.org>
1086
1087 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1088 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1089 (aarch64_relocate_instruction): Likewise.
1090 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1091 (struct aarch64_insn_visitor): Likewise.
1092
1093 2015-10-12 Yao Qi <yao.qi@linaro.org>
1094
1095 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1096 (struct aarch64_insn_visitor): New.
1097 (struct aarch64_insn_relocation_data): New.
1098 (aarch64_ftrace_insn_reloc_b): New function.
1099 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1100 (aarch64_ftrace_insn_reloc_cb): Likewise.
1101 (aarch64_ftrace_insn_reloc_tb): Likewise.
1102 (aarch64_ftrace_insn_reloc_adr): Likewise.
1103 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1104 (aarch64_ftrace_insn_reloc_others): Likewise.
1105 (visitor): New.
1106 (aarch64_relocate_instruction): Use visitor.
1107
1108 2015-10-12 Yao Qi <yao.qi@linaro.org>
1109
1110 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1111 int. Add argument buf.
1112 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1113 aarch64_relocate_instruction.
1114
1115 2015-10-12 Yao Qi <yao.qi@linaro.org>
1116
1117 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1118 argument insn. Remove local variable insn. Don't call
1119 target_read_uint32.
1120 (aarch64_install_fast_tracepoint_jump_pad): Call
1121 target_read_uint32.
1122
1123 2015-09-30 Yao Qi <yao.qi@linaro.org>
1124
1125 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1126 (emit_load_store_pair): Likewise.
1127
1128 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1129
1130 * dll.c (match_dll): Add cast(s).
1131 (unloaded_dll): Likewise.
1132 * linux-low.c (second_thread_of_pid_p): Likewise.
1133 (delete_lwp_callback): Likewise.
1134 (count_events_callback): Likewise.
1135 (select_event_lwp_callback): Likewise.
1136 (linux_set_resume_request): Likewise.
1137 * server.c (accumulate_file_name_length): Likewise.
1138 (emit_dll_description): Likewise.
1139 (handle_qxfer_threads_worker): Likewise.
1140 (visit_actioned_threads): Likewise.
1141 * thread-db.c (any_thread_of): Likewise.
1142 * tracepoint.c (same_process_p): Likewise.
1143 (match_blocktype): Likewise.
1144 (build_traceframe_info_xml): Likewise.
1145
1146 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1147
1148 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1149 assignment.
1150 (gdb_unparse_agent_expr): Likewise.
1151 * hostio.c (require_data): Likewise.
1152 (handle_pread): Likewise.
1153 * linux-low.c (disable_regset): Likewise.
1154 (fetch_register): Likewise.
1155 (store_register): Likewise.
1156 (get_dynamic): Likewise.
1157 (linux_qxfer_libraries_svr4): Likewise.
1158 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1159 (set_fast_tracepoint_jump): Likewise.
1160 (uninsert_fast_tracepoint_jumps_at): Likewise.
1161 (reinsert_fast_tracepoint_jumps_at): Likewise.
1162 (validate_inserted_breakpoint): Likewise.
1163 (clone_agent_expr): Likewise.
1164 * regcache.c (init_register_cache): Likewise.
1165 * remote-utils.c (putpkt_binary_1): Likewise.
1166 (decode_M_packet): Likewise.
1167 (decode_X_packet): Likewise.
1168 (look_up_one_symbol): Likewise.
1169 (relocate_instruction): Likewise.
1170 (monitor_output): Likewise.
1171 * server.c (handle_search_memory): Likewise.
1172 (handle_qxfer_exec_file): Likewise.
1173 (handle_qxfer_libraries): Likewise.
1174 (handle_qxfer): Likewise.
1175 (handle_query): Likewise.
1176 (handle_v_cont): Likewise.
1177 (handle_v_run): Likewise.
1178 (captured_main): Likewise.
1179 * target.c (write_inferior_memory): Likewise.
1180 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1181 * tracepoint.c (init_trace_buffer): Likewise.
1182 (add_tracepoint_action): Likewise.
1183 (add_traceframe): Likewise.
1184 (add_traceframe_block): Likewise.
1185 (cmd_qtdpsrc): Likewise.
1186 (cmd_qtdv): Likewise.
1187 (cmd_qtstatus): Likewise.
1188 (response_source): Likewise.
1189 (response_tsv): Likewise.
1190 (cmd_qtnotes): Likewise.
1191 (gdb_collect): Likewise.
1192 (initialize_tracepoint): Likewise.
1193
1194 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1195
1196 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1197 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1198 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1199 <NOP>: New.
1200 (enum aarch64_condition_codes): New enum.
1201 (w0): New static global.
1202 (fp): Likewise.
1203 (lr): Likewise.
1204 (struct aarch64_memory_operand) <type>: New
1205 MEMORY_OPERAND_POSTINDEX type.
1206 (postindex_memory_operand): New helper function.
1207 (emit_ret): New function.
1208 (emit_load_store_pair): New function, factored out of emit_stp
1209 with support for MEMORY_OPERAND_POSTINDEX.
1210 (emit_stp): Rewrite using emit_load_store_pair.
1211 (emit_ldp): New function.
1212 (emit_load_store): Likewise.
1213 (emit_ldr): Mention post-index instruction in comment.
1214 (emit_ldrh): New function.
1215 (emit_ldrb): New function.
1216 (emit_ldrsw): Mention post-index instruction in comment.
1217 (emit_str): Likewise.
1218 (emit_subs): New function.
1219 (emit_cmp): Likewise.
1220 (emit_and): Likewise.
1221 (emit_orr): Likewise.
1222 (emit_orn): Likewise.
1223 (emit_eor): Likewise.
1224 (emit_mvn): Likewise.
1225 (emit_lslv): Likewise.
1226 (emit_lsrv): Likewise.
1227 (emit_asrv): Likewise.
1228 (emit_mul): Likewise.
1229 (emit_sbfm): Likewise.
1230 (emit_sbfx): Likewise.
1231 (emit_ubfm): Likewise.
1232 (emit_ubfx): Likewise.
1233 (emit_csinc): Likewise.
1234 (emit_cset): Likewise.
1235 (emit_nop): Likewise.
1236 (emit_ops_insns): New helper function.
1237 (emit_pop): Likewise.
1238 (emit_push): Likewise.
1239 (aarch64_emit_prologue): New function.
1240 (aarch64_emit_epilogue): Likewise.
1241 (aarch64_emit_add): Likewise.
1242 (aarch64_emit_sub): Likewise.
1243 (aarch64_emit_mul): Likewise.
1244 (aarch64_emit_lsh): Likewise.
1245 (aarch64_emit_rsh_signed): Likewise.
1246 (aarch64_emit_rsh_unsigned): Likewise.
1247 (aarch64_emit_ext): Likewise.
1248 (aarch64_emit_log_not): Likewise.
1249 (aarch64_emit_bit_and): Likewise.
1250 (aarch64_emit_bit_or): Likewise.
1251 (aarch64_emit_bit_xor): Likewise.
1252 (aarch64_emit_bit_not): Likewise.
1253 (aarch64_emit_equal): Likewise.
1254 (aarch64_emit_less_signed): Likewise.
1255 (aarch64_emit_less_unsigned): Likewise.
1256 (aarch64_emit_ref): Likewise.
1257 (aarch64_emit_if_goto): Likewise.
1258 (aarch64_emit_goto): Likewise.
1259 (aarch64_write_goto_address): Likewise.
1260 (aarch64_emit_const): Likewise.
1261 (aarch64_emit_call): Likewise.
1262 (aarch64_emit_reg): Likewise.
1263 (aarch64_emit_pop): Likewise.
1264 (aarch64_emit_stack_flush): Likewise.
1265 (aarch64_emit_zero_ext): Likewise.
1266 (aarch64_emit_swap): Likewise.
1267 (aarch64_emit_stack_adjust): Likewise.
1268 (aarch64_emit_int_call_1): Likewise.
1269 (aarch64_emit_void_call_2): Likewise.
1270 (aarch64_emit_eq_goto): Likewise.
1271 (aarch64_emit_ne_goto): Likewise.
1272 (aarch64_emit_lt_goto): Likewise.
1273 (aarch64_emit_le_goto): Likewise.
1274 (aarch64_emit_gt_goto): Likewise.
1275 (aarch64_emit_ge_got): Likewise.
1276 (aarch64_emit_ops_impl): New static global variable.
1277 (aarch64_emit_ops): New target function, return
1278 &aarch64_emit_ops_impl.
1279 (struct linux_target_ops): Install it.
1280
1281 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1282
1283 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1284 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1285 aarch64-ipa.o.
1286 * linux-aarch64-ipa.c: New file.
1287 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1288 and endian.h.
1289 (aarch64_get_thread_area): New target method.
1290 (extract_signed_bitfield): New helper function.
1291 (aarch64_decode_ldr_literal): New function.
1292 (enum aarch64_opcodes): New enum.
1293 (struct aarch64_register): New struct.
1294 (struct aarch64_operand): New struct.
1295 (x0): New static global.
1296 (x1): Likewise.
1297 (x2): Likewise.
1298 (x3): Likewise.
1299 (x4): Likewise.
1300 (w2): Likewise.
1301 (ip0): Likewise.
1302 (sp): Likewise.
1303 (xzr): Likewise.
1304 (aarch64_register): New helper function.
1305 (register_operand): Likewise.
1306 (immediate_operand): Likewise.
1307 (struct aarch64_memory_operand): New struct.
1308 (offset_memory_operand): New helper function.
1309 (preindex_memory_operand): Likewise.
1310 (enum aarch64_system_control_registers): New enum.
1311 (ENCODE): New macro.
1312 (emit_insn): New helper function.
1313 (emit_b): New function.
1314 (emit_bcond): Likewise.
1315 (emit_cb): Likewise.
1316 (emit_tb): Likewise.
1317 (emit_blr): Likewise.
1318 (emit_stp): Likewise.
1319 (emit_ldp_q_offset): Likewise.
1320 (emit_stp_q_offset): Likewise.
1321 (emit_load_store): Likewise.
1322 (emit_ldr): Likewise.
1323 (emit_ldrsw): Likewise.
1324 (emit_str): Likewise.
1325 (emit_ldaxr): Likewise.
1326 (emit_stxr): Likewise.
1327 (emit_stlr): Likewise.
1328 (emit_data_processing_reg): Likewise.
1329 (emit_data_processing): Likewise.
1330 (emit_add): Likewise.
1331 (emit_sub): Likewise.
1332 (emit_mov): Likewise.
1333 (emit_movk): Likewise.
1334 (emit_mov_addr): Likewise.
1335 (emit_mrs): Likewise.
1336 (emit_msr): Likewise.
1337 (emit_sevl): Likewise.
1338 (emit_wfe): Likewise.
1339 (append_insns): Likewise.
1340 (can_encode_int32_in): New helper function.
1341 (aarch64_relocate_instruction): New function.
1342 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1343 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1344 (struct linux_target_ops): Install aarch64_get_thread_area,
1345 aarch64_install_fast_tracepoint_jump_pad and
1346 aarch64_get_min_fast_tracepoint_insn_len.
1347
1348 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1349
1350 * Makefile.in (aarch64-insn.o): New rule.
1351 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1352
1353 2015-09-21 Yao Qi <yao.qi@linaro.org>
1354
1355 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1356
1357 2015-09-21 Yao Qi <yao.qi@linaro.org>
1358
1359 * tracepoint.c (max_jump_pad_size): Remove.
1360
1361 2015-09-18 Yao Qi <yao.qi@linaro.org>
1362
1363 * linux-aarch64-low.c: Don't include sys/uio.h.
1364 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1365
1366 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1367
1368 * tracepoint.c (eval_result_type): Change prototype.
1369 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1370
1371 2015-09-15 Pedro Alves <palves@redhat.com>
1372
1373 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1374 Check whether to report exec events instead of checking whether
1375 multiprocess is enabled.
1376
1377 2015-09-15 Pedro Alves <palves@redhat.com>
1378
1379 PR remote/18965
1380 * remote-utils.c (prepare_resume_reply): Merge
1381 TARGET_WAITKIND_VFORK_DONE switch case with the
1382 TARGET_WAITKIND_FORKED case.
1383
1384 2015-09-15 Yao Qi <yao.qi@linaro.org>
1385
1386 * server.c (handle_query): Check string comparison using
1387 "else if" instead of "if".
1388
1389 2015-09-15 Yao Qi <yao.qi@linaro.org>
1390
1391 * server.c (vCont_supported): New global variable.
1392 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1393 matches. Append ";vContSupported+" to own_buf.
1394 (handle_v_requests): Append ";s;S" to own_buf if target supports
1395 hardware single step or vCont_supported is false.
1396 (capture_main): Set vCont_supported to zero.
1397
1398 2015-09-15 Yao Qi <yao.qi@linaro.org>
1399
1400 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1401 it to ...
1402 (linux_supports_hardware_single_step): ... New function.
1403 (linux_target_ops): Update.
1404 * lynx-low.c (lynx_target_ops): Set field
1405 supports_hardware_single_step to target_can_do_hardware_single_step.
1406 * nto-low.c (nto_target_ops): Likewise.
1407 * spu-low.c (spu_target_ops): Likewise.
1408 * win32-low.c (win32_target_ops): Likewise.
1409 * target.c (target_can_do_hardware_single_step): New function.
1410 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1411 Remove. <supports_hardware_single_step>: New field.
1412 (target_supports_conditional_breakpoints): Remove.
1413 (target_supports_hardware_single_step): New macro.
1414 (target_can_do_hardware_single_step): Declare.
1415 * server.c (handle_query): Use target_supports_hardware_single_step
1416 instead of target_supports_conditional_breakpoints.
1417
1418 2015-09-15 Yao Qi <yao.qi@linaro.org>
1419
1420 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1421 function.
1422 (struct linux_target_ops the_low_target): Install
1423 aarch64_linux_siginfo_fixup.
1424
1425 2015-09-11 Don Breazeal <donb@codesourcery.com>
1426 Luis Machado <lgustavo@codesourcery.com>
1427
1428 * linux-low.c (linux_mourn): Static declaration.
1429 (linux_arch_setup): Move in front of
1430 handle_extended_wait.
1431 (linux_arch_setup_thread): New function.
1432 (handle_extended_wait): Handle exec events. Call
1433 linux_arch_setup_thread. Make event_lwp argument a
1434 pointer-to-a-pointer.
1435 (check_zombie_leaders): Do not check stopped threads.
1436 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1437 (linux_low_filter_event): Add lwp and thread for exec'ing
1438 non-leader thread if leader thread has been deleted.
1439 Refactor code into linux_arch_setup_thread and call it.
1440 Pass child lwp pointer by reference to handle_extended_wait.
1441 (linux_wait_for_event_filtered): Update comment.
1442 (linux_wait_1): Prevent clobbering exec event status.
1443 (linux_supports_exec_events): New function.
1444 (linux_target_ops) <supports_exec_events>: Initialize new member.
1445 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1446 new member.
1447 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1448 * server.c (report_exec_events): New global variable.
1449 (handle_query): Handle qSupported query for exec-events feature.
1450 (captured_main): Initialize report_exec_events.
1451 * server.h (report_exec_events): Declare new global variable.
1452 * target.h (struct target_ops) <supports_exec_events>: New
1453 member.
1454 (target_supports_exec_events): New macro.
1455 * win32-low.c (win32_target_ops) <supports_exec_events>:
1456 Initialize new member.
1457
1458 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1459
1460 * linux-low.c (linux_low_enable_btrace): Remove.
1461 (linux_target_ops): Replace linux_low_enable_btrace with
1462 linux_enable_btrace.
1463
1464 2015-09-03 Yao Qi <yao.qi@linaro.org>
1465
1466 * linux-aarch64-low.c (aarch64_insert_point): Call
1467 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1468 returns true.
1469
1470 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1471
1472 * linux-low.c (check_stopped_by_breakpoint): Use
1473 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1474
1475 2015-08-27 Pedro Alves <palves@redhat.com>
1476
1477 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1478
1479 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1480
1481 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1482 the XNEW-family equivalent.
1483 (compile_bytecodes): Likewise.
1484 * dll.c (loaded_dll): Likewise.
1485 * event-loop.c (append_callback_event): Likewise.
1486 (create_file_handler): Likewise.
1487 (create_file_event): Likewise.
1488 * hostio.c (handle_open): Likewise.
1489 * inferiors.c (add_thread): Likewise.
1490 (add_process): Likewise.
1491 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1492 * linux-arm-low.c (arm_new_process): Likewise.
1493 (arm_new_thread): Likewise.
1494 * linux-low.c (add_to_pid_list): Likewise.
1495 (linux_add_process): Likewise.
1496 (handle_extended_wait): Likewise.
1497 (add_lwp): Likewise.
1498 (enqueue_one_deferred_signal): Likewise.
1499 (enqueue_pending_signal): Likewise.
1500 (linux_resume_one_lwp_throw): Likewise.
1501 (linux_resume_one_thread): Likewise.
1502 (linux_read_memory): Likewise.
1503 (linux_write_memory): Likewise.
1504 * linux-mips-low.c (mips_linux_new_process): Likewise.
1505 (mips_linux_new_thread): Likewise.
1506 (mips_add_watchpoint): Likewise.
1507 * linux-x86-low.c (initialize_low_arch): Likewise.
1508 * lynx-low.c (lynx_add_process): Likewise.
1509 * mem-break.c (set_raw_breakpoint_at): Likewise.
1510 (set_breakpoint): Likewise.
1511 (add_condition_to_breakpoint): Likewise.
1512 (add_commands_to_breakpoint): Likewise.
1513 (clone_agent_expr): Likewise.
1514 (clone_one_breakpoint): Likewise.
1515 * regcache.c (new_register_cache): Likewise.
1516 * remote-utils.c (look_up_one_symbol): Likewise.
1517 * server.c (queue_stop_reply): Likewise.
1518 (start_inferior): Likewise.
1519 (queue_stop_reply_callback): Likewise.
1520 (handle_target_event): Likewise.
1521 * spu-low.c (fetch_ppc_memory): Likewise.
1522 (store_ppc_memory): Likewise.
1523 * target.c (set_target_ops): Likewise.
1524 * thread-db.c (thread_db_load_search): Likewise.
1525 (try_thread_db_load_1): Likewise.
1526 * tracepoint.c (add_tracepoint): Likewise.
1527 (add_tracepoint_action): Likewise.
1528 (create_trace_state_variable): Likewise.
1529 (cmd_qtdpsrc): Likewise.
1530 (cmd_qtro): Likewise.
1531 (add_while_stepping_state): Likewise.
1532 * win32-low.c (child_add_thread): Likewise.
1533 (get_image_name): Likewise.
1534
1535 2015-08-25 Yao Qi <yao.qi@linaro.org>
1536
1537 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1538
1539 2015-08-25 Yao Qi <yao.qi@linaro.org>
1540
1541 * Makefile.in (aarch64-linux.o): New rule.
1542 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1543 srv_tgtobj.
1544 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1545 (aarch64_init_debug_reg_state): Make it extern.
1546 (aarch64_linux_prepare_to_resume): Remove.
1547
1548 2015-08-25 Yao Qi <yao.qi@linaro.org>
1549
1550 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1551 lwp_arch_private_info and ptid_of_lwp.
1552
1553 2015-08-25 Yao Qi <yao.qi@linaro.org>
1554
1555 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1556 Find proc_info by find_process_pid. All callers updated.
1557
1558 2015-08-25 Yao Qi <yao.qi@linaro.org>
1559
1560 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1561 Remove.
1562 (debug_reg_change_callback): Remove.
1563 (aarch64_notify_debug_reg_change): Remove.
1564
1565 2015-08-25 Yao Qi <yao.qi@linaro.org>
1566
1567 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1568 Call current_lwp_ptid.
1569
1570 2015-08-25 Yao Qi <yao.qi@linaro.org>
1571
1572 * linux-aarch64-low.c (debug_reg_change_callback): Use
1573 debug_printf.
1574
1575 2015-08-25 Yao Qi <yao.qi@linaro.org>
1576
1577 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1578
1579 2015-08-25 Yao Qi <yao.qi@linaro.org>
1580
1581 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1582
1583 2015-08-25 Yao Qi <yao.qi@linaro.org>
1584
1585 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1586 the code.
1587
1588 2015-08-25 Yao Qi <yao.qi@linaro.org>
1589
1590 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1591 Remove.
1592 (debug_reg_change_callback): Remove argument entry and add argument
1593 lwp. Remove local variable thread. Don't print thread id in the
1594 debugging output. Don't check whether pid of thread equals to pid.
1595 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1596 iterate_over_lwps instead find_inferior.
1597
1598 2015-08-24 Pedro Alves <palves@redhat.com>
1599
1600 * inferiors.c (get_first_process): New function.
1601 * inferiors.h (get_first_process): New declaration.
1602 * remote-utils.c (read_ptid): Default to the first process in the
1603 list, instead of to the current thread's process.
1604
1605 2015-08-24 Pedro Alves <palves@redhat.com>
1606
1607 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1608 * event-loop.c: Likewise.
1609 * remote-utils.c: Likewise.
1610 * tracepoint.c: Likewise.
1611
1612 2015-08-24 Pedro Alves <palves@redhat.com>
1613
1614 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1615 ptid_get_lwp.
1616
1617 2015-08-21 Pedro Alves <palves@redhat.com>
1618
1619 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1620 instead of literal 1.
1621
1622 2015-08-21 Pedro Alves <palves@redhat.com>
1623
1624 * tdesc.c (default_description): Explicitly zero-initialize.
1625
1626 2015-08-21 Pedro Alves <palves@redhat.com>
1627
1628 PR gdb/18749
1629 * inferiors.c (remove_thread): Discard any pending stop reply for
1630 this thread.
1631 * server.c (remove_all_on_match_pid): Rename to ...
1632 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1633 instead of a pid.
1634 (discard_queued_stop_replies): Change parameter to a ptid. Now
1635 extern.
1636 (handle_v_kill, kill_inferior_callback, captured_main)
1637 (process_serial_event): Adjust.
1638 * server.h (discard_queued_stop_replies): Declare.
1639
1640 2015-08-21 Pedro Alves <palves@redhat.com>
1641
1642 * linux-low.c (wait_for_sigstop): Always switch to no thread
1643 selected if the previously current thread dies.
1644 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1645 process instead of the current thread's.
1646 * remote-utils.c (input_interrupt): Don't check if there's no
1647 current thread.
1648 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1649 current thread to the general thread fails, error out.
1650 (handle_qxfer_auxv, handle_qxfer_libraries)
1651 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1652 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1653 (handle_query): Check if there's a thread selected instead of
1654 checking whether there's any thread in the thread list.
1655 (handle_qxfer_threads, handle_qxfer_btrace)
1656 (handle_qxfer_btrace_conf): Don't error out early if there's no
1657 thread in the thread list.
1658 (handle_v_cont, myresume): Don't set the current thread to the
1659 continue thread.
1660 (process_serial_event) <Hg handling>: Also set thread_id if the
1661 previous general thread is still alive.
1662 (process_serial_event) <g/G handling>: If setting the current
1663 thread to the general thread fails, error out.
1664 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1665 thread's lwp instead of the current thread's.
1666 * target.c (set_desired_thread): If the desired thread was not
1667 found, leave the current thread pointing to NULL. Return an int
1668 (boolean) indicating success.
1669 * target.h (set_desired_thread): Change return type to int.
1670
1671 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1672
1673 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1674 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1675 #includes.
1676 (ps_get_thread_area): New function.
1677
1678 2015-08-19 Gary Benson <gbenson@redhat.com>
1679
1680 * hostio.c (handle_pread): Do not attempt to read more data
1681 than hostio_reply_with_data can fit in a packet.
1682
1683 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1684
1685 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1686
1687 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1688
1689 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1690
1691 2015-08-06 Pedro Alves <palves@redhat.com>
1692
1693 * tracepoint.c (expr_eval_result): Now an int.
1694
1695 2015-08-06 Pedro Alves <palves@redhat.com>
1696
1697 * gdbthread.h (struct regcache): Forward declare.
1698 (struct thread_info) <regcache_data>: Now a struct regcache
1699 pointer.
1700 * inferiors.c (inferior_regcache_data)
1701 (set_inferior_regcache_data): Now work with struct regcache
1702 pointers.
1703 * inferiors.h (struct regcache): Forward declare.
1704 (inferior_regcache_data, set_inferior_regcache_data): Now work
1705 with struct regcache pointers.
1706 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1707 (free_register_cache_thread): Remove struct regcache pointer
1708 casts.
1709
1710 2015-08-06 Pedro Alves <palves@redhat.com>
1711
1712 * server.c (captured_main): On error, print the exception message
1713 to stderr, and if run_once is set, throw a quit.
1714
1715 2015-08-06 Pedro Alves <palves@redhat.com>
1716
1717 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1718 the current thread.
1719
1720 2015-08-06 Pedro Alves <palves@redhat.com>
1721
1722 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1723 reading beyond the passed in buffer length.
1724
1725 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1726
1727 * tracepoint.c (symbol_list) <required>: Remove.
1728
1729 2015-08-06 Pedro Alves <palves@redhat.com>
1730
1731 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1732 count if stopping and suspending threads.
1733 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1734 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1735 (linux_detach): Complete an ongoing step-over.
1736 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1737 throughout.
1738 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1739 (linux_wait_1): If passing a signal to the inferior after
1740 finishing a step-over, unsuspend and re-resume all lwps. If we
1741 see a single-step event but the thread should be continuing, don't
1742 pass the trap to gdb.
1743 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1744 internal_error instead of gdb_assert.
1745 (enqueue_pending_signal): New function.
1746 (check_ptrace_stopped_lwp_gone): Add debug output.
1747 (start_step_over): Use internal_error instead of gdb_assert.
1748 (complete_ongoing_step_over): New function.
1749 (linux_resume_one_thread): Don't resume a suspended thread.
1750 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1751 it stepping.
1752
1753 2015-08-06 Pedro Alves <palves@redhat.com>
1754
1755 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1756 (linux_thread_alive): Use lwp_is_marked_dead.
1757 (extended_event_reported): Delete.
1758 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1759 instead of extended_event_reported.
1760 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1761 as well.
1762 (lwp_is_marked_dead): New function.
1763 (lwp_running): Use lwp_is_marked_dead.
1764 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1765 comment.
1766
1767 2015-08-06 Pedro Alves <palves@redhat.com>
1768
1769 * linux-low.c (linux_wait_1): Move fork event output out of the
1770 !report_to_gdb check. Pass event_child->waitstatus to
1771 target_waitstatus_to_string instead of ourstatus.
1772
1773 2015-08-04 Yao Qi <yao.qi@linaro.org>
1774
1775 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1776 if current_thread is 32 bit.
1777
1778 2015-08-04 Yao Qi <yao.qi@linaro.org>
1779
1780 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1781 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1782 * server.c (extended_protocol): Remove "static".
1783 * server.h (extended_protocol): Declare it.
1784
1785 2015-08-04 Yao Qi <yao.qi@linaro.org>
1786
1787 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1788 both aarch64 and aarch32.
1789 (aarch64_set_pc): Likewise.
1790
1791 2015-08-04 Yao Qi <yao.qi@linaro.org>
1792
1793 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1794 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1795 arm-with-neon.xml to srv_xmlfiles.
1796 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1797 (is_64bit_tdesc): New function.
1798 (aarch64_linux_read_description): New function.
1799 (aarch64_arch_setup): Call aarch64_linux_read_description.
1800 (regs_info): Rename to regs_info_aarch64.
1801 (aarch64_regs_info): Return right regs_info.
1802 (initialize_low_arch): Call initialize_low_arch_aarch32.
1803
1804 2015-08-04 Yao Qi <yao.qi@linaro.org>
1805
1806 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1807 * linux-aarch32-low.c: New file.
1808 * linux-aarch32-low.h: New file.
1809 * linux-arm-low.c (arm_fill_gregset): Move it to
1810 linux-aarch32-low.c.
1811 (arm_store_gregset): Likewise.
1812 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1813 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1814 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1815 (regs_info): Rename to regs_info_arm.
1816 (arm_regs_info): Return regs_info_aarch32 if
1817 have_ptrace_getregset is 1 and target description is
1818 arm_with_neon or arm_with_vfpv3.
1819 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1820 Call initialize_low_arch_aarch32 instead.
1821
1822 2015-08-04 Yao Qi <yao.qi@linaro.org>
1823
1824 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1825 * linux-low.c: ... here.
1826 * linux-low.h (have_ptrace_getregset): Declare it.
1827
1828 2015-08-04 Pedro Alves <palves@redhat.com>
1829
1830 * thread-db.c (struct thread_db): Use new typedefs.
1831 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1832 CHK calls.
1833 (disable_thread_event_reporting): Cast result of dlsym to
1834 destination function pointer type.
1835 (thread_db_mourn): Use td_ta_delete_ftype.
1836
1837 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1838
1839 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1840 arch variant.
1841 (CDX_BREAKPOINT): Define for R2.
1842 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1843 (the_low_target): Add comments.
1844
1845 2015-07-30 Yao Qi <yao.qi@linaro.org>
1846
1847 * linux-arm-low.c (arm_hwcap): Remove it.
1848 (arm_read_description): New local variable arm_hwcap. Don't
1849 set arm_hwcap to zero.
1850
1851 2015-07-30 Yao Qi <yao.qi@linaro.org>
1852
1853 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1854 Use regcache->tdesc instead.
1855 (arm_store_wmmxregset): Likewise.
1856 (arm_fill_vfpregset): Likewise.
1857 (arm_store_vfpregset): Likewise.
1858
1859 2015-07-30 Yao Qi <yao.qi@linaro.org>
1860
1861 * linux-arm-low.c: Include arch/arm.h.
1862 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1863 (arm_store_gregset): Likewise.
1864
1865 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1866
1867 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1868 ptrace's 4th parameter.
1869
1870 2015-07-27 Yao Qi <yao.qi@linaro.org>
1871
1872 * configure.srv (case aarch64*-*-linux*): Don't set
1873 srv_linux_usrregs.
1874
1875 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1876
1877 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1878 sys/ptrace.h.
1879 * linux-arm-low.c: Likewise.
1880 * linux-cris-low.c: Likewise.
1881 * linux-crisv32-low.c: Likewise.
1882 * linux-low.c: Likewise.
1883 * linux-m68k-low.c: Likewise.
1884 * linux-mips-low.c: Likewise.
1885 * linux-nios2-low.c: Likewise.
1886 * linux-s390-low.c: Likewise.
1887 * linux-sparc-low.c: Likewise.
1888 * linux-tic6x-low.c: Likewise.
1889 * linux-tile-low.c: Likewise.
1890 * linux-x86-low.c: Likewise.
1891
1892 2015-07-24 Pedro Alves <palves@redhat.com>
1893
1894 * config.in: Regenerate.
1895 * configure: Regenerate.
1896
1897 2015-07-24 Pedro Alves <palves@redhat.com>
1898
1899 * acinclude.m4: Include ../ptrace.m4.
1900 * configure.ac: Call GDB_AC_PTRACE.
1901 * config.in, configure: Regenerate.
1902
1903 2015-07-24 Yao Qi <yao.qi@linaro.org>
1904
1905 * linux-low.c (linux_create_inferior): Remove setting to
1906 proc->priv->new_inferior.
1907 (linux_attach): Likewise.
1908 (linux_low_filter_event): Likewise.
1909 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1910
1911 2015-07-24 Yao Qi <yao.qi@linaro.org>
1912
1913 * linux-low.c (linux_arch_setup): New function.
1914 (linux_low_filter_event): If proc->tdesc is NULL and
1915 proc->attached is true, call the_low_target.arch_setup.
1916 Otherwise, keep status pending, and return.
1917 (linux_resume_one_lwp_throw): Don't call get_pc if
1918 thread->while_stepping isn't NULL. Don't call
1919 get_thread_regcache if proc->tdesc is NULL.
1920 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1921 (linux_target_ops): Install arch_setup.
1922 * server.c (start_inferior): Call the_target->arch_setup.
1923 * target.h (struct target_ops) <arch_setup>: New field.
1924 (target_arch_setup): New marco.
1925 * lynx-low.c (lynx_target_ops): Update.
1926 * nto-low.c (nto_target_ops): Update.
1927 * spu-low.c (spu_target_ops): Update.
1928 * win32-low.c (win32_target_ops): Update.
1929
1930 2015-07-24 Yao Qi <yao.qi@linaro.org>
1931
1932 * linux-low.c (linux_add_process): Don't set
1933 proc->priv->new_inferior.
1934 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1935 (linux_attach): Likewise.
1936
1937 2015-07-24 Yao Qi <yao.qi@linaro.org>
1938
1939 * server.c (start_inferior): Code refactor.
1940
1941 2015-07-24 Yao Qi <yao.qi@linaro.org>
1942
1943 * server.c (process_serial_event): Set general_thread.
1944
1945 2015-07-21 Yao Qi <yao.qi@linaro.org>
1946
1947 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1948 aarch64_linux_get_debug_reg_capacity.
1949
1950 2015-07-17 Yao Qi <yao.qi@linaro.org>
1951
1952 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1953 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1954 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1955 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1956 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1957 (AARCH64_HWP_ALIGNMENT): Likewise.
1958 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1959 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1960 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1961 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1962 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1963 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1964 (struct aarch64_debug_reg_state): Likewise.
1965 (struct arch_lwp_info): Likewise.
1966 (aarch64_align_watchpoint): Likewise.
1967 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1968 (aarch64_watchpoint_length): Likewise.
1969 (aarch64_point_encode_ctrl_reg): Likewise
1970 (aarch64_point_is_aligned): Likewise.
1971 (aarch64_align_watchpoint): Likewise.
1972 (aarch64_linux_set_debug_regs):
1973 (aarch64_dr_state_insert_one_point): Likewise.
1974 (aarch64_dr_state_remove_one_point): Likewise.
1975 (aarch64_handle_breakpoint): Likewise.
1976 (aarch64_handle_aligned_watchpoint): Likewise.
1977 (aarch64_handle_unaligned_watchpoint): Likewise.
1978 (aarch64_handle_watchpoint): Likewise.
1979
1980 2015-07-17 Yao Qi <yao.qi@linaro.org>
1981
1982 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1983 and don't aarch64_get_debug_reg_state. All callers update.
1984 (aarch64_handle_aligned_watchpoint): Likewise.
1985 (aarch64_handle_unaligned_watchpoint): Likewise.
1986 (aarch64_handle_watchpoint): Likewise.
1987 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1988 (aarch64_remove_point): Likewise.
1989
1990 2015-07-17 Yao Qi <yao.qi@linaro.org>
1991
1992 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1993 debug_printf.
1994 (aarch64_handle_unaligned_watchpoint): Likewise.
1995
1996 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1997
1998 Revert the previous 3 commits:
1999 Move gdb_regex* to common/
2000 Move linux_find_memory_regions_full & co.
2001 gdbserver build-id attribute generator
2002
2003 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2004 Jan Kratochvil <jan.kratochvil@redhat.com>
2005
2006 gdbserver build-id attribute generator.
2007 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2008 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2009 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2010 (find_phdr): New.
2011 (get_dynamic): Use find_pdhr to traverse program headers.
2012 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2013 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2014 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2015 (get_hex_build_id): New.
2016 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2017 to reply XML document.
2018
2019 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2020 Jan Kratochvil <jan.kratochvil@redhat.com>
2021
2022 * target.c: Include target/target-utils.h and fcntl.h.
2023 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2024 (target_fileio_read_stralloc): New functions.
2025
2026 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2027
2028 * Makefile.in (OBS): Add gdb_regex.o.
2029 (gdb_regex.o): New.
2030 * config.in: Rebuilt.
2031 * configure: Rebuilt.
2032
2033 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2034 Jan Kratochvil <jan.kratochvil@redhat.com>
2035
2036 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2037 * Makefile.in (OBS): Add target-utils.o.
2038 (linux-maps.o, target-utils.o): New.
2039 * configure.srv (srv_linux_obj): Add linux-maps.o.
2040
2041 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2042
2043 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2044 function, return 1.
2045 (the_low_target): Install it.
2046
2047 2015-07-14 Pedro Alves <palves@redhat.com>
2048
2049 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2050 Instead, ignore ECHILD, and throw an error for other errnos.
2051
2052 2015-07-10 Pedro Alves <palves@redhat.com>
2053
2054 * event-loop.c (struct callback_event) <data>: Change type to
2055 gdb_client_data instance instead of gdb_client_data pointer.
2056 (append_callback_event): Adjust.
2057
2058 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2059
2060 * linux-aarch64-low.c: Add comments for each linux_target_ops
2061 method. Remove comments already covered in target_ops and
2062 linux_target_ops definitions.
2063 (the_low_target): Add comments for each unimplemented method.
2064
2065 2015-07-09 Yao Qi <yao.qi@linaro.org>
2066
2067 * linux-aarch64-low.c (aarch64_regmap): Remove.
2068 (aarch64_usrregs_info): Remove.
2069 (regs_info): Set field usrregs to NULL.
2070
2071 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2072
2073 * linux-low.c: Include "rsp-low.h"
2074 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2075 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2076 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2077 (handle_btrace_enable_pt): New.
2078 (handle_btrace_general_set): Support "pt".
2079 (handle_btrace_conf_general_set): Support "pt:size".
2080
2081 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2082
2083 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2084 Z_PACKET_SW_BP.
2085
2086 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2087
2088 * linux-aarch64-low.c: Remove comment about endianness.
2089 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2090 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2091 memcmp.
2092
2093 2015-06-24 Gary Benson <gbenson@redhat.com>
2094
2095 * linux-i386-ipa.c (stdint.h): Do not include.
2096 * lynx-i386-low.c (stdint.h): Likewise.
2097 * lynx-ppc-low.c (stdint.h): Likewise.
2098 * mem-break.c (stdint.h): Likewise.
2099 * thread-db.c (stdint.h): Likewise.
2100 * tracepoint.c (stdint.h): Likewise.
2101 * win32-low.c (stdint.h): Likewise.
2102
2103 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2104
2105 * server.c (write_qxfer_response): Update call to
2106 remote_escape_output.
2107
2108 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2109 Jan Kratochvil <jan.kratochvil@redhat.com>
2110
2111 Merge multiple hex conversions.
2112 * gdbreplay.c (tohex): Rename to 'fromhex'.
2113 (logchar): Use fromhex.
2114
2115 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2116
2117 * server.c (handle_qxfer_libraries): Set `version' attribute for
2118 <library-list>.
2119
2120 2015-06-10 Gary Benson <gbenson@redhat.com>
2121
2122 * target.h (struct target_ops) <multifs_open>: New field.
2123 <multifs_unlink>: Likewise.
2124 <multifs_readlink>: Likewise.
2125 * linux-low.c (nat/linux-namespaces.h): New include.
2126 (linux_target_ops): Initialize the_target->multifs_open,
2127 the_target->multifs_unlink and the_target->multifs_readlink.
2128 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2129 * hostio.c (hostio_fs_pid): New static variable.
2130 (hostio_handle_new_gdb_connection): New function.
2131 (handle_setfs): Likewise.
2132 (handle_open): Use the_target->multifs_open as appropriate.
2133 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2134 (handle_readlink): Use the_target->multifs_readlink as
2135 appropriate.
2136 (handle_vFile): Handle vFile:setfs packets.
2137 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2138 after target_handle_new_gdb_connection.
2139
2140 2015-06-10 Gary Benson <gbenson@redhat.com>
2141
2142 * configure.ac (AC_CHECK_FUNCS): Add setns.
2143 * config.in: Regenerate.
2144 * configure: Likewise.
2145 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2146 (linux-namespaces.o): New rule.
2147 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2148
2149 2015-06-09 Gary Benson <gbenson@redhat.com>
2150
2151 * hostio.c (handle_open): Process mode argument with
2152 fileio_to_host_mode.
2153
2154 2015-06-01 Yao Qi <yao.qi@linaro.org>
2155
2156 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2157 * linux-x86-low.c: Likewise.
2158
2159 2015-05-28 Don Breazeal <donb@codesourcery.com>
2160
2161 * linux-low.c (handle_extended_wait): Initialize
2162 thread_info.last_resume_kind for new fork children.
2163
2164 2015-05-15 Pedro Alves <palves@redhat.com>
2165
2166 * target.h (target_handle_new_gdb_connection): Rewrite using if
2167 wrapped in do/while.
2168
2169 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2170
2171 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2172 * configure, config.in: Regenerate.
2173 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2174 Declare typedef.
2175
2176 2015-05-12 Don Breazeal <donb@codesourcery.com>
2177
2178 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2179 PTRACE_EVENT_VFORK_DONE.
2180 (linux_low_ptrace_options, extended_event_reported): Add vfork
2181 events.
2182 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2183 and "vforkdone" for RSP 'T' Stop Reply Packet.
2184 * server.h (report_vfork_events): Declare
2185 global variable.
2186
2187 2015-05-12 Don Breazeal <donb@codesourcery.com>
2188
2189 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2190 (the_low_target) <new_fork>: Initialize new member.
2191 * linux-arm-low.c (arm_new_fork): New function.
2192 (the_low_target) <new_fork>: Initialize new member.
2193 * linux-low.c (handle_extended_wait): Call new target function
2194 new_fork.
2195 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2196 * linux-mips-low.c (mips_add_watchpoint): New function
2197 extracted from mips_insert_point.
2198 (the_low_target) <new_fork>: Initialize new member.
2199 (mips_linux_new_fork): New function.
2200 (mips_insert_point): Call mips_add_watchpoint.
2201 * linux-x86-low.c (x86_linux_new_fork): New function.
2202 (the_low_target) <new_fork>: Initialize new member.
2203
2204 2015-05-12 Don Breazeal <donb@codesourcery.com>
2205
2206 * linux-low.c (handle_extended_wait): Implement return value,
2207 rename argument 'event_child' to 'event_lwp', handle
2208 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2209 (linux_low_ptrace_options): New function.
2210 (linux_low_filter_event): Call linux_low_ptrace_options,
2211 use different argument fo linux_enable_event_reporting,
2212 use return value from handle_extended_wait.
2213 (extended_event_reported): New function.
2214 (linux_wait_1): Call extended_event_reported and set
2215 status to report fork events.
2216 (linux_write_memory): Add pid to debug message.
2217 (reset_lwp_ptrace_options_callback): New function.
2218 (linux_handle_new_gdb_connection): New function.
2219 (linux_target_ops): Initialize new structure member.
2220 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2221 * lynx-low.c: Initialize new structure member.
2222 * remote-utils.c (prepare_resume_reply): Implement stop reason
2223 "fork" for "T" stop message.
2224 * server.c (handle_query): Call handle_new_gdb_connection.
2225 * server.h (report_fork_events): Declare global flag.
2226 * target.h (struct target_ops) <handle_new_gdb_connection>:
2227 New member.
2228 (target_handle_new_gdb_connection): New macro.
2229 * win32-low.c: Initialize new structure member.
2230
2231 2015-05-12 Don Breazeal <donb@codesourcery.com>
2232
2233 * mem-break.c (APPEND_TO_LIST): Define macro.
2234 (clone_agent_expr): New function.
2235 (clone_one_breakpoint): New function.
2236 (clone_all_breakpoints): New function.
2237 * mem-break.h: Declare new functions.
2238
2239 2015-05-12 Don Breazeal <donb@codesourcery.com>
2240
2241 * linux-low.c (linux_supports_fork_events): New function.
2242 (linux_supports_vfork_events): New function.
2243 (linux_target_ops): Initialize new structure members.
2244 (initialize_low): Call linux_check_ptrace_features.
2245 * lynx-low.c (lynx_target_ops): Initialize new structure
2246 members.
2247 * server.c (report_fork_events, report_vfork_events):
2248 New global flags.
2249 (handle_query): Add new features to qSupported packet and
2250 response.
2251 (captured_main): Initialize new global variables.
2252 * target.h (struct target_ops) <supports_fork_events>:
2253 New member.
2254 <supports_vfork_events>: New member.
2255 (target_supports_fork_events): New macro.
2256 (target_supports_vfork_events): New macro.
2257 * win32-low.c (win32_target_ops): Initialize new structure
2258 members.
2259
2260 2015-05-12 Gary Benson <gbenson@redhat.com>
2261
2262 * server.c (handle_qxfer_exec_file): Use current process
2263 if annex is empty.
2264
2265 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2266
2267 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2268 Remove HAVE_PTRACE_GETREGS conditionals.
2269 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2270 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2271
2272 2015-05-08 Yao Qi <yao.qi@linaro.org>
2273
2274 * linux-low.c (linux_supports_conditional_breakpoints): New
2275 function.
2276 (linux_target_ops): Install new target method.
2277 * lynx-low.c (lynx_target_ops): Install NULL hook for
2278 supports_conditional_breakpoints.
2279 * nto-low.c (nto_target_ops): Likewise.
2280 * spu-low.c (spu_target_ops): Likewise.
2281 * win32-low.c (win32_target_ops): Likewise.
2282 * server.c (handle_query): Check
2283 target_supports_conditional_breakpoints.
2284 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2285 New field.
2286 (target_supports_conditional_breakpoints): New macro.
2287
2288 2015-05-06 Pedro Alves <palves@redhat.com>
2289
2290 PR server/18081
2291 * server.c (start_inferior): If the process exits, mourn it.
2292
2293 2015-04-21 Gary Benson <gbenson@redhat.com>
2294
2295 * hostio.c (fileio_open_flags_to_host): Factored out to
2296 fileio_to_host_openflags in common/fileio.c. Single use
2297 updated.
2298
2299 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2300
2301 * linux-xtensa-low.c (xtensa_fill_gregset)
2302 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2303 XCHAL_HAVE_LOOP.
2304
2305 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2306
2307 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2308 (regs_info): Replace usrregs pointer with NULL.
2309
2310 2015-04-17 Gary Benson <gbenson@redhat.com>
2311
2312 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2313 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2314 * server.c (handle_qxfer_exec_file): New function.
2315 (qxfer_packets): Add exec-file entry.
2316 (handle_query): Report qXfer:exec-file:read as supported packet.
2317
2318 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2319
2320 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2321
2322 2015-04-09 Gary Benson <gbenson@redhat.com>
2323
2324 * hostio-errno.c (errno_to_fileio_error): Remove function.
2325 Update caller to use remote_fileio_to_fio_error.
2326
2327 2015-04-09 Yao Qi <yao.qi@linaro.org>
2328
2329 * linux-low.c (linux_insert_point): Call
2330 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2331 (linux_remove_point): Call remove_memory_breakpoint if type is
2332 raw_bkpt_type_sw.
2333 * linux-x86-low.c (x86_insert_point): Don't call
2334 insert_memory_breakpoint.
2335 (x86_remove_point): Don't call remove_memory_breakpoint.
2336
2337 2015-04-01 Pedro Alves <palves@redhat.com>
2338 Cleber Rosa <crosa@redhat.com>
2339
2340 * server.c (gdbserver_usage): Reorganize and extend the usage
2341 message.
2342
2343 2015-03-24 Pedro Alves <palves@redhat.com>
2344
2345 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2346 output. Also dump TRAP_TRACE.
2347 (linux_low_filter_event): In debug output, distinguish a
2348 resume_stop SIGSTOP from a delayed SIGSTOP.
2349
2350 2015-03-24 Gary Benson <gbenson@redhat.com>
2351
2352 * linux-x86-low.c (x86_linux_new_thread): Moved to
2353 nat/x86-linux.c.
2354 (x86_linux_prepare_to_resume): Likewise.
2355
2356 2015-03-24 Gary Benson <gbenson@redhat.com>
2357
2358 * Makefile.in (x86-linux-dregs.o): New rule.
2359 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2360 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2361 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2362 (x86_linux_dr_get): Likewise.
2363 (x86_linux_dr_set): Likewise.
2364 (update_debug_registers_callback): Likewise.
2365 (x86_linux_dr_set_addr): Likewise.
2366 (x86_linux_dr_get_addr): Likewise.
2367 (x86_linux_dr_set_control): Likewise.
2368 (x86_linux_dr_get_control): Likewise.
2369 (x86_linux_dr_get_status): Likewise.
2370 (x86_linux_update_debug_registers): Likewise.
2371
2372 2015-03-24 Gary Benson <gbenson@redhat.com>
2373
2374 * linux-x86-low.c (x86_linux_update_debug_registers):
2375 New function, factored out from...
2376 (x86_linux_prepare_to_resume): ...this.
2377
2378 2015-03-24 Gary Benson <gbenson@redhat.com>
2379
2380 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2381 (x86_linux_dr_set): Likewise.
2382 (update_debug_registers_callback): Likewise.
2383 (x86_linux_dr_set_addr): Likewise.
2384 (x86_linux_dr_get_addr): Likewise.
2385 (x86_linux_dr_set_control): Likewise.
2386 (x86_linux_dr_get_control): Likewise.
2387 (x86_linux_dr_get_status): Likewise.
2388 (x86_linux_prepare_to_resume): Likewise.
2389
2390 2015-03-24 Gary Benson <gbenson@redhat.com>
2391
2392 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2393 Use perror_with_name. Pass string through gettext.
2394 (x86_linux_dr_set): Likewise.
2395
2396 2015-03-24 Gary Benson <gbenson@redhat.com>
2397
2398 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2399 (x86_linux_dr_set_addr): ...this.
2400 (x86_dr_low_get_addr): Rename to...
2401 (x86_linux_dr_get_addr): ...this.
2402 (x86_dr_low_set_control): Rename to...
2403 (x86_linux_dr_set_control): ...this.
2404 (x86_dr_low_get_control): Rename to...
2405 (x86_linux_dr_get_control): ...this.
2406 (x86_dr_low_get_status): Rename to...
2407 (x86_linux_dr_get_status): ...this.
2408 (x86_dr_low): Update with new function names.
2409
2410 2015-03-24 Gary Benson <gbenson@redhat.com>
2411
2412 * Makefile.in (x86-linux.o): New rule.
2413 * configure.srv: Add x86-linux.o to relevant targets.
2414 * linux-low.c (lwp_set_arch_private_info): New function.
2415 (lwp_arch_private_info): Likewise.
2416 * linux-x86-low.c: Include nat/x86-linux.h.
2417 (arch_lwp_info): Removed structure.
2418 (update_debug_registers_callback):
2419 Use lwp_set_debug_registers_changed.
2420 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2421 and lwp_set_debug_registers_changed.
2422 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2423
2424 2015-03-24 Gary Benson <gbenson@redhat.com>
2425
2426 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2427 * linux-arm-low.c (arm_new_thread): Likewise.
2428 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2429 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2430 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2431 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2432
2433 2015-03-24 Gary Benson <gbenson@redhat.com>
2434
2435 * linux-low.c (ptid_of_lwp): New function.
2436 (lwp_is_stopped): Likewise.
2437 (lwp_stop_reason): Likewise.
2438 * linux-x86-low.c (update_debug_registers_callback):
2439 Use lwp_is_stopped.
2440 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2441 lwp_stop_reason.
2442
2443 2015-03-24 Gary Benson <gbenson@redhat.com>
2444
2445 * linux-low.h (linux_stop_lwp): Remove declaration.
2446
2447 2015-03-24 Gary Benson <gbenson@redhat.com>
2448
2449 * linux-low.h: Include nat/linux-nat.h.
2450 * linux-low.c (iterate_over_lwps_args): New structure.
2451 (iterate_over_lwps_filter): New function.
2452 (iterate_over_lwps): Likewise.
2453 * linux-x86-low.c (update_debug_registers_callback):
2454 Update signature to what iterate_over_lwps expects.
2455 Remove PID check that iterate_over_lwps now performs.
2456 (x86_dr_low_set_addr): Use iterate_over_lwps.
2457 (x86_dr_low_set_control): Likewise.
2458
2459 2015-03-24 Gary Benson <gbenson@redhat.com>
2460
2461 * linux-x86-low.c (x86_debug_reg_state): New function.
2462 (x86_linux_prepare_to_resume): Use the above.
2463
2464 2015-03-24 Gary Benson <gbenson@redhat.com>
2465
2466 * linux-low.c (current_lwp_ptid): New function.
2467 * linux-x86-low.c: Include nat/linux-nat.h.
2468 (x86_dr_low_get_addr): Use current_lwp_ptid.
2469 (x86_dr_low_get_control): Likewise.
2470 (x86_dr_low_get_status): Likewise.
2471
2472 2015-03-20 Pedro Alves <palves@redhat.com>
2473
2474 * tracepoint.c (cmd_qtstatus): Make "str" const.
2475
2476 2015-03-20 Pedro Alves <palves@redhat.com>
2477
2478 * server.c (handle_general_set): Make "req_str" const.
2479
2480 2015-03-19 Pedro Alves <palves@redhat.com>
2481
2482 * linux-low.c (linux_resume_one_lwp): Rename to ...
2483 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2484 instead call perror_with_name.
2485 (check_ptrace_stopped_lwp_gone): New function.
2486 (linux_resume_one_lwp): Reimplement as wrapper around
2487 linux_resume_one_lwp_throw that swallows errors if the LWP is
2488 gone.
2489
2490 2015-03-19 Pedro Alves <palves@redhat.com>
2491
2492 * linux-low.c (count_events_callback, select_event_lwp_callback):
2493 No longer check whether the thread has resume_stop as last resume
2494 kind.
2495
2496 2015-03-19 Pedro Alves <palves@redhat.com>
2497
2498 * linux-low.c (count_events_callback, select_event_lwp_callback):
2499 Use the lwp's status_pending_p field, not the thread's.
2500
2501 2015-03-19 Pedro Alves <palves@redhat.com>
2502
2503 * linux-low.c (select_event_lwp_callback): Update comments to
2504 no longer mention SIGTRAP.
2505
2506 2015-03-18 Gary Benson <gbenson@redhat.com>
2507
2508 * server.c (handle_query): Do not report vFile:fstat as supported.
2509
2510 2015-03-11 Gary Benson <gbenson@redhat.com>
2511
2512 * hostio.c (sys/types.h): New include.
2513 (sys/stat.h): Likewise.
2514 (common-remote-fileio.h): Likewise.
2515 (handle_fstat): New function.
2516 (handle_vFile): Handle vFile:fstat packets.
2517
2518 2015-03-11 Gary Benson <gbenson@redhat.com>
2519
2520 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2521 struct stat.st_blocks and struct stat.st_blksize.
2522 * configure: Regenerate.
2523 * config.in: Likewise.
2524 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2525 (OBS): Add common-remote-fileio.o.
2526 (common-remote-fileio.o): New rule.
2527
2528 2015-03-09 Pedro Alves <palves@redhat.com>
2529
2530 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2531 'struct sockaddr' pointer in 'accept' call.
2532
2533 2015-03-09 Pedro Alves <palves@redhat.com>
2534
2535 Revert:
2536 2015-03-07 Pedro Alves <palves@redhat.com>
2537 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2538 or <winsock2.h> here. Instead include "gdb_socket.h".
2539 (remote_open): Use union gdb_sockaddr_u.
2540 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2541 or <winsock2.h> here. Instead include "gdb_socket.h".
2542 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2543 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2544 or <sys/un.h>.
2545 (init_named_socket, gdb_agent_helper_thread): Use union
2546 gdb_sockaddr_u.
2547
2548 2015-03-07 Pedro Alves <palves@redhat.com>
2549
2550 * configure.ac (build_warnings): Move
2551 -Wdeclaration-after-statement to the C-specific set.
2552 * configure: Regenerate.
2553
2554 2015-03-07 Pedro Alves <palves@redhat.com>
2555
2556 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2557 or <winsock2.h> here. Instead include "gdb_socket.h".
2558 (remote_open): Use union gdb_sockaddr_u.
2559 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2560 or <winsock2.h> here. Instead include "gdb_socket.h".
2561 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2562 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2563 or <sys/un.h>.
2564 (init_named_socket, gdb_agent_helper_thread): Use union
2565 gdb_sockaddr_u.
2566
2567 2015-03-07 Pedro Alves <palves@redhat.com>
2568
2569 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2570 instead.
2571
2572 2015-03-06 Yao Qi <yao.qi@linaro.org>
2573
2574 * linux-aarch64-low.c (aarch64_insert_point): Use
2575 show_debug_regs as a boolean.
2576 (aarch64_remove_point): Likewise.
2577
2578 2015-03-05 Pedro Alves <palves@redhat.com>
2579
2580 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2581 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2582 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2583 * nto-low.c (nto_target_ops): Likewise.
2584 * spu-low.c (spu_target_ops): Likewise.
2585 * win32-low.c (win32_target_ops): Likewise.
2586
2587 2015-03-04 Pedro Alves <palves@redhat.com>
2588
2589 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2590 Decide whether a breakpoint triggered based on the SIGTRAP's
2591 siginfo.si_code.
2592 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2593 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2594 (linux_low_filter_event): Check for breakpoints before checking
2595 watchpoints.
2596 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2597 siginfo.si_code.
2598 (linux_stopped_by_sw_breakpoint)
2599 (linux_supports_stopped_by_sw_breakpoint)
2600 (linux_stopped_by_hw_breakpoint)
2601 (linux_supports_stopped_by_hw_breakpoint): New functions.
2602 (linux_target_ops): Install new target methods.
2603
2604 2015-03-04 Pedro Alves <palves@redhat.com>
2605
2606 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2607 * server.c (swbreak_feature, hwbreak_feature): New globals.
2608 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2609 (captured_main): Clear swbreak_feature and hwbreak_feature.
2610 * server.h (swbreak_feature, hwbreak_feature): Declare.
2611 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2612 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2613 supports_stopped_by_hw_breakpoint>: New fields.
2614 (target_supports_stopped_by_sw_breakpoint)
2615 (target_stopped_by_sw_breakpoint)
2616 (target_supports_stopped_by_hw_breakpoint)
2617 (target_stopped_by_hw_breakpoint): Declare.
2618
2619 2015-03-04 Pedro Alves <palves@redhat.com>
2620
2621 enum lwp_stop_reason -> enum target_stop_reason
2622 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2623 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2624 (linux_wait_1, stuck_in_jump_pad_callback)
2625 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2626 (linux_stopped_by_watchpoint):
2627 * linux-low.h (enum lwp_stop_reason): Delete.
2628 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2629 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2630
2631 2015-03-04 Yao Qi <yao.qi@linaro.org>
2632
2633 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2634
2635 2015-03-03 Gary Benson <gbenson@redhat.com>
2636
2637 * hostio.c (handle_vFile): Fix prefix lengths.
2638
2639 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2640
2641 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2642 ptr_bits.
2643
2644 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2645
2646 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2647 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2648 (clean): Add "rm -f" for above C files.
2649 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2650 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2651 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2652 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2653 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2654 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2655 (init_registers_s390x_vx_linux64)
2656 (init_registers_s390x_tevx_linux64)
2657 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2658 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2659 declarations.
2660 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2661 (s390_store_vxrs_high): New functions.
2662 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2663 NT_S390_VXRS_HIGH.
2664 (s390_arch_setup): Add logic for selecting one of the new target
2665 descriptions. Activate the new vector regsets if applicable.
2666 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2667 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2668 and init_registers_s390x_tevx_linux64.
2669
2670 2015-03-01 Pedro Alves <palves@redhat.com>
2671
2672 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2673 parameter.
2674
2675 2015-02-27 Pedro Alves <palves@redhat.com>
2676
2677 * linux-x86-low.c (u_debugreg_offset): New function.
2678 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2679
2680 2015-02-27 Pedro Alves <palves@redhat.com>
2681
2682 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2683 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2684 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2685 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2686 (ps_lsetfpregs, ps_getpid)
2687 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2688 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2689 (ps_lsetxregs, ps_plog): Declare.
2690
2691 2015-02-27 Pedro Alves <palves@redhat.com>
2692
2693 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2694 IP_AGENT_EXPORT_FUNC.
2695 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2696 IP_AGENT_EXPORT_FUNC.
2697 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2698 (IP_AGENT_EXPORT): Delete.
2699 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2700 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2701 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2702 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2703 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2704 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2705 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2706 (traceframe_read_count, traceframe_write_count)
2707 (traceframes_created, trace_state_variables, get_raw_reg)
2708 (get_trace_state_variable_value, set_trace_state_variable_value)
2709 (ust_loaded, helper_thread_id, cmd_buf): Use
2710 IPA_SYM_EXPORTED_NAME.
2711 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2712 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2713 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2714 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2715 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2716 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2717 EXTERN_C_PUSH/EXTERN_C_POP.
2718 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2719 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2720 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2721 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2722 (traceframe_write_count, traceframe_read_count)
2723 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2724 (about_to_request_buffer_space, get_trace_state_variable_value)
2725 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2726 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2727 EXTERN_C_PUSH/EXTERN_C_POP.
2728 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2729 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2730 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2731 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2732 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2733 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2734 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2735 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2736 Define.
2737 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2738 (IP_AGENT_EXPORT_VAR_DECL): Define.
2739 (tracing): Declare.
2740 (gdb_agent_get_raw_reg): Declare.
2741
2742 2015-02-27 Tom Tromey <tromey@redhat.com>
2743 Pedro Alves <palves@redhat.com>
2744
2745 Rename symbols whose names are reserved C++ keywords throughout.
2746
2747 2015-02-27 Pedro Alves <palves@redhat.com>
2748
2749 * Makefile.in (COMPILER): New, get it from autoconf.
2750 (CXX): Get from autoconf instead.
2751 (COMPILE.pre): Use COMPILER.
2752 (CC-LD): Rename to ...
2753 (CC_LD): ... this. Use COMPILER.
2754 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2755 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2756 * acinclude.m4: Include build-with-cxx.m4.
2757 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2758 Disable -Werror by default if building in C++ mode.
2759 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2760 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2761 the C++ compiler. Save/restore CXXFLAGS too.
2762 * configure: Regenerate.
2763
2764 2015-02-27 Pedro Alves <palves@redhat.com>
2765
2766 * acinclude.m4: Include libiberty.m4.
2767 * configure.ac: Call libiberty_INIT.
2768 * config.in, configure: Regenerate.
2769
2770 2015-02-26 Pedro Alves <palves@redhat.com>
2771
2772 * linux-low.c (linux_wait_1): When incrementing the PC past a
2773 program breakpoint always use the_low_target.breakpoint_len as
2774 increment, rather than the maximum between that and
2775 the_low_target.decr_pc_after_break.
2776
2777 2015-02-23 Pedro Alves <palves@redhat.com>
2778
2779 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2780 thread was doing a step-over; always adjust the PC if
2781 we stepped over a permanent breakpoint.
2782 (linux_wait_1): If we stepped over breakpoint that was on top of a
2783 permanent breakpoint, manually advance the PC past it.
2784
2785 2015-02-23 Pedro Alves <palves@redhat.com>
2786
2787 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2788 modes.
2789 (x86_fill_gregset, x86_store_gregset): Use it when handling
2790 $orig_eax.
2791
2792 2015-02-20 Pedro Alves <palves@redhat.com>
2793
2794 * thread-db.c: Include "nat/linux-procfs.h".
2795 (thread_db_init): Skip listing new threads if the kernel supports
2796 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2797
2798 2015-02-20 Pedro Alves <palves@redhat.com>
2799
2800 * linux-low.c (status_pending_p_callback): Use ptid_match.
2801
2802 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2803
2804 PR breakpoints/16812
2805 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2806 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2807 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2808
2809 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2810
2811 PR breakpoints/15956
2812 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2813
2814 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2815
2816 * linux-low.c (linux_low_btrace_conf): Print size.
2817 * server.c (handle_btrace_conf_general_set): New.
2818 (hanle_general_set): Call handle_btrace_conf_general_set.
2819 (handle_query): Report Qbtrace-conf:bts:size as supported.
2820
2821 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2822
2823 * linux-low.c (linux_low_enable_btrace): Update parameters.
2824 (linux_low_btrace_conf): New.
2825 (linux_target_ops)<to_btrace_conf>: Initialize.
2826 * server.c (current_btrace_conf): New.
2827 (handle_btrace_enable): Rename to ...
2828 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2829 to target_enable_btrace. Update comment. Update users.
2830 (handle_qxfer_btrace_conf): New.
2831 (qxfer_packets): Add btrace-conf entry.
2832 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2833 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2834 (target_ops)<read_btrace_conf>: New.
2835 (target_enable_btrace): Update parameters.
2836 (target_read_btrace_conf): New.
2837
2838 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2839
2840 * server.c (handle_btrace_general_set): Remove call to
2841 target_supports_btrace.
2842 (supported_btrace_packets): New.
2843 (handle_query): Call supported_btrace_packets.
2844 * target.h: include btrace-common.h.
2845 (btrace_target_info): Removed.
2846 (supports_btrace, target_supports_btrace): Update parameters.
2847
2848 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2849
2850 * Makefile.in (SFILES): Add common/btrace-common.c.
2851 (OBS): Add common/btrace-common.o.
2852 (btrace-common.o): Add build rules.
2853 * linux-low: Include btrace-common.h.
2854 (linux_low_read_btrace): Use struct btrace_data. Call
2855 btrace_data_init and btrace_data_fini.
2856
2857 2015-02-06 Pedro Alves <palves@redhat.com>
2858
2859 * thread-db.c (find_new_threads_callback): Add debug output.
2860
2861 2015-02-04 Pedro Alves <palves@redhat.com>
2862
2863 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2864 (resume_stopped_resumed_lwps): New function.
2865 (linux_wait_for_event_filtered): Use it.
2866
2867 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2868
2869 * Makefile.in (SFILES): Add linux-personality.c.
2870 (linux-personality.o): New rule.
2871 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2872 list of objects to be built.
2873 * linux-low.c: Include nat/linux-personality.h.
2874 (linux_create_inferior): Remove code to disable address space
2875 randomization (moved to ../nat/linux-personality.c). Create
2876 cleanup to disable address space randomization.
2877
2878 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2879
2880 * Makefile.in (posix-strerror.o): New rule.
2881 (mingw-strerror.o): Likewise.
2882 * configure: Regenerated.
2883 * configure.ac: Source file ../common/common.host. Initialize new
2884 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2885
2886 2015-01-14 Yao Qi <yao@codesourcery.com>
2887
2888 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2889 (ppc-linux.o): New rule.
2890 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2891 * configure.ac: AC_CHECK_FUNCS(getauxval).
2892 * config.in: Re-generated.
2893 * configure: Re-generated.
2894 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2895 ppc64_64bit_inferior_p
2896
2897 2015-01-14 Yao Qi <yao@codesourcery.com>
2898
2899 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2900 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2901 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2902 (PT_ORIG_R3, PT_TRAP): Likewise.
2903 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2904 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2905 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2906
2907 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2908
2909 * i387-fp.c (i387_cache_to_xsave): In look over
2910 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2911 zmmh_low_space field by use of zmmh_high_space.
2912
2913 2015-01-09 Pedro Alves <palves@redhat.com>
2914
2915 * linux-low.c (step_over_bkpt): Move higher up in the file.
2916 (handle_extended_wait): Don't store the stop_pc here.
2917 (get_stop_pc): Adjust comments and rename to ...
2918 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2919 stopped for a software breakpoint or hardware breakpoint.
2920 (thread_still_has_status_pending_p): New function.
2921 (status_pending_p_callback): Use
2922 thread_still_has_status_pending_p. If the event is no longer
2923 interesting, resume the LWP.
2924 (handle_tracepoints): Add assert.
2925 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2926 (wstatus_maybe_breakpoint): New function.
2927 (cancel_breakpoint): Delete function.
2928 (check_stopped_by_watchpoint): New function, factored out from
2929 linux_low_filter_event.
2930 (lp_status_maybe_breakpoint): Delete function.
2931 (linux_low_filter_event): Remove filter_ptid argument.
2932 Leave thread group exits pending here. Store the LWP's stop PC.
2933 Always leave events pending.
2934 (linux_wait_for_event_filtered): Pull all events out of the
2935 kernel, and leave them all pending.
2936 (count_events_callback, select_event_lwp_callback): Consider all
2937 events.
2938 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2939 (select_event_lwp): Only give preference to the stepping LWP in
2940 all-stop mode. Adjust comments.
2941 (ignore_event): New function.
2942 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2943 references to cancel_breakpoints. Adjust to renames. Also give
2944 equal priority to all LWPs that have had events in non-stop mode.
2945 If reporting a software breakpoint event, unadjust the LWP's PC.
2946 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2947 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2948 Adjust.
2949 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2950 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2951 (linux_stopped_by_watchpoint): Adjust.
2952 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2953 * linux-low.h (enum lwp_stop_reason): New.
2954 (struct lwp_info) <stop_pc>: Adjust comment.
2955 <stopped_by_watchpoint>: Delete field.
2956 <stop_reason>: New field.
2957 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2958 * mem-break.c (software_breakpoint_inserted_here)
2959 (hardware_breakpoint_inserted_here): New function.
2960 * mem-break.h (software_breakpoint_inserted_here)
2961 (hardware_breakpoint_inserted_here): Declare.
2962 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2963 (cancel_breakpoints): Delete.
2964 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2965 (upload_fast_traceframes): Remove references to
2966 cancel_breakpoints.
2967
2968 2015-01-09 Pedro Alves <palves@redhat.com>
2969
2970 * thread-db.c (find_new_threads_callback): Ignore thread if the
2971 kernel thread ID is -1.
2972
2973 2015-01-09 Pedro Alves <palves@redhat.com>
2974
2975 * linux-low.c (linux_attach_fail_reason_string): Move to
2976 nat/linux-ptrace.c, and rename.
2977 (linux_attach_lwp): Update comment.
2978 (attach_proc_task_lwp_callback): New function.
2979 (linux_attach): Adjust to rename and use
2980 linux_proc_attach_tgid_threads.
2981 (linux_attach_fail_reason_string): Delete declaration.
2982
2983 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2984
2985 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2986 * server.c (gdbserver_version): Likewise.
2987
2988 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2989
2990 * remote-utils.c: Include ctype.h.
2991 (input_interrupt): Explicitly handle the case when the char
2992 received is the NUL byte. Improve the printing of non-ASCII
2993 characters.
2994
2995 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2996
2997 * linux-low.c (linux_low_filter_event): Update call to
2998 linux_enable_event_reporting following the addition of
2999 a new parameter to that function.
3000
3001 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3002
3003 PR server/17457
3004 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3005 (AARCH64_FPCR_REGNO): Likewise.
3006 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3007 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3008 (aarch64_store_fpregset): Likewise.
3009
3010 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3011
3012 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3013 Remove FIXME comment about assumption about N.
3014
3015 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3016
3017 * configure.ac: If large-file support is disabled in GDBserver,
3018 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3019 * configure: Regenerate.
3020
3021 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3022
3023 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3024 warning upon ENODATA from ptrace.
3025 * linux-s390-low.c (s390_store_tdb): New.
3026 (s390_regsets): Add regset for NT_S390_TDB.
3027
3028 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3029
3030 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3031 without a fill_function.
3032 * linux-s390-low.c (s390_fill_last_break): Remove.
3033 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3034 (s390_arch_setup): Use regset's size instead of fill_function for
3035 loop end condition.
3036
3037 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3038
3039 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3040 the regset's store function when ptrace returned an error.
3041 * regcache.c (get_thread_regcache): Invalidate register cache
3042 before fetching inferior's registers.
3043
3044 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3045
3046 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3047 while-loop as for-loop.
3048 (regsets_store_inferior_registers): Likewise.
3049
3050 2014-11-28 Yao Qi <yao@codesourcery.com>
3051
3052 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3053 * config.in, configure: Re-generate.
3054 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3055 is defined.
3056
3057 2014-11-21 Yao Qi <yao@codesourcery.com>
3058
3059 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3060 (AC_CHECK_HEADERS): Remove malloc.h.
3061 * configure: Re-generated.
3062 * config.in: Re-generated.
3063 * server.h: Don't include alloca.h and malloc.h.
3064 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3065 Don't include malloc.h.
3066
3067 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3068
3069 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3070 corresponding ERRNO check in same block.
3071
3072 2014-11-12 Pedro Alves <palves@redhat.com>
3073
3074 * server.c (cont_thread): Update comment.
3075 (start_inferior, attach_inferior): No longer clear cont_thread.
3076 (handle_v_cont): No longer set cont_thread.
3077 (captured_main): Clear cont_thread each time a GDB connects.
3078
3079 2014-11-12 Pedro Alves <palves@redhat.com>
3080
3081 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3082 thread, and don't resume all threads if the Hc thread has exited.
3083
3084 2014-11-12 Pedro Alves <palves@redhat.com>
3085
3086 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3087 the process group instead of to a specific LWP.
3088
3089 2014-10-15 Pedro Alves <palves@redhat.com>
3090
3091 PR server/17487
3092 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3093 parameter.
3094 (arm_set_thread_context): Delete.
3095 (the_low_target): Adjust.
3096 * win32-i386-low.c (debug_registers_changed)
3097 (debug_registers_used): Delete.
3098 (update_debug_registers_callback): New function.
3099 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3100 needing to update their debug registers.
3101 (win32_get_current_dr): New function.
3102 (x86_dr_low_get_addr, x86_dr_low_get_control)
3103 (x86_dr_low_get_status): Fetch the debug register from the thread
3104 record's context.
3105 (i386_initial_stuff): Adjust.
3106 (i386_get_thread_context): Remove current_event parameter. Don't
3107 clear debug_registers_changed nor copy DR values to
3108 debug_reg_state.
3109 (i386_set_thread_context): Delete.
3110 (i386_prepare_to_resume): New function.
3111 (i386_thread_added): Mark the thread as needing to update irs
3112 debug registers.
3113 (the_low_target): Remove i386_set_thread_context and install
3114 i386_prepare_to_resume.
3115 * win32-low.c (win32_get_thread_context): Adjust.
3116 (win32_set_thread_context): Use SetThreadContext
3117 directly.
3118 (win32_prepare_to_resume): New function.
3119 (win32_require_context): New function, factored out from ...
3120 (thread_rec): ... this.
3121 (continue_one_thread): Call win32_prepare_to_resume on each thread
3122 we're about to continue.
3123 (win32_resume): Call win32_prepare_to_resume on the event thread.
3124 * win32-low.h (struct win32_thread_info)
3125 <debug_registers_changed>: New field.
3126 (struct win32_target_ops): Change prototype of set_thread_context,
3127 delete set_thread_context and add prepare_to_resume.
3128 (win32_require_context): New declaration.
3129
3130 2014-10-08 Gary Benson <gbenson@redhat.com>
3131
3132 * server.h: Do not include common-exceptions.h.
3133
3134 2014-10-08 Gary Benson <gbenson@redhat.com>
3135
3136 * server.h: Do not include cleanups.h.
3137
3138 2014-09-30 James Hogan <james.hogan@imgtec.com>
3139
3140 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3141 mips64-dsp-linux.c.
3142
3143 2014-09-23 Yao Qi <yao@codesourcery.com>
3144
3145 * linux-low.c (lp_status_maybe_breakpoint): New function.
3146 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3147 (count_events_callback): Likewise.
3148 (select_event_lwp_callback): Likewise.
3149 (cancel_breakpoints_callback): Likewise.
3150
3151 2014-09-19 Don Breazeal <donb@codesourcery.com>
3152
3153 * linux-low.c (handle_extended_wait): Call
3154 linux_ptrace_get_extended_event.
3155 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3156 linux_is_extended_waitstatus.
3157
3158 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3159
3160 * Makefile.in (CPPFLAGS): Define.
3161 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3162 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3163
3164 2014-09-16 Gary Benson <gbenson@redhat.com>
3165
3166 * inferiors.h (current_inferior): Renamed as...
3167 (current_thread): New variable. All uses updated.
3168 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3169 (maybe_move_out_of_jump_pad): Likewise.
3170 (cancel_breakpoint): Likewise.
3171 (linux_low_filter_event): Likewise.
3172 (wait_for_sigstop): Likewise.
3173 (linux_resume_one_lwp): Likewise.
3174 (need_step_over_p): Likewise.
3175 (start_step_over): Likewise.
3176 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3177 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3178 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3179 and save_inferior as saved_thread.
3180 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3181 saved_thread.
3182 (regcache_invalidate_thread): Likewise.
3183 * remote-utils.c (prepare_resume_reply): Likewise.
3184 * thread-db.c (thread_db_get_tls_address): Likewise.
3185 (disable_thread_event_reporting): Likewise.
3186 (remove_thread_event_breakpoints): Likewise.
3187 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3188 as saved_thread.
3189 * target.h (set_desired_inferior): Renamed as...
3190 (set_desired_thread): New declaration. All uses updated.
3191 * server.c (myresume): Updated comment to reference thread instead
3192 of inferior.
3193 (handle_serial_event): Likewise.
3194 (handle_target_event): Likewise.
3195
3196 2014-09-12 Tom Tromey <tromey@redhat.com>
3197 Gary Benson <gbenson@redhat.com>
3198
3199 * regcache.h: Include common-regcache.h.
3200 (regcache_read_pc): Don't declare.
3201 * regcache.c (get_thread_regcache_for_ptid): New function.
3202
3203 2014-09-11 Tom Tromey <tromey@redhat.com>
3204 Gary Benson <gbenson@redhat.com>
3205
3206 * symbol.c: New file.
3207 * Makefile.in (SFILES): Add symbol.c.
3208 (OBS): Add symbol.o.
3209
3210 2014-09-11 Gary Benson <gbenson@redhat.com>
3211
3212 * target.c (target_stop_ptid, target_continue_ptid): New
3213 functions.
3214
3215 2014-09-11 Tom Tromey <tromey@redhat.com>
3216 Gary Benson <gbenson@redhat.com>
3217
3218 * target.h: Include target/target.h.
3219 * target.c (target_read_memory, target_read_uint32)
3220 (target_write_memory): New functions.
3221
3222 2014-09-11 Gary Benson <gbenson@redhat.com>
3223
3224 * server.h (debug_hw_points): Don't declare.
3225 * server.c (debug_hw_points): Don't define. Replace all uses
3226 with show_debug_regs.
3227 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3228 all uses with show_debug_regs.
3229
3230 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3231
3232 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3233 endianness into account.
3234 (ppc_supply_ptrace_register): Likewise.
3235
3236 2014-09-03 James Hogan <james.hogan@imgtec.com>
3237
3238 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3239 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3240
3241 2014-09-03 Gary Benson <gbenson@redhat.com>
3242
3243 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3244 ALL_DEBUG_ADDRESS_REGISTERS.
3245
3246 2014-09-02 Gary Benson <gbenson@redhat.com>
3247
3248 * i386-low.h: Renamed as...
3249 * x86-low.h: New file. All type, function and variable name
3250 prefixes changed from "i386_" to "x86_". All references updated.
3251 * i386-low.c: Renamed as...
3252 * x86-low.c: New file. All type, function and variable name
3253 prefixes changed from "i386_" to "x86_". All references updated.
3254
3255 2014-09-02 Gary Benson <gbenson@redhat.com>
3256
3257 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3258 (x86_linux_new_thread): Likewise.
3259
3260 2014-08-29 Gary Benson <gbenson@redhat.com>
3261
3262 * server.h (setjmp.h): Do not include.
3263 (toplevel): Do not declare.
3264 (common-exceptions.h): Include.
3265 (cleanups.h): Likewise.
3266 * server.c (toplevel): Do not define.
3267 (exit_code): New static global.
3268 (detach_or_kill_for_exit_cleanup): New function.
3269 (main): New function. Original main renamed to...
3270 (captured_main): New function.
3271 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3272
3273 2014-08-29 Gary Benson <gbenson@redhat.com>
3274
3275 * Makefile.in (SFILES): Add common/common-exceptions.c.
3276 (OBS): Add common-exceptions.o.
3277 (common-exceptions.o): New rule.
3278 * utils.c (prepare_to_throw_exception): New function.
3279
3280 2014-08-29 Gary Benson <gbenson@redhat.com>
3281
3282 * config.in: Regenerate.
3283 * configure: Likewise.
3284
3285 2014-08-29 Gary Benson <gbenson@redhat.com>
3286
3287 * Makefile.in (SFILES): Add common/cleanups.c.
3288 (OBS): cleanups.o.
3289 (cleanups.o): New rule.
3290
3291 2014-08-29 Gary Benson <gbenson@redhat.com>
3292
3293 * utils.c (internal_vwarning): New function.
3294
3295 2014-08-28 Gary Benson <gbenson@redhat.com>
3296
3297 * utils.h (fatal): Remove declaration.
3298 * utils.c (fatal): Remove function.
3299
3300 2014-08-28 Gary Benson <gbenson@redhat.com>
3301
3302 * tracepoint.c (gdb_agent_init): Replace fatal with
3303 perror_with_name.
3304 (initialize_tracepoint): Likewise.
3305
3306 2014-08-28 Gary Benson <gbenson@redhat.com>
3307
3308 * remote-utils.c (remote_prepare): Replace fatal with error.
3309
3310 2014-08-28 Gary Benson <gbenson@redhat.com>
3311
3312 * linux-low.c (linux_async): Replace fatal with warning.
3313 Tidy up and return.
3314 (linux_start_non_stop): Return -1 if linux_async failed.
3315
3316 2014-08-28 Gary Benson <gbenson@redhat.com>
3317
3318 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3319 gdb_assert.
3320 (i386_dr_low_get_addr): Remove vague comment.
3321 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3322 gdb_assert.
3323
3324 2014-08-28 Gary Benson <gbenson@redhat.com>
3325
3326 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3327 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3328 internal_error.
3329 (linux_resume_one_lwp): Likewise.
3330 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3331 gdb_assert.
3332 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3333 with internal_error.
3334 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3335 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3336 (find_register_by_name): Replace fatal with internal_error.
3337 (find_regno): Likewise.
3338 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3339 * thread-db.c (thread_db_create_event): Likewise.
3340 (thread_db_load_search): Likewise.
3341 (try_thread_db_load_1): Likewise.
3342 * tracepoint.c (get_jump_space_head): Replace fatal with
3343 internal_error.
3344 (claim_trampoline_space): Likewise.
3345 (have_fast_tracepoint_trampoline_buffer): Likewise.
3346 (cmd_qtstart): Likewise.
3347 (stop_tracing): Likewise.
3348 (fast_tracepoint_collecting): Likewise.
3349 (target_malloc): Likewise.
3350 (download_tracepoint): Likewise.
3351 (download_trace_state_variables): Replace check with gdb_assert.
3352 (upload_fast_traceframes): Replace fatal with internal_error.
3353
3354 2014-08-19 Tom Tromey <tromey@redhat.com>
3355 Gary Benson <gbenson@redhat.com>
3356
3357 * Makefile.in (SFILES): Add common/common-debug.c.
3358 (OBS): Add common-debug.o.
3359 (common-debug.o): New rule.
3360 * debug.h (debug_printf): Don't declare.
3361 * debug.c (debug_printf): Renamed and rewritten as...
3362 (debug_vprintf): New function.
3363
3364 2014-08-19 Gary Benson <gbenson@redhat.com>
3365
3366 * utils.h: Do not include print-utils.h.
3367
3368 2014-08-19 Tom Tromey <tromey@redhat.com>
3369 Gary Benson <gbenson@redhat.com>
3370
3371 * server.h: Add static assertion.
3372 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3373
3374 2014-08-19 Tom Tromey <tromey@redhat.com>
3375 Gary Benson <gbenson@redhat.com>
3376
3377 * Makefile.in (SFILES): Add common/errors.c.
3378 (OBS): Add errors.o.
3379 (IPA_OBS): Add errors-ipa.o.
3380 (errors.o): New rule.
3381 (errors-ipa.o): Likewise.
3382 * utils.h (perror_with_name, error, warning): Don't declare.
3383 * utils.c (warning): Renamed and rewritten as...
3384 (vwarning): New function.
3385 (error): Renamed and rewritten as...
3386 (verror): New function.
3387 (internal_error): Renamed and rewritten as...
3388 (internal_verror): New function.
3389
3390 2014-08-07 Gary Benson <gbenson@redhat.com>
3391
3392 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3393 * configure: Regenerate.
3394 * config.in: Likewise.
3395 * server.h: Do not include errno.h.
3396 * event-loop.c: Likewise.
3397 * hostio-errno.c: Likewise.
3398 * linux-low.c: Likewise.
3399 * remote-utils.c: Likewise.
3400 * spu-low.c: Likewise.
3401 * utils.c: Likewise.
3402 * gdbreplay.c: Unconditionally include errno.h.
3403
3404 2014-08-07 Gary Benson <gbenson@redhat.com>
3405
3406 * server.h: Do not include string.h.
3407 * event-loop.c: Likewise.
3408 * linux-low.c: Likewise.
3409 * regcache.c: Likewise.
3410 * remote-utils.c: Likewise.
3411 * spu-low.c: Likewise.
3412 * utils.c: Likewise.
3413
3414 2014-08-07 Gary Benson <gbenson@redhat.com>
3415
3416 * server.h: Do not include gdb_assert.h.
3417
3418 2014-08-07 Gary Benson <gbenson@redhat.com>
3419
3420 * server.h: Do not include common-utils.h.
3421
3422 2014-08-07 Gary Benson <gbenson@redhat.com>
3423
3424 * server.h: Do not include ptid.h.
3425 * notif.h: Likewise.
3426
3427 2014-08-07 Gary Benson <gbenson@redhat.com>
3428
3429 * server.h: Do not include gdb_locale.h.
3430
3431 2014-08-07 Gary Benson <gbenson@redhat.com>
3432
3433 * server.h: Do not include gdb/signals.h.
3434 * win32-low.c: Likewise.
3435
3436 2014-08-07 Gary Benson <gbenson@redhat.com>
3437
3438 * server.h: Do not include pathmax.h.
3439
3440 2014-08-07 Gary Benson <gbenson@redhat.com>
3441
3442 * server.h: Do not include libiberty.h.
3443 * linux-bfin-low.c: Likewise.
3444
3445 2014-08-07 Gary Benson <gbenson@redhat.com>
3446
3447 * server.h: Do not include ansidecl.h.
3448
3449 2014-08-07 Gary Benson <gbenson@redhat.com>
3450
3451 * linux-x86-low.c: Do not include stddef.h.
3452 * lynx-ppc-low.c: Likewise.
3453 * tracepoint.c: Likewise.
3454
3455 2014-08-07 Gary Benson <gbenson@redhat.com>
3456
3457 * server.h: Do not include stdarg.h.
3458 * nto-low.c: Likewise.
3459
3460 2014-08-07 Gary Benson <gbenson@redhat.com>
3461
3462 * server.h: Do not include stdlib.h.
3463 * inferiors.c: Likewise.
3464 * linux-low.c: Likewise.
3465 * regcache.c: Likewise.
3466 * spu-low.c: Likewise.
3467 * tracepoint.c: Likewise.
3468 * utils.c: Likewise.
3469
3470 2014-08-07 Gary Benson <gbenson@redhat.com>
3471
3472 * server.h: Do not include stdio.h.
3473 * linux-low.c: Likewise.
3474 * remote-utils.c: Likewise.
3475 * spu-low.c: Likewise.
3476 * utils.c: Likewise.
3477 * wincecompat.c: Likewise.
3478
3479 2014-08-06 Gary Benson <gbenson@redhat.com>
3480
3481 * regcache.c (init_register_cache): Move conditionals inside if.
3482
3483 2014-08-06 Gary Benson <gbenson@redhat.com>
3484
3485 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3486
3487 2014-07-31 Gary Benson <gbenson@redhat.com>
3488
3489 * ax.h: Do not include server.h.
3490 * gdbthread.h: Likewise.
3491 * lynx-low.h: Likewise.
3492 * notif.h: Likewise.
3493
3494 2014-07-30 Gary Benson <gbenson@redhat.com>
3495
3496 * server.h: Include common-defs.h.
3497 Do not include config.h or build-gnulib-gdbserver/config.h.
3498
3499 2014-07-30 Gary Benson <gbenson@redhat.com>
3500
3501 * hostio-errno.c: Move server.h to top of includes list.
3502 * inferiors.c: Likewise.
3503 * linux-x86-low.c: Likewise.
3504 * notif.c: Include server.h.
3505
3506 2014-07-24 Tom Tromey <tromey@redhat.com>
3507 Gary Benson <gbenson@redhat.com>
3508
3509 * server.h (CORE_ADDR): Now unsigned.
3510
3511 2014-07-16 Pedro Alves <palves@redhat.com>
3512
3513 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3514
3515 2014-07-15 Pedro Alves <palves@redhat.com>
3516
3517 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3518 copy.
3519
3520 2014-07-11 Pedro Alves <palves@redhat.com>
3521
3522 * linux-low.c (kill_wait_lwp): New function, based on
3523 kill_one_lwp_callback, but use my_waitpid directly.
3524 (kill_one_lwp_callback, linux_kill): Use it.
3525
3526 2014-06-23 Pedro Alves <palves@redhat.com>
3527
3528 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3529 before setting DR0..DR3.
3530
3531 2014-06-20 Gary Benson <gbenson@redhat.com>
3532
3533 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3534 * configure: Regenerated.
3535 * config.in: Likewise.
3536
3537 2014-06-20 Gary Benson <gbenson@redhat.com>
3538
3539 * Makefile.in (SFILES): Update locations for files moved
3540 from common to nat.
3541 (object file files): Reordered.
3542
3543 2014-06-20 Gary Benson <gbenson@redhat.com>
3544
3545 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3546 (i386_dr_low_set_addr): Likewise.
3547 (i386_dr_low_get_addr): Likewise.
3548 (i386_dr_low_can_set_control): Likewise.
3549 (i386_dr_low_set_control): Likewise.
3550 (i386_dr_low_get_control): Likewise.
3551 (i386_dr_low_get_status): Likewise.
3552 (i386_get_debug_register_length): Likewise.
3553 * linux-x86-low.c (i386_dr_low_set_addr):
3554 Changed signature. Made static.
3555 (i386_dr_low_get_addr): Likewise.
3556 (i386_dr_low_set_control): Likewise.
3557 (i386_dr_low_get_control): Likewise.
3558 (i386_dr_low_get_status): Likewise.
3559 (i386_dr_low): New global variable.
3560 * win32-i386-low.c (i386_dr_low_set_addr):
3561 Changed signature. Made static.
3562 (i386_dr_low_get_addr): Likewise.
3563 (i386_dr_low_set_control): Likewise.
3564 (i386_dr_low_get_control): Likewise.
3565 (i386_dr_low_get_status): Likewise.
3566 (i386_dr_low): New global variable.
3567
3568 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3569
3570 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3571 * Makefile.in (AR, AR_FLAGS): Define.
3572 * configure: Regenerate.
3573
3574 2014-06-19 Gary Benson <gbenson@redhat.com>
3575
3576 * Makefile.in (i386-dregs.o): New rule.
3577 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3578 * i386-low.c (target.h): Remove include.
3579 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3580 (DR_CONTROL_SHIFT): Likewise.
3581 (DR_CONTROL_SIZE): Likewise.
3582 (DR_RW_EXECUTE): Likewise.
3583 (DR_RW_WRITE): Likewise.
3584 (DR_RW_READ): Likewise.
3585 (DR_RW_IORW): Likewise.
3586 (DR_LEN_1): Likewise.
3587 (DR_LEN_2): Likewise.
3588 (DR_LEN_4): Likewise.
3589 (DR_LEN_8): Likewise.
3590 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3591 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3592 (DR_ENABLE_SIZE): Likewise.
3593 (DR_LOCAL_SLOWDOWN): Likewise.
3594 (DR_GLOBAL_SLOWDOWN): Likewise.
3595 (DR_CONTROL_RESERVED): Likewise.
3596 (I386_DR_CONTROL_MASK): Likewise.
3597 (I386_DR_VACANT): Likewise.
3598 (I386_DR_LOCAL_ENABLE): Likewise.
3599 (I386_DR_GLOBAL_ENABLE): Likewise.
3600 (I386_DR_DISABLE): Likewise.
3601 (I386_DR_SET_RW_LEN): Likewise.
3602 (I386_DR_GET_RW_LEN): Likewise.
3603 (I386_DR_WATCH_HIT): Likewise.
3604 (i386_wp_op_t): Likewise.
3605 (i386_show_dr): Likewise.
3606 (i386_length_and_rw_bits): Likewise.
3607 (i386_insert_aligned_watchpoint): Likewise.
3608 (i386_remove_aligned_watchpoint): Likewise.
3609 (i386_handle_nonaligned_watchpoint): Likewise.
3610 i386_update_inferior_debug_regs(): Likewise.
3611 (i386_dr_insert_watchpoint): Likewise.
3612 (i386_dr_remove_watchpoint): Likewise.
3613 (i386_dr_region_ok_for_watchpoint): Likewise.
3614 (i386_dr_stopped_data_address): Likewise.
3615 (i386_dr_stopped_by_watchpoint): Likewise.
3616
3617 2014-06-19 Gary Benson <gbenson@redhat.com>
3618
3619 * i386-low.c (i386_dr_show): Renamed to
3620 i386_show_dr and made static. All uses updated.
3621 (i386_dr_length_and_rw_bits): Renamed to
3622 i386_length_and_rw_bits and made static.
3623 All uses updated.
3624 (i386_dr_insert_aligned_watchpoint): Renamed to
3625 i386_insert_aligned_watchpoint and made static.
3626 All uses updated.
3627 (i386_dr_remove_aligned_watchpoint): Renamed to
3628 i386_remove_aligned_watchpoint and made static.
3629 All uses updated.
3630 (i386_dr_update_inferior_debug_regs): Renamed to
3631 i386_update_inferior_debug_regs and made static.
3632 All uses updated.
3633
3634 2014-06-18 Gary Benson <gbenson@redhat.com>
3635
3636 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3637 (i386_dr_low_can_set_control): Likewise.
3638 (i386_get_debug_register_length): Likewise.
3639 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3640 (i386_dr_low_can_set_control): Likewise.
3641 (i386_get_debug_register_length): Likewise.
3642
3643 2014-06-17 Gary Benson <gbenson@redhat.com>
3644
3645 * i386-low.h (i386-dregs.h): New include.
3646 (DR_FIRSTADDR): Now in i386-dregs.h.
3647 (DR_LASTADDR): Likewise.
3648 (DR_NADDR): Likewise.
3649 (DR_STATUS): Likewise.
3650 (DR_CONTROL): Likewise.
3651 (i386_debug_reg_state): Likewise.
3652 (i386_dr_insert_watchpoint): Likewise.
3653 (i386_dr_remove_watchpoint): Likewise.
3654 (i386_dr_region_ok_for_watchpoint): Likewise.
3655 (i386_dr_stopped_data_address): Likewise.
3656 (i386_dr_stopped_by_watchpoint): Likewise.
3657 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3658
3659 2014-06-18 Gary Benson <gbenson@redhat.com>
3660
3661 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3662 i386_dr_insert_watchpoint.
3663 (i386_low_remove_watchpoint): Renamed to
3664 i386_dr_remove_watchpoint.
3665 (i386_low_region_ok_for_watchpoint): Renamed to
3666 i386_dr_region_ok_for_watchpoint.
3667 (i386_low_stopped_data_address): Renamed to
3668 i386_dr_stopped_data_address.
3669 (i386_low_stopped_by_watchpoint): Renamed to
3670 i386_dr_stopped_by_watchpoint.
3671 * i386-low.c (i386_show_dr): Renamed to
3672 i386_dr_show and made nonstatic. All uses updated.
3673 (i386_length_and_rw_bits): Renamed to
3674 i386_dr_length_and_rw_bits and made nonstatic.
3675 All uses updated.
3676 (i386_insert_aligned_watchpoint): Renamed to
3677 i386_dr_insert_aligned_watchpoint and made nonstatic.
3678 All uses updated.
3679 (i386_remove_aligned_watchpoint): Renamed to
3680 i386_dr_remove_aligned_watchpoint and made nonstatic.
3681 All uses updated.
3682 (i386_update_inferior_debug_regs): Renamed to
3683 i386_dr_update_inferior_debug_regs and made nonstatic.
3684 All uses updated.
3685 (i386_low_insert_watchpoint): Renamed to
3686 i386_dr_insert_watchpoint. All uses updated.
3687 (i386_low_remove_watchpoint): Renamed to
3688 i386_dr_remove_watchpoint. All uses updated.
3689 (i386_low_region_ok_for_watchpoint): Renamed to
3690 i386_dr_region_ok_for_watchpoint. All uses updated.
3691 (i386_low_stopped_data_address): Renamed to
3692 i386_dr_stopped_data_address. All uses updated.
3693 (i386_low_stopped_by_watchpoint): Renamed to
3694 i386_dr_stopped_by_watchpoint. All uses updated.
3695
3696 2014-06-18 Gary Benson <gbenson@redhat.com>
3697
3698 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3699 (i386_dr_low_can_set_control): Likewise.
3700 (i386_insert_aligned_watchpoint): New check.
3701
3702 2014-06-18 Gary Benson <gbenson@redhat.com>
3703
3704 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3705 Renamed to state.
3706
3707 2014-06-18 Gary Benson <gbenson@redhat.com>
3708
3709 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3710 instead of fatal and error.
3711 (i386_handle_nonaligned_watchpoint): Likewise.
3712
3713 2014-06-18 Gary Benson <gbenson@redhat.com>
3714
3715 * i386-low.c (i386_get_debug_register_length): New macro.
3716 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3717 (i386_show_dr): Use debug_printf instead of fprintf. Use
3718 phex to format values.
3719
3720 2014-06-18 Gary Benson <gbenson@redhat.com>
3721
3722 * i386-low.h: Comment changes.
3723 * i386-low.c: Likewise.
3724
3725 2014-06-18 Gary Benson <gbenson@redhat.com>
3726
3727 * i386-low.c: Whitespace changes.
3728
3729 2014-06-12 Tom Tromey <tromey@redhat.com>
3730
3731 * utils.c (freeargv): Remove.
3732
3733 2014-06-12 Tom Tromey <tromey@redhat.com>
3734
3735 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3736 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3737 (parse_debug_format_options): Likewise.
3738 (gdbserver_usage): Likewise.
3739 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3740 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3741 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3742 against libiberty.
3743 ($(LIBGNU)): Depend on libiberty.
3744 (all-lib): Recurse into all subdirs.
3745 (install-only): Invoke "install" target in subdirs.
3746 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3747 targets.
3748 * configure: Rebuild.
3749 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3750 for vasprintf, vsnprintf, or gettimeofday.
3751 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3752 srv_tgtobj.
3753
3754 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3755
3756 * development.sh: Delete.
3757 * Makefile.in (config.status): Adjust dependency on development.sh.
3758 * configure.ac: Adjust development.sh source call.
3759 * configure: Regenerate.
3760
3761 2014-06-02 Pedro Alves <palves@redhat.com>
3762
3763 * ax.c (gdb_free_agent_expr): New function.
3764 * ax.h (gdb_free_agent_expr): New declaration.
3765 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3766 list.
3767 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3768 static.
3769 (clear_breakpoint_conditions_and_commands): New function.
3770 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3771 (clear_breakpoint_conditions_and_commands): New declaration.
3772
3773 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3774
3775 * linux-aarch64-low.c (asm/ptrace.h): Include.
3776
3777 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3778
3779 Fix TLS access for -static -pthread.
3780 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3781 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3782 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3783
3784 2014-05-20 Pedro Alves <palves@redhat.com>
3785
3786 * linux-aarch64-low.c (aarch64_insert_point)
3787 (aarch64_remove_point): No longer check whether the type is
3788 supported here. Adjust to new interface.
3789 (the_low_target): Install aarch64_supports_z_point_type as
3790 supports_z_point_type method.
3791 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3792 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3793 instead of a Z packet char. Adjust.
3794 (arm_supports_z_point_type): New function.
3795 (arm_insert_point, arm_remove_point): Adjust to new interface.
3796 (the_low_target): Install arm_supports_z_point_type.
3797 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3798 (cris_insert_point, cris_remove_point): Adjust to new interface.
3799 Don't check whether the type is supported here.
3800 (the_low_target): Install cris_supports_z_point_type.
3801 * linux-low.c (linux_supports_z_point_type): New function.
3802 (linux_insert_point, linux_remove_point): Adjust to new interface.
3803 * linux-low.h (struct linux_target_ops) <insert_point,
3804 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3805 raw_breakpoint pointer parameter.
3806 <supports_z_point_type>: New method.
3807 * linux-mips-low.c (mips_supports_z_point_type): New function.
3808 (mips_insert_point, mips_remove_point): Adjust to new interface.
3809 Use mips_supports_z_point_type.
3810 (the_low_target): Install mips_supports_z_point_type.
3811 * linux-ppc-low.c (the_low_target): Install NULL as
3812 supports_z_point_type method.
3813 * linux-s390-low.c (the_low_target): Install NULL as
3814 supports_z_point_type method.
3815 * linux-sparc-low.c (the_low_target): Install NULL as
3816 supports_z_point_type method.
3817 * linux-x86-low.c (x86_supports_z_point_type): New function.
3818 (x86_insert_point): Adjust to new insert_point interface. Use
3819 insert_memory_breakpoint. Adjust to new
3820 i386_low_insert_watchpoint interface.
3821 (x86_remove_point): Adjust to remove_point interface. Use
3822 remove_memory_breakpoint. Adjust to new
3823 i386_low_remove_watchpoint interface.
3824 (the_low_target): Install x86_supports_z_point_type.
3825 * lynx-low.c (lynx_target_ops): Install NULL as
3826 supports_z_point_type callback.
3827 * nto-low.c (nto_supports_z_point_type): New.
3828 (nto_insert_point, nto_remove_point): Adjust to new interface.
3829 (nto_target_ops): Install nto_supports_z_point_type.
3830 * mem-break.c: Adjust intro comment.
3831 (struct raw_breakpoint) <raw_type, size>: New fields.
3832 <inserted>: Update comment.
3833 <shlib_disabled>: Delete field.
3834 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3835 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3836 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3837 (raw_bkpt_type_to_target_hw_bp_type): New function.
3838 (find_enabled_raw_code_breakpoint_at): New function.
3839 (find_raw_breakpoint_at): New type and size parameters. Use them.
3840 (insert_memory_breakpoint): New function, based off
3841 set_raw_breakpoint_at.
3842 (remove_memory_breakpoint): New function.
3843 (set_raw_breakpoint_at): Reimplement.
3844 (set_breakpoint): New, based on set_breakpoint_at.
3845 (set_breakpoint_at): Reimplement.
3846 (delete_raw_breakpoint): Go through the_target->remove_point
3847 instead of assuming memory breakpoints.
3848 (find_gdb_breakpoint_at): Delete.
3849 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3850 (find_gdb_breakpoint): New function.
3851 (set_gdb_breakpoint_at): Delete.
3852 (z_type_supported): New function.
3853 (set_gdb_breakpoint_1): New function, loosely based off
3854 set_gdb_breakpoint_at.
3855 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3856 (delete_gdb_breakpoint_at): Delete.
3857 (delete_gdb_breakpoint_1): New function, loosely based off
3858 delete_gdb_breakpoint_at.
3859 (delete_gdb_breakpoint): New function.
3860 (clear_gdb_breakpoint_conditions): Rename to ...
3861 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3862 breakpoint.
3863 (add_condition_to_breakpoint): Make static.
3864 (add_breakpoint_condition): Take a struct breakpoint pointer
3865 instead of an address. Adjust.
3866 (gdb_condition_true_at_breakpoint): Rename to ...
3867 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3868 z_type parameter.
3869 (gdb_condition_true_at_breakpoint): Reimplement.
3870 (add_breakpoint_commands): Take a struct breakpoint pointer
3871 instead of an address. Adjust.
3872 (gdb_no_commands_at_breakpoint): Rename to ...
3873 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3874 parameter. Return true if no breakpoint was found. Change debug
3875 output.
3876 (gdb_no_commands_at_breakpoint): Reimplement.
3877 (run_breakpoint_commands): Rename to ...
3878 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3879 and change return type to boolean.
3880 (run_breakpoint_commands): New function.
3881 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3882 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3883 breakpoint. Go through the_target->remove_point instead of
3884 assuming memory breakpoint.
3885 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3886 software and hardware breakpoints.
3887 (reinsert_raw_breakpoint): Go through the_target->insert_point
3888 instead of assuming memory breakpoint.
3889 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3890 software and hardware breakpoints.
3891 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3892 Check both software and hardware breakpoints.
3893 (validate_inserted_breakpoint): Assert the breakpoint is a
3894 software breakpoint. Set the inserted flag to -1 instead of
3895 setting shlib_disabled.
3896 (delete_disabled_breakpoints): Adjust.
3897 (validate_breakpoints): Only validate software breakpoints.
3898 Adjust to inserted flag change.
3899 (check_mem_read, check_mem_write): Skip breakpoint types other
3900 than software breakpoints. Adjust to inserted flag change.
3901 * mem-break.h (enum raw_bkpt_type): New enum.
3902 (raw_breakpoint, struct process_info): Forward declare.
3903 (Z_packet_to_target_hw_bp_type): Delete declaration.
3904 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3905 (set_gdb_breakpoint, delete_gdb_breakpoint)
3906 (clear_breakpoint_conditions): New declarations.
3907 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3908 (breakpoint_inserted_here): Update comment.
3909 (add_breakpoint_condition, add_breakpoint_commands): Replace
3910 address parameter with a breakpoint pointer parameter.
3911 (gdb_breakpoint_here): Update comment.
3912 (delete_gdb_breakpoint_at): Delete.
3913 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3914 * server.c (process_point_options): Take a struct breakpoint
3915 pointer instead of an address. Adjust.
3916 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3917 delete_gdb_breakpoint.
3918 * spu-low.c (spu_target_ops): Install NULL as
3919 supports_z_point_type method.
3920 * target.h: Include mem-break.h.
3921 (struct target_ops) <prepare_to_access_memory>: Update comment.
3922 <supports_z_point_type>: New field.
3923 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3924 instead of a char. Also take a raw breakpoint pointer.
3925 * win32-arm-low.c (the_low_target): Install NULL as
3926 supports_z_point_type.
3927 * win32-i386-low.c (i386_supports_z_point_type): New function.
3928 (i386_insert_point, i386_remove_point): Adjust to new interface.
3929 (the_low_target): Install i386_supports_z_point_type.
3930 * win32-low.c (win32_supports_z_point_type): New function.
3931 (win32_insert_point, win32_remove_point): Adjust to new interface.
3932 (win32_target_ops): Install win32_supports_z_point_type.
3933 * win32-low.h (struct win32_target_ops):
3934 <supports_z_point_type>: New method.
3935 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3936 instead of a char. Also take a raw breakpoint pointer.
3937
3938 2014-05-20 Pedro Alves <palves@redhat.com>
3939
3940 * mem-break.h: Include break-common.h.
3941 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3942 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3943 (Z_packet_to_target_hw_bp_type): New declaration.
3944 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3945 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3946 (Z_PACKET_ACCESS_WP): Delete macros.
3947 (Z_packet_to_hw_type): Delete function.
3948 * i386-low.h: Don't include break-common.h here.
3949 (Z_packet_to_hw_type): Delete declaration.
3950 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3951 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3952 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3953 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3954 * linux-aarch64-low.c: Don't include break-common.h here.
3955 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3956 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3957 (Z_packet_to_target_hw_bp_type): Delete function.
3958 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3959 function.
3960 (mips_insert_point, mips_remove_point): Use
3961 Z_packet_to_target_hw_bp_type.
3962
3963 2014-05-20 Pedro Alves <palves@redhat.com>
3964
3965 * linux-aarch64-low.c: Include break-common.h.
3966 (enum target_point_type): Delete.
3967 (Z_packet_to_point_type): Rename to ...
3968 (Z_packet_to_target_hw_bp_type): ... this, and return a
3969 target_hw_bp_type instead.
3970 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3971 instead of an enum target_point_type.
3972 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3973 breakpoint type.
3974 (aarch64_dr_state_insert_one_point)
3975 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3976 (aarch64_handle_aligned_watchpoint)
3977 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3978 Take an enum target_hw_bp_type instead of an enum
3979 target_point_type.
3980 (aarch64_supports_z_point_type): New function.
3981 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3982 use Z_packet_to_target_hw_bp_type.
3983
3984 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3985
3986 * configure.ac: Only use -Werror by default when DEVELOPMENT
3987 is true.
3988 * configure: Regenerate.
3989
3990 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3991
3992 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3993 * linux-x86-low.c (X86_64_USER_REGS): New.
3994 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3995
3996 2014-04-28 Yao Qi <yao@codesourcery.com>
3997
3998 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3999 name.
4000
4001 2014-04-25 Pedro Alves <palves@redhat.com>
4002
4003 PR server/16255
4004 * linux-low.c (linux_attach_fail_reason_string): New function.
4005 (linux_attach_lwp): Delete.
4006 (linux_attach_lwp_1): Rename to ...
4007 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4008 argument. Remove "initial" parameter. Return int instead of
4009 void. Don't error or warn here.
4010 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4011 failure to attach to the tgid. Call warning when failing to
4012 attach to an lwp.
4013 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4014 argument. Remove "initial" parameter. Return int instead of
4015 void. Don't error or warn here.
4016 (linux_attach_fail_reason_string): New declaration.
4017 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4018 interface change. Use linux_attach_fail_reason_string.
4019
4020 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4021 Walfred Tedeschi <walfred.tedeschi@intel.com>
4022
4023 * Makefile.in: Added rules to handle new files
4024 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4025 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4026 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4027 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4028 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4029 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4030 x32-avx512-linux.o.
4031 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4032 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4033 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4034 i386/x32-avx512.xml.
4035 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4036 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4037 i386/x32-avx512-linux.xml.
4038 * i387-fp.c (num_avx512_k_registers): New constant for number
4039 of K registers.
4040 (num_avx512_zmmh_low_registers): New constant for number of
4041 lower ZMM registers (0-15).
4042 (num_avx512_zmmh_high_registers): New constant for number of
4043 higher ZMM registers (16-31).
4044 (num_avx512_ymmh_registers): New contant for number of higher
4045 YMM registers (ymm16-31 added by avx521 on x86_64).
4046 (num_avx512_xmm_registers): New constant for number of higher
4047 XMM registers (xmm16-31 added by AVX512 on x86_64).
4048 (struct i387_xsave): Add space for AVX512 registers.
4049 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4050 Add code to handle AVX512 registers.
4051 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4052 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4053 prototypei from generated file.
4054 (tdesc_amd64_avx512_linux): Likewise.
4055 (init_registers_x32_avx512_linux): Likewise.
4056 (tdesc_x32_avx512_linux): Likewise.
4057 (init_registers_i386_avx512_linux): Likewise.
4058 (tdesc_i386_avx512_linux): Likewise.
4059 (x86_64_regmap): Add AVX512 registers.
4060 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4061 mask.
4062 (initialize_low_arch): Add code to initialize AVX512 registers.
4063
4064 2014-04-23 Pedro Alves <palves@redhat.com>
4065
4066 * mem-break.c (find_gdb_breakpoint_at): Make static.
4067 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4068
4069 2014-04-23 Pedro Alves <palves@redhat.com>
4070
4071 * i386-low.c: Don't include break-common.h here.
4072 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4073 prototype to take target_hw_bp_type as argument instead of a Z
4074 packet char.
4075 * i386-low.h: Include break-common.h here.
4076 (Z_packet_to_hw_type): Declare.
4077 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4078 prototypes.
4079 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4080 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4081 (x86_remove_point): Convert the packet number to a
4082 target_hw_bp_type before calling i386_low_remove_watchpoint.
4083 * win32-i386-low.c (i386_insert_point): Convert the packet number
4084 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4085 (i386_remove_point): Convert the packet number to a
4086 target_hw_bp_type before calling i386_low_remove_watchpoint.
4087
4088 2014-04-23 Pedro Alves <palves@redhat.com>
4089
4090 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4091
4092 2014-04-10 Pedro Alves <palves@redhat.com>
4093
4094 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4095 Check if the condition or command is NULL before checking if the
4096 breakpoint is known. On success, return true.
4097 * mem-break.h (add_breakpoint_condition): Document return.
4098 (add_breakpoint_commands): Add describing comment.
4099 * server.c (skip_to_semicolon): New function.
4100 (process_point_options): Use it.
4101
4102 2014-04-09 Pedro Alves <palves@redhat.com>
4103
4104 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4105 to lwpid_of.
4106
4107 2014-02-27 Pedro Alves <palves@redhat.com>
4108
4109 PR 12702
4110 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4111 macros.
4112 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4113 output.
4114 (last_thread_of_process_p): Take a PID argument instead of a
4115 thread pointer.
4116 (linux_wait_for_lwp): Delete.
4117 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4118 functions.
4119 (linux_low_filter_event): New function, party factored out from
4120 linux_wait_for_event.
4121 (linux_wait_for_event): Rename to ...
4122 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4123 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4124 sigsuspend. Check for zombie leaders.
4125 (linux_wait_for_event): Reimplement as wrapper around
4126 linux_wait_for_event_filtered.
4127 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4128 a normal or signal exit is seen, it's the whole process exiting.
4129 (wait_for_sigstop): No longer a for_each_inferior callback.
4130 Rewrite on top of linux_wait_for_event_filtered.
4131 (stop_all_lwps): Call wait_for_sigstop directly.
4132 * server.c (resume, handle_target_event): Handle
4133 TARGET_WAITKIND_NO_RESUMED.
4134
4135 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4136
4137 * win32-low.c (psapi_get_dll_name,
4138 * win32_CreateToolhelp32Snapshot): Delete.
4139 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4140 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4141 Delete.
4142 (handle_load_dll): Add function description.
4143 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4144
4145 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4146
4147 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4148 Add comment.
4149 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4150 base address when calling win32_add_one_solib.
4151 (handle_load_dll): Delete local variable load_addr.
4152 Remove 0x1000 offset applied to DLL base address when calling
4153 win32_add_one_solib.
4154 (handle_unload_dll): Add comment.
4155
4156 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4157
4158 * win32-low.c (win32_add_all_dlls): Renames
4159 win32_ensure_ntdll_loaded. Rewrite function documentation.
4160 Adjust implementation to always load all DLLs.
4161 Add 0x1000 offset to DLL base address when calling
4162 win32_add_one_solib.
4163 (child_initialization_done): New static global.
4164 (do_initial_child_stuff): Set child_initialization_done to
4165 zero during child initialization, and 1 after. Replace call
4166 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4167 Add comment.
4168 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4169 (handle_unload_dll): Add function documentation.
4170 (get_child_debug_event): Ignore load and unload DLL events
4171 during child initialization.
4172
4173 2014-02-20 Doug Evans <dje@google.com>
4174
4175 Remove global all_lwps.
4176 * inferiors.h (ptid_of): Move here from linux-low.h.
4177 (pid_of, lwpid_of): Ditto.
4178 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4179 parameter is a struct thread_info * now.
4180 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4181 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4182 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4183 directly.
4184 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4185 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4186 * linux-arm-low.c (update_registers_callback): Update, "entry"
4187 parameter is a struct thread_info * now.
4188 Fetch lwpid from current_inferior directly.
4189 (arm_insert_point): Pass &all_threads to find_inferior instead of
4190 &all_lwps.
4191 (arm_remove_point): Ditto.
4192 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4193 (arm_prepare_to_resume): Fetch pid from thread.
4194 (arm_read_description): Fetch lwpid from current_inferior directly.
4195 * linux-low.c (all_lwps): Delete.
4196 (delete_lwp): Delete call to remove_inferior.
4197 (handle_extended_wait): Fetch lwpid from thread.
4198 (add_lwp): Don't set lwp->entry.id. Remove call to
4199 add_inferior_to_list.
4200 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4201 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4202 (kill_one_lwp_callback): Ditto.
4203 (linux_kill): Don't dereference NULL pointer.
4204 Fetch ptid,lwpid from thread.
4205 (get_detach_signal): Fetch ptid from thread.
4206 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4207 Simplify call to regcache_invalidate_thread.
4208 (delete_lwp_callback): Update, "entry" parameter is a
4209 struct thread_info * now. Fetch pid from thread.
4210 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4211 (status_pending_p_callback): Update, "entry" parameter is a
4212 struct thread_info * now. Fetch ptid from thread.
4213 (find_lwp_pid): Update, "entry" parameter is a
4214 struct thread_info * now.
4215 (linux_wait_for_lwp): Fetch pid from thread.
4216 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4217 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4218 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4219 (dequeue_one_deferred_signal): Ditto.
4220 (cancel_breakpoint): Fetch ptid from current_inferior.
4221 (linux_wait_for_event): Pass &all_threads to find_inferior,
4222 not &all_lwps. Fetch ptid, lwpid from thread.
4223 (count_events_callback): Update, "entry" parameter is a
4224 struct thread_info * now.
4225 (select_singlestep_lwp_callback): Ditto.
4226 (select_event_lwp_callback): Ditto.
4227 (cancel_breakpoints_callback): Ditto.
4228 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4229 not &all_lwps.
4230 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4231 (unsuspend_one_lwp): Update, "entry" parameter is a
4232 struct thread_info * now.
4233 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4234 not &all_lwps.
4235 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4236 Fetch lwpid from thread, not lwp.
4237 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4238 Pass &all_threads to find_inferior, not &all_lwps.
4239 (send_sigstop): Fetch lwpid from thread, not lwp.
4240 (send_sigstop_callback): Update, "entry" parameter is a
4241 struct thread_info * now.
4242 (suspend_and_send_sigstop_callback): Ditto.
4243 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4244 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4245 struct thread_info * now.
4246 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4247 from thread, lwp.
4248 (lwp_running): Update, "entry" parameter is a
4249 struct thread_info * now.
4250 (stop_all_lwps): Fetch ptid from thread.
4251 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4252 (linux_resume_one_lwp): Fetch lwpid from thread.
4253 (linux_set_resume_request): Update, "entry" parameter is a
4254 struct thread_info * now. Fetch pid, lwpid from thread.
4255 (resume_status_pending_p): Update, "entry" parameter is a
4256 struct thread_info * now.
4257 (need_step_over_p): Ditto. Fetch lwpid from thread.
4258 (start_step_over): Fetch lwpid from thread.
4259 (linux_resume_one_thread): Update, "entry" parameter is a
4260 struct thread_info * now. Fetch lwpid from thread.
4261 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4262 (proceed_one_lwp): Update, "entry" parameter is a
4263 struct thread_info * now. Fetch lwpid from thread.
4264 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4265 struct thread_info * now.
4266 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4267 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4268 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4269 directly.
4270 (regsets_store_inferior_registers): Ditto.
4271 (fetch_register, store_register): Ditto.
4272 (linux_read_memory, linux_write_memory): Ditto.
4273 (linux_request_interrupt): Ditto.
4274 (linux_read_auxv): Ditto.
4275 (linux_xfer_siginfo): Ditto.
4276 (linux_qxfer_spu): Ditto.
4277 (linux_qxfer_libraries_svr4): Ditto.
4278 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4279 moved to inferiors.h.
4280 (get_lwp): Delete.
4281 (get_thread_lwp): Update.
4282 (struct lwp_info): Delete member "entry". Simplify comment for
4283 member "thread".
4284 (all_lwps): Delete.
4285 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4286 current_inferior directly.
4287 (update_watch_registers_callback): Update, "entry" parameter is a
4288 struct thread_info * now. Fetch pid from thread.
4289 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4290 (mips_insert_point): Fetch lwpid from current_inferior.
4291 Pass &all_threads to find_inferior, not &all_lwps.
4292 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4293 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4294 directly.
4295 (mips_stopped_data_address): Ditto.
4296 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4297 directly.
4298 * linux-tile-low.c (tile_arch_setup): Ditto.
4299 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4300 (update_debug_registers_callback): Update, "entry" parameter is a
4301 struct thread_info * now. Fetch pid from thread.
4302 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4303 Pass &all_threads to find_inferior, not &all_lwps.
4304 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4305 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4306 Pass &all_threads to find_inferior, not &all_lwps.
4307 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4308 (i386_dr_low_get_status): Ditto.
4309 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4310 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4311 (x86_linux_read_description): Ditto.
4312 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4313
4314 2014-02-20 Doug Evans <dje@google.com>
4315
4316 * inferiors.c (get_first_inferior): Fix buglet.
4317
4318 2014-02-19 Doug Evans <dje@google.com>
4319
4320 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4321 * inferiors.c (add_thread): Change result type to struct thread_info *.
4322 All callers updated.
4323 (add_lwp): Call add_thread here instead of in callers.
4324 All callers updated.
4325 * linux-low.h (get_lwp_thread): Rewrite.
4326 (struct lwp_info): New member "thread".
4327
4328 2014-02-19 Doug Evans <dje@google.com>
4329
4330 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4331 All callers updated.
4332
4333 2014-02-19 Doug Evans <dje@google.com>
4334
4335 * inferiors.c (add_thread): Fix whitespace.
4336
4337 2014-02-19 Doug Evans <dje@google.com>
4338
4339 * dll.c (clear_dlls): Replace accessing list implemention details
4340 with API function.
4341 * gdbthread.h (get_first_thread): Declare.
4342 * inferiors.c (for_each_inferior_with_data): New function.
4343 (get_first_thread): New function.
4344 (find_thread_ptid): Simplify.
4345 (get_first_inferior): New function.
4346 (clear_list): Delete.
4347 (one_inferior_p): New function.
4348 (clear_inferior_list): New function.
4349 (clear_inferiors): Update.
4350 * inferiors.h (for_each_inferior_with_data): Declare.
4351 (clear_inferior_list): Declare.
4352 (one_inferior_p): Declare.
4353 (get_first_inferior): Declare.
4354 * linux-low.c (linux_wait_for_event): Replace accessing list
4355 implemention details with API function.
4356 * server.c (target_running): Ditto.
4357 (accumulate_file_name_length): New function.
4358 (emit_dll_description): New function.
4359 (handle_qxfer_libraries): Replace accessing list implemention
4360 details with API function.
4361 (handle_qxfer_threads_worker): New function.
4362 (handle_qxfer_threads_proper): Replace accessing list implemention
4363 details with API function.
4364 (handle_query): Ditto.
4365 (visit_actioned_threads_callback_ftype): New typedef.
4366 (visit_actioned_threads_data): New struct.
4367 (visit_actioned_threads): Rewrite to be find_inferior callback.
4368 (resume): Call find_inferior.
4369 (handle_status): Replace accessing list implemention
4370 details with API function.
4371 (process_serial_event): Replace accessing list implemention details
4372 with API function.
4373 * target.c (set_desired_inferior): Replace accessing list implemention
4374 details with API function.
4375 * tracepoint.c (same_process_p): New function.
4376 (gdb_agent_about_to_close): Replace accessing list implemention
4377 details with API function.
4378 * win32-low.c (child_delete_thread): Replace accessing list
4379 implemention details with API function.
4380 (match_dll_by_basename): New function.
4381 (dll_is_loaded_by_basename): New function.
4382 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4383 details call to dll_is_loaded_by_basename.
4384
4385 2014-02-19 Doug Evans <dje@google.com>
4386
4387 * dll.h (struct dll_info): Add comment.
4388 * gdbthread.h (struct thread_info): Add comment.
4389 (current_ptid): Simplify.
4390 * inferiors.c (add_process): Update.
4391 (remove_process): Update.
4392 * inferiors.h (struct process_info): Rename member "head" to "entry".
4393 * linux-low.c (delete_lwp): Update.
4394 (add_lwp): Update.
4395 (last_thread_of_process_p): Update.
4396 (kill_one_lwp_callback, linux_kill): Update.
4397 (status_pending_p_callback): Update.
4398 (wait_for_sigstop): Update. Simplify read of ptid.
4399 (start_step_over): Update.
4400 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4401 (get_lwp_thread): Update.
4402 (struct lwp_info): Rename member "head" to "entry".
4403 * regcache.h (inferior_list_entry): Delete.
4404 * server.c (kill_inferior_callback): Update.
4405 (detach_or_kill_inferior_callback): Update.
4406 (print_started_pid): Update.
4407 (print_attached_pid): Update.
4408 (process_serial_event): Simplify read of ptid.
4409 * thread-db.c (thread_db_create_event): Update.
4410 (thread_db_get_tls_address): Update.
4411 * win32-low.c (current_inferior_ptid): Simplify.
4412
4413 2014-02-19 Tom Tromey <tromey@redhat.com>
4414
4415 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4416 argument.
4417 (target_supports_btrace): Update.
4418
4419 2014-02-14 Yao Qi <yao@codesourcery.com>
4420
4421 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4422 (rsp-low-ipa.o): New target.
4423
4424 2014-02-12 Tom Tromey <tromey@redhat.com>
4425
4426 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4427 convert_ascii_to_int.
4428 * regcache.c (registers_to_string): Likewise.
4429 * remote-utils.c (decode_M_packet): Likewise.
4430 * server.c (process_serial_event): Likewise.
4431
4432 2014-02-12 Tom Tromey <tromey@redhat.com>
4433
4434 * server.c (handle_query, handle_v_run): Use hex2bin, not
4435 unhexify.
4436 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4437
4438 2014-02-12 Tom Tromey <tromey@redhat.com>
4439
4440 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4441 convert_int_to_ascii.
4442 * regcache.c (registers_to_string, collect_register_as_string):
4443 Likewise.
4444 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4445 Likewise.
4446 * server.c (process_serial_event): Likewise.
4447 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4448 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4449
4450 2014-02-12 Tom Tromey <tromey@redhat.com>
4451
4452 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4453 bin2hex, not hexify.
4454 * tracepoint.c (cmd_qtstatus): Likewise.
4455
4456 2014-02-12 Tom Tromey <tromey@redhat.com>
4457
4458 * remote-utils.c (monitor_output): Pass explicit length to
4459 hexify.
4460
4461 2014-02-12 Tom Tromey <tromey@redhat.com>
4462
4463 * tracepoint.c: Include rsp-low.h.
4464 * server.c: Include rsp-low.h.
4465 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4466 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4467 declare.
4468 * remote-utils.c: Include rsp-low.h.
4469 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4470 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4471 (convert_int_to_ascii, convert_ascii_to_int): Move to
4472 common/rsp-low.c.
4473 * regcache.c: Include rsp-low.h.
4474 * ax.c: Include rsp-low.h.
4475 * Makefile.in (SFILES): Add common/rsp-low.c.
4476 (OBS): Add rsp-low.o.
4477 (rsp-low.o): New target.
4478
4479 2014-02-12 Tom Tromey <tromey@redhat.com>
4480
4481 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4482 Include print-utils.h.
4483 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4484 (plongest, thirty_two, phex_nz): Remove.
4485 * Makefile.in (SFILES): Add common/print-utils.c.
4486 (OBS): Add print-utils.o.
4487 (print-utils-ipa.o): New target.
4488 (print-utils.o): New target.
4489 (IPA_OBJS): Add print-utils-ipa.o.
4490
4491 2014-02-06 Tom Tromey <tromey@redhat.com>
4492
4493 * Makefile.in (SFILES): Fix indentation.
4494
4495 2014-02-05 Doug Evans <dje@google.com>
4496
4497 * linux-low.c (linux_wait_for_event): Improve comment.
4498 (linux_wait_1): Keep current_inferior in sync with event_child.
4499
4500 2014-01-22 Doug Evans <dje@google.com>
4501
4502 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4503
4504 2014-01-22 Doug Evans <dje@google.com>
4505
4506 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4507 * configure: Regenerate.
4508 * config.in: Regenerate.
4509 * Makefile.in (SFILES): Add debug.c.
4510 (OBS): Add debug.o.
4511 * debug.c: New file.
4512 * debug.h: New file.
4513 * linux-aarch64-low.c (*): Update all debugging printfs to use
4514 debug_printf instead of fprintf.
4515 * linux-arm-low.c (*): Ditto.
4516 * linux-cris-low.c (*): Ditto.
4517 * linux-crisv32-low.c (*): Ditto.
4518 * linux-m32r-low.c (*): Ditto.
4519 * linux-sparc-low.c (*): Ditto.
4520 * linux-x86.c (*): Ditto.
4521 * linux-low.c (*): Ditto.
4522 (linux_wait_1): Add calls to debug_enter, debug_exit.
4523 (linux_wait): Remove redundant debugging printf.
4524 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4525 (linux_resume, unstop_all_lwps): Ditto.
4526 * mem-break.c (*): Update all debugging printfs to use
4527 debug_printf instead of fprintf.
4528 * remote-utils.c (*): Ditto.
4529 * thread-db.c (*): Ditto.
4530 * server.c #include <ctype.h>, "gdb_vecs.h".
4531 (debug_threads): Moved to debug.c.
4532 (*): Update all debugging printfs to use debug_printf instead of
4533 fprintf.
4534 (start_inferior): Replace call to fflush with call to debug_flush.
4535 (monitor_show_help): Mention set debug-format.
4536 (parse_debug_format_options): New function.
4537 (handle_monitor_command): Handle "monitor set debug-format".
4538 (gdbserver_usage): Mention --debug-format.
4539 (main): Parse --debug-format.
4540 * server.h (debug_threads): Declaration moved to debug.h.
4541 #include "debug.h".
4542 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4543 trace_debug_1 that uses debug_printf.
4544 (tracepoint_look_up_symbols): Update all debugging printfs to use
4545 debug_printf instead of fprintf.
4546
4547 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4548
4549 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4550 sys/ptrace.h.
4551
4552 2014-01-17 Pedro Alves <palves@redhat.com>
4553
4554 PR build/16445
4555 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4556 defined after including gdb_proc_service.h.
4557
4558 2014-01-16 Doug Evans <dje@google.com>
4559
4560 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4561 (match_dll): Use it.
4562
4563 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4564
4565 * target.h (target_ops) <read_btrace>: Change parameters and
4566 return type to allow error reporting.
4567 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4568 trace reading errors on.
4569 * linux-low.c (linux_low_read_btrace): Pass trace reading
4570 errors on.
4571 (linux_low_disable_btrace): New.
4572
4573 2014-01-15 Doug Evans <dje@google.com>
4574
4575 * inferiors.c (thread_id_to_gdb_id): Delete.
4576 * inferiors.h (thread_id_to_gdb_id): Delete.
4577
4578 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4579
4580 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4581 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4582 versions.
4583
4584 2014-01-08 Pedro Alves <palves@redhat.com>
4585
4586 * server.c (handle_status): Don't discard previous queued stop
4587 replies or thread's pending status here.
4588 (main) <disconnection>: Do it here instead.
4589
4590 2014-01-08 Pedro Alves <palves@redhat.com>
4591
4592 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4593 * server.c (visit_actioned_threads, handle_pending_status): New
4594 function.
4595 (handle_v_cont): Factor out parts to ...
4596 (resume): ... this new function. If in all-stop, and a thread
4597 being resumed has a pending status, report it without actually
4598 resuming.
4599 (myresume): Adjust to use the new 'resume' function.
4600 (clear_pending_status_callback, set_pending_status_callback)
4601 (find_status_pending_thread_callback): New functions.
4602 (handle_status): Handle the case of multiple threads having
4603 interesting statuses to report. Report threads' real last signal
4604 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4605 with an interesting thread to report the status for, instead of
4606 always reporting the status of the first thread.
4607
4608 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4609
4610 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4611 * gdbreplay.c (gdbreplay_version): Likewise.
4612
4613 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4614
4615 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4616 iov.iov_len with the real length in use.
4617
4618 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4619
4620 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4621 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4622 for all targets that use win32-low.c.
4623 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4624 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4625
4626 2013-12-13 Pedro Alves <palves@redhat.com>
4627
4628 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4629 if equal to TARGET_WAITKIND_LOADED.
4630 * win32-low.c (cached_status): New static global.
4631 (win32_wait): Add declaration.
4632 (do_initial_child_stuff): Flush all initial pending debug events
4633 up to the initial breakpoint.
4634 (win32_wait): If CACHED_STATUS was set, return that instead
4635 of doing a real wait. Remove the code resuming the execution
4636 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4637 during the initial phase. Also remove the code changing
4638 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4639 TARGET_WAITKIND_STOPPED.
4640
4641 2013-12-11 Yao Qi <yao@codesourcery.com>
4642
4643 * notif.c (handle_notif_ack): Return 0 if no notification
4644 matches.
4645
4646 2013-11-20 Doug Evans <dje@google.com>
4647
4648 * linux-low.c (linux_set_resume_request): Fix comment.
4649
4650 2013-11-20 Doug Evans <dje@google.com>
4651
4652 * linux-low.c (resume_status_pending_p): Tweak comment.
4653
4654 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4655
4656 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4657 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4658 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4659 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4660 (srv_amd64_regobj): Add amd64-mpx.o.
4661 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4662 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4663 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4664 * i387-fp.c (num_pl_bnd_register) Added constant.
4665 (num_pl_bnd_cfg_registers) Added constant.
4666 (struct i387_xsave) Added reserved area and MPX fields.
4667 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4668 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4669 function.
4670 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4671 (init_registers_amd64_mpx_linux): Declare new function.
4672 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4673 (x86_64_regmap): Add MPX registers.
4674 (x86_linux_read_description): Add MPX case.
4675 (initialize_low_arch): Initialize MPX targets.
4676
4677 2013-11-18 Tom Tromey <tromey@redhat.com>
4678
4679 * configure: Rebuild.
4680 * configure.ac: Don't check for stdlib.h.
4681 * gdbreplay.c: Unconditionally include stdlib.h.
4682
4683 2013-11-18 Tom Tromey <tromey@redhat.com>
4684
4685 * config.in: Rebuild.
4686 * configure: Rebuild.
4687 * configure.ac: Don't use AC_HEADER_DIRENT.
4688
4689 2013-11-18 Tom Tromey <tromey@redhat.com>
4690
4691 * server.h: Don't check HAVE_STRING_H.
4692 * gdbreplay.c: Don't check HAVE_STRING_H.
4693 * configure: Rebuild.
4694
4695 2013-11-18 Tom Tromey <tromey@redhat.com>
4696
4697 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4698 LIBGNU.
4699
4700 2013-11-08 Tom Tromey <tromey@redhat.com>
4701
4702 * configure, config.in: Rebuild.
4703 * configure.ac: Remove unused configury.
4704
4705 2013-11-08 Tom Tromey <tromey@redhat.com>
4706
4707 * acinclude.m4: Include common.m4, codeset.m4.
4708 * configure, config.in: Rebuild.
4709 * configure.ac: Use GDB_AC_COMMON.
4710
4711 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4712
4713 * linux-s390-low.c (HWCAP_S390_TE): New define.
4714 (s390_arch_setup): Consider the TE field in the HWCAP for
4715 determining 'have_regset_tdb'.
4716
4717 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4718
4719 PR gdb/16014
4720 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4721 call to sizeof.
4722
4723 2013-10-02 Pedro Alves <palves@redhat.com>
4724
4725 * server.c (process_serial_event): Don't output "GDBserver
4726 exiting" if GDB is connected through stdio.
4727 * target.c (mywait): Likewise, be silent if GDB is connected
4728 through stdio.
4729
4730 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4731
4732 * lynx-low.c (lynx_add_threads_after_attach): New function.
4733 (lynx_attach): Remove call to add_thread. Add call to
4734 lynx_add_threads_after_attach instead.
4735
4736 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4737
4738 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4739 * config.in, configure: Regenerated.
4740
4741 2013-09-18 Yao Qi <yao@codesourcery.com>
4742
4743 PR server/15959
4744 * server.c (start_inferior): Clear 'resume_info'.
4745
4746 2013-09-16 Jiong Wang <jiwang@tilera.com>
4747
4748 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4749 for each register.
4750
4751 2013-09-16 Jiong Wang <jiwang@tilera.com>
4752
4753 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4754 linux-tile-low.o to srv_tgtobj.
4755
4756 2013-09-16 Will Newton <will.newton@linaro.org>
4757
4758 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4759 out regs.
4760
4761 2013-09-06 Pedro Alves <palves@redhat.com>
4762
4763 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4764 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4765 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4766 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4767 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4768 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4769
4770 2013-09-06 Pedro Alves <palves@redhat.com>
4771
4772 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4773 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4774
4775 2013-09-06 Pedro Alves <palves@redhat.com>
4776
4777 * linux-amd64-ipa.c: Include tracepoint.h.
4778 * linux-i386-ipa.c: Include tracepoint.h.
4779
4780 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4781
4782 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4783 (ps_get_thread_area): New function.
4784
4785 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4786
4787 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4788 (initialize_low_arch): Call init_registers_crisv32 rather than
4789 init_register_crisv32.
4790
4791 2013-09-05 Pedro Alves <palves@redhat.com>
4792
4793 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4794 to ...
4795 * hostio.h: ... this new file.
4796 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4797 win32-low.c: Include hostio.h.
4798
4799 2013-09-05 Pedro Alves <palves@redhat.com>
4800
4801 * server.h (gdb_client_data, handler_func, callback_handler_func)
4802 (delete_file_handler, add_file_handler, append_callback_event)
4803 (delete_callback_event, start_event_loop, initialize_event_loop):
4804 Move to event-loop.h and include it.
4805 * event-loop.h: New file.
4806
4807 2013-09-05 Pedro Alves <palves@redhat.com>
4808
4809 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4810 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4811 (loaded_dll, unloaded_dll): Move to ...
4812 * dll.h: ... this new file.
4813 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4814
4815 2013-09-05 Pedro Alves <palves@redhat.com>
4816
4817 * server.h (current_process, get_thread_process, all_processes)
4818 (add_inferior_to_list, for_each_inferior, current_inferior)
4819 (remove_inferior, add_process, remove_process, find_process_pid)
4820 (have_started_inferiors_p, have_attached_inferiors_p)
4821 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4822 (clear_inferiors, find_inferior, find_inferior_id)
4823 (inferior_target_data, set_inferior_target_data)
4824 (inferior_regcache_data, set_inferior_regcache_data): Move to
4825 inferiors.h, and include it.
4826 * inferiors.h: New file.
4827
4828 2013-09-05 Pedro Alves <palves@redhat.com>
4829
4830 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4831 Move ...
4832 * ax.h: ... here.
4833
4834 2013-09-05 Pedro Alves <palves@redhat.com>
4835
4836 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4837 tracepoint.h.
4838 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4839 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4840 (handle_tracepoint_general_set, handle_tracepoint_query)
4841 (tracepoint_finished_step, tracepoint_was_hit)
4842 (release_while_stepping_state_list, current_traceframe)
4843 (in_readonly_region, traceframe_read_mem)
4844 (fetch_traceframe_registers, traceframe_read_sdata)
4845 (traceframe_read_info, struct fast_tpoint_collect_status)
4846 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4847 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4848 (supply_fast_tracepoint_registers)
4849 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4850 (ipa_tdesc, claim_trampoline_space)
4851 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4852 (agent_mem_read, agent_get_trace_state_variable_value)
4853 (agent_set_trace_state_variable_value, agent_tsv_read)
4854 (agent_mem_read_string, get_raw_reg_func_addr)
4855 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4856 * tracepoint.h: ... this new file.
4857
4858 2013-09-05 Pedro Alves <palves@redhat.com>
4859
4860 * server.h (perror_with_name, error, fatal, warning, paddress)
4861 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4862 include it.
4863 * utils.h: New file.
4864
4865 2013-09-05 Pedro Alves <palves@redhat.com>
4866
4867 * server.h (remote_debug, noack_mode, transport_is_reliable)
4868 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4869 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4870 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4871 (write_enn, initialize_async_io, enable_async_io)
4872 (disable_async_io, check_remote_input_interrupt_request)
4873 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4874 (dead_thread_notify, prepare_resume_reply)
4875 (decode_address_to_semicolon, decode_address, decode_m_packet)
4876 (decode_M_packet, decode_X_packet, decode_xfer_write)
4877 (decode_search_memory_packet, unhexify, hexify)
4878 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4879 (look_up_one_symbol, relocate_instruction)
4880 (monitor_output): Move to remote-utils.h, and include it.
4881 * remote-utils.h: New file.
4882
4883 2013-09-05 Pedro Alves <palves@redhat.com>
4884
4885 * server.h (_): Delete.
4886
4887 2013-09-02 Pedro Alves <palves@redhat.com>
4888
4889 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4890 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4891 allocated.
4892 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4893
4894 2013-09-02 Pierre Muller <muller@sourceware.org>
4895
4896 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4897 or WriteProcessMemory complete successfully and handle
4898 ERROR_PARTIAL_COPY error.
4899
4900 2013-09-02 Pedro Alves <palves@redhat.com>
4901
4902 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4903 error instead of EIO.
4904
4905 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4906
4907 PR server/15604
4908 * linux-low.c: Include filestuff.h.
4909 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4910 * lynx-low.c: Include filestuff.h.
4911 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4912 * server.c: Include filestuff.h.
4913 (main): Call notice_open_fds.
4914 * spu-low.c: Include filestuff.h.
4915 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4916
4917 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4918
4919 * Makefile.in: Explain why ../target and ../nat are not
4920 listed as include file search paths.
4921 (linux-waitpid.o): New object file rule.
4922 * configure.srv (srv_native_linux_obj): New variable.
4923 Replace all occurrences of linux native object files with
4924 $srv_native_linux_obj.
4925 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4926 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4927 (linux_enable_event_reporting): Remove declaration.
4928 (my_waitpid): Moved to common/linux-waitpid.c.
4929 (linux_wait_for_event): Pass ptid when calling
4930 linux_enable_event_reporting.
4931 (linux_supports_tracefork_flag): Remove.
4932 (linux_enable_event_reporting): Likewise.
4933 (linux_tracefork_grandchild): Remove.
4934 (STACK_SIZE): Moved to common/linux-ptrace.c.
4935 (linux_tracefork_child): Remove.
4936 (linux_test_for_tracefork): Remove.
4937 (linux_look_up_symbols): Call linux_supports_traceclone.
4938 (initialize_low): Remove call to linux_test_for_tracefork.
4939 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4940 common/linux-ptrace.h.
4941 (PTRACE_TYPE_ARG4): Likewise.
4942 Include linux-ptrace.h.
4943
4944 2013-08-21 Pedro Alves <palves@redhat.com>
4945
4946 * config.in: Renegerate.
4947
4948 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4949
4950 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4951 (SFILES): Remove $(srcdir)/common/target-common.c and
4952 add $(srcdir)/target/waitstatus.c.
4953 (OBS): Remove target-common.o and add waitstatus.o.
4954 (server_h): Remove $(srcdir)/../common/target-common.h and
4955 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4956 and $(srcdir)/../target/waitstatus.h.
4957 (target-common.o): Remove.
4958 (waitstatus.o): New target object file.
4959 * target.h: Do not include target-common.h and
4960 include target/resume.h, target/wait.h and
4961 target/waitstatus.h.
4962
4963 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4964
4965 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4966 to PTRACE_TYPE_ARG3.
4967 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4968 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4969 PTRACE_TYPE_ARG4.
4970 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4971 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4972
4973 2013-07-27 Jie Zhang <jie@codesourcery.com>
4974 Daniel Jacobowitz <dan@codesourcery.com>
4975 Yao Qi <yao@codesourcery.com>
4976
4977 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4978 (mips-linux-watch.o): New rule.
4979 (mips_linux_watch_h): New variable.
4980 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4981 srv_tgtobj.
4982 * linux-mips-low.c: Include mips-linux-watch.h.
4983 (struct arch_process_info, struct arch_lwp_info): New.
4984 (update_watch_registers_callback): New function.
4985 (mips_linux_new_process, mips_linux_new_thread) New functions.
4986 (mips_linux_prepare_to_resume, mips_insert_point): New
4987 functions.
4988 (mips_remove_point, mips_stopped_by_watchpoint): New
4989 functions.
4990 (rsp_bp_type_to_target_hw_bp_type): New function.
4991 (mips_stopped_data_address): New function.
4992 (the_low_target): Add watchpoint support functions.
4993
4994 2013-07-27 Yao Qi <yao@codesourcery.com>
4995
4996 * i386-low.c: Include break-common.h.
4997 (enum target_hw_bp_type): Remove.
4998
4999 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5000
5001 * Makefile.in (SFILES): /common/target-common.c.
5002 (OBS): Add target-common.o.
5003 (server_h): Add $(srcdir)/../common/target-common.h.
5004 (target-common.o): New target.
5005 * server.c (queue_stop_reply_callback): Free
5006 status string after use.
5007 * target.c (target_waitstatus_to_string): Remove.
5008 * target.h: Include target-common.h.
5009 (resume_kind): Likewise.
5010 (target_waitkind): Likewise.
5011 (target_waitstatus): Likewise.
5012 (TARGET_WNOHANG): Likewise.
5013
5014 2013-07-04 Yao Qi <yao@codesourcery.com>
5015
5016 * Makefile.in (host_alias): Use @host_noncanonical@.
5017 (target_alias): Use @target_noncanonical@.
5018 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5019 ACX_NONCANONICAL_HOST.
5020 * configure: Regenerated.
5021
5022 Revert:
5023 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5024
5025 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5026 * configure: Rebuild.
5027 * Makefile.in (version_host, version_target): Get from configure.
5028 (version.c): Use $(version_host) and $(version_target).
5029
5030 2013-07-03 Pedro Alves <palves@redhat.com>
5031
5032 * Makefile.in (config.status): Depend on development.sh.
5033 * acinclude.m4: Include libmcheck.m4.
5034 * configure: Regenerate.
5035
5036 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5037
5038 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5039 attribute inside the parentheses.
5040 (winapi_DebugSetProcessKillOnExit): Ditto.
5041 (winapi_DebugBreakProcess): Ditto.
5042 (winapi_GenerateConsoleCtrlEvent): Ditto.
5043
5044 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5045
5046 * notif.h (notif_event): Add a dummy member to avoid compiler
5047 errors.
5048
5049 2013-07-01 Pedro Alves <palves@redhat.com>
5050
5051 * hostio.c (HOSTIO_PATH_MAX): Define.
5052 (require_filename, handle_open, handle_unlink, handle_readlink):
5053 Use it.
5054
5055 2013-07-01 Pedro Alves <palves@redhat.com>
5056
5057 * server.h: Include "pathmax.h".
5058 * linux-low.c: Don't include sys/param.h.
5059 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5060 MAXPATHLEN.
5061 * win32-low.c: Don't include sys/param.h.
5062 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5063
5064 2013-07-01 Pedro Alves <palves@redhat.com>
5065
5066 * event-loop.c: Don't check HAVE_UNISTD_H before including
5067 <unistd.h>.
5068 * gdbreplay.c: Likewise.
5069 * remote-utils.c: Likewise.
5070 * server.c: Likewise.
5071 * configure.ac: Don't check for unistd.h.
5072 * configure: Regenerate.
5073
5074 2013-06-28 Tom Tromey <tromey@redhat.com>
5075
5076 * Makefile.in (version.c): Use version.in, not
5077 common/version.in.
5078
5079 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5080
5081 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5082 * configure: Rebuild.
5083 * Makefile.in (version_host, version_target): Get from configure.
5084 (version.c): Use $(version_host) and $(version_target).
5085
5086 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5087
5088 Fix trace-status to output user name without trailing colon.
5089 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5090
5091 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5092
5093 Fix trace-status to output proper start-time and stop-time.
5094 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5095 output start time and stop time in hex as gdb expects.
5096
5097 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5098
5099 * tracepoint.c (build_traceframe_info_xml): Output trace state
5100 variables present in the trace buffer.
5101
5102 2013-06-24 Tom Tromey <tromey@redhat.com>
5103
5104 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5105 create-version.sh.
5106 (version.o): Remove.
5107 * gdbreplay.c: Include version.h.
5108 (version, host_name): Don't declare.
5109 * server.h: Include version.h.
5110 (version, host_name): Don't declare.
5111
5112 2013-06-12 Pedro Alves <palves@redhat.com>
5113
5114 * linux-x86-low.c (linux_is_elf64): Delete global.
5115 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5116 with local linux_pid_exe_is_elf_64_file use.
5117
5118 2013-06-11 Pedro Alves <palves@redhat.com>
5119
5120 * linux-low.c (regset_disabled, disable_regset): New functions.
5121 (regsets_fetch_inferior_registers)
5122 (regsets_store_inferior_registers): Use them.
5123 (initialize_regsets_info); Don't allocate the disabled_regsets
5124 array here.
5125 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5126 comment.
5127
5128 2013-06-11 Pedro Alves <palves@redhat.com>
5129
5130 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5131 xmalloc.
5132
5133 2013-06-11 Pedro Alves <palves@redhat.com>
5134
5135 * linux-x86-low.c (initialize_low_arch): Call
5136 init_registers_x32_avx_linux.
5137
5138 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5139
5140 Fix compatibility with Android Bionic.
5141 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5142 it is not empty.
5143
5144 2013-06-07 Pedro Alves <palves@redhat.com>
5145
5146 PR server/14823
5147 * Makefile.in (OBS): Add tdesc.o.
5148 (IPA_OBJS): Add tdesc-ipa.o.
5149 (tdesc-ipa.o): New rule.
5150 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5151 interface.
5152 * linux-low.c (new_inferior): Delete.
5153 (disabled_regsets, num_regsets): Delete.
5154 (linux_add_process): Adjust to set the new per-process
5155 new_inferior flag.
5156 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5157 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5158 was a stop. When calling arch_setup, switch the current inferior
5159 to the thread that got an event.
5160 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5161 (regsets_fetch_inferior_registers)
5162 (regsets_store_inferior_registers): New regsets_info parameter.
5163 Adjust to use it.
5164 (linux_register_in_regsets): New regs_info parameter. Adjust to
5165 use it.
5166 (register_addr, fetch_register, store_register): New usrregs_info
5167 parameter. Adjust to use it.
5168 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5169 parameter regs_info. Adjust to use it.
5170 (linux_fetch_registers): Get the current inferior's regs_info, and
5171 adjust to use it.
5172 (linux_store_registers): Ditto.
5173 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5174 (initialize_low): Don't initialize the target_regsets here. Call
5175 initialize_low_arch.
5176 * linux-low.h (target_regsets): Delete declaration.
5177 (struct regsets_info): New.
5178 (struct usrregs_info): New.
5179 (struct regs_info): New.
5180 (struct process_info_private) <new_inferior>: New field.
5181 (struct linux_target_ops): Delete the num_regs, regmap, and
5182 regset_bitmap fields. New field regs_info.
5183 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5184 * i387-fp.c (num_xmm_registers): Delete.
5185 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5186 calls to new interface.
5187 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5188 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5189 Infer the number of xmm registers from the regcache's target
5190 description.
5191 * i387-fp.h (num_xmm_registers): Delete.
5192 * inferiors.c (add_thread): Don't install the thread's regcache
5193 here.
5194 * proc-service.c (gregset_info): Fetch the current inferior's
5195 regs_info. Adjust to use it.
5196 * regcache.c: Include tdesc.h.
5197 (register_bytes, reg_defs, num_registers)
5198 (gdbserver_expedite_regs): Delete.
5199 (get_thread_regcache): If the thread doesn't have a regcache yet,
5200 create one, instead of aborting gdbserver.
5201 (regcache_invalidate_one): Rename to ...
5202 (regcache_invalidate_thread): ... this.
5203 (regcache_invalidate_one): New.
5204 (regcache_invalidate): Only invalidate registers of the current
5205 process.
5206 (init_register_cache): Add target_desc parameter, and use it.
5207 (new_register_cache): Ditto. Assert the target description has a
5208 non zero registers_size.
5209 (regcache_cpy): Add assertions. Adjust.
5210 (realloc_register_cache, set_register_cache): Delete.
5211 (registers_to_string, registers_from_string): Adjust.
5212 (find_register_by_name, find_regno, find_register_by_number)
5213 (register_cache_size): Add target_desc parameter, and use it.
5214 (free_register_cache_thread, free_register_cache_thread_one)
5215 (regcache_release, register_cache_size): New.
5216 (register_size): Add target_desc parameter, and use it.
5217 (register_data, supply_register, supply_register_zeroed)
5218 (supply_regblock, supply_register_by_name, collect_register)
5219 (collect_register_as_string, collect_register_by_name): Adjust.
5220 * regcache.h (struct target_desc): Forward declare.
5221 (struct regcache) <tdesc>: New field.
5222 (init_register_cache, new_register_cache): Add target_desc
5223 parameter.
5224 (regcache_invalidate_thread): Declare.
5225 (regcache_invalidate_one): Delete declaration.
5226 (regcache_release): Declare.
5227 (find_register_by_number, register_cache_size, register_size)
5228 (find_regno): Add target_desc parameter.
5229 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5230 declarations.
5231 * remote-utils.c: Include tdesc.h.
5232 (outreg, prepare_resume_reply): Adjust.
5233 * server.c: Include tdesc.h.
5234 (gdbserver_xmltarget): Delete declaration.
5235 (get_features_xml, process_serial_event): Adjust.
5236 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5237 declare.
5238 (struct process_info) <tdesc>: New field.
5239 (ipa_tdesc): Declare.
5240 * tdesc.c: New file.
5241 * tdesc.h: New file.
5242 * tracepoint.c: Include tdesc.h.
5243 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5244 (get_context_regcache): Adjust to pass ipa_tdesc down.
5245 (do_action_at_tracepoint): Adjust to get the register cache size
5246 from the context regcache's description.
5247 (traceframe_walk_blocks): Adjust to get the register cache size
5248 from the current trace frame's description.
5249 (traceframe_get_pc): Adjust to get current trace frame's
5250 description and pass it down.
5251 (gdb_collect): Adjust to get the register cache size from the
5252 IPA's description.
5253 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5254 (gdbserver_xmltarget): Delete.
5255 (initialize_low_tracepoint): Set the ipa's target description.
5256 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5257 (initialize_low_tracepoint): Set the ipa's target description.
5258 * linux-x86-low.c: Include tdesc.h.
5259 [__x86_64__] (is_64bit_tdesc): New.
5260 (ps_get_thread_area, x86_get_thread_area): Use it.
5261 (i386_cannot_store_register): Rename to ...
5262 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5263 (i386_cannot_fetch_register): Rename to ...
5264 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5265 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5266 to new interface.
5267 (target_regsets): Rename to ...
5268 (x86_regsets): ... this.
5269 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5270 interface.
5271 (x86_siginfo_fixup): Use is_64bit_tdesc.
5272 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5273 (tdesc_x32_avx_linux, tdesc_x32_linux)
5274 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5275 Declare.
5276 (x86_linux_update_xmltarget): Delete.
5277 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5278 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5279 (AMD64_LINUX_USER64_CS): New.
5280 (x86_linux_read_description): New, based on
5281 x86_linux_update_xmltarget.
5282 (same_process_callback): New.
5283 (x86_arch_setup_process_callback): New.
5284 (x86_linux_update_xmltarget): New.
5285 (x86_regsets_info): New.
5286 (amd64_linux_regs_info): New.
5287 (i386_linux_usrregs_info): New.
5288 (i386_linux_regs_info): New.
5289 (x86_linux_regs_info): New.
5290 (x86_arch_setup): Reimplement.
5291 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5292 (x86_emit_ops): Ditto.
5293 (the_low_target): Adjust. Install x86_linux_regs_info,
5294 x86_cannot_fetch_register, and x86_cannot_store_register.
5295 (initialize_low_arch): New.
5296 * linux-ia64-low.c (tdesc_ia64): Declare.
5297 (ia64_fetch_register): Adjust.
5298 (ia64_usrregs_info, regs_info): New globals.
5299 (ia64_regs_info): New function.
5300 (the_low_target): Adjust.
5301 (initialize_low_arch): New function.
5302 * linux-sparc-low.c (tdesc_sparc64): Declare.
5303 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5304 Adjust.
5305 (sparc_arch_setup): New function.
5306 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5307 (the_low_target): Adjust.
5308 (initialize_low_arch): New function.
5309 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5310 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5311 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5312 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5313 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5314 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5315 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5316 (tdesc_powerpc_isa205_vsx64l): Declare.
5317 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5318 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5319 (ppc_set_pc, ppc_get_hwcap): Adjust.
5320 (ppc_usrregs_info): Forward declare.
5321 (!__powerpc64__) ppc_regmap_adjusted: New global.
5322 (ppc_arch_setup): Adjust to the current process'es target
5323 description.
5324 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5325 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5326 (ppc_store_evrregset): Adjust.
5327 (target_regsets): Rename to ...
5328 (ppc_regsets): ... this, and make static.
5329 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5330 (ppc_regs_info): New function.
5331 (the_low_target): Adjust.
5332 (initialize_low_arch): New function.
5333 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5334 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5335 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5336 (tdesc_s390x_linux64v2): Declare.
5337 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5338 (s390_fill_gregset, s390_store_last_break): Adjust.
5339 (target_regsets): Rename to ...
5340 (s390_regsets): ... this, and make static.
5341 (s390_get_pc, s390_set_pc): Adjust.
5342 (s390_get_hwcap): New target_desc parameter, and use it.
5343 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5344 (s390_arch_setup): Adjust to set the current process'es target
5345 description. Don't adjust the regmap.
5346 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5347 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5348 (regs_info_3264): New globals.
5349 (s390_regs_info): New function.
5350 (the_low_target): Adjust.
5351 (initialize_low_arch): New function.
5352 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5353 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5354 [__mips64] (init_registers_mips_linux)
5355 (init_registers_mips_dsp_linux): Delete defines.
5356 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5357 (have_dsp): New global.
5358 (mips_read_description): New, based on mips_arch_setup.
5359 (mips_arch_setup): Reimplement.
5360 (get_usrregs_info): New function.
5361 (mips_cannot_fetch_register, mips_cannot_store_register)
5362 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5363 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5364 (target_regsets): Rename to ...
5365 (mips_regsets): ... this, and make static.
5366 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5367 (dsp_regs_info, regs_info): New globals.
5368 (mips_regs_info): New function.
5369 (the_low_target): Adjust.
5370 (initialize_low_arch): New function.
5371 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5372 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5373 Declare.
5374 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5375 (arm_read_description): New, with bits factored from
5376 arm_arch_setup.
5377 (arm_arch_setup): Reimplement.
5378 (target_regsets): Rename to ...
5379 (arm_regsets): ... this, and make static.
5380 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5381 (arm_regs_info): New function.
5382 (the_low_target): Adjust.
5383 (initialize_low_arch): New function.
5384 * linux-m68k-low.c (tdesc_m68k): Declare.
5385 (target_regsets): Rename to ...
5386 (m68k_regsets): ... this, and make static.
5387 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5388 (m68k_regs_info): New function.
5389 (m68k_arch_setup): New function.
5390 (the_low_target): Adjust.
5391 (initialize_low_arch): New function.
5392 * linux-sh-low.c (tdesc_sharch): Declare.
5393 (target_regsets): Rename to ...
5394 (sh_regsets): ... this, and make static.
5395 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5396 (sh_regs_info, sh_arch_setup): New functions.
5397 (the_low_target): Adjust.
5398 (initialize_low_arch): New function.
5399 * linux-bfin-low.c (tdesc_bfin): Declare.
5400 (bfin_arch_setup): New function.
5401 (bfin_usrregs_info, regs_info): New globals.
5402 (bfin_regs_info): New function.
5403 (the_low_target): Adjust.
5404 (initialize_low_arch): New function.
5405 * linux-cris-low.c (tdesc_cris): Declare.
5406 (cris_arch_setup): New function.
5407 (cris_usrregs_info, regs_info): New globals.
5408 (cris_regs_info): New function.
5409 (the_low_target): Adjust.
5410 (initialize_low_arch): New function.
5411 * linux-cris-low.c (tdesc_crisv32): Declare.
5412 (cris_arch_setup): New function.
5413 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5414 (cris_regs_info): New function.
5415 (the_low_target): Adjust.
5416 (initialize_low_arch): New function.
5417 * linux-m32r-low.c (tdesc_m32r): Declare.
5418 (m32r_arch_setup): New function.
5419 (m32r_usrregs_info, regs_info): New globals.
5420 (m32r_regs_info): Adjust.
5421 (initialize_low_arch): New function.
5422 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5423 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5424 (tic6x_usrregs_info): Forward declare.
5425 (tic6x_read_description): New function, based on ...
5426 (tic6x_arch_setup): ... this. Reimplement.
5427 (target_regsets): Rename to ...
5428 (tic6x_regsets): ... this, and make static.
5429 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5430 (tic6x_regs_info): New function.
5431 (the_low_target): Adjust.
5432 (initialize_low_arch): New function.
5433 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5434 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5435 (target_regsets): Rename to ...
5436 (xtensa_regsets): ... this, and make static.
5437 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5438 globals.
5439 (xtensa_arch_setup, xtensa_regs_info): New functions.
5440 (the_low_target): Adjust.
5441 (initialize_low_arch): New function.
5442 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5443 (nios2_arch_setup): Set the current process'es tdesc.
5444 (target_regsets): Rename to ...
5445 (nios2_regsets): ... this.
5446 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5447 (nios2_regs_info): New function.
5448 (the_low_target): Adjust.
5449 (initialize_low_arch): New function.
5450 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5451 (aarch64_arch_setup): Set the current process'es tdesc.
5452 (target_regsets): Rename to ...
5453 (aarch64_regsets): ... this.
5454 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5455 (aarch64_regs_info): New function.
5456 (the_low_target): Adjust.
5457 (initialize_low_arch): New function.
5458 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5459 globals.
5460 (target_regsets): Rename to ...
5461 (tile_regsets): ... this.
5462 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5463 (tile_regs_info): New function.
5464 (tile_arch_setup): Set the current process'es tdesc.
5465 (the_low_target): Adjust.
5466 (initialize_low_arch): New function.
5467 * spu-low.c (tdesc_spu): Declare.
5468 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5469 * win32-arm-low.c (tdesc_arm): Declare.
5470 (arm_arch_setup): New function.
5471 (the_low_target): Install arm_arch_setup instead of
5472 init_registers_arm.
5473 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5474 (init_windows_x86): Rename to ...
5475 (i386_arch_setup): ... this. Set `win32_tdesc'.
5476 (the_low_target): Adjust.
5477 * win32-low.c (win32_tdesc): New global.
5478 (child_add_thread): Don't create the thread cache here.
5479 (do_initial_child_stuff): Set the new process'es tdesc.
5480 * win32-low.h (struct target_desc): Forward declare.
5481 (win32_tdesc): Declare.
5482 * lynx-i386-low.c (tdesc_i386): Declare global.
5483 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5484 * lynx-low.c (lynx_tdesc): New global.
5485 (lynx_add_process): Set the new process'es tdesc.
5486 * lynx-low.h (struct target_desc): Forward declare.
5487 (lynx_tdesc): Declare global.
5488 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5489 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5490 * nto-low.c (nto_tdesc): New global.
5491 (do_attach): Set the new process'es tdesc.
5492 * nto-low.h (struct target_desc): Forward declare.
5493 (nto_tdesc): Declare.
5494 * nto-x86-low.c (tdesc_i386): Declare.
5495 (nto_x86_arch_setup): Set `nto_tdesc'.
5496
5497 2013-06-04 Gary Benson <gbenson@redhat.com>
5498
5499 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5500 to qSupported response when appropriate.
5501 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5502 with nonzero-length annex.
5503 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5504 arguments supplied in annex.
5505
5506 2013-05-31 Doug Evans <dje@google.com>
5507
5508 PR server/15594
5509 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5510 64 bits in 64-cross-32 environment.
5511
5512 2013-05-28 Pedro Alves <palves@redhat.com>
5513
5514 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5515 (aarch64-without-fpu.c): Delete rule.
5516 * configure.srv (aarch64*-*-linux*): Remove references to
5517 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5518 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5519 declaration.
5520
5521 2013-05-24 Pedro Alves <palves@redhat.com>
5522
5523 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5524 instead of strchr/decode_address. Error if the range isn't split
5525 with a ','. Don't assume there's be a ':' in the action.
5526
5527 2013-05-23 Yao Qi <yao@codesourcery.com>
5528 Pedro Alves <palves@redhat.com>
5529
5530 * linux-low.c (lwp_in_step_range): New function.
5531 (linux_wait_1): If the thread was range stepping and stopped
5532 outside the stepping range, report the stop to GDB. Otherwise,
5533 continue stepping. Add range stepping debug output.
5534 (linux_set_resume_request): Copy the step range from the resume
5535 request to the lwp.
5536 (linux_supports_range_stepping): New.
5537 (linux_target_ops) <supports_range_stepping>: Set to
5538 linux_supports_range_stepping.
5539 * linux-low.h (struct linux_target_ops)
5540 <supports_range_stepping>: New field.
5541 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5542 * linux-x86-low.c (x86_supports_range_stepping): New.
5543 (the_low_target) <supports_range_stepping>: Set to
5544 x86_supports_range_stepping.
5545 * server.c (handle_v_cont): Handle 'r' action.
5546 (handle_v_requests): Append ";r" if the target supports range
5547 stepping.
5548 * target.h (struct thread_resume) <step_range_start,
5549 step_range_end>: New fields.
5550 (struct target_ops) <supports_range_stepping>:
5551 New field.
5552 (target_supports_range_stepping): New macro.
5553
5554 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5555
5556 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5557 confusion in comment.
5558
5559 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5560
5561 * lynx-low.c (struct process_info_private): New type.
5562 (lynx_add_process): New function.
5563 (lynx_create_inferior, lynx_attach): Replace calls to
5564 add_process by calls to lynx_add_process.
5565 (lynx_resume): If PTID is null, then try using
5566 current_process()->private->last_wait_event_ptid.
5567 Add comments.
5568 (lynx_clear_inferiors): Delete. The contents of that function
5569 has been inlined in lynx_mourn;
5570 (lynx_wait_1): Save the ptid in the process's private data.
5571 (lynx_mourn): Free the process' private data. Replace call
5572 to lynx_clear_inferiors by call to clear_inferiors.
5573
5574 2013-05-17 Yao Qi <yao@codesourcery.com>
5575
5576 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5577 the right place.
5578
5579 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5580
5581 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5582 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5583 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5584 PT_TEXT_END_ADDR guards. Update comments.
5585 (linux_target_op) <read_offsets>: Conditionally define to
5586 linux_read_offsets if the target is UCLIBC and if it defines
5587 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5588
5589 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5590 Andrew Jenner <andrew@codesourcery.com>
5591
5592 * Makefile.in (SFILES): Add linux-nios2-low.c.
5593 (clean): Add action to delete nios2-linux.c.
5594 (nios2-linux.c): New rule.
5595 * configure.srv: Add nios2*-*-linux*.
5596 * linux-nios2-low.c: New.
5597
5598 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5599
5600 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5601
5602 2013-04-25 Hui Zhu <hui@codesourcery.com>
5603
5604 PR gdb/15186
5605 * ax.c (ax_printf): Add fflush.
5606
5607 2013-04-22 Tom Tromey <tromey@redhat.com>
5608
5609 * Makefile.in (SFILES): Add filestuff.c.
5610 (OBS): Add filestuff.o.
5611 (filestuff.o): New target.
5612 * config.in, configure: Rebuild.
5613 * configure.ac: Check for fdwalk, pipe2.
5614
5615 2013-04-17 Pedro Alves <palves@redhat.com>
5616
5617 * configure.ac (USE_THREAD_DB): Delete variable.
5618 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5619 Don't AC_SUBST USE_THREAD_DB.
5620 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5621 * config.in, configure: Regenerate.
5622
5623 2013-04-16 Pedro Alves <palves@redhat.com>
5624
5625 * linux-low.h (struct lwp_info) <thread_known>: Move under
5626 the USE_THREAD_DB #ifdef.
5627
5628 2013-04-16 Pedro Alves <palves@redhat.com>
5629
5630 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5631 (linux-low.o): Delete rule.
5632 * linux-low.h: Always include "gdb_thread_db.h" instead of
5633 conditionally including thread_db.h.
5634 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5635 HAVE_THREAD_DB_H.
5636
5637 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5638
5639 * Makefile.in (install-only): Fix make install regression.
5640
5641 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5642
5643 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5644 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5645 installation.
5646 * gdbserver.1: Remove.
5647
5648 2013-03-22 Pedro Alves <palves@redhat.com>
5649
5650 * linux-low.c (handle_extended_wait): Don't call
5651 linux_enable_event_reporting.
5652
5653 2013-03-15 Tony Theodore <tonyt@logyst.com>
5654
5655 PR build/9098:
5656 * Makefile.in (SHELL): Use @SHELL@.
5657
5658 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5659
5660 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5661 compiler warning.
5662
5663 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5664
5665 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5666 Remove extraneous NULL element.
5667
5668 2013-03-13 Yao Qi <yao@codesourcery.com>
5669
5670 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5671 'V' block in trace frame.
5672
5673 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5674
5675 * target.h (struct target_ops): Add btrace ops.
5676 (target_supports_btrace): New macro.
5677 (target_enable_btrace): New macro.
5678 (target_disable_btrace): New macro.
5679 (target_read_btrace): New macro.
5680 * gdbthread.h (struct thread_info): Add btrace field.
5681 * server.c: Include btrace-common.h.
5682 (handle_btrace_general_set): New function.
5683 (handle_btrace_enable): New function.
5684 (handle_btrace_disable): New function.
5685 (handle_general_set): Call handle_btrace_general_set.
5686 (handle_qxfer_btrace): New function.
5687 (struct qxfer qxfer_packets[]): Add btrace entry.
5688 * inferiors.c (remove_thread): Disable btrace.
5689 * linux-low: Include linux-btrace.h.
5690 (linux_low_enable_btrace): New function.
5691 (linux_low_read_btrace): New function.
5692 (linux_target_ops): Add btrace ops.
5693 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5694 Add srv_linux_btrace=yes.
5695 (x86_64-*-linux*): Add linux-btrace.o.
5696 Add srv_linux_btrace=yes.
5697 * configure.ac: Define HAVE_LINUX_BTRACE.
5698 * config.in: Regenerated.
5699 * configure: Regenerated.
5700
5701 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5702
5703 * server.c (handle_qxfer): Preserve error message if -3 is
5704 returned.
5705 (qxfer): Document the -3 return value.
5706
5707 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5708
5709 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5710 (linux_btrace_h): New variable.
5711 (linux-btrace.o): New rule.
5712
5713 2013-03-08 Stan Shebs <stan@codesourcery.com>
5714 Hafiz Abid Qadeer <abidh@codesourcery.com>
5715
5716 * tracepoint.c (trace_buffer_size): New global.
5717 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5718 (init_trace_buffer): Change to one-argument function. Allocate
5719 trace buffer memory.
5720 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5721 handle QTBuffer:size packet.
5722 (cmd_bigqtbuffer_size): New function.
5723 (initialize_tracepoint): Call init_trace_buffer with
5724 DEFAULT_TRACE_BUFFER_SIZE.
5725 * server.c (handle_query): Add QTBuffer:size in the
5726 supported packets.
5727
5728 2013-03-07 Yao Qi <yao@codesourcery.com>
5729
5730 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5731 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5732 of -1.
5733 (cmd_qtsp): Adjust condition. Do post increment.
5734 Set cur_action and cur_step_action back to 0.
5735
5736 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5737
5738 PR server/15236
5739 * linux-low.c (linux_write_memory): Return early success if LEN is
5740 zero.
5741
5742 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5743
5744 * configure.srv: Add x86_64-*-cygwin* as target.
5745
5746 2013-02-28 Tom Tromey <tromey@redhat.com>
5747
5748 * configure.ac: Invoke AC_SYS_LARGEFILE.
5749 * configure, config.in: Rebuild.
5750
5751 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5752
5753 * win32-low.c: Throughout, fix format strings and casts of
5754 printf-like functions to avoid type related warnings on all
5755 platforms.
5756 (get_child_debug_event): Print dwDebugEventCode as hex since
5757 that's how it's usually documented.
5758
5759 2013-02-28 Yao Qi <yao@codesourcery.com>
5760
5761 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5762 pulongest.
5763
5764 2013-02-27 Jiong Wang <jiwang@tilera.com>
5765
5766 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5767 (reg-tilegx32.c): New rule.
5768 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5769 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5770 different register info initializer according to elf class.
5771 (init_registers_tilgx32): New function. The tilegx32 register info
5772 initializer.
5773 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5774 (tile_store_gregset): Likewise.
5775
5776 2013-02-27 Yao Qi <yao@codesourcery.com>
5777
5778 * server.c (process_point_options): Print debug message when
5779 debug_threads is true.
5780
5781 2013-02-26 Yao Qi <yao@codesourcery.com>
5782
5783 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5784
5785 2013-02-19 Pedro Alves <palves@redhat.com>
5786 Kai Tietz <ktietz@redhat.com>
5787
5788 PR gdb/15161
5789
5790 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5791 instead of strtoul to extract address from packet.
5792 (process_serial_event) <'z'>: Likewise.
5793
5794 2013-02-18 Yao Qi <yao@codesourcery.com>
5795
5796 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5797
5798 2013-02-14 Pedro Alves <palves@redhat.com>
5799
5800 Plug memory leak.
5801
5802 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5803 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5804
5805 2013-02-14 Pedro Alves <palves@redhat.com>
5806
5807 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5808
5809 2013-02-14 Pedro Alves <palves@redhat.com>
5810
5811 * tracepoint.c (save_string): Delete.
5812 (add_tracepoint_action): Use savestring instead of save_string.
5813
5814 2013-02-12 Pedro Alves <palves@redhat.com>
5815
5816 * linux-xtensa-low.c: Ditto.
5817 * xtensa-xtregs.c: Ditto.
5818
5819 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5820
5821 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5822 thread_db.
5823
5824 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5825
5826 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5827 aarch64_num_wp_regs and aarch64_num_bp_regs to
5828 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5829
5830 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5831
5832 * linux-aarch64-low.c (ps_get_thread_area): Replace
5833 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5834
5835 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5836 Marcus Shawcroft <marcus.shawcroft@arm.com>
5837 Nigel Stephens <nigel.stephens@arm.com>
5838 Yufeng Zhang <yufeng.zhang@arm.com>
5839
5840 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5841 (aarch64.c, aarch64-without-fpu.c): New targets.
5842 * configure.srv (aarch64*-*-linux*): New.
5843 * linux-aarch64-low.c: New file.
5844
5845 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5846
5847 * linux-low.c (handle_extended_wait, linux_create_inferior)
5848 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5849 (dequeue_one_deferred_signal, linux_resume_one_thread)
5850 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5851 (linux_tracefork_grandchild, linux_test_for_tracefork)
5852 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5853 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5854 where the argument is 0.
5855
5856 2013-01-25 Yao Qi <yao@codesourcery.com>
5857
5858 * event-loop.c: Include "queue.h".
5859 (gdb_event_p): New typedef.
5860 (struct gdb_event) <next_event>: Remove.
5861 (event_queue): Change to QUEUE(gdb_event_p).
5862 (async_queue_event): Remove.
5863 (gdb_event_xfree): New.
5864 (initialize_event_loop): New.
5865 (process_event): Use API from QUEUE.
5866 (wait_for_event): Likewise.
5867 * server.c (main): Call initialize_event_loop.
5868 * server.h (initialize_event_loop): Declare.
5869
5870 2013-01-18 Yao Qi <yao@codesourcery.com>
5871
5872 * ax.h (struct eval_agent_expr_context): New.
5873 (gdb_eval_agent_expr): Update declaration.
5874 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5875 TFRAME. Add new argument CTX.
5876 * server.h (struct eval_agent_expr_context): Declare.
5877 (agent_mem_read, agent_tsv_read): Update declaration.
5878 (agent_mem_read_string): Likewise.
5879 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5880 (add_traceframe_block): Add new argument TPOINT.
5881 Increase TPOINT->traceframe_usage.
5882 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5883 eval_tracepoint_agent_expr.
5884 (condition_true_at_tracepoint): Likewise.
5885 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5886 (agent_mem_read_string, agent_tsv_read): Likewise.
5887
5888 2013-01-16 Yao Qi <yao@codesourcery.com>
5889
5890 * linux-low.c (linux_resume_one_lwp): Don't check
5891 'lwp->bp_reinsert != 0'.
5892
5893 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5894 Pedro Alves <palves@redhat.com>
5895
5896 * lynx-low.c (ptrace_request_to_str): Define a temporary
5897 macro and use it to simplify this function's implementation.
5898
5899 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5900
5901 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5902 sets errno.
5903
5904 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5905
5906 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5907
5908 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5909
5910 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5911
5912 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5913
5914 * lynx-low.c (lynx_resume): Use the resume_info parameter
5915 to determine the ptid for the lynx_ptrace call, unless
5916 it is equal to minus_one_ptid, in which case we use the
5917 ptid of the current_inferior.
5918 (lynx_wait_1): After having received a thread create/exit
5919 event, resume the inferior's execution using the signaling
5920 thread's ptid, rather than the old ptid.
5921
5922 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5923
5924 * lynx-low.c (lynx_resume): Delete variable ret.
5925
5926 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5927
5928 * gdbreplay.c (gdbreplay_version): Update copyright year.
5929 * server.c (gdbserver_version): Likewise.
5930
5931 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5932
5933 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5934 new thread.
5935
5936 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5937
5938 * lynx-low.c (ptrace_request_to_str): Add handling for
5939 PTRACE_GETTRACESIG.
5940
5941 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5942
5943 * lynx-low.c (lynx_attach): Delete variable new_process.
5944
5945 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5946
5947 * lynx-low.c (lynx_create_inferior): Delete variable
5948 new_process.
5949
5950 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5951
5952 * lynx-low.c (ptrace_request_to_str): Do not handle
5953 PTRACE_GETTHREADLIST if this macro does not exist.
5954
5955 2012-12-15 Yao Qi <yao@codesourcery.com>
5956
5957 * Makefile.in (OBS): Add notif.o.
5958 * notif.c, notif.h: New.
5959 * server.c: Include "notif.h".
5960 (struct vstop_notif) <next>: Remove.
5961 <base>: New field.
5962 (queue_stop_reply): Update.
5963 (push_event, send_next_stop_reply): Remove.
5964 (discard_queued_stop_replies): Update.
5965 (notif_stop): New variable.
5966 (handle_v_stopped): Remove.
5967 (handle_v_requests): Don't call handle_v_stopped. Call
5968 handle_ack_notif instead.
5969 (queue_stop_reply_callback): Call notif_event_enque instead
5970 of queue_stop_reply.
5971 (handle_status): Don't call send_next_stop_reply, call
5972 notif_write_event instead.
5973 (kill_inferior_callback): Likewise.
5974 (detach_or_kill_inferior_callback): Likewise.
5975 (main): Call initialize_notif.
5976 (process_serial_event): Call QUEUE_is_empty.
5977 (handle_target_event): Call notif_push instead of push event.
5978 * server.h (push_event): Remove declaration.
5979
5980 2012-12-10 Tom Tromey <tromey@redhat.com>
5981
5982 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5983 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5984 macros.
5985 (.c.o): Rewrite.
5986 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5987 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5988 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5989 (amd64-linux-ipa.o, ax.o): Rewrite.
5990 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5991 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5992 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5993 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5994 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5995 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5996 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5997 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5998 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5999 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6000 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6001 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6002 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6003 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6004 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6005 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6006 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6007 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6008 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6009 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6010 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6011 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6012 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6013 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6014 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6015 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6016 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6017 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6018 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6019 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6020 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6021 (reg-tilegx.o): Remove.
6022 (all_object_files): New macro.
6023 Include .deps files.
6024 * aclocal.m4, configure: Rebuild.
6025 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6026 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6027 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6028
6029 2012-12-05 Tom Tromey <tromey@redhat.com>
6030
6031 PR gdb/14917:
6032 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6033
6034 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6035
6036 * configure.ac: Check for linux/perf_event.h.
6037 * config.in: Regenerated.
6038 * configure: Regenerated.
6039
6040 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6041
6042 * hostio.c (handle_readlink): Decrease buffer size
6043 parameter passed to readlink by one byte.
6044
6045 2012-11-26 Yao Qi <yao@codesourcery.com>
6046
6047 * configure.ac (build_warnings): Append '-Wempty-body'.
6048 * configure: Regenerated.
6049 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6050 body.
6051
6052 2012-11-15 Pierre Muller <muller@sourceware.org>
6053
6054 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6055 * config.in: Regenerate.
6056 * configure: Regenerate.
6057 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6058 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6059 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6060 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6061 header.
6062 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6063 instead of <sys/wait.h> header.
6064 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6065
6066 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6067
6068 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6069 (various make rules): Remove -DGDBSERVER
6070
6071 2012-11-09 Yao Qi <yao@codesourcery.com>
6072
6073 * spu-low.c (current_ptid): Move it to ..
6074 * gdbthread.h: ... here. New.
6075 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6076 * server.c (myresume, process_serial_event): Likewise.
6077 * thread-db.c (thread_db_find_new_threads): Likewise.
6078 * tracepoint.c (run_inferior_command): Likewise.
6079
6080 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6081
6082 * server.c (handle_search_memory_1): Include access length in
6083 warning message.
6084
6085 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6086
6087 * linux-crisv32-low.c: Fix compile errors.
6088
6089 2012-09-04 Yao Qi <yao@codesourcery.com>
6090
6091 * tracepoint.c (cmd_qtsv): Adjust debug message.
6092 Don't check CUR_TPOINT.
6093
6094 2012-08-28 Yao Qi <yao@codesourcery.com>
6095
6096 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6097 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6098 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6099 Remove declarations of xmalloc, xreallloc, xstrdup and
6100 freeargv.
6101 * Makefile.in (libiberty_h): New.
6102 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6103 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6104
6105 2012-08-23 Yao Qi <yao@codesourcery.com>
6106
6107 * server.h: Remove declaration of 'xsnprintf'.
6108
6109 2012-08-22 Keith Seitz <keiths@redhat.com>
6110
6111 * server.h: Include build-gnulib-gbserver/config.h.
6112 * gdbreplay.c: Likewise.
6113
6114 2012-08-08 Doug Evans <dje@google.com>
6115
6116 * Makefile.in (SFILES): Add gdb_vecs.c.
6117 (OBS): Add gdb_vecs.o.
6118 (gdb_vecs_h, host_defs_h): New variables.
6119 (thread-db.o): Add $(gdb_vecs_h) dependency.
6120 (gdb_vecs.o): New rule.
6121 * thread-db.c: #include "gdb_vecs.h".
6122 (thread_db_load_search): Use a vector to iterate over path elements.
6123 Handle text appearing after "$pdir".
6124
6125 * configure.ac: Add check for strstr.
6126 * config.in: Regenerate.
6127 * configure: Regenerate.
6128
6129 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6130
6131 * hostio.c (handle_pread): If pread fails, fall back to attempting
6132 lseek/read.
6133 (handle_pwrite): Likewise for pwrite.
6134
6135 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6136
6137 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6138 between unsupported TYPE and unimplementable ADDR/LEN combination.
6139 (arm_insert_point): Act on new return value.
6140
6141 2012-07-31 Pedro Alves <palves@redhat.com>
6142
6143 * server.c (process_point_options): Only skip tokens if we find
6144 one that is unrecognized. Don't treat 'X' specially while
6145 skipping unrecognized tokens.
6146
6147 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6148
6149 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6150 to 4-byte-align HW breakpoint addresses for Thumb.
6151
6152 2012-07-27 Yao Qi <yao@codesourcery.com>
6153
6154 PR remote/14161.
6155
6156 * server.h: Declare gdb_agent_about_to_close.
6157 * target.c (kill_inferior): Include "agent.h".
6158 New. Send command 'kill'.
6159 * target.h (kill_inferior): Removed macro.
6160 * tracepoint.c (gdb_agent_about_to_close): New.
6161 (gdb_agent_helper_thread): Handle command 'close'.
6162 Wait endlessly until the inferior stops.
6163 Install gdb_agent_remove_socket to atexit hook.
6164 (agent_socket_name): New static variable.
6165 (gdb_agent_socket_init): Replace local variable 'name' with
6166 'agent_socket_name'.
6167 (gdb_agent_remove_socket): New.
6168
6169 2012-07-27 Yao Qi <yao@codesourcery.com>
6170
6171 * server.c (process_point_options): Stop at 'X' when parsing.
6172
6173 2012-07-19 Michael Eager <eager@eagercon.com>
6174
6175 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6176 to hw_execute.
6177 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6178 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6179 hardware breakpoint.
6180
6181 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6182
6183 * gdbserver/linux-low.c (initialize_low): Call
6184 linux_ptrace_init_warnings.
6185
6186 2012-07-02 Doug Evans <dje@google.com>
6187
6188 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6189 pointer to int.
6190
6191 2012-07-02 Stan Shebs <stan@codesourcery.com>
6192
6193 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6194 (ax.o): Add it to build rule.
6195 (ax-ipa.o): Ditto.
6196 (OBS): Add format.o.
6197 (IPA_OBS): Add format.o.
6198 * server.c (handle_query): Claim support for breakpoint commands.
6199 (process_point_options): Add command case.
6200 (process_serial_event): Leave running if there are printfs in
6201 effect.
6202 * mem-break.h (any_persistent_commands): Declare.
6203 (add_breakpoint_commands): Declare.
6204 (gdb_no_commands_at_breakpoint): Declare.
6205 (run_breakpoint_commands): Declare.
6206 * mem-break.c (struct point_command_list): New struct.
6207 (struct breakpoint): New field command_list.
6208 (any_persistent_commands): New function.
6209 (add_commands_to_breakpoint): New function.
6210 (add_breakpoint_commands): New function.
6211 (gdb_no_commands_at_breakpoint): New function.
6212 (run_breakpoint_commands): New function.
6213 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6214 locally.
6215 * ax.c: Include format.h.
6216 (ax_printf): New function.
6217 (gdb_eval_agent_expr): Add printf opcode.
6218
6219 2012-06-13 Yao Qi <yao@codesourcery.com>
6220
6221 * server.c (start_inferior): Remove duplicated writes to fields
6222 'last_resume_kind' and 'last_status' of 'current_inferior'.
6223
6224 2012-06-12 Yao Qi <yao@codesourcery.com>
6225 Pedro Alves <palves@redhat.com>
6226
6227 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6228 comment.
6229 * server.c (handle_v_cont): Extend comment.
6230
6231 2012-06-11 Yao Qi <yao@codesourcery.com>
6232
6233 * linux-low.c (linux_attach): Add 'static'.
6234
6235 2012-06-06 Yao Qi <yao@codesourcery.com>
6236
6237 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6238
6239 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6240
6241 Fix gcc -flto compilation warning.
6242 * server.c (main): Make variable multi_mode and attach volatile.
6243
6244 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6245
6246 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6247 if the platform doesn't know about it.
6248
6249 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6250
6251 * Makefile.in (SFILES): Add linux-tile-low.c.
6252 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6253 * configure.srv: Handle tilegx-*-linux*.
6254 * linux-tile-low.c: New file.
6255
6256 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6257
6258 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6259
6260 2012-05-24 Pedro Alves <palves@redhat.com>
6261
6262 PR gdb/7205
6263
6264 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6265
6266 2012-05-24 Pedro Alves <palves@redhat.com>
6267
6268 PR gdb/7205
6269
6270 Replace target_signal with gdb_signal throughout.
6271
6272 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6273
6274 * linux-low.c (linux_store_registers): Avoid the copying sequence
6275 when no data has been retrieved by ptrace.
6276
6277 2012-05-22 Will Deacon <will.deacon@arm.com>
6278
6279 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6280 Include asm/ptrace.h.
6281 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6282 already defined.
6283
6284 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6285
6286 * linux-low.c (linux_store_registers): Don't re-retrieve data
6287 with ptrace that has already been obtained from /proc. Always
6288 copy any data retrieved with ptrace to the buffer supplied.
6289
6290 2012-05-11 Yao Qi <yao@codesourcery.com>
6291 Pedro Alves <palves@redhat.com>
6292
6293 * linux-low.c (enum stopping_threads_kind): New.
6294 (stopping_threads): Change type to `enum stopping_threads_kind'.
6295 (handle_extended_wait): If stopping and suspending threads, leave
6296 the new_lwp suspended too.
6297 (linux_wait_for_event): Adjust.
6298 (stop_all_lwps): Set `stopping_threads' to
6299 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6300 whether we're suspending threads or just stopping them. Assert no
6301 recursion happens.
6302
6303 2012-04-29 Yao Qi <yao@codesourcery.com>
6304
6305 * server.h: Move some code to ...
6306 * gdbthread.h: ... here. New.
6307 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6308 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6309 (nto-low.o, win32-low.o): Likewise.
6310 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6311 * regcache.c, remote-utils.c, server.c: Likewise.
6312 * target.c, tracepoint.c, win32-low.c: Likewise.
6313
6314 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6315
6316 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6317 (PTRACE_ARG4_TYPE): Likewise.
6318 (PTRACE_XFER_TYPE): Likewise.
6319 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6320 ptrace to PTRACE_ARG3_TYPE.
6321 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6322 (PTRACE_ARG4_TYPE): Likewise.
6323 (PTRACE_XFER_TYPE): Likewise.
6324 (linux_detach_one_lwp): Cast fourth argument of
6325 ptrace to long then PTRACE_ARG4_TYPE.
6326 (regsets_fetch_inferior_registers): Cast third argument of
6327 ptrace to long then PTRACE_ARG3_TYPE.
6328 (regsets_store_inferior_registers): Likewise.
6329
6330 2012-04-20 Pedro Alves <palves@redhat.com>
6331
6332 * configure: Regenerate.
6333
6334 2012-04-19 Pedro Alves <palves@redhat.com>
6335
6336 * Makefile.in (GNULIB_BUILDDIR): New.
6337 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6338 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6339 (all, install-only, uninstall, clean-info, all-lib, clean): No
6340 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6341 (maintainer-clean realclean distclean): Use subdir_do.
6342 (subdir_do): New.
6343 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6344 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6345 * acinclude.m4: Include acx_configure_dir.m4.
6346 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6347 calls. Call AC_PROG_RANLIB. Configure gnulib using
6348 ACX_CONFIGURE_DIR.
6349 (GNULIB): New.
6350 (GNULIB_STDINT_H): Adjust.
6351 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6352 * gdbreplay.c: Include build-gnulib/config.h.
6353 * server.h: Likewise.
6354 * aclocal.m4: Regenerate.
6355 * config.in: Regenerate.
6356 * configure: Regenerate.
6357
6358 2012-04-19 Pedro Alves <palves@redhat.com>
6359
6360 * Makefile.in (LIBGNU, INCGNU): Adjust.
6361 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6362 (all, install-only, uninstall, clean-info, all-lib, clean)
6363 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6364 * configure.ac: Adjust AC_OUTPUT output.
6365 * aclocal.m4: Regenerate.
6366 * configure: Regenerate.
6367
6368 2012-04-19 Pedro Alves <palves@redhat.com>
6369
6370 * Makefile.in (generated_files): New.
6371 (server_h): Remove the explicit dependency on config.h, and depend
6372 on $generated_files.
6373
6374 2012-04-19 Pedro Alves <palves@redhat.com>
6375
6376 * Makefile.in (INCGNU): Add -Ignulib.
6377
6378 2012-04-19 Pedro Alves <palves@redhat.com>
6379
6380 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6381 (INCGNU): ... this, and spell out -I here.
6382 (GNULIB_LIB): Rename to ...
6383 (LIBGNU): ... this.
6384 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6385
6386 2012-04-19 Pedro Alves <palves@redhat.com>
6387
6388 * config.in: Regenerate.
6389
6390 2012-04-19 Pedro Alves <palves@redhat.com>
6391
6392 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6393 * server.h (memmem): Remove declaration.
6394 * config.in: Regenerate.
6395 * configure: Regenerate.
6396
6397 2012-04-19 Yao Qi <yao@codesourcery.com>
6398
6399 * Makefile.in (SFILES): Add common/vec.c.
6400 (OBS): Add vec.o.
6401 (vec.o): New rule.
6402
6403 2012-04-19 Yao Qi <yao@codesourcery.com>
6404
6405 * remote-utils.c (prepare_resume_reply): Replace with macro
6406 target_core_of_thread.
6407 * server.c (handle_qxfer_threads_proper): Likewise.
6408 * target.h (traget_core_of_thread): New macro.
6409
6410 2012-04-18 Pedro Alves <palves@redhat.com>
6411
6412 * aclocal.m4: Regenerate.
6413 * configure: Regenerate.
6414
6415 2012-04-16 Yao Qi <yao@codesourcery.com>
6416
6417 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6418 duplicated on address.
6419
6420 2012-04-16 Yao Qi <yao@codesourcery.com>
6421
6422 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6423 (struct tracepoint_action_ops) <send>: New field.
6424 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6425 (agent_expr_send, x_tracepoint_action_send): New.
6426 (l_tracepoint_action_send): New.
6427 (cmd_qtdp): Download and install tracepoint
6428 according to `use_agent'.
6429 (run_inferior_command): Add one more parameter `len'.
6430 Update callers.
6431 (tracepoint_send_agent): New.
6432 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6433
6434 2012-04-16 Yao Qi <yao@codesourcery.com>
6435
6436 * tracepoint.c (download_tracepoints): Moved to ...
6437 (cmd_qtstart): ... here.
6438
6439 2012-04-14 Yao Qi <yao@codesourcery.com>
6440
6441 * tracepoint.c: Include inttypes.h.
6442 (struct collect_memory_action): Use sized types.
6443 (struct tracepoint): Likewise.
6444 (cmd_qtdp, stop_tracing): Update print specifiers.
6445 (cmd_qtp, response_tracepoint): Likewise.
6446 (collect_data_at_tracepoint): Likewise.
6447 (collect_data_at_step): Likewise.
6448
6449 2012-04-14 Yao Qi <yao@codesourcery.com>
6450
6451 Import gnulib module inttypes.
6452 * aclocal.m4, config.in, configure: Regenerated.
6453
6454 2012-04-14 Yao Qi <yao@codesourcery.com>
6455
6456 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6457 Makefile and config.status at last.
6458
6459 2012-04-13 Yao Qi <yao@codesourcery.com>
6460
6461 * tracepoint.c: Include stdint.h unconditionally.
6462
6463 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6464
6465 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6466 on BFD_HAVE_SYS_PROCFS_TYPE.
6467 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6468 * configure: Regenerate.
6469 * config.in: Likewise.
6470
6471 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6472
6473 * Makefile.in (clean): Also remove x32.c x32-linux.c
6474 x32-avx.c x32-avx-linux.c.
6475 (x32.o): New target.
6476 (x32.c): Likewise.
6477 (x32-linux.o): Likewise.
6478 (x32-linux.c): Likewise.
6479 (x32-avx.o): Likewise.
6480 (x32-avx.c): Likewise.
6481 (x32-avx-linux.o): Likewise.
6482 (x32-avx-linux.c): Likewise.
6483
6484 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6485 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6486 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6487 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6488 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6489 i386/x32-avx-linux.xml.
6490
6491 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6492 (init_registers_x32_avx_linux): Likwise.
6493 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6494 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6495
6496 2012-04-13 Pedro Alves <palves@redhat.com>
6497
6498 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6499 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6500 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6501 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6502 the sub-make.
6503
6504 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6505
6506 * linux-x86-low.c (compat_x32_clock_t): New.
6507 (compat_x32_siginfo_t): Likewise.
6508 (compat_x32_siginfo_from_siginfo): Likewise.
6509 (siginfo_from_compat_x32_siginfo): Likewise.
6510 (linux_is_elf64): Likewise.
6511 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6512 and siginfo_from_compat_x32_siginfo for x32.
6513 (x86_arch_setup): Set linux_is_elf64.
6514
6515 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6516
6517 PR gdb/13969
6518 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6519 e_machine field.
6520 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6521 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6522 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6523 compatible with process.
6524
6525 2012-04-12 Yao Qi <yao@codesourcery.com>
6526
6527 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6528 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6529 (install-only, install-info, clean): Handle sub dir gnulib.
6530 (all-lib, am--refresh): New targets.
6531 (memmem.o): Remove target.
6532 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6533 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6534 (AC_REPLACE_FUNCS): Remove memmem.
6535 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6536 (AC_OUTPUT): Generate Makefile in gnulib/.
6537 * aclocal.m4, config.in, configure: Regenerated.
6538
6539 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6540
6541 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6542
6543 2012-04-05 Pedro Alves <palves@redhat.com>
6544
6545 -Werror=strict-aliasing
6546
6547 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6548 pointer.
6549
6550 2012-04-04 Pedro Alves <palves@redhat.com>
6551
6552 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6553 (sparc_store_gregset_from_stack, sparc_store_gregset)
6554 (sparc_breakpoint_at): Fix formatting.
6555
6556 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6557
6558 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6559 are available.
6560 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6561 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6562 * config.in: Regenerate.
6563 * configure: Likewise.
6564
6565 2012-03-29 Pedro Alves <palves@redhat.com>
6566
6567 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6568 Correct ptrace arguments.
6569
6570 2012-03-28 Pedro Alves <palves@redhat.com>
6571
6572 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6573 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6574 (IA64_FR1_REGNUM): New defines.
6575 (ia64_fetch_register): New.
6576 (the_low_target): Install it.
6577 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6578 field.
6579 * linux-low.c (linux_fetch_registers): Try the
6580 the_low_target.fetch_register hook first.
6581
6582 * linux-arm-low.c (the_low_target): Adjust.
6583 * linux-bfin-low.c (the_low_target): Adjust.
6584 * linux-cris-low.c (the_low_target): Adjust.
6585 * linux-crisv32-low.c (the_low_target): Adjust.
6586 * linux-m32r-low.c (the_low_target): Adjust.
6587 * linux-m68k-low.c (the_low_target): Adjust.
6588 * linux-mips-low.c (the_low_target): Adjust.
6589 * linux-ppc-low.c (the_low_target): Adjust.
6590 * linux-s390-low.c (the_low_target): Adjust.
6591 * linux-sh-low.c (the_low_target): Adjust.
6592 * linux-sparc-low.c (the_low_target): Adjust.
6593 * linux-tic6x-low.c (the_low_target): Adjust.
6594 * linux-x86-low.c (the_low_target): Adjust.
6595 * linux-xtensa-low.c (the_low_target): Adjust.
6596
6597 2012-03-26 Pedro Alves <palves@redhat.com>
6598
6599 * server.c (handle_qxfer_libraries): Don't bail early if
6600 the_target->qxfer_libraries_svr4 is not NULL.
6601
6602 2012-03-26 Pedro Alves <palves@redhat.com>
6603
6604 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6605
6606 2012-03-23 Pedro Alves <palves@redhat.com>
6607
6608 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6609 "library-list-svr4" element's start tag when the the DSO list is
6610 empty.
6611
6612 2012-03-23 Pedro Alves <palves@redhat.com>
6613
6614 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6615 a variable whose type size is the same as the inferior's pointer
6616 size.
6617
6618 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6619
6620 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6621 struct siginfo.
6622 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6623 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6624 * linux-low.h: Include <signal.h>.
6625 (struct siginfo): Remove forward declaration.
6626 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6627 struct siginfo.
6628
6629 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6630
6631 * .gitignore: Ignore more files.
6632
6633 2012-03-19 Pedro Alves <palves@redhat.com>
6634 Jan Kratochvil <jan.kratochvil@redhat.com>
6635
6636 * server.c (cont_thread, general_thread): Add describing comments.
6637 (start_inferior): Clear `cont_thread'.
6638 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6639 of a process.
6640
6641 2012-03-15 Yao Qi <yao@codesourcery.com>
6642
6643 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6644 handling to ...
6645 (cmd_qtdp): ... here.
6646
6647 2012-03-15 Yao Qi <yao@codesourcery.com>
6648
6649 * tracepoint.c (struct tracepoint_action_ops): New.
6650 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6651 (m_tracepoint_action_download): New.
6652 (r_tracepoint_action_download): New.
6653 (x_tracepoint_action_download): New.
6654 (l_tracepoint_action_download): New.
6655 (add_tracepoint_action): Install `action->ops' according type.
6656 (download_tracepoint_1): Move code `download' function pointer
6657 of various tracepoint_action_ops.
6658
6659 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6660
6661 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6662 linux_ptrace_attach_warnings.
6663
6664 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6665
6666 * Makefile.in (linux-ptrace.o): New.
6667 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6668 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6669 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6670 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6671 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6672 of these targets.
6673 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6674
6675 2012-03-08 Yao Qi <yao@codesourcery.com>
6676 Pedro Alves <palves@redhat.com>
6677
6678 Fix PR server/13392.
6679 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6680 offset of JMP insn.
6681 * tracepoint.c (remove_tracepoint): New.
6682 (cmd_qtdp): Call remove_tracepoint when failed to install.
6683
6684 2012-03-07 Pedro Alves <palves@redhat.com>
6685
6686 * linux-low.c (get_detach_signal): New.
6687 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6688 Pass on pending signals to PTRACE_DETACH. Check the result of the
6689 ptrace call.
6690 * server.c (program_signals, program_signals_p): New.
6691 (handle_general_set): Handle QProgramSignals.
6692 * server.h (program_signals, program_signals_p): Declare.
6693
6694 2012-03-05 Pedro Alves <palves@redhat.com>
6695 Jan Kratochvil <jan.kratochvil@redhat.com>
6696
6697 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6698 New comment why.
6699
6700 2012-03-03 Yao Qi <yao@codesourcery.com>
6701
6702 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6703 agent_look_up_symbols.
6704
6705 2012-03-03 Yao Qi <yao@codesourcery.com>
6706
6707 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6708 (linux-x86-low.o): Likewise.
6709 * server.h: Remove in_process_agent_loaded.
6710 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6711 common/agent.c.
6712 Update callers.
6713
6714 2012-03-03 Yao Qi <yao@codesourcery.com>
6715
6716 * tracepoint.c (gdb_agent_capability): New global.
6717 (in_process_agent_loaded_ust): Renamed to
6718 `in_process_agent_supports_ust'.
6719 Update callers.
6720 (in_process_agent_supports_ust): Call agent_capability_check.
6721 (clear_installed_tracepoints): Assert that agent supports
6722 agent.
6723
6724 2012-03-03 Yao Qi <yao@codesourcery.com>
6725
6726 * linux-low.c (linux_supports_agent): New.
6727 (linux_target_ops): Initialize field `supports_agent' with
6728 linux_supports_agent.
6729 * target.h (struct target_ops) <supports_agent>: New.
6730 (target_supports_agent): New macro.
6731 * server.c (handle_general_set): Handle packet 'QAgent'.
6732 (handle_query): Send `QAgent+'.
6733 * Makefile.in (server.o): Depends on agent.h.
6734
6735 2012-03-03 Yao Qi <yao@codesourcery.com>
6736
6737 * Makefile.in (OBS): Add agent.o.
6738 Add new rule for agent.o.
6739 Track dependence of tracepoint.c on agent.h.
6740 * tracepoint.c (run_inferior_command_1):
6741 (run_inferior_command): Call agent_run_command.
6742 (gdb_ust_connect_sync_socket): Deleted. Move it to
6743 common/agent.c.
6744 (resume_thread, stop_thread): Likewise.
6745 (gdb_ust_socket_init): Renamed to ...
6746 (gdb_agent_socket_init): ... New.
6747 (gdb_ust_thread): Renamed to ...
6748 (gdb_agent_helper_thread): ... New.
6749 (gdb_ust_init): Move some code to ...
6750 (gdb_agent_init): ... here. New.
6751 [HAVE_UST]: Call gdb_ust_init.
6752 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6753 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6754 * config.in, configure: Regenerated.
6755
6756 2012-03-02 Pedro Alves <palves@redhat.com>
6757
6758 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6759 * linux-low.c (struct simple_pid_list): New.
6760 (stopped_pids): New a struct simple_pid_list pointer.
6761 (add_to_pid_list, pull_pid_from_list): New.
6762 (handle_extended_wait): Don't assume the first signal new children
6763 report is SIGSTOP. Adjust call to pull_pid_from_list.
6764 (linux_wait_for_lwp): Adjust.
6765
6766 2012-03-02 Yao Qi <yao@codesourcery.com>
6767
6768 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6769 debug log.
6770
6771 2012-03-02 Yao Qi <yao@codesourcery.com>
6772
6773 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6774 `stop_pc' and `tpoint'. Update caller.
6775
6776 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6777
6778 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6779 * linux-low.c (use_linux_regsets): New macro.
6780 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6781 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6782 (linux_register_in_regsets): New function.
6783 (usr_fetch_inferior_registers): Skip registers covered by
6784 regsets.
6785 (usr_store_inferior_registers): Likewise.
6786 (usr_fetch_inferior_registers): New macro.
6787 (usr_store_inferior_registers): Likewise.
6788 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6789 (linux_store_registers): Likewise.
6790 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6791 prototype.
6792 (init_registers_mips64_dsp_linux): Likewise.
6793 (init_registers_mips_linux): New macro.
6794 (init_registers_mips_dsp_linux): Likewise.
6795 (mips_dsp_num_regs): Likewise.
6796 (DSP_BASE, DSP_CONTROL): New fallback macros.
6797 (mips_base_regs): New macro.
6798 (mips_regmap): Use it. Fix the size.
6799 (mips_dsp_regmap): New variable.
6800 (mips_dsp_regset_bitmap): Likewise.
6801 (mips_arch_setup): New function.
6802 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6803 than mips_regmap.
6804 (mips_cannot_store_register): Likewise.
6805 (the_low_target): Update .arch_setup, .num_regs and .regmap
6806 initializers. Add .regset_bitmap initializer.
6807 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6808 initializer.
6809 * linux-bfin-low.c (the_low_target): Likewise.
6810 * linux-cris-low.c (the_low_target): Likewise.
6811 * linux-crisv32-low.c (the_low_target): Likewise.
6812 * linux-ia64-low.c (the_low_target): Likewise.
6813 * linux-m32r-low.c (the_low_target): Likewise.
6814 * linux-m68k-low.c (the_low_target): Likewise.
6815 * linux-ppc-low.c (the_low_target): Likewise.
6816 * linux-s390-low.c (the_low_target): Likewise.
6817 * linux-sh-low.c (the_low_target): Likewise.
6818 * linux-sparc-low.c (the_low_target): Likewise.
6819 * linux-tic6x-low.c (the_low_target): Likewise.
6820 * linux-x86-low.c (the_low_target): Likewise.
6821 * linux-xtensa-low.c (the_low_target): Likewise.
6822 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6823 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6824 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6825 srv_xmlfiles.
6826 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6827 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6828
6829 2012-02-29 Yao Qi <yao@codesourcery.com>
6830 Pedro Alves <palves@redhat.com>
6831
6832 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6833 `step_over_finished' is true.
6834
6835 2012-02-27 Pedro Alves <palves@redhat.com>
6836
6837 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6838 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6839
6840 2012-02-27 Pedro Alves <palves@redhat.com>
6841
6842 PR server/9684
6843 * linux-low.c (pid_is_stopped): New.
6844 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6845
6846 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6847
6848 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6849 of conditions.
6850
6851 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6852
6853 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6854
6855 2012-02-24 Luis Machado <lgustavo@codesourcery>
6856
6857 * server.c (handle_query): Advertise support for target-side
6858 breakpoint condition evaluation.
6859 (process_point_options): New function.
6860 (process_serial_event): When inserting a breakpoint, check for
6861 a target-side condition that should be evaluated.
6862
6863 * mem-break.c: Include regcache.h and ax.h.
6864 (point_cond_list_t): New data structure.
6865 (breakpoint) <cond_list>: New field.
6866 (find_gdb_breakpoint_at): Make non-static.
6867 (delete_gdb_breakpoint_at): Clear any target-side
6868 conditions.
6869 (clear_gdb_breakpoint_conditions): New function.
6870 (add_condition_to_breakpoint): Likewise.
6871 (add_breakpoint_condition): Likewise.
6872 (gdb_condition_true_at_breakpoint): Likewise.
6873 (gdb_breakpoint_here): Return result directly instead
6874 of going through a local variable.
6875
6876 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6877 (clear_gdb_breakpoint_conditions): Likewise.
6878 (add_breakpoint_condition): Likewise.
6879 (gdb_condition_true_at_breakpoint): Likewise.
6880
6881 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6882 (need_step_over_p): Take target-side breakpoint condition into
6883 consideration.
6884
6885 2012-02-24 Luis Machado <lgustavo@codesourcery>
6886
6887 * server.h: Include tracepoint.h.
6888 (agent_mem_read, agent_get_trace_state_variable_value,
6889 agent_set_trace_state_variable_value,
6890 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6891 get_set_tsv_func_addr): New prototypes.
6892
6893 * ax.h: New include file.
6894 * ax.c: New source file.
6895
6896 * tracepoint.c: Include ax.h.
6897 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6898 agent_expr, eval_result_type): Move to ax.h.
6899 (parse_agent_expr): Rename to ...
6900 (gdb_parse_agent_expr): ... this, make it non-static and move
6901 to ax.h.
6902 (unparse_agent_expr) Rename to ...
6903 (gdb_unparse_agent_expr): ... this, make it non-static and move
6904 to ax.h.
6905 (eval_agent_expr): Rename to ...
6906 (eval_tracepoint_agent_expr): ... this.
6907 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6908 forward declarations.
6909 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6910 (agent_get_trace_state_variable_value): New function.
6911 (agent_set_trace_state_variable_value): New function.
6912 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6913 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6914 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6915 (condition_true_at_tracepoint): Likewise.
6916 (parse_agent_expr): Rename to ...
6917 (gdb_parse_agent_expr): ... this and move to ax.c.
6918 (unparse_agent_expr): Rename to ...
6919 (gdb_unparse_agent_expr): ... this and move to ax.c.
6920 (gdb_agent_op_name): Move to ax.c.
6921 (eval_agent_expr): Rename to ...
6922 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6923 and move to ax.c.
6924 (eval_tracepoint_agent_expr): New function.
6925 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6926 non-static.
6927 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6928 ax.c.
6929 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6930 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6931 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6932 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6933 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6934 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6935 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6936 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6937 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6938 (compile_bytecodes): Remove forward declaration.
6939 (is_goto_target): Move to ax.c.
6940 (compile_bytecodes): Move to ax.c and call
6941 agent_get_trace_state_variable_value (...) and
6942 agent_set_trace_state_variable_value (...).
6943
6944 * Makefile.in: Update ax.c and IPA dependencies.
6945
6946 2012-02-24 Pedro Alves <palves@redhat.com>
6947
6948 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6949 (cmd_bigqtbuffer_circular): ... this. Only handle
6950 'QTBuffer:circular:'.
6951 (handle_tracepoint_general_set): Adjust.
6952
6953 2012-02-16 Yao Qi <yao@codesourcery.com>
6954
6955 * inferiors.c: Move code to ...
6956 * dll.c: .... here. New.
6957 * server.h: Declare clear_dlls.
6958 * Makefile.in (SFILES): Add dll.c.
6959 (OBS): Add dll.o
6960 (dll.o): New rule.
6961
6962 2012-02-11 Yao Qi <yao@codesourcery.com>
6963
6964 * server.c: (handle_monitor_command): Add a new parameter
6965 `own_buf'.
6966 (handle_query): Update caller.
6967
6968 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6969
6970 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6971 * configure, config.in: Regenerate.
6972 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6973 is not defined.
6974
6975 2012-02-02 Pedro Alves <palves@redhat.com>
6976
6977 Try SIGKILL first, then PTRACE_KILL.
6978 * linux-low.c (linux_kill_one_lwp): New.
6979 (linux_kill_one_lwp): Rename to ...
6980 (kill_one_lwp_callback): ... this. Use the new
6981 linux_kill_one_lwp.
6982
6983 2012-02-02 Pedro Alves <palves@redhat.com>
6984
6985 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6986 inferior.
6987
6988 2012-01-27 Pedro Alves <palves@redhat.com>
6989
6990 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6991 (elf_64_file_p): Make static.
6992 (linux_pid_exe_is_elf_64_file): New.
6993 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6994 Delete declarations.
6995 (linux_pid_exe_is_elf_64_file): Declare.
6996 * linux-x86-low.c (x86_arch_setup): Use
6997 linux_pid_exe_is_elf_64_file.
6998
6999 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7000
7001 * linux-low.c (linux_wait_for_event_1): Rename to ...
7002 (linux_wait_for_event): ... here and merge it with former
7003 linux_wait_for_event - new variable wait_ptid, use it.
7004 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7005
7006 2012-01-23 Pedro Alves <palves@redhat.com>
7007
7008 * server.c (main): Avoid yet another case of infinite loop while
7009 detaching/killing after a longjmp.
7010
7011 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7012
7013 Code cleanup.
7014 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7015
7016 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7017
7018 * hostio.c (handle_readlink): New function.
7019 (handle_vFile): Call it to handle "vFile:readlink" packets.
7020
7021 2012-01-20 Pedro Alves <palves@redhat.com>
7022 Ulrich Weigand <ulrich.weigand@linaro.org>
7023
7024 * server.c (handle_v_requests): Only support vAttach and vRun to
7025 start multiple processes when in extended protocol mode.
7026
7027 2012-01-17 Pedro Alves <palves@redhat.com>
7028
7029 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7030 memalign plus mprotect to allocate the scratch buffer.
7031
7032 2012-01-13 Pedro Alves <palves@redhat.com>
7033
7034 * server.c (attach_inferior): Clear `cont_thread'.
7035
7036 2012-01-13 Pedro Alves <palves@redhat.com>
7037
7038 * server.c (main): Avoid infinite loop while detaching/killing
7039 after a longjmp.
7040
7041 2012-01-09 Doug Evans <dje@google.com>
7042
7043 * server.c (start_inferior): Set last_ptid in --wrapper case.
7044
7045 2012-01-06 Yao Qi <yao@codesourcery.com>
7046
7047 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7048 defined.
7049 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7050
7051 2012-01-04 Yao Qi <yao@codesourcery.com>
7052
7053 * tracepoint.c (cmd_qtdp): Print debug message
7054 for static tracepoint.
7055
7056 2012-01-04 Yao Qi <yao@codesourcery.com>
7057
7058 * tracepoint.c (trace_vdebug): Differentiate debug message
7059 between gdbserver and IPA.
7060
7061 2012-01-03 Yao Qi <yao@codesourcery.com>
7062
7063 * tracepoint.c (tracepoint_was_hit): Don't collect for
7064 static tracepoint.
7065
7066 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7067
7068 * terminal.h: Reformat copyright header.
7069
7070 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7071
7072 * server.c (gdbserver_version): Update copyright year.
7073 * gdbreplay.c (gdbreplay_version): Likewise.
7074
7075 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7076
7077 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7078
7079 Revert:
7080 2011-12-18 Hui Zhu <teawater@gmail.com>
7081 * linux-low.c (linux_create_inferior): Save return value to ret.
7082
7083 2011-12-18 Hui Zhu <teawater@gmail.com>
7084
7085 * linux-low.c (linux_create_inferior): Save return value to ret.
7086
7087 2011-12-16 Doug Evans <dje@google.com>
7088
7089 * linux-low.c (linux_create_inferior): If stdio connection,
7090 redirect stdin from /dev/null, stdout to stderr.
7091 * remote-utils.c (remote_is_stdio): New static global.
7092 (remote_connection_is_stdio): New function.
7093 (remote_prepare): Handle stdio connection.
7094 (remote_open): Ditto.
7095 (remote_close): Don't close stdin for stdio connections.
7096 (read_prim,write_prim): New functions. Replace all calls to
7097 read/write to these.
7098 * server.c (main): Watch for "-" argument. Move call to
7099 remote_prepare before start_inferior.
7100 * server.h (STDIO_CONNECTION_NAME): New macro.
7101 (remote_connection_is_stdio): Declare.
7102
7103 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7104 in debugging output.
7105
7106 2011-12-15 Yao Qi <yao@codesourcery.com>
7107
7108 * tracepoint.c: Include sys/syscall.h.
7109 (gdb_ust_thread): Remove preprocessor conditional.
7110
7111 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7112
7113 * linux-low.c (linux_detach_one_lwp): Call
7114 the_low_target.prepare_to_resume before detaching.
7115
7116 2011-12-14 Yao Qi <yao@codesourcery.com>
7117
7118 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7119 of write.
7120
7121 2011-12-14 Yao Qi <yao@codesourcery.com>
7122
7123 * i386-low.c (i386_low_stopped_data_address): Initialize local
7124 variable `control'.
7125
7126 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7127
7128 PR remote/13492
7129
7130 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7131 DR_CONTROL unless necessary. Extend comments.
7132 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7133 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7134
7135 2011-12-13 Yao Qi <yao@codesourcery.com>
7136
7137 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7138 macros.
7139 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7140
7141 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7142
7143 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7144 Print new debug message for such case.
7145
7146 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7147
7148 Fix overlapping memcpy.
7149 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7150 the read_inferior_memory transfer.
7151 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7152 write_inferior_memory transfer.
7153 (set_fast_tracepoint_jump): New variable buf. Use it for the
7154 read_inferior_memory and write_inferior_memory transfers.
7155 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7156 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7157 Use it for the write_inferior_memory transfer.
7158 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7159 buffers.
7160
7161 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7162
7163 * linux-low.c (fetch_register, store_register): Make code
7164 consistent, fix formatting.
7165
7166 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7167
7168 * linux-low.c (usr_store_inferior_registers): Factor out code
7169 to handle individual registers into...
7170 (store_register): ... this new function.
7171
7172 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7173
7174 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7175 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7176 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7177 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7178 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7179 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7180 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7181 (srv_xmlfiles): Add new XML files.
7182
7183 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7184 and <sys/uio.h>.
7185 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7186 (init_registers_s390_linux32v1): Add prototype.
7187 (init_registers_s390_linux32v2): Likewise.
7188 (init_registers_s390_linux64v1): Likewise.
7189 (init_registers_s390_linux64v2): Likewise.
7190 (init_registers_s390x_linux64v1): Likewise.
7191 (init_registers_s390x_linux64v2): Likewise.
7192 (s390_num_regs): Increment to 52.
7193 (s390_regmap): Add orig_r2 register.
7194 (s390_num_regs_3264): Increment to 68.
7195 (s390_regmap_3264): Add orig_r2 register.
7196 (s390_collect_ptrace_register): Handle orig_r2 register.
7197 (s390_supply_ptrace_register): Likewise.
7198 (s390_fill_last_break): New function.
7199 (s390_store_last_break): Likewise.
7200 (s390_fill_system_call): New function.
7201 (s390_store_system_call): Likewise.
7202 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7203 register sets.
7204 (s390_check_regset): New function.
7205 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7206 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7207 Update target_regsets for available register sets.
7208
7209 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7210 Jan Kratochvil <jan.kratochvil@redhat.com>
7211
7212 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7213 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7214 New.
7215 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7216 * linux-low.h (struct process_info_private): New member r_debug.
7217 * server.c (handle_qxfer_libraries): Call
7218 the_target->qxfer_libraries_svr4.
7219 (handle_qxfer_libraries_svr4): New function.
7220 (qxfer_packets): New entry "libraries-svr4".
7221 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7222 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7223 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7224 PACKET_qXfer_libraries_svr4.
7225
7226 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7227
7228 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7229 PSW address/mask between 8-byte and 16-byte formats.
7230 (s390_supply_ptrace_register): Likewise.
7231 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7232 basic addressing mode bit.
7233
7234 2011-11-24 Stan Shebs <stan@codesourcery.com>
7235
7236 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7237
7238 2011-11-17 Stan Shebs <stan@codesourcery.com>
7239
7240 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7241 (tracing_start_time): New global.
7242 (tracing_stop_time): New global.
7243 (tracing_user_name): New global.
7244 (tracing_notes): New global.
7245 (tracing_stop_note): New global.
7246 (cmd_qtstart): Set traceframe_usage, start_time.
7247 (stop_tracing): Set stop_time.
7248 (cmd_qtstatus): Report additional status.
7249 (cmd_qtp): New function.
7250 (handle_tracepoint_query): Call it.
7251 (cmd_qtnotes): New function.
7252 (handle_tracepoint_general_set): Call it.
7253 (get_timestamp): Rename from tsv_get_timestamp.
7254
7255 2011-11-14 Stan Shebs <stan@codesourcery.com>
7256 Kwok Cheung Yeung <kcy@codesourcery.com>
7257
7258 * linux-x86-low.c (small_jump_insn): New.
7259 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7260 trampoline and error message, build a trampoline and issue a small
7261 jump instruction to it.
7262 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7263 trampoline and error message.
7264 (x86_get_min_fast_tracepoint_insn_len): New.
7265 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7266 * linux-low.h (struct linux_target_ops): Add arguments to
7267 install_fast_tracepoint_jump_pad operation, add new operation.
7268 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7269 arguments.
7270 (linux_get_min_fast_tracepoint_insn_len): New function.
7271 (linux_target_op): Add new operation.
7272 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7273 (gdb_trampoline_buffer_end): Ditto.
7274 (gdb_trampoline_buffer_error): Ditto.
7275 (struct ipa_sym_addresses): Add fields for new IPA variables.
7276 (symbol_list): Add entries for new IPA variables.
7277 (struct tracepoint): Add fields to hold the address range of the
7278 trampoline used by the tracepoint.
7279 (trampoline_buffer_head): New static variable.
7280 (trampoline_buffer_tail): Ditto.
7281 (claim_trampoline_space): New function.
7282 (have_fast_tracepoint_trampoline_buffer): New function.
7283 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7284 structure.
7285 (install_fast_tracepoint): Ditto, also add error buffer argument.
7286 (cmd_qtminftpilen): New function.
7287 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7288 (fast_tracepoint_from_trampoline_address): New function.
7289 (fast_tracepoint_collecting): Handle trampoline as part of jump
7290 pad space.
7291 (set_trampoline_buffer_space): New function.
7292 (initialize_tracepoint): Initialize new IPA variables.
7293 * target.h (struct target_ops): Add arguments to
7294 install_fast_tracepoint_jump_pad operation, add new
7295 get_min_fast_tracepoint_insn_len operation.
7296 (target_get_min_fast_tracepoint_insn_len): New.
7297 (install_fast_tracepoint_jump_pad): Add arguments.
7298 * server.h (IPA_BUFSIZ): Define.
7299 * linux-i386-ipa.c: Include extra header files.
7300 (initialize_fast_tracepoint_trampoline_buffer): New function.
7301 (initialize_low_tracepoint): Call it.
7302 * server.h (set_trampoline_buffer_space): Declare.
7303 (claim_trampoline_space): Ditto.
7304 (have_fast_tracepoint_trampoline_buffer): Ditto.
7305
7306 2011-11-14 Yao Qi <yao@codesourcery.com>
7307
7308 * server.c (handle_query): Handle InstallInTrace for qSupported.
7309 * tracepoint.c (add_tracepoint): Sort list.
7310 (install_tracepoint, download_tracepoint): New.
7311 (cmd_qtdp): Call them to install and download tracepoints.
7312 (sort_tracepoints): Removed.
7313 (cmd_qtstart): Update.
7314
7315 2011-11-14 Yao Qi <yao@codesourcery.com>
7316
7317 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7318 * mem-break.h: Declare.
7319 * tracepoint.c (cmd_qtstart): Move some code to ...
7320 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7321 New.
7322 (download_tracepoints): Move some code to ...
7323 (download_tracepoint_1): ... here. New.
7324
7325 2011-11-08 Yao Qi <yao@codesourcery.com>
7326
7327 * remote-utils.c (relocate_instruction): A comment fix.
7328
7329 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7330
7331 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7332 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7333 dr_status_mirror and dr_control_mirror from debug_reg_state.
7334 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7335 (i386_initial_stuff): Remove use of deleted globals.
7336 (i386_get_thread_context, i386_set_thread_context,
7337 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7338 from debug_reg_state.
7339
7340 2011-11-05 Yao Qi <yao@codesourcery.com>
7341
7342 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7343 address as TPOINT's.
7344
7345 2011-11-02 Stan Shebs <stan@codesourcery.com>
7346
7347 * tracepoint.c (agent_mem_read_string): New function.
7348 (eval_agent_expr): Call it for tracenz.
7349 * server.c (handle_query): Report support for tracenz.
7350
7351 2011-11-02 Yao Qi <yao@codesourcery.com>
7352
7353 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7354
7355 2011-11-02 Yao Qi <yao@codesourcery.com>
7356
7357 * target.h: Fix a typo in comment.
7358
7359 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7360
7361 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7362 clobber the breakpoints' shadows with fast tracepoint jumps.
7363 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7364 * target.c (write_inferior_memory): Also pass MYADDR down to
7365 check_mem_write.
7366
7367 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7368
7369 * configure.ac: Check support for personality routine.
7370 * configure: Regenerate.
7371 * config.in: Likewise.
7372 * linux-low.c: Include <sys/personality.h>.
7373 Define ADDR_NO_RANDOMIZE if necessary.
7374 (linux_create_inferior): Disable address space randomization when
7375 forking inferior, if requested.
7376 (linux_supports_disable_randomization): New function.
7377 (linux_target_ops): Install it.
7378 * server.h (disable_randomization): Declare.
7379 * server.c (disable_randomization): New global variable.
7380 (handle_general_set): Handle QDisableRandomization.
7381 (handle_query): Likewise for qSupported.
7382 (main): Support --disable-randomization and --no-disable-randomization
7383 command line arguments.
7384 * target.h (struct target_ops): Add supports_disable_randomization.
7385 (target_supports_disable_randomization): New macro.
7386
7387 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7388
7389 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7390 ifdef check.
7391 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7392 [!PT_GETDSBT] (target_loadmap): New definition.
7393 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7394 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7395 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7396 and PT_GETDSBT to LINUX_LOADMAP.
7397 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7398 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7399
7400 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7401
7402 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7403 (arm_linux_hwbp_cap): New static variable.
7404 (arm_linux_get_hwbp_cap): Replace by ...
7405 (arm_linux_init_hwbp_cap): ... this new function.
7406 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7407 (arm_linux_get_hw_watchpoint_count): Likewise.
7408 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7409 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7410 (arm_prepare_to_resume): Use perror_with_name instead of error.
7411
7412 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7413
7414 * linux-arm-low.c: Include <signal.h>.
7415 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7416 (struct arm_linux_hwbp_cap): New data type.
7417 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7418 (struct arm_linux_hw_breakpoint): New data type.
7419 (MAX_BPTS, MAX_WPTS): Define.
7420 (struct arch_process_info, struct arch_lwp_info): New data types.
7421 (arm_linux_get_hwbp_cap): New function.
7422 (arm_linux_get_hw_breakpoint_count): Likewise.
7423 (arm_linux_get_hw_watchpoint_count): Likewise.
7424 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7425 (arm_hwbp_control_initialize): Likewise.
7426 (arm_hwbp_control_is_enabled): Likewise.
7427 (arm_hwbp_control_is_initialized): Likewise.
7428 (arm_hwbp_control_disable): Likewise.
7429 (arm_linux_hw_breakpoint_equal): Likewise.
7430 (arm_linux_hw_point_initialize): Likewise.
7431 (struct update_registers_data): New data structure.
7432 (update_registers_callback: New function.
7433 (arm_insert_point): Likewise.
7434 (arm_remove_point): Likewise.
7435 (arm_stopped_by_watchpoint): Likewise.
7436 (arm_stopped_data_address): Likewise.
7437 (arm_new_process): Likewise.
7438 (arm_new_thread): Likewise.
7439 (arm_prepare_to_resume): Likewise.
7440 (the_low_target): Register arm_insert_point, arm_remove_point,
7441 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7442 arm_new_thread, and arm_prepare_to_resume.
7443
7444 2011-09-15 Stan Shebs <stan@codesourcery.com>
7445
7446 * server.h (struct emit_ops): Add compare-goto fields.
7447 * tracepoint.c (gdb_agent_op_sizes): New table.
7448 (emit_eq_goto): New function.
7449 (emit_ne_goto): New function.
7450 (emit_lt_goto): New function.
7451 (emit_le_goto): New function.
7452 (emit_gt_goto): New function.
7453 (emit_ge_goto): New function.
7454 (is_goto_target): New function.
7455 (compile_bytecodes): Recognize special cases of compare-goto
7456 combinations and call specialized emitters for them.
7457 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7458 (amd64_emit_ne_goto): New function.
7459 (amd64_emit_lt_goto): New function.
7460 (amd64_emit_le_goto): New function.
7461 (amd64_emit_gt_goto): New function.
7462 (amd64_emit_ge_goto): New function.
7463 (amd64_emit_ops): Add the new functions.
7464 (i386_emit_eq_goto): New function.
7465 (i386_emit_ne_goto): New function.
7466 (i386_emit_lt_goto): New function.
7467 (i386_emit_le_goto): New function.
7468 (i386_emit_gt_goto): New function.
7469 (i386_emit_ge_goto): New function.
7470 (i386_emit_ops): Add the new functions.
7471
7472 2011-09-08 Stan Shebs <stan@codesourcery.com>
7473
7474 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7475 (i386_emit_epilogue): Restore %ebx.
7476
7477 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7478
7479 * server.c (step_thread): Remove definition.
7480 (process_serial_event): Don't handle Hs.
7481 * server.h (step_thread): Remove declaration.
7482 * target.c (set_desired_inferior): Remove use of step_thread.
7483
7484 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7485
7486 * linux-low.c: Include linux-procfs.h.
7487 (linux_attach_lwp_1): Update comments.
7488 (linux_attach): Scan for existing threads when attaching to a
7489 process that is the tgid.
7490 * Makefile.in: Update dependencies.
7491
7492 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7493
7494 * configure.srv: Add linux-procfs.o dependencies.
7495
7496 2011-08-14 Yao Qi <yao@codesourcery.com>
7497
7498 * target.h (struct target_ops): Fix indent.
7499 * win32-low.c (win32_target_ops): Fix comment.
7500
7501 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7502 Yao Qi <yao@codesourcery.com>
7503
7504 * Makefile.in (clean): Remove tic6x-*.c files.
7505 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7506 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7507 (tic6x-c64xp-linux.c): Likewise.
7508 * configure.srv: Add support for tic6x-*-uclinux.
7509 * linux-tic6x-low.c: New.
7510 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7511
7512 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7513 Yao Qi <yao@codesourcery.com>
7514
7515 * target.h (struct target_ops): Add read_loadmap.
7516 * linux-low.c (struct target_loadseg): New type.
7517 (struct target_loadmap): New type.
7518 (linux_read_loadmap): New function.
7519 (linux_target_ops): Add linux_read_loadmap.
7520 * server.c (handle_query): Support qXfer:fdpic:read packet.
7521 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7522 to NULL.
7523
7524 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7525
7526 * win32-low.c: Include <stdint.h>.
7527
7528 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7529
7530 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7531 to the inferior here.
7532 (i386_remove_aligned_watchpoint): Ditto.
7533 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7534 fit part of the watchpoint in the debug registers.
7535 (i386_update_inferior_debug_regs): New.
7536 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7537 registers, and only update the inferior on success.
7538 (i386_low_remove_watchpoint): Ditto.
7539
7540 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7541
7542 * linux-low.c (compare_ints, unique, list_threads, show_process,
7543 linux_core_of_thread): Delete.
7544 (linux_target_ops): Change linux_core_of_thread to
7545 linux_common_core_of_thread.
7546 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7547 * utils.c (malloc_failure): Change type of argument.
7548 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7549 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7550 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7551 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7552 (IPA_OBJS): Add common-utils-ipa.o.
7553 (ptid_h, linux_osdata_h): New macros.
7554 (server_h): Add common/common-utils.h, common/xml-utils.h,
7555 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7556 common/ptid.h.
7557 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7558 ptid.o, buffer.o): New rules.
7559 (linux-low.o): Add common/linux-osdata.h as a dependency.
7560 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7561 * configure.ac: Add AC_HEADER_DIRENT check.
7562 * config.in: Regenerate.
7563 * configure: Regenerate.
7564 * remote-utils.c (xml_escape_text): Delete.
7565 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7566 buffer_xml_printf): Move to common/buffer.c.
7567 * server.c (main): Remove call to initialize_inferiors.
7568 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7569 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7570 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7571 internal_error, gdb_assert, gdb_assert_fail): Delete.
7572 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7573 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7574 common/buffer.h.
7575 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7576 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7577 initialize_inferiors): Delete.
7578
7579 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7580
7581 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7582 symbol error.
7583
7584 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7585
7586 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7587 assertion.
7588 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7589
7590 2011-05-26 Yao Qi <yao@codesourcery.com>
7591
7592 * Makefile.in (thread-db.o): Track dependence to
7593 common/gdb_thread_db.h.
7594 * thread-db.c: include gdb_thread_db.h from right place.
7595
7596 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7597
7598 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7599 __FILE__ and __LINE__ to internal_error.
7600
7601 2011-05-13 Doug Evans <dje@google.com>
7602
7603 * thread-db.c (try_thread_db_load_from_sdir): New function.
7604 (try_thread_db_load_from_dir): New function.
7605 (thread_db_load_search): Handle $sdir, ignore $pdir.
7606 Remove trying of system directories if search of
7607 libthread-db-search-path fails, that is now done via $sdir.
7608
7609 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7610
7611 * server.c (handle_query): Add EnableDisableTracepoints to the list
7612 of supported features.
7613 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7614 tracepoints.
7615 (cmd_qtenable_disable): New.
7616 (cmd_qtstart): Install tracepoints even if disabled.
7617 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7618 receiving a QTEnable or QTDisable packet.
7619 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7620 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7621 tracepoints.
7622 (gdb_probe): Skip data collection if static tracepoint is disabled.
7623
7624 2011-05-10 Doug Evans <dje@google.com>
7625
7626 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7627
7628 2011-05-04 Doug Evans <dje@google.com>
7629
7630 * linux-low.c (linux_join): Skip process lookup.
7631 * spu-low.c (spu_join): Ditto.
7632 * server.c (join_inferiors_callback): Delete.
7633 (process_serial_event): For 'D' packet (detach) call join_inferior
7634 directly.
7635
7636 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7637
7638 * README: Don't mention xscale*-*-linux*.
7639 * configure.srv (xscale*-*-linux*): Don't handle target.
7640
7641 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7642
7643 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7644 casting pointers.
7645 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7646 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7647 (i386_emit_void_call_2): Likewise.
7648
7649 2011-04-26 Yao Qi <yao@codesourcery.com>
7650
7651 * linux-low.c: Move common macros to linux-ptrace.h.
7652 Include linux-ptrace.h.
7653 * Makefile.in (linux_ptrace_h): New.
7654 (linux-low.o): Depends on linux-ptrace.h.
7655
7656 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7657
7658 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7659 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7660 (remote_prepare): New function with most of the TCP code from ...
7661 (remote_open): ... here. Detect PORT here unconditionally. Move also
7662 setting transport_is_reliable.
7663 * server.c (run_once): New variable.
7664 (gdbserver_usage): Document it.
7665 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7666 the first run if RUN_ONCE.
7667 * server.h (run_once, remote_prepare): New declarations.
7668
7669 2011-04-19 Tom Tromey <tromey@redhat.com>
7670
7671 * win32-low.c (handle_load_dll): Remove duplicate "the".
7672
7673 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7674
7675 Remove support for old Cygwin 1.5 versions.
7676 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7677 function to avoid warning.
7678 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7679 warning.
7680
7681 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7682
7683 * gdbserver/server.h (Macro _): Define it if not available.
7684
7685 2011-03-14 Michael Snyder <msnyder@vmware.com>
7686
7687 * hostio.c (handle_close): Remove unnecessary null test.
7688
7689 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7690
7691 * Makefile.in (maintainer-clean realclean distclean): Remove
7692 "make ... subdir_do" command.
7693
7694 2011-03-10 Michael Snyder <msnyder@vmware.com>
7695
7696 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7697
7698 * server.c (handle_v_run): Free alloced buffer on early return.
7699
7700 2011-03-09 Yao Qi <yao@codesourcery.com>
7701
7702 Revert:
7703 2011-03-04 Yao Qi <yao@codesourcery.com>
7704
7705 * Makefile.in: Remove GNU make feature --directory.
7706
7707 2011-03-05 Yao Qi <yao@codesourcery.com>
7708
7709 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7710 (subdir_do): New make target. Copied from gdb/Makefile.
7711 (maintainer-clean, realclean, distclean, clean): Call corresponding
7712 make targets in common/Makefile.
7713
7714 2011-02-11 Yao Qi <yao@codesourcery.com>
7715
7716 * configure.ac: Call AC_PROG_RANLIB.
7717 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7718 * configure: Regenerate.
7719
7720 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7721
7722 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7723
7724 2011-03-06 Yao Qi <yao@codesourcery.com>
7725
7726 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7727
7728 2011-03-05 Yao Qi <yao@codesourcery.com>
7729
7730 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7731 (subdir_do): New make target. Copied from gdb/Makefile.
7732 (maintainer-clean, realclean, distclean, clean): Call corresponding
7733 make targets in common/Makefile.
7734
7735 2011-03-04 Yao Qi <yao@codesourcery.com>
7736
7737 * Makefile.in: Remove GNU make feature --directory.
7738
7739 2011-03-04 Michael Snyder <msnyder@vmware.com>
7740
7741 * server.c (queue_stop_reply): Call xmalloc not malloc.
7742
7743 2011-03-02 Michael Snyder <msnyder@vmware.com>
7744
7745 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7746
7747 2011-02-28 Michael Snyder <msnyder@vmware.com>
7748
7749 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7750 (cmd_qtframe): Ditto.
7751 (cmd_qtbuffer): Ditto.
7752 (cmd_bigqtbuffer): Ditto.
7753
7754 * utils.c (decimal2str): Initialize 'width' to nine, then
7755 don't mess with it.
7756
7757 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7758
7759 * hostio.c (require_data): Free *data, not data.
7760
7761 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7762
7763 * hostio.c (require_data): Use free, not xfree.
7764
7765 2011-02-27 Michael Snyder <msnyder@vmware.com>
7766
7767 * server.c (handle_query): Discard unused value.
7768
7769 * hostio.c (require_data): Free malloc memory before returning
7770 error.
7771
7772 2011-02-26 Michael Snyder <msnyder@vmware.com>
7773
7774 * linux-low.c (list_threads): Call closedir for dirent.
7775
7776 2011-02-27 Michael Snyder <msnyder@vmware.com>
7777
7778 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7779 a case statement falls through.
7780
7781 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7782
7783 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7784 in comparison.
7785
7786 2011-02-26 Michael Snyder <msnyder@vmware.com>
7787
7788 * utils.c (decimal2str): Eliminate dead code and dead param.
7789 (pulongest): Drop dead param from call to decimal2str.
7790 (plongest): Ditto.
7791
7792 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7793
7794 Revert the following patch (not approved yet):
7795 2011-02-21 Hui Zhu <teawater@gmail.com>
7796 * tracepoint.c (tp_printf): New function.
7797 (eval_agent_expr): Handle gdb_agent_op_printf.
7798
7799 2011-02-21 Hui Zhu <teawater@gmail.com>
7800
7801 * tracepoint.c (tp_printf): New function.
7802 (eval_agent_expr): Handle gdb_agent_op_printf.
7803
7804 2011-02-18 Tom Tromey <tromey@redhat.com>
7805
7806 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7807 (tracepoint.o): Likewise.
7808 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7809 (gdb_agent_op_names): Likewise.
7810
7811 2011-02-18 Tom Tromey <tromey@redhat.com>
7812
7813 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7814 gdb_agent_op_rot>: New constants.
7815 (gdb_agent_op_names): Add pick and roll.
7816 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7817 cases.
7818
7819 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7820
7821 * aclocal.m4: Regenerated with aclocal-1.11.1.
7822
7823 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7824
7825 * server.c (handle_qxfer_traceframe_info): New.
7826 (qxfer_packets): Register "traceframe-info".
7827 (handle_query): Report support for qXfer:traceframe-info:read+.
7828 * tracepoint.c (match_blocktype): New.
7829 (traceframe_find_block_type): Rename to ...
7830 (traceframe_walk_blocks): ... this. Add callback filter argument,
7831 and use it.
7832 (traceframe_find_block_type): New, reimplemented on top of
7833 traceframe_walk_blocks.
7834 (build_traceframe_info_xml): New.
7835 (traceframe_read_info): New.
7836 * server.h (traceframe_read_info): Declare.
7837
7838 2011-02-11 Yao Qi <yao@codesourcery.com>
7839
7840 * configure.ac: Call AC_PROG_RANLIB.
7841 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7842 * configure: Regenerate.
7843
7844 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7845
7846 * server.c (gdb_read_memory): Change return semantics to allow
7847 partial transfers.
7848 (handle_search_memory_1): Adjust.
7849 (process_serial_event) <'m' packet>: Handle partial transfers.
7850 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7851
7852 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7853
7854 * regcache.c (init_register_cache): Initialize
7855 regcache->register_status.
7856 (free_register_cache): Release regcache->register_status.
7857 (regcache_cpy): Copy register_status.
7858 (registers_to_string): Print 'x's for unavailable registers.
7859 (supply_register): Mark the register's status valid or
7860 unavailable, depending on whether a buffer was passed in or not.
7861 (supply_register_zeroed): New.
7862 (supply_regblock): Mark the registers' status valid or
7863 unavailable, depending on whether a buffer was passed in or not.
7864 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7865 (struct regcache): New `register_status' field.
7866 (supply_register_zeroed): Declare.
7867 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7868 supply_register_zeroed, rather than passing a NULL buffer to
7869 supply_register.
7870 * tracepoint.c (fetch_traceframe_registers): Update comment.
7871
7872 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7873
7874 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7875 buffer explicit.
7876
7877 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7878
7879 * server.h (decode_xfer_write): Change prototype.
7880 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7881 and don't extract the annex here.
7882 * server.c (decode_xfer_read): Remove `annex' parameter,
7883 and don't extract the annex here.
7884 (decode_xfer): New.
7885 (struct qxfer): New.
7886 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7887 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7888 (handle_qxfer_statictrace): New functions, abstracted out from
7889 handle_query, and made to use the struct qxfer interface.
7890 (handle_threads_qxfer_proper): Rename to ...
7891 (handle_qxfer_threads_proper): ... this.
7892 (handle_threads_qxfer): Rename to ...
7893 (handle_qxfer_threads): ... this. Adjust.
7894 (qxfer_packets): New array.
7895 (handle_qxfer): New function.
7896 (handle_query): Use handle_qxfer.
7897
7898 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7899
7900 * gdbreplay.c: Shorten lines of >= 80 columns.
7901 * linux-low.c: Ditto.
7902 * linux-ppc-low.c: Ditto.
7903 * linux-s390-low.c: Ditto.
7904 * linux-sparc-low.c: Ditto.
7905 * linux-x86-low.c: Ditto.
7906 * linux-xtensa-low.c: Ditto.
7907 * mem-break.c: Ditto.
7908 * nto-low.c: Ditto.
7909 * regcache.h: Ditto.
7910 * remote-utils.c: Ditto.
7911 * server.c: Ditto.
7912 * server.h: Ditto.
7913 * thread-db.c: Ditto.
7914 * tracepoint.c: Ditto.
7915 * utils.c: Ditto.
7916 * win32-low.h: Ditto.
7917
7918 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7919
7920 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7921 update.
7922
7923 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7924
7925 * server.c (gdbserver_version): Update copyright year in version
7926 output.
7927 * gdbreplay.c (gdbreplay_version): Ditto.
7928
7929 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7930
7931 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7932 * linux-bfin-low.c: New file.
7933 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7934 PT_DATA_ADDR for BFIN targets.
7935 * Makefile.in (SFILES): Add linux-bfin-low.c.
7936 (clean): Remove reg-bfin.c.
7937 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7938 * README: Mention supported Blackfin targets.
7939
7940 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7941
7942 * .gitignore: New file.
7943
7944 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7945
7946 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7947
7948 2010-10-22 Jie Zhang <jie@codesourcery.com>
7949
7950 * Makefile.in: Add FLAGS_TO_PASS variable.
7951 (install): Remove dependency of install-only and recursively
7952 invoke make for install-only.
7953
7954 2010-10-04 Doug Evans <dje@google.com>
7955
7956 * Makefile.in (uninstall): Use $(DESTDIR).
7957
7958 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7959
7960 PR gdb/11842
7961
7962 * linux-x86-low.c (compat_siginfo_from_siginfo)
7963 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7964 si_code is < 0. Check for si_code == SI_TIMER before checking for
7965 si_code < 0.
7966
7967 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7968
7969 * lynx-i386-low.c: New file.
7970 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7971
7972 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7973
7974 * lynx-low.c (ptrace_request_to_str): Remove handling for
7975 request values that have been removed in LynxOS 5.x.
7976
7977 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7978
7979 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7980 <ptrace.h>
7981
7982 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7983
7984 * configure.ac: Add --enable-inprocess-agent option.
7985 * configure: Rebuilt.
7986
7987 2010-09-06 Yao Qi <yao@codesourcery.com>
7988
7989 * linux-low.c (linux_kill): Remove unused variable.
7990 (linux_stabilize_threads): Likewise.
7991 * server.c (start_inferior): Likewise.
7992 (queue_stop_reply_callback): Likewise.
7993 * tracepoint.c (do_action_at_tracepoint): Likewise.
7994
7995 2010-09-06 Yao Qi <yao@codesourcery.com>
7996
7997 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7998 on return.
7999
8000 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8001
8002 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8003
8004 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8005
8006 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8007 "$(IPA_DEPFILES)".
8008
8009 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8010
8011 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8012 gdbserver/lynx-ppc-low.c: New files.
8013 * Makefile.in (lynx_low_h): New variable.
8014 (lynx-low.o, lynx-ppc-low.o): New rules.
8015 * configure.ac: On LynxOS, link with -lnetinet.
8016 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8017 * configure: regenerate.
8018
8019 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8020
8021 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8022 * configure.ac: Add check for vasprintf and vsnprintf.
8023 * configure, config.in: Regenerate.
8024 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8025
8026 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8027
8028 * gdbreplay.c: Move include of alloca.h up, next to include of
8029 malloc.h.
8030 * server.h: Add include of malloc.h.
8031 * mem-break.c: Remove include of malloc.h.
8032 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8033
8034 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8035
8036 * Makefile.in (memmem.o): Build with -Wno-error.
8037
8038 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8039
8040 * utils.c (xsnprintf): Make non-static.
8041 * server.h: Add xsnprintf declaration.
8042 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8043 replace calls to snprintf by calls to xsnprintf throughout.
8044
8045 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8046
8047 * configure.ac: Add configure check for alloca.
8048 * configure, config.in: Regenerate.
8049 * server.h: Include alloca.h if it exists.
8050 * gdbreplay.c: Include alloca.h if it exists.
8051
8052 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8053
8054 * linux-low.c (__SIGRTMIN): Define if not already defined.
8055 (linux_create_inferior): Check for __ANDROID__ rather than
8056 __SIGRTMIN.
8057 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8058 are already deferred.
8059 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8060 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8061 stopped and already has a pending signal to report.
8062 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8063 a pending signal to report or is moving out of a jump pad.
8064 (linux_init_signals): Check for __ANDROID__ rather than
8065 __SIGRTMIN.
8066
8067 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8068
8069 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8070 debug_threads check. Avoid a linear search when not doing debug
8071 output.
8072
8073 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8074
8075 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8076 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8077 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8078 (process_event): Change local fd's type to gdb_fildes_t.
8079 (create_file_handler): Adjust prototype.
8080 (delete_file_handler): Adjust prototype.
8081 (handle_file_event): Adjust prototype. Use pfildes.
8082 (create_file_event): Adjsut prototype.
8083 * remote-utils.c (remote_desc, listen_desc): Change type to
8084 gdb_fildes_t.
8085 * server.h: New gdb_fildes_t typedef.
8086 [USE_WIN32API]: Include winsock2.h.
8087 (delete_file_handler, add_file_handler): Adjust prototypes.
8088 (pfildes): Declare.
8089 * utils.c (pfildes): New.
8090
8091 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8092
8093 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8094 * configure: Regenerate.
8095
8096 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8097
8098 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8099 (linux_done_accessing_memory): ... this.
8100 (linux_target_ops): Adjust.
8101 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8102 * nto-low.c (nto_target_ops): Adjust comment.
8103 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8104 * spu-low.c (spu_target_ops): Adjust comment.
8105 * target.h (target_ops): Rename unprepare_to_access_memory field
8106 to done_accessing_memory.
8107 (unprepare_to_access_memory): Rename to ...
8108 (done_accessing_memory): ... this.
8109
8110 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8111
8112 * linux-low.c (linux_prepare_to_access_memory): New.
8113 (linux_unprepare_to_access_memory): New.
8114 (linux_target_ops): Install them.
8115 * server.c (read_memory): Rename to ...
8116 (gdb_read_memory): ... this. Use
8117 prepare_to_access_memory/prepare_to_access_memory.
8118 (write_memory): Rename to ...
8119 (gdb_write_memory): ... this. Use
8120 prepare_to_access_memory/prepare_to_access_memory.
8121 (handle_search_memory_1): Adjust.
8122 (process_serial_event): Adjust.
8123 * target.h (struct target_ops): New fields
8124 prepare_to_access_memory and unprepare_to_access_memory.
8125 (prepare_to_access_memory, unprepare_to_access_memory): New.
8126 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8127 prepare_to_access_memory/prepare_to_access_memory.
8128 * nto-low.c (nto_target_ops): Adjust.
8129 * spu-low.c (spu_target_ops): Adjust.
8130 * win32-low.c (win32_target_ops): Adjust.
8131
8132 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8133
8134 * Makefile.in (WARN_CFLAGS): Get it from configure.
8135 (WERROR_CFLAGS): New.
8136 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8137 * configure.ac: Introduce --enable-werror, which adds -Werror to
8138 the compiler command line. Enabled by default. Disable with
8139 --disable-werror. Add -Wdeclaration-after-statement
8140 Wpointer-arith and -Wformat-nonliteral to warning flags.
8141 * configure: Regenerate.
8142
8143 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8144
8145 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8146
8147 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8148
8149 * gdbreplay.c (remote_error): New.
8150 (gdbchar): New.
8151 (expect): Use gdbchar. Check for error reading from GDB.
8152 Clarify sync error output.
8153 (play): Check for errors writing to GDB.
8154 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8155 * remote-utils.c (getpkt): Check for errors writing to the remote
8156 descriptor.
8157
8158 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8159
8160 * linux-low.c (linux_wait_1): Move non-debugging code out of
8161 `debug_threads' control.
8162
8163 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8164
8165 * linux-low.c (linux_wait_1): Don't set last_status here.
8166 * server.c (push_event, queue_stop_reply_callback): Assert we're
8167 not pushing a TARGET_WAITKIND_IGNORE event.
8168 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8169 (myresume, handle_target_event): Set the thread's last_resume_kind
8170 and last_status from the target returned status.
8171
8172 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8173
8174 PR threads/10729
8175
8176 * linux-x86-low.c (update_debug_registers_callback): New.
8177 (i386_dr_low_set_addr): Use it.
8178 (i386_dr_low_get_addr): New.
8179 (i386_dr_low_set_control): Use update_debug_registers_callback.
8180 (i386_dr_low_get_control): New.
8181 (i386_dr_low_get_status): Adjust.
8182 * linux-low.c (linux_stop_lwp): New.
8183 * linux-low.h (linux_stop_lwp): Declare.
8184
8185 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8186 argument instead of a i386_debug_reg_state.
8187 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8188 a i386_debug_reg_state.
8189 (i386_insert_aligned_watchpoint): Adjust.
8190 (i386_remove_aligned_watchpoint): Adjust.
8191 (i386_low_stopped_data_address): Read the debug registers from the
8192 inferior instead of from the mirrors.
8193 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8194 (i386_dr_low_get_addr): Declare.
8195 (i386_dr_low_get_control): Declare.
8196 (i386_dr_low_get_status): Change prototype.
8197
8198 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8199 (i386_dr_low_get_addr): New.
8200 (i386_dr_low_get_control): New.
8201 (i386_dr_low_get_status): Adjust prototype. Return
8202 dr_status_mirror.
8203 (i386_initial_stuff): Clear dr_status_mirror and
8204 dr_control_mirror.
8205 (i386_get_thread_context): Adjust.
8206 (i386_set_thread_context): Adjust.
8207 (i386_thread_added): Adjust.
8208
8209 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8210
8211 * linux-low.h (linux_thread_area): Delete declaration.
8212
8213 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8214
8215 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8216 after its termination.
8217
8218 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8219
8220 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8221 (gdb_wants_all_stopped): Delete.
8222 (linux_wait_1): Don't call them.
8223 * server.c (handle_v_cont): Tag all threads as want-stopped.
8224 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8225 stopped as "client-wants-stopped".
8226
8227 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8228
8229 * Makefile.in (signals_h): New.
8230 (server_h): Depend on it.
8231 (server.o): Don't depend on $(signals_def).
8232 (signals.o): Depend on $(signals_def).
8233
8234 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8235
8236 * Makefile.in (signals_def): New.
8237 (server_h): Append include/gdb/signals.h and signals_def.
8238 (server.o): Append signals_def.
8239
8240 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8241
8242 * server.c (handle_target_event): Use target_signal_to_host for
8243 resume_info.sig initialization.
8244 * target.h (struct thread_resume) <sig>: New comment.
8245
8246 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8247
8248 * server.c (handle_query): strcpy() the returned string from paddress()
8249 instead of sprintf().
8250 * utils.c (paddress): Return phex_nz().
8251
8252 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8253
8254 * server.c (handle_v_cont): Call mourn_inferior if process
8255 just exited.
8256 (myresume): Likewise.
8257
8258 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8259
8260 Static tracepoints, and integration with UST.
8261
8262 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8263 * mem-break.c (uninsert_all_breakpoints)
8264 (reinsert_all_breakpoints): New.
8265 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8266 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8267 (gdb_agent_ust_loaded, helper_thread_id)
8268 (gdb_agent_helper_thread_id): New macros.
8269 (struct ipa_sym_addresses): Add addr_ust_loaded,
8270 addr_helper_thread_id, addr_cmd_buf.
8271 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8272 (in_process_agent_loaded_ust): New.
8273 (write_e_ust_not_loaded): New.
8274 (maybe_write_ipa_ust_not_loaded): New.
8275 (struct collect_static_trace_data_action): New.
8276 (enum tracepoint_type) <static_tracepoint>: New.
8277 (struct tracepoint) <handle>: Mention static tracepoints.
8278 (struct static_tracepoint_ctx): New.
8279 (CMD_BUF_SIZE): New.
8280 (add_tracepoint_action): Handle static tracepoint actions.
8281 (unprobe_marker_at): New.
8282 (clear_installed_tracepoints): Handle static tracepoints.
8283 (cmd_qtdp): Handle static tracepoints.
8284 (probe_marker_at): New.
8285 (cmd_qtstart): Handle static tracepoints.
8286 (response_tracepoint): Handle static tracepoints.
8287 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8288 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8289 (get_context_regcache): Handle static tracepoints.
8290 (do_action_at_tracepoint): Handle static tracepoint actions.
8291 (traceframe_find_block_type): Handle static trace data blocks.
8292 (traceframe_read_sdata): New.
8293 (download_tracepoints): Download static tracepoint actions.
8294 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8295 (GDB_PROBE_NAME): New.
8296 (ust_ops): New.
8297 (GET_UST_SYM): New.
8298 (USTF): New.
8299 (dlsym_ust): New.
8300 (ust_marker_to_static_tracepoint): New.
8301 (gdb_probe): New.
8302 (collect_ust_data_at_tracepoint): New.
8303 (gdb_ust_probe): New.
8304 (UNIX_PATH_MAX, SOCK_DIR): New.
8305 (gdb_ust_connect_sync_socket): New.
8306 (resume_thread, stop_thread): New.
8307 (run_inferior_command): New.
8308 (init_named_socket): New.
8309 (gdb_ust_socket_init): New.
8310 (cstr_to_hexstr): New.
8311 (next_st): New.
8312 (first_marker, next_marker): New.
8313 (response_ust_marker): New.
8314 (cmd_qtfstm, cmd_qtsstm): New.
8315 (unprobe_marker_at, probe_marker_at): New.
8316 (cmd_qtstmat, gdb_ust_thread): New.
8317 (gdb_ust_init): New.
8318 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8319 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8320 (ST_REGENTRY): New.
8321 (x86_64_st_collect_regmap): New.
8322 (X86_64_NUM_ST_COLLECT_GREGS): New.
8323 (AMD64_RIP_REGNUM): New.
8324 (supply_static_tracepoint_registers): New.
8325 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8326 (ST_REGENTRY): New.
8327 (i386_st_collect_regmap): New.
8328 (i386_NUM_ST_COLLECT_GREGS): New.
8329 (supply_static_tracepoint_registers): New.
8330 * server.c (handle_query): Handle qXfer:statictrace:read.
8331 <qSupported>: Report support for StaticTracepoints, and
8332 qXfer:statictrace:read features.
8333 * server.h (traceframe_read_sdata)
8334 (supply_static_tracepoint_registers): Declare.
8335 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8336 (unpack_varlen_hex): Include in IPA build.
8337 * Makefile.in (ustlibs, ustinc): New.
8338 (IPA_OBJS): Add remote-utils-ipa.o.
8339 ($(IPA_LIB)): Link -ldl and -lpthread.
8340 (UST_CFLAGS): New.
8341 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8342 * config.in, configure: Regenerate.
8343
8344 2010-06-20 Ian Lance Taylor <iant@google.com>
8345 Pedro Alves <pedro@codesourcery.com>
8346
8347 * linux-x86-low.c (always_true): Delete.
8348 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8349 trying to fool the compiler with always_true.
8350
8351 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8352
8353 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8354 conditions in gdbserver.
8355
8356 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8357
8358 * spu-low.c (spu_read_memory): Wrap around local store limit.
8359 (spu_write_memory): Likewise.
8360
8361 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8362
8363 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8364 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8365 LONGEST uses.
8366 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8367 uses.
8368 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8369 uses with LONGEST uses.
8370
8371 2010-06-14 Stan Shebs <stan@codesourcery.com>
8372 Pedro Alves <pedro@codesourcery.com>
8373
8374 Bytecode compiler.
8375
8376 * linux-x86-low.c: Include limits.h.
8377 (add_insns): New.
8378 (always_true): New.
8379 (EMIT_ASM): New.
8380 (EMIT_ASM32): New.
8381 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8382 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8383 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8384 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8385 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8386 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8387 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8388 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8389 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8390 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8391 (amd64_emit_void_call_2): New.
8392 (amd64_emit_ops): New.
8393 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8394 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8395 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8396 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8397 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8398 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8399 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8400 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8401 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8402 (i386_emit_stack_adjust, i386_emit_int_call_1)
8403 (i386_emit_void_call_2): New.
8404 (i386_emit_ops): New.
8405 (x86_emit_ops): New.
8406 (the_low_target): Install x86_emit_ops.
8407 * server.h (struct emit_ops): New.
8408 (get_raw_reg_func_addr): Declare.
8409 (current_insn_ptr, emit_error): Declare.
8410 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8411 (set_trace_state_variable_value): New defines.
8412 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8413 addr_get_trace_state_variable_value and
8414 addr_set_trace_state_variable_value.
8415 (symbol_list): New fields for get_raw_reg,
8416 get_trace_state_variable_value and set_trace_state_variable_value.
8417 (condfn): New typedef.
8418 (struct tracepoint): New field `compiled_cond'.
8419 (do_action_at_tracepoint): Clear compiled_cond.
8420 (get_trace_state_variable_value, set_trace_state_variable_value):
8421 Export in the IPA.
8422 (condition_true_at_tracepoint): If there's a compiled condition,
8423 run that.
8424 (current_insn_ptr, emit_error): New globals.
8425 (struct bytecode_address): New.
8426 (get_raw_reg_func_addr): New.
8427 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8428 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8429 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8430 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8431 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8432 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8433 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8434 (compile_tracepoint_condition, compile_bytecodes): New.
8435 * target.h (emit_ops): Forward declare.
8436 (struct target_ops): New field emit_ops.
8437 (target_emit_ops): New.
8438 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8439 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8440 * linux-low.c (linux_emit_ops): New.
8441 (linux_target_ops): Install it.
8442 * linux-low.h (struct linux_target_ops): New field emit_ops.
8443
8444 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8445
8446 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8447 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8448
8449 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8450 Stan Shebs <stan@codesourcery.com>
8451
8452 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8453 (all): Depend on $(extra_libraries).
8454 (install-only): Install the IPA.
8455 (IPA_OBJS, IPA_LIB): New.
8456 (clean): Remove the IPA lib.
8457 (IPAGENT_CFLAGS): New.
8458 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8459 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8460 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8461 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8462 * configure.ac: Check for atomic builtins support in the compiler.
8463 (IPA_DEPFILES, extra_libraries): Define.
8464 * configure.srv (ipa_obj): Add description.
8465 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8466 (i[34567]86-*-linux*): Set ipa_obj.
8467 (x86_64-*-linux*): Set ipa_obj.
8468 * linux-low.c (stabilizing_threads): New.
8469 (supports_fast_tracepoints): New.
8470 (linux_detach): Stabilize threads before detaching.
8471 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8472 the lwp is either not stabilizing, or is moving out of a jump pad.
8473 (linux_fast_tracepoint_collecting): New.
8474 (maybe_move_out_of_jump_pad): New.
8475 (enqueue_one_deferred_signal): New.
8476 (dequeue_one_deferred_signal): New.
8477 (linux_wait_for_event_1): If moving out of a jump pad, defer
8478 pending signals to later.
8479 (linux_stabilize_threads): New.
8480 (linux_wait_1): Check if threads need moving out of jump pads, and
8481 do it if so.
8482 (stuck_in_jump_pad_callback): New.
8483 (move_out_of_jump_pad_callback): New.
8484 (lwp_running): New.
8485 (linux_resume_one_lwp): Handle moving out of jump pads.
8486 (linux_set_resume_request): Dequeue deferred signals.
8487 (need_step_over_p): Also step over fast tracepoint jumps.
8488 (start_step_over): Also uninsert fast tracepoint jumps.
8489 (finish_step_over): Also reinsert fast tracepoint jumps.
8490 (linux_install_fast_tracepoint_jump): New.
8491 (linux_target_ops): Install linux_stabilize_threads and
8492 linux_install_fast_tracepoint_jump_pad.
8493 * linux-low.h (linux_target_ops) <get_thread_area,
8494 install_fast_tracepoint_jump_pad>: New fields.
8495 (struct lwp_info) <collecting_fast_tracepoint,
8496 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8497 (linux_get_thread_area): Declare.
8498 * linux-x86-low.c (jump_insn): New.
8499 (x86_get_thread_area): New.
8500 (append_insns): New.
8501 (push_opcode): New.
8502 (amd64_install_fast_tracepoint_jump_pad): New.
8503 (i386_install_fast_tracepoint_jump_pad): New.
8504 (x86_install_fast_tracepoint_jump_pad): New.
8505 (the_low_target): Install x86_get_thread_area and
8506 x86_install_fast_tracepoint_jump_pad.
8507 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8508 (struct fast_tracepoint_jump): New.
8509 (fast_tracepoint_jump_insn): New.
8510 (fast_tracepoint_jump_shadow): New.
8511 (find_fast_tracepoint_jump_at): New.
8512 (fast_tracepoint_jump_here): New.
8513 (delete_fast_tracepoint_jump): New.
8514 (set_fast_tracepoint_jump): New.
8515 (uninsert_fast_tracepoint_jumps_at): New.
8516 (reinsert_fast_tracepoint_jumps_at): New.
8517 (set_breakpoint_at): Use write_inferior_memory.
8518 (uninsert_raw_breakpoint): Use write_inferior_memory.
8519 (check_mem_read): Mask out fast tracepoint jumps.
8520 (check_mem_write): Mask out fast tracepoint jumps.
8521 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8522 (set_fast_tracepoint_jump): Declare.
8523 (delete_fast_tracepoint_jump)
8524 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8525 (reinsert_fast_tracepoint_jumps_at): Declare.
8526 * regcache.c: Don't compile many functions when building the
8527 in-process agent library.
8528 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8529 the register buffer in the heap.
8530 (free_register_cache): If the register buffer isn't owned by the
8531 regcache, don't free it.
8532 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8533 pre-existing register caches.
8534 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8535 type.
8536 (convert_ascii_to_int): : Constify `from' parameter type.
8537 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8538 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8539 the needed buffer in-place.
8540 (relocate_instruction): New.
8541 * server.c (handle_query) <qSymbols>: If the target supports
8542 tracepoints, give it a chance of looking up symbols. Report
8543 support for fast tracepoints.
8544 (handle_status): Stabilize threads.
8545 (process_serial_event): Adjust.
8546 * server.h (struct fast_tracepoint_jump): Forward declare.
8547 (struct process_info) <fast_tracepoint_jumps>: New field.
8548 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8549 (decode_X_packet, decode_M_packet): Adjust.
8550 (relocate_instruction): Declare.
8551 (in_process_agent_loaded): Declare.
8552 (tracepoint_look_up_symbols): Declare.
8553 (struct fast_tpoint_collect_status): Declare.
8554 (fast_tracepoint_collecting): Declare.
8555 (force_unlock_trace_buffer): Declare.
8556 (handle_tracepoint_bkpts): Declare.
8557 (initialize_low_tracepoint)
8558 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8559 * target.h (struct target_ops) <stabilize_threads,
8560 install_fast_tracepoint_jump_pad>: New fields.
8561 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8562 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8563 [HAVE_STDINT_H]: Include stdint.h.
8564 (trace_debug_1): Rename to ...
8565 (trace_vdebug): ... this.
8566 (trace_debug): Rename to ...
8567 (trace_debug_1): ... this. Add `level' parameter.
8568 (trace_debug): New.
8569 (ATTR_USED, ATTR_NOINLINE): New.
8570 (IP_AGENT_EXPORT): New.
8571 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8572 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8573 (about_to_request_buffer_space, trace_buffer_is_full)
8574 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8575 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8576 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8577 (traceframe_write_count, traceframes_created)
8578 (trace_state_variables)
8579 New renaming defines.
8580 (struct ipa_sym_addresses): New.
8581 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8582 (symbol_list): New.
8583 (ipa_sym_addrs): New.
8584 (all_tracepoint_symbols_looked_up): New.
8585 (in_process_agent_loaded): New.
8586 (write_e_ipa_not_loaded): New.
8587 (maybe_write_ipa_not_loaded): New.
8588 (tracepoint_look_up_symbols): New.
8589 (debug_threads) [IN_PROCESS_AGENT]: New.
8590 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8591 (UNKNOWN_SIDE_EFFECTS): New.
8592 (stop_tracing): New.
8593 (flush_trace_buffer): New.
8594 (stop_tracing_bkpt): New.
8595 (flush_trace_buffer_bkpt): New.
8596 (read_inferior_integer): New.
8597 (read_inferior_uinteger): New.
8598 (read_inferior_data_pointer): New.
8599 (write_inferior_data_pointer): New.
8600 (write_inferior_integer): New.
8601 (write_inferior_uinteger): New.
8602 (struct collect_static_trace_data_action): Delete.
8603 (enum tracepoint_type): New.
8604 (struct tracepoint) <type>: New field `type'.
8605 <actions_str, step_actions, step_actions_str>: Only include in
8606 GDBserver.
8607 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8608 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8609 (tracepoints): Use IP_AGENT_EXPORT.
8610 (last_tracepoint): Don't include in the IPA.
8611 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8612 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8613 (alloced_trace_state_variables): New.
8614 (trace_state_variables): Use IP_AGENT_EXPORT.
8615 (traceframe_t): Delete unused variable.
8616 (circular_trace_buffer): Don't include in the IPA.
8617 (trace_buffer_start): Delete.
8618 (struct trace_buffer_control): New.
8619 (trace_buffer_free): Delete.
8620 (struct ipa_trace_buffer_control): New.
8621 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8622 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8623 New.
8624 (trace_buffer_ctrl): New.
8625 (TRACE_BUFFER_CTRL_CURR): New.
8626 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8627 Reimplement as macros.
8628 (trace_buffer_wrap): Delete.
8629 (traceframe_write_count, traceframe_read_count)
8630 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8631 (struct tracepoint_hit_ctx) <type>: New field.
8632 (struct fast_tracepoint_ctx): New.
8633 (memory_barrier): New.
8634 (cmpxchg): New.
8635 (record_tracepoint_error): Update atomically in the IPA.
8636 (clear_inferior_trace_buffer): New.
8637 (about_to_request_buffer_space): New.
8638 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8639 updating the same buffer.
8640 (add_tracepoint): Default the tracepoint's type to trap
8641 tracepoint, and orig_size to -1.
8642 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8643 internal variables.
8644 (create_trace_state_variable): New parameter `gdb'. Handle it.
8645 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8646 (cmd_qtdp): Handle fast tracepoints.
8647 (cmd_qtdv): Adjust.
8648 (max_jump_pad_size): New.
8649 (gdb_jump_pad_head): New.
8650 (get_jump_space_head): New.
8651 (claim_jump_space): New.
8652 (sort_tracepoints): New.
8653 (MAX_JUMP_SIZE): New.
8654 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8655 IPA.
8656 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8657 support. Upload fast traceframes, and delete internal IPA
8658 breakpoints.
8659 (stop_tracing_handler): New.
8660 (flush_trace_buffer_handler): New.
8661 (cmd_qtstop): Upload fast tracepoints.
8662 (response_tracepoint): Handle fast tracepoints.
8663 (tracepoint_finished_step): Upload fast traceframes. Set the
8664 tracepoint hit context's tracepoint type.
8665 (handle_tracepoint_bkpts): New.
8666 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8667 type. Add comment about fast tracepoints.
8668 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8669 non-existing action_str field.
8670 (get_context_regcache): Handle fast tracepoints.
8671 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8672 to the regcache.
8673 (fast_tracepoint_from_jump_pad_address): New.
8674 (fast_tracepoint_from_ipa_tpoint_address): New.
8675 (collecting_t): New.
8676 (force_unlock_trace_buffer): New.
8677 (fast_tracepoint_collecting): New.
8678 (collecting): New.
8679 (gdb_collect): New.
8680 (write_inferior_data_ptr): New.
8681 (target_tp_heap): New.
8682 (target_malloc): New.
8683 (download_agent_expr): New.
8684 (UALIGN): New.
8685 (download_tracepoints): New.
8686 (download_trace_state_variables): New.
8687 (upload_fast_traceframes): New.
8688 (IPA_FIRST_TRACEFRAME): New.
8689 (IPA_NEXT_TRACEFRAME_1): New.
8690 (IPA_NEXT_TRACEFRAME): New.
8691 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8692 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8693 (gdb_jump_pad_buffer_end): New.
8694 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8695 (initialize_tracepoint): Adjust.
8696 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8697 buffer. Initialize the low module.
8698 * utils.c (PREFIX, TOOLNAME): New.
8699 (malloc_failure): Use PREFIX.
8700 (error): In the IPA, an error causes an exit.
8701 (fatal, warning): Use PREFIX.
8702 (internal_error): Use TOOLNAME.
8703 (NUMCELLS): Increase to 10.
8704 * configure, config.in: Regenerate.
8705
8706 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8707
8708 * server.c (handle_query) <qSupported>: Do two passes over the
8709 qSupported string to avoid nesting strtok.
8710
8711 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8712
8713 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8714 (CDEPS): New.
8715 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8716 -Wl,--dynamic-list.
8717 * configure: Regenerate.
8718 * proc-service.list: New.
8719
8720 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8721
8722 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8723 New comment.
8724
8725 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8726
8727 * gdbreplay.c (remote_open): Check error return from socket() call by
8728 its equality to -1 not by it being negative.
8729 * remote-utils.c (remote_open): Likewise.
8730
8731 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8732
8733 * config.h: Regenerate.
8734
8735 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8736
8737 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8738 doesn't provide PTRACE_GET_THREAD_AREA.
8739
8740 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8741
8742 * linux-m68k-low.c: Include <asm/ptrace.h>
8743 (ps_get_thread_area): Implement.
8744
8745 2010-05-03 Doug Evans <dje@google.com>
8746
8747 * event-loop.c (struct callback_event): New struct.
8748 (callback_list): New global.
8749 (append_callback_event, delete_callback_event): New functions.
8750 (process_callback): New function.
8751 (start_event_loop): Call it.
8752 * remote-utils.c (NOT_SCHEDULED): Define.
8753 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8754 moved out of readchar.
8755 (readchar): Rewrite. Call reschedule before returning.
8756 (reset_readchar): New function.
8757 (remote_close): Call it.
8758 (process_remaining, reschedule): New functions.
8759 * server.h (callback_handler_func): New typedef.
8760 (append_callback_event, delete_callback_event): Declare.
8761
8762 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8763
8764 * proc-service.c (ps_pglobal_lookup): Use
8765 thread_db_look_up_one_symbol.
8766 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8767 parameter. Use it instead of all_symbols_looked_up.
8768 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8769 field.
8770 (all_symbols_looked_up): Don't declare.
8771 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8772 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8773 field.
8774 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8775 Set all_symbols_looked_up here.
8776 (thread_db_look_up_one_symbol): New.
8777 (thread_db_get_tls_address): Adjust.
8778 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8779 thread_db object on the heap, and tentatively set it in the
8780 process structure.
8781 (thread_db_init): Don't set all_symbols_looked_up here.
8782 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8783
8784 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8785
8786 * linux-low.c (linux_kill, linux_detach): Adjust.
8787 (status_pending_p_callback): Remove redundant statement. Check
8788 for !TARGET_WAITIKIND_IGNORE, instead of
8789 TARGET_WAITKIND_STOPPED.
8790 (handle_tracepoints): Make sure LWP is locked. Adjust.
8791 (linux_wait_for_event_1): Adjust.
8792 (linux_cancel_breakpoints): New.
8793 (unsuspend_one_lwp): New.
8794 (unsuspend_all_lwps): New.
8795 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8796 (send_sigstop_callback): Change return type to int, add new
8797 `except' parameter and handle it.
8798 (suspend_and_send_sigstop_callback): New.
8799 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8800 pass them down. If SUSPEND, also increment the lwp's suspend
8801 count.
8802 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8803 (need_step_over_p): Don't consider suspended LWPs.
8804 (start_step_over): Adjust.
8805 (proceed_one_lwp): Change return type to int, add new `except'
8806 parameter and handle it.
8807 (unsuspend_and_proceed_one_lwp): New.
8808 (proceed_all_lwps): Use find_inferior instead of
8809 for_each_inferior.
8810 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8811 also decrement the suspend count of LWPs. Pass `except' down,
8812 instead of hacking its suspend count.
8813 (linux_pause_all): Add `freeze' parameter. Adjust.
8814 (linux_unpause_all): New.
8815 (linux_target_ops): Install linux_unpause_all.
8816 * server.c (handle_status): Adjust.
8817 * target.h (struct target_ops): New fields `unpause_all' and
8818 `cancel_breakpoints'. Add new parameter to `pause_all'.
8819 (pause_all): Add new `freeze' parameter.
8820 (unpause_all): New.
8821 (cancel_breakpoints): New.
8822 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8823 cancel breakpoints.
8824 (cmd_qtstart): Pause threads.
8825 (stop_tracing): Pause threads, and cancel breakpoints.
8826 * win32-low.c (win32_target_ops): Adjust.
8827
8828 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8829
8830 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8831 the inferior right away from here...
8832 (linux_wait_1): ... to here, and adjust to check the thread's
8833 last_resume_kind instead of the lwp's step or stop_expected flags.
8834
8835 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8836
8837 * README: Use consistent `GDB' and `GDBserver' spellings.
8838
8839 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8840
8841 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8842 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8843 (linux_detach_one_lwp): Assume the lwp is stopped.
8844 (any_thread_of): Delete.
8845 (linux_detach): Stop all lwps here. Don't blindly delete all
8846 breakpoints.
8847 (delete_lwp_callback): New.
8848 (linux_mourn): Delete all lwps of the process that is gone.
8849 (linux_wait_1): Don't delete the last lwp of the process here.
8850 * mem-break.h (mark_breakpoints_out): Declare.
8851 * mem-break.c (mark_breakpoints_out): New.
8852 (free_all_breakpoints): Use it.
8853 * server.c (handle_target_event): If the process is gone, mark
8854 breakpoints out.
8855 * thread-db.c (struct thread_db) <create_bp>: New field.
8856 (thread_db_enable_reporting): Fix prototype. Store a thread event
8857 breakpoint reference in the thread_db struct.
8858 (thread_db_load_search): Clear the thread_db object.
8859 (try_thread_db_load_1): Ditto.
8860 (switch_to_process): New.
8861 (disable_thread_event_reporting): Use it.
8862 (remove_thread_event_breakpoints): New.
8863 (thread_db_detach, thread_db_mourn): Use it.
8864
8865 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8866
8867 * linux-low.c (linux_enable_event_reporting): New.
8868 (linux_wait_for_event_1, handle_extended_wait): Use it.
8869
8870 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8871
8872 * linux-low.c (linux_kill_one_lwp, linux_kill)
8873 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8874 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8875 SIGSTOP even if the LWP is stopped.
8876 (send_sigstop_callback): New.
8877 (stop_all_lwps): Use send_sigstop_callback instead.
8878 (linux_resume_one_thread): Adjust.
8879 (proceed_one_lwp): Still proceed an LWP that the client has
8880 requested to stop, if we haven't reported it as stopped yet. Make
8881 sure that LWPs the client want stopped, have a pending SIGSTOP.
8882
8883 2010-04-26 Doug Evans <dje@google.com>
8884
8885 * server.c (handle_general_set): Make static.
8886
8887 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8888 Print received char after testing for error/eof instead of before.
8889 (input_interrupt): Tweak comment.
8890
8891 2010-04-23 Doug Evans <dje@google.com>
8892
8893 * server.c (start_inferior): Print inferior argv if --debug.
8894
8895 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8896
8897 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8898 * nto-x86-low.c: Include server.h
8899
8900 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8901
8902 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8903 be consistent with other sources of this directory.
8904 (init_registers_amd64): Correct name of source file of this function
8905 in the comment.
8906
8907 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8908
8909 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8910 64-bit executables.
8911
8912 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8913
8914 * win32-i386-low.c: Add 64-bit support.
8915 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8916 (init_registers_amd64): Declare.
8917 (mappings): Add 64-bit version of array.
8918 (init_windows_x86): New function.
8919 (the_low_target): Change init_arch field to init_windows_x86.
8920
8921 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8922
8923 * win32-low.c: Adapt to support also 64-bit architecture.
8924 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8925 (get_image_name): Use SIZE_T type for local variable `done'.
8926 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8927 (toolhelp_get_dll_name): Idem.
8928 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8929 Use uintptr_t typecast to avoid warning.
8930 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8931 (handle_exception): Use phex_nz to avoid warning.
8932 (win32_wait): Remove unused local variable `process'.
8933
8934 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8935
8936 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8937 `amd64-avx.o'.
8938
8939 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8940
8941 * configure.ac: Use `ws2_32' library for srv_mingw.
8942 * configure: Regenerate.
8943 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8944 * remote-utils.c: Likewise.
8945
8946 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8947
8948 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8949 if __x86_64__ is defined.
8950
8951 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8952
8953 * configure: Regenerate.
8954
8955 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8956
8957 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8958 * target.h (target_ops): New get_tib_address field.
8959 * win32-low.h (win32_thread_info): Add thread_local_base field.
8960 * win32-low.c (child_add_thread): Add tlb argument.
8961 Set thread_local_base field to TLB.
8962 (get_child_debug_event): Adapt to child_add_thread change.
8963 (win32_get_tib_address): New function.
8964 (win32_target_ops): Set get_tib_address field to
8965 win32_get_tib_address.
8966 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8967
8968 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8969
8970 * linux-low.c (linux_mourn): Also remove the process.
8971 * server.c (handle_target_event): Don't remove the process here.
8972 * nto-low.c (nto_mourn): New.
8973 (nto_target_ops): Install it.
8974 * spu-low.c (spu_mourn): New.
8975 (spu_target_ops): Install it.
8976 * win32-low.c (win32_mourn): New.
8977 (win32_target_ops): Install it.
8978
8979 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8980
8981 * server.h (buffer_xml_printf): Remove redundant `;'.
8982
8983 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8984
8985 * regcache.c (set_register_cache): Invalidate regcaches before
8986 changing the register cache layout.
8987 (regcache_invalidate_one): Allow a NULL regcache.
8988 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8989 regcaches before changing the register cache layout or the target
8990 regsets.
8991
8992 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8993
8994 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8995 variable warning on Linux/x86-64.
8996
8997 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8998
8999 GDBserver disconnected tracing support.
9000
9001 * linux-low.c (linux_remove_process): Delete.
9002 (add_lwp): Don't set last_resume_kind here.
9003 (linux_kill): Use `mourn'.
9004 (linux_detach): Use `thread_db_detach', and `mourn'.
9005 (linux_mourn): New.
9006 (linux_attach_lwp_1): Adjust comment.
9007 (linux_attach): last_resume_kind moved the thread_info; adjust.
9008 (status_pending_p_callback): Adjust.
9009 (linux_wait_for_event_1): Adjust.
9010 (count_events_callback, select_singlestep_lwp_callback)
9011 (select_event_lwp_callback, cancel_breakpoints_callback)
9012 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9013 (proceed_one_lwp): Adjust.
9014 (linux_async): Add debug output.
9015 (linux_thread_stopped): New.
9016 (linux_pause_all): New.
9017 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9018 linux_pause_all.
9019 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9020 (thread_db_free): Delete declaration.
9021 (thread_db_detach, thread_db_mourn): Declare.
9022 * thread-db.c (thread_db_init): Use thread_db_mourn.
9023 (thread_db_free): Delete, split in two.
9024 (disable_thread_event_reporting): New.
9025 (thread_db_detach): New.
9026 (thread_db_mourn): New.
9027
9028 * server.h (struct thread_info) <last_resume_kind>: New field.
9029 <attached>: Add comment.
9030 <gdb_detached>: New field.
9031 (handler_func): Change return type to int.
9032 (handle_serial_event, handle_target_event): Ditto.
9033 (gdb_connected): Declare.
9034 (tracing): Delete.
9035 (disconnected_tracing): Declare.
9036 (stop_tracing): Declare.
9037
9038 * server.c (handle_query) <qSupported>: Report support for
9039 disconnected tracing.
9040 (queue_stop_reply_callback): Account for running threads.
9041 (gdb_wants_thread_stopped): New.
9042 (gdb_wants_all_threads_stopped): New.
9043 (gdb_reattached_process): New.
9044 (handle_status): Clear the `gdb_detached' flag of all processes.
9045 In all-stop, stop all threads.
9046 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9047 (process_serial_event): If the remote connection breaks, or if an
9048 exit was forced with "monitor exit", force an event loop exit.
9049 Handle disconnected tracing on detach.
9050 (handle_serial_event): Adjust.
9051 (handle_target_event): If GDB isn't connected, forward events back
9052 to the inferior, unless the last process exited, in which case,
9053 exit gdbserver. Adjust interface.
9054
9055 * remote-utils.c (remote_open): Don't block in accept. Instead
9056 register an event loop source on the listen socket file
9057 descriptor. Refactor bits into ...
9058 (listen_desc): ... this new global.
9059 (gdb_connected): ... this new function.
9060 (enable_async_notification): ... this new function.
9061 (handle_accept_event): ... this new function.
9062 (remote_close): Clear remote_desc.
9063
9064 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9065
9066 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9067 New fields.
9068 (mourn_inferior): Define.
9069 (target_process_qsupported): Avoid the dangling else problem.
9070 (thread_stopped): Define.
9071 (pause_all): Define.
9072 (target_waitstatus_to_string): Declare.
9073 * target.c (target_waitstatus_to_string): New.
9074
9075 * tracepoint.c (tracing): Make extern.
9076 (disconnected_tracing): New.
9077 (stop_tracing): Make extern. Handle tracing stops due to GDB
9078 disconnecting.
9079 (cmd_qtdisconnected): New.
9080 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9081 (handle_tracepoint_general_set): Handle QTDisconnected.
9082
9083 * event-loop.c (event_handler_func): Change return type to int.
9084 (process_event): Bail out if the event handler wants the event
9085 loop to stop.
9086 (handle_file_event): Ditto.
9087 (start_event_loop): Bail out if the event handler wants the event
9088 loop to stop.
9089
9090 * nto-low.c (nto_target_ops): Adjust.
9091 * spu-low.c (spu_wait): Don't remove the process here.
9092 (spu_target_ops): Adjust.
9093 * win32-low.c (win32_wait): Don't remove the process here.
9094 (win32_target_ops): Adjust.
9095
9096 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9097
9098 * regcache.c (realloc_register_cache): Invalidate inferior's
9099 regcache before recreating it.
9100
9101 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9102
9103 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9104
9105 2010-04-09 Stan Shebs <stan@codesourcery.com>
9106 Pedro Alves <pedro@codesourcery.com>
9107
9108 * server.h (LONGEST): New.
9109 (struct thread_info) <while_stepping>: New field.
9110 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9111 Declare.
9112 (initialize_tracepoint, handle_tracepoint_general_set)
9113 (handle_tracepoint_query, tracepoint_finished_step)
9114 (tracepoint_was_hit, release_while_stepping_state_list):
9115 (current_traceframe): Declare.
9116 * server.c (handle_general_set): Handle tracepoint packets.
9117 (read_memory): New.
9118 (write_memory): New.
9119 (handle_search_memory_1): Use read_memory.
9120 (handle_query): Report support for conditional tracepoints, trace
9121 state variables, and tracepoint sources. Handle tracepoint
9122 queries.
9123 (main): Initialize the tracepoints module.
9124 (process_serial_event): Handle traceframe reads/writes.
9125
9126 * linux-low.c (handle_tracepoints): New.
9127 (linux_wait_1): Call it.
9128 (linux_resume_one_lwp): Handle while-stepping.
9129 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9130 (linux_target_ops): Install them.
9131 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9132 New field.
9133 * linux-x86-low.c (x86_supports_tracepoints): New.
9134 (the_low_target). Install it.
9135
9136 * mem-break.h (delete_breakpoint): Declare.
9137 * mem-break.c (delete_breakpoint): Make external.
9138
9139 * target.h (struct target_ops): Add `supports_tracepoints',
9140 `read_pc', and `write_pc' fields.
9141 (target_supports_tracepoints): Define.
9142 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9143 (phex_nz): New.
9144
9145 * regcache.h (struct regcache) <registers_owned>: New field.
9146 (init_register_cache, regcache_cpy): Declare.
9147 (regcache_read_pc, regcache_write_pc): Declare.
9148 (register_cache_size): Declare.
9149 (supply_regblock): Declare.
9150 * regcache.c (init_register_cache): New.
9151 (new_register_cache): Use it.
9152 (regcache_cpy): New.
9153 (register_cache_size): New.
9154 (supply_regblock): New.
9155 (regcache_read_pc, regcache_write_pc): New.
9156
9157 * tracepoint.c: New.
9158
9159 * Makefile.in (OBS): Add tracepoint.o.
9160 (tracepoint.o): New rule.
9161
9162 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9163
9164 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9165 (i386-mmx.o): New.
9166 (i386-mmx.c): Likewise.
9167 (i386-mmx-linux.o): Likewise.
9168 (i386-mmx-linux.c): Likewise.
9169
9170 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9171 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9172 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9173 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9174
9175 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9176 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9177 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9178
9179 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9180
9181 * Makefile.in (clean): Updated.
9182 (i386-avx.o): New.
9183 (i386-avx.c): Likewise.
9184 (i386-avx-linux.o): Likewise.
9185 (i386-avx-linux.c): Likewise.
9186 (amd64-avx.o): Likewise.
9187 (amd64-avx.c): Likewise.
9188 (amd64-avx-linux.o): Likewise.
9189 (amd64-avx-linux.c): Likewise.
9190
9191 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9192 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9193 (srv_amd64_regobj): Add amd64-avx.o.
9194 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9195 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9196 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9197 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9198 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9199 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9200 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9201
9202 * i387-fp.c: Include "i386-xstate.h".
9203 (i387_xsave): New.
9204 (i387_cache_to_xsave): Likewise.
9205 (i387_xsave_to_cache): Likewise.
9206 (x86_xcr0): Likewise.
9207
9208 * i387-fp.h (i387_cache_to_xsave): Likewise.
9209 (i387_xsave_to_cache): Likewise.
9210 (x86_xcr0): Likewise.
9211
9212 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9213 * linux-crisv32-low.c (target_regsets): Likewise.
9214 * linux-m68k-low.c (target_regsets): Likewise.
9215 * linux-mips-low.c (target_regsets): Likewise.
9216 * linux-ppc-low.c (target_regsets): Likewise.
9217 * linux-s390-low.c (target_regsets): Likewise.
9218 * linux-sh-low.c (target_regsets): Likewise.
9219 * linux-sparc-low.c (target_regsets): Likewise.
9220 * linux-xtensa-low.c (target_regsets): Likewise.
9221
9222 * linux-low.c: Include <sys/uio.h>.
9223 (regsets_fetch_inferior_registers): Support nt_type.
9224 (regsets_store_inferior_registers): Likewise.
9225 (linux_process_qsupported): New.
9226 (linux_target_ops): Add linux_process_qsupported.
9227
9228 * linux-low.h (regset_info): Add nt_type.
9229 (linux_target_ops): Add process_qsupported.
9230
9231 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9232 and <sys/uio.h>.
9233 (init_registers_i386_avx_linux): New.
9234 (init_registers_amd64_avx_linux): Likewise.
9235 (xmltarget_i386_linux_no_xml): Likewise.
9236 (xmltarget_amd64_linux_no_xml): Likewise.
9237 (PTRACE_GETREGSET): Likewise.
9238 (PTRACE_SETREGSET): Likewise.
9239 (x86_fill_xstateregset): Likewise.
9240 (x86_store_xstateregset): Likewise.
9241 (use_xml): Likewise.
9242 (x86_linux_update_xmltarget): Likewise.
9243 (x86_linux_process_qsupported): Likewise.
9244 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9245 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9246 init_registers_i386_linux here. Call
9247 x86_linux_update_xmltarget.
9248 (the_low_target): Add x86_linux_process_qsupported.
9249
9250 * server.c (handle_query): Call target_process_qsupported.
9251
9252 * target.h (target_ops): Add process_qsupported.
9253 (target_process_qsupported): New.
9254
9255 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9256
9257 * inferiors.c (add_thread): Set last_status kind to
9258 TARGET_WAITKIND_IGNORE.
9259 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9260 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9261 (linux_wait_1): Move `thread' local definition to block that uses
9262 it. Don't NULL initialize `event_child'.
9263 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9264 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9265 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9266
9267 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9268
9269 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9270 an extended waitstatus, or by a watchpoint.
9271 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9272 thread was stepping or has been stopped by a watchpoint.
9273
9274 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9275
9276 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9277 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9278 of another, then delete the previous, and validate all
9279 breakpoints.
9280 (validate_inserted_breakpoint): New.
9281 (delete_disabled_breakpoints): New.
9282 (validate_breakpoints): New.
9283 (check_mem_read): Validate breakpoints before trusting their
9284 shadow. Delete disabled breakpoints.
9285 (check_mem_write): Validate breakpoints before trusting they
9286 should be inserted. Delete disabled breakpoints.
9287 * mem-break.h (validate_breakpoints):
9288 * server.c (handle_query): Validate breakpoints when we see a
9289 qSymbol query.
9290
9291 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9292
9293 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9294 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9295 if we could tell there's a GDB breakpoint at stop_pc.
9296 (need_step_over_p): Don't do a step over if we find a GDB
9297 breakpoint at the resume PC.
9298
9299 * mem-break.c (struct raw_breakpoint): New.
9300 (enum bkpt_type): New type `gdb_breakpoint'.
9301 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9302 fields. New field `raw'.
9303 (find_raw_breakpoint_at): New.
9304 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9305 breakpoint instead.
9306 (set_breakpoint_at): Adjust.
9307 (delete_raw_breakpoint): New.
9308 (release_breakpoint): New.
9309 (delete_breakpoint): Rename to...
9310 (delete_breakpoint_1): ... this. Add proc parameter. Use
9311 release_breakpoint. Return ENOENT.
9312 (delete_breakpoint): Reimplement.
9313 (find_breakpoint_at): Delete.
9314 (find_gdb_breakpoint_at): New.
9315 (delete_breakpoint_at): Delete.
9316 (set_gdb_breakpoint_at): New.
9317 (delete_gdb_breakpoint_at): New.
9318 (gdb_breakpoint_here): New.
9319 (set_reinsert_breakpoint): Use release_breakpoint.
9320 (uninsert_breakpoint): Rename to ...
9321 (uninsert_raw_breakpoint): ... this.
9322 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9323 (reinsert_raw_breakpoint): Change parameter type to
9324 raw_breakpoint.
9325 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9326 instead.
9327 (check_breakpoints): Adjust. Use release_breakpoint.
9328 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9329 (breakpoint_inserted_here): Ditto.
9330 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9331 Don't trust the breakpoint's shadow if it is not inserted.
9332 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9333 (delete_all_breakpoints): Adjust.
9334 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9335 use delete_breakpoint_1.
9336
9337 * mem-break.h (breakpoints_supported): Delete declaration.
9338 (set_gdb_breakpoint_at): Declare.
9339 (gdb_breakpoint_here): Declare.
9340 (delete_breakpoint_at): Delete.
9341 (delete_gdb_breakpoint_at): Declare.
9342
9343 * server.h (struct raw_breakpoint): Forward declare.
9344 (struct process_info): New field `raw_breakpoints'.
9345
9346 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9347 breakpoints.
9348
9349 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9350
9351 * linux-low.c (status_pending_p_callback): Fix comment.
9352 (linux_wait_for_event_1): Move most of the internal breakpoint
9353 handling from here...
9354 (linux_wait_1): ... to here.
9355 (count_events_callback): New.
9356 (select_singlestep_lwp_callback): New.
9357 (select_event_lwp_callback): New.
9358 (cancel_breakpoints_callback): New.
9359 (select_event_lwp): New.
9360 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9361 priority to all LWPs that have had events that should be reported
9362 to the client. Cancel breakpoints when about to reporting the
9363 event to the client, not while stopping lwps. No longer cancel
9364 finished single-steps here.
9365 (cancel_finished_single_step): Delete.
9366 (cancel_finished_single_steps): Delete.
9367
9368 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9369
9370 * mem-break.c (enum bkpt_type): New.
9371 (struct breakpoint): New field `type'.
9372 (set_breakpoint_at): Change return type to struct breakpoint
9373 pointer. Set type to `other_breakpoint' by default.
9374 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9375 in the breakpoint list.
9376 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9377 (reinsert_breakpoint): Rename to ...
9378 (reinsert_raw_breakpoint): ... this.
9379 (reinsert_breakpoints_at): Adjust.
9380 * mem-break.h (struct breakpoint): Declare.
9381 (set_breakpoint_at): Change return type to struct breakpoint
9382 pointer.
9383
9384 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9385
9386 * server.c (handle_query): Assign, not compare.
9387
9388 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9389
9390 Teach linux gdbserver to step-over-breakpoints.
9391
9392 * linux-low.c (can_hardware_single_step): New.
9393 (supports_breakpoints): New.
9394 (handle_extended_wait): If stopping threads, read the stop pc of
9395 the new cloned LWP.
9396 (get_pc): New.
9397 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9398 low target doesn't support retrieving the PC.
9399 (add_lwp): Set last_resume_kind to resume_continue.
9400 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9401 (linux_attach): Don't clear stop_expected. Set the lwp's
9402 last_resume_kind to resume_stop.
9403 (linux_detach_one_lwp): Don't check for removed breakpoints.
9404 (check_removed_breakpoint): Delete.
9405 (status_pending_p): Rename to ...
9406 (status_pending_p_callback): ... this. Don't check for removed
9407 breakpoints. Don't consider threads that are stopped from GDB's
9408 perspective.
9409 (linux_wait_for_lwp): Always read the stop_pc here.
9410 (cancel_breakpoint): New.
9411 (step_over_bkpt): New global.
9412 (linux_wait_for_event_1): Implement stepping over breakpoints.
9413 (gdb_wants_lwp_stopped): New.
9414 (gdb_wants_all_stopped): New.
9415 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9416 single-step traps here. Store the thread's last reported target
9417 wait status.
9418 (send_sigstop): Don't clear stop_expected. Always set it,
9419 instead.
9420 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9421 (cancel_finished_single_step): New.
9422 (cancel_finished_single_steps): New.
9423 (wait_for_sigstop): Don't cancel finished single-step traps here.
9424 (linux_resume_one_lwp): Don't check for removed breakpoints.
9425 Don't set `step' on non-hardware step archs.
9426 (linux_set_resume_request): Ignore resume_stop requests if already
9427 stopping or stopped. Set the lwp's last_resume_kind.
9428 (resume_status_pending_p): Don't check for removed breakpoints.
9429 (need_step_over_p): New.
9430 (start_step_over): New.
9431 (finish_step_over): New.
9432 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9433 requests. Clear the thread's last reported target waitstatus.
9434 Don't use the `suspended' flag. Don't consider pending breakpoints.
9435 (linux_resume): Start a step-over if necessary.
9436 (proceed_one_lwp): New.
9437 (proceed_all_lwps): New.
9438 (unstop_all_lwps): New.
9439 * linux-low.h (struct lwp_info): Rewrite comment for the
9440 `suspended' flag. Add the `stop_pc' field. Delete the
9441 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9442 Add `'last_resume_kind' and `need_step_over' fields.
9443 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9444 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9445 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9446 (set_raw_breakpoint_at): New.
9447 (set_breakpoint_at): Rewrite to use it.
9448 (reinsert_breakpoint_handler): Delete.
9449 (set_reinsert_breakpoint): New.
9450 (reinsert_breakpoint_by_bp): Delete.
9451 (delete_reinsert_breakpoints): New.
9452 (uninsert_breakpoint): Rewrite.
9453 (uninsert_breakpoints_at): New.
9454 (reinsert_breakpoint): Rewrite.
9455 (reinsert_breakpoints_at): New.
9456 (check_breakpoints): Rewrite.
9457 (breakpoint_here): New.
9458 (breakpoint_inserted_here): New.
9459 (check_mem_read): Adjust.
9460 * mem-break.h (breakpoints_supported, breakpoint_here)
9461 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9462 (reinsert_breakpoint_by_bp): Delete declaration.
9463 (delete_reinsert_breakpoints): Declare.
9464 (reinsert_breakpoint): Delete declaration.
9465 (reinsert_breakpoints_at): Declare.
9466 (uninsert_breakpoint): Delete declaration.
9467 (uninsert_breakpoints_at): Declare.
9468 (check_breakpoints): Adjust prototype.
9469 * server.h: Adjust include order.
9470 (struct thread_info): Declare here. Add a `last_status' field.
9471
9472 2010-03-23 Michael Snyder <msnyder@vmware.com>
9473
9474 * server.c (crc32): New function.
9475 (handle_query): Add handling for 'qCRC:' request.
9476
9477 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9478
9479 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9480 lwp had been stopped by a watchpoint.
9481
9482 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9483
9484 * server.h (internal_error): Declare.
9485 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9486 * utils.c (internal_error): New function.
9487
9488 2010-03-15 Andreas Schwab <schwab@redhat.com>
9489
9490 * configure.srv: Fix typo setting srv_regobj.
9491
9492 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9493
9494 * linux-low.c (fetch_register): Avoid passing a non string literal
9495 format to `error'.
9496 (usr_store_inferior_registers): Ditto.
9497
9498 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9499
9500 * linux-low.c (linux_write_memory): Bail out early if peeking
9501 memory failed.
9502
9503 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9504
9505 * linux-low.h (struct lwp_info): New fields
9506 `stopped_by_watchpoint' and `stopped_data_address'.
9507 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9508 here, and cache them in the lwp object.
9509 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9510 directly.
9511 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9512 field.
9513 (linux_stopped_by_watchpoint): Rewrite.
9514 (linux_stopped_data_address): Rewrite.
9515
9516 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9517
9518 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9519 switching the current inferior, not before.
9520
9521 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9522
9523 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9524 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9525 i386-linux.c and amd64-linux.c.
9526 (reg-i386.o): Removed.
9527 (reg-i386.c): Likewise.
9528 (reg-i386-linux.o): Likewise.
9529 (reg-i386-linux.c): Likewise.
9530 (reg-x86-64.o): Likewise.
9531 (reg-x86-64.c): Likewise.
9532 (reg-x86-64-linux.o): Likewise.
9533 (reg-x86-64-linux.c): Likewise.
9534 (i386.o): New.
9535 (i386.c): Likewise.
9536 (i386-linux.o): Likewise.
9537 (i386-linux.c): Likewise.
9538 (amd64.o): Likewise.
9539 (amd64.c): Likewise.
9540 (amd64-linux.o): Likewise.
9541 (amd64-linux.c): Likewise.
9542
9543 * configure.srv (srv_i386_regobj): New.
9544 (srv_i386_linux_regobj): Likewise.
9545 (srv_amd64_regobj): Likewise.
9546 (srv_amd64_linux_regobj): Likewise.
9547 (srv_i386_32bit_xmlfiles): Likewise.
9548 (srv_i386_64bit_xmlfiles): Likewise.
9549 (srv_i386_xmlfiles): Likewise.
9550 (srv_amd64_xmlfiles): Likewise.
9551 (srv_i386_linux_xmlfiles): Likewise.
9552 (srv_amd64_linux_xmlfiles): Likewise.
9553 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9554 srv_xmlfiles to $srv_i386_xmlfiles.
9555 (i[34567]86-*-mingw32ce*): Likewise.
9556 (i[34567]86-*-mingw*): Likewise.
9557 (i[34567]86-*-nto*): Likewise.
9558 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9559 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9560 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9561 (x86_64-*-linux*): Likewise.
9562
9563 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9564 (init_registers_amd64_linux): New.
9565 (x86_arch_setup): Replace init_registers_x86_64_linux with
9566 init_registers_amd64_linux.
9567
9568 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9569
9570 * configure.ac: Check for libdl. If it is not available link against
9571 static libthread_db.
9572 * configure: Regenerate.
9573
9574 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9575
9576 PR9605
9577
9578 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9579 handing a read watchpoint.
9580 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9581
9582 2010-02-12 Doug Evans <dje@google.com>
9583
9584 * linux-low.c (linux_supports_tracefork_flag): Document.
9585 (linux_look_up_symbols): Add comment.
9586
9587 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9588
9589 * regcache.c (supply_register): Clear regcache if buf is NULL.
9590
9591 2010-02-02 Nicolas Roche <roche@sourceware.org>
9592 Joel Brobecker <brobecker@adacore.com>
9593
9594 * inferiors.c (find_inferior): Add function documentation.
9595 (unloaded_dll): Handle the case where the unloaded dll has not
9596 been previously registered in the dll list.
9597
9598 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9599
9600 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9601 (thumb2_breakpoint): New.
9602 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9603
9604 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9605
9606 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9607 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9608 breakpoints.
9609
9610 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9611
9612 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9613
9614 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9615
9616 * linux-s390-low.c (s390_collect_ptrace_register)
9617 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9618
9619 2010-01-21 Doug Evans <dje@google.com>
9620
9621 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9622 (PTRACE_ARG4_TYPE): New macro.
9623 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9624 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9625 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9626 (usr_store_inferior_registers): Ditto.
9627 (linux_read_memory, linux_write_memory): Ditto.
9628 (linux_test_for_tracefork): Ditto.
9629
9630 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9631 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9632
9633 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9634
9635 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9636 target.
9637
9638 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9639
9640 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9641 prototype to take a regcache. Adjust.
9642
9643 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9644
9645 * regcache.h (struct thread_info): Forward declare.
9646 (struct regcache): New.
9647 (new_register_cache): Adjust prototype.
9648 (get_thread_regcache): Declare.
9649 (free_register_cache): Adjust prototype.
9650 (registers_to_string, registers_from_string): Ditto.
9651 (supply_register, supply_register_by_name, collect_register)
9652 (collect_register_as_string, collect_register_by_name): Ditto.
9653 * regcache.c (struct inferior_regcache_data): Delete.
9654 (get_regcache): Rename to ...
9655 (get_thread_regcache): ... this. Adjust. Switch inferior before
9656 fetching registers.
9657 (regcache_invalidate_one): Adjust.
9658 (regcache_invalidate): Fix prototype.
9659 (new_register_cache): Return the new register cache.
9660 (free_register_cache): Change prototype.
9661 (realloc_register_cache): Adjust.
9662 (registers_to_string): Change prototype to take a regcache. Adjust.
9663 (registers_from_string): Ditto.
9664 (register_data): Ditto.
9665 (supply_register): Ditto.
9666 (supply_register_by_name): Ditto.
9667 (collect_register): Ditto.
9668 (collect_register_as_string): Ditto.
9669 (collect_register_by_name): Ditto.
9670 * server.c (process_serial_event): Adjust.
9671 * linux-low.h (regset_fill_func, regset_store_func): Change
9672 prototype.
9673 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9674 Change prototype.
9675 * linux-low.c (get_stop_pc): Adjust.
9676 (check_removed_breakpoint): Adjust.
9677 (linux_wait_for_event): Adjust.
9678 (linux_resume_one_lwp): Adjust.
9679 (fetch_register): Add regcache parameter. Adjust.
9680 (usr_store_inferior_registers): Ditto.
9681 (regsets_fetch_inferior_registers): Ditto.
9682 (regsets_store_inferior_registers): Ditto.
9683 (linux_fetch_registers, linux_store_registers): Ditto.
9684 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9685 regcache. Adjust.
9686 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9687 Ditto.
9688 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9689 prototype to take a regcache.
9690 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9691 * remote-utils.c (convert_ascii_to_int, outreg)
9692 (prepare_resume_reply): Change prototype to take a regcache.
9693 Adjust.
9694 * target.h (struct target_ops) <fetch_registers, store_registers>:
9695 Change prototype to take a regcache.
9696 (fetch_inferior_registers, store_inferior_registers): Change
9697 prototype to take a regcache. Adjust.
9698 * proc-service.c (ps_lgetregs): Adjust.
9699 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9700 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9701 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9702 take a regcache. Adjust.
9703 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9704 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9705 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9706 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9707 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9708 (cris_cannot_fetch_register):
9709 (cris_breakpoint_at): Change prototype to take a regcache.
9710 Adjust.
9711 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9712 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9713 to take a regcache. Adjust.
9714 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9715 Adjust.
9716 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9717 take a regcache. Adjust.
9718 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9719 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9720 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9721 * linux-mips-low.c (mips_get_pc):
9722 (mips_set_pc): Change prototype to take a regcache. Adjust.
9723 (mips_reinsert_addr): Adjust.
9724 (mips_collect_register): Change prototype to take a regcache.
9725 Adjust.
9726 (mips_supply_register):
9727 (mips_collect_register_32bit, mips_supply_register_32bit)
9728 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9729 (mips_store_fpregset): Ditto.
9730 * linux-ppc-low.c (ppc_supply_ptrace_register)
9731 (ppc_supply_ptrace_register): Ditto.
9732 (parse_spufs_run): Adjust.
9733 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9734 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9735 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9736 take a regcache. Adjust.
9737 * linux-s390-low.c (s390_collect_ptrace_register)
9738 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9739 (s390_set_pc): Change prototype to take a regcache. Adjust.
9740 (s390_arch_setup): Adjust.
9741 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9742 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9743 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9744 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9745 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9746 regcache. Adjust.
9747 (sparc_breakpoint_at): Adjust.
9748 * linux-xtensa-low.c (xtensa_fill_gregset):
9749 (xtensa_store_gregset):
9750 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9751 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9752 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9753 prototype to take a regcache. Adjust.
9754 * win32-arm-low.c (arm_fetch_inferior_register)
9755 (arm_store_inferior_register): Change prototype to take a
9756 regcache. Adjust.
9757 * win32-i386-low.c (i386_fetch_inferior_register)
9758 (i386_store_inferior_register): Change prototype to take a
9759 regcache. Adjust.
9760 * win32-low.c (child_fetch_inferior_registers)
9761 (child_store_inferior_registers): Change prototype to take a
9762 regcache. Adjust.
9763 (win32_wait): Adjust.
9764 (win32_fetch_inferior_registers): Change prototype to take a
9765 regcache. Adjust.
9766 (win32_store_inferior_registers): Adjust.
9767 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9768 store_inferior_register>: Change prototype to take a regcache.
9769
9770 2010-01-20 Doug Evans <dje@google.com>
9771
9772 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9773 #ifdef.
9774 (linux_wait_for_event1, linux_init_signals): Ditto.
9775 (W_STOPCODE): Provide definition if missing.
9776
9777 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9778
9779 * linux-low.c (linux_core_of_thread): New.
9780 (compare_ints, show_process, list_threads): New.
9781 (linux_qxfer_osdata): Report threads and cores.
9782 (linux_target_op): Register linux_core_of_thread.
9783 * remote-utils.c (prepare_resume_reply): Report the core.
9784 (buffer_xml_printf): Support %d specifier.
9785 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9786 New.
9787 (handle_query): Handle qXfer:threads. Announce availability
9788 thereof.
9789 * target.h (struct target_ops): New field core_of_thread.
9790
9791 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9792
9793 * Makefile.in (clean): Remove new generated files.
9794 (reg-s390.o, reg-s390.c): Remove rules.
9795 (reg-s390x.o, reg-s390x.c): Likewise.
9796 (s390-linux32.o, s390-linux32.c): Add rules.
9797 (s390-linux64.o, s390-linux64.c): Likewise.
9798 (s390x-linux64.o, s390x-linux64.c): Likewise.
9799 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9800 * linux-s390-low.c: Include <elf.h>.
9801 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9802 (init_registers_s390): Remove prototype.
9803 (init_registers_s390x): Likewise.
9804 (init_registers_s390_linux32): Add prototype.
9805 (init_registers_s390_linux64): Likewise.
9806 (init_registers_s390x_linux64): Likewise.
9807 (s390_num_regs_3264): New define.
9808 (s390_regmap_3264): New global variable.
9809 (s390_cannot_fetch_register): Remove obsolete check.
9810 (s390_cannot_store_register): Likewise.
9811 (s390_collect_ptrace_register): Handle upper/lower register halves.
9812 (s390_supply_ptrace_register): Likewise.
9813 (s390_fill_gregset): Update to register number changes.
9814 (s390_get_hwcap): New routine.
9815 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9816 Install appropriate regmap and register set.
9817
9818 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9819
9820 * server.c (gdbserver_version): Update copyright year to 2010.
9821 * gdbreplay.c (gdbreplay_version): Likewise.
9822
9823 2009-12-28 Doug Evans <dje@google.com>
9824
9825 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9826 elf/external.h. Include <elf.h> instead but only if necessary.
9827
9828 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9829
9830 * linux-low.c (linux_remove_process): Remove `detaching'
9831 parameter. Don't release/detach from thread_db here.
9832 (linux_kill): Release/detach from thread_db here, ...
9833 (linux_detach): ... and here, before actually detaching.
9834 (linux_wait_1): ... and here, when a process exits.
9835 * thread-db.c (any_thread_of): New.
9836 (thread_db_free): Switch the current inferior to a thread of the
9837 passed in process.
9838
9839 2009-12-21 Doug Evans <dje@google.com>
9840
9841 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9842
9843 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9844 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9845 warning ifndef __NR_tkill. Move setting of errno there too.
9846 Delete unnecessary resetting of errno after syscall.
9847 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9848
9849 * configure.ac: Check for dladdr.
9850 * config.in: Regenerate.
9851 * configure: Regenerate.
9852 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9853 (try_thread_db_load): Update.
9854
9855 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9856
9857 2009-12-18 Doug Evans <dje@google.com>
9858
9859 * event-loop.c: Include unistd.h if it exists.
9860
9861 * linux-low.c (my_waitpid): Move definition away from being in
9862 between linux_tracefork_child/linux_test_for_tracefork.
9863
9864 * gdb_proc_service.h (psaddr_t): Fix type.
9865 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9866 signature to match glibc.
9867
9868 2009-12-16 Doug Evans <dje@google.com>
9869
9870 * linux-low.c (linux_read_memory): Fix argument to read.
9871
9872 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9873
9874 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9875 events, don't leave current_inferior pointing at null.
9876
9877 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9878
9879 * win32-low.c (LOG): Delete.
9880 (OUTMSG): Output to stderr.
9881 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9882 on compile time LOG macro.
9883 (win32_wait): Fix debug output.
9884
9885 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9886
9887 * win32-low.c (win32_add_one_solib): If the dll name is
9888 "ntdll.dll", prepend the system directory to the dll path.
9889
9890 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9891
9892 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9893
9894 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9895 Vladimir Prus <vladimir@codesourcery.com>
9896
9897 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9898 * configure.ac: Check for __mcoldfire__ and set
9899 gdb_cv_m68k_is_coldfire.
9900 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9901 reg-cf.o and reg-m68k.o.
9902 * configure: Regenerated.
9903
9904 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9905
9906 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9907 Pass it to thread_db_free.
9908 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9909 proper `detaching' argument to linux_remove_process.
9910 * linux-low.h (thread_db_free): Add `detaching' parameter.
9911 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9912 to thread_db_free.
9913 (thread_db_free): Add `detaching' parameter. Only
9914 call td_ta_clear_event if detaching from process.
9915
9916 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9917
9918 * thread-db.c (thread_db_free): Fix typo.
9919
9920 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9921
9922 PR gdb/10838
9923 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9924
9925 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9926
9927 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9928 with an i686 compiler.
9929 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9930 needed.
9931 * configure: Rebuilt.
9932
9933 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9934
9935 PR gdb/10783
9936
9937 * server.c (handle_search_memory_1): Correct read_addr initialization
9938 in loop for searching subsequent chunks.
9939
9940 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9941
9942 * configure.ac: New --with-libthread-db option.
9943 * thread-db.c: Allow direct dependence on libthread_db.
9944 (thread_db_free): Adjust.
9945 * config.in: Regenerate.
9946 * configure: Likewise.
9947
9948 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9949
9950 PR gdb/10757
9951 * thread-db.c (attach_thread): New function.
9952 (maybe_attach_thread): Return success/failure.
9953 (find_new_threads_callback): Adjust.
9954 (thread_db_find_new_threads): Loop until no new threads.
9955
9956 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9957
9958 * proc-service.c (ps_lgetregs): Formatting.
9959
9960 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9961
9962 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9963 * configure.ac: Adjust.
9964 * linux-low.h (struct process_info_private): Move members to struct
9965 thread_db.
9966 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9967 * linux-low.c (linux_remove_process): Adjust.
9968 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9969 * server.c (handle_query): Move code ...
9970 (handle_monitor_command): ... here. New function.
9971 * target.h (struct target_ops): New member.
9972 * thread-db.c (struct thread_db): New.
9973 (libthread_db_search_path): New variable.
9974 (thread_db_create_event, thread_db_enable_reporting)
9975 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9976 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9977 (try_thread_db_load_1, dladdr_to_soname): New functions.
9978 (try_thread_db_load, thread_db_load_search): New functions.
9979 (thread_db_init): Search for libthread_db.
9980 (thread_db_free): New function.
9981 (thread_db_handle_monitor_command): Likewise.
9982 * config.in: Regenerate.
9983 * configure: Regenerate.
9984
9985 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9986
9987 * spu-low.c (spu_kill): Wait for inferior to terminate.
9988 Call clear_inferiors.
9989 (spu_detach): Call clear_inferiors.
9990
9991 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9992
9993 * aclocal.m4: Regenerate.
9994 * config.in: Likewise.
9995 * configure: Likewise.
9996
9997 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9998
9999 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10000 (parse_spufs_run): New function.
10001 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10002 (ppc_breakpoint_at): Handle SPU breakpoints.
10003
10004 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10005
10006 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10007 (SPUFS_MAGIC): Define.
10008 (spu_enumerate_spu_ids): New function.
10009 (linux_qxfer_spu): New function.
10010 (linux_target_ops): Install linux_qxfer_spu.
10011
10012 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10013
10014 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10015 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10016 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10017 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10018 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10019 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10020 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10021 (init_registers_powerpc_cell32l): Add prototype.
10022 (init_registers_powerpc_cell64l): Likewise.
10023 (ppc_arch_setup): Detect Cell/B.E. architecture.
10024
10025 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10026
10027 * Makefile.in (datarootdir): New variable.
10028
10029 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10030
10031 * linux-low.c (linux_write_memory): Update debugging output.
10032 * Makefile.in (clean): Add new descriptions.
10033 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10034 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10035 * configure.srv: Add new files for arm*-*-linux*.
10036 * linux-arm-low.c: Add new declarations.
10037 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10038 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10039 (HWCAP_VFPv3D16): New.
10040 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10041 instead of __IWMMXT__.
10042 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10043 (arm_arch_setup): New.
10044 (target_regsets): Remove #ifdef. Add VFP regset.
10045 (the_low_target): Use arm_arch_setup.
10046
10047 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10048
10049 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10050 the main thread again.
10051
10052 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10053
10054 Adding Neutrino gdbserver.
10055 * configure: Regenerated.
10056 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10057 * configure.srv (i[34567]86-*-nto*): New target.
10058 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10059 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10060 (nto_comctrl) [__QNX__]: New function.
10061 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10062
10063 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10064
10065 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10066 srv_tgtobj.
10067
10068 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10069 Pedro Alves <pedro@codesourcery.com>
10070
10071 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10072 don't support CONTEXT_EXTENDED_REGISTERS.
10073 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10074 (the_low_target): Install them.
10075 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10076 failing with ERROR_PIPE_NOT_CONNECTED.
10077
10078 2009-06-30 Doug Evans <dje@google.com>
10079 Pierre Muller <muller@ics.u-strasbg.fr>
10080
10081 Add h/w watchpoint support to x86-linux, win32-i386.
10082 * Makefile.in (SFILES): Add i386-low.c
10083 (i386_low_h): Define.
10084 (i386-low.o): Add dependencies.
10085 (linux-x86-low.o): Add i386-low.h dependency.
10086 (win32-i386-low.o): Ditto.
10087 * i386-low.c: New file.
10088 * i386-low.h: New file.
10089 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10090 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10091 * linux-low.c (linux_add_process): Initialize arch_private.
10092 (linux_remove_process): Free arch_private.
10093 (add_lwp): Initialize arch_private.
10094 (delete_lwp): Free arch_private.
10095 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10096 provided.
10097 * linux-low.h (process_info_private): New member arch_private.
10098 (lwp_info): New member arch_private.
10099 (linux_target_ops): New members new_process, new_thread,
10100 prepare_to_resume.
10101 (ptid_of): New macro.
10102 * linux-x86-low.c: Include stddef.h, i386-low.h.
10103 (arch_process_info): New struct.
10104 (arch_lwp_info): New struct.
10105 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10106 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10107 (i386_dr_low_get_status): New function.
10108 (x86_insert_point, x86_remove_point): New functions.
10109 (x86_stopped_by_watchpoint): New function.
10110 (x86_stopped_data_address): New function.
10111 (x86_linux_new_process, x86_linux_new_thread): New functions.
10112 (x86_linux_prepare_to_resume): New function.
10113 (the_low_target): Add entries for insert_point, remove_point,
10114 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10115 prepare_to_resume.
10116 * server.c (debug_hw_points): New global.
10117 (monitor_show_help): Document set debug-hw-points.
10118 (handle_query): Process "set debug-hw-points".
10119 * server.h (debug_hw_points): Declare.
10120 (paddress): Declare.
10121 * utils.c (NUMCELLS, CELLSIZE): New macros.
10122 (get_sell, xsnprintf, paddress): New functions.
10123 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10124 remove_point, stopped_by_watchpoint, stopped_data_address.
10125 * win32-i386-low.c: Include i386-low.h.
10126 (debug_reg_state): Replaces dr.
10127 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10128 (i386_dr_low_get_status): New function.
10129 (i386_insert_point, i386_remove_point): New functions.
10130 (i386_stopped_by_watchpoint): New function.
10131 (i386_stopped_data_address): New function.
10132 (i386_initial_stuff): Update.
10133 (get_thread_context,set_thread_context,i386_thread_added): Update.
10134 (the_low_target): Add entries for insert_point,
10135 remove_point, stopped_by_watchpoint, stopped_data_address.
10136 * win32-low.c (win32_insert_watchpoint): New function.
10137 (win32_remove_watchpoint): New function.
10138 (win32_stopped_by_watchpoint): New function.
10139 (win32_stopped_data_address): New function.
10140 (win32_target_ops): Add entries for insert_watchpoint,
10141 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10142 * win32-low.h (win32_target_ops): New members insert_point,
10143 remove_point, stopped_by_watchpoint, stopped_data_address.
10144
10145 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10146
10147 * server.c (process_serial_event): Re-return unsupported, not
10148 error, if the type isn't recognized. Re-allow supporting only
10149 insert or remove packets. Also call require_running for
10150 breakpoints. Add missing break statement to default case. Tidy.
10151 * target.h (struct target_ops): Rename insert_watchpoint to
10152 insert_point, and remove_watchpoint to remove_point.
10153
10154 * linux-low.h (struct linux_target_ops): Likewise.
10155 * linux-low.c (linux_insert_watchpoint): Rename to ...
10156 (linux_insert_point): ... this. Adjust.
10157 (linux_remove_watchpoint): Rename to ...
10158 (linux_remove_point): ... this. Adjust.
10159 (linux_target_ops): Adjust.
10160 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10161 (cris_insert_point): ... this.
10162 (cris_remove_watchpoint): Rename to ...
10163 (cris_remove_point): ... this.
10164 (the_low_target): Adjust.
10165
10166 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10167
10168 * server.c (handle_v_kill): Pass signal_pid to
10169 kill_inferior if multi_process is zero.
10170
10171 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10172
10173 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10174 * target.h (target_ops): Comment for *_watchpoint to make it clear
10175 the functions can get types '0' and '1'.
10176
10177 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10178
10179 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10180 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10181 * regcache.c (get_regcache): Likewise.
10182 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10183 * win32-low.c (child_fetch_inferior_registers): Remove check for
10184 regno 0.
10185
10186 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10187 Pedro Alves <pedro@codesourcery.com>
10188
10189 * target.h (struct target_ops) <supports_multi_process>: New
10190 callback.
10191 (target_supports_multi_process): New.
10192 * server.c (handle_query): Even if GDB reports support, only
10193 enable multi-process if the target also supports it. Report
10194 multi-process support only if the target backend supports it.
10195 * linux-low.c (linux_supports_multi_process): New function.
10196 (linux_target_ops): Install it as target_supports_multi_process
10197 callback.
10198
10199 2009-05-24 Doug Evans <dje@google.com>
10200
10201 Global renaming of find_thread_pid to find_thread_ptid.
10202 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10203 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10204 All callers updated.
10205
10206 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10207 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10208 directly.
10209
10210 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10211 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10212 (linux_resume_one_lwp): Ditto.
10213
10214 2009-05-23 Doug Evans <dje@google.com>
10215
10216 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10217 from struct inferior_list_entry * to struct lwp_info *.
10218 All callers updated.
10219
10220 2009-05-13 Doug Evans <dje@google.com>
10221
10222 * linux-x86-low.c: Don't include assert.h.
10223 (x86_siginfo_fixup): Use fatal, not assert.
10224 (x86_arch_setup): Fix comment.
10225
10226 2009-05-12 Doug Evans <dje@google.com>
10227
10228 Biarch support for i386/amd64 gdbserver.
10229 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10230 Add linux-x86-low.c.
10231 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10232 (linux-x86-low.o): Add.
10233 * linux-x86-64-low.c: Delete.
10234 * linux-i386-low.c: Delete.
10235 * linux-x86-low.c: New file.
10236 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10237 linux-x86-low.o.
10238 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10239 linux-x86-low.o.
10240 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10241 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10242 (linux_child_pid_to_exec_file): New function.
10243 (elf_64_header_p, elf_64_file_p): New functions.
10244 (siginfo_fixup): New function.
10245 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10246 give target a chance to convert layout.
10247 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10248 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10249
10250 2009-05-07 Doug Evans <dje@google.com>
10251
10252 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10253 (regsets_store_inferior_registers): Ditto.
10254
10255 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10256
10257 PR server/10048
10258
10259 * linux-low.c (must_set_ptrace_flags): Delete.
10260 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10261 of the global.
10262 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10263 `lwp->must_set_ptrace_flags' instead.
10264 (linux_wait_for_event_1): Set ptrace options here.
10265 (linux_wait_1): ... not here.
10266
10267 2009-04-30 Doug Evans <dje@google.com>
10268
10269 * inferiors.c (started_inferior_callback): New function.
10270 (attached_inferior_callback): New function.
10271 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10272 * server.c (print_started_pid, print_attached_pid): New functions.
10273 (detach_or_kill_for_exit): New function.
10274 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10275 * server.h (have_started_inferiors_p): Declare.
10276 (have_attached_inferiors_p): Declare.
10277
10278 * inferiors.c (remove_process): Fix memory leak, free process.
10279 * linux-low.c (linux_remove_process): New function.
10280 (linux_kill): Call it instead of remove_process.
10281 (linux_detach, linux_wait_1): Ditto.
10282
10283 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10284
10285 * configure.srv: Add x86 Windows CE target.
10286
10287 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10288
10289 * inferiors.c (get_thread_process): Make global.
10290 * server.h (get_thread_process): Add prototype.
10291 * thread-db.c (find_one_thread): Use get_thread_process
10292 instead of current_process.
10293 (thread_db_get_tls_address): Do not crash if called when
10294 thread layer is not yet initialized.
10295
10296 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10297
10298 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10299 * spu-low.c (current_tid): Rename to ...
10300 (current_ptid): ... this.
10301 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10302 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10303 ptid_get_lwp (current_ptid) instead of current_tid.
10304 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10305 instead of current_tid. Use find_process_pid to verify pid
10306 argument is valid. Pass proper argument to remove_process.
10307 (spu_thread_alive): Compare current_ptid instead of current_tid.
10308 (spu_resume): Likewise.
10309
10310 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10311
10312 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10313 variable.
10314
10315 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10316
10317 Implement the multiprocess extensions, and add linux multiprocess
10318 support.
10319
10320 * server.h (ULONGEST): Declare.
10321 (struct ptid, ptid_t): New.
10322 (minus_one_ptid, null_ptid): Declare.
10323 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10324 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10325 (struct inferior_list_entry): Change `id' type from unsigned from
10326 to ptid_t.
10327 (struct sym_cache, struct breakpoint, struct
10328 process_info_private): Forward declare.
10329 (struct process_info): Declare.
10330 (current_process): Declare.
10331 (all_processes): Declare.
10332 (initialize_inferiors): Declare.
10333 (add_thread): Adjust to use ptid_t.
10334 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10335 (add_process, remove_process, find_thread_pid): Declare.
10336 (find_inferior_id): Adjust to use ptid_t.
10337 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10338 (multi_process): Declare.
10339 (push_event): Adjust to use ptid_t.
10340 (read_ptid, write_ptid): Declare.
10341 (prepare_resume_reply): Adjust to use ptid_t.
10342 (clear_symbol_cache): Declare.
10343 * inferiors.c (all_processes): New.
10344 (null_ptid, minus_one_ptid): New.
10345 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10346 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10347 (add_thread): Change unsigned long to ptid. Remove gdb_id
10348 parameter. Adjust.
10349 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10350 (gdb_id_to_thread): Rename to ...
10351 (find_thread_pid): ... this. Change unsigned long to ptid.
10352 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10353 (loaded_dll, pull_pid_from_list): Adjust.
10354 (add_process, remove_process, find_process_pid)
10355 (get_thread_process, current_process, initialize_inferiors): New.
10356 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10357 (struct target_waitstatus) <related_pid>: Ditto.
10358 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10359 return type to int.
10360 (struct target_ops) <join>: Add `pid' argument.
10361 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10362 (struct target_ops) <wait>: Add `ptid' field. Change return type
10363 to ptid.
10364 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10365 (mywait): Add `ptid' argument. Change return type to ptid_t.
10366 (target_pid_to_str): Declare.
10367 * target.c (set_desired_inferior): Adjust to use ptids.
10368 (mywait): Add new `ptid' argument. Adjust.
10369 (target_pid_to_str): New.
10370 * mem-break.h (free_all_breakpoints): Declare.
10371 * mem-break.c (breakpoints): Delelete.
10372 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10373 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10374 to use per-process breakpoint list.
10375 (free_all_breakpoints): New.
10376 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10377 (symbol_cache, all_symbols_looked_up): Delete.
10378 (hexchars): New.
10379 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10380 read_ptid): New.
10381 (prepare_resume_reply): Change ptid argument's type from unsigned
10382 long to ptid_t. Adjust. Implement W;process and X;process.
10383 (free_sym_cache, clear_symbol_cache): New.
10384 (look_up_one_symbol): Adjust to per-process symbol cache. *
10385 * server.c (cont_thread, general_thread, step_thread): Change type
10386 to ptid_t.
10387 (attached): Delete.
10388 (multi_process): New.
10389 (last_ptid): Change type to ptid_t.
10390 (struct vstop_notif) <ptid>: Change type to ptid_t.
10391 (queue_stop_reply, push_event): Change `ptid' argument's type to
10392 ptid_t.
10393 (discard_queued_stop_replies): Add `pid' argument.
10394 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10395 changes. Don't reference the `attached' global.
10396 (attach_inferior): Adjust to mywait interface changes.
10397 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10398 features. Handle and report "multiprocess+". Handle
10399 "qAttached:PID".
10400 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10401 changes.
10402 (handle_v_kill): New.
10403 (handle_v_stopped): Adjust to use target_pid_to_str.
10404 (handle_v_requests): Allow multiple attaches and runs when
10405 multiprocess extensions are in effect. Handle "vKill".
10406 (myresume): Adjust to use ptids.
10407 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10408 (handle_status): Adjust to discard_queued_stop_replies interface
10409 change.
10410 (first_thread_of, kill_inferior_callback)
10411 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10412 (main): Call initialize_inferiors. Adjust to use ptids, killing
10413 and detaching from all inferiors. Handle multiprocess packet
10414 variants.
10415 * linux-low.h: Include gdb_proc_service.h.
10416 (struct process_info_private): New.
10417 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10418 <lwpid_of>: Use ptid_get_lwp.
10419 (get_lwp_thread): Adjust.
10420 (struct lwp_info): Add `dead' member.
10421 (find_lwp_pid): Declare.
10422 * linux-low.c (thread_db_active): Delete.
10423 (new_inferior): Adjust comment.
10424 (inferior_pid): Delete.
10425 (linux_add_process): New.
10426 (handle_extended_wait): Adjust.
10427 (add_lwp): Change unsigned long to ptid.
10428 (linux_create_inferior): Add process to processes table. Adjust
10429 to use ptids. Don't set new_inferior here.
10430 (linux_attach_lwp): Rename to ...
10431 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10432 it. Adjust to use ptids.
10433 (linux_attach_lwp): New.
10434 (linux_attach): Add process to processes table. Don't set
10435 new_inferior here.
10436 (struct counter): New.
10437 (second_thread_of_pid_p, last_thread_of_process_p): New.
10438 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10439 multiple processes.
10440 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10441 processes. Remove process from process table.
10442 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10443 to multiple processes.
10444 (any_thread_of): New.
10445 (linux_detach): Add `pid' argument, and handle it. Remove process
10446 from processes table.
10447 (linux_join): Add `pid' argument. Handle it.
10448 (linux_thread_alive): Change unsighed long argument to ptid_t.
10449 Consider dead lwps as not being alive.
10450 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10451 threads we're not interested in.
10452 (same_lwp, find_lwp_pid): New.
10453 (linux_wait_for_lwp): Change `pid' argument's type from int to
10454 ptid_t. Adjust.
10455 (linux_wait_for_event): Rename to ...
10456 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10457 from int to ptid_t. Adjust.
10458 (linux_wait_for_event): New.
10459 (linux_wait_1): Add `ptid' argument. Change return type to
10460 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10461 that exit from the process table.
10462 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10463 Adjust.
10464 (mark_lwp_dead): New.
10465 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10466 stopping all threads, mark its main lwp as dead.
10467 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10468 ptids.
10469 (fetch_register, usr_store_inferior_registers)
10470 (regsets_fetch_inferior_registers)
10471 (regsets_store_inferior_registers, linux_read_memory)
10472 (linux_write_memory): Inline `inferior_pid'.
10473 (linux_look_up_symbols): Adjust to use per-process
10474 `thread_db_active'.
10475 (linux_request_interrupt): Adjust to use ptids.
10476 (linux_read_auxv): Inline `inferior_pid'.
10477 (initialize_low): Don't reference thread_db_active.
10478 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10479 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10480 (ps_getpid): Return the pid of the current inferior.
10481 * thread-db.c (proc_handle, thread_agent): Delete.
10482 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10483 per-process data.
10484 (find_one_thread): Change argument type to ptid_t. Adjust to
10485 per-process data.
10486 (maybe_attach_thread): Adjust to per-process data and ptids.
10487 (thread_db_find_new_threads): Ditto.
10488 (thread_db_init): Ditto.
10489 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10490 processes table. Adjust to use ptids.
10491 (spu_kill, spu_detach): Adjust interface. Remove process from
10492 processes table.
10493 (spu_join, spu_thread_alive): Adjust interface.
10494 (spu_wait): Adjust interface. Remove process from processes
10495 table. Adjust to use ptids.
10496 * win32-low.c (current_inferior_tid): Delete.
10497 (current_inferior_ptid): New.
10498 (debug_event_ptid): New.
10499 (thread_rec): Take a ptid. Adjust.
10500 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10501 (child_delete_thread): Ditto.
10502 (do_initial_child_stuff): Add `attached' argument. Add process to
10503 processes table.
10504 (child_fetch_inferior_registers, child_store_inferior_registers):
10505 Adjust.
10506 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10507 (win32_attach): Pass 1 to do_initial_child_stuff.
10508 (win32_kill): Adjust interface. Remove process from processes
10509 table.
10510 (win32_detach): Ditto.
10511 (win32_join): Adjust interface.
10512 (win32_thread_alive): Take a ptid.
10513 (win32_resume): Adjust to use ptids.
10514 (get_child_debug_event): Ditto.
10515 (win32_wait): Adjust interface. Remove exiting process from
10516 processes table.
10517
10518 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10519
10520 Non-stop mode support.
10521
10522 * server.h (non_stop): Declare.
10523 (gdb_client_data, handler_func): Declare.
10524 (delete_file_handler, add_file_handler, start_event_loop):
10525 Declare.
10526 (handle_serial_event, handle_target_event, push_event)
10527 (putpkt_notif): Declare.
10528 * target.h (enum resume_kind): New.
10529 (struct thread_resume): Replace `step' field by `kind' field.
10530 (TARGET_WNOHANG): Define.
10531 (struct target_ops) <wait>: Add `options' argument.
10532 <supports_non_stop, async, start_non_stop>: New fields.
10533 (target_supports_non_stop, target_async): New.
10534 (start_non_stop): Declare.
10535 (mywait): Add `options' argument.
10536 * target.c (mywait): Add `options' argument. Print child exit
10537 notifications here.
10538 (start_non_stop): New.
10539 * server.c (non_stop, own_buf, mem_buf): New globals.
10540 (struct vstop_notif): New.
10541 (notif_queue): New global.
10542 (queue_stop_reply, push_event, discard_queued_stop_replies)
10543 (send_next_stop_reply): New.
10544 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10545 interface changes.
10546 (attach_inferior): In non-stop mode, don't wait for the target
10547 here.
10548 (handle_general_set): Handle QNonStop.
10549 (handle_query): When handling qC, return the current general
10550 thread, instead of the first thread of the list.
10551 (handle_query): If the backend supports non-stop mode, include
10552 QNonStop+ in the qSupported query response.
10553 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10554 and non-stop mode.
10555 (handle_v_attach, handle_v_run): Handle non-stop mode.
10556 (handle_v_stopped): New.
10557 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10558 (myresume): Adjust to use resume_kind. Handle non-stop.
10559 (queue_stop_reply_callback): New.
10560 (handle_status): Handle non-stop mode.
10561 (main): Clear non_stop flag on reconnection. Use the event-loop.
10562 Refactor serial protocol handling from here ...
10563 (process_serial_event): ... to this new function. When GDB
10564 selects any thread, select one here. In non-stop mode, wait until
10565 GDB acks all pending events before exiting.
10566 (handle_serial_event, handle_target_event): New.
10567 * remote-utils.c (remote_open): Install remote_desc in the event
10568 loop.
10569 (remote_close): Remove remote_desc from the event loop.
10570 (putpkt_binary): Rename to...
10571 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10572 (putpkt_binary): New as wrapper around putpkt_binary_1.
10573 (putpkt_notif): New.
10574 (prepare_resume_reply): In non-stop mode, don't change the
10575 general_thread.
10576 * event-loop.c: New.
10577 * Makefile.in (OBJ): Add event-loop.o.
10578 (event-loop.o): New rule.
10579
10580 * linux-low.h (pid_of): Moved here.
10581 (lwpid_of): New.
10582 (get_lwp_thread): Use lwpid_of.
10583 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10584 * linux-low.c (pid_of): Delete.
10585 (inferior_pid): Use lwpid_of.
10586 (linux_event_pipe): New.
10587 (target_is_async_p): New.
10588 (delete_lwp): New.
10589 (handle_extended_wait): Use lwpid_of.
10590 (add_lwp): Don't set lwpid field.
10591 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10592 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10593 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10594 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10595 first. Adjust to linux_wait_for_event interface changes. Use
10596 lwpid_of.
10597 (linux_detach): Don't delete the main lwp here.
10598 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10599 (status_pending_p): Don't consider explicitly suspended lwps.
10600 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10601 pointer. Add OPTIONS argument. Change return type to int. Use
10602 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10603 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10604 pointer. Add status pointer argument. Return a pid instead of a
10605 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10606 changes. In non-stop mode, don't switch to a random thread.
10607 (linux_wait): Rename to...
10608 (linux_wait_1): ... this. Add target_options argument, and handle
10609 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10610 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10611 clean exit and signal exit code. Don't stop all threads in
10612 non-stop mode. In all-stop mode, only stop all threads when
10613 reporting a stop to GDB. Handle explicit thread stop requests.
10614 (async_file_flush, async_file_mark): New.
10615 (linux_wait): New.
10616 (send_sigstop): Use lwpid_of.
10617 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10618 interface changes. In non-stop mode, don't switch to a random
10619 thread.
10620 (linux_resume_one_lwp): Use lwpid_of.
10621 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10622 (linux_resume_one_thread): ... this. Handle resume_stop. In
10623 non-stop mode, don't look for pending flag in all threads.
10624 (resume_status_pending_p): Don't consider explicitly suspended
10625 threads.
10626 (my_waitpid): Reimplement. Emulate __WALL.
10627 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10628 Use lwpid_of.
10629 (sigchld_handler, linux_supports_non_stop, linux_async)
10630 (linux_start_non_stop): New.
10631 (linux_target_ops): Register linux_supports_non_stop, linux_async
10632 and linux_start_non_stop.
10633 (initialize_low): Install SIGCHLD handler.
10634 * thread-db.c (thread_db_create_event, find_one_thread)
10635 (thread_db_get_tls_address): Use lwpid_of.
10636 * win32-low.c (win32_detach): Adjust to use resume_kind.
10637 (win32_wait): Add `options' argument.
10638 * spu-low.c (spu_resume): Adjust to use resume_kind.
10639 (spu_wait): Add `options' argument.
10640
10641 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10642
10643 Decouple target code from remote protocol.
10644
10645 * target.h (enum target_waitkind): New.
10646 (struct target_waitstatus): New.
10647 (struct target_ops) <wait>: Return an unsigned long. Take a
10648 target_waitstatus pointer instead of a char pointer.
10649 (mywait): Likewise.
10650 * target.c (mywait): Change prototype to return an unsigned long.
10651 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10652 * server.h (thread_from_wait, old_thread_from_wait): Delete
10653 declarations.
10654 (prepare_resume_reply): Change prototype to take a
10655 target_waitstatus.
10656 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10657 (last_status, last_ptid): New.
10658 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10659 pid instead of a signal.
10660 (attach_inferior): Remove "status" and "signal" parameters.
10661 Adjust.
10662 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10663 not as an address.
10664 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10665 (handle_v_requests, myresume): Remove "status" and "signal"
10666 parameters. Adjust.
10667 (handle_status): New.
10668 (main): Delete local `status'. Adjust.
10669 * remote-utils.c: Include target.h.
10670 (prepare_resume_reply): Change prototype to take a
10671 target_waitstatus. Adjust.
10672
10673 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10674 interface.
10675 * spu-low.c (spu_wait): Adjust.
10676 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10677 Delete.
10678 (win32_wait): Adjust.
10679
10680 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10681
10682 * target.h (struct thread_resume): Delete leave_stopped member.
10683 (struct target_ops): Add a `n' argument to the `resume' callback.
10684 * server.c (start_inferior): Adjust.
10685 (handle_v_cont, myresume): Adjust.
10686 * linux-low.c (check_removed_breakpoint): Adjust to resume
10687 interface change, and to removed leave_stopped field.
10688 (resume_ptr): Delete.
10689 (struct thread_resume_array): New.
10690 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10691 resume interface change.
10692 (linux_continue_one_thread, linux_queue_one_thread)
10693 (resume_status_pending_p): Check if the resume field is NULL
10694 instead of checking the leave_stopped member.
10695 (linux_resume): Adjust to the target resume interface change.
10696 * spu-low.c (spu_resume): Adjust to the target resume interface
10697 change.
10698 * win32-low.c (win32_detach, win32_resume): Ditto.
10699
10700 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10701
10702 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10703 flag.
10704 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10705 pending.
10706 (linux_continue_one_thread): Only preserve the stepping flag if
10707 there's a pending breakpoint.
10708
10709 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10710
10711 * server.c (main): After the inferior having exited, call
10712 remote_close before exiting gdbserver.
10713
10714 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10715
10716 Fix size of FPSCR in Power 7 processors.
10717 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10718 (PPC_FEATURE_HAS_DFP): New #define.
10719 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10720 size of the FPSCR.
10721
10722 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10723
10724 * server.c (handle_query) Whitespace and formatting.
10725
10726 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10727
10728 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10729 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10730 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10731 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10732 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10733 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10734 Makefile.in, configure.ac: Fix whitespace throughout.
10735 * configure: Regenerate.
10736
10737 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10738
10739 * inferiors.c (find_inferior): Make it safe for the callback
10740 function to delete the currently iterated inferior.
10741
10742 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10743
10744 * Makefile.in (linuw_low_h): Move higher.
10745 (thread-db.o): Depend on $(linux_low_h).
10746
10747 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10748
10749 Rename "process" to "lwp" throughout.
10750
10751 * linux-low.c (all_processes): Rename to...
10752 (all_lwps): ... this.
10753 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10754 (add_process): Rename to ...
10755 (add_lwp): ... this. Adjust.
10756 (linux_create_inferior): Adjust.
10757 (linux_attach_lwp): Adjust.
10758 (linux_attach): Adjust.
10759 (linux_kill_one_process): Rename to ...
10760 (linux_kill_one_lwp): ... this. Adjust.
10761 (linux_kill): Adjust.
10762 (linux_detach_one_process): Rename to ...
10763 (linux_detach_one_lwp): ... this. Adjust.
10764 (linux_detach): Adjust.
10765 (check_removed_breakpoint): Adjust.
10766 (status_pending_p): Adjust.
10767 (linux_wait_for_process): Rename to ...
10768 (linux_wait_for_lwp): ... this. Adjust.
10769 (linux_wait_for_event): Adjust.
10770 (send_sigstop): Adjust.
10771 (wait_for_sigstop): Adjust.
10772 (stop_all_processes): Rename to ...
10773 (stop_all_lwps): ... this.
10774 (linux_resume_one_process): Rename to ...
10775 (linux_resume_one_lwp): ... this. Adjust.
10776 (linux_set_resume_request, linux_continue_one_thread)
10777 (linux_queue_one_thread, resume_status_pending_p)
10778 (usr_store_inferior_registers, regsets_store_inferior_registers)
10779 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10780 Adjust.
10781 * linux-low.h (get_process): Rename to ...
10782 (get_lwp): ... this. Adjust.
10783 (get_thread_process): Rename to ...
10784 (get_thread_lwp): ... this. Adjust.
10785 (get_process_thread): Rename to ...
10786 (get_lwp_thread): ... this. Adjust.
10787 (struct process_info): Rename to ...
10788 (struct lwp_info): ... this.
10789 (all_processes): Rename to ...
10790 (all_lwps): ... this.
10791 * proc-service.c (ps_lgetregs): Adjust.
10792 * thread-db.c (thread_db_create_event, find_one_thread)
10793 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10794
10795 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10796
10797 * server.c (handle_query): Handle "qAttached".
10798
10799 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10800
10801 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10802 GPLv3, update license URL.
10803
10804 2009-03-01 Doug Evans <dje@google.com>
10805
10806 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10807 (server_h): Add gdb_signals.h.
10808 (signals.o): Update.
10809 * server.h (target_signal_from_host,target_signal_to_host_p)
10810 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10811
10812 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10813
10814 * remote-utils.c (getpkt): Also generate remote-debug
10815 information if noack_mode is set.
10816
10817 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10818
10819 * server.c (handle_query): Report qXfer:siginfo:read and
10820 qXfer:siginfo:write as supported and handle them.
10821 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10822 * linux-low.c (linux_xfer_siginfo): New.
10823 (linux_target_ops): Set it.
10824
10825 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10826
10827 * server.c (gdbserver_usage): Mention --remote-debug.
10828 (main): Accept '--remote-debug' switch.
10829
10830 2009-01-18 Doug Evans <dje@google.com>
10831
10832 * regcache.c (new_register_cache): No need to check result of xcalloc.
10833 * server.c (handle_search_memory): Back out calls to xmalloc,
10834 result is checked and error is returned to user upon failure.
10835 (handle_query): Ditto. Add more checks for result of malloc.
10836 (handle_v_cont): Check result of malloc, report error back to
10837 user upon failure.
10838 (handle_v_run): Ditto. Call freeargv.
10839 * server.h (freeargv): Declare.
10840 * utils.c (freeargv): New fn.
10841
10842 2009-01-15 Doug Evans <dje@google.com>
10843
10844 * gdbreplay.c (perror_with_name): Make arg const char *.
10845 * server.h (target_signal_to_name): Make return type const char *.
10846 * thread-db.c (thread_db_err_str): Make return type const char *.
10847 * utils.c (perror_with_name): Make arg const char *.
10848
10849 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10850
10851 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10852 when handling a EXIT_PROCESS_DEBUG_EVENT.
10853
10854 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10855
10856 * gdbreplay.c (gdbreplay_version): Update copyright year.
10857 * server.c (gdbserver_version): Likewise.
10858
10859 2009-01-05 Doug Evans <dje@google.com>
10860
10861 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10862 (handle_extended_wait): Improve comment.
10863
10864 2008-12-13 Doug Evans <dje@google.com>
10865
10866 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10867 * server.h (ATTR_MALLOC): New macro.
10868 (xmalloc,xcalloc,xstrdup): Declare.
10869 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10870 * inferiors.c: Ditto.
10871 * linux-low.c: Ditto.
10872 * mem-break.c: Ditto.
10873 * regcache.c: Ditto.
10874 * remote-utils.c: Ditto.
10875 * server.c: Ditto.
10876 * target.c: Ditto.
10877 * win32-low.c: Ditto.
10878
10879 2008-12-12 Doug Evans <dje@google.com>
10880
10881 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10882 in debugging printf.
10883
10884 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10885
10886 2008-12-09 Doug Evans <dje@google.com>
10887
10888 * linux-low.h (struct process_info): Delete member tid, unused.
10889 * thread-db.c (find_one_thread): Update.
10890 (maybe_attach_thread): Update.
10891
10892 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10893
10894 * target.h (struct target_ops): Add qxfer_osdata member.
10895 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10896 and dirent.h.
10897 (linux_qxfer_osdata): New functions.
10898 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10899 callback.
10900 * server.c (handle_query): Handle "qXfer:osdata:read:".
10901 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10902 (buffer_xml_printf): New functions.
10903 * server.h (struct buffer): New.
10904 (buffer_grow_str, buffer_grow_str0): New macros.
10905 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10906 (buffer_xml_printf): Declare.
10907
10908 2008-11-24 Doug Evans <dje@google.com>
10909
10910 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10911
10912 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10913
10914 * server.c (handle_v_run): Always use the supplied argument list.
10915
10916 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10917
10918 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10919 (xtensa_regmap_table): Add entry for scompare1.
10920
10921 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10922
10923 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10924 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10925 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10926 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10927 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10928 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10929 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10930 XML target descriptions.
10931 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10932 when inferior is running on an ISA 2.05 or later processor. Add
10933 special case to return offset for full 64-bit slot of FPSCR when
10934 in 32-bits.
10935
10936 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10937
10938 * Makefile.in (SFILES, clean): Added sparc64 files.
10939 (reg-sparc64.o, reg-sparc64.c): New.
10940 * configure.srv (sparc*-*-linux*): New configuration.
10941 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10942 syscall arguments for SPARC.
10943 (regsets_store_inferior_registers): Likewise.
10944 * linux-sparc-low.c: New file.
10945
10946 2008-10-21 Doug Evans <dje@google.com>
10947
10948 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10949 (READLINE_DIR,READLINE_DEP): Delete.
10950 (INTERNAL_CFLAGS): Update.
10951 (LINTFLAGS): Update.
10952
10953 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10954
10955 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10956 whole argv from the last run, not just argv[0].
10957
10958 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10959
10960 * regcache.c (new_register_cache): Return NULL if the register
10961 cache size isn't known yet.
10962 (free_register_cache): Avoid dereferencing a NULL regcache.
10963
10964 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10965
10966 * configure.srv: Merge MIPS and MIPS64.
10967
10968 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10969
10970 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10971
10972 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10973
10974 * Makefile.in: Add required vsx dependencies.
10975
10976 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10977 Declare init_registers_powerpc_vsx32l.
10978 Declare init_registers_powerpc_vsx64l.
10979 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10980 (ppc_arch_setup): Check for VSX in hwcap.
10981 (ppc_fill_vsxregset): New function.
10982 (ppc_store_vsxregset): New function.
10983 Add new VSX entry in regset_info target_regsets.
10984
10985 * configure.srv: Add new VSX dependencies.
10986
10987 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10988
10989 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10990 (remote_open): Set or clear transport_is_reliable.
10991 (putpkt_binary): Don't expect acks in noack mode.
10992 (getpkt): Don't send ack/nac in noack mode.
10993 * server.c (handle_general_set): Handle QStartNoAckMode.
10994 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10995 qSupported.
10996 (main): Reset noack_mode on every connection.
10997 * server.h (noack_mode): Declare.
10998
10999 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11000
11001 * Makefile.in (GDBREPLAY_OBS): New variable.
11002 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11003
11004 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11005 Daniel Jacobowitz <dan@codesourcery.com>
11006
11007 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11008 (usr_store_inferior_registers): Likewise.
11009 (regsets_store_inferior_registers): Likewise.
11010
11011 2008-07-31 Rolf Jansen <rj@surtec.com>
11012 Pedro Alves <pedro@codesourcery.com>
11013
11014 * configure.ac: Check for memmem declaration.
11015 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11016 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11017 (disable_packet_qfThreadInfo): Unconditionally compile.
11018 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11019 * configure, config.in: Regenerate.
11020
11021 2008-07-28 Doug Kwan <dougkwan@google.com>
11022
11023 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11024 (linux_write_memory): Remove declaration of errno.
11025
11026 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11027
11028 * linux-low.c (handle_extended_wait): Do not use "status"
11029 variable uninitialized.
11030
11031 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11032
11033 * server.c (handle_v_attach): Inhibit reporting dll changes.
11034
11035 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11036
11037 * remote-utils.c (prepare_resume_reply): If requested, don't
11038 output "thread:TID" in the T stop reply.
11039
11040 * server.c (disable_packet_vCont, disable_packet_Tthread)
11041 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11042 (handle_query): If requested, disable support for qC, qfThreadInfo
11043 and qsThreadInfo.
11044 (handle_v_requests): If requested, disable support for vCont.
11045 (gdbserver_show_disableable): New.
11046 (main): Handle --disable-packet and --disable-packet=LIST.
11047
11048 * server.h (disable_packet_vCont, disable_packet_Tthread)
11049 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11050
11051 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11052
11053 * server.c (gdbserver_usage): Mention --version.
11054
11055 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11056
11057 * Makefile.in (gdbreplay.o): New rule.
11058
11059 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11060
11061 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11062 message, not gdbserver.
11063
11064 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11065 Nathan Sidwell <nathan@codesourcery.com>
11066 Joseph Myers <joseph@codesourcery.com>
11067
11068 * acinclude.m4: Include ../../config/acx.m4.
11069 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11070 * configure, config.in: Regenerate.
11071 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11072 * server.c (gdbserver_version): Print PKGVERSION.
11073 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11074 (main): Adjust gdbserver_usage calls.
11075 * gdbreplay.c (version, host_name): Add declarations.
11076 (gdbreplay_version, gdbreplay_usage): New.
11077 (main): Accept --version and --help options.
11078
11079 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11080
11081 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11082 (arm_breakpoint_at): Handle Thumb.
11083 (the_low_target): Add comment.
11084
11085 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11086
11087 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11088
11089 2008-05-09 Doug Evans <dje@google.com>
11090
11091 * server.h (decode_search_memory_packet): Declare.
11092 * remote-utils.c (decode_search_memory_packet): New fn.
11093 * server.c (handle_search_memory_1): New fn.
11094 (handle_search_memory): New fn.
11095 (handle_query): Process qSearch:memory packets.
11096
11097 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11098
11099 * regcache.c (registers_length): Remove.
11100 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11101 full register packet.
11102 * regcache.h (registers_length): Remove prototype.
11103 * server.h (PBUFSIZ): Define to 16384.
11104
11105 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11106
11107 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11108 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11109 powerpc-64l.o, and powerpc-altivec64l.o.
11110 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11111 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11112 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11113 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11114 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11115 to srv_xmlfiles.
11116
11117 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11118 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11119 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11120 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11121 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11122 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11123 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11124 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11125 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11126 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11127 (clean): Update.
11128
11129 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11130 (init_registers_powerpc_32l): ... this new prototype.
11131 (init_registers_powerpc_32): Remove, replace by ...
11132 (init_registers_powerpc_altivec32l): ... this new prototype.
11133 (init_registers_powerpc_e500): Remove, replace by ...
11134 (init_registers_powerpc_e500l): ... this new prototype.
11135 (init_registers_ppc64): Remove, replace by ...
11136 (init_registers_powerpc_64l): ... this new prototype.
11137 (init_registers_powerpc_64): Remove, replace by ...
11138 (init_registers_powerpc_altivec64l): ... this new prototype.
11139 (ppc_num_regs): Set to 73.
11140 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11141 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11142 (ppc_cannot_store_register): Handle orig_r3 and trap.
11143 (ppc_arch_setup): Update init_registers_... calls.
11144 (ppc_fill_gregset): Handle orig_r3 and trap.
11145
11146 * inferiors.c (clear_inferiors): Reset current_inferior.
11147
11148 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11149
11150 * acinclude.m4: Add override.m4.
11151 * configure: Regenerate.
11152
11153 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11154
11155 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11156 initial call to init_register_ppc64.
11157
11158 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11159
11160 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11161 single powerpc*-*-linux* case.
11162 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11163
11164 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11165
11166 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11167 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11168 from reg_xmlfiles.
11169 * linux-ppc-low.c: Include <elf.h>.
11170 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11171 (ppc_hwcap): New global variable.
11172 (ppc_regmap): Remove __SPE__ #ifdef sections.
11173 (ppc_regmap_e500): New global variable.
11174 (ppc_cannot_store_register): Update __SPE__ special case.
11175 (ppc_get_hwcap): New function.
11176 (ppc_arch_setup): Use it to determine whether inferior supports
11177 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11178 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11179 Do not access registers if target does not support AltiVec.
11180 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11181 Do not access registers if target does not support SPE.
11182 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11183
11184 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11185
11186 * linux-low.c (disabled_regsets, num_regsets): New.
11187 (use_regsets_p): Delete.
11188 (linux_wait_for_process): Clear disabled_regsets.
11189 (regsets_fetch_inferior_registers): Check and set it.
11190 (regsets_store_inferior_registers): Likewise.
11191 (linux_fetch_registers, linux_store_registers): Do not use
11192 use_regsets_p.
11193 (initialize_low): Allocate disabled_regsets.
11194
11195 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11196
11197 * Makefile.in (LIBOBJS): New.
11198 (OBS): Use LIBOBJS.
11199 (memmem.o): New rule.
11200 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11201 * configure: Regenerated.
11202
11203 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11204
11205 * server.c (handle_query): Never return "unsupported" for
11206 qXfer:features:read queries.
11207
11208 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11209
11210 * server.c (get_features_xml): Fix inverted condition.
11211 (handle_query): Always support qXfer:feature:read.
11212
11213 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11214
11215 * server.c (wrapper_argv): New.
11216 (start_inferior): Handle wrapper_argv. If set, expect an extra
11217 trap.
11218 (gdbserver_usage): Document --wrapper.
11219 (main): Parse --wrapper.
11220
11221 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11222
11223 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11224 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11225 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11226 (ppc_set_pc): Likewise.
11227 (ppc_arch_setup): New function.
11228 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11229 of collect_register.
11230 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11231
11232 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11233
11234 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11235 instead of linux-ppc64-low.o.
11236 * linux-ppc64-low.c: Remove file.
11237 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11238 (linux-ppc64-low.o): Remove rule.
11239
11240 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11241 (init_registers_powerpc_64): Likewise.
11242 (ppc_regmap): Conditionally define depending on __powerpc64__.
11243 (ppc_cannot_store_register): Do not special-case "fpscr" when
11244 compiled on __powerpc64__.
11245 (ppc_collect_ptrace_register): New function.
11246 (ppc_supply_ptrace_register): New function.
11247 (ppc_breakpoint): Change type to "unsigned int".
11248 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11249 (the_low_target): Conditionally provide initializers for the
11250 arch_setup member depending on __powerpc64__. Install
11251 collect_ptrace_register and supply_ptrace_register members.
11252
11253 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11254
11255 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11256 * server.c (gdbserver_xmltarget): Define.
11257 (get_features_xml): Use it to replace "target.xml" and arch_string.
11258
11259 * configure.srv: Remove srv_xmltarget. Add XML files that were
11260 mentioned there to srv_xmlfiles instead. Remove conditional tests
11261 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11262 srv_xmlfiles and srv_regobj to include all possible choices.
11263 * configure.ac (srv_xmltarget): Remove.
11264 (srv_xmlfiles): Do not add "target.xml".
11265 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11266 checks for supplementary target information.
11267 * configure: Regenerate.
11268 * Makefile.in (XML_TARGET): Remove.
11269 (target.xml): Remove rule.
11270 (clean): Do not clean up target.xml.
11271 (.PRECIOUS): Do not mention target.xml.
11272
11273 * target.h (struct target_ops): Remove arch_string member.
11274 * linux-low.c (linux_arch_string): Remove.
11275 (linux_target_ops): Remove arch_string initializer.
11276 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11277 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11278 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11279 * spu-low.c (spu_arch_string): Remove.
11280 (spu_target_ops): Remove arch_string initializer.
11281 * win32-low.c (win32_arch_string): Remove.
11282 (win32_target_ops): Remove arch_string initializer.
11283 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11284 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11285 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11286
11287 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11288
11289 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11290 by collect_ptrace_register and supply_ptrace_register hooks.
11291 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11292 instead of checking for the_low_target.left_pad_xfer.
11293 (usr_store_inferior_registers): Use collect_ptrace_register callback
11294 instead of checking for the_low_target.left_pad_xfer.
11295
11296 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11297 (s390_supply_ptrace_register): Likewise.
11298 (s390_fill_gregset): Call s390_collect_ptrace_register.
11299 (the_low_target): Update.
11300
11301 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11302 (ppc_supply_ptrace_register): Likewise.
11303 (the_low_target): Update.
11304
11305 * linux-i386-low.c (the_low_target): Update.
11306 * linux-x86-64-low.c (the_low_target): Update.
11307
11308 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11309
11310 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11311 reg-s390.o and reg-s390x.o.
11312
11313 * linux-low.c (new_inferior): New global variable.
11314 (linux_create_inferior, linux_attach): Set it.
11315 (linux_wait_for_process): Call the_low_target.arch_setup after the
11316 target has stopped for the first time.
11317 (initialize_low): Do not call the_low_target.arch_setup.
11318
11319 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11320 (s390_set_pc): Likewise.
11321 (s390_arch_setup): New function.
11322 (the_low_target): Use s390_arch_setup as arch_setup routine.
11323
11324 * regcache.c (realloc_register_cache): New function.
11325 (set_register_cache): Call it for each existing regcache.
11326
11327 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11328
11329 * server.h (init_registers): Remove prototype.
11330
11331 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11332 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11333 instead of init_registers ().
11334 * linux-arm-low.c (init_registers_arm): Add prototype.
11335 (init_registers_arm_with_iwmmxt): Likewise.
11336 (the_low_target): Add initializer for arch_setup field.
11337 * linux-cris-low.c (init_registers_cris): Add prototype.
11338 (the_low_target): Add initializer for arch_setup field.
11339 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11340 (the_low_target): Add initializer for arch_setup field.
11341 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11342 (the_low_target): Add initializer for arch_setup field.
11343 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11344 (the_low_target): Add initializer for arch_setup field.
11345 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11346 (the_low_target): Add initializer for arch_setup field.
11347 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11348 (the_low_target): Add initializer for arch_setup field.
11349 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11350 (init_registers_mips64_linux): Likewise.
11351 (the_low_target): Add initializer for arch_setup field.
11352 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11353 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11354 (the_low_target): Add initializer for arch_setup field.
11355 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11356 (init_registers_powerpc_64): Likewise.
11357 (the_low_target): Add initializer for arch_setup field.
11358 * linux-s390-low.c (init_registers_s390): Add prototype.
11359 (init_registers_s390x): Likewise.
11360 (the_low_target): Add initializer for arch_setup field.
11361 * linux-sh-low.c (init_registers_sh): Add prototype.
11362 (the_low_target): Add initializer for arch_setup field.
11363 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11364 (the_low_target): Add initializer for arch_setup field.
11365 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11366 (the_low_target): Add initializer for arch_setup field.
11367
11368 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11369 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11370 instead of init_registers ().
11371 * win32-arm-low.c (init_registers_arm): Add prototype.
11372 (the_low_target): Add initializer for arch_setup field.
11373 * win32-i386-low.c (init_registers_i386): Add prototype.
11374 (the_low_target): Add initializer for arch_setup field.
11375
11376 * spu-low.c (init_registers_spu): Add prototype.
11377 (initialize_low): Call initialie_registers_spu () instead of
11378 initialize_registers ().
11379
11380 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11381
11382 * server.c (handle_v_requests): When handling the vRun and vAttach
11383 packets, if already debugging a process, don't kill it. Return an
11384 error instead.
11385
11386 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11387
11388 * server.c (handle_query): Correct length check.
11389
11390 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11391
11392 * win32-low.c (do_initial_child_stuff): Add process handle
11393 parameter. Set current_process_handle and current_process_id from the
11394 parameters. Clear globals.
11395 (win32_create_inferior): Don't set current_process_handle and
11396 current_process_id here. Instead pass them on the call to
11397 do_initial_child_stuff.
11398 (win32_attach): Likewise.
11399 (win32_clear_inferiors): New.
11400 (win32_kill): Don't close the current process handle or the
11401 current thread handle here. Instead call win32_clear_inferiors.
11402 (win32_detach): Don't open a new handle to the process. Call
11403 win32_clear_inferiors.
11404 (win32_join): Don't rely on current_process_handle; open a new
11405 handle using the process id.
11406 (win32_wait): Call win32_clear_inferiors when the inferior process
11407 has exited.
11408
11409 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11410
11411 * server.c (monitor_show_help): Add "exit".
11412
11413 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11414
11415 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11416 (clean): Add reg-xtensa.c.
11417 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11418 * configure.srv (xtensa*-*-linux*) New target.
11419 * linux-xtensa-low.c: New.
11420 * xtensa-xtregs.c: New.
11421
11422 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11423
11424 * hostio.c: Don't include errno.h.
11425 (errno_to_fileio_errno): Move to hostio-errno.
11426 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11427 error number outputting to the target->hostio_last_error callback.
11428 (hostio_packet_error): Use FILEIO_EINVAL directly.
11429 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11430 calls to hostio_error.
11431 * hostio-errno.c: New.
11432 * server.h (hostio_last_error_from_errno): Declare.
11433 * target.h (target_ops): Add hostio_last_error member.
11434 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11435 as hostio_last_error handler.
11436 * spu-low.c (spu_target_ops): Likewise.
11437 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11438 (wince_hostio_last_error): New functions.
11439 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11440 as hostio_last_error handler.
11441 (win32_target_ops) [!_WIN32_WCE]: Register
11442 hostio_last_error_from_errno as hostio_last_error handler.
11443 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11444 (hostio-errno.o): New rule.
11445 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11446 * configure.srv (srv_hostio_err_objs): New variable. Default to
11447 hostio-errno.o.
11448 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11449 * configure: Regenerate.
11450
11451 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11452
11453 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11454 (linux_kill, linux_detach): Clean up the process list.
11455 * remote-utils.c (remote_open): Improve port number parsing.
11456 (putpkt_binary, input_interrupt): Only send interrupts if the target
11457 is running.
11458 * server.c (extended_protocol): Make static.
11459 (attached): Define earlier.
11460 (exit_requested, response_needed, program_argv): New variables.
11461 (target_running): New.
11462 (start_inferior): Clear attached here.
11463 (attach_inferior): Set attached here.
11464 (require_running): Define.
11465 (handle_query): Use require_running and target_running. Implement
11466 "monitor exit".
11467 (handle_v_attach, handle_v_run): New.
11468 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11469 (gdbserver_usage): Update.
11470 (main): Redo argument parsing. Handle --debug and --multi. Handle
11471 --attach along with other options or after the port. Save
11472 program_argv. Support no initial program. Resynchronize
11473 communication with GDB after an error. Handle "monitor exit".
11474 Use require_running and target_running. Always allow the extended
11475 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11476 restart in extended mode.
11477 * README: Refer to the GDB manual. Update --attach usage.
11478
11479 2007-12-20 Andreas Schwab <schwab@suse.de>
11480
11481 * linux-low.c (STACK_SIZE): Define.
11482 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11483 (linux_test_for_tracefork): Likewise.
11484
11485 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11486
11487 * linux-low.c (linux_wait_for_event): Update messages. Do not
11488 reinsert auto-delete breakpoints.
11489 * mem-break.c (struct breakpoint): Change return type of handler to
11490 int.
11491 (set_breakpoint_at): Update handler type.
11492 (reinsert_breakpoint_handler): Return 1 instead of calling
11493 delete_breakpoint.
11494 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11495 setting a new one.
11496 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11497 * mem-break.h (set_breakpoint_at): Update handler type.
11498 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11499 * win32-low.c (auto_delete_breakpoint): New.
11500 (get_child_debug_event): Use it.
11501
11502 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11503
11504 * configure.ac: Check for pread and pwrite.
11505 * hostio.c (handle_pread): Fall back to lseek and read.
11506 (handle_pwrite): Fall back to lseek and write.
11507 * config.in, configure: Regenerated.
11508
11509 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11510
11511 * server.c (myresume): Add own_buf argument.
11512 (main): Update calls.
11513
11514 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11515
11516 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11517 * remote-utils.c (remote_open): Do not call disable_async_io.
11518 (block_async_io): Delete.
11519 (unblock_async_io): Make static.
11520 (initialize_async_io): New.
11521 * server.c (handle_v_cont): Handle async I/O here.
11522 (myresume): Likewise. Move other common resume tasks here...
11523 (main): ... from here. Call initialize_async_io. Disable async
11524 I/O before the main loop.
11525 * server.h (initialize_async_io): Declare.
11526 (block_async_io, unblock_async_io): Delete prototypes.
11527 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11528
11529 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11530
11531 * remote-utils.c (readchar): Allow binary data in received messages.
11532
11533 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11534
11535 * win32-low.c (attaching): New global.
11536 (win32_create_inferior): Clear the `attaching' global.
11537 (win32_attach): Set the `attaching' global.
11538 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11539 attaching. Only set a breakpoint at the entry point if not
11540 attaching.
11541
11542 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11543
11544 * server.c (main): Don't report dll events on the initial
11545 connection on attaches.
11546
11547 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11548
11549 * server.c (main): Relax numerical bases supported for the pid of
11550 the --attach command line argument.
11551
11552 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11553
11554 * win32-low.c (win32_attach): Call OpenProcess before
11555 DebugActiveProcess, not after. Add last error output to error
11556 call.
11557
11558 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11559
11560 * win32-low.c (win32_get_thread_context)
11561 (win32_set_thread_context): New functions.
11562 (thread_rec): Use win32_get_thread_context.
11563 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11564 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11565 field.
11566
11567 2007-12-03 Leo Zayas
11568 Pedro Alves <pedro_alves@portugalmail.pt>
11569
11570 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11571 global variables.
11572 (child_add_thread): Minor cleanup.
11573 (child_continue): Resume artificially suspended threads before
11574 calling ContinueDebugEvent.
11575 (suspend_one_thread): New.
11576 (fake_breakpoint_event): New.
11577 (get_child_debug_event): Change return type to int. Check here if
11578 gdb sent an interrupt request. If a soft interrupt was requested,
11579 fake a breakpoint event. Return 0 if there is no event to handle,
11580 and 1 otherwise.
11581 (win32_wait): Don't check here if gdb sent an interrupt request.
11582 Ensure there is a valid event to handle.
11583 (win32_request_interrupt): Add soft interruption method as last
11584 resort.
11585
11586 2007-12-03 Leo Zayas
11587 Pedro Alves <pedro_alves@portugalmail.pt>
11588
11589 * win32-low.h (win32_thread_info): Add descriptions to the
11590 structure members. Replace `suspend_count' counter by a
11591 `suspended' flag.
11592 * win32-low.c (thread_rec): Update condition of when to get the
11593 context from the inferior. Rely on ContextFlags being set if it
11594 has already been retrieved. Only suspend the inferior thread if
11595 we haven't already. Warn if that fails.
11596 (continue_one_thread): s/suspend_count/suspended/. Only call
11597 ResumeThread once. Warn if that fails.
11598
11599 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11600
11601 * win32-low.c (win32_wait): Don't read from the inferior when it
11602 has already exited.
11603
11604 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11605
11606 * Makefile.in (win32_low_h): New variable.
11607 (win32-low.o): Add dependency on $(win32_low_h).
11608 (win32-arm-low.o, win32-i386-low.o): New rules.
11609
11610 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11611
11612 * hostio.c: Correct copyright year.
11613
11614 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11615
11616 * Makefile.in (OBS): Add hostio.o.
11617 (hostio.o): New rule.
11618 * server.h (handle_vFile): Declare.
11619 * hostio.c: New file.
11620 * server.c (handle_v_requests): Take packet_len and new_packet_len
11621 for binary packets. Call handle_vFile.
11622 (main): Update call to handle_v_requests.
11623
11624 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11625
11626 * linux-low.c: Include <sched.h>.
11627
11628 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11629
11630 * linux-low.c (linux_tracefork_grandchild): New.
11631 (linux_tracefork_child): Use clone.
11632 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11633
11634 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11635
11636 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11637
11638 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11639
11640 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11641
11642 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11643
11644 * inferiors.c (change_inferior_id): Delete.
11645 (add_pid_to_list, pull_pid_from_list): New.
11646 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11647 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11648 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11649 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11650 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11651 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11652 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11653 (using_threads): Always set to 1.
11654 (handle_extended_wait): New.
11655 (add_process): Do not set TID.
11656 (linux_create_inferior): Set must_set_ptrace_flags.
11657 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11658 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11659 (linux_thread_alive): Rename TID argument to LWPID.
11660 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11661 (linux_wait_for_event): Do not use TID or check using_threads. Update
11662 call to dead_thread_notify. Call handle_extended_wait.
11663 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11664 (send_sigstop): Delete sigstop_sent.
11665 (wait_for_sigstop): Avoid TID.
11666 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11667 (linux_test_for_tracefork): New.
11668 (linux_lookup_signals): Use thread_db_active and
11669 linux_supports_tracefork_flag.
11670 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11671 * linux-low.h (get_process_thread): Avoid TID.
11672 (struct process_ifo): Move thread_known and tid to the end. Remove
11673 sigstop_sent.
11674 (linux_attach_lwp, thread_db_init): Update prototypes.
11675 * server.h (change_inferior_id): Delete prototype.
11676 (add_pid_to_list, pull_pid_from_list): New prototypes.
11677 * thread-db.c (thread_db_use_events): New.
11678 (find_first_thread): Rename to...
11679 (find_one_thread): ...this. Update callers and messages. Do not
11680 call fatal. Check thread_db_use_events. Do not call
11681 change_inferior_id or new_thread_notify.
11682 (maybe_attach_thread): Update. Do not call new_thread_notify.
11683 (thread_db_init): Set thread_db_use_events. Check use_events.
11684 * utils.c (fatal, warning): Correct message prefix.
11685
11686 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11687
11688 * Makefile.in (clean): Remove new files.
11689 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11690 (powerpc-64.o, powerpc-64.c): New rules.
11691 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11692 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11693 with SPE.
11694 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11695 SPE targets.
11696 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11697 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11698 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11699 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11700 (target_regsets): Add AltiVec and SPE register sets.
11701 * configure.ac: Check for AltiVec and SPE.
11702 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11703 (ppc_fill_vrregset, ppc_store_vrregset): New.
11704 (target_regsets): Add AltiVec register set.
11705 * configure: Regenerated.
11706
11707 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11708
11709 * linux-low.c (O_LARGEFILE): Define.
11710 (linux_read_memory): Use /proc/PID/mem.
11711 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11712 * configure, config.in: Regenerated.
11713
11714 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11715
11716 * linux-low.c (linux_wait_for_event): Do not pass signals while
11717 single-stepping.
11718
11719 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11720
11721 * win32-low.c (create_process): New.
11722 (win32_create_inferior): Use create_process instead of
11723 CreateProcess. If create_process failed retry appending an ".exe"
11724 suffix. Store the GetLastError result immediatelly after
11725 create_process calls and use it on the call to error.
11726
11727 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11728
11729 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11730
11731 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11732
11733 * configure.ac: Switch license to GPLv3.
11734
11735 2007-08-01 Michael Snyder <msnyder@access-company.com>
11736
11737 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11738
11739 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11740
11741 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11742 typedef.
11743 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11744 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11745 CloseToolhelp32Snapshot.
11746 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11747 CloseToolhelp32Snapshot.
11748
11749 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11750
11751 * server.c (main): Check for inferior exit before main loop.
11752
11753 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11754
11755 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11756 instead of on tmp_desc.
11757
11758 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11759 Daniel Jacobowitz <dan@codesourcery.com>
11760
11761 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11762 (add_thread): Minor cleanups.
11763 (clear_inferiors): Move lower in the file. Clear the DLL
11764 list.
11765 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11766 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11767 (xml_escape_text): New.
11768 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11769 for qSupported.
11770 (handle_v_cont): Report errors.
11771 (gdbserver_version): Update.
11772 (main): Correct size of own_buf. Do not report initial DLL events.
11773 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11774 (unloaded_dll, xml_escape_text): New.
11775 * win32-low.c (enum target_waitkind): Update comments.
11776 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11777 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11778 (win32_EnumProcessModules, win32_GetModuleInformation)
11779 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11780 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11781 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11782 (win32_Module32First, win32_Module32Next, load_toolhelp)
11783 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11784 (get_child_debug_event): Handle DLL events.
11785 (win32_wait): Likewise.
11786
11787 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11788
11789 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11790 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11791
11792 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11793
11794 * win32-low.c (handle_output_debug_string): Ignore event if not
11795 waiting.
11796
11797 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11798
11799 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11800
11801 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11802
11803 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11804
11805 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11806
11807 * inferiors.c (change_inferior_id): Add comment.
11808 * linux-low.c (check_removed_breakpoint): Add an early
11809 prototype. Improve debug output.
11810 (linux_attach): Doc update.
11811 (linux_detach_one_process, linux_detach): Clean up before releasing
11812 each process.
11813 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11814 * linux-low.h (struct process_info): Doc improvement.
11815 * mem-break.c (delete_all_breakpoints): New.
11816 * mem-break.h (delete_all_breakpoints): New prototype.
11817 * thread-db.c (find_first_thread): New.
11818 (thread_db_create_event): Call it instead of
11819 thread_db_find_new_threads. Clean up unused variables.
11820 (maybe_attach_thread): Remove first thread handling.
11821 (thread_db_find_new_threads): Use find_first_thread.
11822 (thread_db_get_tls_address): Likewise.
11823
11824 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11825
11826 * thread-db.c (thread_db_find_new_threads): Add prototype.
11827 (thread_db_create_event): Check for the main thread before adding
11828 a new thread.
11829 (maybe_attach_thread): Only enable event reporting if TID == 0.
11830 (thread_db_get_tls_address): Check for new threads.
11831
11832 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11833
11834 * linux-low.c (linux_create_inferior): Try execv before execvp.
11835 * spu-low.c (spu_create_inferior): Likewise.
11836
11837 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11838
11839 * linux-low.c (linux_create_inferior): Change execv to execvp.
11840 * spu-low.c (spu_create_inferior): Likewies.
11841
11842 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11843
11844 * Makefile.in (clean): Clean new files instead of deleted ones.
11845 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11846 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11847 rules.
11848 * configure.srv: Specify XML files and new regformats for MIPS and
11849 MIPS64 GNU/Linux.
11850 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11851 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11852 an entry for the restart register.
11853 (mips_cannot_fetch_register, mips_cannot_store_register)
11854 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11855 register names to match the XML descriptions.
11856 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11857 restart register instead of $0.
11858
11859 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11860 Markus Deuling <deuling@de.ibm.com>
11861
11862 * remote-utils.c (decode_xfer_write): New function.
11863 * server.h (decode_xfer_write): Add prototype.
11864 * server.c (handle_query): Add PACKET_LEN argument. Support
11865 qXfer:spu:read and qXfer:spu:write packets.
11866 (main): Pass packet_len to handle_query.
11867 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11868 * target.h (target_ops): Add qxfer_spu.
11869
11870 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11871
11872 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11873 accessing non-seekable spufs files.
11874
11875 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11876
11877 * server.c (handle_query): Add reply for qC packet.
11878
11879 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11880 Leo Zayas <lerele@champenstudios@com>
11881
11882 * server.h (check_remote_input_interrupt_request): New function.
11883 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11884 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11885 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11886 (check_remote_input_interrupt_request): New function.
11887 * server.h (check_remote_input_interrupt_request): Declare.
11888 * win32-low.c (winapi_DebugBreakProcess,
11889 winapi_GenerateConsoleCtrlEvent): New typedefs.
11890 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11891 to 250 ms.
11892 (win32_wait): Check for remote interrupt request
11893 with check_remote_input_interrupt_request.
11894 (win32_request_interrupt): New function.
11895 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11896
11897 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11898
11899 * win32-low.c (debug_registers_changed,
11900 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11901 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11902 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11903 (thread_rec): Get context using the low target.
11904 (child_add_thread): Call thread_added on the low target,
11905 which does the same thing.
11906 (regptr): Delete.
11907 (do_initial_child_stuff): Remove debug registers references.
11908 Set context using the low target. Resume threads after
11909 setting the contexts.
11910 (child_continue): Remove dead variable. Remove debug
11911 registers references.
11912 (child_fetch_inferior_registers): Go through the low target.
11913 (do_child_store_inferior_registers): Remove.
11914 (child_store_inferior_registers): Go through the low target.
11915 (win32_resume): Remove debug registers references.
11916 Set context using the low target.
11917 (handle_exception): Change return type to void. Don't record
11918 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11919 first chance exception.
11920 (get_child_debug_event): Change return type to void. Remove
11921 goto loop. Always return after waiting for debug event.
11922 (win32_wait): Convert to switch statement. Handle spurious
11923 events.
11924
11925 * win32-i386-low.c (debug_registers_changed,
11926 debug_registers_used): New.
11927 (initial_stuff): Rename to ...
11928 (i386_initial_stuff): ... this. Clear debug registers
11929 state variables.
11930 (store_debug_registers): Delete.
11931 (i386_get_thread_context): New.
11932 (load_debug_registers): Delete.
11933 (i386_set_thread_context): New.
11934 (i386_thread_added): New.
11935 (single_step): Rename to ...
11936 (i386_single_step): ... this.
11937 (do_fetch_inferior_registers): Rename to ...
11938 (i386_fetch_inferior_register): ... this.
11939 (i386_store_inferior_register): New.
11940 (the_low_target): Adapt to new interface.
11941
11942 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11943 (arm_get_thread_context): New.
11944 (arm_set_thread_context): New.
11945 (regptr): New.
11946 (do_fetch_inferior_registers): Rename to ...
11947 (arm_fetch_inferior_register): ... this.
11948 (arm_store_inferior_register): New.
11949 (arm_wince_breakpoint): Reimplement as unsigned long.
11950 (arm_wince_breakpoint_len): Define.
11951 (the_low_target): Adapt to new interface.
11952
11953 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11954 load_debug_registers. Add get_thread_context, set_thread_context,
11955 thread_added and store_inferior_register. Rename
11956 fetch_inferior_registers to fetch_inferior_register.
11957 (regptr): Remove declaration.
11958
11959 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11960
11961 * linux-low.c (linux_detach): Change return type to int. Return 0.
11962 * spu-low.c (spu_detach): Likewise.
11963
11964 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11965
11966 * target.h (target_ops): Change return type of detach to int.
11967 Add join.
11968 (join_inferior): New.
11969 * server.c (main): Don't skip detach support on mingw32.
11970 If the inferior doesn't support detaching return error.
11971 Call join_inferior instead of using waitpid.
11972 * linux-low.c (linux_join): New.
11973 (linux_target_op): Add linux_join.
11974 * spu-low.c (spu_join): New.
11975 (spu_target_ops): Add spu_join.
11976 * win32-low.c (win32_detach): Adapt to new interface.
11977 Reopen current_process_handle before detaching. Issue a child
11978 resume before detaching.
11979 (win32_join): New.
11980 (win32_target_op): Add win32_join.
11981
11982 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11983
11984 * win32-low.c (win32-attach): Fix return value.
11985 * target.h (target_ops): Describe ATTACH return values.
11986
11987 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11988
11989 * win32-low.c (GETPROCADDRESS): Define.
11990 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11991 (winapi_DebugSetProcessKillOnExit): Likewise.
11992 (win32_create_inferior): Force usage of ansi CreateProcessA.
11993 (win32_attach): Use GETPROCADDRESS.
11994 (win32_detach): Likewise.
11995
11996 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11997
11998 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11999
12000 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12001
12002 * win32-low.c: Commit leftover changes from 2007-03-29.
12003
12004 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12005
12006 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12007 fields short instead of int. Add explicit padding.
12008 (i387_cache_to_fsave): Remove unnecessary casts.
12009 (i387_fsave_to_cache): Doc fix.
12010 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12011
12012 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12013
12014 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12015 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12016
12017 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12018
12019 * configure.srv (arm*-*-mingw32ce*): Move near the other
12020 arm targets.
12021
12022 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12023
12024 * configure.ac: Add errno checking.
12025 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12026 sys/file.h and malloc.h.
12027 (AC_CHECK_DECLS): Add perror.
12028 (srv_mingwce): Handle.
12029 * configure.srv (i[34567]86-*-cygwin*): Add
12030 win32-i386-low.o to srv_tgtobj.
12031 (i[34567]86-*-mingw*): Likewise.
12032 (arm*-*-mingw32ce*): Add case.
12033 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12034 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12035 [__MINGW32CE__] (strerror): New function.
12036 [__MINGW32CE__] (errno): Define to GetLastError.
12037 [__MINGW32CE__] (COUNTOF): New macro.
12038 (remote_open): Remove extra close call.
12039 * mem-break.c (delete_breakpoint_at): New function.
12040 * mem-break.h (delete_breakpoint_at): Declare.
12041 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12042 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12043 [USE_WIN32API] (read, write): Add char* casts.
12044 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12045 * server.h: Include wincecompat.h on Windows CE.
12046 [HAVE_ERRNO_H]: Check.
12047 (perror): Declare if not declared.
12048 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12049 (perror_with_name): Remove errno declaration.
12050 * wincecompat.h: New.
12051 * wincecompat.c: New.
12052 * win32-low.h: New.
12053 * win32-arm-low.c: New.
12054 * win32-i386-low.c: New.
12055 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12056 (OUTMSG2): Make it safe.
12057 (_T): New macro.
12058 (COUNTOF): New macro.
12059 (NUM_REGS): Get it from the low target.
12060 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12061 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12062 (thread_rec): Let low target handle debug registers.
12063 (child_add_thread): Likewise.
12064 (child_init_thread_list): Likewise.
12065 (continue_one_thread): Likewise.
12066 (regptr): New.
12067 (do_child_fetch_inferior_registers): Move to ...
12068 * win32-i386-low.c: ... here, and rename to ...
12069 (do_fetch_inferior_registers): ... this.
12070 * win32-low.c (child_fetch_inferior_registers):
12071 Go through the low target.
12072 (do_child_store_inferior_registers): Use regptr.
12073 (strwinerror): New function.
12074 (win32_create_inferior): Handle Windows CE.
12075 Use strwinerror instead of strerror on Windows error
12076 codes. Add program to the error output.
12077 Don't close the main thread handle on Windows CE.
12078 (win32_attach): Use coredll.dll on Windows CE.
12079 (win32_kill): Close current process and current
12080 thread handles.
12081 (win32_detach): Use coredll.dll on Windows CE.
12082 (win32_resume): Let low target handle debug registers, and
12083 step request.
12084 (handle_exception): Add/Remove initial breakpoint. Avoid
12085 non-existant WSTOPSIG on Windows CE.
12086 (win32_read_inferior_memory): Cast to remove warning.
12087 (win32_arch_string): Go through the low target.
12088 (initialize_low): Call set_breakpoint_data with the low
12089 target's breakpoint.
12090 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12091 FOP_REGNUM, mappings): Move to ...
12092 * win32-i386-low.c: ... here.
12093 * win32-low.c (win32_thread_info): Move to ...
12094 * win32-low.h: ... here.
12095 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12096 win32-arm-low.c and wincecompat.c.
12097 (all:): Add $EXEEXT.
12098 (install-only:): Likewise.
12099 (gdbserver:): Likewise.
12100 (gdbreplay:): Likewise.
12101 * config.in: Regenerate.
12102 * configure: Regenerate.
12103
12104 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12105
12106 * win32-low.c: Rename typedef thread_info to
12107 win32_thread_info throughout.
12108
12109 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12110
12111 * win32-i386-low.c: Rename to ...
12112 * win32-low.c: ... this.
12113 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12114 * Makefile.in: Likewise.
12115
12116 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12117
12118 * remote-utils.c (monitor_output): Constify msg parameter.
12119 * server.h (monitor_output): Likewise.
12120 * win32-i386-low.c (handle_output_debug_string): New.
12121 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12122 handle_output_debug_string.
12123 (get_child_debug_event): Likewise.
12124
12125 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12126
12127 * server.c (main): Correct strtoul check.
12128
12129 2007-03-27 Jon Ringle <jon@ringle.org>
12130
12131 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12132
12133 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12134
12135 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12136
12137 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12138
12139 * terminal.h: Check HAVE_SGTTY_H.
12140
12141 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12142
12143 * remote-utils.c (remote_open): Print out the assigned port number.
12144
12145 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12146
12147 * remote-utils.c (monitor_output): New function.
12148 * server.c (debug_threads): Define here.
12149 (monitor_show_help): New function.
12150 (handle_query): Handle qRcmd.
12151 (main): Do not handle 'd' packet.
12152 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12153 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12154 of debug_threads.
12155
12156 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12157
12158 * Makefile.in (EXEEXT): New.
12159 (clean): Use $(EXEEXT).
12160
12161 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12162
12163 * target.h (target_ops): Rename send_signal to request_interrupt,
12164 and remove enum target_signal parameter.
12165 * linux-low.c (linux_request_interrupt): Rename from
12166 linux_send_signal, and always send SIGINT.
12167 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12168 and always send SIGINT.
12169 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12170 of send_signal.
12171 (input_interrupt): Likewise.
12172
12173 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12174
12175 * server.c (get_features_xml): Check if target implemented
12176 arch_string.
12177 * win32-i386-low.c (win32_arch_string): New.
12178 (win32_target_ops): Add win32_arch_string as arch_string member.
12179
12180 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12181
12182 * spu-low.c (spu_arch_string): New.
12183 (spu_target_ops): Add spu_arch_string.
12184
12185 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12186
12187 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12188 * configure.ac: Do not check for terminal.h.
12189 * configure, config.in: Regenerated.
12190
12191 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12192
12193 * Makefile.in (OBS): Add $(XML_BUILTIN).
12194 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12195 (clean): Update.
12196 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12197 (arm-with-iwmmxt.c): New.
12198 * config.in, configure: Regenerate.
12199 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12200 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12201 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12202 (arm*-*-linux*): Add iWMMXt and regset support.
12203 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12204 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12205 (arm_store_wmmxregset, target_regsets): New.
12206 * server.c (get_features_xml): Take annex argument. Check builtin
12207 XML documents.
12208 (handle_query): Handle multiple annexes.
12209
12210 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12211
12212 * remote-utils.c [USE_WIN32API] (read, write): Define.
12213 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12214 write.
12215
12216 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12217
12218 * linux-i386-low.c (the_low_target): Set arch_string.
12219 * linux-x86-64-low.c (the_low_target): Likewise.
12220 * linux-low.c (linux_arch_string): New.
12221 (linux_target_ops): Add it.
12222 * linux-low.h (struct linux_target_ops): Add arch_string.
12223 * server.c (write_qxfer_response): Use const void * for DATA.
12224 (get_features_xml): New.
12225 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12226 * target.h (struct target_ops): Add arch_string method.
12227
12228 2007-01-03 Denis Pilat <denis.pilat@st.com>
12229 Daniel Jacobowitz <dan@codesourcery.com>
12230
12231 * linux-low.c (linux_kill): Handle being called with no threads.
12232 * win32-i386-low.c (win32_kill): Likewise.
12233 (get_child_debug_event): Clear current_process_handle.
12234
12235 2006-12-30 Denis PILAT <denis.pilat@st.com>
12236 Daniel Jacobowitz <dan@codesourcery.com>
12237
12238 * remote-utils.c (remote_open): Check the type of specified
12239 serial port devices before opening them.
12240 * server.c (main): Kill the inferior if an error occurs during
12241 the first remote_open.
12242
12243 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12244
12245 * README: Update supported targets.
12246
12247 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12248
12249 * Makefile.in (clean): Remove reg-mips64.c.
12250 (reg-mips64.c, reg-mips64.o): New rules.
12251 * configure.srv: Handle mips64. Include regset support for mips.
12252 * linux-mips-low.c (union mips_register): New.
12253 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12254 (mips_breakpoint, mips_breakpoint_at): Use int.
12255 (mips_collect_register, mips_supply_register)
12256 (mips_collect_register_32bit, mips_supply_register_32bit)
12257 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12258 (mips_store_fpregset, target_regsets): New.
12259 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12260
12261 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12262
12263 * configure.srv: Add target "spu*-*-*".
12264 * Makefile.in (clean): Remove reg-spu.c.
12265 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12266 * spu-low.c: New file.
12267
12268 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12269
12270 * configure.ac: Correct td_thr_tls_get_addr test.
12271 * configure: Regenerated.
12272
12273 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12274
12275 * linux-low.c (linux_wait_for_event): Reformat. Use the
12276 pass_signals array.
12277 * remote-utils.c (decode_address_to_semicolon): New.
12278 * server.c (pass_signals, handle_general_set): New.
12279 (handle_query): Mention QPassSignals for qSupported.
12280 (main): Call handle_general_set.
12281 * server.h (pass_signals, decode_address_to_semicolon): New.
12282
12283 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12284
12285 * server.c (handle_query): Correct error handling for read_auxv.
12286
12287 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12288
12289 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12290 and srv_linux_thread_db to yes.
12291 * linux-s390-low.c (s390_fill_gregset): New function.
12292 (target_regsets): Define data structure.
12293
12294 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12295
12296 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12297 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12298 * config.in, configure: Regenerated.
12299 * inferiors.c (gdb_id_to_thread): New function.
12300 (gdb_id_to_thread_id): Use it.
12301 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12302 * linux-low.h (struct process_info): Add th member.
12303 (thread_db_get_tls_address): New prototype.
12304 * remote-utils.c (decode_address): Make non-static.
12305 * server.c (handle_query): Handle qGetTLSAddr.
12306 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12307 * target.h (struct target_ops): Add get_tls_address.
12308 * thread-db.c (maybe_attach_thread): Save the thread handle.
12309 (thread_db_get_tls_address): New.
12310
12311 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12312
12313 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12314 (linux_resume_one_process): Take a siginfo_t *. Update all
12315 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12316 (struct pending_signals): Add a siginfo_t.
12317 (linux_wait_for_process): Always set last_status.
12318 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12319 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12320 * linux-low.h (struct process_info): Add last_status.
12321
12322 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12323
12324 * remote-utils.c (try_rle): New function.
12325 (putpkt_binary): Use it.
12326
12327 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12328
12329 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12330 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12331 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12332 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12333 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12334 point registers.
12335
12336 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12337
12338 * server.c (terminal_fd): New variable.
12339 (old_foreground_pgrp): Likewise.
12340 (restore_old_foreground_pgrp): New function.
12341 (start_inferior): Record the terminal file descriptor in terminal_fd
12342 and its original foreground group in old_foreground_pgrp. Register
12343 restore_old_foreground_pgrp with atexit().
12344
12345 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12346
12347 * server.c (handle_query): Correct qPart to qXfer.
12348
12349 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12350
12351 * configure.ac: Check for more headers which are missing on
12352 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12353 * configure.srv: Add Cygwin and mingw32.
12354 * remote-utils.c: Don't include headers unconditionally which
12355 are missing on mingw32. Include <winsock.h> for mingw32.
12356 (remote_open): Adjust for mingw32 support. Flush
12357 standard error after writing to it.
12358 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12359 (unblock_async_io, enable_async_io, disable_async_io)
12360 (readchar, getpkt): Update for Winsock support.
12361 (prepare_resume_reply): Expect a protocol signal number.
12362 * server.c: Disable <sys/wait.h> on mingw32.
12363 (start_inferior): Adjust for mingw32 support. Flush
12364 standard error after writing to it.
12365 (attach_inferior): Likewise. Use protocol signal
12366 numbers.
12367 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12368 and names.
12369 * win32-i386-low.c: New file.
12370 * Makefile.in (XM_CLIBS): Set.
12371 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12372 (win32-i386-low.o): New dependency rule.
12373 * linux-low.c (linux_wait): Use target signal numbers.
12374 * target.h (struct target_ops): Doc fix.
12375 * server.h (target_signal_to_name): New prototype.
12376 * gdbreplay.c: Don't include headers unconditionally which
12377 are missing on mingw32. Include <winsock.h> for mingw32.
12378 (remote_close, remote_open): Adjust for Winsock support.
12379 * configure, config.in: Regenerated.
12380
12381 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12382
12383 * server.c (decode_xfer_read, write_qxfer_response): New.
12384 (handle_query): Take a packet length argument. Handle
12385 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12386 the qSupported response.
12387 (main): Update call to handle_query.
12388
12389 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12390
12391 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12392 (putpkt_binary): Renamed from putpkt and adjusted for binary
12393 data.
12394 (putpkt): New wrapper for putpkt_binary.
12395 (readchar): Don't mask off the high bit.
12396 (decode_X_packet): New function.
12397 * server.c (main): Call putpkt_binary if a handler sets the packet
12398 length. Save the length of the incoming packet. Handle 'X'.
12399 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12400
12401 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12402
12403 * server.c (handle_query): Handle qSupported.
12404
12405 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12406
12407 * remote-utils.c (all_symbols_looked_up): New variable.
12408 (look_up_one_symbol): Check it.
12409 * server.h (look_up_one_symbol): New declaration.
12410 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12411
12412 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12413
12414 * Makefile.in (linux-arm-low.o): Update dependencies.
12415 * linux-arm-low.c: Include "gdb_proc_service.h".
12416 (PTRACE_GET_THREAD_AREA): Define.
12417 (ps_get_thread_area): New function.
12418
12419 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12420
12421 * configure.srv (m68k*-*-uclinux*): New target.
12422 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12423 (linux_resume_one_process): Remove extraneous cast.
12424 (linux_read_offsets): New.
12425 (linux_target_op): Add linux_read_offsets on mmuless systems.
12426 * server.c (handle_query): Add qOffsets logic.
12427 * target.h (struct target_ops): Add read_offsets.
12428
12429 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12430
12431 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12432 (PTRACE_GET_THREAD_AREA): Define.
12433 (ps_get_thread_area): New function.
12434 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12435 (linux-x86-64-low.o): Update.
12436
12437 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12438
12439 * configure.ac: Remove checks for prfpregset_t.
12440 * gdb_proc_service.h: New file.
12441 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12442 new "gdb_proc_service.h".
12443 * proc-service.c: Likewise.
12444 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12445 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12446 * Makefile.in (gdb_proc_service_h): Updated.
12447 * configure, config.in: Regenerated.
12448
12449 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12450
12451 * remote-utils.c (prepare_resume_reply): Move declaration
12452 of gdb_id_from_wait to the top of the block.
12453
12454 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12455
12456 * linux-low.c (regsets_store_inferior_registers): Read the regset
12457 from the target before filling it.
12458
12459 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12460
12461 * server.c (attach_inferior): Return SIGTRAP for a successful
12462 attach.
12463
12464 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12465
12466 * Makefile.in (OBS): Add version.o.
12467 (STAGESTUFF): Delete.
12468 (version.o): Add dependencies.
12469 (version.c): Replace rule.
12470 (clean): Remove version.c.
12471 * server.c (gdbserver_version): New.
12472 (gdbserver_usage): Use printf.
12473 (main): Handle --version and --help.
12474 * server.h (version, host_name): Add declarations.
12475
12476 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12477
12478 * linux-arm-low.c:
12479 * linux-arm-low.c:
12480 * inferiors.c:
12481 * i387-fp.h:
12482 * i387-fp.c:
12483 * gdbreplay.c:
12484 * regcache.c:
12485 * proc-service.c:
12486 * mem-break.h:
12487 * mem-break.c:
12488 * linux-x86-64-low.c:
12489 * linux-sh-low.c:
12490 * linux-s390-low.c:
12491 * linux-ppc64-low.c:
12492 * linux-ppc-low.c:
12493 * linux-mips-low.c:
12494 * linux-m68k-low.c:
12495 * linux-m32r-low.c:
12496 * linux-low.h:
12497 * linux-low.c:
12498 * linux-ia64-low.c:
12499 * linux-i386-low.c:
12500 * linux-crisv32-low.c:
12501 * thread-db.c:
12502 * terminal.h:
12503 * target.h:
12504 * target.c:
12505 * server.h:
12506 * server.c:
12507 * remote-utils.c:
12508 * regcache.h:
12509 * utils.c:
12510 * Makefile.in:
12511 * configure.ac:
12512 * gdbserver.1: Add (C) after Copyright. Update the FSF
12513 address.
12514
12515 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12516
12517 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12518 (arm_breakpoint_at): Recognize both breakpoints.
12519 (the_low_target): Use the correct breakpoint instruction.
12520
12521 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12522
12523 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12524 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12525 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12526 (the_low_target): Update.
12527
12528 2005-10-25 Andreas Schwab <schwab@suse.de>
12529
12530 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12531
12532 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12533 (ia64_num_regs): Reduce to 462.
12534
12535 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12536
12537 * acinclude.m4: Correct quoting.
12538 * aclocal.m4: Regenerated.
12539
12540 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12541 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12542 (thread_db_init): Call thread_db_err_str.
12543 * configure.ac: Check for TD_VERSION.
12544 * config.in, configure: Regenerated.
12545
12546 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12547
12548 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12549
12550 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12551
12552 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12553 is not available. Define HAVE_PTRACE_GETREGS if it is.
12554 * config.in, configure: Regenerated.
12555 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12556 * linux-i386-low.c, linux-m68k-low.c: Update to use
12557 HAVE_PTRACE_GETREGS.
12558 * linux-low.c (regsets_fetch_inferior_registers)
12559 (regsets_store_inferior_registers): Only return 0 if we processed
12560 GENERAL_REGS.
12561 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12562 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12563
12564 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12565
12566 * inferiors.c (struct thread_info): Add gdb_id.
12567 (add_thread): Add gdb_id argument.
12568 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12569 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12570 calls to add_thread.
12571 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12572 * server.c (handle_query): Use thread_to_gdb_id.
12573 (handle_v_cont, main): Use gdb_id_to_thread_id.
12574 * server.h (add_thread): Update prototype.
12575 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12576 prototypes.
12577
12578 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12579
12580 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12581 left-padded registers.
12582 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12583 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12584
12585 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12586
12587 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12588 * configure: Regenerate.
12589 * config.in: Regenerate.
12590 * server.h (NEED_DECLARATION_STRERROR):
12591 Replace with !HAVE_DECL_STRERROR.
12592
12593 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12594
12595 * linux-low.c (linux_wait, linux_send_signal): Don't test
12596 an unsigned long variable for > 0 if it could be MAX_ULONG.
12597 * server.c (myresume): Likewise.
12598 * target.c (set_desired_inferior): Likewise.
12599
12600 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12601
12602 * configure.ac: Simplify and improve check for socklen_t.
12603 * configure, config.in: Regenerate.
12604
12605 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12606
12607 * acconfig.h: Remove.
12608 * configure.ac: Add a test for socklen_t. Use three-argument
12609 AC_DEFINE throughout.
12610 * config.in: Regenerated using autoheader 2.59.
12611 * configure: Regenerated.
12612
12613 * gdbreplay.c (socklen_t): Provide a default.
12614 (remote_open): Use socklen_t.
12615 * remote-utils.c (socklen_t): Provide a default.
12616 (remote_open): Use socklen_t.
12617 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12618 unsigned char.
12619
12620 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12621 char for buffers.
12622 * linux-low.c (linux_read_memory, linux_write_memory)
12623 (linux_read_auxv): Likewise.
12624 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12625 (check_mem_write): Likewise.
12626 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12627 Likewise.
12628 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12629 (registers_from_string, register_data): Likewise.
12630 * server.c (handle_query, main): Likewise.
12631 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12632 (decode_M_packet): Likewise.
12633 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12634 * target.h (struct target_ops): Update read_memory, write_memory,
12635 and read_auxv.
12636 (read_inferior_memory, write_inferior_memory): Update.
12637 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12638 to unsigned char *.
12639 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12640 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12641 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12642 linux-s390-low.c, linux-sh-low.c: Update for changes in
12643 read_inferior_memory and the_low_target->breakpoint.
12644
12645 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12646
12647 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12648 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12649 * configure.srv: Add powerpc64-*-linux*.
12650 * linux-ppc64-low.c: New file.
12651
12652 2005-05-23 Orjan Friberg <orjanf@axis.com>
12653
12654 * linux-cris-low.c: New file with support for CRIS.
12655 * linux-crisv32-low.c: Ditto for CRISv32.
12656 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12657 (clean): Add reg-cris.c and reg-crisv32.c.
12658 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12659 reg-crisv32.o, and reg-crisv32.c to make rules.
12660 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12661 recognized targets.
12662
12663 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12664
12665 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12666 of sizeof (PTRACE_XFER_TYPE).
12667 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12668
12669 2005-05-12 Orjan Friberg <orjanf@axis.com>
12670
12671 * target.h (struct target_ops): Add insert_watchpoint,
12672 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12673 pointers for hardware watchpoint support.
12674 * linux-low.h (struct linux_target_ops): Ditto.
12675 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12676 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12677 to linux_target_ops.
12678 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12679 reply packet.
12680 * server.c (main): Recognize 'Z' and 'z' packets.
12681
12682 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12683
12684 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12685 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12686 (the_low_target): Add new members.
12687
12688 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12689
12690 * proc-service.c (ps_lgetregs): Search all_processes instead of
12691 all_threads.
12692
12693 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12694
12695 * server.c (start_inferior): Change return type to int.
12696 (attach_inferior): Change sigptr to int *.
12697 (handle_v_cont, handle_v_requests): Change signal to int *.
12698 (main): Change signal to int.
12699
12700 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12701
12702 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12703 * configure.srv: Add m32r*-*-linux*.
12704 * linux-m32r-low.c: New file.
12705
12706 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12707
12708 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12709
12710 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12711
12712 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12713 Take unsigned long arguments for PIDs.
12714 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12715 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12716 (wait_for_sigstop, linux_resume_one_process)
12717 (regsets_fetch_inferior_registers, linux_send_signal)
12718 (linux_read_auxv): Likewise. Update the types of variables holding
12719 PIDs. Update format string specifiers.
12720 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12721 * remote-utils.c (prepare_resume_reply): Likewise.
12722 * server.c (cont_thread, general_thread, step_thread)
12723 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12724 unsigned long.
12725 (handle_query): Update format specifiers.
12726 (handle_v_cont, main): Use strtoul for thread IDs.
12727 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12728 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12729 (general_thread, step_thread, thread_from_wait)
12730 (old_thread_from_wait): Update.
12731 * target.h (struct thread_resume): Use unsigned long for THREAD.
12732 (struct target_ops): Use unsigned long for arguments to attach and
12733 thread_alive.
12734
12735 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12736
12737 * acinclude.m4: Include bfd/bfd.m4 directly.
12738 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12739 <agriffis@toolchain.org>.
12740 * aclocal.m4, configure: Regenerated.
12741
12742 2005-01-07 Andrew Cagney <cagney@gnu.org>
12743
12744 * configure.ac: Rename configure.in, require autoconf 2.59.
12745 * configure: Re-generate.
12746
12747 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12748
12749 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12750 LIBS when finished.
12751 * aclocal.m4: Regenerated.
12752 * configure: Regenerated.
12753
12754 2004-11-21 Andreas Schwab <schwab@suse.de>
12755
12756 * linux-m68k-low.c (m68k_num_gregs): Define.
12757 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12758 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12759 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12760 (m68k_breakpoint_at): New. Add to the_low_target.
12761
12762 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12763 srv_linux_thread_db to yes.
12764
12765 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12766
12767 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12768 (ARCH_SET_FS): Likewise.
12769 (ARCH_GET_FS): Likewise.
12770 (ARCH_GET_GS): Likewise.
12771
12772 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12773
12774 * linux-i386-low.c (ps_get_thread_area): New.
12775 * linux-x86-64-low.c (ps_get_thread_area): New.
12776 * linux-low.c: Include <sys/syscall.h>.
12777 (linux_kill_one_process): Don't kill the first thread here.
12778 (linux_kill): Kill the first thread here.
12779 (kill_lwp): New function.
12780 (send_sigstop, linux_send_signal): Use it.
12781 * proc-service.c: Clean up #ifdefs.
12782 (fpregset_info): Delete.
12783 (ps_lgetregs): Update and enable implementation.
12784 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12785 implementations.
12786 * remote-utils.c (struct sym_cache, symbol_cache): New.
12787 (input_interrupt): Print a clearer message.
12788 (async_io_enabled): New variable.
12789 (enable_async_io, disable_async_io): Use it. Update comments.
12790 (look_up_one_symbol): Use the symbol cache.
12791 * thread-db.c (thread_db_look_up_symbols): New function.
12792 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12793
12794 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12795
12796 * configure.in: Test for -rdynamic.
12797 * configure: Regenerated.
12798 * Makefile (INTERNAL_LDFLAGS): New.
12799 (gdbserver, gdbreplay): Use it.
12800
12801 2004-09-02 Andrew Cagney <cagney@gnu.org>
12802
12803 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12804
12805 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12806
12807 * linux-low.c (linux_wait): Clear all_processes list also.
12808
12809 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12810
12811 * linux-low.c: Include <errno.h>. Remove extern declaration of
12812 errno.
12813
12814 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12815
12816 * gdbreplay.c, server.h, utils.c: Update copyright years.
12817
12818 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12819
12820 * server.c (main): Print child status or termination signal from
12821 variable 'signal', not 'sig'.
12822
12823 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12824
12825 * linux-low.c (linux_read_memory): Change return type to
12826 int. Check for and return error from ptrace().
12827 * target.c (read_inferior_memory): Change return type to int. Pass
12828 back return status from the_target->read_memory().
12829 * target.h (struct target_ops): Adapt *read_memory() prototype.
12830 Update comment.
12831 (read_inferior_memory): Adapt prototype.
12832 * server.c (main): Return an error packet if
12833 read_inferior_memory() returns an error.
12834
12835 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12836
12837 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12838 Unify with other clean targets.
12839
12840 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12841
12842 * server.c (handle_v_cont): Call set_desired_inferior.
12843
12844 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12845
12846 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12847
12848 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12849
12850 * linux-low.c (linux_wait): Unblock async I/O.
12851 (linux_resume): Block and enable async I/O.
12852 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12853 * server.h (block_async_io, unblock_async_io): Add prototypes.
12854
12855 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12856
12857 * remote-utils.c (remote_open): Print a status notice after
12858 opening a TCP port.
12859 * server.c (attach_inferior): Print a status notice after
12860 attaching.
12861
12862 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12863
12864 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12865
12866 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12867
12868 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12869 error packet.
12870 * server.c, target.h: Update copyright years.
12871
12872 2004-02-25 Roland McGrath <roland@redhat.com>
12873
12874 * target.h (struct target_ops): New member `read_auxv'.
12875 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12876 * linux-low.c (linux_read_auxv): New function.
12877 (linux_target_ops): Initialize `read_auxv' member to that.
12878
12879 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12880
12881 Committed by Jim Blandy <jimb@redhat.com>.
12882
12883 * linux-s390-low.c (s390_num_regs): Update.
12884 (s390_regmap): Remove control registers. Use __s390x__ predefine
12885 instead of GPR_SIZE to distiguish s390 and s390x targets.
12886
12887 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12888
12889 * linux-low.c: Update copyright year.
12890 (check_removed_breakpoint): Clear pending_is_breakpoint.
12891 (linux_set_resume_request, linux_queue_one_thread)
12892 (resume_status_pending_p): New functions.
12893 (linux_continue_one_thread): Use process->resume.
12894 (linux_resume): Only resume threads if there are no pending events.
12895 * linux-low.h (struct process_info): Add resume request
12896 pointer.
12897
12898 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12899
12900 * regcache.c (new_register_cache): Clear the allocated register
12901 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12902
12903 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12904
12905 * linux-low.c (linux_resume): Take a struct thread_resume *
12906 argument.
12907 (linux_wait): Update call.
12908 (resume_ptr): New static variable.
12909 (linux_continue_one_thread): Renamed from
12910 linux_continue_one_process. Use resume_ptr.
12911 (linux_resume): Use linux_continue_one_thread.
12912 * server.c (handle_v_cont, handle_v_requests): New functions.
12913 (myresume): New function.
12914 (main): Handle 'v' case.
12915 * target.h (struct thread_resume): New type.
12916 (struct target_ops): Change argument of "resume" to struct
12917 thread_resume *.
12918 (myresume): Delete macro.
12919
12920 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12921
12922 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12923 (uninstall): Support DESTDIR.
12924
12925 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12926
12927 * configure.srv: Add xscale*linux copy of arm*linux entry.
12928
12929 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12930
12931 * linux-arm-low.c (arm_reinsert_addr): New function.
12932 (the_low_target): Add arm_reinsert_addr.
12933
12934 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12935
12936 * mem-break.c: Remove whitespace at end of file.
12937
12938 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12939
12940 * configure.in: Check whether we need to prototype strerror.
12941 * server.h: Optionally prototype strerror.
12942 * gdbreplay.c (perror_with_name): Use strerror.
12943 * linux-low.c (linux_attach_lwp): Use strerror.
12944 * utils.c (perror_with_name): Use strerror.
12945 * config.in, configure: Regenerated.
12946
12947 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12948
12949 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12950 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12951
12952 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12953
12954 * Makefile.in (SFILES): Update.
12955 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12956 low-sun3.c: Remove files.
12957
12958 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12959
12960 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12961 (linux_detach_one_process, linux_detach): New functions.
12962 (linux_target_ops): Add linux_detach.
12963 * server.c (main): Handle 'D' packet.
12964 * target.h (struct target_ops): Add "detach" member.
12965 (detach_inferior): Define.
12966
12967 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12968
12969 From Kelley Cook <kelleycook@wideopenwest.com>:
12970 * configure.srv: Accept i[34567]86 variants.
12971
12972 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12973
12974 * linux-low.c (linux_wait_for_event): Correct comment typos.
12975 (linux_resume_one_process): Call check_removed_breakpoint.
12976 (linux_send_signal): New function.
12977 (linux_target_ops): Add linux_send_signal.
12978 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12979 of kill.
12980 * target.h (struct target_ops): Add send_signal.
12981
12982 2003-05-29 Jim Blandy <jimb@redhat.com>
12983
12984 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12985 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12986 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12987 away part of the register's value.
12988
12989 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12990
12991 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12992 (linux_wait_for_event, linux_init_signals): Likewise.
12993
12994 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12995
12996 * configure.in: Check for stdlib.h.
12997 * configure: Regenerated.
12998 * config.in: Regenerated.
12999
13000 2003-01-04 Andreas Schwab <schwab@suse.de>
13001
13002 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13003
13004 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13005
13006 * Makefile.in: Remove obsolete code.
13007
13008 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13009
13010 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13011 defined(PT_FPR0_HI).
13012
13013 2002-11-17 Stuart Hughes <seh@zee2.com>
13014
13015 * linux-arm-low.c (arm_num_regs): Increase.
13016 (arm_regmap): Include status register.
13017
13018 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13019
13020 * linux-low.c (register_addr): Remove incorrect -1 check.
13021
13022 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13023
13024 * linux-low.c (linux_create_inferior): Call setpgid. Return
13025 the new PID.
13026 (unstopped_p, linux_signal_pid): Remove.
13027 (linux_target_ops): Remove linux_signal_pid.
13028 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13029 global instead of target method.
13030 * target.h (struct target_ops): Remove signal_pid. Update comment
13031 for create_inferior.
13032 * server.c (signal_pid): New variable.
13033 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13034 gdbserver. Set the child to be the foreground process group.
13035 (attach_inferior): Set signal_pid.
13036
13037 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13038
13039 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13040
13041 2002-08-20 Jim Blandy <jimb@redhat.com>
13042
13043 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13044 default for this.
13045
13046 2002-08-01 Andrew Cagney <cagney@redhat.com>
13047
13048 * Makefile.in: Make chill references obsolete.
13049
13050 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13051
13052 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13053 * configure: Regenerate.
13054 * config.in: Regenerate.
13055
13056 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13057
13058 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13059 (perror_with_name, remote_close, remote_open, expect, play): Static.
13060
13061 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13062
13063 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13064 byte offsets instead of an array of indexes.
13065 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13066
13067 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13068
13069 * regcache.c: Add comment.
13070
13071 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13072
13073 * thread-db.c: New file.
13074 * proc-service.c: New file.
13075 * acinclude.m4: New file.
13076 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13077 proc-service.o, and thread-db.o.
13078 (linux-low.o): Add USE_THREAD_DB.
13079 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13080 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13081 * aclocal.m4: Regenerated.
13082 * config.in: Regenerated.
13083 * configure: Regenerated.
13084 * configure.in: Check for proc_service.h, sys/procfs.h,
13085 thread_db.h, and linux/elf.h headrs.
13086 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13087 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13088 Check for -lthread_db and thread support.
13089 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13090 PowerPC, and SuperH.
13091 * i387-fp.c: Constify arguments.
13092 * i387-fp.h: Likewise.
13093 * inferiors.c: (struct thread_info): Renamed from
13094 `struct inferior_info'. Remove PID member. Use generic inferior
13095 list header. All uses updated.
13096 (inferiors, signal_pid): Removed.
13097 (all_threads): New variable.
13098 (get_thread): Define.
13099 (add_inferior_to_list): New function.
13100 (for_each_inferior): New function.
13101 (change_inferior_id): New function.
13102 (add_inferior): Removed.
13103 (remove_inferior): New function.
13104 (add_thread): New function.
13105 (free_one_thread): New function.
13106 (remove_thread): New function.
13107 (clear_inferiors): Use for_each_inferior and free_one_thread.
13108 (find_inferior): New function.
13109 (find_inferior_id): New function.
13110 (inferior_target_data): Update argument type.
13111 (set_inferior_target_data): Likewise.
13112 (inferior_regcache_data): Likewise.
13113 (set_inferior_regcache_data): Likewise.
13114 * linux-low.c (linux_bp_reinsert): Remove.
13115 (all_processes, stopping_threads, using_thrads)
13116 (struct pending_signals, debug_threads, pid_of): New.
13117 (inferior_pid): Replace with macro.
13118 (struct inferior_linux_data): Remove.
13119 (get_stop_pc, add_process): New functions.
13120 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13121 Use add_process and add_thread.
13122 (linux_attach_lwp): New function, based on old linux_attach. Use
13123 add_process and add_thread. Set stop_expected for new threads.
13124 (linux_attach): New function.
13125 (linux_kill_one_process): New function.
13126 (linux_kill): Kill all LWPs.
13127 (linux_thread_alive): Use find_inferior_id.
13128 (check_removed_breakpoints, status_pending_p): New functions.
13129 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13130 Update. Use WNOHANG. Wait for cloned processes also. Update process
13131 struct for the found process.
13132 (linux_wait_for_event): New function.
13133 (linux_wait): Use it. Support LWPs.
13134 (send_sigstop, wait_for_sigstop, stop_all_processes)
13135 (linux_resume_one_process, linux_continue_one_process): New functions.
13136 (linux_resume): Support LWPs.
13137 (REGISTER_RAW_SIZE): Remove.
13138 (fetch_register): Use register_size instead. Call supply_register.
13139 (usr_store_inferior_registers): Likewise. Call collect_register.
13140 Fix recursive case.
13141 (regsets_fetch_inferior_registers): Improve error message.
13142 (regsets_store_inferior_registers): Add debugging.
13143 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13144 (unstopped_p, linux_signal_pid): New functions.
13145 (linux_target_ops): Add linux_signal_pid.
13146 (linux_init_signals): New function.
13147 (initialize_low): Call it. Initialize using_threads.
13148 * regcache.c (inferior_regcache_data): Add valid
13149 flag.
13150 (get_regcache): Fetch registers lazily. Add fetch argument
13151 and update all callers.
13152 (regcache_invalidate_one, regcache_invalidate): New
13153 functions.
13154 (new_register_cache): Renamed from create_register_cache.
13155 Return the new regcache.
13156 (free_register_cache): Change argument to a void *.
13157 (registers_to_string, registers_from_string): Call get_regcache
13158 with fetch flag set.
13159 (register_data): Make static. Pass fetch flag to get_regcache.
13160 (supply_register): Call get_regcache with fetch flag clear.
13161 (collect_register): Call get_regcache with fetch flag set.
13162 (collect_register_as_string): New function.
13163 * regcache.h: Update.
13164 * remote-utils.c (putpkt): Flush after debug output and use
13165 stderr.
13166 Handle input interrupts while waiting for an ACK.
13167 (input_interrupt): Use signal_pid method.
13168 (getpkt): Flush after debug output and use stderr.
13169 (outreg): Use collect_register_as_string.
13170 (new_thread_notify, dead_thread_notify): New functions.
13171 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13172 and general_thread.
13173 (look_up_one_symbol): Flush after debug output.
13174 * server.c (step_thread, server_waiting): New variables.
13175 (start_inferior): Don't use signal_pid. Update call to mywait.
13176 (attach_inferior): Update call to mywait.
13177 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13178 (main): Don't fetch/store registers explicitly. Use
13179 set_desired_inferior. Support proposed ``Hs'' packet. Update
13180 calls to mywait.
13181 * server.h: Update.
13182 (struct inferior_list, struct_inferior_list_entry): New.
13183 * target.c (set_desired_inferior): New.
13184 (write_inferior_memory): Constify.
13185 (mywait): New function.
13186 * target.h: Update.
13187 (struct target_ops): New signal_pid method.
13188 (mywait): Removed macro, added prototype.
13189
13190 * linux-low.h (regset_func): Removed.
13191 (regset_fill_func, regset_store_func): New.
13192 (enum regset_type): New.
13193 (struct regset_info): Add type field. Use new operation types.
13194 (struct linux_target_ops): stop_pc renamed to get_pc.
13195 Add decr_pc_after_break and breakpoint_at.
13196 (get_process, get_thread_proess, get_process_thread)
13197 (strut process_info, all_processes, linux_attach_lwp)
13198 (thread_db_init): New.
13199
13200 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13201 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13202 (the_low_target): Add new members.
13203 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13204 (i386_store_fpxregset): Constify.
13205 (target_regsets): Add new kind identifier.
13206 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13207 (i386_set_pc): Add debugging.
13208 (i386_breakpoint_at): New function.
13209 (the_low_target): Add new members.
13210 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13211 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13212 (mips_breakpoint_at): New.
13213 (the_low_target): Add new members.
13214 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13215 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13216 (the_low_target): Add new members.
13217 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13218 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13219 (the_low_target): Add new members.
13220 * linux-x86-64-low.c (target_regsets): Add new kind
13221 identifier.
13222
13223 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13224
13225 From Martin Pool <mbp@samba.org>:
13226 * server.c (gdbserver_usage): New function.
13227 (main): Call it.
13228
13229 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13230
13231 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13232 stop_at -> stop_pc.
13233
13234 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13235
13236 * Makefile.in: Remove obsolete code.
13237
13238 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13239
13240 * linux-low.c (regsets_fetch_inferior_registers),
13241 (regsets_store_inferior_registers): Removed cast to int from
13242 ptrace() calls.
13243 * regcache.h: Added declaration of struct inferior_info.
13244
13245 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13246
13247 * inferiors.c (struct inferior_info): Add regcache_data.
13248 (add_inferior): Call create_register_cache.
13249 (clear_inferiors): Call free_register_cache.
13250 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13251 * regcache.c (struct inferior_regcache_data): New.
13252 (registers): Remove.
13253 (get_regcache): New function.
13254 (create_register_cache, free_register_cache): New functions.
13255 (set_register_cache): Don't initialize the register cache here.
13256 (registers_to_string, registers_from_string, register_data): Call
13257 get_regcache.
13258 * regcache.h: Add prototypes.
13259 * server.h: Likewise.
13260
13261 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13262
13263 * mem-break.c: New file.
13264 * mem-break.h: New file.
13265 * Makefile.in: Add mem-break.o rule; update server.h
13266 dependencies.
13267 * inferiors.c (struct inferior_info): Add target_data
13268 member.
13269 (clear_inferiors): Free target_data member if set.
13270 (inferior_target_data, set_inferior_target_data): New functions.
13271 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13272 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13273 * linux-low.c (linux_bp_reinsert): New variable.
13274 (struct inferior_linux_data): New.
13275 (linux_create_inferior): Use set_inferior_target_data.
13276 (linux_attach): Likewise. Call add_inferior.
13277 (linux_wait_for_one_inferior): New function.
13278 (linux_wait): Call it.
13279 (linux_write_memory): Add const.
13280 (initialize_low): Call set_breakpoint_data.
13281 * linux-low.h (struct linux_target_ops): Add breakpoint
13282 handling members.
13283 * server.c (attach_inferior): Remove extra add_inferior
13284 call.
13285 * server.h: Include mem-break.h. Update inferior.c
13286 prototypes.
13287 * target.c (read_inferior_memory)
13288 (write_inferior_memory): New functions.
13289 * target.h (read_inferior_memory)
13290 (write_inferior_memory): Change macros to prototypes.
13291 (struct target_ops): Update comments. Add const to write_memory
13292 definition.
13293
13294 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13295
13296 * linux-low.c (usr_store_inferior_registers): Support
13297 registers which are allowed to fail to store.
13298 * linux-low.h (linux_target_ops): Likewise.
13299 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13300 (ppc_cannot_store_register): FPSCR may not be storable.
13301
13302 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13303
13304 * server.h: Include <string.h> if HAVE_STRING_H.
13305 * ChangeLog: Correct paths in last ChangeLog entry.
13306
13307 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13308
13309 * linux-low.h: Remove obsolete prototypes.
13310 (struct linux_target_ops): New.
13311 (extern the_low_target): New.
13312 * linux-low.c (num_regs, regmap): Remove declarations.
13313 (register_addr): Use the_low_target explicitly.
13314 (fetch_register): Likewise.
13315 (usr_fetch_inferior_registers): Likewise.
13316 (usr_store_inferior_registers): Likewise.
13317 * linux-arm-low.c (num_regs): Remove.
13318 (arm_num_regs): Define.
13319 (arm_regmap): Renamed from regmap, made static.
13320 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13321 made static.
13322 (arm_cannot_store_register): Renamed from cannot_store_register,
13323 made static.
13324 (the_low_target): New.
13325 * linux-i386-low.c (num_regs): Remove.
13326 (i386_num_regs): Define.
13327 (i386_regmap): Renamed from regmap, made static.
13328 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13329 made static.
13330 (i386_cannot_store_register): Renamed from cannot_store_register,
13331 made static.
13332 (the_low_target): New.
13333 * linux-ia64-low.c (num_regs): Remove.
13334 (ia64_num_regs): Define.
13335 (ia64_regmap): Renamed from regmap, made static.
13336 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13337 made static.
13338 (ia64_cannot_store_register): Renamed from cannot_store_register,
13339 made static.
13340 (the_low_target): New.
13341 * linux-m68k-low.c (num_regs): Remove.
13342 (m68k_num_regs): Define.
13343 (m68k_regmap): Renamed from regmap, made static.
13344 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13345 made static.
13346 (m68k_cannot_store_register): Renamed from cannot_store_register,
13347 made static.
13348 (the_low_target): New.
13349 * linux-mips-low.c (num_regs): Remove.
13350 (mips_num_regs): Define.
13351 (mips_regmap): Renamed from regmap, made static.
13352 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13353 made static.
13354 (mips_cannot_store_register): Renamed from cannot_store_register,
13355 made static.
13356 (the_low_target): New.
13357 * linux-ppc-low.c (num_regs): Remove.
13358 (ppc_num_regs): Define.
13359 (ppc_regmap): Renamed from regmap, made static.
13360 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13361 made static.
13362 (ppc_cannot_store_register): Renamed from cannot_store_register,
13363 made static.
13364 (the_low_target): New.
13365 * linux-s390-low.c (num_regs): Remove.
13366 (s390_num_regs): Define.
13367 (s390_regmap): Renamed from regmap, made static.
13368 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13369 made static.
13370 (s390_cannot_store_register): Renamed from cannot_store_register,
13371 made static.
13372 (the_low_target): New.
13373 * linux-sh-low.c (num_regs): Remove.
13374 (sh_num_regs): Define.
13375 (sh_regmap): Renamed from regmap, made static.
13376 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13377 made static.
13378 (sh_cannot_store_register): Renamed from cannot_store_register,
13379 made static.
13380 (the_low_target): New.
13381 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13382 (the_low_target): New.
13383
13384 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13385
13386 * Makefile.in: Add stamp-h target.
13387 * configure.in: Create stamp-h.
13388 * configure: Regenerated.
13389
13390 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13391
13392 * inferiors.c: New file.
13393 * target.c: New file.
13394 * target.h: New file.
13395 * Makefile.in: Add target.o and inferiors.o. Update
13396 dependencies.
13397 * linux-low.c (inferior_pid): New static variable,
13398 moved from server.c.
13399 (linux_create_inferior): Renamed from create_inferior.
13400 Call add_inferior. Return 0 on success instead of a PID.
13401 (linux_attach): Renamed from myattach.
13402 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13403 (linux_thread_alive): Renamed from mythread_alive.
13404 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13405 child dies.
13406 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13407 (regsets_store_inferior_registers): Correct error message.
13408 Add missing ``return 0''.
13409 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13410 (linux_store_registers): Renamed from store_inferior_registers.
13411 (linux_read_memory): Renamed from read_inferior_memory.
13412 (linux_write_memory): Renamed from write_inferior_memory.
13413 (linux_target_ops): New structure.
13414 (initialize_low): Call set_target_ops ().
13415 * remote-utils.c (unhexify): New function.
13416 (hexify): New function.
13417 (input_interrupt): Send signals to ``signal_pid''.
13418 * server.c (inferior_pid): Remove.
13419 (start_inferior): Update create_inferior call.
13420 (attach_inferior): Call add_inferior.
13421 (handle_query): New function.
13422 (main): Call handle_query for `q' packets.
13423 * server.h: Include "target.h". Remove obsolete prototypes.
13424 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13425
13426 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13427
13428 * Makefile.in: Add WARN_CFLAGS. Update configury
13429 dependencies.
13430 * configure.in: Check for <string.h>
13431 * configure: Regenerate.
13432 * config.in: Regenerate.
13433 * gdbreplay.c: Include needed system headers.
13434 (remote_open): Remove strchr prototype.
13435 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13436 * regcache.c (supply_register): Change buf argument to const void *.
13437 (supply_register_by_name): Likewise.
13438 (collect_register): Change buf argument to void *.
13439 (collect_register_by_name): Likewise.
13440 * regcache.h: Add missing prototypes.
13441 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13442 * server.c (handle_query): New function.
13443 (attached): New static variable, moved out of main.
13444 (main): Quiet longjmp clobber warnings.
13445 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13446 * utils.c (error): Remove NORETURN.
13447 (fatal): Likewise.
This page took 0.340783 seconds and 5 git commands to generate.