Remove argument pc in get_next_pcs
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2016-01-26 Yao Qi <yao.qi@linaro.org>
2
3 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4 * linux-low.c (install_software_single_step_breakpoints): Don't
5 call regcache_read_pc.
6 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
7 argument pc.
8
9 2016-01-26 Yao Qi <yao.qi@linaro.org>
10
11 * linux-low.c (install_software_single_step_breakpoints): Call
12 regcache_read_pc instead of get_pc.
13
14 2016-01-26 Yao Qi <yao.qi@linaro.org>
15
16 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
17 (unblock_async_io): Rename to ...
18 (block_unblock_async_io): ... it. New function.
19 (enable_async_io): Don't install SIGIO handler. Unblock it
20 instead.
21 (disable_async_io): Don't ignore SIGIO. Block it instead.
22 (initialize_async_io): Install SIGIO handler. Don't call
23 unblock_async_io.
24
25 2016-01-26 Yao Qi <yao.qi@linaro.org>
26
27 * remote-utils.c (getpkt): If the buffer isn't empty, and the
28 first character is '\003', call *the_target->request_interrupt.
29
30 2016-01-25 Yao Qi <yao.qi@linaro.org>
31
32 * remote-utils.c (new_thread_notify): Remove.
33 (dead_thread_notify): Likewise.
34 * remote-utils.h (new_thread_notify): Remove declaration.
35 (dead_thread_notify): Likewise.
36
37 2016-01-23 Marcin Koƛcielnicki <koriakin@0x04.net>
38
39 * gdb.trace/pending.exp: Fix expected message on continue.
40
41 2016-01-22 Marcin Koƛcielnicki <koriakin@0x04.net>
42
43 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
44 it works properly on big-endian machines where sizeof (CORE_ADDR)
45 != sizeof (void *).
46
47 2016-01-21 Pedro Alves <palves@redhat.com>
48
49 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
50 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
51 * configure: Regenerate.
52
53 2016-01-21 Yao Qi <yao.qi@linaro.org>
54
55 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
56 is_thumb and set it according to CPSR saved on the stack.
57 (get_next_pcs_syscall_next_pc): Pass is_thumb to
58 arm_sigreturn_next_pc.
59
60 2016-01-18 Yao Qi <yao.qi@linaro.org>
61
62 * linux-low.c (linux_set_pc_64bit): New function.
63 (linux_get_pc_64bit): New function.
64 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
65 Declare.
66 * linux-sparc-low.c (debug_threads): Remove declaration.
67 (sparc_get_pc): Remove.
68 (the_low_target): Use linux_get_pc_64bit instead of
69 sparc_get_pc.
70 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
71 (the_low_target): Use linux_get_pc_64bit and
72 linux_set_pc_64bit.
73
74 2016-01-18 Yao Qi <yao.qi@linaro.org>
75
76 * linux-arm-low.c (debug_threads): Remove declaration.
77 (arm_get_pc, arm_set_pc): Remove.
78 (the_low_target): Use linux_get_pc_32bit and
79 linux_set_pc_32bit.
80 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
81 (the_low_target): Use linux_get_pc_32bit and
82 linux_set_pc_32bit.
83 * linux-cris-low.c (debug_threads): Remove declaration.
84 (cris_get_pc, cris_set_pc,): Remove.
85 (the_low_target): Use linux_get_pc_32bit and
86 linux_set_pc_32bit.
87 * linux-crisv32-low.c (debug_threads): Remove declaration.
88 (cris_get_pc, cris_set_pc): Remove.
89 (the_low_target): Use linux_get_pc_32bit and
90 linux_set_pc_32bit.
91 * linux-low.c: Include inttypes.h.
92 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
93 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
94 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
95 (the_low_target): Use linux_get_pc_32bit and
96 linux_set_pc_32bit.
97 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
98 (the_low_target): Use linux_get_pc_32bit and
99 linux_set_pc_32bit.
100 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
101 (the_low_target): Use linux_get_pc_32bit and
102 linux_set_pc_32bit.
103 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
104 (the_low_target): Use linux_get_pc_32bit and
105 linux_set_pc_32bit.
106 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
107 (the_low_target): Use linux_get_pc_32bit and
108 linux_set_pc_32bit.
109
110 2016-01-18 Gary Benson <gbenson@redhat.com>
111
112 * configure.ac (AC_FUNC_FORK): New check.
113 * config.in: Regenerate.
114 * configure: Likewise.
115
116 2016-01-14 Yao Qi <yao.qi@linaro.org>
117
118 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
119 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
120 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
121 arm_get_next_pcs_ctor.
122
123 2016-01-12 Josh Stone <jistone@redhat.com>
124 Philippe Waroquiers <philippe.waroquiers@skynet.be>
125
126 * inferiors.h: Include "gdb_vecs.h".
127 (struct process_info): Add syscalls_to_catch.
128 * inferiors.c (remove_process): Free syscalls_to_catch.
129 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
130 syscall_return stops.
131 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
132 * server.c (handle_general_set): Handle QCatchSyscalls.
133 (handle_query): Report support for QCatchSyscalls.
134 * target.h (struct target_ops): Add supports_catch_syscall.
135 (target_supports_catch_syscall): New macro.
136 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
137 (struct lwp_info): Add syscall_state.
138 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
139 Maintain syscall_state and syscalls_to_catch across exec.
140 (get_syscall_trapinfo): New function, proxy to the_low_target.
141 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
142 (linux_low_filter_event): Toggle syscall_state entry/return for
143 syscall traps, and set it ignored for all others.
144 (gdb_catching_syscalls_p): New function.
145 (gdb_catch_this_syscall_p): New function.
146 (linux_wait_1): Handle SYSCALL_SIGTRAP.
147 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
148 (linux_supports_catch_syscall): New function.
149 (linux_target_ops): Install it.
150 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
151 (the_low_target): Install it.
152
153 2016-01-12 Mike Frysinger <vapier@gentoo.org>
154
155 * acinclude.m4: Include new ../warning.m4 file.
156 * configure: Regenerated.
157 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
158
159 2016-01-12 Mike Frysinger <vapier@gentoo.org>
160
161 * ax.c (is_goto_target): Mark static.
162 * linux-low.c (register_addr): Likewise.
163 (linux_fetch_registers, linux_store_registers): Likewise.
164 * mem-break.c (any_persistent_commands): Fix old prototype.
165 (add_commands_to_breakpoint): Mark static.
166 * regcache.c (find_register_by_name): Delete unused func.
167 * remote-utils.c (hex_or_minus_one): Mark static.
168 * server.c (monitor_show_help): Mark static.
169 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
170 handle_v_requests): Likewise.
171
172 2016-01-12 Pedro Alves <palves@redhat.com>
173
174 Remove use of the registered trademark symbol throughout.
175
176 2016-01-08 Yao Qi <yao.qi@linaro.org>
177
178 * remote-utils.c (getpkt): If c is '\003', call target hook
179 request_interrupt.
180
181 2016-01-06 Yao Qi <yao.qi@linaro.org>
182
183 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
184 linux-aarch32-low.c.
185 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
186 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
187 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
188 (thumb2_breakpoint): Declare.
189 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
190 linux-aarch32-low.h.
191 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
192 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
193 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
194
195 2016-01-01 Joel Brobecker <brobecker@adacore.com>
196
197 * gdbreplay.c (gdbreplay_version): Change copyright year in
198 version message.
199 * server.c (gdbserver_version): Likewise.
200
201 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
202
203 * server.c (crc32_table): Delete.
204 (crc32): Use libiberty's xcrc32 function.
205
206 2015-12-22 Joel Brobecker <brobecker@adacore.com>
207
208 * lynx-low.c (lynx_delete_thread_callback): New function.
209 (lynx_mourn): Properly delete our process and all of its
210 threads. Remove call to clear_inferiors.
211
212 2015-12-22 Joel Brobecker <brobecker@adacore.com>
213
214 * target.c (thread_search_callback): Add check that
215 the thread_stopped target callback is not NULL before
216 calling it.
217
218 2015-12-21 Yao Qi <yao.qi@linaro.org>
219
220 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
221 arm breakpoint.
222
223 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
224
225 * server.c (handle_query): Call target_supports_software_single_step.
226
227 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
228
229 * linux-low.c (single_step): New function.
230 (linux_resume_one_lwp_throw): Call single_step.
231 (start_step_over): Likewise.
232
233 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
234
235 * Makefile.in (SFILES): Append arch/arm-linux.c,
236 arch/arm-get-next-pcs.c.
237 (arm-linux.o): New rule.
238 (arm-get-next-pcs.o): New rule.
239 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
240 arm-linux.o.
241 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
242 to linux-aarch32-low.c.
243 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
244 (arm_breakpoint_len, thumb_breakpoint): Likewise.
245 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
246 (thumb2_breakpoint_len): Likewise.
247 (arm_is_thumb_mode): Make non-static.
248 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
249 from linux-aarch32-low.c.
250 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
251 (arm_breakpoint_len, thumb_breakpoint): Likewise.
252 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
253 (thumb2_breakpoint_len): Likewise.
254 (arm_is_thumb_mode): New declaration.
255 * linux-arm-low.c: Include arch/arm-linux.h
256 aarch/arm-get-next-pcs.h, sys/syscall.h.
257 (get_next_pcs_ops): New struct.
258 (get_next_pcs_addr_bits_remove): New function.
259 (get_next_pcs_is_thumb): New function.
260 (get_next_pcs_read_memory_unsigned_integer): Likewise.
261 (arm_sigreturn_next_pc): Likewise.
262 (get_next_pcs_syscall_next_pc): Likewise.
263 (arm_gdbserver_get_next_pcs): Likewise.
264 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
265 Initialize.
266 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
267 * server.h: Include gdb_vecs.h.
268
269 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
270
271 * Makefile.in (SFILES): Append common/common-regcache.c.
272 (OBS): Append common-regcache.o.
273 (common-regcache.o): New rule.
274 * regcache.c (init_register_cache): Initialize cache to
275 REG_UNAVAILABLE.
276 (regcache_raw_read_unsigned): New function.
277 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
278 register_status enum.
279
280 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
281
282 * linux-aarch64-low.c (the_low_targets): Rename
283 breakpoint_reinsert_addr to get_next_pcs.
284 * linux-arm-low.c (the_low_targets): Likewise.
285 * linux-bfin-low.c (the_low_targets): Likewise.
286 * linux-cris-low.c (the_low_targets): Likewise.
287 * linux-crisv32-low.c (the_low_targets): Likewise.
288 * linux-low.c (can_software_single_step): Likewise.
289 (install_software_single_step_breakpoints): New function.
290 (start_step_over): Use install_software_single_step_breakpoints.
291 * linux-low.h: New CORE_ADDR vector.
292 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
293 get_next_pcs.
294 * linux-mips-low.c (the_low_targets): Likewise.
295 * linux-nios2-low.c (the_low_targets): Likewise.
296 * linux-sparc-low.c (the_low_targets): Likewise.
297
298 2015-12-17 Pedro Alves <palves@redhat.com>
299
300 * linux-low.c (linux_kill_one_lwp): Remove references to
301 LinuxThreads.
302 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
303 to 'kill'.
304 (linux_init_signals): Delete.
305 (initialize_low): Adjust.
306 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
307
308 2015-12-16 Pedro Alves <palves@redhat.com>
309
310 * configure.ac (compiler warning flags): When testing a
311 -Wno-foo option, check whether -Wfoo works instead.
312 * configure: Regenerate.
313
314 2015-12-11 Don Breazeal <donb@codesourcery.com>
315
316 * server.c (process_serial_event): Don't exit from gdbserver
317 in remote mode if there are still active inferiors.
318
319 2015-12-11 Yao Qi <yao.qi@linaro.org>
320
321 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
322 arm_breakpoint_at if the process is 32-bit.
323
324 2015-12-11 Yao Qi <yao.qi@linaro.org>
325
326 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
327 arm breakpoint.
328
329 2015-12-07 Yao Qi <yao.qi@linaro.org>
330
331 * configure.srv: Append arm.o to srv_tgtobj for
332 aarch64*-*-linux* target.
333 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
334 from linux-arm-low.c.
335 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
336 (arm_breakpoint_len, thumb_breakpoint): Likewise.
337 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
338 (thumb2_breakpoint_len): Likewise.
339 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
340 (arm_breakpoint_kinds): Likewise.
341 (arm_breakpoint_kind_from_pc): Likewise.
342 (arm_sw_breakpoint_from_kind): Likewise.
343 (arm_breakpoint_kind_from_current_state): Likewise.
344 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
345 (arm_sw_breakpoint_from_kind): Declare.
346 (arm_breakpoint_kind_from_current_state): Declare.
347 (arm_breakpoint_at): Declare.
348 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
349 arm_sw_breakpoint_from_kind if process is 32-bit.
350 (aarch64_breakpoint_kind_from_pc): New function.
351 (aarch64_breakpoint_kind_from_current_state): New function.
352 (the_low_target): Initialize fields breakpoint_kind_from_pc
353 and breakpoint_kind_from_current_state.
354 * linux-arm-low.c (arm_breakpoint_kinds): Move to
355 linux-aarch32-low.c.
356 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
357 (arm_breakpoint, arm_breakpoint_len): Likewise.
358 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
359 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
360 (arm_is_thumb_mode): Likewise.
361 (arm_breakpoint_at): Likewise.
362 (arm_breakpoint_kind_from_pc): Likewise.
363 (arm_sw_breakpoint_from_kind): Likewise.
364 (arm_breakpoint_kind_from_current_state): Likewise.
365
366 Revert:
367 2015-08-04 Yao Qi <yao.qi@linaro.org>
368
369 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
370 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
371 * server.c (extended_protocol): Remove "static".
372 * server.h (extended_protocol): Declare it.
373
374 2015-12-04 Josh Stone <jistone@redhat.com>
375
376 * target.h (struct target_ops) <arch_setup>: Rename to ...
377 (struct target_ops) <post_create_inferior>: ... this.
378 (target_arch_setup): Rename to ...
379 (target_post_create_inferior): ... this, calling post_create_inferior.
380 * server.c (start_inferior): Update target_arch_setup calls to
381 target_post_create_inferior.
382 * linux-low.c (linux_low_ptrace_options): Forward declare.
383 (linux_arch_setup): Update its comment for general use.
384 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
385 (struct linux_target_ops): Use linux_post_create_inferior.
386 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
387 to post_create_inferior.
388 * nto-low.c (struct nto_target_ops): Likewise.
389 * spu-low.c (struct spu_target_ops): Likewise.
390 * win32-low.c (struct win32_target_ops): Likewise.
391
392 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
393
394 * linux-arm-low.c: Remove duplicate arch/arm.h include.
395
396 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
397
398 * linux-arm-low.c (arm_reinsert_addr): Remove function.
399 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
400 * linux-cris-low.c (cris_reinsert_addr> Remove function.
401 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
402 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
403 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
404 * linux-mips-low.c (mips_reinsert_addr): Remove function.
405 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
406 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
407 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
408 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
409 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
410
411 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
412
413 * linux-low.c (linux_look_up_symbols): Don't call
414 linux_supports_traceclone.
415 * linux-low.h (thread_db_init): Remove use_events argument.
416 * thread-db.c (thread_db_use_event): Remove global variable.
417 (struct thread_db) <td_thr_event_enable_p>: Remove field.
418 (struct thread_db) <td_create_bp>: Remove field.
419 (thread_db_create_event): Remove function.
420 (thread_db_enable_reporting): Likewise.
421 (find_one_thread): Don't check for thread_db_use_events.
422 (attach_thread): Likewise.
423 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
424 (try_thread_db_load_1): Don't check for thread_db_use_events.
425 (thread_db_init): Remove use_events argument and thread events
426 handling.
427 (remove_thread_event_breakpoints): Remove function.
428 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
429
430 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
431
432 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
433 New function.
434 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
435 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
436 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
437 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
438 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
439 Initialize.
440 * linux-crisv32-low.c (cris_supports_hardware_single_step):
441 New function.
442 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
443 * linux-low.c (can_hardware_single_step): Use
444 supports_hardware_single_step.
445 (can_software_single_step): New function.
446 (start_step_over): Call can_software_single_step.
447 (linux_supports_hardware_single_step): New function.
448 (struct target_ops) <supports_software_single_step>: Initialize.
449 * linux-low.h (struct linux_target_ops)
450 <supports_hardware_single_step>: Initialize.
451 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
452 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
453 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
454 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
455 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
456 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
457 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
458 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
459 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
460 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
461 Initialize.
462 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
463 (struct linux_target_ops) <tile_supports_hardware_single_step>:
464 Initialize.
465 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
466 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
467 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
468 New function.
469 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
470 * target.h (struct target_ops): <supports_software_single_step>:
471 New field.
472 (target_supports_software_single_step): New macro.
473
474 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
475
476 * linux-low.c (linux_wait_1): Fix pc advance condition.
477 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
478 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
479
480 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
481
482 * linux-arm-low.c (arm_is_thumb_mode): New function.
483 (arm_breakpoint_at): Use arm_is_thumb_mode.
484 (arm_breakpoint_kind_from_current_state): New function.
485 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
486 Initialize.
487 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
488 (linux_breakpoint_kind_from_current_state): New function.
489 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
490 * linux-low.h (struct linux_target_ops)
491 <breakpoint_kind_from_current_state>: New field.
492 * target.h (struct target_ops): Likewise.
493 (target_breakpoint_kind_from_current_state): New macro.
494
495 2015-11-30 Pedro Alves <palves@redhat.com>
496
497 * linux-low.c (linux_resume): Wake up the event loop before
498 returning.
499
500 2015-11-30 Pedro Alves <palves@redhat.com>
501
502 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
503 check.
504 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
505 to -1.
506 * target.c (struct thread_search): New structure.
507 (thread_search_callback): New function.
508 (prev_general_thread): New global.
509 (prepare_to_access_memory, done_accessing_memory): New functions.
510 * target.h (prepare_to_access_memory, done_accessing_memory):
511 Replace macros with function declarations.
512
513 2015-11-30 Pedro Alves <palves@redhat.com>
514
515 PR 14618
516 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
517 report TARGET_WAITKIND_NO_RESUMED.
518 * remote-utils.c (prepare_resume_reply): Handle
519 TARGET_WAITKIND_NO_RESUMED.
520 * server.c (report_no_resumed): New global.
521 (handle_query) <qSupported>: Handle "no-resumed+". Report
522 "no-resumed+" support.
523 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
524 return error if the client doesn't support no-resumed events.
525 (push_stop_notification): New function.
526 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
527 events if the client supports them.
528
529 2015-11-30 Pedro Alves <palves@redhat.com>
530
531 * linux-low.c (thread_still_has_status_pending_p): Don't check
532 vCont;t here.
533 (lwp_resumed): New function.
534 (status_pending_p_callback): Return early if the LWP is not
535 supposed to be resumed.
536
537 2015-11-30 Pedro Alves <palves@redhat.com>
538
539 * linux-low.c (handle_extended_wait): Assert that the LWP's
540 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
541 thread create events, leave the new child's status pending.
542 (linux_low_filter_event): If GDB wants to hear about thread exit
543 events, leave the LWP marked dead and don't delete it.
544 (linux_wait_for_event_filtered): Don't check for thread exit.
545 (filter_exit_event): New function.
546 (linux_wait_1): Use it, when returning an exit event.
547 (linux_resume_one_lwp_throw): Assert that the LWP's
548 waitstatus is TARGET_WAITKIND_IGNORE.
549 * remote-utils.c (prepare_resume_reply): Handle
550 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
551 * server.c (report_thread_events): New global.
552 (handle_general_set): Handle QThreadEvents.
553 (handle_query) <qSupported>: Handle and report QThreadEvents+;
554 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
555 TARGET_WAITKIND_THREAD_EXITED.
556 * server.h (report_thread_events): Declare.
557
558 2015-11-30 Pedro Alves <palves@redhat.com>
559
560 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
561 the thread's last_resume_kind was resume_stop.
562
563 2015-11-30 Pedro Alves <palves@redhat.com>
564
565 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
566 before returning.
567
568 2015-11-30 Pedro Alves <palves@redhat.com>
569
570 * server.c (handle_v_requests): Handle vCtrlC.
571
572 2015-11-30 Pedro Alves <palves@redhat.com>
573
574 * gdbthread.h (find_any_thread_of_pid): Declare.
575 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
576 functions.
577 * server.c (handle_query): If current_thread is NULL, look for
578 another thread of the selected process.
579
580 2015-11-26 Daniel Colascione <dancol@dancol.org>
581 Simon Marchi <simon.marchi@ericsson.com>
582
583 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
584 * server.c (handle_qxfer_threads_worker): Refactor to include thread
585 name in reply.
586 * target.h (struct target_ops) <thread_name>: New field.
587 (target_thread_name): New macro.
588
589 2015-11-23 Joel Brobecker <brobecker@adacore.com>
590
591 * regcache.h (regcache_invalidate_pid): Add declaration.
592 * regcache.c (regcache_invalidate_pid): New function, extracted
593 from regcache_invalidate.
594 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
595 Add trivial documentation comment.
596 * lynx-low.c: Use regcache_invalidate_pid instead of
597 regcache_invalidate.
598
599 2015-11-23 Joel Brobecker <brobecker@adacore.com>
600
601 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
602 and Elf64_auxv_t if the target is Android.
603
604 2015-11-22 Doug Evans <xdje42@gmail.com>
605
606 * target.h: #include <sys/types.h>.
607
608 2015-11-19 Pedro Alves <palves@redhat.com>
609
610 * linux-low.c (linux_process_qsupported): Change prototype.
611 Adjust.
612 * linux-low.h (struct linux_target_ops) <process_qsupported>:
613 Change prototype.
614 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
615 and adjust to loop over all features.
616 * server.c (handle_query) <qSupported>: Adjust to call
617 target_process_qsupported once, passing it a vector of unprocessed
618 features.
619 * target.h (struct target_ops) <process_qsupported>: Change
620 prototype.
621 (target_process_qsupported): Adjust.
622
623 2015-11-19 Pedro Alves <palves@redhat.com>
624
625 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
626 mode.
627 * configure: Regenerate.
628
629 2015-11-19 Pedro Alves <palves@redhat.com>
630
631 * configure: Regenerate.
632
633 2015-11-19 Yao Qi <yao.qi@linaro.org>
634
635 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
636 type to uint32_t.
637
638 2015-11-19 Yao Qi <yao.qi@linaro.org>
639
640 * linux-aarch64-low.c (enum aarch64_operand_type): New.
641 (struct aarch64_operand): Move enum out.
642
643 2015-11-19 Yao Qi <yao.qi@linaro.org>
644
645 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
646 struct user_fpsimd_state *.
647 (aarch64_store_fpregset): Likewise.
648
649 2015-11-19 Yao Qi <yao.qi@linaro.org>
650
651 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
652 struct user_pt_regs *.
653 (aarch64_store_gregset): Likewise.
654
655 2015-11-18 Pedro Alves <palves@redhat.com>
656
657 * Makefile.in (all_object_files): Add $IPA_OBJS.
658
659 2015-11-17 Pedro Alves <palves@redhat.com>
660
661 * win32-low.c (win32_resume): Use gdb_signal_from_host,
662 GDB_SIGNAL_0 and gdb_signal_to_string.
663
664 2015-11-17 Pedro Alves <palves@redhat.com>
665
666 * win32-low.c (handle_output_debug_string): Remove parameter.
667 (win32_kill): Remove our_status local and adjust call to
668 handle_output_debug_string.
669 (get_child_debug_event): Adjust call to
670 handle_output_debug_string.
671
672 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
673
674 * linux-mips-low.c (mips_fill_gregset): Add cast.
675 (mips_store_gregset): Likewise.
676 (mips_fill_fpregset): Likewise.
677 (mips_store_fpregset): Likewise.
678
679 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
680
681 * linux-mips-low.c (mips_add_watchpoint): Rename private to
682 priv.
683
684 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
685
686 * linux-mips-low.c (mips_linux_new_thread): Change type of
687 watch_type to enum target_hw_bp_type.
688
689 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
690
691 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
692 Change return type to arm_hwbp_type.
693
694 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
695
696 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
697 (arm_store_gregset): Likewise.
698 * linux-arm-low.c (arm_get_hwcap): Likewise.
699 (arm_read_description): Likewise.
700
701 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
702
703 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
704
705 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
706
707 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
708 (ppc_fill_vsxregset): Likewise.
709 (ppc_store_vsxregset): Likewise.
710 (ppc_fill_vrregset): Likewise.
711 (ppc_store_vrregset): Likewise.
712 (ppc_fill_evrregset): Likewise.
713 (ppc_store_evrregset): Likewise.
714
715 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
716
717 * linux-ppc-low.c (ppc_usrregs_info): Remove
718 forward-declaration.
719 (ppc_arch_setup): Move lower in file.
720
721 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
722
723 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
724 (ps_pdwrite): Likewise.
725
726 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
727
728 * linux-arm-low.c (arm_new_thread): Move pointer dereference
729 to after assert checks.
730
731 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
732
733 * proc-service.c (ps_pdread): Add/adjust casts.
734 (ps_pdwrite): Add/adjust casts.
735
736 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
737
738 * server.c (handle_search_memory_1): Cast return value of
739 memmem.
740
741 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
742
743 * server.c (write_qxfer_response): Change type of data to
744 gdb_byte *.
745
746 2015-10-29 Pedro Alves <palves@redhat.com>
747
748 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
749
750 2015-10-29 Pedro Alves <palves@redhat.com>
751
752 * tracepoint.c (clear_installed_tracepoints): Add casts.
753
754 2015-10-29 Pedro Alves <palves@redhat.com>
755
756 * server.c (handle_v_cont, process_serial_event): Add enum
757 gdb_signal casts to signal parsing code.
758
759 2015-10-29 Pedro Alves <palves@redhat.com>
760
761 * linux-low.h (NULL_REGSET): Define.
762 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
763 * linux-arm-low.c (arm_regsets): Likewise.
764 * linux-crisv32-low.c (cris_regsets): Likewise.
765 * linux-m68k-low.c (m68k_regsets): Likewise.
766 * linux-mips-low.c (mips_regsets): Likewise.
767 * linux-nios2-low.c (nios2_regsets): Likewise.
768 * linux-ppc-low.c (ppc_regsets): Likewise.
769 * linux-s390-low.c (s390_regsets): Likewise.
770 * linux-sh-low.c (sh_regsets): Likewise.
771 * linux-sparc-low.c (sparc_regsets): Likewise.
772 * linux-tic6x-low.c (tic6x_regsets): Likewise.
773 * linux-tile-low.c (tile_regsets): Likewise.
774 * linux-x86-low.c (x86_regsets): Likewise.
775 * linux-xtensa-low.c (xtensa_regsets): Likewise.
776
777 2015-10-29 Pedro Alves <palves@redhat.com>
778
779 * linux-low.h (NULL_REGSET): Define.
780 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
781 * linux-arm-low.c (arm_regsets): Likewise.
782 * linux-crisv32-low.c (cris_regsets): Likewise.
783 * linux-m68k-low.c (m68k_regsets): Likewise.
784 * linux-mips-low.c (mips_regsets): Likewise.
785 * linux-nios2-low.c (nios2_regsets): Likewise.
786 * linux-ppc-low.c (ppc_regsets): Likewise.
787 * linux-s390-low.c (s390_regsets): Likewise.
788 * linux-sh-low.c (sh_regsets): Likewise.
789 * linux-sparc-low.c (sparc_regsets): Likewise.
790 * linux-tic6x-low.c (tic6x_regsets): Likewise.
791 * linux-tile-low.c (tile_regsets): Likewise.
792 * linux-x86-low.c (x86_regsets): Likewise.
793 * linux-xtensa-low.c (xtensa_regsets): Likewise.
794
795 2015-10-26 Doug Evans <dje@google.com>
796
797 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
798
799 2015-10-26 Doug Evans <dje@google.com>
800
801 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
802
803 2015-10-26 Doug Evans <dje@google.com>
804
805 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
806 for debug_printf.
807 (attach_thread, find_new_threads_callback): Ditto.
808
809 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
810
811 * mem-break.h (set_breakpoint_data): Remove.
812
813 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
814
815 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
816 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
817 (initialize_low): Remove set_breakpoint_data call.
818 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
819 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
820 (initialize_low): Remove set_breakpoint_data call.
821 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
822 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
823 (initialize_low): Remove set_breakpoint_data call.
824
825 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
826
827 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
828 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
829 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
830 * target.h (target_breakpoint_kind_from_pc): New macro.
831
832 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
833
834 * linux-low.c (default_breakpoint_kind_from_pc): New function.
835 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
836 the default breakpoint kind.
837
838 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
839
840 * linux-arm-low.c (arm_supports_z_point_type): Add software
841 breakpoint support.
842
843 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
844
845 * linux-arm-low.c: Refactor breakpoint definitions.
846 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
847 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
848
849 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
850
851 * Makefile.in: Add arm.c/o.
852 * configure.srv: Likewise.
853 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
854 (arm_breakpoint_kind_from_pc): New function.
855 (arm_sw_breakpoint_from_kind): Return proper kind.
856 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
857
858 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
859
860 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
861 removal.
862 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
863 (struct raw_breakpoint) <size>: Remove.
864 (struct raw_breakpoint) <kind>: Add.
865 (bp_size): New function.
866 (bp_opcode): Likewise.
867 (find_raw_breakpoint_at): Adjust for kind.
868 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
869 (remove_memory_breakpoint): Adjust for kind call bp_size.
870 (set_raw_breakpoint_at): Adjust for kind.
871 (set_breakpoint): Likewise.
872 (set_breakpoint_at): Call breakpoint_kind_from_pc.
873 (delete_raw_breakpoint): Adjust for kind.
874 (delete_breakpoint): Likewise.
875 (find_gdb_breakpoint): Likewise.
876 (set_gdb_breakpoint_1): Likewise.
877 (set_gdb_breakpoint): Likewise.
878 (delete_gdb_breakpoint_1): Likewise.
879 (delete_gdb_breakpoint): Likewise.
880 (uninsert_raw_breakpoint): Likewise.
881 (reinsert_raw_breakpoint): Likewise.
882 (set_breakpoint_data): Remove.
883 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
884 (check_mem_read): Adjust for kind call bp_size.
885 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
886 (clone_one_breakpoint): Adjust for kind.
887 * mem-break.h (set_gdb_breakpoint): Likewise.
888 (delete_gdb_breakpoint): Likewise.
889 * server.c (process_serial_event): Likewise.
890
891 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
892
893 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
894 (struct linux_target_ops) <breakpoint>: Remove.
895 (struct linux_target_ops) <breakpoint_len>: Remove.
896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
898 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
899 (arm_sw_breakpoint_from_kind): New function.
900 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
901 (struct linux_target_ops) <breakpoint>: Remove.
902 (struct linux_target_ops) <breakpoint_len>: Remove.
903 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
904 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
905 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
906 (struct linux_target_ops) <breakpoint>: Remove.
907 (struct linux_target_ops) <breakpoint_len>: Remove.
908 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
909 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
910 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
911 (struct linux_target_ops) <breakpoint>: Remove.
912 (struct linux_target_ops) <breakpoint_len>: Remove.
913 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
914 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
915 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
916 and sw_breakpoint_from_kind to increment the pc.
917 (linux_breakpoint_kind_from_pc): New function.
918 (linux_sw_breakpoint_from_kind): New function.
919 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
920 (initialize_low): Call breakpoint_kind_from_pc and
921 sw_breakpoint_from_kind to replace breakpoint_data/len.
922 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
923 New field.
924 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
925 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
926 (struct linux_target_ops) <breakpoint>: Remove.
927 (struct linux_target_ops) <breakpoint_len>: Remove.
928 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
929 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
930 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
931 (struct linux_target_ops) <breakpoint>: Remove.
932 (struct linux_target_ops) <breakpoint_len>: Remove.
933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
934 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
935 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
936 (struct linux_target_ops) <breakpoint>: Remove.
937 (struct linux_target_ops) <breakpoint_len>: Remove.
938 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
939 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
940 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
941 (struct linux_target_ops) <breakpoint>: Remove.
942 (struct linux_target_ops) <breakpoint_len>: Remove.
943 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
944 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
945 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
946 (struct linux_target_ops) <breakpoint>: Remove.
947 (struct linux_target_ops) <breakpoint_len>: Remove.
948 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
949 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
950 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
951 (struct linux_target_ops) <breakpoint>: Remove.
952 (struct linux_target_ops) <breakpoint_len>: Remove.
953 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
954 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
955 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
956 (struct linux_target_ops) <breakpoint>: Remove.
957 (struct linux_target_ops) <breakpoint_len>: Remove.
958 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
959 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
960 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
961 (struct linux_target_ops) <breakpoint>: Remove.
962 (struct linux_target_ops) <breakpoint_len>: Remove.
963 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
964 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
965 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
966 (struct linux_target_ops) <breakpoint>: Remove.
967 (struct linux_target_ops) <breakpoint_len>: Remove.
968 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
969 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
970 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
971 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
972 (struct linux_target_ops) <breakpoint>: Remove.
973 (struct linux_target_ops) <breakpoint_len>: Remove.
974 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
975 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
976 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
977 (struct linux_target_ops) <breakpoint>: Remove.
978 (struct linux_target_ops) <breakpoint_len>: Remove.
979 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
980 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
981
982 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
983
984 * linux-cris-low.c (cris_get_pc): Remove void arg.
985
986 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
987
988 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
989 variable name.
990
991 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
992
993 * inferiors.c (thread_pid_matches_callback): New function.
994 (find_thread_process): New function.
995 (remove_thread): Reset current_thread.
996 (remove_process): Assert threads have been removed first.
997
998 2015-10-15 Yao Qi <yao.qi@linaro.org>
999
1000 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1001 if it is 3.
1002 (aarch64_remove_point): Likewise.
1003 * regcache.c (regcache_register_size): New function.
1004
1005 2015-10-12 Yao Qi <yao.qi@linaro.org>
1006
1007 * linux-aarch64-low.c: Update all callers as emit_load_store
1008 is renamed to aarch64_emit_load_store.
1009
1010 2015-10-12 Yao Qi <yao.qi@linaro.org>
1011
1012 * linux-aarch64-low.c: Update all callers of function renaming
1013 from emit_insn to aarch64_emit_insn.
1014
1015 2015-10-12 Yao Qi <yao.qi@linaro.org>
1016
1017 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1018 arch/aarch64-insn.h.
1019 (struct aarch64_memory_operand): Likewise.
1020 (ENCODE): Likewise.
1021 (emit_insn): Move to arch/aarch64-insn.c.
1022 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1023 (emit_load_store): Move to arch/aarch64-insn.c.
1024 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1025 (can_encode_int32): Remove.
1026
1027 2015-10-12 Yao Qi <yao.qi@linaro.org>
1028
1029 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1030 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1031 (aarch64_relocate_instruction): Likewise.
1032 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1033 (struct aarch64_insn_visitor): Likewise.
1034
1035 2015-10-12 Yao Qi <yao.qi@linaro.org>
1036
1037 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1038 (struct aarch64_insn_visitor): New.
1039 (struct aarch64_insn_relocation_data): New.
1040 (aarch64_ftrace_insn_reloc_b): New function.
1041 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1042 (aarch64_ftrace_insn_reloc_cb): Likewise.
1043 (aarch64_ftrace_insn_reloc_tb): Likewise.
1044 (aarch64_ftrace_insn_reloc_adr): Likewise.
1045 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1046 (aarch64_ftrace_insn_reloc_others): Likewise.
1047 (visitor): New.
1048 (aarch64_relocate_instruction): Use visitor.
1049
1050 2015-10-12 Yao Qi <yao.qi@linaro.org>
1051
1052 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1053 int. Add argument buf.
1054 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1055 aarch64_relocate_instruction.
1056
1057 2015-10-12 Yao Qi <yao.qi@linaro.org>
1058
1059 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1060 argument insn. Remove local variable insn. Don't call
1061 target_read_uint32.
1062 (aarch64_install_fast_tracepoint_jump_pad): Call
1063 target_read_uint32.
1064
1065 2015-09-30 Yao Qi <yao.qi@linaro.org>
1066
1067 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1068 (emit_load_store_pair): Likewise.
1069
1070 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1071
1072 * dll.c (match_dll): Add cast(s).
1073 (unloaded_dll): Likewise.
1074 * linux-low.c (second_thread_of_pid_p): Likewise.
1075 (delete_lwp_callback): Likewise.
1076 (count_events_callback): Likewise.
1077 (select_event_lwp_callback): Likewise.
1078 (linux_set_resume_request): Likewise.
1079 * server.c (accumulate_file_name_length): Likewise.
1080 (emit_dll_description): Likewise.
1081 (handle_qxfer_threads_worker): Likewise.
1082 (visit_actioned_threads): Likewise.
1083 * thread-db.c (any_thread_of): Likewise.
1084 * tracepoint.c (same_process_p): Likewise.
1085 (match_blocktype): Likewise.
1086 (build_traceframe_info_xml): Likewise.
1087
1088 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1089
1090 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1091 assignment.
1092 (gdb_unparse_agent_expr): Likewise.
1093 * hostio.c (require_data): Likewise.
1094 (handle_pread): Likewise.
1095 * linux-low.c (disable_regset): Likewise.
1096 (fetch_register): Likewise.
1097 (store_register): Likewise.
1098 (get_dynamic): Likewise.
1099 (linux_qxfer_libraries_svr4): Likewise.
1100 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1101 (set_fast_tracepoint_jump): Likewise.
1102 (uninsert_fast_tracepoint_jumps_at): Likewise.
1103 (reinsert_fast_tracepoint_jumps_at): Likewise.
1104 (validate_inserted_breakpoint): Likewise.
1105 (clone_agent_expr): Likewise.
1106 * regcache.c (init_register_cache): Likewise.
1107 * remote-utils.c (putpkt_binary_1): Likewise.
1108 (decode_M_packet): Likewise.
1109 (decode_X_packet): Likewise.
1110 (look_up_one_symbol): Likewise.
1111 (relocate_instruction): Likewise.
1112 (monitor_output): Likewise.
1113 * server.c (handle_search_memory): Likewise.
1114 (handle_qxfer_exec_file): Likewise.
1115 (handle_qxfer_libraries): Likewise.
1116 (handle_qxfer): Likewise.
1117 (handle_query): Likewise.
1118 (handle_v_cont): Likewise.
1119 (handle_v_run): Likewise.
1120 (captured_main): Likewise.
1121 * target.c (write_inferior_memory): Likewise.
1122 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1123 * tracepoint.c (init_trace_buffer): Likewise.
1124 (add_tracepoint_action): Likewise.
1125 (add_traceframe): Likewise.
1126 (add_traceframe_block): Likewise.
1127 (cmd_qtdpsrc): Likewise.
1128 (cmd_qtdv): Likewise.
1129 (cmd_qtstatus): Likewise.
1130 (response_source): Likewise.
1131 (response_tsv): Likewise.
1132 (cmd_qtnotes): Likewise.
1133 (gdb_collect): Likewise.
1134 (initialize_tracepoint): Likewise.
1135
1136 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1137
1138 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1139 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1140 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1141 <NOP>: New.
1142 (enum aarch64_condition_codes): New enum.
1143 (w0): New static global.
1144 (fp): Likewise.
1145 (lr): Likewise.
1146 (struct aarch64_memory_operand) <type>: New
1147 MEMORY_OPERAND_POSTINDEX type.
1148 (postindex_memory_operand): New helper function.
1149 (emit_ret): New function.
1150 (emit_load_store_pair): New function, factored out of emit_stp
1151 with support for MEMORY_OPERAND_POSTINDEX.
1152 (emit_stp): Rewrite using emit_load_store_pair.
1153 (emit_ldp): New function.
1154 (emit_load_store): Likewise.
1155 (emit_ldr): Mention post-index instruction in comment.
1156 (emit_ldrh): New function.
1157 (emit_ldrb): New function.
1158 (emit_ldrsw): Mention post-index instruction in comment.
1159 (emit_str): Likewise.
1160 (emit_subs): New function.
1161 (emit_cmp): Likewise.
1162 (emit_and): Likewise.
1163 (emit_orr): Likewise.
1164 (emit_orn): Likewise.
1165 (emit_eor): Likewise.
1166 (emit_mvn): Likewise.
1167 (emit_lslv): Likewise.
1168 (emit_lsrv): Likewise.
1169 (emit_asrv): Likewise.
1170 (emit_mul): Likewise.
1171 (emit_sbfm): Likewise.
1172 (emit_sbfx): Likewise.
1173 (emit_ubfm): Likewise.
1174 (emit_ubfx): Likewise.
1175 (emit_csinc): Likewise.
1176 (emit_cset): Likewise.
1177 (emit_nop): Likewise.
1178 (emit_ops_insns): New helper function.
1179 (emit_pop): Likewise.
1180 (emit_push): Likewise.
1181 (aarch64_emit_prologue): New function.
1182 (aarch64_emit_epilogue): Likewise.
1183 (aarch64_emit_add): Likewise.
1184 (aarch64_emit_sub): Likewise.
1185 (aarch64_emit_mul): Likewise.
1186 (aarch64_emit_lsh): Likewise.
1187 (aarch64_emit_rsh_signed): Likewise.
1188 (aarch64_emit_rsh_unsigned): Likewise.
1189 (aarch64_emit_ext): Likewise.
1190 (aarch64_emit_log_not): Likewise.
1191 (aarch64_emit_bit_and): Likewise.
1192 (aarch64_emit_bit_or): Likewise.
1193 (aarch64_emit_bit_xor): Likewise.
1194 (aarch64_emit_bit_not): Likewise.
1195 (aarch64_emit_equal): Likewise.
1196 (aarch64_emit_less_signed): Likewise.
1197 (aarch64_emit_less_unsigned): Likewise.
1198 (aarch64_emit_ref): Likewise.
1199 (aarch64_emit_if_goto): Likewise.
1200 (aarch64_emit_goto): Likewise.
1201 (aarch64_write_goto_address): Likewise.
1202 (aarch64_emit_const): Likewise.
1203 (aarch64_emit_call): Likewise.
1204 (aarch64_emit_reg): Likewise.
1205 (aarch64_emit_pop): Likewise.
1206 (aarch64_emit_stack_flush): Likewise.
1207 (aarch64_emit_zero_ext): Likewise.
1208 (aarch64_emit_swap): Likewise.
1209 (aarch64_emit_stack_adjust): Likewise.
1210 (aarch64_emit_int_call_1): Likewise.
1211 (aarch64_emit_void_call_2): Likewise.
1212 (aarch64_emit_eq_goto): Likewise.
1213 (aarch64_emit_ne_goto): Likewise.
1214 (aarch64_emit_lt_goto): Likewise.
1215 (aarch64_emit_le_goto): Likewise.
1216 (aarch64_emit_gt_goto): Likewise.
1217 (aarch64_emit_ge_got): Likewise.
1218 (aarch64_emit_ops_impl): New static global variable.
1219 (aarch64_emit_ops): New target function, return
1220 &aarch64_emit_ops_impl.
1221 (struct linux_target_ops): Install it.
1222
1223 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1224
1225 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1226 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1227 aarch64-ipa.o.
1228 * linux-aarch64-ipa.c: New file.
1229 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1230 and endian.h.
1231 (aarch64_get_thread_area): New target method.
1232 (extract_signed_bitfield): New helper function.
1233 (aarch64_decode_ldr_literal): New function.
1234 (enum aarch64_opcodes): New enum.
1235 (struct aarch64_register): New struct.
1236 (struct aarch64_operand): New struct.
1237 (x0): New static global.
1238 (x1): Likewise.
1239 (x2): Likewise.
1240 (x3): Likewise.
1241 (x4): Likewise.
1242 (w2): Likewise.
1243 (ip0): Likewise.
1244 (sp): Likewise.
1245 (xzr): Likewise.
1246 (aarch64_register): New helper function.
1247 (register_operand): Likewise.
1248 (immediate_operand): Likewise.
1249 (struct aarch64_memory_operand): New struct.
1250 (offset_memory_operand): New helper function.
1251 (preindex_memory_operand): Likewise.
1252 (enum aarch64_system_control_registers): New enum.
1253 (ENCODE): New macro.
1254 (emit_insn): New helper function.
1255 (emit_b): New function.
1256 (emit_bcond): Likewise.
1257 (emit_cb): Likewise.
1258 (emit_tb): Likewise.
1259 (emit_blr): Likewise.
1260 (emit_stp): Likewise.
1261 (emit_ldp_q_offset): Likewise.
1262 (emit_stp_q_offset): Likewise.
1263 (emit_load_store): Likewise.
1264 (emit_ldr): Likewise.
1265 (emit_ldrsw): Likewise.
1266 (emit_str): Likewise.
1267 (emit_ldaxr): Likewise.
1268 (emit_stxr): Likewise.
1269 (emit_stlr): Likewise.
1270 (emit_data_processing_reg): Likewise.
1271 (emit_data_processing): Likewise.
1272 (emit_add): Likewise.
1273 (emit_sub): Likewise.
1274 (emit_mov): Likewise.
1275 (emit_movk): Likewise.
1276 (emit_mov_addr): Likewise.
1277 (emit_mrs): Likewise.
1278 (emit_msr): Likewise.
1279 (emit_sevl): Likewise.
1280 (emit_wfe): Likewise.
1281 (append_insns): Likewise.
1282 (can_encode_int32_in): New helper function.
1283 (aarch64_relocate_instruction): New function.
1284 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1285 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1286 (struct linux_target_ops): Install aarch64_get_thread_area,
1287 aarch64_install_fast_tracepoint_jump_pad and
1288 aarch64_get_min_fast_tracepoint_insn_len.
1289
1290 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1291
1292 * Makefile.in (aarch64-insn.o): New rule.
1293 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1294
1295 2015-09-21 Yao Qi <yao.qi@linaro.org>
1296
1297 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1298
1299 2015-09-21 Yao Qi <yao.qi@linaro.org>
1300
1301 * tracepoint.c (max_jump_pad_size): Remove.
1302
1303 2015-09-18 Yao Qi <yao.qi@linaro.org>
1304
1305 * linux-aarch64-low.c: Don't include sys/uio.h.
1306 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1307
1308 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1309
1310 * tracepoint.c (eval_result_type): Change prototype.
1311 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1312
1313 2015-09-15 Pedro Alves <palves@redhat.com>
1314
1315 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1316 Check whether to report exec events instead of checking whether
1317 multiprocess is enabled.
1318
1319 2015-09-15 Pedro Alves <palves@redhat.com>
1320
1321 PR remote/18965
1322 * remote-utils.c (prepare_resume_reply): Merge
1323 TARGET_WAITKIND_VFORK_DONE switch case with the
1324 TARGET_WAITKIND_FORKED case.
1325
1326 2015-09-15 Yao Qi <yao.qi@linaro.org>
1327
1328 * server.c (handle_query): Check string comparison using
1329 "else if" instead of "if".
1330
1331 2015-09-15 Yao Qi <yao.qi@linaro.org>
1332
1333 * server.c (vCont_supported): New global variable.
1334 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1335 matches. Append ";vContSupported+" to own_buf.
1336 (handle_v_requests): Append ";s;S" to own_buf if target supports
1337 hardware single step or vCont_supported is false.
1338 (capture_main): Set vCont_supported to zero.
1339
1340 2015-09-15 Yao Qi <yao.qi@linaro.org>
1341
1342 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1343 it to ...
1344 (linux_supports_hardware_single_step): ... New function.
1345 (linux_target_ops): Update.
1346 * lynx-low.c (lynx_target_ops): Set field
1347 supports_hardware_single_step to target_can_do_hardware_single_step.
1348 * nto-low.c (nto_target_ops): Likewise.
1349 * spu-low.c (spu_target_ops): Likewise.
1350 * win32-low.c (win32_target_ops): Likewise.
1351 * target.c (target_can_do_hardware_single_step): New function.
1352 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1353 Remove. <supports_hardware_single_step>: New field.
1354 (target_supports_conditional_breakpoints): Remove.
1355 (target_supports_hardware_single_step): New macro.
1356 (target_can_do_hardware_single_step): Declare.
1357 * server.c (handle_query): Use target_supports_hardware_single_step
1358 instead of target_supports_conditional_breakpoints.
1359
1360 2015-09-15 Yao Qi <yao.qi@linaro.org>
1361
1362 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1363 function.
1364 (struct linux_target_ops the_low_target): Install
1365 aarch64_linux_siginfo_fixup.
1366
1367 2015-09-11 Don Breazeal <donb@codesourcery.com>
1368 Luis Machado <lgustavo@codesourcery.com>
1369
1370 * linux-low.c (linux_mourn): Static declaration.
1371 (linux_arch_setup): Move in front of
1372 handle_extended_wait.
1373 (linux_arch_setup_thread): New function.
1374 (handle_extended_wait): Handle exec events. Call
1375 linux_arch_setup_thread. Make event_lwp argument a
1376 pointer-to-a-pointer.
1377 (check_zombie_leaders): Do not check stopped threads.
1378 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1379 (linux_low_filter_event): Add lwp and thread for exec'ing
1380 non-leader thread if leader thread has been deleted.
1381 Refactor code into linux_arch_setup_thread and call it.
1382 Pass child lwp pointer by reference to handle_extended_wait.
1383 (linux_wait_for_event_filtered): Update comment.
1384 (linux_wait_1): Prevent clobbering exec event status.
1385 (linux_supports_exec_events): New function.
1386 (linux_target_ops) <supports_exec_events>: Initialize new member.
1387 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1388 new member.
1389 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1390 * server.c (report_exec_events): New global variable.
1391 (handle_query): Handle qSupported query for exec-events feature.
1392 (captured_main): Initialize report_exec_events.
1393 * server.h (report_exec_events): Declare new global variable.
1394 * target.h (struct target_ops) <supports_exec_events>: New
1395 member.
1396 (target_supports_exec_events): New macro.
1397 * win32-low.c (win32_target_ops) <supports_exec_events>:
1398 Initialize new member.
1399
1400 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1401
1402 * linux-low.c (linux_low_enable_btrace): Remove.
1403 (linux_target_ops): Replace linux_low_enable_btrace with
1404 linux_enable_btrace.
1405
1406 2015-09-03 Yao Qi <yao.qi@linaro.org>
1407
1408 * linux-aarch64-low.c (aarch64_insert_point): Call
1409 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1410 returns true.
1411
1412 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1413
1414 * linux-low.c (check_stopped_by_breakpoint): Use
1415 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1416
1417 2015-08-27 Pedro Alves <palves@redhat.com>
1418
1419 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1420
1421 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1422
1423 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1424 the XNEW-family equivalent.
1425 (compile_bytecodes): Likewise.
1426 * dll.c (loaded_dll): Likewise.
1427 * event-loop.c (append_callback_event): Likewise.
1428 (create_file_handler): Likewise.
1429 (create_file_event): Likewise.
1430 * hostio.c (handle_open): Likewise.
1431 * inferiors.c (add_thread): Likewise.
1432 (add_process): Likewise.
1433 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1434 * linux-arm-low.c (arm_new_process): Likewise.
1435 (arm_new_thread): Likewise.
1436 * linux-low.c (add_to_pid_list): Likewise.
1437 (linux_add_process): Likewise.
1438 (handle_extended_wait): Likewise.
1439 (add_lwp): Likewise.
1440 (enqueue_one_deferred_signal): Likewise.
1441 (enqueue_pending_signal): Likewise.
1442 (linux_resume_one_lwp_throw): Likewise.
1443 (linux_resume_one_thread): Likewise.
1444 (linux_read_memory): Likewise.
1445 (linux_write_memory): Likewise.
1446 * linux-mips-low.c (mips_linux_new_process): Likewise.
1447 (mips_linux_new_thread): Likewise.
1448 (mips_add_watchpoint): Likewise.
1449 * linux-x86-low.c (initialize_low_arch): Likewise.
1450 * lynx-low.c (lynx_add_process): Likewise.
1451 * mem-break.c (set_raw_breakpoint_at): Likewise.
1452 (set_breakpoint): Likewise.
1453 (add_condition_to_breakpoint): Likewise.
1454 (add_commands_to_breakpoint): Likewise.
1455 (clone_agent_expr): Likewise.
1456 (clone_one_breakpoint): Likewise.
1457 * regcache.c (new_register_cache): Likewise.
1458 * remote-utils.c (look_up_one_symbol): Likewise.
1459 * server.c (queue_stop_reply): Likewise.
1460 (start_inferior): Likewise.
1461 (queue_stop_reply_callback): Likewise.
1462 (handle_target_event): Likewise.
1463 * spu-low.c (fetch_ppc_memory): Likewise.
1464 (store_ppc_memory): Likewise.
1465 * target.c (set_target_ops): Likewise.
1466 * thread-db.c (thread_db_load_search): Likewise.
1467 (try_thread_db_load_1): Likewise.
1468 * tracepoint.c (add_tracepoint): Likewise.
1469 (add_tracepoint_action): Likewise.
1470 (create_trace_state_variable): Likewise.
1471 (cmd_qtdpsrc): Likewise.
1472 (cmd_qtro): Likewise.
1473 (add_while_stepping_state): Likewise.
1474 * win32-low.c (child_add_thread): Likewise.
1475 (get_image_name): Likewise.
1476
1477 2015-08-25 Yao Qi <yao.qi@linaro.org>
1478
1479 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1480
1481 2015-08-25 Yao Qi <yao.qi@linaro.org>
1482
1483 * Makefile.in (aarch64-linux.o): New rule.
1484 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1485 srv_tgtobj.
1486 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1487 (aarch64_init_debug_reg_state): Make it extern.
1488 (aarch64_linux_prepare_to_resume): Remove.
1489
1490 2015-08-25 Yao Qi <yao.qi@linaro.org>
1491
1492 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1493 lwp_arch_private_info and ptid_of_lwp.
1494
1495 2015-08-25 Yao Qi <yao.qi@linaro.org>
1496
1497 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1498 Find proc_info by find_process_pid. All callers updated.
1499
1500 2015-08-25 Yao Qi <yao.qi@linaro.org>
1501
1502 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1503 Remove.
1504 (debug_reg_change_callback): Remove.
1505 (aarch64_notify_debug_reg_change): Remove.
1506
1507 2015-08-25 Yao Qi <yao.qi@linaro.org>
1508
1509 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1510 Call current_lwp_ptid.
1511
1512 2015-08-25 Yao Qi <yao.qi@linaro.org>
1513
1514 * linux-aarch64-low.c (debug_reg_change_callback): Use
1515 debug_printf.
1516
1517 2015-08-25 Yao Qi <yao.qi@linaro.org>
1518
1519 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1520
1521 2015-08-25 Yao Qi <yao.qi@linaro.org>
1522
1523 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1524
1525 2015-08-25 Yao Qi <yao.qi@linaro.org>
1526
1527 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1528 the code.
1529
1530 2015-08-25 Yao Qi <yao.qi@linaro.org>
1531
1532 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1533 Remove.
1534 (debug_reg_change_callback): Remove argument entry and add argument
1535 lwp. Remove local variable thread. Don't print thread id in the
1536 debugging output. Don't check whether pid of thread equals to pid.
1537 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1538 iterate_over_lwps instead find_inferior.
1539
1540 2015-08-24 Pedro Alves <palves@redhat.com>
1541
1542 * inferiors.c (get_first_process): New function.
1543 * inferiors.h (get_first_process): New declaration.
1544 * remote-utils.c (read_ptid): Default to the first process in the
1545 list, instead of to the current thread's process.
1546
1547 2015-08-24 Pedro Alves <palves@redhat.com>
1548
1549 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1550 * event-loop.c: Likewise.
1551 * remote-utils.c: Likewise.
1552 * tracepoint.c: Likewise.
1553
1554 2015-08-24 Pedro Alves <palves@redhat.com>
1555
1556 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1557 ptid_get_lwp.
1558
1559 2015-08-21 Pedro Alves <palves@redhat.com>
1560
1561 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1562 instead of literal 1.
1563
1564 2015-08-21 Pedro Alves <palves@redhat.com>
1565
1566 * tdesc.c (default_description): Explicitly zero-initialize.
1567
1568 2015-08-21 Pedro Alves <palves@redhat.com>
1569
1570 PR gdb/18749
1571 * inferiors.c (remove_thread): Discard any pending stop reply for
1572 this thread.
1573 * server.c (remove_all_on_match_pid): Rename to ...
1574 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1575 instead of a pid.
1576 (discard_queued_stop_replies): Change parameter to a ptid. Now
1577 extern.
1578 (handle_v_kill, kill_inferior_callback, captured_main)
1579 (process_serial_event): Adjust.
1580 * server.h (discard_queued_stop_replies): Declare.
1581
1582 2015-08-21 Pedro Alves <palves@redhat.com>
1583
1584 * linux-low.c (wait_for_sigstop): Always switch to no thread
1585 selected if the previously current thread dies.
1586 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1587 process instead of the current thread's.
1588 * remote-utils.c (input_interrupt): Don't check if there's no
1589 current thread.
1590 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1591 current thread to the general thread fails, error out.
1592 (handle_qxfer_auxv, handle_qxfer_libraries)
1593 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1594 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1595 (handle_query): Check if there's a thread selected instead of
1596 checking whether there's any thread in the thread list.
1597 (handle_qxfer_threads, handle_qxfer_btrace)
1598 (handle_qxfer_btrace_conf): Don't error out early if there's no
1599 thread in the thread list.
1600 (handle_v_cont, myresume): Don't set the current thread to the
1601 continue thread.
1602 (process_serial_event) <Hg handling>: Also set thread_id if the
1603 previous general thread is still alive.
1604 (process_serial_event) <g/G handling>: If setting the current
1605 thread to the general thread fails, error out.
1606 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1607 thread's lwp instead of the current thread's.
1608 * target.c (set_desired_thread): If the desired thread was not
1609 found, leave the current thread pointing to NULL. Return an int
1610 (boolean) indicating success.
1611 * target.h (set_desired_thread): Change return type to int.
1612
1613 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1614
1615 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1616 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1617 #includes.
1618 (ps_get_thread_area): New function.
1619
1620 2015-08-19 Gary Benson <gbenson@redhat.com>
1621
1622 * hostio.c (handle_pread): Do not attempt to read more data
1623 than hostio_reply_with_data can fit in a packet.
1624
1625 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1626
1627 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1628
1629 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1630
1631 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1632
1633 2015-08-06 Pedro Alves <palves@redhat.com>
1634
1635 * tracepoint.c (expr_eval_result): Now an int.
1636
1637 2015-08-06 Pedro Alves <palves@redhat.com>
1638
1639 * gdbthread.h (struct regcache): Forward declare.
1640 (struct thread_info) <regcache_data>: Now a struct regcache
1641 pointer.
1642 * inferiors.c (inferior_regcache_data)
1643 (set_inferior_regcache_data): Now work with struct regcache
1644 pointers.
1645 * inferiors.h (struct regcache): Forward declare.
1646 (inferior_regcache_data, set_inferior_regcache_data): Now work
1647 with struct regcache pointers.
1648 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1649 (free_register_cache_thread): Remove struct regcache pointer
1650 casts.
1651
1652 2015-08-06 Pedro Alves <palves@redhat.com>
1653
1654 * server.c (captured_main): On error, print the exception message
1655 to stderr, and if run_once is set, throw a quit.
1656
1657 2015-08-06 Pedro Alves <palves@redhat.com>
1658
1659 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1660 the current thread.
1661
1662 2015-08-06 Pedro Alves <palves@redhat.com>
1663
1664 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1665 reading beyond the passed in buffer length.
1666
1667 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1668
1669 * tracepoint.c (symbol_list) <required>: Remove.
1670
1671 2015-08-06 Pedro Alves <palves@redhat.com>
1672
1673 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1674 count if stopping and suspending threads.
1675 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1676 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1677 (linux_detach): Complete an ongoing step-over.
1678 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1679 throughout.
1680 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1681 (linux_wait_1): If passing a signal to the inferior after
1682 finishing a step-over, unsuspend and re-resume all lwps. If we
1683 see a single-step event but the thread should be continuing, don't
1684 pass the trap to gdb.
1685 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1686 internal_error instead of gdb_assert.
1687 (enqueue_pending_signal): New function.
1688 (check_ptrace_stopped_lwp_gone): Add debug output.
1689 (start_step_over): Use internal_error instead of gdb_assert.
1690 (complete_ongoing_step_over): New function.
1691 (linux_resume_one_thread): Don't resume a suspended thread.
1692 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1693 it stepping.
1694
1695 2015-08-06 Pedro Alves <palves@redhat.com>
1696
1697 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1698 (linux_thread_alive): Use lwp_is_marked_dead.
1699 (extended_event_reported): Delete.
1700 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1701 instead of extended_event_reported.
1702 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1703 as well.
1704 (lwp_is_marked_dead): New function.
1705 (lwp_running): Use lwp_is_marked_dead.
1706 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1707 comment.
1708
1709 2015-08-06 Pedro Alves <palves@redhat.com>
1710
1711 * linux-low.c (linux_wait_1): Move fork event output out of the
1712 !report_to_gdb check. Pass event_child->waitstatus to
1713 target_waitstatus_to_string instead of ourstatus.
1714
1715 2015-08-04 Yao Qi <yao.qi@linaro.org>
1716
1717 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1718 if current_thread is 32 bit.
1719
1720 2015-08-04 Yao Qi <yao.qi@linaro.org>
1721
1722 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1723 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1724 * server.c (extended_protocol): Remove "static".
1725 * server.h (extended_protocol): Declare it.
1726
1727 2015-08-04 Yao Qi <yao.qi@linaro.org>
1728
1729 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1730 both aarch64 and aarch32.
1731 (aarch64_set_pc): Likewise.
1732
1733 2015-08-04 Yao Qi <yao.qi@linaro.org>
1734
1735 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1736 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1737 arm-with-neon.xml to srv_xmlfiles.
1738 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1739 (is_64bit_tdesc): New function.
1740 (aarch64_linux_read_description): New function.
1741 (aarch64_arch_setup): Call aarch64_linux_read_description.
1742 (regs_info): Rename to regs_info_aarch64.
1743 (aarch64_regs_info): Return right regs_info.
1744 (initialize_low_arch): Call initialize_low_arch_aarch32.
1745
1746 2015-08-04 Yao Qi <yao.qi@linaro.org>
1747
1748 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1749 * linux-aarch32-low.c: New file.
1750 * linux-aarch32-low.h: New file.
1751 * linux-arm-low.c (arm_fill_gregset): Move it to
1752 linux-aarch32-low.c.
1753 (arm_store_gregset): Likewise.
1754 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1755 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1756 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1757 (regs_info): Rename to regs_info_arm.
1758 (arm_regs_info): Return regs_info_aarch32 if
1759 have_ptrace_getregset is 1 and target description is
1760 arm_with_neon or arm_with_vfpv3.
1761 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1762 Call initialize_low_arch_aarch32 instead.
1763
1764 2015-08-04 Yao Qi <yao.qi@linaro.org>
1765
1766 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1767 * linux-low.c: ... here.
1768 * linux-low.h (have_ptrace_getregset): Declare it.
1769
1770 2015-08-04 Pedro Alves <palves@redhat.com>
1771
1772 * thread-db.c (struct thread_db): Use new typedefs.
1773 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1774 CHK calls.
1775 (disable_thread_event_reporting): Cast result of dlsym to
1776 destination function pointer type.
1777 (thread_db_mourn): Use td_ta_delete_ftype.
1778
1779 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1780
1781 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1782 arch variant.
1783 (CDX_BREAKPOINT): Define for R2.
1784 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1785 (the_low_target): Add comments.
1786
1787 2015-07-30 Yao Qi <yao.qi@linaro.org>
1788
1789 * linux-arm-low.c (arm_hwcap): Remove it.
1790 (arm_read_description): New local variable arm_hwcap. Don't
1791 set arm_hwcap to zero.
1792
1793 2015-07-30 Yao Qi <yao.qi@linaro.org>
1794
1795 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1796 Use regcache->tdesc instead.
1797 (arm_store_wmmxregset): Likewise.
1798 (arm_fill_vfpregset): Likewise.
1799 (arm_store_vfpregset): Likewise.
1800
1801 2015-07-30 Yao Qi <yao.qi@linaro.org>
1802
1803 * linux-arm-low.c: Include arch/arm.h.
1804 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1805 (arm_store_gregset): Likewise.
1806
1807 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1808
1809 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1810 ptrace's 4th parameter.
1811
1812 2015-07-27 Yao Qi <yao.qi@linaro.org>
1813
1814 * configure.srv (case aarch64*-*-linux*): Don't set
1815 srv_linux_usrregs.
1816
1817 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1818
1819 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1820 sys/ptrace.h.
1821 * linux-arm-low.c: Likewise.
1822 * linux-cris-low.c: Likewise.
1823 * linux-crisv32-low.c: Likewise.
1824 * linux-low.c: Likewise.
1825 * linux-m68k-low.c: Likewise.
1826 * linux-mips-low.c: Likewise.
1827 * linux-nios2-low.c: Likewise.
1828 * linux-s390-low.c: Likewise.
1829 * linux-sparc-low.c: Likewise.
1830 * linux-tic6x-low.c: Likewise.
1831 * linux-tile-low.c: Likewise.
1832 * linux-x86-low.c: Likewise.
1833
1834 2015-07-24 Pedro Alves <palves@redhat.com>
1835
1836 * config.in: Regenerate.
1837 * configure: Regenerate.
1838
1839 2015-07-24 Pedro Alves <palves@redhat.com>
1840
1841 * acinclude.m4: Include ../ptrace.m4.
1842 * configure.ac: Call GDB_AC_PTRACE.
1843 * config.in, configure: Regenerate.
1844
1845 2015-07-24 Yao Qi <yao.qi@linaro.org>
1846
1847 * linux-low.c (linux_create_inferior): Remove setting to
1848 proc->priv->new_inferior.
1849 (linux_attach): Likewise.
1850 (linux_low_filter_event): Likewise.
1851 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1852
1853 2015-07-24 Yao Qi <yao.qi@linaro.org>
1854
1855 * linux-low.c (linux_arch_setup): New function.
1856 (linux_low_filter_event): If proc->tdesc is NULL and
1857 proc->attached is true, call the_low_target.arch_setup.
1858 Otherwise, keep status pending, and return.
1859 (linux_resume_one_lwp_throw): Don't call get_pc if
1860 thread->while_stepping isn't NULL. Don't call
1861 get_thread_regcache if proc->tdesc is NULL.
1862 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1863 (linux_target_ops): Install arch_setup.
1864 * server.c (start_inferior): Call the_target->arch_setup.
1865 * target.h (struct target_ops) <arch_setup>: New field.
1866 (target_arch_setup): New marco.
1867 * lynx-low.c (lynx_target_ops): Update.
1868 * nto-low.c (nto_target_ops): Update.
1869 * spu-low.c (spu_target_ops): Update.
1870 * win32-low.c (win32_target_ops): Update.
1871
1872 2015-07-24 Yao Qi <yao.qi@linaro.org>
1873
1874 * linux-low.c (linux_add_process): Don't set
1875 proc->priv->new_inferior.
1876 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1877 (linux_attach): Likewise.
1878
1879 2015-07-24 Yao Qi <yao.qi@linaro.org>
1880
1881 * server.c (start_inferior): Code refactor.
1882
1883 2015-07-24 Yao Qi <yao.qi@linaro.org>
1884
1885 * server.c (process_serial_event): Set general_thread.
1886
1887 2015-07-21 Yao Qi <yao.qi@linaro.org>
1888
1889 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1890 aarch64_linux_get_debug_reg_capacity.
1891
1892 2015-07-17 Yao Qi <yao.qi@linaro.org>
1893
1894 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1895 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1896 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1897 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1898 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1899 (AARCH64_HWP_ALIGNMENT): Likewise.
1900 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1901 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1902 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1903 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1904 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1905 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1906 (struct aarch64_debug_reg_state): Likewise.
1907 (struct arch_lwp_info): Likewise.
1908 (aarch64_align_watchpoint): Likewise.
1909 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1910 (aarch64_watchpoint_length): Likewise.
1911 (aarch64_point_encode_ctrl_reg): Likewise
1912 (aarch64_point_is_aligned): Likewise.
1913 (aarch64_align_watchpoint): Likewise.
1914 (aarch64_linux_set_debug_regs):
1915 (aarch64_dr_state_insert_one_point): Likewise.
1916 (aarch64_dr_state_remove_one_point): Likewise.
1917 (aarch64_handle_breakpoint): Likewise.
1918 (aarch64_handle_aligned_watchpoint): Likewise.
1919 (aarch64_handle_unaligned_watchpoint): Likewise.
1920 (aarch64_handle_watchpoint): Likewise.
1921
1922 2015-07-17 Yao Qi <yao.qi@linaro.org>
1923
1924 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1925 and don't aarch64_get_debug_reg_state. All callers update.
1926 (aarch64_handle_aligned_watchpoint): Likewise.
1927 (aarch64_handle_unaligned_watchpoint): Likewise.
1928 (aarch64_handle_watchpoint): Likewise.
1929 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1930 (aarch64_remove_point): Likewise.
1931
1932 2015-07-17 Yao Qi <yao.qi@linaro.org>
1933
1934 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1935 debug_printf.
1936 (aarch64_handle_unaligned_watchpoint): Likewise.
1937
1938 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1939
1940 Revert the previous 3 commits:
1941 Move gdb_regex* to common/
1942 Move linux_find_memory_regions_full & co.
1943 gdbserver build-id attribute generator
1944
1945 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1946 Jan Kratochvil <jan.kratochvil@redhat.com>
1947
1948 gdbserver build-id attribute generator.
1949 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1950 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1951 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1952 (find_phdr): New.
1953 (get_dynamic): Use find_pdhr to traverse program headers.
1954 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1955 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1956 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1957 (get_hex_build_id): New.
1958 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1959 to reply XML document.
1960
1961 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1962 Jan Kratochvil <jan.kratochvil@redhat.com>
1963
1964 * target.c: Include target/target-utils.h and fcntl.h.
1965 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1966 (target_fileio_read_stralloc): New functions.
1967
1968 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1969
1970 * Makefile.in (OBS): Add gdb_regex.o.
1971 (gdb_regex.o): New.
1972 * config.in: Rebuilt.
1973 * configure: Rebuilt.
1974
1975 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1976 Jan Kratochvil <jan.kratochvil@redhat.com>
1977
1978 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1979 * Makefile.in (OBS): Add target-utils.o.
1980 (linux-maps.o, target-utils.o): New.
1981 * configure.srv (srv_linux_obj): Add linux-maps.o.
1982
1983 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1984
1985 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1986 function, return 1.
1987 (the_low_target): Install it.
1988
1989 2015-07-14 Pedro Alves <palves@redhat.com>
1990
1991 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1992 Instead, ignore ECHILD, and throw an error for other errnos.
1993
1994 2015-07-10 Pedro Alves <palves@redhat.com>
1995
1996 * event-loop.c (struct callback_event) <data>: Change type to
1997 gdb_client_data instance instead of gdb_client_data pointer.
1998 (append_callback_event): Adjust.
1999
2000 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2001
2002 * linux-aarch64-low.c: Add comments for each linux_target_ops
2003 method. Remove comments already covered in target_ops and
2004 linux_target_ops definitions.
2005 (the_low_target): Add comments for each unimplemented method.
2006
2007 2015-07-09 Yao Qi <yao.qi@linaro.org>
2008
2009 * linux-aarch64-low.c (aarch64_regmap): Remove.
2010 (aarch64_usrregs_info): Remove.
2011 (regs_info): Set field usrregs to NULL.
2012
2013 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2014
2015 * linux-low.c: Include "rsp-low.h"
2016 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2017 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2018 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2019 (handle_btrace_enable_pt): New.
2020 (handle_btrace_general_set): Support "pt".
2021 (handle_btrace_conf_general_set): Support "pt:size".
2022
2023 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2024
2025 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2026 Z_PACKET_SW_BP.
2027
2028 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2029
2030 * linux-aarch64-low.c: Remove comment about endianness.
2031 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2032 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2033 memcmp.
2034
2035 2015-06-24 Gary Benson <gbenson@redhat.com>
2036
2037 * linux-i386-ipa.c (stdint.h): Do not include.
2038 * lynx-i386-low.c (stdint.h): Likewise.
2039 * lynx-ppc-low.c (stdint.h): Likewise.
2040 * mem-break.c (stdint.h): Likewise.
2041 * thread-db.c (stdint.h): Likewise.
2042 * tracepoint.c (stdint.h): Likewise.
2043 * win32-low.c (stdint.h): Likewise.
2044
2045 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2046
2047 * server.c (write_qxfer_response): Update call to
2048 remote_escape_output.
2049
2050 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2051 Jan Kratochvil <jan.kratochvil@redhat.com>
2052
2053 Merge multiple hex conversions.
2054 * gdbreplay.c (tohex): Rename to 'fromhex'.
2055 (logchar): Use fromhex.
2056
2057 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2058
2059 * server.c (handle_qxfer_libraries): Set `version' attribute for
2060 <library-list>.
2061
2062 2015-06-10 Gary Benson <gbenson@redhat.com>
2063
2064 * target.h (struct target_ops) <multifs_open>: New field.
2065 <multifs_unlink>: Likewise.
2066 <multifs_readlink>: Likewise.
2067 * linux-low.c (nat/linux-namespaces.h): New include.
2068 (linux_target_ops): Initialize the_target->multifs_open,
2069 the_target->multifs_unlink and the_target->multifs_readlink.
2070 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2071 * hostio.c (hostio_fs_pid): New static variable.
2072 (hostio_handle_new_gdb_connection): New function.
2073 (handle_setfs): Likewise.
2074 (handle_open): Use the_target->multifs_open as appropriate.
2075 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2076 (handle_readlink): Use the_target->multifs_readlink as
2077 appropriate.
2078 (handle_vFile): Handle vFile:setfs packets.
2079 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2080 after target_handle_new_gdb_connection.
2081
2082 2015-06-10 Gary Benson <gbenson@redhat.com>
2083
2084 * configure.ac (AC_CHECK_FUNCS): Add setns.
2085 * config.in: Regenerate.
2086 * configure: Likewise.
2087 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2088 (linux-namespaces.o): New rule.
2089 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2090
2091 2015-06-09 Gary Benson <gbenson@redhat.com>
2092
2093 * hostio.c (handle_open): Process mode argument with
2094 fileio_to_host_mode.
2095
2096 2015-06-01 Yao Qi <yao.qi@linaro.org>
2097
2098 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2099 * linux-x86-low.c: Likewise.
2100
2101 2015-05-28 Don Breazeal <donb@codesourcery.com>
2102
2103 * linux-low.c (handle_extended_wait): Initialize
2104 thread_info.last_resume_kind for new fork children.
2105
2106 2015-05-15 Pedro Alves <palves@redhat.com>
2107
2108 * target.h (target_handle_new_gdb_connection): Rewrite using if
2109 wrapped in do/while.
2110
2111 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2112
2113 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2114 * configure, config.in: Regenerate.
2115 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2116 Declare typedef.
2117
2118 2015-05-12 Don Breazeal <donb@codesourcery.com>
2119
2120 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2121 PTRACE_EVENT_VFORK_DONE.
2122 (linux_low_ptrace_options, extended_event_reported): Add vfork
2123 events.
2124 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2125 and "vforkdone" for RSP 'T' Stop Reply Packet.
2126 * server.h (report_vfork_events): Declare
2127 global variable.
2128
2129 2015-05-12 Don Breazeal <donb@codesourcery.com>
2130
2131 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2132 (the_low_target) <new_fork>: Initialize new member.
2133 * linux-arm-low.c (arm_new_fork): New function.
2134 (the_low_target) <new_fork>: Initialize new member.
2135 * linux-low.c (handle_extended_wait): Call new target function
2136 new_fork.
2137 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2138 * linux-mips-low.c (mips_add_watchpoint): New function
2139 extracted from mips_insert_point.
2140 (the_low_target) <new_fork>: Initialize new member.
2141 (mips_linux_new_fork): New function.
2142 (mips_insert_point): Call mips_add_watchpoint.
2143 * linux-x86-low.c (x86_linux_new_fork): New function.
2144 (the_low_target) <new_fork>: Initialize new member.
2145
2146 2015-05-12 Don Breazeal <donb@codesourcery.com>
2147
2148 * linux-low.c (handle_extended_wait): Implement return value,
2149 rename argument 'event_child' to 'event_lwp', handle
2150 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2151 (linux_low_ptrace_options): New function.
2152 (linux_low_filter_event): Call linux_low_ptrace_options,
2153 use different argument fo linux_enable_event_reporting,
2154 use return value from handle_extended_wait.
2155 (extended_event_reported): New function.
2156 (linux_wait_1): Call extended_event_reported and set
2157 status to report fork events.
2158 (linux_write_memory): Add pid to debug message.
2159 (reset_lwp_ptrace_options_callback): New function.
2160 (linux_handle_new_gdb_connection): New function.
2161 (linux_target_ops): Initialize new structure member.
2162 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2163 * lynx-low.c: Initialize new structure member.
2164 * remote-utils.c (prepare_resume_reply): Implement stop reason
2165 "fork" for "T" stop message.
2166 * server.c (handle_query): Call handle_new_gdb_connection.
2167 * server.h (report_fork_events): Declare global flag.
2168 * target.h (struct target_ops) <handle_new_gdb_connection>:
2169 New member.
2170 (target_handle_new_gdb_connection): New macro.
2171 * win32-low.c: Initialize new structure member.
2172
2173 2015-05-12 Don Breazeal <donb@codesourcery.com>
2174
2175 * mem-break.c (APPEND_TO_LIST): Define macro.
2176 (clone_agent_expr): New function.
2177 (clone_one_breakpoint): New function.
2178 (clone_all_breakpoints): New function.
2179 * mem-break.h: Declare new functions.
2180
2181 2015-05-12 Don Breazeal <donb@codesourcery.com>
2182
2183 * linux-low.c (linux_supports_fork_events): New function.
2184 (linux_supports_vfork_events): New function.
2185 (linux_target_ops): Initialize new structure members.
2186 (initialize_low): Call linux_check_ptrace_features.
2187 * lynx-low.c (lynx_target_ops): Initialize new structure
2188 members.
2189 * server.c (report_fork_events, report_vfork_events):
2190 New global flags.
2191 (handle_query): Add new features to qSupported packet and
2192 response.
2193 (captured_main): Initialize new global variables.
2194 * target.h (struct target_ops) <supports_fork_events>:
2195 New member.
2196 <supports_vfork_events>: New member.
2197 (target_supports_fork_events): New macro.
2198 (target_supports_vfork_events): New macro.
2199 * win32-low.c (win32_target_ops): Initialize new structure
2200 members.
2201
2202 2015-05-12 Gary Benson <gbenson@redhat.com>
2203
2204 * server.c (handle_qxfer_exec_file): Use current process
2205 if annex is empty.
2206
2207 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2208
2209 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2210 Remove HAVE_PTRACE_GETREGS conditionals.
2211 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2212 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2213
2214 2015-05-08 Yao Qi <yao.qi@linaro.org>
2215
2216 * linux-low.c (linux_supports_conditional_breakpoints): New
2217 function.
2218 (linux_target_ops): Install new target method.
2219 * lynx-low.c (lynx_target_ops): Install NULL hook for
2220 supports_conditional_breakpoints.
2221 * nto-low.c (nto_target_ops): Likewise.
2222 * spu-low.c (spu_target_ops): Likewise.
2223 * win32-low.c (win32_target_ops): Likewise.
2224 * server.c (handle_query): Check
2225 target_supports_conditional_breakpoints.
2226 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2227 New field.
2228 (target_supports_conditional_breakpoints): New macro.
2229
2230 2015-05-06 Pedro Alves <palves@redhat.com>
2231
2232 PR server/18081
2233 * server.c (start_inferior): If the process exits, mourn it.
2234
2235 2015-04-21 Gary Benson <gbenson@redhat.com>
2236
2237 * hostio.c (fileio_open_flags_to_host): Factored out to
2238 fileio_to_host_openflags in common/fileio.c. Single use
2239 updated.
2240
2241 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2242
2243 * linux-xtensa-low.c (xtensa_fill_gregset)
2244 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2245 XCHAL_HAVE_LOOP.
2246
2247 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2248
2249 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2250 (regs_info): Replace usrregs pointer with NULL.
2251
2252 2015-04-17 Gary Benson <gbenson@redhat.com>
2253
2254 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2255 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2256 * server.c (handle_qxfer_exec_file): New function.
2257 (qxfer_packets): Add exec-file entry.
2258 (handle_query): Report qXfer:exec-file:read as supported packet.
2259
2260 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2261
2262 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2263
2264 2015-04-09 Gary Benson <gbenson@redhat.com>
2265
2266 * hostio-errno.c (errno_to_fileio_error): Remove function.
2267 Update caller to use remote_fileio_to_fio_error.
2268
2269 2015-04-09 Yao Qi <yao.qi@linaro.org>
2270
2271 * linux-low.c (linux_insert_point): Call
2272 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2273 (linux_remove_point): Call remove_memory_breakpoint if type is
2274 raw_bkpt_type_sw.
2275 * linux-x86-low.c (x86_insert_point): Don't call
2276 insert_memory_breakpoint.
2277 (x86_remove_point): Don't call remove_memory_breakpoint.
2278
2279 2015-04-01 Pedro Alves <palves@redhat.com>
2280 Cleber Rosa <crosa@redhat.com>
2281
2282 * server.c (gdbserver_usage): Reorganize and extend the usage
2283 message.
2284
2285 2015-03-24 Pedro Alves <palves@redhat.com>
2286
2287 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2288 output. Also dump TRAP_TRACE.
2289 (linux_low_filter_event): In debug output, distinguish a
2290 resume_stop SIGSTOP from a delayed SIGSTOP.
2291
2292 2015-03-24 Gary Benson <gbenson@redhat.com>
2293
2294 * linux-x86-low.c (x86_linux_new_thread): Moved to
2295 nat/x86-linux.c.
2296 (x86_linux_prepare_to_resume): Likewise.
2297
2298 2015-03-24 Gary Benson <gbenson@redhat.com>
2299
2300 * Makefile.in (x86-linux-dregs.o): New rule.
2301 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2302 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2303 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2304 (x86_linux_dr_get): Likewise.
2305 (x86_linux_dr_set): Likewise.
2306 (update_debug_registers_callback): Likewise.
2307 (x86_linux_dr_set_addr): Likewise.
2308 (x86_linux_dr_get_addr): Likewise.
2309 (x86_linux_dr_set_control): Likewise.
2310 (x86_linux_dr_get_control): Likewise.
2311 (x86_linux_dr_get_status): Likewise.
2312 (x86_linux_update_debug_registers): Likewise.
2313
2314 2015-03-24 Gary Benson <gbenson@redhat.com>
2315
2316 * linux-x86-low.c (x86_linux_update_debug_registers):
2317 New function, factored out from...
2318 (x86_linux_prepare_to_resume): ...this.
2319
2320 2015-03-24 Gary Benson <gbenson@redhat.com>
2321
2322 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2323 (x86_linux_dr_set): Likewise.
2324 (update_debug_registers_callback): Likewise.
2325 (x86_linux_dr_set_addr): Likewise.
2326 (x86_linux_dr_get_addr): Likewise.
2327 (x86_linux_dr_set_control): Likewise.
2328 (x86_linux_dr_get_control): Likewise.
2329 (x86_linux_dr_get_status): Likewise.
2330 (x86_linux_prepare_to_resume): Likewise.
2331
2332 2015-03-24 Gary Benson <gbenson@redhat.com>
2333
2334 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2335 Use perror_with_name. Pass string through gettext.
2336 (x86_linux_dr_set): Likewise.
2337
2338 2015-03-24 Gary Benson <gbenson@redhat.com>
2339
2340 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2341 (x86_linux_dr_set_addr): ...this.
2342 (x86_dr_low_get_addr): Rename to...
2343 (x86_linux_dr_get_addr): ...this.
2344 (x86_dr_low_set_control): Rename to...
2345 (x86_linux_dr_set_control): ...this.
2346 (x86_dr_low_get_control): Rename to...
2347 (x86_linux_dr_get_control): ...this.
2348 (x86_dr_low_get_status): Rename to...
2349 (x86_linux_dr_get_status): ...this.
2350 (x86_dr_low): Update with new function names.
2351
2352 2015-03-24 Gary Benson <gbenson@redhat.com>
2353
2354 * Makefile.in (x86-linux.o): New rule.
2355 * configure.srv: Add x86-linux.o to relevant targets.
2356 * linux-low.c (lwp_set_arch_private_info): New function.
2357 (lwp_arch_private_info): Likewise.
2358 * linux-x86-low.c: Include nat/x86-linux.h.
2359 (arch_lwp_info): Removed structure.
2360 (update_debug_registers_callback):
2361 Use lwp_set_debug_registers_changed.
2362 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2363 and lwp_set_debug_registers_changed.
2364 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2365
2366 2015-03-24 Gary Benson <gbenson@redhat.com>
2367
2368 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2369 * linux-arm-low.c (arm_new_thread): Likewise.
2370 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2371 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2372 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2373 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2374
2375 2015-03-24 Gary Benson <gbenson@redhat.com>
2376
2377 * linux-low.c (ptid_of_lwp): New function.
2378 (lwp_is_stopped): Likewise.
2379 (lwp_stop_reason): Likewise.
2380 * linux-x86-low.c (update_debug_registers_callback):
2381 Use lwp_is_stopped.
2382 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2383 lwp_stop_reason.
2384
2385 2015-03-24 Gary Benson <gbenson@redhat.com>
2386
2387 * linux-low.h (linux_stop_lwp): Remove declaration.
2388
2389 2015-03-24 Gary Benson <gbenson@redhat.com>
2390
2391 * linux-low.h: Include nat/linux-nat.h.
2392 * linux-low.c (iterate_over_lwps_args): New structure.
2393 (iterate_over_lwps_filter): New function.
2394 (iterate_over_lwps): Likewise.
2395 * linux-x86-low.c (update_debug_registers_callback):
2396 Update signature to what iterate_over_lwps expects.
2397 Remove PID check that iterate_over_lwps now performs.
2398 (x86_dr_low_set_addr): Use iterate_over_lwps.
2399 (x86_dr_low_set_control): Likewise.
2400
2401 2015-03-24 Gary Benson <gbenson@redhat.com>
2402
2403 * linux-x86-low.c (x86_debug_reg_state): New function.
2404 (x86_linux_prepare_to_resume): Use the above.
2405
2406 2015-03-24 Gary Benson <gbenson@redhat.com>
2407
2408 * linux-low.c (current_lwp_ptid): New function.
2409 * linux-x86-low.c: Include nat/linux-nat.h.
2410 (x86_dr_low_get_addr): Use current_lwp_ptid.
2411 (x86_dr_low_get_control): Likewise.
2412 (x86_dr_low_get_status): Likewise.
2413
2414 2015-03-20 Pedro Alves <palves@redhat.com>
2415
2416 * tracepoint.c (cmd_qtstatus): Make "str" const.
2417
2418 2015-03-20 Pedro Alves <palves@redhat.com>
2419
2420 * server.c (handle_general_set): Make "req_str" const.
2421
2422 2015-03-19 Pedro Alves <palves@redhat.com>
2423
2424 * linux-low.c (linux_resume_one_lwp): Rename to ...
2425 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2426 instead call perror_with_name.
2427 (check_ptrace_stopped_lwp_gone): New function.
2428 (linux_resume_one_lwp): Reimplement as wrapper around
2429 linux_resume_one_lwp_throw that swallows errors if the LWP is
2430 gone.
2431
2432 2015-03-19 Pedro Alves <palves@redhat.com>
2433
2434 * linux-low.c (count_events_callback, select_event_lwp_callback):
2435 No longer check whether the thread has resume_stop as last resume
2436 kind.
2437
2438 2015-03-19 Pedro Alves <palves@redhat.com>
2439
2440 * linux-low.c (count_events_callback, select_event_lwp_callback):
2441 Use the lwp's status_pending_p field, not the thread's.
2442
2443 2015-03-19 Pedro Alves <palves@redhat.com>
2444
2445 * linux-low.c (select_event_lwp_callback): Update comments to
2446 no longer mention SIGTRAP.
2447
2448 2015-03-18 Gary Benson <gbenson@redhat.com>
2449
2450 * server.c (handle_query): Do not report vFile:fstat as supported.
2451
2452 2015-03-11 Gary Benson <gbenson@redhat.com>
2453
2454 * hostio.c (sys/types.h): New include.
2455 (sys/stat.h): Likewise.
2456 (common-remote-fileio.h): Likewise.
2457 (handle_fstat): New function.
2458 (handle_vFile): Handle vFile:fstat packets.
2459
2460 2015-03-11 Gary Benson <gbenson@redhat.com>
2461
2462 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2463 struct stat.st_blocks and struct stat.st_blksize.
2464 * configure: Regenerate.
2465 * config.in: Likewise.
2466 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2467 (OBS): Add common-remote-fileio.o.
2468 (common-remote-fileio.o): New rule.
2469
2470 2015-03-09 Pedro Alves <palves@redhat.com>
2471
2472 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2473 'struct sockaddr' pointer in 'accept' call.
2474
2475 2015-03-09 Pedro Alves <palves@redhat.com>
2476
2477 Revert:
2478 2015-03-07 Pedro Alves <palves@redhat.com>
2479 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2480 or <winsock2.h> here. Instead include "gdb_socket.h".
2481 (remote_open): Use union gdb_sockaddr_u.
2482 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2483 or <winsock2.h> here. Instead include "gdb_socket.h".
2484 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2485 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2486 or <sys/un.h>.
2487 (init_named_socket, gdb_agent_helper_thread): Use union
2488 gdb_sockaddr_u.
2489
2490 2015-03-07 Pedro Alves <palves@redhat.com>
2491
2492 * configure.ac (build_warnings): Move
2493 -Wdeclaration-after-statement to the C-specific set.
2494 * configure: Regenerate.
2495
2496 2015-03-07 Pedro Alves <palves@redhat.com>
2497
2498 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2499 or <winsock2.h> here. Instead include "gdb_socket.h".
2500 (remote_open): Use union gdb_sockaddr_u.
2501 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2502 or <winsock2.h> here. Instead include "gdb_socket.h".
2503 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2504 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2505 or <sys/un.h>.
2506 (init_named_socket, gdb_agent_helper_thread): Use union
2507 gdb_sockaddr_u.
2508
2509 2015-03-07 Pedro Alves <palves@redhat.com>
2510
2511 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2512 instead.
2513
2514 2015-03-06 Yao Qi <yao.qi@linaro.org>
2515
2516 * linux-aarch64-low.c (aarch64_insert_point): Use
2517 show_debug_regs as a boolean.
2518 (aarch64_remove_point): Likewise.
2519
2520 2015-03-05 Pedro Alves <palves@redhat.com>
2521
2522 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2523 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2524 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2525 * nto-low.c (nto_target_ops): Likewise.
2526 * spu-low.c (spu_target_ops): Likewise.
2527 * win32-low.c (win32_target_ops): Likewise.
2528
2529 2015-03-04 Pedro Alves <palves@redhat.com>
2530
2531 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2532 Decide whether a breakpoint triggered based on the SIGTRAP's
2533 siginfo.si_code.
2534 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2535 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2536 (linux_low_filter_event): Check for breakpoints before checking
2537 watchpoints.
2538 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2539 siginfo.si_code.
2540 (linux_stopped_by_sw_breakpoint)
2541 (linux_supports_stopped_by_sw_breakpoint)
2542 (linux_stopped_by_hw_breakpoint)
2543 (linux_supports_stopped_by_hw_breakpoint): New functions.
2544 (linux_target_ops): Install new target methods.
2545
2546 2015-03-04 Pedro Alves <palves@redhat.com>
2547
2548 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2549 * server.c (swbreak_feature, hwbreak_feature): New globals.
2550 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2551 (captured_main): Clear swbreak_feature and hwbreak_feature.
2552 * server.h (swbreak_feature, hwbreak_feature): Declare.
2553 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2554 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2555 supports_stopped_by_hw_breakpoint>: New fields.
2556 (target_supports_stopped_by_sw_breakpoint)
2557 (target_stopped_by_sw_breakpoint)
2558 (target_supports_stopped_by_hw_breakpoint)
2559 (target_stopped_by_hw_breakpoint): Declare.
2560
2561 2015-03-04 Pedro Alves <palves@redhat.com>
2562
2563 enum lwp_stop_reason -> enum target_stop_reason
2564 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2565 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2566 (linux_wait_1, stuck_in_jump_pad_callback)
2567 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2568 (linux_stopped_by_watchpoint):
2569 * linux-low.h (enum lwp_stop_reason): Delete.
2570 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2571 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2572
2573 2015-03-04 Yao Qi <yao.qi@linaro.org>
2574
2575 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2576
2577 2015-03-03 Gary Benson <gbenson@redhat.com>
2578
2579 * hostio.c (handle_vFile): Fix prefix lengths.
2580
2581 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2582
2583 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2584 ptr_bits.
2585
2586 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2587
2588 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2589 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2590 (clean): Add "rm -f" for above C files.
2591 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2592 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2593 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2594 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2595 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2596 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2597 (init_registers_s390x_vx_linux64)
2598 (init_registers_s390x_tevx_linux64)
2599 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2600 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2601 declarations.
2602 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2603 (s390_store_vxrs_high): New functions.
2604 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2605 NT_S390_VXRS_HIGH.
2606 (s390_arch_setup): Add logic for selecting one of the new target
2607 descriptions. Activate the new vector regsets if applicable.
2608 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2609 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2610 and init_registers_s390x_tevx_linux64.
2611
2612 2015-03-01 Pedro Alves <palves@redhat.com>
2613
2614 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2615 parameter.
2616
2617 2015-02-27 Pedro Alves <palves@redhat.com>
2618
2619 * linux-x86-low.c (u_debugreg_offset): New function.
2620 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2621
2622 2015-02-27 Pedro Alves <palves@redhat.com>
2623
2624 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2625 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2626 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2627 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2628 (ps_lsetfpregs, ps_getpid)
2629 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2630 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2631 (ps_lsetxregs, ps_plog): Declare.
2632
2633 2015-02-27 Pedro Alves <palves@redhat.com>
2634
2635 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2636 IP_AGENT_EXPORT_FUNC.
2637 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2638 IP_AGENT_EXPORT_FUNC.
2639 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2640 (IP_AGENT_EXPORT): Delete.
2641 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2642 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2643 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2644 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2645 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2646 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2647 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2648 (traceframe_read_count, traceframe_write_count)
2649 (traceframes_created, trace_state_variables, get_raw_reg)
2650 (get_trace_state_variable_value, set_trace_state_variable_value)
2651 (ust_loaded, helper_thread_id, cmd_buf): Use
2652 IPA_SYM_EXPORTED_NAME.
2653 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2654 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2655 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2656 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2657 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2658 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2659 EXTERN_C_PUSH/EXTERN_C_POP.
2660 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2661 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2662 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2663 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2664 (traceframe_write_count, traceframe_read_count)
2665 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2666 (about_to_request_buffer_space, get_trace_state_variable_value)
2667 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2668 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2669 EXTERN_C_PUSH/EXTERN_C_POP.
2670 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2671 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2672 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2673 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2674 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2675 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2676 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2677 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2678 Define.
2679 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2680 (IP_AGENT_EXPORT_VAR_DECL): Define.
2681 (tracing): Declare.
2682 (gdb_agent_get_raw_reg): Declare.
2683
2684 2015-02-27 Tom Tromey <tromey@redhat.com>
2685 Pedro Alves <palves@redhat.com>
2686
2687 Rename symbols whose names are reserved C++ keywords throughout.
2688
2689 2015-02-27 Pedro Alves <palves@redhat.com>
2690
2691 * Makefile.in (COMPILER): New, get it from autoconf.
2692 (CXX): Get from autoconf instead.
2693 (COMPILE.pre): Use COMPILER.
2694 (CC-LD): Rename to ...
2695 (CC_LD): ... this. Use COMPILER.
2696 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2697 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2698 * acinclude.m4: Include build-with-cxx.m4.
2699 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2700 Disable -Werror by default if building in C++ mode.
2701 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2702 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2703 the C++ compiler. Save/restore CXXFLAGS too.
2704 * configure: Regenerate.
2705
2706 2015-02-27 Pedro Alves <palves@redhat.com>
2707
2708 * acinclude.m4: Include libiberty.m4.
2709 * configure.ac: Call libiberty_INIT.
2710 * config.in, configure: Regenerate.
2711
2712 2015-02-26 Pedro Alves <palves@redhat.com>
2713
2714 * linux-low.c (linux_wait_1): When incrementing the PC past a
2715 program breakpoint always use the_low_target.breakpoint_len as
2716 increment, rather than the maximum between that and
2717 the_low_target.decr_pc_after_break.
2718
2719 2015-02-23 Pedro Alves <palves@redhat.com>
2720
2721 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2722 thread was doing a step-over; always adjust the PC if
2723 we stepped over a permanent breakpoint.
2724 (linux_wait_1): If we stepped over breakpoint that was on top of a
2725 permanent breakpoint, manually advance the PC past it.
2726
2727 2015-02-23 Pedro Alves <palves@redhat.com>
2728
2729 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2730 modes.
2731 (x86_fill_gregset, x86_store_gregset): Use it when handling
2732 $orig_eax.
2733
2734 2015-02-20 Pedro Alves <palves@redhat.com>
2735
2736 * thread-db.c: Include "nat/linux-procfs.h".
2737 (thread_db_init): Skip listing new threads if the kernel supports
2738 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2739
2740 2015-02-20 Pedro Alves <palves@redhat.com>
2741
2742 * linux-low.c (status_pending_p_callback): Use ptid_match.
2743
2744 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2745
2746 PR breakpoints/16812
2747 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2748 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2749 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2750
2751 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2752
2753 PR breakpoints/15956
2754 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2755
2756 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2757
2758 * linux-low.c (linux_low_btrace_conf): Print size.
2759 * server.c (handle_btrace_conf_general_set): New.
2760 (hanle_general_set): Call handle_btrace_conf_general_set.
2761 (handle_query): Report Qbtrace-conf:bts:size as supported.
2762
2763 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2764
2765 * linux-low.c (linux_low_enable_btrace): Update parameters.
2766 (linux_low_btrace_conf): New.
2767 (linux_target_ops)<to_btrace_conf>: Initialize.
2768 * server.c (current_btrace_conf): New.
2769 (handle_btrace_enable): Rename to ...
2770 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2771 to target_enable_btrace. Update comment. Update users.
2772 (handle_qxfer_btrace_conf): New.
2773 (qxfer_packets): Add btrace-conf entry.
2774 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2775 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2776 (target_ops)<read_btrace_conf>: New.
2777 (target_enable_btrace): Update parameters.
2778 (target_read_btrace_conf): New.
2779
2780 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2781
2782 * server.c (handle_btrace_general_set): Remove call to
2783 target_supports_btrace.
2784 (supported_btrace_packets): New.
2785 (handle_query): Call supported_btrace_packets.
2786 * target.h: include btrace-common.h.
2787 (btrace_target_info): Removed.
2788 (supports_btrace, target_supports_btrace): Update parameters.
2789
2790 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2791
2792 * Makefile.in (SFILES): Add common/btrace-common.c.
2793 (OBS): Add common/btrace-common.o.
2794 (btrace-common.o): Add build rules.
2795 * linux-low: Include btrace-common.h.
2796 (linux_low_read_btrace): Use struct btrace_data. Call
2797 btrace_data_init and btrace_data_fini.
2798
2799 2015-02-06 Pedro Alves <palves@redhat.com>
2800
2801 * thread-db.c (find_new_threads_callback): Add debug output.
2802
2803 2015-02-04 Pedro Alves <palves@redhat.com>
2804
2805 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2806 (resume_stopped_resumed_lwps): New function.
2807 (linux_wait_for_event_filtered): Use it.
2808
2809 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2810
2811 * Makefile.in (SFILES): Add linux-personality.c.
2812 (linux-personality.o): New rule.
2813 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2814 list of objects to be built.
2815 * linux-low.c: Include nat/linux-personality.h.
2816 (linux_create_inferior): Remove code to disable address space
2817 randomization (moved to ../nat/linux-personality.c). Create
2818 cleanup to disable address space randomization.
2819
2820 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2821
2822 * Makefile.in (posix-strerror.o): New rule.
2823 (mingw-strerror.o): Likewise.
2824 * configure: Regenerated.
2825 * configure.ac: Source file ../common/common.host. Initialize new
2826 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2827
2828 2015-01-14 Yao Qi <yao@codesourcery.com>
2829
2830 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2831 (ppc-linux.o): New rule.
2832 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2833 * configure.ac: AC_CHECK_FUNCS(getauxval).
2834 * config.in: Re-generated.
2835 * configure: Re-generated.
2836 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2837 ppc64_64bit_inferior_p
2838
2839 2015-01-14 Yao Qi <yao@codesourcery.com>
2840
2841 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2842 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2843 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2844 (PT_ORIG_R3, PT_TRAP): Likewise.
2845 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2846 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2847 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2848
2849 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2850
2851 * i387-fp.c (i387_cache_to_xsave): In look over
2852 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2853 zmmh_low_space field by use of zmmh_high_space.
2854
2855 2015-01-09 Pedro Alves <palves@redhat.com>
2856
2857 * linux-low.c (step_over_bkpt): Move higher up in the file.
2858 (handle_extended_wait): Don't store the stop_pc here.
2859 (get_stop_pc): Adjust comments and rename to ...
2860 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2861 stopped for a software breakpoint or hardware breakpoint.
2862 (thread_still_has_status_pending_p): New function.
2863 (status_pending_p_callback): Use
2864 thread_still_has_status_pending_p. If the event is no longer
2865 interesting, resume the LWP.
2866 (handle_tracepoints): Add assert.
2867 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2868 (wstatus_maybe_breakpoint): New function.
2869 (cancel_breakpoint): Delete function.
2870 (check_stopped_by_watchpoint): New function, factored out from
2871 linux_low_filter_event.
2872 (lp_status_maybe_breakpoint): Delete function.
2873 (linux_low_filter_event): Remove filter_ptid argument.
2874 Leave thread group exits pending here. Store the LWP's stop PC.
2875 Always leave events pending.
2876 (linux_wait_for_event_filtered): Pull all events out of the
2877 kernel, and leave them all pending.
2878 (count_events_callback, select_event_lwp_callback): Consider all
2879 events.
2880 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2881 (select_event_lwp): Only give preference to the stepping LWP in
2882 all-stop mode. Adjust comments.
2883 (ignore_event): New function.
2884 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2885 references to cancel_breakpoints. Adjust to renames. Also give
2886 equal priority to all LWPs that have had events in non-stop mode.
2887 If reporting a software breakpoint event, unadjust the LWP's PC.
2888 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2889 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2890 Adjust.
2891 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2892 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2893 (linux_stopped_by_watchpoint): Adjust.
2894 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2895 * linux-low.h (enum lwp_stop_reason): New.
2896 (struct lwp_info) <stop_pc>: Adjust comment.
2897 <stopped_by_watchpoint>: Delete field.
2898 <stop_reason>: New field.
2899 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2900 * mem-break.c (software_breakpoint_inserted_here)
2901 (hardware_breakpoint_inserted_here): New function.
2902 * mem-break.h (software_breakpoint_inserted_here)
2903 (hardware_breakpoint_inserted_here): Declare.
2904 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2905 (cancel_breakpoints): Delete.
2906 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2907 (upload_fast_traceframes): Remove references to
2908 cancel_breakpoints.
2909
2910 2015-01-09 Pedro Alves <palves@redhat.com>
2911
2912 * thread-db.c (find_new_threads_callback): Ignore thread if the
2913 kernel thread ID is -1.
2914
2915 2015-01-09 Pedro Alves <palves@redhat.com>
2916
2917 * linux-low.c (linux_attach_fail_reason_string): Move to
2918 nat/linux-ptrace.c, and rename.
2919 (linux_attach_lwp): Update comment.
2920 (attach_proc_task_lwp_callback): New function.
2921 (linux_attach): Adjust to rename and use
2922 linux_proc_attach_tgid_threads.
2923 (linux_attach_fail_reason_string): Delete declaration.
2924
2925 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2926
2927 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2928 * server.c (gdbserver_version): Likewise.
2929
2930 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2931
2932 * remote-utils.c: Include ctype.h.
2933 (input_interrupt): Explicitly handle the case when the char
2934 received is the NUL byte. Improve the printing of non-ASCII
2935 characters.
2936
2937 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2938
2939 * linux-low.c (linux_low_filter_event): Update call to
2940 linux_enable_event_reporting following the addition of
2941 a new parameter to that function.
2942
2943 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2944
2945 PR server/17457
2946 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2947 (AARCH64_FPCR_REGNO): Likewise.
2948 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2949 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2950 (aarch64_store_fpregset): Likewise.
2951
2952 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2953
2954 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2955 Remove FIXME comment about assumption about N.
2956
2957 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2958
2959 * configure.ac: If large-file support is disabled in GDBserver,
2960 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2961 * configure: Regenerate.
2962
2963 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2964
2965 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2966 warning upon ENODATA from ptrace.
2967 * linux-s390-low.c (s390_store_tdb): New.
2968 (s390_regsets): Add regset for NT_S390_TDB.
2969
2970 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2971
2972 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2973 without a fill_function.
2974 * linux-s390-low.c (s390_fill_last_break): Remove.
2975 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2976 (s390_arch_setup): Use regset's size instead of fill_function for
2977 loop end condition.
2978
2979 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2980
2981 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2982 the regset's store function when ptrace returned an error.
2983 * regcache.c (get_thread_regcache): Invalidate register cache
2984 before fetching inferior's registers.
2985
2986 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2987
2988 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2989 while-loop as for-loop.
2990 (regsets_store_inferior_registers): Likewise.
2991
2992 2014-11-28 Yao Qi <yao@codesourcery.com>
2993
2994 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2995 * config.in, configure: Re-generate.
2996 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2997 is defined.
2998
2999 2014-11-21 Yao Qi <yao@codesourcery.com>
3000
3001 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3002 (AC_CHECK_HEADERS): Remove malloc.h.
3003 * configure: Re-generated.
3004 * config.in: Re-generated.
3005 * server.h: Don't include alloca.h and malloc.h.
3006 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3007 Don't include malloc.h.
3008
3009 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3010
3011 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3012 corresponding ERRNO check in same block.
3013
3014 2014-11-12 Pedro Alves <palves@redhat.com>
3015
3016 * server.c (cont_thread): Update comment.
3017 (start_inferior, attach_inferior): No longer clear cont_thread.
3018 (handle_v_cont): No longer set cont_thread.
3019 (captured_main): Clear cont_thread each time a GDB connects.
3020
3021 2014-11-12 Pedro Alves <palves@redhat.com>
3022
3023 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3024 thread, and don't resume all threads if the Hc thread has exited.
3025
3026 2014-11-12 Pedro Alves <palves@redhat.com>
3027
3028 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3029 the process group instead of to a specific LWP.
3030
3031 2014-10-15 Pedro Alves <palves@redhat.com>
3032
3033 PR server/17487
3034 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3035 parameter.
3036 (arm_set_thread_context): Delete.
3037 (the_low_target): Adjust.
3038 * win32-i386-low.c (debug_registers_changed)
3039 (debug_registers_used): Delete.
3040 (update_debug_registers_callback): New function.
3041 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3042 needing to update their debug registers.
3043 (win32_get_current_dr): New function.
3044 (x86_dr_low_get_addr, x86_dr_low_get_control)
3045 (x86_dr_low_get_status): Fetch the debug register from the thread
3046 record's context.
3047 (i386_initial_stuff): Adjust.
3048 (i386_get_thread_context): Remove current_event parameter. Don't
3049 clear debug_registers_changed nor copy DR values to
3050 debug_reg_state.
3051 (i386_set_thread_context): Delete.
3052 (i386_prepare_to_resume): New function.
3053 (i386_thread_added): Mark the thread as needing to update irs
3054 debug registers.
3055 (the_low_target): Remove i386_set_thread_context and install
3056 i386_prepare_to_resume.
3057 * win32-low.c (win32_get_thread_context): Adjust.
3058 (win32_set_thread_context): Use SetThreadContext
3059 directly.
3060 (win32_prepare_to_resume): New function.
3061 (win32_require_context): New function, factored out from ...
3062 (thread_rec): ... this.
3063 (continue_one_thread): Call win32_prepare_to_resume on each thread
3064 we're about to continue.
3065 (win32_resume): Call win32_prepare_to_resume on the event thread.
3066 * win32-low.h (struct win32_thread_info)
3067 <debug_registers_changed>: New field.
3068 (struct win32_target_ops): Change prototype of set_thread_context,
3069 delete set_thread_context and add prepare_to_resume.
3070 (win32_require_context): New declaration.
3071
3072 2014-10-08 Gary Benson <gbenson@redhat.com>
3073
3074 * server.h: Do not include common-exceptions.h.
3075
3076 2014-10-08 Gary Benson <gbenson@redhat.com>
3077
3078 * server.h: Do not include cleanups.h.
3079
3080 2014-09-30 James Hogan <james.hogan@imgtec.com>
3081
3082 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3083 mips64-dsp-linux.c.
3084
3085 2014-09-23 Yao Qi <yao@codesourcery.com>
3086
3087 * linux-low.c (lp_status_maybe_breakpoint): New function.
3088 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3089 (count_events_callback): Likewise.
3090 (select_event_lwp_callback): Likewise.
3091 (cancel_breakpoints_callback): Likewise.
3092
3093 2014-09-19 Don Breazeal <donb@codesourcery.com>
3094
3095 * linux-low.c (handle_extended_wait): Call
3096 linux_ptrace_get_extended_event.
3097 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3098 linux_is_extended_waitstatus.
3099
3100 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3101
3102 * Makefile.in (CPPFLAGS): Define.
3103 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3104 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3105
3106 2014-09-16 Gary Benson <gbenson@redhat.com>
3107
3108 * inferiors.h (current_inferior): Renamed as...
3109 (current_thread): New variable. All uses updated.
3110 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3111 (maybe_move_out_of_jump_pad): Likewise.
3112 (cancel_breakpoint): Likewise.
3113 (linux_low_filter_event): Likewise.
3114 (wait_for_sigstop): Likewise.
3115 (linux_resume_one_lwp): Likewise.
3116 (need_step_over_p): Likewise.
3117 (start_step_over): Likewise.
3118 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3119 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3120 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3121 and save_inferior as saved_thread.
3122 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3123 saved_thread.
3124 (regcache_invalidate_thread): Likewise.
3125 * remote-utils.c (prepare_resume_reply): Likewise.
3126 * thread-db.c (thread_db_get_tls_address): Likewise.
3127 (disable_thread_event_reporting): Likewise.
3128 (remove_thread_event_breakpoints): Likewise.
3129 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3130 as saved_thread.
3131 * target.h (set_desired_inferior): Renamed as...
3132 (set_desired_thread): New declaration. All uses updated.
3133 * server.c (myresume): Updated comment to reference thread instead
3134 of inferior.
3135 (handle_serial_event): Likewise.
3136 (handle_target_event): Likewise.
3137
3138 2014-09-12 Tom Tromey <tromey@redhat.com>
3139 Gary Benson <gbenson@redhat.com>
3140
3141 * regcache.h: Include common-regcache.h.
3142 (regcache_read_pc): Don't declare.
3143 * regcache.c (get_thread_regcache_for_ptid): New function.
3144
3145 2014-09-11 Tom Tromey <tromey@redhat.com>
3146 Gary Benson <gbenson@redhat.com>
3147
3148 * symbol.c: New file.
3149 * Makefile.in (SFILES): Add symbol.c.
3150 (OBS): Add symbol.o.
3151
3152 2014-09-11 Gary Benson <gbenson@redhat.com>
3153
3154 * target.c (target_stop_ptid, target_continue_ptid): New
3155 functions.
3156
3157 2014-09-11 Tom Tromey <tromey@redhat.com>
3158 Gary Benson <gbenson@redhat.com>
3159
3160 * target.h: Include target/target.h.
3161 * target.c (target_read_memory, target_read_uint32)
3162 (target_write_memory): New functions.
3163
3164 2014-09-11 Gary Benson <gbenson@redhat.com>
3165
3166 * server.h (debug_hw_points): Don't declare.
3167 * server.c (debug_hw_points): Don't define. Replace all uses
3168 with show_debug_regs.
3169 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3170 all uses with show_debug_regs.
3171
3172 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3173
3174 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3175 endianness into account.
3176 (ppc_supply_ptrace_register): Likewise.
3177
3178 2014-09-03 James Hogan <james.hogan@imgtec.com>
3179
3180 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3181 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3182
3183 2014-09-03 Gary Benson <gbenson@redhat.com>
3184
3185 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3186 ALL_DEBUG_ADDRESS_REGISTERS.
3187
3188 2014-09-02 Gary Benson <gbenson@redhat.com>
3189
3190 * i386-low.h: Renamed as...
3191 * x86-low.h: New file. All type, function and variable name
3192 prefixes changed from "i386_" to "x86_". All references updated.
3193 * i386-low.c: Renamed as...
3194 * x86-low.c: New file. All type, function and variable name
3195 prefixes changed from "i386_" to "x86_". All references updated.
3196
3197 2014-09-02 Gary Benson <gbenson@redhat.com>
3198
3199 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3200 (x86_linux_new_thread): Likewise.
3201
3202 2014-08-29 Gary Benson <gbenson@redhat.com>
3203
3204 * server.h (setjmp.h): Do not include.
3205 (toplevel): Do not declare.
3206 (common-exceptions.h): Include.
3207 (cleanups.h): Likewise.
3208 * server.c (toplevel): Do not define.
3209 (exit_code): New static global.
3210 (detach_or_kill_for_exit_cleanup): New function.
3211 (main): New function. Original main renamed to...
3212 (captured_main): New function.
3213 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3214
3215 2014-08-29 Gary Benson <gbenson@redhat.com>
3216
3217 * Makefile.in (SFILES): Add common/common-exceptions.c.
3218 (OBS): Add common-exceptions.o.
3219 (common-exceptions.o): New rule.
3220 * utils.c (prepare_to_throw_exception): New function.
3221
3222 2014-08-29 Gary Benson <gbenson@redhat.com>
3223
3224 * config.in: Regenerate.
3225 * configure: Likewise.
3226
3227 2014-08-29 Gary Benson <gbenson@redhat.com>
3228
3229 * Makefile.in (SFILES): Add common/cleanups.c.
3230 (OBS): cleanups.o.
3231 (cleanups.o): New rule.
3232
3233 2014-08-29 Gary Benson <gbenson@redhat.com>
3234
3235 * utils.c (internal_vwarning): New function.
3236
3237 2014-08-28 Gary Benson <gbenson@redhat.com>
3238
3239 * utils.h (fatal): Remove declaration.
3240 * utils.c (fatal): Remove function.
3241
3242 2014-08-28 Gary Benson <gbenson@redhat.com>
3243
3244 * tracepoint.c (gdb_agent_init): Replace fatal with
3245 perror_with_name.
3246 (initialize_tracepoint): Likewise.
3247
3248 2014-08-28 Gary Benson <gbenson@redhat.com>
3249
3250 * remote-utils.c (remote_prepare): Replace fatal with error.
3251
3252 2014-08-28 Gary Benson <gbenson@redhat.com>
3253
3254 * linux-low.c (linux_async): Replace fatal with warning.
3255 Tidy up and return.
3256 (linux_start_non_stop): Return -1 if linux_async failed.
3257
3258 2014-08-28 Gary Benson <gbenson@redhat.com>
3259
3260 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3261 gdb_assert.
3262 (i386_dr_low_get_addr): Remove vague comment.
3263 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3264 gdb_assert.
3265
3266 2014-08-28 Gary Benson <gbenson@redhat.com>
3267
3268 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3269 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3270 internal_error.
3271 (linux_resume_one_lwp): Likewise.
3272 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3273 gdb_assert.
3274 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3275 with internal_error.
3276 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3277 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3278 (find_register_by_name): Replace fatal with internal_error.
3279 (find_regno): Likewise.
3280 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3281 * thread-db.c (thread_db_create_event): Likewise.
3282 (thread_db_load_search): Likewise.
3283 (try_thread_db_load_1): Likewise.
3284 * tracepoint.c (get_jump_space_head): Replace fatal with
3285 internal_error.
3286 (claim_trampoline_space): Likewise.
3287 (have_fast_tracepoint_trampoline_buffer): Likewise.
3288 (cmd_qtstart): Likewise.
3289 (stop_tracing): Likewise.
3290 (fast_tracepoint_collecting): Likewise.
3291 (target_malloc): Likewise.
3292 (download_tracepoint): Likewise.
3293 (download_trace_state_variables): Replace check with gdb_assert.
3294 (upload_fast_traceframes): Replace fatal with internal_error.
3295
3296 2014-08-19 Tom Tromey <tromey@redhat.com>
3297 Gary Benson <gbenson@redhat.com>
3298
3299 * Makefile.in (SFILES): Add common/common-debug.c.
3300 (OBS): Add common-debug.o.
3301 (common-debug.o): New rule.
3302 * debug.h (debug_printf): Don't declare.
3303 * debug.c (debug_printf): Renamed and rewritten as...
3304 (debug_vprintf): New function.
3305
3306 2014-08-19 Gary Benson <gbenson@redhat.com>
3307
3308 * utils.h: Do not include print-utils.h.
3309
3310 2014-08-19 Tom Tromey <tromey@redhat.com>
3311 Gary Benson <gbenson@redhat.com>
3312
3313 * server.h: Add static assertion.
3314 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3315
3316 2014-08-19 Tom Tromey <tromey@redhat.com>
3317 Gary Benson <gbenson@redhat.com>
3318
3319 * Makefile.in (SFILES): Add common/errors.c.
3320 (OBS): Add errors.o.
3321 (IPA_OBS): Add errors-ipa.o.
3322 (errors.o): New rule.
3323 (errors-ipa.o): Likewise.
3324 * utils.h (perror_with_name, error, warning): Don't declare.
3325 * utils.c (warning): Renamed and rewritten as...
3326 (vwarning): New function.
3327 (error): Renamed and rewritten as...
3328 (verror): New function.
3329 (internal_error): Renamed and rewritten as...
3330 (internal_verror): New function.
3331
3332 2014-08-07 Gary Benson <gbenson@redhat.com>
3333
3334 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3335 * configure: Regenerate.
3336 * config.in: Likewise.
3337 * server.h: Do not include errno.h.
3338 * event-loop.c: Likewise.
3339 * hostio-errno.c: Likewise.
3340 * linux-low.c: Likewise.
3341 * remote-utils.c: Likewise.
3342 * spu-low.c: Likewise.
3343 * utils.c: Likewise.
3344 * gdbreplay.c: Unconditionally include errno.h.
3345
3346 2014-08-07 Gary Benson <gbenson@redhat.com>
3347
3348 * server.h: Do not include string.h.
3349 * event-loop.c: Likewise.
3350 * linux-low.c: Likewise.
3351 * regcache.c: Likewise.
3352 * remote-utils.c: Likewise.
3353 * spu-low.c: Likewise.
3354 * utils.c: Likewise.
3355
3356 2014-08-07 Gary Benson <gbenson@redhat.com>
3357
3358 * server.h: Do not include gdb_assert.h.
3359
3360 2014-08-07 Gary Benson <gbenson@redhat.com>
3361
3362 * server.h: Do not include common-utils.h.
3363
3364 2014-08-07 Gary Benson <gbenson@redhat.com>
3365
3366 * server.h: Do not include ptid.h.
3367 * notif.h: Likewise.
3368
3369 2014-08-07 Gary Benson <gbenson@redhat.com>
3370
3371 * server.h: Do not include gdb_locale.h.
3372
3373 2014-08-07 Gary Benson <gbenson@redhat.com>
3374
3375 * server.h: Do not include gdb/signals.h.
3376 * win32-low.c: Likewise.
3377
3378 2014-08-07 Gary Benson <gbenson@redhat.com>
3379
3380 * server.h: Do not include pathmax.h.
3381
3382 2014-08-07 Gary Benson <gbenson@redhat.com>
3383
3384 * server.h: Do not include libiberty.h.
3385 * linux-bfin-low.c: Likewise.
3386
3387 2014-08-07 Gary Benson <gbenson@redhat.com>
3388
3389 * server.h: Do not include ansidecl.h.
3390
3391 2014-08-07 Gary Benson <gbenson@redhat.com>
3392
3393 * linux-x86-low.c: Do not include stddef.h.
3394 * lynx-ppc-low.c: Likewise.
3395 * tracepoint.c: Likewise.
3396
3397 2014-08-07 Gary Benson <gbenson@redhat.com>
3398
3399 * server.h: Do not include stdarg.h.
3400 * nto-low.c: Likewise.
3401
3402 2014-08-07 Gary Benson <gbenson@redhat.com>
3403
3404 * server.h: Do not include stdlib.h.
3405 * inferiors.c: Likewise.
3406 * linux-low.c: Likewise.
3407 * regcache.c: Likewise.
3408 * spu-low.c: Likewise.
3409 * tracepoint.c: Likewise.
3410 * utils.c: Likewise.
3411
3412 2014-08-07 Gary Benson <gbenson@redhat.com>
3413
3414 * server.h: Do not include stdio.h.
3415 * linux-low.c: Likewise.
3416 * remote-utils.c: Likewise.
3417 * spu-low.c: Likewise.
3418 * utils.c: Likewise.
3419 * wincecompat.c: Likewise.
3420
3421 2014-08-06 Gary Benson <gbenson@redhat.com>
3422
3423 * regcache.c (init_register_cache): Move conditionals inside if.
3424
3425 2014-08-06 Gary Benson <gbenson@redhat.com>
3426
3427 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3428
3429 2014-07-31 Gary Benson <gbenson@redhat.com>
3430
3431 * ax.h: Do not include server.h.
3432 * gdbthread.h: Likewise.
3433 * lynx-low.h: Likewise.
3434 * notif.h: Likewise.
3435
3436 2014-07-30 Gary Benson <gbenson@redhat.com>
3437
3438 * server.h: Include common-defs.h.
3439 Do not include config.h or build-gnulib-gdbserver/config.h.
3440
3441 2014-07-30 Gary Benson <gbenson@redhat.com>
3442
3443 * hostio-errno.c: Move server.h to top of includes list.
3444 * inferiors.c: Likewise.
3445 * linux-x86-low.c: Likewise.
3446 * notif.c: Include server.h.
3447
3448 2014-07-24 Tom Tromey <tromey@redhat.com>
3449 Gary Benson <gbenson@redhat.com>
3450
3451 * server.h (CORE_ADDR): Now unsigned.
3452
3453 2014-07-16 Pedro Alves <palves@redhat.com>
3454
3455 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3456
3457 2014-07-15 Pedro Alves <palves@redhat.com>
3458
3459 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3460 copy.
3461
3462 2014-07-11 Pedro Alves <palves@redhat.com>
3463
3464 * linux-low.c (kill_wait_lwp): New function, based on
3465 kill_one_lwp_callback, but use my_waitpid directly.
3466 (kill_one_lwp_callback, linux_kill): Use it.
3467
3468 2014-06-23 Pedro Alves <palves@redhat.com>
3469
3470 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3471 before setting DR0..DR3.
3472
3473 2014-06-20 Gary Benson <gbenson@redhat.com>
3474
3475 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3476 * configure: Regenerated.
3477 * config.in: Likewise.
3478
3479 2014-06-20 Gary Benson <gbenson@redhat.com>
3480
3481 * Makefile.in (SFILES): Update locations for files moved
3482 from common to nat.
3483 (object file files): Reordered.
3484
3485 2014-06-20 Gary Benson <gbenson@redhat.com>
3486
3487 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3488 (i386_dr_low_set_addr): Likewise.
3489 (i386_dr_low_get_addr): Likewise.
3490 (i386_dr_low_can_set_control): Likewise.
3491 (i386_dr_low_set_control): Likewise.
3492 (i386_dr_low_get_control): Likewise.
3493 (i386_dr_low_get_status): Likewise.
3494 (i386_get_debug_register_length): Likewise.
3495 * linux-x86-low.c (i386_dr_low_set_addr):
3496 Changed signature. Made static.
3497 (i386_dr_low_get_addr): Likewise.
3498 (i386_dr_low_set_control): Likewise.
3499 (i386_dr_low_get_control): Likewise.
3500 (i386_dr_low_get_status): Likewise.
3501 (i386_dr_low): New global variable.
3502 * win32-i386-low.c (i386_dr_low_set_addr):
3503 Changed signature. Made static.
3504 (i386_dr_low_get_addr): Likewise.
3505 (i386_dr_low_set_control): Likewise.
3506 (i386_dr_low_get_control): Likewise.
3507 (i386_dr_low_get_status): Likewise.
3508 (i386_dr_low): New global variable.
3509
3510 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3511
3512 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3513 * Makefile.in (AR, AR_FLAGS): Define.
3514 * configure: Regenerate.
3515
3516 2014-06-19 Gary Benson <gbenson@redhat.com>
3517
3518 * Makefile.in (i386-dregs.o): New rule.
3519 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3520 * i386-low.c (target.h): Remove include.
3521 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3522 (DR_CONTROL_SHIFT): Likewise.
3523 (DR_CONTROL_SIZE): Likewise.
3524 (DR_RW_EXECUTE): Likewise.
3525 (DR_RW_WRITE): Likewise.
3526 (DR_RW_READ): Likewise.
3527 (DR_RW_IORW): Likewise.
3528 (DR_LEN_1): Likewise.
3529 (DR_LEN_2): Likewise.
3530 (DR_LEN_4): Likewise.
3531 (DR_LEN_8): Likewise.
3532 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3533 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3534 (DR_ENABLE_SIZE): Likewise.
3535 (DR_LOCAL_SLOWDOWN): Likewise.
3536 (DR_GLOBAL_SLOWDOWN): Likewise.
3537 (DR_CONTROL_RESERVED): Likewise.
3538 (I386_DR_CONTROL_MASK): Likewise.
3539 (I386_DR_VACANT): Likewise.
3540 (I386_DR_LOCAL_ENABLE): Likewise.
3541 (I386_DR_GLOBAL_ENABLE): Likewise.
3542 (I386_DR_DISABLE): Likewise.
3543 (I386_DR_SET_RW_LEN): Likewise.
3544 (I386_DR_GET_RW_LEN): Likewise.
3545 (I386_DR_WATCH_HIT): Likewise.
3546 (i386_wp_op_t): Likewise.
3547 (i386_show_dr): Likewise.
3548 (i386_length_and_rw_bits): Likewise.
3549 (i386_insert_aligned_watchpoint): Likewise.
3550 (i386_remove_aligned_watchpoint): Likewise.
3551 (i386_handle_nonaligned_watchpoint): Likewise.
3552 i386_update_inferior_debug_regs(): Likewise.
3553 (i386_dr_insert_watchpoint): Likewise.
3554 (i386_dr_remove_watchpoint): Likewise.
3555 (i386_dr_region_ok_for_watchpoint): Likewise.
3556 (i386_dr_stopped_data_address): Likewise.
3557 (i386_dr_stopped_by_watchpoint): Likewise.
3558
3559 2014-06-19 Gary Benson <gbenson@redhat.com>
3560
3561 * i386-low.c (i386_dr_show): Renamed to
3562 i386_show_dr and made static. All uses updated.
3563 (i386_dr_length_and_rw_bits): Renamed to
3564 i386_length_and_rw_bits and made static.
3565 All uses updated.
3566 (i386_dr_insert_aligned_watchpoint): Renamed to
3567 i386_insert_aligned_watchpoint and made static.
3568 All uses updated.
3569 (i386_dr_remove_aligned_watchpoint): Renamed to
3570 i386_remove_aligned_watchpoint and made static.
3571 All uses updated.
3572 (i386_dr_update_inferior_debug_regs): Renamed to
3573 i386_update_inferior_debug_regs and made static.
3574 All uses updated.
3575
3576 2014-06-18 Gary Benson <gbenson@redhat.com>
3577
3578 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3579 (i386_dr_low_can_set_control): Likewise.
3580 (i386_get_debug_register_length): Likewise.
3581 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3582 (i386_dr_low_can_set_control): Likewise.
3583 (i386_get_debug_register_length): Likewise.
3584
3585 2014-06-17 Gary Benson <gbenson@redhat.com>
3586
3587 * i386-low.h (i386-dregs.h): New include.
3588 (DR_FIRSTADDR): Now in i386-dregs.h.
3589 (DR_LASTADDR): Likewise.
3590 (DR_NADDR): Likewise.
3591 (DR_STATUS): Likewise.
3592 (DR_CONTROL): Likewise.
3593 (i386_debug_reg_state): Likewise.
3594 (i386_dr_insert_watchpoint): Likewise.
3595 (i386_dr_remove_watchpoint): Likewise.
3596 (i386_dr_region_ok_for_watchpoint): Likewise.
3597 (i386_dr_stopped_data_address): Likewise.
3598 (i386_dr_stopped_by_watchpoint): Likewise.
3599 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3600
3601 2014-06-18 Gary Benson <gbenson@redhat.com>
3602
3603 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3604 i386_dr_insert_watchpoint.
3605 (i386_low_remove_watchpoint): Renamed to
3606 i386_dr_remove_watchpoint.
3607 (i386_low_region_ok_for_watchpoint): Renamed to
3608 i386_dr_region_ok_for_watchpoint.
3609 (i386_low_stopped_data_address): Renamed to
3610 i386_dr_stopped_data_address.
3611 (i386_low_stopped_by_watchpoint): Renamed to
3612 i386_dr_stopped_by_watchpoint.
3613 * i386-low.c (i386_show_dr): Renamed to
3614 i386_dr_show and made nonstatic. All uses updated.
3615 (i386_length_and_rw_bits): Renamed to
3616 i386_dr_length_and_rw_bits and made nonstatic.
3617 All uses updated.
3618 (i386_insert_aligned_watchpoint): Renamed to
3619 i386_dr_insert_aligned_watchpoint and made nonstatic.
3620 All uses updated.
3621 (i386_remove_aligned_watchpoint): Renamed to
3622 i386_dr_remove_aligned_watchpoint and made nonstatic.
3623 All uses updated.
3624 (i386_update_inferior_debug_regs): Renamed to
3625 i386_dr_update_inferior_debug_regs and made nonstatic.
3626 All uses updated.
3627 (i386_low_insert_watchpoint): Renamed to
3628 i386_dr_insert_watchpoint. All uses updated.
3629 (i386_low_remove_watchpoint): Renamed to
3630 i386_dr_remove_watchpoint. All uses updated.
3631 (i386_low_region_ok_for_watchpoint): Renamed to
3632 i386_dr_region_ok_for_watchpoint. All uses updated.
3633 (i386_low_stopped_data_address): Renamed to
3634 i386_dr_stopped_data_address. All uses updated.
3635 (i386_low_stopped_by_watchpoint): Renamed to
3636 i386_dr_stopped_by_watchpoint. All uses updated.
3637
3638 2014-06-18 Gary Benson <gbenson@redhat.com>
3639
3640 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3641 (i386_dr_low_can_set_control): Likewise.
3642 (i386_insert_aligned_watchpoint): New check.
3643
3644 2014-06-18 Gary Benson <gbenson@redhat.com>
3645
3646 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3647 Renamed to state.
3648
3649 2014-06-18 Gary Benson <gbenson@redhat.com>
3650
3651 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3652 instead of fatal and error.
3653 (i386_handle_nonaligned_watchpoint): Likewise.
3654
3655 2014-06-18 Gary Benson <gbenson@redhat.com>
3656
3657 * i386-low.c (i386_get_debug_register_length): New macro.
3658 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3659 (i386_show_dr): Use debug_printf instead of fprintf. Use
3660 phex to format values.
3661
3662 2014-06-18 Gary Benson <gbenson@redhat.com>
3663
3664 * i386-low.h: Comment changes.
3665 * i386-low.c: Likewise.
3666
3667 2014-06-18 Gary Benson <gbenson@redhat.com>
3668
3669 * i386-low.c: Whitespace changes.
3670
3671 2014-06-12 Tom Tromey <tromey@redhat.com>
3672
3673 * utils.c (freeargv): Remove.
3674
3675 2014-06-12 Tom Tromey <tromey@redhat.com>
3676
3677 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3678 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3679 (parse_debug_format_options): Likewise.
3680 (gdbserver_usage): Likewise.
3681 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3682 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3683 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3684 against libiberty.
3685 ($(LIBGNU)): Depend on libiberty.
3686 (all-lib): Recurse into all subdirs.
3687 (install-only): Invoke "install" target in subdirs.
3688 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3689 targets.
3690 * configure: Rebuild.
3691 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3692 for vasprintf, vsnprintf, or gettimeofday.
3693 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3694 srv_tgtobj.
3695
3696 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3697
3698 * development.sh: Delete.
3699 * Makefile.in (config.status): Adjust dependency on development.sh.
3700 * configure.ac: Adjust development.sh source call.
3701 * configure: Regenerate.
3702
3703 2014-06-02 Pedro Alves <palves@redhat.com>
3704
3705 * ax.c (gdb_free_agent_expr): New function.
3706 * ax.h (gdb_free_agent_expr): New declaration.
3707 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3708 list.
3709 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3710 static.
3711 (clear_breakpoint_conditions_and_commands): New function.
3712 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3713 (clear_breakpoint_conditions_and_commands): New declaration.
3714
3715 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3716
3717 * linux-aarch64-low.c (asm/ptrace.h): Include.
3718
3719 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3720
3721 Fix TLS access for -static -pthread.
3722 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3723 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3724 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3725
3726 2014-05-20 Pedro Alves <palves@redhat.com>
3727
3728 * linux-aarch64-low.c (aarch64_insert_point)
3729 (aarch64_remove_point): No longer check whether the type is
3730 supported here. Adjust to new interface.
3731 (the_low_target): Install aarch64_supports_z_point_type as
3732 supports_z_point_type method.
3733 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3734 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3735 instead of a Z packet char. Adjust.
3736 (arm_supports_z_point_type): New function.
3737 (arm_insert_point, arm_remove_point): Adjust to new interface.
3738 (the_low_target): Install arm_supports_z_point_type.
3739 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3740 (cris_insert_point, cris_remove_point): Adjust to new interface.
3741 Don't check whether the type is supported here.
3742 (the_low_target): Install cris_supports_z_point_type.
3743 * linux-low.c (linux_supports_z_point_type): New function.
3744 (linux_insert_point, linux_remove_point): Adjust to new interface.
3745 * linux-low.h (struct linux_target_ops) <insert_point,
3746 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3747 raw_breakpoint pointer parameter.
3748 <supports_z_point_type>: New method.
3749 * linux-mips-low.c (mips_supports_z_point_type): New function.
3750 (mips_insert_point, mips_remove_point): Adjust to new interface.
3751 Use mips_supports_z_point_type.
3752 (the_low_target): Install mips_supports_z_point_type.
3753 * linux-ppc-low.c (the_low_target): Install NULL as
3754 supports_z_point_type method.
3755 * linux-s390-low.c (the_low_target): Install NULL as
3756 supports_z_point_type method.
3757 * linux-sparc-low.c (the_low_target): Install NULL as
3758 supports_z_point_type method.
3759 * linux-x86-low.c (x86_supports_z_point_type): New function.
3760 (x86_insert_point): Adjust to new insert_point interface. Use
3761 insert_memory_breakpoint. Adjust to new
3762 i386_low_insert_watchpoint interface.
3763 (x86_remove_point): Adjust to remove_point interface. Use
3764 remove_memory_breakpoint. Adjust to new
3765 i386_low_remove_watchpoint interface.
3766 (the_low_target): Install x86_supports_z_point_type.
3767 * lynx-low.c (lynx_target_ops): Install NULL as
3768 supports_z_point_type callback.
3769 * nto-low.c (nto_supports_z_point_type): New.
3770 (nto_insert_point, nto_remove_point): Adjust to new interface.
3771 (nto_target_ops): Install nto_supports_z_point_type.
3772 * mem-break.c: Adjust intro comment.
3773 (struct raw_breakpoint) <raw_type, size>: New fields.
3774 <inserted>: Update comment.
3775 <shlib_disabled>: Delete field.
3776 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3777 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3778 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3779 (raw_bkpt_type_to_target_hw_bp_type): New function.
3780 (find_enabled_raw_code_breakpoint_at): New function.
3781 (find_raw_breakpoint_at): New type and size parameters. Use them.
3782 (insert_memory_breakpoint): New function, based off
3783 set_raw_breakpoint_at.
3784 (remove_memory_breakpoint): New function.
3785 (set_raw_breakpoint_at): Reimplement.
3786 (set_breakpoint): New, based on set_breakpoint_at.
3787 (set_breakpoint_at): Reimplement.
3788 (delete_raw_breakpoint): Go through the_target->remove_point
3789 instead of assuming memory breakpoints.
3790 (find_gdb_breakpoint_at): Delete.
3791 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3792 (find_gdb_breakpoint): New function.
3793 (set_gdb_breakpoint_at): Delete.
3794 (z_type_supported): New function.
3795 (set_gdb_breakpoint_1): New function, loosely based off
3796 set_gdb_breakpoint_at.
3797 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3798 (delete_gdb_breakpoint_at): Delete.
3799 (delete_gdb_breakpoint_1): New function, loosely based off
3800 delete_gdb_breakpoint_at.
3801 (delete_gdb_breakpoint): New function.
3802 (clear_gdb_breakpoint_conditions): Rename to ...
3803 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3804 breakpoint.
3805 (add_condition_to_breakpoint): Make static.
3806 (add_breakpoint_condition): Take a struct breakpoint pointer
3807 instead of an address. Adjust.
3808 (gdb_condition_true_at_breakpoint): Rename to ...
3809 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3810 z_type parameter.
3811 (gdb_condition_true_at_breakpoint): Reimplement.
3812 (add_breakpoint_commands): Take a struct breakpoint pointer
3813 instead of an address. Adjust.
3814 (gdb_no_commands_at_breakpoint): Rename to ...
3815 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3816 parameter. Return true if no breakpoint was found. Change debug
3817 output.
3818 (gdb_no_commands_at_breakpoint): Reimplement.
3819 (run_breakpoint_commands): Rename to ...
3820 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3821 and change return type to boolean.
3822 (run_breakpoint_commands): New function.
3823 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3824 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3825 breakpoint. Go through the_target->remove_point instead of
3826 assuming memory breakpoint.
3827 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3828 software and hardware breakpoints.
3829 (reinsert_raw_breakpoint): Go through the_target->insert_point
3830 instead of assuming memory breakpoint.
3831 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3832 software and hardware breakpoints.
3833 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3834 Check both software and hardware breakpoints.
3835 (validate_inserted_breakpoint): Assert the breakpoint is a
3836 software breakpoint. Set the inserted flag to -1 instead of
3837 setting shlib_disabled.
3838 (delete_disabled_breakpoints): Adjust.
3839 (validate_breakpoints): Only validate software breakpoints.
3840 Adjust to inserted flag change.
3841 (check_mem_read, check_mem_write): Skip breakpoint types other
3842 than software breakpoints. Adjust to inserted flag change.
3843 * mem-break.h (enum raw_bkpt_type): New enum.
3844 (raw_breakpoint, struct process_info): Forward declare.
3845 (Z_packet_to_target_hw_bp_type): Delete declaration.
3846 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3847 (set_gdb_breakpoint, delete_gdb_breakpoint)
3848 (clear_breakpoint_conditions): New declarations.
3849 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3850 (breakpoint_inserted_here): Update comment.
3851 (add_breakpoint_condition, add_breakpoint_commands): Replace
3852 address parameter with a breakpoint pointer parameter.
3853 (gdb_breakpoint_here): Update comment.
3854 (delete_gdb_breakpoint_at): Delete.
3855 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3856 * server.c (process_point_options): Take a struct breakpoint
3857 pointer instead of an address. Adjust.
3858 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3859 delete_gdb_breakpoint.
3860 * spu-low.c (spu_target_ops): Install NULL as
3861 supports_z_point_type method.
3862 * target.h: Include mem-break.h.
3863 (struct target_ops) <prepare_to_access_memory>: Update comment.
3864 <supports_z_point_type>: New field.
3865 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3866 instead of a char. Also take a raw breakpoint pointer.
3867 * win32-arm-low.c (the_low_target): Install NULL as
3868 supports_z_point_type.
3869 * win32-i386-low.c (i386_supports_z_point_type): New function.
3870 (i386_insert_point, i386_remove_point): Adjust to new interface.
3871 (the_low_target): Install i386_supports_z_point_type.
3872 * win32-low.c (win32_supports_z_point_type): New function.
3873 (win32_insert_point, win32_remove_point): Adjust to new interface.
3874 (win32_target_ops): Install win32_supports_z_point_type.
3875 * win32-low.h (struct win32_target_ops):
3876 <supports_z_point_type>: New method.
3877 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3878 instead of a char. Also take a raw breakpoint pointer.
3879
3880 2014-05-20 Pedro Alves <palves@redhat.com>
3881
3882 * mem-break.h: Include break-common.h.
3883 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3884 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3885 (Z_packet_to_target_hw_bp_type): New declaration.
3886 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3887 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3888 (Z_PACKET_ACCESS_WP): Delete macros.
3889 (Z_packet_to_hw_type): Delete function.
3890 * i386-low.h: Don't include break-common.h here.
3891 (Z_packet_to_hw_type): Delete declaration.
3892 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3893 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3894 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3895 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3896 * linux-aarch64-low.c: Don't include break-common.h here.
3897 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3898 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3899 (Z_packet_to_target_hw_bp_type): Delete function.
3900 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3901 function.
3902 (mips_insert_point, mips_remove_point): Use
3903 Z_packet_to_target_hw_bp_type.
3904
3905 2014-05-20 Pedro Alves <palves@redhat.com>
3906
3907 * linux-aarch64-low.c: Include break-common.h.
3908 (enum target_point_type): Delete.
3909 (Z_packet_to_point_type): Rename to ...
3910 (Z_packet_to_target_hw_bp_type): ... this, and return a
3911 target_hw_bp_type instead.
3912 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3913 instead of an enum target_point_type.
3914 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3915 breakpoint type.
3916 (aarch64_dr_state_insert_one_point)
3917 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3918 (aarch64_handle_aligned_watchpoint)
3919 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3920 Take an enum target_hw_bp_type instead of an enum
3921 target_point_type.
3922 (aarch64_supports_z_point_type): New function.
3923 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3924 use Z_packet_to_target_hw_bp_type.
3925
3926 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3927
3928 * configure.ac: Only use -Werror by default when DEVELOPMENT
3929 is true.
3930 * configure: Regenerate.
3931
3932 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3933
3934 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3935 * linux-x86-low.c (X86_64_USER_REGS): New.
3936 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3937
3938 2014-04-28 Yao Qi <yao@codesourcery.com>
3939
3940 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3941 name.
3942
3943 2014-04-25 Pedro Alves <palves@redhat.com>
3944
3945 PR server/16255
3946 * linux-low.c (linux_attach_fail_reason_string): New function.
3947 (linux_attach_lwp): Delete.
3948 (linux_attach_lwp_1): Rename to ...
3949 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3950 argument. Remove "initial" parameter. Return int instead of
3951 void. Don't error or warn here.
3952 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3953 failure to attach to the tgid. Call warning when failing to
3954 attach to an lwp.
3955 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3956 argument. Remove "initial" parameter. Return int instead of
3957 void. Don't error or warn here.
3958 (linux_attach_fail_reason_string): New declaration.
3959 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3960 interface change. Use linux_attach_fail_reason_string.
3961
3962 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3963 Walfred Tedeschi <walfred.tedeschi@intel.com>
3964
3965 * Makefile.in: Added rules to handle new files
3966 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3967 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3968 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3969 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3970 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3971 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3972 x32-avx512-linux.o.
3973 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3974 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3975 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3976 i386/x32-avx512.xml.
3977 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3978 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3979 i386/x32-avx512-linux.xml.
3980 * i387-fp.c (num_avx512_k_registers): New constant for number
3981 of K registers.
3982 (num_avx512_zmmh_low_registers): New constant for number of
3983 lower ZMM registers (0-15).
3984 (num_avx512_zmmh_high_registers): New constant for number of
3985 higher ZMM registers (16-31).
3986 (num_avx512_ymmh_registers): New contant for number of higher
3987 YMM registers (ymm16-31 added by avx521 on x86_64).
3988 (num_avx512_xmm_registers): New constant for number of higher
3989 XMM registers (xmm16-31 added by AVX512 on x86_64).
3990 (struct i387_xsave): Add space for AVX512 registers.
3991 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3992 Add code to handle AVX512 registers.
3993 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3994 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3995 prototypei from generated file.
3996 (tdesc_amd64_avx512_linux): Likewise.
3997 (init_registers_x32_avx512_linux): Likewise.
3998 (tdesc_x32_avx512_linux): Likewise.
3999 (init_registers_i386_avx512_linux): Likewise.
4000 (tdesc_i386_avx512_linux): Likewise.
4001 (x86_64_regmap): Add AVX512 registers.
4002 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4003 mask.
4004 (initialize_low_arch): Add code to initialize AVX512 registers.
4005
4006 2014-04-23 Pedro Alves <palves@redhat.com>
4007
4008 * mem-break.c (find_gdb_breakpoint_at): Make static.
4009 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4010
4011 2014-04-23 Pedro Alves <palves@redhat.com>
4012
4013 * i386-low.c: Don't include break-common.h here.
4014 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4015 prototype to take target_hw_bp_type as argument instead of a Z
4016 packet char.
4017 * i386-low.h: Include break-common.h here.
4018 (Z_packet_to_hw_type): Declare.
4019 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4020 prototypes.
4021 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4022 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4023 (x86_remove_point): Convert the packet number to a
4024 target_hw_bp_type before calling i386_low_remove_watchpoint.
4025 * win32-i386-low.c (i386_insert_point): Convert the packet number
4026 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4027 (i386_remove_point): Convert the packet number to a
4028 target_hw_bp_type before calling i386_low_remove_watchpoint.
4029
4030 2014-04-23 Pedro Alves <palves@redhat.com>
4031
4032 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4033
4034 2014-04-10 Pedro Alves <palves@redhat.com>
4035
4036 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4037 Check if the condition or command is NULL before checking if the
4038 breakpoint is known. On success, return true.
4039 * mem-break.h (add_breakpoint_condition): Document return.
4040 (add_breakpoint_commands): Add describing comment.
4041 * server.c (skip_to_semicolon): New function.
4042 (process_point_options): Use it.
4043
4044 2014-04-09 Pedro Alves <palves@redhat.com>
4045
4046 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4047 to lwpid_of.
4048
4049 2014-02-27 Pedro Alves <palves@redhat.com>
4050
4051 PR 12702
4052 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4053 macros.
4054 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4055 output.
4056 (last_thread_of_process_p): Take a PID argument instead of a
4057 thread pointer.
4058 (linux_wait_for_lwp): Delete.
4059 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4060 functions.
4061 (linux_low_filter_event): New function, party factored out from
4062 linux_wait_for_event.
4063 (linux_wait_for_event): Rename to ...
4064 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4065 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4066 sigsuspend. Check for zombie leaders.
4067 (linux_wait_for_event): Reimplement as wrapper around
4068 linux_wait_for_event_filtered.
4069 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4070 a normal or signal exit is seen, it's the whole process exiting.
4071 (wait_for_sigstop): No longer a for_each_inferior callback.
4072 Rewrite on top of linux_wait_for_event_filtered.
4073 (stop_all_lwps): Call wait_for_sigstop directly.
4074 * server.c (resume, handle_target_event): Handle
4075 TARGET_WAITKIND_NO_RESUMED.
4076
4077 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4078
4079 * win32-low.c (psapi_get_dll_name,
4080 * win32_CreateToolhelp32Snapshot): Delete.
4081 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4082 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4083 Delete.
4084 (handle_load_dll): Add function description.
4085 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4086
4087 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4088
4089 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4090 Add comment.
4091 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4092 base address when calling win32_add_one_solib.
4093 (handle_load_dll): Delete local variable load_addr.
4094 Remove 0x1000 offset applied to DLL base address when calling
4095 win32_add_one_solib.
4096 (handle_unload_dll): Add comment.
4097
4098 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4099
4100 * win32-low.c (win32_add_all_dlls): Renames
4101 win32_ensure_ntdll_loaded. Rewrite function documentation.
4102 Adjust implementation to always load all DLLs.
4103 Add 0x1000 offset to DLL base address when calling
4104 win32_add_one_solib.
4105 (child_initialization_done): New static global.
4106 (do_initial_child_stuff): Set child_initialization_done to
4107 zero during child initialization, and 1 after. Replace call
4108 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4109 Add comment.
4110 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4111 (handle_unload_dll): Add function documentation.
4112 (get_child_debug_event): Ignore load and unload DLL events
4113 during child initialization.
4114
4115 2014-02-20 Doug Evans <dje@google.com>
4116
4117 Remove global all_lwps.
4118 * inferiors.h (ptid_of): Move here from linux-low.h.
4119 (pid_of, lwpid_of): Ditto.
4120 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4121 parameter is a struct thread_info * now.
4122 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4123 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4124 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4125 directly.
4126 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4127 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4128 * linux-arm-low.c (update_registers_callback): Update, "entry"
4129 parameter is a struct thread_info * now.
4130 Fetch lwpid from current_inferior directly.
4131 (arm_insert_point): Pass &all_threads to find_inferior instead of
4132 &all_lwps.
4133 (arm_remove_point): Ditto.
4134 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4135 (arm_prepare_to_resume): Fetch pid from thread.
4136 (arm_read_description): Fetch lwpid from current_inferior directly.
4137 * linux-low.c (all_lwps): Delete.
4138 (delete_lwp): Delete call to remove_inferior.
4139 (handle_extended_wait): Fetch lwpid from thread.
4140 (add_lwp): Don't set lwp->entry.id. Remove call to
4141 add_inferior_to_list.
4142 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4143 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4144 (kill_one_lwp_callback): Ditto.
4145 (linux_kill): Don't dereference NULL pointer.
4146 Fetch ptid,lwpid from thread.
4147 (get_detach_signal): Fetch ptid from thread.
4148 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4149 Simplify call to regcache_invalidate_thread.
4150 (delete_lwp_callback): Update, "entry" parameter is a
4151 struct thread_info * now. Fetch pid from thread.
4152 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4153 (status_pending_p_callback): Update, "entry" parameter is a
4154 struct thread_info * now. Fetch ptid from thread.
4155 (find_lwp_pid): Update, "entry" parameter is a
4156 struct thread_info * now.
4157 (linux_wait_for_lwp): Fetch pid from thread.
4158 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4159 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4160 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4161 (dequeue_one_deferred_signal): Ditto.
4162 (cancel_breakpoint): Fetch ptid from current_inferior.
4163 (linux_wait_for_event): Pass &all_threads to find_inferior,
4164 not &all_lwps. Fetch ptid, lwpid from thread.
4165 (count_events_callback): Update, "entry" parameter is a
4166 struct thread_info * now.
4167 (select_singlestep_lwp_callback): Ditto.
4168 (select_event_lwp_callback): Ditto.
4169 (cancel_breakpoints_callback): Ditto.
4170 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4171 not &all_lwps.
4172 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4173 (unsuspend_one_lwp): Update, "entry" parameter is a
4174 struct thread_info * now.
4175 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4176 not &all_lwps.
4177 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4178 Fetch lwpid from thread, not lwp.
4179 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4180 Pass &all_threads to find_inferior, not &all_lwps.
4181 (send_sigstop): Fetch lwpid from thread, not lwp.
4182 (send_sigstop_callback): Update, "entry" parameter is a
4183 struct thread_info * now.
4184 (suspend_and_send_sigstop_callback): Ditto.
4185 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4186 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4187 struct thread_info * now.
4188 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4189 from thread, lwp.
4190 (lwp_running): Update, "entry" parameter is a
4191 struct thread_info * now.
4192 (stop_all_lwps): Fetch ptid from thread.
4193 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4194 (linux_resume_one_lwp): Fetch lwpid from thread.
4195 (linux_set_resume_request): Update, "entry" parameter is a
4196 struct thread_info * now. Fetch pid, lwpid from thread.
4197 (resume_status_pending_p): Update, "entry" parameter is a
4198 struct thread_info * now.
4199 (need_step_over_p): Ditto. Fetch lwpid from thread.
4200 (start_step_over): Fetch lwpid from thread.
4201 (linux_resume_one_thread): Update, "entry" parameter is a
4202 struct thread_info * now. Fetch lwpid from thread.
4203 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4204 (proceed_one_lwp): Update, "entry" parameter is a
4205 struct thread_info * now. Fetch lwpid from thread.
4206 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4207 struct thread_info * now.
4208 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4209 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4210 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4211 directly.
4212 (regsets_store_inferior_registers): Ditto.
4213 (fetch_register, store_register): Ditto.
4214 (linux_read_memory, linux_write_memory): Ditto.
4215 (linux_request_interrupt): Ditto.
4216 (linux_read_auxv): Ditto.
4217 (linux_xfer_siginfo): Ditto.
4218 (linux_qxfer_spu): Ditto.
4219 (linux_qxfer_libraries_svr4): Ditto.
4220 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4221 moved to inferiors.h.
4222 (get_lwp): Delete.
4223 (get_thread_lwp): Update.
4224 (struct lwp_info): Delete member "entry". Simplify comment for
4225 member "thread".
4226 (all_lwps): Delete.
4227 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4228 current_inferior directly.
4229 (update_watch_registers_callback): Update, "entry" parameter is a
4230 struct thread_info * now. Fetch pid from thread.
4231 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4232 (mips_insert_point): Fetch lwpid from current_inferior.
4233 Pass &all_threads to find_inferior, not &all_lwps.
4234 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4235 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4236 directly.
4237 (mips_stopped_data_address): Ditto.
4238 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4239 directly.
4240 * linux-tile-low.c (tile_arch_setup): Ditto.
4241 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4242 (update_debug_registers_callback): Update, "entry" parameter is a
4243 struct thread_info * now. Fetch pid from thread.
4244 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4245 Pass &all_threads to find_inferior, not &all_lwps.
4246 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4247 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4248 Pass &all_threads to find_inferior, not &all_lwps.
4249 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4250 (i386_dr_low_get_status): Ditto.
4251 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4252 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4253 (x86_linux_read_description): Ditto.
4254 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4255
4256 2014-02-20 Doug Evans <dje@google.com>
4257
4258 * inferiors.c (get_first_inferior): Fix buglet.
4259
4260 2014-02-19 Doug Evans <dje@google.com>
4261
4262 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4263 * inferiors.c (add_thread): Change result type to struct thread_info *.
4264 All callers updated.
4265 (add_lwp): Call add_thread here instead of in callers.
4266 All callers updated.
4267 * linux-low.h (get_lwp_thread): Rewrite.
4268 (struct lwp_info): New member "thread".
4269
4270 2014-02-19 Doug Evans <dje@google.com>
4271
4272 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4273 All callers updated.
4274
4275 2014-02-19 Doug Evans <dje@google.com>
4276
4277 * inferiors.c (add_thread): Fix whitespace.
4278
4279 2014-02-19 Doug Evans <dje@google.com>
4280
4281 * dll.c (clear_dlls): Replace accessing list implemention details
4282 with API function.
4283 * gdbthread.h (get_first_thread): Declare.
4284 * inferiors.c (for_each_inferior_with_data): New function.
4285 (get_first_thread): New function.
4286 (find_thread_ptid): Simplify.
4287 (get_first_inferior): New function.
4288 (clear_list): Delete.
4289 (one_inferior_p): New function.
4290 (clear_inferior_list): New function.
4291 (clear_inferiors): Update.
4292 * inferiors.h (for_each_inferior_with_data): Declare.
4293 (clear_inferior_list): Declare.
4294 (one_inferior_p): Declare.
4295 (get_first_inferior): Declare.
4296 * linux-low.c (linux_wait_for_event): Replace accessing list
4297 implemention details with API function.
4298 * server.c (target_running): Ditto.
4299 (accumulate_file_name_length): New function.
4300 (emit_dll_description): New function.
4301 (handle_qxfer_libraries): Replace accessing list implemention
4302 details with API function.
4303 (handle_qxfer_threads_worker): New function.
4304 (handle_qxfer_threads_proper): Replace accessing list implemention
4305 details with API function.
4306 (handle_query): Ditto.
4307 (visit_actioned_threads_callback_ftype): New typedef.
4308 (visit_actioned_threads_data): New struct.
4309 (visit_actioned_threads): Rewrite to be find_inferior callback.
4310 (resume): Call find_inferior.
4311 (handle_status): Replace accessing list implemention
4312 details with API function.
4313 (process_serial_event): Replace accessing list implemention details
4314 with API function.
4315 * target.c (set_desired_inferior): Replace accessing list implemention
4316 details with API function.
4317 * tracepoint.c (same_process_p): New function.
4318 (gdb_agent_about_to_close): Replace accessing list implemention
4319 details with API function.
4320 * win32-low.c (child_delete_thread): Replace accessing list
4321 implemention details with API function.
4322 (match_dll_by_basename): New function.
4323 (dll_is_loaded_by_basename): New function.
4324 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4325 details call to dll_is_loaded_by_basename.
4326
4327 2014-02-19 Doug Evans <dje@google.com>
4328
4329 * dll.h (struct dll_info): Add comment.
4330 * gdbthread.h (struct thread_info): Add comment.
4331 (current_ptid): Simplify.
4332 * inferiors.c (add_process): Update.
4333 (remove_process): Update.
4334 * inferiors.h (struct process_info): Rename member "head" to "entry".
4335 * linux-low.c (delete_lwp): Update.
4336 (add_lwp): Update.
4337 (last_thread_of_process_p): Update.
4338 (kill_one_lwp_callback, linux_kill): Update.
4339 (status_pending_p_callback): Update.
4340 (wait_for_sigstop): Update. Simplify read of ptid.
4341 (start_step_over): Update.
4342 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4343 (get_lwp_thread): Update.
4344 (struct lwp_info): Rename member "head" to "entry".
4345 * regcache.h (inferior_list_entry): Delete.
4346 * server.c (kill_inferior_callback): Update.
4347 (detach_or_kill_inferior_callback): Update.
4348 (print_started_pid): Update.
4349 (print_attached_pid): Update.
4350 (process_serial_event): Simplify read of ptid.
4351 * thread-db.c (thread_db_create_event): Update.
4352 (thread_db_get_tls_address): Update.
4353 * win32-low.c (current_inferior_ptid): Simplify.
4354
4355 2014-02-19 Tom Tromey <tromey@redhat.com>
4356
4357 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4358 argument.
4359 (target_supports_btrace): Update.
4360
4361 2014-02-14 Yao Qi <yao@codesourcery.com>
4362
4363 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4364 (rsp-low-ipa.o): New target.
4365
4366 2014-02-12 Tom Tromey <tromey@redhat.com>
4367
4368 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4369 convert_ascii_to_int.
4370 * regcache.c (registers_to_string): Likewise.
4371 * remote-utils.c (decode_M_packet): Likewise.
4372 * server.c (process_serial_event): Likewise.
4373
4374 2014-02-12 Tom Tromey <tromey@redhat.com>
4375
4376 * server.c (handle_query, handle_v_run): Use hex2bin, not
4377 unhexify.
4378 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4379
4380 2014-02-12 Tom Tromey <tromey@redhat.com>
4381
4382 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4383 convert_int_to_ascii.
4384 * regcache.c (registers_to_string, collect_register_as_string):
4385 Likewise.
4386 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4387 Likewise.
4388 * server.c (process_serial_event): Likewise.
4389 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4390 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4391
4392 2014-02-12 Tom Tromey <tromey@redhat.com>
4393
4394 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4395 bin2hex, not hexify.
4396 * tracepoint.c (cmd_qtstatus): Likewise.
4397
4398 2014-02-12 Tom Tromey <tromey@redhat.com>
4399
4400 * remote-utils.c (monitor_output): Pass explicit length to
4401 hexify.
4402
4403 2014-02-12 Tom Tromey <tromey@redhat.com>
4404
4405 * tracepoint.c: Include rsp-low.h.
4406 * server.c: Include rsp-low.h.
4407 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4408 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4409 declare.
4410 * remote-utils.c: Include rsp-low.h.
4411 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4412 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4413 (convert_int_to_ascii, convert_ascii_to_int): Move to
4414 common/rsp-low.c.
4415 * regcache.c: Include rsp-low.h.
4416 * ax.c: Include rsp-low.h.
4417 * Makefile.in (SFILES): Add common/rsp-low.c.
4418 (OBS): Add rsp-low.o.
4419 (rsp-low.o): New target.
4420
4421 2014-02-12 Tom Tromey <tromey@redhat.com>
4422
4423 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4424 Include print-utils.h.
4425 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4426 (plongest, thirty_two, phex_nz): Remove.
4427 * Makefile.in (SFILES): Add common/print-utils.c.
4428 (OBS): Add print-utils.o.
4429 (print-utils-ipa.o): New target.
4430 (print-utils.o): New target.
4431 (IPA_OBJS): Add print-utils-ipa.o.
4432
4433 2014-02-06 Tom Tromey <tromey@redhat.com>
4434
4435 * Makefile.in (SFILES): Fix indentation.
4436
4437 2014-02-05 Doug Evans <dje@google.com>
4438
4439 * linux-low.c (linux_wait_for_event): Improve comment.
4440 (linux_wait_1): Keep current_inferior in sync with event_child.
4441
4442 2014-01-22 Doug Evans <dje@google.com>
4443
4444 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4445
4446 2014-01-22 Doug Evans <dje@google.com>
4447
4448 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4449 * configure: Regenerate.
4450 * config.in: Regenerate.
4451 * Makefile.in (SFILES): Add debug.c.
4452 (OBS): Add debug.o.
4453 * debug.c: New file.
4454 * debug.h: New file.
4455 * linux-aarch64-low.c (*): Update all debugging printfs to use
4456 debug_printf instead of fprintf.
4457 * linux-arm-low.c (*): Ditto.
4458 * linux-cris-low.c (*): Ditto.
4459 * linux-crisv32-low.c (*): Ditto.
4460 * linux-m32r-low.c (*): Ditto.
4461 * linux-sparc-low.c (*): Ditto.
4462 * linux-x86.c (*): Ditto.
4463 * linux-low.c (*): Ditto.
4464 (linux_wait_1): Add calls to debug_enter, debug_exit.
4465 (linux_wait): Remove redundant debugging printf.
4466 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4467 (linux_resume, unstop_all_lwps): Ditto.
4468 * mem-break.c (*): Update all debugging printfs to use
4469 debug_printf instead of fprintf.
4470 * remote-utils.c (*): Ditto.
4471 * thread-db.c (*): Ditto.
4472 * server.c #include <ctype.h>, "gdb_vecs.h".
4473 (debug_threads): Moved to debug.c.
4474 (*): Update all debugging printfs to use debug_printf instead of
4475 fprintf.
4476 (start_inferior): Replace call to fflush with call to debug_flush.
4477 (monitor_show_help): Mention set debug-format.
4478 (parse_debug_format_options): New function.
4479 (handle_monitor_command): Handle "monitor set debug-format".
4480 (gdbserver_usage): Mention --debug-format.
4481 (main): Parse --debug-format.
4482 * server.h (debug_threads): Declaration moved to debug.h.
4483 #include "debug.h".
4484 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4485 trace_debug_1 that uses debug_printf.
4486 (tracepoint_look_up_symbols): Update all debugging printfs to use
4487 debug_printf instead of fprintf.
4488
4489 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4490
4491 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4492 sys/ptrace.h.
4493
4494 2014-01-17 Pedro Alves <palves@redhat.com>
4495
4496 PR build/16445
4497 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4498 defined after including gdb_proc_service.h.
4499
4500 2014-01-16 Doug Evans <dje@google.com>
4501
4502 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4503 (match_dll): Use it.
4504
4505 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4506
4507 * target.h (target_ops) <read_btrace>: Change parameters and
4508 return type to allow error reporting.
4509 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4510 trace reading errors on.
4511 * linux-low.c (linux_low_read_btrace): Pass trace reading
4512 errors on.
4513 (linux_low_disable_btrace): New.
4514
4515 2014-01-15 Doug Evans <dje@google.com>
4516
4517 * inferiors.c (thread_id_to_gdb_id): Delete.
4518 * inferiors.h (thread_id_to_gdb_id): Delete.
4519
4520 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4521
4522 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4523 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4524 versions.
4525
4526 2014-01-08 Pedro Alves <palves@redhat.com>
4527
4528 * server.c (handle_status): Don't discard previous queued stop
4529 replies or thread's pending status here.
4530 (main) <disconnection>: Do it here instead.
4531
4532 2014-01-08 Pedro Alves <palves@redhat.com>
4533
4534 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4535 * server.c (visit_actioned_threads, handle_pending_status): New
4536 function.
4537 (handle_v_cont): Factor out parts to ...
4538 (resume): ... this new function. If in all-stop, and a thread
4539 being resumed has a pending status, report it without actually
4540 resuming.
4541 (myresume): Adjust to use the new 'resume' function.
4542 (clear_pending_status_callback, set_pending_status_callback)
4543 (find_status_pending_thread_callback): New functions.
4544 (handle_status): Handle the case of multiple threads having
4545 interesting statuses to report. Report threads' real last signal
4546 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4547 with an interesting thread to report the status for, instead of
4548 always reporting the status of the first thread.
4549
4550 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4551
4552 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4553 * gdbreplay.c (gdbreplay_version): Likewise.
4554
4555 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4556
4557 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4558 iov.iov_len with the real length in use.
4559
4560 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4561
4562 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4563 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4564 for all targets that use win32-low.c.
4565 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4566 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4567
4568 2013-12-13 Pedro Alves <palves@redhat.com>
4569
4570 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4571 if equal to TARGET_WAITKIND_LOADED.
4572 * win32-low.c (cached_status): New static global.
4573 (win32_wait): Add declaration.
4574 (do_initial_child_stuff): Flush all initial pending debug events
4575 up to the initial breakpoint.
4576 (win32_wait): If CACHED_STATUS was set, return that instead
4577 of doing a real wait. Remove the code resuming the execution
4578 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4579 during the initial phase. Also remove the code changing
4580 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4581 TARGET_WAITKIND_STOPPED.
4582
4583 2013-12-11 Yao Qi <yao@codesourcery.com>
4584
4585 * notif.c (handle_notif_ack): Return 0 if no notification
4586 matches.
4587
4588 2013-11-20 Doug Evans <dje@google.com>
4589
4590 * linux-low.c (linux_set_resume_request): Fix comment.
4591
4592 2013-11-20 Doug Evans <dje@google.com>
4593
4594 * linux-low.c (resume_status_pending_p): Tweak comment.
4595
4596 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4597
4598 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4599 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4600 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4601 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4602 (srv_amd64_regobj): Add amd64-mpx.o.
4603 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4604 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4605 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4606 * i387-fp.c (num_pl_bnd_register) Added constant.
4607 (num_pl_bnd_cfg_registers) Added constant.
4608 (struct i387_xsave) Added reserved area and MPX fields.
4609 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4610 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4611 function.
4612 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4613 (init_registers_amd64_mpx_linux): Declare new function.
4614 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4615 (x86_64_regmap): Add MPX registers.
4616 (x86_linux_read_description): Add MPX case.
4617 (initialize_low_arch): Initialize MPX targets.
4618
4619 2013-11-18 Tom Tromey <tromey@redhat.com>
4620
4621 * configure: Rebuild.
4622 * configure.ac: Don't check for stdlib.h.
4623 * gdbreplay.c: Unconditionally include stdlib.h.
4624
4625 2013-11-18 Tom Tromey <tromey@redhat.com>
4626
4627 * config.in: Rebuild.
4628 * configure: Rebuild.
4629 * configure.ac: Don't use AC_HEADER_DIRENT.
4630
4631 2013-11-18 Tom Tromey <tromey@redhat.com>
4632
4633 * server.h: Don't check HAVE_STRING_H.
4634 * gdbreplay.c: Don't check HAVE_STRING_H.
4635 * configure: Rebuild.
4636
4637 2013-11-18 Tom Tromey <tromey@redhat.com>
4638
4639 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4640 LIBGNU.
4641
4642 2013-11-08 Tom Tromey <tromey@redhat.com>
4643
4644 * configure, config.in: Rebuild.
4645 * configure.ac: Remove unused configury.
4646
4647 2013-11-08 Tom Tromey <tromey@redhat.com>
4648
4649 * acinclude.m4: Include common.m4, codeset.m4.
4650 * configure, config.in: Rebuild.
4651 * configure.ac: Use GDB_AC_COMMON.
4652
4653 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4654
4655 * linux-s390-low.c (HWCAP_S390_TE): New define.
4656 (s390_arch_setup): Consider the TE field in the HWCAP for
4657 determining 'have_regset_tdb'.
4658
4659 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4660
4661 PR gdb/16014
4662 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4663 call to sizeof.
4664
4665 2013-10-02 Pedro Alves <palves@redhat.com>
4666
4667 * server.c (process_serial_event): Don't output "GDBserver
4668 exiting" if GDB is connected through stdio.
4669 * target.c (mywait): Likewise, be silent if GDB is connected
4670 through stdio.
4671
4672 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4673
4674 * lynx-low.c (lynx_add_threads_after_attach): New function.
4675 (lynx_attach): Remove call to add_thread. Add call to
4676 lynx_add_threads_after_attach instead.
4677
4678 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4679
4680 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4681 * config.in, configure: Regenerated.
4682
4683 2013-09-18 Yao Qi <yao@codesourcery.com>
4684
4685 PR server/15959
4686 * server.c (start_inferior): Clear 'resume_info'.
4687
4688 2013-09-16 Jiong Wang <jiwang@tilera.com>
4689
4690 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4691 for each register.
4692
4693 2013-09-16 Jiong Wang <jiwang@tilera.com>
4694
4695 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4696 linux-tile-low.o to srv_tgtobj.
4697
4698 2013-09-16 Will Newton <will.newton@linaro.org>
4699
4700 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4701 out regs.
4702
4703 2013-09-06 Pedro Alves <palves@redhat.com>
4704
4705 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4706 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4707 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4708 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4709 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4710 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4711
4712 2013-09-06 Pedro Alves <palves@redhat.com>
4713
4714 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4715 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4716
4717 2013-09-06 Pedro Alves <palves@redhat.com>
4718
4719 * linux-amd64-ipa.c: Include tracepoint.h.
4720 * linux-i386-ipa.c: Include tracepoint.h.
4721
4722 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4723
4724 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4725 (ps_get_thread_area): New function.
4726
4727 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4728
4729 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4730 (initialize_low_arch): Call init_registers_crisv32 rather than
4731 init_register_crisv32.
4732
4733 2013-09-05 Pedro Alves <palves@redhat.com>
4734
4735 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4736 to ...
4737 * hostio.h: ... this new file.
4738 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4739 win32-low.c: Include hostio.h.
4740
4741 2013-09-05 Pedro Alves <palves@redhat.com>
4742
4743 * server.h (gdb_client_data, handler_func, callback_handler_func)
4744 (delete_file_handler, add_file_handler, append_callback_event)
4745 (delete_callback_event, start_event_loop, initialize_event_loop):
4746 Move to event-loop.h and include it.
4747 * event-loop.h: New file.
4748
4749 2013-09-05 Pedro Alves <palves@redhat.com>
4750
4751 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4752 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4753 (loaded_dll, unloaded_dll): Move to ...
4754 * dll.h: ... this new file.
4755 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4756
4757 2013-09-05 Pedro Alves <palves@redhat.com>
4758
4759 * server.h (current_process, get_thread_process, all_processes)
4760 (add_inferior_to_list, for_each_inferior, current_inferior)
4761 (remove_inferior, add_process, remove_process, find_process_pid)
4762 (have_started_inferiors_p, have_attached_inferiors_p)
4763 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4764 (clear_inferiors, find_inferior, find_inferior_id)
4765 (inferior_target_data, set_inferior_target_data)
4766 (inferior_regcache_data, set_inferior_regcache_data): Move to
4767 inferiors.h, and include it.
4768 * inferiors.h: New file.
4769
4770 2013-09-05 Pedro Alves <palves@redhat.com>
4771
4772 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4773 Move ...
4774 * ax.h: ... here.
4775
4776 2013-09-05 Pedro Alves <palves@redhat.com>
4777
4778 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4779 tracepoint.h.
4780 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4781 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4782 (handle_tracepoint_general_set, handle_tracepoint_query)
4783 (tracepoint_finished_step, tracepoint_was_hit)
4784 (release_while_stepping_state_list, current_traceframe)
4785 (in_readonly_region, traceframe_read_mem)
4786 (fetch_traceframe_registers, traceframe_read_sdata)
4787 (traceframe_read_info, struct fast_tpoint_collect_status)
4788 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4789 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4790 (supply_fast_tracepoint_registers)
4791 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4792 (ipa_tdesc, claim_trampoline_space)
4793 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4794 (agent_mem_read, agent_get_trace_state_variable_value)
4795 (agent_set_trace_state_variable_value, agent_tsv_read)
4796 (agent_mem_read_string, get_raw_reg_func_addr)
4797 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4798 * tracepoint.h: ... this new file.
4799
4800 2013-09-05 Pedro Alves <palves@redhat.com>
4801
4802 * server.h (perror_with_name, error, fatal, warning, paddress)
4803 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4804 include it.
4805 * utils.h: New file.
4806
4807 2013-09-05 Pedro Alves <palves@redhat.com>
4808
4809 * server.h (remote_debug, noack_mode, transport_is_reliable)
4810 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4811 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4812 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4813 (write_enn, initialize_async_io, enable_async_io)
4814 (disable_async_io, check_remote_input_interrupt_request)
4815 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4816 (dead_thread_notify, prepare_resume_reply)
4817 (decode_address_to_semicolon, decode_address, decode_m_packet)
4818 (decode_M_packet, decode_X_packet, decode_xfer_write)
4819 (decode_search_memory_packet, unhexify, hexify)
4820 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4821 (look_up_one_symbol, relocate_instruction)
4822 (monitor_output): Move to remote-utils.h, and include it.
4823 * remote-utils.h: New file.
4824
4825 2013-09-05 Pedro Alves <palves@redhat.com>
4826
4827 * server.h (_): Delete.
4828
4829 2013-09-02 Pedro Alves <palves@redhat.com>
4830
4831 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4832 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4833 allocated.
4834 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4835
4836 2013-09-02 Pierre Muller <muller@sourceware.org>
4837
4838 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4839 or WriteProcessMemory complete successfully and handle
4840 ERROR_PARTIAL_COPY error.
4841
4842 2013-09-02 Pedro Alves <palves@redhat.com>
4843
4844 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4845 error instead of EIO.
4846
4847 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4848
4849 PR server/15604
4850 * linux-low.c: Include filestuff.h.
4851 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4852 * lynx-low.c: Include filestuff.h.
4853 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4854 * server.c: Include filestuff.h.
4855 (main): Call notice_open_fds.
4856 * spu-low.c: Include filestuff.h.
4857 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4858
4859 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4860
4861 * Makefile.in: Explain why ../target and ../nat are not
4862 listed as include file search paths.
4863 (linux-waitpid.o): New object file rule.
4864 * configure.srv (srv_native_linux_obj): New variable.
4865 Replace all occurrences of linux native object files with
4866 $srv_native_linux_obj.
4867 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4868 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4869 (linux_enable_event_reporting): Remove declaration.
4870 (my_waitpid): Moved to common/linux-waitpid.c.
4871 (linux_wait_for_event): Pass ptid when calling
4872 linux_enable_event_reporting.
4873 (linux_supports_tracefork_flag): Remove.
4874 (linux_enable_event_reporting): Likewise.
4875 (linux_tracefork_grandchild): Remove.
4876 (STACK_SIZE): Moved to common/linux-ptrace.c.
4877 (linux_tracefork_child): Remove.
4878 (linux_test_for_tracefork): Remove.
4879 (linux_look_up_symbols): Call linux_supports_traceclone.
4880 (initialize_low): Remove call to linux_test_for_tracefork.
4881 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4882 common/linux-ptrace.h.
4883 (PTRACE_TYPE_ARG4): Likewise.
4884 Include linux-ptrace.h.
4885
4886 2013-08-21 Pedro Alves <palves@redhat.com>
4887
4888 * config.in: Renegerate.
4889
4890 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4891
4892 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4893 (SFILES): Remove $(srcdir)/common/target-common.c and
4894 add $(srcdir)/target/waitstatus.c.
4895 (OBS): Remove target-common.o and add waitstatus.o.
4896 (server_h): Remove $(srcdir)/../common/target-common.h and
4897 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4898 and $(srcdir)/../target/waitstatus.h.
4899 (target-common.o): Remove.
4900 (waitstatus.o): New target object file.
4901 * target.h: Do not include target-common.h and
4902 include target/resume.h, target/wait.h and
4903 target/waitstatus.h.
4904
4905 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4906
4907 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4908 to PTRACE_TYPE_ARG3.
4909 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4910 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4911 PTRACE_TYPE_ARG4.
4912 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4913 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4914
4915 2013-07-27 Jie Zhang <jie@codesourcery.com>
4916 Daniel Jacobowitz <dan@codesourcery.com>
4917 Yao Qi <yao@codesourcery.com>
4918
4919 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4920 (mips-linux-watch.o): New rule.
4921 (mips_linux_watch_h): New variable.
4922 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4923 srv_tgtobj.
4924 * linux-mips-low.c: Include mips-linux-watch.h.
4925 (struct arch_process_info, struct arch_lwp_info): New.
4926 (update_watch_registers_callback): New function.
4927 (mips_linux_new_process, mips_linux_new_thread) New functions.
4928 (mips_linux_prepare_to_resume, mips_insert_point): New
4929 functions.
4930 (mips_remove_point, mips_stopped_by_watchpoint): New
4931 functions.
4932 (rsp_bp_type_to_target_hw_bp_type): New function.
4933 (mips_stopped_data_address): New function.
4934 (the_low_target): Add watchpoint support functions.
4935
4936 2013-07-27 Yao Qi <yao@codesourcery.com>
4937
4938 * i386-low.c: Include break-common.h.
4939 (enum target_hw_bp_type): Remove.
4940
4941 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4942
4943 * Makefile.in (SFILES): /common/target-common.c.
4944 (OBS): Add target-common.o.
4945 (server_h): Add $(srcdir)/../common/target-common.h.
4946 (target-common.o): New target.
4947 * server.c (queue_stop_reply_callback): Free
4948 status string after use.
4949 * target.c (target_waitstatus_to_string): Remove.
4950 * target.h: Include target-common.h.
4951 (resume_kind): Likewise.
4952 (target_waitkind): Likewise.
4953 (target_waitstatus): Likewise.
4954 (TARGET_WNOHANG): Likewise.
4955
4956 2013-07-04 Yao Qi <yao@codesourcery.com>
4957
4958 * Makefile.in (host_alias): Use @host_noncanonical@.
4959 (target_alias): Use @target_noncanonical@.
4960 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4961 ACX_NONCANONICAL_HOST.
4962 * configure: Regenerated.
4963
4964 Revert:
4965 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4966
4967 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4968 * configure: Rebuild.
4969 * Makefile.in (version_host, version_target): Get from configure.
4970 (version.c): Use $(version_host) and $(version_target).
4971
4972 2013-07-03 Pedro Alves <palves@redhat.com>
4973
4974 * Makefile.in (config.status): Depend on development.sh.
4975 * acinclude.m4: Include libmcheck.m4.
4976 * configure: Regenerate.
4977
4978 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4979
4980 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4981 attribute inside the parentheses.
4982 (winapi_DebugSetProcessKillOnExit): Ditto.
4983 (winapi_DebugBreakProcess): Ditto.
4984 (winapi_GenerateConsoleCtrlEvent): Ditto.
4985
4986 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4987
4988 * notif.h (notif_event): Add a dummy member to avoid compiler
4989 errors.
4990
4991 2013-07-01 Pedro Alves <palves@redhat.com>
4992
4993 * hostio.c (HOSTIO_PATH_MAX): Define.
4994 (require_filename, handle_open, handle_unlink, handle_readlink):
4995 Use it.
4996
4997 2013-07-01 Pedro Alves <palves@redhat.com>
4998
4999 * server.h: Include "pathmax.h".
5000 * linux-low.c: Don't include sys/param.h.
5001 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5002 MAXPATHLEN.
5003 * win32-low.c: Don't include sys/param.h.
5004 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5005
5006 2013-07-01 Pedro Alves <palves@redhat.com>
5007
5008 * event-loop.c: Don't check HAVE_UNISTD_H before including
5009 <unistd.h>.
5010 * gdbreplay.c: Likewise.
5011 * remote-utils.c: Likewise.
5012 * server.c: Likewise.
5013 * configure.ac: Don't check for unistd.h.
5014 * configure: Regenerate.
5015
5016 2013-06-28 Tom Tromey <tromey@redhat.com>
5017
5018 * Makefile.in (version.c): Use version.in, not
5019 common/version.in.
5020
5021 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5022
5023 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5024 * configure: Rebuild.
5025 * Makefile.in (version_host, version_target): Get from configure.
5026 (version.c): Use $(version_host) and $(version_target).
5027
5028 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5029
5030 Fix trace-status to output user name without trailing colon.
5031 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5032
5033 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5034
5035 Fix trace-status to output proper start-time and stop-time.
5036 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5037 output start time and stop time in hex as gdb expects.
5038
5039 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5040
5041 * tracepoint.c (build_traceframe_info_xml): Output trace state
5042 variables present in the trace buffer.
5043
5044 2013-06-24 Tom Tromey <tromey@redhat.com>
5045
5046 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5047 create-version.sh.
5048 (version.o): Remove.
5049 * gdbreplay.c: Include version.h.
5050 (version, host_name): Don't declare.
5051 * server.h: Include version.h.
5052 (version, host_name): Don't declare.
5053
5054 2013-06-12 Pedro Alves <palves@redhat.com>
5055
5056 * linux-x86-low.c (linux_is_elf64): Delete global.
5057 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5058 with local linux_pid_exe_is_elf_64_file use.
5059
5060 2013-06-11 Pedro Alves <palves@redhat.com>
5061
5062 * linux-low.c (regset_disabled, disable_regset): New functions.
5063 (regsets_fetch_inferior_registers)
5064 (regsets_store_inferior_registers): Use them.
5065 (initialize_regsets_info); Don't allocate the disabled_regsets
5066 array here.
5067 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5068 comment.
5069
5070 2013-06-11 Pedro Alves <palves@redhat.com>
5071
5072 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5073 xmalloc.
5074
5075 2013-06-11 Pedro Alves <palves@redhat.com>
5076
5077 * linux-x86-low.c (initialize_low_arch): Call
5078 init_registers_x32_avx_linux.
5079
5080 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5081
5082 Fix compatibility with Android Bionic.
5083 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5084 it is not empty.
5085
5086 2013-06-07 Pedro Alves <palves@redhat.com>
5087
5088 PR server/14823
5089 * Makefile.in (OBS): Add tdesc.o.
5090 (IPA_OBJS): Add tdesc-ipa.o.
5091 (tdesc-ipa.o): New rule.
5092 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5093 interface.
5094 * linux-low.c (new_inferior): Delete.
5095 (disabled_regsets, num_regsets): Delete.
5096 (linux_add_process): Adjust to set the new per-process
5097 new_inferior flag.
5098 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5099 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5100 was a stop. When calling arch_setup, switch the current inferior
5101 to the thread that got an event.
5102 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5103 (regsets_fetch_inferior_registers)
5104 (regsets_store_inferior_registers): New regsets_info parameter.
5105 Adjust to use it.
5106 (linux_register_in_regsets): New regs_info parameter. Adjust to
5107 use it.
5108 (register_addr, fetch_register, store_register): New usrregs_info
5109 parameter. Adjust to use it.
5110 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5111 parameter regs_info. Adjust to use it.
5112 (linux_fetch_registers): Get the current inferior's regs_info, and
5113 adjust to use it.
5114 (linux_store_registers): Ditto.
5115 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5116 (initialize_low): Don't initialize the target_regsets here. Call
5117 initialize_low_arch.
5118 * linux-low.h (target_regsets): Delete declaration.
5119 (struct regsets_info): New.
5120 (struct usrregs_info): New.
5121 (struct regs_info): New.
5122 (struct process_info_private) <new_inferior>: New field.
5123 (struct linux_target_ops): Delete the num_regs, regmap, and
5124 regset_bitmap fields. New field regs_info.
5125 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5126 * i387-fp.c (num_xmm_registers): Delete.
5127 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5128 calls to new interface.
5129 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5130 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5131 Infer the number of xmm registers from the regcache's target
5132 description.
5133 * i387-fp.h (num_xmm_registers): Delete.
5134 * inferiors.c (add_thread): Don't install the thread's regcache
5135 here.
5136 * proc-service.c (gregset_info): Fetch the current inferior's
5137 regs_info. Adjust to use it.
5138 * regcache.c: Include tdesc.h.
5139 (register_bytes, reg_defs, num_registers)
5140 (gdbserver_expedite_regs): Delete.
5141 (get_thread_regcache): If the thread doesn't have a regcache yet,
5142 create one, instead of aborting gdbserver.
5143 (regcache_invalidate_one): Rename to ...
5144 (regcache_invalidate_thread): ... this.
5145 (regcache_invalidate_one): New.
5146 (regcache_invalidate): Only invalidate registers of the current
5147 process.
5148 (init_register_cache): Add target_desc parameter, and use it.
5149 (new_register_cache): Ditto. Assert the target description has a
5150 non zero registers_size.
5151 (regcache_cpy): Add assertions. Adjust.
5152 (realloc_register_cache, set_register_cache): Delete.
5153 (registers_to_string, registers_from_string): Adjust.
5154 (find_register_by_name, find_regno, find_register_by_number)
5155 (register_cache_size): Add target_desc parameter, and use it.
5156 (free_register_cache_thread, free_register_cache_thread_one)
5157 (regcache_release, register_cache_size): New.
5158 (register_size): Add target_desc parameter, and use it.
5159 (register_data, supply_register, supply_register_zeroed)
5160 (supply_regblock, supply_register_by_name, collect_register)
5161 (collect_register_as_string, collect_register_by_name): Adjust.
5162 * regcache.h (struct target_desc): Forward declare.
5163 (struct regcache) <tdesc>: New field.
5164 (init_register_cache, new_register_cache): Add target_desc
5165 parameter.
5166 (regcache_invalidate_thread): Declare.
5167 (regcache_invalidate_one): Delete declaration.
5168 (regcache_release): Declare.
5169 (find_register_by_number, register_cache_size, register_size)
5170 (find_regno): Add target_desc parameter.
5171 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5172 declarations.
5173 * remote-utils.c: Include tdesc.h.
5174 (outreg, prepare_resume_reply): Adjust.
5175 * server.c: Include tdesc.h.
5176 (gdbserver_xmltarget): Delete declaration.
5177 (get_features_xml, process_serial_event): Adjust.
5178 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5179 declare.
5180 (struct process_info) <tdesc>: New field.
5181 (ipa_tdesc): Declare.
5182 * tdesc.c: New file.
5183 * tdesc.h: New file.
5184 * tracepoint.c: Include tdesc.h.
5185 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5186 (get_context_regcache): Adjust to pass ipa_tdesc down.
5187 (do_action_at_tracepoint): Adjust to get the register cache size
5188 from the context regcache's description.
5189 (traceframe_walk_blocks): Adjust to get the register cache size
5190 from the current trace frame's description.
5191 (traceframe_get_pc): Adjust to get current trace frame's
5192 description and pass it down.
5193 (gdb_collect): Adjust to get the register cache size from the
5194 IPA's description.
5195 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5196 (gdbserver_xmltarget): Delete.
5197 (initialize_low_tracepoint): Set the ipa's target description.
5198 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5199 (initialize_low_tracepoint): Set the ipa's target description.
5200 * linux-x86-low.c: Include tdesc.h.
5201 [__x86_64__] (is_64bit_tdesc): New.
5202 (ps_get_thread_area, x86_get_thread_area): Use it.
5203 (i386_cannot_store_register): Rename to ...
5204 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5205 (i386_cannot_fetch_register): Rename to ...
5206 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5207 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5208 to new interface.
5209 (target_regsets): Rename to ...
5210 (x86_regsets): ... this.
5211 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5212 interface.
5213 (x86_siginfo_fixup): Use is_64bit_tdesc.
5214 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5215 (tdesc_x32_avx_linux, tdesc_x32_linux)
5216 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5217 Declare.
5218 (x86_linux_update_xmltarget): Delete.
5219 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5220 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5221 (AMD64_LINUX_USER64_CS): New.
5222 (x86_linux_read_description): New, based on
5223 x86_linux_update_xmltarget.
5224 (same_process_callback): New.
5225 (x86_arch_setup_process_callback): New.
5226 (x86_linux_update_xmltarget): New.
5227 (x86_regsets_info): New.
5228 (amd64_linux_regs_info): New.
5229 (i386_linux_usrregs_info): New.
5230 (i386_linux_regs_info): New.
5231 (x86_linux_regs_info): New.
5232 (x86_arch_setup): Reimplement.
5233 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5234 (x86_emit_ops): Ditto.
5235 (the_low_target): Adjust. Install x86_linux_regs_info,
5236 x86_cannot_fetch_register, and x86_cannot_store_register.
5237 (initialize_low_arch): New.
5238 * linux-ia64-low.c (tdesc_ia64): Declare.
5239 (ia64_fetch_register): Adjust.
5240 (ia64_usrregs_info, regs_info): New globals.
5241 (ia64_regs_info): New function.
5242 (the_low_target): Adjust.
5243 (initialize_low_arch): New function.
5244 * linux-sparc-low.c (tdesc_sparc64): Declare.
5245 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5246 Adjust.
5247 (sparc_arch_setup): New function.
5248 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5249 (the_low_target): Adjust.
5250 (initialize_low_arch): New function.
5251 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5252 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5253 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5254 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5255 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5256 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5257 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5258 (tdesc_powerpc_isa205_vsx64l): Declare.
5259 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5260 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5261 (ppc_set_pc, ppc_get_hwcap): Adjust.
5262 (ppc_usrregs_info): Forward declare.
5263 (!__powerpc64__) ppc_regmap_adjusted: New global.
5264 (ppc_arch_setup): Adjust to the current process'es target
5265 description.
5266 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5267 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5268 (ppc_store_evrregset): Adjust.
5269 (target_regsets): Rename to ...
5270 (ppc_regsets): ... this, and make static.
5271 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5272 (ppc_regs_info): New function.
5273 (the_low_target): Adjust.
5274 (initialize_low_arch): New function.
5275 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5276 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5277 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5278 (tdesc_s390x_linux64v2): Declare.
5279 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5280 (s390_fill_gregset, s390_store_last_break): Adjust.
5281 (target_regsets): Rename to ...
5282 (s390_regsets): ... this, and make static.
5283 (s390_get_pc, s390_set_pc): Adjust.
5284 (s390_get_hwcap): New target_desc parameter, and use it.
5285 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5286 (s390_arch_setup): Adjust to set the current process'es target
5287 description. Don't adjust the regmap.
5288 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5289 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5290 (regs_info_3264): New globals.
5291 (s390_regs_info): New function.
5292 (the_low_target): Adjust.
5293 (initialize_low_arch): New function.
5294 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5295 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5296 [__mips64] (init_registers_mips_linux)
5297 (init_registers_mips_dsp_linux): Delete defines.
5298 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5299 (have_dsp): New global.
5300 (mips_read_description): New, based on mips_arch_setup.
5301 (mips_arch_setup): Reimplement.
5302 (get_usrregs_info): New function.
5303 (mips_cannot_fetch_register, mips_cannot_store_register)
5304 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5305 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5306 (target_regsets): Rename to ...
5307 (mips_regsets): ... this, and make static.
5308 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5309 (dsp_regs_info, regs_info): New globals.
5310 (mips_regs_info): New function.
5311 (the_low_target): Adjust.
5312 (initialize_low_arch): New function.
5313 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5314 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5315 Declare.
5316 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5317 (arm_read_description): New, with bits factored from
5318 arm_arch_setup.
5319 (arm_arch_setup): Reimplement.
5320 (target_regsets): Rename to ...
5321 (arm_regsets): ... this, and make static.
5322 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5323 (arm_regs_info): New function.
5324 (the_low_target): Adjust.
5325 (initialize_low_arch): New function.
5326 * linux-m68k-low.c (tdesc_m68k): Declare.
5327 (target_regsets): Rename to ...
5328 (m68k_regsets): ... this, and make static.
5329 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5330 (m68k_regs_info): New function.
5331 (m68k_arch_setup): New function.
5332 (the_low_target): Adjust.
5333 (initialize_low_arch): New function.
5334 * linux-sh-low.c (tdesc_sharch): Declare.
5335 (target_regsets): Rename to ...
5336 (sh_regsets): ... this, and make static.
5337 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5338 (sh_regs_info, sh_arch_setup): New functions.
5339 (the_low_target): Adjust.
5340 (initialize_low_arch): New function.
5341 * linux-bfin-low.c (tdesc_bfin): Declare.
5342 (bfin_arch_setup): New function.
5343 (bfin_usrregs_info, regs_info): New globals.
5344 (bfin_regs_info): New function.
5345 (the_low_target): Adjust.
5346 (initialize_low_arch): New function.
5347 * linux-cris-low.c (tdesc_cris): Declare.
5348 (cris_arch_setup): New function.
5349 (cris_usrregs_info, regs_info): New globals.
5350 (cris_regs_info): New function.
5351 (the_low_target): Adjust.
5352 (initialize_low_arch): New function.
5353 * linux-cris-low.c (tdesc_crisv32): Declare.
5354 (cris_arch_setup): New function.
5355 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5356 (cris_regs_info): New function.
5357 (the_low_target): Adjust.
5358 (initialize_low_arch): New function.
5359 * linux-m32r-low.c (tdesc_m32r): Declare.
5360 (m32r_arch_setup): New function.
5361 (m32r_usrregs_info, regs_info): New globals.
5362 (m32r_regs_info): Adjust.
5363 (initialize_low_arch): New function.
5364 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5365 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5366 (tic6x_usrregs_info): Forward declare.
5367 (tic6x_read_description): New function, based on ...
5368 (tic6x_arch_setup): ... this. Reimplement.
5369 (target_regsets): Rename to ...
5370 (tic6x_regsets): ... this, and make static.
5371 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5372 (tic6x_regs_info): New function.
5373 (the_low_target): Adjust.
5374 (initialize_low_arch): New function.
5375 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5376 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5377 (target_regsets): Rename to ...
5378 (xtensa_regsets): ... this, and make static.
5379 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5380 globals.
5381 (xtensa_arch_setup, xtensa_regs_info): New functions.
5382 (the_low_target): Adjust.
5383 (initialize_low_arch): New function.
5384 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5385 (nios2_arch_setup): Set the current process'es tdesc.
5386 (target_regsets): Rename to ...
5387 (nios2_regsets): ... this.
5388 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5389 (nios2_regs_info): New function.
5390 (the_low_target): Adjust.
5391 (initialize_low_arch): New function.
5392 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5393 (aarch64_arch_setup): Set the current process'es tdesc.
5394 (target_regsets): Rename to ...
5395 (aarch64_regsets): ... this.
5396 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5397 (aarch64_regs_info): New function.
5398 (the_low_target): Adjust.
5399 (initialize_low_arch): New function.
5400 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5401 globals.
5402 (target_regsets): Rename to ...
5403 (tile_regsets): ... this.
5404 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5405 (tile_regs_info): New function.
5406 (tile_arch_setup): Set the current process'es tdesc.
5407 (the_low_target): Adjust.
5408 (initialize_low_arch): New function.
5409 * spu-low.c (tdesc_spu): Declare.
5410 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5411 * win32-arm-low.c (tdesc_arm): Declare.
5412 (arm_arch_setup): New function.
5413 (the_low_target): Install arm_arch_setup instead of
5414 init_registers_arm.
5415 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5416 (init_windows_x86): Rename to ...
5417 (i386_arch_setup): ... this. Set `win32_tdesc'.
5418 (the_low_target): Adjust.
5419 * win32-low.c (win32_tdesc): New global.
5420 (child_add_thread): Don't create the thread cache here.
5421 (do_initial_child_stuff): Set the new process'es tdesc.
5422 * win32-low.h (struct target_desc): Forward declare.
5423 (win32_tdesc): Declare.
5424 * lynx-i386-low.c (tdesc_i386): Declare global.
5425 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5426 * lynx-low.c (lynx_tdesc): New global.
5427 (lynx_add_process): Set the new process'es tdesc.
5428 * lynx-low.h (struct target_desc): Forward declare.
5429 (lynx_tdesc): Declare global.
5430 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5431 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5432 * nto-low.c (nto_tdesc): New global.
5433 (do_attach): Set the new process'es tdesc.
5434 * nto-low.h (struct target_desc): Forward declare.
5435 (nto_tdesc): Declare.
5436 * nto-x86-low.c (tdesc_i386): Declare.
5437 (nto_x86_arch_setup): Set `nto_tdesc'.
5438
5439 2013-06-04 Gary Benson <gbenson@redhat.com>
5440
5441 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5442 to qSupported response when appropriate.
5443 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5444 with nonzero-length annex.
5445 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5446 arguments supplied in annex.
5447
5448 2013-05-31 Doug Evans <dje@google.com>
5449
5450 PR server/15594
5451 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5452 64 bits in 64-cross-32 environment.
5453
5454 2013-05-28 Pedro Alves <palves@redhat.com>
5455
5456 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5457 (aarch64-without-fpu.c): Delete rule.
5458 * configure.srv (aarch64*-*-linux*): Remove references to
5459 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5460 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5461 declaration.
5462
5463 2013-05-24 Pedro Alves <palves@redhat.com>
5464
5465 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5466 instead of strchr/decode_address. Error if the range isn't split
5467 with a ','. Don't assume there's be a ':' in the action.
5468
5469 2013-05-23 Yao Qi <yao@codesourcery.com>
5470 Pedro Alves <palves@redhat.com>
5471
5472 * linux-low.c (lwp_in_step_range): New function.
5473 (linux_wait_1): If the thread was range stepping and stopped
5474 outside the stepping range, report the stop to GDB. Otherwise,
5475 continue stepping. Add range stepping debug output.
5476 (linux_set_resume_request): Copy the step range from the resume
5477 request to the lwp.
5478 (linux_supports_range_stepping): New.
5479 (linux_target_ops) <supports_range_stepping>: Set to
5480 linux_supports_range_stepping.
5481 * linux-low.h (struct linux_target_ops)
5482 <supports_range_stepping>: New field.
5483 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5484 * linux-x86-low.c (x86_supports_range_stepping): New.
5485 (the_low_target) <supports_range_stepping>: Set to
5486 x86_supports_range_stepping.
5487 * server.c (handle_v_cont): Handle 'r' action.
5488 (handle_v_requests): Append ";r" if the target supports range
5489 stepping.
5490 * target.h (struct thread_resume) <step_range_start,
5491 step_range_end>: New fields.
5492 (struct target_ops) <supports_range_stepping>:
5493 New field.
5494 (target_supports_range_stepping): New macro.
5495
5496 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5497
5498 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5499 confusion in comment.
5500
5501 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5502
5503 * lynx-low.c (struct process_info_private): New type.
5504 (lynx_add_process): New function.
5505 (lynx_create_inferior, lynx_attach): Replace calls to
5506 add_process by calls to lynx_add_process.
5507 (lynx_resume): If PTID is null, then try using
5508 current_process()->private->last_wait_event_ptid.
5509 Add comments.
5510 (lynx_clear_inferiors): Delete. The contents of that function
5511 has been inlined in lynx_mourn;
5512 (lynx_wait_1): Save the ptid in the process's private data.
5513 (lynx_mourn): Free the process' private data. Replace call
5514 to lynx_clear_inferiors by call to clear_inferiors.
5515
5516 2013-05-17 Yao Qi <yao@codesourcery.com>
5517
5518 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5519 the right place.
5520
5521 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5522
5523 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5524 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5525 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5526 PT_TEXT_END_ADDR guards. Update comments.
5527 (linux_target_op) <read_offsets>: Conditionally define to
5528 linux_read_offsets if the target is UCLIBC and if it defines
5529 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5530
5531 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5532 Andrew Jenner <andrew@codesourcery.com>
5533
5534 * Makefile.in (SFILES): Add linux-nios2-low.c.
5535 (clean): Add action to delete nios2-linux.c.
5536 (nios2-linux.c): New rule.
5537 * configure.srv: Add nios2*-*-linux*.
5538 * linux-nios2-low.c: New.
5539
5540 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5541
5542 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5543
5544 2013-04-25 Hui Zhu <hui@codesourcery.com>
5545
5546 PR gdb/15186
5547 * ax.c (ax_printf): Add fflush.
5548
5549 2013-04-22 Tom Tromey <tromey@redhat.com>
5550
5551 * Makefile.in (SFILES): Add filestuff.c.
5552 (OBS): Add filestuff.o.
5553 (filestuff.o): New target.
5554 * config.in, configure: Rebuild.
5555 * configure.ac: Check for fdwalk, pipe2.
5556
5557 2013-04-17 Pedro Alves <palves@redhat.com>
5558
5559 * configure.ac (USE_THREAD_DB): Delete variable.
5560 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5561 Don't AC_SUBST USE_THREAD_DB.
5562 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5563 * config.in, configure: Regenerate.
5564
5565 2013-04-16 Pedro Alves <palves@redhat.com>
5566
5567 * linux-low.h (struct lwp_info) <thread_known>: Move under
5568 the USE_THREAD_DB #ifdef.
5569
5570 2013-04-16 Pedro Alves <palves@redhat.com>
5571
5572 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5573 (linux-low.o): Delete rule.
5574 * linux-low.h: Always include "gdb_thread_db.h" instead of
5575 conditionally including thread_db.h.
5576 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5577 HAVE_THREAD_DB_H.
5578
5579 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5580
5581 * Makefile.in (install-only): Fix make install regression.
5582
5583 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5584
5585 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5586 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5587 installation.
5588 * gdbserver.1: Remove.
5589
5590 2013-03-22 Pedro Alves <palves@redhat.com>
5591
5592 * linux-low.c (handle_extended_wait): Don't call
5593 linux_enable_event_reporting.
5594
5595 2013-03-15 Tony Theodore <tonyt@logyst.com>
5596
5597 PR build/9098:
5598 * Makefile.in (SHELL): Use @SHELL@.
5599
5600 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5601
5602 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5603 compiler warning.
5604
5605 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5606
5607 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5608 Remove extraneous NULL element.
5609
5610 2013-03-13 Yao Qi <yao@codesourcery.com>
5611
5612 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5613 'V' block in trace frame.
5614
5615 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5616
5617 * target.h (struct target_ops): Add btrace ops.
5618 (target_supports_btrace): New macro.
5619 (target_enable_btrace): New macro.
5620 (target_disable_btrace): New macro.
5621 (target_read_btrace): New macro.
5622 * gdbthread.h (struct thread_info): Add btrace field.
5623 * server.c: Include btrace-common.h.
5624 (handle_btrace_general_set): New function.
5625 (handle_btrace_enable): New function.
5626 (handle_btrace_disable): New function.
5627 (handle_general_set): Call handle_btrace_general_set.
5628 (handle_qxfer_btrace): New function.
5629 (struct qxfer qxfer_packets[]): Add btrace entry.
5630 * inferiors.c (remove_thread): Disable btrace.
5631 * linux-low: Include linux-btrace.h.
5632 (linux_low_enable_btrace): New function.
5633 (linux_low_read_btrace): New function.
5634 (linux_target_ops): Add btrace ops.
5635 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5636 Add srv_linux_btrace=yes.
5637 (x86_64-*-linux*): Add linux-btrace.o.
5638 Add srv_linux_btrace=yes.
5639 * configure.ac: Define HAVE_LINUX_BTRACE.
5640 * config.in: Regenerated.
5641 * configure: Regenerated.
5642
5643 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5644
5645 * server.c (handle_qxfer): Preserve error message if -3 is
5646 returned.
5647 (qxfer): Document the -3 return value.
5648
5649 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5650
5651 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5652 (linux_btrace_h): New variable.
5653 (linux-btrace.o): New rule.
5654
5655 2013-03-08 Stan Shebs <stan@codesourcery.com>
5656 Hafiz Abid Qadeer <abidh@codesourcery.com>
5657
5658 * tracepoint.c (trace_buffer_size): New global.
5659 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5660 (init_trace_buffer): Change to one-argument function. Allocate
5661 trace buffer memory.
5662 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5663 handle QTBuffer:size packet.
5664 (cmd_bigqtbuffer_size): New function.
5665 (initialize_tracepoint): Call init_trace_buffer with
5666 DEFAULT_TRACE_BUFFER_SIZE.
5667 * server.c (handle_query): Add QTBuffer:size in the
5668 supported packets.
5669
5670 2013-03-07 Yao Qi <yao@codesourcery.com>
5671
5672 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5673 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5674 of -1.
5675 (cmd_qtsp): Adjust condition. Do post increment.
5676 Set cur_action and cur_step_action back to 0.
5677
5678 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5679
5680 PR server/15236
5681 * linux-low.c (linux_write_memory): Return early success if LEN is
5682 zero.
5683
5684 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5685
5686 * configure.srv: Add x86_64-*-cygwin* as target.
5687
5688 2013-02-28 Tom Tromey <tromey@redhat.com>
5689
5690 * configure.ac: Invoke AC_SYS_LARGEFILE.
5691 * configure, config.in: Rebuild.
5692
5693 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5694
5695 * win32-low.c: Throughout, fix format strings and casts of
5696 printf-like functions to avoid type related warnings on all
5697 platforms.
5698 (get_child_debug_event): Print dwDebugEventCode as hex since
5699 that's how it's usually documented.
5700
5701 2013-02-28 Yao Qi <yao@codesourcery.com>
5702
5703 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5704 pulongest.
5705
5706 2013-02-27 Jiong Wang <jiwang@tilera.com>
5707
5708 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5709 (reg-tilegx32.c): New rule.
5710 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5711 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5712 different register info initializer according to elf class.
5713 (init_registers_tilgx32): New function. The tilegx32 register info
5714 initializer.
5715 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5716 (tile_store_gregset): Likewise.
5717
5718 2013-02-27 Yao Qi <yao@codesourcery.com>
5719
5720 * server.c (process_point_options): Print debug message when
5721 debug_threads is true.
5722
5723 2013-02-26 Yao Qi <yao@codesourcery.com>
5724
5725 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5726
5727 2013-02-19 Pedro Alves <palves@redhat.com>
5728 Kai Tietz <ktietz@redhat.com>
5729
5730 PR gdb/15161
5731
5732 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5733 instead of strtoul to extract address from packet.
5734 (process_serial_event) <'z'>: Likewise.
5735
5736 2013-02-18 Yao Qi <yao@codesourcery.com>
5737
5738 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5739
5740 2013-02-14 Pedro Alves <palves@redhat.com>
5741
5742 Plug memory leak.
5743
5744 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5745 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5746
5747 2013-02-14 Pedro Alves <palves@redhat.com>
5748
5749 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5750
5751 2013-02-14 Pedro Alves <palves@redhat.com>
5752
5753 * tracepoint.c (save_string): Delete.
5754 (add_tracepoint_action): Use savestring instead of save_string.
5755
5756 2013-02-12 Pedro Alves <palves@redhat.com>
5757
5758 * linux-xtensa-low.c: Ditto.
5759 * xtensa-xtregs.c: Ditto.
5760
5761 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5762
5763 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5764 thread_db.
5765
5766 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5767
5768 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5769 aarch64_num_wp_regs and aarch64_num_bp_regs to
5770 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5771
5772 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5773
5774 * linux-aarch64-low.c (ps_get_thread_area): Replace
5775 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5776
5777 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5778 Marcus Shawcroft <marcus.shawcroft@arm.com>
5779 Nigel Stephens <nigel.stephens@arm.com>
5780 Yufeng Zhang <yufeng.zhang@arm.com>
5781
5782 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5783 (aarch64.c, aarch64-without-fpu.c): New targets.
5784 * configure.srv (aarch64*-*-linux*): New.
5785 * linux-aarch64-low.c: New file.
5786
5787 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5788
5789 * linux-low.c (handle_extended_wait, linux_create_inferior)
5790 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5791 (dequeue_one_deferred_signal, linux_resume_one_thread)
5792 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5793 (linux_tracefork_grandchild, linux_test_for_tracefork)
5794 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5795 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5796 where the argument is 0.
5797
5798 2013-01-25 Yao Qi <yao@codesourcery.com>
5799
5800 * event-loop.c: Include "queue.h".
5801 (gdb_event_p): New typedef.
5802 (struct gdb_event) <next_event>: Remove.
5803 (event_queue): Change to QUEUE(gdb_event_p).
5804 (async_queue_event): Remove.
5805 (gdb_event_xfree): New.
5806 (initialize_event_loop): New.
5807 (process_event): Use API from QUEUE.
5808 (wait_for_event): Likewise.
5809 * server.c (main): Call initialize_event_loop.
5810 * server.h (initialize_event_loop): Declare.
5811
5812 2013-01-18 Yao Qi <yao@codesourcery.com>
5813
5814 * ax.h (struct eval_agent_expr_context): New.
5815 (gdb_eval_agent_expr): Update declaration.
5816 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5817 TFRAME. Add new argument CTX.
5818 * server.h (struct eval_agent_expr_context): Declare.
5819 (agent_mem_read, agent_tsv_read): Update declaration.
5820 (agent_mem_read_string): Likewise.
5821 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5822 (add_traceframe_block): Add new argument TPOINT.
5823 Increase TPOINT->traceframe_usage.
5824 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5825 eval_tracepoint_agent_expr.
5826 (condition_true_at_tracepoint): Likewise.
5827 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5828 (agent_mem_read_string, agent_tsv_read): Likewise.
5829
5830 2013-01-16 Yao Qi <yao@codesourcery.com>
5831
5832 * linux-low.c (linux_resume_one_lwp): Don't check
5833 'lwp->bp_reinsert != 0'.
5834
5835 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5836 Pedro Alves <palves@redhat.com>
5837
5838 * lynx-low.c (ptrace_request_to_str): Define a temporary
5839 macro and use it to simplify this function's implementation.
5840
5841 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5842
5843 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5844 sets errno.
5845
5846 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5847
5848 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5849
5850 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5851
5852 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5853
5854 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5855
5856 * lynx-low.c (lynx_resume): Use the resume_info parameter
5857 to determine the ptid for the lynx_ptrace call, unless
5858 it is equal to minus_one_ptid, in which case we use the
5859 ptid of the current_inferior.
5860 (lynx_wait_1): After having received a thread create/exit
5861 event, resume the inferior's execution using the signaling
5862 thread's ptid, rather than the old ptid.
5863
5864 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5865
5866 * lynx-low.c (lynx_resume): Delete variable ret.
5867
5868 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5869
5870 * gdbreplay.c (gdbreplay_version): Update copyright year.
5871 * server.c (gdbserver_version): Likewise.
5872
5873 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5874
5875 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5876 new thread.
5877
5878 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5879
5880 * lynx-low.c (ptrace_request_to_str): Add handling for
5881 PTRACE_GETTRACESIG.
5882
5883 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5884
5885 * lynx-low.c (lynx_attach): Delete variable new_process.
5886
5887 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5888
5889 * lynx-low.c (lynx_create_inferior): Delete variable
5890 new_process.
5891
5892 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5893
5894 * lynx-low.c (ptrace_request_to_str): Do not handle
5895 PTRACE_GETTHREADLIST if this macro does not exist.
5896
5897 2012-12-15 Yao Qi <yao@codesourcery.com>
5898
5899 * Makefile.in (OBS): Add notif.o.
5900 * notif.c, notif.h: New.
5901 * server.c: Include "notif.h".
5902 (struct vstop_notif) <next>: Remove.
5903 <base>: New field.
5904 (queue_stop_reply): Update.
5905 (push_event, send_next_stop_reply): Remove.
5906 (discard_queued_stop_replies): Update.
5907 (notif_stop): New variable.
5908 (handle_v_stopped): Remove.
5909 (handle_v_requests): Don't call handle_v_stopped. Call
5910 handle_ack_notif instead.
5911 (queue_stop_reply_callback): Call notif_event_enque instead
5912 of queue_stop_reply.
5913 (handle_status): Don't call send_next_stop_reply, call
5914 notif_write_event instead.
5915 (kill_inferior_callback): Likewise.
5916 (detach_or_kill_inferior_callback): Likewise.
5917 (main): Call initialize_notif.
5918 (process_serial_event): Call QUEUE_is_empty.
5919 (handle_target_event): Call notif_push instead of push event.
5920 * server.h (push_event): Remove declaration.
5921
5922 2012-12-10 Tom Tromey <tromey@redhat.com>
5923
5924 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5925 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5926 macros.
5927 (.c.o): Rewrite.
5928 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5929 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5930 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5931 (amd64-linux-ipa.o, ax.o): Rewrite.
5932 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5933 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5934 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5935 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5936 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5937 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5938 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5939 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5940 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5941 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5942 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5943 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5944 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5945 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5946 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5947 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5948 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5949 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5950 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5951 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5952 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5953 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5954 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5955 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5956 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5957 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5958 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5959 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5960 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5961 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5962 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5963 (reg-tilegx.o): Remove.
5964 (all_object_files): New macro.
5965 Include .deps files.
5966 * aclocal.m4, configure: Rebuild.
5967 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5968 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5969 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5970
5971 2012-12-05 Tom Tromey <tromey@redhat.com>
5972
5973 PR gdb/14917:
5974 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5975
5976 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5977
5978 * configure.ac: Check for linux/perf_event.h.
5979 * config.in: Regenerated.
5980 * configure: Regenerated.
5981
5982 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5983
5984 * hostio.c (handle_readlink): Decrease buffer size
5985 parameter passed to readlink by one byte.
5986
5987 2012-11-26 Yao Qi <yao@codesourcery.com>
5988
5989 * configure.ac (build_warnings): Append '-Wempty-body'.
5990 * configure: Regenerated.
5991 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5992 body.
5993
5994 2012-11-15 Pierre Muller <muller@sourceware.org>
5995
5996 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5997 * config.in: Regenerate.
5998 * configure: Regenerate.
5999 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6000 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6001 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6002 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6003 header.
6004 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6005 instead of <sys/wait.h> header.
6006 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6007
6008 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6009
6010 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6011 (various make rules): Remove -DGDBSERVER
6012
6013 2012-11-09 Yao Qi <yao@codesourcery.com>
6014
6015 * spu-low.c (current_ptid): Move it to ..
6016 * gdbthread.h: ... here. New.
6017 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6018 * server.c (myresume, process_serial_event): Likewise.
6019 * thread-db.c (thread_db_find_new_threads): Likewise.
6020 * tracepoint.c (run_inferior_command): Likewise.
6021
6022 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6023
6024 * server.c (handle_search_memory_1): Include access length in
6025 warning message.
6026
6027 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6028
6029 * linux-crisv32-low.c: Fix compile errors.
6030
6031 2012-09-04 Yao Qi <yao@codesourcery.com>
6032
6033 * tracepoint.c (cmd_qtsv): Adjust debug message.
6034 Don't check CUR_TPOINT.
6035
6036 2012-08-28 Yao Qi <yao@codesourcery.com>
6037
6038 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6039 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6040 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6041 Remove declarations of xmalloc, xreallloc, xstrdup and
6042 freeargv.
6043 * Makefile.in (libiberty_h): New.
6044 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6045 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6046
6047 2012-08-23 Yao Qi <yao@codesourcery.com>
6048
6049 * server.h: Remove declaration of 'xsnprintf'.
6050
6051 2012-08-22 Keith Seitz <keiths@redhat.com>
6052
6053 * server.h: Include build-gnulib-gbserver/config.h.
6054 * gdbreplay.c: Likewise.
6055
6056 2012-08-08 Doug Evans <dje@google.com>
6057
6058 * Makefile.in (SFILES): Add gdb_vecs.c.
6059 (OBS): Add gdb_vecs.o.
6060 (gdb_vecs_h, host_defs_h): New variables.
6061 (thread-db.o): Add $(gdb_vecs_h) dependency.
6062 (gdb_vecs.o): New rule.
6063 * thread-db.c: #include "gdb_vecs.h".
6064 (thread_db_load_search): Use a vector to iterate over path elements.
6065 Handle text appearing after "$pdir".
6066
6067 * configure.ac: Add check for strstr.
6068 * config.in: Regenerate.
6069 * configure: Regenerate.
6070
6071 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6072
6073 * hostio.c (handle_pread): If pread fails, fall back to attempting
6074 lseek/read.
6075 (handle_pwrite): Likewise for pwrite.
6076
6077 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6078
6079 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6080 between unsupported TYPE and unimplementable ADDR/LEN combination.
6081 (arm_insert_point): Act on new return value.
6082
6083 2012-07-31 Pedro Alves <palves@redhat.com>
6084
6085 * server.c (process_point_options): Only skip tokens if we find
6086 one that is unrecognized. Don't treat 'X' specially while
6087 skipping unrecognized tokens.
6088
6089 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6090
6091 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6092 to 4-byte-align HW breakpoint addresses for Thumb.
6093
6094 2012-07-27 Yao Qi <yao@codesourcery.com>
6095
6096 PR remote/14161.
6097
6098 * server.h: Declare gdb_agent_about_to_close.
6099 * target.c (kill_inferior): Include "agent.h".
6100 New. Send command 'kill'.
6101 * target.h (kill_inferior): Removed macro.
6102 * tracepoint.c (gdb_agent_about_to_close): New.
6103 (gdb_agent_helper_thread): Handle command 'close'.
6104 Wait endlessly until the inferior stops.
6105 Install gdb_agent_remove_socket to atexit hook.
6106 (agent_socket_name): New static variable.
6107 (gdb_agent_socket_init): Replace local variable 'name' with
6108 'agent_socket_name'.
6109 (gdb_agent_remove_socket): New.
6110
6111 2012-07-27 Yao Qi <yao@codesourcery.com>
6112
6113 * server.c (process_point_options): Stop at 'X' when parsing.
6114
6115 2012-07-19 Michael Eager <eager@eagercon.com>
6116
6117 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6118 to hw_execute.
6119 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6120 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6121 hardware breakpoint.
6122
6123 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6124
6125 * gdbserver/linux-low.c (initialize_low): Call
6126 linux_ptrace_init_warnings.
6127
6128 2012-07-02 Doug Evans <dje@google.com>
6129
6130 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6131 pointer to int.
6132
6133 2012-07-02 Stan Shebs <stan@codesourcery.com>
6134
6135 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6136 (ax.o): Add it to build rule.
6137 (ax-ipa.o): Ditto.
6138 (OBS): Add format.o.
6139 (IPA_OBS): Add format.o.
6140 * server.c (handle_query): Claim support for breakpoint commands.
6141 (process_point_options): Add command case.
6142 (process_serial_event): Leave running if there are printfs in
6143 effect.
6144 * mem-break.h (any_persistent_commands): Declare.
6145 (add_breakpoint_commands): Declare.
6146 (gdb_no_commands_at_breakpoint): Declare.
6147 (run_breakpoint_commands): Declare.
6148 * mem-break.c (struct point_command_list): New struct.
6149 (struct breakpoint): New field command_list.
6150 (any_persistent_commands): New function.
6151 (add_commands_to_breakpoint): New function.
6152 (add_breakpoint_commands): New function.
6153 (gdb_no_commands_at_breakpoint): New function.
6154 (run_breakpoint_commands): New function.
6155 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6156 locally.
6157 * ax.c: Include format.h.
6158 (ax_printf): New function.
6159 (gdb_eval_agent_expr): Add printf opcode.
6160
6161 2012-06-13 Yao Qi <yao@codesourcery.com>
6162
6163 * server.c (start_inferior): Remove duplicated writes to fields
6164 'last_resume_kind' and 'last_status' of 'current_inferior'.
6165
6166 2012-06-12 Yao Qi <yao@codesourcery.com>
6167 Pedro Alves <palves@redhat.com>
6168
6169 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6170 comment.
6171 * server.c (handle_v_cont): Extend comment.
6172
6173 2012-06-11 Yao Qi <yao@codesourcery.com>
6174
6175 * linux-low.c (linux_attach): Add 'static'.
6176
6177 2012-06-06 Yao Qi <yao@codesourcery.com>
6178
6179 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6180
6181 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6182
6183 Fix gcc -flto compilation warning.
6184 * server.c (main): Make variable multi_mode and attach volatile.
6185
6186 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6187
6188 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6189 if the platform doesn't know about it.
6190
6191 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6192
6193 * Makefile.in (SFILES): Add linux-tile-low.c.
6194 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6195 * configure.srv: Handle tilegx-*-linux*.
6196 * linux-tile-low.c: New file.
6197
6198 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6199
6200 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6201
6202 2012-05-24 Pedro Alves <palves@redhat.com>
6203
6204 PR gdb/7205
6205
6206 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6207
6208 2012-05-24 Pedro Alves <palves@redhat.com>
6209
6210 PR gdb/7205
6211
6212 Replace target_signal with gdb_signal throughout.
6213
6214 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6215
6216 * linux-low.c (linux_store_registers): Avoid the copying sequence
6217 when no data has been retrieved by ptrace.
6218
6219 2012-05-22 Will Deacon <will.deacon@arm.com>
6220
6221 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6222 Include asm/ptrace.h.
6223 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6224 already defined.
6225
6226 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6227
6228 * linux-low.c (linux_store_registers): Don't re-retrieve data
6229 with ptrace that has already been obtained from /proc. Always
6230 copy any data retrieved with ptrace to the buffer supplied.
6231
6232 2012-05-11 Yao Qi <yao@codesourcery.com>
6233 Pedro Alves <palves@redhat.com>
6234
6235 * linux-low.c (enum stopping_threads_kind): New.
6236 (stopping_threads): Change type to `enum stopping_threads_kind'.
6237 (handle_extended_wait): If stopping and suspending threads, leave
6238 the new_lwp suspended too.
6239 (linux_wait_for_event): Adjust.
6240 (stop_all_lwps): Set `stopping_threads' to
6241 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6242 whether we're suspending threads or just stopping them. Assert no
6243 recursion happens.
6244
6245 2012-04-29 Yao Qi <yao@codesourcery.com>
6246
6247 * server.h: Move some code to ...
6248 * gdbthread.h: ... here. New.
6249 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6250 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6251 (nto-low.o, win32-low.o): Likewise.
6252 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6253 * regcache.c, remote-utils.c, server.c: Likewise.
6254 * target.c, tracepoint.c, win32-low.c: Likewise.
6255
6256 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6257
6258 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6259 (PTRACE_ARG4_TYPE): Likewise.
6260 (PTRACE_XFER_TYPE): Likewise.
6261 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6262 ptrace to PTRACE_ARG3_TYPE.
6263 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6264 (PTRACE_ARG4_TYPE): Likewise.
6265 (PTRACE_XFER_TYPE): Likewise.
6266 (linux_detach_one_lwp): Cast fourth argument of
6267 ptrace to long then PTRACE_ARG4_TYPE.
6268 (regsets_fetch_inferior_registers): Cast third argument of
6269 ptrace to long then PTRACE_ARG3_TYPE.
6270 (regsets_store_inferior_registers): Likewise.
6271
6272 2012-04-20 Pedro Alves <palves@redhat.com>
6273
6274 * configure: Regenerate.
6275
6276 2012-04-19 Pedro Alves <palves@redhat.com>
6277
6278 * Makefile.in (GNULIB_BUILDDIR): New.
6279 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6280 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6281 (all, install-only, uninstall, clean-info, all-lib, clean): No
6282 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6283 (maintainer-clean realclean distclean): Use subdir_do.
6284 (subdir_do): New.
6285 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6286 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6287 * acinclude.m4: Include acx_configure_dir.m4.
6288 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6289 calls. Call AC_PROG_RANLIB. Configure gnulib using
6290 ACX_CONFIGURE_DIR.
6291 (GNULIB): New.
6292 (GNULIB_STDINT_H): Adjust.
6293 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6294 * gdbreplay.c: Include build-gnulib/config.h.
6295 * server.h: Likewise.
6296 * aclocal.m4: Regenerate.
6297 * config.in: Regenerate.
6298 * configure: Regenerate.
6299
6300 2012-04-19 Pedro Alves <palves@redhat.com>
6301
6302 * Makefile.in (LIBGNU, INCGNU): Adjust.
6303 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6304 (all, install-only, uninstall, clean-info, all-lib, clean)
6305 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6306 * configure.ac: Adjust AC_OUTPUT output.
6307 * aclocal.m4: Regenerate.
6308 * configure: Regenerate.
6309
6310 2012-04-19 Pedro Alves <palves@redhat.com>
6311
6312 * Makefile.in (generated_files): New.
6313 (server_h): Remove the explicit dependency on config.h, and depend
6314 on $generated_files.
6315
6316 2012-04-19 Pedro Alves <palves@redhat.com>
6317
6318 * Makefile.in (INCGNU): Add -Ignulib.
6319
6320 2012-04-19 Pedro Alves <palves@redhat.com>
6321
6322 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6323 (INCGNU): ... this, and spell out -I here.
6324 (GNULIB_LIB): Rename to ...
6325 (LIBGNU): ... this.
6326 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6327
6328 2012-04-19 Pedro Alves <palves@redhat.com>
6329
6330 * config.in: Regenerate.
6331
6332 2012-04-19 Pedro Alves <palves@redhat.com>
6333
6334 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6335 * server.h (memmem): Remove declaration.
6336 * config.in: Regenerate.
6337 * configure: Regenerate.
6338
6339 2012-04-19 Yao Qi <yao@codesourcery.com>
6340
6341 * Makefile.in (SFILES): Add common/vec.c.
6342 (OBS): Add vec.o.
6343 (vec.o): New rule.
6344
6345 2012-04-19 Yao Qi <yao@codesourcery.com>
6346
6347 * remote-utils.c (prepare_resume_reply): Replace with macro
6348 target_core_of_thread.
6349 * server.c (handle_qxfer_threads_proper): Likewise.
6350 * target.h (traget_core_of_thread): New macro.
6351
6352 2012-04-18 Pedro Alves <palves@redhat.com>
6353
6354 * aclocal.m4: Regenerate.
6355 * configure: Regenerate.
6356
6357 2012-04-16 Yao Qi <yao@codesourcery.com>
6358
6359 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6360 duplicated on address.
6361
6362 2012-04-16 Yao Qi <yao@codesourcery.com>
6363
6364 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6365 (struct tracepoint_action_ops) <send>: New field.
6366 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6367 (agent_expr_send, x_tracepoint_action_send): New.
6368 (l_tracepoint_action_send): New.
6369 (cmd_qtdp): Download and install tracepoint
6370 according to `use_agent'.
6371 (run_inferior_command): Add one more parameter `len'.
6372 Update callers.
6373 (tracepoint_send_agent): New.
6374 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6375
6376 2012-04-16 Yao Qi <yao@codesourcery.com>
6377
6378 * tracepoint.c (download_tracepoints): Moved to ...
6379 (cmd_qtstart): ... here.
6380
6381 2012-04-14 Yao Qi <yao@codesourcery.com>
6382
6383 * tracepoint.c: Include inttypes.h.
6384 (struct collect_memory_action): Use sized types.
6385 (struct tracepoint): Likewise.
6386 (cmd_qtdp, stop_tracing): Update print specifiers.
6387 (cmd_qtp, response_tracepoint): Likewise.
6388 (collect_data_at_tracepoint): Likewise.
6389 (collect_data_at_step): Likewise.
6390
6391 2012-04-14 Yao Qi <yao@codesourcery.com>
6392
6393 Import gnulib module inttypes.
6394 * aclocal.m4, config.in, configure: Regenerated.
6395
6396 2012-04-14 Yao Qi <yao@codesourcery.com>
6397
6398 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6399 Makefile and config.status at last.
6400
6401 2012-04-13 Yao Qi <yao@codesourcery.com>
6402
6403 * tracepoint.c: Include stdint.h unconditionally.
6404
6405 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6406
6407 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6408 on BFD_HAVE_SYS_PROCFS_TYPE.
6409 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6410 * configure: Regenerate.
6411 * config.in: Likewise.
6412
6413 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6414
6415 * Makefile.in (clean): Also remove x32.c x32-linux.c
6416 x32-avx.c x32-avx-linux.c.
6417 (x32.o): New target.
6418 (x32.c): Likewise.
6419 (x32-linux.o): Likewise.
6420 (x32-linux.c): Likewise.
6421 (x32-avx.o): Likewise.
6422 (x32-avx.c): Likewise.
6423 (x32-avx-linux.o): Likewise.
6424 (x32-avx-linux.c): Likewise.
6425
6426 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6427 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6428 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6429 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6430 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6431 i386/x32-avx-linux.xml.
6432
6433 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6434 (init_registers_x32_avx_linux): Likwise.
6435 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6436 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6437
6438 2012-04-13 Pedro Alves <palves@redhat.com>
6439
6440 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6441 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6442 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6443 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6444 the sub-make.
6445
6446 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6447
6448 * linux-x86-low.c (compat_x32_clock_t): New.
6449 (compat_x32_siginfo_t): Likewise.
6450 (compat_x32_siginfo_from_siginfo): Likewise.
6451 (siginfo_from_compat_x32_siginfo): Likewise.
6452 (linux_is_elf64): Likewise.
6453 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6454 and siginfo_from_compat_x32_siginfo for x32.
6455 (x86_arch_setup): Set linux_is_elf64.
6456
6457 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6458
6459 PR gdb/13969
6460 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6461 e_machine field.
6462 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6463 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6464 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6465 compatible with process.
6466
6467 2012-04-12 Yao Qi <yao@codesourcery.com>
6468
6469 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6470 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6471 (install-only, install-info, clean): Handle sub dir gnulib.
6472 (all-lib, am--refresh): New targets.
6473 (memmem.o): Remove target.
6474 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6475 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6476 (AC_REPLACE_FUNCS): Remove memmem.
6477 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6478 (AC_OUTPUT): Generate Makefile in gnulib/.
6479 * aclocal.m4, config.in, configure: Regenerated.
6480
6481 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6482
6483 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6484
6485 2012-04-05 Pedro Alves <palves@redhat.com>
6486
6487 -Werror=strict-aliasing
6488
6489 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6490 pointer.
6491
6492 2012-04-04 Pedro Alves <palves@redhat.com>
6493
6494 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6495 (sparc_store_gregset_from_stack, sparc_store_gregset)
6496 (sparc_breakpoint_at): Fix formatting.
6497
6498 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6499
6500 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6501 are available.
6502 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6503 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6504 * config.in: Regenerate.
6505 * configure: Likewise.
6506
6507 2012-03-29 Pedro Alves <palves@redhat.com>
6508
6509 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6510 Correct ptrace arguments.
6511
6512 2012-03-28 Pedro Alves <palves@redhat.com>
6513
6514 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6515 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6516 (IA64_FR1_REGNUM): New defines.
6517 (ia64_fetch_register): New.
6518 (the_low_target): Install it.
6519 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6520 field.
6521 * linux-low.c (linux_fetch_registers): Try the
6522 the_low_target.fetch_register hook first.
6523
6524 * linux-arm-low.c (the_low_target): Adjust.
6525 * linux-bfin-low.c (the_low_target): Adjust.
6526 * linux-cris-low.c (the_low_target): Adjust.
6527 * linux-crisv32-low.c (the_low_target): Adjust.
6528 * linux-m32r-low.c (the_low_target): Adjust.
6529 * linux-m68k-low.c (the_low_target): Adjust.
6530 * linux-mips-low.c (the_low_target): Adjust.
6531 * linux-ppc-low.c (the_low_target): Adjust.
6532 * linux-s390-low.c (the_low_target): Adjust.
6533 * linux-sh-low.c (the_low_target): Adjust.
6534 * linux-sparc-low.c (the_low_target): Adjust.
6535 * linux-tic6x-low.c (the_low_target): Adjust.
6536 * linux-x86-low.c (the_low_target): Adjust.
6537 * linux-xtensa-low.c (the_low_target): Adjust.
6538
6539 2012-03-26 Pedro Alves <palves@redhat.com>
6540
6541 * server.c (handle_qxfer_libraries): Don't bail early if
6542 the_target->qxfer_libraries_svr4 is not NULL.
6543
6544 2012-03-26 Pedro Alves <palves@redhat.com>
6545
6546 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6547
6548 2012-03-23 Pedro Alves <palves@redhat.com>
6549
6550 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6551 "library-list-svr4" element's start tag when the the DSO list is
6552 empty.
6553
6554 2012-03-23 Pedro Alves <palves@redhat.com>
6555
6556 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6557 a variable whose type size is the same as the inferior's pointer
6558 size.
6559
6560 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6561
6562 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6563 struct siginfo.
6564 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6565 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6566 * linux-low.h: Include <signal.h>.
6567 (struct siginfo): Remove forward declaration.
6568 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6569 struct siginfo.
6570
6571 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6572
6573 * .gitignore: Ignore more files.
6574
6575 2012-03-19 Pedro Alves <palves@redhat.com>
6576 Jan Kratochvil <jan.kratochvil@redhat.com>
6577
6578 * server.c (cont_thread, general_thread): Add describing comments.
6579 (start_inferior): Clear `cont_thread'.
6580 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6581 of a process.
6582
6583 2012-03-15 Yao Qi <yao@codesourcery.com>
6584
6585 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6586 handling to ...
6587 (cmd_qtdp): ... here.
6588
6589 2012-03-15 Yao Qi <yao@codesourcery.com>
6590
6591 * tracepoint.c (struct tracepoint_action_ops): New.
6592 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6593 (m_tracepoint_action_download): New.
6594 (r_tracepoint_action_download): New.
6595 (x_tracepoint_action_download): New.
6596 (l_tracepoint_action_download): New.
6597 (add_tracepoint_action): Install `action->ops' according type.
6598 (download_tracepoint_1): Move code `download' function pointer
6599 of various tracepoint_action_ops.
6600
6601 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6602
6603 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6604 linux_ptrace_attach_warnings.
6605
6606 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6607
6608 * Makefile.in (linux-ptrace.o): New.
6609 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6610 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6611 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6612 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6613 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6614 of these targets.
6615 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6616
6617 2012-03-08 Yao Qi <yao@codesourcery.com>
6618 Pedro Alves <palves@redhat.com>
6619
6620 Fix PR server/13392.
6621 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6622 offset of JMP insn.
6623 * tracepoint.c (remove_tracepoint): New.
6624 (cmd_qtdp): Call remove_tracepoint when failed to install.
6625
6626 2012-03-07 Pedro Alves <palves@redhat.com>
6627
6628 * linux-low.c (get_detach_signal): New.
6629 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6630 Pass on pending signals to PTRACE_DETACH. Check the result of the
6631 ptrace call.
6632 * server.c (program_signals, program_signals_p): New.
6633 (handle_general_set): Handle QProgramSignals.
6634 * server.h (program_signals, program_signals_p): Declare.
6635
6636 2012-03-05 Pedro Alves <palves@redhat.com>
6637 Jan Kratochvil <jan.kratochvil@redhat.com>
6638
6639 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6640 New comment why.
6641
6642 2012-03-03 Yao Qi <yao@codesourcery.com>
6643
6644 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6645 agent_look_up_symbols.
6646
6647 2012-03-03 Yao Qi <yao@codesourcery.com>
6648
6649 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6650 (linux-x86-low.o): Likewise.
6651 * server.h: Remove in_process_agent_loaded.
6652 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6653 common/agent.c.
6654 Update callers.
6655
6656 2012-03-03 Yao Qi <yao@codesourcery.com>
6657
6658 * tracepoint.c (gdb_agent_capability): New global.
6659 (in_process_agent_loaded_ust): Renamed to
6660 `in_process_agent_supports_ust'.
6661 Update callers.
6662 (in_process_agent_supports_ust): Call agent_capability_check.
6663 (clear_installed_tracepoints): Assert that agent supports
6664 agent.
6665
6666 2012-03-03 Yao Qi <yao@codesourcery.com>
6667
6668 * linux-low.c (linux_supports_agent): New.
6669 (linux_target_ops): Initialize field `supports_agent' with
6670 linux_supports_agent.
6671 * target.h (struct target_ops) <supports_agent>: New.
6672 (target_supports_agent): New macro.
6673 * server.c (handle_general_set): Handle packet 'QAgent'.
6674 (handle_query): Send `QAgent+'.
6675 * Makefile.in (server.o): Depends on agent.h.
6676
6677 2012-03-03 Yao Qi <yao@codesourcery.com>
6678
6679 * Makefile.in (OBS): Add agent.o.
6680 Add new rule for agent.o.
6681 Track dependence of tracepoint.c on agent.h.
6682 * tracepoint.c (run_inferior_command_1):
6683 (run_inferior_command): Call agent_run_command.
6684 (gdb_ust_connect_sync_socket): Deleted. Move it to
6685 common/agent.c.
6686 (resume_thread, stop_thread): Likewise.
6687 (gdb_ust_socket_init): Renamed to ...
6688 (gdb_agent_socket_init): ... New.
6689 (gdb_ust_thread): Renamed to ...
6690 (gdb_agent_helper_thread): ... New.
6691 (gdb_ust_init): Move some code to ...
6692 (gdb_agent_init): ... here. New.
6693 [HAVE_UST]: Call gdb_ust_init.
6694 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6695 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6696 * config.in, configure: Regenerated.
6697
6698 2012-03-02 Pedro Alves <palves@redhat.com>
6699
6700 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6701 * linux-low.c (struct simple_pid_list): New.
6702 (stopped_pids): New a struct simple_pid_list pointer.
6703 (add_to_pid_list, pull_pid_from_list): New.
6704 (handle_extended_wait): Don't assume the first signal new children
6705 report is SIGSTOP. Adjust call to pull_pid_from_list.
6706 (linux_wait_for_lwp): Adjust.
6707
6708 2012-03-02 Yao Qi <yao@codesourcery.com>
6709
6710 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6711 debug log.
6712
6713 2012-03-02 Yao Qi <yao@codesourcery.com>
6714
6715 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6716 `stop_pc' and `tpoint'. Update caller.
6717
6718 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6719
6720 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6721 * linux-low.c (use_linux_regsets): New macro.
6722 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6723 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6724 (linux_register_in_regsets): New function.
6725 (usr_fetch_inferior_registers): Skip registers covered by
6726 regsets.
6727 (usr_store_inferior_registers): Likewise.
6728 (usr_fetch_inferior_registers): New macro.
6729 (usr_store_inferior_registers): Likewise.
6730 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6731 (linux_store_registers): Likewise.
6732 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6733 prototype.
6734 (init_registers_mips64_dsp_linux): Likewise.
6735 (init_registers_mips_linux): New macro.
6736 (init_registers_mips_dsp_linux): Likewise.
6737 (mips_dsp_num_regs): Likewise.
6738 (DSP_BASE, DSP_CONTROL): New fallback macros.
6739 (mips_base_regs): New macro.
6740 (mips_regmap): Use it. Fix the size.
6741 (mips_dsp_regmap): New variable.
6742 (mips_dsp_regset_bitmap): Likewise.
6743 (mips_arch_setup): New function.
6744 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6745 than mips_regmap.
6746 (mips_cannot_store_register): Likewise.
6747 (the_low_target): Update .arch_setup, .num_regs and .regmap
6748 initializers. Add .regset_bitmap initializer.
6749 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6750 initializer.
6751 * linux-bfin-low.c (the_low_target): Likewise.
6752 * linux-cris-low.c (the_low_target): Likewise.
6753 * linux-crisv32-low.c (the_low_target): Likewise.
6754 * linux-ia64-low.c (the_low_target): Likewise.
6755 * linux-m32r-low.c (the_low_target): Likewise.
6756 * linux-m68k-low.c (the_low_target): Likewise.
6757 * linux-ppc-low.c (the_low_target): Likewise.
6758 * linux-s390-low.c (the_low_target): Likewise.
6759 * linux-sh-low.c (the_low_target): Likewise.
6760 * linux-sparc-low.c (the_low_target): Likewise.
6761 * linux-tic6x-low.c (the_low_target): Likewise.
6762 * linux-x86-low.c (the_low_target): Likewise.
6763 * linux-xtensa-low.c (the_low_target): Likewise.
6764 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6765 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6766 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6767 srv_xmlfiles.
6768 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6769 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6770
6771 2012-02-29 Yao Qi <yao@codesourcery.com>
6772 Pedro Alves <palves@redhat.com>
6773
6774 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6775 `step_over_finished' is true.
6776
6777 2012-02-27 Pedro Alves <palves@redhat.com>
6778
6779 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6780 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6781
6782 2012-02-27 Pedro Alves <palves@redhat.com>
6783
6784 PR server/9684
6785 * linux-low.c (pid_is_stopped): New.
6786 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6787
6788 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6789
6790 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6791 of conditions.
6792
6793 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6794
6795 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6796
6797 2012-02-24 Luis Machado <lgustavo@codesourcery>
6798
6799 * server.c (handle_query): Advertise support for target-side
6800 breakpoint condition evaluation.
6801 (process_point_options): New function.
6802 (process_serial_event): When inserting a breakpoint, check for
6803 a target-side condition that should be evaluated.
6804
6805 * mem-break.c: Include regcache.h and ax.h.
6806 (point_cond_list_t): New data structure.
6807 (breakpoint) <cond_list>: New field.
6808 (find_gdb_breakpoint_at): Make non-static.
6809 (delete_gdb_breakpoint_at): Clear any target-side
6810 conditions.
6811 (clear_gdb_breakpoint_conditions): New function.
6812 (add_condition_to_breakpoint): Likewise.
6813 (add_breakpoint_condition): Likewise.
6814 (gdb_condition_true_at_breakpoint): Likewise.
6815 (gdb_breakpoint_here): Return result directly instead
6816 of going through a local variable.
6817
6818 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6819 (clear_gdb_breakpoint_conditions): Likewise.
6820 (add_breakpoint_condition): Likewise.
6821 (gdb_condition_true_at_breakpoint): Likewise.
6822
6823 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6824 (need_step_over_p): Take target-side breakpoint condition into
6825 consideration.
6826
6827 2012-02-24 Luis Machado <lgustavo@codesourcery>
6828
6829 * server.h: Include tracepoint.h.
6830 (agent_mem_read, agent_get_trace_state_variable_value,
6831 agent_set_trace_state_variable_value,
6832 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6833 get_set_tsv_func_addr): New prototypes.
6834
6835 * ax.h: New include file.
6836 * ax.c: New source file.
6837
6838 * tracepoint.c: Include ax.h.
6839 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6840 agent_expr, eval_result_type): Move to ax.h.
6841 (parse_agent_expr): Rename to ...
6842 (gdb_parse_agent_expr): ... this, make it non-static and move
6843 to ax.h.
6844 (unparse_agent_expr) Rename to ...
6845 (gdb_unparse_agent_expr): ... this, make it non-static and move
6846 to ax.h.
6847 (eval_agent_expr): Rename to ...
6848 (eval_tracepoint_agent_expr): ... this.
6849 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6850 forward declarations.
6851 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6852 (agent_get_trace_state_variable_value): New function.
6853 (agent_set_trace_state_variable_value): New function.
6854 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6855 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6856 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6857 (condition_true_at_tracepoint): Likewise.
6858 (parse_agent_expr): Rename to ...
6859 (gdb_parse_agent_expr): ... this and move to ax.c.
6860 (unparse_agent_expr): Rename to ...
6861 (gdb_unparse_agent_expr): ... this and move to ax.c.
6862 (gdb_agent_op_name): Move to ax.c.
6863 (eval_agent_expr): Rename to ...
6864 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6865 and move to ax.c.
6866 (eval_tracepoint_agent_expr): New function.
6867 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6868 non-static.
6869 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6870 ax.c.
6871 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6872 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6873 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6874 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6875 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6876 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6877 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6878 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6879 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6880 (compile_bytecodes): Remove forward declaration.
6881 (is_goto_target): Move to ax.c.
6882 (compile_bytecodes): Move to ax.c and call
6883 agent_get_trace_state_variable_value (...) and
6884 agent_set_trace_state_variable_value (...).
6885
6886 * Makefile.in: Update ax.c and IPA dependencies.
6887
6888 2012-02-24 Pedro Alves <palves@redhat.com>
6889
6890 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6891 (cmd_bigqtbuffer_circular): ... this. Only handle
6892 'QTBuffer:circular:'.
6893 (handle_tracepoint_general_set): Adjust.
6894
6895 2012-02-16 Yao Qi <yao@codesourcery.com>
6896
6897 * inferiors.c: Move code to ...
6898 * dll.c: .... here. New.
6899 * server.h: Declare clear_dlls.
6900 * Makefile.in (SFILES): Add dll.c.
6901 (OBS): Add dll.o
6902 (dll.o): New rule.
6903
6904 2012-02-11 Yao Qi <yao@codesourcery.com>
6905
6906 * server.c: (handle_monitor_command): Add a new parameter
6907 `own_buf'.
6908 (handle_query): Update caller.
6909
6910 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6911
6912 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6913 * configure, config.in: Regenerate.
6914 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6915 is not defined.
6916
6917 2012-02-02 Pedro Alves <palves@redhat.com>
6918
6919 Try SIGKILL first, then PTRACE_KILL.
6920 * linux-low.c (linux_kill_one_lwp): New.
6921 (linux_kill_one_lwp): Rename to ...
6922 (kill_one_lwp_callback): ... this. Use the new
6923 linux_kill_one_lwp.
6924
6925 2012-02-02 Pedro Alves <palves@redhat.com>
6926
6927 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6928 inferior.
6929
6930 2012-01-27 Pedro Alves <palves@redhat.com>
6931
6932 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6933 (elf_64_file_p): Make static.
6934 (linux_pid_exe_is_elf_64_file): New.
6935 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6936 Delete declarations.
6937 (linux_pid_exe_is_elf_64_file): Declare.
6938 * linux-x86-low.c (x86_arch_setup): Use
6939 linux_pid_exe_is_elf_64_file.
6940
6941 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6942
6943 * linux-low.c (linux_wait_for_event_1): Rename to ...
6944 (linux_wait_for_event): ... here and merge it with former
6945 linux_wait_for_event - new variable wait_ptid, use it.
6946 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6947
6948 2012-01-23 Pedro Alves <palves@redhat.com>
6949
6950 * server.c (main): Avoid yet another case of infinite loop while
6951 detaching/killing after a longjmp.
6952
6953 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6954
6955 Code cleanup.
6956 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6957
6958 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6959
6960 * hostio.c (handle_readlink): New function.
6961 (handle_vFile): Call it to handle "vFile:readlink" packets.
6962
6963 2012-01-20 Pedro Alves <palves@redhat.com>
6964 Ulrich Weigand <ulrich.weigand@linaro.org>
6965
6966 * server.c (handle_v_requests): Only support vAttach and vRun to
6967 start multiple processes when in extended protocol mode.
6968
6969 2012-01-17 Pedro Alves <palves@redhat.com>
6970
6971 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6972 memalign plus mprotect to allocate the scratch buffer.
6973
6974 2012-01-13 Pedro Alves <palves@redhat.com>
6975
6976 * server.c (attach_inferior): Clear `cont_thread'.
6977
6978 2012-01-13 Pedro Alves <palves@redhat.com>
6979
6980 * server.c (main): Avoid infinite loop while detaching/killing
6981 after a longjmp.
6982
6983 2012-01-09 Doug Evans <dje@google.com>
6984
6985 * server.c (start_inferior): Set last_ptid in --wrapper case.
6986
6987 2012-01-06 Yao Qi <yao@codesourcery.com>
6988
6989 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6990 defined.
6991 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6992
6993 2012-01-04 Yao Qi <yao@codesourcery.com>
6994
6995 * tracepoint.c (cmd_qtdp): Print debug message
6996 for static tracepoint.
6997
6998 2012-01-04 Yao Qi <yao@codesourcery.com>
6999
7000 * tracepoint.c (trace_vdebug): Differentiate debug message
7001 between gdbserver and IPA.
7002
7003 2012-01-03 Yao Qi <yao@codesourcery.com>
7004
7005 * tracepoint.c (tracepoint_was_hit): Don't collect for
7006 static tracepoint.
7007
7008 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7009
7010 * terminal.h: Reformat copyright header.
7011
7012 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7013
7014 * server.c (gdbserver_version): Update copyright year.
7015 * gdbreplay.c (gdbreplay_version): Likewise.
7016
7017 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7018
7019 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7020
7021 Revert:
7022 2011-12-18 Hui Zhu <teawater@gmail.com>
7023 * linux-low.c (linux_create_inferior): Save return value to ret.
7024
7025 2011-12-18 Hui Zhu <teawater@gmail.com>
7026
7027 * linux-low.c (linux_create_inferior): Save return value to ret.
7028
7029 2011-12-16 Doug Evans <dje@google.com>
7030
7031 * linux-low.c (linux_create_inferior): If stdio connection,
7032 redirect stdin from /dev/null, stdout to stderr.
7033 * remote-utils.c (remote_is_stdio): New static global.
7034 (remote_connection_is_stdio): New function.
7035 (remote_prepare): Handle stdio connection.
7036 (remote_open): Ditto.
7037 (remote_close): Don't close stdin for stdio connections.
7038 (read_prim,write_prim): New functions. Replace all calls to
7039 read/write to these.
7040 * server.c (main): Watch for "-" argument. Move call to
7041 remote_prepare before start_inferior.
7042 * server.h (STDIO_CONNECTION_NAME): New macro.
7043 (remote_connection_is_stdio): Declare.
7044
7045 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7046 in debugging output.
7047
7048 2011-12-15 Yao Qi <yao@codesourcery.com>
7049
7050 * tracepoint.c: Include sys/syscall.h.
7051 (gdb_ust_thread): Remove preprocessor conditional.
7052
7053 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7054
7055 * linux-low.c (linux_detach_one_lwp): Call
7056 the_low_target.prepare_to_resume before detaching.
7057
7058 2011-12-14 Yao Qi <yao@codesourcery.com>
7059
7060 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7061 of write.
7062
7063 2011-12-14 Yao Qi <yao@codesourcery.com>
7064
7065 * i386-low.c (i386_low_stopped_data_address): Initialize local
7066 variable `control'.
7067
7068 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7069
7070 PR remote/13492
7071
7072 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7073 DR_CONTROL unless necessary. Extend comments.
7074 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7075 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7076
7077 2011-12-13 Yao Qi <yao@codesourcery.com>
7078
7079 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7080 macros.
7081 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7082
7083 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7084
7085 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7086 Print new debug message for such case.
7087
7088 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7089
7090 Fix overlapping memcpy.
7091 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7092 the read_inferior_memory transfer.
7093 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7094 write_inferior_memory transfer.
7095 (set_fast_tracepoint_jump): New variable buf. Use it for the
7096 read_inferior_memory and write_inferior_memory transfers.
7097 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7098 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7099 Use it for the write_inferior_memory transfer.
7100 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7101 buffers.
7102
7103 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7104
7105 * linux-low.c (fetch_register, store_register): Make code
7106 consistent, fix formatting.
7107
7108 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7109
7110 * linux-low.c (usr_store_inferior_registers): Factor out code
7111 to handle individual registers into...
7112 (store_register): ... this new function.
7113
7114 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7115
7116 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7117 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7118 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7119 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7120 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7121 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7122 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7123 (srv_xmlfiles): Add new XML files.
7124
7125 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7126 and <sys/uio.h>.
7127 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7128 (init_registers_s390_linux32v1): Add prototype.
7129 (init_registers_s390_linux32v2): Likewise.
7130 (init_registers_s390_linux64v1): Likewise.
7131 (init_registers_s390_linux64v2): Likewise.
7132 (init_registers_s390x_linux64v1): Likewise.
7133 (init_registers_s390x_linux64v2): Likewise.
7134 (s390_num_regs): Increment to 52.
7135 (s390_regmap): Add orig_r2 register.
7136 (s390_num_regs_3264): Increment to 68.
7137 (s390_regmap_3264): Add orig_r2 register.
7138 (s390_collect_ptrace_register): Handle orig_r2 register.
7139 (s390_supply_ptrace_register): Likewise.
7140 (s390_fill_last_break): New function.
7141 (s390_store_last_break): Likewise.
7142 (s390_fill_system_call): New function.
7143 (s390_store_system_call): Likewise.
7144 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7145 register sets.
7146 (s390_check_regset): New function.
7147 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7148 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7149 Update target_regsets for available register sets.
7150
7151 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7152 Jan Kratochvil <jan.kratochvil@redhat.com>
7153
7154 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7155 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7156 New.
7157 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7158 * linux-low.h (struct process_info_private): New member r_debug.
7159 * server.c (handle_qxfer_libraries): Call
7160 the_target->qxfer_libraries_svr4.
7161 (handle_qxfer_libraries_svr4): New function.
7162 (qxfer_packets): New entry "libraries-svr4".
7163 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7164 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7165 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7166 PACKET_qXfer_libraries_svr4.
7167
7168 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7169
7170 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7171 PSW address/mask between 8-byte and 16-byte formats.
7172 (s390_supply_ptrace_register): Likewise.
7173 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7174 basic addressing mode bit.
7175
7176 2011-11-24 Stan Shebs <stan@codesourcery.com>
7177
7178 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7179
7180 2011-11-17 Stan Shebs <stan@codesourcery.com>
7181
7182 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7183 (tracing_start_time): New global.
7184 (tracing_stop_time): New global.
7185 (tracing_user_name): New global.
7186 (tracing_notes): New global.
7187 (tracing_stop_note): New global.
7188 (cmd_qtstart): Set traceframe_usage, start_time.
7189 (stop_tracing): Set stop_time.
7190 (cmd_qtstatus): Report additional status.
7191 (cmd_qtp): New function.
7192 (handle_tracepoint_query): Call it.
7193 (cmd_qtnotes): New function.
7194 (handle_tracepoint_general_set): Call it.
7195 (get_timestamp): Rename from tsv_get_timestamp.
7196
7197 2011-11-14 Stan Shebs <stan@codesourcery.com>
7198 Kwok Cheung Yeung <kcy@codesourcery.com>
7199
7200 * linux-x86-low.c (small_jump_insn): New.
7201 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7202 trampoline and error message, build a trampoline and issue a small
7203 jump instruction to it.
7204 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7205 trampoline and error message.
7206 (x86_get_min_fast_tracepoint_insn_len): New.
7207 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7208 * linux-low.h (struct linux_target_ops): Add arguments to
7209 install_fast_tracepoint_jump_pad operation, add new operation.
7210 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7211 arguments.
7212 (linux_get_min_fast_tracepoint_insn_len): New function.
7213 (linux_target_op): Add new operation.
7214 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7215 (gdb_trampoline_buffer_end): Ditto.
7216 (gdb_trampoline_buffer_error): Ditto.
7217 (struct ipa_sym_addresses): Add fields for new IPA variables.
7218 (symbol_list): Add entries for new IPA variables.
7219 (struct tracepoint): Add fields to hold the address range of the
7220 trampoline used by the tracepoint.
7221 (trampoline_buffer_head): New static variable.
7222 (trampoline_buffer_tail): Ditto.
7223 (claim_trampoline_space): New function.
7224 (have_fast_tracepoint_trampoline_buffer): New function.
7225 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7226 structure.
7227 (install_fast_tracepoint): Ditto, also add error buffer argument.
7228 (cmd_qtminftpilen): New function.
7229 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7230 (fast_tracepoint_from_trampoline_address): New function.
7231 (fast_tracepoint_collecting): Handle trampoline as part of jump
7232 pad space.
7233 (set_trampoline_buffer_space): New function.
7234 (initialize_tracepoint): Initialize new IPA variables.
7235 * target.h (struct target_ops): Add arguments to
7236 install_fast_tracepoint_jump_pad operation, add new
7237 get_min_fast_tracepoint_insn_len operation.
7238 (target_get_min_fast_tracepoint_insn_len): New.
7239 (install_fast_tracepoint_jump_pad): Add arguments.
7240 * server.h (IPA_BUFSIZ): Define.
7241 * linux-i386-ipa.c: Include extra header files.
7242 (initialize_fast_tracepoint_trampoline_buffer): New function.
7243 (initialize_low_tracepoint): Call it.
7244 * server.h (set_trampoline_buffer_space): Declare.
7245 (claim_trampoline_space): Ditto.
7246 (have_fast_tracepoint_trampoline_buffer): Ditto.
7247
7248 2011-11-14 Yao Qi <yao@codesourcery.com>
7249
7250 * server.c (handle_query): Handle InstallInTrace for qSupported.
7251 * tracepoint.c (add_tracepoint): Sort list.
7252 (install_tracepoint, download_tracepoint): New.
7253 (cmd_qtdp): Call them to install and download tracepoints.
7254 (sort_tracepoints): Removed.
7255 (cmd_qtstart): Update.
7256
7257 2011-11-14 Yao Qi <yao@codesourcery.com>
7258
7259 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7260 * mem-break.h: Declare.
7261 * tracepoint.c (cmd_qtstart): Move some code to ...
7262 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7263 New.
7264 (download_tracepoints): Move some code to ...
7265 (download_tracepoint_1): ... here. New.
7266
7267 2011-11-08 Yao Qi <yao@codesourcery.com>
7268
7269 * remote-utils.c (relocate_instruction): A comment fix.
7270
7271 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7272
7273 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7274 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7275 dr_status_mirror and dr_control_mirror from debug_reg_state.
7276 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7277 (i386_initial_stuff): Remove use of deleted globals.
7278 (i386_get_thread_context, i386_set_thread_context,
7279 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7280 from debug_reg_state.
7281
7282 2011-11-05 Yao Qi <yao@codesourcery.com>
7283
7284 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7285 address as TPOINT's.
7286
7287 2011-11-02 Stan Shebs <stan@codesourcery.com>
7288
7289 * tracepoint.c (agent_mem_read_string): New function.
7290 (eval_agent_expr): Call it for tracenz.
7291 * server.c (handle_query): Report support for tracenz.
7292
7293 2011-11-02 Yao Qi <yao@codesourcery.com>
7294
7295 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7296
7297 2011-11-02 Yao Qi <yao@codesourcery.com>
7298
7299 * target.h: Fix a typo in comment.
7300
7301 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7302
7303 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7304 clobber the breakpoints' shadows with fast tracepoint jumps.
7305 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7306 * target.c (write_inferior_memory): Also pass MYADDR down to
7307 check_mem_write.
7308
7309 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7310
7311 * configure.ac: Check support for personality routine.
7312 * configure: Regenerate.
7313 * config.in: Likewise.
7314 * linux-low.c: Include <sys/personality.h>.
7315 Define ADDR_NO_RANDOMIZE if necessary.
7316 (linux_create_inferior): Disable address space randomization when
7317 forking inferior, if requested.
7318 (linux_supports_disable_randomization): New function.
7319 (linux_target_ops): Install it.
7320 * server.h (disable_randomization): Declare.
7321 * server.c (disable_randomization): New global variable.
7322 (handle_general_set): Handle QDisableRandomization.
7323 (handle_query): Likewise for qSupported.
7324 (main): Support --disable-randomization and --no-disable-randomization
7325 command line arguments.
7326 * target.h (struct target_ops): Add supports_disable_randomization.
7327 (target_supports_disable_randomization): New macro.
7328
7329 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7330
7331 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7332 ifdef check.
7333 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7334 [!PT_GETDSBT] (target_loadmap): New definition.
7335 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7336 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7337 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7338 and PT_GETDSBT to LINUX_LOADMAP.
7339 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7340 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7341
7342 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7343
7344 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7345 (arm_linux_hwbp_cap): New static variable.
7346 (arm_linux_get_hwbp_cap): Replace by ...
7347 (arm_linux_init_hwbp_cap): ... this new function.
7348 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7349 (arm_linux_get_hw_watchpoint_count): Likewise.
7350 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7351 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7352 (arm_prepare_to_resume): Use perror_with_name instead of error.
7353
7354 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7355
7356 * linux-arm-low.c: Include <signal.h>.
7357 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7358 (struct arm_linux_hwbp_cap): New data type.
7359 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7360 (struct arm_linux_hw_breakpoint): New data type.
7361 (MAX_BPTS, MAX_WPTS): Define.
7362 (struct arch_process_info, struct arch_lwp_info): New data types.
7363 (arm_linux_get_hwbp_cap): New function.
7364 (arm_linux_get_hw_breakpoint_count): Likewise.
7365 (arm_linux_get_hw_watchpoint_count): Likewise.
7366 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7367 (arm_hwbp_control_initialize): Likewise.
7368 (arm_hwbp_control_is_enabled): Likewise.
7369 (arm_hwbp_control_is_initialized): Likewise.
7370 (arm_hwbp_control_disable): Likewise.
7371 (arm_linux_hw_breakpoint_equal): Likewise.
7372 (arm_linux_hw_point_initialize): Likewise.
7373 (struct update_registers_data): New data structure.
7374 (update_registers_callback: New function.
7375 (arm_insert_point): Likewise.
7376 (arm_remove_point): Likewise.
7377 (arm_stopped_by_watchpoint): Likewise.
7378 (arm_stopped_data_address): Likewise.
7379 (arm_new_process): Likewise.
7380 (arm_new_thread): Likewise.
7381 (arm_prepare_to_resume): Likewise.
7382 (the_low_target): Register arm_insert_point, arm_remove_point,
7383 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7384 arm_new_thread, and arm_prepare_to_resume.
7385
7386 2011-09-15 Stan Shebs <stan@codesourcery.com>
7387
7388 * server.h (struct emit_ops): Add compare-goto fields.
7389 * tracepoint.c (gdb_agent_op_sizes): New table.
7390 (emit_eq_goto): New function.
7391 (emit_ne_goto): New function.
7392 (emit_lt_goto): New function.
7393 (emit_le_goto): New function.
7394 (emit_gt_goto): New function.
7395 (emit_ge_goto): New function.
7396 (is_goto_target): New function.
7397 (compile_bytecodes): Recognize special cases of compare-goto
7398 combinations and call specialized emitters for them.
7399 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7400 (amd64_emit_ne_goto): New function.
7401 (amd64_emit_lt_goto): New function.
7402 (amd64_emit_le_goto): New function.
7403 (amd64_emit_gt_goto): New function.
7404 (amd64_emit_ge_goto): New function.
7405 (amd64_emit_ops): Add the new functions.
7406 (i386_emit_eq_goto): New function.
7407 (i386_emit_ne_goto): New function.
7408 (i386_emit_lt_goto): New function.
7409 (i386_emit_le_goto): New function.
7410 (i386_emit_gt_goto): New function.
7411 (i386_emit_ge_goto): New function.
7412 (i386_emit_ops): Add the new functions.
7413
7414 2011-09-08 Stan Shebs <stan@codesourcery.com>
7415
7416 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7417 (i386_emit_epilogue): Restore %ebx.
7418
7419 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7420
7421 * server.c (step_thread): Remove definition.
7422 (process_serial_event): Don't handle Hs.
7423 * server.h (step_thread): Remove declaration.
7424 * target.c (set_desired_inferior): Remove use of step_thread.
7425
7426 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7427
7428 * linux-low.c: Include linux-procfs.h.
7429 (linux_attach_lwp_1): Update comments.
7430 (linux_attach): Scan for existing threads when attaching to a
7431 process that is the tgid.
7432 * Makefile.in: Update dependencies.
7433
7434 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7435
7436 * configure.srv: Add linux-procfs.o dependencies.
7437
7438 2011-08-14 Yao Qi <yao@codesourcery.com>
7439
7440 * target.h (struct target_ops): Fix indent.
7441 * win32-low.c (win32_target_ops): Fix comment.
7442
7443 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7444 Yao Qi <yao@codesourcery.com>
7445
7446 * Makefile.in (clean): Remove tic6x-*.c files.
7447 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7448 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7449 (tic6x-c64xp-linux.c): Likewise.
7450 * configure.srv: Add support for tic6x-*-uclinux.
7451 * linux-tic6x-low.c: New.
7452 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7453
7454 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7455 Yao Qi <yao@codesourcery.com>
7456
7457 * target.h (struct target_ops): Add read_loadmap.
7458 * linux-low.c (struct target_loadseg): New type.
7459 (struct target_loadmap): New type.
7460 (linux_read_loadmap): New function.
7461 (linux_target_ops): Add linux_read_loadmap.
7462 * server.c (handle_query): Support qXfer:fdpic:read packet.
7463 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7464 to NULL.
7465
7466 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7467
7468 * win32-low.c: Include <stdint.h>.
7469
7470 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7471
7472 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7473 to the inferior here.
7474 (i386_remove_aligned_watchpoint): Ditto.
7475 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7476 fit part of the watchpoint in the debug registers.
7477 (i386_update_inferior_debug_regs): New.
7478 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7479 registers, and only update the inferior on success.
7480 (i386_low_remove_watchpoint): Ditto.
7481
7482 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7483
7484 * linux-low.c (compare_ints, unique, list_threads, show_process,
7485 linux_core_of_thread): Delete.
7486 (linux_target_ops): Change linux_core_of_thread to
7487 linux_common_core_of_thread.
7488 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7489 * utils.c (malloc_failure): Change type of argument.
7490 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7491 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7492 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7493 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7494 (IPA_OBJS): Add common-utils-ipa.o.
7495 (ptid_h, linux_osdata_h): New macros.
7496 (server_h): Add common/common-utils.h, common/xml-utils.h,
7497 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7498 common/ptid.h.
7499 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7500 ptid.o, buffer.o): New rules.
7501 (linux-low.o): Add common/linux-osdata.h as a dependency.
7502 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7503 * configure.ac: Add AC_HEADER_DIRENT check.
7504 * config.in: Regenerate.
7505 * configure: Regenerate.
7506 * remote-utils.c (xml_escape_text): Delete.
7507 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7508 buffer_xml_printf): Move to common/buffer.c.
7509 * server.c (main): Remove call to initialize_inferiors.
7510 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7511 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7512 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7513 internal_error, gdb_assert, gdb_assert_fail): Delete.
7514 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7515 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7516 common/buffer.h.
7517 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7518 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7519 initialize_inferiors): Delete.
7520
7521 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7522
7523 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7524 symbol error.
7525
7526 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7527
7528 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7529 assertion.
7530 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7531
7532 2011-05-26 Yao Qi <yao@codesourcery.com>
7533
7534 * Makefile.in (thread-db.o): Track dependence to
7535 common/gdb_thread_db.h.
7536 * thread-db.c: include gdb_thread_db.h from right place.
7537
7538 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7539
7540 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7541 __FILE__ and __LINE__ to internal_error.
7542
7543 2011-05-13 Doug Evans <dje@google.com>
7544
7545 * thread-db.c (try_thread_db_load_from_sdir): New function.
7546 (try_thread_db_load_from_dir): New function.
7547 (thread_db_load_search): Handle $sdir, ignore $pdir.
7548 Remove trying of system directories if search of
7549 libthread-db-search-path fails, that is now done via $sdir.
7550
7551 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7552
7553 * server.c (handle_query): Add EnableDisableTracepoints to the list
7554 of supported features.
7555 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7556 tracepoints.
7557 (cmd_qtenable_disable): New.
7558 (cmd_qtstart): Install tracepoints even if disabled.
7559 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7560 receiving a QTEnable or QTDisable packet.
7561 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7562 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7563 tracepoints.
7564 (gdb_probe): Skip data collection if static tracepoint is disabled.
7565
7566 2011-05-10 Doug Evans <dje@google.com>
7567
7568 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7569
7570 2011-05-04 Doug Evans <dje@google.com>
7571
7572 * linux-low.c (linux_join): Skip process lookup.
7573 * spu-low.c (spu_join): Ditto.
7574 * server.c (join_inferiors_callback): Delete.
7575 (process_serial_event): For 'D' packet (detach) call join_inferior
7576 directly.
7577
7578 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7579
7580 * README: Don't mention xscale*-*-linux*.
7581 * configure.srv (xscale*-*-linux*): Don't handle target.
7582
7583 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7584
7585 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7586 casting pointers.
7587 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7588 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7589 (i386_emit_void_call_2): Likewise.
7590
7591 2011-04-26 Yao Qi <yao@codesourcery.com>
7592
7593 * linux-low.c: Move common macros to linux-ptrace.h.
7594 Include linux-ptrace.h.
7595 * Makefile.in (linux_ptrace_h): New.
7596 (linux-low.o): Depends on linux-ptrace.h.
7597
7598 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7599
7600 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7601 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7602 (remote_prepare): New function with most of the TCP code from ...
7603 (remote_open): ... here. Detect PORT here unconditionally. Move also
7604 setting transport_is_reliable.
7605 * server.c (run_once): New variable.
7606 (gdbserver_usage): Document it.
7607 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7608 the first run if RUN_ONCE.
7609 * server.h (run_once, remote_prepare): New declarations.
7610
7611 2011-04-19 Tom Tromey <tromey@redhat.com>
7612
7613 * win32-low.c (handle_load_dll): Remove duplicate "the".
7614
7615 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7616
7617 Remove support for old Cygwin 1.5 versions.
7618 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7619 function to avoid warning.
7620 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7621 warning.
7622
7623 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7624
7625 * gdbserver/server.h (Macro _): Define it if not available.
7626
7627 2011-03-14 Michael Snyder <msnyder@vmware.com>
7628
7629 * hostio.c (handle_close): Remove unnecessary null test.
7630
7631 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7632
7633 * Makefile.in (maintainer-clean realclean distclean): Remove
7634 "make ... subdir_do" command.
7635
7636 2011-03-10 Michael Snyder <msnyder@vmware.com>
7637
7638 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7639
7640 * server.c (handle_v_run): Free alloced buffer on early return.
7641
7642 2011-03-09 Yao Qi <yao@codesourcery.com>
7643
7644 Revert:
7645 2011-03-04 Yao Qi <yao@codesourcery.com>
7646
7647 * Makefile.in: Remove GNU make feature --directory.
7648
7649 2011-03-05 Yao Qi <yao@codesourcery.com>
7650
7651 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7652 (subdir_do): New make target. Copied from gdb/Makefile.
7653 (maintainer-clean, realclean, distclean, clean): Call corresponding
7654 make targets in common/Makefile.
7655
7656 2011-02-11 Yao Qi <yao@codesourcery.com>
7657
7658 * configure.ac: Call AC_PROG_RANLIB.
7659 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7660 * configure: Regenerate.
7661
7662 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7663
7664 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7665
7666 2011-03-06 Yao Qi <yao@codesourcery.com>
7667
7668 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7669
7670 2011-03-05 Yao Qi <yao@codesourcery.com>
7671
7672 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7673 (subdir_do): New make target. Copied from gdb/Makefile.
7674 (maintainer-clean, realclean, distclean, clean): Call corresponding
7675 make targets in common/Makefile.
7676
7677 2011-03-04 Yao Qi <yao@codesourcery.com>
7678
7679 * Makefile.in: Remove GNU make feature --directory.
7680
7681 2011-03-04 Michael Snyder <msnyder@vmware.com>
7682
7683 * server.c (queue_stop_reply): Call xmalloc not malloc.
7684
7685 2011-03-02 Michael Snyder <msnyder@vmware.com>
7686
7687 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7688
7689 2011-02-28 Michael Snyder <msnyder@vmware.com>
7690
7691 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7692 (cmd_qtframe): Ditto.
7693 (cmd_qtbuffer): Ditto.
7694 (cmd_bigqtbuffer): Ditto.
7695
7696 * utils.c (decimal2str): Initialize 'width' to nine, then
7697 don't mess with it.
7698
7699 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7700
7701 * hostio.c (require_data): Free *data, not data.
7702
7703 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7704
7705 * hostio.c (require_data): Use free, not xfree.
7706
7707 2011-02-27 Michael Snyder <msnyder@vmware.com>
7708
7709 * server.c (handle_query): Discard unused value.
7710
7711 * hostio.c (require_data): Free malloc memory before returning
7712 error.
7713
7714 2011-02-26 Michael Snyder <msnyder@vmware.com>
7715
7716 * linux-low.c (list_threads): Call closedir for dirent.
7717
7718 2011-02-27 Michael Snyder <msnyder@vmware.com>
7719
7720 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7721 a case statement falls through.
7722
7723 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7724
7725 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7726 in comparison.
7727
7728 2011-02-26 Michael Snyder <msnyder@vmware.com>
7729
7730 * utils.c (decimal2str): Eliminate dead code and dead param.
7731 (pulongest): Drop dead param from call to decimal2str.
7732 (plongest): Ditto.
7733
7734 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7735
7736 Revert the following patch (not approved yet):
7737 2011-02-21 Hui Zhu <teawater@gmail.com>
7738 * tracepoint.c (tp_printf): New function.
7739 (eval_agent_expr): Handle gdb_agent_op_printf.
7740
7741 2011-02-21 Hui Zhu <teawater@gmail.com>
7742
7743 * tracepoint.c (tp_printf): New function.
7744 (eval_agent_expr): Handle gdb_agent_op_printf.
7745
7746 2011-02-18 Tom Tromey <tromey@redhat.com>
7747
7748 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7749 (tracepoint.o): Likewise.
7750 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7751 (gdb_agent_op_names): Likewise.
7752
7753 2011-02-18 Tom Tromey <tromey@redhat.com>
7754
7755 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7756 gdb_agent_op_rot>: New constants.
7757 (gdb_agent_op_names): Add pick and roll.
7758 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7759 cases.
7760
7761 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7762
7763 * aclocal.m4: Regenerated with aclocal-1.11.1.
7764
7765 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7766
7767 * server.c (handle_qxfer_traceframe_info): New.
7768 (qxfer_packets): Register "traceframe-info".
7769 (handle_query): Report support for qXfer:traceframe-info:read+.
7770 * tracepoint.c (match_blocktype): New.
7771 (traceframe_find_block_type): Rename to ...
7772 (traceframe_walk_blocks): ... this. Add callback filter argument,
7773 and use it.
7774 (traceframe_find_block_type): New, reimplemented on top of
7775 traceframe_walk_blocks.
7776 (build_traceframe_info_xml): New.
7777 (traceframe_read_info): New.
7778 * server.h (traceframe_read_info): Declare.
7779
7780 2011-02-11 Yao Qi <yao@codesourcery.com>
7781
7782 * configure.ac: Call AC_PROG_RANLIB.
7783 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7784 * configure: Regenerate.
7785
7786 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7787
7788 * server.c (gdb_read_memory): Change return semantics to allow
7789 partial transfers.
7790 (handle_search_memory_1): Adjust.
7791 (process_serial_event) <'m' packet>: Handle partial transfers.
7792 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7793
7794 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7795
7796 * regcache.c (init_register_cache): Initialize
7797 regcache->register_status.
7798 (free_register_cache): Release regcache->register_status.
7799 (regcache_cpy): Copy register_status.
7800 (registers_to_string): Print 'x's for unavailable registers.
7801 (supply_register): Mark the register's status valid or
7802 unavailable, depending on whether a buffer was passed in or not.
7803 (supply_register_zeroed): New.
7804 (supply_regblock): Mark the registers' status valid or
7805 unavailable, depending on whether a buffer was passed in or not.
7806 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7807 (struct regcache): New `register_status' field.
7808 (supply_register_zeroed): Declare.
7809 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7810 supply_register_zeroed, rather than passing a NULL buffer to
7811 supply_register.
7812 * tracepoint.c (fetch_traceframe_registers): Update comment.
7813
7814 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7815
7816 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7817 buffer explicit.
7818
7819 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7820
7821 * server.h (decode_xfer_write): Change prototype.
7822 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7823 and don't extract the annex here.
7824 * server.c (decode_xfer_read): Remove `annex' parameter,
7825 and don't extract the annex here.
7826 (decode_xfer): New.
7827 (struct qxfer): New.
7828 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7829 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7830 (handle_qxfer_statictrace): New functions, abstracted out from
7831 handle_query, and made to use the struct qxfer interface.
7832 (handle_threads_qxfer_proper): Rename to ...
7833 (handle_qxfer_threads_proper): ... this.
7834 (handle_threads_qxfer): Rename to ...
7835 (handle_qxfer_threads): ... this. Adjust.
7836 (qxfer_packets): New array.
7837 (handle_qxfer): New function.
7838 (handle_query): Use handle_qxfer.
7839
7840 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7841
7842 * gdbreplay.c: Shorten lines of >= 80 columns.
7843 * linux-low.c: Ditto.
7844 * linux-ppc-low.c: Ditto.
7845 * linux-s390-low.c: Ditto.
7846 * linux-sparc-low.c: Ditto.
7847 * linux-x86-low.c: Ditto.
7848 * linux-xtensa-low.c: Ditto.
7849 * mem-break.c: Ditto.
7850 * nto-low.c: Ditto.
7851 * regcache.h: Ditto.
7852 * remote-utils.c: Ditto.
7853 * server.c: Ditto.
7854 * server.h: Ditto.
7855 * thread-db.c: Ditto.
7856 * tracepoint.c: Ditto.
7857 * utils.c: Ditto.
7858 * win32-low.h: Ditto.
7859
7860 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7861
7862 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7863 update.
7864
7865 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7866
7867 * server.c (gdbserver_version): Update copyright year in version
7868 output.
7869 * gdbreplay.c (gdbreplay_version): Ditto.
7870
7871 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7872
7873 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7874 * linux-bfin-low.c: New file.
7875 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7876 PT_DATA_ADDR for BFIN targets.
7877 * Makefile.in (SFILES): Add linux-bfin-low.c.
7878 (clean): Remove reg-bfin.c.
7879 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7880 * README: Mention supported Blackfin targets.
7881
7882 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7883
7884 * .gitignore: New file.
7885
7886 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7887
7888 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7889
7890 2010-10-22 Jie Zhang <jie@codesourcery.com>
7891
7892 * Makefile.in: Add FLAGS_TO_PASS variable.
7893 (install): Remove dependency of install-only and recursively
7894 invoke make for install-only.
7895
7896 2010-10-04 Doug Evans <dje@google.com>
7897
7898 * Makefile.in (uninstall): Use $(DESTDIR).
7899
7900 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7901
7902 PR gdb/11842
7903
7904 * linux-x86-low.c (compat_siginfo_from_siginfo)
7905 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7906 si_code is < 0. Check for si_code == SI_TIMER before checking for
7907 si_code < 0.
7908
7909 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7910
7911 * lynx-i386-low.c: New file.
7912 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7913
7914 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7915
7916 * lynx-low.c (ptrace_request_to_str): Remove handling for
7917 request values that have been removed in LynxOS 5.x.
7918
7919 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7920
7921 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7922 <ptrace.h>
7923
7924 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7925
7926 * configure.ac: Add --enable-inprocess-agent option.
7927 * configure: Rebuilt.
7928
7929 2010-09-06 Yao Qi <yao@codesourcery.com>
7930
7931 * linux-low.c (linux_kill): Remove unused variable.
7932 (linux_stabilize_threads): Likewise.
7933 * server.c (start_inferior): Likewise.
7934 (queue_stop_reply_callback): Likewise.
7935 * tracepoint.c (do_action_at_tracepoint): Likewise.
7936
7937 2010-09-06 Yao Qi <yao@codesourcery.com>
7938
7939 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7940 on return.
7941
7942 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7943
7944 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7945
7946 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7947
7948 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7949 "$(IPA_DEPFILES)".
7950
7951 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7952
7953 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7954 gdbserver/lynx-ppc-low.c: New files.
7955 * Makefile.in (lynx_low_h): New variable.
7956 (lynx-low.o, lynx-ppc-low.o): New rules.
7957 * configure.ac: On LynxOS, link with -lnetinet.
7958 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7959 * configure: regenerate.
7960
7961 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7962
7963 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7964 * configure.ac: Add check for vasprintf and vsnprintf.
7965 * configure, config.in: Regenerate.
7966 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7967
7968 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7969
7970 * gdbreplay.c: Move include of alloca.h up, next to include of
7971 malloc.h.
7972 * server.h: Add include of malloc.h.
7973 * mem-break.c: Remove include of malloc.h.
7974 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7975
7976 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7977
7978 * Makefile.in (memmem.o): Build with -Wno-error.
7979
7980 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7981
7982 * utils.c (xsnprintf): Make non-static.
7983 * server.h: Add xsnprintf declaration.
7984 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7985 replace calls to snprintf by calls to xsnprintf throughout.
7986
7987 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7988
7989 * configure.ac: Add configure check for alloca.
7990 * configure, config.in: Regenerate.
7991 * server.h: Include alloca.h if it exists.
7992 * gdbreplay.c: Include alloca.h if it exists.
7993
7994 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7995
7996 * linux-low.c (__SIGRTMIN): Define if not already defined.
7997 (linux_create_inferior): Check for __ANDROID__ rather than
7998 __SIGRTMIN.
7999 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8000 are already deferred.
8001 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8002 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8003 stopped and already has a pending signal to report.
8004 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8005 a pending signal to report or is moving out of a jump pad.
8006 (linux_init_signals): Check for __ANDROID__ rather than
8007 __SIGRTMIN.
8008
8009 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8010
8011 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8012 debug_threads check. Avoid a linear search when not doing debug
8013 output.
8014
8015 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8016
8017 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8018 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8019 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8020 (process_event): Change local fd's type to gdb_fildes_t.
8021 (create_file_handler): Adjust prototype.
8022 (delete_file_handler): Adjust prototype.
8023 (handle_file_event): Adjust prototype. Use pfildes.
8024 (create_file_event): Adjsut prototype.
8025 * remote-utils.c (remote_desc, listen_desc): Change type to
8026 gdb_fildes_t.
8027 * server.h: New gdb_fildes_t typedef.
8028 [USE_WIN32API]: Include winsock2.h.
8029 (delete_file_handler, add_file_handler): Adjust prototypes.
8030 (pfildes): Declare.
8031 * utils.c (pfildes): New.
8032
8033 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8034
8035 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8036 * configure: Regenerate.
8037
8038 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8039
8040 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8041 (linux_done_accessing_memory): ... this.
8042 (linux_target_ops): Adjust.
8043 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8044 * nto-low.c (nto_target_ops): Adjust comment.
8045 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8046 * spu-low.c (spu_target_ops): Adjust comment.
8047 * target.h (target_ops): Rename unprepare_to_access_memory field
8048 to done_accessing_memory.
8049 (unprepare_to_access_memory): Rename to ...
8050 (done_accessing_memory): ... this.
8051
8052 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8053
8054 * linux-low.c (linux_prepare_to_access_memory): New.
8055 (linux_unprepare_to_access_memory): New.
8056 (linux_target_ops): Install them.
8057 * server.c (read_memory): Rename to ...
8058 (gdb_read_memory): ... this. Use
8059 prepare_to_access_memory/prepare_to_access_memory.
8060 (write_memory): Rename to ...
8061 (gdb_write_memory): ... this. Use
8062 prepare_to_access_memory/prepare_to_access_memory.
8063 (handle_search_memory_1): Adjust.
8064 (process_serial_event): Adjust.
8065 * target.h (struct target_ops): New fields
8066 prepare_to_access_memory and unprepare_to_access_memory.
8067 (prepare_to_access_memory, unprepare_to_access_memory): New.
8068 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8069 prepare_to_access_memory/prepare_to_access_memory.
8070 * nto-low.c (nto_target_ops): Adjust.
8071 * spu-low.c (spu_target_ops): Adjust.
8072 * win32-low.c (win32_target_ops): Adjust.
8073
8074 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8075
8076 * Makefile.in (WARN_CFLAGS): Get it from configure.
8077 (WERROR_CFLAGS): New.
8078 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8079 * configure.ac: Introduce --enable-werror, which adds -Werror to
8080 the compiler command line. Enabled by default. Disable with
8081 --disable-werror. Add -Wdeclaration-after-statement
8082 Wpointer-arith and -Wformat-nonliteral to warning flags.
8083 * configure: Regenerate.
8084
8085 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8086
8087 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8088
8089 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8090
8091 * gdbreplay.c (remote_error): New.
8092 (gdbchar): New.
8093 (expect): Use gdbchar. Check for error reading from GDB.
8094 Clarify sync error output.
8095 (play): Check for errors writing to GDB.
8096 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8097 * remote-utils.c (getpkt): Check for errors writing to the remote
8098 descriptor.
8099
8100 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8101
8102 * linux-low.c (linux_wait_1): Move non-debugging code out of
8103 `debug_threads' control.
8104
8105 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8106
8107 * linux-low.c (linux_wait_1): Don't set last_status here.
8108 * server.c (push_event, queue_stop_reply_callback): Assert we're
8109 not pushing a TARGET_WAITKIND_IGNORE event.
8110 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8111 (myresume, handle_target_event): Set the thread's last_resume_kind
8112 and last_status from the target returned status.
8113
8114 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8115
8116 PR threads/10729
8117
8118 * linux-x86-low.c (update_debug_registers_callback): New.
8119 (i386_dr_low_set_addr): Use it.
8120 (i386_dr_low_get_addr): New.
8121 (i386_dr_low_set_control): Use update_debug_registers_callback.
8122 (i386_dr_low_get_control): New.
8123 (i386_dr_low_get_status): Adjust.
8124 * linux-low.c (linux_stop_lwp): New.
8125 * linux-low.h (linux_stop_lwp): Declare.
8126
8127 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8128 argument instead of a i386_debug_reg_state.
8129 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8130 a i386_debug_reg_state.
8131 (i386_insert_aligned_watchpoint): Adjust.
8132 (i386_remove_aligned_watchpoint): Adjust.
8133 (i386_low_stopped_data_address): Read the debug registers from the
8134 inferior instead of from the mirrors.
8135 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8136 (i386_dr_low_get_addr): Declare.
8137 (i386_dr_low_get_control): Declare.
8138 (i386_dr_low_get_status): Change prototype.
8139
8140 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8141 (i386_dr_low_get_addr): New.
8142 (i386_dr_low_get_control): New.
8143 (i386_dr_low_get_status): Adjust prototype. Return
8144 dr_status_mirror.
8145 (i386_initial_stuff): Clear dr_status_mirror and
8146 dr_control_mirror.
8147 (i386_get_thread_context): Adjust.
8148 (i386_set_thread_context): Adjust.
8149 (i386_thread_added): Adjust.
8150
8151 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8152
8153 * linux-low.h (linux_thread_area): Delete declaration.
8154
8155 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8156
8157 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8158 after its termination.
8159
8160 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8161
8162 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8163 (gdb_wants_all_stopped): Delete.
8164 (linux_wait_1): Don't call them.
8165 * server.c (handle_v_cont): Tag all threads as want-stopped.
8166 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8167 stopped as "client-wants-stopped".
8168
8169 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8170
8171 * Makefile.in (signals_h): New.
8172 (server_h): Depend on it.
8173 (server.o): Don't depend on $(signals_def).
8174 (signals.o): Depend on $(signals_def).
8175
8176 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8177
8178 * Makefile.in (signals_def): New.
8179 (server_h): Append include/gdb/signals.h and signals_def.
8180 (server.o): Append signals_def.
8181
8182 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8183
8184 * server.c (handle_target_event): Use target_signal_to_host for
8185 resume_info.sig initialization.
8186 * target.h (struct thread_resume) <sig>: New comment.
8187
8188 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8189
8190 * server.c (handle_query): strcpy() the returned string from paddress()
8191 instead of sprintf().
8192 * utils.c (paddress): Return phex_nz().
8193
8194 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8195
8196 * server.c (handle_v_cont): Call mourn_inferior if process
8197 just exited.
8198 (myresume): Likewise.
8199
8200 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8201
8202 Static tracepoints, and integration with UST.
8203
8204 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8205 * mem-break.c (uninsert_all_breakpoints)
8206 (reinsert_all_breakpoints): New.
8207 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8208 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8209 (gdb_agent_ust_loaded, helper_thread_id)
8210 (gdb_agent_helper_thread_id): New macros.
8211 (struct ipa_sym_addresses): Add addr_ust_loaded,
8212 addr_helper_thread_id, addr_cmd_buf.
8213 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8214 (in_process_agent_loaded_ust): New.
8215 (write_e_ust_not_loaded): New.
8216 (maybe_write_ipa_ust_not_loaded): New.
8217 (struct collect_static_trace_data_action): New.
8218 (enum tracepoint_type) <static_tracepoint>: New.
8219 (struct tracepoint) <handle>: Mention static tracepoints.
8220 (struct static_tracepoint_ctx): New.
8221 (CMD_BUF_SIZE): New.
8222 (add_tracepoint_action): Handle static tracepoint actions.
8223 (unprobe_marker_at): New.
8224 (clear_installed_tracepoints): Handle static tracepoints.
8225 (cmd_qtdp): Handle static tracepoints.
8226 (probe_marker_at): New.
8227 (cmd_qtstart): Handle static tracepoints.
8228 (response_tracepoint): Handle static tracepoints.
8229 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8230 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8231 (get_context_regcache): Handle static tracepoints.
8232 (do_action_at_tracepoint): Handle static tracepoint actions.
8233 (traceframe_find_block_type): Handle static trace data blocks.
8234 (traceframe_read_sdata): New.
8235 (download_tracepoints): Download static tracepoint actions.
8236 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8237 (GDB_PROBE_NAME): New.
8238 (ust_ops): New.
8239 (GET_UST_SYM): New.
8240 (USTF): New.
8241 (dlsym_ust): New.
8242 (ust_marker_to_static_tracepoint): New.
8243 (gdb_probe): New.
8244 (collect_ust_data_at_tracepoint): New.
8245 (gdb_ust_probe): New.
8246 (UNIX_PATH_MAX, SOCK_DIR): New.
8247 (gdb_ust_connect_sync_socket): New.
8248 (resume_thread, stop_thread): New.
8249 (run_inferior_command): New.
8250 (init_named_socket): New.
8251 (gdb_ust_socket_init): New.
8252 (cstr_to_hexstr): New.
8253 (next_st): New.
8254 (first_marker, next_marker): New.
8255 (response_ust_marker): New.
8256 (cmd_qtfstm, cmd_qtsstm): New.
8257 (unprobe_marker_at, probe_marker_at): New.
8258 (cmd_qtstmat, gdb_ust_thread): New.
8259 (gdb_ust_init): New.
8260 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8261 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8262 (ST_REGENTRY): New.
8263 (x86_64_st_collect_regmap): New.
8264 (X86_64_NUM_ST_COLLECT_GREGS): New.
8265 (AMD64_RIP_REGNUM): New.
8266 (supply_static_tracepoint_registers): New.
8267 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8268 (ST_REGENTRY): New.
8269 (i386_st_collect_regmap): New.
8270 (i386_NUM_ST_COLLECT_GREGS): New.
8271 (supply_static_tracepoint_registers): New.
8272 * server.c (handle_query): Handle qXfer:statictrace:read.
8273 <qSupported>: Report support for StaticTracepoints, and
8274 qXfer:statictrace:read features.
8275 * server.h (traceframe_read_sdata)
8276 (supply_static_tracepoint_registers): Declare.
8277 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8278 (unpack_varlen_hex): Include in IPA build.
8279 * Makefile.in (ustlibs, ustinc): New.
8280 (IPA_OBJS): Add remote-utils-ipa.o.
8281 ($(IPA_LIB)): Link -ldl and -lpthread.
8282 (UST_CFLAGS): New.
8283 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8284 * config.in, configure: Regenerate.
8285
8286 2010-06-20 Ian Lance Taylor <iant@google.com>
8287 Pedro Alves <pedro@codesourcery.com>
8288
8289 * linux-x86-low.c (always_true): Delete.
8290 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8291 trying to fool the compiler with always_true.
8292
8293 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8294
8295 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8296 conditions in gdbserver.
8297
8298 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8299
8300 * spu-low.c (spu_read_memory): Wrap around local store limit.
8301 (spu_write_memory): Likewise.
8302
8303 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8304
8305 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8306 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8307 LONGEST uses.
8308 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8309 uses.
8310 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8311 uses with LONGEST uses.
8312
8313 2010-06-14 Stan Shebs <stan@codesourcery.com>
8314 Pedro Alves <pedro@codesourcery.com>
8315
8316 Bytecode compiler.
8317
8318 * linux-x86-low.c: Include limits.h.
8319 (add_insns): New.
8320 (always_true): New.
8321 (EMIT_ASM): New.
8322 (EMIT_ASM32): New.
8323 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8324 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8325 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8326 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8327 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8328 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8329 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8330 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8331 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8332 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8333 (amd64_emit_void_call_2): New.
8334 (amd64_emit_ops): New.
8335 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8336 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8337 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8338 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8339 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8340 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8341 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8342 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8343 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8344 (i386_emit_stack_adjust, i386_emit_int_call_1)
8345 (i386_emit_void_call_2): New.
8346 (i386_emit_ops): New.
8347 (x86_emit_ops): New.
8348 (the_low_target): Install x86_emit_ops.
8349 * server.h (struct emit_ops): New.
8350 (get_raw_reg_func_addr): Declare.
8351 (current_insn_ptr, emit_error): Declare.
8352 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8353 (set_trace_state_variable_value): New defines.
8354 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8355 addr_get_trace_state_variable_value and
8356 addr_set_trace_state_variable_value.
8357 (symbol_list): New fields for get_raw_reg,
8358 get_trace_state_variable_value and set_trace_state_variable_value.
8359 (condfn): New typedef.
8360 (struct tracepoint): New field `compiled_cond'.
8361 (do_action_at_tracepoint): Clear compiled_cond.
8362 (get_trace_state_variable_value, set_trace_state_variable_value):
8363 Export in the IPA.
8364 (condition_true_at_tracepoint): If there's a compiled condition,
8365 run that.
8366 (current_insn_ptr, emit_error): New globals.
8367 (struct bytecode_address): New.
8368 (get_raw_reg_func_addr): New.
8369 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8370 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8371 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8372 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8373 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8374 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8375 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8376 (compile_tracepoint_condition, compile_bytecodes): New.
8377 * target.h (emit_ops): Forward declare.
8378 (struct target_ops): New field emit_ops.
8379 (target_emit_ops): New.
8380 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8381 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8382 * linux-low.c (linux_emit_ops): New.
8383 (linux_target_ops): Install it.
8384 * linux-low.h (struct linux_target_ops): New field emit_ops.
8385
8386 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8387
8388 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8389 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8390
8391 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8392 Stan Shebs <stan@codesourcery.com>
8393
8394 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8395 (all): Depend on $(extra_libraries).
8396 (install-only): Install the IPA.
8397 (IPA_OBJS, IPA_LIB): New.
8398 (clean): Remove the IPA lib.
8399 (IPAGENT_CFLAGS): New.
8400 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8401 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8402 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8403 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8404 * configure.ac: Check for atomic builtins support in the compiler.
8405 (IPA_DEPFILES, extra_libraries): Define.
8406 * configure.srv (ipa_obj): Add description.
8407 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8408 (i[34567]86-*-linux*): Set ipa_obj.
8409 (x86_64-*-linux*): Set ipa_obj.
8410 * linux-low.c (stabilizing_threads): New.
8411 (supports_fast_tracepoints): New.
8412 (linux_detach): Stabilize threads before detaching.
8413 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8414 the lwp is either not stabilizing, or is moving out of a jump pad.
8415 (linux_fast_tracepoint_collecting): New.
8416 (maybe_move_out_of_jump_pad): New.
8417 (enqueue_one_deferred_signal): New.
8418 (dequeue_one_deferred_signal): New.
8419 (linux_wait_for_event_1): If moving out of a jump pad, defer
8420 pending signals to later.
8421 (linux_stabilize_threads): New.
8422 (linux_wait_1): Check if threads need moving out of jump pads, and
8423 do it if so.
8424 (stuck_in_jump_pad_callback): New.
8425 (move_out_of_jump_pad_callback): New.
8426 (lwp_running): New.
8427 (linux_resume_one_lwp): Handle moving out of jump pads.
8428 (linux_set_resume_request): Dequeue deferred signals.
8429 (need_step_over_p): Also step over fast tracepoint jumps.
8430 (start_step_over): Also uninsert fast tracepoint jumps.
8431 (finish_step_over): Also reinsert fast tracepoint jumps.
8432 (linux_install_fast_tracepoint_jump): New.
8433 (linux_target_ops): Install linux_stabilize_threads and
8434 linux_install_fast_tracepoint_jump_pad.
8435 * linux-low.h (linux_target_ops) <get_thread_area,
8436 install_fast_tracepoint_jump_pad>: New fields.
8437 (struct lwp_info) <collecting_fast_tracepoint,
8438 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8439 (linux_get_thread_area): Declare.
8440 * linux-x86-low.c (jump_insn): New.
8441 (x86_get_thread_area): New.
8442 (append_insns): New.
8443 (push_opcode): New.
8444 (amd64_install_fast_tracepoint_jump_pad): New.
8445 (i386_install_fast_tracepoint_jump_pad): New.
8446 (x86_install_fast_tracepoint_jump_pad): New.
8447 (the_low_target): Install x86_get_thread_area and
8448 x86_install_fast_tracepoint_jump_pad.
8449 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8450 (struct fast_tracepoint_jump): New.
8451 (fast_tracepoint_jump_insn): New.
8452 (fast_tracepoint_jump_shadow): New.
8453 (find_fast_tracepoint_jump_at): New.
8454 (fast_tracepoint_jump_here): New.
8455 (delete_fast_tracepoint_jump): New.
8456 (set_fast_tracepoint_jump): New.
8457 (uninsert_fast_tracepoint_jumps_at): New.
8458 (reinsert_fast_tracepoint_jumps_at): New.
8459 (set_breakpoint_at): Use write_inferior_memory.
8460 (uninsert_raw_breakpoint): Use write_inferior_memory.
8461 (check_mem_read): Mask out fast tracepoint jumps.
8462 (check_mem_write): Mask out fast tracepoint jumps.
8463 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8464 (set_fast_tracepoint_jump): Declare.
8465 (delete_fast_tracepoint_jump)
8466 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8467 (reinsert_fast_tracepoint_jumps_at): Declare.
8468 * regcache.c: Don't compile many functions when building the
8469 in-process agent library.
8470 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8471 the register buffer in the heap.
8472 (free_register_cache): If the register buffer isn't owned by the
8473 regcache, don't free it.
8474 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8475 pre-existing register caches.
8476 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8477 type.
8478 (convert_ascii_to_int): : Constify `from' parameter type.
8479 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8480 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8481 the needed buffer in-place.
8482 (relocate_instruction): New.
8483 * server.c (handle_query) <qSymbols>: If the target supports
8484 tracepoints, give it a chance of looking up symbols. Report
8485 support for fast tracepoints.
8486 (handle_status): Stabilize threads.
8487 (process_serial_event): Adjust.
8488 * server.h (struct fast_tracepoint_jump): Forward declare.
8489 (struct process_info) <fast_tracepoint_jumps>: New field.
8490 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8491 (decode_X_packet, decode_M_packet): Adjust.
8492 (relocate_instruction): Declare.
8493 (in_process_agent_loaded): Declare.
8494 (tracepoint_look_up_symbols): Declare.
8495 (struct fast_tpoint_collect_status): Declare.
8496 (fast_tracepoint_collecting): Declare.
8497 (force_unlock_trace_buffer): Declare.
8498 (handle_tracepoint_bkpts): Declare.
8499 (initialize_low_tracepoint)
8500 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8501 * target.h (struct target_ops) <stabilize_threads,
8502 install_fast_tracepoint_jump_pad>: New fields.
8503 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8504 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8505 [HAVE_STDINT_H]: Include stdint.h.
8506 (trace_debug_1): Rename to ...
8507 (trace_vdebug): ... this.
8508 (trace_debug): Rename to ...
8509 (trace_debug_1): ... this. Add `level' parameter.
8510 (trace_debug): New.
8511 (ATTR_USED, ATTR_NOINLINE): New.
8512 (IP_AGENT_EXPORT): New.
8513 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8514 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8515 (about_to_request_buffer_space, trace_buffer_is_full)
8516 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8517 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8518 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8519 (traceframe_write_count, traceframes_created)
8520 (trace_state_variables)
8521 New renaming defines.
8522 (struct ipa_sym_addresses): New.
8523 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8524 (symbol_list): New.
8525 (ipa_sym_addrs): New.
8526 (all_tracepoint_symbols_looked_up): New.
8527 (in_process_agent_loaded): New.
8528 (write_e_ipa_not_loaded): New.
8529 (maybe_write_ipa_not_loaded): New.
8530 (tracepoint_look_up_symbols): New.
8531 (debug_threads) [IN_PROCESS_AGENT]: New.
8532 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8533 (UNKNOWN_SIDE_EFFECTS): New.
8534 (stop_tracing): New.
8535 (flush_trace_buffer): New.
8536 (stop_tracing_bkpt): New.
8537 (flush_trace_buffer_bkpt): New.
8538 (read_inferior_integer): New.
8539 (read_inferior_uinteger): New.
8540 (read_inferior_data_pointer): New.
8541 (write_inferior_data_pointer): New.
8542 (write_inferior_integer): New.
8543 (write_inferior_uinteger): New.
8544 (struct collect_static_trace_data_action): Delete.
8545 (enum tracepoint_type): New.
8546 (struct tracepoint) <type>: New field `type'.
8547 <actions_str, step_actions, step_actions_str>: Only include in
8548 GDBserver.
8549 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8550 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8551 (tracepoints): Use IP_AGENT_EXPORT.
8552 (last_tracepoint): Don't include in the IPA.
8553 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8554 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8555 (alloced_trace_state_variables): New.
8556 (trace_state_variables): Use IP_AGENT_EXPORT.
8557 (traceframe_t): Delete unused variable.
8558 (circular_trace_buffer): Don't include in the IPA.
8559 (trace_buffer_start): Delete.
8560 (struct trace_buffer_control): New.
8561 (trace_buffer_free): Delete.
8562 (struct ipa_trace_buffer_control): New.
8563 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8564 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8565 New.
8566 (trace_buffer_ctrl): New.
8567 (TRACE_BUFFER_CTRL_CURR): New.
8568 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8569 Reimplement as macros.
8570 (trace_buffer_wrap): Delete.
8571 (traceframe_write_count, traceframe_read_count)
8572 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8573 (struct tracepoint_hit_ctx) <type>: New field.
8574 (struct fast_tracepoint_ctx): New.
8575 (memory_barrier): New.
8576 (cmpxchg): New.
8577 (record_tracepoint_error): Update atomically in the IPA.
8578 (clear_inferior_trace_buffer): New.
8579 (about_to_request_buffer_space): New.
8580 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8581 updating the same buffer.
8582 (add_tracepoint): Default the tracepoint's type to trap
8583 tracepoint, and orig_size to -1.
8584 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8585 internal variables.
8586 (create_trace_state_variable): New parameter `gdb'. Handle it.
8587 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8588 (cmd_qtdp): Handle fast tracepoints.
8589 (cmd_qtdv): Adjust.
8590 (max_jump_pad_size): New.
8591 (gdb_jump_pad_head): New.
8592 (get_jump_space_head): New.
8593 (claim_jump_space): New.
8594 (sort_tracepoints): New.
8595 (MAX_JUMP_SIZE): New.
8596 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8597 IPA.
8598 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8599 support. Upload fast traceframes, and delete internal IPA
8600 breakpoints.
8601 (stop_tracing_handler): New.
8602 (flush_trace_buffer_handler): New.
8603 (cmd_qtstop): Upload fast tracepoints.
8604 (response_tracepoint): Handle fast tracepoints.
8605 (tracepoint_finished_step): Upload fast traceframes. Set the
8606 tracepoint hit context's tracepoint type.
8607 (handle_tracepoint_bkpts): New.
8608 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8609 type. Add comment about fast tracepoints.
8610 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8611 non-existing action_str field.
8612 (get_context_regcache): Handle fast tracepoints.
8613 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8614 to the regcache.
8615 (fast_tracepoint_from_jump_pad_address): New.
8616 (fast_tracepoint_from_ipa_tpoint_address): New.
8617 (collecting_t): New.
8618 (force_unlock_trace_buffer): New.
8619 (fast_tracepoint_collecting): New.
8620 (collecting): New.
8621 (gdb_collect): New.
8622 (write_inferior_data_ptr): New.
8623 (target_tp_heap): New.
8624 (target_malloc): New.
8625 (download_agent_expr): New.
8626 (UALIGN): New.
8627 (download_tracepoints): New.
8628 (download_trace_state_variables): New.
8629 (upload_fast_traceframes): New.
8630 (IPA_FIRST_TRACEFRAME): New.
8631 (IPA_NEXT_TRACEFRAME_1): New.
8632 (IPA_NEXT_TRACEFRAME): New.
8633 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8634 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8635 (gdb_jump_pad_buffer_end): New.
8636 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8637 (initialize_tracepoint): Adjust.
8638 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8639 buffer. Initialize the low module.
8640 * utils.c (PREFIX, TOOLNAME): New.
8641 (malloc_failure): Use PREFIX.
8642 (error): In the IPA, an error causes an exit.
8643 (fatal, warning): Use PREFIX.
8644 (internal_error): Use TOOLNAME.
8645 (NUMCELLS): Increase to 10.
8646 * configure, config.in: Regenerate.
8647
8648 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8649
8650 * server.c (handle_query) <qSupported>: Do two passes over the
8651 qSupported string to avoid nesting strtok.
8652
8653 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8654
8655 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8656 (CDEPS): New.
8657 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8658 -Wl,--dynamic-list.
8659 * configure: Regenerate.
8660 * proc-service.list: New.
8661
8662 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8663
8664 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8665 New comment.
8666
8667 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8668
8669 * gdbreplay.c (remote_open): Check error return from socket() call by
8670 its equality to -1 not by it being negative.
8671 * remote-utils.c (remote_open): Likewise.
8672
8673 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8674
8675 * config.h: Regenerate.
8676
8677 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8678
8679 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8680 doesn't provide PTRACE_GET_THREAD_AREA.
8681
8682 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8683
8684 * linux-m68k-low.c: Include <asm/ptrace.h>
8685 (ps_get_thread_area): Implement.
8686
8687 2010-05-03 Doug Evans <dje@google.com>
8688
8689 * event-loop.c (struct callback_event): New struct.
8690 (callback_list): New global.
8691 (append_callback_event, delete_callback_event): New functions.
8692 (process_callback): New function.
8693 (start_event_loop): Call it.
8694 * remote-utils.c (NOT_SCHEDULED): Define.
8695 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8696 moved out of readchar.
8697 (readchar): Rewrite. Call reschedule before returning.
8698 (reset_readchar): New function.
8699 (remote_close): Call it.
8700 (process_remaining, reschedule): New functions.
8701 * server.h (callback_handler_func): New typedef.
8702 (append_callback_event, delete_callback_event): Declare.
8703
8704 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8705
8706 * proc-service.c (ps_pglobal_lookup): Use
8707 thread_db_look_up_one_symbol.
8708 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8709 parameter. Use it instead of all_symbols_looked_up.
8710 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8711 field.
8712 (all_symbols_looked_up): Don't declare.
8713 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8714 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8715 field.
8716 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8717 Set all_symbols_looked_up here.
8718 (thread_db_look_up_one_symbol): New.
8719 (thread_db_get_tls_address): Adjust.
8720 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8721 thread_db object on the heap, and tentatively set it in the
8722 process structure.
8723 (thread_db_init): Don't set all_symbols_looked_up here.
8724 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8725
8726 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8727
8728 * linux-low.c (linux_kill, linux_detach): Adjust.
8729 (status_pending_p_callback): Remove redundant statement. Check
8730 for !TARGET_WAITIKIND_IGNORE, instead of
8731 TARGET_WAITKIND_STOPPED.
8732 (handle_tracepoints): Make sure LWP is locked. Adjust.
8733 (linux_wait_for_event_1): Adjust.
8734 (linux_cancel_breakpoints): New.
8735 (unsuspend_one_lwp): New.
8736 (unsuspend_all_lwps): New.
8737 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8738 (send_sigstop_callback): Change return type to int, add new
8739 `except' parameter and handle it.
8740 (suspend_and_send_sigstop_callback): New.
8741 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8742 pass them down. If SUSPEND, also increment the lwp's suspend
8743 count.
8744 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8745 (need_step_over_p): Don't consider suspended LWPs.
8746 (start_step_over): Adjust.
8747 (proceed_one_lwp): Change return type to int, add new `except'
8748 parameter and handle it.
8749 (unsuspend_and_proceed_one_lwp): New.
8750 (proceed_all_lwps): Use find_inferior instead of
8751 for_each_inferior.
8752 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8753 also decrement the suspend count of LWPs. Pass `except' down,
8754 instead of hacking its suspend count.
8755 (linux_pause_all): Add `freeze' parameter. Adjust.
8756 (linux_unpause_all): New.
8757 (linux_target_ops): Install linux_unpause_all.
8758 * server.c (handle_status): Adjust.
8759 * target.h (struct target_ops): New fields `unpause_all' and
8760 `cancel_breakpoints'. Add new parameter to `pause_all'.
8761 (pause_all): Add new `freeze' parameter.
8762 (unpause_all): New.
8763 (cancel_breakpoints): New.
8764 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8765 cancel breakpoints.
8766 (cmd_qtstart): Pause threads.
8767 (stop_tracing): Pause threads, and cancel breakpoints.
8768 * win32-low.c (win32_target_ops): Adjust.
8769
8770 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8771
8772 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8773 the inferior right away from here...
8774 (linux_wait_1): ... to here, and adjust to check the thread's
8775 last_resume_kind instead of the lwp's step or stop_expected flags.
8776
8777 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8778
8779 * README: Use consistent `GDB' and `GDBserver' spellings.
8780
8781 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8782
8783 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8784 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8785 (linux_detach_one_lwp): Assume the lwp is stopped.
8786 (any_thread_of): Delete.
8787 (linux_detach): Stop all lwps here. Don't blindly delete all
8788 breakpoints.
8789 (delete_lwp_callback): New.
8790 (linux_mourn): Delete all lwps of the process that is gone.
8791 (linux_wait_1): Don't delete the last lwp of the process here.
8792 * mem-break.h (mark_breakpoints_out): Declare.
8793 * mem-break.c (mark_breakpoints_out): New.
8794 (free_all_breakpoints): Use it.
8795 * server.c (handle_target_event): If the process is gone, mark
8796 breakpoints out.
8797 * thread-db.c (struct thread_db) <create_bp>: New field.
8798 (thread_db_enable_reporting): Fix prototype. Store a thread event
8799 breakpoint reference in the thread_db struct.
8800 (thread_db_load_search): Clear the thread_db object.
8801 (try_thread_db_load_1): Ditto.
8802 (switch_to_process): New.
8803 (disable_thread_event_reporting): Use it.
8804 (remove_thread_event_breakpoints): New.
8805 (thread_db_detach, thread_db_mourn): Use it.
8806
8807 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8808
8809 * linux-low.c (linux_enable_event_reporting): New.
8810 (linux_wait_for_event_1, handle_extended_wait): Use it.
8811
8812 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8813
8814 * linux-low.c (linux_kill_one_lwp, linux_kill)
8815 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8816 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8817 SIGSTOP even if the LWP is stopped.
8818 (send_sigstop_callback): New.
8819 (stop_all_lwps): Use send_sigstop_callback instead.
8820 (linux_resume_one_thread): Adjust.
8821 (proceed_one_lwp): Still proceed an LWP that the client has
8822 requested to stop, if we haven't reported it as stopped yet. Make
8823 sure that LWPs the client want stopped, have a pending SIGSTOP.
8824
8825 2010-04-26 Doug Evans <dje@google.com>
8826
8827 * server.c (handle_general_set): Make static.
8828
8829 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8830 Print received char after testing for error/eof instead of before.
8831 (input_interrupt): Tweak comment.
8832
8833 2010-04-23 Doug Evans <dje@google.com>
8834
8835 * server.c (start_inferior): Print inferior argv if --debug.
8836
8837 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8838
8839 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8840 * nto-x86-low.c: Include server.h
8841
8842 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8843
8844 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8845 be consistent with other sources of this directory.
8846 (init_registers_amd64): Correct name of source file of this function
8847 in the comment.
8848
8849 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8850
8851 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8852 64-bit executables.
8853
8854 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8855
8856 * win32-i386-low.c: Add 64-bit support.
8857 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8858 (init_registers_amd64): Declare.
8859 (mappings): Add 64-bit version of array.
8860 (init_windows_x86): New function.
8861 (the_low_target): Change init_arch field to init_windows_x86.
8862
8863 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8864
8865 * win32-low.c: Adapt to support also 64-bit architecture.
8866 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8867 (get_image_name): Use SIZE_T type for local variable `done'.
8868 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8869 (toolhelp_get_dll_name): Idem.
8870 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8871 Use uintptr_t typecast to avoid warning.
8872 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8873 (handle_exception): Use phex_nz to avoid warning.
8874 (win32_wait): Remove unused local variable `process'.
8875
8876 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8877
8878 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8879 `amd64-avx.o'.
8880
8881 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8882
8883 * configure.ac: Use `ws2_32' library for srv_mingw.
8884 * configure: Regenerate.
8885 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8886 * remote-utils.c: Likewise.
8887
8888 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8889
8890 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8891 if __x86_64__ is defined.
8892
8893 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8894
8895 * configure: Regenerate.
8896
8897 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8898
8899 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8900 * target.h (target_ops): New get_tib_address field.
8901 * win32-low.h (win32_thread_info): Add thread_local_base field.
8902 * win32-low.c (child_add_thread): Add tlb argument.
8903 Set thread_local_base field to TLB.
8904 (get_child_debug_event): Adapt to child_add_thread change.
8905 (win32_get_tib_address): New function.
8906 (win32_target_ops): Set get_tib_address field to
8907 win32_get_tib_address.
8908 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8909
8910 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8911
8912 * linux-low.c (linux_mourn): Also remove the process.
8913 * server.c (handle_target_event): Don't remove the process here.
8914 * nto-low.c (nto_mourn): New.
8915 (nto_target_ops): Install it.
8916 * spu-low.c (spu_mourn): New.
8917 (spu_target_ops): Install it.
8918 * win32-low.c (win32_mourn): New.
8919 (win32_target_ops): Install it.
8920
8921 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8922
8923 * server.h (buffer_xml_printf): Remove redundant `;'.
8924
8925 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8926
8927 * regcache.c (set_register_cache): Invalidate regcaches before
8928 changing the register cache layout.
8929 (regcache_invalidate_one): Allow a NULL regcache.
8930 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8931 regcaches before changing the register cache layout or the target
8932 regsets.
8933
8934 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8935
8936 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8937 variable warning on Linux/x86-64.
8938
8939 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8940
8941 GDBserver disconnected tracing support.
8942
8943 * linux-low.c (linux_remove_process): Delete.
8944 (add_lwp): Don't set last_resume_kind here.
8945 (linux_kill): Use `mourn'.
8946 (linux_detach): Use `thread_db_detach', and `mourn'.
8947 (linux_mourn): New.
8948 (linux_attach_lwp_1): Adjust comment.
8949 (linux_attach): last_resume_kind moved the thread_info; adjust.
8950 (status_pending_p_callback): Adjust.
8951 (linux_wait_for_event_1): Adjust.
8952 (count_events_callback, select_singlestep_lwp_callback)
8953 (select_event_lwp_callback, cancel_breakpoints_callback)
8954 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8955 (proceed_one_lwp): Adjust.
8956 (linux_async): Add debug output.
8957 (linux_thread_stopped): New.
8958 (linux_pause_all): New.
8959 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8960 linux_pause_all.
8961 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8962 (thread_db_free): Delete declaration.
8963 (thread_db_detach, thread_db_mourn): Declare.
8964 * thread-db.c (thread_db_init): Use thread_db_mourn.
8965 (thread_db_free): Delete, split in two.
8966 (disable_thread_event_reporting): New.
8967 (thread_db_detach): New.
8968 (thread_db_mourn): New.
8969
8970 * server.h (struct thread_info) <last_resume_kind>: New field.
8971 <attached>: Add comment.
8972 <gdb_detached>: New field.
8973 (handler_func): Change return type to int.
8974 (handle_serial_event, handle_target_event): Ditto.
8975 (gdb_connected): Declare.
8976 (tracing): Delete.
8977 (disconnected_tracing): Declare.
8978 (stop_tracing): Declare.
8979
8980 * server.c (handle_query) <qSupported>: Report support for
8981 disconnected tracing.
8982 (queue_stop_reply_callback): Account for running threads.
8983 (gdb_wants_thread_stopped): New.
8984 (gdb_wants_all_threads_stopped): New.
8985 (gdb_reattached_process): New.
8986 (handle_status): Clear the `gdb_detached' flag of all processes.
8987 In all-stop, stop all threads.
8988 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8989 (process_serial_event): If the remote connection breaks, or if an
8990 exit was forced with "monitor exit", force an event loop exit.
8991 Handle disconnected tracing on detach.
8992 (handle_serial_event): Adjust.
8993 (handle_target_event): If GDB isn't connected, forward events back
8994 to the inferior, unless the last process exited, in which case,
8995 exit gdbserver. Adjust interface.
8996
8997 * remote-utils.c (remote_open): Don't block in accept. Instead
8998 register an event loop source on the listen socket file
8999 descriptor. Refactor bits into ...
9000 (listen_desc): ... this new global.
9001 (gdb_connected): ... this new function.
9002 (enable_async_notification): ... this new function.
9003 (handle_accept_event): ... this new function.
9004 (remote_close): Clear remote_desc.
9005
9006 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9007
9008 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9009 New fields.
9010 (mourn_inferior): Define.
9011 (target_process_qsupported): Avoid the dangling else problem.
9012 (thread_stopped): Define.
9013 (pause_all): Define.
9014 (target_waitstatus_to_string): Declare.
9015 * target.c (target_waitstatus_to_string): New.
9016
9017 * tracepoint.c (tracing): Make extern.
9018 (disconnected_tracing): New.
9019 (stop_tracing): Make extern. Handle tracing stops due to GDB
9020 disconnecting.
9021 (cmd_qtdisconnected): New.
9022 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9023 (handle_tracepoint_general_set): Handle QTDisconnected.
9024
9025 * event-loop.c (event_handler_func): Change return type to int.
9026 (process_event): Bail out if the event handler wants the event
9027 loop to stop.
9028 (handle_file_event): Ditto.
9029 (start_event_loop): Bail out if the event handler wants the event
9030 loop to stop.
9031
9032 * nto-low.c (nto_target_ops): Adjust.
9033 * spu-low.c (spu_wait): Don't remove the process here.
9034 (spu_target_ops): Adjust.
9035 * win32-low.c (win32_wait): Don't remove the process here.
9036 (win32_target_ops): Adjust.
9037
9038 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9039
9040 * regcache.c (realloc_register_cache): Invalidate inferior's
9041 regcache before recreating it.
9042
9043 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9044
9045 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9046
9047 2010-04-09 Stan Shebs <stan@codesourcery.com>
9048 Pedro Alves <pedro@codesourcery.com>
9049
9050 * server.h (LONGEST): New.
9051 (struct thread_info) <while_stepping>: New field.
9052 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9053 Declare.
9054 (initialize_tracepoint, handle_tracepoint_general_set)
9055 (handle_tracepoint_query, tracepoint_finished_step)
9056 (tracepoint_was_hit, release_while_stepping_state_list):
9057 (current_traceframe): Declare.
9058 * server.c (handle_general_set): Handle tracepoint packets.
9059 (read_memory): New.
9060 (write_memory): New.
9061 (handle_search_memory_1): Use read_memory.
9062 (handle_query): Report support for conditional tracepoints, trace
9063 state variables, and tracepoint sources. Handle tracepoint
9064 queries.
9065 (main): Initialize the tracepoints module.
9066 (process_serial_event): Handle traceframe reads/writes.
9067
9068 * linux-low.c (handle_tracepoints): New.
9069 (linux_wait_1): Call it.
9070 (linux_resume_one_lwp): Handle while-stepping.
9071 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9072 (linux_target_ops): Install them.
9073 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9074 New field.
9075 * linux-x86-low.c (x86_supports_tracepoints): New.
9076 (the_low_target). Install it.
9077
9078 * mem-break.h (delete_breakpoint): Declare.
9079 * mem-break.c (delete_breakpoint): Make external.
9080
9081 * target.h (struct target_ops): Add `supports_tracepoints',
9082 `read_pc', and `write_pc' fields.
9083 (target_supports_tracepoints): Define.
9084 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9085 (phex_nz): New.
9086
9087 * regcache.h (struct regcache) <registers_owned>: New field.
9088 (init_register_cache, regcache_cpy): Declare.
9089 (regcache_read_pc, regcache_write_pc): Declare.
9090 (register_cache_size): Declare.
9091 (supply_regblock): Declare.
9092 * regcache.c (init_register_cache): New.
9093 (new_register_cache): Use it.
9094 (regcache_cpy): New.
9095 (register_cache_size): New.
9096 (supply_regblock): New.
9097 (regcache_read_pc, regcache_write_pc): New.
9098
9099 * tracepoint.c: New.
9100
9101 * Makefile.in (OBS): Add tracepoint.o.
9102 (tracepoint.o): New rule.
9103
9104 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9105
9106 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9107 (i386-mmx.o): New.
9108 (i386-mmx.c): Likewise.
9109 (i386-mmx-linux.o): Likewise.
9110 (i386-mmx-linux.c): Likewise.
9111
9112 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9113 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9114 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9115 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9116
9117 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9118 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9119 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9120
9121 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9122
9123 * Makefile.in (clean): Updated.
9124 (i386-avx.o): New.
9125 (i386-avx.c): Likewise.
9126 (i386-avx-linux.o): Likewise.
9127 (i386-avx-linux.c): Likewise.
9128 (amd64-avx.o): Likewise.
9129 (amd64-avx.c): Likewise.
9130 (amd64-avx-linux.o): Likewise.
9131 (amd64-avx-linux.c): Likewise.
9132
9133 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9134 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9135 (srv_amd64_regobj): Add amd64-avx.o.
9136 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9137 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9138 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9139 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9140 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9141 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9142 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9143
9144 * i387-fp.c: Include "i386-xstate.h".
9145 (i387_xsave): New.
9146 (i387_cache_to_xsave): Likewise.
9147 (i387_xsave_to_cache): Likewise.
9148 (x86_xcr0): Likewise.
9149
9150 * i387-fp.h (i387_cache_to_xsave): Likewise.
9151 (i387_xsave_to_cache): Likewise.
9152 (x86_xcr0): Likewise.
9153
9154 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9155 * linux-crisv32-low.c (target_regsets): Likewise.
9156 * linux-m68k-low.c (target_regsets): Likewise.
9157 * linux-mips-low.c (target_regsets): Likewise.
9158 * linux-ppc-low.c (target_regsets): Likewise.
9159 * linux-s390-low.c (target_regsets): Likewise.
9160 * linux-sh-low.c (target_regsets): Likewise.
9161 * linux-sparc-low.c (target_regsets): Likewise.
9162 * linux-xtensa-low.c (target_regsets): Likewise.
9163
9164 * linux-low.c: Include <sys/uio.h>.
9165 (regsets_fetch_inferior_registers): Support nt_type.
9166 (regsets_store_inferior_registers): Likewise.
9167 (linux_process_qsupported): New.
9168 (linux_target_ops): Add linux_process_qsupported.
9169
9170 * linux-low.h (regset_info): Add nt_type.
9171 (linux_target_ops): Add process_qsupported.
9172
9173 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9174 and <sys/uio.h>.
9175 (init_registers_i386_avx_linux): New.
9176 (init_registers_amd64_avx_linux): Likewise.
9177 (xmltarget_i386_linux_no_xml): Likewise.
9178 (xmltarget_amd64_linux_no_xml): Likewise.
9179 (PTRACE_GETREGSET): Likewise.
9180 (PTRACE_SETREGSET): Likewise.
9181 (x86_fill_xstateregset): Likewise.
9182 (x86_store_xstateregset): Likewise.
9183 (use_xml): Likewise.
9184 (x86_linux_update_xmltarget): Likewise.
9185 (x86_linux_process_qsupported): Likewise.
9186 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9187 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9188 init_registers_i386_linux here. Call
9189 x86_linux_update_xmltarget.
9190 (the_low_target): Add x86_linux_process_qsupported.
9191
9192 * server.c (handle_query): Call target_process_qsupported.
9193
9194 * target.h (target_ops): Add process_qsupported.
9195 (target_process_qsupported): New.
9196
9197 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9198
9199 * inferiors.c (add_thread): Set last_status kind to
9200 TARGET_WAITKIND_IGNORE.
9201 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9202 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9203 (linux_wait_1): Move `thread' local definition to block that uses
9204 it. Don't NULL initialize `event_child'.
9205 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9206 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9207 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9208
9209 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9210
9211 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9212 an extended waitstatus, or by a watchpoint.
9213 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9214 thread was stepping or has been stopped by a watchpoint.
9215
9216 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9217
9218 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9219 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9220 of another, then delete the previous, and validate all
9221 breakpoints.
9222 (validate_inserted_breakpoint): New.
9223 (delete_disabled_breakpoints): New.
9224 (validate_breakpoints): New.
9225 (check_mem_read): Validate breakpoints before trusting their
9226 shadow. Delete disabled breakpoints.
9227 (check_mem_write): Validate breakpoints before trusting they
9228 should be inserted. Delete disabled breakpoints.
9229 * mem-break.h (validate_breakpoints):
9230 * server.c (handle_query): Validate breakpoints when we see a
9231 qSymbol query.
9232
9233 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9234
9235 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9236 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9237 if we could tell there's a GDB breakpoint at stop_pc.
9238 (need_step_over_p): Don't do a step over if we find a GDB
9239 breakpoint at the resume PC.
9240
9241 * mem-break.c (struct raw_breakpoint): New.
9242 (enum bkpt_type): New type `gdb_breakpoint'.
9243 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9244 fields. New field `raw'.
9245 (find_raw_breakpoint_at): New.
9246 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9247 breakpoint instead.
9248 (set_breakpoint_at): Adjust.
9249 (delete_raw_breakpoint): New.
9250 (release_breakpoint): New.
9251 (delete_breakpoint): Rename to...
9252 (delete_breakpoint_1): ... this. Add proc parameter. Use
9253 release_breakpoint. Return ENOENT.
9254 (delete_breakpoint): Reimplement.
9255 (find_breakpoint_at): Delete.
9256 (find_gdb_breakpoint_at): New.
9257 (delete_breakpoint_at): Delete.
9258 (set_gdb_breakpoint_at): New.
9259 (delete_gdb_breakpoint_at): New.
9260 (gdb_breakpoint_here): New.
9261 (set_reinsert_breakpoint): Use release_breakpoint.
9262 (uninsert_breakpoint): Rename to ...
9263 (uninsert_raw_breakpoint): ... this.
9264 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9265 (reinsert_raw_breakpoint): Change parameter type to
9266 raw_breakpoint.
9267 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9268 instead.
9269 (check_breakpoints): Adjust. Use release_breakpoint.
9270 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9271 (breakpoint_inserted_here): Ditto.
9272 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9273 Don't trust the breakpoint's shadow if it is not inserted.
9274 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9275 (delete_all_breakpoints): Adjust.
9276 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9277 use delete_breakpoint_1.
9278
9279 * mem-break.h (breakpoints_supported): Delete declaration.
9280 (set_gdb_breakpoint_at): Declare.
9281 (gdb_breakpoint_here): Declare.
9282 (delete_breakpoint_at): Delete.
9283 (delete_gdb_breakpoint_at): Declare.
9284
9285 * server.h (struct raw_breakpoint): Forward declare.
9286 (struct process_info): New field `raw_breakpoints'.
9287
9288 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9289 breakpoints.
9290
9291 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9292
9293 * linux-low.c (status_pending_p_callback): Fix comment.
9294 (linux_wait_for_event_1): Move most of the internal breakpoint
9295 handling from here...
9296 (linux_wait_1): ... to here.
9297 (count_events_callback): New.
9298 (select_singlestep_lwp_callback): New.
9299 (select_event_lwp_callback): New.
9300 (cancel_breakpoints_callback): New.
9301 (select_event_lwp): New.
9302 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9303 priority to all LWPs that have had events that should be reported
9304 to the client. Cancel breakpoints when about to reporting the
9305 event to the client, not while stopping lwps. No longer cancel
9306 finished single-steps here.
9307 (cancel_finished_single_step): Delete.
9308 (cancel_finished_single_steps): Delete.
9309
9310 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9311
9312 * mem-break.c (enum bkpt_type): New.
9313 (struct breakpoint): New field `type'.
9314 (set_breakpoint_at): Change return type to struct breakpoint
9315 pointer. Set type to `other_breakpoint' by default.
9316 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9317 in the breakpoint list.
9318 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9319 (reinsert_breakpoint): Rename to ...
9320 (reinsert_raw_breakpoint): ... this.
9321 (reinsert_breakpoints_at): Adjust.
9322 * mem-break.h (struct breakpoint): Declare.
9323 (set_breakpoint_at): Change return type to struct breakpoint
9324 pointer.
9325
9326 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9327
9328 * server.c (handle_query): Assign, not compare.
9329
9330 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9331
9332 Teach linux gdbserver to step-over-breakpoints.
9333
9334 * linux-low.c (can_hardware_single_step): New.
9335 (supports_breakpoints): New.
9336 (handle_extended_wait): If stopping threads, read the stop pc of
9337 the new cloned LWP.
9338 (get_pc): New.
9339 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9340 low target doesn't support retrieving the PC.
9341 (add_lwp): Set last_resume_kind to resume_continue.
9342 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9343 (linux_attach): Don't clear stop_expected. Set the lwp's
9344 last_resume_kind to resume_stop.
9345 (linux_detach_one_lwp): Don't check for removed breakpoints.
9346 (check_removed_breakpoint): Delete.
9347 (status_pending_p): Rename to ...
9348 (status_pending_p_callback): ... this. Don't check for removed
9349 breakpoints. Don't consider threads that are stopped from GDB's
9350 perspective.
9351 (linux_wait_for_lwp): Always read the stop_pc here.
9352 (cancel_breakpoint): New.
9353 (step_over_bkpt): New global.
9354 (linux_wait_for_event_1): Implement stepping over breakpoints.
9355 (gdb_wants_lwp_stopped): New.
9356 (gdb_wants_all_stopped): New.
9357 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9358 single-step traps here. Store the thread's last reported target
9359 wait status.
9360 (send_sigstop): Don't clear stop_expected. Always set it,
9361 instead.
9362 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9363 (cancel_finished_single_step): New.
9364 (cancel_finished_single_steps): New.
9365 (wait_for_sigstop): Don't cancel finished single-step traps here.
9366 (linux_resume_one_lwp): Don't check for removed breakpoints.
9367 Don't set `step' on non-hardware step archs.
9368 (linux_set_resume_request): Ignore resume_stop requests if already
9369 stopping or stopped. Set the lwp's last_resume_kind.
9370 (resume_status_pending_p): Don't check for removed breakpoints.
9371 (need_step_over_p): New.
9372 (start_step_over): New.
9373 (finish_step_over): New.
9374 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9375 requests. Clear the thread's last reported target waitstatus.
9376 Don't use the `suspended' flag. Don't consider pending breakpoints.
9377 (linux_resume): Start a step-over if necessary.
9378 (proceed_one_lwp): New.
9379 (proceed_all_lwps): New.
9380 (unstop_all_lwps): New.
9381 * linux-low.h (struct lwp_info): Rewrite comment for the
9382 `suspended' flag. Add the `stop_pc' field. Delete the
9383 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9384 Add `'last_resume_kind' and `need_step_over' fields.
9385 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9386 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9387 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9388 (set_raw_breakpoint_at): New.
9389 (set_breakpoint_at): Rewrite to use it.
9390 (reinsert_breakpoint_handler): Delete.
9391 (set_reinsert_breakpoint): New.
9392 (reinsert_breakpoint_by_bp): Delete.
9393 (delete_reinsert_breakpoints): New.
9394 (uninsert_breakpoint): Rewrite.
9395 (uninsert_breakpoints_at): New.
9396 (reinsert_breakpoint): Rewrite.
9397 (reinsert_breakpoints_at): New.
9398 (check_breakpoints): Rewrite.
9399 (breakpoint_here): New.
9400 (breakpoint_inserted_here): New.
9401 (check_mem_read): Adjust.
9402 * mem-break.h (breakpoints_supported, breakpoint_here)
9403 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9404 (reinsert_breakpoint_by_bp): Delete declaration.
9405 (delete_reinsert_breakpoints): Declare.
9406 (reinsert_breakpoint): Delete declaration.
9407 (reinsert_breakpoints_at): Declare.
9408 (uninsert_breakpoint): Delete declaration.
9409 (uninsert_breakpoints_at): Declare.
9410 (check_breakpoints): Adjust prototype.
9411 * server.h: Adjust include order.
9412 (struct thread_info): Declare here. Add a `last_status' field.
9413
9414 2010-03-23 Michael Snyder <msnyder@vmware.com>
9415
9416 * server.c (crc32): New function.
9417 (handle_query): Add handling for 'qCRC:' request.
9418
9419 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9420
9421 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9422 lwp had been stopped by a watchpoint.
9423
9424 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9425
9426 * server.h (internal_error): Declare.
9427 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9428 * utils.c (internal_error): New function.
9429
9430 2010-03-15 Andreas Schwab <schwab@redhat.com>
9431
9432 * configure.srv: Fix typo setting srv_regobj.
9433
9434 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9435
9436 * linux-low.c (fetch_register): Avoid passing a non string literal
9437 format to `error'.
9438 (usr_store_inferior_registers): Ditto.
9439
9440 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9441
9442 * linux-low.c (linux_write_memory): Bail out early if peeking
9443 memory failed.
9444
9445 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9446
9447 * linux-low.h (struct lwp_info): New fields
9448 `stopped_by_watchpoint' and `stopped_data_address'.
9449 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9450 here, and cache them in the lwp object.
9451 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9452 directly.
9453 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9454 field.
9455 (linux_stopped_by_watchpoint): Rewrite.
9456 (linux_stopped_data_address): Rewrite.
9457
9458 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9459
9460 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9461 switching the current inferior, not before.
9462
9463 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9464
9465 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9466 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9467 i386-linux.c and amd64-linux.c.
9468 (reg-i386.o): Removed.
9469 (reg-i386.c): Likewise.
9470 (reg-i386-linux.o): Likewise.
9471 (reg-i386-linux.c): Likewise.
9472 (reg-x86-64.o): Likewise.
9473 (reg-x86-64.c): Likewise.
9474 (reg-x86-64-linux.o): Likewise.
9475 (reg-x86-64-linux.c): Likewise.
9476 (i386.o): New.
9477 (i386.c): Likewise.
9478 (i386-linux.o): Likewise.
9479 (i386-linux.c): Likewise.
9480 (amd64.o): Likewise.
9481 (amd64.c): Likewise.
9482 (amd64-linux.o): Likewise.
9483 (amd64-linux.c): Likewise.
9484
9485 * configure.srv (srv_i386_regobj): New.
9486 (srv_i386_linux_regobj): Likewise.
9487 (srv_amd64_regobj): Likewise.
9488 (srv_amd64_linux_regobj): Likewise.
9489 (srv_i386_32bit_xmlfiles): Likewise.
9490 (srv_i386_64bit_xmlfiles): Likewise.
9491 (srv_i386_xmlfiles): Likewise.
9492 (srv_amd64_xmlfiles): Likewise.
9493 (srv_i386_linux_xmlfiles): Likewise.
9494 (srv_amd64_linux_xmlfiles): Likewise.
9495 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9496 srv_xmlfiles to $srv_i386_xmlfiles.
9497 (i[34567]86-*-mingw32ce*): Likewise.
9498 (i[34567]86-*-mingw*): Likewise.
9499 (i[34567]86-*-nto*): Likewise.
9500 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9501 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9502 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9503 (x86_64-*-linux*): Likewise.
9504
9505 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9506 (init_registers_amd64_linux): New.
9507 (x86_arch_setup): Replace init_registers_x86_64_linux with
9508 init_registers_amd64_linux.
9509
9510 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9511
9512 * configure.ac: Check for libdl. If it is not available link against
9513 static libthread_db.
9514 * configure: Regenerate.
9515
9516 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9517
9518 PR9605
9519
9520 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9521 handing a read watchpoint.
9522 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9523
9524 2010-02-12 Doug Evans <dje@google.com>
9525
9526 * linux-low.c (linux_supports_tracefork_flag): Document.
9527 (linux_look_up_symbols): Add comment.
9528
9529 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9530
9531 * regcache.c (supply_register): Clear regcache if buf is NULL.
9532
9533 2010-02-02 Nicolas Roche <roche@sourceware.org>
9534 Joel Brobecker <brobecker@adacore.com>
9535
9536 * inferiors.c (find_inferior): Add function documentation.
9537 (unloaded_dll): Handle the case where the unloaded dll has not
9538 been previously registered in the dll list.
9539
9540 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9541
9542 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9543 (thumb2_breakpoint): New.
9544 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9545
9546 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9547
9548 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9549 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9550 breakpoints.
9551
9552 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9553
9554 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9555
9556 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9557
9558 * linux-s390-low.c (s390_collect_ptrace_register)
9559 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9560
9561 2010-01-21 Doug Evans <dje@google.com>
9562
9563 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9564 (PTRACE_ARG4_TYPE): New macro.
9565 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9566 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9567 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9568 (usr_store_inferior_registers): Ditto.
9569 (linux_read_memory, linux_write_memory): Ditto.
9570 (linux_test_for_tracefork): Ditto.
9571
9572 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9573 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9574
9575 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9576
9577 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9578 target.
9579
9580 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9581
9582 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9583 prototype to take a regcache. Adjust.
9584
9585 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9586
9587 * regcache.h (struct thread_info): Forward declare.
9588 (struct regcache): New.
9589 (new_register_cache): Adjust prototype.
9590 (get_thread_regcache): Declare.
9591 (free_register_cache): Adjust prototype.
9592 (registers_to_string, registers_from_string): Ditto.
9593 (supply_register, supply_register_by_name, collect_register)
9594 (collect_register_as_string, collect_register_by_name): Ditto.
9595 * regcache.c (struct inferior_regcache_data): Delete.
9596 (get_regcache): Rename to ...
9597 (get_thread_regcache): ... this. Adjust. Switch inferior before
9598 fetching registers.
9599 (regcache_invalidate_one): Adjust.
9600 (regcache_invalidate): Fix prototype.
9601 (new_register_cache): Return the new register cache.
9602 (free_register_cache): Change prototype.
9603 (realloc_register_cache): Adjust.
9604 (registers_to_string): Change prototype to take a regcache. Adjust.
9605 (registers_from_string): Ditto.
9606 (register_data): Ditto.
9607 (supply_register): Ditto.
9608 (supply_register_by_name): Ditto.
9609 (collect_register): Ditto.
9610 (collect_register_as_string): Ditto.
9611 (collect_register_by_name): Ditto.
9612 * server.c (process_serial_event): Adjust.
9613 * linux-low.h (regset_fill_func, regset_store_func): Change
9614 prototype.
9615 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9616 Change prototype.
9617 * linux-low.c (get_stop_pc): Adjust.
9618 (check_removed_breakpoint): Adjust.
9619 (linux_wait_for_event): Adjust.
9620 (linux_resume_one_lwp): Adjust.
9621 (fetch_register): Add regcache parameter. Adjust.
9622 (usr_store_inferior_registers): Ditto.
9623 (regsets_fetch_inferior_registers): Ditto.
9624 (regsets_store_inferior_registers): Ditto.
9625 (linux_fetch_registers, linux_store_registers): Ditto.
9626 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9627 regcache. Adjust.
9628 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9629 Ditto.
9630 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9631 prototype to take a regcache.
9632 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9633 * remote-utils.c (convert_ascii_to_int, outreg)
9634 (prepare_resume_reply): Change prototype to take a regcache.
9635 Adjust.
9636 * target.h (struct target_ops) <fetch_registers, store_registers>:
9637 Change prototype to take a regcache.
9638 (fetch_inferior_registers, store_inferior_registers): Change
9639 prototype to take a regcache. Adjust.
9640 * proc-service.c (ps_lgetregs): Adjust.
9641 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9642 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9643 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9644 take a regcache. Adjust.
9645 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9646 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9647 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9648 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9649 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9650 (cris_cannot_fetch_register):
9651 (cris_breakpoint_at): Change prototype to take a regcache.
9652 Adjust.
9653 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9654 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9655 to take a regcache. Adjust.
9656 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9657 Adjust.
9658 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9659 take a regcache. Adjust.
9660 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9661 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9662 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9663 * linux-mips-low.c (mips_get_pc):
9664 (mips_set_pc): Change prototype to take a regcache. Adjust.
9665 (mips_reinsert_addr): Adjust.
9666 (mips_collect_register): Change prototype to take a regcache.
9667 Adjust.
9668 (mips_supply_register):
9669 (mips_collect_register_32bit, mips_supply_register_32bit)
9670 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9671 (mips_store_fpregset): Ditto.
9672 * linux-ppc-low.c (ppc_supply_ptrace_register)
9673 (ppc_supply_ptrace_register): Ditto.
9674 (parse_spufs_run): Adjust.
9675 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9676 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9677 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9678 take a regcache. Adjust.
9679 * linux-s390-low.c (s390_collect_ptrace_register)
9680 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9681 (s390_set_pc): Change prototype to take a regcache. Adjust.
9682 (s390_arch_setup): Adjust.
9683 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9684 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9685 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9686 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9687 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9688 regcache. Adjust.
9689 (sparc_breakpoint_at): Adjust.
9690 * linux-xtensa-low.c (xtensa_fill_gregset):
9691 (xtensa_store_gregset):
9692 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9693 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9694 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9695 prototype to take a regcache. Adjust.
9696 * win32-arm-low.c (arm_fetch_inferior_register)
9697 (arm_store_inferior_register): Change prototype to take a
9698 regcache. Adjust.
9699 * win32-i386-low.c (i386_fetch_inferior_register)
9700 (i386_store_inferior_register): Change prototype to take a
9701 regcache. Adjust.
9702 * win32-low.c (child_fetch_inferior_registers)
9703 (child_store_inferior_registers): Change prototype to take a
9704 regcache. Adjust.
9705 (win32_wait): Adjust.
9706 (win32_fetch_inferior_registers): Change prototype to take a
9707 regcache. Adjust.
9708 (win32_store_inferior_registers): Adjust.
9709 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9710 store_inferior_register>: Change prototype to take a regcache.
9711
9712 2010-01-20 Doug Evans <dje@google.com>
9713
9714 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9715 #ifdef.
9716 (linux_wait_for_event1, linux_init_signals): Ditto.
9717 (W_STOPCODE): Provide definition if missing.
9718
9719 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9720
9721 * linux-low.c (linux_core_of_thread): New.
9722 (compare_ints, show_process, list_threads): New.
9723 (linux_qxfer_osdata): Report threads and cores.
9724 (linux_target_op): Register linux_core_of_thread.
9725 * remote-utils.c (prepare_resume_reply): Report the core.
9726 (buffer_xml_printf): Support %d specifier.
9727 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9728 New.
9729 (handle_query): Handle qXfer:threads. Announce availability
9730 thereof.
9731 * target.h (struct target_ops): New field core_of_thread.
9732
9733 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9734
9735 * Makefile.in (clean): Remove new generated files.
9736 (reg-s390.o, reg-s390.c): Remove rules.
9737 (reg-s390x.o, reg-s390x.c): Likewise.
9738 (s390-linux32.o, s390-linux32.c): Add rules.
9739 (s390-linux64.o, s390-linux64.c): Likewise.
9740 (s390x-linux64.o, s390x-linux64.c): Likewise.
9741 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9742 * linux-s390-low.c: Include <elf.h>.
9743 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9744 (init_registers_s390): Remove prototype.
9745 (init_registers_s390x): Likewise.
9746 (init_registers_s390_linux32): Add prototype.
9747 (init_registers_s390_linux64): Likewise.
9748 (init_registers_s390x_linux64): Likewise.
9749 (s390_num_regs_3264): New define.
9750 (s390_regmap_3264): New global variable.
9751 (s390_cannot_fetch_register): Remove obsolete check.
9752 (s390_cannot_store_register): Likewise.
9753 (s390_collect_ptrace_register): Handle upper/lower register halves.
9754 (s390_supply_ptrace_register): Likewise.
9755 (s390_fill_gregset): Update to register number changes.
9756 (s390_get_hwcap): New routine.
9757 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9758 Install appropriate regmap and register set.
9759
9760 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9761
9762 * server.c (gdbserver_version): Update copyright year to 2010.
9763 * gdbreplay.c (gdbreplay_version): Likewise.
9764
9765 2009-12-28 Doug Evans <dje@google.com>
9766
9767 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9768 elf/external.h. Include <elf.h> instead but only if necessary.
9769
9770 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9771
9772 * linux-low.c (linux_remove_process): Remove `detaching'
9773 parameter. Don't release/detach from thread_db here.
9774 (linux_kill): Release/detach from thread_db here, ...
9775 (linux_detach): ... and here, before actually detaching.
9776 (linux_wait_1): ... and here, when a process exits.
9777 * thread-db.c (any_thread_of): New.
9778 (thread_db_free): Switch the current inferior to a thread of the
9779 passed in process.
9780
9781 2009-12-21 Doug Evans <dje@google.com>
9782
9783 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9784
9785 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9786 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9787 warning ifndef __NR_tkill. Move setting of errno there too.
9788 Delete unnecessary resetting of errno after syscall.
9789 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9790
9791 * configure.ac: Check for dladdr.
9792 * config.in: Regenerate.
9793 * configure: Regenerate.
9794 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9795 (try_thread_db_load): Update.
9796
9797 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9798
9799 2009-12-18 Doug Evans <dje@google.com>
9800
9801 * event-loop.c: Include unistd.h if it exists.
9802
9803 * linux-low.c (my_waitpid): Move definition away from being in
9804 between linux_tracefork_child/linux_test_for_tracefork.
9805
9806 * gdb_proc_service.h (psaddr_t): Fix type.
9807 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9808 signature to match glibc.
9809
9810 2009-12-16 Doug Evans <dje@google.com>
9811
9812 * linux-low.c (linux_read_memory): Fix argument to read.
9813
9814 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9815
9816 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9817 events, don't leave current_inferior pointing at null.
9818
9819 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9820
9821 * win32-low.c (LOG): Delete.
9822 (OUTMSG): Output to stderr.
9823 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9824 on compile time LOG macro.
9825 (win32_wait): Fix debug output.
9826
9827 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9828
9829 * win32-low.c (win32_add_one_solib): If the dll name is
9830 "ntdll.dll", prepend the system directory to the dll path.
9831
9832 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9833
9834 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9835
9836 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9837 Vladimir Prus <vladimir@codesourcery.com>
9838
9839 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9840 * configure.ac: Check for __mcoldfire__ and set
9841 gdb_cv_m68k_is_coldfire.
9842 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9843 reg-cf.o and reg-m68k.o.
9844 * configure: Regenerated.
9845
9846 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9847
9848 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9849 Pass it to thread_db_free.
9850 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9851 proper `detaching' argument to linux_remove_process.
9852 * linux-low.h (thread_db_free): Add `detaching' parameter.
9853 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9854 to thread_db_free.
9855 (thread_db_free): Add `detaching' parameter. Only
9856 call td_ta_clear_event if detaching from process.
9857
9858 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9859
9860 * thread-db.c (thread_db_free): Fix typo.
9861
9862 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9863
9864 PR gdb/10838
9865 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9866
9867 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9868
9869 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9870 with an i686 compiler.
9871 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9872 needed.
9873 * configure: Rebuilt.
9874
9875 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9876
9877 PR gdb/10783
9878
9879 * server.c (handle_search_memory_1): Correct read_addr initialization
9880 in loop for searching subsequent chunks.
9881
9882 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9883
9884 * configure.ac: New --with-libthread-db option.
9885 * thread-db.c: Allow direct dependence on libthread_db.
9886 (thread_db_free): Adjust.
9887 * config.in: Regenerate.
9888 * configure: Likewise.
9889
9890 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9891
9892 PR gdb/10757
9893 * thread-db.c (attach_thread): New function.
9894 (maybe_attach_thread): Return success/failure.
9895 (find_new_threads_callback): Adjust.
9896 (thread_db_find_new_threads): Loop until no new threads.
9897
9898 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9899
9900 * proc-service.c (ps_lgetregs): Formatting.
9901
9902 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9903
9904 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9905 * configure.ac: Adjust.
9906 * linux-low.h (struct process_info_private): Move members to struct
9907 thread_db.
9908 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9909 * linux-low.c (linux_remove_process): Adjust.
9910 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9911 * server.c (handle_query): Move code ...
9912 (handle_monitor_command): ... here. New function.
9913 * target.h (struct target_ops): New member.
9914 * thread-db.c (struct thread_db): New.
9915 (libthread_db_search_path): New variable.
9916 (thread_db_create_event, thread_db_enable_reporting)
9917 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9918 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9919 (try_thread_db_load_1, dladdr_to_soname): New functions.
9920 (try_thread_db_load, thread_db_load_search): New functions.
9921 (thread_db_init): Search for libthread_db.
9922 (thread_db_free): New function.
9923 (thread_db_handle_monitor_command): Likewise.
9924 * config.in: Regenerate.
9925 * configure: Regenerate.
9926
9927 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9928
9929 * spu-low.c (spu_kill): Wait for inferior to terminate.
9930 Call clear_inferiors.
9931 (spu_detach): Call clear_inferiors.
9932
9933 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9934
9935 * aclocal.m4: Regenerate.
9936 * config.in: Likewise.
9937 * configure: Likewise.
9938
9939 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9940
9941 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9942 (parse_spufs_run): New function.
9943 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9944 (ppc_breakpoint_at): Handle SPU breakpoints.
9945
9946 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9947
9948 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9949 (SPUFS_MAGIC): Define.
9950 (spu_enumerate_spu_ids): New function.
9951 (linux_qxfer_spu): New function.
9952 (linux_target_ops): Install linux_qxfer_spu.
9953
9954 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9955
9956 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9957 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9958 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9959 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9960 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9961 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9962 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9963 (init_registers_powerpc_cell32l): Add prototype.
9964 (init_registers_powerpc_cell64l): Likewise.
9965 (ppc_arch_setup): Detect Cell/B.E. architecture.
9966
9967 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9968
9969 * Makefile.in (datarootdir): New variable.
9970
9971 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9972
9973 * linux-low.c (linux_write_memory): Update debugging output.
9974 * Makefile.in (clean): Add new descriptions.
9975 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9976 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9977 * configure.srv: Add new files for arm*-*-linux*.
9978 * linux-arm-low.c: Add new declarations.
9979 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9980 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9981 (HWCAP_VFPv3D16): New.
9982 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9983 instead of __IWMMXT__.
9984 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9985 (arm_arch_setup): New.
9986 (target_regsets): Remove #ifdef. Add VFP regset.
9987 (the_low_target): Use arm_arch_setup.
9988
9989 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9990
9991 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9992 the main thread again.
9993
9994 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9995
9996 Adding Neutrino gdbserver.
9997 * configure: Regenerated.
9998 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9999 * configure.srv (i[34567]86-*-nto*): New target.
10000 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10001 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10002 (nto_comctrl) [__QNX__]: New function.
10003 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10004
10005 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10006
10007 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10008 srv_tgtobj.
10009
10010 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10011 Pedro Alves <pedro@codesourcery.com>
10012
10013 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10014 don't support CONTEXT_EXTENDED_REGISTERS.
10015 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10016 (the_low_target): Install them.
10017 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10018 failing with ERROR_PIPE_NOT_CONNECTED.
10019
10020 2009-06-30 Doug Evans <dje@google.com>
10021 Pierre Muller <muller@ics.u-strasbg.fr>
10022
10023 Add h/w watchpoint support to x86-linux, win32-i386.
10024 * Makefile.in (SFILES): Add i386-low.c
10025 (i386_low_h): Define.
10026 (i386-low.o): Add dependencies.
10027 (linux-x86-low.o): Add i386-low.h dependency.
10028 (win32-i386-low.o): Ditto.
10029 * i386-low.c: New file.
10030 * i386-low.h: New file.
10031 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10032 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10033 * linux-low.c (linux_add_process): Initialize arch_private.
10034 (linux_remove_process): Free arch_private.
10035 (add_lwp): Initialize arch_private.
10036 (delete_lwp): Free arch_private.
10037 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10038 provided.
10039 * linux-low.h (process_info_private): New member arch_private.
10040 (lwp_info): New member arch_private.
10041 (linux_target_ops): New members new_process, new_thread,
10042 prepare_to_resume.
10043 (ptid_of): New macro.
10044 * linux-x86-low.c: Include stddef.h, i386-low.h.
10045 (arch_process_info): New struct.
10046 (arch_lwp_info): New struct.
10047 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10048 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10049 (i386_dr_low_get_status): New function.
10050 (x86_insert_point, x86_remove_point): New functions.
10051 (x86_stopped_by_watchpoint): New function.
10052 (x86_stopped_data_address): New function.
10053 (x86_linux_new_process, x86_linux_new_thread): New functions.
10054 (x86_linux_prepare_to_resume): New function.
10055 (the_low_target): Add entries for insert_point, remove_point,
10056 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10057 prepare_to_resume.
10058 * server.c (debug_hw_points): New global.
10059 (monitor_show_help): Document set debug-hw-points.
10060 (handle_query): Process "set debug-hw-points".
10061 * server.h (debug_hw_points): Declare.
10062 (paddress): Declare.
10063 * utils.c (NUMCELLS, CELLSIZE): New macros.
10064 (get_sell, xsnprintf, paddress): New functions.
10065 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10066 remove_point, stopped_by_watchpoint, stopped_data_address.
10067 * win32-i386-low.c: Include i386-low.h.
10068 (debug_reg_state): Replaces dr.
10069 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10070 (i386_dr_low_get_status): New function.
10071 (i386_insert_point, i386_remove_point): New functions.
10072 (i386_stopped_by_watchpoint): New function.
10073 (i386_stopped_data_address): New function.
10074 (i386_initial_stuff): Update.
10075 (get_thread_context,set_thread_context,i386_thread_added): Update.
10076 (the_low_target): Add entries for insert_point,
10077 remove_point, stopped_by_watchpoint, stopped_data_address.
10078 * win32-low.c (win32_insert_watchpoint): New function.
10079 (win32_remove_watchpoint): New function.
10080 (win32_stopped_by_watchpoint): New function.
10081 (win32_stopped_data_address): New function.
10082 (win32_target_ops): Add entries for insert_watchpoint,
10083 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10084 * win32-low.h (win32_target_ops): New members insert_point,
10085 remove_point, stopped_by_watchpoint, stopped_data_address.
10086
10087 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10088
10089 * server.c (process_serial_event): Re-return unsupported, not
10090 error, if the type isn't recognized. Re-allow supporting only
10091 insert or remove packets. Also call require_running for
10092 breakpoints. Add missing break statement to default case. Tidy.
10093 * target.h (struct target_ops): Rename insert_watchpoint to
10094 insert_point, and remove_watchpoint to remove_point.
10095
10096 * linux-low.h (struct linux_target_ops): Likewise.
10097 * linux-low.c (linux_insert_watchpoint): Rename to ...
10098 (linux_insert_point): ... this. Adjust.
10099 (linux_remove_watchpoint): Rename to ...
10100 (linux_remove_point): ... this. Adjust.
10101 (linux_target_ops): Adjust.
10102 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10103 (cris_insert_point): ... this.
10104 (cris_remove_watchpoint): Rename to ...
10105 (cris_remove_point): ... this.
10106 (the_low_target): Adjust.
10107
10108 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10109
10110 * server.c (handle_v_kill): Pass signal_pid to
10111 kill_inferior if multi_process is zero.
10112
10113 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10114
10115 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10116 * target.h (target_ops): Comment for *_watchpoint to make it clear
10117 the functions can get types '0' and '1'.
10118
10119 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10120
10121 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10122 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10123 * regcache.c (get_regcache): Likewise.
10124 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10125 * win32-low.c (child_fetch_inferior_registers): Remove check for
10126 regno 0.
10127
10128 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10129 Pedro Alves <pedro@codesourcery.com>
10130
10131 * target.h (struct target_ops) <supports_multi_process>: New
10132 callback.
10133 (target_supports_multi_process): New.
10134 * server.c (handle_query): Even if GDB reports support, only
10135 enable multi-process if the target also supports it. Report
10136 multi-process support only if the target backend supports it.
10137 * linux-low.c (linux_supports_multi_process): New function.
10138 (linux_target_ops): Install it as target_supports_multi_process
10139 callback.
10140
10141 2009-05-24 Doug Evans <dje@google.com>
10142
10143 Global renaming of find_thread_pid to find_thread_ptid.
10144 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10145 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10146 All callers updated.
10147
10148 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10149 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10150 directly.
10151
10152 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10153 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10154 (linux_resume_one_lwp): Ditto.
10155
10156 2009-05-23 Doug Evans <dje@google.com>
10157
10158 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10159 from struct inferior_list_entry * to struct lwp_info *.
10160 All callers updated.
10161
10162 2009-05-13 Doug Evans <dje@google.com>
10163
10164 * linux-x86-low.c: Don't include assert.h.
10165 (x86_siginfo_fixup): Use fatal, not assert.
10166 (x86_arch_setup): Fix comment.
10167
10168 2009-05-12 Doug Evans <dje@google.com>
10169
10170 Biarch support for i386/amd64 gdbserver.
10171 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10172 Add linux-x86-low.c.
10173 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10174 (linux-x86-low.o): Add.
10175 * linux-x86-64-low.c: Delete.
10176 * linux-i386-low.c: Delete.
10177 * linux-x86-low.c: New file.
10178 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10179 linux-x86-low.o.
10180 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10181 linux-x86-low.o.
10182 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10183 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10184 (linux_child_pid_to_exec_file): New function.
10185 (elf_64_header_p, elf_64_file_p): New functions.
10186 (siginfo_fixup): New function.
10187 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10188 give target a chance to convert layout.
10189 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10190 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10191
10192 2009-05-07 Doug Evans <dje@google.com>
10193
10194 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10195 (regsets_store_inferior_registers): Ditto.
10196
10197 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10198
10199 PR server/10048
10200
10201 * linux-low.c (must_set_ptrace_flags): Delete.
10202 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10203 of the global.
10204 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10205 `lwp->must_set_ptrace_flags' instead.
10206 (linux_wait_for_event_1): Set ptrace options here.
10207 (linux_wait_1): ... not here.
10208
10209 2009-04-30 Doug Evans <dje@google.com>
10210
10211 * inferiors.c (started_inferior_callback): New function.
10212 (attached_inferior_callback): New function.
10213 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10214 * server.c (print_started_pid, print_attached_pid): New functions.
10215 (detach_or_kill_for_exit): New function.
10216 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10217 * server.h (have_started_inferiors_p): Declare.
10218 (have_attached_inferiors_p): Declare.
10219
10220 * inferiors.c (remove_process): Fix memory leak, free process.
10221 * linux-low.c (linux_remove_process): New function.
10222 (linux_kill): Call it instead of remove_process.
10223 (linux_detach, linux_wait_1): Ditto.
10224
10225 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10226
10227 * configure.srv: Add x86 Windows CE target.
10228
10229 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10230
10231 * inferiors.c (get_thread_process): Make global.
10232 * server.h (get_thread_process): Add prototype.
10233 * thread-db.c (find_one_thread): Use get_thread_process
10234 instead of current_process.
10235 (thread_db_get_tls_address): Do not crash if called when
10236 thread layer is not yet initialized.
10237
10238 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10239
10240 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10241 * spu-low.c (current_tid): Rename to ...
10242 (current_ptid): ... this.
10243 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10244 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10245 ptid_get_lwp (current_ptid) instead of current_tid.
10246 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10247 instead of current_tid. Use find_process_pid to verify pid
10248 argument is valid. Pass proper argument to remove_process.
10249 (spu_thread_alive): Compare current_ptid instead of current_tid.
10250 (spu_resume): Likewise.
10251
10252 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10253
10254 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10255 variable.
10256
10257 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10258
10259 Implement the multiprocess extensions, and add linux multiprocess
10260 support.
10261
10262 * server.h (ULONGEST): Declare.
10263 (struct ptid, ptid_t): New.
10264 (minus_one_ptid, null_ptid): Declare.
10265 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10266 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10267 (struct inferior_list_entry): Change `id' type from unsigned from
10268 to ptid_t.
10269 (struct sym_cache, struct breakpoint, struct
10270 process_info_private): Forward declare.
10271 (struct process_info): Declare.
10272 (current_process): Declare.
10273 (all_processes): Declare.
10274 (initialize_inferiors): Declare.
10275 (add_thread): Adjust to use ptid_t.
10276 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10277 (add_process, remove_process, find_thread_pid): Declare.
10278 (find_inferior_id): Adjust to use ptid_t.
10279 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10280 (multi_process): Declare.
10281 (push_event): Adjust to use ptid_t.
10282 (read_ptid, write_ptid): Declare.
10283 (prepare_resume_reply): Adjust to use ptid_t.
10284 (clear_symbol_cache): Declare.
10285 * inferiors.c (all_processes): New.
10286 (null_ptid, minus_one_ptid): New.
10287 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10288 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10289 (add_thread): Change unsigned long to ptid. Remove gdb_id
10290 parameter. Adjust.
10291 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10292 (gdb_id_to_thread): Rename to ...
10293 (find_thread_pid): ... this. Change unsigned long to ptid.
10294 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10295 (loaded_dll, pull_pid_from_list): Adjust.
10296 (add_process, remove_process, find_process_pid)
10297 (get_thread_process, current_process, initialize_inferiors): New.
10298 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10299 (struct target_waitstatus) <related_pid>: Ditto.
10300 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10301 return type to int.
10302 (struct target_ops) <join>: Add `pid' argument.
10303 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10304 (struct target_ops) <wait>: Add `ptid' field. Change return type
10305 to ptid.
10306 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10307 (mywait): Add `ptid' argument. Change return type to ptid_t.
10308 (target_pid_to_str): Declare.
10309 * target.c (set_desired_inferior): Adjust to use ptids.
10310 (mywait): Add new `ptid' argument. Adjust.
10311 (target_pid_to_str): New.
10312 * mem-break.h (free_all_breakpoints): Declare.
10313 * mem-break.c (breakpoints): Delelete.
10314 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10315 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10316 to use per-process breakpoint list.
10317 (free_all_breakpoints): New.
10318 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10319 (symbol_cache, all_symbols_looked_up): Delete.
10320 (hexchars): New.
10321 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10322 read_ptid): New.
10323 (prepare_resume_reply): Change ptid argument's type from unsigned
10324 long to ptid_t. Adjust. Implement W;process and X;process.
10325 (free_sym_cache, clear_symbol_cache): New.
10326 (look_up_one_symbol): Adjust to per-process symbol cache. *
10327 * server.c (cont_thread, general_thread, step_thread): Change type
10328 to ptid_t.
10329 (attached): Delete.
10330 (multi_process): New.
10331 (last_ptid): Change type to ptid_t.
10332 (struct vstop_notif) <ptid>: Change type to ptid_t.
10333 (queue_stop_reply, push_event): Change `ptid' argument's type to
10334 ptid_t.
10335 (discard_queued_stop_replies): Add `pid' argument.
10336 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10337 changes. Don't reference the `attached' global.
10338 (attach_inferior): Adjust to mywait interface changes.
10339 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10340 features. Handle and report "multiprocess+". Handle
10341 "qAttached:PID".
10342 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10343 changes.
10344 (handle_v_kill): New.
10345 (handle_v_stopped): Adjust to use target_pid_to_str.
10346 (handle_v_requests): Allow multiple attaches and runs when
10347 multiprocess extensions are in effect. Handle "vKill".
10348 (myresume): Adjust to use ptids.
10349 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10350 (handle_status): Adjust to discard_queued_stop_replies interface
10351 change.
10352 (first_thread_of, kill_inferior_callback)
10353 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10354 (main): Call initialize_inferiors. Adjust to use ptids, killing
10355 and detaching from all inferiors. Handle multiprocess packet
10356 variants.
10357 * linux-low.h: Include gdb_proc_service.h.
10358 (struct process_info_private): New.
10359 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10360 <lwpid_of>: Use ptid_get_lwp.
10361 (get_lwp_thread): Adjust.
10362 (struct lwp_info): Add `dead' member.
10363 (find_lwp_pid): Declare.
10364 * linux-low.c (thread_db_active): Delete.
10365 (new_inferior): Adjust comment.
10366 (inferior_pid): Delete.
10367 (linux_add_process): New.
10368 (handle_extended_wait): Adjust.
10369 (add_lwp): Change unsigned long to ptid.
10370 (linux_create_inferior): Add process to processes table. Adjust
10371 to use ptids. Don't set new_inferior here.
10372 (linux_attach_lwp): Rename to ...
10373 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10374 it. Adjust to use ptids.
10375 (linux_attach_lwp): New.
10376 (linux_attach): Add process to processes table. Don't set
10377 new_inferior here.
10378 (struct counter): New.
10379 (second_thread_of_pid_p, last_thread_of_process_p): New.
10380 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10381 multiple processes.
10382 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10383 processes. Remove process from process table.
10384 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10385 to multiple processes.
10386 (any_thread_of): New.
10387 (linux_detach): Add `pid' argument, and handle it. Remove process
10388 from processes table.
10389 (linux_join): Add `pid' argument. Handle it.
10390 (linux_thread_alive): Change unsighed long argument to ptid_t.
10391 Consider dead lwps as not being alive.
10392 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10393 threads we're not interested in.
10394 (same_lwp, find_lwp_pid): New.
10395 (linux_wait_for_lwp): Change `pid' argument's type from int to
10396 ptid_t. Adjust.
10397 (linux_wait_for_event): Rename to ...
10398 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10399 from int to ptid_t. Adjust.
10400 (linux_wait_for_event): New.
10401 (linux_wait_1): Add `ptid' argument. Change return type to
10402 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10403 that exit from the process table.
10404 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10405 Adjust.
10406 (mark_lwp_dead): New.
10407 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10408 stopping all threads, mark its main lwp as dead.
10409 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10410 ptids.
10411 (fetch_register, usr_store_inferior_registers)
10412 (regsets_fetch_inferior_registers)
10413 (regsets_store_inferior_registers, linux_read_memory)
10414 (linux_write_memory): Inline `inferior_pid'.
10415 (linux_look_up_symbols): Adjust to use per-process
10416 `thread_db_active'.
10417 (linux_request_interrupt): Adjust to use ptids.
10418 (linux_read_auxv): Inline `inferior_pid'.
10419 (initialize_low): Don't reference thread_db_active.
10420 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10421 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10422 (ps_getpid): Return the pid of the current inferior.
10423 * thread-db.c (proc_handle, thread_agent): Delete.
10424 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10425 per-process data.
10426 (find_one_thread): Change argument type to ptid_t. Adjust to
10427 per-process data.
10428 (maybe_attach_thread): Adjust to per-process data and ptids.
10429 (thread_db_find_new_threads): Ditto.
10430 (thread_db_init): Ditto.
10431 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10432 processes table. Adjust to use ptids.
10433 (spu_kill, spu_detach): Adjust interface. Remove process from
10434 processes table.
10435 (spu_join, spu_thread_alive): Adjust interface.
10436 (spu_wait): Adjust interface. Remove process from processes
10437 table. Adjust to use ptids.
10438 * win32-low.c (current_inferior_tid): Delete.
10439 (current_inferior_ptid): New.
10440 (debug_event_ptid): New.
10441 (thread_rec): Take a ptid. Adjust.
10442 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10443 (child_delete_thread): Ditto.
10444 (do_initial_child_stuff): Add `attached' argument. Add process to
10445 processes table.
10446 (child_fetch_inferior_registers, child_store_inferior_registers):
10447 Adjust.
10448 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10449 (win32_attach): Pass 1 to do_initial_child_stuff.
10450 (win32_kill): Adjust interface. Remove process from processes
10451 table.
10452 (win32_detach): Ditto.
10453 (win32_join): Adjust interface.
10454 (win32_thread_alive): Take a ptid.
10455 (win32_resume): Adjust to use ptids.
10456 (get_child_debug_event): Ditto.
10457 (win32_wait): Adjust interface. Remove exiting process from
10458 processes table.
10459
10460 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10461
10462 Non-stop mode support.
10463
10464 * server.h (non_stop): Declare.
10465 (gdb_client_data, handler_func): Declare.
10466 (delete_file_handler, add_file_handler, start_event_loop):
10467 Declare.
10468 (handle_serial_event, handle_target_event, push_event)
10469 (putpkt_notif): Declare.
10470 * target.h (enum resume_kind): New.
10471 (struct thread_resume): Replace `step' field by `kind' field.
10472 (TARGET_WNOHANG): Define.
10473 (struct target_ops) <wait>: Add `options' argument.
10474 <supports_non_stop, async, start_non_stop>: New fields.
10475 (target_supports_non_stop, target_async): New.
10476 (start_non_stop): Declare.
10477 (mywait): Add `options' argument.
10478 * target.c (mywait): Add `options' argument. Print child exit
10479 notifications here.
10480 (start_non_stop): New.
10481 * server.c (non_stop, own_buf, mem_buf): New globals.
10482 (struct vstop_notif): New.
10483 (notif_queue): New global.
10484 (queue_stop_reply, push_event, discard_queued_stop_replies)
10485 (send_next_stop_reply): New.
10486 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10487 interface changes.
10488 (attach_inferior): In non-stop mode, don't wait for the target
10489 here.
10490 (handle_general_set): Handle QNonStop.
10491 (handle_query): When handling qC, return the current general
10492 thread, instead of the first thread of the list.
10493 (handle_query): If the backend supports non-stop mode, include
10494 QNonStop+ in the qSupported query response.
10495 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10496 and non-stop mode.
10497 (handle_v_attach, handle_v_run): Handle non-stop mode.
10498 (handle_v_stopped): New.
10499 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10500 (myresume): Adjust to use resume_kind. Handle non-stop.
10501 (queue_stop_reply_callback): New.
10502 (handle_status): Handle non-stop mode.
10503 (main): Clear non_stop flag on reconnection. Use the event-loop.
10504 Refactor serial protocol handling from here ...
10505 (process_serial_event): ... to this new function. When GDB
10506 selects any thread, select one here. In non-stop mode, wait until
10507 GDB acks all pending events before exiting.
10508 (handle_serial_event, handle_target_event): New.
10509 * remote-utils.c (remote_open): Install remote_desc in the event
10510 loop.
10511 (remote_close): Remove remote_desc from the event loop.
10512 (putpkt_binary): Rename to...
10513 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10514 (putpkt_binary): New as wrapper around putpkt_binary_1.
10515 (putpkt_notif): New.
10516 (prepare_resume_reply): In non-stop mode, don't change the
10517 general_thread.
10518 * event-loop.c: New.
10519 * Makefile.in (OBJ): Add event-loop.o.
10520 (event-loop.o): New rule.
10521
10522 * linux-low.h (pid_of): Moved here.
10523 (lwpid_of): New.
10524 (get_lwp_thread): Use lwpid_of.
10525 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10526 * linux-low.c (pid_of): Delete.
10527 (inferior_pid): Use lwpid_of.
10528 (linux_event_pipe): New.
10529 (target_is_async_p): New.
10530 (delete_lwp): New.
10531 (handle_extended_wait): Use lwpid_of.
10532 (add_lwp): Don't set lwpid field.
10533 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10534 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10535 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10536 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10537 first. Adjust to linux_wait_for_event interface changes. Use
10538 lwpid_of.
10539 (linux_detach): Don't delete the main lwp here.
10540 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10541 (status_pending_p): Don't consider explicitly suspended lwps.
10542 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10543 pointer. Add OPTIONS argument. Change return type to int. Use
10544 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10545 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10546 pointer. Add status pointer argument. Return a pid instead of a
10547 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10548 changes. In non-stop mode, don't switch to a random thread.
10549 (linux_wait): Rename to...
10550 (linux_wait_1): ... this. Add target_options argument, and handle
10551 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10552 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10553 clean exit and signal exit code. Don't stop all threads in
10554 non-stop mode. In all-stop mode, only stop all threads when
10555 reporting a stop to GDB. Handle explicit thread stop requests.
10556 (async_file_flush, async_file_mark): New.
10557 (linux_wait): New.
10558 (send_sigstop): Use lwpid_of.
10559 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10560 interface changes. In non-stop mode, don't switch to a random
10561 thread.
10562 (linux_resume_one_lwp): Use lwpid_of.
10563 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10564 (linux_resume_one_thread): ... this. Handle resume_stop. In
10565 non-stop mode, don't look for pending flag in all threads.
10566 (resume_status_pending_p): Don't consider explicitly suspended
10567 threads.
10568 (my_waitpid): Reimplement. Emulate __WALL.
10569 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10570 Use lwpid_of.
10571 (sigchld_handler, linux_supports_non_stop, linux_async)
10572 (linux_start_non_stop): New.
10573 (linux_target_ops): Register linux_supports_non_stop, linux_async
10574 and linux_start_non_stop.
10575 (initialize_low): Install SIGCHLD handler.
10576 * thread-db.c (thread_db_create_event, find_one_thread)
10577 (thread_db_get_tls_address): Use lwpid_of.
10578 * win32-low.c (win32_detach): Adjust to use resume_kind.
10579 (win32_wait): Add `options' argument.
10580 * spu-low.c (spu_resume): Adjust to use resume_kind.
10581 (spu_wait): Add `options' argument.
10582
10583 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10584
10585 Decouple target code from remote protocol.
10586
10587 * target.h (enum target_waitkind): New.
10588 (struct target_waitstatus): New.
10589 (struct target_ops) <wait>: Return an unsigned long. Take a
10590 target_waitstatus pointer instead of a char pointer.
10591 (mywait): Likewise.
10592 * target.c (mywait): Change prototype to return an unsigned long.
10593 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10594 * server.h (thread_from_wait, old_thread_from_wait): Delete
10595 declarations.
10596 (prepare_resume_reply): Change prototype to take a
10597 target_waitstatus.
10598 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10599 (last_status, last_ptid): New.
10600 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10601 pid instead of a signal.
10602 (attach_inferior): Remove "status" and "signal" parameters.
10603 Adjust.
10604 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10605 not as an address.
10606 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10607 (handle_v_requests, myresume): Remove "status" and "signal"
10608 parameters. Adjust.
10609 (handle_status): New.
10610 (main): Delete local `status'. Adjust.
10611 * remote-utils.c: Include target.h.
10612 (prepare_resume_reply): Change prototype to take a
10613 target_waitstatus. Adjust.
10614
10615 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10616 interface.
10617 * spu-low.c (spu_wait): Adjust.
10618 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10619 Delete.
10620 (win32_wait): Adjust.
10621
10622 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10623
10624 * target.h (struct thread_resume): Delete leave_stopped member.
10625 (struct target_ops): Add a `n' argument to the `resume' callback.
10626 * server.c (start_inferior): Adjust.
10627 (handle_v_cont, myresume): Adjust.
10628 * linux-low.c (check_removed_breakpoint): Adjust to resume
10629 interface change, and to removed leave_stopped field.
10630 (resume_ptr): Delete.
10631 (struct thread_resume_array): New.
10632 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10633 resume interface change.
10634 (linux_continue_one_thread, linux_queue_one_thread)
10635 (resume_status_pending_p): Check if the resume field is NULL
10636 instead of checking the leave_stopped member.
10637 (linux_resume): Adjust to the target resume interface change.
10638 * spu-low.c (spu_resume): Adjust to the target resume interface
10639 change.
10640 * win32-low.c (win32_detach, win32_resume): Ditto.
10641
10642 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10643
10644 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10645 flag.
10646 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10647 pending.
10648 (linux_continue_one_thread): Only preserve the stepping flag if
10649 there's a pending breakpoint.
10650
10651 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10652
10653 * server.c (main): After the inferior having exited, call
10654 remote_close before exiting gdbserver.
10655
10656 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10657
10658 Fix size of FPSCR in Power 7 processors.
10659 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10660 (PPC_FEATURE_HAS_DFP): New #define.
10661 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10662 size of the FPSCR.
10663
10664 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10665
10666 * server.c (handle_query) Whitespace and formatting.
10667
10668 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10669
10670 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10671 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10672 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10673 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10674 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10675 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10676 Makefile.in, configure.ac: Fix whitespace throughout.
10677 * configure: Regenerate.
10678
10679 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10680
10681 * inferiors.c (find_inferior): Make it safe for the callback
10682 function to delete the currently iterated inferior.
10683
10684 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10685
10686 * Makefile.in (linuw_low_h): Move higher.
10687 (thread-db.o): Depend on $(linux_low_h).
10688
10689 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10690
10691 Rename "process" to "lwp" throughout.
10692
10693 * linux-low.c (all_processes): Rename to...
10694 (all_lwps): ... this.
10695 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10696 (add_process): Rename to ...
10697 (add_lwp): ... this. Adjust.
10698 (linux_create_inferior): Adjust.
10699 (linux_attach_lwp): Adjust.
10700 (linux_attach): Adjust.
10701 (linux_kill_one_process): Rename to ...
10702 (linux_kill_one_lwp): ... this. Adjust.
10703 (linux_kill): Adjust.
10704 (linux_detach_one_process): Rename to ...
10705 (linux_detach_one_lwp): ... this. Adjust.
10706 (linux_detach): Adjust.
10707 (check_removed_breakpoint): Adjust.
10708 (status_pending_p): Adjust.
10709 (linux_wait_for_process): Rename to ...
10710 (linux_wait_for_lwp): ... this. Adjust.
10711 (linux_wait_for_event): Adjust.
10712 (send_sigstop): Adjust.
10713 (wait_for_sigstop): Adjust.
10714 (stop_all_processes): Rename to ...
10715 (stop_all_lwps): ... this.
10716 (linux_resume_one_process): Rename to ...
10717 (linux_resume_one_lwp): ... this. Adjust.
10718 (linux_set_resume_request, linux_continue_one_thread)
10719 (linux_queue_one_thread, resume_status_pending_p)
10720 (usr_store_inferior_registers, regsets_store_inferior_registers)
10721 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10722 Adjust.
10723 * linux-low.h (get_process): Rename to ...
10724 (get_lwp): ... this. Adjust.
10725 (get_thread_process): Rename to ...
10726 (get_thread_lwp): ... this. Adjust.
10727 (get_process_thread): Rename to ...
10728 (get_lwp_thread): ... this. Adjust.
10729 (struct process_info): Rename to ...
10730 (struct lwp_info): ... this.
10731 (all_processes): Rename to ...
10732 (all_lwps): ... this.
10733 * proc-service.c (ps_lgetregs): Adjust.
10734 * thread-db.c (thread_db_create_event, find_one_thread)
10735 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10736
10737 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10738
10739 * server.c (handle_query): Handle "qAttached".
10740
10741 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10742
10743 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10744 GPLv3, update license URL.
10745
10746 2009-03-01 Doug Evans <dje@google.com>
10747
10748 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10749 (server_h): Add gdb_signals.h.
10750 (signals.o): Update.
10751 * server.h (target_signal_from_host,target_signal_to_host_p)
10752 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10753
10754 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10755
10756 * remote-utils.c (getpkt): Also generate remote-debug
10757 information if noack_mode is set.
10758
10759 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10760
10761 * server.c (handle_query): Report qXfer:siginfo:read and
10762 qXfer:siginfo:write as supported and handle them.
10763 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10764 * linux-low.c (linux_xfer_siginfo): New.
10765 (linux_target_ops): Set it.
10766
10767 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10768
10769 * server.c (gdbserver_usage): Mention --remote-debug.
10770 (main): Accept '--remote-debug' switch.
10771
10772 2009-01-18 Doug Evans <dje@google.com>
10773
10774 * regcache.c (new_register_cache): No need to check result of xcalloc.
10775 * server.c (handle_search_memory): Back out calls to xmalloc,
10776 result is checked and error is returned to user upon failure.
10777 (handle_query): Ditto. Add more checks for result of malloc.
10778 (handle_v_cont): Check result of malloc, report error back to
10779 user upon failure.
10780 (handle_v_run): Ditto. Call freeargv.
10781 * server.h (freeargv): Declare.
10782 * utils.c (freeargv): New fn.
10783
10784 2009-01-15 Doug Evans <dje@google.com>
10785
10786 * gdbreplay.c (perror_with_name): Make arg const char *.
10787 * server.h (target_signal_to_name): Make return type const char *.
10788 * thread-db.c (thread_db_err_str): Make return type const char *.
10789 * utils.c (perror_with_name): Make arg const char *.
10790
10791 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10792
10793 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10794 when handling a EXIT_PROCESS_DEBUG_EVENT.
10795
10796 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10797
10798 * gdbreplay.c (gdbreplay_version): Update copyright year.
10799 * server.c (gdbserver_version): Likewise.
10800
10801 2009-01-05 Doug Evans <dje@google.com>
10802
10803 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10804 (handle_extended_wait): Improve comment.
10805
10806 2008-12-13 Doug Evans <dje@google.com>
10807
10808 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10809 * server.h (ATTR_MALLOC): New macro.
10810 (xmalloc,xcalloc,xstrdup): Declare.
10811 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10812 * inferiors.c: Ditto.
10813 * linux-low.c: Ditto.
10814 * mem-break.c: Ditto.
10815 * regcache.c: Ditto.
10816 * remote-utils.c: Ditto.
10817 * server.c: Ditto.
10818 * target.c: Ditto.
10819 * win32-low.c: Ditto.
10820
10821 2008-12-12 Doug Evans <dje@google.com>
10822
10823 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10824 in debugging printf.
10825
10826 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10827
10828 2008-12-09 Doug Evans <dje@google.com>
10829
10830 * linux-low.h (struct process_info): Delete member tid, unused.
10831 * thread-db.c (find_one_thread): Update.
10832 (maybe_attach_thread): Update.
10833
10834 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10835
10836 * target.h (struct target_ops): Add qxfer_osdata member.
10837 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10838 and dirent.h.
10839 (linux_qxfer_osdata): New functions.
10840 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10841 callback.
10842 * server.c (handle_query): Handle "qXfer:osdata:read:".
10843 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10844 (buffer_xml_printf): New functions.
10845 * server.h (struct buffer): New.
10846 (buffer_grow_str, buffer_grow_str0): New macros.
10847 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10848 (buffer_xml_printf): Declare.
10849
10850 2008-11-24 Doug Evans <dje@google.com>
10851
10852 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10853
10854 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10855
10856 * server.c (handle_v_run): Always use the supplied argument list.
10857
10858 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10859
10860 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10861 (xtensa_regmap_table): Add entry for scompare1.
10862
10863 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10864
10865 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10866 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10867 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10868 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10869 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10870 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10871 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10872 XML target descriptions.
10873 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10874 when inferior is running on an ISA 2.05 or later processor. Add
10875 special case to return offset for full 64-bit slot of FPSCR when
10876 in 32-bits.
10877
10878 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10879
10880 * Makefile.in (SFILES, clean): Added sparc64 files.
10881 (reg-sparc64.o, reg-sparc64.c): New.
10882 * configure.srv (sparc*-*-linux*): New configuration.
10883 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10884 syscall arguments for SPARC.
10885 (regsets_store_inferior_registers): Likewise.
10886 * linux-sparc-low.c: New file.
10887
10888 2008-10-21 Doug Evans <dje@google.com>
10889
10890 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10891 (READLINE_DIR,READLINE_DEP): Delete.
10892 (INTERNAL_CFLAGS): Update.
10893 (LINTFLAGS): Update.
10894
10895 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10896
10897 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10898 whole argv from the last run, not just argv[0].
10899
10900 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10901
10902 * regcache.c (new_register_cache): Return NULL if the register
10903 cache size isn't known yet.
10904 (free_register_cache): Avoid dereferencing a NULL regcache.
10905
10906 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10907
10908 * configure.srv: Merge MIPS and MIPS64.
10909
10910 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10911
10912 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10913
10914 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10915
10916 * Makefile.in: Add required vsx dependencies.
10917
10918 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10919 Declare init_registers_powerpc_vsx32l.
10920 Declare init_registers_powerpc_vsx64l.
10921 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10922 (ppc_arch_setup): Check for VSX in hwcap.
10923 (ppc_fill_vsxregset): New function.
10924 (ppc_store_vsxregset): New function.
10925 Add new VSX entry in regset_info target_regsets.
10926
10927 * configure.srv: Add new VSX dependencies.
10928
10929 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10930
10931 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10932 (remote_open): Set or clear transport_is_reliable.
10933 (putpkt_binary): Don't expect acks in noack mode.
10934 (getpkt): Don't send ack/nac in noack mode.
10935 * server.c (handle_general_set): Handle QStartNoAckMode.
10936 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10937 qSupported.
10938 (main): Reset noack_mode on every connection.
10939 * server.h (noack_mode): Declare.
10940
10941 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10942
10943 * Makefile.in (GDBREPLAY_OBS): New variable.
10944 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10945
10946 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10947 Daniel Jacobowitz <dan@codesourcery.com>
10948
10949 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10950 (usr_store_inferior_registers): Likewise.
10951 (regsets_store_inferior_registers): Likewise.
10952
10953 2008-07-31 Rolf Jansen <rj@surtec.com>
10954 Pedro Alves <pedro@codesourcery.com>
10955
10956 * configure.ac: Check for memmem declaration.
10957 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10958 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10959 (disable_packet_qfThreadInfo): Unconditionally compile.
10960 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10961 * configure, config.in: Regenerate.
10962
10963 2008-07-28 Doug Kwan <dougkwan@google.com>
10964
10965 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10966 (linux_write_memory): Remove declaration of errno.
10967
10968 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10969
10970 * linux-low.c (handle_extended_wait): Do not use "status"
10971 variable uninitialized.
10972
10973 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10974
10975 * server.c (handle_v_attach): Inhibit reporting dll changes.
10976
10977 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10978
10979 * remote-utils.c (prepare_resume_reply): If requested, don't
10980 output "thread:TID" in the T stop reply.
10981
10982 * server.c (disable_packet_vCont, disable_packet_Tthread)
10983 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10984 (handle_query): If requested, disable support for qC, qfThreadInfo
10985 and qsThreadInfo.
10986 (handle_v_requests): If requested, disable support for vCont.
10987 (gdbserver_show_disableable): New.
10988 (main): Handle --disable-packet and --disable-packet=LIST.
10989
10990 * server.h (disable_packet_vCont, disable_packet_Tthread)
10991 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10992
10993 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10994
10995 * server.c (gdbserver_usage): Mention --version.
10996
10997 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10998
10999 * Makefile.in (gdbreplay.o): New rule.
11000
11001 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11002
11003 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11004 message, not gdbserver.
11005
11006 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11007 Nathan Sidwell <nathan@codesourcery.com>
11008 Joseph Myers <joseph@codesourcery.com>
11009
11010 * acinclude.m4: Include ../../config/acx.m4.
11011 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11012 * configure, config.in: Regenerate.
11013 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11014 * server.c (gdbserver_version): Print PKGVERSION.
11015 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11016 (main): Adjust gdbserver_usage calls.
11017 * gdbreplay.c (version, host_name): Add declarations.
11018 (gdbreplay_version, gdbreplay_usage): New.
11019 (main): Accept --version and --help options.
11020
11021 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11022
11023 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11024 (arm_breakpoint_at): Handle Thumb.
11025 (the_low_target): Add comment.
11026
11027 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11028
11029 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11030
11031 2008-05-09 Doug Evans <dje@google.com>
11032
11033 * server.h (decode_search_memory_packet): Declare.
11034 * remote-utils.c (decode_search_memory_packet): New fn.
11035 * server.c (handle_search_memory_1): New fn.
11036 (handle_search_memory): New fn.
11037 (handle_query): Process qSearch:memory packets.
11038
11039 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11040
11041 * regcache.c (registers_length): Remove.
11042 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11043 full register packet.
11044 * regcache.h (registers_length): Remove prototype.
11045 * server.h (PBUFSIZ): Define to 16384.
11046
11047 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11048
11049 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11050 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11051 powerpc-64l.o, and powerpc-altivec64l.o.
11052 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11053 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11054 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11055 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11056 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11057 to srv_xmlfiles.
11058
11059 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11060 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11061 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11062 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11063 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11064 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11065 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11066 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11067 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11068 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11069 (clean): Update.
11070
11071 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11072 (init_registers_powerpc_32l): ... this new prototype.
11073 (init_registers_powerpc_32): Remove, replace by ...
11074 (init_registers_powerpc_altivec32l): ... this new prototype.
11075 (init_registers_powerpc_e500): Remove, replace by ...
11076 (init_registers_powerpc_e500l): ... this new prototype.
11077 (init_registers_ppc64): Remove, replace by ...
11078 (init_registers_powerpc_64l): ... this new prototype.
11079 (init_registers_powerpc_64): Remove, replace by ...
11080 (init_registers_powerpc_altivec64l): ... this new prototype.
11081 (ppc_num_regs): Set to 73.
11082 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11083 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11084 (ppc_cannot_store_register): Handle orig_r3 and trap.
11085 (ppc_arch_setup): Update init_registers_... calls.
11086 (ppc_fill_gregset): Handle orig_r3 and trap.
11087
11088 * inferiors.c (clear_inferiors): Reset current_inferior.
11089
11090 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11091
11092 * acinclude.m4: Add override.m4.
11093 * configure: Regenerate.
11094
11095 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11096
11097 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11098 initial call to init_register_ppc64.
11099
11100 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11101
11102 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11103 single powerpc*-*-linux* case.
11104 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11105
11106 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11107
11108 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11109 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11110 from reg_xmlfiles.
11111 * linux-ppc-low.c: Include <elf.h>.
11112 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11113 (ppc_hwcap): New global variable.
11114 (ppc_regmap): Remove __SPE__ #ifdef sections.
11115 (ppc_regmap_e500): New global variable.
11116 (ppc_cannot_store_register): Update __SPE__ special case.
11117 (ppc_get_hwcap): New function.
11118 (ppc_arch_setup): Use it to determine whether inferior supports
11119 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11120 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11121 Do not access registers if target does not support AltiVec.
11122 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11123 Do not access registers if target does not support SPE.
11124 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11125
11126 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11127
11128 * linux-low.c (disabled_regsets, num_regsets): New.
11129 (use_regsets_p): Delete.
11130 (linux_wait_for_process): Clear disabled_regsets.
11131 (regsets_fetch_inferior_registers): Check and set it.
11132 (regsets_store_inferior_registers): Likewise.
11133 (linux_fetch_registers, linux_store_registers): Do not use
11134 use_regsets_p.
11135 (initialize_low): Allocate disabled_regsets.
11136
11137 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11138
11139 * Makefile.in (LIBOBJS): New.
11140 (OBS): Use LIBOBJS.
11141 (memmem.o): New rule.
11142 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11143 * configure: Regenerated.
11144
11145 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11146
11147 * server.c (handle_query): Never return "unsupported" for
11148 qXfer:features:read queries.
11149
11150 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11151
11152 * server.c (get_features_xml): Fix inverted condition.
11153 (handle_query): Always support qXfer:feature:read.
11154
11155 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11156
11157 * server.c (wrapper_argv): New.
11158 (start_inferior): Handle wrapper_argv. If set, expect an extra
11159 trap.
11160 (gdbserver_usage): Document --wrapper.
11161 (main): Parse --wrapper.
11162
11163 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11164
11165 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11166 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11167 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11168 (ppc_set_pc): Likewise.
11169 (ppc_arch_setup): New function.
11170 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11171 of collect_register.
11172 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11173
11174 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11175
11176 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11177 instead of linux-ppc64-low.o.
11178 * linux-ppc64-low.c: Remove file.
11179 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11180 (linux-ppc64-low.o): Remove rule.
11181
11182 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11183 (init_registers_powerpc_64): Likewise.
11184 (ppc_regmap): Conditionally define depending on __powerpc64__.
11185 (ppc_cannot_store_register): Do not special-case "fpscr" when
11186 compiled on __powerpc64__.
11187 (ppc_collect_ptrace_register): New function.
11188 (ppc_supply_ptrace_register): New function.
11189 (ppc_breakpoint): Change type to "unsigned int".
11190 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11191 (the_low_target): Conditionally provide initializers for the
11192 arch_setup member depending on __powerpc64__. Install
11193 collect_ptrace_register and supply_ptrace_register members.
11194
11195 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11196
11197 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11198 * server.c (gdbserver_xmltarget): Define.
11199 (get_features_xml): Use it to replace "target.xml" and arch_string.
11200
11201 * configure.srv: Remove srv_xmltarget. Add XML files that were
11202 mentioned there to srv_xmlfiles instead. Remove conditional tests
11203 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11204 srv_xmlfiles and srv_regobj to include all possible choices.
11205 * configure.ac (srv_xmltarget): Remove.
11206 (srv_xmlfiles): Do not add "target.xml".
11207 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11208 checks for supplementary target information.
11209 * configure: Regenerate.
11210 * Makefile.in (XML_TARGET): Remove.
11211 (target.xml): Remove rule.
11212 (clean): Do not clean up target.xml.
11213 (.PRECIOUS): Do not mention target.xml.
11214
11215 * target.h (struct target_ops): Remove arch_string member.
11216 * linux-low.c (linux_arch_string): Remove.
11217 (linux_target_ops): Remove arch_string initializer.
11218 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11219 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11220 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11221 * spu-low.c (spu_arch_string): Remove.
11222 (spu_target_ops): Remove arch_string initializer.
11223 * win32-low.c (win32_arch_string): Remove.
11224 (win32_target_ops): Remove arch_string initializer.
11225 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11226 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11227 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11228
11229 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11230
11231 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11232 by collect_ptrace_register and supply_ptrace_register hooks.
11233 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11234 instead of checking for the_low_target.left_pad_xfer.
11235 (usr_store_inferior_registers): Use collect_ptrace_register callback
11236 instead of checking for the_low_target.left_pad_xfer.
11237
11238 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11239 (s390_supply_ptrace_register): Likewise.
11240 (s390_fill_gregset): Call s390_collect_ptrace_register.
11241 (the_low_target): Update.
11242
11243 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11244 (ppc_supply_ptrace_register): Likewise.
11245 (the_low_target): Update.
11246
11247 * linux-i386-low.c (the_low_target): Update.
11248 * linux-x86-64-low.c (the_low_target): Update.
11249
11250 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11251
11252 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11253 reg-s390.o and reg-s390x.o.
11254
11255 * linux-low.c (new_inferior): New global variable.
11256 (linux_create_inferior, linux_attach): Set it.
11257 (linux_wait_for_process): Call the_low_target.arch_setup after the
11258 target has stopped for the first time.
11259 (initialize_low): Do not call the_low_target.arch_setup.
11260
11261 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11262 (s390_set_pc): Likewise.
11263 (s390_arch_setup): New function.
11264 (the_low_target): Use s390_arch_setup as arch_setup routine.
11265
11266 * regcache.c (realloc_register_cache): New function.
11267 (set_register_cache): Call it for each existing regcache.
11268
11269 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11270
11271 * server.h (init_registers): Remove prototype.
11272
11273 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11274 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11275 instead of init_registers ().
11276 * linux-arm-low.c (init_registers_arm): Add prototype.
11277 (init_registers_arm_with_iwmmxt): Likewise.
11278 (the_low_target): Add initializer for arch_setup field.
11279 * linux-cris-low.c (init_registers_cris): Add prototype.
11280 (the_low_target): Add initializer for arch_setup field.
11281 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11282 (the_low_target): Add initializer for arch_setup field.
11283 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11284 (the_low_target): Add initializer for arch_setup field.
11285 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11286 (the_low_target): Add initializer for arch_setup field.
11287 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11288 (the_low_target): Add initializer for arch_setup field.
11289 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11290 (the_low_target): Add initializer for arch_setup field.
11291 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11292 (init_registers_mips64_linux): Likewise.
11293 (the_low_target): Add initializer for arch_setup field.
11294 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11295 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11296 (the_low_target): Add initializer for arch_setup field.
11297 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11298 (init_registers_powerpc_64): Likewise.
11299 (the_low_target): Add initializer for arch_setup field.
11300 * linux-s390-low.c (init_registers_s390): Add prototype.
11301 (init_registers_s390x): Likewise.
11302 (the_low_target): Add initializer for arch_setup field.
11303 * linux-sh-low.c (init_registers_sh): Add prototype.
11304 (the_low_target): Add initializer for arch_setup field.
11305 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11306 (the_low_target): Add initializer for arch_setup field.
11307 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11308 (the_low_target): Add initializer for arch_setup field.
11309
11310 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11311 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11312 instead of init_registers ().
11313 * win32-arm-low.c (init_registers_arm): Add prototype.
11314 (the_low_target): Add initializer for arch_setup field.
11315 * win32-i386-low.c (init_registers_i386): Add prototype.
11316 (the_low_target): Add initializer for arch_setup field.
11317
11318 * spu-low.c (init_registers_spu): Add prototype.
11319 (initialize_low): Call initialie_registers_spu () instead of
11320 initialize_registers ().
11321
11322 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11323
11324 * server.c (handle_v_requests): When handling the vRun and vAttach
11325 packets, if already debugging a process, don't kill it. Return an
11326 error instead.
11327
11328 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11329
11330 * server.c (handle_query): Correct length check.
11331
11332 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11333
11334 * win32-low.c (do_initial_child_stuff): Add process handle
11335 parameter. Set current_process_handle and current_process_id from the
11336 parameters. Clear globals.
11337 (win32_create_inferior): Don't set current_process_handle and
11338 current_process_id here. Instead pass them on the call to
11339 do_initial_child_stuff.
11340 (win32_attach): Likewise.
11341 (win32_clear_inferiors): New.
11342 (win32_kill): Don't close the current process handle or the
11343 current thread handle here. Instead call win32_clear_inferiors.
11344 (win32_detach): Don't open a new handle to the process. Call
11345 win32_clear_inferiors.
11346 (win32_join): Don't rely on current_process_handle; open a new
11347 handle using the process id.
11348 (win32_wait): Call win32_clear_inferiors when the inferior process
11349 has exited.
11350
11351 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11352
11353 * server.c (monitor_show_help): Add "exit".
11354
11355 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11356
11357 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11358 (clean): Add reg-xtensa.c.
11359 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11360 * configure.srv (xtensa*-*-linux*) New target.
11361 * linux-xtensa-low.c: New.
11362 * xtensa-xtregs.c: New.
11363
11364 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11365
11366 * hostio.c: Don't include errno.h.
11367 (errno_to_fileio_errno): Move to hostio-errno.
11368 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11369 error number outputting to the target->hostio_last_error callback.
11370 (hostio_packet_error): Use FILEIO_EINVAL directly.
11371 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11372 calls to hostio_error.
11373 * hostio-errno.c: New.
11374 * server.h (hostio_last_error_from_errno): Declare.
11375 * target.h (target_ops): Add hostio_last_error member.
11376 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11377 as hostio_last_error handler.
11378 * spu-low.c (spu_target_ops): Likewise.
11379 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11380 (wince_hostio_last_error): New functions.
11381 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11382 as hostio_last_error handler.
11383 (win32_target_ops) [!_WIN32_WCE]: Register
11384 hostio_last_error_from_errno as hostio_last_error handler.
11385 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11386 (hostio-errno.o): New rule.
11387 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11388 * configure.srv (srv_hostio_err_objs): New variable. Default to
11389 hostio-errno.o.
11390 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11391 * configure: Regenerate.
11392
11393 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11394
11395 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11396 (linux_kill, linux_detach): Clean up the process list.
11397 * remote-utils.c (remote_open): Improve port number parsing.
11398 (putpkt_binary, input_interrupt): Only send interrupts if the target
11399 is running.
11400 * server.c (extended_protocol): Make static.
11401 (attached): Define earlier.
11402 (exit_requested, response_needed, program_argv): New variables.
11403 (target_running): New.
11404 (start_inferior): Clear attached here.
11405 (attach_inferior): Set attached here.
11406 (require_running): Define.
11407 (handle_query): Use require_running and target_running. Implement
11408 "monitor exit".
11409 (handle_v_attach, handle_v_run): New.
11410 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11411 (gdbserver_usage): Update.
11412 (main): Redo argument parsing. Handle --debug and --multi. Handle
11413 --attach along with other options or after the port. Save
11414 program_argv. Support no initial program. Resynchronize
11415 communication with GDB after an error. Handle "monitor exit".
11416 Use require_running and target_running. Always allow the extended
11417 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11418 restart in extended mode.
11419 * README: Refer to the GDB manual. Update --attach usage.
11420
11421 2007-12-20 Andreas Schwab <schwab@suse.de>
11422
11423 * linux-low.c (STACK_SIZE): Define.
11424 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11425 (linux_test_for_tracefork): Likewise.
11426
11427 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11428
11429 * linux-low.c (linux_wait_for_event): Update messages. Do not
11430 reinsert auto-delete breakpoints.
11431 * mem-break.c (struct breakpoint): Change return type of handler to
11432 int.
11433 (set_breakpoint_at): Update handler type.
11434 (reinsert_breakpoint_handler): Return 1 instead of calling
11435 delete_breakpoint.
11436 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11437 setting a new one.
11438 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11439 * mem-break.h (set_breakpoint_at): Update handler type.
11440 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11441 * win32-low.c (auto_delete_breakpoint): New.
11442 (get_child_debug_event): Use it.
11443
11444 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11445
11446 * configure.ac: Check for pread and pwrite.
11447 * hostio.c (handle_pread): Fall back to lseek and read.
11448 (handle_pwrite): Fall back to lseek and write.
11449 * config.in, configure: Regenerated.
11450
11451 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11452
11453 * server.c (myresume): Add own_buf argument.
11454 (main): Update calls.
11455
11456 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11457
11458 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11459 * remote-utils.c (remote_open): Do not call disable_async_io.
11460 (block_async_io): Delete.
11461 (unblock_async_io): Make static.
11462 (initialize_async_io): New.
11463 * server.c (handle_v_cont): Handle async I/O here.
11464 (myresume): Likewise. Move other common resume tasks here...
11465 (main): ... from here. Call initialize_async_io. Disable async
11466 I/O before the main loop.
11467 * server.h (initialize_async_io): Declare.
11468 (block_async_io, unblock_async_io): Delete prototypes.
11469 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11470
11471 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11472
11473 * remote-utils.c (readchar): Allow binary data in received messages.
11474
11475 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11476
11477 * win32-low.c (attaching): New global.
11478 (win32_create_inferior): Clear the `attaching' global.
11479 (win32_attach): Set the `attaching' global.
11480 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11481 attaching. Only set a breakpoint at the entry point if not
11482 attaching.
11483
11484 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11485
11486 * server.c (main): Don't report dll events on the initial
11487 connection on attaches.
11488
11489 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11490
11491 * server.c (main): Relax numerical bases supported for the pid of
11492 the --attach command line argument.
11493
11494 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11495
11496 * win32-low.c (win32_attach): Call OpenProcess before
11497 DebugActiveProcess, not after. Add last error output to error
11498 call.
11499
11500 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11501
11502 * win32-low.c (win32_get_thread_context)
11503 (win32_set_thread_context): New functions.
11504 (thread_rec): Use win32_get_thread_context.
11505 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11506 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11507 field.
11508
11509 2007-12-03 Leo Zayas
11510 Pedro Alves <pedro_alves@portugalmail.pt>
11511
11512 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11513 global variables.
11514 (child_add_thread): Minor cleanup.
11515 (child_continue): Resume artificially suspended threads before
11516 calling ContinueDebugEvent.
11517 (suspend_one_thread): New.
11518 (fake_breakpoint_event): New.
11519 (get_child_debug_event): Change return type to int. Check here if
11520 gdb sent an interrupt request. If a soft interrupt was requested,
11521 fake a breakpoint event. Return 0 if there is no event to handle,
11522 and 1 otherwise.
11523 (win32_wait): Don't check here if gdb sent an interrupt request.
11524 Ensure there is a valid event to handle.
11525 (win32_request_interrupt): Add soft interruption method as last
11526 resort.
11527
11528 2007-12-03 Leo Zayas
11529 Pedro Alves <pedro_alves@portugalmail.pt>
11530
11531 * win32-low.h (win32_thread_info): Add descriptions to the
11532 structure members. Replace `suspend_count' counter by a
11533 `suspended' flag.
11534 * win32-low.c (thread_rec): Update condition of when to get the
11535 context from the inferior. Rely on ContextFlags being set if it
11536 has already been retrieved. Only suspend the inferior thread if
11537 we haven't already. Warn if that fails.
11538 (continue_one_thread): s/suspend_count/suspended/. Only call
11539 ResumeThread once. Warn if that fails.
11540
11541 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11542
11543 * win32-low.c (win32_wait): Don't read from the inferior when it
11544 has already exited.
11545
11546 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11547
11548 * Makefile.in (win32_low_h): New variable.
11549 (win32-low.o): Add dependency on $(win32_low_h).
11550 (win32-arm-low.o, win32-i386-low.o): New rules.
11551
11552 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11553
11554 * hostio.c: Correct copyright year.
11555
11556 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11557
11558 * Makefile.in (OBS): Add hostio.o.
11559 (hostio.o): New rule.
11560 * server.h (handle_vFile): Declare.
11561 * hostio.c: New file.
11562 * server.c (handle_v_requests): Take packet_len and new_packet_len
11563 for binary packets. Call handle_vFile.
11564 (main): Update call to handle_v_requests.
11565
11566 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11567
11568 * linux-low.c: Include <sched.h>.
11569
11570 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11571
11572 * linux-low.c (linux_tracefork_grandchild): New.
11573 (linux_tracefork_child): Use clone.
11574 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11575
11576 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11577
11578 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11579
11580 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11581
11582 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11583
11584 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11585
11586 * inferiors.c (change_inferior_id): Delete.
11587 (add_pid_to_list, pull_pid_from_list): New.
11588 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11589 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11590 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11591 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11592 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11593 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11594 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11595 (using_threads): Always set to 1.
11596 (handle_extended_wait): New.
11597 (add_process): Do not set TID.
11598 (linux_create_inferior): Set must_set_ptrace_flags.
11599 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11600 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11601 (linux_thread_alive): Rename TID argument to LWPID.
11602 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11603 (linux_wait_for_event): Do not use TID or check using_threads. Update
11604 call to dead_thread_notify. Call handle_extended_wait.
11605 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11606 (send_sigstop): Delete sigstop_sent.
11607 (wait_for_sigstop): Avoid TID.
11608 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11609 (linux_test_for_tracefork): New.
11610 (linux_lookup_signals): Use thread_db_active and
11611 linux_supports_tracefork_flag.
11612 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11613 * linux-low.h (get_process_thread): Avoid TID.
11614 (struct process_ifo): Move thread_known and tid to the end. Remove
11615 sigstop_sent.
11616 (linux_attach_lwp, thread_db_init): Update prototypes.
11617 * server.h (change_inferior_id): Delete prototype.
11618 (add_pid_to_list, pull_pid_from_list): New prototypes.
11619 * thread-db.c (thread_db_use_events): New.
11620 (find_first_thread): Rename to...
11621 (find_one_thread): ...this. Update callers and messages. Do not
11622 call fatal. Check thread_db_use_events. Do not call
11623 change_inferior_id or new_thread_notify.
11624 (maybe_attach_thread): Update. Do not call new_thread_notify.
11625 (thread_db_init): Set thread_db_use_events. Check use_events.
11626 * utils.c (fatal, warning): Correct message prefix.
11627
11628 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11629
11630 * Makefile.in (clean): Remove new files.
11631 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11632 (powerpc-64.o, powerpc-64.c): New rules.
11633 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11634 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11635 with SPE.
11636 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11637 SPE targets.
11638 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11639 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11640 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11641 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11642 (target_regsets): Add AltiVec and SPE register sets.
11643 * configure.ac: Check for AltiVec and SPE.
11644 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11645 (ppc_fill_vrregset, ppc_store_vrregset): New.
11646 (target_regsets): Add AltiVec register set.
11647 * configure: Regenerated.
11648
11649 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11650
11651 * linux-low.c (O_LARGEFILE): Define.
11652 (linux_read_memory): Use /proc/PID/mem.
11653 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11654 * configure, config.in: Regenerated.
11655
11656 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11657
11658 * linux-low.c (linux_wait_for_event): Do not pass signals while
11659 single-stepping.
11660
11661 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11662
11663 * win32-low.c (create_process): New.
11664 (win32_create_inferior): Use create_process instead of
11665 CreateProcess. If create_process failed retry appending an ".exe"
11666 suffix. Store the GetLastError result immediatelly after
11667 create_process calls and use it on the call to error.
11668
11669 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11670
11671 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11672
11673 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11674
11675 * configure.ac: Switch license to GPLv3.
11676
11677 2007-08-01 Michael Snyder <msnyder@access-company.com>
11678
11679 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11680
11681 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11682
11683 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11684 typedef.
11685 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11686 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11687 CloseToolhelp32Snapshot.
11688 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11689 CloseToolhelp32Snapshot.
11690
11691 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11692
11693 * server.c (main): Check for inferior exit before main loop.
11694
11695 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11696
11697 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11698 instead of on tmp_desc.
11699
11700 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11701 Daniel Jacobowitz <dan@codesourcery.com>
11702
11703 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11704 (add_thread): Minor cleanups.
11705 (clear_inferiors): Move lower in the file. Clear the DLL
11706 list.
11707 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11708 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11709 (xml_escape_text): New.
11710 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11711 for qSupported.
11712 (handle_v_cont): Report errors.
11713 (gdbserver_version): Update.
11714 (main): Correct size of own_buf. Do not report initial DLL events.
11715 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11716 (unloaded_dll, xml_escape_text): New.
11717 * win32-low.c (enum target_waitkind): Update comments.
11718 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11719 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11720 (win32_EnumProcessModules, win32_GetModuleInformation)
11721 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11722 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11723 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11724 (win32_Module32First, win32_Module32Next, load_toolhelp)
11725 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11726 (get_child_debug_event): Handle DLL events.
11727 (win32_wait): Likewise.
11728
11729 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11730
11731 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11732 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11733
11734 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11735
11736 * win32-low.c (handle_output_debug_string): Ignore event if not
11737 waiting.
11738
11739 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11740
11741 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11742
11743 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11744
11745 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11746
11747 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11748
11749 * inferiors.c (change_inferior_id): Add comment.
11750 * linux-low.c (check_removed_breakpoint): Add an early
11751 prototype. Improve debug output.
11752 (linux_attach): Doc update.
11753 (linux_detach_one_process, linux_detach): Clean up before releasing
11754 each process.
11755 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11756 * linux-low.h (struct process_info): Doc improvement.
11757 * mem-break.c (delete_all_breakpoints): New.
11758 * mem-break.h (delete_all_breakpoints): New prototype.
11759 * thread-db.c (find_first_thread): New.
11760 (thread_db_create_event): Call it instead of
11761 thread_db_find_new_threads. Clean up unused variables.
11762 (maybe_attach_thread): Remove first thread handling.
11763 (thread_db_find_new_threads): Use find_first_thread.
11764 (thread_db_get_tls_address): Likewise.
11765
11766 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11767
11768 * thread-db.c (thread_db_find_new_threads): Add prototype.
11769 (thread_db_create_event): Check for the main thread before adding
11770 a new thread.
11771 (maybe_attach_thread): Only enable event reporting if TID == 0.
11772 (thread_db_get_tls_address): Check for new threads.
11773
11774 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11775
11776 * linux-low.c (linux_create_inferior): Try execv before execvp.
11777 * spu-low.c (spu_create_inferior): Likewise.
11778
11779 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11780
11781 * linux-low.c (linux_create_inferior): Change execv to execvp.
11782 * spu-low.c (spu_create_inferior): Likewies.
11783
11784 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11785
11786 * Makefile.in (clean): Clean new files instead of deleted ones.
11787 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11788 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11789 rules.
11790 * configure.srv: Specify XML files and new regformats for MIPS and
11791 MIPS64 GNU/Linux.
11792 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11793 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11794 an entry for the restart register.
11795 (mips_cannot_fetch_register, mips_cannot_store_register)
11796 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11797 register names to match the XML descriptions.
11798 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11799 restart register instead of $0.
11800
11801 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11802 Markus Deuling <deuling@de.ibm.com>
11803
11804 * remote-utils.c (decode_xfer_write): New function.
11805 * server.h (decode_xfer_write): Add prototype.
11806 * server.c (handle_query): Add PACKET_LEN argument. Support
11807 qXfer:spu:read and qXfer:spu:write packets.
11808 (main): Pass packet_len to handle_query.
11809 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11810 * target.h (target_ops): Add qxfer_spu.
11811
11812 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11813
11814 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11815 accessing non-seekable spufs files.
11816
11817 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11818
11819 * server.c (handle_query): Add reply for qC packet.
11820
11821 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11822 Leo Zayas <lerele@champenstudios@com>
11823
11824 * server.h (check_remote_input_interrupt_request): New function.
11825 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11826 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11827 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11828 (check_remote_input_interrupt_request): New function.
11829 * server.h (check_remote_input_interrupt_request): Declare.
11830 * win32-low.c (winapi_DebugBreakProcess,
11831 winapi_GenerateConsoleCtrlEvent): New typedefs.
11832 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11833 to 250 ms.
11834 (win32_wait): Check for remote interrupt request
11835 with check_remote_input_interrupt_request.
11836 (win32_request_interrupt): New function.
11837 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11838
11839 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11840
11841 * win32-low.c (debug_registers_changed,
11842 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11843 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11844 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11845 (thread_rec): Get context using the low target.
11846 (child_add_thread): Call thread_added on the low target,
11847 which does the same thing.
11848 (regptr): Delete.
11849 (do_initial_child_stuff): Remove debug registers references.
11850 Set context using the low target. Resume threads after
11851 setting the contexts.
11852 (child_continue): Remove dead variable. Remove debug
11853 registers references.
11854 (child_fetch_inferior_registers): Go through the low target.
11855 (do_child_store_inferior_registers): Remove.
11856 (child_store_inferior_registers): Go through the low target.
11857 (win32_resume): Remove debug registers references.
11858 Set context using the low target.
11859 (handle_exception): Change return type to void. Don't record
11860 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11861 first chance exception.
11862 (get_child_debug_event): Change return type to void. Remove
11863 goto loop. Always return after waiting for debug event.
11864 (win32_wait): Convert to switch statement. Handle spurious
11865 events.
11866
11867 * win32-i386-low.c (debug_registers_changed,
11868 debug_registers_used): New.
11869 (initial_stuff): Rename to ...
11870 (i386_initial_stuff): ... this. Clear debug registers
11871 state variables.
11872 (store_debug_registers): Delete.
11873 (i386_get_thread_context): New.
11874 (load_debug_registers): Delete.
11875 (i386_set_thread_context): New.
11876 (i386_thread_added): New.
11877 (single_step): Rename to ...
11878 (i386_single_step): ... this.
11879 (do_fetch_inferior_registers): Rename to ...
11880 (i386_fetch_inferior_register): ... this.
11881 (i386_store_inferior_register): New.
11882 (the_low_target): Adapt to new interface.
11883
11884 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11885 (arm_get_thread_context): New.
11886 (arm_set_thread_context): New.
11887 (regptr): New.
11888 (do_fetch_inferior_registers): Rename to ...
11889 (arm_fetch_inferior_register): ... this.
11890 (arm_store_inferior_register): New.
11891 (arm_wince_breakpoint): Reimplement as unsigned long.
11892 (arm_wince_breakpoint_len): Define.
11893 (the_low_target): Adapt to new interface.
11894
11895 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11896 load_debug_registers. Add get_thread_context, set_thread_context,
11897 thread_added and store_inferior_register. Rename
11898 fetch_inferior_registers to fetch_inferior_register.
11899 (regptr): Remove declaration.
11900
11901 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11902
11903 * linux-low.c (linux_detach): Change return type to int. Return 0.
11904 * spu-low.c (spu_detach): Likewise.
11905
11906 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11907
11908 * target.h (target_ops): Change return type of detach to int.
11909 Add join.
11910 (join_inferior): New.
11911 * server.c (main): Don't skip detach support on mingw32.
11912 If the inferior doesn't support detaching return error.
11913 Call join_inferior instead of using waitpid.
11914 * linux-low.c (linux_join): New.
11915 (linux_target_op): Add linux_join.
11916 * spu-low.c (spu_join): New.
11917 (spu_target_ops): Add spu_join.
11918 * win32-low.c (win32_detach): Adapt to new interface.
11919 Reopen current_process_handle before detaching. Issue a child
11920 resume before detaching.
11921 (win32_join): New.
11922 (win32_target_op): Add win32_join.
11923
11924 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11925
11926 * win32-low.c (win32-attach): Fix return value.
11927 * target.h (target_ops): Describe ATTACH return values.
11928
11929 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11930
11931 * win32-low.c (GETPROCADDRESS): Define.
11932 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11933 (winapi_DebugSetProcessKillOnExit): Likewise.
11934 (win32_create_inferior): Force usage of ansi CreateProcessA.
11935 (win32_attach): Use GETPROCADDRESS.
11936 (win32_detach): Likewise.
11937
11938 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11939
11940 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11941
11942 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11943
11944 * win32-low.c: Commit leftover changes from 2007-03-29.
11945
11946 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11947
11948 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11949 fields short instead of int. Add explicit padding.
11950 (i387_cache_to_fsave): Remove unnecessary casts.
11951 (i387_fsave_to_cache): Doc fix.
11952 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11953
11954 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11955
11956 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11957 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11958
11959 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11960
11961 * configure.srv (arm*-*-mingw32ce*): Move near the other
11962 arm targets.
11963
11964 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11965
11966 * configure.ac: Add errno checking.
11967 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11968 sys/file.h and malloc.h.
11969 (AC_CHECK_DECLS): Add perror.
11970 (srv_mingwce): Handle.
11971 * configure.srv (i[34567]86-*-cygwin*): Add
11972 win32-i386-low.o to srv_tgtobj.
11973 (i[34567]86-*-mingw*): Likewise.
11974 (arm*-*-mingw32ce*): Add case.
11975 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11976 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11977 [__MINGW32CE__] (strerror): New function.
11978 [__MINGW32CE__] (errno): Define to GetLastError.
11979 [__MINGW32CE__] (COUNTOF): New macro.
11980 (remote_open): Remove extra close call.
11981 * mem-break.c (delete_breakpoint_at): New function.
11982 * mem-break.h (delete_breakpoint_at): Declare.
11983 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11984 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11985 [USE_WIN32API] (read, write): Add char* casts.
11986 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11987 * server.h: Include wincecompat.h on Windows CE.
11988 [HAVE_ERRNO_H]: Check.
11989 (perror): Declare if not declared.
11990 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11991 (perror_with_name): Remove errno declaration.
11992 * wincecompat.h: New.
11993 * wincecompat.c: New.
11994 * win32-low.h: New.
11995 * win32-arm-low.c: New.
11996 * win32-i386-low.c: New.
11997 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11998 (OUTMSG2): Make it safe.
11999 (_T): New macro.
12000 (COUNTOF): New macro.
12001 (NUM_REGS): Get it from the low target.
12002 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12003 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12004 (thread_rec): Let low target handle debug registers.
12005 (child_add_thread): Likewise.
12006 (child_init_thread_list): Likewise.
12007 (continue_one_thread): Likewise.
12008 (regptr): New.
12009 (do_child_fetch_inferior_registers): Move to ...
12010 * win32-i386-low.c: ... here, and rename to ...
12011 (do_fetch_inferior_registers): ... this.
12012 * win32-low.c (child_fetch_inferior_registers):
12013 Go through the low target.
12014 (do_child_store_inferior_registers): Use regptr.
12015 (strwinerror): New function.
12016 (win32_create_inferior): Handle Windows CE.
12017 Use strwinerror instead of strerror on Windows error
12018 codes. Add program to the error output.
12019 Don't close the main thread handle on Windows CE.
12020 (win32_attach): Use coredll.dll on Windows CE.
12021 (win32_kill): Close current process and current
12022 thread handles.
12023 (win32_detach): Use coredll.dll on Windows CE.
12024 (win32_resume): Let low target handle debug registers, and
12025 step request.
12026 (handle_exception): Add/Remove initial breakpoint. Avoid
12027 non-existant WSTOPSIG on Windows CE.
12028 (win32_read_inferior_memory): Cast to remove warning.
12029 (win32_arch_string): Go through the low target.
12030 (initialize_low): Call set_breakpoint_data with the low
12031 target's breakpoint.
12032 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12033 FOP_REGNUM, mappings): Move to ...
12034 * win32-i386-low.c: ... here.
12035 * win32-low.c (win32_thread_info): Move to ...
12036 * win32-low.h: ... here.
12037 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12038 win32-arm-low.c and wincecompat.c.
12039 (all:): Add $EXEEXT.
12040 (install-only:): Likewise.
12041 (gdbserver:): Likewise.
12042 (gdbreplay:): Likewise.
12043 * config.in: Regenerate.
12044 * configure: Regenerate.
12045
12046 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12047
12048 * win32-low.c: Rename typedef thread_info to
12049 win32_thread_info throughout.
12050
12051 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12052
12053 * win32-i386-low.c: Rename to ...
12054 * win32-low.c: ... this.
12055 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12056 * Makefile.in: Likewise.
12057
12058 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12059
12060 * remote-utils.c (monitor_output): Constify msg parameter.
12061 * server.h (monitor_output): Likewise.
12062 * win32-i386-low.c (handle_output_debug_string): New.
12063 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12064 handle_output_debug_string.
12065 (get_child_debug_event): Likewise.
12066
12067 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12068
12069 * server.c (main): Correct strtoul check.
12070
12071 2007-03-27 Jon Ringle <jon@ringle.org>
12072
12073 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12074
12075 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12076
12077 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12078
12079 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12080
12081 * terminal.h: Check HAVE_SGTTY_H.
12082
12083 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12084
12085 * remote-utils.c (remote_open): Print out the assigned port number.
12086
12087 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12088
12089 * remote-utils.c (monitor_output): New function.
12090 * server.c (debug_threads): Define here.
12091 (monitor_show_help): New function.
12092 (handle_query): Handle qRcmd.
12093 (main): Do not handle 'd' packet.
12094 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12095 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12096 of debug_threads.
12097
12098 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12099
12100 * Makefile.in (EXEEXT): New.
12101 (clean): Use $(EXEEXT).
12102
12103 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12104
12105 * target.h (target_ops): Rename send_signal to request_interrupt,
12106 and remove enum target_signal parameter.
12107 * linux-low.c (linux_request_interrupt): Rename from
12108 linux_send_signal, and always send SIGINT.
12109 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12110 and always send SIGINT.
12111 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12112 of send_signal.
12113 (input_interrupt): Likewise.
12114
12115 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12116
12117 * server.c (get_features_xml): Check if target implemented
12118 arch_string.
12119 * win32-i386-low.c (win32_arch_string): New.
12120 (win32_target_ops): Add win32_arch_string as arch_string member.
12121
12122 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12123
12124 * spu-low.c (spu_arch_string): New.
12125 (spu_target_ops): Add spu_arch_string.
12126
12127 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12128
12129 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12130 * configure.ac: Do not check for terminal.h.
12131 * configure, config.in: Regenerated.
12132
12133 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12134
12135 * Makefile.in (OBS): Add $(XML_BUILTIN).
12136 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12137 (clean): Update.
12138 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12139 (arm-with-iwmmxt.c): New.
12140 * config.in, configure: Regenerate.
12141 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12142 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12143 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12144 (arm*-*-linux*): Add iWMMXt and regset support.
12145 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12146 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12147 (arm_store_wmmxregset, target_regsets): New.
12148 * server.c (get_features_xml): Take annex argument. Check builtin
12149 XML documents.
12150 (handle_query): Handle multiple annexes.
12151
12152 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12153
12154 * remote-utils.c [USE_WIN32API] (read, write): Define.
12155 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12156 write.
12157
12158 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12159
12160 * linux-i386-low.c (the_low_target): Set arch_string.
12161 * linux-x86-64-low.c (the_low_target): Likewise.
12162 * linux-low.c (linux_arch_string): New.
12163 (linux_target_ops): Add it.
12164 * linux-low.h (struct linux_target_ops): Add arch_string.
12165 * server.c (write_qxfer_response): Use const void * for DATA.
12166 (get_features_xml): New.
12167 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12168 * target.h (struct target_ops): Add arch_string method.
12169
12170 2007-01-03 Denis Pilat <denis.pilat@st.com>
12171 Daniel Jacobowitz <dan@codesourcery.com>
12172
12173 * linux-low.c (linux_kill): Handle being called with no threads.
12174 * win32-i386-low.c (win32_kill): Likewise.
12175 (get_child_debug_event): Clear current_process_handle.
12176
12177 2006-12-30 Denis PILAT <denis.pilat@st.com>
12178 Daniel Jacobowitz <dan@codesourcery.com>
12179
12180 * remote-utils.c (remote_open): Check the type of specified
12181 serial port devices before opening them.
12182 * server.c (main): Kill the inferior if an error occurs during
12183 the first remote_open.
12184
12185 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12186
12187 * README: Update supported targets.
12188
12189 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12190
12191 * Makefile.in (clean): Remove reg-mips64.c.
12192 (reg-mips64.c, reg-mips64.o): New rules.
12193 * configure.srv: Handle mips64. Include regset support for mips.
12194 * linux-mips-low.c (union mips_register): New.
12195 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12196 (mips_breakpoint, mips_breakpoint_at): Use int.
12197 (mips_collect_register, mips_supply_register)
12198 (mips_collect_register_32bit, mips_supply_register_32bit)
12199 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12200 (mips_store_fpregset, target_regsets): New.
12201 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12202
12203 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12204
12205 * configure.srv: Add target "spu*-*-*".
12206 * Makefile.in (clean): Remove reg-spu.c.
12207 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12208 * spu-low.c: New file.
12209
12210 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12211
12212 * configure.ac: Correct td_thr_tls_get_addr test.
12213 * configure: Regenerated.
12214
12215 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12216
12217 * linux-low.c (linux_wait_for_event): Reformat. Use the
12218 pass_signals array.
12219 * remote-utils.c (decode_address_to_semicolon): New.
12220 * server.c (pass_signals, handle_general_set): New.
12221 (handle_query): Mention QPassSignals for qSupported.
12222 (main): Call handle_general_set.
12223 * server.h (pass_signals, decode_address_to_semicolon): New.
12224
12225 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12226
12227 * server.c (handle_query): Correct error handling for read_auxv.
12228
12229 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12230
12231 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12232 and srv_linux_thread_db to yes.
12233 * linux-s390-low.c (s390_fill_gregset): New function.
12234 (target_regsets): Define data structure.
12235
12236 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12237
12238 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12239 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12240 * config.in, configure: Regenerated.
12241 * inferiors.c (gdb_id_to_thread): New function.
12242 (gdb_id_to_thread_id): Use it.
12243 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12244 * linux-low.h (struct process_info): Add th member.
12245 (thread_db_get_tls_address): New prototype.
12246 * remote-utils.c (decode_address): Make non-static.
12247 * server.c (handle_query): Handle qGetTLSAddr.
12248 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12249 * target.h (struct target_ops): Add get_tls_address.
12250 * thread-db.c (maybe_attach_thread): Save the thread handle.
12251 (thread_db_get_tls_address): New.
12252
12253 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12254
12255 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12256 (linux_resume_one_process): Take a siginfo_t *. Update all
12257 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12258 (struct pending_signals): Add a siginfo_t.
12259 (linux_wait_for_process): Always set last_status.
12260 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12261 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12262 * linux-low.h (struct process_info): Add last_status.
12263
12264 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12265
12266 * remote-utils.c (try_rle): New function.
12267 (putpkt_binary): Use it.
12268
12269 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12270
12271 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12272 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12273 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12274 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12275 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12276 point registers.
12277
12278 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12279
12280 * server.c (terminal_fd): New variable.
12281 (old_foreground_pgrp): Likewise.
12282 (restore_old_foreground_pgrp): New function.
12283 (start_inferior): Record the terminal file descriptor in terminal_fd
12284 and its original foreground group in old_foreground_pgrp. Register
12285 restore_old_foreground_pgrp with atexit().
12286
12287 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12288
12289 * server.c (handle_query): Correct qPart to qXfer.
12290
12291 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12292
12293 * configure.ac: Check for more headers which are missing on
12294 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12295 * configure.srv: Add Cygwin and mingw32.
12296 * remote-utils.c: Don't include headers unconditionally which
12297 are missing on mingw32. Include <winsock.h> for mingw32.
12298 (remote_open): Adjust for mingw32 support. Flush
12299 standard error after writing to it.
12300 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12301 (unblock_async_io, enable_async_io, disable_async_io)
12302 (readchar, getpkt): Update for Winsock support.
12303 (prepare_resume_reply): Expect a protocol signal number.
12304 * server.c: Disable <sys/wait.h> on mingw32.
12305 (start_inferior): Adjust for mingw32 support. Flush
12306 standard error after writing to it.
12307 (attach_inferior): Likewise. Use protocol signal
12308 numbers.
12309 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12310 and names.
12311 * win32-i386-low.c: New file.
12312 * Makefile.in (XM_CLIBS): Set.
12313 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12314 (win32-i386-low.o): New dependency rule.
12315 * linux-low.c (linux_wait): Use target signal numbers.
12316 * target.h (struct target_ops): Doc fix.
12317 * server.h (target_signal_to_name): New prototype.
12318 * gdbreplay.c: Don't include headers unconditionally which
12319 are missing on mingw32. Include <winsock.h> for mingw32.
12320 (remote_close, remote_open): Adjust for Winsock support.
12321 * configure, config.in: Regenerated.
12322
12323 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12324
12325 * server.c (decode_xfer_read, write_qxfer_response): New.
12326 (handle_query): Take a packet length argument. Handle
12327 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12328 the qSupported response.
12329 (main): Update call to handle_query.
12330
12331 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12332
12333 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12334 (putpkt_binary): Renamed from putpkt and adjusted for binary
12335 data.
12336 (putpkt): New wrapper for putpkt_binary.
12337 (readchar): Don't mask off the high bit.
12338 (decode_X_packet): New function.
12339 * server.c (main): Call putpkt_binary if a handler sets the packet
12340 length. Save the length of the incoming packet. Handle 'X'.
12341 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12342
12343 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12344
12345 * server.c (handle_query): Handle qSupported.
12346
12347 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12348
12349 * remote-utils.c (all_symbols_looked_up): New variable.
12350 (look_up_one_symbol): Check it.
12351 * server.h (look_up_one_symbol): New declaration.
12352 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12353
12354 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12355
12356 * Makefile.in (linux-arm-low.o): Update dependencies.
12357 * linux-arm-low.c: Include "gdb_proc_service.h".
12358 (PTRACE_GET_THREAD_AREA): Define.
12359 (ps_get_thread_area): New function.
12360
12361 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12362
12363 * configure.srv (m68k*-*-uclinux*): New target.
12364 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12365 (linux_resume_one_process): Remove extraneous cast.
12366 (linux_read_offsets): New.
12367 (linux_target_op): Add linux_read_offsets on mmuless systems.
12368 * server.c (handle_query): Add qOffsets logic.
12369 * target.h (struct target_ops): Add read_offsets.
12370
12371 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12372
12373 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12374 (PTRACE_GET_THREAD_AREA): Define.
12375 (ps_get_thread_area): New function.
12376 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12377 (linux-x86-64-low.o): Update.
12378
12379 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12380
12381 * configure.ac: Remove checks for prfpregset_t.
12382 * gdb_proc_service.h: New file.
12383 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12384 new "gdb_proc_service.h".
12385 * proc-service.c: Likewise.
12386 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12387 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12388 * Makefile.in (gdb_proc_service_h): Updated.
12389 * configure, config.in: Regenerated.
12390
12391 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12392
12393 * remote-utils.c (prepare_resume_reply): Move declaration
12394 of gdb_id_from_wait to the top of the block.
12395
12396 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12397
12398 * linux-low.c (regsets_store_inferior_registers): Read the regset
12399 from the target before filling it.
12400
12401 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12402
12403 * server.c (attach_inferior): Return SIGTRAP for a successful
12404 attach.
12405
12406 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12407
12408 * Makefile.in (OBS): Add version.o.
12409 (STAGESTUFF): Delete.
12410 (version.o): Add dependencies.
12411 (version.c): Replace rule.
12412 (clean): Remove version.c.
12413 * server.c (gdbserver_version): New.
12414 (gdbserver_usage): Use printf.
12415 (main): Handle --version and --help.
12416 * server.h (version, host_name): Add declarations.
12417
12418 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12419
12420 * linux-arm-low.c:
12421 * linux-arm-low.c:
12422 * inferiors.c:
12423 * i387-fp.h:
12424 * i387-fp.c:
12425 * gdbreplay.c:
12426 * regcache.c:
12427 * proc-service.c:
12428 * mem-break.h:
12429 * mem-break.c:
12430 * linux-x86-64-low.c:
12431 * linux-sh-low.c:
12432 * linux-s390-low.c:
12433 * linux-ppc64-low.c:
12434 * linux-ppc-low.c:
12435 * linux-mips-low.c:
12436 * linux-m68k-low.c:
12437 * linux-m32r-low.c:
12438 * linux-low.h:
12439 * linux-low.c:
12440 * linux-ia64-low.c:
12441 * linux-i386-low.c:
12442 * linux-crisv32-low.c:
12443 * thread-db.c:
12444 * terminal.h:
12445 * target.h:
12446 * target.c:
12447 * server.h:
12448 * server.c:
12449 * remote-utils.c:
12450 * regcache.h:
12451 * utils.c:
12452 * Makefile.in:
12453 * configure.ac:
12454 * gdbserver.1: Add (C) after Copyright. Update the FSF
12455 address.
12456
12457 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12458
12459 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12460 (arm_breakpoint_at): Recognize both breakpoints.
12461 (the_low_target): Use the correct breakpoint instruction.
12462
12463 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12464
12465 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12466 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12467 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12468 (the_low_target): Update.
12469
12470 2005-10-25 Andreas Schwab <schwab@suse.de>
12471
12472 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12473
12474 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12475 (ia64_num_regs): Reduce to 462.
12476
12477 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12478
12479 * acinclude.m4: Correct quoting.
12480 * aclocal.m4: Regenerated.
12481
12482 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12483 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12484 (thread_db_init): Call thread_db_err_str.
12485 * configure.ac: Check for TD_VERSION.
12486 * config.in, configure: Regenerated.
12487
12488 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12489
12490 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12491
12492 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12493
12494 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12495 is not available. Define HAVE_PTRACE_GETREGS if it is.
12496 * config.in, configure: Regenerated.
12497 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12498 * linux-i386-low.c, linux-m68k-low.c: Update to use
12499 HAVE_PTRACE_GETREGS.
12500 * linux-low.c (regsets_fetch_inferior_registers)
12501 (regsets_store_inferior_registers): Only return 0 if we processed
12502 GENERAL_REGS.
12503 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12504 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12505
12506 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12507
12508 * inferiors.c (struct thread_info): Add gdb_id.
12509 (add_thread): Add gdb_id argument.
12510 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12511 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12512 calls to add_thread.
12513 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12514 * server.c (handle_query): Use thread_to_gdb_id.
12515 (handle_v_cont, main): Use gdb_id_to_thread_id.
12516 * server.h (add_thread): Update prototype.
12517 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12518 prototypes.
12519
12520 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12521
12522 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12523 left-padded registers.
12524 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12525 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12526
12527 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12528
12529 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12530 * configure: Regenerate.
12531 * config.in: Regenerate.
12532 * server.h (NEED_DECLARATION_STRERROR):
12533 Replace with !HAVE_DECL_STRERROR.
12534
12535 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12536
12537 * linux-low.c (linux_wait, linux_send_signal): Don't test
12538 an unsigned long variable for > 0 if it could be MAX_ULONG.
12539 * server.c (myresume): Likewise.
12540 * target.c (set_desired_inferior): Likewise.
12541
12542 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12543
12544 * configure.ac: Simplify and improve check for socklen_t.
12545 * configure, config.in: Regenerate.
12546
12547 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12548
12549 * acconfig.h: Remove.
12550 * configure.ac: Add a test for socklen_t. Use three-argument
12551 AC_DEFINE throughout.
12552 * config.in: Regenerated using autoheader 2.59.
12553 * configure: Regenerated.
12554
12555 * gdbreplay.c (socklen_t): Provide a default.
12556 (remote_open): Use socklen_t.
12557 * remote-utils.c (socklen_t): Provide a default.
12558 (remote_open): Use socklen_t.
12559 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12560 unsigned char.
12561
12562 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12563 char for buffers.
12564 * linux-low.c (linux_read_memory, linux_write_memory)
12565 (linux_read_auxv): Likewise.
12566 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12567 (check_mem_write): Likewise.
12568 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12569 Likewise.
12570 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12571 (registers_from_string, register_data): Likewise.
12572 * server.c (handle_query, main): Likewise.
12573 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12574 (decode_M_packet): Likewise.
12575 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12576 * target.h (struct target_ops): Update read_memory, write_memory,
12577 and read_auxv.
12578 (read_inferior_memory, write_inferior_memory): Update.
12579 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12580 to unsigned char *.
12581 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12582 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12583 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12584 linux-s390-low.c, linux-sh-low.c: Update for changes in
12585 read_inferior_memory and the_low_target->breakpoint.
12586
12587 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12588
12589 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12590 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12591 * configure.srv: Add powerpc64-*-linux*.
12592 * linux-ppc64-low.c: New file.
12593
12594 2005-05-23 Orjan Friberg <orjanf@axis.com>
12595
12596 * linux-cris-low.c: New file with support for CRIS.
12597 * linux-crisv32-low.c: Ditto for CRISv32.
12598 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12599 (clean): Add reg-cris.c and reg-crisv32.c.
12600 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12601 reg-crisv32.o, and reg-crisv32.c to make rules.
12602 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12603 recognized targets.
12604
12605 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12606
12607 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12608 of sizeof (PTRACE_XFER_TYPE).
12609 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12610
12611 2005-05-12 Orjan Friberg <orjanf@axis.com>
12612
12613 * target.h (struct target_ops): Add insert_watchpoint,
12614 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12615 pointers for hardware watchpoint support.
12616 * linux-low.h (struct linux_target_ops): Ditto.
12617 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12618 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12619 to linux_target_ops.
12620 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12621 reply packet.
12622 * server.c (main): Recognize 'Z' and 'z' packets.
12623
12624 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12625
12626 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12627 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12628 (the_low_target): Add new members.
12629
12630 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12631
12632 * proc-service.c (ps_lgetregs): Search all_processes instead of
12633 all_threads.
12634
12635 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12636
12637 * server.c (start_inferior): Change return type to int.
12638 (attach_inferior): Change sigptr to int *.
12639 (handle_v_cont, handle_v_requests): Change signal to int *.
12640 (main): Change signal to int.
12641
12642 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12643
12644 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12645 * configure.srv: Add m32r*-*-linux*.
12646 * linux-m32r-low.c: New file.
12647
12648 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12649
12650 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12651
12652 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12653
12654 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12655 Take unsigned long arguments for PIDs.
12656 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12657 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12658 (wait_for_sigstop, linux_resume_one_process)
12659 (regsets_fetch_inferior_registers, linux_send_signal)
12660 (linux_read_auxv): Likewise. Update the types of variables holding
12661 PIDs. Update format string specifiers.
12662 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12663 * remote-utils.c (prepare_resume_reply): Likewise.
12664 * server.c (cont_thread, general_thread, step_thread)
12665 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12666 unsigned long.
12667 (handle_query): Update format specifiers.
12668 (handle_v_cont, main): Use strtoul for thread IDs.
12669 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12670 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12671 (general_thread, step_thread, thread_from_wait)
12672 (old_thread_from_wait): Update.
12673 * target.h (struct thread_resume): Use unsigned long for THREAD.
12674 (struct target_ops): Use unsigned long for arguments to attach and
12675 thread_alive.
12676
12677 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12678
12679 * acinclude.m4: Include bfd/bfd.m4 directly.
12680 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12681 <agriffis@toolchain.org>.
12682 * aclocal.m4, configure: Regenerated.
12683
12684 2005-01-07 Andrew Cagney <cagney@gnu.org>
12685
12686 * configure.ac: Rename configure.in, require autoconf 2.59.
12687 * configure: Re-generate.
12688
12689 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12690
12691 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12692 LIBS when finished.
12693 * aclocal.m4: Regenerated.
12694 * configure: Regenerated.
12695
12696 2004-11-21 Andreas Schwab <schwab@suse.de>
12697
12698 * linux-m68k-low.c (m68k_num_gregs): Define.
12699 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12700 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12701 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12702 (m68k_breakpoint_at): New. Add to the_low_target.
12703
12704 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12705 srv_linux_thread_db to yes.
12706
12707 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12708
12709 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12710 (ARCH_SET_FS): Likewise.
12711 (ARCH_GET_FS): Likewise.
12712 (ARCH_GET_GS): Likewise.
12713
12714 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12715
12716 * linux-i386-low.c (ps_get_thread_area): New.
12717 * linux-x86-64-low.c (ps_get_thread_area): New.
12718 * linux-low.c: Include <sys/syscall.h>.
12719 (linux_kill_one_process): Don't kill the first thread here.
12720 (linux_kill): Kill the first thread here.
12721 (kill_lwp): New function.
12722 (send_sigstop, linux_send_signal): Use it.
12723 * proc-service.c: Clean up #ifdefs.
12724 (fpregset_info): Delete.
12725 (ps_lgetregs): Update and enable implementation.
12726 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12727 implementations.
12728 * remote-utils.c (struct sym_cache, symbol_cache): New.
12729 (input_interrupt): Print a clearer message.
12730 (async_io_enabled): New variable.
12731 (enable_async_io, disable_async_io): Use it. Update comments.
12732 (look_up_one_symbol): Use the symbol cache.
12733 * thread-db.c (thread_db_look_up_symbols): New function.
12734 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12735
12736 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12737
12738 * configure.in: Test for -rdynamic.
12739 * configure: Regenerated.
12740 * Makefile (INTERNAL_LDFLAGS): New.
12741 (gdbserver, gdbreplay): Use it.
12742
12743 2004-09-02 Andrew Cagney <cagney@gnu.org>
12744
12745 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12746
12747 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12748
12749 * linux-low.c (linux_wait): Clear all_processes list also.
12750
12751 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12752
12753 * linux-low.c: Include <errno.h>. Remove extern declaration of
12754 errno.
12755
12756 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12757
12758 * gdbreplay.c, server.h, utils.c: Update copyright years.
12759
12760 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12761
12762 * server.c (main): Print child status or termination signal from
12763 variable 'signal', not 'sig'.
12764
12765 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12766
12767 * linux-low.c (linux_read_memory): Change return type to
12768 int. Check for and return error from ptrace().
12769 * target.c (read_inferior_memory): Change return type to int. Pass
12770 back return status from the_target->read_memory().
12771 * target.h (struct target_ops): Adapt *read_memory() prototype.
12772 Update comment.
12773 (read_inferior_memory): Adapt prototype.
12774 * server.c (main): Return an error packet if
12775 read_inferior_memory() returns an error.
12776
12777 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12778
12779 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12780 Unify with other clean targets.
12781
12782 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12783
12784 * server.c (handle_v_cont): Call set_desired_inferior.
12785
12786 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12787
12788 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12789
12790 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12791
12792 * linux-low.c (linux_wait): Unblock async I/O.
12793 (linux_resume): Block and enable async I/O.
12794 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12795 * server.h (block_async_io, unblock_async_io): Add prototypes.
12796
12797 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12798
12799 * remote-utils.c (remote_open): Print a status notice after
12800 opening a TCP port.
12801 * server.c (attach_inferior): Print a status notice after
12802 attaching.
12803
12804 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12805
12806 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12807
12808 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12809
12810 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12811 error packet.
12812 * server.c, target.h: Update copyright years.
12813
12814 2004-02-25 Roland McGrath <roland@redhat.com>
12815
12816 * target.h (struct target_ops): New member `read_auxv'.
12817 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12818 * linux-low.c (linux_read_auxv): New function.
12819 (linux_target_ops): Initialize `read_auxv' member to that.
12820
12821 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12822
12823 Committed by Jim Blandy <jimb@redhat.com>.
12824
12825 * linux-s390-low.c (s390_num_regs): Update.
12826 (s390_regmap): Remove control registers. Use __s390x__ predefine
12827 instead of GPR_SIZE to distiguish s390 and s390x targets.
12828
12829 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12830
12831 * linux-low.c: Update copyright year.
12832 (check_removed_breakpoint): Clear pending_is_breakpoint.
12833 (linux_set_resume_request, linux_queue_one_thread)
12834 (resume_status_pending_p): New functions.
12835 (linux_continue_one_thread): Use process->resume.
12836 (linux_resume): Only resume threads if there are no pending events.
12837 * linux-low.h (struct process_info): Add resume request
12838 pointer.
12839
12840 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12841
12842 * regcache.c (new_register_cache): Clear the allocated register
12843 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12844
12845 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12846
12847 * linux-low.c (linux_resume): Take a struct thread_resume *
12848 argument.
12849 (linux_wait): Update call.
12850 (resume_ptr): New static variable.
12851 (linux_continue_one_thread): Renamed from
12852 linux_continue_one_process. Use resume_ptr.
12853 (linux_resume): Use linux_continue_one_thread.
12854 * server.c (handle_v_cont, handle_v_requests): New functions.
12855 (myresume): New function.
12856 (main): Handle 'v' case.
12857 * target.h (struct thread_resume): New type.
12858 (struct target_ops): Change argument of "resume" to struct
12859 thread_resume *.
12860 (myresume): Delete macro.
12861
12862 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12863
12864 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12865 (uninstall): Support DESTDIR.
12866
12867 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12868
12869 * configure.srv: Add xscale*linux copy of arm*linux entry.
12870
12871 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12872
12873 * linux-arm-low.c (arm_reinsert_addr): New function.
12874 (the_low_target): Add arm_reinsert_addr.
12875
12876 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12877
12878 * mem-break.c: Remove whitespace at end of file.
12879
12880 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12881
12882 * configure.in: Check whether we need to prototype strerror.
12883 * server.h: Optionally prototype strerror.
12884 * gdbreplay.c (perror_with_name): Use strerror.
12885 * linux-low.c (linux_attach_lwp): Use strerror.
12886 * utils.c (perror_with_name): Use strerror.
12887 * config.in, configure: Regenerated.
12888
12889 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12890
12891 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12892 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12893
12894 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12895
12896 * Makefile.in (SFILES): Update.
12897 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12898 low-sun3.c: Remove files.
12899
12900 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12901
12902 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12903 (linux_detach_one_process, linux_detach): New functions.
12904 (linux_target_ops): Add linux_detach.
12905 * server.c (main): Handle 'D' packet.
12906 * target.h (struct target_ops): Add "detach" member.
12907 (detach_inferior): Define.
12908
12909 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12910
12911 From Kelley Cook <kelleycook@wideopenwest.com>:
12912 * configure.srv: Accept i[34567]86 variants.
12913
12914 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12915
12916 * linux-low.c (linux_wait_for_event): Correct comment typos.
12917 (linux_resume_one_process): Call check_removed_breakpoint.
12918 (linux_send_signal): New function.
12919 (linux_target_ops): Add linux_send_signal.
12920 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12921 of kill.
12922 * target.h (struct target_ops): Add send_signal.
12923
12924 2003-05-29 Jim Blandy <jimb@redhat.com>
12925
12926 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12927 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12928 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12929 away part of the register's value.
12930
12931 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12932
12933 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12934 (linux_wait_for_event, linux_init_signals): Likewise.
12935
12936 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12937
12938 * configure.in: Check for stdlib.h.
12939 * configure: Regenerated.
12940 * config.in: Regenerated.
12941
12942 2003-01-04 Andreas Schwab <schwab@suse.de>
12943
12944 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12945
12946 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12947
12948 * Makefile.in: Remove obsolete code.
12949
12950 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12951
12952 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12953 defined(PT_FPR0_HI).
12954
12955 2002-11-17 Stuart Hughes <seh@zee2.com>
12956
12957 * linux-arm-low.c (arm_num_regs): Increase.
12958 (arm_regmap): Include status register.
12959
12960 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12961
12962 * linux-low.c (register_addr): Remove incorrect -1 check.
12963
12964 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12965
12966 * linux-low.c (linux_create_inferior): Call setpgid. Return
12967 the new PID.
12968 (unstopped_p, linux_signal_pid): Remove.
12969 (linux_target_ops): Remove linux_signal_pid.
12970 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12971 global instead of target method.
12972 * target.h (struct target_ops): Remove signal_pid. Update comment
12973 for create_inferior.
12974 * server.c (signal_pid): New variable.
12975 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12976 gdbserver. Set the child to be the foreground process group.
12977 (attach_inferior): Set signal_pid.
12978
12979 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12980
12981 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12982
12983 2002-08-20 Jim Blandy <jimb@redhat.com>
12984
12985 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12986 default for this.
12987
12988 2002-08-01 Andrew Cagney <cagney@redhat.com>
12989
12990 * Makefile.in: Make chill references obsolete.
12991
12992 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12993
12994 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12995 * configure: Regenerate.
12996 * config.in: Regenerate.
12997
12998 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12999
13000 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13001 (perror_with_name, remote_close, remote_open, expect, play): Static.
13002
13003 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13004
13005 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13006 byte offsets instead of an array of indexes.
13007 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13008
13009 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13010
13011 * regcache.c: Add comment.
13012
13013 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13014
13015 * thread-db.c: New file.
13016 * proc-service.c: New file.
13017 * acinclude.m4: New file.
13018 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13019 proc-service.o, and thread-db.o.
13020 (linux-low.o): Add USE_THREAD_DB.
13021 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13022 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13023 * aclocal.m4: Regenerated.
13024 * config.in: Regenerated.
13025 * configure: Regenerated.
13026 * configure.in: Check for proc_service.h, sys/procfs.h,
13027 thread_db.h, and linux/elf.h headrs.
13028 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13029 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13030 Check for -lthread_db and thread support.
13031 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13032 PowerPC, and SuperH.
13033 * i387-fp.c: Constify arguments.
13034 * i387-fp.h: Likewise.
13035 * inferiors.c: (struct thread_info): Renamed from
13036 `struct inferior_info'. Remove PID member. Use generic inferior
13037 list header. All uses updated.
13038 (inferiors, signal_pid): Removed.
13039 (all_threads): New variable.
13040 (get_thread): Define.
13041 (add_inferior_to_list): New function.
13042 (for_each_inferior): New function.
13043 (change_inferior_id): New function.
13044 (add_inferior): Removed.
13045 (remove_inferior): New function.
13046 (add_thread): New function.
13047 (free_one_thread): New function.
13048 (remove_thread): New function.
13049 (clear_inferiors): Use for_each_inferior and free_one_thread.
13050 (find_inferior): New function.
13051 (find_inferior_id): New function.
13052 (inferior_target_data): Update argument type.
13053 (set_inferior_target_data): Likewise.
13054 (inferior_regcache_data): Likewise.
13055 (set_inferior_regcache_data): Likewise.
13056 * linux-low.c (linux_bp_reinsert): Remove.
13057 (all_processes, stopping_threads, using_thrads)
13058 (struct pending_signals, debug_threads, pid_of): New.
13059 (inferior_pid): Replace with macro.
13060 (struct inferior_linux_data): Remove.
13061 (get_stop_pc, add_process): New functions.
13062 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13063 Use add_process and add_thread.
13064 (linux_attach_lwp): New function, based on old linux_attach. Use
13065 add_process and add_thread. Set stop_expected for new threads.
13066 (linux_attach): New function.
13067 (linux_kill_one_process): New function.
13068 (linux_kill): Kill all LWPs.
13069 (linux_thread_alive): Use find_inferior_id.
13070 (check_removed_breakpoints, status_pending_p): New functions.
13071 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13072 Update. Use WNOHANG. Wait for cloned processes also. Update process
13073 struct for the found process.
13074 (linux_wait_for_event): New function.
13075 (linux_wait): Use it. Support LWPs.
13076 (send_sigstop, wait_for_sigstop, stop_all_processes)
13077 (linux_resume_one_process, linux_continue_one_process): New functions.
13078 (linux_resume): Support LWPs.
13079 (REGISTER_RAW_SIZE): Remove.
13080 (fetch_register): Use register_size instead. Call supply_register.
13081 (usr_store_inferior_registers): Likewise. Call collect_register.
13082 Fix recursive case.
13083 (regsets_fetch_inferior_registers): Improve error message.
13084 (regsets_store_inferior_registers): Add debugging.
13085 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13086 (unstopped_p, linux_signal_pid): New functions.
13087 (linux_target_ops): Add linux_signal_pid.
13088 (linux_init_signals): New function.
13089 (initialize_low): Call it. Initialize using_threads.
13090 * regcache.c (inferior_regcache_data): Add valid
13091 flag.
13092 (get_regcache): Fetch registers lazily. Add fetch argument
13093 and update all callers.
13094 (regcache_invalidate_one, regcache_invalidate): New
13095 functions.
13096 (new_register_cache): Renamed from create_register_cache.
13097 Return the new regcache.
13098 (free_register_cache): Change argument to a void *.
13099 (registers_to_string, registers_from_string): Call get_regcache
13100 with fetch flag set.
13101 (register_data): Make static. Pass fetch flag to get_regcache.
13102 (supply_register): Call get_regcache with fetch flag clear.
13103 (collect_register): Call get_regcache with fetch flag set.
13104 (collect_register_as_string): New function.
13105 * regcache.h: Update.
13106 * remote-utils.c (putpkt): Flush after debug output and use
13107 stderr.
13108 Handle input interrupts while waiting for an ACK.
13109 (input_interrupt): Use signal_pid method.
13110 (getpkt): Flush after debug output and use stderr.
13111 (outreg): Use collect_register_as_string.
13112 (new_thread_notify, dead_thread_notify): New functions.
13113 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13114 and general_thread.
13115 (look_up_one_symbol): Flush after debug output.
13116 * server.c (step_thread, server_waiting): New variables.
13117 (start_inferior): Don't use signal_pid. Update call to mywait.
13118 (attach_inferior): Update call to mywait.
13119 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13120 (main): Don't fetch/store registers explicitly. Use
13121 set_desired_inferior. Support proposed ``Hs'' packet. Update
13122 calls to mywait.
13123 * server.h: Update.
13124 (struct inferior_list, struct_inferior_list_entry): New.
13125 * target.c (set_desired_inferior): New.
13126 (write_inferior_memory): Constify.
13127 (mywait): New function.
13128 * target.h: Update.
13129 (struct target_ops): New signal_pid method.
13130 (mywait): Removed macro, added prototype.
13131
13132 * linux-low.h (regset_func): Removed.
13133 (regset_fill_func, regset_store_func): New.
13134 (enum regset_type): New.
13135 (struct regset_info): Add type field. Use new operation types.
13136 (struct linux_target_ops): stop_pc renamed to get_pc.
13137 Add decr_pc_after_break and breakpoint_at.
13138 (get_process, get_thread_proess, get_process_thread)
13139 (strut process_info, all_processes, linux_attach_lwp)
13140 (thread_db_init): New.
13141
13142 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13143 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13144 (the_low_target): Add new members.
13145 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13146 (i386_store_fpxregset): Constify.
13147 (target_regsets): Add new kind identifier.
13148 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13149 (i386_set_pc): Add debugging.
13150 (i386_breakpoint_at): New function.
13151 (the_low_target): Add new members.
13152 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13153 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13154 (mips_breakpoint_at): New.
13155 (the_low_target): Add new members.
13156 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13157 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13158 (the_low_target): Add new members.
13159 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13160 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13161 (the_low_target): Add new members.
13162 * linux-x86-64-low.c (target_regsets): Add new kind
13163 identifier.
13164
13165 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13166
13167 From Martin Pool <mbp@samba.org>:
13168 * server.c (gdbserver_usage): New function.
13169 (main): Call it.
13170
13171 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13172
13173 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13174 stop_at -> stop_pc.
13175
13176 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13177
13178 * Makefile.in: Remove obsolete code.
13179
13180 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13181
13182 * linux-low.c (regsets_fetch_inferior_registers),
13183 (regsets_store_inferior_registers): Removed cast to int from
13184 ptrace() calls.
13185 * regcache.h: Added declaration of struct inferior_info.
13186
13187 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13188
13189 * inferiors.c (struct inferior_info): Add regcache_data.
13190 (add_inferior): Call create_register_cache.
13191 (clear_inferiors): Call free_register_cache.
13192 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13193 * regcache.c (struct inferior_regcache_data): New.
13194 (registers): Remove.
13195 (get_regcache): New function.
13196 (create_register_cache, free_register_cache): New functions.
13197 (set_register_cache): Don't initialize the register cache here.
13198 (registers_to_string, registers_from_string, register_data): Call
13199 get_regcache.
13200 * regcache.h: Add prototypes.
13201 * server.h: Likewise.
13202
13203 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13204
13205 * mem-break.c: New file.
13206 * mem-break.h: New file.
13207 * Makefile.in: Add mem-break.o rule; update server.h
13208 dependencies.
13209 * inferiors.c (struct inferior_info): Add target_data
13210 member.
13211 (clear_inferiors): Free target_data member if set.
13212 (inferior_target_data, set_inferior_target_data): New functions.
13213 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13214 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13215 * linux-low.c (linux_bp_reinsert): New variable.
13216 (struct inferior_linux_data): New.
13217 (linux_create_inferior): Use set_inferior_target_data.
13218 (linux_attach): Likewise. Call add_inferior.
13219 (linux_wait_for_one_inferior): New function.
13220 (linux_wait): Call it.
13221 (linux_write_memory): Add const.
13222 (initialize_low): Call set_breakpoint_data.
13223 * linux-low.h (struct linux_target_ops): Add breakpoint
13224 handling members.
13225 * server.c (attach_inferior): Remove extra add_inferior
13226 call.
13227 * server.h: Include mem-break.h. Update inferior.c
13228 prototypes.
13229 * target.c (read_inferior_memory)
13230 (write_inferior_memory): New functions.
13231 * target.h (read_inferior_memory)
13232 (write_inferior_memory): Change macros to prototypes.
13233 (struct target_ops): Update comments. Add const to write_memory
13234 definition.
13235
13236 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13237
13238 * linux-low.c (usr_store_inferior_registers): Support
13239 registers which are allowed to fail to store.
13240 * linux-low.h (linux_target_ops): Likewise.
13241 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13242 (ppc_cannot_store_register): FPSCR may not be storable.
13243
13244 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13245
13246 * server.h: Include <string.h> if HAVE_STRING_H.
13247 * ChangeLog: Correct paths in last ChangeLog entry.
13248
13249 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13250
13251 * linux-low.h: Remove obsolete prototypes.
13252 (struct linux_target_ops): New.
13253 (extern the_low_target): New.
13254 * linux-low.c (num_regs, regmap): Remove declarations.
13255 (register_addr): Use the_low_target explicitly.
13256 (fetch_register): Likewise.
13257 (usr_fetch_inferior_registers): Likewise.
13258 (usr_store_inferior_registers): Likewise.
13259 * linux-arm-low.c (num_regs): Remove.
13260 (arm_num_regs): Define.
13261 (arm_regmap): Renamed from regmap, made static.
13262 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13263 made static.
13264 (arm_cannot_store_register): Renamed from cannot_store_register,
13265 made static.
13266 (the_low_target): New.
13267 * linux-i386-low.c (num_regs): Remove.
13268 (i386_num_regs): Define.
13269 (i386_regmap): Renamed from regmap, made static.
13270 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13271 made static.
13272 (i386_cannot_store_register): Renamed from cannot_store_register,
13273 made static.
13274 (the_low_target): New.
13275 * linux-ia64-low.c (num_regs): Remove.
13276 (ia64_num_regs): Define.
13277 (ia64_regmap): Renamed from regmap, made static.
13278 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13279 made static.
13280 (ia64_cannot_store_register): Renamed from cannot_store_register,
13281 made static.
13282 (the_low_target): New.
13283 * linux-m68k-low.c (num_regs): Remove.
13284 (m68k_num_regs): Define.
13285 (m68k_regmap): Renamed from regmap, made static.
13286 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13287 made static.
13288 (m68k_cannot_store_register): Renamed from cannot_store_register,
13289 made static.
13290 (the_low_target): New.
13291 * linux-mips-low.c (num_regs): Remove.
13292 (mips_num_regs): Define.
13293 (mips_regmap): Renamed from regmap, made static.
13294 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13295 made static.
13296 (mips_cannot_store_register): Renamed from cannot_store_register,
13297 made static.
13298 (the_low_target): New.
13299 * linux-ppc-low.c (num_regs): Remove.
13300 (ppc_num_regs): Define.
13301 (ppc_regmap): Renamed from regmap, made static.
13302 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13303 made static.
13304 (ppc_cannot_store_register): Renamed from cannot_store_register,
13305 made static.
13306 (the_low_target): New.
13307 * linux-s390-low.c (num_regs): Remove.
13308 (s390_num_regs): Define.
13309 (s390_regmap): Renamed from regmap, made static.
13310 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13311 made static.
13312 (s390_cannot_store_register): Renamed from cannot_store_register,
13313 made static.
13314 (the_low_target): New.
13315 * linux-sh-low.c (num_regs): Remove.
13316 (sh_num_regs): Define.
13317 (sh_regmap): Renamed from regmap, made static.
13318 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13319 made static.
13320 (sh_cannot_store_register): Renamed from cannot_store_register,
13321 made static.
13322 (the_low_target): New.
13323 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13324 (the_low_target): New.
13325
13326 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13327
13328 * Makefile.in: Add stamp-h target.
13329 * configure.in: Create stamp-h.
13330 * configure: Regenerated.
13331
13332 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13333
13334 * inferiors.c: New file.
13335 * target.c: New file.
13336 * target.h: New file.
13337 * Makefile.in: Add target.o and inferiors.o. Update
13338 dependencies.
13339 * linux-low.c (inferior_pid): New static variable,
13340 moved from server.c.
13341 (linux_create_inferior): Renamed from create_inferior.
13342 Call add_inferior. Return 0 on success instead of a PID.
13343 (linux_attach): Renamed from myattach.
13344 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13345 (linux_thread_alive): Renamed from mythread_alive.
13346 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13347 child dies.
13348 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13349 (regsets_store_inferior_registers): Correct error message.
13350 Add missing ``return 0''.
13351 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13352 (linux_store_registers): Renamed from store_inferior_registers.
13353 (linux_read_memory): Renamed from read_inferior_memory.
13354 (linux_write_memory): Renamed from write_inferior_memory.
13355 (linux_target_ops): New structure.
13356 (initialize_low): Call set_target_ops ().
13357 * remote-utils.c (unhexify): New function.
13358 (hexify): New function.
13359 (input_interrupt): Send signals to ``signal_pid''.
13360 * server.c (inferior_pid): Remove.
13361 (start_inferior): Update create_inferior call.
13362 (attach_inferior): Call add_inferior.
13363 (handle_query): New function.
13364 (main): Call handle_query for `q' packets.
13365 * server.h: Include "target.h". Remove obsolete prototypes.
13366 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13367
13368 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13369
13370 * Makefile.in: Add WARN_CFLAGS. Update configury
13371 dependencies.
13372 * configure.in: Check for <string.h>
13373 * configure: Regenerate.
13374 * config.in: Regenerate.
13375 * gdbreplay.c: Include needed system headers.
13376 (remote_open): Remove strchr prototype.
13377 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13378 * regcache.c (supply_register): Change buf argument to const void *.
13379 (supply_register_by_name): Likewise.
13380 (collect_register): Change buf argument to void *.
13381 (collect_register_by_name): Likewise.
13382 * regcache.h: Add missing prototypes.
13383 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13384 * server.c (handle_query): New function.
13385 (attached): New static variable, moved out of main.
13386 (main): Quiet longjmp clobber warnings.
13387 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13388 * utils.c (error): Remove NORETURN.
13389 (fatal): Likewise.
This page took 0.31766 seconds and 4 git commands to generate.