Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
8424cc97
SM
12016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2
3 * server.c (skip_to_semicolon): Remove.
4 (process_point_options): Use strchrnul instead of
5 skip_to_semicolon.
6
4d18591b
YQ
72016-01-26 Yao Qi <yao.qi@linaro.org>
8
9 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
10 * linux-low.c (install_software_single_step_breakpoints): Don't
11 call regcache_read_pc.
12 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
13 argument pc.
14
d8020970
YQ
152016-01-26 Yao Qi <yao.qi@linaro.org>
16
17 * linux-low.c (install_software_single_step_breakpoints): Call
18 regcache_read_pc instead of get_pc.
19
8b207339
YQ
202016-01-26 Yao Qi <yao.qi@linaro.org>
21
22 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
23 (unblock_async_io): Rename to ...
24 (block_unblock_async_io): ... it. New function.
25 (enable_async_io): Don't install SIGIO handler. Unblock it
26 instead.
27 (disable_async_io): Don't ignore SIGIO. Block it instead.
28 (initialize_async_io): Install SIGIO handler. Don't call
29 unblock_async_io.
30
18879fef
YQ
312016-01-26 Yao Qi <yao.qi@linaro.org>
32
33 * remote-utils.c (getpkt): If the buffer isn't empty, and the
34 first character is '\003', call *the_target->request_interrupt.
35
a0f8e08a
YQ
362016-01-25 Yao Qi <yao.qi@linaro.org>
37
38 * remote-utils.c (new_thread_notify): Remove.
39 (dead_thread_notify): Likewise.
40 * remote-utils.h (new_thread_notify): Remove declaration.
41 (dead_thread_notify): Likewise.
42
cc5fd9ab
MK
432016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
44
45 * gdb.trace/pending.exp: Fix expected message on continue.
46
99e8eb11
MK
472016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
48
49 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
50 it works properly on big-endian machines where sizeof (CORE_ADDR)
51 != sizeof (void *).
52
a994041d
PA
532016-01-21 Pedro Alves <palves@redhat.com>
54
55 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
56 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
57 * configure: Regenerate.
58
f7a6a40d
YQ
592016-01-21 Yao Qi <yao.qi@linaro.org>
60
61 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
62 is_thumb and set it according to CPSR saved on the stack.
63 (get_next_pcs_syscall_next_pc): Pass is_thumb to
64 arm_sigreturn_next_pc.
65
6f69e520
YQ
662016-01-18 Yao Qi <yao.qi@linaro.org>
67
68 * linux-low.c (linux_set_pc_64bit): New function.
69 (linux_get_pc_64bit): New function.
70 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
71 Declare.
72 * linux-sparc-low.c (debug_threads): Remove declaration.
73 (sparc_get_pc): Remove.
74 (the_low_target): Use linux_get_pc_64bit instead of
75 sparc_get_pc.
76 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
77 (the_low_target): Use linux_get_pc_64bit and
78 linux_set_pc_64bit.
79
276d4552
YQ
802016-01-18 Yao Qi <yao.qi@linaro.org>
81
82 * linux-arm-low.c (debug_threads): Remove declaration.
83 (arm_get_pc, arm_set_pc): Remove.
84 (the_low_target): Use linux_get_pc_32bit and
85 linux_set_pc_32bit.
86 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
87 (the_low_target): Use linux_get_pc_32bit and
88 linux_set_pc_32bit.
89 * linux-cris-low.c (debug_threads): Remove declaration.
90 (cris_get_pc, cris_set_pc,): Remove.
91 (the_low_target): Use linux_get_pc_32bit and
92 linux_set_pc_32bit.
93 * linux-crisv32-low.c (debug_threads): Remove declaration.
94 (cris_get_pc, cris_set_pc): Remove.
95 (the_low_target): Use linux_get_pc_32bit and
96 linux_set_pc_32bit.
97 * linux-low.c: Include inttypes.h.
98 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
99 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
100 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
101 (the_low_target): Use linux_get_pc_32bit and
102 linux_set_pc_32bit.
103 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
104 (the_low_target): Use linux_get_pc_32bit and
105 linux_set_pc_32bit.
106 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
107 (the_low_target): Use linux_get_pc_32bit and
108 linux_set_pc_32bit.
109 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
110 (the_low_target): Use linux_get_pc_32bit and
111 linux_set_pc_32bit.
112 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
113 (the_low_target): Use linux_get_pc_32bit and
114 linux_set_pc_32bit.
115
eb0edac8
GB
1162016-01-18 Gary Benson <gbenson@redhat.com>
117
118 * configure.ac (AC_FUNC_FORK): New check.
119 * config.in: Regenerate.
120 * configure: Likewise.
121
1b451dda
YQ
1222016-01-14 Yao Qi <yao.qi@linaro.org>
123
124 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
125 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
126 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
127 arm_get_next_pcs_ctor.
128
82075af2
JS
1292016-01-12 Josh Stone <jistone@redhat.com>
130 Philippe Waroquiers <philippe.waroquiers@skynet.be>
131
132 * inferiors.h: Include "gdb_vecs.h".
133 (struct process_info): Add syscalls_to_catch.
134 * inferiors.c (remove_process): Free syscalls_to_catch.
135 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
136 syscall_return stops.
137 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
138 * server.c (handle_general_set): Handle QCatchSyscalls.
139 (handle_query): Report support for QCatchSyscalls.
140 * target.h (struct target_ops): Add supports_catch_syscall.
141 (target_supports_catch_syscall): New macro.
142 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
143 (struct lwp_info): Add syscall_state.
144 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
145 Maintain syscall_state and syscalls_to_catch across exec.
146 (get_syscall_trapinfo): New function, proxy to the_low_target.
147 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
148 (linux_low_filter_event): Toggle syscall_state entry/return for
149 syscall traps, and set it ignored for all others.
150 (gdb_catching_syscalls_p): New function.
151 (gdb_catch_this_syscall_p): New function.
152 (linux_wait_1): Handle SYSCALL_SIGTRAP.
153 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
154 (linux_supports_catch_syscall): New function.
155 (linux_target_ops): Install it.
156 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
157 (the_low_target): Install it.
158
8f13a3ce
MF
1592016-01-12 Mike Frysinger <vapier@gentoo.org>
160
161 * acinclude.m4: Include new ../warning.m4 file.
162 * configure: Regenerated.
163 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
164
5b3da067
MF
1652016-01-12 Mike Frysinger <vapier@gentoo.org>
166
167 * ax.c (is_goto_target): Mark static.
168 * linux-low.c (register_addr): Likewise.
169 (linux_fetch_registers, linux_store_registers): Likewise.
170 * mem-break.c (any_persistent_commands): Fix old prototype.
171 (add_commands_to_breakpoint): Mark static.
172 * regcache.c (find_register_by_name): Delete unused func.
173 * remote-utils.c (hex_or_minus_one): Mark static.
174 * server.c (monitor_show_help): Mark static.
175 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
176 handle_v_requests): Likewise.
177
bc504a31
PA
1782016-01-12 Pedro Alves <palves@redhat.com>
179
180 Remove use of the registered trademark symbol throughout.
181
5a0dd67a
YQ
1822016-01-08 Yao Qi <yao.qi@linaro.org>
183
184 * remote-utils.c (getpkt): If c is '\003', call target hook
185 request_interrupt.
186
b2ca446f
YQ
1872016-01-06 Yao Qi <yao.qi@linaro.org>
188
189 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
190 linux-aarch32-low.c.
191 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
192 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
193 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
194 (thumb2_breakpoint): Declare.
195 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
196 linux-aarch32-low.h.
197 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
198 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
199 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
200
edd88788
JB
2012016-01-01 Joel Brobecker <brobecker@adacore.com>
202
203 * gdbreplay.c (gdbreplay_version): Change copyright year in
204 version message.
205 * server.c (gdbserver_version): Likewise.
206
65da7f14
PP
2072015-12-28 Patrick Palka <patrick@parcs.ath.cx>
208
209 * server.c (crc32_table): Delete.
210 (crc32): Use libiberty's xcrc32 function.
211
4abd5ed2
JB
2122015-12-22 Joel Brobecker <brobecker@adacore.com>
213
214 * lynx-low.c (lynx_delete_thread_callback): New function.
215 (lynx_mourn): Properly delete our process and all of its
216 threads. Remove call to clear_inferiors.
217
0e50fe5c
JB
2182015-12-22 Joel Brobecker <brobecker@adacore.com>
219
220 * target.c (thread_search_callback): Add check that
221 the thread_stopped target callback is not NULL before
222 calling it.
223
35adc03f
YQ
2242015-12-21 Yao Qi <yao.qi@linaro.org>
225
226 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
227 arm breakpoint.
228
bd2b2909
AT
2292015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
230
231 * server.c (handle_query): Call target_supports_software_single_step.
232
7fe5e27e
AT
2332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
234
235 * linux-low.c (single_step): New function.
236 (linux_resume_one_lwp_throw): Call single_step.
237 (start_step_over): Likewise.
238
d9311bfa
AT
2392015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
240
241 * Makefile.in (SFILES): Append arch/arm-linux.c,
242 arch/arm-get-next-pcs.c.
243 (arm-linux.o): New rule.
244 (arm-get-next-pcs.o): New rule.
245 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
246 arm-linux.o.
247 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
248 to linux-aarch32-low.c.
249 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
250 (arm_breakpoint_len, thumb_breakpoint): Likewise.
251 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
252 (thumb2_breakpoint_len): Likewise.
253 (arm_is_thumb_mode): Make non-static.
254 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
255 from linux-aarch32-low.c.
256 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
257 (arm_breakpoint_len, thumb_breakpoint): Likewise.
258 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
259 (thumb2_breakpoint_len): Likewise.
260 (arm_is_thumb_mode): New declaration.
261 * linux-arm-low.c: Include arch/arm-linux.h
262 aarch/arm-get-next-pcs.h, sys/syscall.h.
263 (get_next_pcs_ops): New struct.
264 (get_next_pcs_addr_bits_remove): New function.
265 (get_next_pcs_is_thumb): New function.
266 (get_next_pcs_read_memory_unsigned_integer): Likewise.
267 (arm_sigreturn_next_pc): Likewise.
268 (get_next_pcs_syscall_next_pc): Likewise.
269 (arm_gdbserver_get_next_pcs): Likewise.
270 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
271 Initialize.
272 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
273 * server.h: Include gdb_vecs.h.
274
68ce2059
AT
2752015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
276
277 * Makefile.in (SFILES): Append common/common-regcache.c.
278 (OBS): Append common-regcache.o.
279 (common-regcache.o): New rule.
280 * regcache.c (init_register_cache): Initialize cache to
281 REG_UNAVAILABLE.
282 (regcache_raw_read_unsigned): New function.
283 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
284 register_status enum.
285
fa5308bd
AT
2862015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
287
288 * linux-aarch64-low.c (the_low_targets): Rename
289 breakpoint_reinsert_addr to get_next_pcs.
290 * linux-arm-low.c (the_low_targets): Likewise.
291 * linux-bfin-low.c (the_low_targets): Likewise.
292 * linux-cris-low.c (the_low_targets): Likewise.
293 * linux-crisv32-low.c (the_low_targets): Likewise.
294 * linux-low.c (can_software_single_step): Likewise.
295 (install_software_single_step_breakpoints): New function.
296 (start_step_over): Use install_software_single_step_breakpoints.
297 * linux-low.h: New CORE_ADDR vector.
298 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
299 get_next_pcs.
300 * linux-mips-low.c (the_low_targets): Likewise.
301 * linux-nios2-low.c (the_low_targets): Likewise.
302 * linux-sparc-low.c (the_low_targets): Likewise.
303
4a6ed09b
PA
3042015-12-17 Pedro Alves <palves@redhat.com>
305
306 * linux-low.c (linux_kill_one_lwp): Remove references to
307 LinuxThreads.
308 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
309 to 'kill'.
310 (linux_init_signals): Delete.
311 (initialize_low): Adjust.
312 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
313
7544db95
PA
3142015-12-16 Pedro Alves <palves@redhat.com>
315
316 * configure.ac (compiler warning flags): When testing a
317 -Wno-foo option, check whether -Wfoo works instead.
318 * configure: Regenerate.
319
8020350c
DB
3202015-12-11 Don Breazeal <donb@codesourcery.com>
321
322 * server.c (process_serial_event): Don't exit from gdbserver
323 in remote mode if there are still active inferiors.
324
db91f502
YQ
3252015-12-11 Yao Qi <yao.qi@linaro.org>
326
327 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
328 arm_breakpoint_at if the process is 32-bit.
329
b37a6290
YQ
3302015-12-11 Yao Qi <yao.qi@linaro.org>
331
332 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
333 arm breakpoint.
334
17b1509a
YQ
3352015-12-07 Yao Qi <yao.qi@linaro.org>
336
337 * configure.srv: Append arm.o to srv_tgtobj for
338 aarch64*-*-linux* target.
339 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
340 from linux-arm-low.c.
341 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
342 (arm_breakpoint_len, thumb_breakpoint): Likewise.
343 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
344 (thumb2_breakpoint_len): Likewise.
345 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
346 (arm_breakpoint_kinds): Likewise.
347 (arm_breakpoint_kind_from_pc): Likewise.
348 (arm_sw_breakpoint_from_kind): Likewise.
349 (arm_breakpoint_kind_from_current_state): Likewise.
350 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
351 (arm_sw_breakpoint_from_kind): Declare.
352 (arm_breakpoint_kind_from_current_state): Declare.
353 (arm_breakpoint_at): Declare.
354 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
355 arm_sw_breakpoint_from_kind if process is 32-bit.
356 (aarch64_breakpoint_kind_from_pc): New function.
357 (aarch64_breakpoint_kind_from_current_state): New function.
358 (the_low_target): Initialize fields breakpoint_kind_from_pc
359 and breakpoint_kind_from_current_state.
360 * linux-arm-low.c (arm_breakpoint_kinds): Move to
361 linux-aarch32-low.c.
362 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
363 (arm_breakpoint, arm_breakpoint_len): Likewise.
364 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
365 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
366 (arm_is_thumb_mode): Likewise.
367 (arm_breakpoint_at): Likewise.
368 (arm_breakpoint_kind_from_pc): Likewise.
369 (arm_sw_breakpoint_from_kind): Likewise.
370 (arm_breakpoint_kind_from_current_state): Likewise.
371
372 Revert:
373 2015-08-04 Yao Qi <yao.qi@linaro.org>
374
375 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
376 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
377 * server.c (extended_protocol): Remove "static".
378 * server.h (extended_protocol): Declare it.
379
ece66d65
JS
3802015-12-04 Josh Stone <jistone@redhat.com>
381
382 * target.h (struct target_ops) <arch_setup>: Rename to ...
383 (struct target_ops) <post_create_inferior>: ... this.
384 (target_arch_setup): Rename to ...
385 (target_post_create_inferior): ... this, calling post_create_inferior.
386 * server.c (start_inferior): Update target_arch_setup calls to
387 target_post_create_inferior.
388 * linux-low.c (linux_low_ptrace_options): Forward declare.
389 (linux_arch_setup): Update its comment for general use.
390 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
391 (struct linux_target_ops): Use linux_post_create_inferior.
392 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
393 to post_create_inferior.
394 * nto-low.c (struct nto_target_ops): Likewise.
395 * spu-low.c (struct spu_target_ops): Likewise.
396 * win32-low.c (struct win32_target_ops): Likewise.
397
e58c48b4
AT
3982015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
399
400 * linux-arm-low.c: Remove duplicate arch/arm.h include.
401
fbec8956
AT
4022015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
403
404 * linux-arm-low.c (arm_reinsert_addr): Remove function.
405 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
406 * linux-cris-low.c (cris_reinsert_addr> Remove function.
407 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
408 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
409 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
410 * linux-mips-low.c (mips_reinsert_addr): Remove function.
411 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
412 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
413 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
414 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
415 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
416
9b4c5f87
AT
4172015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
418
419 * linux-low.c (linux_look_up_symbols): Don't call
420 linux_supports_traceclone.
421 * linux-low.h (thread_db_init): Remove use_events argument.
422 * thread-db.c (thread_db_use_event): Remove global variable.
423 (struct thread_db) <td_thr_event_enable_p>: Remove field.
424 (struct thread_db) <td_create_bp>: Remove field.
425 (thread_db_create_event): Remove function.
426 (thread_db_enable_reporting): Likewise.
427 (find_one_thread): Don't check for thread_db_use_events.
428 (attach_thread): Likewise.
429 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
430 (try_thread_db_load_1): Don't check for thread_db_use_events.
431 (thread_db_init): Remove use_events argument and thread events
432 handling.
433 (remove_thread_event_breakpoints): Remove function.
434 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
435
7d00775e
AT
4362015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
437
438 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
439 New function.
440 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
441 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
442 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
443 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
444 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
445 Initialize.
446 * linux-crisv32-low.c (cris_supports_hardware_single_step):
447 New function.
448 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
449 * linux-low.c (can_hardware_single_step): Use
450 supports_hardware_single_step.
451 (can_software_single_step): New function.
452 (start_step_over): Call can_software_single_step.
453 (linux_supports_hardware_single_step): New function.
454 (struct target_ops) <supports_software_single_step>: Initialize.
455 * linux-low.h (struct linux_target_ops)
456 <supports_hardware_single_step>: Initialize.
457 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
458 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
459 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
460 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
461 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
462 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
463 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
464 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
465 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
466 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
467 Initialize.
468 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
469 (struct linux_target_ops) <tile_supports_hardware_single_step>:
470 Initialize.
471 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
472 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
473 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
474 New function.
475 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
476 * target.h (struct target_ops): <supports_software_single_step>:
477 New field.
478 (target_supports_software_single_step): New macro.
479
2d97cd35
AT
4802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
481
482 * linux-low.c (linux_wait_1): Fix pc advance condition.
483 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
484 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
485
769ef81f
AT
4862015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
487
488 * linux-arm-low.c (arm_is_thumb_mode): New function.
489 (arm_breakpoint_at): Use arm_is_thumb_mode.
490 (arm_breakpoint_kind_from_current_state): New function.
491 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
492 Initialize.
493 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
494 (linux_breakpoint_kind_from_current_state): New function.
495 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
496 * linux-low.h (struct linux_target_ops)
497 <breakpoint_kind_from_current_state>: New field.
498 * target.h (struct target_ops): Likewise.
499 (target_breakpoint_kind_from_current_state): New macro.
500
1bebeeca
PA
5012015-11-30 Pedro Alves <palves@redhat.com>
502
503 * linux-low.c (linux_resume): Wake up the event loop before
504 returning.
505
a67a9fae
PA
5062015-11-30 Pedro Alves <palves@redhat.com>
507
508 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
509 check.
510 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
511 to -1.
512 * target.c (struct thread_search): New structure.
513 (thread_search_callback): New function.
514 (prev_general_thread): New global.
515 (prepare_to_access_memory, done_accessing_memory): New functions.
516 * target.h (prepare_to_access_memory, done_accessing_memory):
517 Replace macros with function declarations.
518
f2faf941
PA
5192015-11-30 Pedro Alves <palves@redhat.com>
520
521 PR 14618
522 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
523 report TARGET_WAITKIND_NO_RESUMED.
524 * remote-utils.c (prepare_resume_reply): Handle
525 TARGET_WAITKIND_NO_RESUMED.
526 * server.c (report_no_resumed): New global.
527 (handle_query) <qSupported>: Handle "no-resumed+". Report
528 "no-resumed+" support.
529 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
530 return error if the client doesn't support no-resumed events.
531 (push_stop_notification): New function.
532 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
533 events if the client supports them.
534
a681f9c9
PA
5352015-11-30 Pedro Alves <palves@redhat.com>
536
537 * linux-low.c (thread_still_has_status_pending_p): Don't check
538 vCont;t here.
539 (lwp_resumed): New function.
540 (status_pending_p_callback): Return early if the LWP is not
541 supposed to be resumed.
542
65706a29
PA
5432015-11-30 Pedro Alves <palves@redhat.com>
544
545 * linux-low.c (handle_extended_wait): Assert that the LWP's
546 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
547 thread create events, leave the new child's status pending.
548 (linux_low_filter_event): If GDB wants to hear about thread exit
549 events, leave the LWP marked dead and don't delete it.
550 (linux_wait_for_event_filtered): Don't check for thread exit.
551 (filter_exit_event): New function.
552 (linux_wait_1): Use it, when returning an exit event.
553 (linux_resume_one_lwp_throw): Assert that the LWP's
554 waitstatus is TARGET_WAITKIND_IGNORE.
555 * remote-utils.c (prepare_resume_reply): Handle
556 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
557 * server.c (report_thread_events): New global.
558 (handle_general_set): Handle QThreadEvents.
559 (handle_query) <qSupported>: Handle and report QThreadEvents+;
560 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
561 TARGET_WAITKIND_THREAD_EXITED.
562 * server.h (report_thread_events): Declare.
563
56cf4bed
PA
5642015-11-30 Pedro Alves <palves@redhat.com>
565
566 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
567 the thread's last_resume_kind was resume_stop.
568
500c1d85
PA
5692015-11-30 Pedro Alves <palves@redhat.com>
570
571 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
572 before returning.
573
de979965
PA
5742015-11-30 Pedro Alves <palves@redhat.com>
575
576 * server.c (handle_v_requests): Handle vCtrlC.
577
34c65914
PA
5782015-11-30 Pedro Alves <palves@redhat.com>
579
580 * gdbthread.h (find_any_thread_of_pid): Declare.
581 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
582 functions.
583 * server.c (handle_query): If current_thread is NULL, look for
584 another thread of the selected process.
585
79efa585 5862015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 587 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
588
589 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
590 * server.c (handle_qxfer_threads_worker): Refactor to include thread
591 name in reply.
592 * target.h (struct target_ops) <thread_name>: New field.
593 (target_thread_name): New macro.
594
80d82c19
JB
5952015-11-23 Joel Brobecker <brobecker@adacore.com>
596
597 * regcache.h (regcache_invalidate_pid): Add declaration.
598 * regcache.c (regcache_invalidate_pid): New function, extracted
599 from regcache_invalidate.
600 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
601 Add trivial documentation comment.
602 * lynx-low.c: Use regcache_invalidate_pid instead of
603 regcache_invalidate.
604
64da5dd5
JB
6052015-11-23 Joel Brobecker <brobecker@adacore.com>
606
607 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
608 and Elf64_auxv_t if the target is Android.
609
37ce4055
DE
6102015-11-22 Doug Evans <xdje42@gmail.com>
611
612 * target.h: #include <sys/types.h>.
613
06e03fff
PA
6142015-11-19 Pedro Alves <palves@redhat.com>
615
616 * linux-low.c (linux_process_qsupported): Change prototype.
617 Adjust.
618 * linux-low.h (struct linux_target_ops) <process_qsupported>:
619 Change prototype.
620 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
621 and adjust to loop over all features.
622 * server.c (handle_query) <qSupported>: Adjust to call
623 target_process_qsupported once, passing it a vector of unprocessed
624 features.
625 * target.h (struct target_ops) <process_qsupported>: Change
626 prototype.
627 (target_process_qsupported): Adjust.
628
9a084706
PA
6292015-11-19 Pedro Alves <palves@redhat.com>
630
631 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
632 mode.
633 * configure: Regenerate.
634
dad44a1f
PA
6352015-11-19 Pedro Alves <palves@redhat.com>
636
637 * configure: Regenerate.
638
231c0592
YQ
6392015-11-19 Yao Qi <yao.qi@linaro.org>
640
641 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
642 type to uint32_t.
643
6c1c9a8b
YQ
6442015-11-19 Yao Qi <yao.qi@linaro.org>
645
646 * linux-aarch64-low.c (enum aarch64_operand_type): New.
647 (struct aarch64_operand): Move enum out.
648
9caa3311
YQ
6492015-11-19 Yao Qi <yao.qi@linaro.org>
650
651 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
652 struct user_fpsimd_state *.
653 (aarch64_store_fpregset): Likewise.
654
6a69a054
YQ
6552015-11-19 Yao Qi <yao.qi@linaro.org>
656
657 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
658 struct user_pt_regs *.
659 (aarch64_store_gregset): Likewise.
660
1798301e
PA
6612015-11-18 Pedro Alves <palves@redhat.com>
662
663 * Makefile.in (all_object_files): Add $IPA_OBJS.
664
ce7715e2
PA
6652015-11-17 Pedro Alves <palves@redhat.com>
666
667 * win32-low.c (win32_resume): Use gdb_signal_from_host,
668 GDB_SIGNAL_0 and gdb_signal_to_string.
669
c0879059
PA
6702015-11-17 Pedro Alves <palves@redhat.com>
671
672 * win32-low.c (handle_output_debug_string): Remove parameter.
673 (win32_kill): Remove our_status local and adjust call to
674 handle_output_debug_string.
675 (get_child_debug_event): Adjust call to
676 handle_output_debug_string.
677
1996e237
SM
6782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
679
680 * linux-mips-low.c (mips_fill_gregset): Add cast.
681 (mips_store_gregset): Likewise.
682 (mips_fill_fpregset): Likewise.
683 (mips_store_fpregset): Likewise.
684
cbec665b
SM
6852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
686
687 * linux-mips-low.c (mips_add_watchpoint): Rename private to
688 priv.
689
eb3e3c67
SM
6902015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
691
692 * linux-mips-low.c (mips_linux_new_thread): Change type of
693 watch_type to enum target_hw_bp_type.
694
171de4b8
SM
6952015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
696
697 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
698 Change return type to arm_hwbp_type.
699
04248ead
SM
7002015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
701
702 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
703 (arm_store_gregset): Likewise.
704 * linux-arm-low.c (arm_get_hwcap): Likewise.
705 (arm_read_description): Likewise.
706
04b3479c
SM
7072015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
708
709 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
710
2bc84e8a
SM
7112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
712
713 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
714 (ppc_fill_vsxregset): Likewise.
715 (ppc_store_vsxregset): Likewise.
716 (ppc_fill_vrregset): Likewise.
717 (ppc_store_vrregset): Likewise.
718 (ppc_fill_evrregset): Likewise.
719 (ppc_store_evrregset): Likewise.
720
e6c5bb05
SM
7212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
722
723 * linux-ppc-low.c (ppc_usrregs_info): Remove
724 forward-declaration.
725 (ppc_arch_setup): Move lower in file.
726
7ea45d72
SM
7272015-10-30 Simon Marchi <simon.marchi@ericsson.com>
728
729 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
730 (ps_pdwrite): Likewise.
731
69291610
HW
7322015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
733
734 * linux-arm-low.c (arm_new_thread): Move pointer dereference
735 to after assert checks.
736
b42945fd
SM
7372015-10-29 Simon Marchi <simon.marchi@ericsson.com>
738
739 * proc-service.c (ps_pdread): Add/adjust casts.
740 (ps_pdwrite): Add/adjust casts.
741
d6f85c84
SM
7422015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
743
744 * server.c (handle_search_memory_1): Cast return value of
745 memmem.
746
f98cd059
SM
7472015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
748
749 * server.c (write_qxfer_response): Change type of data to
750 gdb_byte *.
751
d2412fa5
PA
7522015-10-29 Pedro Alves <palves@redhat.com>
753
754 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
755
c17414a2
PA
7562015-10-29 Pedro Alves <palves@redhat.com>
757
758 * tracepoint.c (clear_installed_tracepoints): Add casts.
759
e053fbc4
PA
7602015-10-29 Pedro Alves <palves@redhat.com>
761
762 * server.c (handle_v_cont, process_serial_event): Add enum
763 gdb_signal casts to signal parsing code.
764
add67df8
PA
7652015-10-29 Pedro Alves <palves@redhat.com>
766
767 * linux-low.h (NULL_REGSET): Define.
768 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
769 * linux-arm-low.c (arm_regsets): Likewise.
770 * linux-crisv32-low.c (cris_regsets): Likewise.
771 * linux-m68k-low.c (m68k_regsets): Likewise.
772 * linux-mips-low.c (mips_regsets): Likewise.
773 * linux-nios2-low.c (nios2_regsets): Likewise.
774 * linux-ppc-low.c (ppc_regsets): Likewise.
775 * linux-s390-low.c (s390_regsets): Likewise.
776 * linux-sh-low.c (sh_regsets): Likewise.
777 * linux-sparc-low.c (sparc_regsets): Likewise.
778 * linux-tic6x-low.c (tic6x_regsets): Likewise.
779 * linux-tile-low.c (tile_regsets): Likewise.
780 * linux-x86-low.c (x86_regsets): Likewise.
781 * linux-xtensa-low.c (xtensa_regsets): Likewise.
782
50bc912a
PA
7832015-10-29 Pedro Alves <palves@redhat.com>
784
785 * linux-low.h (NULL_REGSET): Define.
786 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
787 * linux-arm-low.c (arm_regsets): Likewise.
788 * linux-crisv32-low.c (cris_regsets): Likewise.
789 * linux-m68k-low.c (m68k_regsets): Likewise.
790 * linux-mips-low.c (mips_regsets): Likewise.
791 * linux-nios2-low.c (nios2_regsets): Likewise.
792 * linux-ppc-low.c (ppc_regsets): Likewise.
793 * linux-s390-low.c (s390_regsets): Likewise.
794 * linux-sh-low.c (sh_regsets): Likewise.
795 * linux-sparc-low.c (sparc_regsets): Likewise.
796 * linux-tic6x-low.c (tic6x_regsets): Likewise.
797 * linux-tile-low.c (tile_regsets): Likewise.
798 * linux-x86-low.c (x86_regsets): Likewise.
799 * linux-xtensa-low.c (xtensa_regsets): Likewise.
800
682b2546
DE
8012015-10-26 Doug Evans <dje@google.com>
802
803 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
804
963843d4
DE
8052015-10-26 Doug Evans <dje@google.com>
806
807 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
808
d41401ac
DE
8092015-10-26 Doug Evans <dje@google.com>
810
811 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
812 for debug_printf.
813 (attach_thread, find_new_threads_callback): Ditto.
814
3db28855
AT
8152015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
816
817 * mem-break.h (set_breakpoint_data): Remove.
818
fb78e89c
AT
8192015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
820
821 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
822 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
823 (initialize_low): Remove set_breakpoint_data call.
824 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
825 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
826 (initialize_low): Remove set_breakpoint_data call.
827 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
828 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
829 (initialize_low): Remove set_breakpoint_data call.
830
2e6ee069
AT
8312015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
832
833 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
834 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
835 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
836 * target.h (target_breakpoint_kind_from_pc): New macro.
837
1652a986
AT
8382015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
839
840 * linux-low.c (default_breakpoint_kind_from_pc): New function.
841 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
842 the default breakpoint kind.
843
abeead09
AT
8442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
845
846 * linux-arm-low.c (arm_supports_z_point_type): Add software
847 breakpoint support.
848
b0b4b501
AT
8492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
850
851 * linux-arm-low.c: Refactor breakpoint definitions.
852 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
853 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
854
8689682c
AT
8552015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
856
857 * Makefile.in: Add arm.c/o.
858 * configure.srv: Likewise.
859 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
860 (arm_breakpoint_kind_from_pc): New function.
861 (arm_sw_breakpoint_from_kind): Return proper kind.
862 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
863
27165294
AT
8642015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
865
866 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
867 removal.
868 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
869 (struct raw_breakpoint) <size>: Remove.
870 (struct raw_breakpoint) <kind>: Add.
871 (bp_size): New function.
872 (bp_opcode): Likewise.
873 (find_raw_breakpoint_at): Adjust for kind.
874 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
875 (remove_memory_breakpoint): Adjust for kind call bp_size.
876 (set_raw_breakpoint_at): Adjust for kind.
877 (set_breakpoint): Likewise.
878 (set_breakpoint_at): Call breakpoint_kind_from_pc.
879 (delete_raw_breakpoint): Adjust for kind.
880 (delete_breakpoint): Likewise.
881 (find_gdb_breakpoint): Likewise.
882 (set_gdb_breakpoint_1): Likewise.
883 (set_gdb_breakpoint): Likewise.
884 (delete_gdb_breakpoint_1): Likewise.
885 (delete_gdb_breakpoint): Likewise.
886 (uninsert_raw_breakpoint): Likewise.
887 (reinsert_raw_breakpoint): Likewise.
888 (set_breakpoint_data): Remove.
889 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
890 (check_mem_read): Adjust for kind call bp_size.
891 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
892 (clone_one_breakpoint): Adjust for kind.
893 * mem-break.h (set_gdb_breakpoint): Likewise.
894 (delete_gdb_breakpoint): Likewise.
895 * server.c (process_serial_event): Likewise.
896
dd373349
AT
8972015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
898
899 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
905 (arm_sw_breakpoint_from_kind): New function.
906 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
907 (struct linux_target_ops) <breakpoint>: Remove.
908 (struct linux_target_ops) <breakpoint_len>: Remove.
909 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
910 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
911 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
912 (struct linux_target_ops) <breakpoint>: Remove.
913 (struct linux_target_ops) <breakpoint_len>: Remove.
914 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
915 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
916 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
917 (struct linux_target_ops) <breakpoint>: Remove.
918 (struct linux_target_ops) <breakpoint_len>: Remove.
919 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
920 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
921 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
922 and sw_breakpoint_from_kind to increment the pc.
923 (linux_breakpoint_kind_from_pc): New function.
924 (linux_sw_breakpoint_from_kind): New function.
925 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
926 (initialize_low): Call breakpoint_kind_from_pc and
927 sw_breakpoint_from_kind to replace breakpoint_data/len.
928 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
929 New field.
930 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
931 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
932 (struct linux_target_ops) <breakpoint>: Remove.
933 (struct linux_target_ops) <breakpoint_len>: Remove.
934 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
935 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
936 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
937 (struct linux_target_ops) <breakpoint>: Remove.
938 (struct linux_target_ops) <breakpoint_len>: Remove.
939 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
940 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
941 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
942 (struct linux_target_ops) <breakpoint>: Remove.
943 (struct linux_target_ops) <breakpoint_len>: Remove.
944 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
945 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
946 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
947 (struct linux_target_ops) <breakpoint>: Remove.
948 (struct linux_target_ops) <breakpoint_len>: Remove.
949 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
950 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
951 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
952 (struct linux_target_ops) <breakpoint>: Remove.
953 (struct linux_target_ops) <breakpoint_len>: Remove.
954 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
955 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
956 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
957 (struct linux_target_ops) <breakpoint>: Remove.
958 (struct linux_target_ops) <breakpoint_len>: Remove.
959 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
960 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
961 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
962 (struct linux_target_ops) <breakpoint>: Remove.
963 (struct linux_target_ops) <breakpoint_len>: Remove.
964 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
965 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
966 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
967 (struct linux_target_ops) <breakpoint>: Remove.
968 (struct linux_target_ops) <breakpoint_len>: Remove.
969 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
970 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
971 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
972 (struct linux_target_ops) <breakpoint>: Remove.
973 (struct linux_target_ops) <breakpoint_len>: Remove.
974 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
975 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
976 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
977 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
978 (struct linux_target_ops) <breakpoint>: Remove.
979 (struct linux_target_ops) <breakpoint_len>: Remove.
980 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
981 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
982 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
983 (struct linux_target_ops) <breakpoint>: Remove.
984 (struct linux_target_ops) <breakpoint_len>: Remove.
985 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
986 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
987
4cd98a19
AT
9882015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
989
990 * linux-cris-low.c (cris_get_pc): Remove void arg.
991
774ee6d2
AR
9922015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
993
994 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
995 variable name.
996
833dcd29
AR
9972015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
998
999 * inferiors.c (thread_pid_matches_callback): New function.
1000 (find_thread_process): New function.
1001 (remove_thread): Reset current_thread.
1002 (remove_process): Assert threads have been removed first.
1003
8d689ee5
YQ
10042015-10-15 Yao Qi <yao.qi@linaro.org>
1005
1006 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1007 if it is 3.
1008 (aarch64_remove_point): Likewise.
1009 * regcache.c (regcache_register_size): New function.
1010
1c2e1515
YQ
10112015-10-12 Yao Qi <yao.qi@linaro.org>
1012
1013 * linux-aarch64-low.c: Update all callers as emit_load_store
1014 is renamed to aarch64_emit_load_store.
1015
e1c587c3
YQ
10162015-10-12 Yao Qi <yao.qi@linaro.org>
1017
1018 * linux-aarch64-low.c: Update all callers of function renaming
1019 from emit_insn to aarch64_emit_insn.
1020
b6542f81
YQ
10212015-10-12 Yao Qi <yao.qi@linaro.org>
1022
1023 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1024 arch/aarch64-insn.h.
1025 (struct aarch64_memory_operand): Likewise.
1026 (ENCODE): Likewise.
1027 (emit_insn): Move to arch/aarch64-insn.c.
1028 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1029 (emit_load_store): Move to arch/aarch64-insn.c.
1030 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1031 (can_encode_int32): Remove.
1032
246994ce
YQ
10332015-10-12 Yao Qi <yao.qi@linaro.org>
1034
1035 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1036 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1037 (aarch64_relocate_instruction): Likewise.
1038 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1039 (struct aarch64_insn_visitor): Likewise.
1040
0badd99f
YQ
10412015-10-12 Yao Qi <yao.qi@linaro.org>
1042
1043 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1044 (struct aarch64_insn_visitor): New.
1045 (struct aarch64_insn_relocation_data): New.
1046 (aarch64_ftrace_insn_reloc_b): New function.
1047 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1048 (aarch64_ftrace_insn_reloc_cb): Likewise.
1049 (aarch64_ftrace_insn_reloc_tb): Likewise.
1050 (aarch64_ftrace_insn_reloc_adr): Likewise.
1051 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1052 (aarch64_ftrace_insn_reloc_others): Likewise.
1053 (visitor): New.
1054 (aarch64_relocate_instruction): Use visitor.
1055
dfaffe9d
YQ
10562015-10-12 Yao Qi <yao.qi@linaro.org>
1057
1058 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1059 int. Add argument buf.
1060 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1061 aarch64_relocate_instruction.
1062
70b439f0
YQ
10632015-10-12 Yao Qi <yao.qi@linaro.org>
1064
1065 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1066 argument insn. Remove local variable insn. Don't call
1067 target_read_uint32.
1068 (aarch64_install_fast_tracepoint_jump_pad): Call
1069 target_read_uint32.
1070
7781c06f
YQ
10712015-09-30 Yao Qi <yao.qi@linaro.org>
1072
1073 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1074 (emit_load_store_pair): Likewise.
1075
9a3c8263
SM
10762015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1077
1078 * dll.c (match_dll): Add cast(s).
1079 (unloaded_dll): Likewise.
1080 * linux-low.c (second_thread_of_pid_p): Likewise.
1081 (delete_lwp_callback): Likewise.
1082 (count_events_callback): Likewise.
1083 (select_event_lwp_callback): Likewise.
1084 (linux_set_resume_request): Likewise.
1085 * server.c (accumulate_file_name_length): Likewise.
1086 (emit_dll_description): Likewise.
1087 (handle_qxfer_threads_worker): Likewise.
1088 (visit_actioned_threads): Likewise.
1089 * thread-db.c (any_thread_of): Likewise.
1090 * tracepoint.c (same_process_p): Likewise.
1091 (match_blocktype): Likewise.
1092 (build_traceframe_info_xml): Likewise.
1093
224c3ddb
SM
10942015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1095
1096 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1097 assignment.
1098 (gdb_unparse_agent_expr): Likewise.
1099 * hostio.c (require_data): Likewise.
1100 (handle_pread): Likewise.
1101 * linux-low.c (disable_regset): Likewise.
1102 (fetch_register): Likewise.
1103 (store_register): Likewise.
1104 (get_dynamic): Likewise.
1105 (linux_qxfer_libraries_svr4): Likewise.
1106 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1107 (set_fast_tracepoint_jump): Likewise.
1108 (uninsert_fast_tracepoint_jumps_at): Likewise.
1109 (reinsert_fast_tracepoint_jumps_at): Likewise.
1110 (validate_inserted_breakpoint): Likewise.
1111 (clone_agent_expr): Likewise.
1112 * regcache.c (init_register_cache): Likewise.
1113 * remote-utils.c (putpkt_binary_1): Likewise.
1114 (decode_M_packet): Likewise.
1115 (decode_X_packet): Likewise.
1116 (look_up_one_symbol): Likewise.
1117 (relocate_instruction): Likewise.
1118 (monitor_output): Likewise.
1119 * server.c (handle_search_memory): Likewise.
1120 (handle_qxfer_exec_file): Likewise.
1121 (handle_qxfer_libraries): Likewise.
1122 (handle_qxfer): Likewise.
1123 (handle_query): Likewise.
1124 (handle_v_cont): Likewise.
1125 (handle_v_run): Likewise.
1126 (captured_main): Likewise.
1127 * target.c (write_inferior_memory): Likewise.
1128 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1129 * tracepoint.c (init_trace_buffer): Likewise.
1130 (add_tracepoint_action): Likewise.
1131 (add_traceframe): Likewise.
1132 (add_traceframe_block): Likewise.
1133 (cmd_qtdpsrc): Likewise.
1134 (cmd_qtdv): Likewise.
1135 (cmd_qtstatus): Likewise.
1136 (response_source): Likewise.
1137 (response_tsv): Likewise.
1138 (cmd_qtnotes): Likewise.
1139 (gdb_collect): Likewise.
1140 (initialize_tracepoint): Likewise.
1141
afbe19f8
PL
11422015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1143
1144 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1145 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1146 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1147 <NOP>: New.
1148 (enum aarch64_condition_codes): New enum.
1149 (w0): New static global.
1150 (fp): Likewise.
1151 (lr): Likewise.
1152 (struct aarch64_memory_operand) <type>: New
1153 MEMORY_OPERAND_POSTINDEX type.
1154 (postindex_memory_operand): New helper function.
1155 (emit_ret): New function.
1156 (emit_load_store_pair): New function, factored out of emit_stp
1157 with support for MEMORY_OPERAND_POSTINDEX.
1158 (emit_stp): Rewrite using emit_load_store_pair.
1159 (emit_ldp): New function.
1160 (emit_load_store): Likewise.
1161 (emit_ldr): Mention post-index instruction in comment.
1162 (emit_ldrh): New function.
1163 (emit_ldrb): New function.
1164 (emit_ldrsw): Mention post-index instruction in comment.
1165 (emit_str): Likewise.
1166 (emit_subs): New function.
1167 (emit_cmp): Likewise.
1168 (emit_and): Likewise.
1169 (emit_orr): Likewise.
1170 (emit_orn): Likewise.
1171 (emit_eor): Likewise.
1172 (emit_mvn): Likewise.
1173 (emit_lslv): Likewise.
1174 (emit_lsrv): Likewise.
1175 (emit_asrv): Likewise.
1176 (emit_mul): Likewise.
1177 (emit_sbfm): Likewise.
1178 (emit_sbfx): Likewise.
1179 (emit_ubfm): Likewise.
1180 (emit_ubfx): Likewise.
1181 (emit_csinc): Likewise.
1182 (emit_cset): Likewise.
1183 (emit_nop): Likewise.
1184 (emit_ops_insns): New helper function.
1185 (emit_pop): Likewise.
1186 (emit_push): Likewise.
1187 (aarch64_emit_prologue): New function.
1188 (aarch64_emit_epilogue): Likewise.
1189 (aarch64_emit_add): Likewise.
1190 (aarch64_emit_sub): Likewise.
1191 (aarch64_emit_mul): Likewise.
1192 (aarch64_emit_lsh): Likewise.
1193 (aarch64_emit_rsh_signed): Likewise.
1194 (aarch64_emit_rsh_unsigned): Likewise.
1195 (aarch64_emit_ext): Likewise.
1196 (aarch64_emit_log_not): Likewise.
1197 (aarch64_emit_bit_and): Likewise.
1198 (aarch64_emit_bit_or): Likewise.
1199 (aarch64_emit_bit_xor): Likewise.
1200 (aarch64_emit_bit_not): Likewise.
1201 (aarch64_emit_equal): Likewise.
1202 (aarch64_emit_less_signed): Likewise.
1203 (aarch64_emit_less_unsigned): Likewise.
1204 (aarch64_emit_ref): Likewise.
1205 (aarch64_emit_if_goto): Likewise.
1206 (aarch64_emit_goto): Likewise.
1207 (aarch64_write_goto_address): Likewise.
1208 (aarch64_emit_const): Likewise.
1209 (aarch64_emit_call): Likewise.
1210 (aarch64_emit_reg): Likewise.
1211 (aarch64_emit_pop): Likewise.
1212 (aarch64_emit_stack_flush): Likewise.
1213 (aarch64_emit_zero_ext): Likewise.
1214 (aarch64_emit_swap): Likewise.
1215 (aarch64_emit_stack_adjust): Likewise.
1216 (aarch64_emit_int_call_1): Likewise.
1217 (aarch64_emit_void_call_2): Likewise.
1218 (aarch64_emit_eq_goto): Likewise.
1219 (aarch64_emit_ne_goto): Likewise.
1220 (aarch64_emit_lt_goto): Likewise.
1221 (aarch64_emit_le_goto): Likewise.
1222 (aarch64_emit_gt_goto): Likewise.
1223 (aarch64_emit_ge_got): Likewise.
1224 (aarch64_emit_ops_impl): New static global variable.
1225 (aarch64_emit_ops): New target function, return
1226 &aarch64_emit_ops_impl.
1227 (struct linux_target_ops): Install it.
1228
bb903df0
PL
12292015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1230
1231 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1232 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1233 aarch64-ipa.o.
1234 * linux-aarch64-ipa.c: New file.
1235 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1236 and endian.h.
1237 (aarch64_get_thread_area): New target method.
1238 (extract_signed_bitfield): New helper function.
1239 (aarch64_decode_ldr_literal): New function.
1240 (enum aarch64_opcodes): New enum.
1241 (struct aarch64_register): New struct.
1242 (struct aarch64_operand): New struct.
1243 (x0): New static global.
1244 (x1): Likewise.
1245 (x2): Likewise.
1246 (x3): Likewise.
1247 (x4): Likewise.
1248 (w2): Likewise.
1249 (ip0): Likewise.
1250 (sp): Likewise.
1251 (xzr): Likewise.
1252 (aarch64_register): New helper function.
1253 (register_operand): Likewise.
1254 (immediate_operand): Likewise.
1255 (struct aarch64_memory_operand): New struct.
1256 (offset_memory_operand): New helper function.
1257 (preindex_memory_operand): Likewise.
1258 (enum aarch64_system_control_registers): New enum.
1259 (ENCODE): New macro.
1260 (emit_insn): New helper function.
1261 (emit_b): New function.
1262 (emit_bcond): Likewise.
1263 (emit_cb): Likewise.
1264 (emit_tb): Likewise.
1265 (emit_blr): Likewise.
1266 (emit_stp): Likewise.
1267 (emit_ldp_q_offset): Likewise.
1268 (emit_stp_q_offset): Likewise.
1269 (emit_load_store): Likewise.
1270 (emit_ldr): Likewise.
1271 (emit_ldrsw): Likewise.
1272 (emit_str): Likewise.
1273 (emit_ldaxr): Likewise.
1274 (emit_stxr): Likewise.
1275 (emit_stlr): Likewise.
1276 (emit_data_processing_reg): Likewise.
1277 (emit_data_processing): Likewise.
1278 (emit_add): Likewise.
1279 (emit_sub): Likewise.
1280 (emit_mov): Likewise.
1281 (emit_movk): Likewise.
1282 (emit_mov_addr): Likewise.
1283 (emit_mrs): Likewise.
1284 (emit_msr): Likewise.
1285 (emit_sevl): Likewise.
1286 (emit_wfe): Likewise.
1287 (append_insns): Likewise.
1288 (can_encode_int32_in): New helper function.
1289 (aarch64_relocate_instruction): New function.
1290 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1291 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1292 (struct linux_target_ops): Install aarch64_get_thread_area,
1293 aarch64_install_fast_tracepoint_jump_pad and
1294 aarch64_get_min_fast_tracepoint_insn_len.
1295
787749ea
PL
12962015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1297
1298 * Makefile.in (aarch64-insn.o): New rule.
1299 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1300
9812b2e6
YQ
13012015-09-21 Yao Qi <yao.qi@linaro.org>
1302
1303 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1304
18fe412b
YQ
13052015-09-21 Yao Qi <yao.qi@linaro.org>
1306
1307 * tracepoint.c (max_jump_pad_size): Remove.
1308
a0cc84cd
YQ
13092015-09-18 Yao Qi <yao.qi@linaro.org>
1310
1311 * linux-aarch64-low.c: Don't include sys/uio.h.
1312 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1313
d78908cf
WW
13142015-09-16 Wei-cheng Wang <cole945@gmail.com>
1315
1316 * tracepoint.c (eval_result_type): Change prototype.
1317 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1318
d57e0d50
PA
13192015-09-15 Pedro Alves <palves@redhat.com>
1320
1321 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1322 Check whether to report exec events instead of checking whether
1323 multiprocess is enabled.
1324
5a676acc
PA
13252015-09-15 Pedro Alves <palves@redhat.com>
1326
1327 PR remote/18965
1328 * remote-utils.c (prepare_resume_reply): Merge
1329 TARGET_WAITKIND_VFORK_DONE switch case with the
1330 TARGET_WAITKIND_FORKED case.
1331
7c5d0fad
YQ
13322015-09-15 Yao Qi <yao.qi@linaro.org>
1333
1334 * server.c (handle_query): Check string comparison using
1335 "else if" instead of "if".
1336
750ce8d1
YQ
13372015-09-15 Yao Qi <yao.qi@linaro.org>
1338
1339 * server.c (vCont_supported): New global variable.
1340 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1341 matches. Append ";vContSupported+" to own_buf.
1342 (handle_v_requests): Append ";s;S" to own_buf if target supports
1343 hardware single step or vCont_supported is false.
1344 (capture_main): Set vCont_supported to zero.
1345
70b90b91
YQ
13462015-09-15 Yao Qi <yao.qi@linaro.org>
1347
1348 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1349 it to ...
1350 (linux_supports_hardware_single_step): ... New function.
1351 (linux_target_ops): Update.
1352 * lynx-low.c (lynx_target_ops): Set field
1353 supports_hardware_single_step to target_can_do_hardware_single_step.
1354 * nto-low.c (nto_target_ops): Likewise.
1355 * spu-low.c (spu_target_ops): Likewise.
1356 * win32-low.c (win32_target_ops): Likewise.
1357 * target.c (target_can_do_hardware_single_step): New function.
1358 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1359 Remove. <supports_hardware_single_step>: New field.
1360 (target_supports_conditional_breakpoints): Remove.
1361 (target_supports_hardware_single_step): New macro.
1362 (target_can_do_hardware_single_step): Declare.
1363 * server.c (handle_query): Use target_supports_hardware_single_step
1364 instead of target_supports_conditional_breakpoints.
1365
ade90bde
YQ
13662015-09-15 Yao Qi <yao.qi@linaro.org>
1367
1368 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1369 function.
1370 (struct linux_target_ops the_low_target): Install
1371 aarch64_linux_siginfo_fixup.
1372
94585166
DB
13732015-09-11 Don Breazeal <donb@codesourcery.com>
1374 Luis Machado <lgustavo@codesourcery.com>
1375
1376 * linux-low.c (linux_mourn): Static declaration.
1377 (linux_arch_setup): Move in front of
1378 handle_extended_wait.
1379 (linux_arch_setup_thread): New function.
1380 (handle_extended_wait): Handle exec events. Call
1381 linux_arch_setup_thread. Make event_lwp argument a
1382 pointer-to-a-pointer.
1383 (check_zombie_leaders): Do not check stopped threads.
1384 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1385 (linux_low_filter_event): Add lwp and thread for exec'ing
1386 non-leader thread if leader thread has been deleted.
1387 Refactor code into linux_arch_setup_thread and call it.
1388 Pass child lwp pointer by reference to handle_extended_wait.
1389 (linux_wait_for_event_filtered): Update comment.
1390 (linux_wait_1): Prevent clobbering exec event status.
1391 (linux_supports_exec_events): New function.
1392 (linux_target_ops) <supports_exec_events>: Initialize new member.
1393 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1394 new member.
1395 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1396 * server.c (report_exec_events): New global variable.
1397 (handle_query): Handle qSupported query for exec-events feature.
1398 (captured_main): Initialize report_exec_events.
1399 * server.h (report_exec_events): Declare new global variable.
1400 * target.h (struct target_ops) <supports_exec_events>: New
1401 member.
1402 (target_supports_exec_events): New macro.
1403 * win32-low.c (win32_target_ops) <supports_exec_events>:
1404 Initialize new member.
1405
0568462b
MM
14062015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1407
1408 * linux-low.c (linux_low_enable_btrace): Remove.
1409 (linux_target_ops): Replace linux_low_enable_btrace with
1410 linux_enable_btrace.
1411
39edd165
YQ
14122015-09-03 Yao Qi <yao.qi@linaro.org>
1413
1414 * linux-aarch64-low.c (aarch64_insert_point): Call
1415 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1416 returns true.
1417
1db33b5a
UW
14182015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1419
1420 * linux-low.c (check_stopped_by_breakpoint): Use
1421 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1422
ab290430
PA
14232015-08-27 Pedro Alves <palves@redhat.com>
1424
1425 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1426
8d749320
SM
14272015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1428
6711b7f8
SM
1429 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1430 the XNEW-family equivalent.
8d749320
SM
1431 (compile_bytecodes): Likewise.
1432 * dll.c (loaded_dll): Likewise.
1433 * event-loop.c (append_callback_event): Likewise.
1434 (create_file_handler): Likewise.
1435 (create_file_event): Likewise.
1436 * hostio.c (handle_open): Likewise.
1437 * inferiors.c (add_thread): Likewise.
1438 (add_process): Likewise.
1439 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1440 * linux-arm-low.c (arm_new_process): Likewise.
1441 (arm_new_thread): Likewise.
1442 * linux-low.c (add_to_pid_list): Likewise.
1443 (linux_add_process): Likewise.
1444 (handle_extended_wait): Likewise.
1445 (add_lwp): Likewise.
1446 (enqueue_one_deferred_signal): Likewise.
1447 (enqueue_pending_signal): Likewise.
1448 (linux_resume_one_lwp_throw): Likewise.
1449 (linux_resume_one_thread): Likewise.
1450 (linux_read_memory): Likewise.
1451 (linux_write_memory): Likewise.
1452 * linux-mips-low.c (mips_linux_new_process): Likewise.
1453 (mips_linux_new_thread): Likewise.
1454 (mips_add_watchpoint): Likewise.
1455 * linux-x86-low.c (initialize_low_arch): Likewise.
1456 * lynx-low.c (lynx_add_process): Likewise.
1457 * mem-break.c (set_raw_breakpoint_at): Likewise.
1458 (set_breakpoint): Likewise.
1459 (add_condition_to_breakpoint): Likewise.
1460 (add_commands_to_breakpoint): Likewise.
1461 (clone_agent_expr): Likewise.
1462 (clone_one_breakpoint): Likewise.
1463 * regcache.c (new_register_cache): Likewise.
1464 * remote-utils.c (look_up_one_symbol): Likewise.
1465 * server.c (queue_stop_reply): Likewise.
1466 (start_inferior): Likewise.
1467 (queue_stop_reply_callback): Likewise.
1468 (handle_target_event): Likewise.
1469 * spu-low.c (fetch_ppc_memory): Likewise.
1470 (store_ppc_memory): Likewise.
1471 * target.c (set_target_ops): Likewise.
1472 * thread-db.c (thread_db_load_search): Likewise.
1473 (try_thread_db_load_1): Likewise.
1474 * tracepoint.c (add_tracepoint): Likewise.
1475 (add_tracepoint_action): Likewise.
1476 (create_trace_state_variable): Likewise.
1477 (cmd_qtdpsrc): Likewise.
1478 (cmd_qtro): Likewise.
1479 (add_while_stepping_state): Likewise.
1480 * win32-low.c (child_add_thread): Likewise.
1481 (get_image_name): Likewise.
1482
ed8b7b42
YQ
14832015-08-25 Yao Qi <yao.qi@linaro.org>
1484
1485 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1486
db3cb7cb
YQ
14872015-08-25 Yao Qi <yao.qi@linaro.org>
1488
1489 * Makefile.in (aarch64-linux.o): New rule.
1490 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1491 srv_tgtobj.
1492 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1493 (aarch64_init_debug_reg_state): Make it extern.
1494 (aarch64_linux_prepare_to_resume): Remove.
1495
f6011a1c
YQ
14962015-08-25 Yao Qi <yao.qi@linaro.org>
1497
1498 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1499 lwp_arch_private_info and ptid_of_lwp.
1500
88e2cf7e
YQ
15012015-08-25 Yao Qi <yao.qi@linaro.org>
1502
1503 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1504 Find proc_info by find_process_pid. All callers updated.
1505
5e35436e
YQ
15062015-08-25 Yao Qi <yao.qi@linaro.org>
1507
1508 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1509 Remove.
1510 (debug_reg_change_callback): Remove.
1511 (aarch64_notify_debug_reg_change): Remove.
1512
4a8a7965
YQ
15132015-08-25 Yao Qi <yao.qi@linaro.org>
1514
1515 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1516 Call current_lwp_ptid.
1517
32a271ee
YQ
15182015-08-25 Yao Qi <yao.qi@linaro.org>
1519
1520 * linux-aarch64-low.c (debug_reg_change_callback): Use
1521 debug_printf.
1522
0d51c8d7
YQ
15232015-08-25 Yao Qi <yao.qi@linaro.org>
1524
1525 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1526
31a43dd5
YQ
15272015-08-25 Yao Qi <yao.qi@linaro.org>
1528
1529 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1530
8ee52567
YQ
15312015-08-25 Yao Qi <yao.qi@linaro.org>
1532
1533 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1534 the code.
1535
ff3f0f45
YQ
15362015-08-25 Yao Qi <yao.qi@linaro.org>
1537
1538 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1539 Remove.
1540 (debug_reg_change_callback): Remove argument entry and add argument
1541 lwp. Remove local variable thread. Don't print thread id in the
1542 debugging output. Don't check whether pid of thread equals to pid.
1543 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1544 iterate_over_lwps instead find_inferior.
1545
3d40fbb5
PA
15462015-08-24 Pedro Alves <palves@redhat.com>
1547
1548 * inferiors.c (get_first_process): New function.
1549 * inferiors.h (get_first_process): New declaration.
1550 * remote-utils.c (read_ptid): Default to the first process in the
1551 list, instead of to the current thread's process.
1552
438e1e42
PA
15532015-08-24 Pedro Alves <palves@redhat.com>
1554
1555 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1556 * event-loop.c: Likewise.
1557 * remote-utils.c: Likewise.
1558 * tracepoint.c: Likewise.
1559
a8c6d4fc
PA
15602015-08-24 Pedro Alves <palves@redhat.com>
1561
1562 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1563 ptid_get_lwp.
1564
99b0bb12
PA
15652015-08-21 Pedro Alves <palves@redhat.com>
1566
1567 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1568 instead of literal 1.
1569
f8904751
PA
15702015-08-21 Pedro Alves <palves@redhat.com>
1571
1572 * tdesc.c (default_description): Explicitly zero-initialize.
1573
465a859e
PA
15742015-08-21 Pedro Alves <palves@redhat.com>
1575
1576 PR gdb/18749
1577 * inferiors.c (remove_thread): Discard any pending stop reply for
1578 this thread.
1579 * server.c (remove_all_on_match_pid): Rename to ...
1580 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1581 instead of a pid.
1582 (discard_queued_stop_replies): Change parameter to a ptid. Now
1583 extern.
1584 (handle_v_kill, kill_inferior_callback, captured_main)
1585 (process_serial_event): Adjust.
1586 * server.h (discard_queued_stop_replies): Declare.
1587
f0db101d
PA
15882015-08-21 Pedro Alves <palves@redhat.com>
1589
1590 * linux-low.c (wait_for_sigstop): Always switch to no thread
1591 selected if the previously current thread dies.
1592 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1593 process instead of the current thread's.
1594 * remote-utils.c (input_interrupt): Don't check if there's no
1595 current thread.
1596 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1597 current thread to the general thread fails, error out.
1598 (handle_qxfer_auxv, handle_qxfer_libraries)
1599 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1600 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1601 (handle_query): Check if there's a thread selected instead of
1602 checking whether there's any thread in the thread list.
1603 (handle_qxfer_threads, handle_qxfer_btrace)
1604 (handle_qxfer_btrace_conf): Don't error out early if there's no
1605 thread in the thread list.
1606 (handle_v_cont, myresume): Don't set the current thread to the
1607 continue thread.
1608 (process_serial_event) <Hg handling>: Also set thread_id if the
1609 previous general thread is still alive.
1610 (process_serial_event) <g/G handling>: If setting the current
1611 thread to the general thread fails, error out.
1612 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1613 thread's lwp instead of the current thread's.
1614 * target.c (set_desired_thread): If the desired thread was not
1615 found, leave the current thread pointing to NULL. Return an int
1616 (boolean) indicating success.
1617 * target.h (set_desired_thread): Change return type to int.
1618
40045d91
MF
16192015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1620
1621 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1622 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1623 #includes.
1624 (ps_get_thread_area): New function.
1625
45face3b
GB
16262015-08-19 Gary Benson <gbenson@redhat.com>
1627
1628 * hostio.c (handle_pread): Do not attempt to read more data
1629 than hostio_reply_with_data can fit in a packet.
1630
16d5f642
JB
16312015-08-18 Joel Brobecker <brobecker@adacore.com>
1632
1633 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1634
a738da3a
MF
16352015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1636
1637 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1638
33ebda9d
PA
16392015-08-06 Pedro Alves <palves@redhat.com>
1640
1641 * tracepoint.c (expr_eval_result): Now an int.
1642
a44892be
PA
16432015-08-06 Pedro Alves <palves@redhat.com>
1644
1645 * gdbthread.h (struct regcache): Forward declare.
1646 (struct thread_info) <regcache_data>: Now a struct regcache
1647 pointer.
1648 * inferiors.c (inferior_regcache_data)
1649 (set_inferior_regcache_data): Now work with struct regcache
1650 pointers.
1651 * inferiors.h (struct regcache): Forward declare.
1652 (inferior_regcache_data, set_inferior_regcache_data): Now work
1653 with struct regcache pointers.
1654 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1655 (free_register_cache_thread): Remove struct regcache pointer
1656 casts.
1657
608a1e46
PA
16582015-08-06 Pedro Alves <palves@redhat.com>
1659
1660 * server.c (captured_main): On error, print the exception message
1661 to stderr, and if run_once is set, throw a quit.
1662
f0ce0d3a
PA
16632015-08-06 Pedro Alves <palves@redhat.com>
1664
1665 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1666 the current thread.
1667
bf47e248
PA
16682015-08-06 Pedro Alves <palves@redhat.com>
1669
1670 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1671 reading beyond the passed in buffer length.
1672
b6b9ffcc
PL
16732015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1674
1675 * tracepoint.c (symbol_list) <required>: Remove.
1676
863d01bd
PA
16772015-08-06 Pedro Alves <palves@redhat.com>
1678
1679 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1680 count if stopping and suspending threads.
1681 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1682 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1683 (linux_detach): Complete an ongoing step-over.
1684 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1685 throughout.
1686 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1687 (linux_wait_1): If passing a signal to the inferior after
1688 finishing a step-over, unsuspend and re-resume all lwps. If we
1689 see a single-step event but the thread should be continuing, don't
1690 pass the trap to gdb.
1691 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1692 internal_error instead of gdb_assert.
1693 (enqueue_pending_signal): New function.
1694 (check_ptrace_stopped_lwp_gone): Add debug output.
1695 (start_step_over): Use internal_error instead of gdb_assert.
1696 (complete_ongoing_step_over): New function.
1697 (linux_resume_one_thread): Don't resume a suspended thread.
1698 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1699 it stepping.
1700
00db26fa
PA
17012015-08-06 Pedro Alves <palves@redhat.com>
1702
1703 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1704 (linux_thread_alive): Use lwp_is_marked_dead.
1705 (extended_event_reported): Delete.
1706 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1707 instead of extended_event_reported.
1708 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1709 as well.
1710 (lwp_is_marked_dead): New function.
1711 (lwp_running): Use lwp_is_marked_dead.
1712 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1713 comment.
1714
ad071a30
PA
17152015-08-06 Pedro Alves <palves@redhat.com>
1716
1717 * linux-low.c (linux_wait_1): Move fork event output out of the
1718 !report_to_gdb check. Pass event_child->waitstatus to
1719 target_waitstatus_to_string instead of ourstatus.
1720
524b57e6
YQ
17212015-08-04 Yao Qi <yao.qi@linaro.org>
1722
1723 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1724 if current_thread is 32 bit.
1725
6085d6f6
YQ
17262015-08-04 Yao Qi <yao.qi@linaro.org>
1727
1728 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1729 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1730 * server.c (extended_protocol): Remove "static".
1731 * server.h (extended_protocol): Declare it.
1732
8a7e4587
YQ
17332015-08-04 Yao Qi <yao.qi@linaro.org>
1734
1735 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1736 both aarch64 and aarch32.
1737 (aarch64_set_pc): Likewise.
1738
3b53ae99
YQ
17392015-08-04 Yao Qi <yao.qi@linaro.org>
1740
1741 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1742 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1743 arm-with-neon.xml to srv_xmlfiles.
1744 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1745 (is_64bit_tdesc): New function.
1746 (aarch64_linux_read_description): New function.
1747 (aarch64_arch_setup): Call aarch64_linux_read_description.
1748 (regs_info): Rename to regs_info_aarch64.
1749 (aarch64_regs_info): Return right regs_info.
1750 (initialize_low_arch): Call initialize_low_arch_aarch32.
1751
bd9e6534
YQ
17522015-08-04 Yao Qi <yao.qi@linaro.org>
1753
1754 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1755 * linux-aarch32-low.c: New file.
1756 * linux-aarch32-low.h: New file.
1757 * linux-arm-low.c (arm_fill_gregset): Move it to
1758 linux-aarch32-low.c.
1759 (arm_store_gregset): Likewise.
1760 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1761 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1762 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1763 (regs_info): Rename to regs_info_arm.
1764 (arm_regs_info): Return regs_info_aarch32 if
1765 have_ptrace_getregset is 1 and target description is
1766 arm_with_neon or arm_with_vfpv3.
1767 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1768 Call initialize_low_arch_aarch32 instead.
1769
ded48a5e
YQ
17702015-08-04 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1773 * linux-low.c: ... here.
1774 * linux-low.h (have_ptrace_getregset): Declare it.
1775
96e9210f
PA
17762015-08-04 Pedro Alves <palves@redhat.com>
1777
1778 * thread-db.c (struct thread_db): Use new typedefs.
1779 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1780 CHK calls.
1781 (disable_thread_event_reporting): Cast result of dlsym to
1782 destination function pointer type.
1783 (thread_db_mourn): Use td_ta_delete_ftype.
1784
af60a1ef
SL
17852015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1786
1787 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1788 arch variant.
1789 (CDX_BREAKPOINT): Define for R2.
1790 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1791 (the_low_target): Add comments.
1792
e8b41681
YQ
17932015-07-30 Yao Qi <yao.qi@linaro.org>
1794
1795 * linux-arm-low.c (arm_hwcap): Remove it.
1796 (arm_read_description): New local variable arm_hwcap. Don't
1797 set arm_hwcap to zero.
1798
89abb039
YQ
17992015-07-30 Yao Qi <yao.qi@linaro.org>
1800
1801 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1802 Use regcache->tdesc instead.
1803 (arm_store_wmmxregset): Likewise.
1804 (arm_fill_vfpregset): Likewise.
1805 (arm_store_vfpregset): Likewise.
1806
deca266c
YQ
18072015-07-30 Yao Qi <yao.qi@linaro.org>
1808
1809 * linux-arm-low.c: Include arch/arm.h.
1810 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1811 (arm_store_gregset): Likewise.
1812
aa58a496
SM
18132015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1814
1815 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1816 ptrace's 4th parameter.
1817
50904b25
YQ
18182015-07-27 Yao Qi <yao.qi@linaro.org>
1819
1820 * configure.srv (case aarch64*-*-linux*): Don't set
1821 srv_linux_usrregs.
1822
5826e159
PA
18232015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1824
1825 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1826 sys/ptrace.h.
1827 * linux-arm-low.c: Likewise.
1828 * linux-cris-low.c: Likewise.
1829 * linux-crisv32-low.c: Likewise.
1830 * linux-low.c: Likewise.
1831 * linux-m68k-low.c: Likewise.
1832 * linux-mips-low.c: Likewise.
1833 * linux-nios2-low.c: Likewise.
1834 * linux-s390-low.c: Likewise.
1835 * linux-sparc-low.c: Likewise.
1836 * linux-tic6x-low.c: Likewise.
1837 * linux-tile-low.c: Likewise.
1838 * linux-x86-low.c: Likewise.
1839
54019719
PA
18402015-07-24 Pedro Alves <palves@redhat.com>
1841
1842 * config.in: Regenerate.
1843 * configure: Regenerate.
1844
eb7aa561
PA
18452015-07-24 Pedro Alves <palves@redhat.com>
1846
1847 * acinclude.m4: Include ../ptrace.m4.
1848 * configure.ac: Call GDB_AC_PTRACE.
1849 * config.in, configure: Regenerate.
1850
55d7b841
YQ
18512015-07-24 Yao Qi <yao.qi@linaro.org>
1852
1853 * linux-low.c (linux_create_inferior): Remove setting to
1854 proc->priv->new_inferior.
1855 (linux_attach): Likewise.
1856 (linux_low_filter_event): Likewise.
1857 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1858
c06cbd92
YQ
18592015-07-24 Yao Qi <yao.qi@linaro.org>
1860
1861 * linux-low.c (linux_arch_setup): New function.
1862 (linux_low_filter_event): If proc->tdesc is NULL and
1863 proc->attached is true, call the_low_target.arch_setup.
1864 Otherwise, keep status pending, and return.
1865 (linux_resume_one_lwp_throw): Don't call get_pc if
1866 thread->while_stepping isn't NULL. Don't call
1867 get_thread_regcache if proc->tdesc is NULL.
1868 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1869 (linux_target_ops): Install arch_setup.
1870 * server.c (start_inferior): Call the_target->arch_setup.
1871 * target.h (struct target_ops) <arch_setup>: New field.
1872 (target_arch_setup): New marco.
1873 * lynx-low.c (lynx_target_ops): Update.
1874 * nto-low.c (nto_target_ops): Update.
1875 * spu-low.c (spu_target_ops): Update.
1876 * win32-low.c (win32_target_ops): Update.
1877
5ae3ebba
YQ
18782015-07-24 Yao Qi <yao.qi@linaro.org>
1879
1880 * linux-low.c (linux_add_process): Don't set
1881 proc->priv->new_inferior.
1882 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1883 (linux_attach): Likewise.
1884
eb97750b
YQ
18852015-07-24 Yao Qi <yao.qi@linaro.org>
1886
1887 * server.c (start_inferior): Code refactor.
1888
51aee833
YQ
18892015-07-24 Yao Qi <yao.qi@linaro.org>
1890
1891 * server.c (process_serial_event): Set general_thread.
1892
af1b22f3
YQ
18932015-07-21 Yao Qi <yao.qi@linaro.org>
1894
1895 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1896 aarch64_linux_get_debug_reg_capacity.
1897
554717a3
YQ
18982015-07-17 Yao Qi <yao.qi@linaro.org>
1899
1900 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1901 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1902 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1903 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1904 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1905 (AARCH64_HWP_ALIGNMENT): Likewise.
1906 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1907 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1908 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1909 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1910 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1911 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1912 (struct aarch64_debug_reg_state): Likewise.
1913 (struct arch_lwp_info): Likewise.
1914 (aarch64_align_watchpoint): Likewise.
1915 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1916 (aarch64_watchpoint_length): Likewise.
1917 (aarch64_point_encode_ctrl_reg): Likewise
1918 (aarch64_point_is_aligned): Likewise.
1919 (aarch64_align_watchpoint): Likewise.
1920 (aarch64_linux_set_debug_regs):
1921 (aarch64_dr_state_insert_one_point): Likewise.
1922 (aarch64_dr_state_remove_one_point): Likewise.
1923 (aarch64_handle_breakpoint): Likewise.
1924 (aarch64_handle_aligned_watchpoint): Likewise.
1925 (aarch64_handle_unaligned_watchpoint): Likewise.
1926 (aarch64_handle_watchpoint): Likewise.
1927
c67ca4de
YQ
19282015-07-17 Yao Qi <yao.qi@linaro.org>
1929
1930 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1931 and don't aarch64_get_debug_reg_state. All callers update.
1932 (aarch64_handle_aligned_watchpoint): Likewise.
1933 (aarch64_handle_unaligned_watchpoint): Likewise.
1934 (aarch64_handle_watchpoint): Likewise.
1935 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1936 (aarch64_remove_point): Likewise.
1937
25abf979
YQ
19382015-07-17 Yao Qi <yao.qi@linaro.org>
1939
1940 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1941 debug_printf.
1942 (aarch64_handle_unaligned_watchpoint): Likewise.
1943
db1ff28b
JK
19442015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1945
1946 Revert the previous 3 commits:
1947 Move gdb_regex* to common/
1948 Move linux_find_memory_regions_full & co.
1949 gdbserver build-id attribute generator
1950
700ca40f
JK
19512015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1952 Jan Kratochvil <jan.kratochvil@redhat.com>
1953
1954 gdbserver build-id attribute generator.
1955 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1956 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1957 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1958 (find_phdr): New.
1959 (get_dynamic): Use find_pdhr to traverse program headers.
1960 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1961 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1962 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1963 (get_hex_build_id): New.
1964 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1965 to reply XML document.
1966
9904185c
JK
19672015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1968 Jan Kratochvil <jan.kratochvil@redhat.com>
1969
1970 * target.c: Include target/target-utils.h and fcntl.h.
1971 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1972 (target_fileio_read_stralloc): New functions.
1973
6e5b4429
JK
19742015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1975
1976 * Makefile.in (OBS): Add gdb_regex.o.
1977 (gdb_regex.o): New.
1978 * config.in: Rebuilt.
1979 * configure: Rebuilt.
1980
ddc98fbf
JK
19812015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1982 Jan Kratochvil <jan.kratochvil@redhat.com>
1983
1984 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1985 * Makefile.in (OBS): Add target-utils.o.
1986 (linux-maps.o, target-utils.o): New.
1987 * configure.srv (srv_linux_obj): Add linux-maps.o.
1988
e57bb7a0
PL
19892015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1990
1991 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1992 function, return 1.
1993 (the_low_target): Install it.
1994
586b02a9
PA
19952015-07-14 Pedro Alves <palves@redhat.com>
1996
1997 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1998 Instead, ignore ECHILD, and throw an error for other errnos.
1999
58c1b36c
PA
20002015-07-10 Pedro Alves <palves@redhat.com>
2001
2002 * event-loop.c (struct callback_event) <data>: Change type to
2003 gdb_client_data instance instead of gdb_client_data pointer.
2004 (append_callback_event): Adjust.
2005
421530db
PL
20062015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2007
2008 * linux-aarch64-low.c: Add comments for each linux_target_ops
2009 method. Remove comments already covered in target_ops and
2010 linux_target_ops definitions.
2011 (the_low_target): Add comments for each unimplemented method.
2012
c2d65f38
YQ
20132015-07-09 Yao Qi <yao.qi@linaro.org>
2014
2015 * linux-aarch64-low.c (aarch64_regmap): Remove.
2016 (aarch64_usrregs_info): Remove.
2017 (regs_info): Set field usrregs to NULL.
2018
b20a6524
MM
20192015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2020
2021 * linux-low.c: Include "rsp-low.h"
2022 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2023 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2024 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2025 (handle_btrace_enable_pt): New.
2026 (handle_btrace_general_set): Support "pt".
2027 (handle_btrace_conf_general_set): Support "pt:size".
2028
96c97461
PL
20292015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2030
2031 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2032 Z_PACKET_SW_BP.
2033
37d66942
PL
20342015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2035
2036 * linux-aarch64-low.c: Remove comment about endianness.
2037 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2038 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2039 memcmp.
2040
dc06243f
GB
20412015-06-24 Gary Benson <gbenson@redhat.com>
2042
2043 * linux-i386-ipa.c (stdint.h): Do not include.
2044 * lynx-i386-low.c (stdint.h): Likewise.
2045 * lynx-ppc-low.c (stdint.h): Likewise.
2046 * mem-break.c (stdint.h): Likewise.
2047 * thread-db.c (stdint.h): Likewise.
2048 * tracepoint.c (stdint.h): Likewise.
2049 * win32-low.c (stdint.h): Likewise.
2050
124e13d9
SM
20512015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2052
2053 * server.c (write_qxfer_response): Update call to
2054 remote_escape_output.
2055
909c2cda
JK
20562015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2057 Jan Kratochvil <jan.kratochvil@redhat.com>
2058
2059 Merge multiple hex conversions.
2060 * gdbreplay.c (tohex): Rename to 'fromhex'.
2061 (logchar): Use fromhex.
2062
24c05f46
JK
20632015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2064
2065 * server.c (handle_qxfer_libraries): Set `version' attribute for
2066 <library-list>.
2067
14d2069a
GB
20682015-06-10 Gary Benson <gbenson@redhat.com>
2069
2070 * target.h (struct target_ops) <multifs_open>: New field.
2071 <multifs_unlink>: Likewise.
2072 <multifs_readlink>: Likewise.
2073 * linux-low.c (nat/linux-namespaces.h): New include.
2074 (linux_target_ops): Initialize the_target->multifs_open,
2075 the_target->multifs_unlink and the_target->multifs_readlink.
2076 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2077 * hostio.c (hostio_fs_pid): New static variable.
2078 (hostio_handle_new_gdb_connection): New function.
2079 (handle_setfs): Likewise.
2080 (handle_open): Use the_target->multifs_open as appropriate.
2081 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2082 (handle_readlink): Use the_target->multifs_readlink as
2083 appropriate.
2084 (handle_vFile): Handle vFile:setfs packets.
2085 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2086 after target_handle_new_gdb_connection.
2087
4b8b5e72
GB
20882015-06-10 Gary Benson <gbenson@redhat.com>
2089
2090 * configure.ac (AC_CHECK_FUNCS): Add setns.
2091 * config.in: Regenerate.
2092 * configure: Likewise.
2093 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2094 (linux-namespaces.o): New rule.
2095 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2096
3ac2e371
GB
20972015-06-09 Gary Benson <gbenson@redhat.com>
2098
2099 * hostio.c (handle_open): Process mode argument with
2100 fileio_to_host_mode.
2101
ca9b78ce
YQ
21022015-06-01 Yao Qi <yao.qi@linaro.org>
2103
2104 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2105 * linux-x86-low.c: Likewise.
2106
bfacd19d
DB
21072015-05-28 Don Breazeal <donb@codesourcery.com>
2108
2109 * linux-low.c (handle_extended_wait): Initialize
2110 thread_info.last_resume_kind for new fork children.
2111
452003ef
PA
21122015-05-15 Pedro Alves <palves@redhat.com>
2113
2114 * target.h (target_handle_new_gdb_connection): Rewrite using if
2115 wrapped in do/while.
2116
1041a03c
JB
21172015-05-14 Joel Brobecker <brobecker@adacore.com>
2118
2119 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2120 * configure, config.in: Regenerate.
2121 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2122 Declare typedef.
2123
c269dbdb
DB
21242015-05-12 Don Breazeal <donb@codesourcery.com>
2125
2126 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2127 PTRACE_EVENT_VFORK_DONE.
2128 (linux_low_ptrace_options, extended_event_reported): Add vfork
2129 events.
2130 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2131 and "vforkdone" for RSP 'T' Stop Reply Packet.
2132 * server.h (report_vfork_events): Declare
2133 global variable.
2134
3a8a0396
DB
21352015-05-12 Don Breazeal <donb@codesourcery.com>
2136
2137 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2138 (the_low_target) <new_fork>: Initialize new member.
2139 * linux-arm-low.c (arm_new_fork): New function.
2140 (the_low_target) <new_fork>: Initialize new member.
2141 * linux-low.c (handle_extended_wait): Call new target function
2142 new_fork.
2143 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2144 * linux-mips-low.c (mips_add_watchpoint): New function
2145 extracted from mips_insert_point.
2146 (the_low_target) <new_fork>: Initialize new member.
2147 (mips_linux_new_fork): New function.
2148 (mips_insert_point): Call mips_add_watchpoint.
2149 * linux-x86-low.c (x86_linux_new_fork): New function.
2150 (the_low_target) <new_fork>: Initialize new member.
2151
de0d863e
DB
21522015-05-12 Don Breazeal <donb@codesourcery.com>
2153
2154 * linux-low.c (handle_extended_wait): Implement return value,
2155 rename argument 'event_child' to 'event_lwp', handle
2156 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2157 (linux_low_ptrace_options): New function.
2158 (linux_low_filter_event): Call linux_low_ptrace_options,
2159 use different argument fo linux_enable_event_reporting,
2160 use return value from handle_extended_wait.
2161 (extended_event_reported): New function.
2162 (linux_wait_1): Call extended_event_reported and set
2163 status to report fork events.
2164 (linux_write_memory): Add pid to debug message.
2165 (reset_lwp_ptrace_options_callback): New function.
2166 (linux_handle_new_gdb_connection): New function.
2167 (linux_target_ops): Initialize new structure member.
2168 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2169 * lynx-low.c: Initialize new structure member.
2170 * remote-utils.c (prepare_resume_reply): Implement stop reason
2171 "fork" for "T" stop message.
2172 * server.c (handle_query): Call handle_new_gdb_connection.
2173 * server.h (report_fork_events): Declare global flag.
2174 * target.h (struct target_ops) <handle_new_gdb_connection>:
2175 New member.
2176 (target_handle_new_gdb_connection): New macro.
2177 * win32-low.c: Initialize new structure member.
2178
ddcbc397
DB
21792015-05-12 Don Breazeal <donb@codesourcery.com>
2180
2181 * mem-break.c (APPEND_TO_LIST): Define macro.
2182 (clone_agent_expr): New function.
2183 (clone_one_breakpoint): New function.
2184 (clone_all_breakpoints): New function.
2185 * mem-break.h: Declare new functions.
2186
89245bc0
DB
21872015-05-12 Don Breazeal <donb@codesourcery.com>
2188
2189 * linux-low.c (linux_supports_fork_events): New function.
2190 (linux_supports_vfork_events): New function.
2191 (linux_target_ops): Initialize new structure members.
2192 (initialize_low): Call linux_check_ptrace_features.
2193 * lynx-low.c (lynx_target_ops): Initialize new structure
2194 members.
2195 * server.c (report_fork_events, report_vfork_events):
2196 New global flags.
2197 (handle_query): Add new features to qSupported packet and
2198 response.
2199 (captured_main): Initialize new global variables.
2200 * target.h (struct target_ops) <supports_fork_events>:
2201 New member.
2202 <supports_vfork_events>: New member.
2203 (target_supports_fork_events): New macro.
2204 (target_supports_vfork_events): New macro.
2205 * win32-low.c (win32_target_ops): Initialize new structure
2206 members.
2207
835205d0
GB
22082015-05-12 Gary Benson <gbenson@redhat.com>
2209
2210 * server.c (handle_qxfer_exec_file): Use current process
2211 if annex is empty.
2212
21e94bd9
SL
22132015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2214
2215 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2216 Remove HAVE_PTRACE_GETREGS conditionals.
2217 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2218 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2219
45614f15
YQ
22202015-05-08 Yao Qi <yao.qi@linaro.org>
2221
2222 * linux-low.c (linux_supports_conditional_breakpoints): New
2223 function.
2224 (linux_target_ops): Install new target method.
2225 * lynx-low.c (lynx_target_ops): Install NULL hook for
2226 supports_conditional_breakpoints.
2227 * nto-low.c (nto_target_ops): Likewise.
2228 * spu-low.c (spu_target_ops): Likewise.
2229 * win32-low.c (win32_target_ops): Likewise.
2230 * server.c (handle_query): Check
2231 target_supports_conditional_breakpoints.
2232 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2233 New field.
2234 (target_supports_conditional_breakpoints): New macro.
2235
80ad801e
PA
22362015-05-06 Pedro Alves <palves@redhat.com>
2237
2238 PR server/18081
2239 * server.c (start_inferior): If the process exits, mourn it.
2240
819843c7
GB
22412015-04-21 Gary Benson <gbenson@redhat.com>
2242
2243 * hostio.c (fileio_open_flags_to_host): Factored out to
2244 fileio_to_host_openflags in common/fileio.c. Single use
2245 updated.
2246
a2d5a9d7
MF
22472015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2248
2249 * linux-xtensa-low.c (xtensa_fill_gregset)
2250 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2251 XCHAL_HAVE_LOOP.
2252
deb44829
MF
22532015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2254
2255 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2256 (regs_info): Replace usrregs pointer with NULL.
2257
e57f1de3
GB
22582015-04-17 Gary Benson <gbenson@redhat.com>
2259
2260 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2261 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2262 * server.c (handle_qxfer_exec_file): New function.
2263 (qxfer_packets): Add exec-file entry.
2264 (handle_query): Report qXfer:exec-file:read as supported packet.
2265
62828379
RN
22662015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2267
2268 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2269
b88bb450
GB
22702015-04-09 Gary Benson <gbenson@redhat.com>
2271
2272 * hostio-errno.c (errno_to_fileio_error): Remove function.
2273 Update caller to use remote_fileio_to_fio_error.
2274
c8f4bfdd
YQ
22752015-04-09 Yao Qi <yao.qi@linaro.org>
2276
2277 * linux-low.c (linux_insert_point): Call
2278 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2279 (linux_remove_point): Call remove_memory_breakpoint if type is
2280 raw_bkpt_type_sw.
2281 * linux-x86-low.c (x86_insert_point): Don't call
2282 insert_memory_breakpoint.
2283 (x86_remove_point): Don't call remove_memory_breakpoint.
2284
41f98f02
PA
22852015-04-01 Pedro Alves <palves@redhat.com>
2286 Cleber Rosa <crosa@redhat.com>
2287
2288 * server.c (gdbserver_usage): Reorganize and extend the usage
2289 message.
2290
2bf6fb9d
PA
22912015-03-24 Pedro Alves <palves@redhat.com>
2292
2293 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2294 output. Also dump TRAP_TRACE.
2295 (linux_low_filter_event): In debug output, distinguish a
2296 resume_stop SIGSTOP from a delayed SIGSTOP.
2297
369f6daa
GB
22982015-03-24 Gary Benson <gbenson@redhat.com>
2299
2300 * linux-x86-low.c (x86_linux_new_thread): Moved to
2301 nat/x86-linux.c.
2302 (x86_linux_prepare_to_resume): Likewise.
2303
8e5d4070
GB
23042015-03-24 Gary Benson <gbenson@redhat.com>
2305
2306 * Makefile.in (x86-linux-dregs.o): New rule.
2307 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2308 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2309 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2310 (x86_linux_dr_get): Likewise.
2311 (x86_linux_dr_set): Likewise.
2312 (update_debug_registers_callback): Likewise.
2313 (x86_linux_dr_set_addr): Likewise.
2314 (x86_linux_dr_get_addr): Likewise.
2315 (x86_linux_dr_set_control): Likewise.
2316 (x86_linux_dr_get_control): Likewise.
2317 (x86_linux_dr_get_status): Likewise.
2318 (x86_linux_update_debug_registers): Likewise.
2319
2b95d440
GB
23202015-03-24 Gary Benson <gbenson@redhat.com>
2321
2322 * linux-x86-low.c (x86_linux_update_debug_registers):
2323 New function, factored out from...
2324 (x86_linux_prepare_to_resume): ...this.
2325
14b0bc68
GB
23262015-03-24 Gary Benson <gbenson@redhat.com>
2327
2328 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2329 (x86_linux_dr_set): Likewise.
2330 (update_debug_registers_callback): Likewise.
2331 (x86_linux_dr_set_addr): Likewise.
2332 (x86_linux_dr_get_addr): Likewise.
2333 (x86_linux_dr_set_control): Likewise.
2334 (x86_linux_dr_get_control): Likewise.
2335 (x86_linux_dr_get_status): Likewise.
2336 (x86_linux_prepare_to_resume): Likewise.
2337
5dfe6ca8
GB
23382015-03-24 Gary Benson <gbenson@redhat.com>
2339
2340 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2341 Use perror_with_name. Pass string through gettext.
2342 (x86_linux_dr_set): Likewise.
2343
d33472ad
GB
23442015-03-24 Gary Benson <gbenson@redhat.com>
2345
2346 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2347 (x86_linux_dr_set_addr): ...this.
2348 (x86_dr_low_get_addr): Rename to...
2349 (x86_linux_dr_get_addr): ...this.
2350 (x86_dr_low_set_control): Rename to...
2351 (x86_linux_dr_set_control): ...this.
2352 (x86_dr_low_get_control): Rename to...
2353 (x86_linux_dr_get_control): ...this.
2354 (x86_dr_low_get_status): Rename to...
2355 (x86_linux_dr_get_status): ...this.
2356 (x86_dr_low): Update with new function names.
2357
4b134ca1
GB
23582015-03-24 Gary Benson <gbenson@redhat.com>
2359
2360 * Makefile.in (x86-linux.o): New rule.
2361 * configure.srv: Add x86-linux.o to relevant targets.
2362 * linux-low.c (lwp_set_arch_private_info): New function.
2363 (lwp_arch_private_info): Likewise.
2364 * linux-x86-low.c: Include nat/x86-linux.h.
2365 (arch_lwp_info): Removed structure.
2366 (update_debug_registers_callback):
2367 Use lwp_set_debug_registers_changed.
2368 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2369 and lwp_set_debug_registers_changed.
2370 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2371
34c703da
GB
23722015-03-24 Gary Benson <gbenson@redhat.com>
2373
2374 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2375 * linux-arm-low.c (arm_new_thread): Likewise.
2376 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2377 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2378 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2379 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2380
cff068da
GB
23812015-03-24 Gary Benson <gbenson@redhat.com>
2382
2383 * linux-low.c (ptid_of_lwp): New function.
2384 (lwp_is_stopped): Likewise.
2385 (lwp_stop_reason): Likewise.
2386 * linux-x86-low.c (update_debug_registers_callback):
2387 Use lwp_is_stopped.
2388 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2389 lwp_stop_reason.
2390
b2f7c7e8
GB
23912015-03-24 Gary Benson <gbenson@redhat.com>
2392
2393 * linux-low.h (linux_stop_lwp): Remove declaration.
2394
6d4ee8c6
GB
23952015-03-24 Gary Benson <gbenson@redhat.com>
2396
2397 * linux-low.h: Include nat/linux-nat.h.
2398 * linux-low.c (iterate_over_lwps_args): New structure.
2399 (iterate_over_lwps_filter): New function.
2400 (iterate_over_lwps): Likewise.
2401 * linux-x86-low.c (update_debug_registers_callback):
2402 Update signature to what iterate_over_lwps expects.
2403 Remove PID check that iterate_over_lwps now performs.
2404 (x86_dr_low_set_addr): Use iterate_over_lwps.
2405 (x86_dr_low_set_control): Likewise.
2406
70a0bb6b
GB
24072015-03-24 Gary Benson <gbenson@redhat.com>
2408
2409 * linux-x86-low.c (x86_debug_reg_state): New function.
2410 (x86_linux_prepare_to_resume): Use the above.
2411
7b669087
GB
24122015-03-24 Gary Benson <gbenson@redhat.com>
2413
2414 * linux-low.c (current_lwp_ptid): New function.
2415 * linux-x86-low.c: Include nat/linux-nat.h.
2416 (x86_dr_low_get_addr): Use current_lwp_ptid.
2417 (x86_dr_low_get_control): Likewise.
2418 (x86_dr_low_get_status): Likewise.
2419
eef49a3d
PA
24202015-03-20 Pedro Alves <palves@redhat.com>
2421
2422 * tracepoint.c (cmd_qtstatus): Make "str" const.
2423
b2333d22
PA
24242015-03-20 Pedro Alves <palves@redhat.com>
2425
2426 * server.c (handle_general_set): Make "req_str" const.
2427
23f238d3
PA
24282015-03-19 Pedro Alves <palves@redhat.com>
2429
2430 * linux-low.c (linux_resume_one_lwp): Rename to ...
2431 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2432 instead call perror_with_name.
2433 (check_ptrace_stopped_lwp_gone): New function.
2434 (linux_resume_one_lwp): Reimplement as wrapper around
2435 linux_resume_one_lwp_throw that swallows errors if the LWP is
2436 gone.
2437
91baf43f
PA
24382015-03-19 Pedro Alves <palves@redhat.com>
2439
2440 * linux-low.c (count_events_callback, select_event_lwp_callback):
2441 No longer check whether the thread has resume_stop as last resume
2442 kind.
2443
8bf3b159
PA
24442015-03-19 Pedro Alves <palves@redhat.com>
2445
2446 * linux-low.c (count_events_callback, select_event_lwp_callback):
2447 Use the lwp's status_pending_p field, not the thread's.
2448
b90fc188
PA
24492015-03-19 Pedro Alves <palves@redhat.com>
2450
2451 * linux-low.c (select_event_lwp_callback): Update comments to
2452 no longer mention SIGTRAP.
2453
464b0089
GB
24542015-03-18 Gary Benson <gbenson@redhat.com>
2455
2456 * server.c (handle_query): Do not report vFile:fstat as supported.
2457
aa9e327f
GB
24582015-03-11 Gary Benson <gbenson@redhat.com>
2459
2460 * hostio.c (sys/types.h): New include.
2461 (sys/stat.h): Likewise.
2462 (common-remote-fileio.h): Likewise.
2463 (handle_fstat): New function.
2464 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2465
791c0056
GB
24662015-03-11 Gary Benson <gbenson@redhat.com>
2467
2468 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2469 struct stat.st_blocks and struct stat.st_blksize.
2470 * configure: Regenerate.
2471 * config.in: Likewise.
2472 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2473 (OBS): Add common-remote-fileio.o.
2474 (common-remote-fileio.o): New rule.
2475
9a9df970
PA
24762015-03-09 Pedro Alves <palves@redhat.com>
2477
2478 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2479 'struct sockaddr' pointer in 'accept' call.
2480
9eb1356e
PA
24812015-03-09 Pedro Alves <palves@redhat.com>
2482
2483 Revert:
2484 2015-03-07 Pedro Alves <palves@redhat.com>
2485 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2486 or <winsock2.h> here. Instead include "gdb_socket.h".
2487 (remote_open): Use union gdb_sockaddr_u.
2488 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2489 or <winsock2.h> here. Instead include "gdb_socket.h".
2490 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2491 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2492 or <sys/un.h>.
2493 (init_named_socket, gdb_agent_helper_thread): Use union
2494 gdb_sockaddr_u.
2495
aac331e4
PA
24962015-03-07 Pedro Alves <palves@redhat.com>
2497
2498 * configure.ac (build_warnings): Move
2499 -Wdeclaration-after-statement to the C-specific set.
2500 * configure: Regenerate.
2501
366c75fc
PA
25022015-03-07 Pedro Alves <palves@redhat.com>
2503
2504 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2505 or <winsock2.h> here. Instead include "gdb_socket.h".
2506 (remote_open): Use union gdb_sockaddr_u.
2507 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2508 or <winsock2.h> here. Instead include "gdb_socket.h".
2509 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2510 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2511 or <sys/un.h>.
2512 (init_named_socket, gdb_agent_helper_thread): Use union
2513 gdb_sockaddr_u.
2514
492d29ea
PA
25152015-03-07 Pedro Alves <palves@redhat.com>
2516
2517 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2518 instead.
2519
60a191ed
YQ
25202015-03-06 Yao Qi <yao.qi@linaro.org>
2521
2522 * linux-aarch64-low.c (aarch64_insert_point): Use
2523 show_debug_regs as a boolean.
2524 (aarch64_remove_point): Likewise.
2525
f5771b1d
PA
25262015-03-05 Pedro Alves <palves@redhat.com>
2527
2528 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2529 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2530 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2531 * nto-low.c (nto_target_ops): Likewise.
2532 * spu-low.c (spu_target_ops): Likewise.
2533 * win32-low.c (win32_target_ops): Likewise.
2534
3e572f71
PA
25352015-03-04 Pedro Alves <palves@redhat.com>
2536
72f4393d 2537 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2538 Decide whether a breakpoint triggered based on the SIGTRAP's
2539 siginfo.si_code.
72f4393d
L
2540 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2541 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2542 (linux_low_filter_event): Check for breakpoints before checking
2543 watchpoints.
2544 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2545 siginfo.si_code.
72f4393d
L
2546 (linux_stopped_by_sw_breakpoint)
2547 (linux_supports_stopped_by_sw_breakpoint)
2548 (linux_stopped_by_hw_breakpoint)
2549 (linux_supports_stopped_by_hw_breakpoint): New functions.
2550 (linux_target_ops): Install new target methods.
3e572f71 2551
1ec68e26
PA
25522015-03-04 Pedro Alves <palves@redhat.com>
2553
2554 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2555 * server.c (swbreak_feature, hwbreak_feature): New globals.
2556 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2557 (captured_main): Clear swbreak_feature and hwbreak_feature.
2558 * server.h (swbreak_feature, hwbreak_feature): Declare.
2559 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2560 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2561 supports_stopped_by_hw_breakpoint>: New fields.
2562 (target_supports_stopped_by_sw_breakpoint)
2563 (target_stopped_by_sw_breakpoint)
2564 (target_supports_stopped_by_hw_breakpoint)
2565 (target_stopped_by_hw_breakpoint): Declare.
2566
15c66dd6
PA
25672015-03-04 Pedro Alves <palves@redhat.com>
2568
2569 enum lwp_stop_reason -> enum target_stop_reason
2570 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2571 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2572 (linux_wait_1, stuck_in_jump_pad_callback)
2573 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2574 (linux_stopped_by_watchpoint):
2575 * linux-low.h (enum lwp_stop_reason): Delete.
2576 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2577 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2578
98fc70d6
YQ
25792015-03-04 Yao Qi <yao.qi@linaro.org>
2580
2581 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2582
dd2ac174
GB
25832015-03-03 Gary Benson <gbenson@redhat.com>
2584
2585 * hostio.c (handle_vFile): Fix prefix lengths.
2586
d68e53f4
MM
25872015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2588
2589 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2590 ptr_bits.
2591
bf2d68ab
AA
25922015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2593
2594 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2595 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2596 (clean): Add "rm -f" for above C files.
2597 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2598 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2599 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2600 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2601 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2602 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2603 (init_registers_s390x_vx_linux64)
2604 (init_registers_s390x_tevx_linux64)
2605 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2606 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2607 declarations.
2608 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2609 (s390_store_vxrs_high): New functions.
2610 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2611 NT_S390_VXRS_HIGH.
2612 (s390_arch_setup): Add logic for selecting one of the new target
2613 descriptions. Activate the new vector regsets if applicable.
2614 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2615 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2616 and init_registers_s390x_tevx_linux64.
2617
c966a859
PA
26182015-03-01 Pedro Alves <palves@redhat.com>
2619
2620 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2621 parameter.
2622
4180215b
PA
26232015-02-27 Pedro Alves <palves@redhat.com>
2624
2625 * linux-x86-low.c (u_debugreg_offset): New function.
2626 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2627
749bab01
PA
26282015-02-27 Pedro Alves <palves@redhat.com>
2629
2630 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2631 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2632 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2633 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2634 (ps_lsetfpregs, ps_getpid)
2635 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2636 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2637 (ps_lsetxregs, ps_plog): Declare.
2638
3c14e5a3
PA
26392015-02-27 Pedro Alves <palves@redhat.com>
2640
2641 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2642 IP_AGENT_EXPORT_FUNC.
2643 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2644 IP_AGENT_EXPORT_FUNC.
2645 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2646 (IP_AGENT_EXPORT): Delete.
2647 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2648 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2649 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2650 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2651 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2652 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2653 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2654 (traceframe_read_count, traceframe_write_count)
2655 (traceframes_created, trace_state_variables, get_raw_reg)
2656 (get_trace_state_variable_value, set_trace_state_variable_value)
2657 (ust_loaded, helper_thread_id, cmd_buf): Use
2658 IPA_SYM_EXPORTED_NAME.
2659 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2660 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2661 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2662 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2663 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2664 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2665 EXTERN_C_PUSH/EXTERN_C_POP.
2666 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2667 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2668 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2669 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2670 (traceframe_write_count, traceframe_read_count)
2671 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2672 (about_to_request_buffer_space, get_trace_state_variable_value)
2673 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2674 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2675 EXTERN_C_PUSH/EXTERN_C_POP.
2676 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2677 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2678 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2679 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2680 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2681 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2682 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2683 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2684 Define.
2685 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2686 (IP_AGENT_EXPORT_VAR_DECL): Define.
2687 (tracing): Declare.
2688 (gdb_agent_get_raw_reg): Declare.
2689
fe978cb0
PA
26902015-02-27 Tom Tromey <tromey@redhat.com>
2691 Pedro Alves <palves@redhat.com>
2692
2693 Rename symbols whose names are reserved C++ keywords throughout.
2694
3bc3d82a
PA
26952015-02-27 Pedro Alves <palves@redhat.com>
2696
2697 * Makefile.in (COMPILER): New, get it from autoconf.
2698 (CXX): Get from autoconf instead.
2699 (COMPILE.pre): Use COMPILER.
2700 (CC-LD): Rename to ...
2701 (CC_LD): ... this. Use COMPILER.
2702 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2703 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2704 * acinclude.m4: Include build-with-cxx.m4.
2705 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2706 Disable -Werror by default if building in C++ mode.
2707 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2708 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2709 the C++ compiler. Save/restore CXXFLAGS too.
2710 * configure: Regenerate.
2711
07697489
PA
27122015-02-27 Pedro Alves <palves@redhat.com>
2713
2714 * acinclude.m4: Include libiberty.m4.
2715 * configure.ac: Call libiberty_INIT.
2716 * config.in, configure: Regenerate.
2717
9beb7c4e
PA
27182015-02-26 Pedro Alves <palves@redhat.com>
2719
2720 * linux-low.c (linux_wait_1): When incrementing the PC past a
2721 program breakpoint always use the_low_target.breakpoint_len as
2722 increment, rather than the maximum between that and
2723 the_low_target.decr_pc_after_break.
2724
8090aef2
PA
27252015-02-23 Pedro Alves <palves@redhat.com>
2726
2727 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2728 thread was doing a step-over; always adjust the PC if
2729 we stepped over a permanent breakpoint.
2730 (linux_wait_1): If we stepped over breakpoint that was on top of a
2731 permanent breakpoint, manually advance the PC past it.
2732
bc9540e8
PA
27332015-02-23 Pedro Alves <palves@redhat.com>
2734
2735 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2736 modes.
2737 (x86_fill_gregset, x86_store_gregset): Use it when handling
2738 $orig_eax.
2739
2db9a427
PA
27402015-02-20 Pedro Alves <palves@redhat.com>
2741
2742 * thread-db.c: Include "nat/linux-procfs.h".
2743 (thread_db_init): Skip listing new threads if the kernel supports
2744 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2745
afa8d396
PA
27462015-02-20 Pedro Alves <palves@redhat.com>
2747
2748 * linux-low.c (status_pending_p_callback): Use ptid_match.
2749
c9587f88
AT
27502015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2751
2752 PR breakpoints/16812
2753 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2754 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2755 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2756
b05ec7a5
AT
27572015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2758
2759 PR breakpoints/15956
2760 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2761
d33501a5
MM
27622015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2763
2764 * linux-low.c (linux_low_btrace_conf): Print size.
2765 * server.c (handle_btrace_conf_general_set): New.
2766 (hanle_general_set): Call handle_btrace_conf_general_set.
2767 (handle_query): Report Qbtrace-conf:bts:size as supported.
2768
f4abbc16
MM
27692015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2770
2771 * linux-low.c (linux_low_enable_btrace): Update parameters.
2772 (linux_low_btrace_conf): New.
2773 (linux_target_ops)<to_btrace_conf>: Initialize.
2774 * server.c (current_btrace_conf): New.
2775 (handle_btrace_enable): Rename to ...
2776 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2777 to target_enable_btrace. Update comment. Update users.
2778 (handle_qxfer_btrace_conf): New.
2779 (qxfer_packets): Add btrace-conf entry.
2780 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2781 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2782 (target_ops)<read_btrace_conf>: New.
2783 (target_enable_btrace): Update parameters.
2784 (target_read_btrace_conf): New.
2785
043c3577
MM
27862015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2787
2788 * server.c (handle_btrace_general_set): Remove call to
2789 target_supports_btrace.
2790 (supported_btrace_packets): New.
2791 (handle_query): Call supported_btrace_packets.
2792 * target.h: include btrace-common.h.
2793 (btrace_target_info): Removed.
2794 (supports_btrace, target_supports_btrace): Update parameters.
2795
734b0e4b
MM
27962015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2797
2798 * Makefile.in (SFILES): Add common/btrace-common.c.
2799 (OBS): Add common/btrace-common.o.
2800 (btrace-common.o): Add build rules.
2801 * linux-low: Include btrace-common.h.
2802 (linux_low_read_btrace): Use struct btrace_data. Call
2803 btrace_data_init and btrace_data_fini.
2804
d6c146e9
PA
28052015-02-06 Pedro Alves <palves@redhat.com>
2806
2807 * thread-db.c (find_new_threads_callback): Add debug output.
2808
20ba1ce6
PA
28092015-02-04 Pedro Alves <palves@redhat.com>
2810
2811 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2812 (resume_stopped_resumed_lwps): New function.
2813 (linux_wait_for_event_filtered): Use it.
2814
8cc73a39
SDJ
28152015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2816
2817 * Makefile.in (SFILES): Add linux-personality.c.
2818 (linux-personality.o): New rule.
2819 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2820 list of objects to be built.
2821 * linux-low.c: Include nat/linux-personality.h.
2822 (linux_create_inferior): Remove code to disable address space
2823 randomization (moved to ../nat/linux-personality.c). Create
2824 cleanup to disable address space randomization.
2825
fb23d554
SDJ
28262015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2827
2828 * Makefile.in (posix-strerror.o): New rule.
2829 (mingw-strerror.o): Likewise.
2830 * configure: Regenerated.
2831 * configure.ac: Source file ../common/common.host. Initialize new
2832 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2833
cdf43629
YQ
28342015-01-14 Yao Qi <yao@codesourcery.com>
2835
2836 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2837 (ppc-linux.o): New rule.
2838 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2839 * configure.ac: AC_CHECK_FUNCS(getauxval).
2840 * config.in: Re-generated.
2841 * configure: Re-generated.
2842 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2843 ppc64_64bit_inferior_p
2844
514c5338
YQ
28452015-01-14 Yao Qi <yao@codesourcery.com>
2846
2847 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2848 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2849 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2850 (PT_ORIG_R3, PT_TRAP): Likewise.
2851 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2852 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2853 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2854
3368c1e5
JB
28552015-01-10 Joel Brobecker <brobecker@adacore.com>
2856
2857 * i387-fp.c (i387_cache_to_xsave): In look over
2858 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2859 zmmh_low_space field by use of zmmh_high_space.
2860
582511be
PA
28612015-01-09 Pedro Alves <palves@redhat.com>
2862
2863 * linux-low.c (step_over_bkpt): Move higher up in the file.
2864 (handle_extended_wait): Don't store the stop_pc here.
2865 (get_stop_pc): Adjust comments and rename to ...
2866 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2867 stopped for a software breakpoint or hardware breakpoint.
2868 (thread_still_has_status_pending_p): New function.
2869 (status_pending_p_callback): Use
2870 thread_still_has_status_pending_p. If the event is no longer
2871 interesting, resume the LWP.
2872 (handle_tracepoints): Add assert.
2873 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2874 (wstatus_maybe_breakpoint): New function.
2875 (cancel_breakpoint): Delete function.
2876 (check_stopped_by_watchpoint): New function, factored out from
2877 linux_low_filter_event.
2878 (lp_status_maybe_breakpoint): Delete function.
2879 (linux_low_filter_event): Remove filter_ptid argument.
2880 Leave thread group exits pending here. Store the LWP's stop PC.
2881 Always leave events pending.
2882 (linux_wait_for_event_filtered): Pull all events out of the
2883 kernel, and leave them all pending.
2884 (count_events_callback, select_event_lwp_callback): Consider all
2885 events.
2886 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2887 (select_event_lwp): Only give preference to the stepping LWP in
2888 all-stop mode. Adjust comments.
2889 (ignore_event): New function.
2890 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2891 references to cancel_breakpoints. Adjust to renames. Also give
2892 equal priority to all LWPs that have had events in non-stop mode.
2893 If reporting a software breakpoint event, unadjust the LWP's PC.
2894 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2895 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2896 Adjust.
2897 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2898 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2899 (linux_stopped_by_watchpoint): Adjust.
2900 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2901 * linux-low.h (enum lwp_stop_reason): New.
2902 (struct lwp_info) <stop_pc>: Adjust comment.
2903 <stopped_by_watchpoint>: Delete field.
2904 <stop_reason>: New field.
2905 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2906 * mem-break.c (software_breakpoint_inserted_here)
2907 (hardware_breakpoint_inserted_here): New function.
2908 * mem-break.h (software_breakpoint_inserted_here)
2909 (hardware_breakpoint_inserted_here): Declare.
2910 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2911 (cancel_breakpoints): Delete.
2912 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2913 (upload_fast_traceframes): Remove references to
2914 cancel_breakpoints.
2915
a33e3959
PA
29162015-01-09 Pedro Alves <palves@redhat.com>
2917
2918 * thread-db.c (find_new_threads_callback): Ignore thread if the
2919 kernel thread ID is -1.
2920
8784d563
PA
29212015-01-09 Pedro Alves <palves@redhat.com>
2922
2923 * linux-low.c (linux_attach_fail_reason_string): Move to
2924 nat/linux-ptrace.c, and rename.
2925 (linux_attach_lwp): Update comment.
2926 (attach_proc_task_lwp_callback): New function.
2927 (linux_attach): Adjust to rename and use
2928 linux_proc_attach_tgid_threads.
2929 (linux_attach_fail_reason_string): Delete declaration.
2930
76f2b779
JB
29312015-01-01 Joel Brobecker <brobecker@adacore.com>
2932
2933 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2934 * server.c (gdbserver_version): Likewise.
2935
fafcc06a
SDJ
29362014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2937
2938 * remote-utils.c: Include ctype.h.
2939 (input_interrupt): Explicitly handle the case when the char
2940 received is the NUL byte. Improve the printing of non-ASCII
2941 characters.
2942
beed38b8
JB
29432014-12-16 Joel Brobecker <brobecker@adacore.com>
2944
2945 * linux-low.c (linux_low_filter_event): Update call to
2946 linux_enable_event_reporting following the addition of
2947 a new parameter to that function.
2948
bf330350
CU
29492014-12-16 Catalin Udma <catalin.udma@freescale.com>
2950
2951 PR server/17457
2952 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2953 (AARCH64_FPCR_REGNO): Likewise.
2954 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2955 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2956 (aarch64_store_fpregset): Likewise.
2957
5227d625
JB
29582014-12-15 Joel Brobecker <brobecker@adacore.com>
2959
2960 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2961 Remove FIXME comment about assumption about N.
2962
f93b65a0
JB
29632014-12-13 Joel Brobecker <brobecker@adacore.com>
2964
2965 * configure.ac: If large-file support is disabled in GDBserver,
2966 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2967 * configure: Regenerate.
2968
e5a9158d
AA
29692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2970
2971 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2972 warning upon ENODATA from ptrace.
2973 * linux-s390-low.c (s390_store_tdb): New.
2974 (s390_regsets): Add regset for NT_S390_TDB.
2975
feea5f36
AA
29762014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2977
2978 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2979 without a fill_function.
2980 * linux-s390-low.c (s390_fill_last_break): Remove.
2981 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2982 (s390_arch_setup): Use regset's size instead of fill_function for
2983 loop end condition.
2984
098dbe61
AA
29852014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2986
2987 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2988 the regset's store function when ptrace returned an error.
2989 * regcache.c (get_thread_regcache): Invalidate register cache
2990 before fetching inferior's registers.
2991
28eef672
AA
29922014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2993
2994 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2995 while-loop as for-loop.
2996 (regsets_store_inferior_registers): Likewise.
2997
bdca27a2
YQ
29982014-11-28 Yao Qi <yao@codesourcery.com>
2999
3000 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3001 * config.in, configure: Re-generate.
3002 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3003 is defined.
3004
9c232dda
YQ
30052014-11-21 Yao Qi <yao@codesourcery.com>
3006
3007 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3008 (AC_CHECK_HEADERS): Remove malloc.h.
3009 * configure: Re-generated.
3010 * config.in: Re-generated.
3011 * server.h: Don't include alloca.h and malloc.h.
3012 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3013 Don't include malloc.h.
3014
43968415
JB
30152014-11-17 Joel Brobecker <brobecker@adacore.com>
3016
3017 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3018 corresponding ERRNO check in same block.
3019
40e91bc7
PA
30202014-11-12 Pedro Alves <palves@redhat.com>
3021
3022 * server.c (cont_thread): Update comment.
3023 (start_inferior, attach_inferior): No longer clear cont_thread.
3024 (handle_v_cont): No longer set cont_thread.
3025 (captured_main): Clear cont_thread each time a GDB connects.
3026
c2c118cf
PA
30272014-11-12 Pedro Alves <palves@redhat.com>
3028
3029 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3030 thread, and don't resume all threads if the Hc thread has exited.
3031
78708b7c
PA
30322014-11-12 Pedro Alves <palves@redhat.com>
3033
3034 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3035 the process group instead of to a specific LWP.
3036
a2abc7de
PA
30372014-10-15 Pedro Alves <palves@redhat.com>
3038
3039 PR server/17487
3040 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3041 parameter.
3042 (arm_set_thread_context): Delete.
3043 (the_low_target): Adjust.
3044 * win32-i386-low.c (debug_registers_changed)
3045 (debug_registers_used): Delete.
3046 (update_debug_registers_callback): New function.
3047 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3048 needing to update their debug registers.
3049 (win32_get_current_dr): New function.
3050 (x86_dr_low_get_addr, x86_dr_low_get_control)
3051 (x86_dr_low_get_status): Fetch the debug register from the thread
3052 record's context.
3053 (i386_initial_stuff): Adjust.
3054 (i386_get_thread_context): Remove current_event parameter. Don't
3055 clear debug_registers_changed nor copy DR values to
3056 debug_reg_state.
3057 (i386_set_thread_context): Delete.
3058 (i386_prepare_to_resume): New function.
3059 (i386_thread_added): Mark the thread as needing to update irs
3060 debug registers.
3061 (the_low_target): Remove i386_set_thread_context and install
3062 i386_prepare_to_resume.
3063 * win32-low.c (win32_get_thread_context): Adjust.
3064 (win32_set_thread_context): Use SetThreadContext
3065 directly.
3066 (win32_prepare_to_resume): New function.
3067 (win32_require_context): New function, factored out from ...
3068 (thread_rec): ... this.
3069 (continue_one_thread): Call win32_prepare_to_resume on each thread
3070 we're about to continue.
3071 (win32_resume): Call win32_prepare_to_resume on the event thread.
3072 * win32-low.h (struct win32_thread_info)
3073 <debug_registers_changed>: New field.
3074 (struct win32_target_ops): Change prototype of set_thread_context,
3075 delete set_thread_context and add prepare_to_resume.
3076 (win32_require_context): New declaration.
3077
a442d071
GB
30782014-10-08 Gary Benson <gbenson@redhat.com>
3079
3080 * server.h: Do not include common-exceptions.h.
3081
6f1947e8
GB
30822014-10-08 Gary Benson <gbenson@redhat.com>
3083
3084 * server.h: Do not include cleanups.h.
3085
63b434a4
JH
30862014-09-30 James Hogan <james.hogan@imgtec.com>
3087
3088 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3089 mips64-dsp-linux.c.
3090
c4d9ceb6
YQ
30912014-09-23 Yao Qi <yao@codesourcery.com>
3092
3093 * linux-low.c (lp_status_maybe_breakpoint): New function.
3094 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3095 (count_events_callback): Likewise.
3096 (select_event_lwp_callback): Likewise.
3097 (cancel_breakpoints_callback): Likewise.
3098
89a5711c
DB
30992014-09-19 Don Breazeal <donb@codesourcery.com>
3100
3101 * linux-low.c (handle_extended_wait): Call
3102 linux_ptrace_get_extended_event.
3103 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3104 linux_is_extended_waitstatus.
3105
bffc0964
JB
31062014-09-16 Joel Brobecker <brobecker@adacore.com>
3107
3108 * Makefile.in (CPPFLAGS): Define.
3109 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3110 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3111
0bfdf32f
GB
31122014-09-16 Gary Benson <gbenson@redhat.com>
3113
3114 * inferiors.h (current_inferior): Renamed as...
3115 (current_thread): New variable. All uses updated.
3116 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3117 (maybe_move_out_of_jump_pad): Likewise.
3118 (cancel_breakpoint): Likewise.
3119 (linux_low_filter_event): Likewise.
3120 (wait_for_sigstop): Likewise.
3121 (linux_resume_one_lwp): Likewise.
3122 (need_step_over_p): Likewise.
3123 (start_step_over): Likewise.
3124 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3125 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3126 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3127 and save_inferior as saved_thread.
3128 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3129 saved_thread.
3130 (regcache_invalidate_thread): Likewise.
3131 * remote-utils.c (prepare_resume_reply): Likewise.
3132 * thread-db.c (thread_db_get_tls_address): Likewise.
3133 (disable_thread_event_reporting): Likewise.
3134 (remove_thread_event_breakpoints): Likewise.
3135 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3136 as saved_thread.
3137 * target.h (set_desired_inferior): Renamed as...
3138 (set_desired_thread): New declaration. All uses updated.
3139 * server.c (myresume): Updated comment to reference thread instead
3140 of inferior.
3141 (handle_serial_event): Likewise.
3142 (handle_target_event): Likewise.
3143
361c8ade
GB
31442014-09-12 Tom Tromey <tromey@redhat.com>
3145 Gary Benson <gbenson@redhat.com>
3146
3147 * regcache.h: Include common-regcache.h.
3148 (regcache_read_pc): Don't declare.
3149 * regcache.c (get_thread_regcache_for_ptid): New function.
3150
bd9269f7
GB
31512014-09-11 Tom Tromey <tromey@redhat.com>
3152 Gary Benson <gbenson@redhat.com>
3153
3154 * symbol.c: New file.
3155 * Makefile.in (SFILES): Add symbol.c.
3156 (OBS): Add symbol.o.
3157
f8c1d06b
GB
31582014-09-11 Gary Benson <gbenson@redhat.com>
3159
3160 * target.c (target_stop_ptid, target_continue_ptid): New
3161 functions.
3162
721ec300
GB
31632014-09-11 Tom Tromey <tromey@redhat.com>
3164 Gary Benson <gbenson@redhat.com>
3165
3166 * target.h: Include target/target.h.
3167 * target.c (target_read_memory, target_read_uint32)
3168 (target_write_memory): New functions.
3169
c5e92cca
GB
31702014-09-11 Gary Benson <gbenson@redhat.com>
3171
3172 * server.h (debug_hw_points): Don't declare.
3173 * server.c (debug_hw_points): Don't define. Replace all uses
3174 with show_debug_regs.
3175 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3176 all uses with show_debug_regs.
3177
2e4bb98a
EBM
31782014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3179
3180 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3181 endianness into account.
3182 (ppc_supply_ptrace_register): Likewise.
3183
ac740bc7
JH
31842014-09-03 James Hogan <james.hogan@imgtec.com>
3185
3186 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3187 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3188
97ea6506
GB
31892014-09-03 Gary Benson <gbenson@redhat.com>
3190
3191 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3192 ALL_DEBUG_ADDRESS_REGISTERS.
3193
df7e5265
GB
31942014-09-02 Gary Benson <gbenson@redhat.com>
3195
3196 * i386-low.h: Renamed as...
3197 * x86-low.h: New file. All type, function and variable name
3198 prefixes changed from "i386_" to "x86_". All references updated.
3199 * i386-low.c: Renamed as...
3200 * x86-low.c: New file. All type, function and variable name
3201 prefixes changed from "i386_" to "x86_". All references updated.
3202
ed859da7
GB
32032014-09-02 Gary Benson <gbenson@redhat.com>
3204
3205 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3206 (x86_linux_new_thread): Likewise.
3207
860789c7
GB
32082014-08-29 Gary Benson <gbenson@redhat.com>
3209
3210 * server.h (setjmp.h): Do not include.
3211 (toplevel): Do not declare.
3212 (common-exceptions.h): Include.
3213 (cleanups.h): Likewise.
3214 * server.c (toplevel): Do not define.
3215 (exit_code): New static global.
3216 (detach_or_kill_for_exit_cleanup): New function.
3217 (main): New function. Original main renamed to...
3218 (captured_main): New function.
3219 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3220
ff55e1b5
GB
32212014-08-29 Gary Benson <gbenson@redhat.com>
3222
3223 * Makefile.in (SFILES): Add common/common-exceptions.c.
3224 (OBS): Add common-exceptions.o.
3225 (common-exceptions.o): New rule.
3226 * utils.c (prepare_to_throw_exception): New function.
3227
e9bcb658
GB
32282014-08-29 Gary Benson <gbenson@redhat.com>
3229
3230 * config.in: Regenerate.
3231 * configure: Likewise.
3232
e3180625
GB
32332014-08-29 Gary Benson <gbenson@redhat.com>
3234
3235 * Makefile.in (SFILES): Add common/cleanups.c.
3236 (OBS): cleanups.o.
3237 (cleanups.o): New rule.
3238
e3d6ba5d
GB
32392014-08-29 Gary Benson <gbenson@redhat.com>
3240
3241 * utils.c (internal_vwarning): New function.
3242
7096e886
GB
32432014-08-28 Gary Benson <gbenson@redhat.com>
3244
3245 * utils.h (fatal): Remove declaration.
3246 * utils.c (fatal): Remove function.
3247
14ce3192
GB
32482014-08-28 Gary Benson <gbenson@redhat.com>
3249
3250 * tracepoint.c (gdb_agent_init): Replace fatal with
3251 perror_with_name.
3252 (initialize_tracepoint): Likewise.
3253
50278d59
GB
32542014-08-28 Gary Benson <gbenson@redhat.com>
3255
3256 * remote-utils.c (remote_prepare): Replace fatal with error.
3257
aa96c426
GB
32582014-08-28 Gary Benson <gbenson@redhat.com>
3259
3260 * linux-low.c (linux_async): Replace fatal with warning.
3261 Tidy up and return.
3262 (linux_start_non_stop): Return -1 if linux_async failed.
3263
f7160e97
GB
32642014-08-28 Gary Benson <gbenson@redhat.com>
3265
3266 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3267 gdb_assert.
3268 (i386_dr_low_get_addr): Remove vague comment.
3269 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3270 gdb_assert.
3271
38e08fca
GB
32722014-08-28 Gary Benson <gbenson@redhat.com>
3273
3274 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3275 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3276 internal_error.
3277 (linux_resume_one_lwp): Likewise.
3278 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3279 gdb_assert.
3280 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3281 with internal_error.
3282 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3283 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3284 (find_register_by_name): Replace fatal with internal_error.
3285 (find_regno): Likewise.
3286 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3287 * thread-db.c (thread_db_create_event): Likewise.
3288 (thread_db_load_search): Likewise.
3289 (try_thread_db_load_1): Likewise.
3290 * tracepoint.c (get_jump_space_head): Replace fatal with
3291 internal_error.
3292 (claim_trampoline_space): Likewise.
3293 (have_fast_tracepoint_trampoline_buffer): Likewise.
3294 (cmd_qtstart): Likewise.
3295 (stop_tracing): Likewise.
3296 (fast_tracepoint_collecting): Likewise.
3297 (target_malloc): Likewise.
3298 (download_tracepoint): Likewise.
3299 (download_trace_state_variables): Replace check with gdb_assert.
3300 (upload_fast_traceframes): Replace fatal with internal_error.
3301
34abf635
GB
33022014-08-19 Tom Tromey <tromey@redhat.com>
3303 Gary Benson <gbenson@redhat.com>
3304
3305 * Makefile.in (SFILES): Add common/common-debug.c.
3306 (OBS): Add common-debug.o.
3307 (common-debug.o): New rule.
3308 * debug.h (debug_printf): Don't declare.
3309 * debug.c (debug_printf): Renamed and rewritten as...
3310 (debug_vprintf): New function.
3311
f6e94d78
GB
33122014-08-19 Gary Benson <gbenson@redhat.com>
3313
3314 * utils.h: Do not include print-utils.h.
3315
9239eeab
GB
33162014-08-19 Tom Tromey <tromey@redhat.com>
3317 Gary Benson <gbenson@redhat.com>
3318
3319 * server.h: Add static assertion.
3320 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3321
ef87c8bb
GB
33222014-08-19 Tom Tromey <tromey@redhat.com>
3323 Gary Benson <gbenson@redhat.com>
3324
3325 * Makefile.in (SFILES): Add common/errors.c.
3326 (OBS): Add errors.o.
3327 (IPA_OBS): Add errors-ipa.o.
3328 (errors.o): New rule.
3329 (errors-ipa.o): Likewise.
3330 * utils.h (perror_with_name, error, warning): Don't declare.
3331 * utils.c (warning): Renamed and rewritten as...
3332 (vwarning): New function.
3333 (error): Renamed and rewritten as...
3334 (verror): New function.
3335 (internal_error): Renamed and rewritten as...
3336 (internal_verror): New function.
3337
bb974a24
GB
33382014-08-07 Gary Benson <gbenson@redhat.com>
3339
3340 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3341 * configure: Regenerate.
3342 * config.in: Likewise.
3343 * server.h: Do not include errno.h.
3344 * event-loop.c: Likewise.
3345 * hostio-errno.c: Likewise.
3346 * linux-low.c: Likewise.
3347 * remote-utils.c: Likewise.
3348 * spu-low.c: Likewise.
3349 * utils.c: Likewise.
3350 * gdbreplay.c: Unconditionally include errno.h.
3351
6d3d12eb
GB
33522014-08-07 Gary Benson <gbenson@redhat.com>
3353
3354 * server.h: Do not include string.h.
3355 * event-loop.c: Likewise.
3356 * linux-low.c: Likewise.
3357 * regcache.c: Likewise.
3358 * remote-utils.c: Likewise.
3359 * spu-low.c: Likewise.
3360 * utils.c: Likewise.
3361
dccbb609
GB
33622014-08-07 Gary Benson <gbenson@redhat.com>
3363
3364 * server.h: Do not include gdb_assert.h.
3365
e76df0d0
GB
33662014-08-07 Gary Benson <gbenson@redhat.com>
3367
3368 * server.h: Do not include common-utils.h.
3369
4cb9c816
GB
33702014-08-07 Gary Benson <gbenson@redhat.com>
3371
3372 * server.h: Do not include ptid.h.
3373 * notif.h: Likewise.
3374
3995eeee
GB
33752014-08-07 Gary Benson <gbenson@redhat.com>
3376
3377 * server.h: Do not include gdb_locale.h.
3378
cb9f1a9b
GB
33792014-08-07 Gary Benson <gbenson@redhat.com>
3380
3381 * server.h: Do not include gdb/signals.h.
3382 * win32-low.c: Likewise.
3383
a5fceff8
GB
33842014-08-07 Gary Benson <gbenson@redhat.com>
3385
3386 * server.h: Do not include pathmax.h.
3387
b9391142
GB
33882014-08-07 Gary Benson <gbenson@redhat.com>
3389
3390 * server.h: Do not include libiberty.h.
3391 * linux-bfin-low.c: Likewise.
3392
0e443c87
GB
33932014-08-07 Gary Benson <gbenson@redhat.com>
3394
3395 * server.h: Do not include ansidecl.h.
3396
8ebb3f56
GB
33972014-08-07 Gary Benson <gbenson@redhat.com>
3398
3399 * linux-x86-low.c: Do not include stddef.h.
3400 * lynx-ppc-low.c: Likewise.
3401 * tracepoint.c: Likewise.
3402
8980bdf6
GB
34032014-08-07 Gary Benson <gbenson@redhat.com>
3404
3405 * server.h: Do not include stdarg.h.
3406 * nto-low.c: Likewise.
3407
d7096f71
GB
34082014-08-07 Gary Benson <gbenson@redhat.com>
3409
3410 * server.h: Do not include stdlib.h.
3411 * inferiors.c: Likewise.
3412 * linux-low.c: Likewise.
3413 * regcache.c: Likewise.
3414 * spu-low.c: Likewise.
3415 * tracepoint.c: Likewise.
3416 * utils.c: Likewise.
3417
d02f550d
GB
34182014-08-07 Gary Benson <gbenson@redhat.com>
3419
3420 * server.h: Do not include stdio.h.
3421 * linux-low.c: Likewise.
3422 * remote-utils.c: Likewise.
3423 * spu-low.c: Likewise.
3424 * utils.c: Likewise.
3425 * wincecompat.c: Likewise.
3426
87f6c4e3
GB
34272014-08-06 Gary Benson <gbenson@redhat.com>
3428
3429 * regcache.c (init_register_cache): Move conditionals inside if.
3430
7089dca4
GB
34312014-08-06 Gary Benson <gbenson@redhat.com>
3432
3433 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3434
462f517e
GB
34352014-07-31 Gary Benson <gbenson@redhat.com>
3436
3437 * ax.h: Do not include server.h.
3438 * gdbthread.h: Likewise.
3439 * lynx-low.h: Likewise.
3440 * notif.h: Likewise.
3441
976411d6
GB
34422014-07-30 Gary Benson <gbenson@redhat.com>
3443
3444 * server.h: Include common-defs.h.
3445 Do not include config.h or build-gnulib-gdbserver/config.h.
3446
d41f6d8e
GB
34472014-07-30 Gary Benson <gbenson@redhat.com>
3448
3449 * hostio-errno.c: Move server.h to top of includes list.
3450 * inferiors.c: Likewise.
3451 * linux-x86-low.c: Likewise.
3452 * notif.c: Include server.h.
3453
314c6a35
TT
34542014-07-24 Tom Tromey <tromey@redhat.com>
3455 Gary Benson <gbenson@redhat.com>
3456
3457 * server.h (CORE_ADDR): Now unsigned.
3458
69ff6be5
PA
34592014-07-16 Pedro Alves <palves@redhat.com>
3460
3461 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3462
ce9e3fe7
PA
34632014-07-15 Pedro Alves <palves@redhat.com>
3464
3465 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3466 copy.
3467
e76126e8
PA
34682014-07-11 Pedro Alves <palves@redhat.com>
3469
3470 * linux-low.c (kill_wait_lwp): New function, based on
3471 kill_one_lwp_callback, but use my_waitpid directly.
3472 (kill_one_lwp_callback, linux_kill): Use it.
3473
8e9db26e
PA
34742014-06-23 Pedro Alves <palves@redhat.com>
3475
3476 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3477 before setting DR0..DR3.
3478
698b3e08
GB
34792014-06-20 Gary Benson <gbenson@redhat.com>
3480
3481 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3482 * configure: Regenerated.
3483 * config.in: Likewise.
3484
125f8a3d
GB
34852014-06-20 Gary Benson <gbenson@redhat.com>
3486
3487 * Makefile.in (SFILES): Update locations for files moved
3488 from common to nat.
3489 (object file files): Reordered.
3490
42995dbd
GB
34912014-06-20 Gary Benson <gbenson@redhat.com>
3492
3493 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3494 (i386_dr_low_set_addr): Likewise.
3495 (i386_dr_low_get_addr): Likewise.
3496 (i386_dr_low_can_set_control): Likewise.
3497 (i386_dr_low_set_control): Likewise.
3498 (i386_dr_low_get_control): Likewise.
3499 (i386_dr_low_get_status): Likewise.
3500 (i386_get_debug_register_length): Likewise.
3501 * linux-x86-low.c (i386_dr_low_set_addr):
3502 Changed signature. Made static.
3503 (i386_dr_low_get_addr): Likewise.
3504 (i386_dr_low_set_control): Likewise.
3505 (i386_dr_low_get_control): Likewise.
3506 (i386_dr_low_get_status): Likewise.
3507 (i386_dr_low): New global variable.
3508 * win32-i386-low.c (i386_dr_low_set_addr):
3509 Changed signature. Made static.
3510 (i386_dr_low_get_addr): Likewise.
3511 (i386_dr_low_set_control): Likewise.
3512 (i386_dr_low_get_control): Likewise.
3513 (i386_dr_low_get_status): Likewise.
3514 (i386_dr_low): New global variable.
3515
e1d2394b
MS
35162014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3517
3518 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3519 * Makefile.in (AR, AR_FLAGS): Define.
3520 * configure: Regenerate.
3521
3a8ee006
GB
35222014-06-19 Gary Benson <gbenson@redhat.com>
3523
3524 * Makefile.in (i386-dregs.o): New rule.
3525 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3526 * i386-low.c (target.h): Remove include.
3527 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3528 (DR_CONTROL_SHIFT): Likewise.
3529 (DR_CONTROL_SIZE): Likewise.
3530 (DR_RW_EXECUTE): Likewise.
3531 (DR_RW_WRITE): Likewise.
3532 (DR_RW_READ): Likewise.
3533 (DR_RW_IORW): Likewise.
3534 (DR_LEN_1): Likewise.
3535 (DR_LEN_2): Likewise.
3536 (DR_LEN_4): Likewise.
3537 (DR_LEN_8): Likewise.
3538 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3539 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3540 (DR_ENABLE_SIZE): Likewise.
3541 (DR_LOCAL_SLOWDOWN): Likewise.
3542 (DR_GLOBAL_SLOWDOWN): Likewise.
3543 (DR_CONTROL_RESERVED): Likewise.
3544 (I386_DR_CONTROL_MASK): Likewise.
3545 (I386_DR_VACANT): Likewise.
3546 (I386_DR_LOCAL_ENABLE): Likewise.
3547 (I386_DR_GLOBAL_ENABLE): Likewise.
3548 (I386_DR_DISABLE): Likewise.
3549 (I386_DR_SET_RW_LEN): Likewise.
3550 (I386_DR_GET_RW_LEN): Likewise.
3551 (I386_DR_WATCH_HIT): Likewise.
3552 (i386_wp_op_t): Likewise.
3553 (i386_show_dr): Likewise.
3554 (i386_length_and_rw_bits): Likewise.
3555 (i386_insert_aligned_watchpoint): Likewise.
3556 (i386_remove_aligned_watchpoint): Likewise.
3557 (i386_handle_nonaligned_watchpoint): Likewise.
3558 i386_update_inferior_debug_regs(): Likewise.
3559 (i386_dr_insert_watchpoint): Likewise.
3560 (i386_dr_remove_watchpoint): Likewise.
3561 (i386_dr_region_ok_for_watchpoint): Likewise.
3562 (i386_dr_stopped_data_address): Likewise.
3563 (i386_dr_stopped_by_watchpoint): Likewise.
3564
8f26655c
GB
35652014-06-19 Gary Benson <gbenson@redhat.com>
3566
3567 * i386-low.c (i386_dr_show): Renamed to
3568 i386_show_dr and made static. All uses updated.
3569 (i386_dr_length_and_rw_bits): Renamed to
3570 i386_length_and_rw_bits and made static.
3571 All uses updated.
3572 (i386_dr_insert_aligned_watchpoint): Renamed to
3573 i386_insert_aligned_watchpoint and made static.
3574 All uses updated.
3575 (i386_dr_remove_aligned_watchpoint): Renamed to
3576 i386_remove_aligned_watchpoint and made static.
3577 All uses updated.
3578 (i386_dr_update_inferior_debug_regs): Renamed to
3579 i386_update_inferior_debug_regs and made static.
3580 All uses updated.
3581
b9228891
GB
35822014-06-18 Gary Benson <gbenson@redhat.com>
3583
5171def3
GB
3584 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3585 (i386_dr_low_can_set_control): Likewise.
3586 (i386_get_debug_register_length): Likewise.
3587 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3588 (i386_dr_low_can_set_control): Likewise.
3589 (i386_get_debug_register_length): Likewise.
3590
35912014-06-17 Gary Benson <gbenson@redhat.com>
3592
b9228891
GB
3593 * i386-low.h (i386-dregs.h): New include.
3594 (DR_FIRSTADDR): Now in i386-dregs.h.
3595 (DR_LASTADDR): Likewise.
3596 (DR_NADDR): Likewise.
3597 (DR_STATUS): Likewise.
3598 (DR_CONTROL): Likewise.
3599 (i386_debug_reg_state): Likewise.
3600 (i386_dr_insert_watchpoint): Likewise.
3601 (i386_dr_remove_watchpoint): Likewise.
3602 (i386_dr_region_ok_for_watchpoint): Likewise.
3603 (i386_dr_stopped_data_address): Likewise.
3604 (i386_dr_stopped_by_watchpoint): Likewise.
3605 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3606
4be83cc2
GB
36072014-06-18 Gary Benson <gbenson@redhat.com>
3608
3609 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3610 i386_dr_insert_watchpoint.
3611 (i386_low_remove_watchpoint): Renamed to
3612 i386_dr_remove_watchpoint.
3613 (i386_low_region_ok_for_watchpoint): Renamed to
3614 i386_dr_region_ok_for_watchpoint.
3615 (i386_low_stopped_data_address): Renamed to
3616 i386_dr_stopped_data_address.
3617 (i386_low_stopped_by_watchpoint): Renamed to
3618 i386_dr_stopped_by_watchpoint.
3619 * i386-low.c (i386_show_dr): Renamed to
3620 i386_dr_show and made nonstatic. All uses updated.
3621 (i386_length_and_rw_bits): Renamed to
3622 i386_dr_length_and_rw_bits and made nonstatic.
3623 All uses updated.
3624 (i386_insert_aligned_watchpoint): Renamed to
3625 i386_dr_insert_aligned_watchpoint and made nonstatic.
3626 All uses updated.
3627 (i386_remove_aligned_watchpoint): Renamed to
3628 i386_dr_remove_aligned_watchpoint and made nonstatic.
3629 All uses updated.
3630 (i386_update_inferior_debug_regs): Renamed to
3631 i386_dr_update_inferior_debug_regs and made nonstatic.
3632 All uses updated.
3633 (i386_low_insert_watchpoint): Renamed to
3634 i386_dr_insert_watchpoint. All uses updated.
3635 (i386_low_remove_watchpoint): Renamed to
3636 i386_dr_remove_watchpoint. All uses updated.
3637 (i386_low_region_ok_for_watchpoint): Renamed to
3638 i386_dr_region_ok_for_watchpoint. All uses updated.
3639 (i386_low_stopped_data_address): Renamed to
3640 i386_dr_stopped_data_address. All uses updated.
3641 (i386_low_stopped_by_watchpoint): Renamed to
3642 i386_dr_stopped_by_watchpoint. All uses updated.
3643
131aa0d4
GB
36442014-06-18 Gary Benson <gbenson@redhat.com>
3645
3646 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3647 (i386_dr_low_can_set_control): Likewise.
3648 (i386_insert_aligned_watchpoint): New check.
3649
d9305f7f
GB
36502014-06-18 Gary Benson <gbenson@redhat.com>
3651
3652 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3653 Renamed to state.
3654
e927c9fc
GB
36552014-06-18 Gary Benson <gbenson@redhat.com>
3656
3657 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3658 instead of fatal and error.
3659 (i386_handle_nonaligned_watchpoint): Likewise.
3660
1b6d4134
GB
36612014-06-18 Gary Benson <gbenson@redhat.com>
3662
3663 * i386-low.c (i386_get_debug_register_length): New macro.
3664 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3665 (i386_show_dr): Use debug_printf instead of fprintf. Use
3666 phex to format values.
3667
6e62758f
GB
36682014-06-18 Gary Benson <gbenson@redhat.com>
3669
3670 * i386-low.h: Comment changes.
3671 * i386-low.c: Likewise.
3672
fc6e2f03
GB
36732014-06-18 Gary Benson <gbenson@redhat.com>
3674
3675 * i386-low.c: Whitespace changes.
3676
f9d1eeed
TT
36772014-06-12 Tom Tromey <tromey@redhat.com>
3678
3679 * utils.c (freeargv): Remove.
3680
0b04e523
TT
36812014-06-12 Tom Tromey <tromey@redhat.com>
3682
3683 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3684 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3685 (parse_debug_format_options): Likewise.
3686 (gdbserver_usage): Likewise.
3687 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3688 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3689 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3690 against libiberty.
3691 ($(LIBGNU)): Depend on libiberty.
3692 (all-lib): Recurse into all subdirs.
3693 (install-only): Invoke "install" target in subdirs.
3694 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3695 targets.
3696 * configure: Rebuild.
3697 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3698 for vasprintf, vsnprintf, or gettimeofday.
3699 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3700 srv_tgtobj.
3701
270c9937
JB
37022014-06-05 Joel Brobecker <brobecker@adacore.com>
3703
3704 * development.sh: Delete.
3705 * Makefile.in (config.status): Adjust dependency on development.sh.
3706 * configure.ac: Adjust development.sh source call.
3707 * configure: Regenerate.
3708
0a261ed8
PA
37092014-06-02 Pedro Alves <palves@redhat.com>
3710
3711 * ax.c (gdb_free_agent_expr): New function.
3712 * ax.h (gdb_free_agent_expr): New declaration.
3713 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3714 list.
3715 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3716 static.
3717 (clear_breakpoint_conditions_and_commands): New function.
3718 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3719 (clear_breakpoint_conditions_and_commands): New declaration.
3720
e9dae05e
RR
37212014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3722
3723 * linux-aarch64-low.c (asm/ptrace.h): Include.
3724
5876f503
JK
37252014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3726
3727 Fix TLS access for -static -pthread.
3728 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3729 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3730 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3731
802e8e6d
PA
37322014-05-20 Pedro Alves <palves@redhat.com>
3733
3734 * linux-aarch64-low.c (aarch64_insert_point)
3735 (aarch64_remove_point): No longer check whether the type is
3736 supported here. Adjust to new interface.
3737 (the_low_target): Install aarch64_supports_z_point_type as
3738 supports_z_point_type method.
3739 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3740 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3741 instead of a Z packet char. Adjust.
3742 (arm_supports_z_point_type): New function.
3743 (arm_insert_point, arm_remove_point): Adjust to new interface.
3744 (the_low_target): Install arm_supports_z_point_type.
3745 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3746 (cris_insert_point, cris_remove_point): Adjust to new interface.
3747 Don't check whether the type is supported here.
3748 (the_low_target): Install cris_supports_z_point_type.
3749 * linux-low.c (linux_supports_z_point_type): New function.
3750 (linux_insert_point, linux_remove_point): Adjust to new interface.
3751 * linux-low.h (struct linux_target_ops) <insert_point,
3752 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3753 raw_breakpoint pointer parameter.
3754 <supports_z_point_type>: New method.
3755 * linux-mips-low.c (mips_supports_z_point_type): New function.
3756 (mips_insert_point, mips_remove_point): Adjust to new interface.
3757 Use mips_supports_z_point_type.
3758 (the_low_target): Install mips_supports_z_point_type.
3759 * linux-ppc-low.c (the_low_target): Install NULL as
3760 supports_z_point_type method.
3761 * linux-s390-low.c (the_low_target): Install NULL as
3762 supports_z_point_type method.
3763 * linux-sparc-low.c (the_low_target): Install NULL as
3764 supports_z_point_type method.
3765 * linux-x86-low.c (x86_supports_z_point_type): New function.
3766 (x86_insert_point): Adjust to new insert_point interface. Use
3767 insert_memory_breakpoint. Adjust to new
3768 i386_low_insert_watchpoint interface.
3769 (x86_remove_point): Adjust to remove_point interface. Use
3770 remove_memory_breakpoint. Adjust to new
3771 i386_low_remove_watchpoint interface.
3772 (the_low_target): Install x86_supports_z_point_type.
3773 * lynx-low.c (lynx_target_ops): Install NULL as
3774 supports_z_point_type callback.
3775 * nto-low.c (nto_supports_z_point_type): New.
3776 (nto_insert_point, nto_remove_point): Adjust to new interface.
3777 (nto_target_ops): Install nto_supports_z_point_type.
3778 * mem-break.c: Adjust intro comment.
3779 (struct raw_breakpoint) <raw_type, size>: New fields.
3780 <inserted>: Update comment.
3781 <shlib_disabled>: Delete field.
3782 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3783 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3784 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3785 (raw_bkpt_type_to_target_hw_bp_type): New function.
3786 (find_enabled_raw_code_breakpoint_at): New function.
3787 (find_raw_breakpoint_at): New type and size parameters. Use them.
3788 (insert_memory_breakpoint): New function, based off
3789 set_raw_breakpoint_at.
3790 (remove_memory_breakpoint): New function.
3791 (set_raw_breakpoint_at): Reimplement.
3792 (set_breakpoint): New, based on set_breakpoint_at.
3793 (set_breakpoint_at): Reimplement.
3794 (delete_raw_breakpoint): Go through the_target->remove_point
3795 instead of assuming memory breakpoints.
3796 (find_gdb_breakpoint_at): Delete.
3797 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3798 (find_gdb_breakpoint): New function.
3799 (set_gdb_breakpoint_at): Delete.
3800 (z_type_supported): New function.
3801 (set_gdb_breakpoint_1): New function, loosely based off
3802 set_gdb_breakpoint_at.
3803 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3804 (delete_gdb_breakpoint_at): Delete.
3805 (delete_gdb_breakpoint_1): New function, loosely based off
3806 delete_gdb_breakpoint_at.
3807 (delete_gdb_breakpoint): New function.
3808 (clear_gdb_breakpoint_conditions): Rename to ...
3809 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3810 breakpoint.
3811 (add_condition_to_breakpoint): Make static.
3812 (add_breakpoint_condition): Take a struct breakpoint pointer
3813 instead of an address. Adjust.
3814 (gdb_condition_true_at_breakpoint): Rename to ...
3815 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3816 z_type parameter.
3817 (gdb_condition_true_at_breakpoint): Reimplement.
3818 (add_breakpoint_commands): Take a struct breakpoint pointer
3819 instead of an address. Adjust.
3820 (gdb_no_commands_at_breakpoint): Rename to ...
3821 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3822 parameter. Return true if no breakpoint was found. Change debug
3823 output.
3824 (gdb_no_commands_at_breakpoint): Reimplement.
3825 (run_breakpoint_commands): Rename to ...
3826 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3827 and change return type to boolean.
3828 (run_breakpoint_commands): New function.
3829 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3830 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3831 breakpoint. Go through the_target->remove_point instead of
3832 assuming memory breakpoint.
3833 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3834 software and hardware breakpoints.
3835 (reinsert_raw_breakpoint): Go through the_target->insert_point
3836 instead of assuming memory breakpoint.
3837 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3838 software and hardware breakpoints.
3839 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3840 Check both software and hardware breakpoints.
3841 (validate_inserted_breakpoint): Assert the breakpoint is a
3842 software breakpoint. Set the inserted flag to -1 instead of
3843 setting shlib_disabled.
3844 (delete_disabled_breakpoints): Adjust.
3845 (validate_breakpoints): Only validate software breakpoints.
3846 Adjust to inserted flag change.
3847 (check_mem_read, check_mem_write): Skip breakpoint types other
3848 than software breakpoints. Adjust to inserted flag change.
3849 * mem-break.h (enum raw_bkpt_type): New enum.
3850 (raw_breakpoint, struct process_info): Forward declare.
3851 (Z_packet_to_target_hw_bp_type): Delete declaration.
3852 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3853 (set_gdb_breakpoint, delete_gdb_breakpoint)
3854 (clear_breakpoint_conditions): New declarations.
3855 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3856 (breakpoint_inserted_here): Update comment.
3857 (add_breakpoint_condition, add_breakpoint_commands): Replace
3858 address parameter with a breakpoint pointer parameter.
3859 (gdb_breakpoint_here): Update comment.
3860 (delete_gdb_breakpoint_at): Delete.
3861 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3862 * server.c (process_point_options): Take a struct breakpoint
3863 pointer instead of an address. Adjust.
3864 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3865 delete_gdb_breakpoint.
3866 * spu-low.c (spu_target_ops): Install NULL as
3867 supports_z_point_type method.
3868 * target.h: Include mem-break.h.
3869 (struct target_ops) <prepare_to_access_memory>: Update comment.
3870 <supports_z_point_type>: New field.
3871 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3872 instead of a char. Also take a raw breakpoint pointer.
3873 * win32-arm-low.c (the_low_target): Install NULL as
3874 supports_z_point_type.
3875 * win32-i386-low.c (i386_supports_z_point_type): New function.
3876 (i386_insert_point, i386_remove_point): Adjust to new interface.
3877 (the_low_target): Install i386_supports_z_point_type.
3878 * win32-low.c (win32_supports_z_point_type): New function.
3879 (win32_insert_point, win32_remove_point): Adjust to new interface.
3880 (win32_target_ops): Install win32_supports_z_point_type.
3881 * win32-low.h (struct win32_target_ops):
3882 <supports_z_point_type>: New method.
3883 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3884 instead of a char. Also take a raw breakpoint pointer.
3885
932539e3
PA
38862014-05-20 Pedro Alves <palves@redhat.com>
3887
3888 * mem-break.h: Include break-common.h.
3889 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3890 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3891 (Z_packet_to_target_hw_bp_type): New declaration.
3892 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3893 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3894 (Z_PACKET_ACCESS_WP): Delete macros.
3895 (Z_packet_to_hw_type): Delete function.
3896 * i386-low.h: Don't include break-common.h here.
3897 (Z_packet_to_hw_type): Delete declaration.
3898 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3899 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3900 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3901 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3902 * linux-aarch64-low.c: Don't include break-common.h here.
3903 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3904 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3905 (Z_packet_to_target_hw_bp_type): Delete function.
3906 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3907 function.
3908 (mips_insert_point, mips_remove_point): Use
3909 Z_packet_to_target_hw_bp_type.
3910
4ff0d3d8
PA
39112014-05-20 Pedro Alves <palves@redhat.com>
3912
3913 * linux-aarch64-low.c: Include break-common.h.
3914 (enum target_point_type): Delete.
3915 (Z_packet_to_point_type): Rename to ...
3916 (Z_packet_to_target_hw_bp_type): ... this, and return a
3917 target_hw_bp_type instead.
3918 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3919 instead of an enum target_point_type.
3920 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3921 breakpoint type.
3922 (aarch64_dr_state_insert_one_point)
3923 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3924 (aarch64_handle_aligned_watchpoint)
3925 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3926 Take an enum target_hw_bp_type instead of an enum
3927 target_point_type.
3928 (aarch64_supports_z_point_type): New function.
3929 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3930 use Z_packet_to_target_hw_bp_type.
3931
786dc519
JB
39322014-05-20 Joel Brobecker <brobecker@adacore.com>
3933
3934 * configure.ac: Only use -Werror by default when DEVELOPMENT
3935 is true.
3936 * configure: Regenerate.
3937
9e0aa64f
JK
39382014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3939
3940 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3941 * linux-x86-low.c (X86_64_USER_REGS): New.
3942 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3943
2b577b92
YQ
39442014-04-28 Yao Qi <yao@codesourcery.com>
3945
3946 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3947 name.
3948
94611da2
PA
39492014-04-25 Pedro Alves <palves@redhat.com>
3950
3951 PR server/16255
3952 * linux-low.c (linux_attach_fail_reason_string): New function.
3953 (linux_attach_lwp): Delete.
3954 (linux_attach_lwp_1): Rename to ...
3955 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3956 argument. Remove "initial" parameter. Return int instead of
3957 void. Don't error or warn here.
3958 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3959 failure to attach to the tgid. Call warning when failing to
3960 attach to an lwp.
3961 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3962 argument. Remove "initial" parameter. Return int instead of
3963 void. Don't error or warn here.
3964 (linux_attach_fail_reason_string): New declaration.
3965 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3966 interface change. Use linux_attach_fail_reason_string.
3967
01f9f808
MS
39682014-04-24 Michael Sturm <michael.sturm@mintel.com>
3969 Walfred Tedeschi <walfred.tedeschi@intel.com>
3970
3971 * Makefile.in: Added rules to handle new files
3972 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3973 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3974 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3975 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3976 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3977 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3978 x32-avx512-linux.o.
3979 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3980 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3981 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3982 i386/x32-avx512.xml.
3983 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3984 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3985 i386/x32-avx512-linux.xml.
3986 * i387-fp.c (num_avx512_k_registers): New constant for number
3987 of K registers.
3988 (num_avx512_zmmh_low_registers): New constant for number of
3989 lower ZMM registers (0-15).
3990 (num_avx512_zmmh_high_registers): New constant for number of
3991 higher ZMM registers (16-31).
3992 (num_avx512_ymmh_registers): New contant for number of higher
3993 YMM registers (ymm16-31 added by avx521 on x86_64).
3994 (num_avx512_xmm_registers): New constant for number of higher
3995 XMM registers (xmm16-31 added by AVX512 on x86_64).
3996 (struct i387_xsave): Add space for AVX512 registers.
3997 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3998 Add code to handle AVX512 registers.
3999 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4000 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4001 prototypei from generated file.
4002 (tdesc_amd64_avx512_linux): Likewise.
4003 (init_registers_x32_avx512_linux): Likewise.
4004 (tdesc_x32_avx512_linux): Likewise.
4005 (init_registers_i386_avx512_linux): Likewise.
4006 (tdesc_i386_avx512_linux): Likewise.
4007 (x86_64_regmap): Add AVX512 registers.
4008 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4009 mask.
4010 (initialize_low_arch): Add code to initialize AVX512 registers.
4011
51aa91f9
PA
40122014-04-23 Pedro Alves <palves@redhat.com>
4013
4014 * mem-break.c (find_gdb_breakpoint_at): Make static.
4015 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4016
a4165e94
PA
40172014-04-23 Pedro Alves <palves@redhat.com>
4018
4019 * i386-low.c: Don't include break-common.h here.
4020 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4021 prototype to take target_hw_bp_type as argument instead of a Z
4022 packet char.
4023 * i386-low.h: Include break-common.h here.
4024 (Z_packet_to_hw_type): Declare.
4025 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4026 prototypes.
4027 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4028 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4029 (x86_remove_point): Convert the packet number to a
4030 target_hw_bp_type before calling i386_low_remove_watchpoint.
4031 * win32-i386-low.c (i386_insert_point): Convert the packet number
4032 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4033 (i386_remove_point): Convert the packet number to a
4034 target_hw_bp_type before calling i386_low_remove_watchpoint.
4035
b8acf843
PA
40362014-04-23 Pedro Alves <palves@redhat.com>
4037
4038 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4039
d708bcd1
PA
40402014-04-10 Pedro Alves <palves@redhat.com>
4041
4042 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4043 Check if the condition or command is NULL before checking if the
4044 breakpoint is known. On success, return true.
4045 * mem-break.h (add_breakpoint_condition): Document return.
4046 (add_breakpoint_commands): Add describing comment.
4047 * server.c (skip_to_semicolon): New function.
4048 (process_point_options): Use it.
4049
2eec7d5b
PA
40502014-04-09 Pedro Alves <palves@redhat.com>
4051
4052 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4053 to lwpid_of.
4054
fa96cb38
PA
40552014-02-27 Pedro Alves <palves@redhat.com>
4056
4057 PR 12702
4058 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4059 macros.
4060 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4061 output.
4062 (last_thread_of_process_p): Take a PID argument instead of a
4063 thread pointer.
4064 (linux_wait_for_lwp): Delete.
4065 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4066 functions.
4067 (linux_low_filter_event): New function, party factored out from
4068 linux_wait_for_event.
4069 (linux_wait_for_event): Rename to ...
4070 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4071 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4072 sigsuspend. Check for zombie leaders.
4073 (linux_wait_for_event): Reimplement as wrapper around
4074 linux_wait_for_event_filtered.
4075 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4076 a normal or signal exit is seen, it's the whole process exiting.
4077 (wait_for_sigstop): No longer a for_each_inferior callback.
4078 Rewrite on top of linux_wait_for_event_filtered.
4079 (stop_all_lwps): Call wait_for_sigstop directly.
4080 * server.c (resume, handle_target_event): Handle
4081 TARGET_WAITKIND_NO_RESUMED.
4082
d763de10
JB
40832014-02-26 Joel Brobecker <brobecker@adacore.com>
4084
4085 * win32-low.c (psapi_get_dll_name,
4086 * win32_CreateToolhelp32Snapshot): Delete.
4087 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4088 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4089 Delete.
4090 (handle_load_dll): Add function description.
4091 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4092
850a0f76
JB
40932014-02-26 Joel Brobecker <brobecker@adacore.com>
4094
4095 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4096 Add comment.
4097 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4098 base address when calling win32_add_one_solib.
4099 (handle_load_dll): Delete local variable load_addr.
4100 Remove 0x1000 offset applied to DLL base address when calling
4101 win32_add_one_solib.
4102 (handle_unload_dll): Add comment.
4103
f25b3fc3
JB
41042014-02-26 Joel Brobecker <brobecker@adacore.com>
4105
4106 * win32-low.c (win32_add_all_dlls): Renames
4107 win32_ensure_ntdll_loaded. Rewrite function documentation.
4108 Adjust implementation to always load all DLLs.
4109 Add 0x1000 offset to DLL base address when calling
4110 win32_add_one_solib.
4111 (child_initialization_done): New static global.
4112 (do_initial_child_stuff): Set child_initialization_done to
4113 zero during child initialization, and 1 after. Replace call
4114 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4115 Add comment.
4116 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4117 (handle_unload_dll): Add function documentation.
4118 (get_child_debug_event): Ignore load and unload DLL events
4119 during child initialization.
4120
d86d4aaf
DE
41212014-02-20 Doug Evans <dje@google.com>
4122
3bc32da3 4123 Remove global all_lwps.
d86d4aaf
DE
4124 * inferiors.h (ptid_of): Move here from linux-low.h.
4125 (pid_of, lwpid_of): Ditto.
4126 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4127 parameter is a struct thread_info * now.
4128 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4129 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4130 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4131 directly.
4132 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4133 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4134 * linux-arm-low.c (update_registers_callback): Update, "entry"
4135 parameter is a struct thread_info * now.
4136 Fetch lwpid from current_inferior directly.
4137 (arm_insert_point): Pass &all_threads to find_inferior instead of
4138 &all_lwps.
4139 (arm_remove_point): Ditto.
4140 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4141 (arm_prepare_to_resume): Fetch pid from thread.
4142 (arm_read_description): Fetch lwpid from current_inferior directly.
4143 * linux-low.c (all_lwps): Delete.
4144 (delete_lwp): Delete call to remove_inferior.
4145 (handle_extended_wait): Fetch lwpid from thread.
4146 (add_lwp): Don't set lwp->entry.id. Remove call to
4147 add_inferior_to_list.
4148 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4149 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4150 (kill_one_lwp_callback): Ditto.
4151 (linux_kill): Don't dereference NULL pointer.
4152 Fetch ptid,lwpid from thread.
4153 (get_detach_signal): Fetch ptid from thread.
4154 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4155 Simplify call to regcache_invalidate_thread.
4156 (delete_lwp_callback): Update, "entry" parameter is a
4157 struct thread_info * now. Fetch pid from thread.
4158 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4159 (status_pending_p_callback): Update, "entry" parameter is a
4160 struct thread_info * now. Fetch ptid from thread.
4161 (find_lwp_pid): Update, "entry" parameter is a
4162 struct thread_info * now.
4163 (linux_wait_for_lwp): Fetch pid from thread.
4164 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4165 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4166 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4167 (dequeue_one_deferred_signal): Ditto.
4168 (cancel_breakpoint): Fetch ptid from current_inferior.
4169 (linux_wait_for_event): Pass &all_threads to find_inferior,
4170 not &all_lwps. Fetch ptid, lwpid from thread.
4171 (count_events_callback): Update, "entry" parameter is a
4172 struct thread_info * now.
4173 (select_singlestep_lwp_callback): Ditto.
4174 (select_event_lwp_callback): Ditto.
4175 (cancel_breakpoints_callback): Ditto.
4176 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4177 not &all_lwps.
4178 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4179 (unsuspend_one_lwp): Update, "entry" parameter is a
4180 struct thread_info * now.
4181 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4182 not &all_lwps.
4183 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4184 Fetch lwpid from thread, not lwp.
4185 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4186 Pass &all_threads to find_inferior, not &all_lwps.
4187 (send_sigstop): Fetch lwpid from thread, not lwp.
4188 (send_sigstop_callback): Update, "entry" parameter is a
4189 struct thread_info * now.
4190 (suspend_and_send_sigstop_callback): Ditto.
4191 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4192 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4193 struct thread_info * now.
4194 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4195 from thread, lwp.
4196 (lwp_running): Update, "entry" parameter is a
4197 struct thread_info * now.
4198 (stop_all_lwps): Fetch ptid from thread.
4199 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4200 (linux_resume_one_lwp): Fetch lwpid from thread.
4201 (linux_set_resume_request): Update, "entry" parameter is a
4202 struct thread_info * now. Fetch pid, lwpid from thread.
4203 (resume_status_pending_p): Update, "entry" parameter is a
4204 struct thread_info * now.
4205 (need_step_over_p): Ditto. Fetch lwpid from thread.
4206 (start_step_over): Fetch lwpid from thread.
4207 (linux_resume_one_thread): Update, "entry" parameter is a
4208 struct thread_info * now. Fetch lwpid from thread.
4209 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4210 (proceed_one_lwp): Update, "entry" parameter is a
4211 struct thread_info * now. Fetch lwpid from thread.
4212 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4213 struct thread_info * now.
4214 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4215 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4216 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4217 directly.
4218 (regsets_store_inferior_registers): Ditto.
4219 (fetch_register, store_register): Ditto.
4220 (linux_read_memory, linux_write_memory): Ditto.
4221 (linux_request_interrupt): Ditto.
4222 (linux_read_auxv): Ditto.
4223 (linux_xfer_siginfo): Ditto.
4224 (linux_qxfer_spu): Ditto.
4225 (linux_qxfer_libraries_svr4): Ditto.
4226 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4227 moved to inferiors.h.
4228 (get_lwp): Delete.
4229 (get_thread_lwp): Update.
4230 (struct lwp_info): Delete member "entry". Simplify comment for
4231 member "thread".
4232 (all_lwps): Delete.
4233 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4234 current_inferior directly.
4235 (update_watch_registers_callback): Update, "entry" parameter is a
4236 struct thread_info * now. Fetch pid from thread.
4237 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4238 (mips_insert_point): Fetch lwpid from current_inferior.
4239 Pass &all_threads to find_inferior, not &all_lwps.
4240 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4241 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4242 directly.
4243 (mips_stopped_data_address): Ditto.
4244 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4245 directly.
4246 * linux-tile-low.c (tile_arch_setup): Ditto.
4247 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4248 (update_debug_registers_callback): Update, "entry" parameter is a
4249 struct thread_info * now. Fetch pid from thread.
4250 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4251 Pass &all_threads to find_inferior, not &all_lwps.
4252 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4253 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4254 Pass &all_threads to find_inferior, not &all_lwps.
4255 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4256 (i386_dr_low_get_status): Ditto.
4257 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4258 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4259 (x86_linux_read_description): Ditto.
4260 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4261
3b8361aa
DE
42622014-02-20 Doug Evans <dje@google.com>
4263
4264 * inferiors.c (get_first_inferior): Fix buglet.
4265
f7667f0d
DE
42662014-02-19 Doug Evans <dje@google.com>
4267
4268 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4269 * inferiors.c (add_thread): Change result type to struct thread_info *.
4270 All callers updated.
4271 (add_lwp): Call add_thread here instead of in callers.
4272 All callers updated.
4273 * linux-low.h (get_lwp_thread): Rewrite.
4274 (struct lwp_info): New member "thread".
4275
b3312d80
DE
42762014-02-19 Doug Evans <dje@google.com>
4277
4278 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4279 All callers updated.
4280
ecc6f45c
DE
42812014-02-19 Doug Evans <dje@google.com>
4282
4283 * inferiors.c (add_thread): Fix whitespace.
4284
649ebbca
DE
42852014-02-19 Doug Evans <dje@google.com>
4286
4287 * dll.c (clear_dlls): Replace accessing list implemention details
4288 with API function.
4289 * gdbthread.h (get_first_thread): Declare.
4290 * inferiors.c (for_each_inferior_with_data): New function.
4291 (get_first_thread): New function.
4292 (find_thread_ptid): Simplify.
4293 (get_first_inferior): New function.
4294 (clear_list): Delete.
4295 (one_inferior_p): New function.
4296 (clear_inferior_list): New function.
4297 (clear_inferiors): Update.
4298 * inferiors.h (for_each_inferior_with_data): Declare.
4299 (clear_inferior_list): Declare.
4300 (one_inferior_p): Declare.
4301 (get_first_inferior): Declare.
4302 * linux-low.c (linux_wait_for_event): Replace accessing list
4303 implemention details with API function.
4304 * server.c (target_running): Ditto.
4305 (accumulate_file_name_length): New function.
4306 (emit_dll_description): New function.
4307 (handle_qxfer_libraries): Replace accessing list implemention
4308 details with API function.
4309 (handle_qxfer_threads_worker): New function.
4310 (handle_qxfer_threads_proper): Replace accessing list implemention
4311 details with API function.
4312 (handle_query): Ditto.
4313 (visit_actioned_threads_callback_ftype): New typedef.
4314 (visit_actioned_threads_data): New struct.
4315 (visit_actioned_threads): Rewrite to be find_inferior callback.
4316 (resume): Call find_inferior.
4317 (handle_status): Replace accessing list implemention
4318 details with API function.
4319 (process_serial_event): Replace accessing list implemention details
4320 with API function.
4321 * target.c (set_desired_inferior): Replace accessing list implemention
4322 details with API function.
4323 * tracepoint.c (same_process_p): New function.
4324 (gdb_agent_about_to_close): Replace accessing list implemention
4325 details with API function.
4326 * win32-low.c (child_delete_thread): Replace accessing list
4327 implemention details with API function.
4328 (match_dll_by_basename): New function.
4329 (dll_is_loaded_by_basename): New function.
4330 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4331 details call to dll_is_loaded_by_basename.
4332
80894984
DE
43332014-02-19 Doug Evans <dje@google.com>
4334
4335 * dll.h (struct dll_info): Add comment.
4336 * gdbthread.h (struct thread_info): Add comment.
4337 (current_ptid): Simplify.
4338 * inferiors.c (add_process): Update.
4339 (remove_process): Update.
4340 * inferiors.h (struct process_info): Rename member "head" to "entry".
4341 * linux-low.c (delete_lwp): Update.
4342 (add_lwp): Update.
4343 (last_thread_of_process_p): Update.
4344 (kill_one_lwp_callback, linux_kill): Update.
4345 (status_pending_p_callback): Update.
4346 (wait_for_sigstop): Update. Simplify read of ptid.
4347 (start_step_over): Update.
4348 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4349 (get_lwp_thread): Update.
4350 (struct lwp_info): Rename member "head" to "entry".
4351 * regcache.h (inferior_list_entry): Delete.
4352 * server.c (kill_inferior_callback): Update.
4353 (detach_or_kill_inferior_callback): Update.
4354 (print_started_pid): Update.
4355 (print_attached_pid): Update.
4356 (process_serial_event): Simplify read of ptid.
4357 * thread-db.c (thread_db_create_event): Update.
4358 (thread_db_get_tls_address): Update.
4359 * win32-low.c (current_inferior_ptid): Simplify.
4360
46917d26
TT
43612014-02-19 Tom Tromey <tromey@redhat.com>
4362
4363 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4364 argument.
4365 (target_supports_btrace): Update.
4366
0759a81e
YQ
43672014-02-14 Yao Qi <yao@codesourcery.com>
4368
4369 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4370 (rsp-low-ipa.o): New target.
4371
a7191e8b
TT
43722014-02-12 Tom Tromey <tromey@redhat.com>
4373
4374 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4375 convert_ascii_to_int.
4376 * regcache.c (registers_to_string): Likewise.
4377 * remote-utils.c (decode_M_packet): Likewise.
4378 * server.c (process_serial_event): Likewise.
4379
ff0e980e
TT
43802014-02-12 Tom Tromey <tromey@redhat.com>
4381
4382 * server.c (handle_query, handle_v_run): Use hex2bin, not
4383 unhexify.
4384 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4385
e9371aff
TT
43862014-02-12 Tom Tromey <tromey@redhat.com>
4387
4388 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4389 convert_int_to_ascii.
4390 * regcache.c (registers_to_string, collect_register_as_string):
4391 Likewise.
4392 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4393 Likewise.
4394 * server.c (process_serial_event): Likewise.
4395 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4396 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4397
971dc0b8
TT
43982014-02-12 Tom Tromey <tromey@redhat.com>
4399
4400 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4401 bin2hex, not hexify.
4402 * tracepoint.c (cmd_qtstatus): Likewise.
4403
0a822afb
TT
44042014-02-12 Tom Tromey <tromey@redhat.com>
4405
4406 * remote-utils.c (monitor_output): Pass explicit length to
4407 hexify.
4408
9c3d6531
TT
44092014-02-12 Tom Tromey <tromey@redhat.com>
4410
4411 * tracepoint.c: Include rsp-low.h.
4412 * server.c: Include rsp-low.h.
4413 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4414 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4415 declare.
4416 * remote-utils.c: Include rsp-low.h.
4417 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4418 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4419 (convert_int_to_ascii, convert_ascii_to_int): Move to
4420 common/rsp-low.c.
4421 * regcache.c: Include rsp-low.h.
4422 * ax.c: Include rsp-low.h.
4423 * Makefile.in (SFILES): Add common/rsp-low.c.
4424 (OBS): Add rsp-low.o.
4425 (rsp-low.o): New target.
4426
01fd3ea5
TT
44272014-02-12 Tom Tromey <tromey@redhat.com>
4428
4429 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4430 Include print-utils.h.
4431 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4432 (plongest, thirty_two, phex_nz): Remove.
4433 * Makefile.in (SFILES): Add common/print-utils.c.
4434 (OBS): Add print-utils.o.
4435 (print-utils-ipa.o): New target.
4436 (print-utils.o): New target.
4437 (IPA_OBJS): Add print-utils-ipa.o.
4438
e99dc820
TT
44392014-02-06 Tom Tromey <tromey@redhat.com>
4440
4441 * Makefile.in (SFILES): Fix indentation.
4442
ee1e2d4f
DE
44432014-02-05 Doug Evans <dje@google.com>
4444
4445 * linux-low.c (linux_wait_for_event): Improve comment.
4446 (linux_wait_1): Keep current_inferior in sync with event_child.
4447
f5a02773
DE
44482014-01-22 Doug Evans <dje@google.com>
4449
4450 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4451
87ce2a04
DE
44522014-01-22 Doug Evans <dje@google.com>
4453
4454 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4455 * configure: Regenerate.
4456 * config.in: Regenerate.
4457 * Makefile.in (SFILES): Add debug.c.
4458 (OBS): Add debug.o.
4459 * debug.c: New file.
4460 * debug.h: New file.
4461 * linux-aarch64-low.c (*): Update all debugging printfs to use
4462 debug_printf instead of fprintf.
4463 * linux-arm-low.c (*): Ditto.
4464 * linux-cris-low.c (*): Ditto.
4465 * linux-crisv32-low.c (*): Ditto.
4466 * linux-m32r-low.c (*): Ditto.
4467 * linux-sparc-low.c (*): Ditto.
4468 * linux-x86.c (*): Ditto.
4469 * linux-low.c (*): Ditto.
4470 (linux_wait_1): Add calls to debug_enter, debug_exit.
4471 (linux_wait): Remove redundant debugging printf.
4472 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4473 (linux_resume, unstop_all_lwps): Ditto.
4474 * mem-break.c (*): Update all debugging printfs to use
4475 debug_printf instead of fprintf.
4476 * remote-utils.c (*): Ditto.
4477 * thread-db.c (*): Ditto.
4478 * server.c #include <ctype.h>, "gdb_vecs.h".
4479 (debug_threads): Moved to debug.c.
4480 (*): Update all debugging printfs to use debug_printf instead of
4481 fprintf.
4482 (start_inferior): Replace call to fflush with call to debug_flush.
4483 (monitor_show_help): Mention set debug-format.
4484 (parse_debug_format_options): New function.
4485 (handle_monitor_command): Handle "monitor set debug-format".
4486 (gdbserver_usage): Mention --debug-format.
4487 (main): Parse --debug-format.
4488 * server.h (debug_threads): Declaration moved to debug.h.
4489 #include "debug.h".
4490 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4491 trace_debug_1 that uses debug_printf.
4492 (tracepoint_look_up_symbols): Update all debugging printfs to use
4493 debug_printf instead of fprintf.
4494
e671835b
BS
44952014-01-20 Baruch Siach <baruch@tkos.co.il>
4496
4497 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4498 sys/ptrace.h.
4499
b5737fa9
PA
45002014-01-17 Pedro Alves <palves@redhat.com>
4501
ea38d2a9 4502 PR build/16445
c7faa97a
PA
4503 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4504 defined after including gdb_proc_service.h.
b5737fa9 4505
40ed484e
DE
45062014-01-16 Doug Evans <dje@google.com>
4507
4508 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4509 (match_dll): Use it.
4510
969c39fb
MM
45112014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4512
4513 * target.h (target_ops) <read_btrace>: Change parameters and
4514 return type to allow error reporting.
4515 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4516 trace reading errors on.
4517 * linux-low.c (linux_low_read_btrace): Pass trace reading
4518 errors on.
4519 (linux_low_disable_btrace): New.
4520
ab7f45ba
DE
45212014-01-15 Doug Evans <dje@google.com>
4522
4523 * inferiors.c (thread_id_to_gdb_id): Delete.
4524 * inferiors.h (thread_id_to_gdb_id): Delete.
4525
66af0f44
EZ
45262014-01-13 Eli Zaretskii <eliz@gnu.org>
4527
4528 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4529 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4530 versions.
4531
9939e131
PA
45322014-01-08 Pedro Alves <palves@redhat.com>
4533
4534 * server.c (handle_status): Don't discard previous queued stop
4535 replies or thread's pending status here.
4536 (main) <disconnection>: Do it here instead.
4537
b7ea362b
PA
45382014-01-08 Pedro Alves <palves@redhat.com>
4539
4540 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4541 * server.c (visit_actioned_threads, handle_pending_status): New
4542 function.
4543 (handle_v_cont): Factor out parts to ...
4544 (resume): ... this new function. If in all-stop, and a thread
4545 being resumed has a pending status, report it without actually
4546 resuming.
4547 (myresume): Adjust to use the new 'resume' function.
4548 (clear_pending_status_callback, set_pending_status_callback)
4549 (find_status_pending_thread_callback): New functions.
4550 (handle_status): Handle the case of multiple threads having
4551 interesting statuses to report. Report threads' real last signal
4552 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4553 with an interesting thread to report the status for, instead of
4554 always reporting the status of the first thread.
4555
28498c42
JB
45562014-01-01 Joel Brobecker <brobecker@adacore.com>
4557
4558 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4559 * gdbreplay.c (gdbreplay_version): Likewise.
4560
f45c82da
YZ
45612013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4562
4563 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4564 iov.iov_len with the real length in use.
4565
379a5e2d
JB
45662013-12-13 Joel Brobecker <brobecker@adacore.com>
4567
4568 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4569 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4570 for all targets that use win32-low.c.
4571 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4572 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4573
4210d83e
PA
45742013-12-13 Pedro Alves <palves@redhat.com>
4575
4576 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4577 if equal to TARGET_WAITKIND_LOADED.
4578 * win32-low.c (cached_status): New static global.
4579 (win32_wait): Add declaration.
4580 (do_initial_child_stuff): Flush all initial pending debug events
4581 up to the initial breakpoint.
4582 (win32_wait): If CACHED_STATUS was set, return that instead
4583 of doing a real wait. Remove the code resuming the execution
4584 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4585 during the initial phase. Also remove the code changing
4586 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4587 TARGET_WAITKIND_STOPPED.
4588
e7f0d979
YQ
45892013-12-11 Yao Qi <yao@codesourcery.com>
4590
4591 * notif.c (handle_notif_ack): Return 0 if no notification
4592 matches.
4593
ebcf782c
DE
45942013-11-20 Doug Evans <dje@google.com>
4595
4596 * linux-low.c (linux_set_resume_request): Fix comment.
4597
20ad9378
DE
45982013-11-20 Doug Evans <dje@google.com>
4599
4600 * linux-low.c (resume_status_pending_p): Tweak comment.
4601
a196ebeb
WT
46022013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4603
4604 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4605 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4606 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4607 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4608 (srv_amd64_regobj): Add amd64-mpx.o.
4609 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4610 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4611 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4612 * i387-fp.c (num_pl_bnd_register) Added constant.
4613 (num_pl_bnd_cfg_registers) Added constant.
4614 (struct i387_xsave) Added reserved area and MPX fields.
4615 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4616 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4617 function.
4618 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4619 (init_registers_amd64_mpx_linux): Declare new function.
4620 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4621 (x86_64_regmap): Add MPX registers.
4622 (x86_linux_read_description): Add MPX case.
4623 (initialize_low_arch): Initialize MPX targets.
4624
0080a2f6
TT
46252013-11-18 Tom Tromey <tromey@redhat.com>
4626
4627 * configure: Rebuild.
4628 * configure.ac: Don't check for stdlib.h.
4629 * gdbreplay.c: Unconditionally include stdlib.h.
4630
2978b111
TT
46312013-11-18 Tom Tromey <tromey@redhat.com>
4632
4633 * config.in: Rebuild.
4634 * configure: Rebuild.
4635 * configure.ac: Don't use AC_HEADER_DIRENT.
4636
a3d08894
TT
46372013-11-18 Tom Tromey <tromey@redhat.com>
4638
4639 * server.h: Don't check HAVE_STRING_H.
4640 * gdbreplay.c: Don't check HAVE_STRING_H.
4641 * configure: Rebuild.
4642
0a5dd17d
TT
46432013-11-18 Tom Tromey <tromey@redhat.com>
4644
4645 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4646 LIBGNU.
4647
1bd2f0ba
TT
46482013-11-08 Tom Tromey <tromey@redhat.com>
4649
4650 * configure, config.in: Rebuild.
4651 * configure.ac: Remove unused configury.
4652
3266f10b
TT
46532013-11-08 Tom Tromey <tromey@redhat.com>
4654
4655 * acinclude.m4: Include common.m4, codeset.m4.
4656 * configure, config.in: Rebuild.
4657 * configure.ac: Use GDB_AC_COMMON.
4658
6682d959
AA
46592013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4660
4661 * linux-s390-low.c (HWCAP_S390_TE): New define.
4662 (s390_arch_setup): Consider the TE field in the HWCAP for
4663 determining 'have_regset_tdb'.
4664
fd0a4d76
SDJ
46652013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4666
4667 PR gdb/16014
4668 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4669 call to sizeof.
4670
1a3d890b
PA
46712013-10-02 Pedro Alves <palves@redhat.com>
4672
4673 * server.c (process_serial_event): Don't output "GDBserver
4674 exiting" if GDB is connected through stdio.
4675 * target.c (mywait): Likewise, be silent if GDB is connected
4676 through stdio.
4677
97ad4581
JB
46782013-10-01 Joel Brobecker <brobecker@adacore.com>
4679
4680 * lynx-low.c (lynx_add_threads_after_attach): New function.
4681 (lynx_attach): Remove call to add_thread. Add call to
4682 lynx_add_threads_after_attach instead.
4683
5b4e221c
MF
46842013-09-28 Mike Frysinger <vapier@gentoo.org>
4685
4686 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4687 * config.in, configure: Regenerated.
4688
ee47b2f8
YQ
46892013-09-18 Yao Qi <yao@codesourcery.com>
4690
4691 PR server/15959
4692 * server.c (start_inferior): Clear 'resume_info'.
4693
d6707650 46942013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4695
d6707650
JW
4696 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4697 for each register.
4698
9243dd0e 46992013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4700
9243dd0e
JW
4701 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4702 linux-tile-low.o to srv_tgtobj.
4703
c623a6ef
WN
47042013-09-16 Will Newton <will.newton@linaro.org>
4705
4706 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4707 out regs.
4708
fb71d39e
PA
47092013-09-06 Pedro Alves <palves@redhat.com>
4710
4711 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4712 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4713 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4714 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4715 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4716 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4717
8e7e9910
PA
47182013-09-06 Pedro Alves <palves@redhat.com>
4719
4720 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4721 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4722
7c3a12ca
PA
47232013-09-06 Pedro Alves <palves@redhat.com>
4724
4725 * linux-amd64-ipa.c: Include tracepoint.h.
4726 * linux-i386-ipa.c: Include tracepoint.h.
4727
8eb3d7b6
RW
47282013-09-06 Ricard Wanderlof <ricardw@axis.com>
4729
4730 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4731 (ps_get_thread_area): New function.
4732
eddddb9d
RW
47332013-09-06 Ricard Wanderlof <ricardw@axis.com>
4734
4735 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4736 (initialize_low_arch): Call init_registers_crisv32 rather than
4737 init_register_crisv32.
4738
533b0600
PA
47392013-09-05 Pedro Alves <palves@redhat.com>
4740
4741 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4742 to ...
4743 * hostio.h: ... this new file.
4744 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4745 win32-low.c: Include hostio.h.
4746
0ce3d3b5
PA
47472013-09-05 Pedro Alves <palves@redhat.com>
4748
4749 * server.h (gdb_client_data, handler_func, callback_handler_func)
4750 (delete_file_handler, add_file_handler, append_callback_event)
4751 (delete_callback_event, start_event_loop, initialize_event_loop):
4752 Move to event-loop.h and include it.
4753 * event-loop.h: New file.
4754
799cdc37
PA
47552013-09-05 Pedro Alves <palves@redhat.com>
4756
4757 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4758 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4759 (loaded_dll, unloaded_dll): Move to ...
4760 * dll.h: ... this new file.
4761 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4762
6a6bbd9d
PA
47632013-09-05 Pedro Alves <palves@redhat.com>
4764
4765 * server.h (current_process, get_thread_process, all_processes)
4766 (add_inferior_to_list, for_each_inferior, current_inferior)
4767 (remove_inferior, add_process, remove_process, find_process_pid)
4768 (have_started_inferiors_p, have_attached_inferiors_p)
4769 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4770 (clear_inferiors, find_inferior, find_inferior_id)
4771 (inferior_target_data, set_inferior_target_data)
4772 (inferior_regcache_data, set_inferior_regcache_data): Move to
4773 inferiors.h, and include it.
4774 * inferiors.h: New file.
4775
f699aaba
PA
47762013-09-05 Pedro Alves <palves@redhat.com>
4777
4778 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4779 Move ...
72f4393d 4780 * ax.h: ... here.
f699aaba 4781
c144c7a0
PA
47822013-09-05 Pedro Alves <palves@redhat.com>
4783
4784 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4785 tracepoint.h.
4786 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4787 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4788 (handle_tracepoint_general_set, handle_tracepoint_query)
4789 (tracepoint_finished_step, tracepoint_was_hit)
4790 (release_while_stepping_state_list, current_traceframe)
4791 (in_readonly_region, traceframe_read_mem)
4792 (fetch_traceframe_registers, traceframe_read_sdata)
4793 (traceframe_read_info, struct fast_tpoint_collect_status)
4794 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4795 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4796 (supply_fast_tracepoint_registers)
4797 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4798 (ipa_tdesc, claim_trampoline_space)
4799 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4800 (agent_mem_read, agent_get_trace_state_variable_value)
4801 (agent_set_trace_state_variable_value, agent_tsv_read)
4802 (agent_mem_read_string, get_raw_reg_func_addr)
4803 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4804 * tracepoint.h: ... this new file.
4805
ff42e6ab
PA
48062013-09-05 Pedro Alves <palves@redhat.com>
4807
4808 * server.h (perror_with_name, error, fatal, warning, paddress)
4809 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4810 include it.
4811 * utils.h: New file.
4812
541af0f4
PA
48132013-09-05 Pedro Alves <palves@redhat.com>
4814
4815 * server.h (remote_debug, noack_mode, transport_is_reliable)
4816 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4817 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4818 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4819 (write_enn, initialize_async_io, enable_async_io)
4820 (disable_async_io, check_remote_input_interrupt_request)
4821 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4822 (dead_thread_notify, prepare_resume_reply)
4823 (decode_address_to_semicolon, decode_address, decode_m_packet)
4824 (decode_M_packet, decode_X_packet, decode_xfer_write)
4825 (decode_search_memory_packet, unhexify, hexify)
4826 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4827 (look_up_one_symbol, relocate_instruction)
4828 (monitor_output): Move to remote-utils.h, and include it.
4829 * remote-utils.h: New file.
4830
eebdf26b
PA
48312013-09-05 Pedro Alves <palves@redhat.com>
4832
4833 * server.h (_): Delete.
4834
3aafd2ff
PA
48352013-09-02 Pedro Alves <palves@redhat.com>
4836
4837 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4838 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4839 allocated.
4840 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4841
cee83bcb
PM
48422013-09-02 Pierre Muller <muller@sourceware.org>
4843
4844 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4845 or WriteProcessMemory complete successfully and handle
4846 ERROR_PARTIAL_COPY error.
4847
9a13b2fa
PA
48482013-09-02 Pedro Alves <palves@redhat.com>
4849
4850 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4851 error instead of EIO.
4852
602e3198
JK
48532013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4854
4855 PR server/15604
4856 * linux-low.c: Include filestuff.h.
4857 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4858 * lynx-low.c: Include filestuff.h.
4859 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4860 * server.c: Include filestuff.h.
4861 (main): Call notice_open_fds.
4862 * spu-low.c: Include filestuff.h.
4863 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4864
96d7229d
LM
48652013-08-22 Luis Machado <lgustavo@codesourcery.com>
4866
4867 * Makefile.in: Explain why ../target and ../nat are not
4868 listed as include file search paths.
4869 (linux-waitpid.o): New object file rule.
4870 * configure.srv (srv_native_linux_obj): New variable.
4871 Replace all occurrences of linux native object files with
4872 $srv_native_linux_obj.
4873 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4874 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4875 (linux_enable_event_reporting): Remove declaration.
4876 (my_waitpid): Moved to common/linux-waitpid.c.
4877 (linux_wait_for_event): Pass ptid when calling
4878 linux_enable_event_reporting.
4879 (linux_supports_tracefork_flag): Remove.
4880 (linux_enable_event_reporting): Likewise.
4881 (linux_tracefork_grandchild): Remove.
4882 (STACK_SIZE): Moved to common/linux-ptrace.c.
4883 (linux_tracefork_child): Remove.
4884 (linux_test_for_tracefork): Remove.
4885 (linux_look_up_symbols): Call linux_supports_traceclone.
4886 (initialize_low): Remove call to linux_test_for_tracefork.
4887 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4888 common/linux-ptrace.h.
4889 (PTRACE_TYPE_ARG4): Likewise.
4890 Include linux-ptrace.h.
4891
32940073
PA
48922013-08-21 Pedro Alves <palves@redhat.com>
4893
4894 * config.in: Renegerate.
4895
33b60d58 48962013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4897
33b60d58
LM
4898 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4899 (SFILES): Remove $(srcdir)/common/target-common.c and
4900 add $(srcdir)/target/waitstatus.c.
4901 (OBS): Remove target-common.o and add waitstatus.o.
4902 (server_h): Remove $(srcdir)/../common/target-common.h and
4903 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4904 and $(srcdir)/../target/waitstatus.h.
4905 (target-common.o): Remove.
4906 (waitstatus.o): New target object file.
4907 * target.h: Do not include target-common.h and
4908 include target/resume.h, target/wait.h and
4909 target/waitstatus.h.
4910
b8e1b30e
LM
49112013-08-13 Luis Machado <lgustavo@codesourcery.com>
4912
4913 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4914 to PTRACE_TYPE_ARG3.
4915 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4916 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4917 PTRACE_TYPE_ARG4.
4918 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4919 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4920
7a60ad40
YQ
49212013-07-27 Jie Zhang <jie@codesourcery.com>
4922 Daniel Jacobowitz <dan@codesourcery.com>
4923 Yao Qi <yao@codesourcery.com>
4924
4925 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4926 (mips-linux-watch.o): New rule.
4927 (mips_linux_watch_h): New variable.
4928 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4929 srv_tgtobj.
4930 * linux-mips-low.c: Include mips-linux-watch.h.
4931 (struct arch_process_info, struct arch_lwp_info): New.
4932 (update_watch_registers_callback): New function.
4933 (mips_linux_new_process, mips_linux_new_thread) New functions.
4934 (mips_linux_prepare_to_resume, mips_insert_point): New
4935 functions.
4936 (mips_remove_point, mips_stopped_by_watchpoint): New
4937 functions.
4938 (rsp_bp_type_to_target_hw_bp_type): New function.
4939 (mips_stopped_data_address): New function.
4940 (the_low_target): Add watchpoint support functions.
4941
de6f69ad
YQ
49422013-07-27 Yao Qi <yao@codesourcery.com>
4943
4944 * i386-low.c: Include break-common.h.
4945 (enum target_hw_bp_type): Remove.
4946
3360c0bf
LM
49472013-07-24 Luis Machado <lgustavo@codesourcery.com>
4948
4949 * Makefile.in (SFILES): /common/target-common.c.
4950 (OBS): Add target-common.o.
4951 (server_h): Add $(srcdir)/../common/target-common.h.
4952 (target-common.o): New target.
4953 * server.c (queue_stop_reply_callback): Free
4954 status string after use.
4955 * target.c (target_waitstatus_to_string): Remove.
4956 * target.h: Include target-common.h.
4957 (resume_kind): Likewise.
4958 (target_waitkind): Likewise.
4959 (target_waitstatus): Likewise.
4960 (TARGET_WNOHANG): Likewise.
4961
bd885420
YQ
49622013-07-04 Yao Qi <yao@codesourcery.com>
4963
4964 * Makefile.in (host_alias): Use @host_noncanonical@.
4965 (target_alias): Use @target_noncanonical@.
4966 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4967 ACX_NONCANONICAL_HOST.
4968 * configure: Regenerated.
4969
4970 Revert:
4971 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4972
4973 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4974 * configure: Rebuild.
4975 * Makefile.in (version_host, version_target): Get from configure.
4976 (version.c): Use $(version_host) and $(version_target).
4977
17ef446e
PA
49782013-07-03 Pedro Alves <palves@redhat.com>
4979
4980 * Makefile.in (config.status): Depend on development.sh.
4981 * acinclude.m4: Include libmcheck.m4.
4982 * configure: Regenerate.
4983
7a9a7487
MG
49842013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4985
4986 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4987 attribute inside the parentheses.
4988 (winapi_DebugSetProcessKillOnExit): Ditto.
4989 (winapi_DebugBreakProcess): Ditto.
4990 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4991
49b64de6
MG
49922013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4993
4994 * notif.h (notif_event): Add a dummy member to avoid compiler
4995 errors.
4996
d5749ee7
PA
49972013-07-01 Pedro Alves <palves@redhat.com>
4998
4999 * hostio.c (HOSTIO_PATH_MAX): Define.
5000 (require_filename, handle_open, handle_unlink, handle_readlink):
5001 Use it.
5002
d8d2a3ee
PA
50032013-07-01 Pedro Alves <palves@redhat.com>
5004
5005 * server.h: Include "pathmax.h".
5006 * linux-low.c: Don't include sys/param.h.
5007 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5008 MAXPATHLEN.
5009 * win32-low.c: Don't include sys/param.h.
5010 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5011
bc7dea8d
PA
50122013-07-01 Pedro Alves <palves@redhat.com>
5013
5014 * event-loop.c: Don't check HAVE_UNISTD_H before including
5015 <unistd.h>.
5016 * gdbreplay.c: Likewise.
5017 * remote-utils.c: Likewise.
5018 * server.c: Likewise.
5019 * configure.ac: Don't check for unistd.h.
5020 * configure: Regenerate.
5021
d6c2da54
TT
50222013-06-28 Tom Tromey <tromey@redhat.com>
5023
5024 * Makefile.in (version.c): Use version.in, not
5025 common/version.in.
5026
257b6bec
MG
50272013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5028
5029 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5030 * configure: Rebuild.
5031 * Makefile.in (version_host, version_target): Get from configure.
5032 (version.c): Use $(version_host) and $(version_target).
5033
86ebe149
DK
50342013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5035
5036 Fix trace-status to output user name without trailing colon.
5037 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5038
f30aa5af
DK
50392013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5040
5041 Fix trace-status to output proper start-time and stop-time.
5042 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5043 output start time and stop time in hex as gdb expects.
5044
28a93511
YQ
50452013-06-26 Pedro Alves <pedro@codesourcery.com>
5046
5047 * tracepoint.c (build_traceframe_info_xml): Output trace state
5048 variables present in the trace buffer.
5049
01208463
TT
50502013-06-24 Tom Tromey <tromey@redhat.com>
5051
5052 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5053 create-version.sh.
5054 (version.o): Remove.
5055 * gdbreplay.c: Include version.h.
5056 (version, host_name): Don't declare.
5057 * server.h: Include version.h.
5058 (version, host_name): Don't declare.
5059
760256f9
PA
50602013-06-12 Pedro Alves <palves@redhat.com>
5061
5062 * linux-x86-low.c (linux_is_elf64): Delete global.
5063 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5064 with local linux_pid_exe_is_elf_64_file use.
5065
030031ee
PA
50662013-06-11 Pedro Alves <palves@redhat.com>
5067
5068 * linux-low.c (regset_disabled, disable_regset): New functions.
5069 (regsets_fetch_inferior_registers)
5070 (regsets_store_inferior_registers): Use them.
5071 (initialize_regsets_info); Don't allocate the disabled_regsets
5072 array here.
5073 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5074 comment.
5075
5da6eb0a
PA
50762013-06-11 Pedro Alves <palves@redhat.com>
5077
5078 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5079 xmalloc.
5080
7e5aaa09
PA
50812013-06-11 Pedro Alves <palves@redhat.com>
5082
5083 * linux-x86-low.c (initialize_low_arch): Call
5084 init_registers_x32_avx_linux.
5085
d878444c
JK
50862013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5087
5088 Fix compatibility with Android Bionic.
5089 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5090 it is not empty.
5091
3aee8918
PA
50922013-06-07 Pedro Alves <palves@redhat.com>
5093
5f2b57b5 5094 PR server/14823
3aee8918
PA
5095 * Makefile.in (OBS): Add tdesc.o.
5096 (IPA_OBJS): Add tdesc-ipa.o.
5097 (tdesc-ipa.o): New rule.
5098 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5099 interface.
5100 * linux-low.c (new_inferior): Delete.
5101 (disabled_regsets, num_regsets): Delete.
5102 (linux_add_process): Adjust to set the new per-process
5103 new_inferior flag.
5104 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5105 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5106 was a stop. When calling arch_setup, switch the current inferior
5107 to the thread that got an event.
5108 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5109 (regsets_fetch_inferior_registers)
5110 (regsets_store_inferior_registers): New regsets_info parameter.
5111 Adjust to use it.
5112 (linux_register_in_regsets): New regs_info parameter. Adjust to
5113 use it.
5114 (register_addr, fetch_register, store_register): New usrregs_info
5115 parameter. Adjust to use it.
5116 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5117 parameter regs_info. Adjust to use it.
5118 (linux_fetch_registers): Get the current inferior's regs_info, and
5119 adjust to use it.
5120 (linux_store_registers): Ditto.
5121 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5122 (initialize_low): Don't initialize the target_regsets here. Call
5123 initialize_low_arch.
5124 * linux-low.h (target_regsets): Delete declaration.
5125 (struct regsets_info): New.
5126 (struct usrregs_info): New.
5127 (struct regs_info): New.
5128 (struct process_info_private) <new_inferior>: New field.
5129 (struct linux_target_ops): Delete the num_regs, regmap, and
5130 regset_bitmap fields. New field regs_info.
5131 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5132 * i387-fp.c (num_xmm_registers): Delete.
5133 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5134 calls to new interface.
5135 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5136 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5137 Infer the number of xmm registers from the regcache's target
5138 description.
5139 * i387-fp.h (num_xmm_registers): Delete.
5140 * inferiors.c (add_thread): Don't install the thread's regcache
5141 here.
5142 * proc-service.c (gregset_info): Fetch the current inferior's
5143 regs_info. Adjust to use it.
5144 * regcache.c: Include tdesc.h.
5145 (register_bytes, reg_defs, num_registers)
5146 (gdbserver_expedite_regs): Delete.
5147 (get_thread_regcache): If the thread doesn't have a regcache yet,
5148 create one, instead of aborting gdbserver.
5149 (regcache_invalidate_one): Rename to ...
5150 (regcache_invalidate_thread): ... this.
5151 (regcache_invalidate_one): New.
5152 (regcache_invalidate): Only invalidate registers of the current
5153 process.
5154 (init_register_cache): Add target_desc parameter, and use it.
5155 (new_register_cache): Ditto. Assert the target description has a
5156 non zero registers_size.
5157 (regcache_cpy): Add assertions. Adjust.
5158 (realloc_register_cache, set_register_cache): Delete.
5159 (registers_to_string, registers_from_string): Adjust.
5160 (find_register_by_name, find_regno, find_register_by_number)
5161 (register_cache_size): Add target_desc parameter, and use it.
5162 (free_register_cache_thread, free_register_cache_thread_one)
5163 (regcache_release, register_cache_size): New.
5164 (register_size): Add target_desc parameter, and use it.
5165 (register_data, supply_register, supply_register_zeroed)
5166 (supply_regblock, supply_register_by_name, collect_register)
5167 (collect_register_as_string, collect_register_by_name): Adjust.
5168 * regcache.h (struct target_desc): Forward declare.
5169 (struct regcache) <tdesc>: New field.
5170 (init_register_cache, new_register_cache): Add target_desc
5171 parameter.
5172 (regcache_invalidate_thread): Declare.
5173 (regcache_invalidate_one): Delete declaration.
5174 (regcache_release): Declare.
5175 (find_register_by_number, register_cache_size, register_size)
5176 (find_regno): Add target_desc parameter.
5177 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5178 declarations.
5179 * remote-utils.c: Include tdesc.h.
5180 (outreg, prepare_resume_reply): Adjust.
5181 * server.c: Include tdesc.h.
5182 (gdbserver_xmltarget): Delete declaration.
5183 (get_features_xml, process_serial_event): Adjust.
5184 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5185 declare.
5186 (struct process_info) <tdesc>: New field.
5187 (ipa_tdesc): Declare.
5188 * tdesc.c: New file.
5189 * tdesc.h: New file.
5190 * tracepoint.c: Include tdesc.h.
5191 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5192 (get_context_regcache): Adjust to pass ipa_tdesc down.
5193 (do_action_at_tracepoint): Adjust to get the register cache size
5194 from the context regcache's description.
5195 (traceframe_walk_blocks): Adjust to get the register cache size
5196 from the current trace frame's description.
5197 (traceframe_get_pc): Adjust to get current trace frame's
5198 description and pass it down.
5199 (gdb_collect): Adjust to get the register cache size from the
5200 IPA's description.
5201 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5202 (gdbserver_xmltarget): Delete.
5203 (initialize_low_tracepoint): Set the ipa's target description.
5204 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5205 (initialize_low_tracepoint): Set the ipa's target description.
5206 * linux-x86-low.c: Include tdesc.h.
5207 [__x86_64__] (is_64bit_tdesc): New.
5208 (ps_get_thread_area, x86_get_thread_area): Use it.
5209 (i386_cannot_store_register): Rename to ...
5210 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5211 (i386_cannot_fetch_register): Rename to ...
5212 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5213 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5214 to new interface.
5215 (target_regsets): Rename to ...
5216 (x86_regsets): ... this.
5217 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5218 interface.
5219 (x86_siginfo_fixup): Use is_64bit_tdesc.
5220 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5221 (tdesc_x32_avx_linux, tdesc_x32_linux)
5222 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5223 Declare.
5224 (x86_linux_update_xmltarget): Delete.
5225 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5226 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5227 (AMD64_LINUX_USER64_CS): New.
5228 (x86_linux_read_description): New, based on
5229 x86_linux_update_xmltarget.
5230 (same_process_callback): New.
5231 (x86_arch_setup_process_callback): New.
5232 (x86_linux_update_xmltarget): New.
5233 (x86_regsets_info): New.
5234 (amd64_linux_regs_info): New.
5235 (i386_linux_usrregs_info): New.
5236 (i386_linux_regs_info): New.
5237 (x86_linux_regs_info): New.
5238 (x86_arch_setup): Reimplement.
5239 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5240 (x86_emit_ops): Ditto.
5241 (the_low_target): Adjust. Install x86_linux_regs_info,
5242 x86_cannot_fetch_register, and x86_cannot_store_register.
5243 (initialize_low_arch): New.
5244 * linux-ia64-low.c (tdesc_ia64): Declare.
5245 (ia64_fetch_register): Adjust.
5246 (ia64_usrregs_info, regs_info): New globals.
5247 (ia64_regs_info): New function.
5248 (the_low_target): Adjust.
5249 (initialize_low_arch): New function.
5250 * linux-sparc-low.c (tdesc_sparc64): Declare.
5251 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5252 Adjust.
5253 (sparc_arch_setup): New function.
5254 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5255 (the_low_target): Adjust.
5256 (initialize_low_arch): New function.
5257 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5258 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5259 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5260 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5261 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5262 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5263 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5264 (tdesc_powerpc_isa205_vsx64l): Declare.
5265 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5266 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5267 (ppc_set_pc, ppc_get_hwcap): Adjust.
5268 (ppc_usrregs_info): Forward declare.
5269 (!__powerpc64__) ppc_regmap_adjusted: New global.
5270 (ppc_arch_setup): Adjust to the current process'es target
5271 description.
5272 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5273 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5274 (ppc_store_evrregset): Adjust.
5275 (target_regsets): Rename to ...
5276 (ppc_regsets): ... this, and make static.
5277 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5278 (ppc_regs_info): New function.
5279 (the_low_target): Adjust.
5280 (initialize_low_arch): New function.
5281 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5282 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5283 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5284 (tdesc_s390x_linux64v2): Declare.
5285 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5286 (s390_fill_gregset, s390_store_last_break): Adjust.
5287 (target_regsets): Rename to ...
5288 (s390_regsets): ... this, and make static.
5289 (s390_get_pc, s390_set_pc): Adjust.
5290 (s390_get_hwcap): New target_desc parameter, and use it.
5291 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5292 (s390_arch_setup): Adjust to set the current process'es target
5293 description. Don't adjust the regmap.
5294 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5295 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5296 (regs_info_3264): New globals.
5297 (s390_regs_info): New function.
5298 (the_low_target): Adjust.
5299 (initialize_low_arch): New function.
5300 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5301 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5302 [__mips64] (init_registers_mips_linux)
5303 (init_registers_mips_dsp_linux): Delete defines.
5304 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5305 (have_dsp): New global.
5306 (mips_read_description): New, based on mips_arch_setup.
5307 (mips_arch_setup): Reimplement.
5308 (get_usrregs_info): New function.
5309 (mips_cannot_fetch_register, mips_cannot_store_register)
5310 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5311 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5312 (target_regsets): Rename to ...
5313 (mips_regsets): ... this, and make static.
5314 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5315 (dsp_regs_info, regs_info): New globals.
5316 (mips_regs_info): New function.
5317 (the_low_target): Adjust.
5318 (initialize_low_arch): New function.
5319 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5320 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5321 Declare.
5322 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5323 (arm_read_description): New, with bits factored from
5324 arm_arch_setup.
5325 (arm_arch_setup): Reimplement.
5326 (target_regsets): Rename to ...
5327 (arm_regsets): ... this, and make static.
5328 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5329 (arm_regs_info): New function.
5330 (the_low_target): Adjust.
5331 (initialize_low_arch): New function.
5332 * linux-m68k-low.c (tdesc_m68k): Declare.
5333 (target_regsets): Rename to ...
5334 (m68k_regsets): ... this, and make static.
5335 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5336 (m68k_regs_info): New function.
5337 (m68k_arch_setup): New function.
5338 (the_low_target): Adjust.
5339 (initialize_low_arch): New function.
5340 * linux-sh-low.c (tdesc_sharch): Declare.
5341 (target_regsets): Rename to ...
5342 (sh_regsets): ... this, and make static.
5343 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5344 (sh_regs_info, sh_arch_setup): New functions.
5345 (the_low_target): Adjust.
5346 (initialize_low_arch): New function.
5347 * linux-bfin-low.c (tdesc_bfin): Declare.
5348 (bfin_arch_setup): New function.
5349 (bfin_usrregs_info, regs_info): New globals.
5350 (bfin_regs_info): New function.
5351 (the_low_target): Adjust.
5352 (initialize_low_arch): New function.
5353 * linux-cris-low.c (tdesc_cris): Declare.
5354 (cris_arch_setup): New function.
5355 (cris_usrregs_info, regs_info): New globals.
5356 (cris_regs_info): New function.
5357 (the_low_target): Adjust.
5358 (initialize_low_arch): New function.
5359 * linux-cris-low.c (tdesc_crisv32): Declare.
5360 (cris_arch_setup): New function.
5361 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5362 (cris_regs_info): New function.
5363 (the_low_target): Adjust.
5364 (initialize_low_arch): New function.
5365 * linux-m32r-low.c (tdesc_m32r): Declare.
5366 (m32r_arch_setup): New function.
5367 (m32r_usrregs_info, regs_info): New globals.
5368 (m32r_regs_info): Adjust.
5369 (initialize_low_arch): New function.
5370 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5371 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5372 (tic6x_usrregs_info): Forward declare.
5373 (tic6x_read_description): New function, based on ...
5374 (tic6x_arch_setup): ... this. Reimplement.
5375 (target_regsets): Rename to ...
5376 (tic6x_regsets): ... this, and make static.
5377 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5378 (tic6x_regs_info): New function.
5379 (the_low_target): Adjust.
5380 (initialize_low_arch): New function.
5381 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5382 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5383 (target_regsets): Rename to ...
5384 (xtensa_regsets): ... this, and make static.
5385 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5386 globals.
5387 (xtensa_arch_setup, xtensa_regs_info): New functions.
5388 (the_low_target): Adjust.
5389 (initialize_low_arch): New function.
5390 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5391 (nios2_arch_setup): Set the current process'es tdesc.
5392 (target_regsets): Rename to ...
5393 (nios2_regsets): ... this.
5394 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5395 (nios2_regs_info): New function.
5396 (the_low_target): Adjust.
5397 (initialize_low_arch): New function.
a261b8f5
PA
5398 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5399 (aarch64_arch_setup): Set the current process'es tdesc.
5400 (target_regsets): Rename to ...
5401 (aarch64_regsets): ... this.
5402 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5403 (aarch64_regs_info): New function.
5404 (the_low_target): Adjust.
5405 (initialize_low_arch): New function.
3aee8918
PA
5406 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5407 globals.
5408 (target_regsets): Rename to ...
5409 (tile_regsets): ... this.
5410 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5411 (tile_regs_info): New function.
5412 (tile_arch_setup): Set the current process'es tdesc.
5413 (the_low_target): Adjust.
5414 (initialize_low_arch): New function.
5415 * spu-low.c (tdesc_spu): Declare.
5416 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5417 * win32-arm-low.c (tdesc_arm): Declare.
5418 (arm_arch_setup): New function.
5419 (the_low_target): Install arm_arch_setup instead of
5420 init_registers_arm.
5421 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5422 (init_windows_x86): Rename to ...
5423 (i386_arch_setup): ... this. Set `win32_tdesc'.
5424 (the_low_target): Adjust.
5425 * win32-low.c (win32_tdesc): New global.
5426 (child_add_thread): Don't create the thread cache here.
5427 (do_initial_child_stuff): Set the new process'es tdesc.
5428 * win32-low.h (struct target_desc): Forward declare.
5429 (win32_tdesc): Declare.
5430 * lynx-i386-low.c (tdesc_i386): Declare global.
5431 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5432 * lynx-low.c (lynx_tdesc): New global.
5433 (lynx_add_process): Set the new process'es tdesc.
5434 * lynx-low.h (struct target_desc): Forward declare.
5435 (lynx_tdesc): Declare global.
5436 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5437 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5438 * nto-low.c (nto_tdesc): New global.
5439 (do_attach): Set the new process'es tdesc.
5440 * nto-low.h (struct target_desc): Forward declare.
5441 (nto_tdesc): Declare.
5442 * nto-x86-low.c (tdesc_i386): Declare.
5443 (nto_x86_arch_setup): Set `nto_tdesc'.
5444
b1fbec62
GB
54452013-06-04 Gary Benson <gbenson@redhat.com>
5446
5447 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5448 to qSupported response when appropriate.
5449 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5450 with nonzero-length annex.
5451 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5452 arguments supplied in annex.
5453
d1ec4ce7
DE
54542013-05-31 Doug Evans <dje@google.com>
5455
ac44adcb 5456 PR server/15594
d1ec4ce7
DE
5457 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5458 64 bits in 64-cross-32 environment.
5459
9b25f2d3
PA
54602013-05-28 Pedro Alves <palves@redhat.com>
5461
5462 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5463 (aarch64-without-fpu.c): Delete rule.
5464 * configure.srv (aarch64*-*-linux*): Remove references to
5465 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5466 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5467 declaration.
5468
6740dc9c
PA
54692013-05-24 Pedro Alves <palves@redhat.com>
5470
5471 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5472 instead of strchr/decode_address. Error if the range isn't split
5473 with a ','. Don't assume there's be a ':' in the action.
5474
c2d6af84
PA
54752013-05-23 Yao Qi <yao@codesourcery.com>
5476 Pedro Alves <palves@redhat.com>
5477
5478 * linux-low.c (lwp_in_step_range): New function.
5479 (linux_wait_1): If the thread was range stepping and stopped
5480 outside the stepping range, report the stop to GDB. Otherwise,
5481 continue stepping. Add range stepping debug output.
5482 (linux_set_resume_request): Copy the step range from the resume
5483 request to the lwp.
5484 (linux_supports_range_stepping): New.
5485 (linux_target_ops) <supports_range_stepping>: Set to
5486 linux_supports_range_stepping.
5487 * linux-low.h (struct linux_target_ops)
5488 <supports_range_stepping>: New field.
5489 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5490 * linux-x86-low.c (x86_supports_range_stepping): New.
5491 (the_low_target) <supports_range_stepping>: Set to
5492 x86_supports_range_stepping.
5493 * server.c (handle_v_cont): Handle 'r' action.
5494 (handle_v_requests): Append ";r" if the target supports range
5495 stepping.
5496 * target.h (struct thread_resume) <step_range_start,
5497 step_range_end>: New fields.
5498 (struct target_ops) <supports_range_stepping>:
5499 New field.
5500 (target_supports_range_stepping): New macro.
5501
58794e1a
JB
55022013-05-17 Joel Brobecker <brobecker@adacore.com>
5503
5504 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5505 confusion in comment.
5506
d631c5a7
JB
55072013-05-17 Joel Brobecker <brobecker@adacore.com>
5508
5509 * lynx-low.c (struct process_info_private): New type.
5510 (lynx_add_process): New function.
5511 (lynx_create_inferior, lynx_attach): Replace calls to
5512 add_process by calls to lynx_add_process.
5513 (lynx_resume): If PTID is null, then try using
5514 current_process()->private->last_wait_event_ptid.
5515 Add comments.
5516 (lynx_clear_inferiors): Delete. The contents of that function
5517 has been inlined in lynx_mourn;
5518 (lynx_wait_1): Save the ptid in the process's private data.
5519 (lynx_mourn): Free the process' private data. Replace call
5520 to lynx_clear_inferiors by call to clear_inferiors.
5521
96f7a20f
YQ
55222013-05-17 Yao Qi <yao@codesourcery.com>
5523
5524 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5525 the right place.
5526
db0dfaa0
LM
55272013-05-16 Luis Machado <lgustavo@codesourcery.com>
5528
5529 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5530 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5531 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5532 PT_TEXT_END_ADDR guards. Update comments.
5533 (linux_target_op) <read_offsets>: Conditionally define to
5534 linux_read_offsets if the target is UCLIBC and if it defines
5535 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5536
68f5f838
SL
55372013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5538 Andrew Jenner <andrew@codesourcery.com>
5539
5540 * Makefile.in (SFILES): Add linux-nios2-low.c.
5541 (clean): Add action to delete nios2-linux.c.
5542 (nios2-linux.c): New rule.
5543 * configure.srv: Add nios2*-*-linux*.
5544 * linux-nios2-low.c: New.
5545
1ebff1fd
HAQ
55462013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5547
5548 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5549
f6150862
HZ
55502013-04-25 Hui Zhu <hui@codesourcery.com>
5551
5552 PR gdb/15186
f6150862
HZ
5553 * ax.c (ax_printf): Add fflush.
5554
614c279d
TT
55552013-04-22 Tom Tromey <tromey@redhat.com>
5556
5557 * Makefile.in (SFILES): Add filestuff.c.
5558 (OBS): Add filestuff.o.
5559 (filestuff.o): New target.
5560 * config.in, configure: Rebuild.
5561 * configure.ac: Check for fdwalk, pipe2.
5562
7d4e5717
PA
55632013-04-17 Pedro Alves <palves@redhat.com>
5564
5565 * configure.ac (USE_THREAD_DB): Delete variable.
5566 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5567 Don't AC_SUBST USE_THREAD_DB.
5568 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5569 * config.in, configure: Regenerate.
5570
d5c93e41
PA
55712013-04-16 Pedro Alves <palves@redhat.com>
5572
5573 * linux-low.h (struct lwp_info) <thread_known>: Move under
5574 the USE_THREAD_DB #ifdef.
5575
04f5fe89
PA
55762013-04-16 Pedro Alves <palves@redhat.com>
5577
5578 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5579 (linux-low.o): Delete rule.
5580 * linux-low.h: Always include "gdb_thread_db.h" instead of
5581 conditionally including thread_db.h.
5582 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5583 HAVE_THREAD_DB_H.
5584
480b27bf
JK
55852013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5586
5587 * Makefile.in (install-only): Fix make install regression.
5588
43662968
JK
55892013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5590
5591 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5592 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5593 installation.
5594 * gdbserver.1: Remove.
5595
3e74e146
PA
55962013-03-22 Pedro Alves <palves@redhat.com>
5597
5598 * linux-low.c (handle_extended_wait): Don't call
5599 linux_enable_event_reporting.
5600
a8347a2a
TT
56012013-03-15 Tony Theodore <tonyt@logyst.com>
5602
5603 PR build/9098:
5604 * Makefile.in (SHELL): Use @SHELL@.
5605
eeb56fa7
SDJ
56062013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5607
5608 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5609 compiler warning.
5610
4fa7e2ff
JB
56112013-03-13 Joel Brobecker <brobecker@adacore.com>
5612
5613 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5614 Remove extraneous NULL element.
5615
8ddb1965
YQ
56162013-03-13 Yao Qi <yao@codesourcery.com>
5617
5618 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5619 'V' block in trace frame.
5620
9accd112
MM
56212013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5622
5623 * target.h (struct target_ops): Add btrace ops.
5624 (target_supports_btrace): New macro.
5625 (target_enable_btrace): New macro.
5626 (target_disable_btrace): New macro.
5627 (target_read_btrace): New macro.
5628 * gdbthread.h (struct thread_info): Add btrace field.
5629 * server.c: Include btrace-common.h.
5630 (handle_btrace_general_set): New function.
5631 (handle_btrace_enable): New function.
5632 (handle_btrace_disable): New function.
5633 (handle_general_set): Call handle_btrace_general_set.
5634 (handle_qxfer_btrace): New function.
5635 (struct qxfer qxfer_packets[]): Add btrace entry.
5636 * inferiors.c (remove_thread): Disable btrace.
5637 * linux-low: Include linux-btrace.h.
5638 (linux_low_enable_btrace): New function.
5639 (linux_low_read_btrace): New function.
5640 (linux_target_ops): Add btrace ops.
5641 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5642 Add srv_linux_btrace=yes.
5643 (x86_64-*-linux*): Add linux-btrace.o.
5644 Add srv_linux_btrace=yes.
5645 * configure.ac: Define HAVE_LINUX_BTRACE.
5646 * config.in: Regenerated.
5647 * configure: Regenerated.
5648
5cc22e4c
MM
56492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5650
5651 * server.c (handle_qxfer): Preserve error message if -3 is
5652 returned.
5653 (qxfer): Document the -3 return value.
5654
7c97f91e
MM
56552013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5656
5657 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5658 (linux_btrace_h): New variable.
5659 (linux-btrace.o): New rule.
5660
be9a119c 56612013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5662 Hafiz Abid Qadeer <abidh@codesourcery.com>
5663
5664 * tracepoint.c (trace_buffer_size): New global.
5665 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5666 (init_trace_buffer): Change to one-argument function. Allocate
5667 trace buffer memory.
5668 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5669 handle QTBuffer:size packet.
5670 (cmd_bigqtbuffer_size): New function.
5671 (initialize_tracepoint): Call init_trace_buffer with
5672 DEFAULT_TRACE_BUFFER_SIZE.
5673 * server.c (handle_query): Add QTBuffer:size in the
5674 supported packets.
5675
e64f7499
YQ
56762013-03-07 Yao Qi <yao@codesourcery.com>
5677
5678 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5679 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5680 of -1.
5681 (cmd_qtsp): Adjust condition. Do post increment.
5682 Set cur_action and cur_step_action back to 0.
5683
f0ae6fc3
PA
56842013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5685
5686 PR server/15236
5687 * linux-low.c (linux_write_memory): Return early success if LEN is
5688 zero.
5689
b5b0b0af
CV
56902013-03-05 Corinna Vinschen <vinschen@redhat.de>
5691
334ad4a8 5692 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5693
589bc927
TT
56942013-02-28 Tom Tromey <tromey@redhat.com>
5695
5696 * configure.ac: Invoke AC_SYS_LARGEFILE.
5697 * configure, config.in: Rebuild.
5698
dfe07582
CV
56992013-02-28 Corinna Vinschen <vinschen@redhat.com>
5700
5701 * win32-low.c: Throughout, fix format strings and casts of
5702 printf-like functions to avoid type related warnings on all
5703 platforms.
5704 (get_child_debug_event): Print dwDebugEventCode as hex since
5705 that's how it's usually documented.
5706
736cd585
YQ
57072013-02-28 Yao Qi <yao@codesourcery.com>
5708
5709 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5710 pulongest.
5711
e1f58301
JW
57122013-02-27 Jiong Wang <jiwang@tilera.com>
5713
5714 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5715 (reg-tilegx32.c): New rule.
5716 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5717 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5718 different register info initializer according to elf class.
5719 (init_registers_tilgx32): New function. The tilegx32 register info
5720 initializer.
5721 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5722 (tile_store_gregset): Likewise.
5723
d171ca78
YQ
57242013-02-27 Yao Qi <yao@codesourcery.com>
5725
5726 * server.c (process_point_options): Print debug message when
5727 debug_threads is true.
5728
282bbdf3
YQ
57292013-02-26 Yao Qi <yao@codesourcery.com>
5730
5731 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5732
aca22551
PA
57332013-02-19 Pedro Alves <palves@redhat.com>
5734 Kai Tietz <ktietz@redhat.com>
5735
5736 PR gdb/15161
5737
5738 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5739 instead of strtoul to extract address from packet.
5740 (process_serial_event) <'z'>: Likewise.
5741
4f3cee1c
YQ
57422013-02-18 Yao Qi <yao@codesourcery.com>
5743
5744 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5745
8e1d55a3
PA
57462013-02-14 Pedro Alves <palves@redhat.com>
5747
5748 Plug memory leak.
5749
5750 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5751 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5752
458820da
PA
57532013-02-14 Pedro Alves <palves@redhat.com>
5754
5755 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5756
baea0dae
PA
57572013-02-14 Pedro Alves <palves@redhat.com>
5758
5759 * tracepoint.c (save_string): Delete.
5760 (add_tracepoint_action): Use savestring instead of save_string.
5761
0b1afbb3
PA
57622013-02-12 Pedro Alves <palves@redhat.com>
5763
5764 * linux-xtensa-low.c: Ditto.
5765 * xtensa-xtregs.c: Ditto.
5766
8a4ac37e
PA
57672013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5768
5769 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5770 thread_db.
5771
148de6bb
MS
57722013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5773
5774 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5775 aarch64_num_wp_regs and aarch64_num_bp_regs to
5776 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5777
55fac6e0
MS
57782013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5779
5780 * linux-aarch64-low.c (ps_get_thread_area): Replace
5781 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5782
176eb98c
MS
57832013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5784 Marcus Shawcroft <marcus.shawcroft@arm.com>
5785 Nigel Stephens <nigel.stephens@arm.com>
5786 Yufeng Zhang <yufeng.zhang@arm.com>
5787
5788 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5789 (aarch64.c, aarch64-without-fpu.c): New targets.
5790 * configure.srv (aarch64*-*-linux*): New.
5791 * linux-aarch64-low.c: New file.
5792
56f7af9c
MS
57932013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5794
43aaf8b6 5795 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5796 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5797 (dequeue_one_deferred_signal, linux_resume_one_thread)
5798 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5799 (linux_tracefork_grandchild, linux_test_for_tracefork)
5800 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5801 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5802 where the argument is 0.
5803
60f662b0
YQ
58042013-01-25 Yao Qi <yao@codesourcery.com>
5805
5806 * event-loop.c: Include "queue.h".
5807 (gdb_event_p): New typedef.
5808 (struct gdb_event) <next_event>: Remove.
5809 (event_queue): Change to QUEUE(gdb_event_p).
5810 (async_queue_event): Remove.
5811 (gdb_event_xfree): New.
5812 (initialize_event_loop): New.
5813 (process_event): Use API from QUEUE.
5814 (wait_for_event): Likewise.
5815 * server.c (main): Call initialize_event_loop.
5816 * server.h (initialize_event_loop): Declare.
5817
5ae4861a
YQ
58182013-01-18 Yao Qi <yao@codesourcery.com>
5819
5820 * ax.h (struct eval_agent_expr_context): New.
5821 (gdb_eval_agent_expr): Update declaration.
5822 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5823 TFRAME. Add new argument CTX.
5824 * server.h (struct eval_agent_expr_context): Declare.
5825 (agent_mem_read, agent_tsv_read): Update declaration.
5826 (agent_mem_read_string): Likewise.
5827 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5828 (add_traceframe_block): Add new argument TPOINT.
5829 Increase TPOINT->traceframe_usage.
5830 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5831 eval_tracepoint_agent_expr.
5832 (condition_true_at_tracepoint): Likewise.
5833 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5834 (agent_mem_read_string, agent_tsv_read): Likewise.
5835
85e00e85
YQ
58362013-01-16 Yao Qi <yao@codesourcery.com>
5837
5838 * linux-low.c (linux_resume_one_lwp): Don't check
5839 'lwp->bp_reinsert != 0'.
5840
4039cf45
JB
58412013-01-07 Joel Brobecker <brobecker@adacore.com>
5842 Pedro Alves <palves@redhat.com>
5843
5844 * lynx-low.c (ptrace_request_to_str): Define a temporary
5845 macro and use it to simplify this function's implementation.
5846
9044dee2
JB
58472013-01-07 Joel Brobecker <brobecker@adacore.com>
5848
5849 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5850 sets errno.
5851
e6352c8f
JB
58522013-01-07 Joel Brobecker <brobecker@adacore.com>
5853
5854 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5855
50681a27
JB
58562013-01-07 Joel Brobecker <brobecker@adacore.com>
5857
5858 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5859
3f6e77ef
JB
58602013-01-07 Joel Brobecker <brobecker@adacore.com>
5861
5862 * lynx-low.c (lynx_resume): Use the resume_info parameter
5863 to determine the ptid for the lynx_ptrace call, unless
5864 it is equal to minus_one_ptid, in which case we use the
5865 ptid of the current_inferior.
5866 (lynx_wait_1): After having received a thread create/exit
5867 event, resume the inferior's execution using the signaling
5868 thread's ptid, rather than the old ptid.
5869
7fda33ae
JB
58702013-01-07 Joel Brobecker <brobecker@adacore.com>
5871
5872 * lynx-low.c (lynx_resume): Delete variable ret.
5873
b9786c74
JB
58742013-01-01 Joel Brobecker <brobecker@adacore.com>
5875
5876 * gdbreplay.c (gdbreplay_version): Update copyright year.
5877 * server.c (gdbserver_version): Likewise.
5878
8b93d60f
JB
58792012-12-17 Joel Brobecker <brobecker@adacore.com>
5880
5881 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5882 new thread.
5883
037335a7
JB
58842012-12-17 Joel Brobecker <brobecker@adacore.com>
5885
5886 * lynx-low.c (ptrace_request_to_str): Add handling for
5887 PTRACE_GETTRACESIG.
5888
52d4cbd8
JB
58892012-12-17 Joel Brobecker <brobecker@adacore.com>
5890
5891 * lynx-low.c (lynx_attach): Delete variable new_process.
5892
ab8f6ca9
JB
58932012-12-17 Joel Brobecker <brobecker@adacore.com>
5894
5895 * lynx-low.c (lynx_create_inferior): Delete variable
5896 new_process.
5897
78cbc024
JB
58982012-12-17 Joel Brobecker <brobecker@adacore.com>
5899
5900 * lynx-low.c (ptrace_request_to_str): Do not handle
5901 PTRACE_GETTHREADLIST if this macro does not exist.
5902
14a00470
YQ
59032012-12-15 Yao Qi <yao@codesourcery.com>
5904
5905 * Makefile.in (OBS): Add notif.o.
5906 * notif.c, notif.h: New.
5907 * server.c: Include "notif.h".
5908 (struct vstop_notif) <next>: Remove.
5909 <base>: New field.
5910 (queue_stop_reply): Update.
5911 (push_event, send_next_stop_reply): Remove.
5912 (discard_queued_stop_replies): Update.
5913 (notif_stop): New variable.
5914 (handle_v_stopped): Remove.
5915 (handle_v_requests): Don't call handle_v_stopped. Call
5916 handle_ack_notif instead.
5917 (queue_stop_reply_callback): Call notif_event_enque instead
5918 of queue_stop_reply.
5919 (handle_status): Don't call send_next_stop_reply, call
5920 notif_write_event instead.
5921 (kill_inferior_callback): Likewise.
5922 (detach_or_kill_inferior_callback): Likewise.
5923 (main): Call initialize_notif.
5924 (process_serial_event): Call QUEUE_is_empty.
5925 (handle_target_event): Call notif_push instead of push event.
5926 * server.h (push_event): Remove declaration.
5927
61c125b9
TT
59282012-12-10 Tom Tromey <tromey@redhat.com>
5929
5930 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5931 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5932 macros.
5933 (.c.o): Rewrite.
5934 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5935 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5936 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5937 (amd64-linux-ipa.o, ax.o): Rewrite.
5938 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5939 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5940 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5941 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5942 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5943 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5944 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5945 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5946 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5947 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5948 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5949 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5950 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5951 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5952 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5953 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5954 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5955 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5956 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5957 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5958 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5959 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5960 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5961 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5962 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5963 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5964 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5965 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5966 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5967 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5968 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5969 (reg-tilegx.o): Remove.
5970 (all_object_files): New macro.
5971 Include .deps files.
5972 * aclocal.m4, configure: Rebuild.
5973 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5974 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5975 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5976
e90e9ad9
TT
59772012-12-05 Tom Tromey <tromey@redhat.com>
5978
5979 PR gdb/14917:
5980 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5981
02d403bf 59822012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5983
5984 * configure.ac: Check for linux/perf_event.h.
5985 * config.in: Regenerated.
5986 * configure: Regenerated.
5987
0270a750
PA
59882012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5989
5990 * hostio.c (handle_readlink): Decrease buffer size
5991 parameter passed to readlink by one byte.
5992
8c29b58e
YQ
59932012-11-26 Yao Qi <yao@codesourcery.com>
5994
5995 * configure.ac (build_warnings): Append '-Wempty-body'.
5996 * configure: Regenerated.
5997 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5998 body.
5999
8bdce1ff
PM
60002012-11-15 Pierre Muller <muller@sourceware.org>
6001
6002 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6003 * config.in: Regenerate.
6004 * configure: Regenerate.
6005 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6006 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6007 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6008 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6009 header.
6010 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6011 instead of <sys/wait.h> header.
6012 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6013
02d403bf 60142012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6015
6016 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6017 (various make rules): Remove -DGDBSERVER
6018
fbd5db48
YQ
60192012-11-09 Yao Qi <yao@codesourcery.com>
6020
6021 * spu-low.c (current_ptid): Move it to ..
6022 * gdbthread.h: ... here. New.
6023 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6024 * server.c (myresume, process_serial_event): Likewise.
6025 * thread-db.c (thread_db_find_new_threads): Likewise.
6026 * tracepoint.c (run_inferior_command): Likewise.
6027
b3dc46ff
AB
60282012-10-01 Andrew Burgess <aburgess@broadcom.com>
6029
6030 * server.c (handle_search_memory_1): Include access length in
6031 warning message.
6032
07c04788
HPN
60332012-09-05 Michael Brandt <michael.brandt@axis.com>
6034
6035 * linux-crisv32-low.c: Fix compile errors.
6036
918d227b
YQ
60372012-09-04 Yao Qi <yao@codesourcery.com>
6038
6039 * tracepoint.c (cmd_qtsv): Adjust debug message.
6040 Don't check CUR_TPOINT.
6041
18c1b81a
YQ
60422012-08-28 Yao Qi <yao@codesourcery.com>
6043
6044 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6045 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6046 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6047 Remove declarations of xmalloc, xreallloc, xstrdup and
6048 freeargv.
6049 * Makefile.in (libiberty_h): New.
6050 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6051 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6052
dc82f37b
YQ
60532012-08-23 Yao Qi <yao@codesourcery.com>
6054
6055 * server.h: Remove declaration of 'xsnprintf'.
6056
406b1477
KS
60572012-08-22 Keith Seitz <keiths@redhat.com>
6058
6059 * server.h: Include build-gnulib-gbserver/config.h.
6060 * gdbreplay.c: Likewise.
6061
e6712ff1
DE
60622012-08-08 Doug Evans <dje@google.com>
6063
6064 * Makefile.in (SFILES): Add gdb_vecs.c.
6065 (OBS): Add gdb_vecs.o.
6066 (gdb_vecs_h, host_defs_h): New variables.
6067 (thread-db.o): Add $(gdb_vecs_h) dependency.
6068 (gdb_vecs.o): New rule.
6069 * thread-db.c: #include "gdb_vecs.h".
6070 (thread_db_load_search): Use a vector to iterate over path elements.
6071 Handle text appearing after "$pdir".
6072
6073 * configure.ac: Add check for strstr.
6074 * config.in: Regenerate.
6075 * configure: Regenerate.
6076
7c3270ae
UW
60772012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6078
6079 * hostio.c (handle_pread): If pread fails, fall back to attempting
6080 lseek/read.
6081 (handle_pwrite): Likewise for pwrite.
6082
b62e2b27
UW
60832012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6084
6085 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6086 between unsupported TYPE and unimplementable ADDR/LEN combination.
6087 (arm_insert_point): Act on new return value.
6088
78a99e91
PA
60892012-07-31 Pedro Alves <palves@redhat.com>
6090
6091 * server.c (process_point_options): Only skip tokens if we find
6092 one that is unrecognized. Don't treat 'X' specially while
6093 skipping unrecognized tokens.
6094
fcf303ab
UW
60952012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6096
6097 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6098 to 4-byte-align HW breakpoint addresses for Thumb.
6099
7255706c
YQ
61002012-07-27 Yao Qi <yao@codesourcery.com>
6101
6102 PR remote/14161.
6103
6104 * server.h: Declare gdb_agent_about_to_close.
6105 * target.c (kill_inferior): Include "agent.h".
6106 New. Send command 'kill'.
6107 * target.h (kill_inferior): Removed macro.
6108 * tracepoint.c (gdb_agent_about_to_close): New.
6109 (gdb_agent_helper_thread): Handle command 'close'.
6110 Wait endlessly until the inferior stops.
6111 Install gdb_agent_remove_socket to atexit hook.
6112 (agent_socket_name): New static variable.
6113 (gdb_agent_socket_init): Replace local variable 'name' with
6114 'agent_socket_name'.
6115 (gdb_agent_remove_socket): New.
6116
5a3f286f
YQ
61172012-07-27 Yao Qi <yao@codesourcery.com>
6118
6119 * server.c (process_point_options): Stop at 'X' when parsing.
6120
961bd387
ME
61212012-07-19 Michael Eager <eager@eagercon.com>
6122
a261b8f5 6123 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6124 to hw_execute.
6125 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6126 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6127 hardware breakpoint.
6128
aa7c7447
JK
61292012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6130
6131 * gdbserver/linux-low.c (initialize_low): Call
6132 linux_ptrace_init_warnings.
6133
7f216e7c
DE
61342012-07-02 Doug Evans <dje@google.com>
6135
6136 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6137 pointer to int.
6138
d3ce09f5
SS
61392012-07-02 Stan Shebs <stan@codesourcery.com>
6140
6141 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6142 (ax.o): Add it to build rule.
6143 (ax-ipa.o): Ditto.
6144 (OBS): Add format.o.
6145 (IPA_OBS): Add format.o.
6146 * server.c (handle_query): Claim support for breakpoint commands.
6147 (process_point_options): Add command case.
6148 (process_serial_event): Leave running if there are printfs in
6149 effect.
6150 * mem-break.h (any_persistent_commands): Declare.
6151 (add_breakpoint_commands): Declare.
6152 (gdb_no_commands_at_breakpoint): Declare.
6153 (run_breakpoint_commands): Declare.
6154 * mem-break.c (struct point_command_list): New struct.
6155 (struct breakpoint): New field command_list.
6156 (any_persistent_commands): New function.
6157 (add_commands_to_breakpoint): New function.
6158 (add_breakpoint_commands): New function.
6159 (gdb_no_commands_at_breakpoint): New function.
6160 (run_breakpoint_commands): New function.
6161 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6162 locally.
6163 * ax.c: Include format.h.
6164 (ax_printf): New function.
6165 (gdb_eval_agent_expr): Add printf opcode.
6166
2f8f6aed
YQ
61672012-06-13 Yao Qi <yao@codesourcery.com>
6168
6169 * server.c (start_inferior): Remove duplicated writes to fields
6170 'last_resume_kind' and 'last_status' of 'current_inferior'.
6171
0c9070b3
YQ
61722012-06-12 Yao Qi <yao@codesourcery.com>
6173 Pedro Alves <palves@redhat.com>
6174
6175 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6176 comment.
6177 * server.c (handle_v_cont): Extend comment.
6178
c52daf70
YQ
61792012-06-11 Yao Qi <yao@codesourcery.com>
6180
6181 * linux-low.c (linux_attach): Add 'static'.
6182
d38bbb0a
YQ
61832012-06-06 Yao Qi <yao@codesourcery.com>
6184
6185 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6186
89dc0afd
JK
61872012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6188
6189 Fix gcc -flto compilation warning.
6190 * server.c (main): Make variable multi_mode and attach volatile.
6191
75f62ce7
TJB
61922012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6193
6194 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6195 if the platform doesn't know about it.
6196
65f479b6
PA
61972012-05-30 Jeff Kenton <jkenton@tilera.com>
6198
6199 * Makefile.in (SFILES): Add linux-tile-low.c.
6200 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6201 * configure.srv: Handle tilegx-*-linux*.
6202 * linux-tile-low.c: New file.
6203
0c5bf5a9
JK
62042012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6205
6206 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6207
a493e3e2
PA
62082012-05-24 Pedro Alves <palves@redhat.com>
6209
6210 PR gdb/7205
6211
43aaf8b6 6212 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6213
2ea28649
PA
62142012-05-24 Pedro Alves <palves@redhat.com>
6215
6216 PR gdb/7205
6217
6218 Replace target_signal with gdb_signal throughout.
6219
8d409d16
MR
62202012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6221
6222 * linux-low.c (linux_store_registers): Avoid the copying sequence
6223 when no data has been retrieved by ptrace.
6224
23512c01
MGD
62252012-05-22 Will Deacon <will.deacon@arm.com>
6226
6227 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6228 Include asm/ptrace.h.
6229 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6230 already defined.
6231
4934b29e
MR
62322012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6233
6234 * linux-low.c (linux_store_registers): Don't re-retrieve data
6235 with ptrace that has already been obtained from /proc. Always
6236 copy any data retrieved with ptrace to the buffer supplied.
6237
bde24c0a
PA
62382012-05-11 Yao Qi <yao@codesourcery.com>
6239 Pedro Alves <palves@redhat.com>
6240
6241 * linux-low.c (enum stopping_threads_kind): New.
6242 (stopping_threads): Change type to `enum stopping_threads_kind'.
6243 (handle_extended_wait): If stopping and suspending threads, leave
6244 the new_lwp suspended too.
6245 (linux_wait_for_event): Adjust.
6246 (stop_all_lwps): Set `stopping_threads' to
6247 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6248 whether we're suspending threads or just stopping them. Assert no
6249 recursion happens.
6250
623b6bdf
YQ
62512012-04-29 Yao Qi <yao@codesourcery.com>
6252
6253 * server.h: Move some code to ...
6254 * gdbthread.h: ... here. New.
6255 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6256 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6257 (nto-low.o, win32-low.o): Likewise.
6258 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6259 * regcache.c, remote-utils.c, server.c: Likewise.
6260 * target.c, tracepoint.c, win32-low.c: Likewise.
6261
f15f9948
TJB
62622012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6263
6264 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6265 (PTRACE_ARG4_TYPE): Likewise.
6266 (PTRACE_XFER_TYPE): Likewise.
6267 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6268 ptrace to PTRACE_ARG3_TYPE.
6269 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6270 (PTRACE_ARG4_TYPE): Likewise.
6271 (PTRACE_XFER_TYPE): Likewise.
6272 (linux_detach_one_lwp): Cast fourth argument of
6273 ptrace to long then PTRACE_ARG4_TYPE.
6274 (regsets_fetch_inferior_registers): Cast third argument of
6275 ptrace to long then PTRACE_ARG3_TYPE.
6276 (regsets_store_inferior_registers): Likewise.
6277
38ea300a
PA
62782012-04-20 Pedro Alves <palves@redhat.com>
6279
6280 * configure: Regenerate.
6281
c971b7fa
PA
62822012-04-19 Pedro Alves <palves@redhat.com>
6283
43aaf8b6 6284 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6285 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6286 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6287 (all, install-only, uninstall, clean-info, all-lib, clean): No
6288 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6289 (maintainer-clean realclean distclean): Use subdir_do.
6290 (subdir_do): New.
6291 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6292 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6293 * acinclude.m4: Include acx_configure_dir.m4.
6294 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6295 calls. Call AC_PROG_RANLIB. Configure gnulib using
6296 ACX_CONFIGURE_DIR.
6297 (GNULIB): New.
6298 (GNULIB_STDINT_H): Adjust.
6299 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6300 * gdbreplay.c: Include build-gnulib/config.h.
6301 * server.h: Likewise.
6302 * aclocal.m4: Regenerate.
6303 * config.in: Regenerate.
6304 * configure: Regenerate.
c971b7fa 6305
809277f8
PA
63062012-04-19 Pedro Alves <palves@redhat.com>
6307
6308 * Makefile.in (LIBGNU, INCGNU): Adjust.
6309 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6310 (all, install-only, uninstall, clean-info, all-lib, clean)
6311 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6312 * configure.ac: Adjust AC_OUTPUT output.
6313 * aclocal.m4: Regenerate.
6314 * configure: Regenerate.
6315
fd9bb8b8
PA
63162012-04-19 Pedro Alves <palves@redhat.com>
6317
6318 * Makefile.in (generated_files): New.
6319 (server_h): Remove the explicit dependency on config.h, and depend
6320 on $generated_files.
6321
1c298c66
PA
63222012-04-19 Pedro Alves <palves@redhat.com>
6323
6324 * Makefile.in (INCGNU): Add -Ignulib.
6325
57c4b50b
PA
63262012-04-19 Pedro Alves <palves@redhat.com>
6327
6328 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6329 (INCGNU): ... this, and spell out -I here.
6330 (GNULIB_LIB): Rename to ...
6331 (LIBGNU): ... this.
6332 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6333
1030e047
PA
63342012-04-19 Pedro Alves <palves@redhat.com>
6335
6336 * config.in: Regenerate.
6337
447d4319
PA
63382012-04-19 Pedro Alves <palves@redhat.com>
6339
6340 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6341 * server.h (memmem): Remove declaration.
6342 * config.in: Regenerate.
6343 * configure: Regenerate.
6344
aad9eab9
YQ
63452012-04-19 Yao Qi <yao@codesourcery.com>
6346
6347 * Makefile.in (SFILES): Add common/vec.c.
6348 (OBS): Add vec.o.
6349 (vec.o): New rule.
6350
3e10640f
YQ
63512012-04-19 Yao Qi <yao@codesourcery.com>
6352
6353 * remote-utils.c (prepare_resume_reply): Replace with macro
6354 target_core_of_thread.
6355 * server.c (handle_qxfer_threads_proper): Likewise.
6356 * target.h (traget_core_of_thread): New macro.
6357
71622373
PA
63582012-04-18 Pedro Alves <palves@redhat.com>
6359
6360 * aclocal.m4: Regenerate.
6361 * configure: Regenerate.
6362
80d26939
YQ
63632012-04-16 Yao Qi <yao@codesourcery.com>
6364
6365 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6366 duplicated on address.
6367
42476b70
YQ
63682012-04-16 Yao Qi <yao@codesourcery.com>
6369
6370 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6371 (struct tracepoint_action_ops) <send>: New field.
6372 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6373 (agent_expr_send, x_tracepoint_action_send): New.
6374 (l_tracepoint_action_send): New.
6375 (cmd_qtdp): Download and install tracepoint
6376 according to `use_agent'.
6377 (run_inferior_command): Add one more parameter `len'.
6378 Update callers.
6379 (tracepoint_send_agent): New.
6380 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6381
7bc83639
YQ
63822012-04-16 Yao Qi <yao@codesourcery.com>
6383
6384 * tracepoint.c (download_tracepoints): Moved to ...
6385 (cmd_qtstart): ... here.
6386
5f18041e
YQ
63872012-04-14 Yao Qi <yao@codesourcery.com>
6388
6389 * tracepoint.c: Include inttypes.h.
6390 (struct collect_memory_action): Use sized types.
6391 (struct tracepoint): Likewise.
6392 (cmd_qtdp, stop_tracing): Update print specifiers.
6393 (cmd_qtp, response_tracepoint): Likewise.
6394 (collect_data_at_tracepoint): Likewise.
6395 (collect_data_at_step): Likewise.
6396
55a8c076
YQ
63972012-04-14 Yao Qi <yao@codesourcery.com>
6398
6399 Import gnulib module inttypes.
6400 * aclocal.m4, config.in, configure: Regenerated.
6401
dc750257
YQ
64022012-04-14 Yao Qi <yao@codesourcery.com>
6403
6404 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6405 Makefile and config.status at last.
6406
0ab5faf9
YQ
64072012-04-13 Yao Qi <yao@codesourcery.com>
6408
6409 * tracepoint.c: Include stdint.h unconditionally.
6410
18f5fd81
TJB
64112012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6412
6413 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6414 on BFD_HAVE_SYS_PROCFS_TYPE.
6415 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6416 * configure: Regenerate.
6417 * config.in: Likewise.
6418
4d47af5c
L
64192012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6420
6421 * Makefile.in (clean): Also remove x32.c x32-linux.c
6422 x32-avx.c x32-avx-linux.c.
6423 (x32.o): New target.
6424 (x32.c): Likewise.
6425 (x32-linux.o): Likewise.
6426 (x32-linux.c): Likewise.
6427 (x32-avx.o): Likewise.
6428 (x32-avx.c): Likewise.
6429 (x32-avx-linux.o): Likewise.
6430 (x32-avx-linux.c): Likewise.
6431
6432 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6433 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6434 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6435 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6436 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6437 i386/x32-avx-linux.xml.
6438
6439 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6440 (init_registers_x32_avx_linux): Likwise.
6441 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6442 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6443
ecedbe58
PA
64442012-04-13 Pedro Alves <palves@redhat.com>
6445
6446 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6447 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6448 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6449 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6450 the sub-make.
6451
c92b5177
L
64522012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6453
6454 * linux-x86-low.c (compat_x32_clock_t): New.
6455 (compat_x32_siginfo_t): Likewise.
6456 (compat_x32_siginfo_from_siginfo): Likewise.
6457 (siginfo_from_compat_x32_siginfo): Likewise.
6458 (linux_is_elf64): Likewise.
6459 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6460 and siginfo_from_compat_x32_siginfo for x32.
6461 (x86_arch_setup): Set linux_is_elf64.
6462
214d508e
L
64632012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6464
6465 PR gdb/13969
6466 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6467 e_machine field.
6468 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6469 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6470 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6471 compatible with process.
6472
c9a1864a
YQ
64732012-04-12 Yao Qi <yao@codesourcery.com>
6474
6475 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6476 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6477 (install-only, install-info, clean): Handle sub dir gnulib.
6478 (all-lib, am--refresh): New targets.
6479 (memmem.o): Remove target.
6480 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6481 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6482 (AC_REPLACE_FUNCS): Remove memmem.
6483 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6484 (AC_OUTPUT): Generate Makefile in gnulib/.
6485 * aclocal.m4, config.in, configure: Regenerated.
6486
367ba2c2
MR
64872012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6488
6489 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6490
9d236627
PA
64912012-04-05 Pedro Alves <palves@redhat.com>
6492
6493 -Werror=strict-aliasing
6494
6495 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6496 pointer.
6497
111217b3
PA
64982012-04-04 Pedro Alves <palves@redhat.com>
6499
6500 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6501 (sparc_store_gregset_from_stack, sparc_store_gregset)
6502 (sparc_breakpoint_at): Fix formatting.
6503
8365dcf5
TJB
65042012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6505
6506 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6507 are available.
6508 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6509 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6510 * config.in: Regenerate.
6511 * configure: Likewise.
6512
689cc2ae
PA
65132012-03-29 Pedro Alves <palves@redhat.com>
6514
6515 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6516 Correct ptrace arguments.
6517
c14dfd32
PA
65182012-03-28 Pedro Alves <palves@redhat.com>
6519
6520 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6521 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6522 (IA64_FR1_REGNUM): New defines.
6523 (ia64_fetch_register): New.
6524 (the_low_target): Install it.
6525 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6526 field.
6527 * linux-low.c (linux_fetch_registers): Try the
6528 the_low_target.fetch_register hook first.
6529
6530 * linux-arm-low.c (the_low_target): Adjust.
6531 * linux-bfin-low.c (the_low_target): Adjust.
6532 * linux-cris-low.c (the_low_target): Adjust.
6533 * linux-crisv32-low.c (the_low_target): Adjust.
6534 * linux-m32r-low.c (the_low_target): Adjust.
6535 * linux-m68k-low.c (the_low_target): Adjust.
6536 * linux-mips-low.c (the_low_target): Adjust.
6537 * linux-ppc-low.c (the_low_target): Adjust.
6538 * linux-s390-low.c (the_low_target): Adjust.
6539 * linux-sh-low.c (the_low_target): Adjust.
6540 * linux-sparc-low.c (the_low_target): Adjust.
6541 * linux-tic6x-low.c (the_low_target): Adjust.
6542 * linux-x86-low.c (the_low_target): Adjust.
6543 * linux-xtensa-low.c (the_low_target): Adjust.
6544
63c88e13
PA
65452012-03-26 Pedro Alves <palves@redhat.com>
6546
6547 * server.c (handle_qxfer_libraries): Don't bail early if
6548 the_target->qxfer_libraries_svr4 is not NULL.
6549
fb723180
PA
65502012-03-26 Pedro Alves <palves@redhat.com>
6551
6552 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6553
0afae3cf
PA
65542012-03-23 Pedro Alves <palves@redhat.com>
6555
6556 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6557 "library-list-svr4" element's start tag when the the DSO list is
6558 empty.
6559
485f1ee4
PA
65602012-03-23 Pedro Alves <palves@redhat.com>
6561
6562 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6563 a variable whose type size is the same as the inferior's pointer
6564 size.
6565
a5362b9a
TS
65662012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6567
6568 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6569 struct siginfo.
6570 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6571 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6572 * linux-low.h: Include <signal.h>.
6573 (struct siginfo): Remove forward declaration.
6574 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6575 struct siginfo.
6576
d226c142
MF
65772012-03-21 Mike Frysinger <vapier@gentoo.org>
6578
6579 * .gitignore: Ignore more files.
6580
122f36ef
PA
65812012-03-19 Pedro Alves <palves@redhat.com>
6582 Jan Kratochvil <jan.kratochvil@redhat.com>
6583
6584 * server.c (cont_thread, general_thread): Add describing comments.
6585 (start_inferior): Clear `cont_thread'.
6586 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6587 of a process.
6588
fc3e5175
YQ
65892012-03-15 Yao Qi <yao@codesourcery.com>
6590
6591 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6592 handling to ...
6593 (cmd_qtdp): ... here.
6594
8d0d92cd
YQ
65952012-03-15 Yao Qi <yao@codesourcery.com>
6596
6597 * tracepoint.c (struct tracepoint_action_ops): New.
6598 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6599 (m_tracepoint_action_download): New.
6600 (r_tracepoint_action_download): New.
6601 (x_tracepoint_action_download): New.
6602 (l_tracepoint_action_download): New.
6603 (add_tracepoint_action): Install `action->ops' according type.
6604 (download_tracepoint_1): Move code `download' function pointer
6605 of various tracepoint_action_ops.
6606
87b0bb13
JK
66072012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6608
6609 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6610 linux_ptrace_attach_warnings.
6611
5f572dec
JK
66122012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6613
6614 * Makefile.in (linux-ptrace.o): New.
6615 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6616 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6617 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6618 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6619 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6620 of these targets.
6621 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6622
f4647387
YQ
66232012-03-08 Yao Qi <yao@codesourcery.com>
6624 Pedro Alves <palves@redhat.com>
6625
6626 Fix PR server/13392.
6627 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6628 offset of JMP insn.
6629 * tracepoint.c (remove_tracepoint): New.
6630 (cmd_qtdp): Call remove_tracepoint when failed to install.
6631
9b224c5e
PA
66322012-03-07 Pedro Alves <palves@redhat.com>
6633
6634 * linux-low.c (get_detach_signal): New.
6635 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6636 Pass on pending signals to PTRACE_DETACH. Check the result of the
6637 ptrace call.
6638 * server.c (program_signals, program_signals_p): New.
6639 (handle_general_set): Handle QProgramSignals.
6640 * server.h (program_signals, program_signals_p): Declare.
6641
e237a7e2
JK
66422012-03-05 Pedro Alves <palves@redhat.com>
6643 Jan Kratochvil <jan.kratochvil@redhat.com>
6644
6645 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6646 New comment why.
6647
5808517f
YQ
66482012-03-03 Yao Qi <yao@codesourcery.com>
6649
6650 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6651 agent_look_up_symbols.
6652
58b4daa5
YQ
66532012-03-03 Yao Qi <yao@codesourcery.com>
6654
6655 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6656 (linux-x86-low.o): Likewise.
6657 * server.h: Remove in_process_agent_loaded.
6658 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6659 common/agent.c.
6660 Update callers.
6661
8ffcbaaf
YQ
66622012-03-03 Yao Qi <yao@codesourcery.com>
6663
6664 * tracepoint.c (gdb_agent_capability): New global.
6665 (in_process_agent_loaded_ust): Renamed to
6666 `in_process_agent_supports_ust'.
6667 Update callers.
6668 (in_process_agent_supports_ust): Call agent_capability_check.
6669 (clear_installed_tracepoints): Assert that agent supports
6670 agent.
6671
d1feda86
YQ
66722012-03-03 Yao Qi <yao@codesourcery.com>
6673
6674 * linux-low.c (linux_supports_agent): New.
6675 (linux_target_ops): Initialize field `supports_agent' with
6676 linux_supports_agent.
6677 * target.h (struct target_ops) <supports_agent>: New.
6678 (target_supports_agent): New macro.
6679 * server.c (handle_general_set): Handle packet 'QAgent'.
6680 (handle_query): Send `QAgent+'.
6681 * Makefile.in (server.o): Depends on agent.h.
6682
2fa291ac
YQ
66832012-03-03 Yao Qi <yao@codesourcery.com>
6684
6685 * Makefile.in (OBS): Add agent.o.
6686 Add new rule for agent.o.
6687 Track dependence of tracepoint.c on agent.h.
6688 * tracepoint.c (run_inferior_command_1):
6689 (run_inferior_command): Call agent_run_command.
6690 (gdb_ust_connect_sync_socket): Deleted. Move it to
6691 common/agent.c.
6692 (resume_thread, stop_thread): Likewise.
6693 (gdb_ust_socket_init): Renamed to ...
6694 (gdb_agent_socket_init): ... New.
6695 (gdb_ust_thread): Renamed to ...
6696 (gdb_agent_helper_thread): ... New.
6697 (gdb_ust_init): Move some code to ...
6698 (gdb_agent_init): ... here. New.
6699 [HAVE_UST]: Call gdb_ust_init.
6700 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6701 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6702 * config.in, configure: Regenerated.
6703
05044653
PA
67042012-03-02 Pedro Alves <palves@redhat.com>
6705
6706 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6707 * linux-low.c (struct simple_pid_list): New.
6708 (stopped_pids): New a struct simple_pid_list pointer.
6709 (add_to_pid_list, pull_pid_from_list): New.
6710 (handle_extended_wait): Don't assume the first signal new children
6711 report is SIGSTOP. Adjust call to pull_pid_from_list.
6712 (linux_wait_for_lwp): Adjust.
6713
8d00225b
YQ
67142012-03-02 Yao Qi <yao@codesourcery.com>
6715
6716 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6717 debug log.
6718
19560ba5
YQ
67192012-03-02 Yao Qi <yao@codesourcery.com>
6720
6721 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6722 `stop_pc' and `tpoint'. Update caller.
6723
1faeff08
MR
67242012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6725
6726 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6727 * linux-low.c (use_linux_regsets): New macro.
6728 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6729 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6730 (linux_register_in_regsets): New function.
6731 (usr_fetch_inferior_registers): Skip registers covered by
6732 regsets.
6733 (usr_store_inferior_registers): Likewise.
6734 (usr_fetch_inferior_registers): New macro.
6735 (usr_store_inferior_registers): Likewise.
6736 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6737 (linux_store_registers): Likewise.
6738 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6739 prototype.
6740 (init_registers_mips64_dsp_linux): Likewise.
6741 (init_registers_mips_linux): New macro.
6742 (init_registers_mips_dsp_linux): Likewise.
6743 (mips_dsp_num_regs): Likewise.
6744 (DSP_BASE, DSP_CONTROL): New fallback macros.
6745 (mips_base_regs): New macro.
6746 (mips_regmap): Use it. Fix the size.
6747 (mips_dsp_regmap): New variable.
6748 (mips_dsp_regset_bitmap): Likewise.
6749 (mips_arch_setup): New function.
6750 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6751 than mips_regmap.
6752 (mips_cannot_store_register): Likewise.
6753 (the_low_target): Update .arch_setup, .num_regs and .regmap
6754 initializers. Add .regset_bitmap initializer.
6755 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6756 initializer.
6757 * linux-bfin-low.c (the_low_target): Likewise.
6758 * linux-cris-low.c (the_low_target): Likewise.
6759 * linux-crisv32-low.c (the_low_target): Likewise.
6760 * linux-ia64-low.c (the_low_target): Likewise.
6761 * linux-m32r-low.c (the_low_target): Likewise.
6762 * linux-m68k-low.c (the_low_target): Likewise.
6763 * linux-ppc-low.c (the_low_target): Likewise.
6764 * linux-s390-low.c (the_low_target): Likewise.
6765 * linux-sh-low.c (the_low_target): Likewise.
6766 * linux-sparc-low.c (the_low_target): Likewise.
6767 * linux-tic6x-low.c (the_low_target): Likewise.
6768 * linux-x86-low.c (the_low_target): Likewise.
6769 * linux-xtensa-low.c (the_low_target): Likewise.
6770 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6771 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6772 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6773 srv_xmlfiles.
6774 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6775 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6776
c03e6ccc
YQ
67772012-02-29 Yao Qi <yao@codesourcery.com>
6778 Pedro Alves <palves@redhat.com>
6779
6780 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6781 `step_over_finished' is true.
6782
644cebc9
PA
67832012-02-27 Pedro Alves <palves@redhat.com>
6784
6785 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6786 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6787
c14d7ab2
PA
67882012-02-27 Pedro Alves <palves@redhat.com>
6789
6790 PR server/9684
6791 * linux-low.c (pid_is_stopped): New.
6792 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6793
412c89dd
LM
67942012-02-25 Luis Machado <lgustavo@codesourcery.com>
6795
6796 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6797 of conditions.
6798
b745defe
MR
67992012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6800
6801 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6802
9f3a5c85
LM
68032012-02-24 Luis Machado <lgustavo@codesourcery>
6804
6805 * server.c (handle_query): Advertise support for target-side
6806 breakpoint condition evaluation.
6807 (process_point_options): New function.
6808 (process_serial_event): When inserting a breakpoint, check for
6809 a target-side condition that should be evaluated.
6810
6811 * mem-break.c: Include regcache.h and ax.h.
6812 (point_cond_list_t): New data structure.
6813 (breakpoint) <cond_list>: New field.
6814 (find_gdb_breakpoint_at): Make non-static.
6815 (delete_gdb_breakpoint_at): Clear any target-side
6816 conditions.
6817 (clear_gdb_breakpoint_conditions): New function.
6818 (add_condition_to_breakpoint): Likewise.
6819 (add_breakpoint_condition): Likewise.
6820 (gdb_condition_true_at_breakpoint): Likewise.
6821 (gdb_breakpoint_here): Return result directly instead
6822 of going through a local variable.
6823
6824 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6825 (clear_gdb_breakpoint_conditions): Likewise.
6826 (add_breakpoint_condition): Likewise.
6827 (gdb_condition_true_at_breakpoint): Likewise.
6828
6829 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6830 (need_step_over_p): Take target-side breakpoint condition into
6831 consideration.
6832
5e1dc496
LM
68332012-02-24 Luis Machado <lgustavo@codesourcery>
6834
6835 * server.h: Include tracepoint.h.
6836 (agent_mem_read, agent_get_trace_state_variable_value,
6837 agent_set_trace_state_variable_value,
6838 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6839 get_set_tsv_func_addr): New prototypes.
6840
6841 * ax.h: New include file.
6842 * ax.c: New source file.
6843
6844 * tracepoint.c: Include ax.h.
6845 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6846 agent_expr, eval_result_type): Move to ax.h.
6847 (parse_agent_expr): Rename to ...
6848 (gdb_parse_agent_expr): ... this, make it non-static and move
6849 to ax.h.
6850 (unparse_agent_expr) Rename to ...
6851 (gdb_unparse_agent_expr): ... this, make it non-static and move
6852 to ax.h.
6853 (eval_agent_expr): Rename to ...
6854 (eval_tracepoint_agent_expr): ... this.
6855 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6856 forward declarations.
6857 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6858 (agent_get_trace_state_variable_value): New function.
6859 (agent_set_trace_state_variable_value): New function.
6860 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6861 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6862 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6863 (condition_true_at_tracepoint): Likewise.
6864 (parse_agent_expr): Rename to ...
6865 (gdb_parse_agent_expr): ... this and move to ax.c.
6866 (unparse_agent_expr): Rename to ...
6867 (gdb_unparse_agent_expr): ... this and move to ax.c.
6868 (gdb_agent_op_name): Move to ax.c.
6869 (eval_agent_expr): Rename to ...
6870 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6871 and move to ax.c.
6872 (eval_tracepoint_agent_expr): New function.
6873 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6874 non-static.
5e1dc496
LM
6875 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6876 ax.c.
6877 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6878 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6879 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6880 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6881 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6882 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6883 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6884 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6885 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6886 (compile_bytecodes): Remove forward declaration.
6887 (is_goto_target): Move to ax.c.
6888 (compile_bytecodes): Move to ax.c and call
6889 agent_get_trace_state_variable_value (...) and
6890 agent_set_trace_state_variable_value (...).
6891
6892 * Makefile.in: Update ax.c and IPA dependencies.
6893
277e4e52
PA
68942012-02-24 Pedro Alves <palves@redhat.com>
6895
6896 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6897 (cmd_bigqtbuffer_circular): ... this. Only handle
6898 'QTBuffer:circular:'.
6899 (handle_tracepoint_general_set): Adjust.
6900
bf4c19f7
YQ
69012012-02-16 Yao Qi <yao@codesourcery.com>
6902
6903 * inferiors.c: Move code to ...
6904 * dll.c: .... here. New.
6905 * server.h: Declare clear_dlls.
6906 * Makefile.in (SFILES): Add dll.c.
6907 (OBS): Add dll.o
6908 (dll.o): New rule.
6909
d73f2619
YQ
69102012-02-11 Yao Qi <yao@codesourcery.com>
6911
6912 * server.c: (handle_monitor_command): Add a new parameter
6913 `own_buf'.
6914 (handle_query): Update caller.
6915
f8255c2a
JB
69162012-02-09 Joel Brobecker <brobecker@adacore.com>
6917
6918 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6919 * configure, config.in: Regenerate.
6920 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6921 is not defined.
6922
da84f473
PA
69232012-02-02 Pedro Alves <palves@redhat.com>
6924
6925 Try SIGKILL first, then PTRACE_KILL.
6926 * linux-low.c (linux_kill_one_lwp): New.
6927 (linux_kill_one_lwp): Rename to ...
6928 (kill_one_lwp_callback): ... this. Use the new
6929 linux_kill_one_lwp.
6930
e886a173
PA
69312012-02-02 Pedro Alves <palves@redhat.com>
6932
6933 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6934 inferior.
6935
be07f1a2
PA
69362012-01-27 Pedro Alves <palves@redhat.com>
6937
6938 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6939 (elf_64_file_p): Make static.
6940 (linux_pid_exe_is_elf_64_file): New.
6941 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6942 Delete declarations.
6943 (linux_pid_exe_is_elf_64_file): Declare.
6944 * linux-x86-low.c (x86_arch_setup): Use
6945 linux_pid_exe_is_elf_64_file.
6946
d8301ad1
JK
69472012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6948
6949 * linux-low.c (linux_wait_for_event_1): Rename to ...
6950 (linux_wait_for_event): ... here and merge it with former
6951 linux_wait_for_event - new variable wait_ptid, use it.
6952 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6953
01b17894
PA
69542012-01-23 Pedro Alves <palves@redhat.com>
6955
6956 * server.c (main): Avoid yet another case of infinite loop while
6957 detaching/killing after a longjmp.
6958
e825046f
JK
69592012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6960
6961 Code cleanup.
6962 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6963
b9e7b9c3
UW
69642012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6965
6966 * hostio.c (handle_readlink): New function.
6967 (handle_vFile): Call it to handle "vFile:readlink" packets.
6968
901f9912
UW
69692012-01-20 Pedro Alves <palves@redhat.com>
6970 Ulrich Weigand <ulrich.weigand@linaro.org>
6971
6972 * server.c (handle_v_requests): Only support vAttach and vRun to
6973 start multiple processes when in extended protocol mode.
6974
fc1ab1a0
PA
69752012-01-17 Pedro Alves <palves@redhat.com>
6976
6977 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6978 memalign plus mprotect to allocate the scratch buffer.
6979
7d5d4e98
PA
69802012-01-13 Pedro Alves <palves@redhat.com>
6981
6982 * server.c (attach_inferior): Clear `cont_thread'.
6983
f128d5e9
PA
69842012-01-13 Pedro Alves <palves@redhat.com>
6985
6986 * server.c (main): Avoid infinite loop while detaching/killing
6987 after a longjmp.
6988
06db92f0
DE
69892012-01-09 Doug Evans <dje@google.com>
6990
6991 * server.c (start_inferior): Set last_ptid in --wrapper case.
6992
32d92999
YQ
69932012-01-06 Yao Qi <yao@codesourcery.com>
6994
6995 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6996 defined.
6997 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6998
5e0a92a9
YQ
69992012-01-04 Yao Qi <yao@codesourcery.com>
7000
7001 * tracepoint.c (cmd_qtdp): Print debug message
7002 for static tracepoint.
7003
ae639e8c
YQ
70042012-01-04 Yao Qi <yao@codesourcery.com>
7005
7006 * tracepoint.c (trace_vdebug): Differentiate debug message
7007 between gdbserver and IPA.
7008
f72429c5
YQ
70092012-01-03 Yao Qi <yao@codesourcery.com>
7010
7011 * tracepoint.c (tracepoint_was_hit): Don't collect for
7012 static tracepoint.
7013
12c3e59c
JB
70142012-01-02 Joel Brobecker <brobecker@adacore.com>
7015
7016 * terminal.h: Reformat copyright header.
7017
67827812
JB
70182012-01-02 Joel Brobecker <brobecker@adacore.com>
7019
7020 * server.c (gdbserver_version): Update copyright year.
7021 * gdbreplay.c (gdbreplay_version): Likewise.
7022
3e52c33d
JK
70232011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7024
7025 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7026
7027 Revert:
7028 2011-12-18 Hui Zhu <teawater@gmail.com>
7029 * linux-low.c (linux_create_inferior): Save return value to ret.
7030
66f1260e
HZ
70312011-12-18 Hui Zhu <teawater@gmail.com>
7032
7033 * linux-low.c (linux_create_inferior): Save return value to ret.
7034
e77616d7
DE
70352011-12-16 Doug Evans <dje@google.com>
7036
e7b06c57
DE
7037 * linux-low.c (linux_create_inferior): If stdio connection,
7038 redirect stdin from /dev/null, stdout to stderr.
7039 * remote-utils.c (remote_is_stdio): New static global.
7040 (remote_connection_is_stdio): New function.
7041 (remote_prepare): Handle stdio connection.
7042 (remote_open): Ditto.
7043 (remote_close): Don't close stdin for stdio connections.
7044 (read_prim,write_prim): New functions. Replace all calls to
7045 read/write to these.
7046 * server.c (main): Watch for "-" argument. Move call to
7047 remote_prepare before start_inferior.
7048 * server.h (STDIO_CONNECTION_NAME): New macro.
7049 (remote_connection_is_stdio): Declare.
7050
e77616d7
DE
7051 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7052 in debugging output.
7053
82067193
YQ
70542011-12-15 Yao Qi <yao@codesourcery.com>
7055
7056 * tracepoint.c: Include sys/syscall.h.
7057 (gdb_ust_thread): Remove preprocessor conditional.
7058
82bfbe7e
PA
70592011-12-14 Pedro Alves <pedro@codesourcery.com>
7060
7061 * linux-low.c (linux_detach_one_lwp): Call
7062 the_low_target.prepare_to_resume before detaching.
7063
712c6575
YQ
70642011-12-14 Yao Qi <yao@codesourcery.com>
7065
7066 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7067 of write.
7068
d54d1edf
YQ
70692011-12-14 Yao Qi <yao@codesourcery.com>
7070
7071 * i386-low.c (i386_low_stopped_data_address): Initialize local
7072 variable `control'.
7073
6210a125
PA
70742011-12-13 Pedro Alves <pedro@codesourcery.com>
7075
7076 PR remote/13492
7077
7078 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7079 DR_CONTROL unless necessary. Extend comments.
7080 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7081 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7082
2ece8244
YQ
70832011-12-13 Yao Qi <yao@codesourcery.com>
7084
7085 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7086 macros.
7087 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7088
784867a5
JK
70892011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7090
7091 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7092 Print new debug message for such case.
7093
6bf36717
JK
70942011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7095
7096 Fix overlapping memcpy.
7097 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7098 the read_inferior_memory transfer.
7099 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7100 write_inferior_memory transfer.
7101 (set_fast_tracepoint_jump): New variable buf. Use it for the
7102 read_inferior_memory and write_inferior_memory transfers.
7103 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7104 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7105 Use it for the write_inferior_memory transfer.
7106 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7107 buffers.
7108
50275556
MR
71092011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7110
7111 * linux-low.c (fetch_register, store_register): Make code
7112 consistent, fix formatting.
7113
7325beb4
MR
71142011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7115
7116 * linux-low.c (usr_store_inferior_registers): Factor out code
7117 to handle individual registers into...
7118 (store_register): ... this new function.
7119
c642a434
UW
71202011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7121
7122 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7123 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7124 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7125 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7126 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7127 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7128 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7129 (srv_xmlfiles): Add new XML files.
7130
7131 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7132 and <sys/uio.h>.
7133 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7134 (init_registers_s390_linux32v1): Add prototype.
7135 (init_registers_s390_linux32v2): Likewise.
7136 (init_registers_s390_linux64v1): Likewise.
7137 (init_registers_s390_linux64v2): Likewise.
7138 (init_registers_s390x_linux64v1): Likewise.
7139 (init_registers_s390x_linux64v2): Likewise.
7140 (s390_num_regs): Increment to 52.
7141 (s390_regmap): Add orig_r2 register.
7142 (s390_num_regs_3264): Increment to 68.
7143 (s390_regmap_3264): Add orig_r2 register.
7144 (s390_collect_ptrace_register): Handle orig_r2 register.
7145 (s390_supply_ptrace_register): Likewise.
7146 (s390_fill_last_break): New function.
7147 (s390_store_last_break): Likewise.
7148 (s390_fill_system_call): New function.
7149 (s390_store_system_call): Likewise.
7150 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7151 register sets.
7152 (s390_check_regset): New function.
7153 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7154 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7155 Update target_regsets for available register sets.
7156
2268b414
JK
71572011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7158 Jan Kratochvil <jan.kratochvil@redhat.com>
7159
7160 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7161 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7162 New.
7163 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7164 * linux-low.h (struct process_info_private): New member r_debug.
7165 * server.c (handle_qxfer_libraries): Call
7166 the_target->qxfer_libraries_svr4.
7167 (handle_qxfer_libraries_svr4): New function.
7168 (qxfer_packets): New entry "libraries-svr4".
7169 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7170 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7171 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7172 PACKET_qXfer_libraries_svr4.
7173
d6db1fab
UW
71742011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7175
7176 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7177 PSW address/mask between 8-byte and 16-byte formats.
7178 (s390_supply_ptrace_register): Likewise.
7179 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7180 basic addressing mode bit.
7181
242f5f1c
SS
71822011-11-24 Stan Shebs <stan@codesourcery.com>
7183
7184 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7185
f196051f
SS
71862011-11-17 Stan Shebs <stan@codesourcery.com>
7187
7188 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7189 (tracing_start_time): New global.
7190 (tracing_stop_time): New global.
7191 (tracing_user_name): New global.
7192 (tracing_notes): New global.
7193 (tracing_stop_note): New global.
7194 (cmd_qtstart): Set traceframe_usage, start_time.
7195 (stop_tracing): Set stop_time.
7196 (cmd_qtstatus): Report additional status.
7197 (cmd_qtp): New function.
7198 (handle_tracepoint_query): Call it.
7199 (cmd_qtnotes): New function.
7200 (handle_tracepoint_general_set): Call it.
7201 (get_timestamp): Rename from tsv_get_timestamp.
7202
405f8e94
SS
72032011-11-14 Stan Shebs <stan@codesourcery.com>
7204 Kwok Cheung Yeung <kcy@codesourcery.com>
7205
7206 * linux-x86-low.c (small_jump_insn): New.
7207 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7208 trampoline and error message, build a trampoline and issue a small
7209 jump instruction to it.
7210 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7211 trampoline and error message.
7212 (x86_get_min_fast_tracepoint_insn_len): New.
7213 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7214 * linux-low.h (struct linux_target_ops): Add arguments to
7215 install_fast_tracepoint_jump_pad operation, add new operation.
7216 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7217 arguments.
7218 (linux_get_min_fast_tracepoint_insn_len): New function.
7219 (linux_target_op): Add new operation.
7220 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7221 (gdb_trampoline_buffer_end): Ditto.
7222 (gdb_trampoline_buffer_error): Ditto.
7223 (struct ipa_sym_addresses): Add fields for new IPA variables.
7224 (symbol_list): Add entries for new IPA variables.
7225 (struct tracepoint): Add fields to hold the address range of the
7226 trampoline used by the tracepoint.
7227 (trampoline_buffer_head): New static variable.
7228 (trampoline_buffer_tail): Ditto.
7229 (claim_trampoline_space): New function.
7230 (have_fast_tracepoint_trampoline_buffer): New function.
7231 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7232 structure.
7233 (install_fast_tracepoint): Ditto, also add error buffer argument.
7234 (cmd_qtminftpilen): New function.
7235 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7236 (fast_tracepoint_from_trampoline_address): New function.
7237 (fast_tracepoint_collecting): Handle trampoline as part of jump
7238 pad space.
7239 (set_trampoline_buffer_space): New function.
7240 (initialize_tracepoint): Initialize new IPA variables.
7241 * target.h (struct target_ops): Add arguments to
7242 install_fast_tracepoint_jump_pad operation, add new
7243 get_min_fast_tracepoint_insn_len operation.
7244 (target_get_min_fast_tracepoint_insn_len): New.
7245 (install_fast_tracepoint_jump_pad): Add arguments.
7246 * server.h (IPA_BUFSIZ): Define.
7247 * linux-i386-ipa.c: Include extra header files.
7248 (initialize_fast_tracepoint_trampoline_buffer): New function.
7249 (initialize_low_tracepoint): Call it.
7250 * server.h (set_trampoline_buffer_space): Declare.
7251 (claim_trampoline_space): Ditto.
7252 (have_fast_tracepoint_trampoline_buffer): Ditto.
7253
1e4d1764
YQ
72542011-11-14 Yao Qi <yao@codesourcery.com>
7255
7256 * server.c (handle_query): Handle InstallInTrace for qSupported.
7257 * tracepoint.c (add_tracepoint): Sort list.
7258 (install_tracepoint, download_tracepoint): New.
7259 (cmd_qtdp): Call them to install and download tracepoints.
7260 (sort_tracepoints): Removed.
7261 (cmd_qtstart): Update.
7262
5c73ff4e
YQ
72632011-11-14 Yao Qi <yao@codesourcery.com>
7264
7265 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7266 * mem-break.h: Declare.
7267 * tracepoint.c (cmd_qtstart): Move some code to ...
7268 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7269 New.
7270 (download_tracepoints): Move some code to ...
7271 (download_tracepoint_1): ... here. New.
7272
86a30030
YQ
72732011-11-08 Yao Qi <yao@codesourcery.com>
7274
7275 * remote-utils.c (relocate_instruction): A comment fix.
7276
8d26e50c
JB
72772011-11-07 Joel Brobecker <brobecker@adacore.com>
7278
7279 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7280 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7281 dr_status_mirror and dr_control_mirror from debug_reg_state.
7282 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7283 (i386_initial_stuff): Remove use of deleted globals.
7284 (i386_get_thread_context, i386_set_thread_context,
7285 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7286 from debug_reg_state.
7287
a59306a3
YQ
72882011-11-05 Yao Qi <yao@codesourcery.com>
7289
7290 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7291 address as TPOINT's.
7292
3065dfb6
SS
72932011-11-02 Stan Shebs <stan@codesourcery.com>
7294
7295 * tracepoint.c (agent_mem_read_string): New function.
7296 (eval_agent_expr): Call it for tracenz.
7297 * server.c (handle_query): Report support for tracenz.
7298
fd0d8c7c
YQ
72992011-11-02 Yao Qi <yao@codesourcery.com>
7300
7301 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7302
609086b1
YQ
73032011-11-02 Yao Qi <yao@codesourcery.com>
7304
7305 * target.h: Fix a typo in comment.
7306
b9fd1791
PA
73072011-10-31 Pedro Alves <pedro@codesourcery.com>
7308
7309 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7310 clobber the breakpoints' shadows with fast tracepoint jumps.
7311 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7312 * target.c (write_inferior_memory): Also pass MYADDR down to
7313 check_mem_write.
7314
03583c20
UW
73152011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7316
7317 * configure.ac: Check support for personality routine.
7318 * configure: Regenerate.
7319 * config.in: Likewise.
7320 * linux-low.c: Include <sys/personality.h>.
7321 Define ADDR_NO_RANDOMIZE if necessary.
7322 (linux_create_inferior): Disable address space randomization when
7323 forking inferior, if requested.
7324 (linux_supports_disable_randomization): New function.
7325 (linux_target_ops): Install it.
7326 * server.h (disable_randomization): Declare.
7327 * server.c (disable_randomization): New global variable.
7328 (handle_general_set): Handle QDisableRandomization.
7329 (handle_query): Likewise for qSupported.
7330 (main): Support --disable-randomization and --no-disable-randomization
7331 command line arguments.
7332 * target.h (struct target_ops): Add supports_disable_randomization.
7333 (target_supports_disable_randomization): New macro.
7334
723b724b
MF
73352011-09-29 Mike Frysinger <vapier@gentoo.org>
7336
7337 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7338 ifdef check.
7339 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7340 [!PT_GETDSBT] (target_loadmap): New definition.
7341 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7342 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7343 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7344 and PT_GETDSBT to LINUX_LOADMAP.
7345 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7346 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7347
55329a5c 73482011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7349
7350 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7351 (arm_linux_hwbp_cap): New static variable.
7352 (arm_linux_get_hwbp_cap): Replace by ...
7353 (arm_linux_init_hwbp_cap): ... this new function.
7354 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7355 (arm_linux_get_hw_watchpoint_count): Likewise.
7356 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7357 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7358 (arm_prepare_to_resume): Use perror_with_name instead of error.
7359
55329a5c 73602011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7361
7362 * linux-arm-low.c: Include <signal.h>.
7363 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7364 (struct arm_linux_hwbp_cap): New data type.
7365 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7366 (struct arm_linux_hw_breakpoint): New data type.
7367 (MAX_BPTS, MAX_WPTS): Define.
7368 (struct arch_process_info, struct arch_lwp_info): New data types.
7369 (arm_linux_get_hwbp_cap): New function.
7370 (arm_linux_get_hw_breakpoint_count): Likewise.
7371 (arm_linux_get_hw_watchpoint_count): Likewise.
7372 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7373 (arm_hwbp_control_initialize): Likewise.
7374 (arm_hwbp_control_is_enabled): Likewise.
7375 (arm_hwbp_control_is_initialized): Likewise.
7376 (arm_hwbp_control_disable): Likewise.
7377 (arm_linux_hw_breakpoint_equal): Likewise.
7378 (arm_linux_hw_point_initialize): Likewise.
7379 (struct update_registers_data): New data structure.
7380 (update_registers_callback: New function.
7381 (arm_insert_point): Likewise.
7382 (arm_remove_point): Likewise.
7383 (arm_stopped_by_watchpoint): Likewise.
7384 (arm_stopped_data_address): Likewise.
7385 (arm_new_process): Likewise.
7386 (arm_new_thread): Likewise.
7387 (arm_prepare_to_resume): Likewise.
7388 (the_low_target): Register arm_insert_point, arm_remove_point,
7389 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7390 arm_new_thread, and arm_prepare_to_resume.
7391
6b9801d4
SS
73922011-09-15 Stan Shebs <stan@codesourcery.com>
7393
7394 * server.h (struct emit_ops): Add compare-goto fields.
7395 * tracepoint.c (gdb_agent_op_sizes): New table.
7396 (emit_eq_goto): New function.
7397 (emit_ne_goto): New function.
7398 (emit_lt_goto): New function.
7399 (emit_le_goto): New function.
7400 (emit_gt_goto): New function.
7401 (emit_ge_goto): New function.
7402 (is_goto_target): New function.
7403 (compile_bytecodes): Recognize special cases of compare-goto
7404 combinations and call specialized emitters for them.
7405 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7406 (amd64_emit_ne_goto): New function.
7407 (amd64_emit_lt_goto): New function.
7408 (amd64_emit_le_goto): New function.
7409 (amd64_emit_gt_goto): New function.
7410 (amd64_emit_ge_goto): New function.
7411 (amd64_emit_ops): Add the new functions.
7412 (i386_emit_eq_goto): New function.
7413 (i386_emit_ne_goto): New function.
7414 (i386_emit_lt_goto): New function.
7415 (i386_emit_le_goto): New function.
7416 (i386_emit_gt_goto): New function.
7417 (i386_emit_ge_goto): New function.
7418 (i386_emit_ops): Add the new functions.
7419
bf15cbda
SS
74202011-09-08 Stan Shebs <stan@codesourcery.com>
7421
7422 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7423 (i386_emit_epilogue): Restore %ebx.
7424
943ca1dd
JZ
74252011-08-31 Jie Zhang <jzhang918@gmail.com>
7426
7427 * server.c (step_thread): Remove definition.
7428 (process_serial_event): Don't handle Hs.
7429 * server.h (step_thread): Remove declaration.
7430 * target.c (set_desired_inferior): Remove use of step_thread.
7431
e3deef73
LM
74322011-08-24 Luis Machado <lgustavo@codesourcery.com>
7433
7434 * linux-low.c: Include linux-procfs.h.
7435 (linux_attach_lwp_1): Update comments.
7436 (linux_attach): Scan for existing threads when attaching to a
7437 process that is the tgid.
7438 * Makefile.in: Update dependencies.
7439
13da1c97
LM
74402011-08-24 Luis Machado <lgustavo@codesourcery.com>
7441
7442 * configure.srv: Add linux-procfs.o dependencies.
7443
881127c9
YQ
74442011-08-14 Yao Qi <yao@codesourcery.com>
7445
7446 * target.h (struct target_ops): Fix indent.
7447 * win32-low.c (win32_target_ops): Fix comment.
7448
58dbd541
YQ
74492011-08-14 Andrew Jenner <andrew@codesourcery.com>
7450 Yao Qi <yao@codesourcery.com>
7451
7452 * Makefile.in (clean): Remove tic6x-*.c files.
7453 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7454 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7455 (tic6x-c64xp-linux.c): Likewise.
7456 * configure.srv: Add support for tic6x-*-uclinux.
7457 * linux-tic6x-low.c: New.
7458 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7459
78d85199
YQ
74602011-08-14 Andrew Stubbs <ams@codesourcery.com>
7461 Yao Qi <yao@codesourcery.com>
7462
7463 * target.h (struct target_ops): Add read_loadmap.
7464 * linux-low.c (struct target_loadseg): New type.
7465 (struct target_loadmap): New type.
7466 (linux_read_loadmap): New function.
7467 (linux_target_ops): Add linux_read_loadmap.
7468 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7469 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7470 to NULL.
78d85199 7471
a959a88d
EZ
74722011-08-05 Eli Zaretskii <eliz@gnu.org>
7473
7474 * win32-low.c: Include <stdint.h>.
7475
1ced966e
PA
74762011-07-22 Pedro Alves <pedro@codesourcery.com>
7477
7478 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7479 to the inferior here.
7480 (i386_remove_aligned_watchpoint): Ditto.
7481 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7482 fit part of the watchpoint in the debug registers.
7483 (i386_update_inferior_debug_regs): New.
7484 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7485 registers, and only update the inferior on success.
7486 (i386_low_remove_watchpoint): Ditto.
7487
d26e3629
KY
74882011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7489
7490 * linux-low.c (compare_ints, unique, list_threads, show_process,
7491 linux_core_of_thread): Delete.
7492 (linux_target_ops): Change linux_core_of_thread to
7493 linux_common_core_of_thread.
7494 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7495 * utils.c (malloc_failure): Change type of argument.
7496 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7497 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7498 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7499 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7500 (IPA_OBJS): Add common-utils-ipa.o.
7501 (ptid_h, linux_osdata_h): New macros.
7502 (server_h): Add common/common-utils.h, common/xml-utils.h,
7503 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7504 common/ptid.h.
7505 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7506 ptid.o, buffer.o): New rules.
7507 (linux-low.o): Add common/linux-osdata.h as a dependency.
7508 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7509 * configure.ac: Add AC_HEADER_DIRENT check.
7510 * config.in: Regenerate.
7511 * configure: Regenerate.
7512 * remote-utils.c (xml_escape_text): Delete.
7513 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7514 buffer_xml_printf): Move to common/buffer.c.
7515 * server.c (main): Remove call to initialize_inferiors.
7516 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7517 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7518 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7519 internal_error, gdb_assert, gdb_assert_fail): Delete.
7520 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7521 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7522 common/buffer.h.
7523 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7524 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7525 initialize_inferiors): Delete.
7526
2275a1a7
PA
75272011-07-20 Pedro Alves <pedro@codesourcery.com>
7528
7529 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7530 symbol error.
7531
0a5b1e09
PA
75322011-05-31 Pedro Alves <pedro@codesourcery.com>
7533
7534 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7535 assertion.
7536 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7537
6938fd34
YQ
75382011-05-26 Yao Qi <yao@codesourcery.com>
7539
7540 * Makefile.in (thread-db.o): Track dependence to
7541 common/gdb_thread_db.h.
7542 * thread-db.c: include gdb_thread_db.h from right place.
7543
b481f9e0
TT
75442011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7545
7546 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7547 __FILE__ and __LINE__ to internal_error.
7548
98a5dd13
DE
75492011-05-13 Doug Evans <dje@google.com>
7550
7551 * thread-db.c (try_thread_db_load_from_sdir): New function.
7552 (try_thread_db_load_from_dir): New function.
7553 (thread_db_load_search): Handle $sdir, ignore $pdir.
7554 Remove trying of system directories if search of
7555 libthread-db-search-path fails, that is now done via $sdir.
7556
d248b706
KY
75572011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7558
7559 * server.c (handle_query): Add EnableDisableTracepoints to the list
7560 of supported features.
43aaf8b6 7561 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7562 tracepoints.
43aaf8b6
PA
7563 (cmd_qtenable_disable): New.
7564 (cmd_qtstart): Install tracepoints even if disabled.
7565 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7566 receiving a QTEnable or QTDisable packet.
7567 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7568 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7569 tracepoints.
7570 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7571
84e578fb
DE
75722011-05-10 Doug Evans <dje@google.com>
7573
7574 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7575
71f55dd8
DE
75762011-05-04 Doug Evans <dje@google.com>
7577
7578 * linux-low.c (linux_join): Skip process lookup.
7579 * spu-low.c (spu_join): Ditto.
7580 * server.c (join_inferiors_callback): Delete.
7581 (process_serial_event): For 'D' packet (detach) call join_inferior
7582 directly.
7583
4d393d60
JM
75842011-05-04 Joseph Myers <joseph@codesourcery.com>
7585
7586 * README: Don't mention xscale*-*-linux*.
7587 * configure.srv (xscale*-*-linux*): Don't handle target.
7588
b00ad6ff
NF
75892011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7590
7591 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7592 casting pointers.
7593 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7594 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7595 (i386_emit_void_call_2): Likewise.
7596
af96c192
YQ
75972011-04-26 Yao Qi <yao@codesourcery.com>
7598
43aaf8b6
PA
7599 * linux-low.c: Move common macros to linux-ptrace.h.
7600 Include linux-ptrace.h.
af96c192
YQ
7601 * Makefile.in (linux_ptrace_h): New.
7602 (linux-low.o): Depends on linux-ptrace.h.
7603
03f2bd59
JK
76042011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7605
7606 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7607 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7608 (remote_prepare): New function with most of the TCP code from ...
7609 (remote_open): ... here. Detect PORT here unconditionally. Move also
7610 setting transport_is_reliable.
7611 * server.c (run_once): New variable.
7612 (gdbserver_usage): Document it.
7613 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7614 the first run if RUN_ONCE.
7615 * server.h (run_once, remote_prepare): New declarations.
7616
7a9dd1b2
TT
76172011-04-19 Tom Tromey <tromey@redhat.com>
7618
7619 * win32-low.c (handle_load_dll): Remove duplicate "the".
7620
81239425
PM
76212011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7622
7623 Remove support for old Cygwin 1.5 versions.
7624 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7625 function to avoid warning.
7626 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7627 warning.
7628
9e0627f1
PM
76292011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7630
7631 * gdbserver/server.h (Macro _): Define it if not available.
7632
588eebee
MS
76332011-03-14 Michael Snyder <msnyder@vmware.com>
7634
348af9f7 7635 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7636
43f70d4c
JB
76372011-03-10 Joel Brobecker <brobecker@adacore.com>
7638
7639 * Makefile.in (maintainer-clean realclean distclean): Remove
7640 "make ... subdir_do" command.
7641
348af9f7
MS
76422011-03-10 Michael Snyder <msnyder@vmware.com>
7643
7644 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7645
7646 * server.c (handle_v_run): Free alloced buffer on early return.
7647
e637a4f5
YQ
76482011-03-09 Yao Qi <yao@codesourcery.com>
7649
7650 Revert:
7651 2011-03-04 Yao Qi <yao@codesourcery.com>
7652
7653 * Makefile.in: Remove GNU make feature --directory.
7654
7655 2011-03-05 Yao Qi <yao@codesourcery.com>
7656
7657 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7658 (subdir_do): New make target. Copied from gdb/Makefile.
7659 (maintainer-clean, realclean, distclean, clean): Call corresponding
7660 make targets in common/Makefile.
7661
7662 2011-02-11 Yao Qi <yao@codesourcery.com>
7663
7664 * configure.ac: Call AC_PROG_RANLIB.
7665 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7666 * configure: Regenerate.
7667
e6edda56
JK
76682011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7669
7670 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7671
e5141119
JB
76722011-03-06 Yao Qi <yao@codesourcery.com>
7673
7674 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7675
64794aa4
JB
76762011-03-05 Yao Qi <yao@codesourcery.com>
7677
7678 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7679 (subdir_do): New make target. Copied from gdb/Makefile.
7680 (maintainer-clean, realclean, distclean, clean): Call corresponding
7681 make targets in common/Makefile.
7682
7a762829
YQ
76832011-03-04 Yao Qi <yao@codesourcery.com>
7684
7685 * Makefile.in: Remove GNU make feature --directory.
7686
348af9f7
MS
76872011-03-04 Michael Snyder <msnyder@vmware.com>
7688
7689 * server.c (queue_stop_reply): Call xmalloc not malloc.
7690
76912011-03-02 Michael Snyder <msnyder@vmware.com>
7692
7693 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7694
9f72fee2
MS
76952011-02-28 Michael Snyder <msnyder@vmware.com>
7696
588eebee
MS
7697 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7698 (cmd_qtframe): Ditto.
7699 (cmd_qtbuffer): Ditto.
7700 (cmd_bigqtbuffer): Ditto.
7701
9f72fee2
MS
7702 * utils.c (decimal2str): Initialize 'width' to nine, then
7703 don't mess with it.
7704
8040bd49
UW
77052011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7706
7707 * hostio.c (require_data): Free *data, not data.
7708
7e52cbd0
JK
77092011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7710
7711 * hostio.c (require_data): Use free, not xfree.
7712
9130f83e
MS
77132011-02-27 Michael Snyder <msnyder@vmware.com>
7714
4b812f4e
MS
7715 * server.c (handle_query): Discard unused value.
7716
9130f83e
MS
7717 * hostio.c (require_data): Free malloc memory before returning
7718 error.
7719
69d37113
MS
77202011-02-26 Michael Snyder <msnyder@vmware.com>
7721
7722 * linux-low.c (list_threads): Call closedir for dirent.
7723
35f5825a
MS
77242011-02-27 Michael Snyder <msnyder@vmware.com>
7725
2a589cef
MS
7726 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7727 a case statement falls through.
7728
0adea5f7
MS
7729 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7730
35f5825a
MS
7731 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7732 in comparison.
7733
238f1c74
MS
77342011-02-26 Michael Snyder <msnyder@vmware.com>
7735
7736 * utils.c (decimal2str): Eliminate dead code and dead param.
7737 (pulongest): Drop dead param from call to decimal2str.
7738 (plongest): Ditto.
7739
633ff500
JB
77402011-02-24 Joel Brobecker <brobecker@adacore.com>
7741
7742 Revert the following patch (not approved yet):
7743 2011-02-21 Hui Zhu <teawater@gmail.com>
7744 * tracepoint.c (tp_printf): New function.
7745 (eval_agent_expr): Handle gdb_agent_op_printf.
7746
f9c6ff72
HZ
77472011-02-21 Hui Zhu <teawater@gmail.com>
7748
7749 * tracepoint.c (tp_printf): New function.
7750 (eval_agent_expr): Handle gdb_agent_op_printf.
7751
94d5e490
TT
77522011-02-18 Tom Tromey <tromey@redhat.com>
7753
7754 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7755 (tracepoint.o): Likewise.
7756 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7757 (gdb_agent_op_names): Likewise.
7758
c7f96d2b
TT
77592011-02-18 Tom Tromey <tromey@redhat.com>
7760
7761 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7762 gdb_agent_op_rot>: New constants.
7763 (gdb_agent_op_names): Add pick and roll.
7764 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7765 cases.
7766
0feedb2c
JK
77672011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7768
7769 * aclocal.m4: Regenerated with aclocal-1.11.1.
7770
b3b9301e
PA
77712011-02-14 Pedro Alves <pedro@codesourcery.com>
7772
7773 * server.c (handle_qxfer_traceframe_info): New.
7774 (qxfer_packets): Register "traceframe-info".
7775 (handle_query): Report support for qXfer:traceframe-info:read+.
7776 * tracepoint.c (match_blocktype): New.
7777 (traceframe_find_block_type): Rename to ...
7778 (traceframe_walk_blocks): ... this. Add callback filter argument,
7779 and use it.
7780 (traceframe_find_block_type): New, reimplemented on top of
7781 traceframe_walk_blocks.
7782 (build_traceframe_info_xml): New.
7783 (traceframe_read_info): New.
7784 * server.h (traceframe_read_info): Declare.
7785
4f3e6fb7
YQ
77862011-02-11 Yao Qi <yao@codesourcery.com>
7787
7788 * configure.ac: Call AC_PROG_RANLIB.
7789 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7790 * configure: Regenerate.
7791
764880b7
PA
77922011-02-07 Pedro Alves <pedro@codesourcery.com>
7793
7794 * server.c (gdb_read_memory): Change return semantics to allow
7795 partial transfers.
7796 (handle_search_memory_1): Adjust.
7797 (process_serial_event) <'m' packet>: Handle partial transfers.
7798 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7799
1c79eb8a
PA
78002011-01-28 Pedro Alves <pedro@codesourcery.com>
7801
7802 * regcache.c (init_register_cache): Initialize
7803 regcache->register_status.
7804 (free_register_cache): Release regcache->register_status.
7805 (regcache_cpy): Copy register_status.
7806 (registers_to_string): Print 'x's for unavailable registers.
7807 (supply_register): Mark the register's status valid or
7808 unavailable, depending on whether a buffer was passed in or not.
7809 (supply_register_zeroed): New.
7810 (supply_regblock): Mark the registers' status valid or
7811 unavailable, depending on whether a buffer was passed in or not.
7812 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7813 (struct regcache): New `register_status' field.
7814 (supply_register_zeroed): Declare.
7815 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7816 supply_register_zeroed, rather than passing a NULL buffer to
7817 supply_register.
7818 * tracepoint.c (fetch_traceframe_registers): Update comment.
7819
85724a0e
PA
78202011-01-28 Pedro Alves <pedro@codesourcery.com>
7821
7822 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7823 buffer explicit.
7824
d08aafef
PA
78252011-01-25 Pedro Alves <pedro@codesourcery.com>
7826
7827 * server.h (decode_xfer_write): Change prototype.
7828 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7829 and don't extract the annex here.
7830 * server.c (decode_xfer_read): Remove `annex' parameter,
7831 and don't extract the annex here.
7832 (decode_xfer): New.
7833 (struct qxfer): New.
7834 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7835 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7836 (handle_qxfer_statictrace): New functions, abstracted out from
7837 handle_query, and made to use the struct qxfer interface.
7838 (handle_threads_qxfer_proper): Rename to ...
7839 (handle_qxfer_threads_proper): ... this.
7840 (handle_threads_qxfer): Rename to ...
7841 (handle_qxfer_threads): ... this. Adjust.
7842 (qxfer_packets): New array.
7843 (handle_qxfer): New function.
7844 (handle_query): Use handle_qxfer.
7845
493e2a69
MS
78462011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7847
7848 * gdbreplay.c: Shorten lines of >= 80 columns.
7849 * linux-low.c: Ditto.
7850 * linux-ppc-low.c: Ditto.
7851 * linux-s390-low.c: Ditto.
7852 * linux-sparc-low.c: Ditto.
7853 * linux-x86-low.c: Ditto.
7854 * linux-xtensa-low.c: Ditto.
7855 * mem-break.c: Ditto.
7856 * nto-low.c: Ditto.
7857 * regcache.h: Ditto.
7858 * remote-utils.c: Ditto.
7859 * server.c: Ditto.
7860 * server.h: Ditto.
7861 * thread-db.c: Ditto.
7862 * tracepoint.c: Ditto.
7863 * utils.c: Ditto.
7864 * win32-low.h: Ditto.
7865
44944448
JB
78662011-01-05 Joel Brobecker <brobecker@adacore.com>
7867
7868 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7869 update.
7870
71ce852c
JB
78712011-01-01 Joel Brobecker <brobecker@adacore.com>
7872
7873 * server.c (gdbserver_version): Update copyright year in version
7874 output.
7875 * gdbreplay.c (gdbreplay_version): Ditto.
7876
eb826dc6
MF
78772010-12-29 Jie Zhang <jie.zhang@analog.com>
7878
7879 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7880 * linux-bfin-low.c: New file.
7881 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7882 PT_DATA_ADDR for BFIN targets.
7883 * Makefile.in (SFILES): Add linux-bfin-low.c.
7884 (clean): Remove reg-bfin.c.
7885 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7886 * README: Mention supported Blackfin targets.
7887
39ab222a
MF
78882010-12-23 Mike Frysinger <vapier@gentoo.org>
7889
7890 * .gitignore: New file.
7891
a1f2ce7d
MF
78922010-11-16 Mike Frysinger <vapier@gentoo.org>
7893
7894 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7895
f474844c
JZ
78962010-10-22 Jie Zhang <jie@codesourcery.com>
7897
7898 * Makefile.in: Add FLAGS_TO_PASS variable.
7899 (install): Remove dependency of install-only and recursively
7900 invoke make for install-only.
7901
f1048712
DE
79022010-10-04 Doug Evans <dje@google.com>
7903
7904 * Makefile.in (uninstall): Use $(DESTDIR).
7905
b53a1623
PA
79062010-09-24 Pedro Alves <pedro@codesourcery.com>
7907
e6ee044d
PA
7908 PR gdb/11842
7909
b53a1623
PA
7910 * linux-x86-low.c (compat_siginfo_from_siginfo)
7911 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7912 si_code is < 0. Check for si_code == SI_TIMER before checking for
7913 si_code < 0.
7914
fa1bd1e4
JB
79152010-09-13 Joel Brobecker <brobecker@adacore.com>
7916
7917 * lynx-i386-low.c: New file.
7918 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7919
47fac8f8
JB
79202010-09-13 Joel Brobecker <brobecker@adacore.com>
7921
7922 * lynx-low.c (ptrace_request_to_str): Remove handling for
7923 request values that have been removed in LynxOS 5.x.
7924
1adfc54d
JB
79252010-09-13 Joel Brobecker <brobecker@adacore.com>
7926
7927 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7928 <ptrace.h>
7929
c2a66c29
NS
79302010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7931
7932 * configure.ac: Add --enable-inprocess-agent option.
7933 * configure: Rebuilt.
7934
32fcada3
YQ
79352010-09-06 Yao Qi <yao@codesourcery.com>
7936
7937 * linux-low.c (linux_kill): Remove unused variable.
7938 (linux_stabilize_threads): Likewise.
7939 * server.c (start_inferior): Likewise.
7940 (queue_stop_reply_callback): Likewise.
7941 * tracepoint.c (do_action_at_tracepoint): Likewise.
7942
0cccb683
YQ
79432010-09-06 Yao Qi <yao@codesourcery.com>
7944
7945 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7946 on return.
7947
423ec54c
JK
79482010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7949
7950 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7951
12ac6819
PA
79522010-09-06 Pedro Alves <pedro@codesourcery.com>
7953
7954 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7955 "$(IPA_DEPFILES)".
7956
8ed54b31
JB
79572010-09-01 Joel Brobecker <brobecker@adacore.com>
7958
7959 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7960 gdbserver/lynx-ppc-low.c: New files.
7961 * Makefile.in (lynx_low_h): New variable.
7962 (lynx-low.o, lynx-ppc-low.o): New rules.
7963 * configure.ac: On LynxOS, link with -lnetinet.
7964 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7965 * configure: regenerate.
7966
bb0116a4
JB
79672010-09-01 Joel Brobecker <brobecker@adacore.com>
7968
7969 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7970 * configure.ac: Add check for vasprintf and vsnprintf.
7971 * configure, config.in: Regenerate.
7972 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7973
a778ab81 79742010-09-01 Joel Brobecker <brobecker@adacore.com>
7975
7976 * gdbreplay.c: Move include of alloca.h up, next to include of
7977 malloc.h.
7978 * server.h: Add include of malloc.h.
7979 * mem-break.c: Remove include of malloc.h.
7980 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7981
8b034a19 79822010-09-01 Joel Brobecker <brobecker@adacore.com>
7983
7984 * Makefile.in (memmem.o): Build with -Wno-error.
7985
79862010-09-01 Joel Brobecker <brobecker@adacore.com>
7987
7988 * utils.c (xsnprintf): Make non-static.
7989 * server.h: Add xsnprintf declaration.
7990 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7991 replace calls to snprintf by calls to xsnprintf throughout.
7992
79932010-09-01 Joel Brobecker <brobecker@adacore.com>
7994
7995 * configure.ac: Add configure check for alloca.
7996 * configure, config.in: Regenerate.
7997 * server.h: Include alloca.h if it exists.
7998 * gdbreplay.c: Include alloca.h if it exists.
7999
1a981360
PA
80002010-08-28 Pedro Alves <pedro@codesourcery.com>
8001
8002 * linux-low.c (__SIGRTMIN): Define if not already defined.
8003 (linux_create_inferior): Check for __ANDROID__ rather than
8004 __SIGRTMIN.
8005 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8006 are already deferred.
8007 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8008 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8009 stopped and already has a pending signal to report.
8010 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8011 a pending signal to report or is moving out of a jump pad.
8012 (linux_init_signals): Check for __ANDROID__ rather than
8013 __SIGRTMIN.
8014
b4d51a55
PA
80152010-08-28 Pedro Alves <pedro@codesourcery.com>
8016
8017 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8018 debug_threads check. Avoid a linear search when not doing debug
8019 output.
8020
ec48365d
PA
80212010-08-27 Pedro Alves <pedro@codesourcery.com>
8022
8023 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8024 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8025 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8026 (process_event): Change local fd's type to gdb_fildes_t.
8027 (create_file_handler): Adjust prototype.
8028 (delete_file_handler): Adjust prototype.
8029 (handle_file_event): Adjust prototype. Use pfildes.
8030 (create_file_event): Adjsut prototype.
8031 * remote-utils.c (remote_desc, listen_desc): Change type to
8032 gdb_fildes_t.
8033 * server.h: New gdb_fildes_t typedef.
8034 [USE_WIN32API]: Include winsock2.h.
8035 (delete_file_handler, add_file_handler): Adjust prototypes.
8036 (pfildes): Declare.
8037 * utils.c (pfildes): New.
8038
854d88f0
PA
80392010-08-27 Pedro Alves <pedro@codesourcery.com>
8040
8041 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8042 * configure: Regenerate.
8043
0146f85b
PA
80442010-08-27 Pedro Alves <pedro@codesourcery.com>
8045
8046 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8047 (linux_done_accessing_memory): ... this.
8048 (linux_target_ops): Adjust.
8049 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8050 * nto-low.c (nto_target_ops): Adjust comment.
8051 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8052 * spu-low.c (spu_target_ops): Adjust comment.
8053 * target.h (target_ops): Rename unprepare_to_access_memory field
8054 to done_accessing_memory.
8055 (unprepare_to_access_memory): Rename to ...
8056 (done_accessing_memory): ... this.
8057
90d74c30
PA
80582010-08-26 Pedro Alves <pedro@codesourcery.com>
8059
8060 * linux-low.c (linux_prepare_to_access_memory): New.
8061 (linux_unprepare_to_access_memory): New.
8062 (linux_target_ops): Install them.
8063 * server.c (read_memory): Rename to ...
8064 (gdb_read_memory): ... this. Use
8065 prepare_to_access_memory/prepare_to_access_memory.
8066 (write_memory): Rename to ...
8067 (gdb_write_memory): ... this. Use
8068 prepare_to_access_memory/prepare_to_access_memory.
8069 (handle_search_memory_1): Adjust.
8070 (process_serial_event): Adjust.
8071 * target.h (struct target_ops): New fields
8072 prepare_to_access_memory and unprepare_to_access_memory.
8073 (prepare_to_access_memory, unprepare_to_access_memory): New.
8074 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8075 prepare_to_access_memory/prepare_to_access_memory.
8076 * nto-low.c (nto_target_ops): Adjust.
8077 * spu-low.c (spu_target_ops): Adjust.
8078 * win32-low.c (win32_target_ops): Adjust.
8079
fd467969
PA
80802010-08-26 Pedro Alves <pedro@codesourcery.com>
8081
8082 * Makefile.in (WARN_CFLAGS): Get it from configure.
8083 (WERROR_CFLAGS): New.
8084 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8085 * configure.ac: Introduce --enable-werror, which adds -Werror to
8086 the compiler command line. Enabled by default. Disable with
8087 --disable-werror. Add -Wdeclaration-after-statement
8088 Wpointer-arith and -Wformat-nonliteral to warning flags.
8089 * configure: Regenerate.
8090
331e2f5f
PA
80912010-08-26 Pedro Alves <pedro@codesourcery.com>
8092
8093 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8094
e581f2b4
PA
80952010-08-26 Pedro Alves <pedro@codesourcery.com>
8096
8097 * gdbreplay.c (remote_error): New.
8098 (gdbchar): New.
8099 (expect): Use gdbchar. Check for error reading from GDB.
8100 Clarify sync error output.
8101 (play): Check for errors writing to GDB.
8102 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8103 * remote-utils.c (getpkt): Check for errors writing to the remote
8104 descriptor.
8105
3c11dd79
PA
81062010-08-25 Pedro Alves <pedro@codesourcery.com>
8107
8108 * linux-low.c (linux_wait_1): Move non-debugging code out of
8109 `debug_threads' control.
8110
d20a8ad9
PA
81112010-08-25 Pedro Alves <pedro@codesourcery.com>
8112
8113 * linux-low.c (linux_wait_1): Don't set last_status here.
8114 * server.c (push_event, queue_stop_reply_callback): Assert we're
8115 not pushing a TARGET_WAITKIND_IGNORE event.
8116 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8117 (myresume, handle_target_event): Set the thread's last_resume_kind
8118 and last_status from the target returned status.
8119
964e4306
PA
81202010-08-25 Pedro Alves <pedro@codesourcery.com>
8121
8122 PR threads/10729
8123
8124 * linux-x86-low.c (update_debug_registers_callback): New.
8125 (i386_dr_low_set_addr): Use it.
8126 (i386_dr_low_get_addr): New.
8127 (i386_dr_low_set_control): Use update_debug_registers_callback.
8128 (i386_dr_low_get_control): New.
8129 (i386_dr_low_get_status): Adjust.
8130 * linux-low.c (linux_stop_lwp): New.
8131 * linux-low.h (linux_stop_lwp): Declare.
8132
8133 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8134 argument instead of a i386_debug_reg_state.
8135 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8136 a i386_debug_reg_state.
8137 (i386_insert_aligned_watchpoint): Adjust.
8138 (i386_remove_aligned_watchpoint): Adjust.
8139 (i386_low_stopped_data_address): Read the debug registers from the
8140 inferior instead of from the mirrors.
8141 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8142 (i386_dr_low_get_addr): Declare.
8143 (i386_dr_low_get_control): Declare.
8144 (i386_dr_low_get_status): Change prototype.
8145
8146 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8147 (i386_dr_low_get_addr): New.
8148 (i386_dr_low_get_control): New.
8149 (i386_dr_low_get_status): Adjust prototype. Return
8150 dr_status_mirror.
8151 (i386_initial_stuff): Clear dr_status_mirror and
8152 dr_control_mirror.
8153 (i386_get_thread_context): Adjust.
8154 (i386_set_thread_context): Adjust.
8155 (i386_thread_added): Adjust.
8156
5f21a75b
PA
81572010-08-24 Pedro Alves <pedro@codesourcery.com>
8158
8159 * linux-low.h (linux_thread_area): Delete declaration.
8160
3e4c1235
TS
81612010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8162
8163 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8164 after its termination.
8165
1971b033
PA
81662010-08-09 Pedro Alves <pedro@codesourcery.com>
8167
8168 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8169 (gdb_wants_all_stopped): Delete.
8170 (linux_wait_1): Don't call them.
8171 * server.c (handle_v_cont): Tag all threads as want-stopped.
8172 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8173 stopped as "client-wants-stopped".
8174
310444ac
PA
81752010-07-31 Pedro Alves <pedro@codesourcery.com>
8176
8177 * Makefile.in (signals_h): New.
8178 (server_h): Depend on it.
8179 (server.o): Don't depend on $(signals_def).
8180 (signals.o): Depend on $(signals_def).
8181
a19cae16
JK
81822010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8183
8184 * Makefile.in (signals_def): New.
8185 (server_h): Append include/gdb/signals.h and signals_def.
8186 (server.o): Append signals_def.
8187
30d50328
JK
81882010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8189
8190 * server.c (handle_target_event): Use target_signal_to_host for
8191 resume_info.sig initialization.
8192 * target.h (struct thread_resume) <sig>: New comment.
8193
5c3216e2
OS
81942010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8195
c6f46ca0
OS
8196 * server.c (handle_query): strcpy() the returned string from paddress()
8197 instead of sprintf().
5c3216e2
OS
8198 * utils.c (paddress): Return phex_nz().
8199
6bd31874
JB
82002010-07-07 Joel Brobecker <brobecker@adacore.com>
8201
8202 * server.c (handle_v_cont): Call mourn_inferior if process
8203 just exited.
8204 (myresume): Likewise.
8205
0fb4aa4b
PA
82062010-07-01 Pedro Alves <pedro@codesourcery.com>
8207
8208 Static tracepoints, and integration with UST.
8209
8210 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8211 * mem-break.c (uninsert_all_breakpoints)
8212 (reinsert_all_breakpoints): New.
8213 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8214 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8215 (gdb_agent_ust_loaded, helper_thread_id)
8216 (gdb_agent_helper_thread_id): New macros.
8217 (struct ipa_sym_addresses): Add addr_ust_loaded,
8218 addr_helper_thread_id, addr_cmd_buf.
8219 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8220 (in_process_agent_loaded_ust): New.
8221 (write_e_ust_not_loaded): New.
8222 (maybe_write_ipa_ust_not_loaded): New.
8223 (struct collect_static_trace_data_action): New.
8224 (enum tracepoint_type) <static_tracepoint>: New.
8225 (struct tracepoint) <handle>: Mention static tracepoints.
8226 (struct static_tracepoint_ctx): New.
8227 (CMD_BUF_SIZE): New.
8228 (add_tracepoint_action): Handle static tracepoint actions.
8229 (unprobe_marker_at): New.
8230 (clear_installed_tracepoints): Handle static tracepoints.
8231 (cmd_qtdp): Handle static tracepoints.
8232 (probe_marker_at): New.
8233 (cmd_qtstart): Handle static tracepoints.
8234 (response_tracepoint): Handle static tracepoints.
8235 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8236 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8237 (get_context_regcache): Handle static tracepoints.
8238 (do_action_at_tracepoint): Handle static tracepoint actions.
8239 (traceframe_find_block_type): Handle static trace data blocks.
8240 (traceframe_read_sdata): New.
8241 (download_tracepoints): Download static tracepoint actions.
8242 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8243 (GDB_PROBE_NAME): New.
8244 (ust_ops): New.
8245 (GET_UST_SYM): New.
8246 (USTF): New.
8247 (dlsym_ust): New.
8248 (ust_marker_to_static_tracepoint): New.
8249 (gdb_probe): New.
8250 (collect_ust_data_at_tracepoint): New.
8251 (gdb_ust_probe): New.
8252 (UNIX_PATH_MAX, SOCK_DIR): New.
8253 (gdb_ust_connect_sync_socket): New.
8254 (resume_thread, stop_thread): New.
8255 (run_inferior_command): New.
8256 (init_named_socket): New.
8257 (gdb_ust_socket_init): New.
8258 (cstr_to_hexstr): New.
8259 (next_st): New.
8260 (first_marker, next_marker): New.
8261 (response_ust_marker): New.
8262 (cmd_qtfstm, cmd_qtsstm): New.
8263 (unprobe_marker_at, probe_marker_at): New.
8264 (cmd_qtstmat, gdb_ust_thread): New.
8265 (gdb_ust_init): New.
8266 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8267 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8268 (ST_REGENTRY): New.
8269 (x86_64_st_collect_regmap): New.
8270 (X86_64_NUM_ST_COLLECT_GREGS): New.
8271 (AMD64_RIP_REGNUM): New.
8272 (supply_static_tracepoint_registers): New.
8273 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8274 (ST_REGENTRY): New.
8275 (i386_st_collect_regmap): New.
8276 (i386_NUM_ST_COLLECT_GREGS): New.
8277 (supply_static_tracepoint_registers): New.
8278 * server.c (handle_query): Handle qXfer:statictrace:read.
8279 <qSupported>: Report support for StaticTracepoints, and
8280 qXfer:statictrace:read features.
8281 * server.h (traceframe_read_sdata)
8282 (supply_static_tracepoint_registers): Declare.
8283 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8284 (unpack_varlen_hex): Include in IPA build.
8285 * Makefile.in (ustlibs, ustinc): New.
8286 (IPA_OBJS): Add remote-utils-ipa.o.
8287 ($(IPA_LIB)): Link -ldl and -lpthread.
8288 (UST_CFLAGS): New.
8289 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8290 * config.in, configure: Regenerate.
8291
9e4344e5
PA
82922010-06-20 Ian Lance Taylor <iant@google.com>
8293 Pedro Alves <pedro@codesourcery.com>
8294
8295 * linux-x86-low.c (always_true): Delete.
8296 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8297 trying to fool the compiler with always_true.
8298
c6beb2cb
PA
82992010-06-20 Pedro Alves <pedro@codesourcery.com>
8300
8301 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8302 conditions in gdbserver.
8303
d2ed6730
UW
83042010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8305
8306 * spu-low.c (spu_read_memory): Wrap around local store limit.
8307 (spu_write_memory): Likewise.
8308
4e29fb54
PA
83092010-06-15 Pedro Alves <pedro@codesourcery.com>
8310
8311 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8312 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8313 LONGEST uses.
8314 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8315 uses.
8316 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8317 uses with LONGEST uses.
8318
6a271cae
PA
83192010-06-14 Stan Shebs <stan@codesourcery.com>
8320 Pedro Alves <pedro@codesourcery.com>
8321
8322 Bytecode compiler.
8323
8324 * linux-x86-low.c: Include limits.h.
8325 (add_insns): New.
8326 (always_true): New.
8327 (EMIT_ASM): New.
8328 (EMIT_ASM32): New.
8329 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8330 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8331 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8332 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8333 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8334 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8335 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8336 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8337 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8338 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8339 (amd64_emit_void_call_2): New.
8340 (amd64_emit_ops): New.
8341 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8342 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8343 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8344 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8345 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8346 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8347 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8348 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8349 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8350 (i386_emit_stack_adjust, i386_emit_int_call_1)
8351 (i386_emit_void_call_2): New.
8352 (i386_emit_ops): New.
8353 (x86_emit_ops): New.
8354 (the_low_target): Install x86_emit_ops.
8355 * server.h (struct emit_ops): New.
8356 (get_raw_reg_func_addr): Declare.
8357 (current_insn_ptr, emit_error): Declare.
8358 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8359 (set_trace_state_variable_value): New defines.
8360 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8361 addr_get_trace_state_variable_value and
8362 addr_set_trace_state_variable_value.
8363 (symbol_list): New fields for get_raw_reg,
8364 get_trace_state_variable_value and set_trace_state_variable_value.
8365 (condfn): New typedef.
8366 (struct tracepoint): New field `compiled_cond'.
8367 (do_action_at_tracepoint): Clear compiled_cond.
8368 (get_trace_state_variable_value, set_trace_state_variable_value):
8369 Export in the IPA.
8370 (condition_true_at_tracepoint): If there's a compiled condition,
8371 run that.
8372 (current_insn_ptr, emit_error): New globals.
8373 (struct bytecode_address): New.
8374 (get_raw_reg_func_addr): New.
8375 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8376 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8377 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8378 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8379 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8380 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8381 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8382 (compile_tracepoint_condition, compile_bytecodes): New.
8383 * target.h (emit_ops): Forward declare.
8384 (struct target_ops): New field emit_ops.
8385 (target_emit_ops): New.
8386 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8387 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8388 * linux-low.c (linux_emit_ops): New.
8389 (linux_target_ops): Install it.
8390 * linux-low.h (struct linux_target_ops): New field emit_ops.
8391
92b72907
UW
83922010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8393
8394 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8395 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8396
fa593d66
PA
83972010-06-01 Pedro Alves <pedro@codesourcery.com>
8398 Stan Shebs <stan@codesourcery.com>
8399
8400 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8401 (all): Depend on $(extra_libraries).
8402 (install-only): Install the IPA.
8403 (IPA_OBJS, IPA_LIB): New.
8404 (clean): Remove the IPA lib.
8405 (IPAGENT_CFLAGS): New.
8406 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8407 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8408 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8409 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8410 * configure.ac: Check for atomic builtins support in the compiler.
8411 (IPA_DEPFILES, extra_libraries): Define.
8412 * configure.srv (ipa_obj): Add description.
8413 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8414 (i[34567]86-*-linux*): Set ipa_obj.
8415 (x86_64-*-linux*): Set ipa_obj.
8416 * linux-low.c (stabilizing_threads): New.
8417 (supports_fast_tracepoints): New.
8418 (linux_detach): Stabilize threads before detaching.
8419 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8420 the lwp is either not stabilizing, or is moving out of a jump pad.
8421 (linux_fast_tracepoint_collecting): New.
8422 (maybe_move_out_of_jump_pad): New.
8423 (enqueue_one_deferred_signal): New.
8424 (dequeue_one_deferred_signal): New.
8425 (linux_wait_for_event_1): If moving out of a jump pad, defer
8426 pending signals to later.
8427 (linux_stabilize_threads): New.
8428 (linux_wait_1): Check if threads need moving out of jump pads, and
8429 do it if so.
8430 (stuck_in_jump_pad_callback): New.
8431 (move_out_of_jump_pad_callback): New.
8432 (lwp_running): New.
8433 (linux_resume_one_lwp): Handle moving out of jump pads.
8434 (linux_set_resume_request): Dequeue deferred signals.
8435 (need_step_over_p): Also step over fast tracepoint jumps.
8436 (start_step_over): Also uninsert fast tracepoint jumps.
8437 (finish_step_over): Also reinsert fast tracepoint jumps.
8438 (linux_install_fast_tracepoint_jump): New.
8439 (linux_target_ops): Install linux_stabilize_threads and
8440 linux_install_fast_tracepoint_jump_pad.
8441 * linux-low.h (linux_target_ops) <get_thread_area,
8442 install_fast_tracepoint_jump_pad>: New fields.
8443 (struct lwp_info) <collecting_fast_tracepoint,
8444 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8445 (linux_get_thread_area): Declare.
8446 * linux-x86-low.c (jump_insn): New.
8447 (x86_get_thread_area): New.
8448 (append_insns): New.
8449 (push_opcode): New.
8450 (amd64_install_fast_tracepoint_jump_pad): New.
8451 (i386_install_fast_tracepoint_jump_pad): New.
8452 (x86_install_fast_tracepoint_jump_pad): New.
8453 (the_low_target): Install x86_get_thread_area and
8454 x86_install_fast_tracepoint_jump_pad.
8455 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8456 (struct fast_tracepoint_jump): New.
8457 (fast_tracepoint_jump_insn): New.
8458 (fast_tracepoint_jump_shadow): New.
8459 (find_fast_tracepoint_jump_at): New.
8460 (fast_tracepoint_jump_here): New.
8461 (delete_fast_tracepoint_jump): New.
8462 (set_fast_tracepoint_jump): New.
8463 (uninsert_fast_tracepoint_jumps_at): New.
8464 (reinsert_fast_tracepoint_jumps_at): New.
8465 (set_breakpoint_at): Use write_inferior_memory.
8466 (uninsert_raw_breakpoint): Use write_inferior_memory.
8467 (check_mem_read): Mask out fast tracepoint jumps.
8468 (check_mem_write): Mask out fast tracepoint jumps.
8469 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8470 (set_fast_tracepoint_jump): Declare.
8471 (delete_fast_tracepoint_jump)
8472 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8473 (reinsert_fast_tracepoint_jumps_at): Declare.
8474 * regcache.c: Don't compile many functions when building the
8475 in-process agent library.
8476 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8477 the register buffer in the heap.
8478 (free_register_cache): If the register buffer isn't owned by the
8479 regcache, don't free it.
8480 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8481 pre-existing register caches.
8482 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8483 type.
8484 (convert_ascii_to_int): : Constify `from' parameter type.
8485 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8486 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8487 the needed buffer in-place.
8488 (relocate_instruction): New.
8489 * server.c (handle_query) <qSymbols>: If the target supports
8490 tracepoints, give it a chance of looking up symbols. Report
8491 support for fast tracepoints.
8492 (handle_status): Stabilize threads.
8493 (process_serial_event): Adjust.
8494 * server.h (struct fast_tracepoint_jump): Forward declare.
8495 (struct process_info) <fast_tracepoint_jumps>: New field.
8496 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8497 (decode_X_packet, decode_M_packet): Adjust.
8498 (relocate_instruction): Declare.
8499 (in_process_agent_loaded): Declare.
8500 (tracepoint_look_up_symbols): Declare.
8501 (struct fast_tpoint_collect_status): Declare.
8502 (fast_tracepoint_collecting): Declare.
8503 (force_unlock_trace_buffer): Declare.
8504 (handle_tracepoint_bkpts): Declare.
8505 (initialize_low_tracepoint)
8506 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8507 * target.h (struct target_ops) <stabilize_threads,
8508 install_fast_tracepoint_jump_pad>: New fields.
8509 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8510 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8511 [HAVE_STDINT_H]: Include stdint.h.
8512 (trace_debug_1): Rename to ...
8513 (trace_vdebug): ... this.
8514 (trace_debug): Rename to ...
8515 (trace_debug_1): ... this. Add `level' parameter.
8516 (trace_debug): New.
8517 (ATTR_USED, ATTR_NOINLINE): New.
8518 (IP_AGENT_EXPORT): New.
8519 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8520 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8521 (about_to_request_buffer_space, trace_buffer_is_full)
8522 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8523 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8524 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8525 (traceframe_write_count, traceframes_created)
8526 (trace_state_variables)
8527 New renaming defines.
8528 (struct ipa_sym_addresses): New.
8529 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8530 (symbol_list): New.
8531 (ipa_sym_addrs): New.
8532 (all_tracepoint_symbols_looked_up): New.
8533 (in_process_agent_loaded): New.
8534 (write_e_ipa_not_loaded): New.
8535 (maybe_write_ipa_not_loaded): New.
8536 (tracepoint_look_up_symbols): New.
8537 (debug_threads) [IN_PROCESS_AGENT]: New.
8538 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8539 (UNKNOWN_SIDE_EFFECTS): New.
8540 (stop_tracing): New.
8541 (flush_trace_buffer): New.
8542 (stop_tracing_bkpt): New.
8543 (flush_trace_buffer_bkpt): New.
8544 (read_inferior_integer): New.
8545 (read_inferior_uinteger): New.
8546 (read_inferior_data_pointer): New.
8547 (write_inferior_data_pointer): New.
8548 (write_inferior_integer): New.
8549 (write_inferior_uinteger): New.
8550 (struct collect_static_trace_data_action): Delete.
8551 (enum tracepoint_type): New.
8552 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8553 <actions_str, step_actions, step_actions_str>: Only include in
8554 GDBserver.
fa593d66
PA
8555 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8556 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8557 (tracepoints): Use IP_AGENT_EXPORT.
8558 (last_tracepoint): Don't include in the IPA.
8559 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8560 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8561 (alloced_trace_state_variables): New.
8562 (trace_state_variables): Use IP_AGENT_EXPORT.
8563 (traceframe_t): Delete unused variable.
8564 (circular_trace_buffer): Don't include in the IPA.
8565 (trace_buffer_start): Delete.
8566 (struct trace_buffer_control): New.
8567 (trace_buffer_free): Delete.
8568 (struct ipa_trace_buffer_control): New.
8569 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8570 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8571 New.
8572 (trace_buffer_ctrl): New.
8573 (TRACE_BUFFER_CTRL_CURR): New.
8574 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8575 Reimplement as macros.
8576 (trace_buffer_wrap): Delete.
8577 (traceframe_write_count, traceframe_read_count)
8578 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8579 (struct tracepoint_hit_ctx) <type>: New field.
8580 (struct fast_tracepoint_ctx): New.
8581 (memory_barrier): New.
8582 (cmpxchg): New.
8583 (record_tracepoint_error): Update atomically in the IPA.
8584 (clear_inferior_trace_buffer): New.
8585 (about_to_request_buffer_space): New.
8586 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8587 updating the same buffer.
8588 (add_tracepoint): Default the tracepoint's type to trap
8589 tracepoint, and orig_size to -1.
8590 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8591 internal variables.
8592 (create_trace_state_variable): New parameter `gdb'. Handle it.
8593 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8594 (cmd_qtdp): Handle fast tracepoints.
8595 (cmd_qtdv): Adjust.
8596 (max_jump_pad_size): New.
8597 (gdb_jump_pad_head): New.
8598 (get_jump_space_head): New.
8599 (claim_jump_space): New.
8600 (sort_tracepoints): New.
8601 (MAX_JUMP_SIZE): New.
8602 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8603 IPA.
8604 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8605 support. Upload fast traceframes, and delete internal IPA
8606 breakpoints.
8607 (stop_tracing_handler): New.
8608 (flush_trace_buffer_handler): New.
8609 (cmd_qtstop): Upload fast tracepoints.
8610 (response_tracepoint): Handle fast tracepoints.
8611 (tracepoint_finished_step): Upload fast traceframes. Set the
8612 tracepoint hit context's tracepoint type.
8613 (handle_tracepoint_bkpts): New.
8614 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8615 type. Add comment about fast tracepoints.
8616 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8617 non-existing action_str field.
8618 (get_context_regcache): Handle fast tracepoints.
8619 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8620 to the regcache.
8621 (fast_tracepoint_from_jump_pad_address): New.
8622 (fast_tracepoint_from_ipa_tpoint_address): New.
8623 (collecting_t): New.
8624 (force_unlock_trace_buffer): New.
8625 (fast_tracepoint_collecting): New.
8626 (collecting): New.
8627 (gdb_collect): New.
8628 (write_inferior_data_ptr): New.
8629 (target_tp_heap): New.
8630 (target_malloc): New.
8631 (download_agent_expr): New.
8632 (UALIGN): New.
8633 (download_tracepoints): New.
8634 (download_trace_state_variables): New.
8635 (upload_fast_traceframes): New.
8636 (IPA_FIRST_TRACEFRAME): New.
8637 (IPA_NEXT_TRACEFRAME_1): New.
8638 (IPA_NEXT_TRACEFRAME): New.
8639 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8640 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8641 (gdb_jump_pad_buffer_end): New.
8642 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8643 (initialize_tracepoint): Adjust.
8644 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8645 buffer. Initialize the low module.
8646 * utils.c (PREFIX, TOOLNAME): New.
8647 (malloc_failure): Use PREFIX.
8648 (error): In the IPA, an error causes an exit.
8649 (fatal, warning): Use PREFIX.
8650 (internal_error): Use TOOLNAME.
8651 (NUMCELLS): Increase to 10.
8652 * configure, config.in: Regenerate.
8653
d149dd1d
PA
86542010-06-01 Pedro Alves <pedro@codesourcery.com>
8655
8656 * server.c (handle_query) <qSupported>: Do two passes over the
8657 qSupported string to avoid nesting strtok.
8658
f6528abd
JK
86592010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8660
8661 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8662 (CDEPS): New.
8663 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8664 -Wl,--dynamic-list.
8665 * configure: Regenerate.
8666 * proc-service.list: New.
8667
ca2a87a0
JK
86682010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8669
8670 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8671 New comment.
8672
363a6e9f
OS
86732010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8674
8675 * gdbreplay.c (remote_open): Check error return from socket() call by
8676 its equality to -1 not by it being negative.
8677 * remote-utils.c (remote_open): Likewise.
8678
d23b6cb1
PA
86792010-05-23 Pedro Alves <pedro@codesourcery.com>
8680
8681 * config.h: Regenerate.
8682
28d3cf85
MK
86832010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8684
8685 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8686 doesn't provide PTRACE_GET_THREAD_AREA.
8687
fea36a59
MK
86882010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8689
8690 * linux-m68k-low.c: Include <asm/ptrace.h>
8691 (ps_get_thread_area): Implement.
8692
24b066ba
DE
86932010-05-03 Doug Evans <dje@google.com>
8694
8695 * event-loop.c (struct callback_event): New struct.
8696 (callback_list): New global.
8697 (append_callback_event, delete_callback_event): New functions.
8698 (process_callback): New function.
8699 (start_event_loop): Call it.
8700 * remote-utils.c (NOT_SCHEDULED): Define.
8701 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8702 moved out of readchar.
8703 (readchar): Rewrite. Call reschedule before returning.
8704 (reset_readchar): New function.
8705 (remote_close): Call it.
8706 (process_remaining, reschedule): New functions.
8707 * server.h (callback_handler_func): New typedef.
8708 (append_callback_event, delete_callback_event): Declare.
8709
9836d6ea
PA
87102010-05-03 Pedro Alves <pedro@codesourcery.com>
8711
8712 * proc-service.c (ps_pglobal_lookup): Use
8713 thread_db_look_up_one_symbol.
8714 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8715 parameter. Use it instead of all_symbols_looked_up.
8716 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8717 field.
8718 (all_symbols_looked_up): Don't declare.
8719 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8720 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8721 field.
8722 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8723 Set all_symbols_looked_up here.
8724 (thread_db_look_up_one_symbol): New.
8725 (thread_db_get_tls_address): Adjust.
8726 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8727 thread_db object on the heap, and tentatively set it in the
8728 process structure.
8729 (thread_db_init): Don't set all_symbols_looked_up here.
8730 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8731
7984d532
PA
87322010-05-03 Pedro Alves <pedro@codesourcery.com>
8733
8734 * linux-low.c (linux_kill, linux_detach): Adjust.
8735 (status_pending_p_callback): Remove redundant statement. Check
8736 for !TARGET_WAITIKIND_IGNORE, instead of
8737 TARGET_WAITKIND_STOPPED.
8738 (handle_tracepoints): Make sure LWP is locked. Adjust.
8739 (linux_wait_for_event_1): Adjust.
8740 (linux_cancel_breakpoints): New.
8741 (unsuspend_one_lwp): New.
8742 (unsuspend_all_lwps): New.
8743 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8744 (send_sigstop_callback): Change return type to int, add new
8745 `except' parameter and handle it.
8746 (suspend_and_send_sigstop_callback): New.
8747 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8748 pass them down. If SUSPEND, also increment the lwp's suspend
8749 count.
8750 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8751 (need_step_over_p): Don't consider suspended LWPs.
8752 (start_step_over): Adjust.
8753 (proceed_one_lwp): Change return type to int, add new `except'
8754 parameter and handle it.
8755 (unsuspend_and_proceed_one_lwp): New.
8756 (proceed_all_lwps): Use find_inferior instead of
8757 for_each_inferior.
8758 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8759 also decrement the suspend count of LWPs. Pass `except' down,
8760 instead of hacking its suspend count.
8761 (linux_pause_all): Add `freeze' parameter. Adjust.
8762 (linux_unpause_all): New.
8763 (linux_target_ops): Install linux_unpause_all.
8764 * server.c (handle_status): Adjust.
8765 * target.h (struct target_ops): New fields `unpause_all' and
8766 `cancel_breakpoints'. Add new parameter to `pause_all'.
8767 (pause_all): Add new `freeze' parameter.
8768 (unpause_all): New.
8769 (cancel_breakpoints): New.
8770 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8771 cancel breakpoints.
8772 (cmd_qtstart): Pause threads.
8773 (stop_tracing): Pause threads, and cancel breakpoints.
8774 * win32-low.c (win32_target_ops): Adjust.
8775
e471f25b
PA
87762010-05-03 Pedro Alves <pedro@codesourcery.com>
8777
8778 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8779 the inferior right away from here...
8780 (linux_wait_1): ... to here, and adjust to check the thread's
8781 last_resume_kind instead of the lwp's step or stop_expected flags.
8782
1915ef4f
PA
87832010-05-02 Pedro Alves <pedro@codesourcery.com>
8784
8785 * README: Use consistent `GDB' and `GDBserver' spellings.
8786
f9e39928
PA
87872010-05-02 Pedro Alves <pedro@codesourcery.com>
8788
8789 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8790 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8791 (linux_detach_one_lwp): Assume the lwp is stopped.
8792 (any_thread_of): Delete.
8793 (linux_detach): Stop all lwps here. Don't blindly delete all
8794 breakpoints.
8795 (delete_lwp_callback): New.
8796 (linux_mourn): Delete all lwps of the process that is gone.
8797 (linux_wait_1): Don't delete the last lwp of the process here.
8798 * mem-break.h (mark_breakpoints_out): Declare.
8799 * mem-break.c (mark_breakpoints_out): New.
8800 (free_all_breakpoints): Use it.
8801 * server.c (handle_target_event): If the process is gone, mark
8802 breakpoints out.
8803 * thread-db.c (struct thread_db) <create_bp>: New field.
8804 (thread_db_enable_reporting): Fix prototype. Store a thread event
8805 breakpoint reference in the thread_db struct.
8806 (thread_db_load_search): Clear the thread_db object.
8807 (try_thread_db_load_1): Ditto.
8808 (switch_to_process): New.
8809 (disable_thread_event_reporting): Use it.
8810 (remove_thread_event_breakpoints): New.
8811 (thread_db_detach, thread_db_mourn): Use it.
8812
1e7fc18c
PA
88132010-05-01 Pedro Alves <pedro@codesourcery.com>
8814
8815 * linux-low.c (linux_enable_event_reporting): New.
8816 (linux_wait_for_event_1, handle_extended_wait): Use it.
8817
02fc4de7
PA
88182010-04-30 Pedro Alves <pedro@codesourcery.com>
8819
8820 * linux-low.c (linux_kill_one_lwp, linux_kill)
8821 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8822 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8823 SIGSTOP even if the LWP is stopped.
8824 (send_sigstop_callback): New.
8825 (stop_all_lwps): Use send_sigstop_callback instead.
8826 (linux_resume_one_thread): Adjust.
8827 (proceed_one_lwp): Still proceed an LWP that the client has
8828 requested to stop, if we haven't reported it as stopped yet. Make
8829 sure that LWPs the client want stopped, have a pending SIGSTOP.
8830
bc3b5632
DE
88312010-04-26 Doug Evans <dje@google.com>
8832
ae1ada35
DE
8833 * server.c (handle_general_set): Make static.
8834
bc3b5632
DE
8835 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8836 Print received char after testing for error/eof instead of before.
8837 (input_interrupt): Tweak comment.
8838
65730243
DE
88392010-04-23 Doug Evans <dje@google.com>
8840
8841 * server.c (start_inferior): Print inferior argv if --debug.
8842
a8ae7dc0
AR
88432010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8844
8845 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8846 * nto-x86-low.c: Include server.h
8847
1c07cc19
PM
88482010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8849
8850 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8851 be consistent with other sources of this directory.
8852 (init_registers_amd64): Correct name of source file of this function
8853 in the comment.
8854
e0a61e09
PM
88552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8856
8857 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8858 64-bit executables.
8859
54709339
PM
88602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8861
8862 * win32-i386-low.c: Add 64-bit support.
8863 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8864 (init_registers_amd64): Declare.
8865 (mappings): Add 64-bit version of array.
8866 (init_windows_x86): New function.
8867 (the_low_target): Change init_arch field to init_windows_x86.
8868
e8f0053d
PM
88692010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8870
8871 * win32-low.c: Adapt to support also 64-bit architecture.
8872 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8873 (get_image_name): Use SIZE_T type for local variable `done'.
8874 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8875 (toolhelp_get_dll_name): Idem.
8876 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8877 Use uintptr_t typecast to avoid warning.
8878 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8879 (handle_exception): Use phex_nz to avoid warning.
8880 (win32_wait): Remove unused local variable `process'.
8881
c481e77e
PM
88822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8883
8884 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8885 `amd64-avx.o'.
8886
12ea4b69
PM
88872010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8888
8889 * configure.ac: Use `ws2_32' library for srv_mingw.
8890 * configure: Regenerate.
8891 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8892 * remote-utils.c: Likewise.
8893
f6d1620c
L
88942010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8895
8896 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8897 if __x86_64__ is defined.
8898
8e642873
PM
88992010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8900
8901 * configure: Regenerate.
8902
711e434b
PM
89032010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8904
8905 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8906 * target.h (target_ops): New get_tib_address field.
8907 * win32-low.h (win32_thread_info): Add thread_local_base field.
8908 * win32-low.c (child_add_thread): Add tlb argument.
8909 Set thread_local_base field to TLB.
8910 (get_child_debug_event): Adapt to child_add_thread change.
8911 (win32_get_tib_address): New function.
8912 (win32_target_ops): Set get_tib_address field to
8913 win32_get_tib_address.
8914 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8915
505106cd
PA
89162010-04-12 Pedro Alves <pedro@codesourcery.com>
8917
505106cd
PA
8918 * linux-low.c (linux_mourn): Also remove the process.
8919 * server.c (handle_target_event): Don't remove the process here.
8920 * nto-low.c (nto_mourn): New.
8921 (nto_target_ops): Install it.
8922 * spu-low.c (spu_mourn): New.
8923 (spu_target_ops): Install it.
8924 * win32-low.c (win32_mourn): New.
8925 (win32_target_ops): Install it.
8926
e8470a06
PA
89272010-04-12 Pedro Alves <pedro@codesourcery.com>
8928
8929 * server.h (buffer_xml_printf): Remove redundant `;'.
8930
45ba0d02
PA
89312010-04-12 Pedro Alves <pedro@codesourcery.com>
8932
8933 * regcache.c (set_register_cache): Invalidate regcaches before
8934 changing the register cache layout.
8935 (regcache_invalidate_one): Allow a NULL regcache.
8936 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8937 regcaches before changing the register cache layout or the target
8938 regsets.
8939
59e04013
L
89402010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8941
8942 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8943 variable warning on Linux/x86-64.
8944
8336d594
PA
89452010-04-11 Pedro Alves <pedro@codesourcery.com>
8946
8947 GDBserver disconnected tracing support.
8948
8949 * linux-low.c (linux_remove_process): Delete.
8950 (add_lwp): Don't set last_resume_kind here.
8951 (linux_kill): Use `mourn'.
8952 (linux_detach): Use `thread_db_detach', and `mourn'.
8953 (linux_mourn): New.
8954 (linux_attach_lwp_1): Adjust comment.
8955 (linux_attach): last_resume_kind moved the thread_info; adjust.
8956 (status_pending_p_callback): Adjust.
8957 (linux_wait_for_event_1): Adjust.
8958 (count_events_callback, select_singlestep_lwp_callback)
8959 (select_event_lwp_callback, cancel_breakpoints_callback)
8960 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8961 (proceed_one_lwp): Adjust.
8962 (linux_async): Add debug output.
8963 (linux_thread_stopped): New.
8964 (linux_pause_all): New.
8965 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8966 linux_pause_all.
8967 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8968 (thread_db_free): Delete declaration.
8969 (thread_db_detach, thread_db_mourn): Declare.
8970 * thread-db.c (thread_db_init): Use thread_db_mourn.
8971 (thread_db_free): Delete, split in two.
8972 (disable_thread_event_reporting): New.
8973 (thread_db_detach): New.
8974 (thread_db_mourn): New.
8975
8976 * server.h (struct thread_info) <last_resume_kind>: New field.
8977 <attached>: Add comment.
8978 <gdb_detached>: New field.
8979 (handler_func): Change return type to int.
8980 (handle_serial_event, handle_target_event): Ditto.
8981 (gdb_connected): Declare.
8982 (tracing): Delete.
8983 (disconnected_tracing): Declare.
8984 (stop_tracing): Declare.
8985
8986 * server.c (handle_query) <qSupported>: Report support for
8987 disconnected tracing.
8988 (queue_stop_reply_callback): Account for running threads.
8989 (gdb_wants_thread_stopped): New.
8990 (gdb_wants_all_threads_stopped): New.
8991 (gdb_reattached_process): New.
8992 (handle_status): Clear the `gdb_detached' flag of all processes.
8993 In all-stop, stop all threads.
8994 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8995 (process_serial_event): If the remote connection breaks, or if an
8996 exit was forced with "monitor exit", force an event loop exit.
8997 Handle disconnected tracing on detach.
8998 (handle_serial_event): Adjust.
8999 (handle_target_event): If GDB isn't connected, forward events back
9000 to the inferior, unless the last process exited, in which case,
9001 exit gdbserver. Adjust interface.
9002
9003 * remote-utils.c (remote_open): Don't block in accept. Instead
9004 register an event loop source on the listen socket file
9005 descriptor. Refactor bits into ...
9006 (listen_desc): ... this new global.
9007 (gdb_connected): ... this new function.
9008 (enable_async_notification): ... this new function.
9009 (handle_accept_event): ... this new function.
9010 (remote_close): Clear remote_desc.
9011
9012 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9013
9014 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9015 New fields.
9016 (mourn_inferior): Define.
9017 (target_process_qsupported): Avoid the dangling else problem.
9018 (thread_stopped): Define.
9019 (pause_all): Define.
9020 (target_waitstatus_to_string): Declare.
9021 * target.c (target_waitstatus_to_string): New.
9022
9023 * tracepoint.c (tracing): Make extern.
9024 (disconnected_tracing): New.
9025 (stop_tracing): Make extern. Handle tracing stops due to GDB
9026 disconnecting.
9027 (cmd_qtdisconnected): New.
9028 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9029 (handle_tracepoint_general_set): Handle QTDisconnected.
9030
9031 * event-loop.c (event_handler_func): Change return type to int.
9032 (process_event): Bail out if the event handler wants the event
9033 loop to stop.
9034 (handle_file_event): Ditto.
9035 (start_event_loop): Bail out if the event handler wants the event
9036 loop to stop.
9037
9038 * nto-low.c (nto_target_ops): Adjust.
9039 * spu-low.c (spu_wait): Don't remove the process here.
9040 (spu_target_ops): Adjust.
9041 * win32-low.c (win32_wait): Don't remove the process here.
9042 (win32_target_ops): Adjust.
9043
5d267c4c
PA
90442010-04-11 Pedro Alves <pedro@codesourcery.com>
9045
9046 * regcache.c (realloc_register_cache): Invalidate inferior's
9047 regcache before recreating it.
9048
623ccd72
PA
90492010-04-09 Pedro Alves <pedro@codesourcery.com>
9050
9051 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9052
219f2f23
PA
90532010-04-09 Stan Shebs <stan@codesourcery.com>
9054 Pedro Alves <pedro@codesourcery.com>
9055
9056 * server.h (LONGEST): New.
9057 (struct thread_info) <while_stepping>: New field.
9058 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9059 Declare.
9060 (initialize_tracepoint, handle_tracepoint_general_set)
9061 (handle_tracepoint_query, tracepoint_finished_step)
9062 (tracepoint_was_hit, release_while_stepping_state_list):
9063 (current_traceframe): Declare.
9064 * server.c (handle_general_set): Handle tracepoint packets.
9065 (read_memory): New.
9066 (write_memory): New.
9067 (handle_search_memory_1): Use read_memory.
9068 (handle_query): Report support for conditional tracepoints, trace
9069 state variables, and tracepoint sources. Handle tracepoint
9070 queries.
9071 (main): Initialize the tracepoints module.
9072 (process_serial_event): Handle traceframe reads/writes.
9073
9074 * linux-low.c (handle_tracepoints): New.
9075 (linux_wait_1): Call it.
9076 (linux_resume_one_lwp): Handle while-stepping.
9077 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9078 (linux_target_ops): Install them.
9079 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9080 New field.
9081 * linux-x86-low.c (x86_supports_tracepoints): New.
9082 (the_low_target). Install it.
9083
9084 * mem-break.h (delete_breakpoint): Declare.
9085 * mem-break.c (delete_breakpoint): Make external.
9086
9087 * target.h (struct target_ops): Add `supports_tracepoints',
9088 `read_pc', and `write_pc' fields.
9089 (target_supports_tracepoints): Define.
9090 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9091 (phex_nz): New.
9092
9093 * regcache.h (struct regcache) <registers_owned>: New field.
9094 (init_register_cache, regcache_cpy): Declare.
9095 (regcache_read_pc, regcache_write_pc): Declare.
9096 (register_cache_size): Declare.
9097 (supply_regblock): Declare.
9098 * regcache.c (init_register_cache): New.
9099 (new_register_cache): Use it.
9100 (regcache_cpy): New.
9101 (register_cache_size): New.
9102 (supply_regblock): New.
9103 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9104
219f2f23
PA
9105 * tracepoint.c: New.
9106
9107 * Makefile.in (OBS): Add tracepoint.o.
9108 (tracepoint.o): New rule.
9109
3a13a53b
L
91102010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9111
9112 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9113 (i386-mmx.o): New.
9114 (i386-mmx.c): Likewise.
9115 (i386-mmx-linux.o): Likewise.
9116 (i386-mmx-linux.c): Likewise.
9117
9118 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9119 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9120 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9121 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9122
9123 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9124 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9125 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9126
1570b33e
L
91272010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9128
9129 * Makefile.in (clean): Updated.
9130 (i386-avx.o): New.
9131 (i386-avx.c): Likewise.
9132 (i386-avx-linux.o): Likewise.
9133 (i386-avx-linux.c): Likewise.
9134 (amd64-avx.o): Likewise.
9135 (amd64-avx.c): Likewise.
9136 (amd64-avx-linux.o): Likewise.
9137 (amd64-avx-linux.c): Likewise.
9138
9139 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9140 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9141 (srv_amd64_regobj): Add amd64-avx.o.
9142 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9143 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9144 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9145 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9146 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9147 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9148 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9149
9150 * i387-fp.c: Include "i386-xstate.h".
9151 (i387_xsave): New.
9152 (i387_cache_to_xsave): Likewise.
9153 (i387_xsave_to_cache): Likewise.
9154 (x86_xcr0): Likewise.
9155
9156 * i387-fp.h (i387_cache_to_xsave): Likewise.
9157 (i387_xsave_to_cache): Likewise.
9158 (x86_xcr0): Likewise.
9159
9160 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9161 * linux-crisv32-low.c (target_regsets): Likewise.
9162 * linux-m68k-low.c (target_regsets): Likewise.
9163 * linux-mips-low.c (target_regsets): Likewise.
9164 * linux-ppc-low.c (target_regsets): Likewise.
9165 * linux-s390-low.c (target_regsets): Likewise.
9166 * linux-sh-low.c (target_regsets): Likewise.
9167 * linux-sparc-low.c (target_regsets): Likewise.
9168 * linux-xtensa-low.c (target_regsets): Likewise.
9169
9170 * linux-low.c: Include <sys/uio.h>.
9171 (regsets_fetch_inferior_registers): Support nt_type.
9172 (regsets_store_inferior_registers): Likewise.
9173 (linux_process_qsupported): New.
9174 (linux_target_ops): Add linux_process_qsupported.
9175
9176 * linux-low.h (regset_info): Add nt_type.
9177 (linux_target_ops): Add process_qsupported.
9178
9179 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9180 and <sys/uio.h>.
9181 (init_registers_i386_avx_linux): New.
9182 (init_registers_amd64_avx_linux): Likewise.
9183 (xmltarget_i386_linux_no_xml): Likewise.
9184 (xmltarget_amd64_linux_no_xml): Likewise.
9185 (PTRACE_GETREGSET): Likewise.
9186 (PTRACE_SETREGSET): Likewise.
9187 (x86_fill_xstateregset): Likewise.
9188 (x86_store_xstateregset): Likewise.
9189 (use_xml): Likewise.
9190 (x86_linux_update_xmltarget): Likewise.
9191 (x86_linux_process_qsupported): Likewise.
9192 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9193 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9194 init_registers_i386_linux here. Call
9195 x86_linux_update_xmltarget.
9196 (the_low_target): Add x86_linux_process_qsupported.
9197
9198 * server.c (handle_query): Call target_process_qsupported.
9199
9200 * target.h (target_ops): Add process_qsupported.
9201 (target_process_qsupported): New.
9202
fc7238bb
PA
92032010-04-03 Pedro Alves <pedro@codesourcery.com>
9204
9205 * inferiors.c (add_thread): Set last_status kind to
9206 TARGET_WAITKIND_IGNORE.
9207 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9208 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9209 (linux_wait_1): Move `thread' local definition to block that uses
9210 it. Don't NULL initialize `event_child'.
9211 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9212 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9213 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9214
bdabb078
PA
92152010-04-01 Pedro Alves <pedro@codesourcery.com>
9216
9217 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9218 an extended waitstatus, or by a watchpoint.
9219 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9220 thread was stepping or has been stopped by a watchpoint.
9221
d3bbe7a0
PA
92222010-04-01 Pedro Alves <pedro@codesourcery.com>
9223
9224 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9225 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9226 of another, then delete the previous, and validate all
9227 breakpoints.
9228 (validate_inserted_breakpoint): New.
9229 (delete_disabled_breakpoints): New.
9230 (validate_breakpoints): New.
9231 (check_mem_read): Validate breakpoints before trusting their
9232 shadow. Delete disabled breakpoints.
9233 (check_mem_write): Validate breakpoints before trusting they
9234 should be inserted. Delete disabled breakpoints.
9235 * mem-break.h (validate_breakpoints):
9236 * server.c (handle_query): Validate breakpoints when we see a
9237 qSymbol query.
9238
8b07ae33
PA
92392010-04-01 Pedro Alves <pedro@codesourcery.com>
9240
9241 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9242 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9243 if we could tell there's a GDB breakpoint at stop_pc.
9244 (need_step_over_p): Don't do a step over if we find a GDB
9245 breakpoint at the resume PC.
9246
9247 * mem-break.c (struct raw_breakpoint): New.
9248 (enum bkpt_type): New type `gdb_breakpoint'.
9249 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9250 fields. New field `raw'.
9251 (find_raw_breakpoint_at): New.
9252 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9253 breakpoint instead.
9254 (set_breakpoint_at): Adjust.
9255 (delete_raw_breakpoint): New.
9256 (release_breakpoint): New.
9257 (delete_breakpoint): Rename to...
9258 (delete_breakpoint_1): ... this. Add proc parameter. Use
9259 release_breakpoint. Return ENOENT.
9260 (delete_breakpoint): Reimplement.
9261 (find_breakpoint_at): Delete.
9262 (find_gdb_breakpoint_at): New.
9263 (delete_breakpoint_at): Delete.
9264 (set_gdb_breakpoint_at): New.
9265 (delete_gdb_breakpoint_at): New.
9266 (gdb_breakpoint_here): New.
9267 (set_reinsert_breakpoint): Use release_breakpoint.
9268 (uninsert_breakpoint): Rename to ...
9269 (uninsert_raw_breakpoint): ... this.
9270 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9271 (reinsert_raw_breakpoint): Change parameter type to
9272 raw_breakpoint.
9273 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9274 instead.
9275 (check_breakpoints): Adjust. Use release_breakpoint.
9276 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9277 (breakpoint_inserted_here): Ditto.
9278 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9279 Don't trust the breakpoint's shadow if it is not inserted.
9280 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9281 (delete_all_breakpoints): Adjust.
9282 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9283 use delete_breakpoint_1.
9284
9285 * mem-break.h (breakpoints_supported): Delete declaration.
9286 (set_gdb_breakpoint_at): Declare.
9287 (gdb_breakpoint_here): Declare.
9288 (delete_breakpoint_at): Delete.
9289 (delete_gdb_breakpoint_at): Declare.
9290
9291 * server.h (struct raw_breakpoint): Forward declare.
9292 (struct process_info): New field `raw_breakpoints'.
9293
9294 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9295 breakpoints.
9296
6bf5e0ba
PA
92972010-03-24 Pedro Alves <pedro@codesourcery.com>
9298
9299 * linux-low.c (status_pending_p_callback): Fix comment.
9300 (linux_wait_for_event_1): Move most of the internal breakpoint
9301 handling from here...
9302 (linux_wait_1): ... to here.
9303 (count_events_callback): New.
9304 (select_singlestep_lwp_callback): New.
9305 (select_event_lwp_callback): New.
9306 (cancel_breakpoints_callback): New.
9307 (select_event_lwp): New.
9308 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9309 priority to all LWPs that have had events that should be reported
9310 to the client. Cancel breakpoints when about to reporting the
9311 event to the client, not while stopping lwps. No longer cancel
9312 finished single-steps here.
9313 (cancel_finished_single_step): Delete.
9314 (cancel_finished_single_steps): Delete.
9315
414a389f
PA
93162010-03-24 Pedro Alves <pedro@codesourcery.com>
9317
9318 * mem-break.c (enum bkpt_type): New.
9319 (struct breakpoint): New field `type'.
9320 (set_breakpoint_at): Change return type to struct breakpoint
9321 pointer. Set type to `other_breakpoint' by default.
9322 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9323 in the breakpoint list.
9324 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9325 (reinsert_breakpoint): Rename to ...
9326 (reinsert_raw_breakpoint): ... this.
9327 (reinsert_breakpoints_at): Adjust.
9328 * mem-break.h (struct breakpoint): Declare.
9329 (set_breakpoint_at): Change return type to struct breakpoint
9330 pointer.
9331
2280c721
PA
93322010-03-24 Pedro Alves <pedro@codesourcery.com>
9333
9334 * server.c (handle_query): Assign, not compare.
9335
d50171e4
PA
93362010-03-24 Pedro Alves <pedro@codesourcery.com>
9337
9338 Teach linux gdbserver to step-over-breakpoints.
9339
9340 * linux-low.c (can_hardware_single_step): New.
9341 (supports_breakpoints): New.
9342 (handle_extended_wait): If stopping threads, read the stop pc of
9343 the new cloned LWP.
9344 (get_pc): New.
9345 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9346 low target doesn't support retrieving the PC.
9347 (add_lwp): Set last_resume_kind to resume_continue.
9348 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9349 (linux_attach): Don't clear stop_expected. Set the lwp's
9350 last_resume_kind to resume_stop.
9351 (linux_detach_one_lwp): Don't check for removed breakpoints.
9352 (check_removed_breakpoint): Delete.
9353 (status_pending_p): Rename to ...
9354 (status_pending_p_callback): ... this. Don't check for removed
9355 breakpoints. Don't consider threads that are stopped from GDB's
9356 perspective.
9357 (linux_wait_for_lwp): Always read the stop_pc here.
9358 (cancel_breakpoint): New.
9359 (step_over_bkpt): New global.
9360 (linux_wait_for_event_1): Implement stepping over breakpoints.
9361 (gdb_wants_lwp_stopped): New.
9362 (gdb_wants_all_stopped): New.
9363 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9364 single-step traps here. Store the thread's last reported target
9365 wait status.
9366 (send_sigstop): Don't clear stop_expected. Always set it,
9367 instead.
9368 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9369 (cancel_finished_single_step): New.
9370 (cancel_finished_single_steps): New.
9371 (wait_for_sigstop): Don't cancel finished single-step traps here.
9372 (linux_resume_one_lwp): Don't check for removed breakpoints.
9373 Don't set `step' on non-hardware step archs.
9374 (linux_set_resume_request): Ignore resume_stop requests if already
9375 stopping or stopped. Set the lwp's last_resume_kind.
9376 (resume_status_pending_p): Don't check for removed breakpoints.
9377 (need_step_over_p): New.
9378 (start_step_over): New.
9379 (finish_step_over): New.
9380 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9381 requests. Clear the thread's last reported target waitstatus.
9382 Don't use the `suspended' flag. Don't consider pending breakpoints.
9383 (linux_resume): Start a step-over if necessary.
9384 (proceed_one_lwp): New.
9385 (proceed_all_lwps): New.
9386 (unstop_all_lwps): New.
9387 * linux-low.h (struct lwp_info): Rewrite comment for the
9388 `suspended' flag. Add the `stop_pc' field. Delete the
9389 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9390 Add `'last_resume_kind' and `need_step_over' fields.
9391 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9392 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9393 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9394 (set_raw_breakpoint_at): New.
9395 (set_breakpoint_at): Rewrite to use it.
9396 (reinsert_breakpoint_handler): Delete.
9397 (set_reinsert_breakpoint): New.
9398 (reinsert_breakpoint_by_bp): Delete.
9399 (delete_reinsert_breakpoints): New.
9400 (uninsert_breakpoint): Rewrite.
9401 (uninsert_breakpoints_at): New.
9402 (reinsert_breakpoint): Rewrite.
9403 (reinsert_breakpoints_at): New.
9404 (check_breakpoints): Rewrite.
9405 (breakpoint_here): New.
9406 (breakpoint_inserted_here): New.
9407 (check_mem_read): Adjust.
9408 * mem-break.h (breakpoints_supported, breakpoint_here)
9409 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9410 (reinsert_breakpoint_by_bp): Delete declaration.
9411 (delete_reinsert_breakpoints): Declare.
9412 (reinsert_breakpoint): Delete declaration.
9413 (reinsert_breakpoints_at): Declare.
9414 (uninsert_breakpoint): Delete declaration.
9415 (uninsert_breakpoints_at): Declare.
9416 (check_breakpoints): Adjust prototype.
9417 * server.h: Adjust include order.
9418 (struct thread_info): Declare here. Add a `last_status' field.
9419
30ba68cb
MS
94202010-03-23 Michael Snyder <msnyder@vmware.com>
9421
9422 * server.c (crc32): New function.
9423 (handle_query): Add handling for 'qCRC:' request.
9424
b9a881c2
PA
94252010-03-23 Pedro Alves <pedro@codesourcery.com>
9426
9427 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9428 lwp had been stopped by a watchpoint.
9429
e92d13d5
PA
94302010-03-16 Pedro Alves <pedro@codesourcery.com>
9431
9432 * server.h (internal_error): Declare.
9433 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9434 * utils.c (internal_error): New function.
9435
64daa791
AS
94362010-03-15 Andreas Schwab <schwab@redhat.com>
9437
9438 * configure.srv: Fix typo setting srv_regobj.
9439
f52cd8cd
PA
94402010-03-15 Pedro Alves <pedro@codesourcery.com>
9441
9442 * linux-low.c (fetch_register): Avoid passing a non string literal
9443 format to `error'.
9444 (usr_store_inferior_registers): Ditto.
9445
93ae6fdc
PA
94462010-03-14 Pedro Alves <pedro@codesourcery.com>
9447
9448 * linux-low.c (linux_write_memory): Bail out early if peeking
9449 memory failed.
9450
c3adc08c
PA
94512010-03-14 Pedro Alves <pedro@codesourcery.com>
9452
9453 * linux-low.h (struct lwp_info): New fields
9454 `stopped_by_watchpoint' and `stopped_data_address'.
9455 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9456 here, and cache them in the lwp object.
9457 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9458 directly.
9459 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9460 field.
9461 (linux_stopped_by_watchpoint): Rewrite.
9462 (linux_stopped_data_address): Rewrite.
9463
bce522a2
PA
94642010-03-06 Simo Melenius <simo.melenius@iki.fi>
9465
9466 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9467 switching the current inferior, not before.
9468
90884b2b
L
94692010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9470
9471 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9472 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9473 i386-linux.c and amd64-linux.c.
9474 (reg-i386.o): Removed.
9475 (reg-i386.c): Likewise.
9476 (reg-i386-linux.o): Likewise.
9477 (reg-i386-linux.c): Likewise.
9478 (reg-x86-64.o): Likewise.
9479 (reg-x86-64.c): Likewise.
9480 (reg-x86-64-linux.o): Likewise.
9481 (reg-x86-64-linux.c): Likewise.
9482 (i386.o): New.
9483 (i386.c): Likewise.
9484 (i386-linux.o): Likewise.
9485 (i386-linux.c): Likewise.
9486 (amd64.o): Likewise.
9487 (amd64.c): Likewise.
9488 (amd64-linux.o): Likewise.
9489 (amd64-linux.c): Likewise.
9490
9491 * configure.srv (srv_i386_regobj): New.
9492 (srv_i386_linux_regobj): Likewise.
9493 (srv_amd64_regobj): Likewise.
9494 (srv_amd64_linux_regobj): Likewise.
9495 (srv_i386_32bit_xmlfiles): Likewise.
9496 (srv_i386_64bit_xmlfiles): Likewise.
9497 (srv_i386_xmlfiles): Likewise.
9498 (srv_amd64_xmlfiles): Likewise.
9499 (srv_i386_linux_xmlfiles): Likewise.
9500 (srv_amd64_linux_xmlfiles): Likewise.
9501 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9502 srv_xmlfiles to $srv_i386_xmlfiles.
9503 (i[34567]86-*-mingw32ce*): Likewise.
9504 (i[34567]86-*-mingw*): Likewise.
9505 (i[34567]86-*-nto*): Likewise.
9506 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9507 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9508 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9509 (x86_64-*-linux*): Likewise.
9510
9511 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9512 (init_registers_amd64_linux): New.
9513 (x86_arch_setup): Replace init_registers_x86_64_linux with
9514 init_registers_amd64_linux.
9515
193f13e6
MK
95162010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9517
9518 * configure.ac: Check for libdl. If it is not available link against
9519 static libthread_db.
9520 * configure: Regenerate.
9521
85d721b8
PA
95222010-02-22 Pedro Alves <pedro@codesourcery.com>
9523
9524 PR9605
9525
9526 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9527 handing a read watchpoint.
9528 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9529
6076632b
DE
95302010-02-12 Doug Evans <dje@google.com>
9531
9532 * linux-low.c (linux_supports_tracefork_flag): Document.
9533 (linux_look_up_symbols): Add comment.
9534
3327ccf7
L
95352010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9536
9537 * regcache.c (supply_register): Clear regcache if buf is NULL.
9538
0718675c 95392010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9540 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9541
9542 * inferiors.c (find_inferior): Add function documentation.
9543 (unloaded_dll): Handle the case where the unloaded dll has not
9544 been previously registered in the dll list.
9545
177321bd
DJ
95462010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9547
9548 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9549 (thumb2_breakpoint): New.
9550 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9551
2b009048
DJ
95522010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9553
9554 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9555 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9556 breakpoints.
9557
3be029c7
PA
95582010-01-21 Pedro Alves <pedro@codesourcery.com>
9559
9560 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9561
18f5de3b
JK
95622010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9563
9564 * linux-s390-low.c (s390_collect_ptrace_register)
9565 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9566
3743bb4f
DE
95672010-01-21 Doug Evans <dje@google.com>
9568
14ce3065
DE
9569 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9570 (PTRACE_ARG4_TYPE): New macro.
9571 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9572 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9573 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9574 (usr_store_inferior_registers): Ditto.
9575 (linux_read_memory, linux_write_memory): Ditto.
9576 (linux_test_for_tracefork): Ditto.
9577
3743bb4f
DE
9578 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9579 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9580
8b315be5
PA
95812010-01-21 Pedro Alves <pedro@codesourcery.com>
9582
9583 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9584 target.
9585
85492558
PA
95862010-01-21 Pedro Alves <pedro@codesourcery.com>
9587
9588 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9589 prototype to take a regcache. Adjust.
9590
442ea881
PA
95912010-01-20 Pedro Alves <pedro@codesourcery.com>
9592
9593 * regcache.h (struct thread_info): Forward declare.
9594 (struct regcache): New.
9595 (new_register_cache): Adjust prototype.
9596 (get_thread_regcache): Declare.
9597 (free_register_cache): Adjust prototype.
9598 (registers_to_string, registers_from_string): Ditto.
9599 (supply_register, supply_register_by_name, collect_register)
9600 (collect_register_as_string, collect_register_by_name): Ditto.
9601 * regcache.c (struct inferior_regcache_data): Delete.
9602 (get_regcache): Rename to ...
9603 (get_thread_regcache): ... this. Adjust. Switch inferior before
9604 fetching registers.
9605 (regcache_invalidate_one): Adjust.
9606 (regcache_invalidate): Fix prototype.
9607 (new_register_cache): Return the new register cache.
9608 (free_register_cache): Change prototype.
9609 (realloc_register_cache): Adjust.
9610 (registers_to_string): Change prototype to take a regcache. Adjust.
9611 (registers_from_string): Ditto.
9612 (register_data): Ditto.
9613 (supply_register): Ditto.
9614 (supply_register_by_name): Ditto.
9615 (collect_register): Ditto.
9616 (collect_register_as_string): Ditto.
9617 (collect_register_by_name): Ditto.
9618 * server.c (process_serial_event): Adjust.
9619 * linux-low.h (regset_fill_func, regset_store_func): Change
9620 prototype.
9621 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9622 Change prototype.
9623 * linux-low.c (get_stop_pc): Adjust.
9624 (check_removed_breakpoint): Adjust.
9625 (linux_wait_for_event): Adjust.
9626 (linux_resume_one_lwp): Adjust.
9627 (fetch_register): Add regcache parameter. Adjust.
9628 (usr_store_inferior_registers): Ditto.
9629 (regsets_fetch_inferior_registers): Ditto.
9630 (regsets_store_inferior_registers): Ditto.
9631 (linux_fetch_registers, linux_store_registers): Ditto.
9632 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9633 regcache. Adjust.
43aaf8b6
PA
9634 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9635 Ditto.
442ea881
PA
9636 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9637 prototype to take a regcache.
9638 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9639 * remote-utils.c (convert_ascii_to_int, outreg)
9640 (prepare_resume_reply): Change prototype to take a regcache.
9641 Adjust.
9642 * target.h (struct target_ops) <fetch_registers, store_registers>:
9643 Change prototype to take a regcache.
9644 (fetch_inferior_registers, store_inferior_registers): Change
9645 prototype to take a regcache. Adjust.
9646 * proc-service.c (ps_lgetregs): Adjust.
9647 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9648 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9649 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9650 take a regcache. Adjust.
9651 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9652 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9653 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9654 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9655 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9656 (cris_cannot_fetch_register):
9657 (cris_breakpoint_at): Change prototype to take a regcache.
9658 Adjust.
9659 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9660 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9661 to take a regcache. Adjust.
9662 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9663 Adjust.
9664 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9665 take a regcache. Adjust.
9666 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9667 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9668 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9669 * linux-mips-low.c (mips_get_pc):
9670 (mips_set_pc): Change prototype to take a regcache. Adjust.
9671 (mips_reinsert_addr): Adjust.
9672 (mips_collect_register): Change prototype to take a regcache.
9673 Adjust.
9674 (mips_supply_register):
9675 (mips_collect_register_32bit, mips_supply_register_32bit)
9676 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9677 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9678 * linux-ppc-low.c (ppc_supply_ptrace_register)
9679 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9680 (parse_spufs_run): Adjust.
9681 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9682 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9683 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9684 take a regcache. Adjust.
9685 * linux-s390-low.c (s390_collect_ptrace_register)
9686 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9687 (s390_set_pc): Change prototype to take a regcache. Adjust.
9688 (s390_arch_setup): Adjust.
9689 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9690 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9691 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9692 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9693 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9694 regcache. Adjust.
9695 (sparc_breakpoint_at): Adjust.
9696 * linux-xtensa-low.c (xtensa_fill_gregset):
9697 (xtensa_store_gregset):
9698 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9699 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9700 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9701 prototype to take a regcache. Adjust.
9702 * win32-arm-low.c (arm_fetch_inferior_register)
9703 (arm_store_inferior_register): Change prototype to take a
9704 regcache. Adjust.
9705 * win32-i386-low.c (i386_fetch_inferior_register)
9706 (i386_store_inferior_register): Change prototype to take a
9707 regcache. Adjust.
9708 * win32-low.c (child_fetch_inferior_registers)
9709 (child_store_inferior_registers): Change prototype to take a
9710 regcache. Adjust.
9711 (win32_wait): Adjust.
9712 (win32_fetch_inferior_registers): Change prototype to take a
9713 regcache. Adjust.
9714 (win32_store_inferior_registers): Adjust.
9715 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9716 store_inferior_register>: Change prototype to take a regcache.
9717
60c3d7b0
DE
97182010-01-20 Doug Evans <dje@google.com>
9719
9720 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9721 #ifdef.
9722 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9723 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9724
dc146f7c
VP
97252010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9726
9727 * linux-low.c (linux_core_of_thread): New.
9728 (compare_ints, show_process, list_threads): New.
9729 (linux_qxfer_osdata): Report threads and cores.
9730 (linux_target_op): Register linux_core_of_thread.
9731 * remote-utils.c (prepare_resume_reply): Report the core.
9732 (buffer_xml_printf): Support %d specifier.
9733 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9734 New.
9735 (handle_query): Handle qXfer:threads. Announce availability
9736 thereof.
9737 * target.h (struct target_ops): New field core_of_thread.
9738
7803799a
UW
97392010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9740
9741 * Makefile.in (clean): Remove new generated files.
9742 (reg-s390.o, reg-s390.c): Remove rules.
9743 (reg-s390x.o, reg-s390x.c): Likewise.
9744 (s390-linux32.o, s390-linux32.c): Add rules.
9745 (s390-linux64.o, s390-linux64.c): Likewise.
9746 (s390x-linux64.o, s390x-linux64.c): Likewise.
9747 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9748 * linux-s390-low.c: Include <elf.h>.
9749 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9750 (init_registers_s390): Remove prototype.
9751 (init_registers_s390x): Likewise.
9752 (init_registers_s390_linux32): Add prototype.
9753 (init_registers_s390_linux64): Likewise.
9754 (init_registers_s390x_linux64): Likewise.
9755 (s390_num_regs_3264): New define.
9756 (s390_regmap_3264): New global variable.
9757 (s390_cannot_fetch_register): Remove obsolete check.
9758 (s390_cannot_store_register): Likewise.
9759 (s390_collect_ptrace_register): Handle upper/lower register halves.
9760 (s390_supply_ptrace_register): Likewise.
9761 (s390_fill_gregset): Update to register number changes.
9762 (s390_get_hwcap): New routine.
9763 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9764 Install appropriate regmap and register set.
9765
6e7ffa39
JB
97662010-01-01 Joel Brobecker <brobecker@adacore.com>
9767
9768 * server.c (gdbserver_version): Update copyright year to 2010.
9769 * gdbreplay.c (gdbreplay_version): Likewise.
9770
957f3f49
DE
97712009-12-28 Doug Evans <dje@google.com>
9772
9773 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9774 elf/external.h. Include <elf.h> instead but only if necessary.
9775
ca5c370d
PA
97762009-12-28 Pedro Alves <pedro@codesourcery.com>
9777
9778 * linux-low.c (linux_remove_process): Remove `detaching'
9779 parameter. Don't release/detach from thread_db here.
9780 (linux_kill): Release/detach from thread_db here, ...
9781 (linux_detach): ... and here, before actually detaching.
9782 (linux_wait_1): ... and here, when a process exits.
9783 * thread-db.c (any_thread_of): New.
9784 (thread_db_free): Switch the current inferior to a thread of the
9785 passed in process.
9786
4ee62156
DE
97872009-12-21 Doug Evans <dje@google.com>
9788
d90e6a88
DE
9789 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9790
c5f62d5f
DE
9791 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9792 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9793 warning ifndef __NR_tkill. Move setting of errno there too.
9794 Delete unnecessary resetting of errno after syscall.
9795 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9796
10e86dd7
DE
9797 * configure.ac: Check for dladdr.
9798 * config.in: Regenerate.
9799 * configure: Regenerate.
9800 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9801 (try_thread_db_load): Update.
9802
4ee62156
DE
9803 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9804
00f515da
DE
98052009-12-18 Doug Evans <dje@google.com>
9806
e9464885
DE
9807 * event-loop.c: Include unistd.h if it exists.
9808
07d4f67e
DE
9809 * linux-low.c (my_waitpid): Move definition away from being in
9810 between linux_tracefork_child/linux_test_for_tracefork.
9811
00f515da
DE
9812 * gdb_proc_service.h (psaddr_t): Fix type.
9813 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9814 signature to match glibc.
9815
1de1badb
DE
98162009-12-16 Doug Evans <dje@google.com>
9817
9818 * linux-low.c (linux_read_memory): Fix argument to read.
9819
aeeb81d1
PA
98202009-11-26 Pedro Alves <pedro@codesourcery.com>
9821
9822 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9823 events, don't leave current_inferior pointing at null.
9824
10357975
PA
98252009-11-26 Pedro Alves <pedro@codesourcery.com>
9826
9827 * win32-low.c (LOG): Delete.
9828 (OUTMSG): Output to stderr.
9829 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9830 on compile time LOG macro.
9831 (win32_wait): Fix debug output.
9832
cf6e3471
PA
98332009-11-26 Pedro Alves <pedro@codesourcery.com>
9834
9835 * win32-low.c (win32_add_one_solib): If the dll name is
9836 "ntdll.dll", prepend the system directory to the dll path.
9837
0c85e18e
MK
98382009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9839
9840 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9841
9ac544ce 98422009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9843 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9844
9845 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9846 * configure.ac: Check for __mcoldfire__ and set
9847 gdb_cv_m68k_is_coldfire.
9848 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9849 reg-cf.o and reg-m68k.o.
9850 * configure: Regenerated.
9851
fd7dd3e6
PA
98522009-11-16 Pedro Alves <pedro@codesourcery.com>
9853
9854 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9855 Pass it to thread_db_free.
9856 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9857 proper `detaching' argument to linux_remove_process.
9858 * linux-low.h (thread_db_free): Add `detaching' parameter.
9859 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9860 to thread_db_free.
9861 (thread_db_free): Add `detaching' parameter. Only
9862 call td_ta_clear_event if detaching from process.
9863
75aa492e
MK
98642009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9865
9866 * thread-db.c (thread_db_free): Fix typo.
9867
21e1bee4
PP
98682009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9869
9870 PR gdb/10838
9871 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9872
8838b45e
NS
98732009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9874
9875 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9876 with an i686 compiler.
9877 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9878 needed.
9879 * configure: Rebuilt.
9880
8a35fb51
SL
98812009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9882
9883 PR gdb/10783
9884
9885 * server.c (handle_search_memory_1): Correct read_addr initialization
9886 in loop for searching subsequent chunks.
9887
96f15937
PP
98882009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9889
9890 * configure.ac: New --with-libthread-db option.
9891 * thread-db.c: Allow direct dependence on libthread_db.
9892 (thread_db_free): Adjust.
9893 * config.in: Regenerate.
9894 * configure: Likewise.
889bf7c5 9895
5f7d1694
PP
98962009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9897
9898 PR gdb/10757
9899 * thread-db.c (attach_thread): New function.
9900 (maybe_attach_thread): Return success/failure.
9901 (find_new_threads_callback): Adjust.
889bf7c5
PA
9902 (thread_db_find_new_threads): Loop until no new threads.
9903
88e3b899
PA
99042009-10-13 Pedro Alves <pedro@codesourcery.com>
9905
9906 * proc-service.c (ps_lgetregs): Formatting.
9907
cdbfd419
PP
99082009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9909
9910 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9911 * configure.ac: Adjust.
9912 * linux-low.h (struct process_info_private): Move members to struct
9913 thread_db.
9914 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9915 * linux-low.c (linux_remove_process): Adjust.
9916 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9917 * server.c (handle_query): Move code ...
9918 (handle_monitor_command): ... here. New function.
9919 * target.h (struct target_ops): New member.
9920 * thread-db.c (struct thread_db): New.
9921 (libthread_db_search_path): New variable.
9922 (thread_db_create_event, thread_db_enable_reporting)
9923 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9924 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9925 (try_thread_db_load_1, dladdr_to_soname): New functions.
9926 (try_thread_db_load, thread_db_load_search): New functions.
9927 (thread_db_init): Search for libthread_db.
9928 (thread_db_free): New function.
9929 (thread_db_handle_monitor_command): Likewise.
9930 * config.in: Regenerate.
9931 * configure: Regenerate.
889bf7c5 9932
4168d2d6
UW
99332009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9934
9935 * spu-low.c (spu_kill): Wait for inferior to terminate.
9936 Call clear_inferiors.
9937 (spu_detach): Call clear_inferiors.
9938
81ecdfbb
RW
99392009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9940
9941 * aclocal.m4: Regenerate.
9942 * config.in: Likewise.
9943 * configure: Likewise.
9944
0b9ff2c0
UW
99452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9946
9947 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9948 (parse_spufs_run): New function.
9949 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9950 (ppc_breakpoint_at): Handle SPU breakpoints.
9951
efcbbd14
UW
99522009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9953
9954 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9955 (SPUFS_MAGIC): Define.
9956 (spu_enumerate_spu_ids): New function.
9957 (linux_qxfer_spu): New function.
9958 (linux_target_ops): Install linux_qxfer_spu.
9959
f4d9bade
UW
99602009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9961
9962 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9963 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9964 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9965 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9966 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9967 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9968 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9969 (init_registers_powerpc_cell32l): Add prototype.
9970 (init_registers_powerpc_cell64l): Likewise.
9971 (ppc_arch_setup): Detect Cell/B.E. architecture.
9972
96e946ca
RW
99732009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9974
9975 * Makefile.in (datarootdir): New variable.
9976
58d6951d
DJ
99772009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9978
9979 * linux-low.c (linux_write_memory): Update debugging output.
9980 * Makefile.in (clean): Add new descriptions.
9981 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9982 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9983 * configure.srv: Add new files for arm*-*-linux*.
9984 * linux-arm-low.c: Add new declarations.
9985 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9986 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9987 (HWCAP_VFPv3D16): New.
9988 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9989 instead of __IWMMXT__.
9990 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9991 (arm_arch_setup): New.
9992 (target_regsets): Remove #ifdef. Add VFP regset.
9993 (the_low_target): Use arm_arch_setup.
9994
12b42a12
DJ
99952009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9996
9997 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9998 the main thread again.
9999
ac8c974e
AR
100002009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10001
10002 Adding Neutrino gdbserver.
10003 * configure: Regenerated.
10004 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10005 * configure.srv (i[34567]86-*-nto*): New target.
10006 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10007 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10008 (nto_comctrl) [__QNX__]: New function.
10009 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10010
4424e0c3 100112009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10012
10013 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10014 srv_tgtobj.
10015
912cf4ba
PA
100162009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10017 Pedro Alves <pedro@codesourcery.com>
10018
10019 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10020 don't support CONTEXT_EXTENDED_REGISTERS.
10021 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10022 (the_low_target): Install them.
10023 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10024 failing with ERROR_PIPE_NOT_CONNECTED.
10025
aa5ca48f
DE
100262009-06-30 Doug Evans <dje@google.com>
10027 Pierre Muller <muller@ics.u-strasbg.fr>
10028
10029 Add h/w watchpoint support to x86-linux, win32-i386.
10030 * Makefile.in (SFILES): Add i386-low.c
10031 (i386_low_h): Define.
10032 (i386-low.o): Add dependencies.
10033 (linux-x86-low.o): Add i386-low.h dependency.
10034 (win32-i386-low.o): Ditto.
10035 * i386-low.c: New file.
10036 * i386-low.h: New file.
10037 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10038 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10039 * linux-low.c (linux_add_process): Initialize arch_private.
10040 (linux_remove_process): Free arch_private.
10041 (add_lwp): Initialize arch_private.
10042 (delete_lwp): Free arch_private.
10043 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10044 provided.
10045 * linux-low.h (process_info_private): New member arch_private.
10046 (lwp_info): New member arch_private.
10047 (linux_target_ops): New members new_process, new_thread,
10048 prepare_to_resume.
10049 (ptid_of): New macro.
10050 * linux-x86-low.c: Include stddef.h, i386-low.h.
10051 (arch_process_info): New struct.
10052 (arch_lwp_info): New struct.
10053 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10054 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10055 (i386_dr_low_get_status): New function.
10056 (x86_insert_point, x86_remove_point): New functions.
10057 (x86_stopped_by_watchpoint): New function.
10058 (x86_stopped_data_address): New function.
10059 (x86_linux_new_process, x86_linux_new_thread): New functions.
10060 (x86_linux_prepare_to_resume): New function.
10061 (the_low_target): Add entries for insert_point, remove_point,
10062 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10063 prepare_to_resume.
10064 * server.c (debug_hw_points): New global.
10065 (monitor_show_help): Document set debug-hw-points.
10066 (handle_query): Process "set debug-hw-points".
10067 * server.h (debug_hw_points): Declare.
10068 (paddress): Declare.
10069 * utils.c (NUMCELLS, CELLSIZE): New macros.
10070 (get_sell, xsnprintf, paddress): New functions.
10071 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10072 remove_point, stopped_by_watchpoint, stopped_data_address.
10073 * win32-i386-low.c: Include i386-low.h.
10074 (debug_reg_state): Replaces dr.
10075 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10076 (i386_dr_low_get_status): New function.
10077 (i386_insert_point, i386_remove_point): New functions.
10078 (i386_stopped_by_watchpoint): New function.
10079 (i386_stopped_data_address): New function.
10080 (i386_initial_stuff): Update.
10081 (get_thread_context,set_thread_context,i386_thread_added): Update.
10082 (the_low_target): Add entries for insert_point,
10083 remove_point, stopped_by_watchpoint, stopped_data_address.
10084 * win32-low.c (win32_insert_watchpoint): New function.
10085 (win32_remove_watchpoint): New function.
10086 (win32_stopped_by_watchpoint): New function.
10087 (win32_stopped_data_address): New function.
10088 (win32_target_ops): Add entries for insert_watchpoint,
10089 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10090 * win32-low.h (win32_target_ops): New members insert_point,
10091 remove_point, stopped_by_watchpoint, stopped_data_address.
10092
d993e290
PA
100932009-06-25 Pedro Alves <pedro@codesourcery.com>
10094
10095 * server.c (process_serial_event): Re-return unsupported, not
10096 error, if the type isn't recognized. Re-allow supporting only
10097 insert or remove packets. Also call require_running for
10098 breakpoints. Add missing break statement to default case. Tidy.
10099 * target.h (struct target_ops): Rename insert_watchpoint to
10100 insert_point, and remove_watchpoint to remove_point.
10101
10102 * linux-low.h (struct linux_target_ops): Likewise.
10103 * linux-low.c (linux_insert_watchpoint): Rename to ...
10104 (linux_insert_point): ... this. Adjust.
10105 (linux_remove_watchpoint): Rename to ...
10106 (linux_remove_point): ... this. Adjust.
10107 (linux_target_ops): Adjust.
10108 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10109 (cris_insert_point): ... this.
10110 (cris_remove_watchpoint): Rename to ...
10111 (cris_remove_point): ... this.
10112 (the_low_target): Adjust.
10113
0f54c268
PM
101142009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10115
10116 * server.c (handle_v_kill): Pass signal_pid to
10117 kill_inferior if multi_process is zero.
10118
c6314022
AR
101192009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10120
10121 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10122 * target.h (target_ops): Comment for *_watchpoint to make it clear
10123 the functions can get types '0' and '1'.
10124
4463ce24
AR
101252009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10126
10127 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10128 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10129 * regcache.c (get_regcache): Likewise.
10130 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10131 * win32-low.c (child_fetch_inferior_registers): Remove check for
10132 regno 0.
10133
cf8fd78b
PA
101342009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10135 Pedro Alves <pedro@codesourcery.com>
10136
10137 * target.h (struct target_ops) <supports_multi_process>: New
10138 callback.
10139 (target_supports_multi_process): New.
10140 * server.c (handle_query): Even if GDB reports support, only
10141 enable multi-process if the target also supports it. Report
10142 multi-process support only if the target backend supports it.
10143 * linux-low.c (linux_supports_multi_process): New function.
10144 (linux_target_ops): Install it as target_supports_multi_process
10145 callback.
10146
47c0c975
DE
101472009-05-24 Doug Evans <dje@google.com>
10148
e09875d4
DE
10149 Global renaming of find_thread_pid to find_thread_ptid.
10150 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10151 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10152 All callers updated.
10153
e27d73f6
DE
10154 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10155 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10156 directly.
10157
47c0c975
DE
10158 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10159 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10160 (linux_resume_one_lwp): Ditto.
10161
2acc282a
DE
101622009-05-23 Doug Evans <dje@google.com>
10163
10164 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10165 from struct inferior_list_entry * to struct lwp_info *.
10166 All callers updated.
10167
9f1036c1
DE
101682009-05-13 Doug Evans <dje@google.com>
10169
10170 * linux-x86-low.c: Don't include assert.h.
10171 (x86_siginfo_fixup): Use fatal, not assert.
10172 (x86_arch_setup): Fix comment.
10173
d0722149
DE
101742009-05-12 Doug Evans <dje@google.com>
10175
10176 Biarch support for i386/amd64 gdbserver.
10177 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10178 Add linux-x86-low.c.
10179 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10180 (linux-x86-low.o): Add.
10181 * linux-x86-64-low.c: Delete.
10182 * linux-i386-low.c: Delete.
10183 * linux-x86-low.c: New file.
10184 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10185 linux-x86-low.o.
10186 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10187 linux-x86-low.o.
10188 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10189 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10190 (linux_child_pid_to_exec_file): New function.
10191 (elf_64_header_p, elf_64_file_p): New functions.
10192 (siginfo_fixup): New function.
10193 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10194 give target a chance to convert layout.
10195 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10196 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10197
fdeb2a12
DE
101982009-05-07 Doug Evans <dje@google.com>
10199
10200 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10201 (regsets_store_inferior_registers): Ditto.
10202
a6dbe5df
PA
102032009-05-06 Pedro Alves <pedro@codesourcery.com>
10204
10205 PR server/10048
10206
10207 * linux-low.c (must_set_ptrace_flags): Delete.
10208 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10209 of the global.
10210 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10211 `lwp->must_set_ptrace_flags' instead.
ba42693b 10212 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10213 (linux_wait_1): ... not here.
10214
5091eb23
DE
102152009-04-30 Doug Evans <dje@google.com>
10216
9f767825
DE
10217 * inferiors.c (started_inferior_callback): New function.
10218 (attached_inferior_callback): New function.
10219 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10220 * server.c (print_started_pid, print_attached_pid): New functions.
10221 (detach_or_kill_for_exit): New function.
10222 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10223 * server.h (have_started_inferiors_p): Declare.
10224 (have_attached_inferiors_p): Declare.
10225
5091eb23
DE
10226 * inferiors.c (remove_process): Fix memory leak, free process.
10227 * linux-low.c (linux_remove_process): New function.
10228 (linux_kill): Call it instead of remove_process.
10229 (linux_detach, linux_wait_1): Ditto.
10230
155c8968
PA
102312009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10232
10233 * configure.srv: Add x86 Windows CE target.
10234
7fe519cb
UW
102352009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10236
10237 * inferiors.c (get_thread_process): Make global.
10238 * server.h (get_thread_process): Add prototype.
10239 * thread-db.c (find_one_thread): Use get_thread_process
10240 instead of current_process.
10241 (thread_db_get_tls_address): Do not crash if called when
10242 thread layer is not yet initialized.
10243
5472f405
UW
102442009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10245
10246 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10247 * spu-low.c (current_tid): Rename to ...
10248 (current_ptid): ... this.
10249 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10250 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10251 ptid_get_lwp (current_ptid) instead of current_tid.
10252 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10253 instead of current_tid. Use find_process_pid to verify pid
10254 argument is valid. Pass proper argument to remove_process.
10255 (spu_thread_alive): Compare current_ptid instead of current_tid.
10256 (spu_resume): Likewise.
10257
55ac2b99
PA
102582009-04-02 Pedro Alves <pedro@codesourcery.com>
10259
10260 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10261 variable.
10262
95954743
PA
102632009-04-01 Pedro Alves <pedro@codesourcery.com>
10264
10265 Implement the multiprocess extensions, and add linux multiprocess
10266 support.
10267
10268 * server.h (ULONGEST): Declare.
10269 (struct ptid, ptid_t): New.
10270 (minus_one_ptid, null_ptid): Declare.
10271 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10272 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10273 (struct inferior_list_entry): Change `id' type from unsigned from
10274 to ptid_t.
10275 (struct sym_cache, struct breakpoint, struct
10276 process_info_private): Forward declare.
10277 (struct process_info): Declare.
10278 (current_process): Declare.
10279 (all_processes): Declare.
10280 (initialize_inferiors): Declare.
10281 (add_thread): Adjust to use ptid_t.
10282 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10283 (add_process, remove_process, find_thread_pid): Declare.
10284 (find_inferior_id): Adjust to use ptid_t.
10285 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10286 (multi_process): Declare.
10287 (push_event): Adjust to use ptid_t.
10288 (read_ptid, write_ptid): Declare.
10289 (prepare_resume_reply): Adjust to use ptid_t.
10290 (clear_symbol_cache): Declare.
10291 * inferiors.c (all_processes): New.
10292 (null_ptid, minus_one_ptid): New.
10293 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10294 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10295 (add_thread): Change unsigned long to ptid. Remove gdb_id
10296 parameter. Adjust.
10297 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10298 (gdb_id_to_thread): Rename to ...
10299 (find_thread_pid): ... this. Change unsigned long to ptid.
10300 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10301 (loaded_dll, pull_pid_from_list): Adjust.
10302 (add_process, remove_process, find_process_pid)
10303 (get_thread_process, current_process, initialize_inferiors): New.
10304 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10305 (struct target_waitstatus) <related_pid>: Ditto.
10306 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10307 return type to int.
10308 (struct target_ops) <join>: Add `pid' argument.
10309 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10310 (struct target_ops) <wait>: Add `ptid' field. Change return type
10311 to ptid.
10312 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10313 (mywait): Add `ptid' argument. Change return type to ptid_t.
10314 (target_pid_to_str): Declare.
10315 * target.c (set_desired_inferior): Adjust to use ptids.
10316 (mywait): Add new `ptid' argument. Adjust.
10317 (target_pid_to_str): New.
10318 * mem-break.h (free_all_breakpoints): Declare.
10319 * mem-break.c (breakpoints): Delelete.
10320 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10321 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10322 to use per-process breakpoint list.
10323 (free_all_breakpoints): New.
10324 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10325 (symbol_cache, all_symbols_looked_up): Delete.
10326 (hexchars): New.
10327 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10328 read_ptid): New.
10329 (prepare_resume_reply): Change ptid argument's type from unsigned
10330 long to ptid_t. Adjust. Implement W;process and X;process.
10331 (free_sym_cache, clear_symbol_cache): New.
10332 (look_up_one_symbol): Adjust to per-process symbol cache. *
10333 * server.c (cont_thread, general_thread, step_thread): Change type
10334 to ptid_t.
10335 (attached): Delete.
10336 (multi_process): New.
10337 (last_ptid): Change type to ptid_t.
10338 (struct vstop_notif) <ptid>: Change type to ptid_t.
10339 (queue_stop_reply, push_event): Change `ptid' argument's type to
10340 ptid_t.
10341 (discard_queued_stop_replies): Add `pid' argument.
10342 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10343 changes. Don't reference the `attached' global.
10344 (attach_inferior): Adjust to mywait interface changes.
10345 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10346 features. Handle and report "multiprocess+". Handle
10347 "qAttached:PID".
10348 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10349 changes.
10350 (handle_v_kill): New.
10351 (handle_v_stopped): Adjust to use target_pid_to_str.
10352 (handle_v_requests): Allow multiple attaches and runs when
10353 multiprocess extensions are in effect. Handle "vKill".
10354 (myresume): Adjust to use ptids.
10355 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10356 (handle_status): Adjust to discard_queued_stop_replies interface
10357 change.
10358 (first_thread_of, kill_inferior_callback)
10359 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10360 (main): Call initialize_inferiors. Adjust to use ptids, killing
10361 and detaching from all inferiors. Handle multiprocess packet
10362 variants.
10363 * linux-low.h: Include gdb_proc_service.h.
10364 (struct process_info_private): New.
10365 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10366 <lwpid_of>: Use ptid_get_lwp.
10367 (get_lwp_thread): Adjust.
10368 (struct lwp_info): Add `dead' member.
10369 (find_lwp_pid): Declare.
10370 * linux-low.c (thread_db_active): Delete.
10371 (new_inferior): Adjust comment.
10372 (inferior_pid): Delete.
10373 (linux_add_process): New.
10374 (handle_extended_wait): Adjust.
10375 (add_lwp): Change unsigned long to ptid.
10376 (linux_create_inferior): Add process to processes table. Adjust
10377 to use ptids. Don't set new_inferior here.
10378 (linux_attach_lwp): Rename to ...
10379 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10380 it. Adjust to use ptids.
10381 (linux_attach_lwp): New.
10382 (linux_attach): Add process to processes table. Don't set
10383 new_inferior here.
10384 (struct counter): New.
10385 (second_thread_of_pid_p, last_thread_of_process_p): New.
10386 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10387 multiple processes.
10388 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10389 processes. Remove process from process table.
10390 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10391 to multiple processes.
10392 (any_thread_of): New.
10393 (linux_detach): Add `pid' argument, and handle it. Remove process
10394 from processes table.
10395 (linux_join): Add `pid' argument. Handle it.
10396 (linux_thread_alive): Change unsighed long argument to ptid_t.
10397 Consider dead lwps as not being alive.
10398 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10399 threads we're not interested in.
10400 (same_lwp, find_lwp_pid): New.
10401 (linux_wait_for_lwp): Change `pid' argument's type from int to
10402 ptid_t. Adjust.
10403 (linux_wait_for_event): Rename to ...
10404 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10405 from int to ptid_t. Adjust.
10406 (linux_wait_for_event): New.
10407 (linux_wait_1): Add `ptid' argument. Change return type to
10408 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10409 that exit from the process table.
10410 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10411 Adjust.
10412 (mark_lwp_dead): New.
10413 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10414 stopping all threads, mark its main lwp as dead.
10415 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10416 ptids.
10417 (fetch_register, usr_store_inferior_registers)
10418 (regsets_fetch_inferior_registers)
10419 (regsets_store_inferior_registers, linux_read_memory)
10420 (linux_write_memory): Inline `inferior_pid'.
10421 (linux_look_up_symbols): Adjust to use per-process
10422 `thread_db_active'.
10423 (linux_request_interrupt): Adjust to use ptids.
10424 (linux_read_auxv): Inline `inferior_pid'.
10425 (initialize_low): Don't reference thread_db_active.
10426 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10427 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10428 (ps_getpid): Return the pid of the current inferior.
10429 * thread-db.c (proc_handle, thread_agent): Delete.
10430 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10431 per-process data.
10432 (find_one_thread): Change argument type to ptid_t. Adjust to
10433 per-process data.
10434 (maybe_attach_thread): Adjust to per-process data and ptids.
10435 (thread_db_find_new_threads): Ditto.
10436 (thread_db_init): Ditto.
10437 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10438 processes table. Adjust to use ptids.
10439 (spu_kill, spu_detach): Adjust interface. Remove process from
10440 processes table.
10441 (spu_join, spu_thread_alive): Adjust interface.
10442 (spu_wait): Adjust interface. Remove process from processes
10443 table. Adjust to use ptids.
10444 * win32-low.c (current_inferior_tid): Delete.
10445 (current_inferior_ptid): New.
10446 (debug_event_ptid): New.
10447 (thread_rec): Take a ptid. Adjust.
10448 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10449 (child_delete_thread): Ditto.
10450 (do_initial_child_stuff): Add `attached' argument. Add process to
10451 processes table.
10452 (child_fetch_inferior_registers, child_store_inferior_registers):
10453 Adjust.
10454 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10455 (win32_attach): Pass 1 to do_initial_child_stuff.
10456 (win32_kill): Adjust interface. Remove process from processes
10457 table.
10458 (win32_detach): Ditto.
10459 (win32_join): Adjust interface.
10460 (win32_thread_alive): Take a ptid.
10461 (win32_resume): Adjust to use ptids.
10462 (get_child_debug_event): Ditto.
10463 (win32_wait): Adjust interface. Remove exiting process from
10464 processes table.
10465
bd99dc85
PA
104662009-04-01 Pedro Alves <pedro@codesourcery.com>
10467
10468 Non-stop mode support.
10469
10470 * server.h (non_stop): Declare.
10471 (gdb_client_data, handler_func): Declare.
10472 (delete_file_handler, add_file_handler, start_event_loop):
10473 Declare.
10474 (handle_serial_event, handle_target_event, push_event)
10475 (putpkt_notif): Declare.
10476 * target.h (enum resume_kind): New.
10477 (struct thread_resume): Replace `step' field by `kind' field.
10478 (TARGET_WNOHANG): Define.
10479 (struct target_ops) <wait>: Add `options' argument.
10480 <supports_non_stop, async, start_non_stop>: New fields.
10481 (target_supports_non_stop, target_async): New.
10482 (start_non_stop): Declare.
10483 (mywait): Add `options' argument.
10484 * target.c (mywait): Add `options' argument. Print child exit
10485 notifications here.
10486 (start_non_stop): New.
10487 * server.c (non_stop, own_buf, mem_buf): New globals.
10488 (struct vstop_notif): New.
10489 (notif_queue): New global.
10490 (queue_stop_reply, push_event, discard_queued_stop_replies)
10491 (send_next_stop_reply): New.
10492 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10493 interface changes.
10494 (attach_inferior): In non-stop mode, don't wait for the target
10495 here.
10496 (handle_general_set): Handle QNonStop.
10497 (handle_query): When handling qC, return the current general
10498 thread, instead of the first thread of the list.
10499 (handle_query): If the backend supports non-stop mode, include
10500 QNonStop+ in the qSupported query response.
10501 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10502 and non-stop mode.
10503 (handle_v_attach, handle_v_run): Handle non-stop mode.
10504 (handle_v_stopped): New.
10505 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10506 (myresume): Adjust to use resume_kind. Handle non-stop.
10507 (queue_stop_reply_callback): New.
10508 (handle_status): Handle non-stop mode.
10509 (main): Clear non_stop flag on reconnection. Use the event-loop.
10510 Refactor serial protocol handling from here ...
10511 (process_serial_event): ... to this new function. When GDB
10512 selects any thread, select one here. In non-stop mode, wait until
10513 GDB acks all pending events before exiting.
10514 (handle_serial_event, handle_target_event): New.
10515 * remote-utils.c (remote_open): Install remote_desc in the event
10516 loop.
10517 (remote_close): Remove remote_desc from the event loop.
10518 (putpkt_binary): Rename to...
10519 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10520 (putpkt_binary): New as wrapper around putpkt_binary_1.
10521 (putpkt_notif): New.
10522 (prepare_resume_reply): In non-stop mode, don't change the
10523 general_thread.
10524 * event-loop.c: New.
10525 * Makefile.in (OBJ): Add event-loop.o.
10526 (event-loop.o): New rule.
10527
10528 * linux-low.h (pid_of): Moved here.
10529 (lwpid_of): New.
10530 (get_lwp_thread): Use lwpid_of.
10531 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10532 * linux-low.c (pid_of): Delete.
10533 (inferior_pid): Use lwpid_of.
10534 (linux_event_pipe): New.
10535 (target_is_async_p): New.
10536 (delete_lwp): New.
10537 (handle_extended_wait): Use lwpid_of.
10538 (add_lwp): Don't set lwpid field.
10539 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10540 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10541 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10542 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10543 first. Adjust to linux_wait_for_event interface changes. Use
10544 lwpid_of.
10545 (linux_detach): Don't delete the main lwp here.
10546 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10547 (status_pending_p): Don't consider explicitly suspended lwps.
10548 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10549 pointer. Add OPTIONS argument. Change return type to int. Use
10550 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10551 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10552 pointer. Add status pointer argument. Return a pid instead of a
10553 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10554 changes. In non-stop mode, don't switch to a random thread.
10555 (linux_wait): Rename to...
10556 (linux_wait_1): ... this. Add target_options argument, and handle
10557 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10558 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10559 clean exit and signal exit code. Don't stop all threads in
10560 non-stop mode. In all-stop mode, only stop all threads when
10561 reporting a stop to GDB. Handle explicit thread stop requests.
10562 (async_file_flush, async_file_mark): New.
10563 (linux_wait): New.
10564 (send_sigstop): Use lwpid_of.
10565 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10566 interface changes. In non-stop mode, don't switch to a random
10567 thread.
10568 (linux_resume_one_lwp): Use lwpid_of.
10569 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10570 (linux_resume_one_thread): ... this. Handle resume_stop. In
10571 non-stop mode, don't look for pending flag in all threads.
10572 (resume_status_pending_p): Don't consider explicitly suspended
10573 threads.
10574 (my_waitpid): Reimplement. Emulate __WALL.
10575 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10576 Use lwpid_of.
10577 (sigchld_handler, linux_supports_non_stop, linux_async)
10578 (linux_start_non_stop): New.
10579 (linux_target_ops): Register linux_supports_non_stop, linux_async
10580 and linux_start_non_stop.
10581 (initialize_low): Install SIGCHLD handler.
10582 * thread-db.c (thread_db_create_event, find_one_thread)
10583 (thread_db_get_tls_address): Use lwpid_of.
10584 * win32-low.c (win32_detach): Adjust to use resume_kind.
10585 (win32_wait): Add `options' argument.
10586 * spu-low.c (spu_resume): Adjust to use resume_kind.
10587 (spu_wait): Add `options' argument.
10588
5b1c542e
PA
105892009-04-01 Pedro Alves <pedro@codesourcery.com>
10590
10591 Decouple target code from remote protocol.
10592
10593 * target.h (enum target_waitkind): New.
10594 (struct target_waitstatus): New.
10595 (struct target_ops) <wait>: Return an unsigned long. Take a
10596 target_waitstatus pointer instead of a char pointer.
10597 (mywait): Likewise.
10598 * target.c (mywait): Change prototype to return an unsigned long.
10599 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10600 * server.h (thread_from_wait, old_thread_from_wait): Delete
10601 declarations.
10602 (prepare_resume_reply): Change prototype to take a
10603 target_waitstatus.
10604 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10605 (last_status, last_ptid): New.
10606 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10607 pid instead of a signal.
10608 (attach_inferior): Remove "status" and "signal" parameters.
10609 Adjust.
10610 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10611 not as an address.
10612 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10613 (handle_v_requests, myresume): Remove "status" and "signal"
10614 parameters. Adjust.
10615 (handle_status): New.
10616 (main): Delete local `status'. Adjust.
10617 * remote-utils.c: Include target.h.
10618 (prepare_resume_reply): Change prototype to take a
10619 target_waitstatus. Adjust.
10620
10621 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10622 interface.
10623 * spu-low.c (spu_wait): Adjust.
10624 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10625 Delete.
10626 (win32_wait): Adjust.
10627
2bd7c093
PA
106282009-04-01 Pedro Alves <pedro@codesourcery.com>
10629
10630 * target.h (struct thread_resume): Delete leave_stopped member.
10631 (struct target_ops): Add a `n' argument to the `resume' callback.
10632 * server.c (start_inferior): Adjust.
10633 (handle_v_cont, myresume): Adjust.
10634 * linux-low.c (check_removed_breakpoint): Adjust to resume
10635 interface change, and to removed leave_stopped field.
10636 (resume_ptr): Delete.
10637 (struct thread_resume_array): New.
10638 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10639 resume interface change.
10640 (linux_continue_one_thread, linux_queue_one_thread)
10641 (resume_status_pending_p): Check if the resume field is NULL
10642 instead of checking the leave_stopped member.
10643 (linux_resume): Adjust to the target resume interface change.
10644 * spu-low.c (spu_resume): Adjust to the target resume interface
10645 change.
10646 * win32-low.c (win32_detach, win32_resume): Ditto.
10647
c35fafde
PA
106482009-04-01 Pedro Alves <pedro@codesourcery.com>
10649
10650 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10651 flag.
10652 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10653 pending.
10654 (linux_continue_one_thread): Only preserve the stepping flag if
10655 there's a pending breakpoint.
10656
0a59d50b
PA
106572009-03-31 Pedro Alves <pedro@codesourcery.com>
10658
10659 * server.c (main): After the inferior having exited, call
10660 remote_close before exiting gdbserver.
10661
f04c6d38
TJB
106622009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10663
10664 Fix size of FPSCR in Power 7 processors.
10665 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10666 (PPC_FEATURE_HAS_DFP): New #define.
10667 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10668 size of the FPSCR.
10669
78e5cee6
PA
106702009-03-23 Pedro Alves <pedro@codesourcery.com>
10671
10672 * server.c (handle_query) Whitespace and formatting.
10673
1b3f6016
PA
106742009-03-22 Pedro Alves <pedro@codesourcery.com>
10675
10676 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10677 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10678 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10679 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10680 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10681 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10682 Makefile.in, configure.ac: Fix whitespace throughout.
10683 * configure: Regenerate.
10684
a07b2135
PA
106852009-03-22 Pedro Alves <pedro@codesourcery.com>
10686
10687 * inferiors.c (find_inferior): Make it safe for the callback
10688 function to delete the currently iterated inferior.
10689
67cc2626
PA
106902009-03-22 Pedro Alves <pedro@codesourcery.com>
10691
10692 * Makefile.in (linuw_low_h): Move higher.
10693 (thread-db.o): Depend on $(linux_low_h).
10694
54a0b537
PA
106952009-03-17 Pedro Alves <pedro@codesourcery.com>
10696
10697 Rename "process" to "lwp" throughout.
10698
10699 * linux-low.c (all_processes): Rename to...
10700 (all_lwps): ... this.
10701 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10702 (add_process): Rename to ...
10703 (add_lwp): ... this. Adjust.
10704 (linux_create_inferior): Adjust.
10705 (linux_attach_lwp): Adjust.
10706 (linux_attach): Adjust.
10707 (linux_kill_one_process): Rename to ...
10708 (linux_kill_one_lwp): ... this. Adjust.
10709 (linux_kill): Adjust.
10710 (linux_detach_one_process): Rename to ...
10711 (linux_detach_one_lwp): ... this. Adjust.
10712 (linux_detach): Adjust.
10713 (check_removed_breakpoint): Adjust.
10714 (status_pending_p): Adjust.
10715 (linux_wait_for_process): Rename to ...
10716 (linux_wait_for_lwp): ... this. Adjust.
10717 (linux_wait_for_event): Adjust.
10718 (send_sigstop): Adjust.
10719 (wait_for_sigstop): Adjust.
10720 (stop_all_processes): Rename to ...
10721 (stop_all_lwps): ... this.
10722 (linux_resume_one_process): Rename to ...
10723 (linux_resume_one_lwp): ... this. Adjust.
10724 (linux_set_resume_request, linux_continue_one_thread)
10725 (linux_queue_one_thread, resume_status_pending_p)
10726 (usr_store_inferior_registers, regsets_store_inferior_registers)
10727 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10728 Adjust.
10729 * linux-low.h (get_process): Rename to ...
10730 (get_lwp): ... this. Adjust.
10731 (get_thread_process): Rename to ...
10732 (get_thread_lwp): ... this. Adjust.
10733 (get_process_thread): Rename to ...
10734 (get_lwp_thread): ... this. Adjust.
10735 (struct process_info): Rename to ...
10736 (struct lwp_info): ... this.
10737 (all_processes): Rename to ...
10738 (all_lwps): ... this.
10739 * proc-service.c (ps_lgetregs): Adjust.
10740 * thread-db.c (thread_db_create_event, find_one_thread)
10741 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10742
0b16c5cf
PA
107432009-03-14 Pedro Alves <pedro@codesourcery.com>
10744
10745 * server.c (handle_query): Handle "qAttached".
10746
32de4b9d
NS
107472009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10748
10749 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10750 GPLv3, update license URL.
10751
2aecd87f
DE
107522009-03-01 Doug Evans <dje@google.com>
10753
93efd302 10754 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10755 (server_h): Add gdb_signals.h.
10756 (signals.o): Update.
10757 * server.h (target_signal_from_host,target_signal_to_host_p)
10758 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10759
86b1f9c5
PM
107602009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10761
10762 * remote-utils.c (getpkt): Also generate remote-debug
10763 information if noack_mode is set.
10764
4aa995e1
PA
107652009-02-06 Pedro Alves <pedro@codesourcery.com>
10766
10767 * server.c (handle_query): Report qXfer:siginfo:read and
10768 qXfer:siginfo:write as supported and handle them.
10769 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10770 * linux-low.c (linux_xfer_siginfo): New.
10771 (linux_target_ops): Set it.
10772
62709adf
PA
107732009-01-26 Pedro Alves <pedro@codesourcery.com>
10774
10775 * server.c (gdbserver_usage): Mention --remote-debug.
10776 (main): Accept '--remote-debug' switch.
10777
aef93bd7
DE
107782009-01-18 Doug Evans <dje@google.com>
10779
10780 * regcache.c (new_register_cache): No need to check result of xcalloc.
10781 * server.c (handle_search_memory): Back out calls to xmalloc,
10782 result is checked and error is returned to user upon failure.
10783 (handle_query): Ditto. Add more checks for result of malloc.
10784 (handle_v_cont): Check result of malloc, report error back to
10785 user upon failure.
10786 (handle_v_run): Ditto. Call freeargv.
10787 * server.h (freeargv): Declare.
10788 * utils.c (freeargv): New fn.
10789
54363045
DE
107902009-01-15 Doug Evans <dje@google.com>
10791
f626972c
DE
10792 * gdbreplay.c (perror_with_name): Make arg const char *.
10793 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10794 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10795 * utils.c (perror_with_name): Make arg const char *.
54363045 10796
18aae699
PA
107972009-01-14 Pedro Alves <pedro@codesourcery.com>
10798
10799 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10800 when handling a EXIT_PROCESS_DEBUG_EVENT.
10801
ff703abe
JB
108022009-01-06 Joel Brobecker <brobecker@adacore.com>
10803
10804 * gdbreplay.c (gdbreplay_version): Update copyright year.
10805 * server.c (gdbserver_version): Likewise.
10806
f21cc1a2 108072009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10808
10809 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10810 (handle_extended_wait): Improve comment.
0e21c1ec 10811
bca929d3
DE
108122008-12-13 Doug Evans <dje@google.com>
10813
10814 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10815 * server.h (ATTR_MALLOC): New macro.
10816 (xmalloc,xcalloc,xstrdup): Declare.
10817 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10818 * inferiors.c: Ditto.
10819 * linux-low.c: Ditto.
10820 * mem-break.c: Ditto.
10821 * regcache.c: Ditto.
10822 * remote-utils.c: Ditto.
10823 * server.c: Ditto.
10824 * target.c: Ditto.
10825 * win32-low.c: Ditto.
10826
97438e3f
DE
108272008-12-12 Doug Evans <dje@google.com>
10828
896c7fbb
DE
10829 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10830 in debugging printf.
10831
97438e3f
DE
10832 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10833
e3b886f8
DE
108342008-12-09 Doug Evans <dje@google.com>
10835
10836 * linux-low.h (struct process_info): Delete member tid, unused.
10837 * thread-db.c (find_one_thread): Update.
10838 (maybe_attach_thread): Update.
10839
07e059b5
VP
108402008-12-02 Pedro Alves <pedro@codesourcery.com>
10841
889bf7c5
PA
10842 * target.h (struct target_ops): Add qxfer_osdata member.
10843 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10844 and dirent.h.
10845 (linux_qxfer_osdata): New functions.
10846 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10847 callback.
10848 * server.c (handle_query): Handle "qXfer:osdata:read:".
10849 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10850 (buffer_xml_printf): New functions.
10851 * server.h (struct buffer): New.
10852 (buffer_grow_str, buffer_grow_str0): New macros.
10853 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10854 (buffer_xml_printf): Declare.
07e059b5 10855
4cab47ab
DE
108562008-11-24 Doug Evans <dje@google.com>
10857
10858 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10859
f142445f
DJ
108602008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10861
10862 * server.c (handle_v_run): Always use the supplied argument list.
10863
d0107bb6 108642008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10865
d0107bb6
BW
10866 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10867 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10868
2c4ad781
TJB
108692008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10870
10871 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10872 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10873 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10874 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10875 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10876 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10877 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10878 XML target descriptions.
10879 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10880 when inferior is running on an ISA 2.05 or later processor. Add
10881 special case to return offset for full 64-bit slot of FPSCR when
10882 in 32-bits.
10883
dfb64f85
DJ
108842008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10885
10886 * Makefile.in (SFILES, clean): Added sparc64 files.
10887 (reg-sparc64.o, reg-sparc64.c): New.
10888 * configure.srv (sparc*-*-linux*): New configuration.
10889 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10890 syscall arguments for SPARC.
10891 (regsets_store_inferior_registers): Likewise.
10892 * linux-sparc-low.c: New file.
10893
66b6e1dd
DE
108942008-10-21 Doug Evans <dje@google.com>
10895
10896 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10897 (READLINE_DIR,READLINE_DEP): Delete.
10898 (INTERNAL_CFLAGS): Update.
10899 (LINTFLAGS): Update.
10900
9b710a42
PA
109012008-10-10 Pedro Alves <pedro@codesourcery.com>
10902
10903 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10904 whole argv from the last run, not just argv[0].
10905
5822d809
PA
109062008-09-08 Pedro Alves <pedro@codesourcery.com>
10907
10908 * regcache.c (new_register_cache): Return NULL if the register
10909 cache size isn't known yet.
10910 (free_register_cache): Avoid dereferencing a NULL regcache.
10911
74aac56f
DJ
109122008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10913
10914 * configure.srv: Merge MIPS and MIPS64.
10915
400b20f5
MR
109162008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10917
10918 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10919
677c5bb1
LM
109202008-08-18 Luis Machado <luisgpm@br.ibm.com>
10921
10922 * Makefile.in: Add required vsx dependencies.
10923
10924 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10925 Declare init_registers_powerpc_vsx32l.
10926 Declare init_registers_powerpc_vsx64l.
10927 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10928 (ppc_arch_setup): Check for VSX in hwcap.
10929 (ppc_fill_vsxregset): New function.
10930 (ppc_store_vsxregset): New function.
10931 Add new VSX entry in regset_info target_regsets.
10932
10933 * configure.srv: Add new VSX dependencies.
10934
a6f3e723
SL
109352008-08-12 Pedro Alves <pedro@codesourcery.com>
10936
10937 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10938 (remote_open): Set or clear transport_is_reliable.
10939 (putpkt_binary): Don't expect acks in noack mode.
10940 (getpkt): Don't send ack/nac in noack mode.
10941 * server.c (handle_general_set): Handle QStartNoAckMode.
10942 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10943 qSupported.
10944 (main): Reset noack_mode on every connection.
10945 * server.h (noack_mode): Declare.
10946
a417dc56
RW
109472008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10948
10949 * Makefile.in (GDBREPLAY_OBS): New variable.
10950 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10951
3221518c
UW
109522008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10953 Daniel Jacobowitz <dan@codesourcery.com>
10954
10955 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10956 (usr_store_inferior_registers): Likewise.
10957 (regsets_store_inferior_registers): Likewise.
10958
ec56be1b
PA
109592008-07-31 Rolf Jansen <rj@surtec.com>
10960 Pedro Alves <pedro@codesourcery.com>
10961
10962 * configure.ac: Check for memmem declaration.
10963 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10964 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10965 (disable_packet_qfThreadInfo): Unconditionally compile.
10966 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10967 * configure, config.in: Regenerate.
10968
2fe5e3ff
DE
109692008-07-28 Doug Kwan <dougkwan@google.com>
10970
10971 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10972 (linux_write_memory): Remove declaration of errno.
10973
836acd6d
UW
109742008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10975
10976 * linux-low.c (handle_extended_wait): Do not use "status"
10977 variable uninitialized.
10978
aeba519e
PA
109792008-07-07 Pedro Alves <pedro@codesourcery.com>
10980
10981 * server.c (handle_v_attach): Inhibit reporting dll changes.
10982
db42f210
PA
109832008-06-27 Pedro Alves <pedro@codesourcery.com>
10984
10985 * remote-utils.c (prepare_resume_reply): If requested, don't
10986 output "thread:TID" in the T stop reply.
10987
10988 * server.c (disable_packet_vCont, disable_packet_Tthread)
10989 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10990 (handle_query): If requested, disable support for qC, qfThreadInfo
10991 and qsThreadInfo.
10992 (handle_v_requests): If requested, disable support for vCont.
10993 (gdbserver_show_disableable): New.
10994 (main): Handle --disable-packet and --disable-packet=LIST.
10995
10996 * server.h (disable_packet_vCont, disable_packet_Tthread)
10997 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10998
8e4c5421
CD
109992008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11000
11001 * server.c (gdbserver_usage): Mention --version.
11002
6e23a804
DJ
110032008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11004
11005 * Makefile.in (gdbreplay.o): New rule.
11006
90aa6a40
JM
110072008-06-06 Joseph Myers <joseph@codesourcery.com>
11008
11009 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11010 message, not gdbserver.
11011
c16158bc 110122008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11013 Nathan Sidwell <nathan@codesourcery.com>
11014 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11015
11016 * acinclude.m4: Include ../../config/acx.m4.
11017 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11018 * configure, config.in: Regenerate.
11019 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11020 * server.c (gdbserver_version): Print PKGVERSION.
11021 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11022 (main): Adjust gdbserver_usage calls.
11023 * gdbreplay.c (version, host_name): Add declarations.
11024 (gdbreplay_version, gdbreplay_usage): New.
11025 (main): Accept --version and --help options.
11026
aeb75bf5
DJ
110272008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11028
11029 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11030 (arm_breakpoint_at): Handle Thumb.
11031 (the_low_target): Add comment.
11032
76b233dd
UW
110332008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11034
11035 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11036
08388c79
DE
110372008-05-09 Doug Evans <dje@google.com>
11038
a3c83fae
DE
11039 * server.h (decode_search_memory_packet): Declare.
11040 * remote-utils.c (decode_search_memory_packet): New fn.
11041 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11042 (handle_search_memory): New fn.
11043 (handle_query): Process qSearch:memory packets.
11044
bb9c3d36
UW
110452008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11046
11047 * regcache.c (registers_length): Remove.
11048 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11049 full register packet.
11050 * regcache.h (registers_length): Remove prototype.
11051 * server.h (PBUFSIZ): Define to 16384.
11052
7284e1be
UW
110532008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11054
11055 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11056 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11057 powerpc-64l.o, and powerpc-altivec64l.o.
11058 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11059 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11060 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11061 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11062 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11063 to srv_xmlfiles.
11064
11065 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11066 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11067 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11068 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11069 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11070 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11071 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11072 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11073 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11074 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11075 (clean): Update.
11076
11077 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11078 (init_registers_powerpc_32l): ... this new prototype.
11079 (init_registers_powerpc_32): Remove, replace by ...
11080 (init_registers_powerpc_altivec32l): ... this new prototype.
11081 (init_registers_powerpc_e500): Remove, replace by ...
11082 (init_registers_powerpc_e500l): ... this new prototype.
11083 (init_registers_ppc64): Remove, replace by ...
11084 (init_registers_powerpc_64l): ... this new prototype.
11085 (init_registers_powerpc_64): Remove, replace by ...
11086 (init_registers_powerpc_altivec64l): ... this new prototype.
11087 (ppc_num_regs): Set to 73.
11088 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11089 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11090 (ppc_cannot_store_register): Handle orig_r3 and trap.
11091 (ppc_arch_setup): Update init_registers_... calls.
11092 (ppc_fill_gregset): Handle orig_r3 and trap.
11093
11094 * inferiors.c (clear_inferiors): Reset current_inferior.
11095
fdc59709
PB
110962008-04-23 Paolo Bonzini <bonzini@gnu.org>
11097
889bf7c5
PA
11098 * acinclude.m4: Add override.m4.
11099 * configure: Regenerate.
fdc59709 11100
c9b2f845
UW
111012008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11102
11103 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11104 initial call to init_register_ppc64.
11105
550512b8
UW
111062008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11107
43aaf8b6
PA
11108 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11109 single powerpc*-*-linux* case.
550512b8
UW
11110 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11111
b6430ec3
UW
111122008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11113
11114 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11115 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11116 from reg_xmlfiles.
11117 * linux-ppc-low.c: Include <elf.h>.
11118 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11119 (ppc_hwcap): New global variable.
11120 (ppc_regmap): Remove __SPE__ #ifdef sections.
11121 (ppc_regmap_e500): New global variable.
11122 (ppc_cannot_store_register): Update __SPE__ special case.
11123 (ppc_get_hwcap): New function.
11124 (ppc_arch_setup): Use it to determine whether inferior supports
11125 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11126 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11127 Do not access registers if target does not support AltiVec.
11128 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11129 Do not access registers if target does not support SPE.
11130 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11131
52fa2412
UW
111322008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11133
11134 * linux-low.c (disabled_regsets, num_regsets): New.
11135 (use_regsets_p): Delete.
11136 (linux_wait_for_process): Clear disabled_regsets.
11137 (regsets_fetch_inferior_registers): Check and set it.
11138 (regsets_store_inferior_registers): Likewise.
11139 (linux_fetch_registers, linux_store_registers): Do not use
11140 use_regsets_p.
11141 (initialize_low): Allocate disabled_regsets.
11142
e28b3332
DJ
111432008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11144
11145 * Makefile.in (LIBOBJS): New.
11146 (OBS): Use LIBOBJS.
11147 (memmem.o): New rule.
11148 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11149 * configure: Regenerated.
11150
4536995d
UW
111512008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11152
11153 * server.c (handle_query): Never return "unsupported" for
11154 qXfer:features:read queries.
11155
221c031f
UW
111562008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11157
11158 * server.c (get_features_xml): Fix inverted condition.
11159 (handle_query): Always support qXfer:feature:read.
11160
ccd213ac
DJ
111612008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11162
11163 * server.c (wrapper_argv): New.
11164 (start_inferior): Handle wrapper_argv. If set, expect an extra
11165 trap.
11166 (gdbserver_usage): Document --wrapper.
11167 (main): Parse --wrapper.
11168
6fe305f7
UW
111692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11170
11171 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11172 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11173 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11174 (ppc_set_pc): Likewise.
11175 (ppc_arch_setup): New function.
11176 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11177 of collect_register.
889bf7c5 11178 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11179
5b0a002e
UW
111802008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11181
11182 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11183 instead of linux-ppc64-low.o.
11184 * linux-ppc64-low.c: Remove file.
11185 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11186 (linux-ppc64-low.o): Remove rule.
11187
11188 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11189 (init_registers_powerpc_64): Likewise.
11190 (ppc_regmap): Conditionally define depending on __powerpc64__.
11191 (ppc_cannot_store_register): Do not special-case "fpscr" when
11192 compiled on __powerpc64__.
11193 (ppc_collect_ptrace_register): New function.
11194 (ppc_supply_ptrace_register): New function.
11195 (ppc_breakpoint): Change type to "unsigned int".
11196 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11197 (the_low_target): Conditionally provide initializers for the
889bf7c5 11198 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11199 collect_ptrace_register and supply_ptrace_register members.
11200
9b4b61c8
UW
112012008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11202
11203 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11204 * server.c (gdbserver_xmltarget): Define.
11205 (get_features_xml): Use it to replace "target.xml" and arch_string.
11206
11207 * configure.srv: Remove srv_xmltarget. Add XML files that were
11208 mentioned there to srv_xmlfiles instead. Remove conditional tests
11209 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11210 srv_xmlfiles and srv_regobj to include all possible choices.
11211 * configure.ac (srv_xmltarget): Remove.
11212 (srv_xmlfiles): Do not add "target.xml".
11213 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11214 checks for supplementary target information.
11215 * configure: Regenerate.
11216 * Makefile.in (XML_TARGET): Remove.
11217 (target.xml): Remove rule.
11218 (clean): Do not clean up target.xml.
11219 (.PRECIOUS): Do not mention target.xml.
11220
11221 * target.h (struct target_ops): Remove arch_string member.
11222 * linux-low.c (linux_arch_string): Remove.
11223 (linux_target_ops): Remove arch_string initializer.
11224 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11225 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11226 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11227 * spu-low.c (spu_arch_string): Remove.
11228 (spu_target_ops): Remove arch_string initializer.
11229 * win32-low.c (win32_arch_string): Remove.
11230 (win32_target_ops): Remove arch_string initializer.
11231 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11232 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11233 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11234
ee1a7ae4
UW
112352008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11236
11237 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11238 by collect_ptrace_register and supply_ptrace_register hooks.
11239 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11240 instead of checking for the_low_target.left_pad_xfer.
11241 (usr_store_inferior_registers): Use collect_ptrace_register callback
11242 instead of checking for the_low_target.left_pad_xfer.
11243
11244 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11245 (s390_supply_ptrace_register): Likewise.
11246 (s390_fill_gregset): Call s390_collect_ptrace_register.
11247 (the_low_target): Update.
11248
11249 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11250 (ppc_supply_ptrace_register): Likewise.
11251 (the_low_target): Update.
11252
11253 * linux-i386-low.c (the_low_target): Update.
11254 * linux-x86-64-low.c (the_low_target): Update.
11255
d61ddec4
UW
112562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11257
11258 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11259 reg-s390.o and reg-s390x.o.
11260
11261 * linux-low.c (new_inferior): New global variable.
11262 (linux_create_inferior, linux_attach): Set it.
11263 (linux_wait_for_process): Call the_low_target.arch_setup after the
11264 target has stopped for the first time.
11265 (initialize_low): Do not call the_low_target.arch_setup.
11266
11267 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11268 (s390_set_pc): Likewise.
11269 (s390_arch_setup): New function.
11270 (the_low_target): Use s390_arch_setup as arch_setup routine.
11271
11272 * regcache.c (realloc_register_cache): New function.
11273 (set_register_cache): Call it for each existing regcache.
11274
d05b4ac3
UW
112752008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11276
11277 * server.h (init_registers): Remove prototype.
11278
11279 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11280 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11281 instead of init_registers ().
11282 * linux-arm-low.c (init_registers_arm): Add prototype.
11283 (init_registers_arm_with_iwmmxt): Likewise.
11284 (the_low_target): Add initializer for arch_setup field.
11285 * linux-cris-low.c (init_registers_cris): Add prototype.
11286 (the_low_target): Add initializer for arch_setup field.
11287 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11288 (the_low_target): Add initializer for arch_setup field.
11289 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11290 (the_low_target): Add initializer for arch_setup field.
11291 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11292 (the_low_target): Add initializer for arch_setup field.
11293 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11294 (the_low_target): Add initializer for arch_setup field.
11295 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11296 (the_low_target): Add initializer for arch_setup field.
11297 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11298 (init_registers_mips64_linux): Likewise.
11299 (the_low_target): Add initializer for arch_setup field.
11300 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11301 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11302 (the_low_target): Add initializer for arch_setup field.
11303 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11304 (init_registers_powerpc_64): Likewise.
11305 (the_low_target): Add initializer for arch_setup field.
11306 * linux-s390-low.c (init_registers_s390): Add prototype.
11307 (init_registers_s390x): Likewise.
11308 (the_low_target): Add initializer for arch_setup field.
11309 * linux-sh-low.c (init_registers_sh): Add prototype.
11310 (the_low_target): Add initializer for arch_setup field.
11311 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11312 (the_low_target): Add initializer for arch_setup field.
11313 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11314 (the_low_target): Add initializer for arch_setup field.
11315
11316 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11317 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11318 instead of init_registers ().
11319 * win32-arm-low.c (init_registers_arm): Add prototype.
11320 (the_low_target): Add initializer for arch_setup field.
11321 * win32-i386-low.c (init_registers_i386): Add prototype.
11322 (the_low_target): Add initializer for arch_setup field.
11323
11324 * spu-low.c (init_registers_spu): Add prototype.
11325 (initialize_low): Call initialie_registers_spu () instead of
11326 initialize_registers ().
11327
fd96d250
PA
113282008-02-19 Pedro Alves <pedro@codesourcery.com>
11329
11330 * server.c (handle_v_requests): When handling the vRun and vAttach
11331 packets, if already debugging a process, don't kill it. Return an
11332 error instead.
11333
d41b6bb4
DJ
113342008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11335
11336 * server.c (handle_query): Correct length check.
11337
5ac588cf
PA
113382008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11339
11340 * win32-low.c (do_initial_child_stuff): Add process handle
11341 parameter. Set current_process_handle and current_process_id from the
11342 parameters. Clear globals.
11343 (win32_create_inferior): Don't set current_process_handle and
11344 current_process_id here. Instead pass them on the call to
11345 do_initial_child_stuff.
11346 (win32_attach): Likewise.
11347 (win32_clear_inferiors): New.
11348 (win32_kill): Don't close the current process handle or the
11349 current thread handle here. Instead call win32_clear_inferiors.
11350 (win32_detach): Don't open a new handle to the process. Call
11351 win32_clear_inferiors.
11352 (win32_join): Don't rely on current_process_handle; open a new
11353 handle using the process id.
11354 (win32_wait): Call win32_clear_inferiors when the inferior process
11355 has exited.
11356
ecd7ecbc
DJ
113572008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11358
11359 * server.c (monitor_show_help): Add "exit".
11360
1525d545
MG
113612008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11362
ecd7ecbc 11363 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11364 (clean): Add reg-xtensa.c.
11365 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11366 * configure.srv (xtensa*-*-linux*) New target.
11367 * linux-xtensa-low.c: New.
11368 * xtensa-xtregs.c: New.
1525d545 11369
59a016f0
PA
113702008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11371
11372 * hostio.c: Don't include errno.h.
11373 (errno_to_fileio_errno): Move to hostio-errno.
11374 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11375 error number outputting to the target->hostio_last_error callback.
11376 (hostio_packet_error): Use FILEIO_EINVAL directly.
11377 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11378 calls to hostio_error.
11379 * hostio-errno.c: New.
11380 * server.h (hostio_last_error_from_errno): Declare.
11381 * target.h (target_ops): Add hostio_last_error member.
11382 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11383 as hostio_last_error handler.
889bf7c5 11384 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11385 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11386 (wince_hostio_last_error): New functions.
11387 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11388 as hostio_last_error handler.
11389 (win32_target_ops) [!_WIN32_WCE]: Register
11390 hostio_last_error_from_errno as hostio_last_error handler.
11391 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11392 (hostio-errno.o): New rule.
11393 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11394 * configure.srv (srv_hostio_err_objs): New variable. Default to
11395 hostio-errno.o.
11396 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11397 * configure: Regenerate.
11398
2d717e4f
DJ
113992008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11400
11401 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11402 (linux_kill, linux_detach): Clean up the process list.
11403 * remote-utils.c (remote_open): Improve port number parsing.
11404 (putpkt_binary, input_interrupt): Only send interrupts if the target
11405 is running.
11406 * server.c (extended_protocol): Make static.
11407 (attached): Define earlier.
11408 (exit_requested, response_needed, program_argv): New variables.
11409 (target_running): New.
11410 (start_inferior): Clear attached here.
11411 (attach_inferior): Set attached here.
11412 (require_running): Define.
11413 (handle_query): Use require_running and target_running. Implement
11414 "monitor exit".
11415 (handle_v_attach, handle_v_run): New.
11416 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11417 (gdbserver_usage): Update.
11418 (main): Redo argument parsing. Handle --debug and --multi. Handle
11419 --attach along with other options or after the port. Save
11420 program_argv. Support no initial program. Resynchronize
11421 communication with GDB after an error. Handle "monitor exit".
11422 Use require_running and target_running. Always allow the extended
11423 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11424 restart in extended mode.
11425 * README: Refer to the GDB manual. Update --attach usage.
11426
7407e2de
AS
114272007-12-20 Andreas Schwab <schwab@suse.de>
11428
11429 * linux-low.c (STACK_SIZE): Define.
11430 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11431 (linux_test_for_tracefork): Likewise.
11432
b65d95c5
DJ
114332007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11434
11435 * linux-low.c (linux_wait_for_event): Update messages. Do not
11436 reinsert auto-delete breakpoints.
11437 * mem-break.c (struct breakpoint): Change return type of handler to
11438 int.
11439 (set_breakpoint_at): Update handler type.
11440 (reinsert_breakpoint_handler): Return 1 instead of calling
11441 delete_breakpoint.
11442 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11443 setting a new one.
11444 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11445 * mem-break.h (set_breakpoint_at): Update handler type.
11446 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11447 * win32-low.c (auto_delete_breakpoint): New.
11448 (get_child_debug_event): Use it.
11449
4e799345
DJ
114502007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11451
11452 * configure.ac: Check for pread and pwrite.
11453 * hostio.c (handle_pread): Fall back to lseek and read.
11454 (handle_pwrite): Fall back to lseek and write.
11455 * config.in, configure: Regenerated.
11456
27524b67
DJ
114572007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11458
11459 * server.c (myresume): Add own_buf argument.
11460 (main): Update calls.
11461
a20d5e98
DJ
114622007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11463
11464 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11465 * remote-utils.c (remote_open): Do not call disable_async_io.
11466 (block_async_io): Delete.
11467 (unblock_async_io): Make static.
11468 (initialize_async_io): New.
11469 * server.c (handle_v_cont): Handle async I/O here.
11470 (myresume): Likewise. Move other common resume tasks here...
11471 (main): ... from here. Call initialize_async_io. Disable async
11472 I/O before the main loop.
11473 * server.h (initialize_async_io): Declare.
11474 (block_async_io, unblock_async_io): Delete prototypes.
11475 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11476
b79d787e
DJ
114772007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11478
11479 * remote-utils.c (readchar): Allow binary data in received messages.
11480
d97903b2
PA
114812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11482
11483 * win32-low.c (attaching): New global.
11484 (win32_create_inferior): Clear the `attaching' global.
11485 (win32_attach): Set the `attaching' global.
11486 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11487 attaching. Only set a breakpoint at the entry point if not
11488 attaching.
11489
311de423
PA
114902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11491
11492 * server.c (main): Don't report dll events on the initial
11493 connection on attaches.
11494
6c2d16d2
PA
114952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11496
11497 * server.c (main): Relax numerical bases supported for the pid of
11498 the --attach command line argument.
11499
5ca906e6
PA
115002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11501
11502 * win32-low.c (win32_attach): Call OpenProcess before
11503 DebugActiveProcess, not after. Add last error output to error
11504 call.
11505
9c6c8194
PA
115062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11507
11508 * win32-low.c (win32_get_thread_context)
11509 (win32_set_thread_context): New functions.
11510 (thread_rec): Use win32_get_thread_context.
11511 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11512 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11513 field.
11514
4d5d1aaa
PA
115152007-12-03 Leo Zayas
11516 Pedro Alves <pedro_alves@portugalmail.pt>
11517
11518 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11519 global variables.
11520 (child_add_thread): Minor cleanup.
11521 (child_continue): Resume artificially suspended threads before
11522 calling ContinueDebugEvent.
11523 (suspend_one_thread): New.
11524 (fake_breakpoint_event): New.
11525 (get_child_debug_event): Change return type to int. Check here if
11526 gdb sent an interrupt request. If a soft interrupt was requested,
11527 fake a breakpoint event. Return 0 if there is no event to handle,
11528 and 1 otherwise.
11529 (win32_wait): Don't check here if gdb sent an interrupt request.
11530 Ensure there is a valid event to handle.
11531 (win32_request_interrupt): Add soft interruption method as last
11532 resort.
11533
c436e841
PA
115342007-12-03 Leo Zayas
11535 Pedro Alves <pedro_alves@portugalmail.pt>
11536
11537 * win32-low.h (win32_thread_info): Add descriptions to the
11538 structure members. Replace `suspend_count' counter by a
11539 `suspended' flag.
11540 * win32-low.c (thread_rec): Update condition of when to get the
11541 context from the inferior. Rely on ContextFlags being set if it
11542 has already been retrieved. Only suspend the inferior thread if
11543 we haven't already. Warn if that fails.
11544 (continue_one_thread): s/suspend_count/suspended/. Only call
11545 ResumeThread once. Warn if that fails.
11546
e7b5fa67
PA
115472007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11548
11549 * win32-low.c (win32_wait): Don't read from the inferior when it
11550 has already exited.
11551
a385171d
PA
115522007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11553
11554 * Makefile.in (win32_low_h): New variable.
11555 (win32-low.o): Add dependency on $(win32_low_h).
11556 (win32-arm-low.o, win32-i386-low.o): New rules.
11557
f80c84b3
DJ
115582007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11559
11560 * hostio.c: Correct copyright year.
11561
a6b151f1
DJ
115622007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11563
11564 * Makefile.in (OBS): Add hostio.o.
11565 (hostio.o): New rule.
11566 * server.h (handle_vFile): Declare.
11567 * hostio.c: New file.
11568 * server.c (handle_v_requests): Take packet_len and new_packet_len
11569 for binary packets. Call handle_vFile.
11570 (main): Update call to handle_v_requests.
11571
f9387fc3
DJ
115722007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11573
11574 * linux-low.c: Include <sched.h>.
11575
51c2684e
DJ
115762007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11577
11578 * linux-low.c (linux_tracefork_grandchild): New.
11579 (linux_tracefork_child): Use clone.
11580 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11581
75f83163
JB
115822007-10-31 Joel Brobecker <brobecker@adacore.com>
11583
11584 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11585
da5898ce
DJ
115862007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11587
11588 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11589
24a09b5f
DJ
115902007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11591
11592 * inferiors.c (change_inferior_id): Delete.
11593 (add_pid_to_list, pull_pid_from_list): New.
11594 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11595 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11596 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11597 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11598 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11599 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11600 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11601 (using_threads): Always set to 1.
11602 (handle_extended_wait): New.
11603 (add_process): Do not set TID.
11604 (linux_create_inferior): Set must_set_ptrace_flags.
11605 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11606 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11607 (linux_thread_alive): Rename TID argument to LWPID.
11608 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11609 (linux_wait_for_event): Do not use TID or check using_threads. Update
11610 call to dead_thread_notify. Call handle_extended_wait.
11611 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11612 (send_sigstop): Delete sigstop_sent.
11613 (wait_for_sigstop): Avoid TID.
11614 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11615 (linux_test_for_tracefork): New.
11616 (linux_lookup_signals): Use thread_db_active and
11617 linux_supports_tracefork_flag.
11618 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11619 * linux-low.h (get_process_thread): Avoid TID.
11620 (struct process_ifo): Move thread_known and tid to the end. Remove
11621 sigstop_sent.
11622 (linux_attach_lwp, thread_db_init): Update prototypes.
11623 * server.h (change_inferior_id): Delete prototype.
11624 (add_pid_to_list, pull_pid_from_list): New prototypes.
11625 * thread-db.c (thread_db_use_events): New.
11626 (find_first_thread): Rename to...
11627 (find_one_thread): ...this. Update callers and messages. Do not
11628 call fatal. Check thread_db_use_events. Do not call
11629 change_inferior_id or new_thread_notify.
11630 (maybe_attach_thread): Update. Do not call new_thread_notify.
11631 (thread_db_init): Set thread_db_use_events. Check use_events.
11632 * utils.c (fatal, warning): Correct message prefix.
11633
30ed0a8f
DJ
116342007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11635
11636 * Makefile.in (clean): Remove new files.
11637 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11638 (powerpc-64.o, powerpc-64.c): New rules.
11639 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11640 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11641 with SPE.
11642 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11643 SPE targets.
11644 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11645 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11646 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11647 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11648 (target_regsets): Add AltiVec and SPE register sets.
11649 * configure.ac: Check for AltiVec and SPE.
11650 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11651 (ppc_fill_vrregset, ppc_store_vrregset): New.
11652 (target_regsets): Add AltiVec register set.
11653 * configure: Regenerated.
11654
fd462a61
DJ
116552007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11656
11657 * linux-low.c (O_LARGEFILE): Define.
11658 (linux_read_memory): Use /proc/PID/mem.
11659 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11660 * configure, config.in: Regenerated.
11661
69f223ed
DJ
116622007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11663
11664 * linux-low.c (linux_wait_for_event): Do not pass signals while
11665 single-stepping.
11666
aec18585
PA
116672007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11668
11669 * win32-low.c (create_process): New.
11670 (win32_create_inferior): Use create_process instead of
11671 CreateProcess. If create_process failed retry appending an ".exe"
11672 suffix. Store the GetLastError result immediatelly after
11673 create_process calls and use it on the call to error.
11674
34d86ddd
PA
116752007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11676
11677 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11678
5a0e3bd0
JB
116792007-08-23 Joel Brobecker <brobecker@adacore.com>
11680
11681 * configure.ac: Switch license to GPLv3.
11682
f88c79e6
MS
116832007-08-01 Michael Snyder <msnyder@access-company.com>
11684
11685 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11686
6b3d9b83
PA
116872007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11688
11689 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11690 typedef.
11691 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11692 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11693 CloseToolhelp32Snapshot.
11694 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11695 CloseToolhelp32Snapshot.
11696
c588c53c
MS
116972007-07-27 Michael Snyder <michael.snyder@access-company.com>
11698
11699 * server.c (main): Check for inferior exit before main loop.
11700
aa0403d9
PA
117012007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11702
11703 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11704 instead of on tmp_desc.
11705
255e7678
DJ
117062007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11707 Daniel Jacobowitz <dan@codesourcery.com>
11708
11709 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11710 (add_thread): Minor cleanups.
11711 (clear_inferiors): Move lower in the file. Clear the DLL
11712 list.
11713 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11714 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11715 (xml_escape_text): New.
11716 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11717 for qSupported.
11718 (handle_v_cont): Report errors.
11719 (gdbserver_version): Update.
11720 (main): Correct size of own_buf. Do not report initial DLL events.
11721 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11722 (unloaded_dll, xml_escape_text): New.
11723 * win32-low.c (enum target_waitkind): Update comments.
11724 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11725 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11726 (win32_EnumProcessModules, win32_GetModuleInformation)
11727 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11728 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11729 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11730 (win32_Module32First, win32_Module32Next, load_toolhelp)
11731 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11732 (get_child_debug_event): Handle DLL events.
11733 (win32_wait): Likewise.
11734
0d37add9
DJ
117352007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11736
11737 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11738 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11739
45e2715e
PA
117402007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11741
11742 * win32-low.c (handle_output_debug_string): Ignore event if not
11743 waiting.
11744
c5674cf1
PA
117452007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11746
11747 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11748
2bbe3cc1
DJ
117492007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11750
11751 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11752
ae13219e
DJ
117532007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11754
11755 * inferiors.c (change_inferior_id): Add comment.
11756 * linux-low.c (check_removed_breakpoint): Add an early
11757 prototype. Improve debug output.
11758 (linux_attach): Doc update.
11759 (linux_detach_one_process, linux_detach): Clean up before releasing
11760 each process.
11761 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11762 * linux-low.h (struct process_info): Doc improvement.
11763 * mem-break.c (delete_all_breakpoints): New.
11764 * mem-break.h (delete_all_breakpoints): New prototype.
11765 * thread-db.c (find_first_thread): New.
11766 (thread_db_create_event): Call it instead of
11767 thread_db_find_new_threads. Clean up unused variables.
11768 (maybe_attach_thread): Remove first thread handling.
11769 (thread_db_find_new_threads): Use find_first_thread.
11770 (thread_db_get_tls_address): Likewise.
11771
4105de34
DJ
117722007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11773
11774 * thread-db.c (thread_db_find_new_threads): Add prototype.
11775 (thread_db_create_event): Check for the main thread before adding
11776 a new thread.
11777 (maybe_attach_thread): Only enable event reporting if TID == 0.
11778 (thread_db_get_tls_address): Check for new threads.
11779
2b876972
DJ
117802007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11781
11782 * linux-low.c (linux_create_inferior): Try execv before execvp.
11783 * spu-low.c (spu_create_inferior): Likewise.
11784
7a245884
DJ
117852007-06-13 Mike Frysinger <vapier@gentoo.org>
11786
11787 * linux-low.c (linux_create_inferior): Change execv to execvp.
11788 * spu-low.c (spu_create_inferior): Likewies.
11789
117ce543
DJ
117902007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11791
11792 * Makefile.in (clean): Clean new files instead of deleted ones.
11793 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11794 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11795 rules.
11796 * configure.srv: Specify XML files and new regformats for MIPS and
11797 MIPS64 GNU/Linux.
11798 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11799 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11800 an entry for the restart register.
11801 (mips_cannot_fetch_register, mips_cannot_store_register)
11802 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11803 register names to match the XML descriptions.
11804 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11805 restart register instead of $0.
11806
0e7f50da
UW
118072007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11808 Markus Deuling <deuling@de.ibm.com>
11809
11810 * remote-utils.c (decode_xfer_write): New function.
11811 * server.h (decode_xfer_write): Add prototype.
11812 * server.c (handle_query): Add PACKET_LEN argument. Support
11813 qXfer:spu:read and qXfer:spu:write packets.
11814 (main): Pass packet_len to handle_query.
11815 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11816 * target.h (target_ops): Add qxfer_spu.
11817
374c1d38
UW
118182007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11819
11820 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11821 accessing non-seekable spufs files.
11822
bb63802a
UW
118232007-05-16 Markus Deuling <deuling@de.ibm.com>
11824
889bf7c5 11825 * server.c (handle_query): Add reply for qC packet.
bb63802a 11826
7390519e
PA
118272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11828 Leo Zayas <lerele@champenstudios@com>
11829
11830 * server.h (check_remote_input_interrupt_request): New function.
11831 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11832 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11833 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11834 (check_remote_input_interrupt_request): New function.
11835 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11836 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11837 winapi_GenerateConsoleCtrlEvent): New typedefs.
11838 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11839 to 250 ms.
11840 (win32_wait): Check for remote interrupt request
11841 with check_remote_input_interrupt_request.
11842 (win32_request_interrupt): New function.
11843 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11844
34b34921
PA
118452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11846
11847 * win32-low.c (debug_registers_changed,
11848 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11849 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11850 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11851 (thread_rec): Get context using the low target.
11852 (child_add_thread): Call thread_added on the low target,
11853 which does the same thing.
11854 (regptr): Delete.
11855 (do_initial_child_stuff): Remove debug registers references.
11856 Set context using the low target. Resume threads after
11857 setting the contexts.
11858 (child_continue): Remove dead variable. Remove debug
11859 registers references.
11860 (child_fetch_inferior_registers): Go through the low target.
11861 (do_child_store_inferior_registers): Remove.
11862 (child_store_inferior_registers): Go through the low target.
11863 (win32_resume): Remove debug registers references.
11864 Set context using the low target.
11865 (handle_exception): Change return type to void. Don't record
11866 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11867 first chance exception.
889bf7c5 11868 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11869 goto loop. Always return after waiting for debug event.
11870 (win32_wait): Convert to switch statement. Handle spurious
11871 events.
11872
11873 * win32-i386-low.c (debug_registers_changed,
11874 debug_registers_used): New.
11875 (initial_stuff): Rename to ...
11876 (i386_initial_stuff): ... this. Clear debug registers
11877 state variables.
11878 (store_debug_registers): Delete.
11879 (i386_get_thread_context): New.
11880 (load_debug_registers): Delete.
11881 (i386_set_thread_context): New.
11882 (i386_thread_added): New.
11883 (single_step): Rename to ...
11884 (i386_single_step): ... this.
11885 (do_fetch_inferior_registers): Rename to ...
11886 (i386_fetch_inferior_register): ... this.
11887 (i386_store_inferior_register): New.
11888 (the_low_target): Adapt to new interface.
11889
11890 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11891 (arm_get_thread_context): New.
11892 (arm_set_thread_context): New.
11893 (regptr): New.
11894 (do_fetch_inferior_registers): Rename to ...
11895 (arm_fetch_inferior_register): ... this.
11896 (arm_store_inferior_register): New.
11897 (arm_wince_breakpoint): Reimplement as unsigned long.
11898 (arm_wince_breakpoint_len): Define.
11899 (the_low_target): Adapt to new interface.
11900
11901 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11902 load_debug_registers. Add get_thread_context, set_thread_context,
11903 thread_added and store_inferior_register. Rename
11904 fetch_inferior_registers to fetch_inferior_register.
11905 (regptr): Remove declaration.
11906
dd6953e1
PA
119072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11908
11909 * linux-low.c (linux_detach): Change return type to int. Return 0.
11910 * spu-low.c (spu_detach): Likewise.
11911
444d6139
PA
119122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11913
11914 * target.h (target_ops): Change return type of detach to int.
11915 Add join.
11916 (join_inferior): New.
11917 * server.c (main): Don't skip detach support on mingw32.
11918 If the inferior doesn't support detaching return error.
11919 Call join_inferior instead of using waitpid.
11920 * linux-low.c (linux_join): New.
11921 (linux_target_op): Add linux_join.
11922 * spu-low.c (spu_join): New.
11923 (spu_target_ops): Add spu_join.
11924 * win32-low.c (win32_detach): Adapt to new interface.
11925 Reopen current_process_handle before detaching. Issue a child
11926 resume before detaching.
11927 (win32_join): New.
11928 (win32_target_op): Add win32_join.
11929
1d5315fe
PA
119302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11931
11932 * win32-low.c (win32-attach): Fix return value.
11933 * target.h (target_ops): Describe ATTACH return values.
11934
bf914831
PA
119352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11936
11937 * win32-low.c (GETPROCADDRESS): Define.
11938 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11939 (winapi_DebugSetProcessKillOnExit): Likewise.
11940 (win32_create_inferior): Force usage of ansi CreateProcessA.
11941 (win32_attach): Use GETPROCADDRESS.
11942 (win32_detach): Likewise.
11943
f72f3e60
PA
119442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11945
11946 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11947
ed50f18f
PA
119482007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11949
11950 * win32-low.c: Commit leftover changes from 2007-03-29.
11951
0c2ead7e
DJ
119522007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11953
11954 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11955 fields short instead of int. Add explicit padding.
11956 (i387_cache_to_fsave): Remove unnecessary casts.
11957 (i387_fsave_to_cache): Doc fix.
11958 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11959
73725ff3
DJ
119602007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11961
11962 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11963 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11964
d99f33d8
PA
119652007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11966
11967 * configure.srv (arm*-*-mingw32ce*): Move near the other
11968 arm targets.
11969
68070c10
PA
119702007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11971
2482afc6 11972 * configure.ac: Add errno checking.
68070c10
PA
11973 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11974 sys/file.h and malloc.h.
11975 (AC_CHECK_DECLS): Add perror.
11976 (srv_mingwce): Handle.
2482afc6 11977 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11978 win32-i386-low.o to srv_tgtobj.
11979 (i[34567]86-*-mingw*): Likewise.
11980 (arm*-*-mingw32ce*): Add case.
11981 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11982 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11983 [__MINGW32CE__] (strerror): New function.
11984 [__MINGW32CE__] (errno): Define to GetLastError.
11985 [__MINGW32CE__] (COUNTOF): New macro.
11986 (remote_open): Remove extra close call.
11987 * mem-break.c (delete_breakpoint_at): New function.
11988 * mem-break.h (delete_breakpoint_at): Declare.
11989 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11990 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11991 [USE_WIN32API] (read, write): Add char* casts.
11992 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11993 * server.h: Include wincecompat.h on Windows CE.
11994 [HAVE_ERRNO_H]: Check.
11995 (perror): Declare if not declared.
11996 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11997 (perror_with_name): Remove errno declaration.
11998 * wincecompat.h: New.
11999 * wincecompat.c: New.
12000 * win32-low.h: New.
12001 * win32-arm-low.c: New.
12002 * win32-i386-low.c: New.
12003 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12004 (OUTMSG2): Make it safe.
12005 (_T): New macro.
12006 (COUNTOF): New macro.
12007 (NUM_REGS): Get it from the low target.
12008 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12009 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12010 (thread_rec): Let low target handle debug registers.
12011 (child_add_thread): Likewise.
12012 (child_init_thread_list): Likewise.
12013 (continue_one_thread): Likewise.
12014 (regptr): New.
12015 (do_child_fetch_inferior_registers): Move to ...
12016 * win32-i386-low.c: ... here, and rename to ...
12017 (do_fetch_inferior_registers): ... this.
889bf7c5 12018 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12019 Go through the low target.
12020 (do_child_store_inferior_registers): Use regptr.
12021 (strwinerror): New function.
12022 (win32_create_inferior): Handle Windows CE.
12023 Use strwinerror instead of strerror on Windows error
12024 codes. Add program to the error output.
12025 Don't close the main thread handle on Windows CE.
12026 (win32_attach): Use coredll.dll on Windows CE.
12027 (win32_kill): Close current process and current
12028 thread handles.
12029 (win32_detach): Use coredll.dll on Windows CE.
12030 (win32_resume): Let low target handle debug registers, and
12031 step request.
12032 (handle_exception): Add/Remove initial breakpoint. Avoid
12033 non-existant WSTOPSIG on Windows CE.
12034 (win32_read_inferior_memory): Cast to remove warning.
12035 (win32_arch_string): Go through the low target.
12036 (initialize_low): Call set_breakpoint_data with the low
12037 target's breakpoint.
12038 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12039 FOP_REGNUM, mappings): Move to ...
12040 * win32-i386-low.c: ... here.
12041 * win32-low.c (win32_thread_info): Move to ...
12042 * win32-low.h: ... here.
12043 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12044 win32-arm-low.c and wincecompat.c.
12045 (all:): Add $EXEEXT.
12046 (install-only:): Likewise.
12047 (gdbserver:): Likewise.
12048 (gdbreplay:): Likewise.
12049 * config.in: Regenerate.
12050 * configure: Regenerate.
12051
41093d81
PA
120522007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12053
12054 * win32-low.c: Rename typedef thread_info to
12055 win32_thread_info throughout.
12056
544afa54
PA
120572007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12058
12059 * win32-i386-low.c: Rename to ...
12060 * win32-low.c: ... this.
12061 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12062 * Makefile.in: Likewise.
12063
bce7165d
PA
120642007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12065
12066 * remote-utils.c (monitor_output): Constify msg parameter.
12067 * server.h (monitor_output): Likewise.
12068 * win32-i386-low.c (handle_output_debug_string): New.
12069 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12070 handle_output_debug_string.
12071 (get_child_debug_event): Likewise.
12072
506c7aa0
DJ
120732007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12074
12075 * server.c (main): Correct strtoul check.
12076
42c81e2a
DJ
120772007-03-27 Jon Ringle <jon@ringle.org>
12078
12079 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12080
9453113a
DJ
120812007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12082
12083 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12084
64a69107
DJ
120852007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12086
12087 * terminal.h: Check HAVE_SGTTY_H.
12088
120892007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12090
12091 * remote-utils.c (remote_open): Print out the assigned port number.
12092
c74d0ad8
DJ
120932007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12094
12095 * remote-utils.c (monitor_output): New function.
12096 * server.c (debug_threads): Define here.
12097 (monitor_show_help): New function.
12098 (handle_query): Handle qRcmd.
12099 (main): Do not handle 'd' packet.
12100 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12101 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12102 of debug_threads.
12103
de7c3b4a
PA
121042007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12105
12106 * Makefile.in (EXEEXT): New.
12107 (clean): Use $(EXEEXT).
12108
ef57601b
PA
121092007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12110
12111 * target.h (target_ops): Rename send_signal to request_interrupt,
12112 and remove enum target_signal parameter.
12113 * linux-low.c (linux_request_interrupt): Rename from
12114 linux_send_signal, and always send SIGINT.
12115 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12116 and always send SIGINT.
12117 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12118 of send_signal.
12119 (input_interrupt): Likewise.
12120
820f2bda
PA
121212007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12122
12123 * server.c (get_features_xml): Check if target implemented
12124 arch_string.
12125 * win32-i386-low.c (win32_arch_string): New.
12126 (win32_target_ops): Add win32_arch_string as arch_string member.
12127
ab39bf24
UW
121282007-02-22 Markus Deuling <deuling@de.ibm.com>
12129
12130 * spu-low.c (spu_arch_string): New.
12131 (spu_target_ops): Add spu_arch_string.
12132
61ff6e04
DJ
121332007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12134
12135 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12136 * configure.ac: Do not check for terminal.h.
12137 * configure, config.in: Regenerated.
12138
fb1e4ffc
DJ
121392007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12140
12141 * Makefile.in (OBS): Add $(XML_BUILTIN).
12142 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12143 (clean): Update.
12144 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12145 (arm-with-iwmmxt.c): New.
12146 * config.in, configure: Regenerate.
12147 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12148 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12149 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12150 (arm*-*-linux*): Add iWMMXt and regset support.
12151 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12152 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12153 (arm_store_wmmxregset, target_regsets): New.
12154 * server.c (get_features_xml): Take annex argument. Check builtin
12155 XML documents.
12156 (handle_query): Handle multiple annexes.
12157
0f48aa01
DJ
121582007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12159
12160 * remote-utils.c [USE_WIN32API] (read, write): Define.
12161 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12162 write.
12163
23181151
DJ
121642007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12165
12166 * linux-i386-low.c (the_low_target): Set arch_string.
12167 * linux-x86-64-low.c (the_low_target): Likewise.
12168 * linux-low.c (linux_arch_string): New.
12169 (linux_target_ops): Add it.
12170 * linux-low.h (struct linux_target_ops): Add arch_string.
12171 * server.c (write_qxfer_response): Use const void * for DATA.
12172 (get_features_xml): New.
12173 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12174 * target.h (struct target_ops): Add arch_string method.
12175
9d606399
DJ
121762007-01-03 Denis Pilat <denis.pilat@st.com>
12177 Daniel Jacobowitz <dan@codesourcery.com>
12178
12179 * linux-low.c (linux_kill): Handle being called with no threads.
12180 * win32-i386-low.c (win32_kill): Likewise.
12181 (get_child_debug_event): Clear current_process_handle.
12182
121832006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12184 Daniel Jacobowitz <dan@codesourcery.com>
12185
12186 * remote-utils.c (remote_open): Check the type of specified
12187 serial port devices before opening them.
12188 * server.c (main): Kill the inferior if an error occurs during
12189 the first remote_open.
12190
a5e13d24
DJ
121912006-12-05 Markus Deuling <deuling@de.ibm.com>
12192
12193 * README: Update supported targets.
12194
186947f7
DJ
121952006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12196
12197 * Makefile.in (clean): Remove reg-mips64.c.
12198 (reg-mips64.c, reg-mips64.o): New rules.
12199 * configure.srv: Handle mips64. Include regset support for mips.
12200 * linux-mips-low.c (union mips_register): New.
12201 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12202 (mips_breakpoint, mips_breakpoint_at): Use int.
12203 (mips_collect_register, mips_supply_register)
12204 (mips_collect_register_32bit, mips_supply_register_32bit)
12205 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12206 (mips_store_fpregset, target_regsets): New.
12207 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12208
a13e2c95
UW
122092006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12210
12211 * configure.srv: Add target "spu*-*-*".
12212 * Makefile.in (clean): Remove reg-spu.c.
12213 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12214 * spu-low.c: New file.
12215
cb7283db
DJ
122162006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12217
12218 * configure.ac: Correct td_thr_tls_get_addr test.
12219 * configure: Regenerated.
12220
89be2091
DJ
122212006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12222
12223 * linux-low.c (linux_wait_for_event): Reformat. Use the
12224 pass_signals array.
12225 * remote-utils.c (decode_address_to_semicolon): New.
12226 * server.c (pass_signals, handle_general_set): New.
12227 (handle_query): Mention QPassSignals for qSupported.
12228 (main): Call handle_general_set.
12229 * server.h (pass_signals, decode_address_to_semicolon): New.
12230
000ef4f0
DJ
122312006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12232
12233 * server.c (handle_query): Correct error handling for read_auxv.
12234
b7149293
UW
122352005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12236
12237 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12238 and srv_linux_thread_db to yes.
12239 * linux-s390-low.c (s390_fill_gregset): New function.
12240 (target_regsets): Define data structure.
12241
dae5f5cf
DJ
122422006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12243
12244 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12245 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12246 * config.in, configure: Regenerated.
12247 * inferiors.c (gdb_id_to_thread): New function.
12248 (gdb_id_to_thread_id): Use it.
12249 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12250 * linux-low.h (struct process_info): Add th member.
12251 (thread_db_get_tls_address): New prototype.
12252 * remote-utils.c (decode_address): Make non-static.
12253 * server.c (handle_query): Handle qGetTLSAddr.
12254 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12255 * target.h (struct target_ops): Add get_tls_address.
12256 * thread-db.c (maybe_attach_thread): Save the thread handle.
12257 (thread_db_get_tls_address): New.
12258
32ca6d61
DJ
122592006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12260
12261 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12262 (linux_resume_one_process): Take a siginfo_t *. Update all
12263 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12264 (struct pending_signals): Add a siginfo_t.
12265 (linux_wait_for_process): Always set last_status.
12266 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12267 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12268 * linux-low.h (struct process_info): Add last_status.
12269
5ffff7c1
DJ
122702006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12271
12272 * remote-utils.c (try_rle): New function.
12273 (putpkt_binary): Use it.
12274
8695c747
DJ
122752006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12276
12277 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12278 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12279 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12280 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12281 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12282 point registers.
12283
290fadea
RS
122842006-08-08 Richard Sandiford <richard@codesourcery.com>
12285
12286 * server.c (terminal_fd): New variable.
12287 (old_foreground_pgrp): Likewise.
12288 (restore_old_foreground_pgrp): New function.
12289 (start_inferior): Record the terminal file descriptor in terminal_fd
12290 and its original foreground group in old_foreground_pgrp. Register
12291 restore_old_foreground_pgrp with atexit().
12292
9f2e1e63
DJ
122932006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12294
12295 * server.c (handle_query): Correct qPart to qXfer.
12296
b80864fb
DJ
122972006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12298
12299 * configure.ac: Check for more headers which are missing on
12300 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12301 * configure.srv: Add Cygwin and mingw32.
12302 * remote-utils.c: Don't include headers unconditionally which
12303 are missing on mingw32. Include <winsock.h> for mingw32.
12304 (remote_open): Adjust for mingw32 support. Flush
12305 standard error after writing to it.
12306 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12307 (unblock_async_io, enable_async_io, disable_async_io)
12308 (readchar, getpkt): Update for Winsock support.
12309 (prepare_resume_reply): Expect a protocol signal number.
12310 * server.c: Disable <sys/wait.h> on mingw32.
12311 (start_inferior): Adjust for mingw32 support. Flush
12312 standard error after writing to it.
12313 (attach_inferior): Likewise. Use protocol signal
12314 numbers.
12315 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12316 and names.
12317 * win32-i386-low.c: New file.
12318 * Makefile.in (XM_CLIBS): Set.
12319 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12320 (win32-i386-low.o): New dependency rule.
12321 * linux-low.c (linux_wait): Use target signal numbers.
12322 * target.h (struct target_ops): Doc fix.
12323 * server.h (target_signal_to_name): New prototype.
12324 * gdbreplay.c: Don't include headers unconditionally which
12325 are missing on mingw32. Include <winsock.h> for mingw32.
12326 (remote_close, remote_open): Adjust for Winsock support.
12327 * configure, config.in: Regenerated.
12328
0876f84a
DJ
123292006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12330
12331 * server.c (decode_xfer_read, write_qxfer_response): New.
12332 (handle_query): Take a packet length argument. Handle
12333 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12334 the qSupported response.
12335 (main): Update call to handle_query.
12336
01f9e8fa
DJ
123372006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12338
12339 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12340 (putpkt_binary): Renamed from putpkt and adjusted for binary
12341 data.
12342 (putpkt): New wrapper for putpkt_binary.
12343 (readchar): Don't mask off the high bit.
12344 (decode_X_packet): New function.
12345 * server.c (main): Call putpkt_binary if a handler sets the packet
12346 length. Save the length of the incoming packet. Handle 'X'.
12347 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12348
be2a5f71
DJ
123492006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12350
12351 * server.c (handle_query): Handle qSupported.
12352
ea025f5f
DJ
123532006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12354
12355 * remote-utils.c (all_symbols_looked_up): New variable.
12356 (look_up_one_symbol): Check it.
12357 * server.h (look_up_one_symbol): New declaration.
12358 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12359
9308fc88
DJ
123602006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12361
12362 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12363 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12364 (PTRACE_GET_THREAD_AREA): Define.
12365 (ps_get_thread_area): New function.
12366
52fb6437
NS
123672006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12368
12369 * configure.srv (m68k*-*-uclinux*): New target.
12370 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12371 (linux_resume_one_process): Remove extraneous cast.
12372 (linux_read_offsets): New.
12373 (linux_target_op): Add linux_read_offsets on mmuless systems.
12374 * server.c (handle_query): Add qOffsets logic.
12375 * target.h (struct target_ops): Add read_offsets.
12376
21b0f40c
DJ
123772006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12378
12379 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12380 (PTRACE_GET_THREAD_AREA): Define.
12381 (ps_get_thread_area): New function.
12382 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12383 (linux-x86-64-low.o): Update.
12384
0050a760
DJ
123852006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12386
12387 * configure.ac: Remove checks for prfpregset_t.
12388 * gdb_proc_service.h: New file.
12389 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12390 new "gdb_proc_service.h".
12391 * proc-service.c: Likewise.
12392 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12393 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12394 * Makefile.in (gdb_proc_service_h): Updated.
12395 * configure, config.in: Regenerated.
12396
b92a518e
DJ
123972006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12398
12399 * remote-utils.c (prepare_resume_reply): Move declaration
12400 of gdb_id_from_wait to the top of the block.
12401
545587ee
DJ
124022006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12403
12404 * linux-low.c (regsets_store_inferior_registers): Read the regset
12405 from the target before filling it.
12406
9db87ebd
DJ
124072006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12408
12409 * server.c (attach_inferior): Return SIGTRAP for a successful
12410 attach.
12411
dd24457d
DJ
124122006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12413
12414 * Makefile.in (OBS): Add version.o.
12415 (STAGESTUFF): Delete.
12416 (version.o): Add dependencies.
12417 (version.c): Replace rule.
12418 (clean): Remove version.c.
12419 * server.c (gdbserver_version): New.
12420 (gdbserver_usage): Use printf.
12421 (main): Handle --version and --help.
12422 * server.h (version, host_name): Add declarations.
12423
6f0f660e
EZ
124242005-12-23 Eli Zaretskii <eliz@gnu.org>
12425
889bf7c5
PA
12426 * linux-arm-low.c:
12427 * linux-arm-low.c:
12428 * inferiors.c:
12429 * i387-fp.h:
12430 * i387-fp.c:
12431 * gdbreplay.c:
12432 * regcache.c:
12433 * proc-service.c:
12434 * mem-break.h:
12435 * mem-break.c:
12436 * linux-x86-64-low.c:
12437 * linux-sh-low.c:
12438 * linux-s390-low.c:
12439 * linux-ppc64-low.c:
12440 * linux-ppc-low.c:
12441 * linux-mips-low.c:
12442 * linux-m68k-low.c:
12443 * linux-m32r-low.c:
12444 * linux-low.h:
12445 * linux-low.c:
12446 * linux-ia64-low.c:
12447 * linux-i386-low.c:
12448 * linux-crisv32-low.c:
12449 * thread-db.c:
12450 * terminal.h:
12451 * target.h:
12452 * target.c:
12453 * server.h:
12454 * server.c:
12455 * remote-utils.c:
12456 * regcache.h:
12457 * utils.c:
12458 * Makefile.in:
12459 * configure.ac:
6f0f660e
EZ
12460 * gdbserver.1: Add (C) after Copyright. Update the FSF
12461 address.
12462
9d1fb177
DJ
124632005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12464
12465 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12466 (arm_breakpoint_at): Recognize both breakpoints.
12467 (the_low_target): Use the correct breakpoint instruction.
12468
011a70c2
DJ
124692005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12470
12471 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12472 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12473 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12474 (the_low_target): Update.
12475
7fb85e41
AS
124762005-10-25 Andreas Schwab <schwab@suse.de>
12477
12478 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12479
12480 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12481 (ia64_num_regs): Reduce to 462.
12482
3db0444b
DJ
124832005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12484
12485 * acinclude.m4: Correct quoting.
12486 * aclocal.m4: Regenerated.
12487
12488 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12489 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12490 (thread_db_init): Call thread_db_err_str.
12491 * configure.ac: Check for TD_VERSION.
12492 * config.in, configure: Regenerated.
12493
bee0189a
DJ
124942005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12495
12496 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12497
e9d25b98
DJ
124982005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12499
12500 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12501 is not available. Define HAVE_PTRACE_GETREGS if it is.
12502 * config.in, configure: Regenerated.
12503 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12504 * linux-i386-low.c, linux-m68k-low.c: Update to use
12505 HAVE_PTRACE_GETREGS.
12506 * linux-low.c (regsets_fetch_inferior_registers)
12507 (regsets_store_inferior_registers): Only return 0 if we processed
12508 GENERAL_REGS.
12509 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12510 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12511
a06660f7
DJ
125122005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12513
12514 * inferiors.c (struct thread_info): Add gdb_id.
12515 (add_thread): Add gdb_id argument.
12516 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12517 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12518 calls to add_thread.
12519 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12520 * server.c (handle_query): Use thread_to_gdb_id.
12521 (handle_v_cont, main): Use gdb_id_to_thread_id.
12522 * server.h (add_thread): Update prototype.
12523 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12524 prototypes.
12525
5a1f5858
DJ
125262005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12527
12528 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12529 left-padded registers.
12530 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12531 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12532
e122f1f5
SE
125332005-07-01 Steve Ellcey <sje@cup.hp.com>
12534
12535 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12536 * configure: Regenerate.
12537 * config.in: Regenerate.
12538 * server.h (NEED_DECLARATION_STRERROR):
12539 Replace with !HAVE_DECL_STRERROR.
12540
d592fa2f
DJ
125412005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12542
12543 * linux-low.c (linux_wait, linux_send_signal): Don't test
12544 an unsigned long variable for > 0 if it could be MAX_ULONG.
12545 * server.c (myresume): Likewise.
12546 * target.c (set_desired_inferior): Likewise.
12547
ccbd4912
MK
125482005-06-13 Mark Kettenis <kettenis@gnu.org>
12549
12550 * configure.ac: Simplify and improve check for socklen_t.
12551 * configure, config.in: Regenerate.
12552
f450004a
DJ
125532005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12554
12555 * acconfig.h: Remove.
12556 * configure.ac: Add a test for socklen_t. Use three-argument
12557 AC_DEFINE throughout.
12558 * config.in: Regenerated using autoheader 2.59.
12559 * configure: Regenerated.
12560
12561 * gdbreplay.c (socklen_t): Provide a default.
12562 (remote_open): Use socklen_t.
12563 * remote-utils.c (socklen_t): Provide a default.
12564 (remote_open): Use socklen_t.
12565 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12566 unsigned char.
12567
12568 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12569 char for buffers.
12570 * linux-low.c (linux_read_memory, linux_write_memory)
12571 (linux_read_auxv): Likewise.
12572 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12573 (check_mem_write): Likewise.
12574 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12575 Likewise.
12576 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12577 (registers_from_string, register_data): Likewise.
12578 * server.c (handle_query, main): Likewise.
12579 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12580 (decode_M_packet): Likewise.
12581 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12582 * target.h (struct target_ops): Update read_memory, write_memory,
12583 and read_auxv.
12584 (read_inferior_memory, write_inferior_memory): Update.
12585 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12586 to unsigned char *.
12587 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12588 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12589 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12590 linux-s390-low.c, linux-sh-low.c: Update for changes in
12591 read_inferior_memory and the_low_target->breakpoint.
12592
eee84df1
DJ
125932005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12594
12595 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12596 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12597 * configure.srv: Add powerpc64-*-linux*.
12598 * linux-ppc64-low.c: New file.
12599
45b134e5
OF
126002005-05-23 Orjan Friberg <orjanf@axis.com>
12601
12602 * linux-cris-low.c: New file with support for CRIS.
12603 * linux-crisv32-low.c: Ditto for CRISv32.
12604 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12605 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12606 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12607 reg-crisv32.o, and reg-crisv32.c to make rules.
12608 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12609 recognized targets.
12610
48d93c75
UW
126112005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12612
12613 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12614 of sizeof (PTRACE_XFER_TYPE).
12615 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12616
e013ee27
OF
126172005-05-12 Orjan Friberg <orjanf@axis.com>
12618
889bf7c5 12619 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12620 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12621 pointers for hardware watchpoint support.
12622 * linux-low.h (struct linux_target_ops): Ditto.
12623 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12624 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12625 to linux_target_ops.
12626 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12627 reply packet.
12628 * server.c (main): Recognize 'Z' and 'z' packets.
12629
b0ded00b
UW
126302005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12631
12632 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12633 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12634 (the_low_target): Add new members.
12635
8643e2ad
DJ
126362005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12637
12638 * proc-service.c (ps_lgetregs): Search all_processes instead of
12639 all_threads.
12640
fc620387
DJ
126412005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12642
12643 * server.c (start_inferior): Change return type to int.
12644 (attach_inferior): Change sigptr to int *.
12645 (handle_v_cont, handle_v_requests): Change signal to int *.
12646 (main): Change signal to int.
12647
126482005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12649
12650 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12651 * configure.srv: Add m32r*-*-linux*.
12652 * linux-m32r-low.c: New file.
12653
e0e76420
DJ
126542005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12655
12656 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12657
a1928bad
DJ
126582005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12659
12660 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12661 Take unsigned long arguments for PIDs.
12662 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12663 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12664 (wait_for_sigstop, linux_resume_one_process)
12665 (regsets_fetch_inferior_registers, linux_send_signal)
12666 (linux_read_auxv): Likewise. Update the types of variables holding
12667 PIDs. Update format string specifiers.
12668 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12669 * remote-utils.c (prepare_resume_reply): Likewise.
12670 * server.c (cont_thread, general_thread, step_thread)
12671 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12672 unsigned long.
12673 (handle_query): Update format specifiers.
12674 (handle_v_cont, main): Use strtoul for thread IDs.
12675 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12676 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12677 (general_thread, step_thread, thread_from_wait)
12678 (old_thread_from_wait): Update.
12679 * target.h (struct thread_resume): Use unsigned long for THREAD.
12680 (struct target_ops): Use unsigned long for arguments to attach and
12681 thread_alive.
12682
dcdb98d2
DJ
126832005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12684
12685 * acinclude.m4: Include bfd/bfd.m4 directly.
12686 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12687 <agriffis@toolchain.org>.
12688 * aclocal.m4, configure: Regenerated.
12689
bec39cab
AC
126902005-01-07 Andrew Cagney <cagney@gnu.org>
12691
12692 * configure.ac: Rename configure.in, require autoconf 2.59.
12693 * configure: Re-generate.
12694
434c4c77
DJ
126952004-12-08 Daniel Jacobowitz <dan@debian.org>
12696
12697 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12698 LIBS when finished.
12699 * aclocal.m4: Regenerated.
12700 * configure: Regenerated.
12701
db1d3e1b
AS
127022004-11-21 Andreas Schwab <schwab@suse.de>
12703
12704 * linux-m68k-low.c (m68k_num_gregs): Define.
12705 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12706 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12707 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12708 (m68k_breakpoint_at): New. Add to the_low_target.
12709
12710 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12711 srv_linux_thread_db to yes.
12712
43360365
JB
127132004-10-20 Joel Brobecker <brobecker@gnat.com>
12714
12715 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12716 (ARCH_SET_FS): Likewise.
12717 (ARCH_GET_FS): Likewise.
12718 (ARCH_GET_GS): Likewise.
12719
fd500816
DJ
127202004-10-16 Daniel Jacobowitz <dan@debian.org>
12721
12722 * linux-i386-low.c (ps_get_thread_area): New.
12723 * linux-x86-64-low.c (ps_get_thread_area): New.
12724 * linux-low.c: Include <sys/syscall.h>.
12725 (linux_kill_one_process): Don't kill the first thread here.
12726 (linux_kill): Kill the first thread here.
12727 (kill_lwp): New function.
12728 (send_sigstop, linux_send_signal): Use it.
12729 * proc-service.c: Clean up #ifdefs.
12730 (fpregset_info): Delete.
12731 (ps_lgetregs): Update and enable implementation.
12732 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12733 implementations.
12734 * remote-utils.c (struct sym_cache, symbol_cache): New.
12735 (input_interrupt): Print a clearer message.
12736 (async_io_enabled): New variable.
12737 (enable_async_io, disable_async_io): Use it. Update comments.
12738 (look_up_one_symbol): Use the symbol cache.
12739 * thread-db.c (thread_db_look_up_symbols): New function.
12740 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12741
f6de3c42
DJ
127422004-10-16 Daniel Jacobowitz <dan@debian.org>
12743
12744 * configure.in: Test for -rdynamic.
12745 * configure: Regenerated.
12746 * Makefile (INTERNAL_LDFLAGS): New.
12747 (gdbserver, gdbreplay): Use it.
12748
2c0fc042
AC
127492004-09-02 Andrew Cagney <cagney@gnu.org>
12750
12751 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12752
075b3282
DJ
127532004-03-23 Daniel Jacobowitz <drow@mvista.com>
12754
12755 * linux-low.c (linux_wait): Clear all_processes list also.
12756
fa6a77dc
DJ
127572004-03-12 Daniel Jacobowitz <drow@mvista.com>
12758
12759 * linux-low.c: Include <errno.h>. Remove extern declaration of
12760 errno.
12761
6d782a97
DJ
127622004-03-12 Daniel Jacobowitz <drow@mvista.com>
12763
12764 * gdbreplay.c, server.h, utils.c: Update copyright years.
12765
3a7fb99b
DJ
127662004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12767
12768 * server.c (main): Print child status or termination signal from
12769 variable 'signal', not 'sig'.
12770
c3e735a6
DJ
127712004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12772
12773 * linux-low.c (linux_read_memory): Change return type to
12774 int. Check for and return error from ptrace().
12775 * target.c (read_inferior_memory): Change return type to int. Pass
12776 back return status from the_target->read_memory().
12777 * target.h (struct target_ops): Adapt *read_memory() prototype.
12778 Update comment.
12779 (read_inferior_memory): Adapt prototype.
12780 * server.c (main): Return an error packet if
12781 read_inferior_memory() returns an error.
12782
a59d1c82
DJ
127832004-03-04 Daniel Jacobowitz <drow@mvista.com>
12784
12785 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12786 Unify with other clean targets.
12787
dc3f8883
DJ
127882004-02-29 Daniel Jacobowitz <drow@mvista.com>
12789
12790 * server.c (handle_v_cont): Call set_desired_inferior.
12791
89a208da
DJ
127922004-02-29 Daniel Jacobowitz <drow@mvista.com>
12793
12794 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12795
62ea82f5
DJ
127962004-02-29 Daniel Jacobowitz <drow@mvista.com>
12797
12798 * linux-low.c (linux_wait): Unblock async I/O.
12799 (linux_resume): Block and enable async I/O.
12800 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12801 * server.h (block_async_io, unblock_async_io): Add prototypes.
12802
6910d122
DJ
128032004-02-29 Daniel Jacobowitz <drow@mvista.com>
12804
12805 * remote-utils.c (remote_open): Print a status notice after
12806 opening a TCP port.
12807 * server.c (attach_inferior): Print a status notice after
12808 attaching.
12809
128102004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12811
12812 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12813
c89dc5d4
DJ
128142004-02-26 Daniel Jacobowitz <drow@mvista.com>
12815
12816 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12817 error packet.
12818 * server.c, target.h: Update copyright years.
12819
4b8dad4a
RM
128202004-02-25 Roland McGrath <roland@redhat.com>
12821
12822 * target.h (struct target_ops): New member `read_auxv'.
12823 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12824 * linux-low.c (linux_read_auxv): New function.
12825 (linux_target_ops): Initialize `read_auxv' member to that.
12826
d7446758
JB
128272004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12828
12829 Committed by Jim Blandy <jimb@redhat.com>.
12830
12831 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12832 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12833 instead of GPR_SIZE to distiguish s390 and s390x targets.
12834
5544ad89
DJ
128352004-01-31 Daniel Jacobowitz <drow@mvista.com>
12836
12837 * linux-low.c: Update copyright year.
12838 (check_removed_breakpoint): Clear pending_is_breakpoint.
12839 (linux_set_resume_request, linux_queue_one_thread)
12840 (resume_status_pending_p): New functions.
12841 (linux_continue_one_thread): Use process->resume.
12842 (linux_resume): Only resume threads if there are no pending events.
12843 * linux-low.h (struct process_info): Add resume request
12844 pointer.
12845
2a68b70e
DJ
128462004-01-30 Daniel Jacobowitz <drow@mvista.com>
12847
12848 * regcache.c (new_register_cache): Clear the allocated register
12849 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12850
64386c31
DJ
128512003-10-13 Daniel Jacobowitz <drow@mvista.com>
12852
12853 * linux-low.c (linux_resume): Take a struct thread_resume *
12854 argument.
12855 (linux_wait): Update call.
12856 (resume_ptr): New static variable.
12857 (linux_continue_one_thread): Renamed from
12858 linux_continue_one_process. Use resume_ptr.
12859 (linux_resume): Use linux_continue_one_thread.
12860 * server.c (handle_v_cont, handle_v_requests): New functions.
12861 (myresume): New function.
12862 (main): Handle 'v' case.
12863 * target.h (struct thread_resume): New type.
12864 (struct target_ops): Change argument of "resume" to struct
12865 thread_resume *.
12866 (myresume): Delete macro.
12867
c938e9b0
L
128682003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12869
12870 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12871 (uninstall): Support DESTDIR.
12872
7f313d07
BC
12873Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12874
12875 * configure.srv: Add xscale*linux copy of arm*linux entry.
12876
3b2fc2ea
DJ
128772003-07-24 Daniel Jacobowitz <drow@mvista.com>
12878
12879 * linux-arm-low.c (arm_reinsert_addr): New function.
12880 (the_low_target): Add arm_reinsert_addr.
12881
1c0a559e
MK
128822003-07-08 Mark Kettenis <kettenis@gnu.org>
12883
12884 * mem-break.c: Remove whitespace at end of file.
12885
43d5792c
DJ
128862003-06-28 Daniel Jacobowitz <drow@mvista.com>
12887
12888 * configure.in: Check whether we need to prototype strerror.
12889 * server.h: Optionally prototype strerror.
12890 * gdbreplay.c (perror_with_name): Use strerror.
12891 * linux-low.c (linux_attach_lwp): Use strerror.
12892 * utils.c (perror_with_name): Use strerror.
12893 * config.in, configure: Regenerated.
12894
c8a86edf
DJ
128952003-06-28 Daniel Jacobowitz <drow@mvista.com>
12896
12897 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12898 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12899
73d37363
DJ
129002003-06-20 Daniel Jacobowitz <drow@mvista.com>
12901
12902 * Makefile.in (SFILES): Update.
12903 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12904 low-sun3.c: Remove files.
12905
6ad8ae5c
DJ
129062003-06-17 Daniel Jacobowitz <drow@mvista.com>
12907
12908 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12909 (linux_detach_one_process, linux_detach): New functions.
12910 (linux_target_ops): Add linux_detach.
12911 * server.c (main): Handle 'D' packet.
12912 * target.h (struct target_ops): Add "detach" member.
12913 (detach_inferior): Define.
12914
1581182a
MK
129152003-06-13 Mark Kettenis <kettenis@gnu.org>
12916
12917 From Kelley Cook <kelleycook@wideopenwest.com>:
12918 * configure.srv: Accept i[34567]86 variants.
12919
e5379b03
DJ
129202003-06-05 Daniel Jacobowitz <drow@mvista.com>
12921
12922 * linux-low.c (linux_wait_for_event): Correct comment typos.
12923 (linux_resume_one_process): Call check_removed_breakpoint.
12924 (linux_send_signal): New function.
12925 (linux_target_ops): Add linux_send_signal.
12926 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12927 of kill.
12928 * target.h (struct target_ops): Add send_signal.
12929
2ff29de4
JB
129302003-05-29 Jim Blandy <jimb@redhat.com>
12931
12932 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12933 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12934 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12935 away part of the register's value.
12936
254787d4
DJ
129372003-03-26 Daniel Jacobowitz <drow@mvista.com>
12938
12939 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12940 (linux_wait_for_event, linux_init_signals): Likewise.
12941
94e10508
DJ
129422003-03-17 Daniel Jacobowitz <drow@mvista.com>
12943
12944 * configure.in: Check for stdlib.h.
12945 * configure: Regenerated.
12946 * config.in: Regenerated.
12947
4c0711e0
DJ
129482003-01-04 Andreas Schwab <schwab@suse.de>
12949
12950 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12951
ef66e766
AC
129522003-01-02 Andrew Cagney <ac131313@redhat.com>
12953
12954 * Makefile.in: Remove obsolete code.
12955
a1358604
DJ
129562002-11-20 Daniel Jacobowitz <drow@mvista.com>
12957
12958 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12959 defined(PT_FPR0_HI).
12960
23ce3b1c
DJ
129612002-11-17 Stuart Hughes <seh@zee2.com>
12962
12963 * linux-arm-low.c (arm_num_regs): Increase.
12964 (arm_regmap): Include status register.
12965
129662002-11-17 Daniel Jacobowitz <drow@mvista.com>
12967
12968 * linux-low.c (register_addr): Remove incorrect -1 check.
12969
a9fa9f7d
DJ
129702002-08-29 Daniel Jacobowitz <drow@mvista.com>
12971
12972 * linux-low.c (linux_create_inferior): Call setpgid. Return
12973 the new PID.
12974 (unstopped_p, linux_signal_pid): Remove.
12975 (linux_target_ops): Remove linux_signal_pid.
12976 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12977 global instead of target method.
12978 * target.h (struct target_ops): Remove signal_pid. Update comment
12979 for create_inferior.
12980 * server.c (signal_pid): New variable.
12981 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12982 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12983 (attach_inferior): Set signal_pid.
12984
17574093
DJ
129852002-08-23 Daniel Jacobowitz <drow@mvista.com>
12986
12987 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12988
129892002-08-20 Jim Blandy <jimb@redhat.com>
12990
12991 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12992 default for this.
12993
129942002-08-01 Andrew Cagney <cagney@redhat.com>
12995
12996 * Makefile.in: Make chill references obsolete.
12997
129982002-07-24 Kevin Buettner <kevinb@redhat.com>
12999
13000 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13001 * configure: Regenerate.
13002 * config.in: Regenerate.
13003
130042002-07-09 David O'Brien <obrien@FreeBSD.org>
13005
13006 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13007 (perror_with_name, remote_close, remote_open, expect, play): Static.
13008
130092002-07-04 Michal Ludvig <mludvig@suse.cz>
13010
4b8dad4a 13011 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13012 byte offsets instead of an array of indexes.
13013 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13014
130152002-06-13 Daniel Jacobowitz <drow@mvista.com>
13016
13017 * regcache.c: Add comment.
13018
130192002-06-11 Daniel Jacobowitz <drow@mvista.com>
13020
13021 * thread-db.c: New file.
13022 * proc-service.c: New file.
13023 * acinclude.m4: New file.
13024 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13025 proc-service.o, and thread-db.o.
13026 (linux-low.o): Add USE_THREAD_DB.
13027 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13028 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13029 * aclocal.m4: Regenerated.
13030 * config.in: Regenerated.
13031 * configure: Regenerated.
13032 * configure.in: Check for proc_service.h, sys/procfs.h,
13033 thread_db.h, and linux/elf.h headrs.
13034 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13035 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13036 Check for -lthread_db and thread support.
13037 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13038 PowerPC, and SuperH.
13039 * i387-fp.c: Constify arguments.
13040 * i387-fp.h: Likewise.
13041 * inferiors.c: (struct thread_info): Renamed from
13042 `struct inferior_info'. Remove PID member. Use generic inferior
13043 list header. All uses updated.
13044 (inferiors, signal_pid): Removed.
13045 (all_threads): New variable.
13046 (get_thread): Define.
13047 (add_inferior_to_list): New function.
13048 (for_each_inferior): New function.
13049 (change_inferior_id): New function.
13050 (add_inferior): Removed.
13051 (remove_inferior): New function.
13052 (add_thread): New function.
13053 (free_one_thread): New function.
13054 (remove_thread): New function.
13055 (clear_inferiors): Use for_each_inferior and free_one_thread.
13056 (find_inferior): New function.
13057 (find_inferior_id): New function.
13058 (inferior_target_data): Update argument type.
13059 (set_inferior_target_data): Likewise.
13060 (inferior_regcache_data): Likewise.
13061 (set_inferior_regcache_data): Likewise.
13062 * linux-low.c (linux_bp_reinsert): Remove.
13063 (all_processes, stopping_threads, using_thrads)
13064 (struct pending_signals, debug_threads, pid_of): New.
13065 (inferior_pid): Replace with macro.
13066 (struct inferior_linux_data): Remove.
13067 (get_stop_pc, add_process): New functions.
13068 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13069 Use add_process and add_thread.
13070 (linux_attach_lwp): New function, based on old linux_attach. Use
13071 add_process and add_thread. Set stop_expected for new threads.
13072 (linux_attach): New function.
13073 (linux_kill_one_process): New function.
13074 (linux_kill): Kill all LWPs.
13075 (linux_thread_alive): Use find_inferior_id.
13076 (check_removed_breakpoints, status_pending_p): New functions.
13077 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13078 Update. Use WNOHANG. Wait for cloned processes also. Update process
13079 struct for the found process.
13080 (linux_wait_for_event): New function.
13081 (linux_wait): Use it. Support LWPs.
13082 (send_sigstop, wait_for_sigstop, stop_all_processes)
13083 (linux_resume_one_process, linux_continue_one_process): New functions.
13084 (linux_resume): Support LWPs.
13085 (REGISTER_RAW_SIZE): Remove.
13086 (fetch_register): Use register_size instead. Call supply_register.
13087 (usr_store_inferior_registers): Likewise. Call collect_register.
13088 Fix recursive case.
13089 (regsets_fetch_inferior_registers): Improve error message.
13090 (regsets_store_inferior_registers): Add debugging.
13091 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13092 (unstopped_p, linux_signal_pid): New functions.
13093 (linux_target_ops): Add linux_signal_pid.
13094 (linux_init_signals): New function.
13095 (initialize_low): Call it. Initialize using_threads.
13096 * regcache.c (inferior_regcache_data): Add valid
13097 flag.
13098 (get_regcache): Fetch registers lazily. Add fetch argument
13099 and update all callers.
13100 (regcache_invalidate_one, regcache_invalidate): New
13101 functions.
13102 (new_register_cache): Renamed from create_register_cache.
13103 Return the new regcache.
13104 (free_register_cache): Change argument to a void *.
13105 (registers_to_string, registers_from_string): Call get_regcache
13106 with fetch flag set.
13107 (register_data): Make static. Pass fetch flag to get_regcache.
13108 (supply_register): Call get_regcache with fetch flag clear.
13109 (collect_register): Call get_regcache with fetch flag set.
13110 (collect_register_as_string): New function.
13111 * regcache.h: Update.
13112 * remote-utils.c (putpkt): Flush after debug output and use
13113 stderr.
13114 Handle input interrupts while waiting for an ACK.
13115 (input_interrupt): Use signal_pid method.
13116 (getpkt): Flush after debug output and use stderr.
13117 (outreg): Use collect_register_as_string.
13118 (new_thread_notify, dead_thread_notify): New functions.
13119 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13120 and general_thread.
13121 (look_up_one_symbol): Flush after debug output.
13122 * server.c (step_thread, server_waiting): New variables.
13123 (start_inferior): Don't use signal_pid. Update call to mywait.
13124 (attach_inferior): Update call to mywait.
13125 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13126 (main): Don't fetch/store registers explicitly. Use
13127 set_desired_inferior. Support proposed ``Hs'' packet. Update
13128 calls to mywait.
13129 * server.h: Update.
13130 (struct inferior_list, struct_inferior_list_entry): New.
13131 * target.c (set_desired_inferior): New.
13132 (write_inferior_memory): Constify.
13133 (mywait): New function.
13134 * target.h: Update.
13135 (struct target_ops): New signal_pid method.
13136 (mywait): Removed macro, added prototype.
13137
13138 * linux-low.h (regset_func): Removed.
13139 (regset_fill_func, regset_store_func): New.
13140 (enum regset_type): New.
13141 (struct regset_info): Add type field. Use new operation types.
13142 (struct linux_target_ops): stop_pc renamed to get_pc.
13143 Add decr_pc_after_break and breakpoint_at.
13144 (get_process, get_thread_proess, get_process_thread)
13145 (strut process_info, all_processes, linux_attach_lwp)
13146 (thread_db_init): New.
13147
13148 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13149 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13150 (the_low_target): Add new members.
13151 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13152 (i386_store_fpxregset): Constify.
13153 (target_regsets): Add new kind identifier.
13154 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13155 (i386_set_pc): Add debugging.
13156 (i386_breakpoint_at): New function.
13157 (the_low_target): Add new members.
13158 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13159 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13160 (mips_breakpoint_at): New.
13161 (the_low_target): Add new members.
13162 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13163 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13164 (the_low_target): Add new members.
13165 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13166 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13167 (the_low_target): Add new members.
13168 * linux-x86-64-low.c (target_regsets): Add new kind
13169 identifier.
13170
131712002-05-15 Daniel Jacobowitz <drow@mvista.com>
13172
13173 From Martin Pool <mbp@samba.org>:
13174 * server.c (gdbserver_usage): New function.
13175 (main): Call it.
13176
131772002-05-14 Daniel Jacobowitz <drow@mvista.com>
13178
13179 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13180 stop_at -> stop_pc.
13181
131822002-05-04 Andrew Cagney <ac131313@redhat.com>
13183
13184 * Makefile.in: Remove obsolete code.
13185
131862002-04-24 Michal Ludvig <mludvig@suse.cz>
13187
13188 * linux-low.c (regsets_fetch_inferior_registers),
13189 (regsets_store_inferior_registers): Removed cast to int from
13190 ptrace() calls.
13191 * regcache.h: Added declaration of struct inferior_info.
13192
131932002-04-20 Daniel Jacobowitz <drow@mvista.com>
13194
13195 * inferiors.c (struct inferior_info): Add regcache_data.
13196 (add_inferior): Call create_register_cache.
13197 (clear_inferiors): Call free_register_cache.
13198 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13199 * regcache.c (struct inferior_regcache_data): New.
13200 (registers): Remove.
13201 (get_regcache): New function.
13202 (create_register_cache, free_register_cache): New functions.
13203 (set_register_cache): Don't initialize the register cache here.
13204 (registers_to_string, registers_from_string, register_data): Call
13205 get_regcache.
13206 * regcache.h: Add prototypes.
13207 * server.h: Likewise.
13208
132092002-04-20 Daniel Jacobowitz <drow@mvista.com>
13210
13211 * mem-break.c: New file.
13212 * mem-break.h: New file.
13213 * Makefile.in: Add mem-break.o rule; update server.h
13214 dependencies.
13215 * inferiors.c (struct inferior_info): Add target_data
13216 member.
13217 (clear_inferiors): Free target_data member if set.
13218 (inferior_target_data, set_inferior_target_data): New functions.
13219 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13220 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13221 * linux-low.c (linux_bp_reinsert): New variable.
13222 (struct inferior_linux_data): New.
13223 (linux_create_inferior): Use set_inferior_target_data.
13224 (linux_attach): Likewise. Call add_inferior.
13225 (linux_wait_for_one_inferior): New function.
13226 (linux_wait): Call it.
13227 (linux_write_memory): Add const.
13228 (initialize_low): Call set_breakpoint_data.
13229 * linux-low.h (struct linux_target_ops): Add breakpoint
13230 handling members.
13231 * server.c (attach_inferior): Remove extra add_inferior
13232 call.
13233 * server.h: Include mem-break.h. Update inferior.c
13234 prototypes.
13235 * target.c (read_inferior_memory)
13236 (write_inferior_memory): New functions.
13237 * target.h (read_inferior_memory)
13238 (write_inferior_memory): Change macros to prototypes.
13239 (struct target_ops): Update comments. Add const to write_memory
13240 definition.
13241
132422002-04-11 Daniel Jacobowitz <drow@mvista.com>
13243
13244 * linux-low.c (usr_store_inferior_registers): Support
13245 registers which are allowed to fail to store.
13246 * linux-low.h (linux_target_ops): Likewise.
13247 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13248 (ppc_cannot_store_register): FPSCR may not be storable.
13249
132502002-04-09 Daniel Jacobowitz <drow@mvista.com>
13251
13252 * server.h: Include <string.h> if HAVE_STRING_H.
13253 * ChangeLog: Correct paths in last ChangeLog entry.
13254
132552002-04-09 Daniel Jacobowitz <drow@mvista.com>
13256
13257 * linux-low.h: Remove obsolete prototypes.
13258 (struct linux_target_ops): New.
13259 (extern the_low_target): New.
13260 * linux-low.c (num_regs, regmap): Remove declarations.
13261 (register_addr): Use the_low_target explicitly.
13262 (fetch_register): Likewise.
13263 (usr_fetch_inferior_registers): Likewise.
13264 (usr_store_inferior_registers): Likewise.
13265 * linux-arm-low.c (num_regs): Remove.
13266 (arm_num_regs): Define.
13267 (arm_regmap): Renamed from regmap, made static.
13268 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13269 made static.
13270 (arm_cannot_store_register): Renamed from cannot_store_register,
13271 made static.
13272 (the_low_target): New.
13273 * linux-i386-low.c (num_regs): Remove.
13274 (i386_num_regs): Define.
13275 (i386_regmap): Renamed from regmap, made static.
13276 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13277 made static.
13278 (i386_cannot_store_register): Renamed from cannot_store_register,
13279 made static.
13280 (the_low_target): New.
13281 * linux-ia64-low.c (num_regs): Remove.
13282 (ia64_num_regs): Define.
13283 (ia64_regmap): Renamed from regmap, made static.
13284 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13285 made static.
13286 (ia64_cannot_store_register): Renamed from cannot_store_register,
13287 made static.
13288 (the_low_target): New.
13289 * linux-m68k-low.c (num_regs): Remove.
13290 (m68k_num_regs): Define.
13291 (m68k_regmap): Renamed from regmap, made static.
13292 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13293 made static.
13294 (m68k_cannot_store_register): Renamed from cannot_store_register,
13295 made static.
13296 (the_low_target): New.
13297 * linux-mips-low.c (num_regs): Remove.
13298 (mips_num_regs): Define.
13299 (mips_regmap): Renamed from regmap, made static.
13300 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13301 made static.
13302 (mips_cannot_store_register): Renamed from cannot_store_register,
13303 made static.
13304 (the_low_target): New.
13305 * linux-ppc-low.c (num_regs): Remove.
13306 (ppc_num_regs): Define.
13307 (ppc_regmap): Renamed from regmap, made static.
13308 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13309 made static.
13310 (ppc_cannot_store_register): Renamed from cannot_store_register,
13311 made static.
13312 (the_low_target): New.
13313 * linux-s390-low.c (num_regs): Remove.
13314 (s390_num_regs): Define.
13315 (s390_regmap): Renamed from regmap, made static.
13316 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13317 made static.
13318 (s390_cannot_store_register): Renamed from cannot_store_register,
13319 made static.
13320 (the_low_target): New.
13321 * linux-sh-low.c (num_regs): Remove.
13322 (sh_num_regs): Define.
13323 (sh_regmap): Renamed from regmap, made static.
13324 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13325 made static.
13326 (sh_cannot_store_register): Renamed from cannot_store_register,
13327 made static.
13328 (the_low_target): New.
13329 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13330 (the_low_target): New.
13331
133322002-04-09 Daniel Jacobowitz <drow@mvista.com>
13333
13334 * Makefile.in: Add stamp-h target.
13335 * configure.in: Create stamp-h.
13336 * configure: Regenerated.
13337
133382002-04-09 Daniel Jacobowitz <drow@mvista.com>
13339
13340 * inferiors.c: New file.
13341 * target.c: New file.
13342 * target.h: New file.
13343 * Makefile.in: Add target.o and inferiors.o. Update
13344 dependencies.
13345 * linux-low.c (inferior_pid): New static variable,
13346 moved from server.c.
13347 (linux_create_inferior): Renamed from create_inferior.
13348 Call add_inferior. Return 0 on success instead of a PID.
13349 (linux_attach): Renamed from myattach.
13350 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13351 (linux_thread_alive): Renamed from mythread_alive.
13352 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13353 child dies.
13354 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13355 (regsets_store_inferior_registers): Correct error message.
13356 Add missing ``return 0''.
13357 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13358 (linux_store_registers): Renamed from store_inferior_registers.
13359 (linux_read_memory): Renamed from read_inferior_memory.
13360 (linux_write_memory): Renamed from write_inferior_memory.
13361 (linux_target_ops): New structure.
13362 (initialize_low): Call set_target_ops ().
13363 * remote-utils.c (unhexify): New function.
13364 (hexify): New function.
13365 (input_interrupt): Send signals to ``signal_pid''.
13366 * server.c (inferior_pid): Remove.
13367 (start_inferior): Update create_inferior call.
13368 (attach_inferior): Call add_inferior.
13369 (handle_query): New function.
13370 (main): Call handle_query for `q' packets.
13371 * server.h: Include "target.h". Remove obsolete prototypes.
13372 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13373
133742002-04-09 Daniel Jacobowitz <drow@mvista.com>
13375
13376 * Makefile.in: Add WARN_CFLAGS. Update configury
13377 dependencies.
13378 * configure.in: Check for <string.h>
13379 * configure: Regenerate.
13380 * config.in: Regenerate.
13381 * gdbreplay.c: Include needed system headers.
13382 (remote_open): Remove strchr prototype.
13383 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13384 * regcache.c (supply_register): Change buf argument to const void *.
13385 (supply_register_by_name): Likewise.
13386 (collect_register): Change buf argument to void *.
13387 (collect_register_by_name): Likewise.
13388 * regcache.h: Add missing prototypes.
13389 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13390 * server.c (handle_query): New function.
13391 (attached): New static variable, moved out of main.
13392 (main): Quiet longjmp clobber warnings.
13393 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13394 * utils.c (error): Remove NORETURN.
13395 (fatal): Likewise.
This page took 2.360613 seconds and 4 git commands to generate.