gdb.trace: Fix another expected message on continue.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2016-01-23 Marcin Koƛcielnicki <koriakin@0x04.net>
2
3 * gdb.trace/pending.exp: Fix expected message on continue.
4
5 2016-01-22 Marcin Koƛcielnicki <koriakin@0x04.net>
6
7 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8 it works properly on big-endian machines where sizeof (CORE_ADDR)
9 != sizeof (void *).
10
11 2016-01-21 Pedro Alves <palves@redhat.com>
12
13 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
14 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
15 * configure: Regenerate.
16
17 2016-01-21 Yao Qi <yao.qi@linaro.org>
18
19 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
20 is_thumb and set it according to CPSR saved on the stack.
21 (get_next_pcs_syscall_next_pc): Pass is_thumb to
22 arm_sigreturn_next_pc.
23
24 2016-01-18 Yao Qi <yao.qi@linaro.org>
25
26 * linux-low.c (linux_set_pc_64bit): New function.
27 (linux_get_pc_64bit): New function.
28 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
29 Declare.
30 * linux-sparc-low.c (debug_threads): Remove declaration.
31 (sparc_get_pc): Remove.
32 (the_low_target): Use linux_get_pc_64bit instead of
33 sparc_get_pc.
34 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
35 (the_low_target): Use linux_get_pc_64bit and
36 linux_set_pc_64bit.
37
38 2016-01-18 Yao Qi <yao.qi@linaro.org>
39
40 * linux-arm-low.c (debug_threads): Remove declaration.
41 (arm_get_pc, arm_set_pc): Remove.
42 (the_low_target): Use linux_get_pc_32bit and
43 linux_set_pc_32bit.
44 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
45 (the_low_target): Use linux_get_pc_32bit and
46 linux_set_pc_32bit.
47 * linux-cris-low.c (debug_threads): Remove declaration.
48 (cris_get_pc, cris_set_pc,): Remove.
49 (the_low_target): Use linux_get_pc_32bit and
50 linux_set_pc_32bit.
51 * linux-crisv32-low.c (debug_threads): Remove declaration.
52 (cris_get_pc, cris_set_pc): Remove.
53 (the_low_target): Use linux_get_pc_32bit and
54 linux_set_pc_32bit.
55 * linux-low.c: Include inttypes.h.
56 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
57 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
58 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
59 (the_low_target): Use linux_get_pc_32bit and
60 linux_set_pc_32bit.
61 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
62 (the_low_target): Use linux_get_pc_32bit and
63 linux_set_pc_32bit.
64 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
65 (the_low_target): Use linux_get_pc_32bit and
66 linux_set_pc_32bit.
67 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
68 (the_low_target): Use linux_get_pc_32bit and
69 linux_set_pc_32bit.
70 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
71 (the_low_target): Use linux_get_pc_32bit and
72 linux_set_pc_32bit.
73
74 2016-01-18 Gary Benson <gbenson@redhat.com>
75
76 * configure.ac (AC_FUNC_FORK): New check.
77 * config.in: Regenerate.
78 * configure: Likewise.
79
80 2016-01-14 Yao Qi <yao.qi@linaro.org>
81
82 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
83 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
84 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
85 arm_get_next_pcs_ctor.
86
87 2016-01-12 Josh Stone <jistone@redhat.com>
88 Philippe Waroquiers <philippe.waroquiers@skynet.be>
89
90 * inferiors.h: Include "gdb_vecs.h".
91 (struct process_info): Add syscalls_to_catch.
92 * inferiors.c (remove_process): Free syscalls_to_catch.
93 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
94 syscall_return stops.
95 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
96 * server.c (handle_general_set): Handle QCatchSyscalls.
97 (handle_query): Report support for QCatchSyscalls.
98 * target.h (struct target_ops): Add supports_catch_syscall.
99 (target_supports_catch_syscall): New macro.
100 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
101 (struct lwp_info): Add syscall_state.
102 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
103 Maintain syscall_state and syscalls_to_catch across exec.
104 (get_syscall_trapinfo): New function, proxy to the_low_target.
105 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
106 (linux_low_filter_event): Toggle syscall_state entry/return for
107 syscall traps, and set it ignored for all others.
108 (gdb_catching_syscalls_p): New function.
109 (gdb_catch_this_syscall_p): New function.
110 (linux_wait_1): Handle SYSCALL_SIGTRAP.
111 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
112 (linux_supports_catch_syscall): New function.
113 (linux_target_ops): Install it.
114 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
115 (the_low_target): Install it.
116
117 2016-01-12 Mike Frysinger <vapier@gentoo.org>
118
119 * acinclude.m4: Include new ../warning.m4 file.
120 * configure: Regenerated.
121 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
122
123 2016-01-12 Mike Frysinger <vapier@gentoo.org>
124
125 * ax.c (is_goto_target): Mark static.
126 * linux-low.c (register_addr): Likewise.
127 (linux_fetch_registers, linux_store_registers): Likewise.
128 * mem-break.c (any_persistent_commands): Fix old prototype.
129 (add_commands_to_breakpoint): Mark static.
130 * regcache.c (find_register_by_name): Delete unused func.
131 * remote-utils.c (hex_or_minus_one): Mark static.
132 * server.c (monitor_show_help): Mark static.
133 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
134 handle_v_requests): Likewise.
135
136 2016-01-12 Pedro Alves <palves@redhat.com>
137
138 Remove use of the registered trademark symbol throughout.
139
140 2016-01-08 Yao Qi <yao.qi@linaro.org>
141
142 * remote-utils.c (getpkt): If c is '\003', call target hook
143 request_interrupt.
144
145 2016-01-06 Yao Qi <yao.qi@linaro.org>
146
147 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
148 linux-aarch32-low.c.
149 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
150 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
151 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
152 (thumb2_breakpoint): Declare.
153 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
154 linux-aarch32-low.h.
155 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
156 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
157 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
158
159 2016-01-01 Joel Brobecker <brobecker@adacore.com>
160
161 * gdbreplay.c (gdbreplay_version): Change copyright year in
162 version message.
163 * server.c (gdbserver_version): Likewise.
164
165 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
166
167 * server.c (crc32_table): Delete.
168 (crc32): Use libiberty's xcrc32 function.
169
170 2015-12-22 Joel Brobecker <brobecker@adacore.com>
171
172 * lynx-low.c (lynx_delete_thread_callback): New function.
173 (lynx_mourn): Properly delete our process and all of its
174 threads. Remove call to clear_inferiors.
175
176 2015-12-22 Joel Brobecker <brobecker@adacore.com>
177
178 * target.c (thread_search_callback): Add check that
179 the thread_stopped target callback is not NULL before
180 calling it.
181
182 2015-12-21 Yao Qi <yao.qi@linaro.org>
183
184 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
185 arm breakpoint.
186
187 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
188
189 * server.c (handle_query): Call target_supports_software_single_step.
190
191 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
192
193 * linux-low.c (single_step): New function.
194 (linux_resume_one_lwp_throw): Call single_step.
195 (start_step_over): Likewise.
196
197 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
198
199 * Makefile.in (SFILES): Append arch/arm-linux.c,
200 arch/arm-get-next-pcs.c.
201 (arm-linux.o): New rule.
202 (arm-get-next-pcs.o): New rule.
203 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
204 arm-linux.o.
205 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
206 to linux-aarch32-low.c.
207 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
208 (arm_breakpoint_len, thumb_breakpoint): Likewise.
209 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
210 (thumb2_breakpoint_len): Likewise.
211 (arm_is_thumb_mode): Make non-static.
212 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
213 from linux-aarch32-low.c.
214 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
215 (arm_breakpoint_len, thumb_breakpoint): Likewise.
216 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
217 (thumb2_breakpoint_len): Likewise.
218 (arm_is_thumb_mode): New declaration.
219 * linux-arm-low.c: Include arch/arm-linux.h
220 aarch/arm-get-next-pcs.h, sys/syscall.h.
221 (get_next_pcs_ops): New struct.
222 (get_next_pcs_addr_bits_remove): New function.
223 (get_next_pcs_is_thumb): New function.
224 (get_next_pcs_read_memory_unsigned_integer): Likewise.
225 (arm_sigreturn_next_pc): Likewise.
226 (get_next_pcs_syscall_next_pc): Likewise.
227 (arm_gdbserver_get_next_pcs): Likewise.
228 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
229 Initialize.
230 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
231 * server.h: Include gdb_vecs.h.
232
233 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
234
235 * Makefile.in (SFILES): Append common/common-regcache.c.
236 (OBS): Append common-regcache.o.
237 (common-regcache.o): New rule.
238 * regcache.c (init_register_cache): Initialize cache to
239 REG_UNAVAILABLE.
240 (regcache_raw_read_unsigned): New function.
241 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
242 register_status enum.
243
244 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
245
246 * linux-aarch64-low.c (the_low_targets): Rename
247 breakpoint_reinsert_addr to get_next_pcs.
248 * linux-arm-low.c (the_low_targets): Likewise.
249 * linux-bfin-low.c (the_low_targets): Likewise.
250 * linux-cris-low.c (the_low_targets): Likewise.
251 * linux-crisv32-low.c (the_low_targets): Likewise.
252 * linux-low.c (can_software_single_step): Likewise.
253 (install_software_single_step_breakpoints): New function.
254 (start_step_over): Use install_software_single_step_breakpoints.
255 * linux-low.h: New CORE_ADDR vector.
256 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
257 get_next_pcs.
258 * linux-mips-low.c (the_low_targets): Likewise.
259 * linux-nios2-low.c (the_low_targets): Likewise.
260 * linux-sparc-low.c (the_low_targets): Likewise.
261
262 2015-12-17 Pedro Alves <palves@redhat.com>
263
264 * linux-low.c (linux_kill_one_lwp): Remove references to
265 LinuxThreads.
266 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
267 to 'kill'.
268 (linux_init_signals): Delete.
269 (initialize_low): Adjust.
270 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
271
272 2015-12-16 Pedro Alves <palves@redhat.com>
273
274 * configure.ac (compiler warning flags): When testing a
275 -Wno-foo option, check whether -Wfoo works instead.
276 * configure: Regenerate.
277
278 2015-12-11 Don Breazeal <donb@codesourcery.com>
279
280 * server.c (process_serial_event): Don't exit from gdbserver
281 in remote mode if there are still active inferiors.
282
283 2015-12-11 Yao Qi <yao.qi@linaro.org>
284
285 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
286 arm_breakpoint_at if the process is 32-bit.
287
288 2015-12-11 Yao Qi <yao.qi@linaro.org>
289
290 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
291 arm breakpoint.
292
293 2015-12-07 Yao Qi <yao.qi@linaro.org>
294
295 * configure.srv: Append arm.o to srv_tgtobj for
296 aarch64*-*-linux* target.
297 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
298 from linux-arm-low.c.
299 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
300 (arm_breakpoint_len, thumb_breakpoint): Likewise.
301 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
302 (thumb2_breakpoint_len): Likewise.
303 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
304 (arm_breakpoint_kinds): Likewise.
305 (arm_breakpoint_kind_from_pc): Likewise.
306 (arm_sw_breakpoint_from_kind): Likewise.
307 (arm_breakpoint_kind_from_current_state): Likewise.
308 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
309 (arm_sw_breakpoint_from_kind): Declare.
310 (arm_breakpoint_kind_from_current_state): Declare.
311 (arm_breakpoint_at): Declare.
312 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
313 arm_sw_breakpoint_from_kind if process is 32-bit.
314 (aarch64_breakpoint_kind_from_pc): New function.
315 (aarch64_breakpoint_kind_from_current_state): New function.
316 (the_low_target): Initialize fields breakpoint_kind_from_pc
317 and breakpoint_kind_from_current_state.
318 * linux-arm-low.c (arm_breakpoint_kinds): Move to
319 linux-aarch32-low.c.
320 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
321 (arm_breakpoint, arm_breakpoint_len): Likewise.
322 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
323 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
324 (arm_is_thumb_mode): Likewise.
325 (arm_breakpoint_at): Likewise.
326 (arm_breakpoint_kind_from_pc): Likewise.
327 (arm_sw_breakpoint_from_kind): Likewise.
328 (arm_breakpoint_kind_from_current_state): Likewise.
329
330 Revert:
331 2015-08-04 Yao Qi <yao.qi@linaro.org>
332
333 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
334 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
335 * server.c (extended_protocol): Remove "static".
336 * server.h (extended_protocol): Declare it.
337
338 2015-12-04 Josh Stone <jistone@redhat.com>
339
340 * target.h (struct target_ops) <arch_setup>: Rename to ...
341 (struct target_ops) <post_create_inferior>: ... this.
342 (target_arch_setup): Rename to ...
343 (target_post_create_inferior): ... this, calling post_create_inferior.
344 * server.c (start_inferior): Update target_arch_setup calls to
345 target_post_create_inferior.
346 * linux-low.c (linux_low_ptrace_options): Forward declare.
347 (linux_arch_setup): Update its comment for general use.
348 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
349 (struct linux_target_ops): Use linux_post_create_inferior.
350 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
351 to post_create_inferior.
352 * nto-low.c (struct nto_target_ops): Likewise.
353 * spu-low.c (struct spu_target_ops): Likewise.
354 * win32-low.c (struct win32_target_ops): Likewise.
355
356 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
357
358 * linux-arm-low.c: Remove duplicate arch/arm.h include.
359
360 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
361
362 * linux-arm-low.c (arm_reinsert_addr): Remove function.
363 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
364 * linux-cris-low.c (cris_reinsert_addr> Remove function.
365 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
366 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
367 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
368 * linux-mips-low.c (mips_reinsert_addr): Remove function.
369 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
370 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
371 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
372 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
373 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
374
375 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
376
377 * linux-low.c (linux_look_up_symbols): Don't call
378 linux_supports_traceclone.
379 * linux-low.h (thread_db_init): Remove use_events argument.
380 * thread-db.c (thread_db_use_event): Remove global variable.
381 (struct thread_db) <td_thr_event_enable_p>: Remove field.
382 (struct thread_db) <td_create_bp>: Remove field.
383 (thread_db_create_event): Remove function.
384 (thread_db_enable_reporting): Likewise.
385 (find_one_thread): Don't check for thread_db_use_events.
386 (attach_thread): Likewise.
387 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
388 (try_thread_db_load_1): Don't check for thread_db_use_events.
389 (thread_db_init): Remove use_events argument and thread events
390 handling.
391 (remove_thread_event_breakpoints): Remove function.
392 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
393
394 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
395
396 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
397 New function.
398 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
399 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
400 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
401 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
402 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
403 Initialize.
404 * linux-crisv32-low.c (cris_supports_hardware_single_step):
405 New function.
406 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
407 * linux-low.c (can_hardware_single_step): Use
408 supports_hardware_single_step.
409 (can_software_single_step): New function.
410 (start_step_over): Call can_software_single_step.
411 (linux_supports_hardware_single_step): New function.
412 (struct target_ops) <supports_software_single_step>: Initialize.
413 * linux-low.h (struct linux_target_ops)
414 <supports_hardware_single_step>: Initialize.
415 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
416 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
417 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
418 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
419 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
420 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
421 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
422 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
423 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
424 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
425 Initialize.
426 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
427 (struct linux_target_ops) <tile_supports_hardware_single_step>:
428 Initialize.
429 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
430 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
431 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
432 New function.
433 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
434 * target.h (struct target_ops): <supports_software_single_step>:
435 New field.
436 (target_supports_software_single_step): New macro.
437
438 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
439
440 * linux-low.c (linux_wait_1): Fix pc advance condition.
441 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
442 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
443
444 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
445
446 * linux-arm-low.c (arm_is_thumb_mode): New function.
447 (arm_breakpoint_at): Use arm_is_thumb_mode.
448 (arm_breakpoint_kind_from_current_state): New function.
449 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
450 Initialize.
451 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
452 (linux_breakpoint_kind_from_current_state): New function.
453 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
454 * linux-low.h (struct linux_target_ops)
455 <breakpoint_kind_from_current_state>: New field.
456 * target.h (struct target_ops): Likewise.
457 (target_breakpoint_kind_from_current_state): New macro.
458
459 2015-11-30 Pedro Alves <palves@redhat.com>
460
461 * linux-low.c (linux_resume): Wake up the event loop before
462 returning.
463
464 2015-11-30 Pedro Alves <palves@redhat.com>
465
466 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
467 check.
468 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
469 to -1.
470 * target.c (struct thread_search): New structure.
471 (thread_search_callback): New function.
472 (prev_general_thread): New global.
473 (prepare_to_access_memory, done_accessing_memory): New functions.
474 * target.h (prepare_to_access_memory, done_accessing_memory):
475 Replace macros with function declarations.
476
477 2015-11-30 Pedro Alves <palves@redhat.com>
478
479 PR 14618
480 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
481 report TARGET_WAITKIND_NO_RESUMED.
482 * remote-utils.c (prepare_resume_reply): Handle
483 TARGET_WAITKIND_NO_RESUMED.
484 * server.c (report_no_resumed): New global.
485 (handle_query) <qSupported>: Handle "no-resumed+". Report
486 "no-resumed+" support.
487 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
488 return error if the client doesn't support no-resumed events.
489 (push_stop_notification): New function.
490 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
491 events if the client supports them.
492
493 2015-11-30 Pedro Alves <palves@redhat.com>
494
495 * linux-low.c (thread_still_has_status_pending_p): Don't check
496 vCont;t here.
497 (lwp_resumed): New function.
498 (status_pending_p_callback): Return early if the LWP is not
499 supposed to be resumed.
500
501 2015-11-30 Pedro Alves <palves@redhat.com>
502
503 * linux-low.c (handle_extended_wait): Assert that the LWP's
504 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
505 thread create events, leave the new child's status pending.
506 (linux_low_filter_event): If GDB wants to hear about thread exit
507 events, leave the LWP marked dead and don't delete it.
508 (linux_wait_for_event_filtered): Don't check for thread exit.
509 (filter_exit_event): New function.
510 (linux_wait_1): Use it, when returning an exit event.
511 (linux_resume_one_lwp_throw): Assert that the LWP's
512 waitstatus is TARGET_WAITKIND_IGNORE.
513 * remote-utils.c (prepare_resume_reply): Handle
514 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
515 * server.c (report_thread_events): New global.
516 (handle_general_set): Handle QThreadEvents.
517 (handle_query) <qSupported>: Handle and report QThreadEvents+;
518 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
519 TARGET_WAITKIND_THREAD_EXITED.
520 * server.h (report_thread_events): Declare.
521
522 2015-11-30 Pedro Alves <palves@redhat.com>
523
524 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
525 the thread's last_resume_kind was resume_stop.
526
527 2015-11-30 Pedro Alves <palves@redhat.com>
528
529 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
530 before returning.
531
532 2015-11-30 Pedro Alves <palves@redhat.com>
533
534 * server.c (handle_v_requests): Handle vCtrlC.
535
536 2015-11-30 Pedro Alves <palves@redhat.com>
537
538 * gdbthread.h (find_any_thread_of_pid): Declare.
539 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
540 functions.
541 * server.c (handle_query): If current_thread is NULL, look for
542 another thread of the selected process.
543
544 2015-11-26 Daniel Colascione <dancol@dancol.org>
545 Simon Marchi <simon.marchi@ericsson.com>
546
547 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
548 * server.c (handle_qxfer_threads_worker): Refactor to include thread
549 name in reply.
550 * target.h (struct target_ops) <thread_name>: New field.
551 (target_thread_name): New macro.
552
553 2015-11-23 Joel Brobecker <brobecker@adacore.com>
554
555 * regcache.h (regcache_invalidate_pid): Add declaration.
556 * regcache.c (regcache_invalidate_pid): New function, extracted
557 from regcache_invalidate.
558 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
559 Add trivial documentation comment.
560 * lynx-low.c: Use regcache_invalidate_pid instead of
561 regcache_invalidate.
562
563 2015-11-23 Joel Brobecker <brobecker@adacore.com>
564
565 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
566 and Elf64_auxv_t if the target is Android.
567
568 2015-11-22 Doug Evans <xdje42@gmail.com>
569
570 * target.h: #include <sys/types.h>.
571
572 2015-11-19 Pedro Alves <palves@redhat.com>
573
574 * linux-low.c (linux_process_qsupported): Change prototype.
575 Adjust.
576 * linux-low.h (struct linux_target_ops) <process_qsupported>:
577 Change prototype.
578 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
579 and adjust to loop over all features.
580 * server.c (handle_query) <qSupported>: Adjust to call
581 target_process_qsupported once, passing it a vector of unprocessed
582 features.
583 * target.h (struct target_ops) <process_qsupported>: Change
584 prototype.
585 (target_process_qsupported): Adjust.
586
587 2015-11-19 Pedro Alves <palves@redhat.com>
588
589 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
590 mode.
591 * configure: Regenerate.
592
593 2015-11-19 Pedro Alves <palves@redhat.com>
594
595 * configure: Regenerate.
596
597 2015-11-19 Yao Qi <yao.qi@linaro.org>
598
599 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
600 type to uint32_t.
601
602 2015-11-19 Yao Qi <yao.qi@linaro.org>
603
604 * linux-aarch64-low.c (enum aarch64_operand_type): New.
605 (struct aarch64_operand): Move enum out.
606
607 2015-11-19 Yao Qi <yao.qi@linaro.org>
608
609 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
610 struct user_fpsimd_state *.
611 (aarch64_store_fpregset): Likewise.
612
613 2015-11-19 Yao Qi <yao.qi@linaro.org>
614
615 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
616 struct user_pt_regs *.
617 (aarch64_store_gregset): Likewise.
618
619 2015-11-18 Pedro Alves <palves@redhat.com>
620
621 * Makefile.in (all_object_files): Add $IPA_OBJS.
622
623 2015-11-17 Pedro Alves <palves@redhat.com>
624
625 * win32-low.c (win32_resume): Use gdb_signal_from_host,
626 GDB_SIGNAL_0 and gdb_signal_to_string.
627
628 2015-11-17 Pedro Alves <palves@redhat.com>
629
630 * win32-low.c (handle_output_debug_string): Remove parameter.
631 (win32_kill): Remove our_status local and adjust call to
632 handle_output_debug_string.
633 (get_child_debug_event): Adjust call to
634 handle_output_debug_string.
635
636 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
637
638 * linux-mips-low.c (mips_fill_gregset): Add cast.
639 (mips_store_gregset): Likewise.
640 (mips_fill_fpregset): Likewise.
641 (mips_store_fpregset): Likewise.
642
643 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
644
645 * linux-mips-low.c (mips_add_watchpoint): Rename private to
646 priv.
647
648 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
649
650 * linux-mips-low.c (mips_linux_new_thread): Change type of
651 watch_type to enum target_hw_bp_type.
652
653 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
654
655 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
656 Change return type to arm_hwbp_type.
657
658 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
659
660 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
661 (arm_store_gregset): Likewise.
662 * linux-arm-low.c (arm_get_hwcap): Likewise.
663 (arm_read_description): Likewise.
664
665 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
666
667 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
668
669 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
670
671 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
672 (ppc_fill_vsxregset): Likewise.
673 (ppc_store_vsxregset): Likewise.
674 (ppc_fill_vrregset): Likewise.
675 (ppc_store_vrregset): Likewise.
676 (ppc_fill_evrregset): Likewise.
677 (ppc_store_evrregset): Likewise.
678
679 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
680
681 * linux-ppc-low.c (ppc_usrregs_info): Remove
682 forward-declaration.
683 (ppc_arch_setup): Move lower in file.
684
685 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
686
687 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
688 (ps_pdwrite): Likewise.
689
690 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
691
692 * linux-arm-low.c (arm_new_thread): Move pointer dereference
693 to after assert checks.
694
695 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
696
697 * proc-service.c (ps_pdread): Add/adjust casts.
698 (ps_pdwrite): Add/adjust casts.
699
700 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
701
702 * server.c (handle_search_memory_1): Cast return value of
703 memmem.
704
705 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
706
707 * server.c (write_qxfer_response): Change type of data to
708 gdb_byte *.
709
710 2015-10-29 Pedro Alves <palves@redhat.com>
711
712 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
713
714 2015-10-29 Pedro Alves <palves@redhat.com>
715
716 * tracepoint.c (clear_installed_tracepoints): Add casts.
717
718 2015-10-29 Pedro Alves <palves@redhat.com>
719
720 * server.c (handle_v_cont, process_serial_event): Add enum
721 gdb_signal casts to signal parsing code.
722
723 2015-10-29 Pedro Alves <palves@redhat.com>
724
725 * linux-low.h (NULL_REGSET): Define.
726 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
727 * linux-arm-low.c (arm_regsets): Likewise.
728 * linux-crisv32-low.c (cris_regsets): Likewise.
729 * linux-m68k-low.c (m68k_regsets): Likewise.
730 * linux-mips-low.c (mips_regsets): Likewise.
731 * linux-nios2-low.c (nios2_regsets): Likewise.
732 * linux-ppc-low.c (ppc_regsets): Likewise.
733 * linux-s390-low.c (s390_regsets): Likewise.
734 * linux-sh-low.c (sh_regsets): Likewise.
735 * linux-sparc-low.c (sparc_regsets): Likewise.
736 * linux-tic6x-low.c (tic6x_regsets): Likewise.
737 * linux-tile-low.c (tile_regsets): Likewise.
738 * linux-x86-low.c (x86_regsets): Likewise.
739 * linux-xtensa-low.c (xtensa_regsets): Likewise.
740
741 2015-10-29 Pedro Alves <palves@redhat.com>
742
743 * linux-low.h (NULL_REGSET): Define.
744 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
745 * linux-arm-low.c (arm_regsets): Likewise.
746 * linux-crisv32-low.c (cris_regsets): Likewise.
747 * linux-m68k-low.c (m68k_regsets): Likewise.
748 * linux-mips-low.c (mips_regsets): Likewise.
749 * linux-nios2-low.c (nios2_regsets): Likewise.
750 * linux-ppc-low.c (ppc_regsets): Likewise.
751 * linux-s390-low.c (s390_regsets): Likewise.
752 * linux-sh-low.c (sh_regsets): Likewise.
753 * linux-sparc-low.c (sparc_regsets): Likewise.
754 * linux-tic6x-low.c (tic6x_regsets): Likewise.
755 * linux-tile-low.c (tile_regsets): Likewise.
756 * linux-x86-low.c (x86_regsets): Likewise.
757 * linux-xtensa-low.c (xtensa_regsets): Likewise.
758
759 2015-10-26 Doug Evans <dje@google.com>
760
761 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
762
763 2015-10-26 Doug Evans <dje@google.com>
764
765 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
766
767 2015-10-26 Doug Evans <dje@google.com>
768
769 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
770 for debug_printf.
771 (attach_thread, find_new_threads_callback): Ditto.
772
773 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
774
775 * mem-break.h (set_breakpoint_data): Remove.
776
777 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
778
779 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
780 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
781 (initialize_low): Remove set_breakpoint_data call.
782 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
783 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
784 (initialize_low): Remove set_breakpoint_data call.
785 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
786 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
787 (initialize_low): Remove set_breakpoint_data call.
788
789 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
790
791 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
792 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
793 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
794 * target.h (target_breakpoint_kind_from_pc): New macro.
795
796 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
797
798 * linux-low.c (default_breakpoint_kind_from_pc): New function.
799 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
800 the default breakpoint kind.
801
802 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
803
804 * linux-arm-low.c (arm_supports_z_point_type): Add software
805 breakpoint support.
806
807 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
808
809 * linux-arm-low.c: Refactor breakpoint definitions.
810 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
811 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
812
813 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
814
815 * Makefile.in: Add arm.c/o.
816 * configure.srv: Likewise.
817 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
818 (arm_breakpoint_kind_from_pc): New function.
819 (arm_sw_breakpoint_from_kind): Return proper kind.
820 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
821
822 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
823
824 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
825 removal.
826 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
827 (struct raw_breakpoint) <size>: Remove.
828 (struct raw_breakpoint) <kind>: Add.
829 (bp_size): New function.
830 (bp_opcode): Likewise.
831 (find_raw_breakpoint_at): Adjust for kind.
832 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
833 (remove_memory_breakpoint): Adjust for kind call bp_size.
834 (set_raw_breakpoint_at): Adjust for kind.
835 (set_breakpoint): Likewise.
836 (set_breakpoint_at): Call breakpoint_kind_from_pc.
837 (delete_raw_breakpoint): Adjust for kind.
838 (delete_breakpoint): Likewise.
839 (find_gdb_breakpoint): Likewise.
840 (set_gdb_breakpoint_1): Likewise.
841 (set_gdb_breakpoint): Likewise.
842 (delete_gdb_breakpoint_1): Likewise.
843 (delete_gdb_breakpoint): Likewise.
844 (uninsert_raw_breakpoint): Likewise.
845 (reinsert_raw_breakpoint): Likewise.
846 (set_breakpoint_data): Remove.
847 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
848 (check_mem_read): Adjust for kind call bp_size.
849 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
850 (clone_one_breakpoint): Adjust for kind.
851 * mem-break.h (set_gdb_breakpoint): Likewise.
852 (delete_gdb_breakpoint): Likewise.
853 * server.c (process_serial_event): Likewise.
854
855 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
856
857 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
858 (struct linux_target_ops) <breakpoint>: Remove.
859 (struct linux_target_ops) <breakpoint_len>: Remove.
860 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
861 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
862 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
863 (arm_sw_breakpoint_from_kind): New function.
864 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
865 (struct linux_target_ops) <breakpoint>: Remove.
866 (struct linux_target_ops) <breakpoint_len>: Remove.
867 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
868 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
869 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
870 (struct linux_target_ops) <breakpoint>: Remove.
871 (struct linux_target_ops) <breakpoint_len>: Remove.
872 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
873 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
874 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
875 (struct linux_target_ops) <breakpoint>: Remove.
876 (struct linux_target_ops) <breakpoint_len>: Remove.
877 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
878 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
879 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
880 and sw_breakpoint_from_kind to increment the pc.
881 (linux_breakpoint_kind_from_pc): New function.
882 (linux_sw_breakpoint_from_kind): New function.
883 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
884 (initialize_low): Call breakpoint_kind_from_pc and
885 sw_breakpoint_from_kind to replace breakpoint_data/len.
886 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
887 New field.
888 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
889 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
890 (struct linux_target_ops) <breakpoint>: Remove.
891 (struct linux_target_ops) <breakpoint_len>: Remove.
892 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
893 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
894 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
895 (struct linux_target_ops) <breakpoint>: Remove.
896 (struct linux_target_ops) <breakpoint_len>: Remove.
897 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
898 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
899 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
900 (struct linux_target_ops) <breakpoint>: Remove.
901 (struct linux_target_ops) <breakpoint_len>: Remove.
902 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
903 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
904 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
905 (struct linux_target_ops) <breakpoint>: Remove.
906 (struct linux_target_ops) <breakpoint_len>: Remove.
907 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
908 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
909 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
910 (struct linux_target_ops) <breakpoint>: Remove.
911 (struct linux_target_ops) <breakpoint_len>: Remove.
912 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
913 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
914 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
915 (struct linux_target_ops) <breakpoint>: Remove.
916 (struct linux_target_ops) <breakpoint_len>: Remove.
917 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
918 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
919 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
920 (struct linux_target_ops) <breakpoint>: Remove.
921 (struct linux_target_ops) <breakpoint_len>: Remove.
922 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
923 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
924 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
925 (struct linux_target_ops) <breakpoint>: Remove.
926 (struct linux_target_ops) <breakpoint_len>: Remove.
927 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
928 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
929 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
930 (struct linux_target_ops) <breakpoint>: Remove.
931 (struct linux_target_ops) <breakpoint_len>: Remove.
932 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
933 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
934 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
935 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
946 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
947
948 * linux-cris-low.c (cris_get_pc): Remove void arg.
949
950 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
951
952 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
953 variable name.
954
955 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
956
957 * inferiors.c (thread_pid_matches_callback): New function.
958 (find_thread_process): New function.
959 (remove_thread): Reset current_thread.
960 (remove_process): Assert threads have been removed first.
961
962 2015-10-15 Yao Qi <yao.qi@linaro.org>
963
964 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
965 if it is 3.
966 (aarch64_remove_point): Likewise.
967 * regcache.c (regcache_register_size): New function.
968
969 2015-10-12 Yao Qi <yao.qi@linaro.org>
970
971 * linux-aarch64-low.c: Update all callers as emit_load_store
972 is renamed to aarch64_emit_load_store.
973
974 2015-10-12 Yao Qi <yao.qi@linaro.org>
975
976 * linux-aarch64-low.c: Update all callers of function renaming
977 from emit_insn to aarch64_emit_insn.
978
979 2015-10-12 Yao Qi <yao.qi@linaro.org>
980
981 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
982 arch/aarch64-insn.h.
983 (struct aarch64_memory_operand): Likewise.
984 (ENCODE): Likewise.
985 (emit_insn): Move to arch/aarch64-insn.c.
986 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
987 (emit_load_store): Move to arch/aarch64-insn.c.
988 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
989 (can_encode_int32): Remove.
990
991 2015-10-12 Yao Qi <yao.qi@linaro.org>
992
993 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
994 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
995 (aarch64_relocate_instruction): Likewise.
996 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
997 (struct aarch64_insn_visitor): Likewise.
998
999 2015-10-12 Yao Qi <yao.qi@linaro.org>
1000
1001 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1002 (struct aarch64_insn_visitor): New.
1003 (struct aarch64_insn_relocation_data): New.
1004 (aarch64_ftrace_insn_reloc_b): New function.
1005 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1006 (aarch64_ftrace_insn_reloc_cb): Likewise.
1007 (aarch64_ftrace_insn_reloc_tb): Likewise.
1008 (aarch64_ftrace_insn_reloc_adr): Likewise.
1009 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1010 (aarch64_ftrace_insn_reloc_others): Likewise.
1011 (visitor): New.
1012 (aarch64_relocate_instruction): Use visitor.
1013
1014 2015-10-12 Yao Qi <yao.qi@linaro.org>
1015
1016 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1017 int. Add argument buf.
1018 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1019 aarch64_relocate_instruction.
1020
1021 2015-10-12 Yao Qi <yao.qi@linaro.org>
1022
1023 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1024 argument insn. Remove local variable insn. Don't call
1025 target_read_uint32.
1026 (aarch64_install_fast_tracepoint_jump_pad): Call
1027 target_read_uint32.
1028
1029 2015-09-30 Yao Qi <yao.qi@linaro.org>
1030
1031 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1032 (emit_load_store_pair): Likewise.
1033
1034 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1035
1036 * dll.c (match_dll): Add cast(s).
1037 (unloaded_dll): Likewise.
1038 * linux-low.c (second_thread_of_pid_p): Likewise.
1039 (delete_lwp_callback): Likewise.
1040 (count_events_callback): Likewise.
1041 (select_event_lwp_callback): Likewise.
1042 (linux_set_resume_request): Likewise.
1043 * server.c (accumulate_file_name_length): Likewise.
1044 (emit_dll_description): Likewise.
1045 (handle_qxfer_threads_worker): Likewise.
1046 (visit_actioned_threads): Likewise.
1047 * thread-db.c (any_thread_of): Likewise.
1048 * tracepoint.c (same_process_p): Likewise.
1049 (match_blocktype): Likewise.
1050 (build_traceframe_info_xml): Likewise.
1051
1052 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1053
1054 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1055 assignment.
1056 (gdb_unparse_agent_expr): Likewise.
1057 * hostio.c (require_data): Likewise.
1058 (handle_pread): Likewise.
1059 * linux-low.c (disable_regset): Likewise.
1060 (fetch_register): Likewise.
1061 (store_register): Likewise.
1062 (get_dynamic): Likewise.
1063 (linux_qxfer_libraries_svr4): Likewise.
1064 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1065 (set_fast_tracepoint_jump): Likewise.
1066 (uninsert_fast_tracepoint_jumps_at): Likewise.
1067 (reinsert_fast_tracepoint_jumps_at): Likewise.
1068 (validate_inserted_breakpoint): Likewise.
1069 (clone_agent_expr): Likewise.
1070 * regcache.c (init_register_cache): Likewise.
1071 * remote-utils.c (putpkt_binary_1): Likewise.
1072 (decode_M_packet): Likewise.
1073 (decode_X_packet): Likewise.
1074 (look_up_one_symbol): Likewise.
1075 (relocate_instruction): Likewise.
1076 (monitor_output): Likewise.
1077 * server.c (handle_search_memory): Likewise.
1078 (handle_qxfer_exec_file): Likewise.
1079 (handle_qxfer_libraries): Likewise.
1080 (handle_qxfer): Likewise.
1081 (handle_query): Likewise.
1082 (handle_v_cont): Likewise.
1083 (handle_v_run): Likewise.
1084 (captured_main): Likewise.
1085 * target.c (write_inferior_memory): Likewise.
1086 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1087 * tracepoint.c (init_trace_buffer): Likewise.
1088 (add_tracepoint_action): Likewise.
1089 (add_traceframe): Likewise.
1090 (add_traceframe_block): Likewise.
1091 (cmd_qtdpsrc): Likewise.
1092 (cmd_qtdv): Likewise.
1093 (cmd_qtstatus): Likewise.
1094 (response_source): Likewise.
1095 (response_tsv): Likewise.
1096 (cmd_qtnotes): Likewise.
1097 (gdb_collect): Likewise.
1098 (initialize_tracepoint): Likewise.
1099
1100 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1101
1102 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1103 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1104 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1105 <NOP>: New.
1106 (enum aarch64_condition_codes): New enum.
1107 (w0): New static global.
1108 (fp): Likewise.
1109 (lr): Likewise.
1110 (struct aarch64_memory_operand) <type>: New
1111 MEMORY_OPERAND_POSTINDEX type.
1112 (postindex_memory_operand): New helper function.
1113 (emit_ret): New function.
1114 (emit_load_store_pair): New function, factored out of emit_stp
1115 with support for MEMORY_OPERAND_POSTINDEX.
1116 (emit_stp): Rewrite using emit_load_store_pair.
1117 (emit_ldp): New function.
1118 (emit_load_store): Likewise.
1119 (emit_ldr): Mention post-index instruction in comment.
1120 (emit_ldrh): New function.
1121 (emit_ldrb): New function.
1122 (emit_ldrsw): Mention post-index instruction in comment.
1123 (emit_str): Likewise.
1124 (emit_subs): New function.
1125 (emit_cmp): Likewise.
1126 (emit_and): Likewise.
1127 (emit_orr): Likewise.
1128 (emit_orn): Likewise.
1129 (emit_eor): Likewise.
1130 (emit_mvn): Likewise.
1131 (emit_lslv): Likewise.
1132 (emit_lsrv): Likewise.
1133 (emit_asrv): Likewise.
1134 (emit_mul): Likewise.
1135 (emit_sbfm): Likewise.
1136 (emit_sbfx): Likewise.
1137 (emit_ubfm): Likewise.
1138 (emit_ubfx): Likewise.
1139 (emit_csinc): Likewise.
1140 (emit_cset): Likewise.
1141 (emit_nop): Likewise.
1142 (emit_ops_insns): New helper function.
1143 (emit_pop): Likewise.
1144 (emit_push): Likewise.
1145 (aarch64_emit_prologue): New function.
1146 (aarch64_emit_epilogue): Likewise.
1147 (aarch64_emit_add): Likewise.
1148 (aarch64_emit_sub): Likewise.
1149 (aarch64_emit_mul): Likewise.
1150 (aarch64_emit_lsh): Likewise.
1151 (aarch64_emit_rsh_signed): Likewise.
1152 (aarch64_emit_rsh_unsigned): Likewise.
1153 (aarch64_emit_ext): Likewise.
1154 (aarch64_emit_log_not): Likewise.
1155 (aarch64_emit_bit_and): Likewise.
1156 (aarch64_emit_bit_or): Likewise.
1157 (aarch64_emit_bit_xor): Likewise.
1158 (aarch64_emit_bit_not): Likewise.
1159 (aarch64_emit_equal): Likewise.
1160 (aarch64_emit_less_signed): Likewise.
1161 (aarch64_emit_less_unsigned): Likewise.
1162 (aarch64_emit_ref): Likewise.
1163 (aarch64_emit_if_goto): Likewise.
1164 (aarch64_emit_goto): Likewise.
1165 (aarch64_write_goto_address): Likewise.
1166 (aarch64_emit_const): Likewise.
1167 (aarch64_emit_call): Likewise.
1168 (aarch64_emit_reg): Likewise.
1169 (aarch64_emit_pop): Likewise.
1170 (aarch64_emit_stack_flush): Likewise.
1171 (aarch64_emit_zero_ext): Likewise.
1172 (aarch64_emit_swap): Likewise.
1173 (aarch64_emit_stack_adjust): Likewise.
1174 (aarch64_emit_int_call_1): Likewise.
1175 (aarch64_emit_void_call_2): Likewise.
1176 (aarch64_emit_eq_goto): Likewise.
1177 (aarch64_emit_ne_goto): Likewise.
1178 (aarch64_emit_lt_goto): Likewise.
1179 (aarch64_emit_le_goto): Likewise.
1180 (aarch64_emit_gt_goto): Likewise.
1181 (aarch64_emit_ge_got): Likewise.
1182 (aarch64_emit_ops_impl): New static global variable.
1183 (aarch64_emit_ops): New target function, return
1184 &aarch64_emit_ops_impl.
1185 (struct linux_target_ops): Install it.
1186
1187 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1188
1189 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1190 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1191 aarch64-ipa.o.
1192 * linux-aarch64-ipa.c: New file.
1193 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1194 and endian.h.
1195 (aarch64_get_thread_area): New target method.
1196 (extract_signed_bitfield): New helper function.
1197 (aarch64_decode_ldr_literal): New function.
1198 (enum aarch64_opcodes): New enum.
1199 (struct aarch64_register): New struct.
1200 (struct aarch64_operand): New struct.
1201 (x0): New static global.
1202 (x1): Likewise.
1203 (x2): Likewise.
1204 (x3): Likewise.
1205 (x4): Likewise.
1206 (w2): Likewise.
1207 (ip0): Likewise.
1208 (sp): Likewise.
1209 (xzr): Likewise.
1210 (aarch64_register): New helper function.
1211 (register_operand): Likewise.
1212 (immediate_operand): Likewise.
1213 (struct aarch64_memory_operand): New struct.
1214 (offset_memory_operand): New helper function.
1215 (preindex_memory_operand): Likewise.
1216 (enum aarch64_system_control_registers): New enum.
1217 (ENCODE): New macro.
1218 (emit_insn): New helper function.
1219 (emit_b): New function.
1220 (emit_bcond): Likewise.
1221 (emit_cb): Likewise.
1222 (emit_tb): Likewise.
1223 (emit_blr): Likewise.
1224 (emit_stp): Likewise.
1225 (emit_ldp_q_offset): Likewise.
1226 (emit_stp_q_offset): Likewise.
1227 (emit_load_store): Likewise.
1228 (emit_ldr): Likewise.
1229 (emit_ldrsw): Likewise.
1230 (emit_str): Likewise.
1231 (emit_ldaxr): Likewise.
1232 (emit_stxr): Likewise.
1233 (emit_stlr): Likewise.
1234 (emit_data_processing_reg): Likewise.
1235 (emit_data_processing): Likewise.
1236 (emit_add): Likewise.
1237 (emit_sub): Likewise.
1238 (emit_mov): Likewise.
1239 (emit_movk): Likewise.
1240 (emit_mov_addr): Likewise.
1241 (emit_mrs): Likewise.
1242 (emit_msr): Likewise.
1243 (emit_sevl): Likewise.
1244 (emit_wfe): Likewise.
1245 (append_insns): Likewise.
1246 (can_encode_int32_in): New helper function.
1247 (aarch64_relocate_instruction): New function.
1248 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1249 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1250 (struct linux_target_ops): Install aarch64_get_thread_area,
1251 aarch64_install_fast_tracepoint_jump_pad and
1252 aarch64_get_min_fast_tracepoint_insn_len.
1253
1254 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1255
1256 * Makefile.in (aarch64-insn.o): New rule.
1257 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1258
1259 2015-09-21 Yao Qi <yao.qi@linaro.org>
1260
1261 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1262
1263 2015-09-21 Yao Qi <yao.qi@linaro.org>
1264
1265 * tracepoint.c (max_jump_pad_size): Remove.
1266
1267 2015-09-18 Yao Qi <yao.qi@linaro.org>
1268
1269 * linux-aarch64-low.c: Don't include sys/uio.h.
1270 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1271
1272 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1273
1274 * tracepoint.c (eval_result_type): Change prototype.
1275 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1276
1277 2015-09-15 Pedro Alves <palves@redhat.com>
1278
1279 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1280 Check whether to report exec events instead of checking whether
1281 multiprocess is enabled.
1282
1283 2015-09-15 Pedro Alves <palves@redhat.com>
1284
1285 PR remote/18965
1286 * remote-utils.c (prepare_resume_reply): Merge
1287 TARGET_WAITKIND_VFORK_DONE switch case with the
1288 TARGET_WAITKIND_FORKED case.
1289
1290 2015-09-15 Yao Qi <yao.qi@linaro.org>
1291
1292 * server.c (handle_query): Check string comparison using
1293 "else if" instead of "if".
1294
1295 2015-09-15 Yao Qi <yao.qi@linaro.org>
1296
1297 * server.c (vCont_supported): New global variable.
1298 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1299 matches. Append ";vContSupported+" to own_buf.
1300 (handle_v_requests): Append ";s;S" to own_buf if target supports
1301 hardware single step or vCont_supported is false.
1302 (capture_main): Set vCont_supported to zero.
1303
1304 2015-09-15 Yao Qi <yao.qi@linaro.org>
1305
1306 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1307 it to ...
1308 (linux_supports_hardware_single_step): ... New function.
1309 (linux_target_ops): Update.
1310 * lynx-low.c (lynx_target_ops): Set field
1311 supports_hardware_single_step to target_can_do_hardware_single_step.
1312 * nto-low.c (nto_target_ops): Likewise.
1313 * spu-low.c (spu_target_ops): Likewise.
1314 * win32-low.c (win32_target_ops): Likewise.
1315 * target.c (target_can_do_hardware_single_step): New function.
1316 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1317 Remove. <supports_hardware_single_step>: New field.
1318 (target_supports_conditional_breakpoints): Remove.
1319 (target_supports_hardware_single_step): New macro.
1320 (target_can_do_hardware_single_step): Declare.
1321 * server.c (handle_query): Use target_supports_hardware_single_step
1322 instead of target_supports_conditional_breakpoints.
1323
1324 2015-09-15 Yao Qi <yao.qi@linaro.org>
1325
1326 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1327 function.
1328 (struct linux_target_ops the_low_target): Install
1329 aarch64_linux_siginfo_fixup.
1330
1331 2015-09-11 Don Breazeal <donb@codesourcery.com>
1332 Luis Machado <lgustavo@codesourcery.com>
1333
1334 * linux-low.c (linux_mourn): Static declaration.
1335 (linux_arch_setup): Move in front of
1336 handle_extended_wait.
1337 (linux_arch_setup_thread): New function.
1338 (handle_extended_wait): Handle exec events. Call
1339 linux_arch_setup_thread. Make event_lwp argument a
1340 pointer-to-a-pointer.
1341 (check_zombie_leaders): Do not check stopped threads.
1342 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1343 (linux_low_filter_event): Add lwp and thread for exec'ing
1344 non-leader thread if leader thread has been deleted.
1345 Refactor code into linux_arch_setup_thread and call it.
1346 Pass child lwp pointer by reference to handle_extended_wait.
1347 (linux_wait_for_event_filtered): Update comment.
1348 (linux_wait_1): Prevent clobbering exec event status.
1349 (linux_supports_exec_events): New function.
1350 (linux_target_ops) <supports_exec_events>: Initialize new member.
1351 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1352 new member.
1353 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1354 * server.c (report_exec_events): New global variable.
1355 (handle_query): Handle qSupported query for exec-events feature.
1356 (captured_main): Initialize report_exec_events.
1357 * server.h (report_exec_events): Declare new global variable.
1358 * target.h (struct target_ops) <supports_exec_events>: New
1359 member.
1360 (target_supports_exec_events): New macro.
1361 * win32-low.c (win32_target_ops) <supports_exec_events>:
1362 Initialize new member.
1363
1364 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1365
1366 * linux-low.c (linux_low_enable_btrace): Remove.
1367 (linux_target_ops): Replace linux_low_enable_btrace with
1368 linux_enable_btrace.
1369
1370 2015-09-03 Yao Qi <yao.qi@linaro.org>
1371
1372 * linux-aarch64-low.c (aarch64_insert_point): Call
1373 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1374 returns true.
1375
1376 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1377
1378 * linux-low.c (check_stopped_by_breakpoint): Use
1379 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1380
1381 2015-08-27 Pedro Alves <palves@redhat.com>
1382
1383 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1384
1385 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1386
1387 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1388 the XNEW-family equivalent.
1389 (compile_bytecodes): Likewise.
1390 * dll.c (loaded_dll): Likewise.
1391 * event-loop.c (append_callback_event): Likewise.
1392 (create_file_handler): Likewise.
1393 (create_file_event): Likewise.
1394 * hostio.c (handle_open): Likewise.
1395 * inferiors.c (add_thread): Likewise.
1396 (add_process): Likewise.
1397 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1398 * linux-arm-low.c (arm_new_process): Likewise.
1399 (arm_new_thread): Likewise.
1400 * linux-low.c (add_to_pid_list): Likewise.
1401 (linux_add_process): Likewise.
1402 (handle_extended_wait): Likewise.
1403 (add_lwp): Likewise.
1404 (enqueue_one_deferred_signal): Likewise.
1405 (enqueue_pending_signal): Likewise.
1406 (linux_resume_one_lwp_throw): Likewise.
1407 (linux_resume_one_thread): Likewise.
1408 (linux_read_memory): Likewise.
1409 (linux_write_memory): Likewise.
1410 * linux-mips-low.c (mips_linux_new_process): Likewise.
1411 (mips_linux_new_thread): Likewise.
1412 (mips_add_watchpoint): Likewise.
1413 * linux-x86-low.c (initialize_low_arch): Likewise.
1414 * lynx-low.c (lynx_add_process): Likewise.
1415 * mem-break.c (set_raw_breakpoint_at): Likewise.
1416 (set_breakpoint): Likewise.
1417 (add_condition_to_breakpoint): Likewise.
1418 (add_commands_to_breakpoint): Likewise.
1419 (clone_agent_expr): Likewise.
1420 (clone_one_breakpoint): Likewise.
1421 * regcache.c (new_register_cache): Likewise.
1422 * remote-utils.c (look_up_one_symbol): Likewise.
1423 * server.c (queue_stop_reply): Likewise.
1424 (start_inferior): Likewise.
1425 (queue_stop_reply_callback): Likewise.
1426 (handle_target_event): Likewise.
1427 * spu-low.c (fetch_ppc_memory): Likewise.
1428 (store_ppc_memory): Likewise.
1429 * target.c (set_target_ops): Likewise.
1430 * thread-db.c (thread_db_load_search): Likewise.
1431 (try_thread_db_load_1): Likewise.
1432 * tracepoint.c (add_tracepoint): Likewise.
1433 (add_tracepoint_action): Likewise.
1434 (create_trace_state_variable): Likewise.
1435 (cmd_qtdpsrc): Likewise.
1436 (cmd_qtro): Likewise.
1437 (add_while_stepping_state): Likewise.
1438 * win32-low.c (child_add_thread): Likewise.
1439 (get_image_name): Likewise.
1440
1441 2015-08-25 Yao Qi <yao.qi@linaro.org>
1442
1443 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1444
1445 2015-08-25 Yao Qi <yao.qi@linaro.org>
1446
1447 * Makefile.in (aarch64-linux.o): New rule.
1448 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1449 srv_tgtobj.
1450 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1451 (aarch64_init_debug_reg_state): Make it extern.
1452 (aarch64_linux_prepare_to_resume): Remove.
1453
1454 2015-08-25 Yao Qi <yao.qi@linaro.org>
1455
1456 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1457 lwp_arch_private_info and ptid_of_lwp.
1458
1459 2015-08-25 Yao Qi <yao.qi@linaro.org>
1460
1461 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1462 Find proc_info by find_process_pid. All callers updated.
1463
1464 2015-08-25 Yao Qi <yao.qi@linaro.org>
1465
1466 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1467 Remove.
1468 (debug_reg_change_callback): Remove.
1469 (aarch64_notify_debug_reg_change): Remove.
1470
1471 2015-08-25 Yao Qi <yao.qi@linaro.org>
1472
1473 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1474 Call current_lwp_ptid.
1475
1476 2015-08-25 Yao Qi <yao.qi@linaro.org>
1477
1478 * linux-aarch64-low.c (debug_reg_change_callback): Use
1479 debug_printf.
1480
1481 2015-08-25 Yao Qi <yao.qi@linaro.org>
1482
1483 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1484
1485 2015-08-25 Yao Qi <yao.qi@linaro.org>
1486
1487 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1488
1489 2015-08-25 Yao Qi <yao.qi@linaro.org>
1490
1491 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1492 the code.
1493
1494 2015-08-25 Yao Qi <yao.qi@linaro.org>
1495
1496 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1497 Remove.
1498 (debug_reg_change_callback): Remove argument entry and add argument
1499 lwp. Remove local variable thread. Don't print thread id in the
1500 debugging output. Don't check whether pid of thread equals to pid.
1501 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1502 iterate_over_lwps instead find_inferior.
1503
1504 2015-08-24 Pedro Alves <palves@redhat.com>
1505
1506 * inferiors.c (get_first_process): New function.
1507 * inferiors.h (get_first_process): New declaration.
1508 * remote-utils.c (read_ptid): Default to the first process in the
1509 list, instead of to the current thread's process.
1510
1511 2015-08-24 Pedro Alves <palves@redhat.com>
1512
1513 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1514 * event-loop.c: Likewise.
1515 * remote-utils.c: Likewise.
1516 * tracepoint.c: Likewise.
1517
1518 2015-08-24 Pedro Alves <palves@redhat.com>
1519
1520 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1521 ptid_get_lwp.
1522
1523 2015-08-21 Pedro Alves <palves@redhat.com>
1524
1525 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1526 instead of literal 1.
1527
1528 2015-08-21 Pedro Alves <palves@redhat.com>
1529
1530 * tdesc.c (default_description): Explicitly zero-initialize.
1531
1532 2015-08-21 Pedro Alves <palves@redhat.com>
1533
1534 PR gdb/18749
1535 * inferiors.c (remove_thread): Discard any pending stop reply for
1536 this thread.
1537 * server.c (remove_all_on_match_pid): Rename to ...
1538 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1539 instead of a pid.
1540 (discard_queued_stop_replies): Change parameter to a ptid. Now
1541 extern.
1542 (handle_v_kill, kill_inferior_callback, captured_main)
1543 (process_serial_event): Adjust.
1544 * server.h (discard_queued_stop_replies): Declare.
1545
1546 2015-08-21 Pedro Alves <palves@redhat.com>
1547
1548 * linux-low.c (wait_for_sigstop): Always switch to no thread
1549 selected if the previously current thread dies.
1550 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1551 process instead of the current thread's.
1552 * remote-utils.c (input_interrupt): Don't check if there's no
1553 current thread.
1554 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1555 current thread to the general thread fails, error out.
1556 (handle_qxfer_auxv, handle_qxfer_libraries)
1557 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1558 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1559 (handle_query): Check if there's a thread selected instead of
1560 checking whether there's any thread in the thread list.
1561 (handle_qxfer_threads, handle_qxfer_btrace)
1562 (handle_qxfer_btrace_conf): Don't error out early if there's no
1563 thread in the thread list.
1564 (handle_v_cont, myresume): Don't set the current thread to the
1565 continue thread.
1566 (process_serial_event) <Hg handling>: Also set thread_id if the
1567 previous general thread is still alive.
1568 (process_serial_event) <g/G handling>: If setting the current
1569 thread to the general thread fails, error out.
1570 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1571 thread's lwp instead of the current thread's.
1572 * target.c (set_desired_thread): If the desired thread was not
1573 found, leave the current thread pointing to NULL. Return an int
1574 (boolean) indicating success.
1575 * target.h (set_desired_thread): Change return type to int.
1576
1577 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1578
1579 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1580 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1581 #includes.
1582 (ps_get_thread_area): New function.
1583
1584 2015-08-19 Gary Benson <gbenson@redhat.com>
1585
1586 * hostio.c (handle_pread): Do not attempt to read more data
1587 than hostio_reply_with_data can fit in a packet.
1588
1589 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1590
1591 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1592
1593 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1594
1595 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1596
1597 2015-08-06 Pedro Alves <palves@redhat.com>
1598
1599 * tracepoint.c (expr_eval_result): Now an int.
1600
1601 2015-08-06 Pedro Alves <palves@redhat.com>
1602
1603 * gdbthread.h (struct regcache): Forward declare.
1604 (struct thread_info) <regcache_data>: Now a struct regcache
1605 pointer.
1606 * inferiors.c (inferior_regcache_data)
1607 (set_inferior_regcache_data): Now work with struct regcache
1608 pointers.
1609 * inferiors.h (struct regcache): Forward declare.
1610 (inferior_regcache_data, set_inferior_regcache_data): Now work
1611 with struct regcache pointers.
1612 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1613 (free_register_cache_thread): Remove struct regcache pointer
1614 casts.
1615
1616 2015-08-06 Pedro Alves <palves@redhat.com>
1617
1618 * server.c (captured_main): On error, print the exception message
1619 to stderr, and if run_once is set, throw a quit.
1620
1621 2015-08-06 Pedro Alves <palves@redhat.com>
1622
1623 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1624 the current thread.
1625
1626 2015-08-06 Pedro Alves <palves@redhat.com>
1627
1628 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1629 reading beyond the passed in buffer length.
1630
1631 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1632
1633 * tracepoint.c (symbol_list) <required>: Remove.
1634
1635 2015-08-06 Pedro Alves <palves@redhat.com>
1636
1637 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1638 count if stopping and suspending threads.
1639 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1640 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1641 (linux_detach): Complete an ongoing step-over.
1642 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1643 throughout.
1644 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1645 (linux_wait_1): If passing a signal to the inferior after
1646 finishing a step-over, unsuspend and re-resume all lwps. If we
1647 see a single-step event but the thread should be continuing, don't
1648 pass the trap to gdb.
1649 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1650 internal_error instead of gdb_assert.
1651 (enqueue_pending_signal): New function.
1652 (check_ptrace_stopped_lwp_gone): Add debug output.
1653 (start_step_over): Use internal_error instead of gdb_assert.
1654 (complete_ongoing_step_over): New function.
1655 (linux_resume_one_thread): Don't resume a suspended thread.
1656 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1657 it stepping.
1658
1659 2015-08-06 Pedro Alves <palves@redhat.com>
1660
1661 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1662 (linux_thread_alive): Use lwp_is_marked_dead.
1663 (extended_event_reported): Delete.
1664 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1665 instead of extended_event_reported.
1666 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1667 as well.
1668 (lwp_is_marked_dead): New function.
1669 (lwp_running): Use lwp_is_marked_dead.
1670 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1671 comment.
1672
1673 2015-08-06 Pedro Alves <palves@redhat.com>
1674
1675 * linux-low.c (linux_wait_1): Move fork event output out of the
1676 !report_to_gdb check. Pass event_child->waitstatus to
1677 target_waitstatus_to_string instead of ourstatus.
1678
1679 2015-08-04 Yao Qi <yao.qi@linaro.org>
1680
1681 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1682 if current_thread is 32 bit.
1683
1684 2015-08-04 Yao Qi <yao.qi@linaro.org>
1685
1686 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1687 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1688 * server.c (extended_protocol): Remove "static".
1689 * server.h (extended_protocol): Declare it.
1690
1691 2015-08-04 Yao Qi <yao.qi@linaro.org>
1692
1693 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1694 both aarch64 and aarch32.
1695 (aarch64_set_pc): Likewise.
1696
1697 2015-08-04 Yao Qi <yao.qi@linaro.org>
1698
1699 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1700 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1701 arm-with-neon.xml to srv_xmlfiles.
1702 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1703 (is_64bit_tdesc): New function.
1704 (aarch64_linux_read_description): New function.
1705 (aarch64_arch_setup): Call aarch64_linux_read_description.
1706 (regs_info): Rename to regs_info_aarch64.
1707 (aarch64_regs_info): Return right regs_info.
1708 (initialize_low_arch): Call initialize_low_arch_aarch32.
1709
1710 2015-08-04 Yao Qi <yao.qi@linaro.org>
1711
1712 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1713 * linux-aarch32-low.c: New file.
1714 * linux-aarch32-low.h: New file.
1715 * linux-arm-low.c (arm_fill_gregset): Move it to
1716 linux-aarch32-low.c.
1717 (arm_store_gregset): Likewise.
1718 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1719 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1720 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1721 (regs_info): Rename to regs_info_arm.
1722 (arm_regs_info): Return regs_info_aarch32 if
1723 have_ptrace_getregset is 1 and target description is
1724 arm_with_neon or arm_with_vfpv3.
1725 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1726 Call initialize_low_arch_aarch32 instead.
1727
1728 2015-08-04 Yao Qi <yao.qi@linaro.org>
1729
1730 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1731 * linux-low.c: ... here.
1732 * linux-low.h (have_ptrace_getregset): Declare it.
1733
1734 2015-08-04 Pedro Alves <palves@redhat.com>
1735
1736 * thread-db.c (struct thread_db): Use new typedefs.
1737 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1738 CHK calls.
1739 (disable_thread_event_reporting): Cast result of dlsym to
1740 destination function pointer type.
1741 (thread_db_mourn): Use td_ta_delete_ftype.
1742
1743 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1744
1745 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1746 arch variant.
1747 (CDX_BREAKPOINT): Define for R2.
1748 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1749 (the_low_target): Add comments.
1750
1751 2015-07-30 Yao Qi <yao.qi@linaro.org>
1752
1753 * linux-arm-low.c (arm_hwcap): Remove it.
1754 (arm_read_description): New local variable arm_hwcap. Don't
1755 set arm_hwcap to zero.
1756
1757 2015-07-30 Yao Qi <yao.qi@linaro.org>
1758
1759 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1760 Use regcache->tdesc instead.
1761 (arm_store_wmmxregset): Likewise.
1762 (arm_fill_vfpregset): Likewise.
1763 (arm_store_vfpregset): Likewise.
1764
1765 2015-07-30 Yao Qi <yao.qi@linaro.org>
1766
1767 * linux-arm-low.c: Include arch/arm.h.
1768 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1769 (arm_store_gregset): Likewise.
1770
1771 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1772
1773 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1774 ptrace's 4th parameter.
1775
1776 2015-07-27 Yao Qi <yao.qi@linaro.org>
1777
1778 * configure.srv (case aarch64*-*-linux*): Don't set
1779 srv_linux_usrregs.
1780
1781 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1782
1783 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1784 sys/ptrace.h.
1785 * linux-arm-low.c: Likewise.
1786 * linux-cris-low.c: Likewise.
1787 * linux-crisv32-low.c: Likewise.
1788 * linux-low.c: Likewise.
1789 * linux-m68k-low.c: Likewise.
1790 * linux-mips-low.c: Likewise.
1791 * linux-nios2-low.c: Likewise.
1792 * linux-s390-low.c: Likewise.
1793 * linux-sparc-low.c: Likewise.
1794 * linux-tic6x-low.c: Likewise.
1795 * linux-tile-low.c: Likewise.
1796 * linux-x86-low.c: Likewise.
1797
1798 2015-07-24 Pedro Alves <palves@redhat.com>
1799
1800 * config.in: Regenerate.
1801 * configure: Regenerate.
1802
1803 2015-07-24 Pedro Alves <palves@redhat.com>
1804
1805 * acinclude.m4: Include ../ptrace.m4.
1806 * configure.ac: Call GDB_AC_PTRACE.
1807 * config.in, configure: Regenerate.
1808
1809 2015-07-24 Yao Qi <yao.qi@linaro.org>
1810
1811 * linux-low.c (linux_create_inferior): Remove setting to
1812 proc->priv->new_inferior.
1813 (linux_attach): Likewise.
1814 (linux_low_filter_event): Likewise.
1815 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1816
1817 2015-07-24 Yao Qi <yao.qi@linaro.org>
1818
1819 * linux-low.c (linux_arch_setup): New function.
1820 (linux_low_filter_event): If proc->tdesc is NULL and
1821 proc->attached is true, call the_low_target.arch_setup.
1822 Otherwise, keep status pending, and return.
1823 (linux_resume_one_lwp_throw): Don't call get_pc if
1824 thread->while_stepping isn't NULL. Don't call
1825 get_thread_regcache if proc->tdesc is NULL.
1826 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1827 (linux_target_ops): Install arch_setup.
1828 * server.c (start_inferior): Call the_target->arch_setup.
1829 * target.h (struct target_ops) <arch_setup>: New field.
1830 (target_arch_setup): New marco.
1831 * lynx-low.c (lynx_target_ops): Update.
1832 * nto-low.c (nto_target_ops): Update.
1833 * spu-low.c (spu_target_ops): Update.
1834 * win32-low.c (win32_target_ops): Update.
1835
1836 2015-07-24 Yao Qi <yao.qi@linaro.org>
1837
1838 * linux-low.c (linux_add_process): Don't set
1839 proc->priv->new_inferior.
1840 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1841 (linux_attach): Likewise.
1842
1843 2015-07-24 Yao Qi <yao.qi@linaro.org>
1844
1845 * server.c (start_inferior): Code refactor.
1846
1847 2015-07-24 Yao Qi <yao.qi@linaro.org>
1848
1849 * server.c (process_serial_event): Set general_thread.
1850
1851 2015-07-21 Yao Qi <yao.qi@linaro.org>
1852
1853 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1854 aarch64_linux_get_debug_reg_capacity.
1855
1856 2015-07-17 Yao Qi <yao.qi@linaro.org>
1857
1858 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1859 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1860 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1861 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1862 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1863 (AARCH64_HWP_ALIGNMENT): Likewise.
1864 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1865 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1866 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1867 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1868 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1869 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1870 (struct aarch64_debug_reg_state): Likewise.
1871 (struct arch_lwp_info): Likewise.
1872 (aarch64_align_watchpoint): Likewise.
1873 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1874 (aarch64_watchpoint_length): Likewise.
1875 (aarch64_point_encode_ctrl_reg): Likewise
1876 (aarch64_point_is_aligned): Likewise.
1877 (aarch64_align_watchpoint): Likewise.
1878 (aarch64_linux_set_debug_regs):
1879 (aarch64_dr_state_insert_one_point): Likewise.
1880 (aarch64_dr_state_remove_one_point): Likewise.
1881 (aarch64_handle_breakpoint): Likewise.
1882 (aarch64_handle_aligned_watchpoint): Likewise.
1883 (aarch64_handle_unaligned_watchpoint): Likewise.
1884 (aarch64_handle_watchpoint): Likewise.
1885
1886 2015-07-17 Yao Qi <yao.qi@linaro.org>
1887
1888 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1889 and don't aarch64_get_debug_reg_state. All callers update.
1890 (aarch64_handle_aligned_watchpoint): Likewise.
1891 (aarch64_handle_unaligned_watchpoint): Likewise.
1892 (aarch64_handle_watchpoint): Likewise.
1893 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1894 (aarch64_remove_point): Likewise.
1895
1896 2015-07-17 Yao Qi <yao.qi@linaro.org>
1897
1898 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1899 debug_printf.
1900 (aarch64_handle_unaligned_watchpoint): Likewise.
1901
1902 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1903
1904 Revert the previous 3 commits:
1905 Move gdb_regex* to common/
1906 Move linux_find_memory_regions_full & co.
1907 gdbserver build-id attribute generator
1908
1909 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1910 Jan Kratochvil <jan.kratochvil@redhat.com>
1911
1912 gdbserver build-id attribute generator.
1913 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1914 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1915 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1916 (find_phdr): New.
1917 (get_dynamic): Use find_pdhr to traverse program headers.
1918 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1919 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1920 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1921 (get_hex_build_id): New.
1922 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1923 to reply XML document.
1924
1925 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1926 Jan Kratochvil <jan.kratochvil@redhat.com>
1927
1928 * target.c: Include target/target-utils.h and fcntl.h.
1929 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1930 (target_fileio_read_stralloc): New functions.
1931
1932 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1933
1934 * Makefile.in (OBS): Add gdb_regex.o.
1935 (gdb_regex.o): New.
1936 * config.in: Rebuilt.
1937 * configure: Rebuilt.
1938
1939 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1940 Jan Kratochvil <jan.kratochvil@redhat.com>
1941
1942 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1943 * Makefile.in (OBS): Add target-utils.o.
1944 (linux-maps.o, target-utils.o): New.
1945 * configure.srv (srv_linux_obj): Add linux-maps.o.
1946
1947 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1948
1949 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1950 function, return 1.
1951 (the_low_target): Install it.
1952
1953 2015-07-14 Pedro Alves <palves@redhat.com>
1954
1955 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1956 Instead, ignore ECHILD, and throw an error for other errnos.
1957
1958 2015-07-10 Pedro Alves <palves@redhat.com>
1959
1960 * event-loop.c (struct callback_event) <data>: Change type to
1961 gdb_client_data instance instead of gdb_client_data pointer.
1962 (append_callback_event): Adjust.
1963
1964 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1965
1966 * linux-aarch64-low.c: Add comments for each linux_target_ops
1967 method. Remove comments already covered in target_ops and
1968 linux_target_ops definitions.
1969 (the_low_target): Add comments for each unimplemented method.
1970
1971 2015-07-09 Yao Qi <yao.qi@linaro.org>
1972
1973 * linux-aarch64-low.c (aarch64_regmap): Remove.
1974 (aarch64_usrregs_info): Remove.
1975 (regs_info): Set field usrregs to NULL.
1976
1977 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1978
1979 * linux-low.c: Include "rsp-low.h"
1980 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1981 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1982 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1983 (handle_btrace_enable_pt): New.
1984 (handle_btrace_general_set): Support "pt".
1985 (handle_btrace_conf_general_set): Support "pt:size".
1986
1987 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1988
1989 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1990 Z_PACKET_SW_BP.
1991
1992 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1993
1994 * linux-aarch64-low.c: Remove comment about endianness.
1995 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1996 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1997 memcmp.
1998
1999 2015-06-24 Gary Benson <gbenson@redhat.com>
2000
2001 * linux-i386-ipa.c (stdint.h): Do not include.
2002 * lynx-i386-low.c (stdint.h): Likewise.
2003 * lynx-ppc-low.c (stdint.h): Likewise.
2004 * mem-break.c (stdint.h): Likewise.
2005 * thread-db.c (stdint.h): Likewise.
2006 * tracepoint.c (stdint.h): Likewise.
2007 * win32-low.c (stdint.h): Likewise.
2008
2009 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2010
2011 * server.c (write_qxfer_response): Update call to
2012 remote_escape_output.
2013
2014 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2015 Jan Kratochvil <jan.kratochvil@redhat.com>
2016
2017 Merge multiple hex conversions.
2018 * gdbreplay.c (tohex): Rename to 'fromhex'.
2019 (logchar): Use fromhex.
2020
2021 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2022
2023 * server.c (handle_qxfer_libraries): Set `version' attribute for
2024 <library-list>.
2025
2026 2015-06-10 Gary Benson <gbenson@redhat.com>
2027
2028 * target.h (struct target_ops) <multifs_open>: New field.
2029 <multifs_unlink>: Likewise.
2030 <multifs_readlink>: Likewise.
2031 * linux-low.c (nat/linux-namespaces.h): New include.
2032 (linux_target_ops): Initialize the_target->multifs_open,
2033 the_target->multifs_unlink and the_target->multifs_readlink.
2034 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2035 * hostio.c (hostio_fs_pid): New static variable.
2036 (hostio_handle_new_gdb_connection): New function.
2037 (handle_setfs): Likewise.
2038 (handle_open): Use the_target->multifs_open as appropriate.
2039 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2040 (handle_readlink): Use the_target->multifs_readlink as
2041 appropriate.
2042 (handle_vFile): Handle vFile:setfs packets.
2043 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2044 after target_handle_new_gdb_connection.
2045
2046 2015-06-10 Gary Benson <gbenson@redhat.com>
2047
2048 * configure.ac (AC_CHECK_FUNCS): Add setns.
2049 * config.in: Regenerate.
2050 * configure: Likewise.
2051 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2052 (linux-namespaces.o): New rule.
2053 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2054
2055 2015-06-09 Gary Benson <gbenson@redhat.com>
2056
2057 * hostio.c (handle_open): Process mode argument with
2058 fileio_to_host_mode.
2059
2060 2015-06-01 Yao Qi <yao.qi@linaro.org>
2061
2062 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2063 * linux-x86-low.c: Likewise.
2064
2065 2015-05-28 Don Breazeal <donb@codesourcery.com>
2066
2067 * linux-low.c (handle_extended_wait): Initialize
2068 thread_info.last_resume_kind for new fork children.
2069
2070 2015-05-15 Pedro Alves <palves@redhat.com>
2071
2072 * target.h (target_handle_new_gdb_connection): Rewrite using if
2073 wrapped in do/while.
2074
2075 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2076
2077 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2078 * configure, config.in: Regenerate.
2079 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2080 Declare typedef.
2081
2082 2015-05-12 Don Breazeal <donb@codesourcery.com>
2083
2084 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2085 PTRACE_EVENT_VFORK_DONE.
2086 (linux_low_ptrace_options, extended_event_reported): Add vfork
2087 events.
2088 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2089 and "vforkdone" for RSP 'T' Stop Reply Packet.
2090 * server.h (report_vfork_events): Declare
2091 global variable.
2092
2093 2015-05-12 Don Breazeal <donb@codesourcery.com>
2094
2095 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2096 (the_low_target) <new_fork>: Initialize new member.
2097 * linux-arm-low.c (arm_new_fork): New function.
2098 (the_low_target) <new_fork>: Initialize new member.
2099 * linux-low.c (handle_extended_wait): Call new target function
2100 new_fork.
2101 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2102 * linux-mips-low.c (mips_add_watchpoint): New function
2103 extracted from mips_insert_point.
2104 (the_low_target) <new_fork>: Initialize new member.
2105 (mips_linux_new_fork): New function.
2106 (mips_insert_point): Call mips_add_watchpoint.
2107 * linux-x86-low.c (x86_linux_new_fork): New function.
2108 (the_low_target) <new_fork>: Initialize new member.
2109
2110 2015-05-12 Don Breazeal <donb@codesourcery.com>
2111
2112 * linux-low.c (handle_extended_wait): Implement return value,
2113 rename argument 'event_child' to 'event_lwp', handle
2114 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2115 (linux_low_ptrace_options): New function.
2116 (linux_low_filter_event): Call linux_low_ptrace_options,
2117 use different argument fo linux_enable_event_reporting,
2118 use return value from handle_extended_wait.
2119 (extended_event_reported): New function.
2120 (linux_wait_1): Call extended_event_reported and set
2121 status to report fork events.
2122 (linux_write_memory): Add pid to debug message.
2123 (reset_lwp_ptrace_options_callback): New function.
2124 (linux_handle_new_gdb_connection): New function.
2125 (linux_target_ops): Initialize new structure member.
2126 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2127 * lynx-low.c: Initialize new structure member.
2128 * remote-utils.c (prepare_resume_reply): Implement stop reason
2129 "fork" for "T" stop message.
2130 * server.c (handle_query): Call handle_new_gdb_connection.
2131 * server.h (report_fork_events): Declare global flag.
2132 * target.h (struct target_ops) <handle_new_gdb_connection>:
2133 New member.
2134 (target_handle_new_gdb_connection): New macro.
2135 * win32-low.c: Initialize new structure member.
2136
2137 2015-05-12 Don Breazeal <donb@codesourcery.com>
2138
2139 * mem-break.c (APPEND_TO_LIST): Define macro.
2140 (clone_agent_expr): New function.
2141 (clone_one_breakpoint): New function.
2142 (clone_all_breakpoints): New function.
2143 * mem-break.h: Declare new functions.
2144
2145 2015-05-12 Don Breazeal <donb@codesourcery.com>
2146
2147 * linux-low.c (linux_supports_fork_events): New function.
2148 (linux_supports_vfork_events): New function.
2149 (linux_target_ops): Initialize new structure members.
2150 (initialize_low): Call linux_check_ptrace_features.
2151 * lynx-low.c (lynx_target_ops): Initialize new structure
2152 members.
2153 * server.c (report_fork_events, report_vfork_events):
2154 New global flags.
2155 (handle_query): Add new features to qSupported packet and
2156 response.
2157 (captured_main): Initialize new global variables.
2158 * target.h (struct target_ops) <supports_fork_events>:
2159 New member.
2160 <supports_vfork_events>: New member.
2161 (target_supports_fork_events): New macro.
2162 (target_supports_vfork_events): New macro.
2163 * win32-low.c (win32_target_ops): Initialize new structure
2164 members.
2165
2166 2015-05-12 Gary Benson <gbenson@redhat.com>
2167
2168 * server.c (handle_qxfer_exec_file): Use current process
2169 if annex is empty.
2170
2171 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2172
2173 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2174 Remove HAVE_PTRACE_GETREGS conditionals.
2175 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2176 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2177
2178 2015-05-08 Yao Qi <yao.qi@linaro.org>
2179
2180 * linux-low.c (linux_supports_conditional_breakpoints): New
2181 function.
2182 (linux_target_ops): Install new target method.
2183 * lynx-low.c (lynx_target_ops): Install NULL hook for
2184 supports_conditional_breakpoints.
2185 * nto-low.c (nto_target_ops): Likewise.
2186 * spu-low.c (spu_target_ops): Likewise.
2187 * win32-low.c (win32_target_ops): Likewise.
2188 * server.c (handle_query): Check
2189 target_supports_conditional_breakpoints.
2190 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2191 New field.
2192 (target_supports_conditional_breakpoints): New macro.
2193
2194 2015-05-06 Pedro Alves <palves@redhat.com>
2195
2196 PR server/18081
2197 * server.c (start_inferior): If the process exits, mourn it.
2198
2199 2015-04-21 Gary Benson <gbenson@redhat.com>
2200
2201 * hostio.c (fileio_open_flags_to_host): Factored out to
2202 fileio_to_host_openflags in common/fileio.c. Single use
2203 updated.
2204
2205 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2206
2207 * linux-xtensa-low.c (xtensa_fill_gregset)
2208 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2209 XCHAL_HAVE_LOOP.
2210
2211 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2212
2213 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2214 (regs_info): Replace usrregs pointer with NULL.
2215
2216 2015-04-17 Gary Benson <gbenson@redhat.com>
2217
2218 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2219 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2220 * server.c (handle_qxfer_exec_file): New function.
2221 (qxfer_packets): Add exec-file entry.
2222 (handle_query): Report qXfer:exec-file:read as supported packet.
2223
2224 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2225
2226 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2227
2228 2015-04-09 Gary Benson <gbenson@redhat.com>
2229
2230 * hostio-errno.c (errno_to_fileio_error): Remove function.
2231 Update caller to use remote_fileio_to_fio_error.
2232
2233 2015-04-09 Yao Qi <yao.qi@linaro.org>
2234
2235 * linux-low.c (linux_insert_point): Call
2236 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2237 (linux_remove_point): Call remove_memory_breakpoint if type is
2238 raw_bkpt_type_sw.
2239 * linux-x86-low.c (x86_insert_point): Don't call
2240 insert_memory_breakpoint.
2241 (x86_remove_point): Don't call remove_memory_breakpoint.
2242
2243 2015-04-01 Pedro Alves <palves@redhat.com>
2244 Cleber Rosa <crosa@redhat.com>
2245
2246 * server.c (gdbserver_usage): Reorganize and extend the usage
2247 message.
2248
2249 2015-03-24 Pedro Alves <palves@redhat.com>
2250
2251 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2252 output. Also dump TRAP_TRACE.
2253 (linux_low_filter_event): In debug output, distinguish a
2254 resume_stop SIGSTOP from a delayed SIGSTOP.
2255
2256 2015-03-24 Gary Benson <gbenson@redhat.com>
2257
2258 * linux-x86-low.c (x86_linux_new_thread): Moved to
2259 nat/x86-linux.c.
2260 (x86_linux_prepare_to_resume): Likewise.
2261
2262 2015-03-24 Gary Benson <gbenson@redhat.com>
2263
2264 * Makefile.in (x86-linux-dregs.o): New rule.
2265 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2266 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2267 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2268 (x86_linux_dr_get): Likewise.
2269 (x86_linux_dr_set): Likewise.
2270 (update_debug_registers_callback): Likewise.
2271 (x86_linux_dr_set_addr): Likewise.
2272 (x86_linux_dr_get_addr): Likewise.
2273 (x86_linux_dr_set_control): Likewise.
2274 (x86_linux_dr_get_control): Likewise.
2275 (x86_linux_dr_get_status): Likewise.
2276 (x86_linux_update_debug_registers): Likewise.
2277
2278 2015-03-24 Gary Benson <gbenson@redhat.com>
2279
2280 * linux-x86-low.c (x86_linux_update_debug_registers):
2281 New function, factored out from...
2282 (x86_linux_prepare_to_resume): ...this.
2283
2284 2015-03-24 Gary Benson <gbenson@redhat.com>
2285
2286 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2287 (x86_linux_dr_set): Likewise.
2288 (update_debug_registers_callback): Likewise.
2289 (x86_linux_dr_set_addr): Likewise.
2290 (x86_linux_dr_get_addr): Likewise.
2291 (x86_linux_dr_set_control): Likewise.
2292 (x86_linux_dr_get_control): Likewise.
2293 (x86_linux_dr_get_status): Likewise.
2294 (x86_linux_prepare_to_resume): Likewise.
2295
2296 2015-03-24 Gary Benson <gbenson@redhat.com>
2297
2298 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2299 Use perror_with_name. Pass string through gettext.
2300 (x86_linux_dr_set): Likewise.
2301
2302 2015-03-24 Gary Benson <gbenson@redhat.com>
2303
2304 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2305 (x86_linux_dr_set_addr): ...this.
2306 (x86_dr_low_get_addr): Rename to...
2307 (x86_linux_dr_get_addr): ...this.
2308 (x86_dr_low_set_control): Rename to...
2309 (x86_linux_dr_set_control): ...this.
2310 (x86_dr_low_get_control): Rename to...
2311 (x86_linux_dr_get_control): ...this.
2312 (x86_dr_low_get_status): Rename to...
2313 (x86_linux_dr_get_status): ...this.
2314 (x86_dr_low): Update with new function names.
2315
2316 2015-03-24 Gary Benson <gbenson@redhat.com>
2317
2318 * Makefile.in (x86-linux.o): New rule.
2319 * configure.srv: Add x86-linux.o to relevant targets.
2320 * linux-low.c (lwp_set_arch_private_info): New function.
2321 (lwp_arch_private_info): Likewise.
2322 * linux-x86-low.c: Include nat/x86-linux.h.
2323 (arch_lwp_info): Removed structure.
2324 (update_debug_registers_callback):
2325 Use lwp_set_debug_registers_changed.
2326 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2327 and lwp_set_debug_registers_changed.
2328 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2329
2330 2015-03-24 Gary Benson <gbenson@redhat.com>
2331
2332 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2333 * linux-arm-low.c (arm_new_thread): Likewise.
2334 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2335 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2336 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2337 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2338
2339 2015-03-24 Gary Benson <gbenson@redhat.com>
2340
2341 * linux-low.c (ptid_of_lwp): New function.
2342 (lwp_is_stopped): Likewise.
2343 (lwp_stop_reason): Likewise.
2344 * linux-x86-low.c (update_debug_registers_callback):
2345 Use lwp_is_stopped.
2346 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2347 lwp_stop_reason.
2348
2349 2015-03-24 Gary Benson <gbenson@redhat.com>
2350
2351 * linux-low.h (linux_stop_lwp): Remove declaration.
2352
2353 2015-03-24 Gary Benson <gbenson@redhat.com>
2354
2355 * linux-low.h: Include nat/linux-nat.h.
2356 * linux-low.c (iterate_over_lwps_args): New structure.
2357 (iterate_over_lwps_filter): New function.
2358 (iterate_over_lwps): Likewise.
2359 * linux-x86-low.c (update_debug_registers_callback):
2360 Update signature to what iterate_over_lwps expects.
2361 Remove PID check that iterate_over_lwps now performs.
2362 (x86_dr_low_set_addr): Use iterate_over_lwps.
2363 (x86_dr_low_set_control): Likewise.
2364
2365 2015-03-24 Gary Benson <gbenson@redhat.com>
2366
2367 * linux-x86-low.c (x86_debug_reg_state): New function.
2368 (x86_linux_prepare_to_resume): Use the above.
2369
2370 2015-03-24 Gary Benson <gbenson@redhat.com>
2371
2372 * linux-low.c (current_lwp_ptid): New function.
2373 * linux-x86-low.c: Include nat/linux-nat.h.
2374 (x86_dr_low_get_addr): Use current_lwp_ptid.
2375 (x86_dr_low_get_control): Likewise.
2376 (x86_dr_low_get_status): Likewise.
2377
2378 2015-03-20 Pedro Alves <palves@redhat.com>
2379
2380 * tracepoint.c (cmd_qtstatus): Make "str" const.
2381
2382 2015-03-20 Pedro Alves <palves@redhat.com>
2383
2384 * server.c (handle_general_set): Make "req_str" const.
2385
2386 2015-03-19 Pedro Alves <palves@redhat.com>
2387
2388 * linux-low.c (linux_resume_one_lwp): Rename to ...
2389 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2390 instead call perror_with_name.
2391 (check_ptrace_stopped_lwp_gone): New function.
2392 (linux_resume_one_lwp): Reimplement as wrapper around
2393 linux_resume_one_lwp_throw that swallows errors if the LWP is
2394 gone.
2395
2396 2015-03-19 Pedro Alves <palves@redhat.com>
2397
2398 * linux-low.c (count_events_callback, select_event_lwp_callback):
2399 No longer check whether the thread has resume_stop as last resume
2400 kind.
2401
2402 2015-03-19 Pedro Alves <palves@redhat.com>
2403
2404 * linux-low.c (count_events_callback, select_event_lwp_callback):
2405 Use the lwp's status_pending_p field, not the thread's.
2406
2407 2015-03-19 Pedro Alves <palves@redhat.com>
2408
2409 * linux-low.c (select_event_lwp_callback): Update comments to
2410 no longer mention SIGTRAP.
2411
2412 2015-03-18 Gary Benson <gbenson@redhat.com>
2413
2414 * server.c (handle_query): Do not report vFile:fstat as supported.
2415
2416 2015-03-11 Gary Benson <gbenson@redhat.com>
2417
2418 * hostio.c (sys/types.h): New include.
2419 (sys/stat.h): Likewise.
2420 (common-remote-fileio.h): Likewise.
2421 (handle_fstat): New function.
2422 (handle_vFile): Handle vFile:fstat packets.
2423
2424 2015-03-11 Gary Benson <gbenson@redhat.com>
2425
2426 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2427 struct stat.st_blocks and struct stat.st_blksize.
2428 * configure: Regenerate.
2429 * config.in: Likewise.
2430 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2431 (OBS): Add common-remote-fileio.o.
2432 (common-remote-fileio.o): New rule.
2433
2434 2015-03-09 Pedro Alves <palves@redhat.com>
2435
2436 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2437 'struct sockaddr' pointer in 'accept' call.
2438
2439 2015-03-09 Pedro Alves <palves@redhat.com>
2440
2441 Revert:
2442 2015-03-07 Pedro Alves <palves@redhat.com>
2443 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2444 or <winsock2.h> here. Instead include "gdb_socket.h".
2445 (remote_open): Use union gdb_sockaddr_u.
2446 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2447 or <winsock2.h> here. Instead include "gdb_socket.h".
2448 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2449 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2450 or <sys/un.h>.
2451 (init_named_socket, gdb_agent_helper_thread): Use union
2452 gdb_sockaddr_u.
2453
2454 2015-03-07 Pedro Alves <palves@redhat.com>
2455
2456 * configure.ac (build_warnings): Move
2457 -Wdeclaration-after-statement to the C-specific set.
2458 * configure: Regenerate.
2459
2460 2015-03-07 Pedro Alves <palves@redhat.com>
2461
2462 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2463 or <winsock2.h> here. Instead include "gdb_socket.h".
2464 (remote_open): Use union gdb_sockaddr_u.
2465 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2466 or <winsock2.h> here. Instead include "gdb_socket.h".
2467 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2468 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2469 or <sys/un.h>.
2470 (init_named_socket, gdb_agent_helper_thread): Use union
2471 gdb_sockaddr_u.
2472
2473 2015-03-07 Pedro Alves <palves@redhat.com>
2474
2475 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2476 instead.
2477
2478 2015-03-06 Yao Qi <yao.qi@linaro.org>
2479
2480 * linux-aarch64-low.c (aarch64_insert_point): Use
2481 show_debug_regs as a boolean.
2482 (aarch64_remove_point): Likewise.
2483
2484 2015-03-05 Pedro Alves <palves@redhat.com>
2485
2486 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2487 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2488 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2489 * nto-low.c (nto_target_ops): Likewise.
2490 * spu-low.c (spu_target_ops): Likewise.
2491 * win32-low.c (win32_target_ops): Likewise.
2492
2493 2015-03-04 Pedro Alves <palves@redhat.com>
2494
2495 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2496 Decide whether a breakpoint triggered based on the SIGTRAP's
2497 siginfo.si_code.
2498 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2499 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2500 (linux_low_filter_event): Check for breakpoints before checking
2501 watchpoints.
2502 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2503 siginfo.si_code.
2504 (linux_stopped_by_sw_breakpoint)
2505 (linux_supports_stopped_by_sw_breakpoint)
2506 (linux_stopped_by_hw_breakpoint)
2507 (linux_supports_stopped_by_hw_breakpoint): New functions.
2508 (linux_target_ops): Install new target methods.
2509
2510 2015-03-04 Pedro Alves <palves@redhat.com>
2511
2512 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2513 * server.c (swbreak_feature, hwbreak_feature): New globals.
2514 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2515 (captured_main): Clear swbreak_feature and hwbreak_feature.
2516 * server.h (swbreak_feature, hwbreak_feature): Declare.
2517 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2518 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2519 supports_stopped_by_hw_breakpoint>: New fields.
2520 (target_supports_stopped_by_sw_breakpoint)
2521 (target_stopped_by_sw_breakpoint)
2522 (target_supports_stopped_by_hw_breakpoint)
2523 (target_stopped_by_hw_breakpoint): Declare.
2524
2525 2015-03-04 Pedro Alves <palves@redhat.com>
2526
2527 enum lwp_stop_reason -> enum target_stop_reason
2528 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2529 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2530 (linux_wait_1, stuck_in_jump_pad_callback)
2531 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2532 (linux_stopped_by_watchpoint):
2533 * linux-low.h (enum lwp_stop_reason): Delete.
2534 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2535 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2536
2537 2015-03-04 Yao Qi <yao.qi@linaro.org>
2538
2539 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2540
2541 2015-03-03 Gary Benson <gbenson@redhat.com>
2542
2543 * hostio.c (handle_vFile): Fix prefix lengths.
2544
2545 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2546
2547 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2548 ptr_bits.
2549
2550 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2551
2552 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2553 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2554 (clean): Add "rm -f" for above C files.
2555 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2556 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2557 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2558 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2559 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2560 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2561 (init_registers_s390x_vx_linux64)
2562 (init_registers_s390x_tevx_linux64)
2563 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2564 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2565 declarations.
2566 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2567 (s390_store_vxrs_high): New functions.
2568 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2569 NT_S390_VXRS_HIGH.
2570 (s390_arch_setup): Add logic for selecting one of the new target
2571 descriptions. Activate the new vector regsets if applicable.
2572 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2573 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2574 and init_registers_s390x_tevx_linux64.
2575
2576 2015-03-01 Pedro Alves <palves@redhat.com>
2577
2578 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2579 parameter.
2580
2581 2015-02-27 Pedro Alves <palves@redhat.com>
2582
2583 * linux-x86-low.c (u_debugreg_offset): New function.
2584 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2585
2586 2015-02-27 Pedro Alves <palves@redhat.com>
2587
2588 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2589 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2590 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2591 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2592 (ps_lsetfpregs, ps_getpid)
2593 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2594 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2595 (ps_lsetxregs, ps_plog): Declare.
2596
2597 2015-02-27 Pedro Alves <palves@redhat.com>
2598
2599 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2600 IP_AGENT_EXPORT_FUNC.
2601 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2602 IP_AGENT_EXPORT_FUNC.
2603 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2604 (IP_AGENT_EXPORT): Delete.
2605 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2606 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2607 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2608 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2609 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2610 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2611 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2612 (traceframe_read_count, traceframe_write_count)
2613 (traceframes_created, trace_state_variables, get_raw_reg)
2614 (get_trace_state_variable_value, set_trace_state_variable_value)
2615 (ust_loaded, helper_thread_id, cmd_buf): Use
2616 IPA_SYM_EXPORTED_NAME.
2617 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2618 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2619 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2620 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2621 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2622 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2623 EXTERN_C_PUSH/EXTERN_C_POP.
2624 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2625 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2626 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2627 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2628 (traceframe_write_count, traceframe_read_count)
2629 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2630 (about_to_request_buffer_space, get_trace_state_variable_value)
2631 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2632 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2633 EXTERN_C_PUSH/EXTERN_C_POP.
2634 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2635 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2636 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2637 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2638 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2639 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2640 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2641 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2642 Define.
2643 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2644 (IP_AGENT_EXPORT_VAR_DECL): Define.
2645 (tracing): Declare.
2646 (gdb_agent_get_raw_reg): Declare.
2647
2648 2015-02-27 Tom Tromey <tromey@redhat.com>
2649 Pedro Alves <palves@redhat.com>
2650
2651 Rename symbols whose names are reserved C++ keywords throughout.
2652
2653 2015-02-27 Pedro Alves <palves@redhat.com>
2654
2655 * Makefile.in (COMPILER): New, get it from autoconf.
2656 (CXX): Get from autoconf instead.
2657 (COMPILE.pre): Use COMPILER.
2658 (CC-LD): Rename to ...
2659 (CC_LD): ... this. Use COMPILER.
2660 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2661 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2662 * acinclude.m4: Include build-with-cxx.m4.
2663 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2664 Disable -Werror by default if building in C++ mode.
2665 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2666 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2667 the C++ compiler. Save/restore CXXFLAGS too.
2668 * configure: Regenerate.
2669
2670 2015-02-27 Pedro Alves <palves@redhat.com>
2671
2672 * acinclude.m4: Include libiberty.m4.
2673 * configure.ac: Call libiberty_INIT.
2674 * config.in, configure: Regenerate.
2675
2676 2015-02-26 Pedro Alves <palves@redhat.com>
2677
2678 * linux-low.c (linux_wait_1): When incrementing the PC past a
2679 program breakpoint always use the_low_target.breakpoint_len as
2680 increment, rather than the maximum between that and
2681 the_low_target.decr_pc_after_break.
2682
2683 2015-02-23 Pedro Alves <palves@redhat.com>
2684
2685 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2686 thread was doing a step-over; always adjust the PC if
2687 we stepped over a permanent breakpoint.
2688 (linux_wait_1): If we stepped over breakpoint that was on top of a
2689 permanent breakpoint, manually advance the PC past it.
2690
2691 2015-02-23 Pedro Alves <palves@redhat.com>
2692
2693 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2694 modes.
2695 (x86_fill_gregset, x86_store_gregset): Use it when handling
2696 $orig_eax.
2697
2698 2015-02-20 Pedro Alves <palves@redhat.com>
2699
2700 * thread-db.c: Include "nat/linux-procfs.h".
2701 (thread_db_init): Skip listing new threads if the kernel supports
2702 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2703
2704 2015-02-20 Pedro Alves <palves@redhat.com>
2705
2706 * linux-low.c (status_pending_p_callback): Use ptid_match.
2707
2708 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2709
2710 PR breakpoints/16812
2711 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2712 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2713 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2714
2715 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2716
2717 PR breakpoints/15956
2718 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2719
2720 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2721
2722 * linux-low.c (linux_low_btrace_conf): Print size.
2723 * server.c (handle_btrace_conf_general_set): New.
2724 (hanle_general_set): Call handle_btrace_conf_general_set.
2725 (handle_query): Report Qbtrace-conf:bts:size as supported.
2726
2727 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2728
2729 * linux-low.c (linux_low_enable_btrace): Update parameters.
2730 (linux_low_btrace_conf): New.
2731 (linux_target_ops)<to_btrace_conf>: Initialize.
2732 * server.c (current_btrace_conf): New.
2733 (handle_btrace_enable): Rename to ...
2734 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2735 to target_enable_btrace. Update comment. Update users.
2736 (handle_qxfer_btrace_conf): New.
2737 (qxfer_packets): Add btrace-conf entry.
2738 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2739 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2740 (target_ops)<read_btrace_conf>: New.
2741 (target_enable_btrace): Update parameters.
2742 (target_read_btrace_conf): New.
2743
2744 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2745
2746 * server.c (handle_btrace_general_set): Remove call to
2747 target_supports_btrace.
2748 (supported_btrace_packets): New.
2749 (handle_query): Call supported_btrace_packets.
2750 * target.h: include btrace-common.h.
2751 (btrace_target_info): Removed.
2752 (supports_btrace, target_supports_btrace): Update parameters.
2753
2754 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2755
2756 * Makefile.in (SFILES): Add common/btrace-common.c.
2757 (OBS): Add common/btrace-common.o.
2758 (btrace-common.o): Add build rules.
2759 * linux-low: Include btrace-common.h.
2760 (linux_low_read_btrace): Use struct btrace_data. Call
2761 btrace_data_init and btrace_data_fini.
2762
2763 2015-02-06 Pedro Alves <palves@redhat.com>
2764
2765 * thread-db.c (find_new_threads_callback): Add debug output.
2766
2767 2015-02-04 Pedro Alves <palves@redhat.com>
2768
2769 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2770 (resume_stopped_resumed_lwps): New function.
2771 (linux_wait_for_event_filtered): Use it.
2772
2773 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2774
2775 * Makefile.in (SFILES): Add linux-personality.c.
2776 (linux-personality.o): New rule.
2777 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2778 list of objects to be built.
2779 * linux-low.c: Include nat/linux-personality.h.
2780 (linux_create_inferior): Remove code to disable address space
2781 randomization (moved to ../nat/linux-personality.c). Create
2782 cleanup to disable address space randomization.
2783
2784 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2785
2786 * Makefile.in (posix-strerror.o): New rule.
2787 (mingw-strerror.o): Likewise.
2788 * configure: Regenerated.
2789 * configure.ac: Source file ../common/common.host. Initialize new
2790 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2791
2792 2015-01-14 Yao Qi <yao@codesourcery.com>
2793
2794 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2795 (ppc-linux.o): New rule.
2796 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2797 * configure.ac: AC_CHECK_FUNCS(getauxval).
2798 * config.in: Re-generated.
2799 * configure: Re-generated.
2800 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2801 ppc64_64bit_inferior_p
2802
2803 2015-01-14 Yao Qi <yao@codesourcery.com>
2804
2805 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2806 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2807 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2808 (PT_ORIG_R3, PT_TRAP): Likewise.
2809 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2810 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2811 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2812
2813 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2814
2815 * i387-fp.c (i387_cache_to_xsave): In look over
2816 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2817 zmmh_low_space field by use of zmmh_high_space.
2818
2819 2015-01-09 Pedro Alves <palves@redhat.com>
2820
2821 * linux-low.c (step_over_bkpt): Move higher up in the file.
2822 (handle_extended_wait): Don't store the stop_pc here.
2823 (get_stop_pc): Adjust comments and rename to ...
2824 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2825 stopped for a software breakpoint or hardware breakpoint.
2826 (thread_still_has_status_pending_p): New function.
2827 (status_pending_p_callback): Use
2828 thread_still_has_status_pending_p. If the event is no longer
2829 interesting, resume the LWP.
2830 (handle_tracepoints): Add assert.
2831 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2832 (wstatus_maybe_breakpoint): New function.
2833 (cancel_breakpoint): Delete function.
2834 (check_stopped_by_watchpoint): New function, factored out from
2835 linux_low_filter_event.
2836 (lp_status_maybe_breakpoint): Delete function.
2837 (linux_low_filter_event): Remove filter_ptid argument.
2838 Leave thread group exits pending here. Store the LWP's stop PC.
2839 Always leave events pending.
2840 (linux_wait_for_event_filtered): Pull all events out of the
2841 kernel, and leave them all pending.
2842 (count_events_callback, select_event_lwp_callback): Consider all
2843 events.
2844 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2845 (select_event_lwp): Only give preference to the stepping LWP in
2846 all-stop mode. Adjust comments.
2847 (ignore_event): New function.
2848 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2849 references to cancel_breakpoints. Adjust to renames. Also give
2850 equal priority to all LWPs that have had events in non-stop mode.
2851 If reporting a software breakpoint event, unadjust the LWP's PC.
2852 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2853 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2854 Adjust.
2855 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2856 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2857 (linux_stopped_by_watchpoint): Adjust.
2858 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2859 * linux-low.h (enum lwp_stop_reason): New.
2860 (struct lwp_info) <stop_pc>: Adjust comment.
2861 <stopped_by_watchpoint>: Delete field.
2862 <stop_reason>: New field.
2863 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2864 * mem-break.c (software_breakpoint_inserted_here)
2865 (hardware_breakpoint_inserted_here): New function.
2866 * mem-break.h (software_breakpoint_inserted_here)
2867 (hardware_breakpoint_inserted_here): Declare.
2868 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2869 (cancel_breakpoints): Delete.
2870 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2871 (upload_fast_traceframes): Remove references to
2872 cancel_breakpoints.
2873
2874 2015-01-09 Pedro Alves <palves@redhat.com>
2875
2876 * thread-db.c (find_new_threads_callback): Ignore thread if the
2877 kernel thread ID is -1.
2878
2879 2015-01-09 Pedro Alves <palves@redhat.com>
2880
2881 * linux-low.c (linux_attach_fail_reason_string): Move to
2882 nat/linux-ptrace.c, and rename.
2883 (linux_attach_lwp): Update comment.
2884 (attach_proc_task_lwp_callback): New function.
2885 (linux_attach): Adjust to rename and use
2886 linux_proc_attach_tgid_threads.
2887 (linux_attach_fail_reason_string): Delete declaration.
2888
2889 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2890
2891 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2892 * server.c (gdbserver_version): Likewise.
2893
2894 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2895
2896 * remote-utils.c: Include ctype.h.
2897 (input_interrupt): Explicitly handle the case when the char
2898 received is the NUL byte. Improve the printing of non-ASCII
2899 characters.
2900
2901 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2902
2903 * linux-low.c (linux_low_filter_event): Update call to
2904 linux_enable_event_reporting following the addition of
2905 a new parameter to that function.
2906
2907 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2908
2909 PR server/17457
2910 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2911 (AARCH64_FPCR_REGNO): Likewise.
2912 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2913 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2914 (aarch64_store_fpregset): Likewise.
2915
2916 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2917
2918 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2919 Remove FIXME comment about assumption about N.
2920
2921 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2922
2923 * configure.ac: If large-file support is disabled in GDBserver,
2924 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2925 * configure: Regenerate.
2926
2927 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2928
2929 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2930 warning upon ENODATA from ptrace.
2931 * linux-s390-low.c (s390_store_tdb): New.
2932 (s390_regsets): Add regset for NT_S390_TDB.
2933
2934 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2935
2936 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2937 without a fill_function.
2938 * linux-s390-low.c (s390_fill_last_break): Remove.
2939 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2940 (s390_arch_setup): Use regset's size instead of fill_function for
2941 loop end condition.
2942
2943 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2944
2945 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2946 the regset's store function when ptrace returned an error.
2947 * regcache.c (get_thread_regcache): Invalidate register cache
2948 before fetching inferior's registers.
2949
2950 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2951
2952 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2953 while-loop as for-loop.
2954 (regsets_store_inferior_registers): Likewise.
2955
2956 2014-11-28 Yao Qi <yao@codesourcery.com>
2957
2958 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2959 * config.in, configure: Re-generate.
2960 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2961 is defined.
2962
2963 2014-11-21 Yao Qi <yao@codesourcery.com>
2964
2965 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2966 (AC_CHECK_HEADERS): Remove malloc.h.
2967 * configure: Re-generated.
2968 * config.in: Re-generated.
2969 * server.h: Don't include alloca.h and malloc.h.
2970 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2971 Don't include malloc.h.
2972
2973 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2974
2975 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2976 corresponding ERRNO check in same block.
2977
2978 2014-11-12 Pedro Alves <palves@redhat.com>
2979
2980 * server.c (cont_thread): Update comment.
2981 (start_inferior, attach_inferior): No longer clear cont_thread.
2982 (handle_v_cont): No longer set cont_thread.
2983 (captured_main): Clear cont_thread each time a GDB connects.
2984
2985 2014-11-12 Pedro Alves <palves@redhat.com>
2986
2987 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2988 thread, and don't resume all threads if the Hc thread has exited.
2989
2990 2014-11-12 Pedro Alves <palves@redhat.com>
2991
2992 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2993 the process group instead of to a specific LWP.
2994
2995 2014-10-15 Pedro Alves <palves@redhat.com>
2996
2997 PR server/17487
2998 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2999 parameter.
3000 (arm_set_thread_context): Delete.
3001 (the_low_target): Adjust.
3002 * win32-i386-low.c (debug_registers_changed)
3003 (debug_registers_used): Delete.
3004 (update_debug_registers_callback): New function.
3005 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3006 needing to update their debug registers.
3007 (win32_get_current_dr): New function.
3008 (x86_dr_low_get_addr, x86_dr_low_get_control)
3009 (x86_dr_low_get_status): Fetch the debug register from the thread
3010 record's context.
3011 (i386_initial_stuff): Adjust.
3012 (i386_get_thread_context): Remove current_event parameter. Don't
3013 clear debug_registers_changed nor copy DR values to
3014 debug_reg_state.
3015 (i386_set_thread_context): Delete.
3016 (i386_prepare_to_resume): New function.
3017 (i386_thread_added): Mark the thread as needing to update irs
3018 debug registers.
3019 (the_low_target): Remove i386_set_thread_context and install
3020 i386_prepare_to_resume.
3021 * win32-low.c (win32_get_thread_context): Adjust.
3022 (win32_set_thread_context): Use SetThreadContext
3023 directly.
3024 (win32_prepare_to_resume): New function.
3025 (win32_require_context): New function, factored out from ...
3026 (thread_rec): ... this.
3027 (continue_one_thread): Call win32_prepare_to_resume on each thread
3028 we're about to continue.
3029 (win32_resume): Call win32_prepare_to_resume on the event thread.
3030 * win32-low.h (struct win32_thread_info)
3031 <debug_registers_changed>: New field.
3032 (struct win32_target_ops): Change prototype of set_thread_context,
3033 delete set_thread_context and add prepare_to_resume.
3034 (win32_require_context): New declaration.
3035
3036 2014-10-08 Gary Benson <gbenson@redhat.com>
3037
3038 * server.h: Do not include common-exceptions.h.
3039
3040 2014-10-08 Gary Benson <gbenson@redhat.com>
3041
3042 * server.h: Do not include cleanups.h.
3043
3044 2014-09-30 James Hogan <james.hogan@imgtec.com>
3045
3046 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3047 mips64-dsp-linux.c.
3048
3049 2014-09-23 Yao Qi <yao@codesourcery.com>
3050
3051 * linux-low.c (lp_status_maybe_breakpoint): New function.
3052 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3053 (count_events_callback): Likewise.
3054 (select_event_lwp_callback): Likewise.
3055 (cancel_breakpoints_callback): Likewise.
3056
3057 2014-09-19 Don Breazeal <donb@codesourcery.com>
3058
3059 * linux-low.c (handle_extended_wait): Call
3060 linux_ptrace_get_extended_event.
3061 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3062 linux_is_extended_waitstatus.
3063
3064 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3065
3066 * Makefile.in (CPPFLAGS): Define.
3067 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3068 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3069
3070 2014-09-16 Gary Benson <gbenson@redhat.com>
3071
3072 * inferiors.h (current_inferior): Renamed as...
3073 (current_thread): New variable. All uses updated.
3074 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3075 (maybe_move_out_of_jump_pad): Likewise.
3076 (cancel_breakpoint): Likewise.
3077 (linux_low_filter_event): Likewise.
3078 (wait_for_sigstop): Likewise.
3079 (linux_resume_one_lwp): Likewise.
3080 (need_step_over_p): Likewise.
3081 (start_step_over): Likewise.
3082 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3083 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3084 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3085 and save_inferior as saved_thread.
3086 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3087 saved_thread.
3088 (regcache_invalidate_thread): Likewise.
3089 * remote-utils.c (prepare_resume_reply): Likewise.
3090 * thread-db.c (thread_db_get_tls_address): Likewise.
3091 (disable_thread_event_reporting): Likewise.
3092 (remove_thread_event_breakpoints): Likewise.
3093 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3094 as saved_thread.
3095 * target.h (set_desired_inferior): Renamed as...
3096 (set_desired_thread): New declaration. All uses updated.
3097 * server.c (myresume): Updated comment to reference thread instead
3098 of inferior.
3099 (handle_serial_event): Likewise.
3100 (handle_target_event): Likewise.
3101
3102 2014-09-12 Tom Tromey <tromey@redhat.com>
3103 Gary Benson <gbenson@redhat.com>
3104
3105 * regcache.h: Include common-regcache.h.
3106 (regcache_read_pc): Don't declare.
3107 * regcache.c (get_thread_regcache_for_ptid): New function.
3108
3109 2014-09-11 Tom Tromey <tromey@redhat.com>
3110 Gary Benson <gbenson@redhat.com>
3111
3112 * symbol.c: New file.
3113 * Makefile.in (SFILES): Add symbol.c.
3114 (OBS): Add symbol.o.
3115
3116 2014-09-11 Gary Benson <gbenson@redhat.com>
3117
3118 * target.c (target_stop_ptid, target_continue_ptid): New
3119 functions.
3120
3121 2014-09-11 Tom Tromey <tromey@redhat.com>
3122 Gary Benson <gbenson@redhat.com>
3123
3124 * target.h: Include target/target.h.
3125 * target.c (target_read_memory, target_read_uint32)
3126 (target_write_memory): New functions.
3127
3128 2014-09-11 Gary Benson <gbenson@redhat.com>
3129
3130 * server.h (debug_hw_points): Don't declare.
3131 * server.c (debug_hw_points): Don't define. Replace all uses
3132 with show_debug_regs.
3133 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3134 all uses with show_debug_regs.
3135
3136 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3137
3138 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3139 endianness into account.
3140 (ppc_supply_ptrace_register): Likewise.
3141
3142 2014-09-03 James Hogan <james.hogan@imgtec.com>
3143
3144 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3145 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3146
3147 2014-09-03 Gary Benson <gbenson@redhat.com>
3148
3149 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3150 ALL_DEBUG_ADDRESS_REGISTERS.
3151
3152 2014-09-02 Gary Benson <gbenson@redhat.com>
3153
3154 * i386-low.h: Renamed as...
3155 * x86-low.h: New file. All type, function and variable name
3156 prefixes changed from "i386_" to "x86_". All references updated.
3157 * i386-low.c: Renamed as...
3158 * x86-low.c: New file. All type, function and variable name
3159 prefixes changed from "i386_" to "x86_". All references updated.
3160
3161 2014-09-02 Gary Benson <gbenson@redhat.com>
3162
3163 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3164 (x86_linux_new_thread): Likewise.
3165
3166 2014-08-29 Gary Benson <gbenson@redhat.com>
3167
3168 * server.h (setjmp.h): Do not include.
3169 (toplevel): Do not declare.
3170 (common-exceptions.h): Include.
3171 (cleanups.h): Likewise.
3172 * server.c (toplevel): Do not define.
3173 (exit_code): New static global.
3174 (detach_or_kill_for_exit_cleanup): New function.
3175 (main): New function. Original main renamed to...
3176 (captured_main): New function.
3177 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3178
3179 2014-08-29 Gary Benson <gbenson@redhat.com>
3180
3181 * Makefile.in (SFILES): Add common/common-exceptions.c.
3182 (OBS): Add common-exceptions.o.
3183 (common-exceptions.o): New rule.
3184 * utils.c (prepare_to_throw_exception): New function.
3185
3186 2014-08-29 Gary Benson <gbenson@redhat.com>
3187
3188 * config.in: Regenerate.
3189 * configure: Likewise.
3190
3191 2014-08-29 Gary Benson <gbenson@redhat.com>
3192
3193 * Makefile.in (SFILES): Add common/cleanups.c.
3194 (OBS): cleanups.o.
3195 (cleanups.o): New rule.
3196
3197 2014-08-29 Gary Benson <gbenson@redhat.com>
3198
3199 * utils.c (internal_vwarning): New function.
3200
3201 2014-08-28 Gary Benson <gbenson@redhat.com>
3202
3203 * utils.h (fatal): Remove declaration.
3204 * utils.c (fatal): Remove function.
3205
3206 2014-08-28 Gary Benson <gbenson@redhat.com>
3207
3208 * tracepoint.c (gdb_agent_init): Replace fatal with
3209 perror_with_name.
3210 (initialize_tracepoint): Likewise.
3211
3212 2014-08-28 Gary Benson <gbenson@redhat.com>
3213
3214 * remote-utils.c (remote_prepare): Replace fatal with error.
3215
3216 2014-08-28 Gary Benson <gbenson@redhat.com>
3217
3218 * linux-low.c (linux_async): Replace fatal with warning.
3219 Tidy up and return.
3220 (linux_start_non_stop): Return -1 if linux_async failed.
3221
3222 2014-08-28 Gary Benson <gbenson@redhat.com>
3223
3224 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3225 gdb_assert.
3226 (i386_dr_low_get_addr): Remove vague comment.
3227 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3228 gdb_assert.
3229
3230 2014-08-28 Gary Benson <gbenson@redhat.com>
3231
3232 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3233 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3234 internal_error.
3235 (linux_resume_one_lwp): Likewise.
3236 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3237 gdb_assert.
3238 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3239 with internal_error.
3240 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3241 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3242 (find_register_by_name): Replace fatal with internal_error.
3243 (find_regno): Likewise.
3244 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3245 * thread-db.c (thread_db_create_event): Likewise.
3246 (thread_db_load_search): Likewise.
3247 (try_thread_db_load_1): Likewise.
3248 * tracepoint.c (get_jump_space_head): Replace fatal with
3249 internal_error.
3250 (claim_trampoline_space): Likewise.
3251 (have_fast_tracepoint_trampoline_buffer): Likewise.
3252 (cmd_qtstart): Likewise.
3253 (stop_tracing): Likewise.
3254 (fast_tracepoint_collecting): Likewise.
3255 (target_malloc): Likewise.
3256 (download_tracepoint): Likewise.
3257 (download_trace_state_variables): Replace check with gdb_assert.
3258 (upload_fast_traceframes): Replace fatal with internal_error.
3259
3260 2014-08-19 Tom Tromey <tromey@redhat.com>
3261 Gary Benson <gbenson@redhat.com>
3262
3263 * Makefile.in (SFILES): Add common/common-debug.c.
3264 (OBS): Add common-debug.o.
3265 (common-debug.o): New rule.
3266 * debug.h (debug_printf): Don't declare.
3267 * debug.c (debug_printf): Renamed and rewritten as...
3268 (debug_vprintf): New function.
3269
3270 2014-08-19 Gary Benson <gbenson@redhat.com>
3271
3272 * utils.h: Do not include print-utils.h.
3273
3274 2014-08-19 Tom Tromey <tromey@redhat.com>
3275 Gary Benson <gbenson@redhat.com>
3276
3277 * server.h: Add static assertion.
3278 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3279
3280 2014-08-19 Tom Tromey <tromey@redhat.com>
3281 Gary Benson <gbenson@redhat.com>
3282
3283 * Makefile.in (SFILES): Add common/errors.c.
3284 (OBS): Add errors.o.
3285 (IPA_OBS): Add errors-ipa.o.
3286 (errors.o): New rule.
3287 (errors-ipa.o): Likewise.
3288 * utils.h (perror_with_name, error, warning): Don't declare.
3289 * utils.c (warning): Renamed and rewritten as...
3290 (vwarning): New function.
3291 (error): Renamed and rewritten as...
3292 (verror): New function.
3293 (internal_error): Renamed and rewritten as...
3294 (internal_verror): New function.
3295
3296 2014-08-07 Gary Benson <gbenson@redhat.com>
3297
3298 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3299 * configure: Regenerate.
3300 * config.in: Likewise.
3301 * server.h: Do not include errno.h.
3302 * event-loop.c: Likewise.
3303 * hostio-errno.c: Likewise.
3304 * linux-low.c: Likewise.
3305 * remote-utils.c: Likewise.
3306 * spu-low.c: Likewise.
3307 * utils.c: Likewise.
3308 * gdbreplay.c: Unconditionally include errno.h.
3309
3310 2014-08-07 Gary Benson <gbenson@redhat.com>
3311
3312 * server.h: Do not include string.h.
3313 * event-loop.c: Likewise.
3314 * linux-low.c: Likewise.
3315 * regcache.c: Likewise.
3316 * remote-utils.c: Likewise.
3317 * spu-low.c: Likewise.
3318 * utils.c: Likewise.
3319
3320 2014-08-07 Gary Benson <gbenson@redhat.com>
3321
3322 * server.h: Do not include gdb_assert.h.
3323
3324 2014-08-07 Gary Benson <gbenson@redhat.com>
3325
3326 * server.h: Do not include common-utils.h.
3327
3328 2014-08-07 Gary Benson <gbenson@redhat.com>
3329
3330 * server.h: Do not include ptid.h.
3331 * notif.h: Likewise.
3332
3333 2014-08-07 Gary Benson <gbenson@redhat.com>
3334
3335 * server.h: Do not include gdb_locale.h.
3336
3337 2014-08-07 Gary Benson <gbenson@redhat.com>
3338
3339 * server.h: Do not include gdb/signals.h.
3340 * win32-low.c: Likewise.
3341
3342 2014-08-07 Gary Benson <gbenson@redhat.com>
3343
3344 * server.h: Do not include pathmax.h.
3345
3346 2014-08-07 Gary Benson <gbenson@redhat.com>
3347
3348 * server.h: Do not include libiberty.h.
3349 * linux-bfin-low.c: Likewise.
3350
3351 2014-08-07 Gary Benson <gbenson@redhat.com>
3352
3353 * server.h: Do not include ansidecl.h.
3354
3355 2014-08-07 Gary Benson <gbenson@redhat.com>
3356
3357 * linux-x86-low.c: Do not include stddef.h.
3358 * lynx-ppc-low.c: Likewise.
3359 * tracepoint.c: Likewise.
3360
3361 2014-08-07 Gary Benson <gbenson@redhat.com>
3362
3363 * server.h: Do not include stdarg.h.
3364 * nto-low.c: Likewise.
3365
3366 2014-08-07 Gary Benson <gbenson@redhat.com>
3367
3368 * server.h: Do not include stdlib.h.
3369 * inferiors.c: Likewise.
3370 * linux-low.c: Likewise.
3371 * regcache.c: Likewise.
3372 * spu-low.c: Likewise.
3373 * tracepoint.c: Likewise.
3374 * utils.c: Likewise.
3375
3376 2014-08-07 Gary Benson <gbenson@redhat.com>
3377
3378 * server.h: Do not include stdio.h.
3379 * linux-low.c: Likewise.
3380 * remote-utils.c: Likewise.
3381 * spu-low.c: Likewise.
3382 * utils.c: Likewise.
3383 * wincecompat.c: Likewise.
3384
3385 2014-08-06 Gary Benson <gbenson@redhat.com>
3386
3387 * regcache.c (init_register_cache): Move conditionals inside if.
3388
3389 2014-08-06 Gary Benson <gbenson@redhat.com>
3390
3391 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3392
3393 2014-07-31 Gary Benson <gbenson@redhat.com>
3394
3395 * ax.h: Do not include server.h.
3396 * gdbthread.h: Likewise.
3397 * lynx-low.h: Likewise.
3398 * notif.h: Likewise.
3399
3400 2014-07-30 Gary Benson <gbenson@redhat.com>
3401
3402 * server.h: Include common-defs.h.
3403 Do not include config.h or build-gnulib-gdbserver/config.h.
3404
3405 2014-07-30 Gary Benson <gbenson@redhat.com>
3406
3407 * hostio-errno.c: Move server.h to top of includes list.
3408 * inferiors.c: Likewise.
3409 * linux-x86-low.c: Likewise.
3410 * notif.c: Include server.h.
3411
3412 2014-07-24 Tom Tromey <tromey@redhat.com>
3413 Gary Benson <gbenson@redhat.com>
3414
3415 * server.h (CORE_ADDR): Now unsigned.
3416
3417 2014-07-16 Pedro Alves <palves@redhat.com>
3418
3419 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3420
3421 2014-07-15 Pedro Alves <palves@redhat.com>
3422
3423 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3424 copy.
3425
3426 2014-07-11 Pedro Alves <palves@redhat.com>
3427
3428 * linux-low.c (kill_wait_lwp): New function, based on
3429 kill_one_lwp_callback, but use my_waitpid directly.
3430 (kill_one_lwp_callback, linux_kill): Use it.
3431
3432 2014-06-23 Pedro Alves <palves@redhat.com>
3433
3434 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3435 before setting DR0..DR3.
3436
3437 2014-06-20 Gary Benson <gbenson@redhat.com>
3438
3439 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3440 * configure: Regenerated.
3441 * config.in: Likewise.
3442
3443 2014-06-20 Gary Benson <gbenson@redhat.com>
3444
3445 * Makefile.in (SFILES): Update locations for files moved
3446 from common to nat.
3447 (object file files): Reordered.
3448
3449 2014-06-20 Gary Benson <gbenson@redhat.com>
3450
3451 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3452 (i386_dr_low_set_addr): Likewise.
3453 (i386_dr_low_get_addr): Likewise.
3454 (i386_dr_low_can_set_control): Likewise.
3455 (i386_dr_low_set_control): Likewise.
3456 (i386_dr_low_get_control): Likewise.
3457 (i386_dr_low_get_status): Likewise.
3458 (i386_get_debug_register_length): Likewise.
3459 * linux-x86-low.c (i386_dr_low_set_addr):
3460 Changed signature. Made static.
3461 (i386_dr_low_get_addr): Likewise.
3462 (i386_dr_low_set_control): Likewise.
3463 (i386_dr_low_get_control): Likewise.
3464 (i386_dr_low_get_status): Likewise.
3465 (i386_dr_low): New global variable.
3466 * win32-i386-low.c (i386_dr_low_set_addr):
3467 Changed signature. Made static.
3468 (i386_dr_low_get_addr): Likewise.
3469 (i386_dr_low_set_control): Likewise.
3470 (i386_dr_low_get_control): Likewise.
3471 (i386_dr_low_get_status): Likewise.
3472 (i386_dr_low): New global variable.
3473
3474 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3475
3476 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3477 * Makefile.in (AR, AR_FLAGS): Define.
3478 * configure: Regenerate.
3479
3480 2014-06-19 Gary Benson <gbenson@redhat.com>
3481
3482 * Makefile.in (i386-dregs.o): New rule.
3483 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3484 * i386-low.c (target.h): Remove include.
3485 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3486 (DR_CONTROL_SHIFT): Likewise.
3487 (DR_CONTROL_SIZE): Likewise.
3488 (DR_RW_EXECUTE): Likewise.
3489 (DR_RW_WRITE): Likewise.
3490 (DR_RW_READ): Likewise.
3491 (DR_RW_IORW): Likewise.
3492 (DR_LEN_1): Likewise.
3493 (DR_LEN_2): Likewise.
3494 (DR_LEN_4): Likewise.
3495 (DR_LEN_8): Likewise.
3496 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3497 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3498 (DR_ENABLE_SIZE): Likewise.
3499 (DR_LOCAL_SLOWDOWN): Likewise.
3500 (DR_GLOBAL_SLOWDOWN): Likewise.
3501 (DR_CONTROL_RESERVED): Likewise.
3502 (I386_DR_CONTROL_MASK): Likewise.
3503 (I386_DR_VACANT): Likewise.
3504 (I386_DR_LOCAL_ENABLE): Likewise.
3505 (I386_DR_GLOBAL_ENABLE): Likewise.
3506 (I386_DR_DISABLE): Likewise.
3507 (I386_DR_SET_RW_LEN): Likewise.
3508 (I386_DR_GET_RW_LEN): Likewise.
3509 (I386_DR_WATCH_HIT): Likewise.
3510 (i386_wp_op_t): Likewise.
3511 (i386_show_dr): Likewise.
3512 (i386_length_and_rw_bits): Likewise.
3513 (i386_insert_aligned_watchpoint): Likewise.
3514 (i386_remove_aligned_watchpoint): Likewise.
3515 (i386_handle_nonaligned_watchpoint): Likewise.
3516 i386_update_inferior_debug_regs(): Likewise.
3517 (i386_dr_insert_watchpoint): Likewise.
3518 (i386_dr_remove_watchpoint): Likewise.
3519 (i386_dr_region_ok_for_watchpoint): Likewise.
3520 (i386_dr_stopped_data_address): Likewise.
3521 (i386_dr_stopped_by_watchpoint): Likewise.
3522
3523 2014-06-19 Gary Benson <gbenson@redhat.com>
3524
3525 * i386-low.c (i386_dr_show): Renamed to
3526 i386_show_dr and made static. All uses updated.
3527 (i386_dr_length_and_rw_bits): Renamed to
3528 i386_length_and_rw_bits and made static.
3529 All uses updated.
3530 (i386_dr_insert_aligned_watchpoint): Renamed to
3531 i386_insert_aligned_watchpoint and made static.
3532 All uses updated.
3533 (i386_dr_remove_aligned_watchpoint): Renamed to
3534 i386_remove_aligned_watchpoint and made static.
3535 All uses updated.
3536 (i386_dr_update_inferior_debug_regs): Renamed to
3537 i386_update_inferior_debug_regs and made static.
3538 All uses updated.
3539
3540 2014-06-18 Gary Benson <gbenson@redhat.com>
3541
3542 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3543 (i386_dr_low_can_set_control): Likewise.
3544 (i386_get_debug_register_length): Likewise.
3545 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3546 (i386_dr_low_can_set_control): Likewise.
3547 (i386_get_debug_register_length): Likewise.
3548
3549 2014-06-17 Gary Benson <gbenson@redhat.com>
3550
3551 * i386-low.h (i386-dregs.h): New include.
3552 (DR_FIRSTADDR): Now in i386-dregs.h.
3553 (DR_LASTADDR): Likewise.
3554 (DR_NADDR): Likewise.
3555 (DR_STATUS): Likewise.
3556 (DR_CONTROL): Likewise.
3557 (i386_debug_reg_state): Likewise.
3558 (i386_dr_insert_watchpoint): Likewise.
3559 (i386_dr_remove_watchpoint): Likewise.
3560 (i386_dr_region_ok_for_watchpoint): Likewise.
3561 (i386_dr_stopped_data_address): Likewise.
3562 (i386_dr_stopped_by_watchpoint): Likewise.
3563 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3564
3565 2014-06-18 Gary Benson <gbenson@redhat.com>
3566
3567 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3568 i386_dr_insert_watchpoint.
3569 (i386_low_remove_watchpoint): Renamed to
3570 i386_dr_remove_watchpoint.
3571 (i386_low_region_ok_for_watchpoint): Renamed to
3572 i386_dr_region_ok_for_watchpoint.
3573 (i386_low_stopped_data_address): Renamed to
3574 i386_dr_stopped_data_address.
3575 (i386_low_stopped_by_watchpoint): Renamed to
3576 i386_dr_stopped_by_watchpoint.
3577 * i386-low.c (i386_show_dr): Renamed to
3578 i386_dr_show and made nonstatic. All uses updated.
3579 (i386_length_and_rw_bits): Renamed to
3580 i386_dr_length_and_rw_bits and made nonstatic.
3581 All uses updated.
3582 (i386_insert_aligned_watchpoint): Renamed to
3583 i386_dr_insert_aligned_watchpoint and made nonstatic.
3584 All uses updated.
3585 (i386_remove_aligned_watchpoint): Renamed to
3586 i386_dr_remove_aligned_watchpoint and made nonstatic.
3587 All uses updated.
3588 (i386_update_inferior_debug_regs): Renamed to
3589 i386_dr_update_inferior_debug_regs and made nonstatic.
3590 All uses updated.
3591 (i386_low_insert_watchpoint): Renamed to
3592 i386_dr_insert_watchpoint. All uses updated.
3593 (i386_low_remove_watchpoint): Renamed to
3594 i386_dr_remove_watchpoint. All uses updated.
3595 (i386_low_region_ok_for_watchpoint): Renamed to
3596 i386_dr_region_ok_for_watchpoint. All uses updated.
3597 (i386_low_stopped_data_address): Renamed to
3598 i386_dr_stopped_data_address. All uses updated.
3599 (i386_low_stopped_by_watchpoint): Renamed to
3600 i386_dr_stopped_by_watchpoint. All uses updated.
3601
3602 2014-06-18 Gary Benson <gbenson@redhat.com>
3603
3604 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3605 (i386_dr_low_can_set_control): Likewise.
3606 (i386_insert_aligned_watchpoint): New check.
3607
3608 2014-06-18 Gary Benson <gbenson@redhat.com>
3609
3610 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3611 Renamed to state.
3612
3613 2014-06-18 Gary Benson <gbenson@redhat.com>
3614
3615 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3616 instead of fatal and error.
3617 (i386_handle_nonaligned_watchpoint): Likewise.
3618
3619 2014-06-18 Gary Benson <gbenson@redhat.com>
3620
3621 * i386-low.c (i386_get_debug_register_length): New macro.
3622 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3623 (i386_show_dr): Use debug_printf instead of fprintf. Use
3624 phex to format values.
3625
3626 2014-06-18 Gary Benson <gbenson@redhat.com>
3627
3628 * i386-low.h: Comment changes.
3629 * i386-low.c: Likewise.
3630
3631 2014-06-18 Gary Benson <gbenson@redhat.com>
3632
3633 * i386-low.c: Whitespace changes.
3634
3635 2014-06-12 Tom Tromey <tromey@redhat.com>
3636
3637 * utils.c (freeargv): Remove.
3638
3639 2014-06-12 Tom Tromey <tromey@redhat.com>
3640
3641 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3642 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3643 (parse_debug_format_options): Likewise.
3644 (gdbserver_usage): Likewise.
3645 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3646 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3647 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3648 against libiberty.
3649 ($(LIBGNU)): Depend on libiberty.
3650 (all-lib): Recurse into all subdirs.
3651 (install-only): Invoke "install" target in subdirs.
3652 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3653 targets.
3654 * configure: Rebuild.
3655 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3656 for vasprintf, vsnprintf, or gettimeofday.
3657 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3658 srv_tgtobj.
3659
3660 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3661
3662 * development.sh: Delete.
3663 * Makefile.in (config.status): Adjust dependency on development.sh.
3664 * configure.ac: Adjust development.sh source call.
3665 * configure: Regenerate.
3666
3667 2014-06-02 Pedro Alves <palves@redhat.com>
3668
3669 * ax.c (gdb_free_agent_expr): New function.
3670 * ax.h (gdb_free_agent_expr): New declaration.
3671 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3672 list.
3673 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3674 static.
3675 (clear_breakpoint_conditions_and_commands): New function.
3676 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3677 (clear_breakpoint_conditions_and_commands): New declaration.
3678
3679 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3680
3681 * linux-aarch64-low.c (asm/ptrace.h): Include.
3682
3683 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3684
3685 Fix TLS access for -static -pthread.
3686 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3687 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3688 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3689
3690 2014-05-20 Pedro Alves <palves@redhat.com>
3691
3692 * linux-aarch64-low.c (aarch64_insert_point)
3693 (aarch64_remove_point): No longer check whether the type is
3694 supported here. Adjust to new interface.
3695 (the_low_target): Install aarch64_supports_z_point_type as
3696 supports_z_point_type method.
3697 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3698 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3699 instead of a Z packet char. Adjust.
3700 (arm_supports_z_point_type): New function.
3701 (arm_insert_point, arm_remove_point): Adjust to new interface.
3702 (the_low_target): Install arm_supports_z_point_type.
3703 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3704 (cris_insert_point, cris_remove_point): Adjust to new interface.
3705 Don't check whether the type is supported here.
3706 (the_low_target): Install cris_supports_z_point_type.
3707 * linux-low.c (linux_supports_z_point_type): New function.
3708 (linux_insert_point, linux_remove_point): Adjust to new interface.
3709 * linux-low.h (struct linux_target_ops) <insert_point,
3710 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3711 raw_breakpoint pointer parameter.
3712 <supports_z_point_type>: New method.
3713 * linux-mips-low.c (mips_supports_z_point_type): New function.
3714 (mips_insert_point, mips_remove_point): Adjust to new interface.
3715 Use mips_supports_z_point_type.
3716 (the_low_target): Install mips_supports_z_point_type.
3717 * linux-ppc-low.c (the_low_target): Install NULL as
3718 supports_z_point_type method.
3719 * linux-s390-low.c (the_low_target): Install NULL as
3720 supports_z_point_type method.
3721 * linux-sparc-low.c (the_low_target): Install NULL as
3722 supports_z_point_type method.
3723 * linux-x86-low.c (x86_supports_z_point_type): New function.
3724 (x86_insert_point): Adjust to new insert_point interface. Use
3725 insert_memory_breakpoint. Adjust to new
3726 i386_low_insert_watchpoint interface.
3727 (x86_remove_point): Adjust to remove_point interface. Use
3728 remove_memory_breakpoint. Adjust to new
3729 i386_low_remove_watchpoint interface.
3730 (the_low_target): Install x86_supports_z_point_type.
3731 * lynx-low.c (lynx_target_ops): Install NULL as
3732 supports_z_point_type callback.
3733 * nto-low.c (nto_supports_z_point_type): New.
3734 (nto_insert_point, nto_remove_point): Adjust to new interface.
3735 (nto_target_ops): Install nto_supports_z_point_type.
3736 * mem-break.c: Adjust intro comment.
3737 (struct raw_breakpoint) <raw_type, size>: New fields.
3738 <inserted>: Update comment.
3739 <shlib_disabled>: Delete field.
3740 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3741 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3742 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3743 (raw_bkpt_type_to_target_hw_bp_type): New function.
3744 (find_enabled_raw_code_breakpoint_at): New function.
3745 (find_raw_breakpoint_at): New type and size parameters. Use them.
3746 (insert_memory_breakpoint): New function, based off
3747 set_raw_breakpoint_at.
3748 (remove_memory_breakpoint): New function.
3749 (set_raw_breakpoint_at): Reimplement.
3750 (set_breakpoint): New, based on set_breakpoint_at.
3751 (set_breakpoint_at): Reimplement.
3752 (delete_raw_breakpoint): Go through the_target->remove_point
3753 instead of assuming memory breakpoints.
3754 (find_gdb_breakpoint_at): Delete.
3755 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3756 (find_gdb_breakpoint): New function.
3757 (set_gdb_breakpoint_at): Delete.
3758 (z_type_supported): New function.
3759 (set_gdb_breakpoint_1): New function, loosely based off
3760 set_gdb_breakpoint_at.
3761 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3762 (delete_gdb_breakpoint_at): Delete.
3763 (delete_gdb_breakpoint_1): New function, loosely based off
3764 delete_gdb_breakpoint_at.
3765 (delete_gdb_breakpoint): New function.
3766 (clear_gdb_breakpoint_conditions): Rename to ...
3767 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3768 breakpoint.
3769 (add_condition_to_breakpoint): Make static.
3770 (add_breakpoint_condition): Take a struct breakpoint pointer
3771 instead of an address. Adjust.
3772 (gdb_condition_true_at_breakpoint): Rename to ...
3773 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3774 z_type parameter.
3775 (gdb_condition_true_at_breakpoint): Reimplement.
3776 (add_breakpoint_commands): Take a struct breakpoint pointer
3777 instead of an address. Adjust.
3778 (gdb_no_commands_at_breakpoint): Rename to ...
3779 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3780 parameter. Return true if no breakpoint was found. Change debug
3781 output.
3782 (gdb_no_commands_at_breakpoint): Reimplement.
3783 (run_breakpoint_commands): Rename to ...
3784 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3785 and change return type to boolean.
3786 (run_breakpoint_commands): New function.
3787 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3788 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3789 breakpoint. Go through the_target->remove_point instead of
3790 assuming memory breakpoint.
3791 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3792 software and hardware breakpoints.
3793 (reinsert_raw_breakpoint): Go through the_target->insert_point
3794 instead of assuming memory breakpoint.
3795 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3796 software and hardware breakpoints.
3797 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3798 Check both software and hardware breakpoints.
3799 (validate_inserted_breakpoint): Assert the breakpoint is a
3800 software breakpoint. Set the inserted flag to -1 instead of
3801 setting shlib_disabled.
3802 (delete_disabled_breakpoints): Adjust.
3803 (validate_breakpoints): Only validate software breakpoints.
3804 Adjust to inserted flag change.
3805 (check_mem_read, check_mem_write): Skip breakpoint types other
3806 than software breakpoints. Adjust to inserted flag change.
3807 * mem-break.h (enum raw_bkpt_type): New enum.
3808 (raw_breakpoint, struct process_info): Forward declare.
3809 (Z_packet_to_target_hw_bp_type): Delete declaration.
3810 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3811 (set_gdb_breakpoint, delete_gdb_breakpoint)
3812 (clear_breakpoint_conditions): New declarations.
3813 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3814 (breakpoint_inserted_here): Update comment.
3815 (add_breakpoint_condition, add_breakpoint_commands): Replace
3816 address parameter with a breakpoint pointer parameter.
3817 (gdb_breakpoint_here): Update comment.
3818 (delete_gdb_breakpoint_at): Delete.
3819 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3820 * server.c (process_point_options): Take a struct breakpoint
3821 pointer instead of an address. Adjust.
3822 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3823 delete_gdb_breakpoint.
3824 * spu-low.c (spu_target_ops): Install NULL as
3825 supports_z_point_type method.
3826 * target.h: Include mem-break.h.
3827 (struct target_ops) <prepare_to_access_memory>: Update comment.
3828 <supports_z_point_type>: New field.
3829 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3830 instead of a char. Also take a raw breakpoint pointer.
3831 * win32-arm-low.c (the_low_target): Install NULL as
3832 supports_z_point_type.
3833 * win32-i386-low.c (i386_supports_z_point_type): New function.
3834 (i386_insert_point, i386_remove_point): Adjust to new interface.
3835 (the_low_target): Install i386_supports_z_point_type.
3836 * win32-low.c (win32_supports_z_point_type): New function.
3837 (win32_insert_point, win32_remove_point): Adjust to new interface.
3838 (win32_target_ops): Install win32_supports_z_point_type.
3839 * win32-low.h (struct win32_target_ops):
3840 <supports_z_point_type>: New method.
3841 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3842 instead of a char. Also take a raw breakpoint pointer.
3843
3844 2014-05-20 Pedro Alves <palves@redhat.com>
3845
3846 * mem-break.h: Include break-common.h.
3847 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3848 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3849 (Z_packet_to_target_hw_bp_type): New declaration.
3850 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3851 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3852 (Z_PACKET_ACCESS_WP): Delete macros.
3853 (Z_packet_to_hw_type): Delete function.
3854 * i386-low.h: Don't include break-common.h here.
3855 (Z_packet_to_hw_type): Delete declaration.
3856 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3857 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3858 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3859 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3860 * linux-aarch64-low.c: Don't include break-common.h here.
3861 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3862 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3863 (Z_packet_to_target_hw_bp_type): Delete function.
3864 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3865 function.
3866 (mips_insert_point, mips_remove_point): Use
3867 Z_packet_to_target_hw_bp_type.
3868
3869 2014-05-20 Pedro Alves <palves@redhat.com>
3870
3871 * linux-aarch64-low.c: Include break-common.h.
3872 (enum target_point_type): Delete.
3873 (Z_packet_to_point_type): Rename to ...
3874 (Z_packet_to_target_hw_bp_type): ... this, and return a
3875 target_hw_bp_type instead.
3876 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3877 instead of an enum target_point_type.
3878 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3879 breakpoint type.
3880 (aarch64_dr_state_insert_one_point)
3881 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3882 (aarch64_handle_aligned_watchpoint)
3883 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3884 Take an enum target_hw_bp_type instead of an enum
3885 target_point_type.
3886 (aarch64_supports_z_point_type): New function.
3887 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3888 use Z_packet_to_target_hw_bp_type.
3889
3890 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3891
3892 * configure.ac: Only use -Werror by default when DEVELOPMENT
3893 is true.
3894 * configure: Regenerate.
3895
3896 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3897
3898 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3899 * linux-x86-low.c (X86_64_USER_REGS): New.
3900 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3901
3902 2014-04-28 Yao Qi <yao@codesourcery.com>
3903
3904 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3905 name.
3906
3907 2014-04-25 Pedro Alves <palves@redhat.com>
3908
3909 PR server/16255
3910 * linux-low.c (linux_attach_fail_reason_string): New function.
3911 (linux_attach_lwp): Delete.
3912 (linux_attach_lwp_1): Rename to ...
3913 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3914 argument. Remove "initial" parameter. Return int instead of
3915 void. Don't error or warn here.
3916 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3917 failure to attach to the tgid. Call warning when failing to
3918 attach to an lwp.
3919 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3920 argument. Remove "initial" parameter. Return int instead of
3921 void. Don't error or warn here.
3922 (linux_attach_fail_reason_string): New declaration.
3923 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3924 interface change. Use linux_attach_fail_reason_string.
3925
3926 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3927 Walfred Tedeschi <walfred.tedeschi@intel.com>
3928
3929 * Makefile.in: Added rules to handle new files
3930 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3931 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3932 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3933 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3934 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3935 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3936 x32-avx512-linux.o.
3937 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3938 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3939 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3940 i386/x32-avx512.xml.
3941 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3942 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3943 i386/x32-avx512-linux.xml.
3944 * i387-fp.c (num_avx512_k_registers): New constant for number
3945 of K registers.
3946 (num_avx512_zmmh_low_registers): New constant for number of
3947 lower ZMM registers (0-15).
3948 (num_avx512_zmmh_high_registers): New constant for number of
3949 higher ZMM registers (16-31).
3950 (num_avx512_ymmh_registers): New contant for number of higher
3951 YMM registers (ymm16-31 added by avx521 on x86_64).
3952 (num_avx512_xmm_registers): New constant for number of higher
3953 XMM registers (xmm16-31 added by AVX512 on x86_64).
3954 (struct i387_xsave): Add space for AVX512 registers.
3955 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3956 Add code to handle AVX512 registers.
3957 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3958 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3959 prototypei from generated file.
3960 (tdesc_amd64_avx512_linux): Likewise.
3961 (init_registers_x32_avx512_linux): Likewise.
3962 (tdesc_x32_avx512_linux): Likewise.
3963 (init_registers_i386_avx512_linux): Likewise.
3964 (tdesc_i386_avx512_linux): Likewise.
3965 (x86_64_regmap): Add AVX512 registers.
3966 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3967 mask.
3968 (initialize_low_arch): Add code to initialize AVX512 registers.
3969
3970 2014-04-23 Pedro Alves <palves@redhat.com>
3971
3972 * mem-break.c (find_gdb_breakpoint_at): Make static.
3973 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3974
3975 2014-04-23 Pedro Alves <palves@redhat.com>
3976
3977 * i386-low.c: Don't include break-common.h here.
3978 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3979 prototype to take target_hw_bp_type as argument instead of a Z
3980 packet char.
3981 * i386-low.h: Include break-common.h here.
3982 (Z_packet_to_hw_type): Declare.
3983 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3984 prototypes.
3985 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3986 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3987 (x86_remove_point): Convert the packet number to a
3988 target_hw_bp_type before calling i386_low_remove_watchpoint.
3989 * win32-i386-low.c (i386_insert_point): Convert the packet number
3990 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3991 (i386_remove_point): Convert the packet number to a
3992 target_hw_bp_type before calling i386_low_remove_watchpoint.
3993
3994 2014-04-23 Pedro Alves <palves@redhat.com>
3995
3996 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3997
3998 2014-04-10 Pedro Alves <palves@redhat.com>
3999
4000 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4001 Check if the condition or command is NULL before checking if the
4002 breakpoint is known. On success, return true.
4003 * mem-break.h (add_breakpoint_condition): Document return.
4004 (add_breakpoint_commands): Add describing comment.
4005 * server.c (skip_to_semicolon): New function.
4006 (process_point_options): Use it.
4007
4008 2014-04-09 Pedro Alves <palves@redhat.com>
4009
4010 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4011 to lwpid_of.
4012
4013 2014-02-27 Pedro Alves <palves@redhat.com>
4014
4015 PR 12702
4016 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4017 macros.
4018 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4019 output.
4020 (last_thread_of_process_p): Take a PID argument instead of a
4021 thread pointer.
4022 (linux_wait_for_lwp): Delete.
4023 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4024 functions.
4025 (linux_low_filter_event): New function, party factored out from
4026 linux_wait_for_event.
4027 (linux_wait_for_event): Rename to ...
4028 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4029 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4030 sigsuspend. Check for zombie leaders.
4031 (linux_wait_for_event): Reimplement as wrapper around
4032 linux_wait_for_event_filtered.
4033 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4034 a normal or signal exit is seen, it's the whole process exiting.
4035 (wait_for_sigstop): No longer a for_each_inferior callback.
4036 Rewrite on top of linux_wait_for_event_filtered.
4037 (stop_all_lwps): Call wait_for_sigstop directly.
4038 * server.c (resume, handle_target_event): Handle
4039 TARGET_WAITKIND_NO_RESUMED.
4040
4041 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4042
4043 * win32-low.c (psapi_get_dll_name,
4044 * win32_CreateToolhelp32Snapshot): Delete.
4045 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4046 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4047 Delete.
4048 (handle_load_dll): Add function description.
4049 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4050
4051 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4052
4053 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4054 Add comment.
4055 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4056 base address when calling win32_add_one_solib.
4057 (handle_load_dll): Delete local variable load_addr.
4058 Remove 0x1000 offset applied to DLL base address when calling
4059 win32_add_one_solib.
4060 (handle_unload_dll): Add comment.
4061
4062 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4063
4064 * win32-low.c (win32_add_all_dlls): Renames
4065 win32_ensure_ntdll_loaded. Rewrite function documentation.
4066 Adjust implementation to always load all DLLs.
4067 Add 0x1000 offset to DLL base address when calling
4068 win32_add_one_solib.
4069 (child_initialization_done): New static global.
4070 (do_initial_child_stuff): Set child_initialization_done to
4071 zero during child initialization, and 1 after. Replace call
4072 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4073 Add comment.
4074 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4075 (handle_unload_dll): Add function documentation.
4076 (get_child_debug_event): Ignore load and unload DLL events
4077 during child initialization.
4078
4079 2014-02-20 Doug Evans <dje@google.com>
4080
4081 Remove global all_lwps.
4082 * inferiors.h (ptid_of): Move here from linux-low.h.
4083 (pid_of, lwpid_of): Ditto.
4084 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4085 parameter is a struct thread_info * now.
4086 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4087 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4088 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4089 directly.
4090 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4091 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4092 * linux-arm-low.c (update_registers_callback): Update, "entry"
4093 parameter is a struct thread_info * now.
4094 Fetch lwpid from current_inferior directly.
4095 (arm_insert_point): Pass &all_threads to find_inferior instead of
4096 &all_lwps.
4097 (arm_remove_point): Ditto.
4098 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4099 (arm_prepare_to_resume): Fetch pid from thread.
4100 (arm_read_description): Fetch lwpid from current_inferior directly.
4101 * linux-low.c (all_lwps): Delete.
4102 (delete_lwp): Delete call to remove_inferior.
4103 (handle_extended_wait): Fetch lwpid from thread.
4104 (add_lwp): Don't set lwp->entry.id. Remove call to
4105 add_inferior_to_list.
4106 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4107 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4108 (kill_one_lwp_callback): Ditto.
4109 (linux_kill): Don't dereference NULL pointer.
4110 Fetch ptid,lwpid from thread.
4111 (get_detach_signal): Fetch ptid from thread.
4112 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4113 Simplify call to regcache_invalidate_thread.
4114 (delete_lwp_callback): Update, "entry" parameter is a
4115 struct thread_info * now. Fetch pid from thread.
4116 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4117 (status_pending_p_callback): Update, "entry" parameter is a
4118 struct thread_info * now. Fetch ptid from thread.
4119 (find_lwp_pid): Update, "entry" parameter is a
4120 struct thread_info * now.
4121 (linux_wait_for_lwp): Fetch pid from thread.
4122 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4123 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4124 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4125 (dequeue_one_deferred_signal): Ditto.
4126 (cancel_breakpoint): Fetch ptid from current_inferior.
4127 (linux_wait_for_event): Pass &all_threads to find_inferior,
4128 not &all_lwps. Fetch ptid, lwpid from thread.
4129 (count_events_callback): Update, "entry" parameter is a
4130 struct thread_info * now.
4131 (select_singlestep_lwp_callback): Ditto.
4132 (select_event_lwp_callback): Ditto.
4133 (cancel_breakpoints_callback): Ditto.
4134 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4135 not &all_lwps.
4136 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4137 (unsuspend_one_lwp): Update, "entry" parameter is a
4138 struct thread_info * now.
4139 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4140 not &all_lwps.
4141 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4142 Fetch lwpid from thread, not lwp.
4143 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4144 Pass &all_threads to find_inferior, not &all_lwps.
4145 (send_sigstop): Fetch lwpid from thread, not lwp.
4146 (send_sigstop_callback): Update, "entry" parameter is a
4147 struct thread_info * now.
4148 (suspend_and_send_sigstop_callback): Ditto.
4149 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4150 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4151 struct thread_info * now.
4152 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4153 from thread, lwp.
4154 (lwp_running): Update, "entry" parameter is a
4155 struct thread_info * now.
4156 (stop_all_lwps): Fetch ptid from thread.
4157 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4158 (linux_resume_one_lwp): Fetch lwpid from thread.
4159 (linux_set_resume_request): Update, "entry" parameter is a
4160 struct thread_info * now. Fetch pid, lwpid from thread.
4161 (resume_status_pending_p): Update, "entry" parameter is a
4162 struct thread_info * now.
4163 (need_step_over_p): Ditto. Fetch lwpid from thread.
4164 (start_step_over): Fetch lwpid from thread.
4165 (linux_resume_one_thread): Update, "entry" parameter is a
4166 struct thread_info * now. Fetch lwpid from thread.
4167 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4168 (proceed_one_lwp): Update, "entry" parameter is a
4169 struct thread_info * now. Fetch lwpid from thread.
4170 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4171 struct thread_info * now.
4172 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4173 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4174 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4175 directly.
4176 (regsets_store_inferior_registers): Ditto.
4177 (fetch_register, store_register): Ditto.
4178 (linux_read_memory, linux_write_memory): Ditto.
4179 (linux_request_interrupt): Ditto.
4180 (linux_read_auxv): Ditto.
4181 (linux_xfer_siginfo): Ditto.
4182 (linux_qxfer_spu): Ditto.
4183 (linux_qxfer_libraries_svr4): Ditto.
4184 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4185 moved to inferiors.h.
4186 (get_lwp): Delete.
4187 (get_thread_lwp): Update.
4188 (struct lwp_info): Delete member "entry". Simplify comment for
4189 member "thread".
4190 (all_lwps): Delete.
4191 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4192 current_inferior directly.
4193 (update_watch_registers_callback): Update, "entry" parameter is a
4194 struct thread_info * now. Fetch pid from thread.
4195 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4196 (mips_insert_point): Fetch lwpid from current_inferior.
4197 Pass &all_threads to find_inferior, not &all_lwps.
4198 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4199 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4200 directly.
4201 (mips_stopped_data_address): Ditto.
4202 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4203 directly.
4204 * linux-tile-low.c (tile_arch_setup): Ditto.
4205 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4206 (update_debug_registers_callback): Update, "entry" parameter is a
4207 struct thread_info * now. Fetch pid from thread.
4208 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4209 Pass &all_threads to find_inferior, not &all_lwps.
4210 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4211 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4212 Pass &all_threads to find_inferior, not &all_lwps.
4213 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4214 (i386_dr_low_get_status): Ditto.
4215 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4216 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4217 (x86_linux_read_description): Ditto.
4218 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4219
4220 2014-02-20 Doug Evans <dje@google.com>
4221
4222 * inferiors.c (get_first_inferior): Fix buglet.
4223
4224 2014-02-19 Doug Evans <dje@google.com>
4225
4226 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4227 * inferiors.c (add_thread): Change result type to struct thread_info *.
4228 All callers updated.
4229 (add_lwp): Call add_thread here instead of in callers.
4230 All callers updated.
4231 * linux-low.h (get_lwp_thread): Rewrite.
4232 (struct lwp_info): New member "thread".
4233
4234 2014-02-19 Doug Evans <dje@google.com>
4235
4236 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4237 All callers updated.
4238
4239 2014-02-19 Doug Evans <dje@google.com>
4240
4241 * inferiors.c (add_thread): Fix whitespace.
4242
4243 2014-02-19 Doug Evans <dje@google.com>
4244
4245 * dll.c (clear_dlls): Replace accessing list implemention details
4246 with API function.
4247 * gdbthread.h (get_first_thread): Declare.
4248 * inferiors.c (for_each_inferior_with_data): New function.
4249 (get_first_thread): New function.
4250 (find_thread_ptid): Simplify.
4251 (get_first_inferior): New function.
4252 (clear_list): Delete.
4253 (one_inferior_p): New function.
4254 (clear_inferior_list): New function.
4255 (clear_inferiors): Update.
4256 * inferiors.h (for_each_inferior_with_data): Declare.
4257 (clear_inferior_list): Declare.
4258 (one_inferior_p): Declare.
4259 (get_first_inferior): Declare.
4260 * linux-low.c (linux_wait_for_event): Replace accessing list
4261 implemention details with API function.
4262 * server.c (target_running): Ditto.
4263 (accumulate_file_name_length): New function.
4264 (emit_dll_description): New function.
4265 (handle_qxfer_libraries): Replace accessing list implemention
4266 details with API function.
4267 (handle_qxfer_threads_worker): New function.
4268 (handle_qxfer_threads_proper): Replace accessing list implemention
4269 details with API function.
4270 (handle_query): Ditto.
4271 (visit_actioned_threads_callback_ftype): New typedef.
4272 (visit_actioned_threads_data): New struct.
4273 (visit_actioned_threads): Rewrite to be find_inferior callback.
4274 (resume): Call find_inferior.
4275 (handle_status): Replace accessing list implemention
4276 details with API function.
4277 (process_serial_event): Replace accessing list implemention details
4278 with API function.
4279 * target.c (set_desired_inferior): Replace accessing list implemention
4280 details with API function.
4281 * tracepoint.c (same_process_p): New function.
4282 (gdb_agent_about_to_close): Replace accessing list implemention
4283 details with API function.
4284 * win32-low.c (child_delete_thread): Replace accessing list
4285 implemention details with API function.
4286 (match_dll_by_basename): New function.
4287 (dll_is_loaded_by_basename): New function.
4288 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4289 details call to dll_is_loaded_by_basename.
4290
4291 2014-02-19 Doug Evans <dje@google.com>
4292
4293 * dll.h (struct dll_info): Add comment.
4294 * gdbthread.h (struct thread_info): Add comment.
4295 (current_ptid): Simplify.
4296 * inferiors.c (add_process): Update.
4297 (remove_process): Update.
4298 * inferiors.h (struct process_info): Rename member "head" to "entry".
4299 * linux-low.c (delete_lwp): Update.
4300 (add_lwp): Update.
4301 (last_thread_of_process_p): Update.
4302 (kill_one_lwp_callback, linux_kill): Update.
4303 (status_pending_p_callback): Update.
4304 (wait_for_sigstop): Update. Simplify read of ptid.
4305 (start_step_over): Update.
4306 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4307 (get_lwp_thread): Update.
4308 (struct lwp_info): Rename member "head" to "entry".
4309 * regcache.h (inferior_list_entry): Delete.
4310 * server.c (kill_inferior_callback): Update.
4311 (detach_or_kill_inferior_callback): Update.
4312 (print_started_pid): Update.
4313 (print_attached_pid): Update.
4314 (process_serial_event): Simplify read of ptid.
4315 * thread-db.c (thread_db_create_event): Update.
4316 (thread_db_get_tls_address): Update.
4317 * win32-low.c (current_inferior_ptid): Simplify.
4318
4319 2014-02-19 Tom Tromey <tromey@redhat.com>
4320
4321 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4322 argument.
4323 (target_supports_btrace): Update.
4324
4325 2014-02-14 Yao Qi <yao@codesourcery.com>
4326
4327 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4328 (rsp-low-ipa.o): New target.
4329
4330 2014-02-12 Tom Tromey <tromey@redhat.com>
4331
4332 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4333 convert_ascii_to_int.
4334 * regcache.c (registers_to_string): Likewise.
4335 * remote-utils.c (decode_M_packet): Likewise.
4336 * server.c (process_serial_event): Likewise.
4337
4338 2014-02-12 Tom Tromey <tromey@redhat.com>
4339
4340 * server.c (handle_query, handle_v_run): Use hex2bin, not
4341 unhexify.
4342 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4343
4344 2014-02-12 Tom Tromey <tromey@redhat.com>
4345
4346 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4347 convert_int_to_ascii.
4348 * regcache.c (registers_to_string, collect_register_as_string):
4349 Likewise.
4350 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4351 Likewise.
4352 * server.c (process_serial_event): Likewise.
4353 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4354 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4355
4356 2014-02-12 Tom Tromey <tromey@redhat.com>
4357
4358 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4359 bin2hex, not hexify.
4360 * tracepoint.c (cmd_qtstatus): Likewise.
4361
4362 2014-02-12 Tom Tromey <tromey@redhat.com>
4363
4364 * remote-utils.c (monitor_output): Pass explicit length to
4365 hexify.
4366
4367 2014-02-12 Tom Tromey <tromey@redhat.com>
4368
4369 * tracepoint.c: Include rsp-low.h.
4370 * server.c: Include rsp-low.h.
4371 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4372 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4373 declare.
4374 * remote-utils.c: Include rsp-low.h.
4375 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4376 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4377 (convert_int_to_ascii, convert_ascii_to_int): Move to
4378 common/rsp-low.c.
4379 * regcache.c: Include rsp-low.h.
4380 * ax.c: Include rsp-low.h.
4381 * Makefile.in (SFILES): Add common/rsp-low.c.
4382 (OBS): Add rsp-low.o.
4383 (rsp-low.o): New target.
4384
4385 2014-02-12 Tom Tromey <tromey@redhat.com>
4386
4387 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4388 Include print-utils.h.
4389 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4390 (plongest, thirty_two, phex_nz): Remove.
4391 * Makefile.in (SFILES): Add common/print-utils.c.
4392 (OBS): Add print-utils.o.
4393 (print-utils-ipa.o): New target.
4394 (print-utils.o): New target.
4395 (IPA_OBJS): Add print-utils-ipa.o.
4396
4397 2014-02-06 Tom Tromey <tromey@redhat.com>
4398
4399 * Makefile.in (SFILES): Fix indentation.
4400
4401 2014-02-05 Doug Evans <dje@google.com>
4402
4403 * linux-low.c (linux_wait_for_event): Improve comment.
4404 (linux_wait_1): Keep current_inferior in sync with event_child.
4405
4406 2014-01-22 Doug Evans <dje@google.com>
4407
4408 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4409
4410 2014-01-22 Doug Evans <dje@google.com>
4411
4412 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4413 * configure: Regenerate.
4414 * config.in: Regenerate.
4415 * Makefile.in (SFILES): Add debug.c.
4416 (OBS): Add debug.o.
4417 * debug.c: New file.
4418 * debug.h: New file.
4419 * linux-aarch64-low.c (*): Update all debugging printfs to use
4420 debug_printf instead of fprintf.
4421 * linux-arm-low.c (*): Ditto.
4422 * linux-cris-low.c (*): Ditto.
4423 * linux-crisv32-low.c (*): Ditto.
4424 * linux-m32r-low.c (*): Ditto.
4425 * linux-sparc-low.c (*): Ditto.
4426 * linux-x86.c (*): Ditto.
4427 * linux-low.c (*): Ditto.
4428 (linux_wait_1): Add calls to debug_enter, debug_exit.
4429 (linux_wait): Remove redundant debugging printf.
4430 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4431 (linux_resume, unstop_all_lwps): Ditto.
4432 * mem-break.c (*): Update all debugging printfs to use
4433 debug_printf instead of fprintf.
4434 * remote-utils.c (*): Ditto.
4435 * thread-db.c (*): Ditto.
4436 * server.c #include <ctype.h>, "gdb_vecs.h".
4437 (debug_threads): Moved to debug.c.
4438 (*): Update all debugging printfs to use debug_printf instead of
4439 fprintf.
4440 (start_inferior): Replace call to fflush with call to debug_flush.
4441 (monitor_show_help): Mention set debug-format.
4442 (parse_debug_format_options): New function.
4443 (handle_monitor_command): Handle "monitor set debug-format".
4444 (gdbserver_usage): Mention --debug-format.
4445 (main): Parse --debug-format.
4446 * server.h (debug_threads): Declaration moved to debug.h.
4447 #include "debug.h".
4448 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4449 trace_debug_1 that uses debug_printf.
4450 (tracepoint_look_up_symbols): Update all debugging printfs to use
4451 debug_printf instead of fprintf.
4452
4453 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4454
4455 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4456 sys/ptrace.h.
4457
4458 2014-01-17 Pedro Alves <palves@redhat.com>
4459
4460 PR build/16445
4461 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4462 defined after including gdb_proc_service.h.
4463
4464 2014-01-16 Doug Evans <dje@google.com>
4465
4466 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4467 (match_dll): Use it.
4468
4469 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4470
4471 * target.h (target_ops) <read_btrace>: Change parameters and
4472 return type to allow error reporting.
4473 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4474 trace reading errors on.
4475 * linux-low.c (linux_low_read_btrace): Pass trace reading
4476 errors on.
4477 (linux_low_disable_btrace): New.
4478
4479 2014-01-15 Doug Evans <dje@google.com>
4480
4481 * inferiors.c (thread_id_to_gdb_id): Delete.
4482 * inferiors.h (thread_id_to_gdb_id): Delete.
4483
4484 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4485
4486 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4487 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4488 versions.
4489
4490 2014-01-08 Pedro Alves <palves@redhat.com>
4491
4492 * server.c (handle_status): Don't discard previous queued stop
4493 replies or thread's pending status here.
4494 (main) <disconnection>: Do it here instead.
4495
4496 2014-01-08 Pedro Alves <palves@redhat.com>
4497
4498 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4499 * server.c (visit_actioned_threads, handle_pending_status): New
4500 function.
4501 (handle_v_cont): Factor out parts to ...
4502 (resume): ... this new function. If in all-stop, and a thread
4503 being resumed has a pending status, report it without actually
4504 resuming.
4505 (myresume): Adjust to use the new 'resume' function.
4506 (clear_pending_status_callback, set_pending_status_callback)
4507 (find_status_pending_thread_callback): New functions.
4508 (handle_status): Handle the case of multiple threads having
4509 interesting statuses to report. Report threads' real last signal
4510 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4511 with an interesting thread to report the status for, instead of
4512 always reporting the status of the first thread.
4513
4514 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4515
4516 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4517 * gdbreplay.c (gdbreplay_version): Likewise.
4518
4519 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4520
4521 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4522 iov.iov_len with the real length in use.
4523
4524 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4525
4526 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4527 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4528 for all targets that use win32-low.c.
4529 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4530 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4531
4532 2013-12-13 Pedro Alves <palves@redhat.com>
4533
4534 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4535 if equal to TARGET_WAITKIND_LOADED.
4536 * win32-low.c (cached_status): New static global.
4537 (win32_wait): Add declaration.
4538 (do_initial_child_stuff): Flush all initial pending debug events
4539 up to the initial breakpoint.
4540 (win32_wait): If CACHED_STATUS was set, return that instead
4541 of doing a real wait. Remove the code resuming the execution
4542 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4543 during the initial phase. Also remove the code changing
4544 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4545 TARGET_WAITKIND_STOPPED.
4546
4547 2013-12-11 Yao Qi <yao@codesourcery.com>
4548
4549 * notif.c (handle_notif_ack): Return 0 if no notification
4550 matches.
4551
4552 2013-11-20 Doug Evans <dje@google.com>
4553
4554 * linux-low.c (linux_set_resume_request): Fix comment.
4555
4556 2013-11-20 Doug Evans <dje@google.com>
4557
4558 * linux-low.c (resume_status_pending_p): Tweak comment.
4559
4560 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4561
4562 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4563 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4564 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4565 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4566 (srv_amd64_regobj): Add amd64-mpx.o.
4567 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4568 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4569 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4570 * i387-fp.c (num_pl_bnd_register) Added constant.
4571 (num_pl_bnd_cfg_registers) Added constant.
4572 (struct i387_xsave) Added reserved area and MPX fields.
4573 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4574 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4575 function.
4576 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4577 (init_registers_amd64_mpx_linux): Declare new function.
4578 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4579 (x86_64_regmap): Add MPX registers.
4580 (x86_linux_read_description): Add MPX case.
4581 (initialize_low_arch): Initialize MPX targets.
4582
4583 2013-11-18 Tom Tromey <tromey@redhat.com>
4584
4585 * configure: Rebuild.
4586 * configure.ac: Don't check for stdlib.h.
4587 * gdbreplay.c: Unconditionally include stdlib.h.
4588
4589 2013-11-18 Tom Tromey <tromey@redhat.com>
4590
4591 * config.in: Rebuild.
4592 * configure: Rebuild.
4593 * configure.ac: Don't use AC_HEADER_DIRENT.
4594
4595 2013-11-18 Tom Tromey <tromey@redhat.com>
4596
4597 * server.h: Don't check HAVE_STRING_H.
4598 * gdbreplay.c: Don't check HAVE_STRING_H.
4599 * configure: Rebuild.
4600
4601 2013-11-18 Tom Tromey <tromey@redhat.com>
4602
4603 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4604 LIBGNU.
4605
4606 2013-11-08 Tom Tromey <tromey@redhat.com>
4607
4608 * configure, config.in: Rebuild.
4609 * configure.ac: Remove unused configury.
4610
4611 2013-11-08 Tom Tromey <tromey@redhat.com>
4612
4613 * acinclude.m4: Include common.m4, codeset.m4.
4614 * configure, config.in: Rebuild.
4615 * configure.ac: Use GDB_AC_COMMON.
4616
4617 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4618
4619 * linux-s390-low.c (HWCAP_S390_TE): New define.
4620 (s390_arch_setup): Consider the TE field in the HWCAP for
4621 determining 'have_regset_tdb'.
4622
4623 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4624
4625 PR gdb/16014
4626 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4627 call to sizeof.
4628
4629 2013-10-02 Pedro Alves <palves@redhat.com>
4630
4631 * server.c (process_serial_event): Don't output "GDBserver
4632 exiting" if GDB is connected through stdio.
4633 * target.c (mywait): Likewise, be silent if GDB is connected
4634 through stdio.
4635
4636 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4637
4638 * lynx-low.c (lynx_add_threads_after_attach): New function.
4639 (lynx_attach): Remove call to add_thread. Add call to
4640 lynx_add_threads_after_attach instead.
4641
4642 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4643
4644 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4645 * config.in, configure: Regenerated.
4646
4647 2013-09-18 Yao Qi <yao@codesourcery.com>
4648
4649 PR server/15959
4650 * server.c (start_inferior): Clear 'resume_info'.
4651
4652 2013-09-16 Jiong Wang <jiwang@tilera.com>
4653
4654 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4655 for each register.
4656
4657 2013-09-16 Jiong Wang <jiwang@tilera.com>
4658
4659 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4660 linux-tile-low.o to srv_tgtobj.
4661
4662 2013-09-16 Will Newton <will.newton@linaro.org>
4663
4664 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4665 out regs.
4666
4667 2013-09-06 Pedro Alves <palves@redhat.com>
4668
4669 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4670 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4671 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4672 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4673 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4674 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4675
4676 2013-09-06 Pedro Alves <palves@redhat.com>
4677
4678 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4679 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4680
4681 2013-09-06 Pedro Alves <palves@redhat.com>
4682
4683 * linux-amd64-ipa.c: Include tracepoint.h.
4684 * linux-i386-ipa.c: Include tracepoint.h.
4685
4686 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4687
4688 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4689 (ps_get_thread_area): New function.
4690
4691 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4692
4693 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4694 (initialize_low_arch): Call init_registers_crisv32 rather than
4695 init_register_crisv32.
4696
4697 2013-09-05 Pedro Alves <palves@redhat.com>
4698
4699 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4700 to ...
4701 * hostio.h: ... this new file.
4702 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4703 win32-low.c: Include hostio.h.
4704
4705 2013-09-05 Pedro Alves <palves@redhat.com>
4706
4707 * server.h (gdb_client_data, handler_func, callback_handler_func)
4708 (delete_file_handler, add_file_handler, append_callback_event)
4709 (delete_callback_event, start_event_loop, initialize_event_loop):
4710 Move to event-loop.h and include it.
4711 * event-loop.h: New file.
4712
4713 2013-09-05 Pedro Alves <palves@redhat.com>
4714
4715 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4716 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4717 (loaded_dll, unloaded_dll): Move to ...
4718 * dll.h: ... this new file.
4719 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4720
4721 2013-09-05 Pedro Alves <palves@redhat.com>
4722
4723 * server.h (current_process, get_thread_process, all_processes)
4724 (add_inferior_to_list, for_each_inferior, current_inferior)
4725 (remove_inferior, add_process, remove_process, find_process_pid)
4726 (have_started_inferiors_p, have_attached_inferiors_p)
4727 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4728 (clear_inferiors, find_inferior, find_inferior_id)
4729 (inferior_target_data, set_inferior_target_data)
4730 (inferior_regcache_data, set_inferior_regcache_data): Move to
4731 inferiors.h, and include it.
4732 * inferiors.h: New file.
4733
4734 2013-09-05 Pedro Alves <palves@redhat.com>
4735
4736 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4737 Move ...
4738 * ax.h: ... here.
4739
4740 2013-09-05 Pedro Alves <palves@redhat.com>
4741
4742 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4743 tracepoint.h.
4744 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4745 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4746 (handle_tracepoint_general_set, handle_tracepoint_query)
4747 (tracepoint_finished_step, tracepoint_was_hit)
4748 (release_while_stepping_state_list, current_traceframe)
4749 (in_readonly_region, traceframe_read_mem)
4750 (fetch_traceframe_registers, traceframe_read_sdata)
4751 (traceframe_read_info, struct fast_tpoint_collect_status)
4752 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4753 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4754 (supply_fast_tracepoint_registers)
4755 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4756 (ipa_tdesc, claim_trampoline_space)
4757 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4758 (agent_mem_read, agent_get_trace_state_variable_value)
4759 (agent_set_trace_state_variable_value, agent_tsv_read)
4760 (agent_mem_read_string, get_raw_reg_func_addr)
4761 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4762 * tracepoint.h: ... this new file.
4763
4764 2013-09-05 Pedro Alves <palves@redhat.com>
4765
4766 * server.h (perror_with_name, error, fatal, warning, paddress)
4767 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4768 include it.
4769 * utils.h: New file.
4770
4771 2013-09-05 Pedro Alves <palves@redhat.com>
4772
4773 * server.h (remote_debug, noack_mode, transport_is_reliable)
4774 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4775 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4776 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4777 (write_enn, initialize_async_io, enable_async_io)
4778 (disable_async_io, check_remote_input_interrupt_request)
4779 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4780 (dead_thread_notify, prepare_resume_reply)
4781 (decode_address_to_semicolon, decode_address, decode_m_packet)
4782 (decode_M_packet, decode_X_packet, decode_xfer_write)
4783 (decode_search_memory_packet, unhexify, hexify)
4784 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4785 (look_up_one_symbol, relocate_instruction)
4786 (monitor_output): Move to remote-utils.h, and include it.
4787 * remote-utils.h: New file.
4788
4789 2013-09-05 Pedro Alves <palves@redhat.com>
4790
4791 * server.h (_): Delete.
4792
4793 2013-09-02 Pedro Alves <palves@redhat.com>
4794
4795 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4796 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4797 allocated.
4798 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4799
4800 2013-09-02 Pierre Muller <muller@sourceware.org>
4801
4802 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4803 or WriteProcessMemory complete successfully and handle
4804 ERROR_PARTIAL_COPY error.
4805
4806 2013-09-02 Pedro Alves <palves@redhat.com>
4807
4808 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4809 error instead of EIO.
4810
4811 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4812
4813 PR server/15604
4814 * linux-low.c: Include filestuff.h.
4815 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4816 * lynx-low.c: Include filestuff.h.
4817 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4818 * server.c: Include filestuff.h.
4819 (main): Call notice_open_fds.
4820 * spu-low.c: Include filestuff.h.
4821 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4822
4823 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4824
4825 * Makefile.in: Explain why ../target and ../nat are not
4826 listed as include file search paths.
4827 (linux-waitpid.o): New object file rule.
4828 * configure.srv (srv_native_linux_obj): New variable.
4829 Replace all occurrences of linux native object files with
4830 $srv_native_linux_obj.
4831 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4832 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4833 (linux_enable_event_reporting): Remove declaration.
4834 (my_waitpid): Moved to common/linux-waitpid.c.
4835 (linux_wait_for_event): Pass ptid when calling
4836 linux_enable_event_reporting.
4837 (linux_supports_tracefork_flag): Remove.
4838 (linux_enable_event_reporting): Likewise.
4839 (linux_tracefork_grandchild): Remove.
4840 (STACK_SIZE): Moved to common/linux-ptrace.c.
4841 (linux_tracefork_child): Remove.
4842 (linux_test_for_tracefork): Remove.
4843 (linux_look_up_symbols): Call linux_supports_traceclone.
4844 (initialize_low): Remove call to linux_test_for_tracefork.
4845 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4846 common/linux-ptrace.h.
4847 (PTRACE_TYPE_ARG4): Likewise.
4848 Include linux-ptrace.h.
4849
4850 2013-08-21 Pedro Alves <palves@redhat.com>
4851
4852 * config.in: Renegerate.
4853
4854 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4855
4856 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4857 (SFILES): Remove $(srcdir)/common/target-common.c and
4858 add $(srcdir)/target/waitstatus.c.
4859 (OBS): Remove target-common.o and add waitstatus.o.
4860 (server_h): Remove $(srcdir)/../common/target-common.h and
4861 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4862 and $(srcdir)/../target/waitstatus.h.
4863 (target-common.o): Remove.
4864 (waitstatus.o): New target object file.
4865 * target.h: Do not include target-common.h and
4866 include target/resume.h, target/wait.h and
4867 target/waitstatus.h.
4868
4869 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4870
4871 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4872 to PTRACE_TYPE_ARG3.
4873 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4874 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4875 PTRACE_TYPE_ARG4.
4876 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4877 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4878
4879 2013-07-27 Jie Zhang <jie@codesourcery.com>
4880 Daniel Jacobowitz <dan@codesourcery.com>
4881 Yao Qi <yao@codesourcery.com>
4882
4883 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4884 (mips-linux-watch.o): New rule.
4885 (mips_linux_watch_h): New variable.
4886 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4887 srv_tgtobj.
4888 * linux-mips-low.c: Include mips-linux-watch.h.
4889 (struct arch_process_info, struct arch_lwp_info): New.
4890 (update_watch_registers_callback): New function.
4891 (mips_linux_new_process, mips_linux_new_thread) New functions.
4892 (mips_linux_prepare_to_resume, mips_insert_point): New
4893 functions.
4894 (mips_remove_point, mips_stopped_by_watchpoint): New
4895 functions.
4896 (rsp_bp_type_to_target_hw_bp_type): New function.
4897 (mips_stopped_data_address): New function.
4898 (the_low_target): Add watchpoint support functions.
4899
4900 2013-07-27 Yao Qi <yao@codesourcery.com>
4901
4902 * i386-low.c: Include break-common.h.
4903 (enum target_hw_bp_type): Remove.
4904
4905 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4906
4907 * Makefile.in (SFILES): /common/target-common.c.
4908 (OBS): Add target-common.o.
4909 (server_h): Add $(srcdir)/../common/target-common.h.
4910 (target-common.o): New target.
4911 * server.c (queue_stop_reply_callback): Free
4912 status string after use.
4913 * target.c (target_waitstatus_to_string): Remove.
4914 * target.h: Include target-common.h.
4915 (resume_kind): Likewise.
4916 (target_waitkind): Likewise.
4917 (target_waitstatus): Likewise.
4918 (TARGET_WNOHANG): Likewise.
4919
4920 2013-07-04 Yao Qi <yao@codesourcery.com>
4921
4922 * Makefile.in (host_alias): Use @host_noncanonical@.
4923 (target_alias): Use @target_noncanonical@.
4924 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4925 ACX_NONCANONICAL_HOST.
4926 * configure: Regenerated.
4927
4928 Revert:
4929 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4930
4931 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4932 * configure: Rebuild.
4933 * Makefile.in (version_host, version_target): Get from configure.
4934 (version.c): Use $(version_host) and $(version_target).
4935
4936 2013-07-03 Pedro Alves <palves@redhat.com>
4937
4938 * Makefile.in (config.status): Depend on development.sh.
4939 * acinclude.m4: Include libmcheck.m4.
4940 * configure: Regenerate.
4941
4942 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4943
4944 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4945 attribute inside the parentheses.
4946 (winapi_DebugSetProcessKillOnExit): Ditto.
4947 (winapi_DebugBreakProcess): Ditto.
4948 (winapi_GenerateConsoleCtrlEvent): Ditto.
4949
4950 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4951
4952 * notif.h (notif_event): Add a dummy member to avoid compiler
4953 errors.
4954
4955 2013-07-01 Pedro Alves <palves@redhat.com>
4956
4957 * hostio.c (HOSTIO_PATH_MAX): Define.
4958 (require_filename, handle_open, handle_unlink, handle_readlink):
4959 Use it.
4960
4961 2013-07-01 Pedro Alves <palves@redhat.com>
4962
4963 * server.h: Include "pathmax.h".
4964 * linux-low.c: Don't include sys/param.h.
4965 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4966 MAXPATHLEN.
4967 * win32-low.c: Don't include sys/param.h.
4968 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4969
4970 2013-07-01 Pedro Alves <palves@redhat.com>
4971
4972 * event-loop.c: Don't check HAVE_UNISTD_H before including
4973 <unistd.h>.
4974 * gdbreplay.c: Likewise.
4975 * remote-utils.c: Likewise.
4976 * server.c: Likewise.
4977 * configure.ac: Don't check for unistd.h.
4978 * configure: Regenerate.
4979
4980 2013-06-28 Tom Tromey <tromey@redhat.com>
4981
4982 * Makefile.in (version.c): Use version.in, not
4983 common/version.in.
4984
4985 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4986
4987 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4988 * configure: Rebuild.
4989 * Makefile.in (version_host, version_target): Get from configure.
4990 (version.c): Use $(version_host) and $(version_target).
4991
4992 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4993
4994 Fix trace-status to output user name without trailing colon.
4995 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4996
4997 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4998
4999 Fix trace-status to output proper start-time and stop-time.
5000 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5001 output start time and stop time in hex as gdb expects.
5002
5003 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5004
5005 * tracepoint.c (build_traceframe_info_xml): Output trace state
5006 variables present in the trace buffer.
5007
5008 2013-06-24 Tom Tromey <tromey@redhat.com>
5009
5010 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5011 create-version.sh.
5012 (version.o): Remove.
5013 * gdbreplay.c: Include version.h.
5014 (version, host_name): Don't declare.
5015 * server.h: Include version.h.
5016 (version, host_name): Don't declare.
5017
5018 2013-06-12 Pedro Alves <palves@redhat.com>
5019
5020 * linux-x86-low.c (linux_is_elf64): Delete global.
5021 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5022 with local linux_pid_exe_is_elf_64_file use.
5023
5024 2013-06-11 Pedro Alves <palves@redhat.com>
5025
5026 * linux-low.c (regset_disabled, disable_regset): New functions.
5027 (regsets_fetch_inferior_registers)
5028 (regsets_store_inferior_registers): Use them.
5029 (initialize_regsets_info); Don't allocate the disabled_regsets
5030 array here.
5031 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5032 comment.
5033
5034 2013-06-11 Pedro Alves <palves@redhat.com>
5035
5036 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5037 xmalloc.
5038
5039 2013-06-11 Pedro Alves <palves@redhat.com>
5040
5041 * linux-x86-low.c (initialize_low_arch): Call
5042 init_registers_x32_avx_linux.
5043
5044 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5045
5046 Fix compatibility with Android Bionic.
5047 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5048 it is not empty.
5049
5050 2013-06-07 Pedro Alves <palves@redhat.com>
5051
5052 PR server/14823
5053 * Makefile.in (OBS): Add tdesc.o.
5054 (IPA_OBJS): Add tdesc-ipa.o.
5055 (tdesc-ipa.o): New rule.
5056 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5057 interface.
5058 * linux-low.c (new_inferior): Delete.
5059 (disabled_regsets, num_regsets): Delete.
5060 (linux_add_process): Adjust to set the new per-process
5061 new_inferior flag.
5062 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5063 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5064 was a stop. When calling arch_setup, switch the current inferior
5065 to the thread that got an event.
5066 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5067 (regsets_fetch_inferior_registers)
5068 (regsets_store_inferior_registers): New regsets_info parameter.
5069 Adjust to use it.
5070 (linux_register_in_regsets): New regs_info parameter. Adjust to
5071 use it.
5072 (register_addr, fetch_register, store_register): New usrregs_info
5073 parameter. Adjust to use it.
5074 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5075 parameter regs_info. Adjust to use it.
5076 (linux_fetch_registers): Get the current inferior's regs_info, and
5077 adjust to use it.
5078 (linux_store_registers): Ditto.
5079 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5080 (initialize_low): Don't initialize the target_regsets here. Call
5081 initialize_low_arch.
5082 * linux-low.h (target_regsets): Delete declaration.
5083 (struct regsets_info): New.
5084 (struct usrregs_info): New.
5085 (struct regs_info): New.
5086 (struct process_info_private) <new_inferior>: New field.
5087 (struct linux_target_ops): Delete the num_regs, regmap, and
5088 regset_bitmap fields. New field regs_info.
5089 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5090 * i387-fp.c (num_xmm_registers): Delete.
5091 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5092 calls to new interface.
5093 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5094 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5095 Infer the number of xmm registers from the regcache's target
5096 description.
5097 * i387-fp.h (num_xmm_registers): Delete.
5098 * inferiors.c (add_thread): Don't install the thread's regcache
5099 here.
5100 * proc-service.c (gregset_info): Fetch the current inferior's
5101 regs_info. Adjust to use it.
5102 * regcache.c: Include tdesc.h.
5103 (register_bytes, reg_defs, num_registers)
5104 (gdbserver_expedite_regs): Delete.
5105 (get_thread_regcache): If the thread doesn't have a regcache yet,
5106 create one, instead of aborting gdbserver.
5107 (regcache_invalidate_one): Rename to ...
5108 (regcache_invalidate_thread): ... this.
5109 (regcache_invalidate_one): New.
5110 (regcache_invalidate): Only invalidate registers of the current
5111 process.
5112 (init_register_cache): Add target_desc parameter, and use it.
5113 (new_register_cache): Ditto. Assert the target description has a
5114 non zero registers_size.
5115 (regcache_cpy): Add assertions. Adjust.
5116 (realloc_register_cache, set_register_cache): Delete.
5117 (registers_to_string, registers_from_string): Adjust.
5118 (find_register_by_name, find_regno, find_register_by_number)
5119 (register_cache_size): Add target_desc parameter, and use it.
5120 (free_register_cache_thread, free_register_cache_thread_one)
5121 (regcache_release, register_cache_size): New.
5122 (register_size): Add target_desc parameter, and use it.
5123 (register_data, supply_register, supply_register_zeroed)
5124 (supply_regblock, supply_register_by_name, collect_register)
5125 (collect_register_as_string, collect_register_by_name): Adjust.
5126 * regcache.h (struct target_desc): Forward declare.
5127 (struct regcache) <tdesc>: New field.
5128 (init_register_cache, new_register_cache): Add target_desc
5129 parameter.
5130 (regcache_invalidate_thread): Declare.
5131 (regcache_invalidate_one): Delete declaration.
5132 (regcache_release): Declare.
5133 (find_register_by_number, register_cache_size, register_size)
5134 (find_regno): Add target_desc parameter.
5135 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5136 declarations.
5137 * remote-utils.c: Include tdesc.h.
5138 (outreg, prepare_resume_reply): Adjust.
5139 * server.c: Include tdesc.h.
5140 (gdbserver_xmltarget): Delete declaration.
5141 (get_features_xml, process_serial_event): Adjust.
5142 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5143 declare.
5144 (struct process_info) <tdesc>: New field.
5145 (ipa_tdesc): Declare.
5146 * tdesc.c: New file.
5147 * tdesc.h: New file.
5148 * tracepoint.c: Include tdesc.h.
5149 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5150 (get_context_regcache): Adjust to pass ipa_tdesc down.
5151 (do_action_at_tracepoint): Adjust to get the register cache size
5152 from the context regcache's description.
5153 (traceframe_walk_blocks): Adjust to get the register cache size
5154 from the current trace frame's description.
5155 (traceframe_get_pc): Adjust to get current trace frame's
5156 description and pass it down.
5157 (gdb_collect): Adjust to get the register cache size from the
5158 IPA's description.
5159 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5160 (gdbserver_xmltarget): Delete.
5161 (initialize_low_tracepoint): Set the ipa's target description.
5162 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5163 (initialize_low_tracepoint): Set the ipa's target description.
5164 * linux-x86-low.c: Include tdesc.h.
5165 [__x86_64__] (is_64bit_tdesc): New.
5166 (ps_get_thread_area, x86_get_thread_area): Use it.
5167 (i386_cannot_store_register): Rename to ...
5168 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5169 (i386_cannot_fetch_register): Rename to ...
5170 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5171 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5172 to new interface.
5173 (target_regsets): Rename to ...
5174 (x86_regsets): ... this.
5175 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5176 interface.
5177 (x86_siginfo_fixup): Use is_64bit_tdesc.
5178 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5179 (tdesc_x32_avx_linux, tdesc_x32_linux)
5180 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5181 Declare.
5182 (x86_linux_update_xmltarget): Delete.
5183 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5184 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5185 (AMD64_LINUX_USER64_CS): New.
5186 (x86_linux_read_description): New, based on
5187 x86_linux_update_xmltarget.
5188 (same_process_callback): New.
5189 (x86_arch_setup_process_callback): New.
5190 (x86_linux_update_xmltarget): New.
5191 (x86_regsets_info): New.
5192 (amd64_linux_regs_info): New.
5193 (i386_linux_usrregs_info): New.
5194 (i386_linux_regs_info): New.
5195 (x86_linux_regs_info): New.
5196 (x86_arch_setup): Reimplement.
5197 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5198 (x86_emit_ops): Ditto.
5199 (the_low_target): Adjust. Install x86_linux_regs_info,
5200 x86_cannot_fetch_register, and x86_cannot_store_register.
5201 (initialize_low_arch): New.
5202 * linux-ia64-low.c (tdesc_ia64): Declare.
5203 (ia64_fetch_register): Adjust.
5204 (ia64_usrregs_info, regs_info): New globals.
5205 (ia64_regs_info): New function.
5206 (the_low_target): Adjust.
5207 (initialize_low_arch): New function.
5208 * linux-sparc-low.c (tdesc_sparc64): Declare.
5209 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5210 Adjust.
5211 (sparc_arch_setup): New function.
5212 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5213 (the_low_target): Adjust.
5214 (initialize_low_arch): New function.
5215 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5216 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5217 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5218 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5219 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5220 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5221 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5222 (tdesc_powerpc_isa205_vsx64l): Declare.
5223 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5224 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5225 (ppc_set_pc, ppc_get_hwcap): Adjust.
5226 (ppc_usrregs_info): Forward declare.
5227 (!__powerpc64__) ppc_regmap_adjusted: New global.
5228 (ppc_arch_setup): Adjust to the current process'es target
5229 description.
5230 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5231 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5232 (ppc_store_evrregset): Adjust.
5233 (target_regsets): Rename to ...
5234 (ppc_regsets): ... this, and make static.
5235 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5236 (ppc_regs_info): New function.
5237 (the_low_target): Adjust.
5238 (initialize_low_arch): New function.
5239 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5240 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5241 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5242 (tdesc_s390x_linux64v2): Declare.
5243 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5244 (s390_fill_gregset, s390_store_last_break): Adjust.
5245 (target_regsets): Rename to ...
5246 (s390_regsets): ... this, and make static.
5247 (s390_get_pc, s390_set_pc): Adjust.
5248 (s390_get_hwcap): New target_desc parameter, and use it.
5249 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5250 (s390_arch_setup): Adjust to set the current process'es target
5251 description. Don't adjust the regmap.
5252 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5253 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5254 (regs_info_3264): New globals.
5255 (s390_regs_info): New function.
5256 (the_low_target): Adjust.
5257 (initialize_low_arch): New function.
5258 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5259 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5260 [__mips64] (init_registers_mips_linux)
5261 (init_registers_mips_dsp_linux): Delete defines.
5262 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5263 (have_dsp): New global.
5264 (mips_read_description): New, based on mips_arch_setup.
5265 (mips_arch_setup): Reimplement.
5266 (get_usrregs_info): New function.
5267 (mips_cannot_fetch_register, mips_cannot_store_register)
5268 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5269 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5270 (target_regsets): Rename to ...
5271 (mips_regsets): ... this, and make static.
5272 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5273 (dsp_regs_info, regs_info): New globals.
5274 (mips_regs_info): New function.
5275 (the_low_target): Adjust.
5276 (initialize_low_arch): New function.
5277 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5278 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5279 Declare.
5280 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5281 (arm_read_description): New, with bits factored from
5282 arm_arch_setup.
5283 (arm_arch_setup): Reimplement.
5284 (target_regsets): Rename to ...
5285 (arm_regsets): ... this, and make static.
5286 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5287 (arm_regs_info): New function.
5288 (the_low_target): Adjust.
5289 (initialize_low_arch): New function.
5290 * linux-m68k-low.c (tdesc_m68k): Declare.
5291 (target_regsets): Rename to ...
5292 (m68k_regsets): ... this, and make static.
5293 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5294 (m68k_regs_info): New function.
5295 (m68k_arch_setup): New function.
5296 (the_low_target): Adjust.
5297 (initialize_low_arch): New function.
5298 * linux-sh-low.c (tdesc_sharch): Declare.
5299 (target_regsets): Rename to ...
5300 (sh_regsets): ... this, and make static.
5301 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5302 (sh_regs_info, sh_arch_setup): New functions.
5303 (the_low_target): Adjust.
5304 (initialize_low_arch): New function.
5305 * linux-bfin-low.c (tdesc_bfin): Declare.
5306 (bfin_arch_setup): New function.
5307 (bfin_usrregs_info, regs_info): New globals.
5308 (bfin_regs_info): New function.
5309 (the_low_target): Adjust.
5310 (initialize_low_arch): New function.
5311 * linux-cris-low.c (tdesc_cris): Declare.
5312 (cris_arch_setup): New function.
5313 (cris_usrregs_info, regs_info): New globals.
5314 (cris_regs_info): New function.
5315 (the_low_target): Adjust.
5316 (initialize_low_arch): New function.
5317 * linux-cris-low.c (tdesc_crisv32): Declare.
5318 (cris_arch_setup): New function.
5319 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5320 (cris_regs_info): New function.
5321 (the_low_target): Adjust.
5322 (initialize_low_arch): New function.
5323 * linux-m32r-low.c (tdesc_m32r): Declare.
5324 (m32r_arch_setup): New function.
5325 (m32r_usrregs_info, regs_info): New globals.
5326 (m32r_regs_info): Adjust.
5327 (initialize_low_arch): New function.
5328 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5329 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5330 (tic6x_usrregs_info): Forward declare.
5331 (tic6x_read_description): New function, based on ...
5332 (tic6x_arch_setup): ... this. Reimplement.
5333 (target_regsets): Rename to ...
5334 (tic6x_regsets): ... this, and make static.
5335 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5336 (tic6x_regs_info): New function.
5337 (the_low_target): Adjust.
5338 (initialize_low_arch): New function.
5339 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5340 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5341 (target_regsets): Rename to ...
5342 (xtensa_regsets): ... this, and make static.
5343 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5344 globals.
5345 (xtensa_arch_setup, xtensa_regs_info): New functions.
5346 (the_low_target): Adjust.
5347 (initialize_low_arch): New function.
5348 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5349 (nios2_arch_setup): Set the current process'es tdesc.
5350 (target_regsets): Rename to ...
5351 (nios2_regsets): ... this.
5352 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5353 (nios2_regs_info): New function.
5354 (the_low_target): Adjust.
5355 (initialize_low_arch): New function.
5356 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5357 (aarch64_arch_setup): Set the current process'es tdesc.
5358 (target_regsets): Rename to ...
5359 (aarch64_regsets): ... this.
5360 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5361 (aarch64_regs_info): New function.
5362 (the_low_target): Adjust.
5363 (initialize_low_arch): New function.
5364 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5365 globals.
5366 (target_regsets): Rename to ...
5367 (tile_regsets): ... this.
5368 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5369 (tile_regs_info): New function.
5370 (tile_arch_setup): Set the current process'es tdesc.
5371 (the_low_target): Adjust.
5372 (initialize_low_arch): New function.
5373 * spu-low.c (tdesc_spu): Declare.
5374 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5375 * win32-arm-low.c (tdesc_arm): Declare.
5376 (arm_arch_setup): New function.
5377 (the_low_target): Install arm_arch_setup instead of
5378 init_registers_arm.
5379 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5380 (init_windows_x86): Rename to ...
5381 (i386_arch_setup): ... this. Set `win32_tdesc'.
5382 (the_low_target): Adjust.
5383 * win32-low.c (win32_tdesc): New global.
5384 (child_add_thread): Don't create the thread cache here.
5385 (do_initial_child_stuff): Set the new process'es tdesc.
5386 * win32-low.h (struct target_desc): Forward declare.
5387 (win32_tdesc): Declare.
5388 * lynx-i386-low.c (tdesc_i386): Declare global.
5389 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5390 * lynx-low.c (lynx_tdesc): New global.
5391 (lynx_add_process): Set the new process'es tdesc.
5392 * lynx-low.h (struct target_desc): Forward declare.
5393 (lynx_tdesc): Declare global.
5394 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5395 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5396 * nto-low.c (nto_tdesc): New global.
5397 (do_attach): Set the new process'es tdesc.
5398 * nto-low.h (struct target_desc): Forward declare.
5399 (nto_tdesc): Declare.
5400 * nto-x86-low.c (tdesc_i386): Declare.
5401 (nto_x86_arch_setup): Set `nto_tdesc'.
5402
5403 2013-06-04 Gary Benson <gbenson@redhat.com>
5404
5405 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5406 to qSupported response when appropriate.
5407 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5408 with nonzero-length annex.
5409 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5410 arguments supplied in annex.
5411
5412 2013-05-31 Doug Evans <dje@google.com>
5413
5414 PR server/15594
5415 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5416 64 bits in 64-cross-32 environment.
5417
5418 2013-05-28 Pedro Alves <palves@redhat.com>
5419
5420 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5421 (aarch64-without-fpu.c): Delete rule.
5422 * configure.srv (aarch64*-*-linux*): Remove references to
5423 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5424 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5425 declaration.
5426
5427 2013-05-24 Pedro Alves <palves@redhat.com>
5428
5429 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5430 instead of strchr/decode_address. Error if the range isn't split
5431 with a ','. Don't assume there's be a ':' in the action.
5432
5433 2013-05-23 Yao Qi <yao@codesourcery.com>
5434 Pedro Alves <palves@redhat.com>
5435
5436 * linux-low.c (lwp_in_step_range): New function.
5437 (linux_wait_1): If the thread was range stepping and stopped
5438 outside the stepping range, report the stop to GDB. Otherwise,
5439 continue stepping. Add range stepping debug output.
5440 (linux_set_resume_request): Copy the step range from the resume
5441 request to the lwp.
5442 (linux_supports_range_stepping): New.
5443 (linux_target_ops) <supports_range_stepping>: Set to
5444 linux_supports_range_stepping.
5445 * linux-low.h (struct linux_target_ops)
5446 <supports_range_stepping>: New field.
5447 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5448 * linux-x86-low.c (x86_supports_range_stepping): New.
5449 (the_low_target) <supports_range_stepping>: Set to
5450 x86_supports_range_stepping.
5451 * server.c (handle_v_cont): Handle 'r' action.
5452 (handle_v_requests): Append ";r" if the target supports range
5453 stepping.
5454 * target.h (struct thread_resume) <step_range_start,
5455 step_range_end>: New fields.
5456 (struct target_ops) <supports_range_stepping>:
5457 New field.
5458 (target_supports_range_stepping): New macro.
5459
5460 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5461
5462 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5463 confusion in comment.
5464
5465 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5466
5467 * lynx-low.c (struct process_info_private): New type.
5468 (lynx_add_process): New function.
5469 (lynx_create_inferior, lynx_attach): Replace calls to
5470 add_process by calls to lynx_add_process.
5471 (lynx_resume): If PTID is null, then try using
5472 current_process()->private->last_wait_event_ptid.
5473 Add comments.
5474 (lynx_clear_inferiors): Delete. The contents of that function
5475 has been inlined in lynx_mourn;
5476 (lynx_wait_1): Save the ptid in the process's private data.
5477 (lynx_mourn): Free the process' private data. Replace call
5478 to lynx_clear_inferiors by call to clear_inferiors.
5479
5480 2013-05-17 Yao Qi <yao@codesourcery.com>
5481
5482 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5483 the right place.
5484
5485 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5486
5487 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5488 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5489 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5490 PT_TEXT_END_ADDR guards. Update comments.
5491 (linux_target_op) <read_offsets>: Conditionally define to
5492 linux_read_offsets if the target is UCLIBC and if it defines
5493 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5494
5495 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5496 Andrew Jenner <andrew@codesourcery.com>
5497
5498 * Makefile.in (SFILES): Add linux-nios2-low.c.
5499 (clean): Add action to delete nios2-linux.c.
5500 (nios2-linux.c): New rule.
5501 * configure.srv: Add nios2*-*-linux*.
5502 * linux-nios2-low.c: New.
5503
5504 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5505
5506 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5507
5508 2013-04-25 Hui Zhu <hui@codesourcery.com>
5509
5510 PR gdb/15186
5511 * ax.c (ax_printf): Add fflush.
5512
5513 2013-04-22 Tom Tromey <tromey@redhat.com>
5514
5515 * Makefile.in (SFILES): Add filestuff.c.
5516 (OBS): Add filestuff.o.
5517 (filestuff.o): New target.
5518 * config.in, configure: Rebuild.
5519 * configure.ac: Check for fdwalk, pipe2.
5520
5521 2013-04-17 Pedro Alves <palves@redhat.com>
5522
5523 * configure.ac (USE_THREAD_DB): Delete variable.
5524 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5525 Don't AC_SUBST USE_THREAD_DB.
5526 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5527 * config.in, configure: Regenerate.
5528
5529 2013-04-16 Pedro Alves <palves@redhat.com>
5530
5531 * linux-low.h (struct lwp_info) <thread_known>: Move under
5532 the USE_THREAD_DB #ifdef.
5533
5534 2013-04-16 Pedro Alves <palves@redhat.com>
5535
5536 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5537 (linux-low.o): Delete rule.
5538 * linux-low.h: Always include "gdb_thread_db.h" instead of
5539 conditionally including thread_db.h.
5540 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5541 HAVE_THREAD_DB_H.
5542
5543 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5544
5545 * Makefile.in (install-only): Fix make install regression.
5546
5547 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5548
5549 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5550 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5551 installation.
5552 * gdbserver.1: Remove.
5553
5554 2013-03-22 Pedro Alves <palves@redhat.com>
5555
5556 * linux-low.c (handle_extended_wait): Don't call
5557 linux_enable_event_reporting.
5558
5559 2013-03-15 Tony Theodore <tonyt@logyst.com>
5560
5561 PR build/9098:
5562 * Makefile.in (SHELL): Use @SHELL@.
5563
5564 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5565
5566 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5567 compiler warning.
5568
5569 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5570
5571 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5572 Remove extraneous NULL element.
5573
5574 2013-03-13 Yao Qi <yao@codesourcery.com>
5575
5576 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5577 'V' block in trace frame.
5578
5579 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5580
5581 * target.h (struct target_ops): Add btrace ops.
5582 (target_supports_btrace): New macro.
5583 (target_enable_btrace): New macro.
5584 (target_disable_btrace): New macro.
5585 (target_read_btrace): New macro.
5586 * gdbthread.h (struct thread_info): Add btrace field.
5587 * server.c: Include btrace-common.h.
5588 (handle_btrace_general_set): New function.
5589 (handle_btrace_enable): New function.
5590 (handle_btrace_disable): New function.
5591 (handle_general_set): Call handle_btrace_general_set.
5592 (handle_qxfer_btrace): New function.
5593 (struct qxfer qxfer_packets[]): Add btrace entry.
5594 * inferiors.c (remove_thread): Disable btrace.
5595 * linux-low: Include linux-btrace.h.
5596 (linux_low_enable_btrace): New function.
5597 (linux_low_read_btrace): New function.
5598 (linux_target_ops): Add btrace ops.
5599 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5600 Add srv_linux_btrace=yes.
5601 (x86_64-*-linux*): Add linux-btrace.o.
5602 Add srv_linux_btrace=yes.
5603 * configure.ac: Define HAVE_LINUX_BTRACE.
5604 * config.in: Regenerated.
5605 * configure: Regenerated.
5606
5607 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5608
5609 * server.c (handle_qxfer): Preserve error message if -3 is
5610 returned.
5611 (qxfer): Document the -3 return value.
5612
5613 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5614
5615 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5616 (linux_btrace_h): New variable.
5617 (linux-btrace.o): New rule.
5618
5619 2013-03-08 Stan Shebs <stan@codesourcery.com>
5620 Hafiz Abid Qadeer <abidh@codesourcery.com>
5621
5622 * tracepoint.c (trace_buffer_size): New global.
5623 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5624 (init_trace_buffer): Change to one-argument function. Allocate
5625 trace buffer memory.
5626 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5627 handle QTBuffer:size packet.
5628 (cmd_bigqtbuffer_size): New function.
5629 (initialize_tracepoint): Call init_trace_buffer with
5630 DEFAULT_TRACE_BUFFER_SIZE.
5631 * server.c (handle_query): Add QTBuffer:size in the
5632 supported packets.
5633
5634 2013-03-07 Yao Qi <yao@codesourcery.com>
5635
5636 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5637 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5638 of -1.
5639 (cmd_qtsp): Adjust condition. Do post increment.
5640 Set cur_action and cur_step_action back to 0.
5641
5642 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5643
5644 PR server/15236
5645 * linux-low.c (linux_write_memory): Return early success if LEN is
5646 zero.
5647
5648 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5649
5650 * configure.srv: Add x86_64-*-cygwin* as target.
5651
5652 2013-02-28 Tom Tromey <tromey@redhat.com>
5653
5654 * configure.ac: Invoke AC_SYS_LARGEFILE.
5655 * configure, config.in: Rebuild.
5656
5657 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5658
5659 * win32-low.c: Throughout, fix format strings and casts of
5660 printf-like functions to avoid type related warnings on all
5661 platforms.
5662 (get_child_debug_event): Print dwDebugEventCode as hex since
5663 that's how it's usually documented.
5664
5665 2013-02-28 Yao Qi <yao@codesourcery.com>
5666
5667 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5668 pulongest.
5669
5670 2013-02-27 Jiong Wang <jiwang@tilera.com>
5671
5672 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5673 (reg-tilegx32.c): New rule.
5674 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5675 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5676 different register info initializer according to elf class.
5677 (init_registers_tilgx32): New function. The tilegx32 register info
5678 initializer.
5679 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5680 (tile_store_gregset): Likewise.
5681
5682 2013-02-27 Yao Qi <yao@codesourcery.com>
5683
5684 * server.c (process_point_options): Print debug message when
5685 debug_threads is true.
5686
5687 2013-02-26 Yao Qi <yao@codesourcery.com>
5688
5689 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5690
5691 2013-02-19 Pedro Alves <palves@redhat.com>
5692 Kai Tietz <ktietz@redhat.com>
5693
5694 PR gdb/15161
5695
5696 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5697 instead of strtoul to extract address from packet.
5698 (process_serial_event) <'z'>: Likewise.
5699
5700 2013-02-18 Yao Qi <yao@codesourcery.com>
5701
5702 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5703
5704 2013-02-14 Pedro Alves <palves@redhat.com>
5705
5706 Plug memory leak.
5707
5708 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5709 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5710
5711 2013-02-14 Pedro Alves <palves@redhat.com>
5712
5713 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5714
5715 2013-02-14 Pedro Alves <palves@redhat.com>
5716
5717 * tracepoint.c (save_string): Delete.
5718 (add_tracepoint_action): Use savestring instead of save_string.
5719
5720 2013-02-12 Pedro Alves <palves@redhat.com>
5721
5722 * linux-xtensa-low.c: Ditto.
5723 * xtensa-xtregs.c: Ditto.
5724
5725 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5726
5727 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5728 thread_db.
5729
5730 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5731
5732 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5733 aarch64_num_wp_regs and aarch64_num_bp_regs to
5734 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5735
5736 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5737
5738 * linux-aarch64-low.c (ps_get_thread_area): Replace
5739 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5740
5741 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5742 Marcus Shawcroft <marcus.shawcroft@arm.com>
5743 Nigel Stephens <nigel.stephens@arm.com>
5744 Yufeng Zhang <yufeng.zhang@arm.com>
5745
5746 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5747 (aarch64.c, aarch64-without-fpu.c): New targets.
5748 * configure.srv (aarch64*-*-linux*): New.
5749 * linux-aarch64-low.c: New file.
5750
5751 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5752
5753 * linux-low.c (handle_extended_wait, linux_create_inferior)
5754 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5755 (dequeue_one_deferred_signal, linux_resume_one_thread)
5756 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5757 (linux_tracefork_grandchild, linux_test_for_tracefork)
5758 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5759 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5760 where the argument is 0.
5761
5762 2013-01-25 Yao Qi <yao@codesourcery.com>
5763
5764 * event-loop.c: Include "queue.h".
5765 (gdb_event_p): New typedef.
5766 (struct gdb_event) <next_event>: Remove.
5767 (event_queue): Change to QUEUE(gdb_event_p).
5768 (async_queue_event): Remove.
5769 (gdb_event_xfree): New.
5770 (initialize_event_loop): New.
5771 (process_event): Use API from QUEUE.
5772 (wait_for_event): Likewise.
5773 * server.c (main): Call initialize_event_loop.
5774 * server.h (initialize_event_loop): Declare.
5775
5776 2013-01-18 Yao Qi <yao@codesourcery.com>
5777
5778 * ax.h (struct eval_agent_expr_context): New.
5779 (gdb_eval_agent_expr): Update declaration.
5780 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5781 TFRAME. Add new argument CTX.
5782 * server.h (struct eval_agent_expr_context): Declare.
5783 (agent_mem_read, agent_tsv_read): Update declaration.
5784 (agent_mem_read_string): Likewise.
5785 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5786 (add_traceframe_block): Add new argument TPOINT.
5787 Increase TPOINT->traceframe_usage.
5788 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5789 eval_tracepoint_agent_expr.
5790 (condition_true_at_tracepoint): Likewise.
5791 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5792 (agent_mem_read_string, agent_tsv_read): Likewise.
5793
5794 2013-01-16 Yao Qi <yao@codesourcery.com>
5795
5796 * linux-low.c (linux_resume_one_lwp): Don't check
5797 'lwp->bp_reinsert != 0'.
5798
5799 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5800 Pedro Alves <palves@redhat.com>
5801
5802 * lynx-low.c (ptrace_request_to_str): Define a temporary
5803 macro and use it to simplify this function's implementation.
5804
5805 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5806
5807 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5808 sets errno.
5809
5810 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5811
5812 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5813
5814 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5815
5816 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5817
5818 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5819
5820 * lynx-low.c (lynx_resume): Use the resume_info parameter
5821 to determine the ptid for the lynx_ptrace call, unless
5822 it is equal to minus_one_ptid, in which case we use the
5823 ptid of the current_inferior.
5824 (lynx_wait_1): After having received a thread create/exit
5825 event, resume the inferior's execution using the signaling
5826 thread's ptid, rather than the old ptid.
5827
5828 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5829
5830 * lynx-low.c (lynx_resume): Delete variable ret.
5831
5832 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5833
5834 * gdbreplay.c (gdbreplay_version): Update copyright year.
5835 * server.c (gdbserver_version): Likewise.
5836
5837 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5838
5839 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5840 new thread.
5841
5842 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5843
5844 * lynx-low.c (ptrace_request_to_str): Add handling for
5845 PTRACE_GETTRACESIG.
5846
5847 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5848
5849 * lynx-low.c (lynx_attach): Delete variable new_process.
5850
5851 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5852
5853 * lynx-low.c (lynx_create_inferior): Delete variable
5854 new_process.
5855
5856 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5857
5858 * lynx-low.c (ptrace_request_to_str): Do not handle
5859 PTRACE_GETTHREADLIST if this macro does not exist.
5860
5861 2012-12-15 Yao Qi <yao@codesourcery.com>
5862
5863 * Makefile.in (OBS): Add notif.o.
5864 * notif.c, notif.h: New.
5865 * server.c: Include "notif.h".
5866 (struct vstop_notif) <next>: Remove.
5867 <base>: New field.
5868 (queue_stop_reply): Update.
5869 (push_event, send_next_stop_reply): Remove.
5870 (discard_queued_stop_replies): Update.
5871 (notif_stop): New variable.
5872 (handle_v_stopped): Remove.
5873 (handle_v_requests): Don't call handle_v_stopped. Call
5874 handle_ack_notif instead.
5875 (queue_stop_reply_callback): Call notif_event_enque instead
5876 of queue_stop_reply.
5877 (handle_status): Don't call send_next_stop_reply, call
5878 notif_write_event instead.
5879 (kill_inferior_callback): Likewise.
5880 (detach_or_kill_inferior_callback): Likewise.
5881 (main): Call initialize_notif.
5882 (process_serial_event): Call QUEUE_is_empty.
5883 (handle_target_event): Call notif_push instead of push event.
5884 * server.h (push_event): Remove declaration.
5885
5886 2012-12-10 Tom Tromey <tromey@redhat.com>
5887
5888 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5889 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5890 macros.
5891 (.c.o): Rewrite.
5892 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5893 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5894 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5895 (amd64-linux-ipa.o, ax.o): Rewrite.
5896 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5897 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5898 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5899 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5900 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5901 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5902 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5903 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5904 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5905 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5906 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5907 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5908 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5909 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5910 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5911 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5912 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5913 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5914 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5915 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5916 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5917 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5918 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5919 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5920 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5921 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5922 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5923 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5924 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5925 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5926 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5927 (reg-tilegx.o): Remove.
5928 (all_object_files): New macro.
5929 Include .deps files.
5930 * aclocal.m4, configure: Rebuild.
5931 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5932 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5933 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5934
5935 2012-12-05 Tom Tromey <tromey@redhat.com>
5936
5937 PR gdb/14917:
5938 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5939
5940 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5941
5942 * configure.ac: Check for linux/perf_event.h.
5943 * config.in: Regenerated.
5944 * configure: Regenerated.
5945
5946 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5947
5948 * hostio.c (handle_readlink): Decrease buffer size
5949 parameter passed to readlink by one byte.
5950
5951 2012-11-26 Yao Qi <yao@codesourcery.com>
5952
5953 * configure.ac (build_warnings): Append '-Wempty-body'.
5954 * configure: Regenerated.
5955 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5956 body.
5957
5958 2012-11-15 Pierre Muller <muller@sourceware.org>
5959
5960 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5961 * config.in: Regenerate.
5962 * configure: Regenerate.
5963 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5964 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5965 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5966 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5967 header.
5968 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5969 instead of <sys/wait.h> header.
5970 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5971
5972 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5973
5974 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5975 (various make rules): Remove -DGDBSERVER
5976
5977 2012-11-09 Yao Qi <yao@codesourcery.com>
5978
5979 * spu-low.c (current_ptid): Move it to ..
5980 * gdbthread.h: ... here. New.
5981 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5982 * server.c (myresume, process_serial_event): Likewise.
5983 * thread-db.c (thread_db_find_new_threads): Likewise.
5984 * tracepoint.c (run_inferior_command): Likewise.
5985
5986 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5987
5988 * server.c (handle_search_memory_1): Include access length in
5989 warning message.
5990
5991 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5992
5993 * linux-crisv32-low.c: Fix compile errors.
5994
5995 2012-09-04 Yao Qi <yao@codesourcery.com>
5996
5997 * tracepoint.c (cmd_qtsv): Adjust debug message.
5998 Don't check CUR_TPOINT.
5999
6000 2012-08-28 Yao Qi <yao@codesourcery.com>
6001
6002 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6003 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6004 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6005 Remove declarations of xmalloc, xreallloc, xstrdup and
6006 freeargv.
6007 * Makefile.in (libiberty_h): New.
6008 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6009 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6010
6011 2012-08-23 Yao Qi <yao@codesourcery.com>
6012
6013 * server.h: Remove declaration of 'xsnprintf'.
6014
6015 2012-08-22 Keith Seitz <keiths@redhat.com>
6016
6017 * server.h: Include build-gnulib-gbserver/config.h.
6018 * gdbreplay.c: Likewise.
6019
6020 2012-08-08 Doug Evans <dje@google.com>
6021
6022 * Makefile.in (SFILES): Add gdb_vecs.c.
6023 (OBS): Add gdb_vecs.o.
6024 (gdb_vecs_h, host_defs_h): New variables.
6025 (thread-db.o): Add $(gdb_vecs_h) dependency.
6026 (gdb_vecs.o): New rule.
6027 * thread-db.c: #include "gdb_vecs.h".
6028 (thread_db_load_search): Use a vector to iterate over path elements.
6029 Handle text appearing after "$pdir".
6030
6031 * configure.ac: Add check for strstr.
6032 * config.in: Regenerate.
6033 * configure: Regenerate.
6034
6035 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6036
6037 * hostio.c (handle_pread): If pread fails, fall back to attempting
6038 lseek/read.
6039 (handle_pwrite): Likewise for pwrite.
6040
6041 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6042
6043 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6044 between unsupported TYPE and unimplementable ADDR/LEN combination.
6045 (arm_insert_point): Act on new return value.
6046
6047 2012-07-31 Pedro Alves <palves@redhat.com>
6048
6049 * server.c (process_point_options): Only skip tokens if we find
6050 one that is unrecognized. Don't treat 'X' specially while
6051 skipping unrecognized tokens.
6052
6053 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6054
6055 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6056 to 4-byte-align HW breakpoint addresses for Thumb.
6057
6058 2012-07-27 Yao Qi <yao@codesourcery.com>
6059
6060 PR remote/14161.
6061
6062 * server.h: Declare gdb_agent_about_to_close.
6063 * target.c (kill_inferior): Include "agent.h".
6064 New. Send command 'kill'.
6065 * target.h (kill_inferior): Removed macro.
6066 * tracepoint.c (gdb_agent_about_to_close): New.
6067 (gdb_agent_helper_thread): Handle command 'close'.
6068 Wait endlessly until the inferior stops.
6069 Install gdb_agent_remove_socket to atexit hook.
6070 (agent_socket_name): New static variable.
6071 (gdb_agent_socket_init): Replace local variable 'name' with
6072 'agent_socket_name'.
6073 (gdb_agent_remove_socket): New.
6074
6075 2012-07-27 Yao Qi <yao@codesourcery.com>
6076
6077 * server.c (process_point_options): Stop at 'X' when parsing.
6078
6079 2012-07-19 Michael Eager <eager@eagercon.com>
6080
6081 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6082 to hw_execute.
6083 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6084 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6085 hardware breakpoint.
6086
6087 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6088
6089 * gdbserver/linux-low.c (initialize_low): Call
6090 linux_ptrace_init_warnings.
6091
6092 2012-07-02 Doug Evans <dje@google.com>
6093
6094 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6095 pointer to int.
6096
6097 2012-07-02 Stan Shebs <stan@codesourcery.com>
6098
6099 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6100 (ax.o): Add it to build rule.
6101 (ax-ipa.o): Ditto.
6102 (OBS): Add format.o.
6103 (IPA_OBS): Add format.o.
6104 * server.c (handle_query): Claim support for breakpoint commands.
6105 (process_point_options): Add command case.
6106 (process_serial_event): Leave running if there are printfs in
6107 effect.
6108 * mem-break.h (any_persistent_commands): Declare.
6109 (add_breakpoint_commands): Declare.
6110 (gdb_no_commands_at_breakpoint): Declare.
6111 (run_breakpoint_commands): Declare.
6112 * mem-break.c (struct point_command_list): New struct.
6113 (struct breakpoint): New field command_list.
6114 (any_persistent_commands): New function.
6115 (add_commands_to_breakpoint): New function.
6116 (add_breakpoint_commands): New function.
6117 (gdb_no_commands_at_breakpoint): New function.
6118 (run_breakpoint_commands): New function.
6119 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6120 locally.
6121 * ax.c: Include format.h.
6122 (ax_printf): New function.
6123 (gdb_eval_agent_expr): Add printf opcode.
6124
6125 2012-06-13 Yao Qi <yao@codesourcery.com>
6126
6127 * server.c (start_inferior): Remove duplicated writes to fields
6128 'last_resume_kind' and 'last_status' of 'current_inferior'.
6129
6130 2012-06-12 Yao Qi <yao@codesourcery.com>
6131 Pedro Alves <palves@redhat.com>
6132
6133 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6134 comment.
6135 * server.c (handle_v_cont): Extend comment.
6136
6137 2012-06-11 Yao Qi <yao@codesourcery.com>
6138
6139 * linux-low.c (linux_attach): Add 'static'.
6140
6141 2012-06-06 Yao Qi <yao@codesourcery.com>
6142
6143 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6144
6145 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6146
6147 Fix gcc -flto compilation warning.
6148 * server.c (main): Make variable multi_mode and attach volatile.
6149
6150 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6151
6152 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6153 if the platform doesn't know about it.
6154
6155 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6156
6157 * Makefile.in (SFILES): Add linux-tile-low.c.
6158 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6159 * configure.srv: Handle tilegx-*-linux*.
6160 * linux-tile-low.c: New file.
6161
6162 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6163
6164 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6165
6166 2012-05-24 Pedro Alves <palves@redhat.com>
6167
6168 PR gdb/7205
6169
6170 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6171
6172 2012-05-24 Pedro Alves <palves@redhat.com>
6173
6174 PR gdb/7205
6175
6176 Replace target_signal with gdb_signal throughout.
6177
6178 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6179
6180 * linux-low.c (linux_store_registers): Avoid the copying sequence
6181 when no data has been retrieved by ptrace.
6182
6183 2012-05-22 Will Deacon <will.deacon@arm.com>
6184
6185 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6186 Include asm/ptrace.h.
6187 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6188 already defined.
6189
6190 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6191
6192 * linux-low.c (linux_store_registers): Don't re-retrieve data
6193 with ptrace that has already been obtained from /proc. Always
6194 copy any data retrieved with ptrace to the buffer supplied.
6195
6196 2012-05-11 Yao Qi <yao@codesourcery.com>
6197 Pedro Alves <palves@redhat.com>
6198
6199 * linux-low.c (enum stopping_threads_kind): New.
6200 (stopping_threads): Change type to `enum stopping_threads_kind'.
6201 (handle_extended_wait): If stopping and suspending threads, leave
6202 the new_lwp suspended too.
6203 (linux_wait_for_event): Adjust.
6204 (stop_all_lwps): Set `stopping_threads' to
6205 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6206 whether we're suspending threads or just stopping them. Assert no
6207 recursion happens.
6208
6209 2012-04-29 Yao Qi <yao@codesourcery.com>
6210
6211 * server.h: Move some code to ...
6212 * gdbthread.h: ... here. New.
6213 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6214 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6215 (nto-low.o, win32-low.o): Likewise.
6216 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6217 * regcache.c, remote-utils.c, server.c: Likewise.
6218 * target.c, tracepoint.c, win32-low.c: Likewise.
6219
6220 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6221
6222 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6223 (PTRACE_ARG4_TYPE): Likewise.
6224 (PTRACE_XFER_TYPE): Likewise.
6225 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6226 ptrace to PTRACE_ARG3_TYPE.
6227 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6228 (PTRACE_ARG4_TYPE): Likewise.
6229 (PTRACE_XFER_TYPE): Likewise.
6230 (linux_detach_one_lwp): Cast fourth argument of
6231 ptrace to long then PTRACE_ARG4_TYPE.
6232 (regsets_fetch_inferior_registers): Cast third argument of
6233 ptrace to long then PTRACE_ARG3_TYPE.
6234 (regsets_store_inferior_registers): Likewise.
6235
6236 2012-04-20 Pedro Alves <palves@redhat.com>
6237
6238 * configure: Regenerate.
6239
6240 2012-04-19 Pedro Alves <palves@redhat.com>
6241
6242 * Makefile.in (GNULIB_BUILDDIR): New.
6243 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6244 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6245 (all, install-only, uninstall, clean-info, all-lib, clean): No
6246 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6247 (maintainer-clean realclean distclean): Use subdir_do.
6248 (subdir_do): New.
6249 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6250 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6251 * acinclude.m4: Include acx_configure_dir.m4.
6252 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6253 calls. Call AC_PROG_RANLIB. Configure gnulib using
6254 ACX_CONFIGURE_DIR.
6255 (GNULIB): New.
6256 (GNULIB_STDINT_H): Adjust.
6257 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6258 * gdbreplay.c: Include build-gnulib/config.h.
6259 * server.h: Likewise.
6260 * aclocal.m4: Regenerate.
6261 * config.in: Regenerate.
6262 * configure: Regenerate.
6263
6264 2012-04-19 Pedro Alves <palves@redhat.com>
6265
6266 * Makefile.in (LIBGNU, INCGNU): Adjust.
6267 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6268 (all, install-only, uninstall, clean-info, all-lib, clean)
6269 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6270 * configure.ac: Adjust AC_OUTPUT output.
6271 * aclocal.m4: Regenerate.
6272 * configure: Regenerate.
6273
6274 2012-04-19 Pedro Alves <palves@redhat.com>
6275
6276 * Makefile.in (generated_files): New.
6277 (server_h): Remove the explicit dependency on config.h, and depend
6278 on $generated_files.
6279
6280 2012-04-19 Pedro Alves <palves@redhat.com>
6281
6282 * Makefile.in (INCGNU): Add -Ignulib.
6283
6284 2012-04-19 Pedro Alves <palves@redhat.com>
6285
6286 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6287 (INCGNU): ... this, and spell out -I here.
6288 (GNULIB_LIB): Rename to ...
6289 (LIBGNU): ... this.
6290 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6291
6292 2012-04-19 Pedro Alves <palves@redhat.com>
6293
6294 * config.in: Regenerate.
6295
6296 2012-04-19 Pedro Alves <palves@redhat.com>
6297
6298 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6299 * server.h (memmem): Remove declaration.
6300 * config.in: Regenerate.
6301 * configure: Regenerate.
6302
6303 2012-04-19 Yao Qi <yao@codesourcery.com>
6304
6305 * Makefile.in (SFILES): Add common/vec.c.
6306 (OBS): Add vec.o.
6307 (vec.o): New rule.
6308
6309 2012-04-19 Yao Qi <yao@codesourcery.com>
6310
6311 * remote-utils.c (prepare_resume_reply): Replace with macro
6312 target_core_of_thread.
6313 * server.c (handle_qxfer_threads_proper): Likewise.
6314 * target.h (traget_core_of_thread): New macro.
6315
6316 2012-04-18 Pedro Alves <palves@redhat.com>
6317
6318 * aclocal.m4: Regenerate.
6319 * configure: Regenerate.
6320
6321 2012-04-16 Yao Qi <yao@codesourcery.com>
6322
6323 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6324 duplicated on address.
6325
6326 2012-04-16 Yao Qi <yao@codesourcery.com>
6327
6328 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6329 (struct tracepoint_action_ops) <send>: New field.
6330 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6331 (agent_expr_send, x_tracepoint_action_send): New.
6332 (l_tracepoint_action_send): New.
6333 (cmd_qtdp): Download and install tracepoint
6334 according to `use_agent'.
6335 (run_inferior_command): Add one more parameter `len'.
6336 Update callers.
6337 (tracepoint_send_agent): New.
6338 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6339
6340 2012-04-16 Yao Qi <yao@codesourcery.com>
6341
6342 * tracepoint.c (download_tracepoints): Moved to ...
6343 (cmd_qtstart): ... here.
6344
6345 2012-04-14 Yao Qi <yao@codesourcery.com>
6346
6347 * tracepoint.c: Include inttypes.h.
6348 (struct collect_memory_action): Use sized types.
6349 (struct tracepoint): Likewise.
6350 (cmd_qtdp, stop_tracing): Update print specifiers.
6351 (cmd_qtp, response_tracepoint): Likewise.
6352 (collect_data_at_tracepoint): Likewise.
6353 (collect_data_at_step): Likewise.
6354
6355 2012-04-14 Yao Qi <yao@codesourcery.com>
6356
6357 Import gnulib module inttypes.
6358 * aclocal.m4, config.in, configure: Regenerated.
6359
6360 2012-04-14 Yao Qi <yao@codesourcery.com>
6361
6362 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6363 Makefile and config.status at last.
6364
6365 2012-04-13 Yao Qi <yao@codesourcery.com>
6366
6367 * tracepoint.c: Include stdint.h unconditionally.
6368
6369 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6370
6371 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6372 on BFD_HAVE_SYS_PROCFS_TYPE.
6373 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6374 * configure: Regenerate.
6375 * config.in: Likewise.
6376
6377 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6378
6379 * Makefile.in (clean): Also remove x32.c x32-linux.c
6380 x32-avx.c x32-avx-linux.c.
6381 (x32.o): New target.
6382 (x32.c): Likewise.
6383 (x32-linux.o): Likewise.
6384 (x32-linux.c): Likewise.
6385 (x32-avx.o): Likewise.
6386 (x32-avx.c): Likewise.
6387 (x32-avx-linux.o): Likewise.
6388 (x32-avx-linux.c): Likewise.
6389
6390 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6391 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6392 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6393 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6394 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6395 i386/x32-avx-linux.xml.
6396
6397 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6398 (init_registers_x32_avx_linux): Likwise.
6399 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6400 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6401
6402 2012-04-13 Pedro Alves <palves@redhat.com>
6403
6404 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6405 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6406 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6407 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6408 the sub-make.
6409
6410 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6411
6412 * linux-x86-low.c (compat_x32_clock_t): New.
6413 (compat_x32_siginfo_t): Likewise.
6414 (compat_x32_siginfo_from_siginfo): Likewise.
6415 (siginfo_from_compat_x32_siginfo): Likewise.
6416 (linux_is_elf64): Likewise.
6417 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6418 and siginfo_from_compat_x32_siginfo for x32.
6419 (x86_arch_setup): Set linux_is_elf64.
6420
6421 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6422
6423 PR gdb/13969
6424 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6425 e_machine field.
6426 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6427 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6428 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6429 compatible with process.
6430
6431 2012-04-12 Yao Qi <yao@codesourcery.com>
6432
6433 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6434 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6435 (install-only, install-info, clean): Handle sub dir gnulib.
6436 (all-lib, am--refresh): New targets.
6437 (memmem.o): Remove target.
6438 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6439 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6440 (AC_REPLACE_FUNCS): Remove memmem.
6441 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6442 (AC_OUTPUT): Generate Makefile in gnulib/.
6443 * aclocal.m4, config.in, configure: Regenerated.
6444
6445 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6446
6447 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6448
6449 2012-04-05 Pedro Alves <palves@redhat.com>
6450
6451 -Werror=strict-aliasing
6452
6453 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6454 pointer.
6455
6456 2012-04-04 Pedro Alves <palves@redhat.com>
6457
6458 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6459 (sparc_store_gregset_from_stack, sparc_store_gregset)
6460 (sparc_breakpoint_at): Fix formatting.
6461
6462 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6463
6464 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6465 are available.
6466 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6467 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6468 * config.in: Regenerate.
6469 * configure: Likewise.
6470
6471 2012-03-29 Pedro Alves <palves@redhat.com>
6472
6473 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6474 Correct ptrace arguments.
6475
6476 2012-03-28 Pedro Alves <palves@redhat.com>
6477
6478 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6479 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6480 (IA64_FR1_REGNUM): New defines.
6481 (ia64_fetch_register): New.
6482 (the_low_target): Install it.
6483 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6484 field.
6485 * linux-low.c (linux_fetch_registers): Try the
6486 the_low_target.fetch_register hook first.
6487
6488 * linux-arm-low.c (the_low_target): Adjust.
6489 * linux-bfin-low.c (the_low_target): Adjust.
6490 * linux-cris-low.c (the_low_target): Adjust.
6491 * linux-crisv32-low.c (the_low_target): Adjust.
6492 * linux-m32r-low.c (the_low_target): Adjust.
6493 * linux-m68k-low.c (the_low_target): Adjust.
6494 * linux-mips-low.c (the_low_target): Adjust.
6495 * linux-ppc-low.c (the_low_target): Adjust.
6496 * linux-s390-low.c (the_low_target): Adjust.
6497 * linux-sh-low.c (the_low_target): Adjust.
6498 * linux-sparc-low.c (the_low_target): Adjust.
6499 * linux-tic6x-low.c (the_low_target): Adjust.
6500 * linux-x86-low.c (the_low_target): Adjust.
6501 * linux-xtensa-low.c (the_low_target): Adjust.
6502
6503 2012-03-26 Pedro Alves <palves@redhat.com>
6504
6505 * server.c (handle_qxfer_libraries): Don't bail early if
6506 the_target->qxfer_libraries_svr4 is not NULL.
6507
6508 2012-03-26 Pedro Alves <palves@redhat.com>
6509
6510 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6511
6512 2012-03-23 Pedro Alves <palves@redhat.com>
6513
6514 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6515 "library-list-svr4" element's start tag when the the DSO list is
6516 empty.
6517
6518 2012-03-23 Pedro Alves <palves@redhat.com>
6519
6520 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6521 a variable whose type size is the same as the inferior's pointer
6522 size.
6523
6524 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6525
6526 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6527 struct siginfo.
6528 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6529 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6530 * linux-low.h: Include <signal.h>.
6531 (struct siginfo): Remove forward declaration.
6532 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6533 struct siginfo.
6534
6535 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6536
6537 * .gitignore: Ignore more files.
6538
6539 2012-03-19 Pedro Alves <palves@redhat.com>
6540 Jan Kratochvil <jan.kratochvil@redhat.com>
6541
6542 * server.c (cont_thread, general_thread): Add describing comments.
6543 (start_inferior): Clear `cont_thread'.
6544 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6545 of a process.
6546
6547 2012-03-15 Yao Qi <yao@codesourcery.com>
6548
6549 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6550 handling to ...
6551 (cmd_qtdp): ... here.
6552
6553 2012-03-15 Yao Qi <yao@codesourcery.com>
6554
6555 * tracepoint.c (struct tracepoint_action_ops): New.
6556 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6557 (m_tracepoint_action_download): New.
6558 (r_tracepoint_action_download): New.
6559 (x_tracepoint_action_download): New.
6560 (l_tracepoint_action_download): New.
6561 (add_tracepoint_action): Install `action->ops' according type.
6562 (download_tracepoint_1): Move code `download' function pointer
6563 of various tracepoint_action_ops.
6564
6565 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6566
6567 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6568 linux_ptrace_attach_warnings.
6569
6570 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6571
6572 * Makefile.in (linux-ptrace.o): New.
6573 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6574 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6575 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6576 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6577 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6578 of these targets.
6579 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6580
6581 2012-03-08 Yao Qi <yao@codesourcery.com>
6582 Pedro Alves <palves@redhat.com>
6583
6584 Fix PR server/13392.
6585 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6586 offset of JMP insn.
6587 * tracepoint.c (remove_tracepoint): New.
6588 (cmd_qtdp): Call remove_tracepoint when failed to install.
6589
6590 2012-03-07 Pedro Alves <palves@redhat.com>
6591
6592 * linux-low.c (get_detach_signal): New.
6593 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6594 Pass on pending signals to PTRACE_DETACH. Check the result of the
6595 ptrace call.
6596 * server.c (program_signals, program_signals_p): New.
6597 (handle_general_set): Handle QProgramSignals.
6598 * server.h (program_signals, program_signals_p): Declare.
6599
6600 2012-03-05 Pedro Alves <palves@redhat.com>
6601 Jan Kratochvil <jan.kratochvil@redhat.com>
6602
6603 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6604 New comment why.
6605
6606 2012-03-03 Yao Qi <yao@codesourcery.com>
6607
6608 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6609 agent_look_up_symbols.
6610
6611 2012-03-03 Yao Qi <yao@codesourcery.com>
6612
6613 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6614 (linux-x86-low.o): Likewise.
6615 * server.h: Remove in_process_agent_loaded.
6616 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6617 common/agent.c.
6618 Update callers.
6619
6620 2012-03-03 Yao Qi <yao@codesourcery.com>
6621
6622 * tracepoint.c (gdb_agent_capability): New global.
6623 (in_process_agent_loaded_ust): Renamed to
6624 `in_process_agent_supports_ust'.
6625 Update callers.
6626 (in_process_agent_supports_ust): Call agent_capability_check.
6627 (clear_installed_tracepoints): Assert that agent supports
6628 agent.
6629
6630 2012-03-03 Yao Qi <yao@codesourcery.com>
6631
6632 * linux-low.c (linux_supports_agent): New.
6633 (linux_target_ops): Initialize field `supports_agent' with
6634 linux_supports_agent.
6635 * target.h (struct target_ops) <supports_agent>: New.
6636 (target_supports_agent): New macro.
6637 * server.c (handle_general_set): Handle packet 'QAgent'.
6638 (handle_query): Send `QAgent+'.
6639 * Makefile.in (server.o): Depends on agent.h.
6640
6641 2012-03-03 Yao Qi <yao@codesourcery.com>
6642
6643 * Makefile.in (OBS): Add agent.o.
6644 Add new rule for agent.o.
6645 Track dependence of tracepoint.c on agent.h.
6646 * tracepoint.c (run_inferior_command_1):
6647 (run_inferior_command): Call agent_run_command.
6648 (gdb_ust_connect_sync_socket): Deleted. Move it to
6649 common/agent.c.
6650 (resume_thread, stop_thread): Likewise.
6651 (gdb_ust_socket_init): Renamed to ...
6652 (gdb_agent_socket_init): ... New.
6653 (gdb_ust_thread): Renamed to ...
6654 (gdb_agent_helper_thread): ... New.
6655 (gdb_ust_init): Move some code to ...
6656 (gdb_agent_init): ... here. New.
6657 [HAVE_UST]: Call gdb_ust_init.
6658 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6659 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6660 * config.in, configure: Regenerated.
6661
6662 2012-03-02 Pedro Alves <palves@redhat.com>
6663
6664 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6665 * linux-low.c (struct simple_pid_list): New.
6666 (stopped_pids): New a struct simple_pid_list pointer.
6667 (add_to_pid_list, pull_pid_from_list): New.
6668 (handle_extended_wait): Don't assume the first signal new children
6669 report is SIGSTOP. Adjust call to pull_pid_from_list.
6670 (linux_wait_for_lwp): Adjust.
6671
6672 2012-03-02 Yao Qi <yao@codesourcery.com>
6673
6674 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6675 debug log.
6676
6677 2012-03-02 Yao Qi <yao@codesourcery.com>
6678
6679 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6680 `stop_pc' and `tpoint'. Update caller.
6681
6682 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6683
6684 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6685 * linux-low.c (use_linux_regsets): New macro.
6686 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6687 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6688 (linux_register_in_regsets): New function.
6689 (usr_fetch_inferior_registers): Skip registers covered by
6690 regsets.
6691 (usr_store_inferior_registers): Likewise.
6692 (usr_fetch_inferior_registers): New macro.
6693 (usr_store_inferior_registers): Likewise.
6694 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6695 (linux_store_registers): Likewise.
6696 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6697 prototype.
6698 (init_registers_mips64_dsp_linux): Likewise.
6699 (init_registers_mips_linux): New macro.
6700 (init_registers_mips_dsp_linux): Likewise.
6701 (mips_dsp_num_regs): Likewise.
6702 (DSP_BASE, DSP_CONTROL): New fallback macros.
6703 (mips_base_regs): New macro.
6704 (mips_regmap): Use it. Fix the size.
6705 (mips_dsp_regmap): New variable.
6706 (mips_dsp_regset_bitmap): Likewise.
6707 (mips_arch_setup): New function.
6708 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6709 than mips_regmap.
6710 (mips_cannot_store_register): Likewise.
6711 (the_low_target): Update .arch_setup, .num_regs and .regmap
6712 initializers. Add .regset_bitmap initializer.
6713 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6714 initializer.
6715 * linux-bfin-low.c (the_low_target): Likewise.
6716 * linux-cris-low.c (the_low_target): Likewise.
6717 * linux-crisv32-low.c (the_low_target): Likewise.
6718 * linux-ia64-low.c (the_low_target): Likewise.
6719 * linux-m32r-low.c (the_low_target): Likewise.
6720 * linux-m68k-low.c (the_low_target): Likewise.
6721 * linux-ppc-low.c (the_low_target): Likewise.
6722 * linux-s390-low.c (the_low_target): Likewise.
6723 * linux-sh-low.c (the_low_target): Likewise.
6724 * linux-sparc-low.c (the_low_target): Likewise.
6725 * linux-tic6x-low.c (the_low_target): Likewise.
6726 * linux-x86-low.c (the_low_target): Likewise.
6727 * linux-xtensa-low.c (the_low_target): Likewise.
6728 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6729 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6730 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6731 srv_xmlfiles.
6732 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6733 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6734
6735 2012-02-29 Yao Qi <yao@codesourcery.com>
6736 Pedro Alves <palves@redhat.com>
6737
6738 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6739 `step_over_finished' is true.
6740
6741 2012-02-27 Pedro Alves <palves@redhat.com>
6742
6743 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6744 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6745
6746 2012-02-27 Pedro Alves <palves@redhat.com>
6747
6748 PR server/9684
6749 * linux-low.c (pid_is_stopped): New.
6750 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6751
6752 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6753
6754 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6755 of conditions.
6756
6757 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6758
6759 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6760
6761 2012-02-24 Luis Machado <lgustavo@codesourcery>
6762
6763 * server.c (handle_query): Advertise support for target-side
6764 breakpoint condition evaluation.
6765 (process_point_options): New function.
6766 (process_serial_event): When inserting a breakpoint, check for
6767 a target-side condition that should be evaluated.
6768
6769 * mem-break.c: Include regcache.h and ax.h.
6770 (point_cond_list_t): New data structure.
6771 (breakpoint) <cond_list>: New field.
6772 (find_gdb_breakpoint_at): Make non-static.
6773 (delete_gdb_breakpoint_at): Clear any target-side
6774 conditions.
6775 (clear_gdb_breakpoint_conditions): New function.
6776 (add_condition_to_breakpoint): Likewise.
6777 (add_breakpoint_condition): Likewise.
6778 (gdb_condition_true_at_breakpoint): Likewise.
6779 (gdb_breakpoint_here): Return result directly instead
6780 of going through a local variable.
6781
6782 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6783 (clear_gdb_breakpoint_conditions): Likewise.
6784 (add_breakpoint_condition): Likewise.
6785 (gdb_condition_true_at_breakpoint): Likewise.
6786
6787 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6788 (need_step_over_p): Take target-side breakpoint condition into
6789 consideration.
6790
6791 2012-02-24 Luis Machado <lgustavo@codesourcery>
6792
6793 * server.h: Include tracepoint.h.
6794 (agent_mem_read, agent_get_trace_state_variable_value,
6795 agent_set_trace_state_variable_value,
6796 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6797 get_set_tsv_func_addr): New prototypes.
6798
6799 * ax.h: New include file.
6800 * ax.c: New source file.
6801
6802 * tracepoint.c: Include ax.h.
6803 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6804 agent_expr, eval_result_type): Move to ax.h.
6805 (parse_agent_expr): Rename to ...
6806 (gdb_parse_agent_expr): ... this, make it non-static and move
6807 to ax.h.
6808 (unparse_agent_expr) Rename to ...
6809 (gdb_unparse_agent_expr): ... this, make it non-static and move
6810 to ax.h.
6811 (eval_agent_expr): Rename to ...
6812 (eval_tracepoint_agent_expr): ... this.
6813 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6814 forward declarations.
6815 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6816 (agent_get_trace_state_variable_value): New function.
6817 (agent_set_trace_state_variable_value): New function.
6818 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6819 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6820 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6821 (condition_true_at_tracepoint): Likewise.
6822 (parse_agent_expr): Rename to ...
6823 (gdb_parse_agent_expr): ... this and move to ax.c.
6824 (unparse_agent_expr): Rename to ...
6825 (gdb_unparse_agent_expr): ... this and move to ax.c.
6826 (gdb_agent_op_name): Move to ax.c.
6827 (eval_agent_expr): Rename to ...
6828 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6829 and move to ax.c.
6830 (eval_tracepoint_agent_expr): New function.
6831 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6832 non-static.
6833 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6834 ax.c.
6835 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6836 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6837 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6838 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6839 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6840 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6841 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6842 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6843 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6844 (compile_bytecodes): Remove forward declaration.
6845 (is_goto_target): Move to ax.c.
6846 (compile_bytecodes): Move to ax.c and call
6847 agent_get_trace_state_variable_value (...) and
6848 agent_set_trace_state_variable_value (...).
6849
6850 * Makefile.in: Update ax.c and IPA dependencies.
6851
6852 2012-02-24 Pedro Alves <palves@redhat.com>
6853
6854 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6855 (cmd_bigqtbuffer_circular): ... this. Only handle
6856 'QTBuffer:circular:'.
6857 (handle_tracepoint_general_set): Adjust.
6858
6859 2012-02-16 Yao Qi <yao@codesourcery.com>
6860
6861 * inferiors.c: Move code to ...
6862 * dll.c: .... here. New.
6863 * server.h: Declare clear_dlls.
6864 * Makefile.in (SFILES): Add dll.c.
6865 (OBS): Add dll.o
6866 (dll.o): New rule.
6867
6868 2012-02-11 Yao Qi <yao@codesourcery.com>
6869
6870 * server.c: (handle_monitor_command): Add a new parameter
6871 `own_buf'.
6872 (handle_query): Update caller.
6873
6874 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6875
6876 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6877 * configure, config.in: Regenerate.
6878 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6879 is not defined.
6880
6881 2012-02-02 Pedro Alves <palves@redhat.com>
6882
6883 Try SIGKILL first, then PTRACE_KILL.
6884 * linux-low.c (linux_kill_one_lwp): New.
6885 (linux_kill_one_lwp): Rename to ...
6886 (kill_one_lwp_callback): ... this. Use the new
6887 linux_kill_one_lwp.
6888
6889 2012-02-02 Pedro Alves <palves@redhat.com>
6890
6891 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6892 inferior.
6893
6894 2012-01-27 Pedro Alves <palves@redhat.com>
6895
6896 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6897 (elf_64_file_p): Make static.
6898 (linux_pid_exe_is_elf_64_file): New.
6899 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6900 Delete declarations.
6901 (linux_pid_exe_is_elf_64_file): Declare.
6902 * linux-x86-low.c (x86_arch_setup): Use
6903 linux_pid_exe_is_elf_64_file.
6904
6905 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6906
6907 * linux-low.c (linux_wait_for_event_1): Rename to ...
6908 (linux_wait_for_event): ... here and merge it with former
6909 linux_wait_for_event - new variable wait_ptid, use it.
6910 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6911
6912 2012-01-23 Pedro Alves <palves@redhat.com>
6913
6914 * server.c (main): Avoid yet another case of infinite loop while
6915 detaching/killing after a longjmp.
6916
6917 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6918
6919 Code cleanup.
6920 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6921
6922 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6923
6924 * hostio.c (handle_readlink): New function.
6925 (handle_vFile): Call it to handle "vFile:readlink" packets.
6926
6927 2012-01-20 Pedro Alves <palves@redhat.com>
6928 Ulrich Weigand <ulrich.weigand@linaro.org>
6929
6930 * server.c (handle_v_requests): Only support vAttach and vRun to
6931 start multiple processes when in extended protocol mode.
6932
6933 2012-01-17 Pedro Alves <palves@redhat.com>
6934
6935 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6936 memalign plus mprotect to allocate the scratch buffer.
6937
6938 2012-01-13 Pedro Alves <palves@redhat.com>
6939
6940 * server.c (attach_inferior): Clear `cont_thread'.
6941
6942 2012-01-13 Pedro Alves <palves@redhat.com>
6943
6944 * server.c (main): Avoid infinite loop while detaching/killing
6945 after a longjmp.
6946
6947 2012-01-09 Doug Evans <dje@google.com>
6948
6949 * server.c (start_inferior): Set last_ptid in --wrapper case.
6950
6951 2012-01-06 Yao Qi <yao@codesourcery.com>
6952
6953 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6954 defined.
6955 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6956
6957 2012-01-04 Yao Qi <yao@codesourcery.com>
6958
6959 * tracepoint.c (cmd_qtdp): Print debug message
6960 for static tracepoint.
6961
6962 2012-01-04 Yao Qi <yao@codesourcery.com>
6963
6964 * tracepoint.c (trace_vdebug): Differentiate debug message
6965 between gdbserver and IPA.
6966
6967 2012-01-03 Yao Qi <yao@codesourcery.com>
6968
6969 * tracepoint.c (tracepoint_was_hit): Don't collect for
6970 static tracepoint.
6971
6972 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6973
6974 * terminal.h: Reformat copyright header.
6975
6976 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6977
6978 * server.c (gdbserver_version): Update copyright year.
6979 * gdbreplay.c (gdbreplay_version): Likewise.
6980
6981 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6982
6983 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6984
6985 Revert:
6986 2011-12-18 Hui Zhu <teawater@gmail.com>
6987 * linux-low.c (linux_create_inferior): Save return value to ret.
6988
6989 2011-12-18 Hui Zhu <teawater@gmail.com>
6990
6991 * linux-low.c (linux_create_inferior): Save return value to ret.
6992
6993 2011-12-16 Doug Evans <dje@google.com>
6994
6995 * linux-low.c (linux_create_inferior): If stdio connection,
6996 redirect stdin from /dev/null, stdout to stderr.
6997 * remote-utils.c (remote_is_stdio): New static global.
6998 (remote_connection_is_stdio): New function.
6999 (remote_prepare): Handle stdio connection.
7000 (remote_open): Ditto.
7001 (remote_close): Don't close stdin for stdio connections.
7002 (read_prim,write_prim): New functions. Replace all calls to
7003 read/write to these.
7004 * server.c (main): Watch for "-" argument. Move call to
7005 remote_prepare before start_inferior.
7006 * server.h (STDIO_CONNECTION_NAME): New macro.
7007 (remote_connection_is_stdio): Declare.
7008
7009 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7010 in debugging output.
7011
7012 2011-12-15 Yao Qi <yao@codesourcery.com>
7013
7014 * tracepoint.c: Include sys/syscall.h.
7015 (gdb_ust_thread): Remove preprocessor conditional.
7016
7017 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7018
7019 * linux-low.c (linux_detach_one_lwp): Call
7020 the_low_target.prepare_to_resume before detaching.
7021
7022 2011-12-14 Yao Qi <yao@codesourcery.com>
7023
7024 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7025 of write.
7026
7027 2011-12-14 Yao Qi <yao@codesourcery.com>
7028
7029 * i386-low.c (i386_low_stopped_data_address): Initialize local
7030 variable `control'.
7031
7032 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7033
7034 PR remote/13492
7035
7036 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7037 DR_CONTROL unless necessary. Extend comments.
7038 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7039 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7040
7041 2011-12-13 Yao Qi <yao@codesourcery.com>
7042
7043 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7044 macros.
7045 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7046
7047 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7048
7049 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7050 Print new debug message for such case.
7051
7052 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7053
7054 Fix overlapping memcpy.
7055 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7056 the read_inferior_memory transfer.
7057 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7058 write_inferior_memory transfer.
7059 (set_fast_tracepoint_jump): New variable buf. Use it for the
7060 read_inferior_memory and write_inferior_memory transfers.
7061 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7062 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7063 Use it for the write_inferior_memory transfer.
7064 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7065 buffers.
7066
7067 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7068
7069 * linux-low.c (fetch_register, store_register): Make code
7070 consistent, fix formatting.
7071
7072 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7073
7074 * linux-low.c (usr_store_inferior_registers): Factor out code
7075 to handle individual registers into...
7076 (store_register): ... this new function.
7077
7078 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7079
7080 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7081 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7082 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7083 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7084 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7085 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7086 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7087 (srv_xmlfiles): Add new XML files.
7088
7089 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7090 and <sys/uio.h>.
7091 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7092 (init_registers_s390_linux32v1): Add prototype.
7093 (init_registers_s390_linux32v2): Likewise.
7094 (init_registers_s390_linux64v1): Likewise.
7095 (init_registers_s390_linux64v2): Likewise.
7096 (init_registers_s390x_linux64v1): Likewise.
7097 (init_registers_s390x_linux64v2): Likewise.
7098 (s390_num_regs): Increment to 52.
7099 (s390_regmap): Add orig_r2 register.
7100 (s390_num_regs_3264): Increment to 68.
7101 (s390_regmap_3264): Add orig_r2 register.
7102 (s390_collect_ptrace_register): Handle orig_r2 register.
7103 (s390_supply_ptrace_register): Likewise.
7104 (s390_fill_last_break): New function.
7105 (s390_store_last_break): Likewise.
7106 (s390_fill_system_call): New function.
7107 (s390_store_system_call): Likewise.
7108 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7109 register sets.
7110 (s390_check_regset): New function.
7111 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7112 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7113 Update target_regsets for available register sets.
7114
7115 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7116 Jan Kratochvil <jan.kratochvil@redhat.com>
7117
7118 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7119 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7120 New.
7121 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7122 * linux-low.h (struct process_info_private): New member r_debug.
7123 * server.c (handle_qxfer_libraries): Call
7124 the_target->qxfer_libraries_svr4.
7125 (handle_qxfer_libraries_svr4): New function.
7126 (qxfer_packets): New entry "libraries-svr4".
7127 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7128 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7129 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7130 PACKET_qXfer_libraries_svr4.
7131
7132 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7133
7134 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7135 PSW address/mask between 8-byte and 16-byte formats.
7136 (s390_supply_ptrace_register): Likewise.
7137 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7138 basic addressing mode bit.
7139
7140 2011-11-24 Stan Shebs <stan@codesourcery.com>
7141
7142 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7143
7144 2011-11-17 Stan Shebs <stan@codesourcery.com>
7145
7146 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7147 (tracing_start_time): New global.
7148 (tracing_stop_time): New global.
7149 (tracing_user_name): New global.
7150 (tracing_notes): New global.
7151 (tracing_stop_note): New global.
7152 (cmd_qtstart): Set traceframe_usage, start_time.
7153 (stop_tracing): Set stop_time.
7154 (cmd_qtstatus): Report additional status.
7155 (cmd_qtp): New function.
7156 (handle_tracepoint_query): Call it.
7157 (cmd_qtnotes): New function.
7158 (handle_tracepoint_general_set): Call it.
7159 (get_timestamp): Rename from tsv_get_timestamp.
7160
7161 2011-11-14 Stan Shebs <stan@codesourcery.com>
7162 Kwok Cheung Yeung <kcy@codesourcery.com>
7163
7164 * linux-x86-low.c (small_jump_insn): New.
7165 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7166 trampoline and error message, build a trampoline and issue a small
7167 jump instruction to it.
7168 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7169 trampoline and error message.
7170 (x86_get_min_fast_tracepoint_insn_len): New.
7171 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7172 * linux-low.h (struct linux_target_ops): Add arguments to
7173 install_fast_tracepoint_jump_pad operation, add new operation.
7174 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7175 arguments.
7176 (linux_get_min_fast_tracepoint_insn_len): New function.
7177 (linux_target_op): Add new operation.
7178 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7179 (gdb_trampoline_buffer_end): Ditto.
7180 (gdb_trampoline_buffer_error): Ditto.
7181 (struct ipa_sym_addresses): Add fields for new IPA variables.
7182 (symbol_list): Add entries for new IPA variables.
7183 (struct tracepoint): Add fields to hold the address range of the
7184 trampoline used by the tracepoint.
7185 (trampoline_buffer_head): New static variable.
7186 (trampoline_buffer_tail): Ditto.
7187 (claim_trampoline_space): New function.
7188 (have_fast_tracepoint_trampoline_buffer): New function.
7189 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7190 structure.
7191 (install_fast_tracepoint): Ditto, also add error buffer argument.
7192 (cmd_qtminftpilen): New function.
7193 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7194 (fast_tracepoint_from_trampoline_address): New function.
7195 (fast_tracepoint_collecting): Handle trampoline as part of jump
7196 pad space.
7197 (set_trampoline_buffer_space): New function.
7198 (initialize_tracepoint): Initialize new IPA variables.
7199 * target.h (struct target_ops): Add arguments to
7200 install_fast_tracepoint_jump_pad operation, add new
7201 get_min_fast_tracepoint_insn_len operation.
7202 (target_get_min_fast_tracepoint_insn_len): New.
7203 (install_fast_tracepoint_jump_pad): Add arguments.
7204 * server.h (IPA_BUFSIZ): Define.
7205 * linux-i386-ipa.c: Include extra header files.
7206 (initialize_fast_tracepoint_trampoline_buffer): New function.
7207 (initialize_low_tracepoint): Call it.
7208 * server.h (set_trampoline_buffer_space): Declare.
7209 (claim_trampoline_space): Ditto.
7210 (have_fast_tracepoint_trampoline_buffer): Ditto.
7211
7212 2011-11-14 Yao Qi <yao@codesourcery.com>
7213
7214 * server.c (handle_query): Handle InstallInTrace for qSupported.
7215 * tracepoint.c (add_tracepoint): Sort list.
7216 (install_tracepoint, download_tracepoint): New.
7217 (cmd_qtdp): Call them to install and download tracepoints.
7218 (sort_tracepoints): Removed.
7219 (cmd_qtstart): Update.
7220
7221 2011-11-14 Yao Qi <yao@codesourcery.com>
7222
7223 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7224 * mem-break.h: Declare.
7225 * tracepoint.c (cmd_qtstart): Move some code to ...
7226 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7227 New.
7228 (download_tracepoints): Move some code to ...
7229 (download_tracepoint_1): ... here. New.
7230
7231 2011-11-08 Yao Qi <yao@codesourcery.com>
7232
7233 * remote-utils.c (relocate_instruction): A comment fix.
7234
7235 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7236
7237 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7238 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7239 dr_status_mirror and dr_control_mirror from debug_reg_state.
7240 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7241 (i386_initial_stuff): Remove use of deleted globals.
7242 (i386_get_thread_context, i386_set_thread_context,
7243 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7244 from debug_reg_state.
7245
7246 2011-11-05 Yao Qi <yao@codesourcery.com>
7247
7248 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7249 address as TPOINT's.
7250
7251 2011-11-02 Stan Shebs <stan@codesourcery.com>
7252
7253 * tracepoint.c (agent_mem_read_string): New function.
7254 (eval_agent_expr): Call it for tracenz.
7255 * server.c (handle_query): Report support for tracenz.
7256
7257 2011-11-02 Yao Qi <yao@codesourcery.com>
7258
7259 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7260
7261 2011-11-02 Yao Qi <yao@codesourcery.com>
7262
7263 * target.h: Fix a typo in comment.
7264
7265 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7266
7267 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7268 clobber the breakpoints' shadows with fast tracepoint jumps.
7269 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7270 * target.c (write_inferior_memory): Also pass MYADDR down to
7271 check_mem_write.
7272
7273 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7274
7275 * configure.ac: Check support for personality routine.
7276 * configure: Regenerate.
7277 * config.in: Likewise.
7278 * linux-low.c: Include <sys/personality.h>.
7279 Define ADDR_NO_RANDOMIZE if necessary.
7280 (linux_create_inferior): Disable address space randomization when
7281 forking inferior, if requested.
7282 (linux_supports_disable_randomization): New function.
7283 (linux_target_ops): Install it.
7284 * server.h (disable_randomization): Declare.
7285 * server.c (disable_randomization): New global variable.
7286 (handle_general_set): Handle QDisableRandomization.
7287 (handle_query): Likewise for qSupported.
7288 (main): Support --disable-randomization and --no-disable-randomization
7289 command line arguments.
7290 * target.h (struct target_ops): Add supports_disable_randomization.
7291 (target_supports_disable_randomization): New macro.
7292
7293 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7294
7295 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7296 ifdef check.
7297 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7298 [!PT_GETDSBT] (target_loadmap): New definition.
7299 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7300 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7301 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7302 and PT_GETDSBT to LINUX_LOADMAP.
7303 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7304 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7305
7306 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7307
7308 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7309 (arm_linux_hwbp_cap): New static variable.
7310 (arm_linux_get_hwbp_cap): Replace by ...
7311 (arm_linux_init_hwbp_cap): ... this new function.
7312 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7313 (arm_linux_get_hw_watchpoint_count): Likewise.
7314 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7315 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7316 (arm_prepare_to_resume): Use perror_with_name instead of error.
7317
7318 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7319
7320 * linux-arm-low.c: Include <signal.h>.
7321 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7322 (struct arm_linux_hwbp_cap): New data type.
7323 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7324 (struct arm_linux_hw_breakpoint): New data type.
7325 (MAX_BPTS, MAX_WPTS): Define.
7326 (struct arch_process_info, struct arch_lwp_info): New data types.
7327 (arm_linux_get_hwbp_cap): New function.
7328 (arm_linux_get_hw_breakpoint_count): Likewise.
7329 (arm_linux_get_hw_watchpoint_count): Likewise.
7330 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7331 (arm_hwbp_control_initialize): Likewise.
7332 (arm_hwbp_control_is_enabled): Likewise.
7333 (arm_hwbp_control_is_initialized): Likewise.
7334 (arm_hwbp_control_disable): Likewise.
7335 (arm_linux_hw_breakpoint_equal): Likewise.
7336 (arm_linux_hw_point_initialize): Likewise.
7337 (struct update_registers_data): New data structure.
7338 (update_registers_callback: New function.
7339 (arm_insert_point): Likewise.
7340 (arm_remove_point): Likewise.
7341 (arm_stopped_by_watchpoint): Likewise.
7342 (arm_stopped_data_address): Likewise.
7343 (arm_new_process): Likewise.
7344 (arm_new_thread): Likewise.
7345 (arm_prepare_to_resume): Likewise.
7346 (the_low_target): Register arm_insert_point, arm_remove_point,
7347 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7348 arm_new_thread, and arm_prepare_to_resume.
7349
7350 2011-09-15 Stan Shebs <stan@codesourcery.com>
7351
7352 * server.h (struct emit_ops): Add compare-goto fields.
7353 * tracepoint.c (gdb_agent_op_sizes): New table.
7354 (emit_eq_goto): New function.
7355 (emit_ne_goto): New function.
7356 (emit_lt_goto): New function.
7357 (emit_le_goto): New function.
7358 (emit_gt_goto): New function.
7359 (emit_ge_goto): New function.
7360 (is_goto_target): New function.
7361 (compile_bytecodes): Recognize special cases of compare-goto
7362 combinations and call specialized emitters for them.
7363 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7364 (amd64_emit_ne_goto): New function.
7365 (amd64_emit_lt_goto): New function.
7366 (amd64_emit_le_goto): New function.
7367 (amd64_emit_gt_goto): New function.
7368 (amd64_emit_ge_goto): New function.
7369 (amd64_emit_ops): Add the new functions.
7370 (i386_emit_eq_goto): New function.
7371 (i386_emit_ne_goto): New function.
7372 (i386_emit_lt_goto): New function.
7373 (i386_emit_le_goto): New function.
7374 (i386_emit_gt_goto): New function.
7375 (i386_emit_ge_goto): New function.
7376 (i386_emit_ops): Add the new functions.
7377
7378 2011-09-08 Stan Shebs <stan@codesourcery.com>
7379
7380 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7381 (i386_emit_epilogue): Restore %ebx.
7382
7383 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7384
7385 * server.c (step_thread): Remove definition.
7386 (process_serial_event): Don't handle Hs.
7387 * server.h (step_thread): Remove declaration.
7388 * target.c (set_desired_inferior): Remove use of step_thread.
7389
7390 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7391
7392 * linux-low.c: Include linux-procfs.h.
7393 (linux_attach_lwp_1): Update comments.
7394 (linux_attach): Scan for existing threads when attaching to a
7395 process that is the tgid.
7396 * Makefile.in: Update dependencies.
7397
7398 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7399
7400 * configure.srv: Add linux-procfs.o dependencies.
7401
7402 2011-08-14 Yao Qi <yao@codesourcery.com>
7403
7404 * target.h (struct target_ops): Fix indent.
7405 * win32-low.c (win32_target_ops): Fix comment.
7406
7407 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7408 Yao Qi <yao@codesourcery.com>
7409
7410 * Makefile.in (clean): Remove tic6x-*.c files.
7411 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7412 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7413 (tic6x-c64xp-linux.c): Likewise.
7414 * configure.srv: Add support for tic6x-*-uclinux.
7415 * linux-tic6x-low.c: New.
7416 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7417
7418 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7419 Yao Qi <yao@codesourcery.com>
7420
7421 * target.h (struct target_ops): Add read_loadmap.
7422 * linux-low.c (struct target_loadseg): New type.
7423 (struct target_loadmap): New type.
7424 (linux_read_loadmap): New function.
7425 (linux_target_ops): Add linux_read_loadmap.
7426 * server.c (handle_query): Support qXfer:fdpic:read packet.
7427 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7428 to NULL.
7429
7430 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7431
7432 * win32-low.c: Include <stdint.h>.
7433
7434 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7435
7436 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7437 to the inferior here.
7438 (i386_remove_aligned_watchpoint): Ditto.
7439 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7440 fit part of the watchpoint in the debug registers.
7441 (i386_update_inferior_debug_regs): New.
7442 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7443 registers, and only update the inferior on success.
7444 (i386_low_remove_watchpoint): Ditto.
7445
7446 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7447
7448 * linux-low.c (compare_ints, unique, list_threads, show_process,
7449 linux_core_of_thread): Delete.
7450 (linux_target_ops): Change linux_core_of_thread to
7451 linux_common_core_of_thread.
7452 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7453 * utils.c (malloc_failure): Change type of argument.
7454 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7455 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7456 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7457 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7458 (IPA_OBJS): Add common-utils-ipa.o.
7459 (ptid_h, linux_osdata_h): New macros.
7460 (server_h): Add common/common-utils.h, common/xml-utils.h,
7461 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7462 common/ptid.h.
7463 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7464 ptid.o, buffer.o): New rules.
7465 (linux-low.o): Add common/linux-osdata.h as a dependency.
7466 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7467 * configure.ac: Add AC_HEADER_DIRENT check.
7468 * config.in: Regenerate.
7469 * configure: Regenerate.
7470 * remote-utils.c (xml_escape_text): Delete.
7471 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7472 buffer_xml_printf): Move to common/buffer.c.
7473 * server.c (main): Remove call to initialize_inferiors.
7474 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7475 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7476 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7477 internal_error, gdb_assert, gdb_assert_fail): Delete.
7478 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7479 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7480 common/buffer.h.
7481 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7482 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7483 initialize_inferiors): Delete.
7484
7485 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7486
7487 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7488 symbol error.
7489
7490 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7491
7492 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7493 assertion.
7494 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7495
7496 2011-05-26 Yao Qi <yao@codesourcery.com>
7497
7498 * Makefile.in (thread-db.o): Track dependence to
7499 common/gdb_thread_db.h.
7500 * thread-db.c: include gdb_thread_db.h from right place.
7501
7502 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7503
7504 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7505 __FILE__ and __LINE__ to internal_error.
7506
7507 2011-05-13 Doug Evans <dje@google.com>
7508
7509 * thread-db.c (try_thread_db_load_from_sdir): New function.
7510 (try_thread_db_load_from_dir): New function.
7511 (thread_db_load_search): Handle $sdir, ignore $pdir.
7512 Remove trying of system directories if search of
7513 libthread-db-search-path fails, that is now done via $sdir.
7514
7515 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7516
7517 * server.c (handle_query): Add EnableDisableTracepoints to the list
7518 of supported features.
7519 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7520 tracepoints.
7521 (cmd_qtenable_disable): New.
7522 (cmd_qtstart): Install tracepoints even if disabled.
7523 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7524 receiving a QTEnable or QTDisable packet.
7525 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7526 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7527 tracepoints.
7528 (gdb_probe): Skip data collection if static tracepoint is disabled.
7529
7530 2011-05-10 Doug Evans <dje@google.com>
7531
7532 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7533
7534 2011-05-04 Doug Evans <dje@google.com>
7535
7536 * linux-low.c (linux_join): Skip process lookup.
7537 * spu-low.c (spu_join): Ditto.
7538 * server.c (join_inferiors_callback): Delete.
7539 (process_serial_event): For 'D' packet (detach) call join_inferior
7540 directly.
7541
7542 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7543
7544 * README: Don't mention xscale*-*-linux*.
7545 * configure.srv (xscale*-*-linux*): Don't handle target.
7546
7547 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7548
7549 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7550 casting pointers.
7551 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7552 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7553 (i386_emit_void_call_2): Likewise.
7554
7555 2011-04-26 Yao Qi <yao@codesourcery.com>
7556
7557 * linux-low.c: Move common macros to linux-ptrace.h.
7558 Include linux-ptrace.h.
7559 * Makefile.in (linux_ptrace_h): New.
7560 (linux-low.o): Depends on linux-ptrace.h.
7561
7562 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7563
7564 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7565 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7566 (remote_prepare): New function with most of the TCP code from ...
7567 (remote_open): ... here. Detect PORT here unconditionally. Move also
7568 setting transport_is_reliable.
7569 * server.c (run_once): New variable.
7570 (gdbserver_usage): Document it.
7571 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7572 the first run if RUN_ONCE.
7573 * server.h (run_once, remote_prepare): New declarations.
7574
7575 2011-04-19 Tom Tromey <tromey@redhat.com>
7576
7577 * win32-low.c (handle_load_dll): Remove duplicate "the".
7578
7579 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7580
7581 Remove support for old Cygwin 1.5 versions.
7582 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7583 function to avoid warning.
7584 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7585 warning.
7586
7587 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7588
7589 * gdbserver/server.h (Macro _): Define it if not available.
7590
7591 2011-03-14 Michael Snyder <msnyder@vmware.com>
7592
7593 * hostio.c (handle_close): Remove unnecessary null test.
7594
7595 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7596
7597 * Makefile.in (maintainer-clean realclean distclean): Remove
7598 "make ... subdir_do" command.
7599
7600 2011-03-10 Michael Snyder <msnyder@vmware.com>
7601
7602 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7603
7604 * server.c (handle_v_run): Free alloced buffer on early return.
7605
7606 2011-03-09 Yao Qi <yao@codesourcery.com>
7607
7608 Revert:
7609 2011-03-04 Yao Qi <yao@codesourcery.com>
7610
7611 * Makefile.in: Remove GNU make feature --directory.
7612
7613 2011-03-05 Yao Qi <yao@codesourcery.com>
7614
7615 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7616 (subdir_do): New make target. Copied from gdb/Makefile.
7617 (maintainer-clean, realclean, distclean, clean): Call corresponding
7618 make targets in common/Makefile.
7619
7620 2011-02-11 Yao Qi <yao@codesourcery.com>
7621
7622 * configure.ac: Call AC_PROG_RANLIB.
7623 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7624 * configure: Regenerate.
7625
7626 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7627
7628 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7629
7630 2011-03-06 Yao Qi <yao@codesourcery.com>
7631
7632 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7633
7634 2011-03-05 Yao Qi <yao@codesourcery.com>
7635
7636 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7637 (subdir_do): New make target. Copied from gdb/Makefile.
7638 (maintainer-clean, realclean, distclean, clean): Call corresponding
7639 make targets in common/Makefile.
7640
7641 2011-03-04 Yao Qi <yao@codesourcery.com>
7642
7643 * Makefile.in: Remove GNU make feature --directory.
7644
7645 2011-03-04 Michael Snyder <msnyder@vmware.com>
7646
7647 * server.c (queue_stop_reply): Call xmalloc not malloc.
7648
7649 2011-03-02 Michael Snyder <msnyder@vmware.com>
7650
7651 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7652
7653 2011-02-28 Michael Snyder <msnyder@vmware.com>
7654
7655 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7656 (cmd_qtframe): Ditto.
7657 (cmd_qtbuffer): Ditto.
7658 (cmd_bigqtbuffer): Ditto.
7659
7660 * utils.c (decimal2str): Initialize 'width' to nine, then
7661 don't mess with it.
7662
7663 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7664
7665 * hostio.c (require_data): Free *data, not data.
7666
7667 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7668
7669 * hostio.c (require_data): Use free, not xfree.
7670
7671 2011-02-27 Michael Snyder <msnyder@vmware.com>
7672
7673 * server.c (handle_query): Discard unused value.
7674
7675 * hostio.c (require_data): Free malloc memory before returning
7676 error.
7677
7678 2011-02-26 Michael Snyder <msnyder@vmware.com>
7679
7680 * linux-low.c (list_threads): Call closedir for dirent.
7681
7682 2011-02-27 Michael Snyder <msnyder@vmware.com>
7683
7684 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7685 a case statement falls through.
7686
7687 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7688
7689 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7690 in comparison.
7691
7692 2011-02-26 Michael Snyder <msnyder@vmware.com>
7693
7694 * utils.c (decimal2str): Eliminate dead code and dead param.
7695 (pulongest): Drop dead param from call to decimal2str.
7696 (plongest): Ditto.
7697
7698 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7699
7700 Revert the following patch (not approved yet):
7701 2011-02-21 Hui Zhu <teawater@gmail.com>
7702 * tracepoint.c (tp_printf): New function.
7703 (eval_agent_expr): Handle gdb_agent_op_printf.
7704
7705 2011-02-21 Hui Zhu <teawater@gmail.com>
7706
7707 * tracepoint.c (tp_printf): New function.
7708 (eval_agent_expr): Handle gdb_agent_op_printf.
7709
7710 2011-02-18 Tom Tromey <tromey@redhat.com>
7711
7712 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7713 (tracepoint.o): Likewise.
7714 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7715 (gdb_agent_op_names): Likewise.
7716
7717 2011-02-18 Tom Tromey <tromey@redhat.com>
7718
7719 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7720 gdb_agent_op_rot>: New constants.
7721 (gdb_agent_op_names): Add pick and roll.
7722 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7723 cases.
7724
7725 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7726
7727 * aclocal.m4: Regenerated with aclocal-1.11.1.
7728
7729 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7730
7731 * server.c (handle_qxfer_traceframe_info): New.
7732 (qxfer_packets): Register "traceframe-info".
7733 (handle_query): Report support for qXfer:traceframe-info:read+.
7734 * tracepoint.c (match_blocktype): New.
7735 (traceframe_find_block_type): Rename to ...
7736 (traceframe_walk_blocks): ... this. Add callback filter argument,
7737 and use it.
7738 (traceframe_find_block_type): New, reimplemented on top of
7739 traceframe_walk_blocks.
7740 (build_traceframe_info_xml): New.
7741 (traceframe_read_info): New.
7742 * server.h (traceframe_read_info): Declare.
7743
7744 2011-02-11 Yao Qi <yao@codesourcery.com>
7745
7746 * configure.ac: Call AC_PROG_RANLIB.
7747 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7748 * configure: Regenerate.
7749
7750 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7751
7752 * server.c (gdb_read_memory): Change return semantics to allow
7753 partial transfers.
7754 (handle_search_memory_1): Adjust.
7755 (process_serial_event) <'m' packet>: Handle partial transfers.
7756 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7757
7758 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7759
7760 * regcache.c (init_register_cache): Initialize
7761 regcache->register_status.
7762 (free_register_cache): Release regcache->register_status.
7763 (regcache_cpy): Copy register_status.
7764 (registers_to_string): Print 'x's for unavailable registers.
7765 (supply_register): Mark the register's status valid or
7766 unavailable, depending on whether a buffer was passed in or not.
7767 (supply_register_zeroed): New.
7768 (supply_regblock): Mark the registers' status valid or
7769 unavailable, depending on whether a buffer was passed in or not.
7770 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7771 (struct regcache): New `register_status' field.
7772 (supply_register_zeroed): Declare.
7773 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7774 supply_register_zeroed, rather than passing a NULL buffer to
7775 supply_register.
7776 * tracepoint.c (fetch_traceframe_registers): Update comment.
7777
7778 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7779
7780 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7781 buffer explicit.
7782
7783 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7784
7785 * server.h (decode_xfer_write): Change prototype.
7786 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7787 and don't extract the annex here.
7788 * server.c (decode_xfer_read): Remove `annex' parameter,
7789 and don't extract the annex here.
7790 (decode_xfer): New.
7791 (struct qxfer): New.
7792 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7793 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7794 (handle_qxfer_statictrace): New functions, abstracted out from
7795 handle_query, and made to use the struct qxfer interface.
7796 (handle_threads_qxfer_proper): Rename to ...
7797 (handle_qxfer_threads_proper): ... this.
7798 (handle_threads_qxfer): Rename to ...
7799 (handle_qxfer_threads): ... this. Adjust.
7800 (qxfer_packets): New array.
7801 (handle_qxfer): New function.
7802 (handle_query): Use handle_qxfer.
7803
7804 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7805
7806 * gdbreplay.c: Shorten lines of >= 80 columns.
7807 * linux-low.c: Ditto.
7808 * linux-ppc-low.c: Ditto.
7809 * linux-s390-low.c: Ditto.
7810 * linux-sparc-low.c: Ditto.
7811 * linux-x86-low.c: Ditto.
7812 * linux-xtensa-low.c: Ditto.
7813 * mem-break.c: Ditto.
7814 * nto-low.c: Ditto.
7815 * regcache.h: Ditto.
7816 * remote-utils.c: Ditto.
7817 * server.c: Ditto.
7818 * server.h: Ditto.
7819 * thread-db.c: Ditto.
7820 * tracepoint.c: Ditto.
7821 * utils.c: Ditto.
7822 * win32-low.h: Ditto.
7823
7824 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7825
7826 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7827 update.
7828
7829 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7830
7831 * server.c (gdbserver_version): Update copyright year in version
7832 output.
7833 * gdbreplay.c (gdbreplay_version): Ditto.
7834
7835 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7836
7837 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7838 * linux-bfin-low.c: New file.
7839 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7840 PT_DATA_ADDR for BFIN targets.
7841 * Makefile.in (SFILES): Add linux-bfin-low.c.
7842 (clean): Remove reg-bfin.c.
7843 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7844 * README: Mention supported Blackfin targets.
7845
7846 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7847
7848 * .gitignore: New file.
7849
7850 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7851
7852 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7853
7854 2010-10-22 Jie Zhang <jie@codesourcery.com>
7855
7856 * Makefile.in: Add FLAGS_TO_PASS variable.
7857 (install): Remove dependency of install-only and recursively
7858 invoke make for install-only.
7859
7860 2010-10-04 Doug Evans <dje@google.com>
7861
7862 * Makefile.in (uninstall): Use $(DESTDIR).
7863
7864 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7865
7866 PR gdb/11842
7867
7868 * linux-x86-low.c (compat_siginfo_from_siginfo)
7869 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7870 si_code is < 0. Check for si_code == SI_TIMER before checking for
7871 si_code < 0.
7872
7873 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7874
7875 * lynx-i386-low.c: New file.
7876 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7877
7878 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7879
7880 * lynx-low.c (ptrace_request_to_str): Remove handling for
7881 request values that have been removed in LynxOS 5.x.
7882
7883 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7884
7885 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7886 <ptrace.h>
7887
7888 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7889
7890 * configure.ac: Add --enable-inprocess-agent option.
7891 * configure: Rebuilt.
7892
7893 2010-09-06 Yao Qi <yao@codesourcery.com>
7894
7895 * linux-low.c (linux_kill): Remove unused variable.
7896 (linux_stabilize_threads): Likewise.
7897 * server.c (start_inferior): Likewise.
7898 (queue_stop_reply_callback): Likewise.
7899 * tracepoint.c (do_action_at_tracepoint): Likewise.
7900
7901 2010-09-06 Yao Qi <yao@codesourcery.com>
7902
7903 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7904 on return.
7905
7906 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7907
7908 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7909
7910 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7911
7912 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7913 "$(IPA_DEPFILES)".
7914
7915 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7916
7917 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7918 gdbserver/lynx-ppc-low.c: New files.
7919 * Makefile.in (lynx_low_h): New variable.
7920 (lynx-low.o, lynx-ppc-low.o): New rules.
7921 * configure.ac: On LynxOS, link with -lnetinet.
7922 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7923 * configure: regenerate.
7924
7925 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7926
7927 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7928 * configure.ac: Add check for vasprintf and vsnprintf.
7929 * configure, config.in: Regenerate.
7930 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7931
7932 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7933
7934 * gdbreplay.c: Move include of alloca.h up, next to include of
7935 malloc.h.
7936 * server.h: Add include of malloc.h.
7937 * mem-break.c: Remove include of malloc.h.
7938 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7939
7940 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7941
7942 * Makefile.in (memmem.o): Build with -Wno-error.
7943
7944 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7945
7946 * utils.c (xsnprintf): Make non-static.
7947 * server.h: Add xsnprintf declaration.
7948 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7949 replace calls to snprintf by calls to xsnprintf throughout.
7950
7951 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7952
7953 * configure.ac: Add configure check for alloca.
7954 * configure, config.in: Regenerate.
7955 * server.h: Include alloca.h if it exists.
7956 * gdbreplay.c: Include alloca.h if it exists.
7957
7958 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7959
7960 * linux-low.c (__SIGRTMIN): Define if not already defined.
7961 (linux_create_inferior): Check for __ANDROID__ rather than
7962 __SIGRTMIN.
7963 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7964 are already deferred.
7965 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7966 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7967 stopped and already has a pending signal to report.
7968 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7969 a pending signal to report or is moving out of a jump pad.
7970 (linux_init_signals): Check for __ANDROID__ rather than
7971 __SIGRTMIN.
7972
7973 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7974
7975 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7976 debug_threads check. Avoid a linear search when not doing debug
7977 output.
7978
7979 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7980
7981 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7982 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7983 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7984 (process_event): Change local fd's type to gdb_fildes_t.
7985 (create_file_handler): Adjust prototype.
7986 (delete_file_handler): Adjust prototype.
7987 (handle_file_event): Adjust prototype. Use pfildes.
7988 (create_file_event): Adjsut prototype.
7989 * remote-utils.c (remote_desc, listen_desc): Change type to
7990 gdb_fildes_t.
7991 * server.h: New gdb_fildes_t typedef.
7992 [USE_WIN32API]: Include winsock2.h.
7993 (delete_file_handler, add_file_handler): Adjust prototypes.
7994 (pfildes): Declare.
7995 * utils.c (pfildes): New.
7996
7997 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7998
7999 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8000 * configure: Regenerate.
8001
8002 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8003
8004 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8005 (linux_done_accessing_memory): ... this.
8006 (linux_target_ops): Adjust.
8007 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8008 * nto-low.c (nto_target_ops): Adjust comment.
8009 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8010 * spu-low.c (spu_target_ops): Adjust comment.
8011 * target.h (target_ops): Rename unprepare_to_access_memory field
8012 to done_accessing_memory.
8013 (unprepare_to_access_memory): Rename to ...
8014 (done_accessing_memory): ... this.
8015
8016 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8017
8018 * linux-low.c (linux_prepare_to_access_memory): New.
8019 (linux_unprepare_to_access_memory): New.
8020 (linux_target_ops): Install them.
8021 * server.c (read_memory): Rename to ...
8022 (gdb_read_memory): ... this. Use
8023 prepare_to_access_memory/prepare_to_access_memory.
8024 (write_memory): Rename to ...
8025 (gdb_write_memory): ... this. Use
8026 prepare_to_access_memory/prepare_to_access_memory.
8027 (handle_search_memory_1): Adjust.
8028 (process_serial_event): Adjust.
8029 * target.h (struct target_ops): New fields
8030 prepare_to_access_memory and unprepare_to_access_memory.
8031 (prepare_to_access_memory, unprepare_to_access_memory): New.
8032 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8033 prepare_to_access_memory/prepare_to_access_memory.
8034 * nto-low.c (nto_target_ops): Adjust.
8035 * spu-low.c (spu_target_ops): Adjust.
8036 * win32-low.c (win32_target_ops): Adjust.
8037
8038 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8039
8040 * Makefile.in (WARN_CFLAGS): Get it from configure.
8041 (WERROR_CFLAGS): New.
8042 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8043 * configure.ac: Introduce --enable-werror, which adds -Werror to
8044 the compiler command line. Enabled by default. Disable with
8045 --disable-werror. Add -Wdeclaration-after-statement
8046 Wpointer-arith and -Wformat-nonliteral to warning flags.
8047 * configure: Regenerate.
8048
8049 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8050
8051 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8052
8053 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8054
8055 * gdbreplay.c (remote_error): New.
8056 (gdbchar): New.
8057 (expect): Use gdbchar. Check for error reading from GDB.
8058 Clarify sync error output.
8059 (play): Check for errors writing to GDB.
8060 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8061 * remote-utils.c (getpkt): Check for errors writing to the remote
8062 descriptor.
8063
8064 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8065
8066 * linux-low.c (linux_wait_1): Move non-debugging code out of
8067 `debug_threads' control.
8068
8069 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8070
8071 * linux-low.c (linux_wait_1): Don't set last_status here.
8072 * server.c (push_event, queue_stop_reply_callback): Assert we're
8073 not pushing a TARGET_WAITKIND_IGNORE event.
8074 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8075 (myresume, handle_target_event): Set the thread's last_resume_kind
8076 and last_status from the target returned status.
8077
8078 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8079
8080 PR threads/10729
8081
8082 * linux-x86-low.c (update_debug_registers_callback): New.
8083 (i386_dr_low_set_addr): Use it.
8084 (i386_dr_low_get_addr): New.
8085 (i386_dr_low_set_control): Use update_debug_registers_callback.
8086 (i386_dr_low_get_control): New.
8087 (i386_dr_low_get_status): Adjust.
8088 * linux-low.c (linux_stop_lwp): New.
8089 * linux-low.h (linux_stop_lwp): Declare.
8090
8091 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8092 argument instead of a i386_debug_reg_state.
8093 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8094 a i386_debug_reg_state.
8095 (i386_insert_aligned_watchpoint): Adjust.
8096 (i386_remove_aligned_watchpoint): Adjust.
8097 (i386_low_stopped_data_address): Read the debug registers from the
8098 inferior instead of from the mirrors.
8099 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8100 (i386_dr_low_get_addr): Declare.
8101 (i386_dr_low_get_control): Declare.
8102 (i386_dr_low_get_status): Change prototype.
8103
8104 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8105 (i386_dr_low_get_addr): New.
8106 (i386_dr_low_get_control): New.
8107 (i386_dr_low_get_status): Adjust prototype. Return
8108 dr_status_mirror.
8109 (i386_initial_stuff): Clear dr_status_mirror and
8110 dr_control_mirror.
8111 (i386_get_thread_context): Adjust.
8112 (i386_set_thread_context): Adjust.
8113 (i386_thread_added): Adjust.
8114
8115 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8116
8117 * linux-low.h (linux_thread_area): Delete declaration.
8118
8119 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8120
8121 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8122 after its termination.
8123
8124 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8125
8126 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8127 (gdb_wants_all_stopped): Delete.
8128 (linux_wait_1): Don't call them.
8129 * server.c (handle_v_cont): Tag all threads as want-stopped.
8130 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8131 stopped as "client-wants-stopped".
8132
8133 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8134
8135 * Makefile.in (signals_h): New.
8136 (server_h): Depend on it.
8137 (server.o): Don't depend on $(signals_def).
8138 (signals.o): Depend on $(signals_def).
8139
8140 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8141
8142 * Makefile.in (signals_def): New.
8143 (server_h): Append include/gdb/signals.h and signals_def.
8144 (server.o): Append signals_def.
8145
8146 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8147
8148 * server.c (handle_target_event): Use target_signal_to_host for
8149 resume_info.sig initialization.
8150 * target.h (struct thread_resume) <sig>: New comment.
8151
8152 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8153
8154 * server.c (handle_query): strcpy() the returned string from paddress()
8155 instead of sprintf().
8156 * utils.c (paddress): Return phex_nz().
8157
8158 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8159
8160 * server.c (handle_v_cont): Call mourn_inferior if process
8161 just exited.
8162 (myresume): Likewise.
8163
8164 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8165
8166 Static tracepoints, and integration with UST.
8167
8168 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8169 * mem-break.c (uninsert_all_breakpoints)
8170 (reinsert_all_breakpoints): New.
8171 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8172 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8173 (gdb_agent_ust_loaded, helper_thread_id)
8174 (gdb_agent_helper_thread_id): New macros.
8175 (struct ipa_sym_addresses): Add addr_ust_loaded,
8176 addr_helper_thread_id, addr_cmd_buf.
8177 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8178 (in_process_agent_loaded_ust): New.
8179 (write_e_ust_not_loaded): New.
8180 (maybe_write_ipa_ust_not_loaded): New.
8181 (struct collect_static_trace_data_action): New.
8182 (enum tracepoint_type) <static_tracepoint>: New.
8183 (struct tracepoint) <handle>: Mention static tracepoints.
8184 (struct static_tracepoint_ctx): New.
8185 (CMD_BUF_SIZE): New.
8186 (add_tracepoint_action): Handle static tracepoint actions.
8187 (unprobe_marker_at): New.
8188 (clear_installed_tracepoints): Handle static tracepoints.
8189 (cmd_qtdp): Handle static tracepoints.
8190 (probe_marker_at): New.
8191 (cmd_qtstart): Handle static tracepoints.
8192 (response_tracepoint): Handle static tracepoints.
8193 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8194 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8195 (get_context_regcache): Handle static tracepoints.
8196 (do_action_at_tracepoint): Handle static tracepoint actions.
8197 (traceframe_find_block_type): Handle static trace data blocks.
8198 (traceframe_read_sdata): New.
8199 (download_tracepoints): Download static tracepoint actions.
8200 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8201 (GDB_PROBE_NAME): New.
8202 (ust_ops): New.
8203 (GET_UST_SYM): New.
8204 (USTF): New.
8205 (dlsym_ust): New.
8206 (ust_marker_to_static_tracepoint): New.
8207 (gdb_probe): New.
8208 (collect_ust_data_at_tracepoint): New.
8209 (gdb_ust_probe): New.
8210 (UNIX_PATH_MAX, SOCK_DIR): New.
8211 (gdb_ust_connect_sync_socket): New.
8212 (resume_thread, stop_thread): New.
8213 (run_inferior_command): New.
8214 (init_named_socket): New.
8215 (gdb_ust_socket_init): New.
8216 (cstr_to_hexstr): New.
8217 (next_st): New.
8218 (first_marker, next_marker): New.
8219 (response_ust_marker): New.
8220 (cmd_qtfstm, cmd_qtsstm): New.
8221 (unprobe_marker_at, probe_marker_at): New.
8222 (cmd_qtstmat, gdb_ust_thread): New.
8223 (gdb_ust_init): New.
8224 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8225 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8226 (ST_REGENTRY): New.
8227 (x86_64_st_collect_regmap): New.
8228 (X86_64_NUM_ST_COLLECT_GREGS): New.
8229 (AMD64_RIP_REGNUM): New.
8230 (supply_static_tracepoint_registers): New.
8231 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8232 (ST_REGENTRY): New.
8233 (i386_st_collect_regmap): New.
8234 (i386_NUM_ST_COLLECT_GREGS): New.
8235 (supply_static_tracepoint_registers): New.
8236 * server.c (handle_query): Handle qXfer:statictrace:read.
8237 <qSupported>: Report support for StaticTracepoints, and
8238 qXfer:statictrace:read features.
8239 * server.h (traceframe_read_sdata)
8240 (supply_static_tracepoint_registers): Declare.
8241 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8242 (unpack_varlen_hex): Include in IPA build.
8243 * Makefile.in (ustlibs, ustinc): New.
8244 (IPA_OBJS): Add remote-utils-ipa.o.
8245 ($(IPA_LIB)): Link -ldl and -lpthread.
8246 (UST_CFLAGS): New.
8247 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8248 * config.in, configure: Regenerate.
8249
8250 2010-06-20 Ian Lance Taylor <iant@google.com>
8251 Pedro Alves <pedro@codesourcery.com>
8252
8253 * linux-x86-low.c (always_true): Delete.
8254 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8255 trying to fool the compiler with always_true.
8256
8257 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8258
8259 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8260 conditions in gdbserver.
8261
8262 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8263
8264 * spu-low.c (spu_read_memory): Wrap around local store limit.
8265 (spu_write_memory): Likewise.
8266
8267 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8268
8269 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8270 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8271 LONGEST uses.
8272 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8273 uses.
8274 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8275 uses with LONGEST uses.
8276
8277 2010-06-14 Stan Shebs <stan@codesourcery.com>
8278 Pedro Alves <pedro@codesourcery.com>
8279
8280 Bytecode compiler.
8281
8282 * linux-x86-low.c: Include limits.h.
8283 (add_insns): New.
8284 (always_true): New.
8285 (EMIT_ASM): New.
8286 (EMIT_ASM32): New.
8287 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8288 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8289 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8290 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8291 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8292 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8293 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8294 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8295 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8296 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8297 (amd64_emit_void_call_2): New.
8298 (amd64_emit_ops): New.
8299 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8300 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8301 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8302 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8303 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8304 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8305 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8306 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8307 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8308 (i386_emit_stack_adjust, i386_emit_int_call_1)
8309 (i386_emit_void_call_2): New.
8310 (i386_emit_ops): New.
8311 (x86_emit_ops): New.
8312 (the_low_target): Install x86_emit_ops.
8313 * server.h (struct emit_ops): New.
8314 (get_raw_reg_func_addr): Declare.
8315 (current_insn_ptr, emit_error): Declare.
8316 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8317 (set_trace_state_variable_value): New defines.
8318 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8319 addr_get_trace_state_variable_value and
8320 addr_set_trace_state_variable_value.
8321 (symbol_list): New fields for get_raw_reg,
8322 get_trace_state_variable_value and set_trace_state_variable_value.
8323 (condfn): New typedef.
8324 (struct tracepoint): New field `compiled_cond'.
8325 (do_action_at_tracepoint): Clear compiled_cond.
8326 (get_trace_state_variable_value, set_trace_state_variable_value):
8327 Export in the IPA.
8328 (condition_true_at_tracepoint): If there's a compiled condition,
8329 run that.
8330 (current_insn_ptr, emit_error): New globals.
8331 (struct bytecode_address): New.
8332 (get_raw_reg_func_addr): New.
8333 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8334 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8335 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8336 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8337 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8338 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8339 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8340 (compile_tracepoint_condition, compile_bytecodes): New.
8341 * target.h (emit_ops): Forward declare.
8342 (struct target_ops): New field emit_ops.
8343 (target_emit_ops): New.
8344 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8345 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8346 * linux-low.c (linux_emit_ops): New.
8347 (linux_target_ops): Install it.
8348 * linux-low.h (struct linux_target_ops): New field emit_ops.
8349
8350 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8351
8352 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8353 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8354
8355 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8356 Stan Shebs <stan@codesourcery.com>
8357
8358 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8359 (all): Depend on $(extra_libraries).
8360 (install-only): Install the IPA.
8361 (IPA_OBJS, IPA_LIB): New.
8362 (clean): Remove the IPA lib.
8363 (IPAGENT_CFLAGS): New.
8364 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8365 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8366 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8367 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8368 * configure.ac: Check for atomic builtins support in the compiler.
8369 (IPA_DEPFILES, extra_libraries): Define.
8370 * configure.srv (ipa_obj): Add description.
8371 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8372 (i[34567]86-*-linux*): Set ipa_obj.
8373 (x86_64-*-linux*): Set ipa_obj.
8374 * linux-low.c (stabilizing_threads): New.
8375 (supports_fast_tracepoints): New.
8376 (linux_detach): Stabilize threads before detaching.
8377 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8378 the lwp is either not stabilizing, or is moving out of a jump pad.
8379 (linux_fast_tracepoint_collecting): New.
8380 (maybe_move_out_of_jump_pad): New.
8381 (enqueue_one_deferred_signal): New.
8382 (dequeue_one_deferred_signal): New.
8383 (linux_wait_for_event_1): If moving out of a jump pad, defer
8384 pending signals to later.
8385 (linux_stabilize_threads): New.
8386 (linux_wait_1): Check if threads need moving out of jump pads, and
8387 do it if so.
8388 (stuck_in_jump_pad_callback): New.
8389 (move_out_of_jump_pad_callback): New.
8390 (lwp_running): New.
8391 (linux_resume_one_lwp): Handle moving out of jump pads.
8392 (linux_set_resume_request): Dequeue deferred signals.
8393 (need_step_over_p): Also step over fast tracepoint jumps.
8394 (start_step_over): Also uninsert fast tracepoint jumps.
8395 (finish_step_over): Also reinsert fast tracepoint jumps.
8396 (linux_install_fast_tracepoint_jump): New.
8397 (linux_target_ops): Install linux_stabilize_threads and
8398 linux_install_fast_tracepoint_jump_pad.
8399 * linux-low.h (linux_target_ops) <get_thread_area,
8400 install_fast_tracepoint_jump_pad>: New fields.
8401 (struct lwp_info) <collecting_fast_tracepoint,
8402 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8403 (linux_get_thread_area): Declare.
8404 * linux-x86-low.c (jump_insn): New.
8405 (x86_get_thread_area): New.
8406 (append_insns): New.
8407 (push_opcode): New.
8408 (amd64_install_fast_tracepoint_jump_pad): New.
8409 (i386_install_fast_tracepoint_jump_pad): New.
8410 (x86_install_fast_tracepoint_jump_pad): New.
8411 (the_low_target): Install x86_get_thread_area and
8412 x86_install_fast_tracepoint_jump_pad.
8413 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8414 (struct fast_tracepoint_jump): New.
8415 (fast_tracepoint_jump_insn): New.
8416 (fast_tracepoint_jump_shadow): New.
8417 (find_fast_tracepoint_jump_at): New.
8418 (fast_tracepoint_jump_here): New.
8419 (delete_fast_tracepoint_jump): New.
8420 (set_fast_tracepoint_jump): New.
8421 (uninsert_fast_tracepoint_jumps_at): New.
8422 (reinsert_fast_tracepoint_jumps_at): New.
8423 (set_breakpoint_at): Use write_inferior_memory.
8424 (uninsert_raw_breakpoint): Use write_inferior_memory.
8425 (check_mem_read): Mask out fast tracepoint jumps.
8426 (check_mem_write): Mask out fast tracepoint jumps.
8427 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8428 (set_fast_tracepoint_jump): Declare.
8429 (delete_fast_tracepoint_jump)
8430 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8431 (reinsert_fast_tracepoint_jumps_at): Declare.
8432 * regcache.c: Don't compile many functions when building the
8433 in-process agent library.
8434 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8435 the register buffer in the heap.
8436 (free_register_cache): If the register buffer isn't owned by the
8437 regcache, don't free it.
8438 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8439 pre-existing register caches.
8440 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8441 type.
8442 (convert_ascii_to_int): : Constify `from' parameter type.
8443 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8444 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8445 the needed buffer in-place.
8446 (relocate_instruction): New.
8447 * server.c (handle_query) <qSymbols>: If the target supports
8448 tracepoints, give it a chance of looking up symbols. Report
8449 support for fast tracepoints.
8450 (handle_status): Stabilize threads.
8451 (process_serial_event): Adjust.
8452 * server.h (struct fast_tracepoint_jump): Forward declare.
8453 (struct process_info) <fast_tracepoint_jumps>: New field.
8454 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8455 (decode_X_packet, decode_M_packet): Adjust.
8456 (relocate_instruction): Declare.
8457 (in_process_agent_loaded): Declare.
8458 (tracepoint_look_up_symbols): Declare.
8459 (struct fast_tpoint_collect_status): Declare.
8460 (fast_tracepoint_collecting): Declare.
8461 (force_unlock_trace_buffer): Declare.
8462 (handle_tracepoint_bkpts): Declare.
8463 (initialize_low_tracepoint)
8464 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8465 * target.h (struct target_ops) <stabilize_threads,
8466 install_fast_tracepoint_jump_pad>: New fields.
8467 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8468 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8469 [HAVE_STDINT_H]: Include stdint.h.
8470 (trace_debug_1): Rename to ...
8471 (trace_vdebug): ... this.
8472 (trace_debug): Rename to ...
8473 (trace_debug_1): ... this. Add `level' parameter.
8474 (trace_debug): New.
8475 (ATTR_USED, ATTR_NOINLINE): New.
8476 (IP_AGENT_EXPORT): New.
8477 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8478 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8479 (about_to_request_buffer_space, trace_buffer_is_full)
8480 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8481 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8482 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8483 (traceframe_write_count, traceframes_created)
8484 (trace_state_variables)
8485 New renaming defines.
8486 (struct ipa_sym_addresses): New.
8487 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8488 (symbol_list): New.
8489 (ipa_sym_addrs): New.
8490 (all_tracepoint_symbols_looked_up): New.
8491 (in_process_agent_loaded): New.
8492 (write_e_ipa_not_loaded): New.
8493 (maybe_write_ipa_not_loaded): New.
8494 (tracepoint_look_up_symbols): New.
8495 (debug_threads) [IN_PROCESS_AGENT]: New.
8496 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8497 (UNKNOWN_SIDE_EFFECTS): New.
8498 (stop_tracing): New.
8499 (flush_trace_buffer): New.
8500 (stop_tracing_bkpt): New.
8501 (flush_trace_buffer_bkpt): New.
8502 (read_inferior_integer): New.
8503 (read_inferior_uinteger): New.
8504 (read_inferior_data_pointer): New.
8505 (write_inferior_data_pointer): New.
8506 (write_inferior_integer): New.
8507 (write_inferior_uinteger): New.
8508 (struct collect_static_trace_data_action): Delete.
8509 (enum tracepoint_type): New.
8510 (struct tracepoint) <type>: New field `type'.
8511 <actions_str, step_actions, step_actions_str>: Only include in
8512 GDBserver.
8513 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8514 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8515 (tracepoints): Use IP_AGENT_EXPORT.
8516 (last_tracepoint): Don't include in the IPA.
8517 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8518 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8519 (alloced_trace_state_variables): New.
8520 (trace_state_variables): Use IP_AGENT_EXPORT.
8521 (traceframe_t): Delete unused variable.
8522 (circular_trace_buffer): Don't include in the IPA.
8523 (trace_buffer_start): Delete.
8524 (struct trace_buffer_control): New.
8525 (trace_buffer_free): Delete.
8526 (struct ipa_trace_buffer_control): New.
8527 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8528 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8529 New.
8530 (trace_buffer_ctrl): New.
8531 (TRACE_BUFFER_CTRL_CURR): New.
8532 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8533 Reimplement as macros.
8534 (trace_buffer_wrap): Delete.
8535 (traceframe_write_count, traceframe_read_count)
8536 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8537 (struct tracepoint_hit_ctx) <type>: New field.
8538 (struct fast_tracepoint_ctx): New.
8539 (memory_barrier): New.
8540 (cmpxchg): New.
8541 (record_tracepoint_error): Update atomically in the IPA.
8542 (clear_inferior_trace_buffer): New.
8543 (about_to_request_buffer_space): New.
8544 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8545 updating the same buffer.
8546 (add_tracepoint): Default the tracepoint's type to trap
8547 tracepoint, and orig_size to -1.
8548 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8549 internal variables.
8550 (create_trace_state_variable): New parameter `gdb'. Handle it.
8551 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8552 (cmd_qtdp): Handle fast tracepoints.
8553 (cmd_qtdv): Adjust.
8554 (max_jump_pad_size): New.
8555 (gdb_jump_pad_head): New.
8556 (get_jump_space_head): New.
8557 (claim_jump_space): New.
8558 (sort_tracepoints): New.
8559 (MAX_JUMP_SIZE): New.
8560 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8561 IPA.
8562 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8563 support. Upload fast traceframes, and delete internal IPA
8564 breakpoints.
8565 (stop_tracing_handler): New.
8566 (flush_trace_buffer_handler): New.
8567 (cmd_qtstop): Upload fast tracepoints.
8568 (response_tracepoint): Handle fast tracepoints.
8569 (tracepoint_finished_step): Upload fast traceframes. Set the
8570 tracepoint hit context's tracepoint type.
8571 (handle_tracepoint_bkpts): New.
8572 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8573 type. Add comment about fast tracepoints.
8574 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8575 non-existing action_str field.
8576 (get_context_regcache): Handle fast tracepoints.
8577 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8578 to the regcache.
8579 (fast_tracepoint_from_jump_pad_address): New.
8580 (fast_tracepoint_from_ipa_tpoint_address): New.
8581 (collecting_t): New.
8582 (force_unlock_trace_buffer): New.
8583 (fast_tracepoint_collecting): New.
8584 (collecting): New.
8585 (gdb_collect): New.
8586 (write_inferior_data_ptr): New.
8587 (target_tp_heap): New.
8588 (target_malloc): New.
8589 (download_agent_expr): New.
8590 (UALIGN): New.
8591 (download_tracepoints): New.
8592 (download_trace_state_variables): New.
8593 (upload_fast_traceframes): New.
8594 (IPA_FIRST_TRACEFRAME): New.
8595 (IPA_NEXT_TRACEFRAME_1): New.
8596 (IPA_NEXT_TRACEFRAME): New.
8597 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8598 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8599 (gdb_jump_pad_buffer_end): New.
8600 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8601 (initialize_tracepoint): Adjust.
8602 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8603 buffer. Initialize the low module.
8604 * utils.c (PREFIX, TOOLNAME): New.
8605 (malloc_failure): Use PREFIX.
8606 (error): In the IPA, an error causes an exit.
8607 (fatal, warning): Use PREFIX.
8608 (internal_error): Use TOOLNAME.
8609 (NUMCELLS): Increase to 10.
8610 * configure, config.in: Regenerate.
8611
8612 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8613
8614 * server.c (handle_query) <qSupported>: Do two passes over the
8615 qSupported string to avoid nesting strtok.
8616
8617 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8618
8619 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8620 (CDEPS): New.
8621 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8622 -Wl,--dynamic-list.
8623 * configure: Regenerate.
8624 * proc-service.list: New.
8625
8626 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8627
8628 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8629 New comment.
8630
8631 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8632
8633 * gdbreplay.c (remote_open): Check error return from socket() call by
8634 its equality to -1 not by it being negative.
8635 * remote-utils.c (remote_open): Likewise.
8636
8637 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8638
8639 * config.h: Regenerate.
8640
8641 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8642
8643 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8644 doesn't provide PTRACE_GET_THREAD_AREA.
8645
8646 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8647
8648 * linux-m68k-low.c: Include <asm/ptrace.h>
8649 (ps_get_thread_area): Implement.
8650
8651 2010-05-03 Doug Evans <dje@google.com>
8652
8653 * event-loop.c (struct callback_event): New struct.
8654 (callback_list): New global.
8655 (append_callback_event, delete_callback_event): New functions.
8656 (process_callback): New function.
8657 (start_event_loop): Call it.
8658 * remote-utils.c (NOT_SCHEDULED): Define.
8659 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8660 moved out of readchar.
8661 (readchar): Rewrite. Call reschedule before returning.
8662 (reset_readchar): New function.
8663 (remote_close): Call it.
8664 (process_remaining, reschedule): New functions.
8665 * server.h (callback_handler_func): New typedef.
8666 (append_callback_event, delete_callback_event): Declare.
8667
8668 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8669
8670 * proc-service.c (ps_pglobal_lookup): Use
8671 thread_db_look_up_one_symbol.
8672 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8673 parameter. Use it instead of all_symbols_looked_up.
8674 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8675 field.
8676 (all_symbols_looked_up): Don't declare.
8677 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8678 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8679 field.
8680 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8681 Set all_symbols_looked_up here.
8682 (thread_db_look_up_one_symbol): New.
8683 (thread_db_get_tls_address): Adjust.
8684 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8685 thread_db object on the heap, and tentatively set it in the
8686 process structure.
8687 (thread_db_init): Don't set all_symbols_looked_up here.
8688 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8689
8690 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8691
8692 * linux-low.c (linux_kill, linux_detach): Adjust.
8693 (status_pending_p_callback): Remove redundant statement. Check
8694 for !TARGET_WAITIKIND_IGNORE, instead of
8695 TARGET_WAITKIND_STOPPED.
8696 (handle_tracepoints): Make sure LWP is locked. Adjust.
8697 (linux_wait_for_event_1): Adjust.
8698 (linux_cancel_breakpoints): New.
8699 (unsuspend_one_lwp): New.
8700 (unsuspend_all_lwps): New.
8701 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8702 (send_sigstop_callback): Change return type to int, add new
8703 `except' parameter and handle it.
8704 (suspend_and_send_sigstop_callback): New.
8705 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8706 pass them down. If SUSPEND, also increment the lwp's suspend
8707 count.
8708 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8709 (need_step_over_p): Don't consider suspended LWPs.
8710 (start_step_over): Adjust.
8711 (proceed_one_lwp): Change return type to int, add new `except'
8712 parameter and handle it.
8713 (unsuspend_and_proceed_one_lwp): New.
8714 (proceed_all_lwps): Use find_inferior instead of
8715 for_each_inferior.
8716 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8717 also decrement the suspend count of LWPs. Pass `except' down,
8718 instead of hacking its suspend count.
8719 (linux_pause_all): Add `freeze' parameter. Adjust.
8720 (linux_unpause_all): New.
8721 (linux_target_ops): Install linux_unpause_all.
8722 * server.c (handle_status): Adjust.
8723 * target.h (struct target_ops): New fields `unpause_all' and
8724 `cancel_breakpoints'. Add new parameter to `pause_all'.
8725 (pause_all): Add new `freeze' parameter.
8726 (unpause_all): New.
8727 (cancel_breakpoints): New.
8728 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8729 cancel breakpoints.
8730 (cmd_qtstart): Pause threads.
8731 (stop_tracing): Pause threads, and cancel breakpoints.
8732 * win32-low.c (win32_target_ops): Adjust.
8733
8734 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8735
8736 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8737 the inferior right away from here...
8738 (linux_wait_1): ... to here, and adjust to check the thread's
8739 last_resume_kind instead of the lwp's step or stop_expected flags.
8740
8741 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8742
8743 * README: Use consistent `GDB' and `GDBserver' spellings.
8744
8745 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8746
8747 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8748 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8749 (linux_detach_one_lwp): Assume the lwp is stopped.
8750 (any_thread_of): Delete.
8751 (linux_detach): Stop all lwps here. Don't blindly delete all
8752 breakpoints.
8753 (delete_lwp_callback): New.
8754 (linux_mourn): Delete all lwps of the process that is gone.
8755 (linux_wait_1): Don't delete the last lwp of the process here.
8756 * mem-break.h (mark_breakpoints_out): Declare.
8757 * mem-break.c (mark_breakpoints_out): New.
8758 (free_all_breakpoints): Use it.
8759 * server.c (handle_target_event): If the process is gone, mark
8760 breakpoints out.
8761 * thread-db.c (struct thread_db) <create_bp>: New field.
8762 (thread_db_enable_reporting): Fix prototype. Store a thread event
8763 breakpoint reference in the thread_db struct.
8764 (thread_db_load_search): Clear the thread_db object.
8765 (try_thread_db_load_1): Ditto.
8766 (switch_to_process): New.
8767 (disable_thread_event_reporting): Use it.
8768 (remove_thread_event_breakpoints): New.
8769 (thread_db_detach, thread_db_mourn): Use it.
8770
8771 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8772
8773 * linux-low.c (linux_enable_event_reporting): New.
8774 (linux_wait_for_event_1, handle_extended_wait): Use it.
8775
8776 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8777
8778 * linux-low.c (linux_kill_one_lwp, linux_kill)
8779 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8780 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8781 SIGSTOP even if the LWP is stopped.
8782 (send_sigstop_callback): New.
8783 (stop_all_lwps): Use send_sigstop_callback instead.
8784 (linux_resume_one_thread): Adjust.
8785 (proceed_one_lwp): Still proceed an LWP that the client has
8786 requested to stop, if we haven't reported it as stopped yet. Make
8787 sure that LWPs the client want stopped, have a pending SIGSTOP.
8788
8789 2010-04-26 Doug Evans <dje@google.com>
8790
8791 * server.c (handle_general_set): Make static.
8792
8793 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8794 Print received char after testing for error/eof instead of before.
8795 (input_interrupt): Tweak comment.
8796
8797 2010-04-23 Doug Evans <dje@google.com>
8798
8799 * server.c (start_inferior): Print inferior argv if --debug.
8800
8801 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8802
8803 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8804 * nto-x86-low.c: Include server.h
8805
8806 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8807
8808 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8809 be consistent with other sources of this directory.
8810 (init_registers_amd64): Correct name of source file of this function
8811 in the comment.
8812
8813 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8814
8815 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8816 64-bit executables.
8817
8818 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8819
8820 * win32-i386-low.c: Add 64-bit support.
8821 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8822 (init_registers_amd64): Declare.
8823 (mappings): Add 64-bit version of array.
8824 (init_windows_x86): New function.
8825 (the_low_target): Change init_arch field to init_windows_x86.
8826
8827 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8828
8829 * win32-low.c: Adapt to support also 64-bit architecture.
8830 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8831 (get_image_name): Use SIZE_T type for local variable `done'.
8832 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8833 (toolhelp_get_dll_name): Idem.
8834 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8835 Use uintptr_t typecast to avoid warning.
8836 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8837 (handle_exception): Use phex_nz to avoid warning.
8838 (win32_wait): Remove unused local variable `process'.
8839
8840 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8841
8842 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8843 `amd64-avx.o'.
8844
8845 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8846
8847 * configure.ac: Use `ws2_32' library for srv_mingw.
8848 * configure: Regenerate.
8849 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8850 * remote-utils.c: Likewise.
8851
8852 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8853
8854 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8855 if __x86_64__ is defined.
8856
8857 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8858
8859 * configure: Regenerate.
8860
8861 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8862
8863 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8864 * target.h (target_ops): New get_tib_address field.
8865 * win32-low.h (win32_thread_info): Add thread_local_base field.
8866 * win32-low.c (child_add_thread): Add tlb argument.
8867 Set thread_local_base field to TLB.
8868 (get_child_debug_event): Adapt to child_add_thread change.
8869 (win32_get_tib_address): New function.
8870 (win32_target_ops): Set get_tib_address field to
8871 win32_get_tib_address.
8872 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8873
8874 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8875
8876 * linux-low.c (linux_mourn): Also remove the process.
8877 * server.c (handle_target_event): Don't remove the process here.
8878 * nto-low.c (nto_mourn): New.
8879 (nto_target_ops): Install it.
8880 * spu-low.c (spu_mourn): New.
8881 (spu_target_ops): Install it.
8882 * win32-low.c (win32_mourn): New.
8883 (win32_target_ops): Install it.
8884
8885 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8886
8887 * server.h (buffer_xml_printf): Remove redundant `;'.
8888
8889 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8890
8891 * regcache.c (set_register_cache): Invalidate regcaches before
8892 changing the register cache layout.
8893 (regcache_invalidate_one): Allow a NULL regcache.
8894 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8895 regcaches before changing the register cache layout or the target
8896 regsets.
8897
8898 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8899
8900 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8901 variable warning on Linux/x86-64.
8902
8903 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8904
8905 GDBserver disconnected tracing support.
8906
8907 * linux-low.c (linux_remove_process): Delete.
8908 (add_lwp): Don't set last_resume_kind here.
8909 (linux_kill): Use `mourn'.
8910 (linux_detach): Use `thread_db_detach', and `mourn'.
8911 (linux_mourn): New.
8912 (linux_attach_lwp_1): Adjust comment.
8913 (linux_attach): last_resume_kind moved the thread_info; adjust.
8914 (status_pending_p_callback): Adjust.
8915 (linux_wait_for_event_1): Adjust.
8916 (count_events_callback, select_singlestep_lwp_callback)
8917 (select_event_lwp_callback, cancel_breakpoints_callback)
8918 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8919 (proceed_one_lwp): Adjust.
8920 (linux_async): Add debug output.
8921 (linux_thread_stopped): New.
8922 (linux_pause_all): New.
8923 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8924 linux_pause_all.
8925 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8926 (thread_db_free): Delete declaration.
8927 (thread_db_detach, thread_db_mourn): Declare.
8928 * thread-db.c (thread_db_init): Use thread_db_mourn.
8929 (thread_db_free): Delete, split in two.
8930 (disable_thread_event_reporting): New.
8931 (thread_db_detach): New.
8932 (thread_db_mourn): New.
8933
8934 * server.h (struct thread_info) <last_resume_kind>: New field.
8935 <attached>: Add comment.
8936 <gdb_detached>: New field.
8937 (handler_func): Change return type to int.
8938 (handle_serial_event, handle_target_event): Ditto.
8939 (gdb_connected): Declare.
8940 (tracing): Delete.
8941 (disconnected_tracing): Declare.
8942 (stop_tracing): Declare.
8943
8944 * server.c (handle_query) <qSupported>: Report support for
8945 disconnected tracing.
8946 (queue_stop_reply_callback): Account for running threads.
8947 (gdb_wants_thread_stopped): New.
8948 (gdb_wants_all_threads_stopped): New.
8949 (gdb_reattached_process): New.
8950 (handle_status): Clear the `gdb_detached' flag of all processes.
8951 In all-stop, stop all threads.
8952 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8953 (process_serial_event): If the remote connection breaks, or if an
8954 exit was forced with "monitor exit", force an event loop exit.
8955 Handle disconnected tracing on detach.
8956 (handle_serial_event): Adjust.
8957 (handle_target_event): If GDB isn't connected, forward events back
8958 to the inferior, unless the last process exited, in which case,
8959 exit gdbserver. Adjust interface.
8960
8961 * remote-utils.c (remote_open): Don't block in accept. Instead
8962 register an event loop source on the listen socket file
8963 descriptor. Refactor bits into ...
8964 (listen_desc): ... this new global.
8965 (gdb_connected): ... this new function.
8966 (enable_async_notification): ... this new function.
8967 (handle_accept_event): ... this new function.
8968 (remote_close): Clear remote_desc.
8969
8970 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8971
8972 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8973 New fields.
8974 (mourn_inferior): Define.
8975 (target_process_qsupported): Avoid the dangling else problem.
8976 (thread_stopped): Define.
8977 (pause_all): Define.
8978 (target_waitstatus_to_string): Declare.
8979 * target.c (target_waitstatus_to_string): New.
8980
8981 * tracepoint.c (tracing): Make extern.
8982 (disconnected_tracing): New.
8983 (stop_tracing): Make extern. Handle tracing stops due to GDB
8984 disconnecting.
8985 (cmd_qtdisconnected): New.
8986 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8987 (handle_tracepoint_general_set): Handle QTDisconnected.
8988
8989 * event-loop.c (event_handler_func): Change return type to int.
8990 (process_event): Bail out if the event handler wants the event
8991 loop to stop.
8992 (handle_file_event): Ditto.
8993 (start_event_loop): Bail out if the event handler wants the event
8994 loop to stop.
8995
8996 * nto-low.c (nto_target_ops): Adjust.
8997 * spu-low.c (spu_wait): Don't remove the process here.
8998 (spu_target_ops): Adjust.
8999 * win32-low.c (win32_wait): Don't remove the process here.
9000 (win32_target_ops): Adjust.
9001
9002 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9003
9004 * regcache.c (realloc_register_cache): Invalidate inferior's
9005 regcache before recreating it.
9006
9007 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9008
9009 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9010
9011 2010-04-09 Stan Shebs <stan@codesourcery.com>
9012 Pedro Alves <pedro@codesourcery.com>
9013
9014 * server.h (LONGEST): New.
9015 (struct thread_info) <while_stepping>: New field.
9016 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9017 Declare.
9018 (initialize_tracepoint, handle_tracepoint_general_set)
9019 (handle_tracepoint_query, tracepoint_finished_step)
9020 (tracepoint_was_hit, release_while_stepping_state_list):
9021 (current_traceframe): Declare.
9022 * server.c (handle_general_set): Handle tracepoint packets.
9023 (read_memory): New.
9024 (write_memory): New.
9025 (handle_search_memory_1): Use read_memory.
9026 (handle_query): Report support for conditional tracepoints, trace
9027 state variables, and tracepoint sources. Handle tracepoint
9028 queries.
9029 (main): Initialize the tracepoints module.
9030 (process_serial_event): Handle traceframe reads/writes.
9031
9032 * linux-low.c (handle_tracepoints): New.
9033 (linux_wait_1): Call it.
9034 (linux_resume_one_lwp): Handle while-stepping.
9035 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9036 (linux_target_ops): Install them.
9037 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9038 New field.
9039 * linux-x86-low.c (x86_supports_tracepoints): New.
9040 (the_low_target). Install it.
9041
9042 * mem-break.h (delete_breakpoint): Declare.
9043 * mem-break.c (delete_breakpoint): Make external.
9044
9045 * target.h (struct target_ops): Add `supports_tracepoints',
9046 `read_pc', and `write_pc' fields.
9047 (target_supports_tracepoints): Define.
9048 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9049 (phex_nz): New.
9050
9051 * regcache.h (struct regcache) <registers_owned>: New field.
9052 (init_register_cache, regcache_cpy): Declare.
9053 (regcache_read_pc, regcache_write_pc): Declare.
9054 (register_cache_size): Declare.
9055 (supply_regblock): Declare.
9056 * regcache.c (init_register_cache): New.
9057 (new_register_cache): Use it.
9058 (regcache_cpy): New.
9059 (register_cache_size): New.
9060 (supply_regblock): New.
9061 (regcache_read_pc, regcache_write_pc): New.
9062
9063 * tracepoint.c: New.
9064
9065 * Makefile.in (OBS): Add tracepoint.o.
9066 (tracepoint.o): New rule.
9067
9068 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9069
9070 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9071 (i386-mmx.o): New.
9072 (i386-mmx.c): Likewise.
9073 (i386-mmx-linux.o): Likewise.
9074 (i386-mmx-linux.c): Likewise.
9075
9076 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9077 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9078 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9079 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9080
9081 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9082 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9083 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9084
9085 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9086
9087 * Makefile.in (clean): Updated.
9088 (i386-avx.o): New.
9089 (i386-avx.c): Likewise.
9090 (i386-avx-linux.o): Likewise.
9091 (i386-avx-linux.c): Likewise.
9092 (amd64-avx.o): Likewise.
9093 (amd64-avx.c): Likewise.
9094 (amd64-avx-linux.o): Likewise.
9095 (amd64-avx-linux.c): Likewise.
9096
9097 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9098 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9099 (srv_amd64_regobj): Add amd64-avx.o.
9100 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9101 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9102 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9103 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9104 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9105 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9106 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9107
9108 * i387-fp.c: Include "i386-xstate.h".
9109 (i387_xsave): New.
9110 (i387_cache_to_xsave): Likewise.
9111 (i387_xsave_to_cache): Likewise.
9112 (x86_xcr0): Likewise.
9113
9114 * i387-fp.h (i387_cache_to_xsave): Likewise.
9115 (i387_xsave_to_cache): Likewise.
9116 (x86_xcr0): Likewise.
9117
9118 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9119 * linux-crisv32-low.c (target_regsets): Likewise.
9120 * linux-m68k-low.c (target_regsets): Likewise.
9121 * linux-mips-low.c (target_regsets): Likewise.
9122 * linux-ppc-low.c (target_regsets): Likewise.
9123 * linux-s390-low.c (target_regsets): Likewise.
9124 * linux-sh-low.c (target_regsets): Likewise.
9125 * linux-sparc-low.c (target_regsets): Likewise.
9126 * linux-xtensa-low.c (target_regsets): Likewise.
9127
9128 * linux-low.c: Include <sys/uio.h>.
9129 (regsets_fetch_inferior_registers): Support nt_type.
9130 (regsets_store_inferior_registers): Likewise.
9131 (linux_process_qsupported): New.
9132 (linux_target_ops): Add linux_process_qsupported.
9133
9134 * linux-low.h (regset_info): Add nt_type.
9135 (linux_target_ops): Add process_qsupported.
9136
9137 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9138 and <sys/uio.h>.
9139 (init_registers_i386_avx_linux): New.
9140 (init_registers_amd64_avx_linux): Likewise.
9141 (xmltarget_i386_linux_no_xml): Likewise.
9142 (xmltarget_amd64_linux_no_xml): Likewise.
9143 (PTRACE_GETREGSET): Likewise.
9144 (PTRACE_SETREGSET): Likewise.
9145 (x86_fill_xstateregset): Likewise.
9146 (x86_store_xstateregset): Likewise.
9147 (use_xml): Likewise.
9148 (x86_linux_update_xmltarget): Likewise.
9149 (x86_linux_process_qsupported): Likewise.
9150 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9151 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9152 init_registers_i386_linux here. Call
9153 x86_linux_update_xmltarget.
9154 (the_low_target): Add x86_linux_process_qsupported.
9155
9156 * server.c (handle_query): Call target_process_qsupported.
9157
9158 * target.h (target_ops): Add process_qsupported.
9159 (target_process_qsupported): New.
9160
9161 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9162
9163 * inferiors.c (add_thread): Set last_status kind to
9164 TARGET_WAITKIND_IGNORE.
9165 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9166 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9167 (linux_wait_1): Move `thread' local definition to block that uses
9168 it. Don't NULL initialize `event_child'.
9169 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9170 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9171 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9172
9173 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9174
9175 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9176 an extended waitstatus, or by a watchpoint.
9177 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9178 thread was stepping or has been stopped by a watchpoint.
9179
9180 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9181
9182 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9183 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9184 of another, then delete the previous, and validate all
9185 breakpoints.
9186 (validate_inserted_breakpoint): New.
9187 (delete_disabled_breakpoints): New.
9188 (validate_breakpoints): New.
9189 (check_mem_read): Validate breakpoints before trusting their
9190 shadow. Delete disabled breakpoints.
9191 (check_mem_write): Validate breakpoints before trusting they
9192 should be inserted. Delete disabled breakpoints.
9193 * mem-break.h (validate_breakpoints):
9194 * server.c (handle_query): Validate breakpoints when we see a
9195 qSymbol query.
9196
9197 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9198
9199 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9200 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9201 if we could tell there's a GDB breakpoint at stop_pc.
9202 (need_step_over_p): Don't do a step over if we find a GDB
9203 breakpoint at the resume PC.
9204
9205 * mem-break.c (struct raw_breakpoint): New.
9206 (enum bkpt_type): New type `gdb_breakpoint'.
9207 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9208 fields. New field `raw'.
9209 (find_raw_breakpoint_at): New.
9210 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9211 breakpoint instead.
9212 (set_breakpoint_at): Adjust.
9213 (delete_raw_breakpoint): New.
9214 (release_breakpoint): New.
9215 (delete_breakpoint): Rename to...
9216 (delete_breakpoint_1): ... this. Add proc parameter. Use
9217 release_breakpoint. Return ENOENT.
9218 (delete_breakpoint): Reimplement.
9219 (find_breakpoint_at): Delete.
9220 (find_gdb_breakpoint_at): New.
9221 (delete_breakpoint_at): Delete.
9222 (set_gdb_breakpoint_at): New.
9223 (delete_gdb_breakpoint_at): New.
9224 (gdb_breakpoint_here): New.
9225 (set_reinsert_breakpoint): Use release_breakpoint.
9226 (uninsert_breakpoint): Rename to ...
9227 (uninsert_raw_breakpoint): ... this.
9228 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9229 (reinsert_raw_breakpoint): Change parameter type to
9230 raw_breakpoint.
9231 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9232 instead.
9233 (check_breakpoints): Adjust. Use release_breakpoint.
9234 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9235 (breakpoint_inserted_here): Ditto.
9236 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9237 Don't trust the breakpoint's shadow if it is not inserted.
9238 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9239 (delete_all_breakpoints): Adjust.
9240 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9241 use delete_breakpoint_1.
9242
9243 * mem-break.h (breakpoints_supported): Delete declaration.
9244 (set_gdb_breakpoint_at): Declare.
9245 (gdb_breakpoint_here): Declare.
9246 (delete_breakpoint_at): Delete.
9247 (delete_gdb_breakpoint_at): Declare.
9248
9249 * server.h (struct raw_breakpoint): Forward declare.
9250 (struct process_info): New field `raw_breakpoints'.
9251
9252 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9253 breakpoints.
9254
9255 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9256
9257 * linux-low.c (status_pending_p_callback): Fix comment.
9258 (linux_wait_for_event_1): Move most of the internal breakpoint
9259 handling from here...
9260 (linux_wait_1): ... to here.
9261 (count_events_callback): New.
9262 (select_singlestep_lwp_callback): New.
9263 (select_event_lwp_callback): New.
9264 (cancel_breakpoints_callback): New.
9265 (select_event_lwp): New.
9266 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9267 priority to all LWPs that have had events that should be reported
9268 to the client. Cancel breakpoints when about to reporting the
9269 event to the client, not while stopping lwps. No longer cancel
9270 finished single-steps here.
9271 (cancel_finished_single_step): Delete.
9272 (cancel_finished_single_steps): Delete.
9273
9274 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9275
9276 * mem-break.c (enum bkpt_type): New.
9277 (struct breakpoint): New field `type'.
9278 (set_breakpoint_at): Change return type to struct breakpoint
9279 pointer. Set type to `other_breakpoint' by default.
9280 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9281 in the breakpoint list.
9282 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9283 (reinsert_breakpoint): Rename to ...
9284 (reinsert_raw_breakpoint): ... this.
9285 (reinsert_breakpoints_at): Adjust.
9286 * mem-break.h (struct breakpoint): Declare.
9287 (set_breakpoint_at): Change return type to struct breakpoint
9288 pointer.
9289
9290 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9291
9292 * server.c (handle_query): Assign, not compare.
9293
9294 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9295
9296 Teach linux gdbserver to step-over-breakpoints.
9297
9298 * linux-low.c (can_hardware_single_step): New.
9299 (supports_breakpoints): New.
9300 (handle_extended_wait): If stopping threads, read the stop pc of
9301 the new cloned LWP.
9302 (get_pc): New.
9303 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9304 low target doesn't support retrieving the PC.
9305 (add_lwp): Set last_resume_kind to resume_continue.
9306 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9307 (linux_attach): Don't clear stop_expected. Set the lwp's
9308 last_resume_kind to resume_stop.
9309 (linux_detach_one_lwp): Don't check for removed breakpoints.
9310 (check_removed_breakpoint): Delete.
9311 (status_pending_p): Rename to ...
9312 (status_pending_p_callback): ... this. Don't check for removed
9313 breakpoints. Don't consider threads that are stopped from GDB's
9314 perspective.
9315 (linux_wait_for_lwp): Always read the stop_pc here.
9316 (cancel_breakpoint): New.
9317 (step_over_bkpt): New global.
9318 (linux_wait_for_event_1): Implement stepping over breakpoints.
9319 (gdb_wants_lwp_stopped): New.
9320 (gdb_wants_all_stopped): New.
9321 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9322 single-step traps here. Store the thread's last reported target
9323 wait status.
9324 (send_sigstop): Don't clear stop_expected. Always set it,
9325 instead.
9326 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9327 (cancel_finished_single_step): New.
9328 (cancel_finished_single_steps): New.
9329 (wait_for_sigstop): Don't cancel finished single-step traps here.
9330 (linux_resume_one_lwp): Don't check for removed breakpoints.
9331 Don't set `step' on non-hardware step archs.
9332 (linux_set_resume_request): Ignore resume_stop requests if already
9333 stopping or stopped. Set the lwp's last_resume_kind.
9334 (resume_status_pending_p): Don't check for removed breakpoints.
9335 (need_step_over_p): New.
9336 (start_step_over): New.
9337 (finish_step_over): New.
9338 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9339 requests. Clear the thread's last reported target waitstatus.
9340 Don't use the `suspended' flag. Don't consider pending breakpoints.
9341 (linux_resume): Start a step-over if necessary.
9342 (proceed_one_lwp): New.
9343 (proceed_all_lwps): New.
9344 (unstop_all_lwps): New.
9345 * linux-low.h (struct lwp_info): Rewrite comment for the
9346 `suspended' flag. Add the `stop_pc' field. Delete the
9347 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9348 Add `'last_resume_kind' and `need_step_over' fields.
9349 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9350 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9351 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9352 (set_raw_breakpoint_at): New.
9353 (set_breakpoint_at): Rewrite to use it.
9354 (reinsert_breakpoint_handler): Delete.
9355 (set_reinsert_breakpoint): New.
9356 (reinsert_breakpoint_by_bp): Delete.
9357 (delete_reinsert_breakpoints): New.
9358 (uninsert_breakpoint): Rewrite.
9359 (uninsert_breakpoints_at): New.
9360 (reinsert_breakpoint): Rewrite.
9361 (reinsert_breakpoints_at): New.
9362 (check_breakpoints): Rewrite.
9363 (breakpoint_here): New.
9364 (breakpoint_inserted_here): New.
9365 (check_mem_read): Adjust.
9366 * mem-break.h (breakpoints_supported, breakpoint_here)
9367 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9368 (reinsert_breakpoint_by_bp): Delete declaration.
9369 (delete_reinsert_breakpoints): Declare.
9370 (reinsert_breakpoint): Delete declaration.
9371 (reinsert_breakpoints_at): Declare.
9372 (uninsert_breakpoint): Delete declaration.
9373 (uninsert_breakpoints_at): Declare.
9374 (check_breakpoints): Adjust prototype.
9375 * server.h: Adjust include order.
9376 (struct thread_info): Declare here. Add a `last_status' field.
9377
9378 2010-03-23 Michael Snyder <msnyder@vmware.com>
9379
9380 * server.c (crc32): New function.
9381 (handle_query): Add handling for 'qCRC:' request.
9382
9383 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9384
9385 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9386 lwp had been stopped by a watchpoint.
9387
9388 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9389
9390 * server.h (internal_error): Declare.
9391 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9392 * utils.c (internal_error): New function.
9393
9394 2010-03-15 Andreas Schwab <schwab@redhat.com>
9395
9396 * configure.srv: Fix typo setting srv_regobj.
9397
9398 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9399
9400 * linux-low.c (fetch_register): Avoid passing a non string literal
9401 format to `error'.
9402 (usr_store_inferior_registers): Ditto.
9403
9404 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9405
9406 * linux-low.c (linux_write_memory): Bail out early if peeking
9407 memory failed.
9408
9409 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9410
9411 * linux-low.h (struct lwp_info): New fields
9412 `stopped_by_watchpoint' and `stopped_data_address'.
9413 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9414 here, and cache them in the lwp object.
9415 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9416 directly.
9417 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9418 field.
9419 (linux_stopped_by_watchpoint): Rewrite.
9420 (linux_stopped_data_address): Rewrite.
9421
9422 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9423
9424 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9425 switching the current inferior, not before.
9426
9427 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9428
9429 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9430 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9431 i386-linux.c and amd64-linux.c.
9432 (reg-i386.o): Removed.
9433 (reg-i386.c): Likewise.
9434 (reg-i386-linux.o): Likewise.
9435 (reg-i386-linux.c): Likewise.
9436 (reg-x86-64.o): Likewise.
9437 (reg-x86-64.c): Likewise.
9438 (reg-x86-64-linux.o): Likewise.
9439 (reg-x86-64-linux.c): Likewise.
9440 (i386.o): New.
9441 (i386.c): Likewise.
9442 (i386-linux.o): Likewise.
9443 (i386-linux.c): Likewise.
9444 (amd64.o): Likewise.
9445 (amd64.c): Likewise.
9446 (amd64-linux.o): Likewise.
9447 (amd64-linux.c): Likewise.
9448
9449 * configure.srv (srv_i386_regobj): New.
9450 (srv_i386_linux_regobj): Likewise.
9451 (srv_amd64_regobj): Likewise.
9452 (srv_amd64_linux_regobj): Likewise.
9453 (srv_i386_32bit_xmlfiles): Likewise.
9454 (srv_i386_64bit_xmlfiles): Likewise.
9455 (srv_i386_xmlfiles): Likewise.
9456 (srv_amd64_xmlfiles): Likewise.
9457 (srv_i386_linux_xmlfiles): Likewise.
9458 (srv_amd64_linux_xmlfiles): Likewise.
9459 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9460 srv_xmlfiles to $srv_i386_xmlfiles.
9461 (i[34567]86-*-mingw32ce*): Likewise.
9462 (i[34567]86-*-mingw*): Likewise.
9463 (i[34567]86-*-nto*): Likewise.
9464 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9465 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9466 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9467 (x86_64-*-linux*): Likewise.
9468
9469 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9470 (init_registers_amd64_linux): New.
9471 (x86_arch_setup): Replace init_registers_x86_64_linux with
9472 init_registers_amd64_linux.
9473
9474 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9475
9476 * configure.ac: Check for libdl. If it is not available link against
9477 static libthread_db.
9478 * configure: Regenerate.
9479
9480 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9481
9482 PR9605
9483
9484 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9485 handing a read watchpoint.
9486 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9487
9488 2010-02-12 Doug Evans <dje@google.com>
9489
9490 * linux-low.c (linux_supports_tracefork_flag): Document.
9491 (linux_look_up_symbols): Add comment.
9492
9493 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9494
9495 * regcache.c (supply_register): Clear regcache if buf is NULL.
9496
9497 2010-02-02 Nicolas Roche <roche@sourceware.org>
9498 Joel Brobecker <brobecker@adacore.com>
9499
9500 * inferiors.c (find_inferior): Add function documentation.
9501 (unloaded_dll): Handle the case where the unloaded dll has not
9502 been previously registered in the dll list.
9503
9504 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9505
9506 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9507 (thumb2_breakpoint): New.
9508 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9509
9510 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9511
9512 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9513 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9514 breakpoints.
9515
9516 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9517
9518 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9519
9520 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9521
9522 * linux-s390-low.c (s390_collect_ptrace_register)
9523 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9524
9525 2010-01-21 Doug Evans <dje@google.com>
9526
9527 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9528 (PTRACE_ARG4_TYPE): New macro.
9529 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9530 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9531 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9532 (usr_store_inferior_registers): Ditto.
9533 (linux_read_memory, linux_write_memory): Ditto.
9534 (linux_test_for_tracefork): Ditto.
9535
9536 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9537 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9538
9539 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9540
9541 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9542 target.
9543
9544 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9545
9546 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9547 prototype to take a regcache. Adjust.
9548
9549 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9550
9551 * regcache.h (struct thread_info): Forward declare.
9552 (struct regcache): New.
9553 (new_register_cache): Adjust prototype.
9554 (get_thread_regcache): Declare.
9555 (free_register_cache): Adjust prototype.
9556 (registers_to_string, registers_from_string): Ditto.
9557 (supply_register, supply_register_by_name, collect_register)
9558 (collect_register_as_string, collect_register_by_name): Ditto.
9559 * regcache.c (struct inferior_regcache_data): Delete.
9560 (get_regcache): Rename to ...
9561 (get_thread_regcache): ... this. Adjust. Switch inferior before
9562 fetching registers.
9563 (regcache_invalidate_one): Adjust.
9564 (regcache_invalidate): Fix prototype.
9565 (new_register_cache): Return the new register cache.
9566 (free_register_cache): Change prototype.
9567 (realloc_register_cache): Adjust.
9568 (registers_to_string): Change prototype to take a regcache. Adjust.
9569 (registers_from_string): Ditto.
9570 (register_data): Ditto.
9571 (supply_register): Ditto.
9572 (supply_register_by_name): Ditto.
9573 (collect_register): Ditto.
9574 (collect_register_as_string): Ditto.
9575 (collect_register_by_name): Ditto.
9576 * server.c (process_serial_event): Adjust.
9577 * linux-low.h (regset_fill_func, regset_store_func): Change
9578 prototype.
9579 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9580 Change prototype.
9581 * linux-low.c (get_stop_pc): Adjust.
9582 (check_removed_breakpoint): Adjust.
9583 (linux_wait_for_event): Adjust.
9584 (linux_resume_one_lwp): Adjust.
9585 (fetch_register): Add regcache parameter. Adjust.
9586 (usr_store_inferior_registers): Ditto.
9587 (regsets_fetch_inferior_registers): Ditto.
9588 (regsets_store_inferior_registers): Ditto.
9589 (linux_fetch_registers, linux_store_registers): Ditto.
9590 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9591 regcache. Adjust.
9592 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9593 Ditto.
9594 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9595 prototype to take a regcache.
9596 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9597 * remote-utils.c (convert_ascii_to_int, outreg)
9598 (prepare_resume_reply): Change prototype to take a regcache.
9599 Adjust.
9600 * target.h (struct target_ops) <fetch_registers, store_registers>:
9601 Change prototype to take a regcache.
9602 (fetch_inferior_registers, store_inferior_registers): Change
9603 prototype to take a regcache. Adjust.
9604 * proc-service.c (ps_lgetregs): Adjust.
9605 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9606 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9607 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9608 take a regcache. Adjust.
9609 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9610 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9611 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9612 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9613 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9614 (cris_cannot_fetch_register):
9615 (cris_breakpoint_at): Change prototype to take a regcache.
9616 Adjust.
9617 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9618 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9619 to take a regcache. Adjust.
9620 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9621 Adjust.
9622 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9623 take a regcache. Adjust.
9624 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9625 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9626 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9627 * linux-mips-low.c (mips_get_pc):
9628 (mips_set_pc): Change prototype to take a regcache. Adjust.
9629 (mips_reinsert_addr): Adjust.
9630 (mips_collect_register): Change prototype to take a regcache.
9631 Adjust.
9632 (mips_supply_register):
9633 (mips_collect_register_32bit, mips_supply_register_32bit)
9634 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9635 (mips_store_fpregset): Ditto.
9636 * linux-ppc-low.c (ppc_supply_ptrace_register)
9637 (ppc_supply_ptrace_register): Ditto.
9638 (parse_spufs_run): Adjust.
9639 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9640 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9641 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9642 take a regcache. Adjust.
9643 * linux-s390-low.c (s390_collect_ptrace_register)
9644 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9645 (s390_set_pc): Change prototype to take a regcache. Adjust.
9646 (s390_arch_setup): Adjust.
9647 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9648 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9649 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9650 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9651 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9652 regcache. Adjust.
9653 (sparc_breakpoint_at): Adjust.
9654 * linux-xtensa-low.c (xtensa_fill_gregset):
9655 (xtensa_store_gregset):
9656 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9657 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9658 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9659 prototype to take a regcache. Adjust.
9660 * win32-arm-low.c (arm_fetch_inferior_register)
9661 (arm_store_inferior_register): Change prototype to take a
9662 regcache. Adjust.
9663 * win32-i386-low.c (i386_fetch_inferior_register)
9664 (i386_store_inferior_register): Change prototype to take a
9665 regcache. Adjust.
9666 * win32-low.c (child_fetch_inferior_registers)
9667 (child_store_inferior_registers): Change prototype to take a
9668 regcache. Adjust.
9669 (win32_wait): Adjust.
9670 (win32_fetch_inferior_registers): Change prototype to take a
9671 regcache. Adjust.
9672 (win32_store_inferior_registers): Adjust.
9673 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9674 store_inferior_register>: Change prototype to take a regcache.
9675
9676 2010-01-20 Doug Evans <dje@google.com>
9677
9678 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9679 #ifdef.
9680 (linux_wait_for_event1, linux_init_signals): Ditto.
9681 (W_STOPCODE): Provide definition if missing.
9682
9683 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9684
9685 * linux-low.c (linux_core_of_thread): New.
9686 (compare_ints, show_process, list_threads): New.
9687 (linux_qxfer_osdata): Report threads and cores.
9688 (linux_target_op): Register linux_core_of_thread.
9689 * remote-utils.c (prepare_resume_reply): Report the core.
9690 (buffer_xml_printf): Support %d specifier.
9691 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9692 New.
9693 (handle_query): Handle qXfer:threads. Announce availability
9694 thereof.
9695 * target.h (struct target_ops): New field core_of_thread.
9696
9697 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9698
9699 * Makefile.in (clean): Remove new generated files.
9700 (reg-s390.o, reg-s390.c): Remove rules.
9701 (reg-s390x.o, reg-s390x.c): Likewise.
9702 (s390-linux32.o, s390-linux32.c): Add rules.
9703 (s390-linux64.o, s390-linux64.c): Likewise.
9704 (s390x-linux64.o, s390x-linux64.c): Likewise.
9705 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9706 * linux-s390-low.c: Include <elf.h>.
9707 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9708 (init_registers_s390): Remove prototype.
9709 (init_registers_s390x): Likewise.
9710 (init_registers_s390_linux32): Add prototype.
9711 (init_registers_s390_linux64): Likewise.
9712 (init_registers_s390x_linux64): Likewise.
9713 (s390_num_regs_3264): New define.
9714 (s390_regmap_3264): New global variable.
9715 (s390_cannot_fetch_register): Remove obsolete check.
9716 (s390_cannot_store_register): Likewise.
9717 (s390_collect_ptrace_register): Handle upper/lower register halves.
9718 (s390_supply_ptrace_register): Likewise.
9719 (s390_fill_gregset): Update to register number changes.
9720 (s390_get_hwcap): New routine.
9721 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9722 Install appropriate regmap and register set.
9723
9724 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9725
9726 * server.c (gdbserver_version): Update copyright year to 2010.
9727 * gdbreplay.c (gdbreplay_version): Likewise.
9728
9729 2009-12-28 Doug Evans <dje@google.com>
9730
9731 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9732 elf/external.h. Include <elf.h> instead but only if necessary.
9733
9734 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9735
9736 * linux-low.c (linux_remove_process): Remove `detaching'
9737 parameter. Don't release/detach from thread_db here.
9738 (linux_kill): Release/detach from thread_db here, ...
9739 (linux_detach): ... and here, before actually detaching.
9740 (linux_wait_1): ... and here, when a process exits.
9741 * thread-db.c (any_thread_of): New.
9742 (thread_db_free): Switch the current inferior to a thread of the
9743 passed in process.
9744
9745 2009-12-21 Doug Evans <dje@google.com>
9746
9747 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9748
9749 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9750 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9751 warning ifndef __NR_tkill. Move setting of errno there too.
9752 Delete unnecessary resetting of errno after syscall.
9753 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9754
9755 * configure.ac: Check for dladdr.
9756 * config.in: Regenerate.
9757 * configure: Regenerate.
9758 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9759 (try_thread_db_load): Update.
9760
9761 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9762
9763 2009-12-18 Doug Evans <dje@google.com>
9764
9765 * event-loop.c: Include unistd.h if it exists.
9766
9767 * linux-low.c (my_waitpid): Move definition away from being in
9768 between linux_tracefork_child/linux_test_for_tracefork.
9769
9770 * gdb_proc_service.h (psaddr_t): Fix type.
9771 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9772 signature to match glibc.
9773
9774 2009-12-16 Doug Evans <dje@google.com>
9775
9776 * linux-low.c (linux_read_memory): Fix argument to read.
9777
9778 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9779
9780 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9781 events, don't leave current_inferior pointing at null.
9782
9783 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9784
9785 * win32-low.c (LOG): Delete.
9786 (OUTMSG): Output to stderr.
9787 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9788 on compile time LOG macro.
9789 (win32_wait): Fix debug output.
9790
9791 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9792
9793 * win32-low.c (win32_add_one_solib): If the dll name is
9794 "ntdll.dll", prepend the system directory to the dll path.
9795
9796 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9797
9798 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9799
9800 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9801 Vladimir Prus <vladimir@codesourcery.com>
9802
9803 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9804 * configure.ac: Check for __mcoldfire__ and set
9805 gdb_cv_m68k_is_coldfire.
9806 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9807 reg-cf.o and reg-m68k.o.
9808 * configure: Regenerated.
9809
9810 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9811
9812 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9813 Pass it to thread_db_free.
9814 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9815 proper `detaching' argument to linux_remove_process.
9816 * linux-low.h (thread_db_free): Add `detaching' parameter.
9817 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9818 to thread_db_free.
9819 (thread_db_free): Add `detaching' parameter. Only
9820 call td_ta_clear_event if detaching from process.
9821
9822 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9823
9824 * thread-db.c (thread_db_free): Fix typo.
9825
9826 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9827
9828 PR gdb/10838
9829 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9830
9831 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9832
9833 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9834 with an i686 compiler.
9835 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9836 needed.
9837 * configure: Rebuilt.
9838
9839 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9840
9841 PR gdb/10783
9842
9843 * server.c (handle_search_memory_1): Correct read_addr initialization
9844 in loop for searching subsequent chunks.
9845
9846 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9847
9848 * configure.ac: New --with-libthread-db option.
9849 * thread-db.c: Allow direct dependence on libthread_db.
9850 (thread_db_free): Adjust.
9851 * config.in: Regenerate.
9852 * configure: Likewise.
9853
9854 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9855
9856 PR gdb/10757
9857 * thread-db.c (attach_thread): New function.
9858 (maybe_attach_thread): Return success/failure.
9859 (find_new_threads_callback): Adjust.
9860 (thread_db_find_new_threads): Loop until no new threads.
9861
9862 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9863
9864 * proc-service.c (ps_lgetregs): Formatting.
9865
9866 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9867
9868 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9869 * configure.ac: Adjust.
9870 * linux-low.h (struct process_info_private): Move members to struct
9871 thread_db.
9872 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9873 * linux-low.c (linux_remove_process): Adjust.
9874 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9875 * server.c (handle_query): Move code ...
9876 (handle_monitor_command): ... here. New function.
9877 * target.h (struct target_ops): New member.
9878 * thread-db.c (struct thread_db): New.
9879 (libthread_db_search_path): New variable.
9880 (thread_db_create_event, thread_db_enable_reporting)
9881 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9882 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9883 (try_thread_db_load_1, dladdr_to_soname): New functions.
9884 (try_thread_db_load, thread_db_load_search): New functions.
9885 (thread_db_init): Search for libthread_db.
9886 (thread_db_free): New function.
9887 (thread_db_handle_monitor_command): Likewise.
9888 * config.in: Regenerate.
9889 * configure: Regenerate.
9890
9891 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9892
9893 * spu-low.c (spu_kill): Wait for inferior to terminate.
9894 Call clear_inferiors.
9895 (spu_detach): Call clear_inferiors.
9896
9897 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9898
9899 * aclocal.m4: Regenerate.
9900 * config.in: Likewise.
9901 * configure: Likewise.
9902
9903 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9904
9905 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9906 (parse_spufs_run): New function.
9907 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9908 (ppc_breakpoint_at): Handle SPU breakpoints.
9909
9910 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9911
9912 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9913 (SPUFS_MAGIC): Define.
9914 (spu_enumerate_spu_ids): New function.
9915 (linux_qxfer_spu): New function.
9916 (linux_target_ops): Install linux_qxfer_spu.
9917
9918 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9919
9920 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9921 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9922 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9923 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9924 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9925 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9926 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9927 (init_registers_powerpc_cell32l): Add prototype.
9928 (init_registers_powerpc_cell64l): Likewise.
9929 (ppc_arch_setup): Detect Cell/B.E. architecture.
9930
9931 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9932
9933 * Makefile.in (datarootdir): New variable.
9934
9935 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9936
9937 * linux-low.c (linux_write_memory): Update debugging output.
9938 * Makefile.in (clean): Add new descriptions.
9939 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9940 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9941 * configure.srv: Add new files for arm*-*-linux*.
9942 * linux-arm-low.c: Add new declarations.
9943 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9944 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9945 (HWCAP_VFPv3D16): New.
9946 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9947 instead of __IWMMXT__.
9948 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9949 (arm_arch_setup): New.
9950 (target_regsets): Remove #ifdef. Add VFP regset.
9951 (the_low_target): Use arm_arch_setup.
9952
9953 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9954
9955 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9956 the main thread again.
9957
9958 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9959
9960 Adding Neutrino gdbserver.
9961 * configure: Regenerated.
9962 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9963 * configure.srv (i[34567]86-*-nto*): New target.
9964 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9965 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9966 (nto_comctrl) [__QNX__]: New function.
9967 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9968
9969 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9970
9971 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9972 srv_tgtobj.
9973
9974 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9975 Pedro Alves <pedro@codesourcery.com>
9976
9977 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9978 don't support CONTEXT_EXTENDED_REGISTERS.
9979 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9980 (the_low_target): Install them.
9981 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9982 failing with ERROR_PIPE_NOT_CONNECTED.
9983
9984 2009-06-30 Doug Evans <dje@google.com>
9985 Pierre Muller <muller@ics.u-strasbg.fr>
9986
9987 Add h/w watchpoint support to x86-linux, win32-i386.
9988 * Makefile.in (SFILES): Add i386-low.c
9989 (i386_low_h): Define.
9990 (i386-low.o): Add dependencies.
9991 (linux-x86-low.o): Add i386-low.h dependency.
9992 (win32-i386-low.o): Ditto.
9993 * i386-low.c: New file.
9994 * i386-low.h: New file.
9995 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9996 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9997 * linux-low.c (linux_add_process): Initialize arch_private.
9998 (linux_remove_process): Free arch_private.
9999 (add_lwp): Initialize arch_private.
10000 (delete_lwp): Free arch_private.
10001 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10002 provided.
10003 * linux-low.h (process_info_private): New member arch_private.
10004 (lwp_info): New member arch_private.
10005 (linux_target_ops): New members new_process, new_thread,
10006 prepare_to_resume.
10007 (ptid_of): New macro.
10008 * linux-x86-low.c: Include stddef.h, i386-low.h.
10009 (arch_process_info): New struct.
10010 (arch_lwp_info): New struct.
10011 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10012 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10013 (i386_dr_low_get_status): New function.
10014 (x86_insert_point, x86_remove_point): New functions.
10015 (x86_stopped_by_watchpoint): New function.
10016 (x86_stopped_data_address): New function.
10017 (x86_linux_new_process, x86_linux_new_thread): New functions.
10018 (x86_linux_prepare_to_resume): New function.
10019 (the_low_target): Add entries for insert_point, remove_point,
10020 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10021 prepare_to_resume.
10022 * server.c (debug_hw_points): New global.
10023 (monitor_show_help): Document set debug-hw-points.
10024 (handle_query): Process "set debug-hw-points".
10025 * server.h (debug_hw_points): Declare.
10026 (paddress): Declare.
10027 * utils.c (NUMCELLS, CELLSIZE): New macros.
10028 (get_sell, xsnprintf, paddress): New functions.
10029 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10030 remove_point, stopped_by_watchpoint, stopped_data_address.
10031 * win32-i386-low.c: Include i386-low.h.
10032 (debug_reg_state): Replaces dr.
10033 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10034 (i386_dr_low_get_status): New function.
10035 (i386_insert_point, i386_remove_point): New functions.
10036 (i386_stopped_by_watchpoint): New function.
10037 (i386_stopped_data_address): New function.
10038 (i386_initial_stuff): Update.
10039 (get_thread_context,set_thread_context,i386_thread_added): Update.
10040 (the_low_target): Add entries for insert_point,
10041 remove_point, stopped_by_watchpoint, stopped_data_address.
10042 * win32-low.c (win32_insert_watchpoint): New function.
10043 (win32_remove_watchpoint): New function.
10044 (win32_stopped_by_watchpoint): New function.
10045 (win32_stopped_data_address): New function.
10046 (win32_target_ops): Add entries for insert_watchpoint,
10047 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10048 * win32-low.h (win32_target_ops): New members insert_point,
10049 remove_point, stopped_by_watchpoint, stopped_data_address.
10050
10051 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10052
10053 * server.c (process_serial_event): Re-return unsupported, not
10054 error, if the type isn't recognized. Re-allow supporting only
10055 insert or remove packets. Also call require_running for
10056 breakpoints. Add missing break statement to default case. Tidy.
10057 * target.h (struct target_ops): Rename insert_watchpoint to
10058 insert_point, and remove_watchpoint to remove_point.
10059
10060 * linux-low.h (struct linux_target_ops): Likewise.
10061 * linux-low.c (linux_insert_watchpoint): Rename to ...
10062 (linux_insert_point): ... this. Adjust.
10063 (linux_remove_watchpoint): Rename to ...
10064 (linux_remove_point): ... this. Adjust.
10065 (linux_target_ops): Adjust.
10066 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10067 (cris_insert_point): ... this.
10068 (cris_remove_watchpoint): Rename to ...
10069 (cris_remove_point): ... this.
10070 (the_low_target): Adjust.
10071
10072 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10073
10074 * server.c (handle_v_kill): Pass signal_pid to
10075 kill_inferior if multi_process is zero.
10076
10077 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10078
10079 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10080 * target.h (target_ops): Comment for *_watchpoint to make it clear
10081 the functions can get types '0' and '1'.
10082
10083 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10084
10085 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10086 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10087 * regcache.c (get_regcache): Likewise.
10088 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10089 * win32-low.c (child_fetch_inferior_registers): Remove check for
10090 regno 0.
10091
10092 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10093 Pedro Alves <pedro@codesourcery.com>
10094
10095 * target.h (struct target_ops) <supports_multi_process>: New
10096 callback.
10097 (target_supports_multi_process): New.
10098 * server.c (handle_query): Even if GDB reports support, only
10099 enable multi-process if the target also supports it. Report
10100 multi-process support only if the target backend supports it.
10101 * linux-low.c (linux_supports_multi_process): New function.
10102 (linux_target_ops): Install it as target_supports_multi_process
10103 callback.
10104
10105 2009-05-24 Doug Evans <dje@google.com>
10106
10107 Global renaming of find_thread_pid to find_thread_ptid.
10108 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10109 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10110 All callers updated.
10111
10112 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10113 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10114 directly.
10115
10116 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10117 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10118 (linux_resume_one_lwp): Ditto.
10119
10120 2009-05-23 Doug Evans <dje@google.com>
10121
10122 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10123 from struct inferior_list_entry * to struct lwp_info *.
10124 All callers updated.
10125
10126 2009-05-13 Doug Evans <dje@google.com>
10127
10128 * linux-x86-low.c: Don't include assert.h.
10129 (x86_siginfo_fixup): Use fatal, not assert.
10130 (x86_arch_setup): Fix comment.
10131
10132 2009-05-12 Doug Evans <dje@google.com>
10133
10134 Biarch support for i386/amd64 gdbserver.
10135 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10136 Add linux-x86-low.c.
10137 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10138 (linux-x86-low.o): Add.
10139 * linux-x86-64-low.c: Delete.
10140 * linux-i386-low.c: Delete.
10141 * linux-x86-low.c: New file.
10142 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10143 linux-x86-low.o.
10144 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10145 linux-x86-low.o.
10146 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10147 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10148 (linux_child_pid_to_exec_file): New function.
10149 (elf_64_header_p, elf_64_file_p): New functions.
10150 (siginfo_fixup): New function.
10151 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10152 give target a chance to convert layout.
10153 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10154 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10155
10156 2009-05-07 Doug Evans <dje@google.com>
10157
10158 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10159 (regsets_store_inferior_registers): Ditto.
10160
10161 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10162
10163 PR server/10048
10164
10165 * linux-low.c (must_set_ptrace_flags): Delete.
10166 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10167 of the global.
10168 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10169 `lwp->must_set_ptrace_flags' instead.
10170 (linux_wait_for_event_1): Set ptrace options here.
10171 (linux_wait_1): ... not here.
10172
10173 2009-04-30 Doug Evans <dje@google.com>
10174
10175 * inferiors.c (started_inferior_callback): New function.
10176 (attached_inferior_callback): New function.
10177 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10178 * server.c (print_started_pid, print_attached_pid): New functions.
10179 (detach_or_kill_for_exit): New function.
10180 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10181 * server.h (have_started_inferiors_p): Declare.
10182 (have_attached_inferiors_p): Declare.
10183
10184 * inferiors.c (remove_process): Fix memory leak, free process.
10185 * linux-low.c (linux_remove_process): New function.
10186 (linux_kill): Call it instead of remove_process.
10187 (linux_detach, linux_wait_1): Ditto.
10188
10189 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10190
10191 * configure.srv: Add x86 Windows CE target.
10192
10193 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10194
10195 * inferiors.c (get_thread_process): Make global.
10196 * server.h (get_thread_process): Add prototype.
10197 * thread-db.c (find_one_thread): Use get_thread_process
10198 instead of current_process.
10199 (thread_db_get_tls_address): Do not crash if called when
10200 thread layer is not yet initialized.
10201
10202 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10203
10204 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10205 * spu-low.c (current_tid): Rename to ...
10206 (current_ptid): ... this.
10207 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10208 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10209 ptid_get_lwp (current_ptid) instead of current_tid.
10210 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10211 instead of current_tid. Use find_process_pid to verify pid
10212 argument is valid. Pass proper argument to remove_process.
10213 (spu_thread_alive): Compare current_ptid instead of current_tid.
10214 (spu_resume): Likewise.
10215
10216 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10217
10218 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10219 variable.
10220
10221 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10222
10223 Implement the multiprocess extensions, and add linux multiprocess
10224 support.
10225
10226 * server.h (ULONGEST): Declare.
10227 (struct ptid, ptid_t): New.
10228 (minus_one_ptid, null_ptid): Declare.
10229 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10230 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10231 (struct inferior_list_entry): Change `id' type from unsigned from
10232 to ptid_t.
10233 (struct sym_cache, struct breakpoint, struct
10234 process_info_private): Forward declare.
10235 (struct process_info): Declare.
10236 (current_process): Declare.
10237 (all_processes): Declare.
10238 (initialize_inferiors): Declare.
10239 (add_thread): Adjust to use ptid_t.
10240 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10241 (add_process, remove_process, find_thread_pid): Declare.
10242 (find_inferior_id): Adjust to use ptid_t.
10243 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10244 (multi_process): Declare.
10245 (push_event): Adjust to use ptid_t.
10246 (read_ptid, write_ptid): Declare.
10247 (prepare_resume_reply): Adjust to use ptid_t.
10248 (clear_symbol_cache): Declare.
10249 * inferiors.c (all_processes): New.
10250 (null_ptid, minus_one_ptid): New.
10251 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10252 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10253 (add_thread): Change unsigned long to ptid. Remove gdb_id
10254 parameter. Adjust.
10255 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10256 (gdb_id_to_thread): Rename to ...
10257 (find_thread_pid): ... this. Change unsigned long to ptid.
10258 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10259 (loaded_dll, pull_pid_from_list): Adjust.
10260 (add_process, remove_process, find_process_pid)
10261 (get_thread_process, current_process, initialize_inferiors): New.
10262 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10263 (struct target_waitstatus) <related_pid>: Ditto.
10264 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10265 return type to int.
10266 (struct target_ops) <join>: Add `pid' argument.
10267 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10268 (struct target_ops) <wait>: Add `ptid' field. Change return type
10269 to ptid.
10270 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10271 (mywait): Add `ptid' argument. Change return type to ptid_t.
10272 (target_pid_to_str): Declare.
10273 * target.c (set_desired_inferior): Adjust to use ptids.
10274 (mywait): Add new `ptid' argument. Adjust.
10275 (target_pid_to_str): New.
10276 * mem-break.h (free_all_breakpoints): Declare.
10277 * mem-break.c (breakpoints): Delelete.
10278 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10279 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10280 to use per-process breakpoint list.
10281 (free_all_breakpoints): New.
10282 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10283 (symbol_cache, all_symbols_looked_up): Delete.
10284 (hexchars): New.
10285 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10286 read_ptid): New.
10287 (prepare_resume_reply): Change ptid argument's type from unsigned
10288 long to ptid_t. Adjust. Implement W;process and X;process.
10289 (free_sym_cache, clear_symbol_cache): New.
10290 (look_up_one_symbol): Adjust to per-process symbol cache. *
10291 * server.c (cont_thread, general_thread, step_thread): Change type
10292 to ptid_t.
10293 (attached): Delete.
10294 (multi_process): New.
10295 (last_ptid): Change type to ptid_t.
10296 (struct vstop_notif) <ptid>: Change type to ptid_t.
10297 (queue_stop_reply, push_event): Change `ptid' argument's type to
10298 ptid_t.
10299 (discard_queued_stop_replies): Add `pid' argument.
10300 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10301 changes. Don't reference the `attached' global.
10302 (attach_inferior): Adjust to mywait interface changes.
10303 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10304 features. Handle and report "multiprocess+". Handle
10305 "qAttached:PID".
10306 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10307 changes.
10308 (handle_v_kill): New.
10309 (handle_v_stopped): Adjust to use target_pid_to_str.
10310 (handle_v_requests): Allow multiple attaches and runs when
10311 multiprocess extensions are in effect. Handle "vKill".
10312 (myresume): Adjust to use ptids.
10313 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10314 (handle_status): Adjust to discard_queued_stop_replies interface
10315 change.
10316 (first_thread_of, kill_inferior_callback)
10317 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10318 (main): Call initialize_inferiors. Adjust to use ptids, killing
10319 and detaching from all inferiors. Handle multiprocess packet
10320 variants.
10321 * linux-low.h: Include gdb_proc_service.h.
10322 (struct process_info_private): New.
10323 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10324 <lwpid_of>: Use ptid_get_lwp.
10325 (get_lwp_thread): Adjust.
10326 (struct lwp_info): Add `dead' member.
10327 (find_lwp_pid): Declare.
10328 * linux-low.c (thread_db_active): Delete.
10329 (new_inferior): Adjust comment.
10330 (inferior_pid): Delete.
10331 (linux_add_process): New.
10332 (handle_extended_wait): Adjust.
10333 (add_lwp): Change unsigned long to ptid.
10334 (linux_create_inferior): Add process to processes table. Adjust
10335 to use ptids. Don't set new_inferior here.
10336 (linux_attach_lwp): Rename to ...
10337 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10338 it. Adjust to use ptids.
10339 (linux_attach_lwp): New.
10340 (linux_attach): Add process to processes table. Don't set
10341 new_inferior here.
10342 (struct counter): New.
10343 (second_thread_of_pid_p, last_thread_of_process_p): New.
10344 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10345 multiple processes.
10346 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10347 processes. Remove process from process table.
10348 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10349 to multiple processes.
10350 (any_thread_of): New.
10351 (linux_detach): Add `pid' argument, and handle it. Remove process
10352 from processes table.
10353 (linux_join): Add `pid' argument. Handle it.
10354 (linux_thread_alive): Change unsighed long argument to ptid_t.
10355 Consider dead lwps as not being alive.
10356 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10357 threads we're not interested in.
10358 (same_lwp, find_lwp_pid): New.
10359 (linux_wait_for_lwp): Change `pid' argument's type from int to
10360 ptid_t. Adjust.
10361 (linux_wait_for_event): Rename to ...
10362 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10363 from int to ptid_t. Adjust.
10364 (linux_wait_for_event): New.
10365 (linux_wait_1): Add `ptid' argument. Change return type to
10366 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10367 that exit from the process table.
10368 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10369 Adjust.
10370 (mark_lwp_dead): New.
10371 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10372 stopping all threads, mark its main lwp as dead.
10373 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10374 ptids.
10375 (fetch_register, usr_store_inferior_registers)
10376 (regsets_fetch_inferior_registers)
10377 (regsets_store_inferior_registers, linux_read_memory)
10378 (linux_write_memory): Inline `inferior_pid'.
10379 (linux_look_up_symbols): Adjust to use per-process
10380 `thread_db_active'.
10381 (linux_request_interrupt): Adjust to use ptids.
10382 (linux_read_auxv): Inline `inferior_pid'.
10383 (initialize_low): Don't reference thread_db_active.
10384 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10385 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10386 (ps_getpid): Return the pid of the current inferior.
10387 * thread-db.c (proc_handle, thread_agent): Delete.
10388 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10389 per-process data.
10390 (find_one_thread): Change argument type to ptid_t. Adjust to
10391 per-process data.
10392 (maybe_attach_thread): Adjust to per-process data and ptids.
10393 (thread_db_find_new_threads): Ditto.
10394 (thread_db_init): Ditto.
10395 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10396 processes table. Adjust to use ptids.
10397 (spu_kill, spu_detach): Adjust interface. Remove process from
10398 processes table.
10399 (spu_join, spu_thread_alive): Adjust interface.
10400 (spu_wait): Adjust interface. Remove process from processes
10401 table. Adjust to use ptids.
10402 * win32-low.c (current_inferior_tid): Delete.
10403 (current_inferior_ptid): New.
10404 (debug_event_ptid): New.
10405 (thread_rec): Take a ptid. Adjust.
10406 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10407 (child_delete_thread): Ditto.
10408 (do_initial_child_stuff): Add `attached' argument. Add process to
10409 processes table.
10410 (child_fetch_inferior_registers, child_store_inferior_registers):
10411 Adjust.
10412 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10413 (win32_attach): Pass 1 to do_initial_child_stuff.
10414 (win32_kill): Adjust interface. Remove process from processes
10415 table.
10416 (win32_detach): Ditto.
10417 (win32_join): Adjust interface.
10418 (win32_thread_alive): Take a ptid.
10419 (win32_resume): Adjust to use ptids.
10420 (get_child_debug_event): Ditto.
10421 (win32_wait): Adjust interface. Remove exiting process from
10422 processes table.
10423
10424 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10425
10426 Non-stop mode support.
10427
10428 * server.h (non_stop): Declare.
10429 (gdb_client_data, handler_func): Declare.
10430 (delete_file_handler, add_file_handler, start_event_loop):
10431 Declare.
10432 (handle_serial_event, handle_target_event, push_event)
10433 (putpkt_notif): Declare.
10434 * target.h (enum resume_kind): New.
10435 (struct thread_resume): Replace `step' field by `kind' field.
10436 (TARGET_WNOHANG): Define.
10437 (struct target_ops) <wait>: Add `options' argument.
10438 <supports_non_stop, async, start_non_stop>: New fields.
10439 (target_supports_non_stop, target_async): New.
10440 (start_non_stop): Declare.
10441 (mywait): Add `options' argument.
10442 * target.c (mywait): Add `options' argument. Print child exit
10443 notifications here.
10444 (start_non_stop): New.
10445 * server.c (non_stop, own_buf, mem_buf): New globals.
10446 (struct vstop_notif): New.
10447 (notif_queue): New global.
10448 (queue_stop_reply, push_event, discard_queued_stop_replies)
10449 (send_next_stop_reply): New.
10450 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10451 interface changes.
10452 (attach_inferior): In non-stop mode, don't wait for the target
10453 here.
10454 (handle_general_set): Handle QNonStop.
10455 (handle_query): When handling qC, return the current general
10456 thread, instead of the first thread of the list.
10457 (handle_query): If the backend supports non-stop mode, include
10458 QNonStop+ in the qSupported query response.
10459 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10460 and non-stop mode.
10461 (handle_v_attach, handle_v_run): Handle non-stop mode.
10462 (handle_v_stopped): New.
10463 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10464 (myresume): Adjust to use resume_kind. Handle non-stop.
10465 (queue_stop_reply_callback): New.
10466 (handle_status): Handle non-stop mode.
10467 (main): Clear non_stop flag on reconnection. Use the event-loop.
10468 Refactor serial protocol handling from here ...
10469 (process_serial_event): ... to this new function. When GDB
10470 selects any thread, select one here. In non-stop mode, wait until
10471 GDB acks all pending events before exiting.
10472 (handle_serial_event, handle_target_event): New.
10473 * remote-utils.c (remote_open): Install remote_desc in the event
10474 loop.
10475 (remote_close): Remove remote_desc from the event loop.
10476 (putpkt_binary): Rename to...
10477 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10478 (putpkt_binary): New as wrapper around putpkt_binary_1.
10479 (putpkt_notif): New.
10480 (prepare_resume_reply): In non-stop mode, don't change the
10481 general_thread.
10482 * event-loop.c: New.
10483 * Makefile.in (OBJ): Add event-loop.o.
10484 (event-loop.o): New rule.
10485
10486 * linux-low.h (pid_of): Moved here.
10487 (lwpid_of): New.
10488 (get_lwp_thread): Use lwpid_of.
10489 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10490 * linux-low.c (pid_of): Delete.
10491 (inferior_pid): Use lwpid_of.
10492 (linux_event_pipe): New.
10493 (target_is_async_p): New.
10494 (delete_lwp): New.
10495 (handle_extended_wait): Use lwpid_of.
10496 (add_lwp): Don't set lwpid field.
10497 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10498 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10499 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10500 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10501 first. Adjust to linux_wait_for_event interface changes. Use
10502 lwpid_of.
10503 (linux_detach): Don't delete the main lwp here.
10504 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10505 (status_pending_p): Don't consider explicitly suspended lwps.
10506 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10507 pointer. Add OPTIONS argument. Change return type to int. Use
10508 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10509 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10510 pointer. Add status pointer argument. Return a pid instead of a
10511 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10512 changes. In non-stop mode, don't switch to a random thread.
10513 (linux_wait): Rename to...
10514 (linux_wait_1): ... this. Add target_options argument, and handle
10515 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10516 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10517 clean exit and signal exit code. Don't stop all threads in
10518 non-stop mode. In all-stop mode, only stop all threads when
10519 reporting a stop to GDB. Handle explicit thread stop requests.
10520 (async_file_flush, async_file_mark): New.
10521 (linux_wait): New.
10522 (send_sigstop): Use lwpid_of.
10523 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10524 interface changes. In non-stop mode, don't switch to a random
10525 thread.
10526 (linux_resume_one_lwp): Use lwpid_of.
10527 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10528 (linux_resume_one_thread): ... this. Handle resume_stop. In
10529 non-stop mode, don't look for pending flag in all threads.
10530 (resume_status_pending_p): Don't consider explicitly suspended
10531 threads.
10532 (my_waitpid): Reimplement. Emulate __WALL.
10533 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10534 Use lwpid_of.
10535 (sigchld_handler, linux_supports_non_stop, linux_async)
10536 (linux_start_non_stop): New.
10537 (linux_target_ops): Register linux_supports_non_stop, linux_async
10538 and linux_start_non_stop.
10539 (initialize_low): Install SIGCHLD handler.
10540 * thread-db.c (thread_db_create_event, find_one_thread)
10541 (thread_db_get_tls_address): Use lwpid_of.
10542 * win32-low.c (win32_detach): Adjust to use resume_kind.
10543 (win32_wait): Add `options' argument.
10544 * spu-low.c (spu_resume): Adjust to use resume_kind.
10545 (spu_wait): Add `options' argument.
10546
10547 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10548
10549 Decouple target code from remote protocol.
10550
10551 * target.h (enum target_waitkind): New.
10552 (struct target_waitstatus): New.
10553 (struct target_ops) <wait>: Return an unsigned long. Take a
10554 target_waitstatus pointer instead of a char pointer.
10555 (mywait): Likewise.
10556 * target.c (mywait): Change prototype to return an unsigned long.
10557 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10558 * server.h (thread_from_wait, old_thread_from_wait): Delete
10559 declarations.
10560 (prepare_resume_reply): Change prototype to take a
10561 target_waitstatus.
10562 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10563 (last_status, last_ptid): New.
10564 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10565 pid instead of a signal.
10566 (attach_inferior): Remove "status" and "signal" parameters.
10567 Adjust.
10568 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10569 not as an address.
10570 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10571 (handle_v_requests, myresume): Remove "status" and "signal"
10572 parameters. Adjust.
10573 (handle_status): New.
10574 (main): Delete local `status'. Adjust.
10575 * remote-utils.c: Include target.h.
10576 (prepare_resume_reply): Change prototype to take a
10577 target_waitstatus. Adjust.
10578
10579 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10580 interface.
10581 * spu-low.c (spu_wait): Adjust.
10582 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10583 Delete.
10584 (win32_wait): Adjust.
10585
10586 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10587
10588 * target.h (struct thread_resume): Delete leave_stopped member.
10589 (struct target_ops): Add a `n' argument to the `resume' callback.
10590 * server.c (start_inferior): Adjust.
10591 (handle_v_cont, myresume): Adjust.
10592 * linux-low.c (check_removed_breakpoint): Adjust to resume
10593 interface change, and to removed leave_stopped field.
10594 (resume_ptr): Delete.
10595 (struct thread_resume_array): New.
10596 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10597 resume interface change.
10598 (linux_continue_one_thread, linux_queue_one_thread)
10599 (resume_status_pending_p): Check if the resume field is NULL
10600 instead of checking the leave_stopped member.
10601 (linux_resume): Adjust to the target resume interface change.
10602 * spu-low.c (spu_resume): Adjust to the target resume interface
10603 change.
10604 * win32-low.c (win32_detach, win32_resume): Ditto.
10605
10606 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10607
10608 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10609 flag.
10610 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10611 pending.
10612 (linux_continue_one_thread): Only preserve the stepping flag if
10613 there's a pending breakpoint.
10614
10615 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10616
10617 * server.c (main): After the inferior having exited, call
10618 remote_close before exiting gdbserver.
10619
10620 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10621
10622 Fix size of FPSCR in Power 7 processors.
10623 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10624 (PPC_FEATURE_HAS_DFP): New #define.
10625 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10626 size of the FPSCR.
10627
10628 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10629
10630 * server.c (handle_query) Whitespace and formatting.
10631
10632 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10633
10634 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10635 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10636 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10637 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10638 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10639 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10640 Makefile.in, configure.ac: Fix whitespace throughout.
10641 * configure: Regenerate.
10642
10643 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10644
10645 * inferiors.c (find_inferior): Make it safe for the callback
10646 function to delete the currently iterated inferior.
10647
10648 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10649
10650 * Makefile.in (linuw_low_h): Move higher.
10651 (thread-db.o): Depend on $(linux_low_h).
10652
10653 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10654
10655 Rename "process" to "lwp" throughout.
10656
10657 * linux-low.c (all_processes): Rename to...
10658 (all_lwps): ... this.
10659 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10660 (add_process): Rename to ...
10661 (add_lwp): ... this. Adjust.
10662 (linux_create_inferior): Adjust.
10663 (linux_attach_lwp): Adjust.
10664 (linux_attach): Adjust.
10665 (linux_kill_one_process): Rename to ...
10666 (linux_kill_one_lwp): ... this. Adjust.
10667 (linux_kill): Adjust.
10668 (linux_detach_one_process): Rename to ...
10669 (linux_detach_one_lwp): ... this. Adjust.
10670 (linux_detach): Adjust.
10671 (check_removed_breakpoint): Adjust.
10672 (status_pending_p): Adjust.
10673 (linux_wait_for_process): Rename to ...
10674 (linux_wait_for_lwp): ... this. Adjust.
10675 (linux_wait_for_event): Adjust.
10676 (send_sigstop): Adjust.
10677 (wait_for_sigstop): Adjust.
10678 (stop_all_processes): Rename to ...
10679 (stop_all_lwps): ... this.
10680 (linux_resume_one_process): Rename to ...
10681 (linux_resume_one_lwp): ... this. Adjust.
10682 (linux_set_resume_request, linux_continue_one_thread)
10683 (linux_queue_one_thread, resume_status_pending_p)
10684 (usr_store_inferior_registers, regsets_store_inferior_registers)
10685 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10686 Adjust.
10687 * linux-low.h (get_process): Rename to ...
10688 (get_lwp): ... this. Adjust.
10689 (get_thread_process): Rename to ...
10690 (get_thread_lwp): ... this. Adjust.
10691 (get_process_thread): Rename to ...
10692 (get_lwp_thread): ... this. Adjust.
10693 (struct process_info): Rename to ...
10694 (struct lwp_info): ... this.
10695 (all_processes): Rename to ...
10696 (all_lwps): ... this.
10697 * proc-service.c (ps_lgetregs): Adjust.
10698 * thread-db.c (thread_db_create_event, find_one_thread)
10699 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10700
10701 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10702
10703 * server.c (handle_query): Handle "qAttached".
10704
10705 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10706
10707 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10708 GPLv3, update license URL.
10709
10710 2009-03-01 Doug Evans <dje@google.com>
10711
10712 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10713 (server_h): Add gdb_signals.h.
10714 (signals.o): Update.
10715 * server.h (target_signal_from_host,target_signal_to_host_p)
10716 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10717
10718 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10719
10720 * remote-utils.c (getpkt): Also generate remote-debug
10721 information if noack_mode is set.
10722
10723 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10724
10725 * server.c (handle_query): Report qXfer:siginfo:read and
10726 qXfer:siginfo:write as supported and handle them.
10727 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10728 * linux-low.c (linux_xfer_siginfo): New.
10729 (linux_target_ops): Set it.
10730
10731 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10732
10733 * server.c (gdbserver_usage): Mention --remote-debug.
10734 (main): Accept '--remote-debug' switch.
10735
10736 2009-01-18 Doug Evans <dje@google.com>
10737
10738 * regcache.c (new_register_cache): No need to check result of xcalloc.
10739 * server.c (handle_search_memory): Back out calls to xmalloc,
10740 result is checked and error is returned to user upon failure.
10741 (handle_query): Ditto. Add more checks for result of malloc.
10742 (handle_v_cont): Check result of malloc, report error back to
10743 user upon failure.
10744 (handle_v_run): Ditto. Call freeargv.
10745 * server.h (freeargv): Declare.
10746 * utils.c (freeargv): New fn.
10747
10748 2009-01-15 Doug Evans <dje@google.com>
10749
10750 * gdbreplay.c (perror_with_name): Make arg const char *.
10751 * server.h (target_signal_to_name): Make return type const char *.
10752 * thread-db.c (thread_db_err_str): Make return type const char *.
10753 * utils.c (perror_with_name): Make arg const char *.
10754
10755 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10756
10757 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10758 when handling a EXIT_PROCESS_DEBUG_EVENT.
10759
10760 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10761
10762 * gdbreplay.c (gdbreplay_version): Update copyright year.
10763 * server.c (gdbserver_version): Likewise.
10764
10765 2009-01-05 Doug Evans <dje@google.com>
10766
10767 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10768 (handle_extended_wait): Improve comment.
10769
10770 2008-12-13 Doug Evans <dje@google.com>
10771
10772 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10773 * server.h (ATTR_MALLOC): New macro.
10774 (xmalloc,xcalloc,xstrdup): Declare.
10775 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10776 * inferiors.c: Ditto.
10777 * linux-low.c: Ditto.
10778 * mem-break.c: Ditto.
10779 * regcache.c: Ditto.
10780 * remote-utils.c: Ditto.
10781 * server.c: Ditto.
10782 * target.c: Ditto.
10783 * win32-low.c: Ditto.
10784
10785 2008-12-12 Doug Evans <dje@google.com>
10786
10787 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10788 in debugging printf.
10789
10790 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10791
10792 2008-12-09 Doug Evans <dje@google.com>
10793
10794 * linux-low.h (struct process_info): Delete member tid, unused.
10795 * thread-db.c (find_one_thread): Update.
10796 (maybe_attach_thread): Update.
10797
10798 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10799
10800 * target.h (struct target_ops): Add qxfer_osdata member.
10801 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10802 and dirent.h.
10803 (linux_qxfer_osdata): New functions.
10804 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10805 callback.
10806 * server.c (handle_query): Handle "qXfer:osdata:read:".
10807 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10808 (buffer_xml_printf): New functions.
10809 * server.h (struct buffer): New.
10810 (buffer_grow_str, buffer_grow_str0): New macros.
10811 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10812 (buffer_xml_printf): Declare.
10813
10814 2008-11-24 Doug Evans <dje@google.com>
10815
10816 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10817
10818 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10819
10820 * server.c (handle_v_run): Always use the supplied argument list.
10821
10822 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10823
10824 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10825 (xtensa_regmap_table): Add entry for scompare1.
10826
10827 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10828
10829 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10830 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10831 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10832 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10833 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10834 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10835 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10836 XML target descriptions.
10837 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10838 when inferior is running on an ISA 2.05 or later processor. Add
10839 special case to return offset for full 64-bit slot of FPSCR when
10840 in 32-bits.
10841
10842 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10843
10844 * Makefile.in (SFILES, clean): Added sparc64 files.
10845 (reg-sparc64.o, reg-sparc64.c): New.
10846 * configure.srv (sparc*-*-linux*): New configuration.
10847 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10848 syscall arguments for SPARC.
10849 (regsets_store_inferior_registers): Likewise.
10850 * linux-sparc-low.c: New file.
10851
10852 2008-10-21 Doug Evans <dje@google.com>
10853
10854 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10855 (READLINE_DIR,READLINE_DEP): Delete.
10856 (INTERNAL_CFLAGS): Update.
10857 (LINTFLAGS): Update.
10858
10859 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10860
10861 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10862 whole argv from the last run, not just argv[0].
10863
10864 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10865
10866 * regcache.c (new_register_cache): Return NULL if the register
10867 cache size isn't known yet.
10868 (free_register_cache): Avoid dereferencing a NULL regcache.
10869
10870 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10871
10872 * configure.srv: Merge MIPS and MIPS64.
10873
10874 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10875
10876 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10877
10878 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10879
10880 * Makefile.in: Add required vsx dependencies.
10881
10882 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10883 Declare init_registers_powerpc_vsx32l.
10884 Declare init_registers_powerpc_vsx64l.
10885 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10886 (ppc_arch_setup): Check for VSX in hwcap.
10887 (ppc_fill_vsxregset): New function.
10888 (ppc_store_vsxregset): New function.
10889 Add new VSX entry in regset_info target_regsets.
10890
10891 * configure.srv: Add new VSX dependencies.
10892
10893 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10894
10895 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10896 (remote_open): Set or clear transport_is_reliable.
10897 (putpkt_binary): Don't expect acks in noack mode.
10898 (getpkt): Don't send ack/nac in noack mode.
10899 * server.c (handle_general_set): Handle QStartNoAckMode.
10900 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10901 qSupported.
10902 (main): Reset noack_mode on every connection.
10903 * server.h (noack_mode): Declare.
10904
10905 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10906
10907 * Makefile.in (GDBREPLAY_OBS): New variable.
10908 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10909
10910 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10911 Daniel Jacobowitz <dan@codesourcery.com>
10912
10913 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10914 (usr_store_inferior_registers): Likewise.
10915 (regsets_store_inferior_registers): Likewise.
10916
10917 2008-07-31 Rolf Jansen <rj@surtec.com>
10918 Pedro Alves <pedro@codesourcery.com>
10919
10920 * configure.ac: Check for memmem declaration.
10921 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10922 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10923 (disable_packet_qfThreadInfo): Unconditionally compile.
10924 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10925 * configure, config.in: Regenerate.
10926
10927 2008-07-28 Doug Kwan <dougkwan@google.com>
10928
10929 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10930 (linux_write_memory): Remove declaration of errno.
10931
10932 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10933
10934 * linux-low.c (handle_extended_wait): Do not use "status"
10935 variable uninitialized.
10936
10937 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10938
10939 * server.c (handle_v_attach): Inhibit reporting dll changes.
10940
10941 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10942
10943 * remote-utils.c (prepare_resume_reply): If requested, don't
10944 output "thread:TID" in the T stop reply.
10945
10946 * server.c (disable_packet_vCont, disable_packet_Tthread)
10947 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10948 (handle_query): If requested, disable support for qC, qfThreadInfo
10949 and qsThreadInfo.
10950 (handle_v_requests): If requested, disable support for vCont.
10951 (gdbserver_show_disableable): New.
10952 (main): Handle --disable-packet and --disable-packet=LIST.
10953
10954 * server.h (disable_packet_vCont, disable_packet_Tthread)
10955 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10956
10957 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10958
10959 * server.c (gdbserver_usage): Mention --version.
10960
10961 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10962
10963 * Makefile.in (gdbreplay.o): New rule.
10964
10965 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10966
10967 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10968 message, not gdbserver.
10969
10970 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10971 Nathan Sidwell <nathan@codesourcery.com>
10972 Joseph Myers <joseph@codesourcery.com>
10973
10974 * acinclude.m4: Include ../../config/acx.m4.
10975 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10976 * configure, config.in: Regenerate.
10977 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10978 * server.c (gdbserver_version): Print PKGVERSION.
10979 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10980 (main): Adjust gdbserver_usage calls.
10981 * gdbreplay.c (version, host_name): Add declarations.
10982 (gdbreplay_version, gdbreplay_usage): New.
10983 (main): Accept --version and --help options.
10984
10985 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10986
10987 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10988 (arm_breakpoint_at): Handle Thumb.
10989 (the_low_target): Add comment.
10990
10991 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10992
10993 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10994
10995 2008-05-09 Doug Evans <dje@google.com>
10996
10997 * server.h (decode_search_memory_packet): Declare.
10998 * remote-utils.c (decode_search_memory_packet): New fn.
10999 * server.c (handle_search_memory_1): New fn.
11000 (handle_search_memory): New fn.
11001 (handle_query): Process qSearch:memory packets.
11002
11003 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11004
11005 * regcache.c (registers_length): Remove.
11006 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11007 full register packet.
11008 * regcache.h (registers_length): Remove prototype.
11009 * server.h (PBUFSIZ): Define to 16384.
11010
11011 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11012
11013 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11014 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11015 powerpc-64l.o, and powerpc-altivec64l.o.
11016 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11017 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11018 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11019 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11020 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11021 to srv_xmlfiles.
11022
11023 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11024 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11025 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11026 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11027 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11028 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11029 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11030 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11031 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11032 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11033 (clean): Update.
11034
11035 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11036 (init_registers_powerpc_32l): ... this new prototype.
11037 (init_registers_powerpc_32): Remove, replace by ...
11038 (init_registers_powerpc_altivec32l): ... this new prototype.
11039 (init_registers_powerpc_e500): Remove, replace by ...
11040 (init_registers_powerpc_e500l): ... this new prototype.
11041 (init_registers_ppc64): Remove, replace by ...
11042 (init_registers_powerpc_64l): ... this new prototype.
11043 (init_registers_powerpc_64): Remove, replace by ...
11044 (init_registers_powerpc_altivec64l): ... this new prototype.
11045 (ppc_num_regs): Set to 73.
11046 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11047 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11048 (ppc_cannot_store_register): Handle orig_r3 and trap.
11049 (ppc_arch_setup): Update init_registers_... calls.
11050 (ppc_fill_gregset): Handle orig_r3 and trap.
11051
11052 * inferiors.c (clear_inferiors): Reset current_inferior.
11053
11054 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11055
11056 * acinclude.m4: Add override.m4.
11057 * configure: Regenerate.
11058
11059 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11060
11061 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11062 initial call to init_register_ppc64.
11063
11064 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11065
11066 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11067 single powerpc*-*-linux* case.
11068 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11069
11070 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11071
11072 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11073 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11074 from reg_xmlfiles.
11075 * linux-ppc-low.c: Include <elf.h>.
11076 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11077 (ppc_hwcap): New global variable.
11078 (ppc_regmap): Remove __SPE__ #ifdef sections.
11079 (ppc_regmap_e500): New global variable.
11080 (ppc_cannot_store_register): Update __SPE__ special case.
11081 (ppc_get_hwcap): New function.
11082 (ppc_arch_setup): Use it to determine whether inferior supports
11083 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11084 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11085 Do not access registers if target does not support AltiVec.
11086 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11087 Do not access registers if target does not support SPE.
11088 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11089
11090 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11091
11092 * linux-low.c (disabled_regsets, num_regsets): New.
11093 (use_regsets_p): Delete.
11094 (linux_wait_for_process): Clear disabled_regsets.
11095 (regsets_fetch_inferior_registers): Check and set it.
11096 (regsets_store_inferior_registers): Likewise.
11097 (linux_fetch_registers, linux_store_registers): Do not use
11098 use_regsets_p.
11099 (initialize_low): Allocate disabled_regsets.
11100
11101 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11102
11103 * Makefile.in (LIBOBJS): New.
11104 (OBS): Use LIBOBJS.
11105 (memmem.o): New rule.
11106 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11107 * configure: Regenerated.
11108
11109 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11110
11111 * server.c (handle_query): Never return "unsupported" for
11112 qXfer:features:read queries.
11113
11114 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11115
11116 * server.c (get_features_xml): Fix inverted condition.
11117 (handle_query): Always support qXfer:feature:read.
11118
11119 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11120
11121 * server.c (wrapper_argv): New.
11122 (start_inferior): Handle wrapper_argv. If set, expect an extra
11123 trap.
11124 (gdbserver_usage): Document --wrapper.
11125 (main): Parse --wrapper.
11126
11127 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11128
11129 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11130 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11131 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11132 (ppc_set_pc): Likewise.
11133 (ppc_arch_setup): New function.
11134 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11135 of collect_register.
11136 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11137
11138 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11139
11140 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11141 instead of linux-ppc64-low.o.
11142 * linux-ppc64-low.c: Remove file.
11143 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11144 (linux-ppc64-low.o): Remove rule.
11145
11146 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11147 (init_registers_powerpc_64): Likewise.
11148 (ppc_regmap): Conditionally define depending on __powerpc64__.
11149 (ppc_cannot_store_register): Do not special-case "fpscr" when
11150 compiled on __powerpc64__.
11151 (ppc_collect_ptrace_register): New function.
11152 (ppc_supply_ptrace_register): New function.
11153 (ppc_breakpoint): Change type to "unsigned int".
11154 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11155 (the_low_target): Conditionally provide initializers for the
11156 arch_setup member depending on __powerpc64__. Install
11157 collect_ptrace_register and supply_ptrace_register members.
11158
11159 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11160
11161 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11162 * server.c (gdbserver_xmltarget): Define.
11163 (get_features_xml): Use it to replace "target.xml" and arch_string.
11164
11165 * configure.srv: Remove srv_xmltarget. Add XML files that were
11166 mentioned there to srv_xmlfiles instead. Remove conditional tests
11167 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11168 srv_xmlfiles and srv_regobj to include all possible choices.
11169 * configure.ac (srv_xmltarget): Remove.
11170 (srv_xmlfiles): Do not add "target.xml".
11171 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11172 checks for supplementary target information.
11173 * configure: Regenerate.
11174 * Makefile.in (XML_TARGET): Remove.
11175 (target.xml): Remove rule.
11176 (clean): Do not clean up target.xml.
11177 (.PRECIOUS): Do not mention target.xml.
11178
11179 * target.h (struct target_ops): Remove arch_string member.
11180 * linux-low.c (linux_arch_string): Remove.
11181 (linux_target_ops): Remove arch_string initializer.
11182 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11183 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11184 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11185 * spu-low.c (spu_arch_string): Remove.
11186 (spu_target_ops): Remove arch_string initializer.
11187 * win32-low.c (win32_arch_string): Remove.
11188 (win32_target_ops): Remove arch_string initializer.
11189 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11190 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11191 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11192
11193 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11194
11195 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11196 by collect_ptrace_register and supply_ptrace_register hooks.
11197 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11198 instead of checking for the_low_target.left_pad_xfer.
11199 (usr_store_inferior_registers): Use collect_ptrace_register callback
11200 instead of checking for the_low_target.left_pad_xfer.
11201
11202 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11203 (s390_supply_ptrace_register): Likewise.
11204 (s390_fill_gregset): Call s390_collect_ptrace_register.
11205 (the_low_target): Update.
11206
11207 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11208 (ppc_supply_ptrace_register): Likewise.
11209 (the_low_target): Update.
11210
11211 * linux-i386-low.c (the_low_target): Update.
11212 * linux-x86-64-low.c (the_low_target): Update.
11213
11214 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11215
11216 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11217 reg-s390.o and reg-s390x.o.
11218
11219 * linux-low.c (new_inferior): New global variable.
11220 (linux_create_inferior, linux_attach): Set it.
11221 (linux_wait_for_process): Call the_low_target.arch_setup after the
11222 target has stopped for the first time.
11223 (initialize_low): Do not call the_low_target.arch_setup.
11224
11225 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11226 (s390_set_pc): Likewise.
11227 (s390_arch_setup): New function.
11228 (the_low_target): Use s390_arch_setup as arch_setup routine.
11229
11230 * regcache.c (realloc_register_cache): New function.
11231 (set_register_cache): Call it for each existing regcache.
11232
11233 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11234
11235 * server.h (init_registers): Remove prototype.
11236
11237 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11238 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11239 instead of init_registers ().
11240 * linux-arm-low.c (init_registers_arm): Add prototype.
11241 (init_registers_arm_with_iwmmxt): Likewise.
11242 (the_low_target): Add initializer for arch_setup field.
11243 * linux-cris-low.c (init_registers_cris): Add prototype.
11244 (the_low_target): Add initializer for arch_setup field.
11245 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11246 (the_low_target): Add initializer for arch_setup field.
11247 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11248 (the_low_target): Add initializer for arch_setup field.
11249 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11250 (the_low_target): Add initializer for arch_setup field.
11251 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11252 (the_low_target): Add initializer for arch_setup field.
11253 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11254 (the_low_target): Add initializer for arch_setup field.
11255 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11256 (init_registers_mips64_linux): Likewise.
11257 (the_low_target): Add initializer for arch_setup field.
11258 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11259 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11260 (the_low_target): Add initializer for arch_setup field.
11261 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11262 (init_registers_powerpc_64): Likewise.
11263 (the_low_target): Add initializer for arch_setup field.
11264 * linux-s390-low.c (init_registers_s390): Add prototype.
11265 (init_registers_s390x): Likewise.
11266 (the_low_target): Add initializer for arch_setup field.
11267 * linux-sh-low.c (init_registers_sh): Add prototype.
11268 (the_low_target): Add initializer for arch_setup field.
11269 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11270 (the_low_target): Add initializer for arch_setup field.
11271 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11272 (the_low_target): Add initializer for arch_setup field.
11273
11274 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11275 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11276 instead of init_registers ().
11277 * win32-arm-low.c (init_registers_arm): Add prototype.
11278 (the_low_target): Add initializer for arch_setup field.
11279 * win32-i386-low.c (init_registers_i386): Add prototype.
11280 (the_low_target): Add initializer for arch_setup field.
11281
11282 * spu-low.c (init_registers_spu): Add prototype.
11283 (initialize_low): Call initialie_registers_spu () instead of
11284 initialize_registers ().
11285
11286 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11287
11288 * server.c (handle_v_requests): When handling the vRun and vAttach
11289 packets, if already debugging a process, don't kill it. Return an
11290 error instead.
11291
11292 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11293
11294 * server.c (handle_query): Correct length check.
11295
11296 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11297
11298 * win32-low.c (do_initial_child_stuff): Add process handle
11299 parameter. Set current_process_handle and current_process_id from the
11300 parameters. Clear globals.
11301 (win32_create_inferior): Don't set current_process_handle and
11302 current_process_id here. Instead pass them on the call to
11303 do_initial_child_stuff.
11304 (win32_attach): Likewise.
11305 (win32_clear_inferiors): New.
11306 (win32_kill): Don't close the current process handle or the
11307 current thread handle here. Instead call win32_clear_inferiors.
11308 (win32_detach): Don't open a new handle to the process. Call
11309 win32_clear_inferiors.
11310 (win32_join): Don't rely on current_process_handle; open a new
11311 handle using the process id.
11312 (win32_wait): Call win32_clear_inferiors when the inferior process
11313 has exited.
11314
11315 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11316
11317 * server.c (monitor_show_help): Add "exit".
11318
11319 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11320
11321 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11322 (clean): Add reg-xtensa.c.
11323 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11324 * configure.srv (xtensa*-*-linux*) New target.
11325 * linux-xtensa-low.c: New.
11326 * xtensa-xtregs.c: New.
11327
11328 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11329
11330 * hostio.c: Don't include errno.h.
11331 (errno_to_fileio_errno): Move to hostio-errno.
11332 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11333 error number outputting to the target->hostio_last_error callback.
11334 (hostio_packet_error): Use FILEIO_EINVAL directly.
11335 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11336 calls to hostio_error.
11337 * hostio-errno.c: New.
11338 * server.h (hostio_last_error_from_errno): Declare.
11339 * target.h (target_ops): Add hostio_last_error member.
11340 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11341 as hostio_last_error handler.
11342 * spu-low.c (spu_target_ops): Likewise.
11343 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11344 (wince_hostio_last_error): New functions.
11345 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11346 as hostio_last_error handler.
11347 (win32_target_ops) [!_WIN32_WCE]: Register
11348 hostio_last_error_from_errno as hostio_last_error handler.
11349 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11350 (hostio-errno.o): New rule.
11351 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11352 * configure.srv (srv_hostio_err_objs): New variable. Default to
11353 hostio-errno.o.
11354 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11355 * configure: Regenerate.
11356
11357 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11358
11359 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11360 (linux_kill, linux_detach): Clean up the process list.
11361 * remote-utils.c (remote_open): Improve port number parsing.
11362 (putpkt_binary, input_interrupt): Only send interrupts if the target
11363 is running.
11364 * server.c (extended_protocol): Make static.
11365 (attached): Define earlier.
11366 (exit_requested, response_needed, program_argv): New variables.
11367 (target_running): New.
11368 (start_inferior): Clear attached here.
11369 (attach_inferior): Set attached here.
11370 (require_running): Define.
11371 (handle_query): Use require_running and target_running. Implement
11372 "monitor exit".
11373 (handle_v_attach, handle_v_run): New.
11374 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11375 (gdbserver_usage): Update.
11376 (main): Redo argument parsing. Handle --debug and --multi. Handle
11377 --attach along with other options or after the port. Save
11378 program_argv. Support no initial program. Resynchronize
11379 communication with GDB after an error. Handle "monitor exit".
11380 Use require_running and target_running. Always allow the extended
11381 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11382 restart in extended mode.
11383 * README: Refer to the GDB manual. Update --attach usage.
11384
11385 2007-12-20 Andreas Schwab <schwab@suse.de>
11386
11387 * linux-low.c (STACK_SIZE): Define.
11388 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11389 (linux_test_for_tracefork): Likewise.
11390
11391 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11392
11393 * linux-low.c (linux_wait_for_event): Update messages. Do not
11394 reinsert auto-delete breakpoints.
11395 * mem-break.c (struct breakpoint): Change return type of handler to
11396 int.
11397 (set_breakpoint_at): Update handler type.
11398 (reinsert_breakpoint_handler): Return 1 instead of calling
11399 delete_breakpoint.
11400 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11401 setting a new one.
11402 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11403 * mem-break.h (set_breakpoint_at): Update handler type.
11404 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11405 * win32-low.c (auto_delete_breakpoint): New.
11406 (get_child_debug_event): Use it.
11407
11408 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11409
11410 * configure.ac: Check for pread and pwrite.
11411 * hostio.c (handle_pread): Fall back to lseek and read.
11412 (handle_pwrite): Fall back to lseek and write.
11413 * config.in, configure: Regenerated.
11414
11415 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11416
11417 * server.c (myresume): Add own_buf argument.
11418 (main): Update calls.
11419
11420 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11421
11422 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11423 * remote-utils.c (remote_open): Do not call disable_async_io.
11424 (block_async_io): Delete.
11425 (unblock_async_io): Make static.
11426 (initialize_async_io): New.
11427 * server.c (handle_v_cont): Handle async I/O here.
11428 (myresume): Likewise. Move other common resume tasks here...
11429 (main): ... from here. Call initialize_async_io. Disable async
11430 I/O before the main loop.
11431 * server.h (initialize_async_io): Declare.
11432 (block_async_io, unblock_async_io): Delete prototypes.
11433 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11434
11435 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11436
11437 * remote-utils.c (readchar): Allow binary data in received messages.
11438
11439 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11440
11441 * win32-low.c (attaching): New global.
11442 (win32_create_inferior): Clear the `attaching' global.
11443 (win32_attach): Set the `attaching' global.
11444 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11445 attaching. Only set a breakpoint at the entry point if not
11446 attaching.
11447
11448 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11449
11450 * server.c (main): Don't report dll events on the initial
11451 connection on attaches.
11452
11453 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11454
11455 * server.c (main): Relax numerical bases supported for the pid of
11456 the --attach command line argument.
11457
11458 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11459
11460 * win32-low.c (win32_attach): Call OpenProcess before
11461 DebugActiveProcess, not after. Add last error output to error
11462 call.
11463
11464 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11465
11466 * win32-low.c (win32_get_thread_context)
11467 (win32_set_thread_context): New functions.
11468 (thread_rec): Use win32_get_thread_context.
11469 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11470 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11471 field.
11472
11473 2007-12-03 Leo Zayas
11474 Pedro Alves <pedro_alves@portugalmail.pt>
11475
11476 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11477 global variables.
11478 (child_add_thread): Minor cleanup.
11479 (child_continue): Resume artificially suspended threads before
11480 calling ContinueDebugEvent.
11481 (suspend_one_thread): New.
11482 (fake_breakpoint_event): New.
11483 (get_child_debug_event): Change return type to int. Check here if
11484 gdb sent an interrupt request. If a soft interrupt was requested,
11485 fake a breakpoint event. Return 0 if there is no event to handle,
11486 and 1 otherwise.
11487 (win32_wait): Don't check here if gdb sent an interrupt request.
11488 Ensure there is a valid event to handle.
11489 (win32_request_interrupt): Add soft interruption method as last
11490 resort.
11491
11492 2007-12-03 Leo Zayas
11493 Pedro Alves <pedro_alves@portugalmail.pt>
11494
11495 * win32-low.h (win32_thread_info): Add descriptions to the
11496 structure members. Replace `suspend_count' counter by a
11497 `suspended' flag.
11498 * win32-low.c (thread_rec): Update condition of when to get the
11499 context from the inferior. Rely on ContextFlags being set if it
11500 has already been retrieved. Only suspend the inferior thread if
11501 we haven't already. Warn if that fails.
11502 (continue_one_thread): s/suspend_count/suspended/. Only call
11503 ResumeThread once. Warn if that fails.
11504
11505 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11506
11507 * win32-low.c (win32_wait): Don't read from the inferior when it
11508 has already exited.
11509
11510 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11511
11512 * Makefile.in (win32_low_h): New variable.
11513 (win32-low.o): Add dependency on $(win32_low_h).
11514 (win32-arm-low.o, win32-i386-low.o): New rules.
11515
11516 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11517
11518 * hostio.c: Correct copyright year.
11519
11520 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11521
11522 * Makefile.in (OBS): Add hostio.o.
11523 (hostio.o): New rule.
11524 * server.h (handle_vFile): Declare.
11525 * hostio.c: New file.
11526 * server.c (handle_v_requests): Take packet_len and new_packet_len
11527 for binary packets. Call handle_vFile.
11528 (main): Update call to handle_v_requests.
11529
11530 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11531
11532 * linux-low.c: Include <sched.h>.
11533
11534 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11535
11536 * linux-low.c (linux_tracefork_grandchild): New.
11537 (linux_tracefork_child): Use clone.
11538 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11539
11540 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11541
11542 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11543
11544 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11545
11546 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11547
11548 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11549
11550 * inferiors.c (change_inferior_id): Delete.
11551 (add_pid_to_list, pull_pid_from_list): New.
11552 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11553 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11554 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11555 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11556 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11557 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11558 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11559 (using_threads): Always set to 1.
11560 (handle_extended_wait): New.
11561 (add_process): Do not set TID.
11562 (linux_create_inferior): Set must_set_ptrace_flags.
11563 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11564 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11565 (linux_thread_alive): Rename TID argument to LWPID.
11566 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11567 (linux_wait_for_event): Do not use TID or check using_threads. Update
11568 call to dead_thread_notify. Call handle_extended_wait.
11569 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11570 (send_sigstop): Delete sigstop_sent.
11571 (wait_for_sigstop): Avoid TID.
11572 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11573 (linux_test_for_tracefork): New.
11574 (linux_lookup_signals): Use thread_db_active and
11575 linux_supports_tracefork_flag.
11576 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11577 * linux-low.h (get_process_thread): Avoid TID.
11578 (struct process_ifo): Move thread_known and tid to the end. Remove
11579 sigstop_sent.
11580 (linux_attach_lwp, thread_db_init): Update prototypes.
11581 * server.h (change_inferior_id): Delete prototype.
11582 (add_pid_to_list, pull_pid_from_list): New prototypes.
11583 * thread-db.c (thread_db_use_events): New.
11584 (find_first_thread): Rename to...
11585 (find_one_thread): ...this. Update callers and messages. Do not
11586 call fatal. Check thread_db_use_events. Do not call
11587 change_inferior_id or new_thread_notify.
11588 (maybe_attach_thread): Update. Do not call new_thread_notify.
11589 (thread_db_init): Set thread_db_use_events. Check use_events.
11590 * utils.c (fatal, warning): Correct message prefix.
11591
11592 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11593
11594 * Makefile.in (clean): Remove new files.
11595 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11596 (powerpc-64.o, powerpc-64.c): New rules.
11597 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11598 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11599 with SPE.
11600 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11601 SPE targets.
11602 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11603 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11604 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11605 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11606 (target_regsets): Add AltiVec and SPE register sets.
11607 * configure.ac: Check for AltiVec and SPE.
11608 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11609 (ppc_fill_vrregset, ppc_store_vrregset): New.
11610 (target_regsets): Add AltiVec register set.
11611 * configure: Regenerated.
11612
11613 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11614
11615 * linux-low.c (O_LARGEFILE): Define.
11616 (linux_read_memory): Use /proc/PID/mem.
11617 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11618 * configure, config.in: Regenerated.
11619
11620 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11621
11622 * linux-low.c (linux_wait_for_event): Do not pass signals while
11623 single-stepping.
11624
11625 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11626
11627 * win32-low.c (create_process): New.
11628 (win32_create_inferior): Use create_process instead of
11629 CreateProcess. If create_process failed retry appending an ".exe"
11630 suffix. Store the GetLastError result immediatelly after
11631 create_process calls and use it on the call to error.
11632
11633 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11634
11635 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11636
11637 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11638
11639 * configure.ac: Switch license to GPLv3.
11640
11641 2007-08-01 Michael Snyder <msnyder@access-company.com>
11642
11643 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11644
11645 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11646
11647 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11648 typedef.
11649 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11650 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11651 CloseToolhelp32Snapshot.
11652 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11653 CloseToolhelp32Snapshot.
11654
11655 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11656
11657 * server.c (main): Check for inferior exit before main loop.
11658
11659 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11660
11661 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11662 instead of on tmp_desc.
11663
11664 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11665 Daniel Jacobowitz <dan@codesourcery.com>
11666
11667 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11668 (add_thread): Minor cleanups.
11669 (clear_inferiors): Move lower in the file. Clear the DLL
11670 list.
11671 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11672 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11673 (xml_escape_text): New.
11674 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11675 for qSupported.
11676 (handle_v_cont): Report errors.
11677 (gdbserver_version): Update.
11678 (main): Correct size of own_buf. Do not report initial DLL events.
11679 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11680 (unloaded_dll, xml_escape_text): New.
11681 * win32-low.c (enum target_waitkind): Update comments.
11682 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11683 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11684 (win32_EnumProcessModules, win32_GetModuleInformation)
11685 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11686 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11687 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11688 (win32_Module32First, win32_Module32Next, load_toolhelp)
11689 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11690 (get_child_debug_event): Handle DLL events.
11691 (win32_wait): Likewise.
11692
11693 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11694
11695 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11696 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11697
11698 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11699
11700 * win32-low.c (handle_output_debug_string): Ignore event if not
11701 waiting.
11702
11703 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11704
11705 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11706
11707 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11708
11709 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11710
11711 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11712
11713 * inferiors.c (change_inferior_id): Add comment.
11714 * linux-low.c (check_removed_breakpoint): Add an early
11715 prototype. Improve debug output.
11716 (linux_attach): Doc update.
11717 (linux_detach_one_process, linux_detach): Clean up before releasing
11718 each process.
11719 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11720 * linux-low.h (struct process_info): Doc improvement.
11721 * mem-break.c (delete_all_breakpoints): New.
11722 * mem-break.h (delete_all_breakpoints): New prototype.
11723 * thread-db.c (find_first_thread): New.
11724 (thread_db_create_event): Call it instead of
11725 thread_db_find_new_threads. Clean up unused variables.
11726 (maybe_attach_thread): Remove first thread handling.
11727 (thread_db_find_new_threads): Use find_first_thread.
11728 (thread_db_get_tls_address): Likewise.
11729
11730 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11731
11732 * thread-db.c (thread_db_find_new_threads): Add prototype.
11733 (thread_db_create_event): Check for the main thread before adding
11734 a new thread.
11735 (maybe_attach_thread): Only enable event reporting if TID == 0.
11736 (thread_db_get_tls_address): Check for new threads.
11737
11738 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11739
11740 * linux-low.c (linux_create_inferior): Try execv before execvp.
11741 * spu-low.c (spu_create_inferior): Likewise.
11742
11743 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11744
11745 * linux-low.c (linux_create_inferior): Change execv to execvp.
11746 * spu-low.c (spu_create_inferior): Likewies.
11747
11748 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11749
11750 * Makefile.in (clean): Clean new files instead of deleted ones.
11751 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11752 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11753 rules.
11754 * configure.srv: Specify XML files and new regformats for MIPS and
11755 MIPS64 GNU/Linux.
11756 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11757 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11758 an entry for the restart register.
11759 (mips_cannot_fetch_register, mips_cannot_store_register)
11760 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11761 register names to match the XML descriptions.
11762 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11763 restart register instead of $0.
11764
11765 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11766 Markus Deuling <deuling@de.ibm.com>
11767
11768 * remote-utils.c (decode_xfer_write): New function.
11769 * server.h (decode_xfer_write): Add prototype.
11770 * server.c (handle_query): Add PACKET_LEN argument. Support
11771 qXfer:spu:read and qXfer:spu:write packets.
11772 (main): Pass packet_len to handle_query.
11773 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11774 * target.h (target_ops): Add qxfer_spu.
11775
11776 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11777
11778 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11779 accessing non-seekable spufs files.
11780
11781 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11782
11783 * server.c (handle_query): Add reply for qC packet.
11784
11785 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11786 Leo Zayas <lerele@champenstudios@com>
11787
11788 * server.h (check_remote_input_interrupt_request): New function.
11789 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11790 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11791 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11792 (check_remote_input_interrupt_request): New function.
11793 * server.h (check_remote_input_interrupt_request): Declare.
11794 * win32-low.c (winapi_DebugBreakProcess,
11795 winapi_GenerateConsoleCtrlEvent): New typedefs.
11796 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11797 to 250 ms.
11798 (win32_wait): Check for remote interrupt request
11799 with check_remote_input_interrupt_request.
11800 (win32_request_interrupt): New function.
11801 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11802
11803 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11804
11805 * win32-low.c (debug_registers_changed,
11806 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11807 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11808 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11809 (thread_rec): Get context using the low target.
11810 (child_add_thread): Call thread_added on the low target,
11811 which does the same thing.
11812 (regptr): Delete.
11813 (do_initial_child_stuff): Remove debug registers references.
11814 Set context using the low target. Resume threads after
11815 setting the contexts.
11816 (child_continue): Remove dead variable. Remove debug
11817 registers references.
11818 (child_fetch_inferior_registers): Go through the low target.
11819 (do_child_store_inferior_registers): Remove.
11820 (child_store_inferior_registers): Go through the low target.
11821 (win32_resume): Remove debug registers references.
11822 Set context using the low target.
11823 (handle_exception): Change return type to void. Don't record
11824 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11825 first chance exception.
11826 (get_child_debug_event): Change return type to void. Remove
11827 goto loop. Always return after waiting for debug event.
11828 (win32_wait): Convert to switch statement. Handle spurious
11829 events.
11830
11831 * win32-i386-low.c (debug_registers_changed,
11832 debug_registers_used): New.
11833 (initial_stuff): Rename to ...
11834 (i386_initial_stuff): ... this. Clear debug registers
11835 state variables.
11836 (store_debug_registers): Delete.
11837 (i386_get_thread_context): New.
11838 (load_debug_registers): Delete.
11839 (i386_set_thread_context): New.
11840 (i386_thread_added): New.
11841 (single_step): Rename to ...
11842 (i386_single_step): ... this.
11843 (do_fetch_inferior_registers): Rename to ...
11844 (i386_fetch_inferior_register): ... this.
11845 (i386_store_inferior_register): New.
11846 (the_low_target): Adapt to new interface.
11847
11848 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11849 (arm_get_thread_context): New.
11850 (arm_set_thread_context): New.
11851 (regptr): New.
11852 (do_fetch_inferior_registers): Rename to ...
11853 (arm_fetch_inferior_register): ... this.
11854 (arm_store_inferior_register): New.
11855 (arm_wince_breakpoint): Reimplement as unsigned long.
11856 (arm_wince_breakpoint_len): Define.
11857 (the_low_target): Adapt to new interface.
11858
11859 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11860 load_debug_registers. Add get_thread_context, set_thread_context,
11861 thread_added and store_inferior_register. Rename
11862 fetch_inferior_registers to fetch_inferior_register.
11863 (regptr): Remove declaration.
11864
11865 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11866
11867 * linux-low.c (linux_detach): Change return type to int. Return 0.
11868 * spu-low.c (spu_detach): Likewise.
11869
11870 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11871
11872 * target.h (target_ops): Change return type of detach to int.
11873 Add join.
11874 (join_inferior): New.
11875 * server.c (main): Don't skip detach support on mingw32.
11876 If the inferior doesn't support detaching return error.
11877 Call join_inferior instead of using waitpid.
11878 * linux-low.c (linux_join): New.
11879 (linux_target_op): Add linux_join.
11880 * spu-low.c (spu_join): New.
11881 (spu_target_ops): Add spu_join.
11882 * win32-low.c (win32_detach): Adapt to new interface.
11883 Reopen current_process_handle before detaching. Issue a child
11884 resume before detaching.
11885 (win32_join): New.
11886 (win32_target_op): Add win32_join.
11887
11888 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11889
11890 * win32-low.c (win32-attach): Fix return value.
11891 * target.h (target_ops): Describe ATTACH return values.
11892
11893 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11894
11895 * win32-low.c (GETPROCADDRESS): Define.
11896 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11897 (winapi_DebugSetProcessKillOnExit): Likewise.
11898 (win32_create_inferior): Force usage of ansi CreateProcessA.
11899 (win32_attach): Use GETPROCADDRESS.
11900 (win32_detach): Likewise.
11901
11902 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11903
11904 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11905
11906 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11907
11908 * win32-low.c: Commit leftover changes from 2007-03-29.
11909
11910 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11911
11912 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11913 fields short instead of int. Add explicit padding.
11914 (i387_cache_to_fsave): Remove unnecessary casts.
11915 (i387_fsave_to_cache): Doc fix.
11916 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11917
11918 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11919
11920 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11921 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11922
11923 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11924
11925 * configure.srv (arm*-*-mingw32ce*): Move near the other
11926 arm targets.
11927
11928 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11929
11930 * configure.ac: Add errno checking.
11931 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11932 sys/file.h and malloc.h.
11933 (AC_CHECK_DECLS): Add perror.
11934 (srv_mingwce): Handle.
11935 * configure.srv (i[34567]86-*-cygwin*): Add
11936 win32-i386-low.o to srv_tgtobj.
11937 (i[34567]86-*-mingw*): Likewise.
11938 (arm*-*-mingw32ce*): Add case.
11939 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11940 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11941 [__MINGW32CE__] (strerror): New function.
11942 [__MINGW32CE__] (errno): Define to GetLastError.
11943 [__MINGW32CE__] (COUNTOF): New macro.
11944 (remote_open): Remove extra close call.
11945 * mem-break.c (delete_breakpoint_at): New function.
11946 * mem-break.h (delete_breakpoint_at): Declare.
11947 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11948 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11949 [USE_WIN32API] (read, write): Add char* casts.
11950 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11951 * server.h: Include wincecompat.h on Windows CE.
11952 [HAVE_ERRNO_H]: Check.
11953 (perror): Declare if not declared.
11954 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11955 (perror_with_name): Remove errno declaration.
11956 * wincecompat.h: New.
11957 * wincecompat.c: New.
11958 * win32-low.h: New.
11959 * win32-arm-low.c: New.
11960 * win32-i386-low.c: New.
11961 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11962 (OUTMSG2): Make it safe.
11963 (_T): New macro.
11964 (COUNTOF): New macro.
11965 (NUM_REGS): Get it from the low target.
11966 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11967 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11968 (thread_rec): Let low target handle debug registers.
11969 (child_add_thread): Likewise.
11970 (child_init_thread_list): Likewise.
11971 (continue_one_thread): Likewise.
11972 (regptr): New.
11973 (do_child_fetch_inferior_registers): Move to ...
11974 * win32-i386-low.c: ... here, and rename to ...
11975 (do_fetch_inferior_registers): ... this.
11976 * win32-low.c (child_fetch_inferior_registers):
11977 Go through the low target.
11978 (do_child_store_inferior_registers): Use regptr.
11979 (strwinerror): New function.
11980 (win32_create_inferior): Handle Windows CE.
11981 Use strwinerror instead of strerror on Windows error
11982 codes. Add program to the error output.
11983 Don't close the main thread handle on Windows CE.
11984 (win32_attach): Use coredll.dll on Windows CE.
11985 (win32_kill): Close current process and current
11986 thread handles.
11987 (win32_detach): Use coredll.dll on Windows CE.
11988 (win32_resume): Let low target handle debug registers, and
11989 step request.
11990 (handle_exception): Add/Remove initial breakpoint. Avoid
11991 non-existant WSTOPSIG on Windows CE.
11992 (win32_read_inferior_memory): Cast to remove warning.
11993 (win32_arch_string): Go through the low target.
11994 (initialize_low): Call set_breakpoint_data with the low
11995 target's breakpoint.
11996 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11997 FOP_REGNUM, mappings): Move to ...
11998 * win32-i386-low.c: ... here.
11999 * win32-low.c (win32_thread_info): Move to ...
12000 * win32-low.h: ... here.
12001 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12002 win32-arm-low.c and wincecompat.c.
12003 (all:): Add $EXEEXT.
12004 (install-only:): Likewise.
12005 (gdbserver:): Likewise.
12006 (gdbreplay:): Likewise.
12007 * config.in: Regenerate.
12008 * configure: Regenerate.
12009
12010 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12011
12012 * win32-low.c: Rename typedef thread_info to
12013 win32_thread_info throughout.
12014
12015 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12016
12017 * win32-i386-low.c: Rename to ...
12018 * win32-low.c: ... this.
12019 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12020 * Makefile.in: Likewise.
12021
12022 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12023
12024 * remote-utils.c (monitor_output): Constify msg parameter.
12025 * server.h (monitor_output): Likewise.
12026 * win32-i386-low.c (handle_output_debug_string): New.
12027 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12028 handle_output_debug_string.
12029 (get_child_debug_event): Likewise.
12030
12031 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12032
12033 * server.c (main): Correct strtoul check.
12034
12035 2007-03-27 Jon Ringle <jon@ringle.org>
12036
12037 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12038
12039 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12040
12041 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12042
12043 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12044
12045 * terminal.h: Check HAVE_SGTTY_H.
12046
12047 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12048
12049 * remote-utils.c (remote_open): Print out the assigned port number.
12050
12051 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12052
12053 * remote-utils.c (monitor_output): New function.
12054 * server.c (debug_threads): Define here.
12055 (monitor_show_help): New function.
12056 (handle_query): Handle qRcmd.
12057 (main): Do not handle 'd' packet.
12058 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12059 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12060 of debug_threads.
12061
12062 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12063
12064 * Makefile.in (EXEEXT): New.
12065 (clean): Use $(EXEEXT).
12066
12067 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12068
12069 * target.h (target_ops): Rename send_signal to request_interrupt,
12070 and remove enum target_signal parameter.
12071 * linux-low.c (linux_request_interrupt): Rename from
12072 linux_send_signal, and always send SIGINT.
12073 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12074 and always send SIGINT.
12075 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12076 of send_signal.
12077 (input_interrupt): Likewise.
12078
12079 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12080
12081 * server.c (get_features_xml): Check if target implemented
12082 arch_string.
12083 * win32-i386-low.c (win32_arch_string): New.
12084 (win32_target_ops): Add win32_arch_string as arch_string member.
12085
12086 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12087
12088 * spu-low.c (spu_arch_string): New.
12089 (spu_target_ops): Add spu_arch_string.
12090
12091 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12092
12093 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12094 * configure.ac: Do not check for terminal.h.
12095 * configure, config.in: Regenerated.
12096
12097 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12098
12099 * Makefile.in (OBS): Add $(XML_BUILTIN).
12100 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12101 (clean): Update.
12102 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12103 (arm-with-iwmmxt.c): New.
12104 * config.in, configure: Regenerate.
12105 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12106 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12107 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12108 (arm*-*-linux*): Add iWMMXt and regset support.
12109 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12110 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12111 (arm_store_wmmxregset, target_regsets): New.
12112 * server.c (get_features_xml): Take annex argument. Check builtin
12113 XML documents.
12114 (handle_query): Handle multiple annexes.
12115
12116 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12117
12118 * remote-utils.c [USE_WIN32API] (read, write): Define.
12119 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12120 write.
12121
12122 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12123
12124 * linux-i386-low.c (the_low_target): Set arch_string.
12125 * linux-x86-64-low.c (the_low_target): Likewise.
12126 * linux-low.c (linux_arch_string): New.
12127 (linux_target_ops): Add it.
12128 * linux-low.h (struct linux_target_ops): Add arch_string.
12129 * server.c (write_qxfer_response): Use const void * for DATA.
12130 (get_features_xml): New.
12131 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12132 * target.h (struct target_ops): Add arch_string method.
12133
12134 2007-01-03 Denis Pilat <denis.pilat@st.com>
12135 Daniel Jacobowitz <dan@codesourcery.com>
12136
12137 * linux-low.c (linux_kill): Handle being called with no threads.
12138 * win32-i386-low.c (win32_kill): Likewise.
12139 (get_child_debug_event): Clear current_process_handle.
12140
12141 2006-12-30 Denis PILAT <denis.pilat@st.com>
12142 Daniel Jacobowitz <dan@codesourcery.com>
12143
12144 * remote-utils.c (remote_open): Check the type of specified
12145 serial port devices before opening them.
12146 * server.c (main): Kill the inferior if an error occurs during
12147 the first remote_open.
12148
12149 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12150
12151 * README: Update supported targets.
12152
12153 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12154
12155 * Makefile.in (clean): Remove reg-mips64.c.
12156 (reg-mips64.c, reg-mips64.o): New rules.
12157 * configure.srv: Handle mips64. Include regset support for mips.
12158 * linux-mips-low.c (union mips_register): New.
12159 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12160 (mips_breakpoint, mips_breakpoint_at): Use int.
12161 (mips_collect_register, mips_supply_register)
12162 (mips_collect_register_32bit, mips_supply_register_32bit)
12163 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12164 (mips_store_fpregset, target_regsets): New.
12165 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12166
12167 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12168
12169 * configure.srv: Add target "spu*-*-*".
12170 * Makefile.in (clean): Remove reg-spu.c.
12171 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12172 * spu-low.c: New file.
12173
12174 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12175
12176 * configure.ac: Correct td_thr_tls_get_addr test.
12177 * configure: Regenerated.
12178
12179 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12180
12181 * linux-low.c (linux_wait_for_event): Reformat. Use the
12182 pass_signals array.
12183 * remote-utils.c (decode_address_to_semicolon): New.
12184 * server.c (pass_signals, handle_general_set): New.
12185 (handle_query): Mention QPassSignals for qSupported.
12186 (main): Call handle_general_set.
12187 * server.h (pass_signals, decode_address_to_semicolon): New.
12188
12189 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12190
12191 * server.c (handle_query): Correct error handling for read_auxv.
12192
12193 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12194
12195 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12196 and srv_linux_thread_db to yes.
12197 * linux-s390-low.c (s390_fill_gregset): New function.
12198 (target_regsets): Define data structure.
12199
12200 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12201
12202 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12203 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12204 * config.in, configure: Regenerated.
12205 * inferiors.c (gdb_id_to_thread): New function.
12206 (gdb_id_to_thread_id): Use it.
12207 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12208 * linux-low.h (struct process_info): Add th member.
12209 (thread_db_get_tls_address): New prototype.
12210 * remote-utils.c (decode_address): Make non-static.
12211 * server.c (handle_query): Handle qGetTLSAddr.
12212 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12213 * target.h (struct target_ops): Add get_tls_address.
12214 * thread-db.c (maybe_attach_thread): Save the thread handle.
12215 (thread_db_get_tls_address): New.
12216
12217 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12218
12219 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12220 (linux_resume_one_process): Take a siginfo_t *. Update all
12221 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12222 (struct pending_signals): Add a siginfo_t.
12223 (linux_wait_for_process): Always set last_status.
12224 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12225 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12226 * linux-low.h (struct process_info): Add last_status.
12227
12228 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12229
12230 * remote-utils.c (try_rle): New function.
12231 (putpkt_binary): Use it.
12232
12233 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12234
12235 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12236 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12237 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12238 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12239 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12240 point registers.
12241
12242 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12243
12244 * server.c (terminal_fd): New variable.
12245 (old_foreground_pgrp): Likewise.
12246 (restore_old_foreground_pgrp): New function.
12247 (start_inferior): Record the terminal file descriptor in terminal_fd
12248 and its original foreground group in old_foreground_pgrp. Register
12249 restore_old_foreground_pgrp with atexit().
12250
12251 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12252
12253 * server.c (handle_query): Correct qPart to qXfer.
12254
12255 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12256
12257 * configure.ac: Check for more headers which are missing on
12258 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12259 * configure.srv: Add Cygwin and mingw32.
12260 * remote-utils.c: Don't include headers unconditionally which
12261 are missing on mingw32. Include <winsock.h> for mingw32.
12262 (remote_open): Adjust for mingw32 support. Flush
12263 standard error after writing to it.
12264 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12265 (unblock_async_io, enable_async_io, disable_async_io)
12266 (readchar, getpkt): Update for Winsock support.
12267 (prepare_resume_reply): Expect a protocol signal number.
12268 * server.c: Disable <sys/wait.h> on mingw32.
12269 (start_inferior): Adjust for mingw32 support. Flush
12270 standard error after writing to it.
12271 (attach_inferior): Likewise. Use protocol signal
12272 numbers.
12273 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12274 and names.
12275 * win32-i386-low.c: New file.
12276 * Makefile.in (XM_CLIBS): Set.
12277 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12278 (win32-i386-low.o): New dependency rule.
12279 * linux-low.c (linux_wait): Use target signal numbers.
12280 * target.h (struct target_ops): Doc fix.
12281 * server.h (target_signal_to_name): New prototype.
12282 * gdbreplay.c: Don't include headers unconditionally which
12283 are missing on mingw32. Include <winsock.h> for mingw32.
12284 (remote_close, remote_open): Adjust for Winsock support.
12285 * configure, config.in: Regenerated.
12286
12287 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12288
12289 * server.c (decode_xfer_read, write_qxfer_response): New.
12290 (handle_query): Take a packet length argument. Handle
12291 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12292 the qSupported response.
12293 (main): Update call to handle_query.
12294
12295 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12296
12297 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12298 (putpkt_binary): Renamed from putpkt and adjusted for binary
12299 data.
12300 (putpkt): New wrapper for putpkt_binary.
12301 (readchar): Don't mask off the high bit.
12302 (decode_X_packet): New function.
12303 * server.c (main): Call putpkt_binary if a handler sets the packet
12304 length. Save the length of the incoming packet. Handle 'X'.
12305 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12306
12307 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12308
12309 * server.c (handle_query): Handle qSupported.
12310
12311 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12312
12313 * remote-utils.c (all_symbols_looked_up): New variable.
12314 (look_up_one_symbol): Check it.
12315 * server.h (look_up_one_symbol): New declaration.
12316 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12317
12318 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12319
12320 * Makefile.in (linux-arm-low.o): Update dependencies.
12321 * linux-arm-low.c: Include "gdb_proc_service.h".
12322 (PTRACE_GET_THREAD_AREA): Define.
12323 (ps_get_thread_area): New function.
12324
12325 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12326
12327 * configure.srv (m68k*-*-uclinux*): New target.
12328 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12329 (linux_resume_one_process): Remove extraneous cast.
12330 (linux_read_offsets): New.
12331 (linux_target_op): Add linux_read_offsets on mmuless systems.
12332 * server.c (handle_query): Add qOffsets logic.
12333 * target.h (struct target_ops): Add read_offsets.
12334
12335 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12336
12337 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12338 (PTRACE_GET_THREAD_AREA): Define.
12339 (ps_get_thread_area): New function.
12340 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12341 (linux-x86-64-low.o): Update.
12342
12343 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12344
12345 * configure.ac: Remove checks for prfpregset_t.
12346 * gdb_proc_service.h: New file.
12347 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12348 new "gdb_proc_service.h".
12349 * proc-service.c: Likewise.
12350 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12351 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12352 * Makefile.in (gdb_proc_service_h): Updated.
12353 * configure, config.in: Regenerated.
12354
12355 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12356
12357 * remote-utils.c (prepare_resume_reply): Move declaration
12358 of gdb_id_from_wait to the top of the block.
12359
12360 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12361
12362 * linux-low.c (regsets_store_inferior_registers): Read the regset
12363 from the target before filling it.
12364
12365 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12366
12367 * server.c (attach_inferior): Return SIGTRAP for a successful
12368 attach.
12369
12370 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12371
12372 * Makefile.in (OBS): Add version.o.
12373 (STAGESTUFF): Delete.
12374 (version.o): Add dependencies.
12375 (version.c): Replace rule.
12376 (clean): Remove version.c.
12377 * server.c (gdbserver_version): New.
12378 (gdbserver_usage): Use printf.
12379 (main): Handle --version and --help.
12380 * server.h (version, host_name): Add declarations.
12381
12382 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12383
12384 * linux-arm-low.c:
12385 * linux-arm-low.c:
12386 * inferiors.c:
12387 * i387-fp.h:
12388 * i387-fp.c:
12389 * gdbreplay.c:
12390 * regcache.c:
12391 * proc-service.c:
12392 * mem-break.h:
12393 * mem-break.c:
12394 * linux-x86-64-low.c:
12395 * linux-sh-low.c:
12396 * linux-s390-low.c:
12397 * linux-ppc64-low.c:
12398 * linux-ppc-low.c:
12399 * linux-mips-low.c:
12400 * linux-m68k-low.c:
12401 * linux-m32r-low.c:
12402 * linux-low.h:
12403 * linux-low.c:
12404 * linux-ia64-low.c:
12405 * linux-i386-low.c:
12406 * linux-crisv32-low.c:
12407 * thread-db.c:
12408 * terminal.h:
12409 * target.h:
12410 * target.c:
12411 * server.h:
12412 * server.c:
12413 * remote-utils.c:
12414 * regcache.h:
12415 * utils.c:
12416 * Makefile.in:
12417 * configure.ac:
12418 * gdbserver.1: Add (C) after Copyright. Update the FSF
12419 address.
12420
12421 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12422
12423 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12424 (arm_breakpoint_at): Recognize both breakpoints.
12425 (the_low_target): Use the correct breakpoint instruction.
12426
12427 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12428
12429 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12430 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12431 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12432 (the_low_target): Update.
12433
12434 2005-10-25 Andreas Schwab <schwab@suse.de>
12435
12436 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12437
12438 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12439 (ia64_num_regs): Reduce to 462.
12440
12441 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12442
12443 * acinclude.m4: Correct quoting.
12444 * aclocal.m4: Regenerated.
12445
12446 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12447 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12448 (thread_db_init): Call thread_db_err_str.
12449 * configure.ac: Check for TD_VERSION.
12450 * config.in, configure: Regenerated.
12451
12452 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12453
12454 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12455
12456 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12457
12458 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12459 is not available. Define HAVE_PTRACE_GETREGS if it is.
12460 * config.in, configure: Regenerated.
12461 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12462 * linux-i386-low.c, linux-m68k-low.c: Update to use
12463 HAVE_PTRACE_GETREGS.
12464 * linux-low.c (regsets_fetch_inferior_registers)
12465 (regsets_store_inferior_registers): Only return 0 if we processed
12466 GENERAL_REGS.
12467 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12468 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12469
12470 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12471
12472 * inferiors.c (struct thread_info): Add gdb_id.
12473 (add_thread): Add gdb_id argument.
12474 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12475 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12476 calls to add_thread.
12477 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12478 * server.c (handle_query): Use thread_to_gdb_id.
12479 (handle_v_cont, main): Use gdb_id_to_thread_id.
12480 * server.h (add_thread): Update prototype.
12481 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12482 prototypes.
12483
12484 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12485
12486 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12487 left-padded registers.
12488 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12489 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12490
12491 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12492
12493 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12494 * configure: Regenerate.
12495 * config.in: Regenerate.
12496 * server.h (NEED_DECLARATION_STRERROR):
12497 Replace with !HAVE_DECL_STRERROR.
12498
12499 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12500
12501 * linux-low.c (linux_wait, linux_send_signal): Don't test
12502 an unsigned long variable for > 0 if it could be MAX_ULONG.
12503 * server.c (myresume): Likewise.
12504 * target.c (set_desired_inferior): Likewise.
12505
12506 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12507
12508 * configure.ac: Simplify and improve check for socklen_t.
12509 * configure, config.in: Regenerate.
12510
12511 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12512
12513 * acconfig.h: Remove.
12514 * configure.ac: Add a test for socklen_t. Use three-argument
12515 AC_DEFINE throughout.
12516 * config.in: Regenerated using autoheader 2.59.
12517 * configure: Regenerated.
12518
12519 * gdbreplay.c (socklen_t): Provide a default.
12520 (remote_open): Use socklen_t.
12521 * remote-utils.c (socklen_t): Provide a default.
12522 (remote_open): Use socklen_t.
12523 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12524 unsigned char.
12525
12526 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12527 char for buffers.
12528 * linux-low.c (linux_read_memory, linux_write_memory)
12529 (linux_read_auxv): Likewise.
12530 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12531 (check_mem_write): Likewise.
12532 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12533 Likewise.
12534 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12535 (registers_from_string, register_data): Likewise.
12536 * server.c (handle_query, main): Likewise.
12537 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12538 (decode_M_packet): Likewise.
12539 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12540 * target.h (struct target_ops): Update read_memory, write_memory,
12541 and read_auxv.
12542 (read_inferior_memory, write_inferior_memory): Update.
12543 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12544 to unsigned char *.
12545 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12546 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12547 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12548 linux-s390-low.c, linux-sh-low.c: Update for changes in
12549 read_inferior_memory and the_low_target->breakpoint.
12550
12551 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12552
12553 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12554 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12555 * configure.srv: Add powerpc64-*-linux*.
12556 * linux-ppc64-low.c: New file.
12557
12558 2005-05-23 Orjan Friberg <orjanf@axis.com>
12559
12560 * linux-cris-low.c: New file with support for CRIS.
12561 * linux-crisv32-low.c: Ditto for CRISv32.
12562 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12563 (clean): Add reg-cris.c and reg-crisv32.c.
12564 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12565 reg-crisv32.o, and reg-crisv32.c to make rules.
12566 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12567 recognized targets.
12568
12569 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12570
12571 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12572 of sizeof (PTRACE_XFER_TYPE).
12573 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12574
12575 2005-05-12 Orjan Friberg <orjanf@axis.com>
12576
12577 * target.h (struct target_ops): Add insert_watchpoint,
12578 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12579 pointers for hardware watchpoint support.
12580 * linux-low.h (struct linux_target_ops): Ditto.
12581 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12582 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12583 to linux_target_ops.
12584 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12585 reply packet.
12586 * server.c (main): Recognize 'Z' and 'z' packets.
12587
12588 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12589
12590 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12591 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12592 (the_low_target): Add new members.
12593
12594 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12595
12596 * proc-service.c (ps_lgetregs): Search all_processes instead of
12597 all_threads.
12598
12599 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12600
12601 * server.c (start_inferior): Change return type to int.
12602 (attach_inferior): Change sigptr to int *.
12603 (handle_v_cont, handle_v_requests): Change signal to int *.
12604 (main): Change signal to int.
12605
12606 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12607
12608 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12609 * configure.srv: Add m32r*-*-linux*.
12610 * linux-m32r-low.c: New file.
12611
12612 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12613
12614 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12615
12616 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12617
12618 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12619 Take unsigned long arguments for PIDs.
12620 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12621 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12622 (wait_for_sigstop, linux_resume_one_process)
12623 (regsets_fetch_inferior_registers, linux_send_signal)
12624 (linux_read_auxv): Likewise. Update the types of variables holding
12625 PIDs. Update format string specifiers.
12626 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12627 * remote-utils.c (prepare_resume_reply): Likewise.
12628 * server.c (cont_thread, general_thread, step_thread)
12629 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12630 unsigned long.
12631 (handle_query): Update format specifiers.
12632 (handle_v_cont, main): Use strtoul for thread IDs.
12633 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12634 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12635 (general_thread, step_thread, thread_from_wait)
12636 (old_thread_from_wait): Update.
12637 * target.h (struct thread_resume): Use unsigned long for THREAD.
12638 (struct target_ops): Use unsigned long for arguments to attach and
12639 thread_alive.
12640
12641 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12642
12643 * acinclude.m4: Include bfd/bfd.m4 directly.
12644 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12645 <agriffis@toolchain.org>.
12646 * aclocal.m4, configure: Regenerated.
12647
12648 2005-01-07 Andrew Cagney <cagney@gnu.org>
12649
12650 * configure.ac: Rename configure.in, require autoconf 2.59.
12651 * configure: Re-generate.
12652
12653 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12654
12655 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12656 LIBS when finished.
12657 * aclocal.m4: Regenerated.
12658 * configure: Regenerated.
12659
12660 2004-11-21 Andreas Schwab <schwab@suse.de>
12661
12662 * linux-m68k-low.c (m68k_num_gregs): Define.
12663 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12664 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12665 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12666 (m68k_breakpoint_at): New. Add to the_low_target.
12667
12668 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12669 srv_linux_thread_db to yes.
12670
12671 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12672
12673 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12674 (ARCH_SET_FS): Likewise.
12675 (ARCH_GET_FS): Likewise.
12676 (ARCH_GET_GS): Likewise.
12677
12678 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12679
12680 * linux-i386-low.c (ps_get_thread_area): New.
12681 * linux-x86-64-low.c (ps_get_thread_area): New.
12682 * linux-low.c: Include <sys/syscall.h>.
12683 (linux_kill_one_process): Don't kill the first thread here.
12684 (linux_kill): Kill the first thread here.
12685 (kill_lwp): New function.
12686 (send_sigstop, linux_send_signal): Use it.
12687 * proc-service.c: Clean up #ifdefs.
12688 (fpregset_info): Delete.
12689 (ps_lgetregs): Update and enable implementation.
12690 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12691 implementations.
12692 * remote-utils.c (struct sym_cache, symbol_cache): New.
12693 (input_interrupt): Print a clearer message.
12694 (async_io_enabled): New variable.
12695 (enable_async_io, disable_async_io): Use it. Update comments.
12696 (look_up_one_symbol): Use the symbol cache.
12697 * thread-db.c (thread_db_look_up_symbols): New function.
12698 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12699
12700 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12701
12702 * configure.in: Test for -rdynamic.
12703 * configure: Regenerated.
12704 * Makefile (INTERNAL_LDFLAGS): New.
12705 (gdbserver, gdbreplay): Use it.
12706
12707 2004-09-02 Andrew Cagney <cagney@gnu.org>
12708
12709 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12710
12711 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12712
12713 * linux-low.c (linux_wait): Clear all_processes list also.
12714
12715 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12716
12717 * linux-low.c: Include <errno.h>. Remove extern declaration of
12718 errno.
12719
12720 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12721
12722 * gdbreplay.c, server.h, utils.c: Update copyright years.
12723
12724 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12725
12726 * server.c (main): Print child status or termination signal from
12727 variable 'signal', not 'sig'.
12728
12729 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12730
12731 * linux-low.c (linux_read_memory): Change return type to
12732 int. Check for and return error from ptrace().
12733 * target.c (read_inferior_memory): Change return type to int. Pass
12734 back return status from the_target->read_memory().
12735 * target.h (struct target_ops): Adapt *read_memory() prototype.
12736 Update comment.
12737 (read_inferior_memory): Adapt prototype.
12738 * server.c (main): Return an error packet if
12739 read_inferior_memory() returns an error.
12740
12741 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12742
12743 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12744 Unify with other clean targets.
12745
12746 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12747
12748 * server.c (handle_v_cont): Call set_desired_inferior.
12749
12750 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12751
12752 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12753
12754 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12755
12756 * linux-low.c (linux_wait): Unblock async I/O.
12757 (linux_resume): Block and enable async I/O.
12758 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12759 * server.h (block_async_io, unblock_async_io): Add prototypes.
12760
12761 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12762
12763 * remote-utils.c (remote_open): Print a status notice after
12764 opening a TCP port.
12765 * server.c (attach_inferior): Print a status notice after
12766 attaching.
12767
12768 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12769
12770 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12771
12772 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12773
12774 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12775 error packet.
12776 * server.c, target.h: Update copyright years.
12777
12778 2004-02-25 Roland McGrath <roland@redhat.com>
12779
12780 * target.h (struct target_ops): New member `read_auxv'.
12781 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12782 * linux-low.c (linux_read_auxv): New function.
12783 (linux_target_ops): Initialize `read_auxv' member to that.
12784
12785 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12786
12787 Committed by Jim Blandy <jimb@redhat.com>.
12788
12789 * linux-s390-low.c (s390_num_regs): Update.
12790 (s390_regmap): Remove control registers. Use __s390x__ predefine
12791 instead of GPR_SIZE to distiguish s390 and s390x targets.
12792
12793 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12794
12795 * linux-low.c: Update copyright year.
12796 (check_removed_breakpoint): Clear pending_is_breakpoint.
12797 (linux_set_resume_request, linux_queue_one_thread)
12798 (resume_status_pending_p): New functions.
12799 (linux_continue_one_thread): Use process->resume.
12800 (linux_resume): Only resume threads if there are no pending events.
12801 * linux-low.h (struct process_info): Add resume request
12802 pointer.
12803
12804 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12805
12806 * regcache.c (new_register_cache): Clear the allocated register
12807 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12808
12809 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12810
12811 * linux-low.c (linux_resume): Take a struct thread_resume *
12812 argument.
12813 (linux_wait): Update call.
12814 (resume_ptr): New static variable.
12815 (linux_continue_one_thread): Renamed from
12816 linux_continue_one_process. Use resume_ptr.
12817 (linux_resume): Use linux_continue_one_thread.
12818 * server.c (handle_v_cont, handle_v_requests): New functions.
12819 (myresume): New function.
12820 (main): Handle 'v' case.
12821 * target.h (struct thread_resume): New type.
12822 (struct target_ops): Change argument of "resume" to struct
12823 thread_resume *.
12824 (myresume): Delete macro.
12825
12826 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12827
12828 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12829 (uninstall): Support DESTDIR.
12830
12831 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12832
12833 * configure.srv: Add xscale*linux copy of arm*linux entry.
12834
12835 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12836
12837 * linux-arm-low.c (arm_reinsert_addr): New function.
12838 (the_low_target): Add arm_reinsert_addr.
12839
12840 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12841
12842 * mem-break.c: Remove whitespace at end of file.
12843
12844 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12845
12846 * configure.in: Check whether we need to prototype strerror.
12847 * server.h: Optionally prototype strerror.
12848 * gdbreplay.c (perror_with_name): Use strerror.
12849 * linux-low.c (linux_attach_lwp): Use strerror.
12850 * utils.c (perror_with_name): Use strerror.
12851 * config.in, configure: Regenerated.
12852
12853 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12854
12855 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12856 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12857
12858 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12859
12860 * Makefile.in (SFILES): Update.
12861 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12862 low-sun3.c: Remove files.
12863
12864 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12865
12866 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12867 (linux_detach_one_process, linux_detach): New functions.
12868 (linux_target_ops): Add linux_detach.
12869 * server.c (main): Handle 'D' packet.
12870 * target.h (struct target_ops): Add "detach" member.
12871 (detach_inferior): Define.
12872
12873 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12874
12875 From Kelley Cook <kelleycook@wideopenwest.com>:
12876 * configure.srv: Accept i[34567]86 variants.
12877
12878 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12879
12880 * linux-low.c (linux_wait_for_event): Correct comment typos.
12881 (linux_resume_one_process): Call check_removed_breakpoint.
12882 (linux_send_signal): New function.
12883 (linux_target_ops): Add linux_send_signal.
12884 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12885 of kill.
12886 * target.h (struct target_ops): Add send_signal.
12887
12888 2003-05-29 Jim Blandy <jimb@redhat.com>
12889
12890 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12891 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12892 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12893 away part of the register's value.
12894
12895 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12896
12897 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12898 (linux_wait_for_event, linux_init_signals): Likewise.
12899
12900 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12901
12902 * configure.in: Check for stdlib.h.
12903 * configure: Regenerated.
12904 * config.in: Regenerated.
12905
12906 2003-01-04 Andreas Schwab <schwab@suse.de>
12907
12908 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12909
12910 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12911
12912 * Makefile.in: Remove obsolete code.
12913
12914 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12915
12916 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12917 defined(PT_FPR0_HI).
12918
12919 2002-11-17 Stuart Hughes <seh@zee2.com>
12920
12921 * linux-arm-low.c (arm_num_regs): Increase.
12922 (arm_regmap): Include status register.
12923
12924 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12925
12926 * linux-low.c (register_addr): Remove incorrect -1 check.
12927
12928 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12929
12930 * linux-low.c (linux_create_inferior): Call setpgid. Return
12931 the new PID.
12932 (unstopped_p, linux_signal_pid): Remove.
12933 (linux_target_ops): Remove linux_signal_pid.
12934 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12935 global instead of target method.
12936 * target.h (struct target_ops): Remove signal_pid. Update comment
12937 for create_inferior.
12938 * server.c (signal_pid): New variable.
12939 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12940 gdbserver. Set the child to be the foreground process group.
12941 (attach_inferior): Set signal_pid.
12942
12943 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12944
12945 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12946
12947 2002-08-20 Jim Blandy <jimb@redhat.com>
12948
12949 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12950 default for this.
12951
12952 2002-08-01 Andrew Cagney <cagney@redhat.com>
12953
12954 * Makefile.in: Make chill references obsolete.
12955
12956 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12957
12958 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12959 * configure: Regenerate.
12960 * config.in: Regenerate.
12961
12962 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12963
12964 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12965 (perror_with_name, remote_close, remote_open, expect, play): Static.
12966
12967 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12968
12969 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12970 byte offsets instead of an array of indexes.
12971 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12972
12973 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12974
12975 * regcache.c: Add comment.
12976
12977 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12978
12979 * thread-db.c: New file.
12980 * proc-service.c: New file.
12981 * acinclude.m4: New file.
12982 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12983 proc-service.o, and thread-db.o.
12984 (linux-low.o): Add USE_THREAD_DB.
12985 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12986 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12987 * aclocal.m4: Regenerated.
12988 * config.in: Regenerated.
12989 * configure: Regenerated.
12990 * configure.in: Check for proc_service.h, sys/procfs.h,
12991 thread_db.h, and linux/elf.h headrs.
12992 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12993 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12994 Check for -lthread_db and thread support.
12995 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12996 PowerPC, and SuperH.
12997 * i387-fp.c: Constify arguments.
12998 * i387-fp.h: Likewise.
12999 * inferiors.c: (struct thread_info): Renamed from
13000 `struct inferior_info'. Remove PID member. Use generic inferior
13001 list header. All uses updated.
13002 (inferiors, signal_pid): Removed.
13003 (all_threads): New variable.
13004 (get_thread): Define.
13005 (add_inferior_to_list): New function.
13006 (for_each_inferior): New function.
13007 (change_inferior_id): New function.
13008 (add_inferior): Removed.
13009 (remove_inferior): New function.
13010 (add_thread): New function.
13011 (free_one_thread): New function.
13012 (remove_thread): New function.
13013 (clear_inferiors): Use for_each_inferior and free_one_thread.
13014 (find_inferior): New function.
13015 (find_inferior_id): New function.
13016 (inferior_target_data): Update argument type.
13017 (set_inferior_target_data): Likewise.
13018 (inferior_regcache_data): Likewise.
13019 (set_inferior_regcache_data): Likewise.
13020 * linux-low.c (linux_bp_reinsert): Remove.
13021 (all_processes, stopping_threads, using_thrads)
13022 (struct pending_signals, debug_threads, pid_of): New.
13023 (inferior_pid): Replace with macro.
13024 (struct inferior_linux_data): Remove.
13025 (get_stop_pc, add_process): New functions.
13026 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13027 Use add_process and add_thread.
13028 (linux_attach_lwp): New function, based on old linux_attach. Use
13029 add_process and add_thread. Set stop_expected for new threads.
13030 (linux_attach): New function.
13031 (linux_kill_one_process): New function.
13032 (linux_kill): Kill all LWPs.
13033 (linux_thread_alive): Use find_inferior_id.
13034 (check_removed_breakpoints, status_pending_p): New functions.
13035 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13036 Update. Use WNOHANG. Wait for cloned processes also. Update process
13037 struct for the found process.
13038 (linux_wait_for_event): New function.
13039 (linux_wait): Use it. Support LWPs.
13040 (send_sigstop, wait_for_sigstop, stop_all_processes)
13041 (linux_resume_one_process, linux_continue_one_process): New functions.
13042 (linux_resume): Support LWPs.
13043 (REGISTER_RAW_SIZE): Remove.
13044 (fetch_register): Use register_size instead. Call supply_register.
13045 (usr_store_inferior_registers): Likewise. Call collect_register.
13046 Fix recursive case.
13047 (regsets_fetch_inferior_registers): Improve error message.
13048 (regsets_store_inferior_registers): Add debugging.
13049 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13050 (unstopped_p, linux_signal_pid): New functions.
13051 (linux_target_ops): Add linux_signal_pid.
13052 (linux_init_signals): New function.
13053 (initialize_low): Call it. Initialize using_threads.
13054 * regcache.c (inferior_regcache_data): Add valid
13055 flag.
13056 (get_regcache): Fetch registers lazily. Add fetch argument
13057 and update all callers.
13058 (regcache_invalidate_one, regcache_invalidate): New
13059 functions.
13060 (new_register_cache): Renamed from create_register_cache.
13061 Return the new regcache.
13062 (free_register_cache): Change argument to a void *.
13063 (registers_to_string, registers_from_string): Call get_regcache
13064 with fetch flag set.
13065 (register_data): Make static. Pass fetch flag to get_regcache.
13066 (supply_register): Call get_regcache with fetch flag clear.
13067 (collect_register): Call get_regcache with fetch flag set.
13068 (collect_register_as_string): New function.
13069 * regcache.h: Update.
13070 * remote-utils.c (putpkt): Flush after debug output and use
13071 stderr.
13072 Handle input interrupts while waiting for an ACK.
13073 (input_interrupt): Use signal_pid method.
13074 (getpkt): Flush after debug output and use stderr.
13075 (outreg): Use collect_register_as_string.
13076 (new_thread_notify, dead_thread_notify): New functions.
13077 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13078 and general_thread.
13079 (look_up_one_symbol): Flush after debug output.
13080 * server.c (step_thread, server_waiting): New variables.
13081 (start_inferior): Don't use signal_pid. Update call to mywait.
13082 (attach_inferior): Update call to mywait.
13083 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13084 (main): Don't fetch/store registers explicitly. Use
13085 set_desired_inferior. Support proposed ``Hs'' packet. Update
13086 calls to mywait.
13087 * server.h: Update.
13088 (struct inferior_list, struct_inferior_list_entry): New.
13089 * target.c (set_desired_inferior): New.
13090 (write_inferior_memory): Constify.
13091 (mywait): New function.
13092 * target.h: Update.
13093 (struct target_ops): New signal_pid method.
13094 (mywait): Removed macro, added prototype.
13095
13096 * linux-low.h (regset_func): Removed.
13097 (regset_fill_func, regset_store_func): New.
13098 (enum regset_type): New.
13099 (struct regset_info): Add type field. Use new operation types.
13100 (struct linux_target_ops): stop_pc renamed to get_pc.
13101 Add decr_pc_after_break and breakpoint_at.
13102 (get_process, get_thread_proess, get_process_thread)
13103 (strut process_info, all_processes, linux_attach_lwp)
13104 (thread_db_init): New.
13105
13106 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13107 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13108 (the_low_target): Add new members.
13109 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13110 (i386_store_fpxregset): Constify.
13111 (target_regsets): Add new kind identifier.
13112 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13113 (i386_set_pc): Add debugging.
13114 (i386_breakpoint_at): New function.
13115 (the_low_target): Add new members.
13116 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13117 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13118 (mips_breakpoint_at): New.
13119 (the_low_target): Add new members.
13120 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13121 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13122 (the_low_target): Add new members.
13123 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13124 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13125 (the_low_target): Add new members.
13126 * linux-x86-64-low.c (target_regsets): Add new kind
13127 identifier.
13128
13129 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13130
13131 From Martin Pool <mbp@samba.org>:
13132 * server.c (gdbserver_usage): New function.
13133 (main): Call it.
13134
13135 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13136
13137 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13138 stop_at -> stop_pc.
13139
13140 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13141
13142 * Makefile.in: Remove obsolete code.
13143
13144 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13145
13146 * linux-low.c (regsets_fetch_inferior_registers),
13147 (regsets_store_inferior_registers): Removed cast to int from
13148 ptrace() calls.
13149 * regcache.h: Added declaration of struct inferior_info.
13150
13151 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13152
13153 * inferiors.c (struct inferior_info): Add regcache_data.
13154 (add_inferior): Call create_register_cache.
13155 (clear_inferiors): Call free_register_cache.
13156 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13157 * regcache.c (struct inferior_regcache_data): New.
13158 (registers): Remove.
13159 (get_regcache): New function.
13160 (create_register_cache, free_register_cache): New functions.
13161 (set_register_cache): Don't initialize the register cache here.
13162 (registers_to_string, registers_from_string, register_data): Call
13163 get_regcache.
13164 * regcache.h: Add prototypes.
13165 * server.h: Likewise.
13166
13167 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13168
13169 * mem-break.c: New file.
13170 * mem-break.h: New file.
13171 * Makefile.in: Add mem-break.o rule; update server.h
13172 dependencies.
13173 * inferiors.c (struct inferior_info): Add target_data
13174 member.
13175 (clear_inferiors): Free target_data member if set.
13176 (inferior_target_data, set_inferior_target_data): New functions.
13177 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13178 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13179 * linux-low.c (linux_bp_reinsert): New variable.
13180 (struct inferior_linux_data): New.
13181 (linux_create_inferior): Use set_inferior_target_data.
13182 (linux_attach): Likewise. Call add_inferior.
13183 (linux_wait_for_one_inferior): New function.
13184 (linux_wait): Call it.
13185 (linux_write_memory): Add const.
13186 (initialize_low): Call set_breakpoint_data.
13187 * linux-low.h (struct linux_target_ops): Add breakpoint
13188 handling members.
13189 * server.c (attach_inferior): Remove extra add_inferior
13190 call.
13191 * server.h: Include mem-break.h. Update inferior.c
13192 prototypes.
13193 * target.c (read_inferior_memory)
13194 (write_inferior_memory): New functions.
13195 * target.h (read_inferior_memory)
13196 (write_inferior_memory): Change macros to prototypes.
13197 (struct target_ops): Update comments. Add const to write_memory
13198 definition.
13199
13200 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13201
13202 * linux-low.c (usr_store_inferior_registers): Support
13203 registers which are allowed to fail to store.
13204 * linux-low.h (linux_target_ops): Likewise.
13205 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13206 (ppc_cannot_store_register): FPSCR may not be storable.
13207
13208 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13209
13210 * server.h: Include <string.h> if HAVE_STRING_H.
13211 * ChangeLog: Correct paths in last ChangeLog entry.
13212
13213 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13214
13215 * linux-low.h: Remove obsolete prototypes.
13216 (struct linux_target_ops): New.
13217 (extern the_low_target): New.
13218 * linux-low.c (num_regs, regmap): Remove declarations.
13219 (register_addr): Use the_low_target explicitly.
13220 (fetch_register): Likewise.
13221 (usr_fetch_inferior_registers): Likewise.
13222 (usr_store_inferior_registers): Likewise.
13223 * linux-arm-low.c (num_regs): Remove.
13224 (arm_num_regs): Define.
13225 (arm_regmap): Renamed from regmap, made static.
13226 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13227 made static.
13228 (arm_cannot_store_register): Renamed from cannot_store_register,
13229 made static.
13230 (the_low_target): New.
13231 * linux-i386-low.c (num_regs): Remove.
13232 (i386_num_regs): Define.
13233 (i386_regmap): Renamed from regmap, made static.
13234 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13235 made static.
13236 (i386_cannot_store_register): Renamed from cannot_store_register,
13237 made static.
13238 (the_low_target): New.
13239 * linux-ia64-low.c (num_regs): Remove.
13240 (ia64_num_regs): Define.
13241 (ia64_regmap): Renamed from regmap, made static.
13242 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13243 made static.
13244 (ia64_cannot_store_register): Renamed from cannot_store_register,
13245 made static.
13246 (the_low_target): New.
13247 * linux-m68k-low.c (num_regs): Remove.
13248 (m68k_num_regs): Define.
13249 (m68k_regmap): Renamed from regmap, made static.
13250 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13251 made static.
13252 (m68k_cannot_store_register): Renamed from cannot_store_register,
13253 made static.
13254 (the_low_target): New.
13255 * linux-mips-low.c (num_regs): Remove.
13256 (mips_num_regs): Define.
13257 (mips_regmap): Renamed from regmap, made static.
13258 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13259 made static.
13260 (mips_cannot_store_register): Renamed from cannot_store_register,
13261 made static.
13262 (the_low_target): New.
13263 * linux-ppc-low.c (num_regs): Remove.
13264 (ppc_num_regs): Define.
13265 (ppc_regmap): Renamed from regmap, made static.
13266 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13267 made static.
13268 (ppc_cannot_store_register): Renamed from cannot_store_register,
13269 made static.
13270 (the_low_target): New.
13271 * linux-s390-low.c (num_regs): Remove.
13272 (s390_num_regs): Define.
13273 (s390_regmap): Renamed from regmap, made static.
13274 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13275 made static.
13276 (s390_cannot_store_register): Renamed from cannot_store_register,
13277 made static.
13278 (the_low_target): New.
13279 * linux-sh-low.c (num_regs): Remove.
13280 (sh_num_regs): Define.
13281 (sh_regmap): Renamed from regmap, made static.
13282 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13283 made static.
13284 (sh_cannot_store_register): Renamed from cannot_store_register,
13285 made static.
13286 (the_low_target): New.
13287 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13288 (the_low_target): New.
13289
13290 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13291
13292 * Makefile.in: Add stamp-h target.
13293 * configure.in: Create stamp-h.
13294 * configure: Regenerated.
13295
13296 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13297
13298 * inferiors.c: New file.
13299 * target.c: New file.
13300 * target.h: New file.
13301 * Makefile.in: Add target.o and inferiors.o. Update
13302 dependencies.
13303 * linux-low.c (inferior_pid): New static variable,
13304 moved from server.c.
13305 (linux_create_inferior): Renamed from create_inferior.
13306 Call add_inferior. Return 0 on success instead of a PID.
13307 (linux_attach): Renamed from myattach.
13308 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13309 (linux_thread_alive): Renamed from mythread_alive.
13310 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13311 child dies.
13312 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13313 (regsets_store_inferior_registers): Correct error message.
13314 Add missing ``return 0''.
13315 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13316 (linux_store_registers): Renamed from store_inferior_registers.
13317 (linux_read_memory): Renamed from read_inferior_memory.
13318 (linux_write_memory): Renamed from write_inferior_memory.
13319 (linux_target_ops): New structure.
13320 (initialize_low): Call set_target_ops ().
13321 * remote-utils.c (unhexify): New function.
13322 (hexify): New function.
13323 (input_interrupt): Send signals to ``signal_pid''.
13324 * server.c (inferior_pid): Remove.
13325 (start_inferior): Update create_inferior call.
13326 (attach_inferior): Call add_inferior.
13327 (handle_query): New function.
13328 (main): Call handle_query for `q' packets.
13329 * server.h: Include "target.h". Remove obsolete prototypes.
13330 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13331
13332 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13333
13334 * Makefile.in: Add WARN_CFLAGS. Update configury
13335 dependencies.
13336 * configure.in: Check for <string.h>
13337 * configure: Regenerate.
13338 * config.in: Regenerate.
13339 * gdbreplay.c: Include needed system headers.
13340 (remote_open): Remove strchr prototype.
13341 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13342 * regcache.c (supply_register): Change buf argument to const void *.
13343 (supply_register_by_name): Likewise.
13344 (collect_register): Change buf argument to void *.
13345 (collect_register_by_name): Likewise.
13346 * regcache.h: Add missing prototypes.
13347 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13348 * server.c (handle_query): New function.
13349 (attached): New static variable, moved out of main.
13350 (main): Quiet longjmp clobber warnings.
13351 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13352 * utils.c (error): Remove NORETURN.
13353 (fatal): Likewise.
This page took 0.328355 seconds and 5 git commands to generate.