C++: handle glibc's ptrace(enum __ptrace_request, ...)
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-07-24 Pedro Alves <palves@redhat.com>
2
3 * config.in: Regenerate.
4 * configure: Regenerate.
5
6 2015-07-24 Pedro Alves <palves@redhat.com>
7
8 * acinclude.m4: Include ../ptrace.m4.
9 * configure.ac: Call GDB_AC_PTRACE.
10 * config.in, configure: Regenerate.
11
12 2015-07-24 Yao Qi <yao.qi@linaro.org>
13
14 * linux-low.c (linux_create_inferior): Remove setting to
15 proc->priv->new_inferior.
16 (linux_attach): Likewise.
17 (linux_low_filter_event): Likewise.
18 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
19
20 2015-07-24 Yao Qi <yao.qi@linaro.org>
21
22 * linux-low.c (linux_arch_setup): New function.
23 (linux_low_filter_event): If proc->tdesc is NULL and
24 proc->attached is true, call the_low_target.arch_setup.
25 Otherwise, keep status pending, and return.
26 (linux_resume_one_lwp_throw): Don't call get_pc if
27 thread->while_stepping isn't NULL. Don't call
28 get_thread_regcache if proc->tdesc is NULL.
29 (need_step_over_p): Return 0 if proc->tdesc is NULL.
30 (linux_target_ops): Install arch_setup.
31 * server.c (start_inferior): Call the_target->arch_setup.
32 * target.h (struct target_ops) <arch_setup>: New field.
33 (target_arch_setup): New marco.
34 * lynx-low.c (lynx_target_ops): Update.
35 * nto-low.c (nto_target_ops): Update.
36 * spu-low.c (spu_target_ops): Update.
37 * win32-low.c (win32_target_ops): Update.
38
39 2015-07-24 Yao Qi <yao.qi@linaro.org>
40
41 * linux-low.c (linux_add_process): Don't set
42 proc->priv->new_inferior.
43 (linux_create_inferior): Set proc->priv->new_inferior to 1.
44 (linux_attach): Likewise.
45
46 2015-07-24 Yao Qi <yao.qi@linaro.org>
47
48 * server.c (start_inferior): Code refactor.
49
50 2015-07-24 Yao Qi <yao.qi@linaro.org>
51
52 * server.c (process_serial_event): Set general_thread.
53
54 2015-07-21 Yao Qi <yao.qi@linaro.org>
55
56 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
57 aarch64_linux_get_debug_reg_capacity.
58
59 2015-07-17 Yao Qi <yao.qi@linaro.org>
60
61 * Makefile.in (aarch64-linux-hw-point.o): New rule.
62 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
63 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
64 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
65 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
66 (AARCH64_HWP_ALIGNMENT): Likewise.
67 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
68 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
69 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
70 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
71 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
72 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
73 (struct aarch64_debug_reg_state): Likewise.
74 (struct arch_lwp_info): Likewise.
75 (aarch64_align_watchpoint): Likewise.
76 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
77 (aarch64_watchpoint_length): Likewise.
78 (aarch64_point_encode_ctrl_reg): Likewise
79 (aarch64_point_is_aligned): Likewise.
80 (aarch64_align_watchpoint): Likewise.
81 (aarch64_linux_set_debug_regs):
82 (aarch64_dr_state_insert_one_point): Likewise.
83 (aarch64_dr_state_remove_one_point): Likewise.
84 (aarch64_handle_breakpoint): Likewise.
85 (aarch64_handle_aligned_watchpoint): Likewise.
86 (aarch64_handle_unaligned_watchpoint): Likewise.
87 (aarch64_handle_watchpoint): Likewise.
88
89 2015-07-17 Yao Qi <yao.qi@linaro.org>
90
91 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
92 and don't aarch64_get_debug_reg_state. All callers update.
93 (aarch64_handle_aligned_watchpoint): Likewise.
94 (aarch64_handle_unaligned_watchpoint): Likewise.
95 (aarch64_handle_watchpoint): Likewise.
96 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
97 (aarch64_remove_point): Likewise.
98
99 2015-07-17 Yao Qi <yao.qi@linaro.org>
100
101 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
102 debug_printf.
103 (aarch64_handle_unaligned_watchpoint): Likewise.
104
105 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
106
107 Revert the previous 3 commits:
108 Move gdb_regex* to common/
109 Move linux_find_memory_regions_full & co.
110 gdbserver build-id attribute generator
111
112 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
113 Jan Kratochvil <jan.kratochvil@redhat.com>
114
115 gdbserver build-id attribute generator.
116 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
117 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
118 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
119 (find_phdr): New.
120 (get_dynamic): Use find_pdhr to traverse program headers.
121 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
122 (compare_mapping_entry_range, struct find_memory_region_callback_data)
123 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
124 (get_hex_build_id): New.
125 (linux_qxfer_libraries_svr4): Add optional build-id attribute
126 to reply XML document.
127
128 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
129 Jan Kratochvil <jan.kratochvil@redhat.com>
130
131 * target.c: Include target/target-utils.h and fcntl.h.
132 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
133 (target_fileio_read_stralloc): New functions.
134
135 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
136
137 * Makefile.in (OBS): Add gdb_regex.o.
138 (gdb_regex.o): New.
139 * config.in: Rebuilt.
140 * configure: Rebuilt.
141
142 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
143 Jan Kratochvil <jan.kratochvil@redhat.com>
144
145 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
146 * Makefile.in (OBS): Add target-utils.o.
147 (linux-maps.o, target-utils.o): New.
148 * configure.srv (srv_linux_obj): Add linux-maps.o.
149
150 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
151
152 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
153 function, return 1.
154 (the_low_target): Install it.
155
156 2015-07-14 Pedro Alves <palves@redhat.com>
157
158 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
159 Instead, ignore ECHILD, and throw an error for other errnos.
160
161 2015-07-10 Pedro Alves <palves@redhat.com>
162
163 * event-loop.c (struct callback_event) <data>: Change type to
164 gdb_client_data instance instead of gdb_client_data pointer.
165 (append_callback_event): Adjust.
166
167 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
168
169 * linux-aarch64-low.c: Add comments for each linux_target_ops
170 method. Remove comments already covered in target_ops and
171 linux_target_ops definitions.
172 (the_low_target): Add comments for each unimplemented method.
173
174 2015-07-09 Yao Qi <yao.qi@linaro.org>
175
176 * linux-aarch64-low.c (aarch64_regmap): Remove.
177 (aarch64_usrregs_info): Remove.
178 (regs_info): Set field usrregs to NULL.
179
180 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
181
182 * linux-low.c: Include "rsp-low.h"
183 (linux_low_encode_pt_config, linux_low_encode_raw): New.
184 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
185 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
186 (handle_btrace_enable_pt): New.
187 (handle_btrace_general_set): Support "pt".
188 (handle_btrace_conf_general_set): Support "pt:size".
189
190 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
191
192 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
193 Z_PACKET_SW_BP.
194
195 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
196
197 * linux-aarch64-low.c: Remove comment about endianness.
198 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
199 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
200 memcmp.
201
202 2015-06-24 Gary Benson <gbenson@redhat.com>
203
204 * linux-i386-ipa.c (stdint.h): Do not include.
205 * lynx-i386-low.c (stdint.h): Likewise.
206 * lynx-ppc-low.c (stdint.h): Likewise.
207 * mem-break.c (stdint.h): Likewise.
208 * thread-db.c (stdint.h): Likewise.
209 * tracepoint.c (stdint.h): Likewise.
210 * win32-low.c (stdint.h): Likewise.
211
212 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
213
214 * server.c (write_qxfer_response): Update call to
215 remote_escape_output.
216
217 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
218 Jan Kratochvil <jan.kratochvil@redhat.com>
219
220 Merge multiple hex conversions.
221 * gdbreplay.c (tohex): Rename to 'fromhex'.
222 (logchar): Use fromhex.
223
224 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
225
226 * server.c (handle_qxfer_libraries): Set `version' attribute for
227 <library-list>.
228
229 2015-06-10 Gary Benson <gbenson@redhat.com>
230
231 * target.h (struct target_ops) <multifs_open>: New field.
232 <multifs_unlink>: Likewise.
233 <multifs_readlink>: Likewise.
234 * linux-low.c (nat/linux-namespaces.h): New include.
235 (linux_target_ops): Initialize the_target->multifs_open,
236 the_target->multifs_unlink and the_target->multifs_readlink.
237 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
238 * hostio.c (hostio_fs_pid): New static variable.
239 (hostio_handle_new_gdb_connection): New function.
240 (handle_setfs): Likewise.
241 (handle_open): Use the_target->multifs_open as appropriate.
242 (handle_unlink): Use the_target->multifs_unlink as appropriate.
243 (handle_readlink): Use the_target->multifs_readlink as
244 appropriate.
245 (handle_vFile): Handle vFile:setfs packets.
246 * server.c (handle_query): Call hostio_handle_new_gdb_connection
247 after target_handle_new_gdb_connection.
248
249 2015-06-10 Gary Benson <gbenson@redhat.com>
250
251 * configure.ac (AC_CHECK_FUNCS): Add setns.
252 * config.in: Regenerate.
253 * configure: Likewise.
254 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
255 (linux-namespaces.o): New rule.
256 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
257
258 2015-06-09 Gary Benson <gbenson@redhat.com>
259
260 * hostio.c (handle_open): Process mode argument with
261 fileio_to_host_mode.
262
263 2015-06-01 Yao Qi <yao.qi@linaro.org>
264
265 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
266 * linux-x86-low.c: Likewise.
267
268 2015-05-28 Don Breazeal <donb@codesourcery.com>
269
270 * linux-low.c (handle_extended_wait): Initialize
271 thread_info.last_resume_kind for new fork children.
272
273 2015-05-15 Pedro Alves <palves@redhat.com>
274
275 * target.h (target_handle_new_gdb_connection): Rewrite using if
276 wrapped in do/while.
277
278 2015-05-14 Joel Brobecker <brobecker@adacore.com>
279
280 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
281 * configure, config.in: Regenerate.
282 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
283 Declare typedef.
284
285 2015-05-12 Don Breazeal <donb@codesourcery.com>
286
287 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
288 PTRACE_EVENT_VFORK_DONE.
289 (linux_low_ptrace_options, extended_event_reported): Add vfork
290 events.
291 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
292 and "vforkdone" for RSP 'T' Stop Reply Packet.
293 * server.h (report_vfork_events): Declare
294 global variable.
295
296 2015-05-12 Don Breazeal <donb@codesourcery.com>
297
298 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
299 (the_low_target) <new_fork>: Initialize new member.
300 * linux-arm-low.c (arm_new_fork): New function.
301 (the_low_target) <new_fork>: Initialize new member.
302 * linux-low.c (handle_extended_wait): Call new target function
303 new_fork.
304 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
305 * linux-mips-low.c (mips_add_watchpoint): New function
306 extracted from mips_insert_point.
307 (the_low_target) <new_fork>: Initialize new member.
308 (mips_linux_new_fork): New function.
309 (mips_insert_point): Call mips_add_watchpoint.
310 * linux-x86-low.c (x86_linux_new_fork): New function.
311 (the_low_target) <new_fork>: Initialize new member.
312
313 2015-05-12 Don Breazeal <donb@codesourcery.com>
314
315 * linux-low.c (handle_extended_wait): Implement return value,
316 rename argument 'event_child' to 'event_lwp', handle
317 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
318 (linux_low_ptrace_options): New function.
319 (linux_low_filter_event): Call linux_low_ptrace_options,
320 use different argument fo linux_enable_event_reporting,
321 use return value from handle_extended_wait.
322 (extended_event_reported): New function.
323 (linux_wait_1): Call extended_event_reported and set
324 status to report fork events.
325 (linux_write_memory): Add pid to debug message.
326 (reset_lwp_ptrace_options_callback): New function.
327 (linux_handle_new_gdb_connection): New function.
328 (linux_target_ops): Initialize new structure member.
329 * linux-low.h (struct lwp_info) <waitstatus>: New member.
330 * lynx-low.c: Initialize new structure member.
331 * remote-utils.c (prepare_resume_reply): Implement stop reason
332 "fork" for "T" stop message.
333 * server.c (handle_query): Call handle_new_gdb_connection.
334 * server.h (report_fork_events): Declare global flag.
335 * target.h (struct target_ops) <handle_new_gdb_connection>:
336 New member.
337 (target_handle_new_gdb_connection): New macro.
338 * win32-low.c: Initialize new structure member.
339
340 2015-05-12 Don Breazeal <donb@codesourcery.com>
341
342 * mem-break.c (APPEND_TO_LIST): Define macro.
343 (clone_agent_expr): New function.
344 (clone_one_breakpoint): New function.
345 (clone_all_breakpoints): New function.
346 * mem-break.h: Declare new functions.
347
348 2015-05-12 Don Breazeal <donb@codesourcery.com>
349
350 * linux-low.c (linux_supports_fork_events): New function.
351 (linux_supports_vfork_events): New function.
352 (linux_target_ops): Initialize new structure members.
353 (initialize_low): Call linux_check_ptrace_features.
354 * lynx-low.c (lynx_target_ops): Initialize new structure
355 members.
356 * server.c (report_fork_events, report_vfork_events):
357 New global flags.
358 (handle_query): Add new features to qSupported packet and
359 response.
360 (captured_main): Initialize new global variables.
361 * target.h (struct target_ops) <supports_fork_events>:
362 New member.
363 <supports_vfork_events>: New member.
364 (target_supports_fork_events): New macro.
365 (target_supports_vfork_events): New macro.
366 * win32-low.c (win32_target_ops): Initialize new structure
367 members.
368
369 2015-05-12 Gary Benson <gbenson@redhat.com>
370
371 * server.c (handle_qxfer_exec_file): Use current process
372 if annex is empty.
373
374 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
375
376 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
377 Remove HAVE_PTRACE_GETREGS conditionals.
378 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
379 instead of PTRACE_GETREGS and PTRACE_SETREGS.
380
381 2015-05-08 Yao Qi <yao.qi@linaro.org>
382
383 * linux-low.c (linux_supports_conditional_breakpoints): New
384 function.
385 (linux_target_ops): Install new target method.
386 * lynx-low.c (lynx_target_ops): Install NULL hook for
387 supports_conditional_breakpoints.
388 * nto-low.c (nto_target_ops): Likewise.
389 * spu-low.c (spu_target_ops): Likewise.
390 * win32-low.c (win32_target_ops): Likewise.
391 * server.c (handle_query): Check
392 target_supports_conditional_breakpoints.
393 * target.h (struct target_ops) <supports_conditional_breakpoints>:
394 New field.
395 (target_supports_conditional_breakpoints): New macro.
396
397 2015-05-06 Pedro Alves <palves@redhat.com>
398
399 PR server/18081
400 * server.c (start_inferior): If the process exits, mourn it.
401
402 2015-04-21 Gary Benson <gbenson@redhat.com>
403
404 * hostio.c (fileio_open_flags_to_host): Factored out to
405 fileio_to_host_openflags in common/fileio.c. Single use
406 updated.
407
408 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
409
410 * linux-xtensa-low.c (xtensa_fill_gregset)
411 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
412 XCHAL_HAVE_LOOP.
413
414 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
415
416 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
417 (regs_info): Replace usrregs pointer with NULL.
418
419 2015-04-17 Gary Benson <gbenson@redhat.com>
420
421 * target.h (struct target_ops) <pid_to_exec_file>: New field.
422 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
423 * server.c (handle_qxfer_exec_file): New function.
424 (qxfer_packets): Add exec-file entry.
425 (handle_query): Report qXfer:exec-file:read as supported packet.
426
427 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
428
429 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
430
431 2015-04-09 Gary Benson <gbenson@redhat.com>
432
433 * hostio-errno.c (errno_to_fileio_error): Remove function.
434 Update caller to use remote_fileio_to_fio_error.
435
436 2015-04-09 Yao Qi <yao.qi@linaro.org>
437
438 * linux-low.c (linux_insert_point): Call
439 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
440 (linux_remove_point): Call remove_memory_breakpoint if type is
441 raw_bkpt_type_sw.
442 * linux-x86-low.c (x86_insert_point): Don't call
443 insert_memory_breakpoint.
444 (x86_remove_point): Don't call remove_memory_breakpoint.
445
446 2015-04-01 Pedro Alves <palves@redhat.com>
447 Cleber Rosa <crosa@redhat.com>
448
449 * server.c (gdbserver_usage): Reorganize and extend the usage
450 message.
451
452 2015-03-24 Pedro Alves <palves@redhat.com>
453
454 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
455 output. Also dump TRAP_TRACE.
456 (linux_low_filter_event): In debug output, distinguish a
457 resume_stop SIGSTOP from a delayed SIGSTOP.
458
459 2015-03-24 Gary Benson <gbenson@redhat.com>
460
461 * linux-x86-low.c (x86_linux_new_thread): Moved to
462 nat/x86-linux.c.
463 (x86_linux_prepare_to_resume): Likewise.
464
465 2015-03-24 Gary Benson <gbenson@redhat.com>
466
467 * Makefile.in (x86-linux-dregs.o): New rule.
468 * configure.srv: Add x86-linux-dregs.o to relevant targets.
469 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
470 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
471 (x86_linux_dr_get): Likewise.
472 (x86_linux_dr_set): Likewise.
473 (update_debug_registers_callback): Likewise.
474 (x86_linux_dr_set_addr): Likewise.
475 (x86_linux_dr_get_addr): Likewise.
476 (x86_linux_dr_set_control): Likewise.
477 (x86_linux_dr_get_control): Likewise.
478 (x86_linux_dr_get_status): Likewise.
479 (x86_linux_update_debug_registers): Likewise.
480
481 2015-03-24 Gary Benson <gbenson@redhat.com>
482
483 * linux-x86-low.c (x86_linux_update_debug_registers):
484 New function, factored out from...
485 (x86_linux_prepare_to_resume): ...this.
486
487 2015-03-24 Gary Benson <gbenson@redhat.com>
488
489 * linux-x86-low.c (x86_linux_dr_get): Update comments.
490 (x86_linux_dr_set): Likewise.
491 (update_debug_registers_callback): Likewise.
492 (x86_linux_dr_set_addr): Likewise.
493 (x86_linux_dr_get_addr): Likewise.
494 (x86_linux_dr_set_control): Likewise.
495 (x86_linux_dr_get_control): Likewise.
496 (x86_linux_dr_get_status): Likewise.
497 (x86_linux_prepare_to_resume): Likewise.
498
499 2015-03-24 Gary Benson <gbenson@redhat.com>
500
501 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
502 Use perror_with_name. Pass string through gettext.
503 (x86_linux_dr_set): Likewise.
504
505 2015-03-24 Gary Benson <gbenson@redhat.com>
506
507 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
508 (x86_linux_dr_set_addr): ...this.
509 (x86_dr_low_get_addr): Rename to...
510 (x86_linux_dr_get_addr): ...this.
511 (x86_dr_low_set_control): Rename to...
512 (x86_linux_dr_set_control): ...this.
513 (x86_dr_low_get_control): Rename to...
514 (x86_linux_dr_get_control): ...this.
515 (x86_dr_low_get_status): Rename to...
516 (x86_linux_dr_get_status): ...this.
517 (x86_dr_low): Update with new function names.
518
519 2015-03-24 Gary Benson <gbenson@redhat.com>
520
521 * Makefile.in (x86-linux.o): New rule.
522 * configure.srv: Add x86-linux.o to relevant targets.
523 * linux-low.c (lwp_set_arch_private_info): New function.
524 (lwp_arch_private_info): Likewise.
525 * linux-x86-low.c: Include nat/x86-linux.h.
526 (arch_lwp_info): Removed structure.
527 (update_debug_registers_callback):
528 Use lwp_set_debug_registers_changed.
529 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
530 and lwp_set_debug_registers_changed.
531 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
532
533 2015-03-24 Gary Benson <gbenson@redhat.com>
534
535 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
536 * linux-arm-low.c (arm_new_thread): Likewise.
537 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
538 * linux-mips-low.c (mips_linux_new_thread): Likewise.
539 * linux-x86-low.c (x86_linux_new_thread): Likewise.
540 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
541
542 2015-03-24 Gary Benson <gbenson@redhat.com>
543
544 * linux-low.c (ptid_of_lwp): New function.
545 (lwp_is_stopped): Likewise.
546 (lwp_stop_reason): Likewise.
547 * linux-x86-low.c (update_debug_registers_callback):
548 Use lwp_is_stopped.
549 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
550 lwp_stop_reason.
551
552 2015-03-24 Gary Benson <gbenson@redhat.com>
553
554 * linux-low.h (linux_stop_lwp): Remove declaration.
555
556 2015-03-24 Gary Benson <gbenson@redhat.com>
557
558 * linux-low.h: Include nat/linux-nat.h.
559 * linux-low.c (iterate_over_lwps_args): New structure.
560 (iterate_over_lwps_filter): New function.
561 (iterate_over_lwps): Likewise.
562 * linux-x86-low.c (update_debug_registers_callback):
563 Update signature to what iterate_over_lwps expects.
564 Remove PID check that iterate_over_lwps now performs.
565 (x86_dr_low_set_addr): Use iterate_over_lwps.
566 (x86_dr_low_set_control): Likewise.
567
568 2015-03-24 Gary Benson <gbenson@redhat.com>
569
570 * linux-x86-low.c (x86_debug_reg_state): New function.
571 (x86_linux_prepare_to_resume): Use the above.
572
573 2015-03-24 Gary Benson <gbenson@redhat.com>
574
575 * linux-low.c (current_lwp_ptid): New function.
576 * linux-x86-low.c: Include nat/linux-nat.h.
577 (x86_dr_low_get_addr): Use current_lwp_ptid.
578 (x86_dr_low_get_control): Likewise.
579 (x86_dr_low_get_status): Likewise.
580
581 2015-03-20 Pedro Alves <palves@redhat.com>
582
583 * tracepoint.c (cmd_qtstatus): Make "str" const.
584
585 2015-03-20 Pedro Alves <palves@redhat.com>
586
587 * server.c (handle_general_set): Make "req_str" const.
588
589 2015-03-19 Pedro Alves <palves@redhat.com>
590
591 * linux-low.c (linux_resume_one_lwp): Rename to ...
592 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
593 instead call perror_with_name.
594 (check_ptrace_stopped_lwp_gone): New function.
595 (linux_resume_one_lwp): Reimplement as wrapper around
596 linux_resume_one_lwp_throw that swallows errors if the LWP is
597 gone.
598
599 2015-03-19 Pedro Alves <palves@redhat.com>
600
601 * linux-low.c (count_events_callback, select_event_lwp_callback):
602 No longer check whether the thread has resume_stop as last resume
603 kind.
604
605 2015-03-19 Pedro Alves <palves@redhat.com>
606
607 * linux-low.c (count_events_callback, select_event_lwp_callback):
608 Use the lwp's status_pending_p field, not the thread's.
609
610 2015-03-19 Pedro Alves <palves@redhat.com>
611
612 * linux-low.c (select_event_lwp_callback): Update comments to
613 no longer mention SIGTRAP.
614
615 2015-03-18 Gary Benson <gbenson@redhat.com>
616
617 * server.c (handle_query): Do not report vFile:fstat as supported.
618
619 2015-03-11 Gary Benson <gbenson@redhat.com>
620
621 * hostio.c (sys/types.h): New include.
622 (sys/stat.h): Likewise.
623 (common-remote-fileio.h): Likewise.
624 (handle_fstat): New function.
625 (handle_vFile): Handle vFile:fstat packets.
626
627 2015-03-11 Gary Benson <gbenson@redhat.com>
628
629 * configure.ac (AC_CHECK_MEMBERS): Add checks for
630 struct stat.st_blocks and struct stat.st_blksize.
631 * configure: Regenerate.
632 * config.in: Likewise.
633 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
634 (OBS): Add common-remote-fileio.o.
635 (common-remote-fileio.o): New rule.
636
637 2015-03-09 Pedro Alves <palves@redhat.com>
638
639 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
640 'struct sockaddr' pointer in 'accept' call.
641
642 2015-03-09 Pedro Alves <palves@redhat.com>
643
644 Revert:
645 2015-03-07 Pedro Alves <palves@redhat.com>
646 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
647 or <winsock2.h> here. Instead include "gdb_socket.h".
648 (remote_open): Use union gdb_sockaddr_u.
649 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
650 or <winsock2.h> here. Instead include "gdb_socket.h".
651 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
652 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
653 or <sys/un.h>.
654 (init_named_socket, gdb_agent_helper_thread): Use union
655 gdb_sockaddr_u.
656
657 2015-03-07 Pedro Alves <palves@redhat.com>
658
659 * configure.ac (build_warnings): Move
660 -Wdeclaration-after-statement to the C-specific set.
661 * configure: Regenerate.
662
663 2015-03-07 Pedro Alves <palves@redhat.com>
664
665 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
666 or <winsock2.h> here. Instead include "gdb_socket.h".
667 (remote_open): Use union gdb_sockaddr_u.
668 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
669 or <winsock2.h> here. Instead include "gdb_socket.h".
670 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
671 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
672 or <sys/un.h>.
673 (init_named_socket, gdb_agent_helper_thread): Use union
674 gdb_sockaddr_u.
675
676 2015-03-07 Pedro Alves <palves@redhat.com>
677
678 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
679 instead.
680
681 2015-03-06 Yao Qi <yao.qi@linaro.org>
682
683 * linux-aarch64-low.c (aarch64_insert_point): Use
684 show_debug_regs as a boolean.
685 (aarch64_remove_point): Likewise.
686
687 2015-03-05 Pedro Alves <palves@redhat.com>
688
689 * lynx-low.c (lynx_target_ops): Install NULL hooks for
690 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
691 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
692 * nto-low.c (nto_target_ops): Likewise.
693 * spu-low.c (spu_target_ops): Likewise.
694 * win32-low.c (win32_target_ops): Likewise.
695
696 2015-03-04 Pedro Alves <palves@redhat.com>
697
698 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
699 Decide whether a breakpoint triggered based on the SIGTRAP's
700 siginfo.si_code.
701 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
702 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
703 (linux_low_filter_event): Check for breakpoints before checking
704 watchpoints.
705 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
706 siginfo.si_code.
707 (linux_stopped_by_sw_breakpoint)
708 (linux_supports_stopped_by_sw_breakpoint)
709 (linux_stopped_by_hw_breakpoint)
710 (linux_supports_stopped_by_hw_breakpoint): New functions.
711 (linux_target_ops): Install new target methods.
712
713 2015-03-04 Pedro Alves <palves@redhat.com>
714
715 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
716 * server.c (swbreak_feature, hwbreak_feature): New globals.
717 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
718 (captured_main): Clear swbreak_feature and hwbreak_feature.
719 * server.h (swbreak_feature, hwbreak_feature): Declare.
720 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
721 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
722 supports_stopped_by_hw_breakpoint>: New fields.
723 (target_supports_stopped_by_sw_breakpoint)
724 (target_stopped_by_sw_breakpoint)
725 (target_supports_stopped_by_hw_breakpoint)
726 (target_stopped_by_hw_breakpoint): Declare.
727
728 2015-03-04 Pedro Alves <palves@redhat.com>
729
730 enum lwp_stop_reason -> enum target_stop_reason
731 * linux-low.c (check_stopped_by_breakpoint): Adjust.
732 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
733 (linux_wait_1, stuck_in_jump_pad_callback)
734 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
735 (linux_stopped_by_watchpoint):
736 * linux-low.h (enum lwp_stop_reason): Delete.
737 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
738 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
739
740 2015-03-04 Yao Qi <yao.qi@linaro.org>
741
742 * Makefile.in (SFILES): Add linux-aarch64-low.c.
743
744 2015-03-03 Gary Benson <gbenson@redhat.com>
745
746 * hostio.c (handle_vFile): Fix prefix lengths.
747
748 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
749
750 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
751 ptr_bits.
752
753 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
754
755 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
756 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
757 (clean): Add "rm -f" for above C files.
758 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
759 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
760 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
761 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
762 * linux-s390-low.c (HWCAP_S390_VX): New macro.
763 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
764 (init_registers_s390x_vx_linux64)
765 (init_registers_s390x_tevx_linux64)
766 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
767 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
768 declarations.
769 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
770 (s390_store_vxrs_high): New functions.
771 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
772 NT_S390_VXRS_HIGH.
773 (s390_arch_setup): Add logic for selecting one of the new target
774 descriptions. Activate the new vector regsets if applicable.
775 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
776 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
777 and init_registers_s390x_tevx_linux64.
778
779 2015-03-01 Pedro Alves <palves@redhat.com>
780
781 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
782 parameter.
783
784 2015-02-27 Pedro Alves <palves@redhat.com>
785
786 * linux-x86-low.c (u_debugreg_offset): New function.
787 (x86_linux_dr_get, x86_linux_dr_set): Use it.
788
789 2015-02-27 Pedro Alves <palves@redhat.com>
790
791 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
792 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
793 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
794 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
795 (ps_lsetfpregs, ps_getpid)
796 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
797 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
798 (ps_lsetxregs, ps_plog): Declare.
799
800 2015-02-27 Pedro Alves <palves@redhat.com>
801
802 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
803 IP_AGENT_EXPORT_FUNC.
804 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
805 IP_AGENT_EXPORT_FUNC.
806 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
807 (IP_AGENT_EXPORT): Delete.
808 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
809 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
810 (gdb_trampoline_buffer_error, collecting, gdb_collect)
811 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
812 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
813 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
814 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
815 (traceframe_read_count, traceframe_write_count)
816 (traceframes_created, trace_state_variables, get_raw_reg)
817 (get_trace_state_variable_value, set_trace_state_variable_value)
818 (ust_loaded, helper_thread_id, cmd_buf): Use
819 IPA_SYM_EXPORTED_NAME.
820 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
821 (tracepoints) Use IP_AGENT_EXPORT_VAR.
822 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
823 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
824 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
825 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
826 EXTERN_C_PUSH/EXTERN_C_POP.
827 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
828 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
829 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
830 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
831 (traceframe_write_count, traceframe_read_count)
832 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
833 (about_to_request_buffer_space, get_trace_state_variable_value)
834 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
835 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
836 EXTERN_C_PUSH/EXTERN_C_POP.
837 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
838 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
839 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
840 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
841 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
842 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
843 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
844 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
845 Define.
846 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
847 (IP_AGENT_EXPORT_VAR_DECL): Define.
848 (tracing): Declare.
849 (gdb_agent_get_raw_reg): Declare.
850
851 2015-02-27 Tom Tromey <tromey@redhat.com>
852 Pedro Alves <palves@redhat.com>
853
854 Rename symbols whose names are reserved C++ keywords throughout.
855
856 2015-02-27 Pedro Alves <palves@redhat.com>
857
858 * Makefile.in (COMPILER): New, get it from autoconf.
859 (CXX): Get from autoconf instead.
860 (COMPILE.pre): Use COMPILER.
861 (CC-LD): Rename to ...
862 (CC_LD): ... this. Use COMPILER.
863 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
864 (CXX_FOR_TARGET): Default to g++ instead of gcc.
865 * acinclude.m4: Include build-with-cxx.m4.
866 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
867 Disable -Werror by default if building in C++ mode.
868 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
869 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
870 the C++ compiler. Save/restore CXXFLAGS too.
871 * configure: Regenerate.
872
873 2015-02-27 Pedro Alves <palves@redhat.com>
874
875 * acinclude.m4: Include libiberty.m4.
876 * configure.ac: Call libiberty_INIT.
877 * config.in, configure: Regenerate.
878
879 2015-02-26 Pedro Alves <palves@redhat.com>
880
881 * linux-low.c (linux_wait_1): When incrementing the PC past a
882 program breakpoint always use the_low_target.breakpoint_len as
883 increment, rather than the maximum between that and
884 the_low_target.decr_pc_after_break.
885
886 2015-02-23 Pedro Alves <palves@redhat.com>
887
888 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
889 thread was doing a step-over; always adjust the PC if
890 we stepped over a permanent breakpoint.
891 (linux_wait_1): If we stepped over breakpoint that was on top of a
892 permanent breakpoint, manually advance the PC past it.
893
894 2015-02-23 Pedro Alves <palves@redhat.com>
895
896 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
897 modes.
898 (x86_fill_gregset, x86_store_gregset): Use it when handling
899 $orig_eax.
900
901 2015-02-20 Pedro Alves <palves@redhat.com>
902
903 * thread-db.c: Include "nat/linux-procfs.h".
904 (thread_db_init): Skip listing new threads if the kernel supports
905 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
906
907 2015-02-20 Pedro Alves <palves@redhat.com>
908
909 * linux-low.c (status_pending_p_callback): Use ptid_match.
910
911 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
912
913 PR breakpoints/16812
914 * linux-low.c (wstatus_maybe_breakpoint): Remove.
915 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
916 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
917
918 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
919
920 PR breakpoints/15956
921 * tracepoint.c (cmd_qtinit): Add check for current_thread.
922
923 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
924
925 * linux-low.c (linux_low_btrace_conf): Print size.
926 * server.c (handle_btrace_conf_general_set): New.
927 (hanle_general_set): Call handle_btrace_conf_general_set.
928 (handle_query): Report Qbtrace-conf:bts:size as supported.
929
930 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
931
932 * linux-low.c (linux_low_enable_btrace): Update parameters.
933 (linux_low_btrace_conf): New.
934 (linux_target_ops)<to_btrace_conf>: Initialize.
935 * server.c (current_btrace_conf): New.
936 (handle_btrace_enable): Rename to ...
937 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
938 to target_enable_btrace. Update comment. Update users.
939 (handle_qxfer_btrace_conf): New.
940 (qxfer_packets): Add btrace-conf entry.
941 (handle_query): Report qXfer:btrace-conf:read as supported packet.
942 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
943 (target_ops)<read_btrace_conf>: New.
944 (target_enable_btrace): Update parameters.
945 (target_read_btrace_conf): New.
946
947 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
948
949 * server.c (handle_btrace_general_set): Remove call to
950 target_supports_btrace.
951 (supported_btrace_packets): New.
952 (handle_query): Call supported_btrace_packets.
953 * target.h: include btrace-common.h.
954 (btrace_target_info): Removed.
955 (supports_btrace, target_supports_btrace): Update parameters.
956
957 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
958
959 * Makefile.in (SFILES): Add common/btrace-common.c.
960 (OBS): Add common/btrace-common.o.
961 (btrace-common.o): Add build rules.
962 * linux-low: Include btrace-common.h.
963 (linux_low_read_btrace): Use struct btrace_data. Call
964 btrace_data_init and btrace_data_fini.
965
966 2015-02-06 Pedro Alves <palves@redhat.com>
967
968 * thread-db.c (find_new_threads_callback): Add debug output.
969
970 2015-02-04 Pedro Alves <palves@redhat.com>
971
972 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
973 (resume_stopped_resumed_lwps): New function.
974 (linux_wait_for_event_filtered): Use it.
975
976 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
977
978 * Makefile.in (SFILES): Add linux-personality.c.
979 (linux-personality.o): New rule.
980 * configure.srv (srv_linux_obj): Add linux-personality.o to the
981 list of objects to be built.
982 * linux-low.c: Include nat/linux-personality.h.
983 (linux_create_inferior): Remove code to disable address space
984 randomization (moved to ../nat/linux-personality.c). Create
985 cleanup to disable address space randomization.
986
987 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
988
989 * Makefile.in (posix-strerror.o): New rule.
990 (mingw-strerror.o): Likewise.
991 * configure: Regenerated.
992 * configure.ac: Source file ../common/common.host. Initialize new
993 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
994
995 2015-01-14 Yao Qi <yao@codesourcery.com>
996
997 * Makefile.in (SFILES): Add nat/ppc-linux.c.
998 (ppc-linux.o): New rule.
999 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1000 * configure.ac: AC_CHECK_FUNCS(getauxval).
1001 * config.in: Re-generated.
1002 * configure: Re-generated.
1003 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1004 ppc64_64bit_inferior_p
1005
1006 2015-01-14 Yao Qi <yao@codesourcery.com>
1007
1008 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1009 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1010 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1011 (PT_ORIG_R3, PT_TRAP): Likewise.
1012 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1013 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1014 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1015
1016 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1017
1018 * i387-fp.c (i387_cache_to_xsave): In look over
1019 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1020 zmmh_low_space field by use of zmmh_high_space.
1021
1022 2015-01-09 Pedro Alves <palves@redhat.com>
1023
1024 * linux-low.c (step_over_bkpt): Move higher up in the file.
1025 (handle_extended_wait): Don't store the stop_pc here.
1026 (get_stop_pc): Adjust comments and rename to ...
1027 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1028 stopped for a software breakpoint or hardware breakpoint.
1029 (thread_still_has_status_pending_p): New function.
1030 (status_pending_p_callback): Use
1031 thread_still_has_status_pending_p. If the event is no longer
1032 interesting, resume the LWP.
1033 (handle_tracepoints): Add assert.
1034 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1035 (wstatus_maybe_breakpoint): New function.
1036 (cancel_breakpoint): Delete function.
1037 (check_stopped_by_watchpoint): New function, factored out from
1038 linux_low_filter_event.
1039 (lp_status_maybe_breakpoint): Delete function.
1040 (linux_low_filter_event): Remove filter_ptid argument.
1041 Leave thread group exits pending here. Store the LWP's stop PC.
1042 Always leave events pending.
1043 (linux_wait_for_event_filtered): Pull all events out of the
1044 kernel, and leave them all pending.
1045 (count_events_callback, select_event_lwp_callback): Consider all
1046 events.
1047 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1048 (select_event_lwp): Only give preference to the stepping LWP in
1049 all-stop mode. Adjust comments.
1050 (ignore_event): New function.
1051 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1052 references to cancel_breakpoints. Adjust to renames. Also give
1053 equal priority to all LWPs that have had events in non-stop mode.
1054 If reporting a software breakpoint event, unadjust the LWP's PC.
1055 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1056 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1057 Adjust.
1058 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1059 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1060 (linux_stopped_by_watchpoint): Adjust.
1061 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1062 * linux-low.h (enum lwp_stop_reason): New.
1063 (struct lwp_info) <stop_pc>: Adjust comment.
1064 <stopped_by_watchpoint>: Delete field.
1065 <stop_reason>: New field.
1066 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1067 * mem-break.c (software_breakpoint_inserted_here)
1068 (hardware_breakpoint_inserted_here): New function.
1069 * mem-break.h (software_breakpoint_inserted_here)
1070 (hardware_breakpoint_inserted_here): Declare.
1071 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1072 (cancel_breakpoints): Delete.
1073 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1074 (upload_fast_traceframes): Remove references to
1075 cancel_breakpoints.
1076
1077 2015-01-09 Pedro Alves <palves@redhat.com>
1078
1079 * thread-db.c (find_new_threads_callback): Ignore thread if the
1080 kernel thread ID is -1.
1081
1082 2015-01-09 Pedro Alves <palves@redhat.com>
1083
1084 * linux-low.c (linux_attach_fail_reason_string): Move to
1085 nat/linux-ptrace.c, and rename.
1086 (linux_attach_lwp): Update comment.
1087 (attach_proc_task_lwp_callback): New function.
1088 (linux_attach): Adjust to rename and use
1089 linux_proc_attach_tgid_threads.
1090 (linux_attach_fail_reason_string): Delete declaration.
1091
1092 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1093
1094 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1095 * server.c (gdbserver_version): Likewise.
1096
1097 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1098
1099 * remote-utils.c: Include ctype.h.
1100 (input_interrupt): Explicitly handle the case when the char
1101 received is the NUL byte. Improve the printing of non-ASCII
1102 characters.
1103
1104 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1105
1106 * linux-low.c (linux_low_filter_event): Update call to
1107 linux_enable_event_reporting following the addition of
1108 a new parameter to that function.
1109
1110 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1111
1112 PR server/17457
1113 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1114 (AARCH64_FPCR_REGNO): Likewise.
1115 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1116 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1117 (aarch64_store_fpregset): Likewise.
1118
1119 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1120
1121 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1122 Remove FIXME comment about assumption about N.
1123
1124 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1125
1126 * configure.ac: If large-file support is disabled in GDBserver,
1127 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1128 * configure: Regenerate.
1129
1130 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1131
1132 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1133 warning upon ENODATA from ptrace.
1134 * linux-s390-low.c (s390_store_tdb): New.
1135 (s390_regsets): Add regset for NT_S390_TDB.
1136
1137 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1138
1139 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1140 without a fill_function.
1141 * linux-s390-low.c (s390_fill_last_break): Remove.
1142 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1143 (s390_arch_setup): Use regset's size instead of fill_function for
1144 loop end condition.
1145
1146 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1147
1148 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1149 the regset's store function when ptrace returned an error.
1150 * regcache.c (get_thread_regcache): Invalidate register cache
1151 before fetching inferior's registers.
1152
1153 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1154
1155 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1156 while-loop as for-loop.
1157 (regsets_store_inferior_registers): Likewise.
1158
1159 2014-11-28 Yao Qi <yao@codesourcery.com>
1160
1161 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1162 * config.in, configure: Re-generate.
1163 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1164 is defined.
1165
1166 2014-11-21 Yao Qi <yao@codesourcery.com>
1167
1168 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1169 (AC_CHECK_HEADERS): Remove malloc.h.
1170 * configure: Re-generated.
1171 * config.in: Re-generated.
1172 * server.h: Don't include alloca.h and malloc.h.
1173 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1174 Don't include malloc.h.
1175
1176 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1177
1178 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1179 corresponding ERRNO check in same block.
1180
1181 2014-11-12 Pedro Alves <palves@redhat.com>
1182
1183 * server.c (cont_thread): Update comment.
1184 (start_inferior, attach_inferior): No longer clear cont_thread.
1185 (handle_v_cont): No longer set cont_thread.
1186 (captured_main): Clear cont_thread each time a GDB connects.
1187
1188 2014-11-12 Pedro Alves <palves@redhat.com>
1189
1190 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1191 thread, and don't resume all threads if the Hc thread has exited.
1192
1193 2014-11-12 Pedro Alves <palves@redhat.com>
1194
1195 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1196 the process group instead of to a specific LWP.
1197
1198 2014-10-15 Pedro Alves <palves@redhat.com>
1199
1200 PR server/17487
1201 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1202 parameter.
1203 (arm_set_thread_context): Delete.
1204 (the_low_target): Adjust.
1205 * win32-i386-low.c (debug_registers_changed)
1206 (debug_registers_used): Delete.
1207 (update_debug_registers_callback): New function.
1208 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1209 needing to update their debug registers.
1210 (win32_get_current_dr): New function.
1211 (x86_dr_low_get_addr, x86_dr_low_get_control)
1212 (x86_dr_low_get_status): Fetch the debug register from the thread
1213 record's context.
1214 (i386_initial_stuff): Adjust.
1215 (i386_get_thread_context): Remove current_event parameter. Don't
1216 clear debug_registers_changed nor copy DR values to
1217 debug_reg_state.
1218 (i386_set_thread_context): Delete.
1219 (i386_prepare_to_resume): New function.
1220 (i386_thread_added): Mark the thread as needing to update irs
1221 debug registers.
1222 (the_low_target): Remove i386_set_thread_context and install
1223 i386_prepare_to_resume.
1224 * win32-low.c (win32_get_thread_context): Adjust.
1225 (win32_set_thread_context): Use SetThreadContext
1226 directly.
1227 (win32_prepare_to_resume): New function.
1228 (win32_require_context): New function, factored out from ...
1229 (thread_rec): ... this.
1230 (continue_one_thread): Call win32_prepare_to_resume on each thread
1231 we're about to continue.
1232 (win32_resume): Call win32_prepare_to_resume on the event thread.
1233 * win32-low.h (struct win32_thread_info)
1234 <debug_registers_changed>: New field.
1235 (struct win32_target_ops): Change prototype of set_thread_context,
1236 delete set_thread_context and add prepare_to_resume.
1237 (win32_require_context): New declaration.
1238
1239 2014-10-08 Gary Benson <gbenson@redhat.com>
1240
1241 * server.h: Do not include common-exceptions.h.
1242
1243 2014-10-08 Gary Benson <gbenson@redhat.com>
1244
1245 * server.h: Do not include cleanups.h.
1246
1247 2014-09-30 James Hogan <james.hogan@imgtec.com>
1248
1249 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1250 mips64-dsp-linux.c.
1251
1252 2014-09-23 Yao Qi <yao@codesourcery.com>
1253
1254 * linux-low.c (lp_status_maybe_breakpoint): New function.
1255 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1256 (count_events_callback): Likewise.
1257 (select_event_lwp_callback): Likewise.
1258 (cancel_breakpoints_callback): Likewise.
1259
1260 2014-09-19 Don Breazeal <donb@codesourcery.com>
1261
1262 * linux-low.c (handle_extended_wait): Call
1263 linux_ptrace_get_extended_event.
1264 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1265 linux_is_extended_waitstatus.
1266
1267 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1268
1269 * Makefile.in (CPPFLAGS): Define.
1270 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1271 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1272
1273 2014-09-16 Gary Benson <gbenson@redhat.com>
1274
1275 * inferiors.h (current_inferior): Renamed as...
1276 (current_thread): New variable. All uses updated.
1277 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1278 (maybe_move_out_of_jump_pad): Likewise.
1279 (cancel_breakpoint): Likewise.
1280 (linux_low_filter_event): Likewise.
1281 (wait_for_sigstop): Likewise.
1282 (linux_resume_one_lwp): Likewise.
1283 (need_step_over_p): Likewise.
1284 (start_step_over): Likewise.
1285 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1286 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1287 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1288 and save_inferior as saved_thread.
1289 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1290 saved_thread.
1291 (regcache_invalidate_thread): Likewise.
1292 * remote-utils.c (prepare_resume_reply): Likewise.
1293 * thread-db.c (thread_db_get_tls_address): Likewise.
1294 (disable_thread_event_reporting): Likewise.
1295 (remove_thread_event_breakpoints): Likewise.
1296 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1297 as saved_thread.
1298 * target.h (set_desired_inferior): Renamed as...
1299 (set_desired_thread): New declaration. All uses updated.
1300 * server.c (myresume): Updated comment to reference thread instead
1301 of inferior.
1302 (handle_serial_event): Likewise.
1303 (handle_target_event): Likewise.
1304
1305 2014-09-12 Tom Tromey <tromey@redhat.com>
1306 Gary Benson <gbenson@redhat.com>
1307
1308 * regcache.h: Include common-regcache.h.
1309 (regcache_read_pc): Don't declare.
1310 * regcache.c (get_thread_regcache_for_ptid): New function.
1311
1312 2014-09-11 Tom Tromey <tromey@redhat.com>
1313 Gary Benson <gbenson@redhat.com>
1314
1315 * symbol.c: New file.
1316 * Makefile.in (SFILES): Add symbol.c.
1317 (OBS): Add symbol.o.
1318
1319 2014-09-11 Gary Benson <gbenson@redhat.com>
1320
1321 * target.c (target_stop_ptid, target_continue_ptid): New
1322 functions.
1323
1324 2014-09-11 Tom Tromey <tromey@redhat.com>
1325 Gary Benson <gbenson@redhat.com>
1326
1327 * target.h: Include target/target.h.
1328 * target.c (target_read_memory, target_read_uint32)
1329 (target_write_memory): New functions.
1330
1331 2014-09-11 Gary Benson <gbenson@redhat.com>
1332
1333 * server.h (debug_hw_points): Don't declare.
1334 * server.c (debug_hw_points): Don't define. Replace all uses
1335 with show_debug_regs.
1336 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1337 all uses with show_debug_regs.
1338
1339 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1340
1341 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1342 endianness into account.
1343 (ppc_supply_ptrace_register): Likewise.
1344
1345 2014-09-03 James Hogan <james.hogan@imgtec.com>
1346
1347 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1348 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1349
1350 2014-09-03 Gary Benson <gbenson@redhat.com>
1351
1352 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1353 ALL_DEBUG_ADDRESS_REGISTERS.
1354
1355 2014-09-02 Gary Benson <gbenson@redhat.com>
1356
1357 * i386-low.h: Renamed as...
1358 * x86-low.h: New file. All type, function and variable name
1359 prefixes changed from "i386_" to "x86_". All references updated.
1360 * i386-low.c: Renamed as...
1361 * x86-low.c: New file. All type, function and variable name
1362 prefixes changed from "i386_" to "x86_". All references updated.
1363
1364 2014-09-02 Gary Benson <gbenson@redhat.com>
1365
1366 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1367 (x86_linux_new_thread): Likewise.
1368
1369 2014-08-29 Gary Benson <gbenson@redhat.com>
1370
1371 * server.h (setjmp.h): Do not include.
1372 (toplevel): Do not declare.
1373 (common-exceptions.h): Include.
1374 (cleanups.h): Likewise.
1375 * server.c (toplevel): Do not define.
1376 (exit_code): New static global.
1377 (detach_or_kill_for_exit_cleanup): New function.
1378 (main): New function. Original main renamed to...
1379 (captured_main): New function.
1380 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1381
1382 2014-08-29 Gary Benson <gbenson@redhat.com>
1383
1384 * Makefile.in (SFILES): Add common/common-exceptions.c.
1385 (OBS): Add common-exceptions.o.
1386 (common-exceptions.o): New rule.
1387 * utils.c (prepare_to_throw_exception): New function.
1388
1389 2014-08-29 Gary Benson <gbenson@redhat.com>
1390
1391 * config.in: Regenerate.
1392 * configure: Likewise.
1393
1394 2014-08-29 Gary Benson <gbenson@redhat.com>
1395
1396 * Makefile.in (SFILES): Add common/cleanups.c.
1397 (OBS): cleanups.o.
1398 (cleanups.o): New rule.
1399
1400 2014-08-29 Gary Benson <gbenson@redhat.com>
1401
1402 * utils.c (internal_vwarning): New function.
1403
1404 2014-08-28 Gary Benson <gbenson@redhat.com>
1405
1406 * utils.h (fatal): Remove declaration.
1407 * utils.c (fatal): Remove function.
1408
1409 2014-08-28 Gary Benson <gbenson@redhat.com>
1410
1411 * tracepoint.c (gdb_agent_init): Replace fatal with
1412 perror_with_name.
1413 (initialize_tracepoint): Likewise.
1414
1415 2014-08-28 Gary Benson <gbenson@redhat.com>
1416
1417 * remote-utils.c (remote_prepare): Replace fatal with error.
1418
1419 2014-08-28 Gary Benson <gbenson@redhat.com>
1420
1421 * linux-low.c (linux_async): Replace fatal with warning.
1422 Tidy up and return.
1423 (linux_start_non_stop): Return -1 if linux_async failed.
1424
1425 2014-08-28 Gary Benson <gbenson@redhat.com>
1426
1427 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1428 gdb_assert.
1429 (i386_dr_low_get_addr): Remove vague comment.
1430 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1431 gdb_assert.
1432
1433 2014-08-28 Gary Benson <gbenson@redhat.com>
1434
1435 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1436 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1437 internal_error.
1438 (linux_resume_one_lwp): Likewise.
1439 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1440 gdb_assert.
1441 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1442 with internal_error.
1443 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1444 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1445 (find_register_by_name): Replace fatal with internal_error.
1446 (find_regno): Likewise.
1447 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1448 * thread-db.c (thread_db_create_event): Likewise.
1449 (thread_db_load_search): Likewise.
1450 (try_thread_db_load_1): Likewise.
1451 * tracepoint.c (get_jump_space_head): Replace fatal with
1452 internal_error.
1453 (claim_trampoline_space): Likewise.
1454 (have_fast_tracepoint_trampoline_buffer): Likewise.
1455 (cmd_qtstart): Likewise.
1456 (stop_tracing): Likewise.
1457 (fast_tracepoint_collecting): Likewise.
1458 (target_malloc): Likewise.
1459 (download_tracepoint): Likewise.
1460 (download_trace_state_variables): Replace check with gdb_assert.
1461 (upload_fast_traceframes): Replace fatal with internal_error.
1462
1463 2014-08-19 Tom Tromey <tromey@redhat.com>
1464 Gary Benson <gbenson@redhat.com>
1465
1466 * Makefile.in (SFILES): Add common/common-debug.c.
1467 (OBS): Add common-debug.o.
1468 (common-debug.o): New rule.
1469 * debug.h (debug_printf): Don't declare.
1470 * debug.c (debug_printf): Renamed and rewritten as...
1471 (debug_vprintf): New function.
1472
1473 2014-08-19 Gary Benson <gbenson@redhat.com>
1474
1475 * utils.h: Do not include print-utils.h.
1476
1477 2014-08-19 Tom Tromey <tromey@redhat.com>
1478 Gary Benson <gbenson@redhat.com>
1479
1480 * server.h: Add static assertion.
1481 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1482
1483 2014-08-19 Tom Tromey <tromey@redhat.com>
1484 Gary Benson <gbenson@redhat.com>
1485
1486 * Makefile.in (SFILES): Add common/errors.c.
1487 (OBS): Add errors.o.
1488 (IPA_OBS): Add errors-ipa.o.
1489 (errors.o): New rule.
1490 (errors-ipa.o): Likewise.
1491 * utils.h (perror_with_name, error, warning): Don't declare.
1492 * utils.c (warning): Renamed and rewritten as...
1493 (vwarning): New function.
1494 (error): Renamed and rewritten as...
1495 (verror): New function.
1496 (internal_error): Renamed and rewritten as...
1497 (internal_verror): New function.
1498
1499 2014-08-07 Gary Benson <gbenson@redhat.com>
1500
1501 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1502 * configure: Regenerate.
1503 * config.in: Likewise.
1504 * server.h: Do not include errno.h.
1505 * event-loop.c: Likewise.
1506 * hostio-errno.c: Likewise.
1507 * linux-low.c: Likewise.
1508 * remote-utils.c: Likewise.
1509 * spu-low.c: Likewise.
1510 * utils.c: Likewise.
1511 * gdbreplay.c: Unconditionally include errno.h.
1512
1513 2014-08-07 Gary Benson <gbenson@redhat.com>
1514
1515 * server.h: Do not include string.h.
1516 * event-loop.c: Likewise.
1517 * linux-low.c: Likewise.
1518 * regcache.c: Likewise.
1519 * remote-utils.c: Likewise.
1520 * spu-low.c: Likewise.
1521 * utils.c: Likewise.
1522
1523 2014-08-07 Gary Benson <gbenson@redhat.com>
1524
1525 * server.h: Do not include gdb_assert.h.
1526
1527 2014-08-07 Gary Benson <gbenson@redhat.com>
1528
1529 * server.h: Do not include common-utils.h.
1530
1531 2014-08-07 Gary Benson <gbenson@redhat.com>
1532
1533 * server.h: Do not include ptid.h.
1534 * notif.h: Likewise.
1535
1536 2014-08-07 Gary Benson <gbenson@redhat.com>
1537
1538 * server.h: Do not include gdb_locale.h.
1539
1540 2014-08-07 Gary Benson <gbenson@redhat.com>
1541
1542 * server.h: Do not include gdb/signals.h.
1543 * win32-low.c: Likewise.
1544
1545 2014-08-07 Gary Benson <gbenson@redhat.com>
1546
1547 * server.h: Do not include pathmax.h.
1548
1549 2014-08-07 Gary Benson <gbenson@redhat.com>
1550
1551 * server.h: Do not include libiberty.h.
1552 * linux-bfin-low.c: Likewise.
1553
1554 2014-08-07 Gary Benson <gbenson@redhat.com>
1555
1556 * server.h: Do not include ansidecl.h.
1557
1558 2014-08-07 Gary Benson <gbenson@redhat.com>
1559
1560 * linux-x86-low.c: Do not include stddef.h.
1561 * lynx-ppc-low.c: Likewise.
1562 * tracepoint.c: Likewise.
1563
1564 2014-08-07 Gary Benson <gbenson@redhat.com>
1565
1566 * server.h: Do not include stdarg.h.
1567 * nto-low.c: Likewise.
1568
1569 2014-08-07 Gary Benson <gbenson@redhat.com>
1570
1571 * server.h: Do not include stdlib.h.
1572 * inferiors.c: Likewise.
1573 * linux-low.c: Likewise.
1574 * regcache.c: Likewise.
1575 * spu-low.c: Likewise.
1576 * tracepoint.c: Likewise.
1577 * utils.c: Likewise.
1578
1579 2014-08-07 Gary Benson <gbenson@redhat.com>
1580
1581 * server.h: Do not include stdio.h.
1582 * linux-low.c: Likewise.
1583 * remote-utils.c: Likewise.
1584 * spu-low.c: Likewise.
1585 * utils.c: Likewise.
1586 * wincecompat.c: Likewise.
1587
1588 2014-08-06 Gary Benson <gbenson@redhat.com>
1589
1590 * regcache.c (init_register_cache): Move conditionals inside if.
1591
1592 2014-08-06 Gary Benson <gbenson@redhat.com>
1593
1594 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1595
1596 2014-07-31 Gary Benson <gbenson@redhat.com>
1597
1598 * ax.h: Do not include server.h.
1599 * gdbthread.h: Likewise.
1600 * lynx-low.h: Likewise.
1601 * notif.h: Likewise.
1602
1603 2014-07-30 Gary Benson <gbenson@redhat.com>
1604
1605 * server.h: Include common-defs.h.
1606 Do not include config.h or build-gnulib-gdbserver/config.h.
1607
1608 2014-07-30 Gary Benson <gbenson@redhat.com>
1609
1610 * hostio-errno.c: Move server.h to top of includes list.
1611 * inferiors.c: Likewise.
1612 * linux-x86-low.c: Likewise.
1613 * notif.c: Include server.h.
1614
1615 2014-07-24 Tom Tromey <tromey@redhat.com>
1616 Gary Benson <gbenson@redhat.com>
1617
1618 * server.h (CORE_ADDR): Now unsigned.
1619
1620 2014-07-16 Pedro Alves <palves@redhat.com>
1621
1622 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1623
1624 2014-07-15 Pedro Alves <palves@redhat.com>
1625
1626 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1627 copy.
1628
1629 2014-07-11 Pedro Alves <palves@redhat.com>
1630
1631 * linux-low.c (kill_wait_lwp): New function, based on
1632 kill_one_lwp_callback, but use my_waitpid directly.
1633 (kill_one_lwp_callback, linux_kill): Use it.
1634
1635 2014-06-23 Pedro Alves <palves@redhat.com>
1636
1637 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1638 before setting DR0..DR3.
1639
1640 2014-06-20 Gary Benson <gbenson@redhat.com>
1641
1642 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1643 * configure: Regenerated.
1644 * config.in: Likewise.
1645
1646 2014-06-20 Gary Benson <gbenson@redhat.com>
1647
1648 * Makefile.in (SFILES): Update locations for files moved
1649 from common to nat.
1650 (object file files): Reordered.
1651
1652 2014-06-20 Gary Benson <gbenson@redhat.com>
1653
1654 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1655 (i386_dr_low_set_addr): Likewise.
1656 (i386_dr_low_get_addr): Likewise.
1657 (i386_dr_low_can_set_control): Likewise.
1658 (i386_dr_low_set_control): Likewise.
1659 (i386_dr_low_get_control): Likewise.
1660 (i386_dr_low_get_status): Likewise.
1661 (i386_get_debug_register_length): Likewise.
1662 * linux-x86-low.c (i386_dr_low_set_addr):
1663 Changed signature. Made static.
1664 (i386_dr_low_get_addr): Likewise.
1665 (i386_dr_low_set_control): Likewise.
1666 (i386_dr_low_get_control): Likewise.
1667 (i386_dr_low_get_status): Likewise.
1668 (i386_dr_low): New global variable.
1669 * win32-i386-low.c (i386_dr_low_set_addr):
1670 Changed signature. Made static.
1671 (i386_dr_low_get_addr): Likewise.
1672 (i386_dr_low_set_control): Likewise.
1673 (i386_dr_low_get_control): Likewise.
1674 (i386_dr_low_get_status): Likewise.
1675 (i386_dr_low): New global variable.
1676
1677 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1678
1679 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1680 * Makefile.in (AR, AR_FLAGS): Define.
1681 * configure: Regenerate.
1682
1683 2014-06-19 Gary Benson <gbenson@redhat.com>
1684
1685 * Makefile.in (i386-dregs.o): New rule.
1686 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1687 * i386-low.c (target.h): Remove include.
1688 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1689 (DR_CONTROL_SHIFT): Likewise.
1690 (DR_CONTROL_SIZE): Likewise.
1691 (DR_RW_EXECUTE): Likewise.
1692 (DR_RW_WRITE): Likewise.
1693 (DR_RW_READ): Likewise.
1694 (DR_RW_IORW): Likewise.
1695 (DR_LEN_1): Likewise.
1696 (DR_LEN_2): Likewise.
1697 (DR_LEN_4): Likewise.
1698 (DR_LEN_8): Likewise.
1699 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1700 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1701 (DR_ENABLE_SIZE): Likewise.
1702 (DR_LOCAL_SLOWDOWN): Likewise.
1703 (DR_GLOBAL_SLOWDOWN): Likewise.
1704 (DR_CONTROL_RESERVED): Likewise.
1705 (I386_DR_CONTROL_MASK): Likewise.
1706 (I386_DR_VACANT): Likewise.
1707 (I386_DR_LOCAL_ENABLE): Likewise.
1708 (I386_DR_GLOBAL_ENABLE): Likewise.
1709 (I386_DR_DISABLE): Likewise.
1710 (I386_DR_SET_RW_LEN): Likewise.
1711 (I386_DR_GET_RW_LEN): Likewise.
1712 (I386_DR_WATCH_HIT): Likewise.
1713 (i386_wp_op_t): Likewise.
1714 (i386_show_dr): Likewise.
1715 (i386_length_and_rw_bits): Likewise.
1716 (i386_insert_aligned_watchpoint): Likewise.
1717 (i386_remove_aligned_watchpoint): Likewise.
1718 (i386_handle_nonaligned_watchpoint): Likewise.
1719 i386_update_inferior_debug_regs(): Likewise.
1720 (i386_dr_insert_watchpoint): Likewise.
1721 (i386_dr_remove_watchpoint): Likewise.
1722 (i386_dr_region_ok_for_watchpoint): Likewise.
1723 (i386_dr_stopped_data_address): Likewise.
1724 (i386_dr_stopped_by_watchpoint): Likewise.
1725
1726 2014-06-19 Gary Benson <gbenson@redhat.com>
1727
1728 * i386-low.c (i386_dr_show): Renamed to
1729 i386_show_dr and made static. All uses updated.
1730 (i386_dr_length_and_rw_bits): Renamed to
1731 i386_length_and_rw_bits and made static.
1732 All uses updated.
1733 (i386_dr_insert_aligned_watchpoint): Renamed to
1734 i386_insert_aligned_watchpoint and made static.
1735 All uses updated.
1736 (i386_dr_remove_aligned_watchpoint): Renamed to
1737 i386_remove_aligned_watchpoint and made static.
1738 All uses updated.
1739 (i386_dr_update_inferior_debug_regs): Renamed to
1740 i386_update_inferior_debug_regs and made static.
1741 All uses updated.
1742
1743 2014-06-18 Gary Benson <gbenson@redhat.com>
1744
1745 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1746 (i386_dr_low_can_set_control): Likewise.
1747 (i386_get_debug_register_length): Likewise.
1748 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1749 (i386_dr_low_can_set_control): Likewise.
1750 (i386_get_debug_register_length): Likewise.
1751
1752 2014-06-17 Gary Benson <gbenson@redhat.com>
1753
1754 * i386-low.h (i386-dregs.h): New include.
1755 (DR_FIRSTADDR): Now in i386-dregs.h.
1756 (DR_LASTADDR): Likewise.
1757 (DR_NADDR): Likewise.
1758 (DR_STATUS): Likewise.
1759 (DR_CONTROL): Likewise.
1760 (i386_debug_reg_state): Likewise.
1761 (i386_dr_insert_watchpoint): Likewise.
1762 (i386_dr_remove_watchpoint): Likewise.
1763 (i386_dr_region_ok_for_watchpoint): Likewise.
1764 (i386_dr_stopped_data_address): Likewise.
1765 (i386_dr_stopped_by_watchpoint): Likewise.
1766 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1767
1768 2014-06-18 Gary Benson <gbenson@redhat.com>
1769
1770 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1771 i386_dr_insert_watchpoint.
1772 (i386_low_remove_watchpoint): Renamed to
1773 i386_dr_remove_watchpoint.
1774 (i386_low_region_ok_for_watchpoint): Renamed to
1775 i386_dr_region_ok_for_watchpoint.
1776 (i386_low_stopped_data_address): Renamed to
1777 i386_dr_stopped_data_address.
1778 (i386_low_stopped_by_watchpoint): Renamed to
1779 i386_dr_stopped_by_watchpoint.
1780 * i386-low.c (i386_show_dr): Renamed to
1781 i386_dr_show and made nonstatic. All uses updated.
1782 (i386_length_and_rw_bits): Renamed to
1783 i386_dr_length_and_rw_bits and made nonstatic.
1784 All uses updated.
1785 (i386_insert_aligned_watchpoint): Renamed to
1786 i386_dr_insert_aligned_watchpoint and made nonstatic.
1787 All uses updated.
1788 (i386_remove_aligned_watchpoint): Renamed to
1789 i386_dr_remove_aligned_watchpoint and made nonstatic.
1790 All uses updated.
1791 (i386_update_inferior_debug_regs): Renamed to
1792 i386_dr_update_inferior_debug_regs and made nonstatic.
1793 All uses updated.
1794 (i386_low_insert_watchpoint): Renamed to
1795 i386_dr_insert_watchpoint. All uses updated.
1796 (i386_low_remove_watchpoint): Renamed to
1797 i386_dr_remove_watchpoint. All uses updated.
1798 (i386_low_region_ok_for_watchpoint): Renamed to
1799 i386_dr_region_ok_for_watchpoint. All uses updated.
1800 (i386_low_stopped_data_address): Renamed to
1801 i386_dr_stopped_data_address. All uses updated.
1802 (i386_low_stopped_by_watchpoint): Renamed to
1803 i386_dr_stopped_by_watchpoint. All uses updated.
1804
1805 2014-06-18 Gary Benson <gbenson@redhat.com>
1806
1807 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1808 (i386_dr_low_can_set_control): Likewise.
1809 (i386_insert_aligned_watchpoint): New check.
1810
1811 2014-06-18 Gary Benson <gbenson@redhat.com>
1812
1813 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1814 Renamed to state.
1815
1816 2014-06-18 Gary Benson <gbenson@redhat.com>
1817
1818 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1819 instead of fatal and error.
1820 (i386_handle_nonaligned_watchpoint): Likewise.
1821
1822 2014-06-18 Gary Benson <gbenson@redhat.com>
1823
1824 * i386-low.c (i386_get_debug_register_length): New macro.
1825 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1826 (i386_show_dr): Use debug_printf instead of fprintf. Use
1827 phex to format values.
1828
1829 2014-06-18 Gary Benson <gbenson@redhat.com>
1830
1831 * i386-low.h: Comment changes.
1832 * i386-low.c: Likewise.
1833
1834 2014-06-18 Gary Benson <gbenson@redhat.com>
1835
1836 * i386-low.c: Whitespace changes.
1837
1838 2014-06-12 Tom Tromey <tromey@redhat.com>
1839
1840 * utils.c (freeargv): Remove.
1841
1842 2014-06-12 Tom Tromey <tromey@redhat.com>
1843
1844 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1845 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1846 (parse_debug_format_options): Likewise.
1847 (gdbserver_usage): Likewise.
1848 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1849 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1850 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1851 against libiberty.
1852 ($(LIBGNU)): Depend on libiberty.
1853 (all-lib): Recurse into all subdirs.
1854 (install-only): Invoke "install" target in subdirs.
1855 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1856 targets.
1857 * configure: Rebuild.
1858 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1859 for vasprintf, vsnprintf, or gettimeofday.
1860 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1861 srv_tgtobj.
1862
1863 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1864
1865 * development.sh: Delete.
1866 * Makefile.in (config.status): Adjust dependency on development.sh.
1867 * configure.ac: Adjust development.sh source call.
1868 * configure: Regenerate.
1869
1870 2014-06-02 Pedro Alves <palves@redhat.com>
1871
1872 * ax.c (gdb_free_agent_expr): New function.
1873 * ax.h (gdb_free_agent_expr): New declaration.
1874 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1875 list.
1876 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1877 static.
1878 (clear_breakpoint_conditions_and_commands): New function.
1879 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1880 (clear_breakpoint_conditions_and_commands): New declaration.
1881
1882 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1883
1884 * linux-aarch64-low.c (asm/ptrace.h): Include.
1885
1886 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1887
1888 Fix TLS access for -static -pthread.
1889 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1890 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1891 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1892
1893 2014-05-20 Pedro Alves <palves@redhat.com>
1894
1895 * linux-aarch64-low.c (aarch64_insert_point)
1896 (aarch64_remove_point): No longer check whether the type is
1897 supported here. Adjust to new interface.
1898 (the_low_target): Install aarch64_supports_z_point_type as
1899 supports_z_point_type method.
1900 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1901 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1902 instead of a Z packet char. Adjust.
1903 (arm_supports_z_point_type): New function.
1904 (arm_insert_point, arm_remove_point): Adjust to new interface.
1905 (the_low_target): Install arm_supports_z_point_type.
1906 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1907 (cris_insert_point, cris_remove_point): Adjust to new interface.
1908 Don't check whether the type is supported here.
1909 (the_low_target): Install cris_supports_z_point_type.
1910 * linux-low.c (linux_supports_z_point_type): New function.
1911 (linux_insert_point, linux_remove_point): Adjust to new interface.
1912 * linux-low.h (struct linux_target_ops) <insert_point,
1913 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1914 raw_breakpoint pointer parameter.
1915 <supports_z_point_type>: New method.
1916 * linux-mips-low.c (mips_supports_z_point_type): New function.
1917 (mips_insert_point, mips_remove_point): Adjust to new interface.
1918 Use mips_supports_z_point_type.
1919 (the_low_target): Install mips_supports_z_point_type.
1920 * linux-ppc-low.c (the_low_target): Install NULL as
1921 supports_z_point_type method.
1922 * linux-s390-low.c (the_low_target): Install NULL as
1923 supports_z_point_type method.
1924 * linux-sparc-low.c (the_low_target): Install NULL as
1925 supports_z_point_type method.
1926 * linux-x86-low.c (x86_supports_z_point_type): New function.
1927 (x86_insert_point): Adjust to new insert_point interface. Use
1928 insert_memory_breakpoint. Adjust to new
1929 i386_low_insert_watchpoint interface.
1930 (x86_remove_point): Adjust to remove_point interface. Use
1931 remove_memory_breakpoint. Adjust to new
1932 i386_low_remove_watchpoint interface.
1933 (the_low_target): Install x86_supports_z_point_type.
1934 * lynx-low.c (lynx_target_ops): Install NULL as
1935 supports_z_point_type callback.
1936 * nto-low.c (nto_supports_z_point_type): New.
1937 (nto_insert_point, nto_remove_point): Adjust to new interface.
1938 (nto_target_ops): Install nto_supports_z_point_type.
1939 * mem-break.c: Adjust intro comment.
1940 (struct raw_breakpoint) <raw_type, size>: New fields.
1941 <inserted>: Update comment.
1942 <shlib_disabled>: Delete field.
1943 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1944 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1945 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1946 (raw_bkpt_type_to_target_hw_bp_type): New function.
1947 (find_enabled_raw_code_breakpoint_at): New function.
1948 (find_raw_breakpoint_at): New type and size parameters. Use them.
1949 (insert_memory_breakpoint): New function, based off
1950 set_raw_breakpoint_at.
1951 (remove_memory_breakpoint): New function.
1952 (set_raw_breakpoint_at): Reimplement.
1953 (set_breakpoint): New, based on set_breakpoint_at.
1954 (set_breakpoint_at): Reimplement.
1955 (delete_raw_breakpoint): Go through the_target->remove_point
1956 instead of assuming memory breakpoints.
1957 (find_gdb_breakpoint_at): Delete.
1958 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1959 (find_gdb_breakpoint): New function.
1960 (set_gdb_breakpoint_at): Delete.
1961 (z_type_supported): New function.
1962 (set_gdb_breakpoint_1): New function, loosely based off
1963 set_gdb_breakpoint_at.
1964 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1965 (delete_gdb_breakpoint_at): Delete.
1966 (delete_gdb_breakpoint_1): New function, loosely based off
1967 delete_gdb_breakpoint_at.
1968 (delete_gdb_breakpoint): New function.
1969 (clear_gdb_breakpoint_conditions): Rename to ...
1970 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1971 breakpoint.
1972 (add_condition_to_breakpoint): Make static.
1973 (add_breakpoint_condition): Take a struct breakpoint pointer
1974 instead of an address. Adjust.
1975 (gdb_condition_true_at_breakpoint): Rename to ...
1976 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1977 z_type parameter.
1978 (gdb_condition_true_at_breakpoint): Reimplement.
1979 (add_breakpoint_commands): Take a struct breakpoint pointer
1980 instead of an address. Adjust.
1981 (gdb_no_commands_at_breakpoint): Rename to ...
1982 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1983 parameter. Return true if no breakpoint was found. Change debug
1984 output.
1985 (gdb_no_commands_at_breakpoint): Reimplement.
1986 (run_breakpoint_commands): Rename to ...
1987 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1988 and change return type to boolean.
1989 (run_breakpoint_commands): New function.
1990 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1991 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1992 breakpoint. Go through the_target->remove_point instead of
1993 assuming memory breakpoint.
1994 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1995 software and hardware breakpoints.
1996 (reinsert_raw_breakpoint): Go through the_target->insert_point
1997 instead of assuming memory breakpoint.
1998 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1999 software and hardware breakpoints.
2000 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2001 Check both software and hardware breakpoints.
2002 (validate_inserted_breakpoint): Assert the breakpoint is a
2003 software breakpoint. Set the inserted flag to -1 instead of
2004 setting shlib_disabled.
2005 (delete_disabled_breakpoints): Adjust.
2006 (validate_breakpoints): Only validate software breakpoints.
2007 Adjust to inserted flag change.
2008 (check_mem_read, check_mem_write): Skip breakpoint types other
2009 than software breakpoints. Adjust to inserted flag change.
2010 * mem-break.h (enum raw_bkpt_type): New enum.
2011 (raw_breakpoint, struct process_info): Forward declare.
2012 (Z_packet_to_target_hw_bp_type): Delete declaration.
2013 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2014 (set_gdb_breakpoint, delete_gdb_breakpoint)
2015 (clear_breakpoint_conditions): New declarations.
2016 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2017 (breakpoint_inserted_here): Update comment.
2018 (add_breakpoint_condition, add_breakpoint_commands): Replace
2019 address parameter with a breakpoint pointer parameter.
2020 (gdb_breakpoint_here): Update comment.
2021 (delete_gdb_breakpoint_at): Delete.
2022 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2023 * server.c (process_point_options): Take a struct breakpoint
2024 pointer instead of an address. Adjust.
2025 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2026 delete_gdb_breakpoint.
2027 * spu-low.c (spu_target_ops): Install NULL as
2028 supports_z_point_type method.
2029 * target.h: Include mem-break.h.
2030 (struct target_ops) <prepare_to_access_memory>: Update comment.
2031 <supports_z_point_type>: New field.
2032 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2033 instead of a char. Also take a raw breakpoint pointer.
2034 * win32-arm-low.c (the_low_target): Install NULL as
2035 supports_z_point_type.
2036 * win32-i386-low.c (i386_supports_z_point_type): New function.
2037 (i386_insert_point, i386_remove_point): Adjust to new interface.
2038 (the_low_target): Install i386_supports_z_point_type.
2039 * win32-low.c (win32_supports_z_point_type): New function.
2040 (win32_insert_point, win32_remove_point): Adjust to new interface.
2041 (win32_target_ops): Install win32_supports_z_point_type.
2042 * win32-low.h (struct win32_target_ops):
2043 <supports_z_point_type>: New method.
2044 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2045 instead of a char. Also take a raw breakpoint pointer.
2046
2047 2014-05-20 Pedro Alves <palves@redhat.com>
2048
2049 * mem-break.h: Include break-common.h.
2050 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2051 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2052 (Z_packet_to_target_hw_bp_type): New declaration.
2053 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2054 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2055 (Z_PACKET_ACCESS_WP): Delete macros.
2056 (Z_packet_to_hw_type): Delete function.
2057 * i386-low.h: Don't include break-common.h here.
2058 (Z_packet_to_hw_type): Delete declaration.
2059 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2060 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2061 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2062 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2063 * linux-aarch64-low.c: Don't include break-common.h here.
2064 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2065 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2066 (Z_packet_to_target_hw_bp_type): Delete function.
2067 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2068 function.
2069 (mips_insert_point, mips_remove_point): Use
2070 Z_packet_to_target_hw_bp_type.
2071
2072 2014-05-20 Pedro Alves <palves@redhat.com>
2073
2074 * linux-aarch64-low.c: Include break-common.h.
2075 (enum target_point_type): Delete.
2076 (Z_packet_to_point_type): Rename to ...
2077 (Z_packet_to_target_hw_bp_type): ... this, and return a
2078 target_hw_bp_type instead.
2079 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2080 instead of an enum target_point_type.
2081 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2082 breakpoint type.
2083 (aarch64_dr_state_insert_one_point)
2084 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2085 (aarch64_handle_aligned_watchpoint)
2086 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2087 Take an enum target_hw_bp_type instead of an enum
2088 target_point_type.
2089 (aarch64_supports_z_point_type): New function.
2090 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2091 use Z_packet_to_target_hw_bp_type.
2092
2093 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2094
2095 * configure.ac: Only use -Werror by default when DEVELOPMENT
2096 is true.
2097 * configure: Regenerate.
2098
2099 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2100
2101 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2102 * linux-x86-low.c (X86_64_USER_REGS): New.
2103 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2104
2105 2014-04-28 Yao Qi <yao@codesourcery.com>
2106
2107 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2108 name.
2109
2110 2014-04-25 Pedro Alves <palves@redhat.com>
2111
2112 PR server/16255
2113 * linux-low.c (linux_attach_fail_reason_string): New function.
2114 (linux_attach_lwp): Delete.
2115 (linux_attach_lwp_1): Rename to ...
2116 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2117 argument. Remove "initial" parameter. Return int instead of
2118 void. Don't error or warn here.
2119 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2120 failure to attach to the tgid. Call warning when failing to
2121 attach to an lwp.
2122 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2123 argument. Remove "initial" parameter. Return int instead of
2124 void. Don't error or warn here.
2125 (linux_attach_fail_reason_string): New declaration.
2126 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2127 interface change. Use linux_attach_fail_reason_string.
2128
2129 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2130 Walfred Tedeschi <walfred.tedeschi@intel.com>
2131
2132 * Makefile.in: Added rules to handle new files
2133 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2134 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2135 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2136 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2137 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2138 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2139 x32-avx512-linux.o.
2140 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2141 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2142 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2143 i386/x32-avx512.xml.
2144 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2145 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2146 i386/x32-avx512-linux.xml.
2147 * i387-fp.c (num_avx512_k_registers): New constant for number
2148 of K registers.
2149 (num_avx512_zmmh_low_registers): New constant for number of
2150 lower ZMM registers (0-15).
2151 (num_avx512_zmmh_high_registers): New constant for number of
2152 higher ZMM registers (16-31).
2153 (num_avx512_ymmh_registers): New contant for number of higher
2154 YMM registers (ymm16-31 added by avx521 on x86_64).
2155 (num_avx512_xmm_registers): New constant for number of higher
2156 XMM registers (xmm16-31 added by AVX512 on x86_64).
2157 (struct i387_xsave): Add space for AVX512 registers.
2158 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2159 Add code to handle AVX512 registers.
2160 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2161 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2162 prototypei from generated file.
2163 (tdesc_amd64_avx512_linux): Likewise.
2164 (init_registers_x32_avx512_linux): Likewise.
2165 (tdesc_x32_avx512_linux): Likewise.
2166 (init_registers_i386_avx512_linux): Likewise.
2167 (tdesc_i386_avx512_linux): Likewise.
2168 (x86_64_regmap): Add AVX512 registers.
2169 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2170 mask.
2171 (initialize_low_arch): Add code to initialize AVX512 registers.
2172
2173 2014-04-23 Pedro Alves <palves@redhat.com>
2174
2175 * mem-break.c (find_gdb_breakpoint_at): Make static.
2176 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2177
2178 2014-04-23 Pedro Alves <palves@redhat.com>
2179
2180 * i386-low.c: Don't include break-common.h here.
2181 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2182 prototype to take target_hw_bp_type as argument instead of a Z
2183 packet char.
2184 * i386-low.h: Include break-common.h here.
2185 (Z_packet_to_hw_type): Declare.
2186 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2187 prototypes.
2188 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2189 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2190 (x86_remove_point): Convert the packet number to a
2191 target_hw_bp_type before calling i386_low_remove_watchpoint.
2192 * win32-i386-low.c (i386_insert_point): Convert the packet number
2193 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2194 (i386_remove_point): Convert the packet number to a
2195 target_hw_bp_type before calling i386_low_remove_watchpoint.
2196
2197 2014-04-23 Pedro Alves <palves@redhat.com>
2198
2199 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2200
2201 2014-04-10 Pedro Alves <palves@redhat.com>
2202
2203 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2204 Check if the condition or command is NULL before checking if the
2205 breakpoint is known. On success, return true.
2206 * mem-break.h (add_breakpoint_condition): Document return.
2207 (add_breakpoint_commands): Add describing comment.
2208 * server.c (skip_to_semicolon): New function.
2209 (process_point_options): Use it.
2210
2211 2014-04-09 Pedro Alves <palves@redhat.com>
2212
2213 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2214 to lwpid_of.
2215
2216 2014-02-27 Pedro Alves <palves@redhat.com>
2217
2218 PR 12702
2219 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2220 macros.
2221 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2222 output.
2223 (last_thread_of_process_p): Take a PID argument instead of a
2224 thread pointer.
2225 (linux_wait_for_lwp): Delete.
2226 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2227 functions.
2228 (linux_low_filter_event): New function, party factored out from
2229 linux_wait_for_event.
2230 (linux_wait_for_event): Rename to ...
2231 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2232 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2233 sigsuspend. Check for zombie leaders.
2234 (linux_wait_for_event): Reimplement as wrapper around
2235 linux_wait_for_event_filtered.
2236 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2237 a normal or signal exit is seen, it's the whole process exiting.
2238 (wait_for_sigstop): No longer a for_each_inferior callback.
2239 Rewrite on top of linux_wait_for_event_filtered.
2240 (stop_all_lwps): Call wait_for_sigstop directly.
2241 * server.c (resume, handle_target_event): Handle
2242 TARGET_WAITKIND_NO_RESUMED.
2243
2244 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2245
2246 * win32-low.c (psapi_get_dll_name,
2247 * win32_CreateToolhelp32Snapshot): Delete.
2248 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2249 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2250 Delete.
2251 (handle_load_dll): Add function description.
2252 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2253
2254 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2255
2256 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2257 Add comment.
2258 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2259 base address when calling win32_add_one_solib.
2260 (handle_load_dll): Delete local variable load_addr.
2261 Remove 0x1000 offset applied to DLL base address when calling
2262 win32_add_one_solib.
2263 (handle_unload_dll): Add comment.
2264
2265 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2266
2267 * win32-low.c (win32_add_all_dlls): Renames
2268 win32_ensure_ntdll_loaded. Rewrite function documentation.
2269 Adjust implementation to always load all DLLs.
2270 Add 0x1000 offset to DLL base address when calling
2271 win32_add_one_solib.
2272 (child_initialization_done): New static global.
2273 (do_initial_child_stuff): Set child_initialization_done to
2274 zero during child initialization, and 1 after. Replace call
2275 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2276 Add comment.
2277 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2278 (handle_unload_dll): Add function documentation.
2279 (get_child_debug_event): Ignore load and unload DLL events
2280 during child initialization.
2281
2282 2014-02-20 Doug Evans <dje@google.com>
2283
2284 Remove global all_lwps.
2285 * inferiors.h (ptid_of): Move here from linux-low.h.
2286 (pid_of, lwpid_of): Ditto.
2287 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2288 parameter is a struct thread_info * now.
2289 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2290 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2291 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2292 directly.
2293 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2294 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2295 * linux-arm-low.c (update_registers_callback): Update, "entry"
2296 parameter is a struct thread_info * now.
2297 Fetch lwpid from current_inferior directly.
2298 (arm_insert_point): Pass &all_threads to find_inferior instead of
2299 &all_lwps.
2300 (arm_remove_point): Ditto.
2301 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2302 (arm_prepare_to_resume): Fetch pid from thread.
2303 (arm_read_description): Fetch lwpid from current_inferior directly.
2304 * linux-low.c (all_lwps): Delete.
2305 (delete_lwp): Delete call to remove_inferior.
2306 (handle_extended_wait): Fetch lwpid from thread.
2307 (add_lwp): Don't set lwp->entry.id. Remove call to
2308 add_inferior_to_list.
2309 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2310 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2311 (kill_one_lwp_callback): Ditto.
2312 (linux_kill): Don't dereference NULL pointer.
2313 Fetch ptid,lwpid from thread.
2314 (get_detach_signal): Fetch ptid from thread.
2315 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2316 Simplify call to regcache_invalidate_thread.
2317 (delete_lwp_callback): Update, "entry" parameter is a
2318 struct thread_info * now. Fetch pid from thread.
2319 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2320 (status_pending_p_callback): Update, "entry" parameter is a
2321 struct thread_info * now. Fetch ptid from thread.
2322 (find_lwp_pid): Update, "entry" parameter is a
2323 struct thread_info * now.
2324 (linux_wait_for_lwp): Fetch pid from thread.
2325 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2326 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2327 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2328 (dequeue_one_deferred_signal): Ditto.
2329 (cancel_breakpoint): Fetch ptid from current_inferior.
2330 (linux_wait_for_event): Pass &all_threads to find_inferior,
2331 not &all_lwps. Fetch ptid, lwpid from thread.
2332 (count_events_callback): Update, "entry" parameter is a
2333 struct thread_info * now.
2334 (select_singlestep_lwp_callback): Ditto.
2335 (select_event_lwp_callback): Ditto.
2336 (cancel_breakpoints_callback): Ditto.
2337 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2338 not &all_lwps.
2339 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2340 (unsuspend_one_lwp): Update, "entry" parameter is a
2341 struct thread_info * now.
2342 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2343 not &all_lwps.
2344 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2345 Fetch lwpid from thread, not lwp.
2346 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2347 Pass &all_threads to find_inferior, not &all_lwps.
2348 (send_sigstop): Fetch lwpid from thread, not lwp.
2349 (send_sigstop_callback): Update, "entry" parameter is a
2350 struct thread_info * now.
2351 (suspend_and_send_sigstop_callback): Ditto.
2352 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2353 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2354 struct thread_info * now.
2355 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2356 from thread, lwp.
2357 (lwp_running): Update, "entry" parameter is a
2358 struct thread_info * now.
2359 (stop_all_lwps): Fetch ptid from thread.
2360 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2361 (linux_resume_one_lwp): Fetch lwpid from thread.
2362 (linux_set_resume_request): Update, "entry" parameter is a
2363 struct thread_info * now. Fetch pid, lwpid from thread.
2364 (resume_status_pending_p): Update, "entry" parameter is a
2365 struct thread_info * now.
2366 (need_step_over_p): Ditto. Fetch lwpid from thread.
2367 (start_step_over): Fetch lwpid from thread.
2368 (linux_resume_one_thread): Update, "entry" parameter is a
2369 struct thread_info * now. Fetch lwpid from thread.
2370 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2371 (proceed_one_lwp): Update, "entry" parameter is a
2372 struct thread_info * now. Fetch lwpid from thread.
2373 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2374 struct thread_info * now.
2375 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2376 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2377 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2378 directly.
2379 (regsets_store_inferior_registers): Ditto.
2380 (fetch_register, store_register): Ditto.
2381 (linux_read_memory, linux_write_memory): Ditto.
2382 (linux_request_interrupt): Ditto.
2383 (linux_read_auxv): Ditto.
2384 (linux_xfer_siginfo): Ditto.
2385 (linux_qxfer_spu): Ditto.
2386 (linux_qxfer_libraries_svr4): Ditto.
2387 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2388 moved to inferiors.h.
2389 (get_lwp): Delete.
2390 (get_thread_lwp): Update.
2391 (struct lwp_info): Delete member "entry". Simplify comment for
2392 member "thread".
2393 (all_lwps): Delete.
2394 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2395 current_inferior directly.
2396 (update_watch_registers_callback): Update, "entry" parameter is a
2397 struct thread_info * now. Fetch pid from thread.
2398 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2399 (mips_insert_point): Fetch lwpid from current_inferior.
2400 Pass &all_threads to find_inferior, not &all_lwps.
2401 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2402 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2403 directly.
2404 (mips_stopped_data_address): Ditto.
2405 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2406 directly.
2407 * linux-tile-low.c (tile_arch_setup): Ditto.
2408 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2409 (update_debug_registers_callback): Update, "entry" parameter is a
2410 struct thread_info * now. Fetch pid from thread.
2411 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2412 Pass &all_threads to find_inferior, not &all_lwps.
2413 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2414 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2415 Pass &all_threads to find_inferior, not &all_lwps.
2416 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2417 (i386_dr_low_get_status): Ditto.
2418 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2419 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2420 (x86_linux_read_description): Ditto.
2421 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2422
2423 2014-02-20 Doug Evans <dje@google.com>
2424
2425 * inferiors.c (get_first_inferior): Fix buglet.
2426
2427 2014-02-19 Doug Evans <dje@google.com>
2428
2429 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2430 * inferiors.c (add_thread): Change result type to struct thread_info *.
2431 All callers updated.
2432 (add_lwp): Call add_thread here instead of in callers.
2433 All callers updated.
2434 * linux-low.h (get_lwp_thread): Rewrite.
2435 (struct lwp_info): New member "thread".
2436
2437 2014-02-19 Doug Evans <dje@google.com>
2438
2439 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2440 All callers updated.
2441
2442 2014-02-19 Doug Evans <dje@google.com>
2443
2444 * inferiors.c (add_thread): Fix whitespace.
2445
2446 2014-02-19 Doug Evans <dje@google.com>
2447
2448 * dll.c (clear_dlls): Replace accessing list implemention details
2449 with API function.
2450 * gdbthread.h (get_first_thread): Declare.
2451 * inferiors.c (for_each_inferior_with_data): New function.
2452 (get_first_thread): New function.
2453 (find_thread_ptid): Simplify.
2454 (get_first_inferior): New function.
2455 (clear_list): Delete.
2456 (one_inferior_p): New function.
2457 (clear_inferior_list): New function.
2458 (clear_inferiors): Update.
2459 * inferiors.h (for_each_inferior_with_data): Declare.
2460 (clear_inferior_list): Declare.
2461 (one_inferior_p): Declare.
2462 (get_first_inferior): Declare.
2463 * linux-low.c (linux_wait_for_event): Replace accessing list
2464 implemention details with API function.
2465 * server.c (target_running): Ditto.
2466 (accumulate_file_name_length): New function.
2467 (emit_dll_description): New function.
2468 (handle_qxfer_libraries): Replace accessing list implemention
2469 details with API function.
2470 (handle_qxfer_threads_worker): New function.
2471 (handle_qxfer_threads_proper): Replace accessing list implemention
2472 details with API function.
2473 (handle_query): Ditto.
2474 (visit_actioned_threads_callback_ftype): New typedef.
2475 (visit_actioned_threads_data): New struct.
2476 (visit_actioned_threads): Rewrite to be find_inferior callback.
2477 (resume): Call find_inferior.
2478 (handle_status): Replace accessing list implemention
2479 details with API function.
2480 (process_serial_event): Replace accessing list implemention details
2481 with API function.
2482 * target.c (set_desired_inferior): Replace accessing list implemention
2483 details with API function.
2484 * tracepoint.c (same_process_p): New function.
2485 (gdb_agent_about_to_close): Replace accessing list implemention
2486 details with API function.
2487 * win32-low.c (child_delete_thread): Replace accessing list
2488 implemention details with API function.
2489 (match_dll_by_basename): New function.
2490 (dll_is_loaded_by_basename): New function.
2491 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2492 details call to dll_is_loaded_by_basename.
2493
2494 2014-02-19 Doug Evans <dje@google.com>
2495
2496 * dll.h (struct dll_info): Add comment.
2497 * gdbthread.h (struct thread_info): Add comment.
2498 (current_ptid): Simplify.
2499 * inferiors.c (add_process): Update.
2500 (remove_process): Update.
2501 * inferiors.h (struct process_info): Rename member "head" to "entry".
2502 * linux-low.c (delete_lwp): Update.
2503 (add_lwp): Update.
2504 (last_thread_of_process_p): Update.
2505 (kill_one_lwp_callback, linux_kill): Update.
2506 (status_pending_p_callback): Update.
2507 (wait_for_sigstop): Update. Simplify read of ptid.
2508 (start_step_over): Update.
2509 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2510 (get_lwp_thread): Update.
2511 (struct lwp_info): Rename member "head" to "entry".
2512 * regcache.h (inferior_list_entry): Delete.
2513 * server.c (kill_inferior_callback): Update.
2514 (detach_or_kill_inferior_callback): Update.
2515 (print_started_pid): Update.
2516 (print_attached_pid): Update.
2517 (process_serial_event): Simplify read of ptid.
2518 * thread-db.c (thread_db_create_event): Update.
2519 (thread_db_get_tls_address): Update.
2520 * win32-low.c (current_inferior_ptid): Simplify.
2521
2522 2014-02-19 Tom Tromey <tromey@redhat.com>
2523
2524 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2525 argument.
2526 (target_supports_btrace): Update.
2527
2528 2014-02-14 Yao Qi <yao@codesourcery.com>
2529
2530 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2531 (rsp-low-ipa.o): New target.
2532
2533 2014-02-12 Tom Tromey <tromey@redhat.com>
2534
2535 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2536 convert_ascii_to_int.
2537 * regcache.c (registers_to_string): Likewise.
2538 * remote-utils.c (decode_M_packet): Likewise.
2539 * server.c (process_serial_event): Likewise.
2540
2541 2014-02-12 Tom Tromey <tromey@redhat.com>
2542
2543 * server.c (handle_query, handle_v_run): Use hex2bin, not
2544 unhexify.
2545 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2546
2547 2014-02-12 Tom Tromey <tromey@redhat.com>
2548
2549 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2550 convert_int_to_ascii.
2551 * regcache.c (registers_to_string, collect_register_as_string):
2552 Likewise.
2553 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2554 Likewise.
2555 * server.c (process_serial_event): Likewise.
2556 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2557 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2558
2559 2014-02-12 Tom Tromey <tromey@redhat.com>
2560
2561 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2562 bin2hex, not hexify.
2563 * tracepoint.c (cmd_qtstatus): Likewise.
2564
2565 2014-02-12 Tom Tromey <tromey@redhat.com>
2566
2567 * remote-utils.c (monitor_output): Pass explicit length to
2568 hexify.
2569
2570 2014-02-12 Tom Tromey <tromey@redhat.com>
2571
2572 * tracepoint.c: Include rsp-low.h.
2573 * server.c: Include rsp-low.h.
2574 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2575 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2576 declare.
2577 * remote-utils.c: Include rsp-low.h.
2578 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2579 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2580 (convert_int_to_ascii, convert_ascii_to_int): Move to
2581 common/rsp-low.c.
2582 * regcache.c: Include rsp-low.h.
2583 * ax.c: Include rsp-low.h.
2584 * Makefile.in (SFILES): Add common/rsp-low.c.
2585 (OBS): Add rsp-low.o.
2586 (rsp-low.o): New target.
2587
2588 2014-02-12 Tom Tromey <tromey@redhat.com>
2589
2590 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2591 Include print-utils.h.
2592 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2593 (plongest, thirty_two, phex_nz): Remove.
2594 * Makefile.in (SFILES): Add common/print-utils.c.
2595 (OBS): Add print-utils.o.
2596 (print-utils-ipa.o): New target.
2597 (print-utils.o): New target.
2598 (IPA_OBJS): Add print-utils-ipa.o.
2599
2600 2014-02-06 Tom Tromey <tromey@redhat.com>
2601
2602 * Makefile.in (SFILES): Fix indentation.
2603
2604 2014-02-05 Doug Evans <dje@google.com>
2605
2606 * linux-low.c (linux_wait_for_event): Improve comment.
2607 (linux_wait_1): Keep current_inferior in sync with event_child.
2608
2609 2014-01-22 Doug Evans <dje@google.com>
2610
2611 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2612
2613 2014-01-22 Doug Evans <dje@google.com>
2614
2615 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2616 * configure: Regenerate.
2617 * config.in: Regenerate.
2618 * Makefile.in (SFILES): Add debug.c.
2619 (OBS): Add debug.o.
2620 * debug.c: New file.
2621 * debug.h: New file.
2622 * linux-aarch64-low.c (*): Update all debugging printfs to use
2623 debug_printf instead of fprintf.
2624 * linux-arm-low.c (*): Ditto.
2625 * linux-cris-low.c (*): Ditto.
2626 * linux-crisv32-low.c (*): Ditto.
2627 * linux-m32r-low.c (*): Ditto.
2628 * linux-sparc-low.c (*): Ditto.
2629 * linux-x86.c (*): Ditto.
2630 * linux-low.c (*): Ditto.
2631 (linux_wait_1): Add calls to debug_enter, debug_exit.
2632 (linux_wait): Remove redundant debugging printf.
2633 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2634 (linux_resume, unstop_all_lwps): Ditto.
2635 * mem-break.c (*): Update all debugging printfs to use
2636 debug_printf instead of fprintf.
2637 * remote-utils.c (*): Ditto.
2638 * thread-db.c (*): Ditto.
2639 * server.c #include <ctype.h>, "gdb_vecs.h".
2640 (debug_threads): Moved to debug.c.
2641 (*): Update all debugging printfs to use debug_printf instead of
2642 fprintf.
2643 (start_inferior): Replace call to fflush with call to debug_flush.
2644 (monitor_show_help): Mention set debug-format.
2645 (parse_debug_format_options): New function.
2646 (handle_monitor_command): Handle "monitor set debug-format".
2647 (gdbserver_usage): Mention --debug-format.
2648 (main): Parse --debug-format.
2649 * server.h (debug_threads): Declaration moved to debug.h.
2650 #include "debug.h".
2651 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2652 trace_debug_1 that uses debug_printf.
2653 (tracepoint_look_up_symbols): Update all debugging printfs to use
2654 debug_printf instead of fprintf.
2655
2656 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2657
2658 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2659 sys/ptrace.h.
2660
2661 2014-01-17 Pedro Alves <palves@redhat.com>
2662
2663 PR build/16445
2664 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2665 defined after including gdb_proc_service.h.
2666
2667 2014-01-16 Doug Evans <dje@google.com>
2668
2669 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2670 (match_dll): Use it.
2671
2672 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2673
2674 * target.h (target_ops) <read_btrace>: Change parameters and
2675 return type to allow error reporting.
2676 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2677 trace reading errors on.
2678 * linux-low.c (linux_low_read_btrace): Pass trace reading
2679 errors on.
2680 (linux_low_disable_btrace): New.
2681
2682 2014-01-15 Doug Evans <dje@google.com>
2683
2684 * inferiors.c (thread_id_to_gdb_id): Delete.
2685 * inferiors.h (thread_id_to_gdb_id): Delete.
2686
2687 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2688
2689 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2690 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2691 versions.
2692
2693 2014-01-08 Pedro Alves <palves@redhat.com>
2694
2695 * server.c (handle_status): Don't discard previous queued stop
2696 replies or thread's pending status here.
2697 (main) <disconnection>: Do it here instead.
2698
2699 2014-01-08 Pedro Alves <palves@redhat.com>
2700
2701 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2702 * server.c (visit_actioned_threads, handle_pending_status): New
2703 function.
2704 (handle_v_cont): Factor out parts to ...
2705 (resume): ... this new function. If in all-stop, and a thread
2706 being resumed has a pending status, report it without actually
2707 resuming.
2708 (myresume): Adjust to use the new 'resume' function.
2709 (clear_pending_status_callback, set_pending_status_callback)
2710 (find_status_pending_thread_callback): New functions.
2711 (handle_status): Handle the case of multiple threads having
2712 interesting statuses to report. Report threads' real last signal
2713 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2714 with an interesting thread to report the status for, instead of
2715 always reporting the status of the first thread.
2716
2717 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2718
2719 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2720 * gdbreplay.c (gdbreplay_version): Likewise.
2721
2722 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2723
2724 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2725 iov.iov_len with the real length in use.
2726
2727 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2728
2729 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2730 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2731 for all targets that use win32-low.c.
2732 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2733 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2734
2735 2013-12-13 Pedro Alves <palves@redhat.com>
2736
2737 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2738 if equal to TARGET_WAITKIND_LOADED.
2739 * win32-low.c (cached_status): New static global.
2740 (win32_wait): Add declaration.
2741 (do_initial_child_stuff): Flush all initial pending debug events
2742 up to the initial breakpoint.
2743 (win32_wait): If CACHED_STATUS was set, return that instead
2744 of doing a real wait. Remove the code resuming the execution
2745 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2746 during the initial phase. Also remove the code changing
2747 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2748 TARGET_WAITKIND_STOPPED.
2749
2750 2013-12-11 Yao Qi <yao@codesourcery.com>
2751
2752 * notif.c (handle_notif_ack): Return 0 if no notification
2753 matches.
2754
2755 2013-11-20 Doug Evans <dje@google.com>
2756
2757 * linux-low.c (linux_set_resume_request): Fix comment.
2758
2759 2013-11-20 Doug Evans <dje@google.com>
2760
2761 * linux-low.c (resume_status_pending_p): Tweak comment.
2762
2763 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2764
2765 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2766 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2767 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2768 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2769 (srv_amd64_regobj): Add amd64-mpx.o.
2770 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2771 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2772 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2773 * i387-fp.c (num_pl_bnd_register) Added constant.
2774 (num_pl_bnd_cfg_registers) Added constant.
2775 (struct i387_xsave) Added reserved area and MPX fields.
2776 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2777 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2778 function.
2779 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2780 (init_registers_amd64_mpx_linux): Declare new function.
2781 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2782 (x86_64_regmap): Add MPX registers.
2783 (x86_linux_read_description): Add MPX case.
2784 (initialize_low_arch): Initialize MPX targets.
2785
2786 2013-11-18 Tom Tromey <tromey@redhat.com>
2787
2788 * configure: Rebuild.
2789 * configure.ac: Don't check for stdlib.h.
2790 * gdbreplay.c: Unconditionally include stdlib.h.
2791
2792 2013-11-18 Tom Tromey <tromey@redhat.com>
2793
2794 * config.in: Rebuild.
2795 * configure: Rebuild.
2796 * configure.ac: Don't use AC_HEADER_DIRENT.
2797
2798 2013-11-18 Tom Tromey <tromey@redhat.com>
2799
2800 * server.h: Don't check HAVE_STRING_H.
2801 * gdbreplay.c: Don't check HAVE_STRING_H.
2802 * configure: Rebuild.
2803
2804 2013-11-18 Tom Tromey <tromey@redhat.com>
2805
2806 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2807 LIBGNU.
2808
2809 2013-11-08 Tom Tromey <tromey@redhat.com>
2810
2811 * configure, config.in: Rebuild.
2812 * configure.ac: Remove unused configury.
2813
2814 2013-11-08 Tom Tromey <tromey@redhat.com>
2815
2816 * acinclude.m4: Include common.m4, codeset.m4.
2817 * configure, config.in: Rebuild.
2818 * configure.ac: Use GDB_AC_COMMON.
2819
2820 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2821
2822 * linux-s390-low.c (HWCAP_S390_TE): New define.
2823 (s390_arch_setup): Consider the TE field in the HWCAP for
2824 determining 'have_regset_tdb'.
2825
2826 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2827
2828 PR gdb/16014
2829 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2830 call to sizeof.
2831
2832 2013-10-02 Pedro Alves <palves@redhat.com>
2833
2834 * server.c (process_serial_event): Don't output "GDBserver
2835 exiting" if GDB is connected through stdio.
2836 * target.c (mywait): Likewise, be silent if GDB is connected
2837 through stdio.
2838
2839 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2840
2841 * lynx-low.c (lynx_add_threads_after_attach): New function.
2842 (lynx_attach): Remove call to add_thread. Add call to
2843 lynx_add_threads_after_attach instead.
2844
2845 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2846
2847 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2848 * config.in, configure: Regenerated.
2849
2850 2013-09-18 Yao Qi <yao@codesourcery.com>
2851
2852 PR server/15959
2853 * server.c (start_inferior): Clear 'resume_info'.
2854
2855 2013-09-16 Jiong Wang <jiwang@tilera.com>
2856
2857 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2858 for each register.
2859
2860 2013-09-16 Jiong Wang <jiwang@tilera.com>
2861
2862 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2863 linux-tile-low.o to srv_tgtobj.
2864
2865 2013-09-16 Will Newton <will.newton@linaro.org>
2866
2867 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2868 out regs.
2869
2870 2013-09-06 Pedro Alves <palves@redhat.com>
2871
2872 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2873 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2874 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2875 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2876 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2877 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2878
2879 2013-09-06 Pedro Alves <palves@redhat.com>
2880
2881 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2882 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2883
2884 2013-09-06 Pedro Alves <palves@redhat.com>
2885
2886 * linux-amd64-ipa.c: Include tracepoint.h.
2887 * linux-i386-ipa.c: Include tracepoint.h.
2888
2889 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2890
2891 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2892 (ps_get_thread_area): New function.
2893
2894 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2895
2896 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2897 (initialize_low_arch): Call init_registers_crisv32 rather than
2898 init_register_crisv32.
2899
2900 2013-09-05 Pedro Alves <palves@redhat.com>
2901
2902 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2903 to ...
2904 * hostio.h: ... this new file.
2905 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2906 win32-low.c: Include hostio.h.
2907
2908 2013-09-05 Pedro Alves <palves@redhat.com>
2909
2910 * server.h (gdb_client_data, handler_func, callback_handler_func)
2911 (delete_file_handler, add_file_handler, append_callback_event)
2912 (delete_callback_event, start_event_loop, initialize_event_loop):
2913 Move to event-loop.h and include it.
2914 * event-loop.h: New file.
2915
2916 2013-09-05 Pedro Alves <palves@redhat.com>
2917
2918 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2919 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2920 (loaded_dll, unloaded_dll): Move to ...
2921 * dll.h: ... this new file.
2922 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2923
2924 2013-09-05 Pedro Alves <palves@redhat.com>
2925
2926 * server.h (current_process, get_thread_process, all_processes)
2927 (add_inferior_to_list, for_each_inferior, current_inferior)
2928 (remove_inferior, add_process, remove_process, find_process_pid)
2929 (have_started_inferiors_p, have_attached_inferiors_p)
2930 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2931 (clear_inferiors, find_inferior, find_inferior_id)
2932 (inferior_target_data, set_inferior_target_data)
2933 (inferior_regcache_data, set_inferior_regcache_data): Move to
2934 inferiors.h, and include it.
2935 * inferiors.h: New file.
2936
2937 2013-09-05 Pedro Alves <palves@redhat.com>
2938
2939 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2940 Move ...
2941 * ax.h: ... here.
2942
2943 2013-09-05 Pedro Alves <palves@redhat.com>
2944
2945 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2946 tracepoint.h.
2947 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2948 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2949 (handle_tracepoint_general_set, handle_tracepoint_query)
2950 (tracepoint_finished_step, tracepoint_was_hit)
2951 (release_while_stepping_state_list, current_traceframe)
2952 (in_readonly_region, traceframe_read_mem)
2953 (fetch_traceframe_registers, traceframe_read_sdata)
2954 (traceframe_read_info, struct fast_tpoint_collect_status)
2955 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2956 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2957 (supply_fast_tracepoint_registers)
2958 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2959 (ipa_tdesc, claim_trampoline_space)
2960 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2961 (agent_mem_read, agent_get_trace_state_variable_value)
2962 (agent_set_trace_state_variable_value, agent_tsv_read)
2963 (agent_mem_read_string, get_raw_reg_func_addr)
2964 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2965 * tracepoint.h: ... this new file.
2966
2967 2013-09-05 Pedro Alves <palves@redhat.com>
2968
2969 * server.h (perror_with_name, error, fatal, warning, paddress)
2970 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2971 include it.
2972 * utils.h: New file.
2973
2974 2013-09-05 Pedro Alves <palves@redhat.com>
2975
2976 * server.h (remote_debug, noack_mode, transport_is_reliable)
2977 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2978 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2979 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2980 (write_enn, initialize_async_io, enable_async_io)
2981 (disable_async_io, check_remote_input_interrupt_request)
2982 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2983 (dead_thread_notify, prepare_resume_reply)
2984 (decode_address_to_semicolon, decode_address, decode_m_packet)
2985 (decode_M_packet, decode_X_packet, decode_xfer_write)
2986 (decode_search_memory_packet, unhexify, hexify)
2987 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2988 (look_up_one_symbol, relocate_instruction)
2989 (monitor_output): Move to remote-utils.h, and include it.
2990 * remote-utils.h: New file.
2991
2992 2013-09-05 Pedro Alves <palves@redhat.com>
2993
2994 * server.h (_): Delete.
2995
2996 2013-09-02 Pedro Alves <palves@redhat.com>
2997
2998 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2999 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3000 allocated.
3001 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3002
3003 2013-09-02 Pierre Muller <muller@sourceware.org>
3004
3005 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3006 or WriteProcessMemory complete successfully and handle
3007 ERROR_PARTIAL_COPY error.
3008
3009 2013-09-02 Pedro Alves <palves@redhat.com>
3010
3011 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3012 error instead of EIO.
3013
3014 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3015
3016 PR server/15604
3017 * linux-low.c: Include filestuff.h.
3018 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3019 * lynx-low.c: Include filestuff.h.
3020 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3021 * server.c: Include filestuff.h.
3022 (main): Call notice_open_fds.
3023 * spu-low.c: Include filestuff.h.
3024 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3025
3026 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3027
3028 * Makefile.in: Explain why ../target and ../nat are not
3029 listed as include file search paths.
3030 (linux-waitpid.o): New object file rule.
3031 * configure.srv (srv_native_linux_obj): New variable.
3032 Replace all occurrences of linux native object files with
3033 $srv_native_linux_obj.
3034 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3035 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3036 (linux_enable_event_reporting): Remove declaration.
3037 (my_waitpid): Moved to common/linux-waitpid.c.
3038 (linux_wait_for_event): Pass ptid when calling
3039 linux_enable_event_reporting.
3040 (linux_supports_tracefork_flag): Remove.
3041 (linux_enable_event_reporting): Likewise.
3042 (linux_tracefork_grandchild): Remove.
3043 (STACK_SIZE): Moved to common/linux-ptrace.c.
3044 (linux_tracefork_child): Remove.
3045 (linux_test_for_tracefork): Remove.
3046 (linux_look_up_symbols): Call linux_supports_traceclone.
3047 (initialize_low): Remove call to linux_test_for_tracefork.
3048 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3049 common/linux-ptrace.h.
3050 (PTRACE_TYPE_ARG4): Likewise.
3051 Include linux-ptrace.h.
3052
3053 2013-08-21 Pedro Alves <palves@redhat.com>
3054
3055 * config.in: Renegerate.
3056
3057 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3058
3059 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3060 (SFILES): Remove $(srcdir)/common/target-common.c and
3061 add $(srcdir)/target/waitstatus.c.
3062 (OBS): Remove target-common.o and add waitstatus.o.
3063 (server_h): Remove $(srcdir)/../common/target-common.h and
3064 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3065 and $(srcdir)/../target/waitstatus.h.
3066 (target-common.o): Remove.
3067 (waitstatus.o): New target object file.
3068 * target.h: Do not include target-common.h and
3069 include target/resume.h, target/wait.h and
3070 target/waitstatus.h.
3071
3072 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3073
3074 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3075 to PTRACE_TYPE_ARG3.
3076 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3077 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3078 PTRACE_TYPE_ARG4.
3079 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3080 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3081
3082 2013-07-27 Jie Zhang <jie@codesourcery.com>
3083 Daniel Jacobowitz <dan@codesourcery.com>
3084 Yao Qi <yao@codesourcery.com>
3085
3086 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3087 (mips-linux-watch.o): New rule.
3088 (mips_linux_watch_h): New variable.
3089 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3090 srv_tgtobj.
3091 * linux-mips-low.c: Include mips-linux-watch.h.
3092 (struct arch_process_info, struct arch_lwp_info): New.
3093 (update_watch_registers_callback): New function.
3094 (mips_linux_new_process, mips_linux_new_thread) New functions.
3095 (mips_linux_prepare_to_resume, mips_insert_point): New
3096 functions.
3097 (mips_remove_point, mips_stopped_by_watchpoint): New
3098 functions.
3099 (rsp_bp_type_to_target_hw_bp_type): New function.
3100 (mips_stopped_data_address): New function.
3101 (the_low_target): Add watchpoint support functions.
3102
3103 2013-07-27 Yao Qi <yao@codesourcery.com>
3104
3105 * i386-low.c: Include break-common.h.
3106 (enum target_hw_bp_type): Remove.
3107
3108 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3109
3110 * Makefile.in (SFILES): /common/target-common.c.
3111 (OBS): Add target-common.o.
3112 (server_h): Add $(srcdir)/../common/target-common.h.
3113 (target-common.o): New target.
3114 * server.c (queue_stop_reply_callback): Free
3115 status string after use.
3116 * target.c (target_waitstatus_to_string): Remove.
3117 * target.h: Include target-common.h.
3118 (resume_kind): Likewise.
3119 (target_waitkind): Likewise.
3120 (target_waitstatus): Likewise.
3121 (TARGET_WNOHANG): Likewise.
3122
3123 2013-07-04 Yao Qi <yao@codesourcery.com>
3124
3125 * Makefile.in (host_alias): Use @host_noncanonical@.
3126 (target_alias): Use @target_noncanonical@.
3127 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3128 ACX_NONCANONICAL_HOST.
3129 * configure: Regenerated.
3130
3131 Revert:
3132 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3133
3134 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3135 * configure: Rebuild.
3136 * Makefile.in (version_host, version_target): Get from configure.
3137 (version.c): Use $(version_host) and $(version_target).
3138
3139 2013-07-03 Pedro Alves <palves@redhat.com>
3140
3141 * Makefile.in (config.status): Depend on development.sh.
3142 * acinclude.m4: Include libmcheck.m4.
3143 * configure: Regenerate.
3144
3145 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3146
3147 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3148 attribute inside the parentheses.
3149 (winapi_DebugSetProcessKillOnExit): Ditto.
3150 (winapi_DebugBreakProcess): Ditto.
3151 (winapi_GenerateConsoleCtrlEvent): Ditto.
3152
3153 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3154
3155 * notif.h (notif_event): Add a dummy member to avoid compiler
3156 errors.
3157
3158 2013-07-01 Pedro Alves <palves@redhat.com>
3159
3160 * hostio.c (HOSTIO_PATH_MAX): Define.
3161 (require_filename, handle_open, handle_unlink, handle_readlink):
3162 Use it.
3163
3164 2013-07-01 Pedro Alves <palves@redhat.com>
3165
3166 * server.h: Include "pathmax.h".
3167 * linux-low.c: Don't include sys/param.h.
3168 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3169 MAXPATHLEN.
3170 * win32-low.c: Don't include sys/param.h.
3171 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3172
3173 2013-07-01 Pedro Alves <palves@redhat.com>
3174
3175 * event-loop.c: Don't check HAVE_UNISTD_H before including
3176 <unistd.h>.
3177 * gdbreplay.c: Likewise.
3178 * remote-utils.c: Likewise.
3179 * server.c: Likewise.
3180 * configure.ac: Don't check for unistd.h.
3181 * configure: Regenerate.
3182
3183 2013-06-28 Tom Tromey <tromey@redhat.com>
3184
3185 * Makefile.in (version.c): Use version.in, not
3186 common/version.in.
3187
3188 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3189
3190 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3191 * configure: Rebuild.
3192 * Makefile.in (version_host, version_target): Get from configure.
3193 (version.c): Use $(version_host) and $(version_target).
3194
3195 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3196
3197 Fix trace-status to output user name without trailing colon.
3198 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3199
3200 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3201
3202 Fix trace-status to output proper start-time and stop-time.
3203 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3204 output start time and stop time in hex as gdb expects.
3205
3206 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3207
3208 * tracepoint.c (build_traceframe_info_xml): Output trace state
3209 variables present in the trace buffer.
3210
3211 2013-06-24 Tom Tromey <tromey@redhat.com>
3212
3213 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3214 create-version.sh.
3215 (version.o): Remove.
3216 * gdbreplay.c: Include version.h.
3217 (version, host_name): Don't declare.
3218 * server.h: Include version.h.
3219 (version, host_name): Don't declare.
3220
3221 2013-06-12 Pedro Alves <palves@redhat.com>
3222
3223 * linux-x86-low.c (linux_is_elf64): Delete global.
3224 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3225 with local linux_pid_exe_is_elf_64_file use.
3226
3227 2013-06-11 Pedro Alves <palves@redhat.com>
3228
3229 * linux-low.c (regset_disabled, disable_regset): New functions.
3230 (regsets_fetch_inferior_registers)
3231 (regsets_store_inferior_registers): Use them.
3232 (initialize_regsets_info); Don't allocate the disabled_regsets
3233 array here.
3234 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3235 comment.
3236
3237 2013-06-11 Pedro Alves <palves@redhat.com>
3238
3239 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3240 xmalloc.
3241
3242 2013-06-11 Pedro Alves <palves@redhat.com>
3243
3244 * linux-x86-low.c (initialize_low_arch): Call
3245 init_registers_x32_avx_linux.
3246
3247 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3248
3249 Fix compatibility with Android Bionic.
3250 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3251 it is not empty.
3252
3253 2013-06-07 Pedro Alves <palves@redhat.com>
3254
3255 PR server/14823
3256 * Makefile.in (OBS): Add tdesc.o.
3257 (IPA_OBJS): Add tdesc-ipa.o.
3258 (tdesc-ipa.o): New rule.
3259 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3260 interface.
3261 * linux-low.c (new_inferior): Delete.
3262 (disabled_regsets, num_regsets): Delete.
3263 (linux_add_process): Adjust to set the new per-process
3264 new_inferior flag.
3265 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3266 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3267 was a stop. When calling arch_setup, switch the current inferior
3268 to the thread that got an event.
3269 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3270 (regsets_fetch_inferior_registers)
3271 (regsets_store_inferior_registers): New regsets_info parameter.
3272 Adjust to use it.
3273 (linux_register_in_regsets): New regs_info parameter. Adjust to
3274 use it.
3275 (register_addr, fetch_register, store_register): New usrregs_info
3276 parameter. Adjust to use it.
3277 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3278 parameter regs_info. Adjust to use it.
3279 (linux_fetch_registers): Get the current inferior's regs_info, and
3280 adjust to use it.
3281 (linux_store_registers): Ditto.
3282 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3283 (initialize_low): Don't initialize the target_regsets here. Call
3284 initialize_low_arch.
3285 * linux-low.h (target_regsets): Delete declaration.
3286 (struct regsets_info): New.
3287 (struct usrregs_info): New.
3288 (struct regs_info): New.
3289 (struct process_info_private) <new_inferior>: New field.
3290 (struct linux_target_ops): Delete the num_regs, regmap, and
3291 regset_bitmap fields. New field regs_info.
3292 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3293 * i387-fp.c (num_xmm_registers): Delete.
3294 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3295 calls to new interface.
3296 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3297 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3298 Infer the number of xmm registers from the regcache's target
3299 description.
3300 * i387-fp.h (num_xmm_registers): Delete.
3301 * inferiors.c (add_thread): Don't install the thread's regcache
3302 here.
3303 * proc-service.c (gregset_info): Fetch the current inferior's
3304 regs_info. Adjust to use it.
3305 * regcache.c: Include tdesc.h.
3306 (register_bytes, reg_defs, num_registers)
3307 (gdbserver_expedite_regs): Delete.
3308 (get_thread_regcache): If the thread doesn't have a regcache yet,
3309 create one, instead of aborting gdbserver.
3310 (regcache_invalidate_one): Rename to ...
3311 (regcache_invalidate_thread): ... this.
3312 (regcache_invalidate_one): New.
3313 (regcache_invalidate): Only invalidate registers of the current
3314 process.
3315 (init_register_cache): Add target_desc parameter, and use it.
3316 (new_register_cache): Ditto. Assert the target description has a
3317 non zero registers_size.
3318 (regcache_cpy): Add assertions. Adjust.
3319 (realloc_register_cache, set_register_cache): Delete.
3320 (registers_to_string, registers_from_string): Adjust.
3321 (find_register_by_name, find_regno, find_register_by_number)
3322 (register_cache_size): Add target_desc parameter, and use it.
3323 (free_register_cache_thread, free_register_cache_thread_one)
3324 (regcache_release, register_cache_size): New.
3325 (register_size): Add target_desc parameter, and use it.
3326 (register_data, supply_register, supply_register_zeroed)
3327 (supply_regblock, supply_register_by_name, collect_register)
3328 (collect_register_as_string, collect_register_by_name): Adjust.
3329 * regcache.h (struct target_desc): Forward declare.
3330 (struct regcache) <tdesc>: New field.
3331 (init_register_cache, new_register_cache): Add target_desc
3332 parameter.
3333 (regcache_invalidate_thread): Declare.
3334 (regcache_invalidate_one): Delete declaration.
3335 (regcache_release): Declare.
3336 (find_register_by_number, register_cache_size, register_size)
3337 (find_regno): Add target_desc parameter.
3338 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3339 declarations.
3340 * remote-utils.c: Include tdesc.h.
3341 (outreg, prepare_resume_reply): Adjust.
3342 * server.c: Include tdesc.h.
3343 (gdbserver_xmltarget): Delete declaration.
3344 (get_features_xml, process_serial_event): Adjust.
3345 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3346 declare.
3347 (struct process_info) <tdesc>: New field.
3348 (ipa_tdesc): Declare.
3349 * tdesc.c: New file.
3350 * tdesc.h: New file.
3351 * tracepoint.c: Include tdesc.h.
3352 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3353 (get_context_regcache): Adjust to pass ipa_tdesc down.
3354 (do_action_at_tracepoint): Adjust to get the register cache size
3355 from the context regcache's description.
3356 (traceframe_walk_blocks): Adjust to get the register cache size
3357 from the current trace frame's description.
3358 (traceframe_get_pc): Adjust to get current trace frame's
3359 description and pass it down.
3360 (gdb_collect): Adjust to get the register cache size from the
3361 IPA's description.
3362 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3363 (gdbserver_xmltarget): Delete.
3364 (initialize_low_tracepoint): Set the ipa's target description.
3365 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3366 (initialize_low_tracepoint): Set the ipa's target description.
3367 * linux-x86-low.c: Include tdesc.h.
3368 [__x86_64__] (is_64bit_tdesc): New.
3369 (ps_get_thread_area, x86_get_thread_area): Use it.
3370 (i386_cannot_store_register): Rename to ...
3371 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3372 (i386_cannot_fetch_register): Rename to ...
3373 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3374 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3375 to new interface.
3376 (target_regsets): Rename to ...
3377 (x86_regsets): ... this.
3378 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3379 interface.
3380 (x86_siginfo_fixup): Use is_64bit_tdesc.
3381 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3382 (tdesc_x32_avx_linux, tdesc_x32_linux)
3383 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3384 Declare.
3385 (x86_linux_update_xmltarget): Delete.
3386 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3387 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3388 (AMD64_LINUX_USER64_CS): New.
3389 (x86_linux_read_description): New, based on
3390 x86_linux_update_xmltarget.
3391 (same_process_callback): New.
3392 (x86_arch_setup_process_callback): New.
3393 (x86_linux_update_xmltarget): New.
3394 (x86_regsets_info): New.
3395 (amd64_linux_regs_info): New.
3396 (i386_linux_usrregs_info): New.
3397 (i386_linux_regs_info): New.
3398 (x86_linux_regs_info): New.
3399 (x86_arch_setup): Reimplement.
3400 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3401 (x86_emit_ops): Ditto.
3402 (the_low_target): Adjust. Install x86_linux_regs_info,
3403 x86_cannot_fetch_register, and x86_cannot_store_register.
3404 (initialize_low_arch): New.
3405 * linux-ia64-low.c (tdesc_ia64): Declare.
3406 (ia64_fetch_register): Adjust.
3407 (ia64_usrregs_info, regs_info): New globals.
3408 (ia64_regs_info): New function.
3409 (the_low_target): Adjust.
3410 (initialize_low_arch): New function.
3411 * linux-sparc-low.c (tdesc_sparc64): Declare.
3412 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3413 Adjust.
3414 (sparc_arch_setup): New function.
3415 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3416 (the_low_target): Adjust.
3417 (initialize_low_arch): New function.
3418 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3419 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3420 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3421 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3422 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3423 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3424 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3425 (tdesc_powerpc_isa205_vsx64l): Declare.
3426 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3427 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3428 (ppc_set_pc, ppc_get_hwcap): Adjust.
3429 (ppc_usrregs_info): Forward declare.
3430 (!__powerpc64__) ppc_regmap_adjusted: New global.
3431 (ppc_arch_setup): Adjust to the current process'es target
3432 description.
3433 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3434 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3435 (ppc_store_evrregset): Adjust.
3436 (target_regsets): Rename to ...
3437 (ppc_regsets): ... this, and make static.
3438 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3439 (ppc_regs_info): New function.
3440 (the_low_target): Adjust.
3441 (initialize_low_arch): New function.
3442 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3443 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3444 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3445 (tdesc_s390x_linux64v2): Declare.
3446 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3447 (s390_fill_gregset, s390_store_last_break): Adjust.
3448 (target_regsets): Rename to ...
3449 (s390_regsets): ... this, and make static.
3450 (s390_get_pc, s390_set_pc): Adjust.
3451 (s390_get_hwcap): New target_desc parameter, and use it.
3452 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3453 (s390_arch_setup): Adjust to set the current process'es target
3454 description. Don't adjust the regmap.
3455 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3456 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3457 (regs_info_3264): New globals.
3458 (s390_regs_info): New function.
3459 (the_low_target): Adjust.
3460 (initialize_low_arch): New function.
3461 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3462 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3463 [__mips64] (init_registers_mips_linux)
3464 (init_registers_mips_dsp_linux): Delete defines.
3465 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3466 (have_dsp): New global.
3467 (mips_read_description): New, based on mips_arch_setup.
3468 (mips_arch_setup): Reimplement.
3469 (get_usrregs_info): New function.
3470 (mips_cannot_fetch_register, mips_cannot_store_register)
3471 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3472 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3473 (target_regsets): Rename to ...
3474 (mips_regsets): ... this, and make static.
3475 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3476 (dsp_regs_info, regs_info): New globals.
3477 (mips_regs_info): New function.
3478 (the_low_target): Adjust.
3479 (initialize_low_arch): New function.
3480 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3481 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3482 Declare.
3483 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3484 (arm_read_description): New, with bits factored from
3485 arm_arch_setup.
3486 (arm_arch_setup): Reimplement.
3487 (target_regsets): Rename to ...
3488 (arm_regsets): ... this, and make static.
3489 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3490 (arm_regs_info): New function.
3491 (the_low_target): Adjust.
3492 (initialize_low_arch): New function.
3493 * linux-m68k-low.c (tdesc_m68k): Declare.
3494 (target_regsets): Rename to ...
3495 (m68k_regsets): ... this, and make static.
3496 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3497 (m68k_regs_info): New function.
3498 (m68k_arch_setup): New function.
3499 (the_low_target): Adjust.
3500 (initialize_low_arch): New function.
3501 * linux-sh-low.c (tdesc_sharch): Declare.
3502 (target_regsets): Rename to ...
3503 (sh_regsets): ... this, and make static.
3504 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3505 (sh_regs_info, sh_arch_setup): New functions.
3506 (the_low_target): Adjust.
3507 (initialize_low_arch): New function.
3508 * linux-bfin-low.c (tdesc_bfin): Declare.
3509 (bfin_arch_setup): New function.
3510 (bfin_usrregs_info, regs_info): New globals.
3511 (bfin_regs_info): New function.
3512 (the_low_target): Adjust.
3513 (initialize_low_arch): New function.
3514 * linux-cris-low.c (tdesc_cris): Declare.
3515 (cris_arch_setup): New function.
3516 (cris_usrregs_info, regs_info): New globals.
3517 (cris_regs_info): New function.
3518 (the_low_target): Adjust.
3519 (initialize_low_arch): New function.
3520 * linux-cris-low.c (tdesc_crisv32): Declare.
3521 (cris_arch_setup): New function.
3522 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3523 (cris_regs_info): New function.
3524 (the_low_target): Adjust.
3525 (initialize_low_arch): New function.
3526 * linux-m32r-low.c (tdesc_m32r): Declare.
3527 (m32r_arch_setup): New function.
3528 (m32r_usrregs_info, regs_info): New globals.
3529 (m32r_regs_info): Adjust.
3530 (initialize_low_arch): New function.
3531 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3532 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3533 (tic6x_usrregs_info): Forward declare.
3534 (tic6x_read_description): New function, based on ...
3535 (tic6x_arch_setup): ... this. Reimplement.
3536 (target_regsets): Rename to ...
3537 (tic6x_regsets): ... this, and make static.
3538 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3539 (tic6x_regs_info): New function.
3540 (the_low_target): Adjust.
3541 (initialize_low_arch): New function.
3542 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3543 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3544 (target_regsets): Rename to ...
3545 (xtensa_regsets): ... this, and make static.
3546 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3547 globals.
3548 (xtensa_arch_setup, xtensa_regs_info): New functions.
3549 (the_low_target): Adjust.
3550 (initialize_low_arch): New function.
3551 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3552 (nios2_arch_setup): Set the current process'es tdesc.
3553 (target_regsets): Rename to ...
3554 (nios2_regsets): ... this.
3555 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3556 (nios2_regs_info): New function.
3557 (the_low_target): Adjust.
3558 (initialize_low_arch): New function.
3559 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3560 (aarch64_arch_setup): Set the current process'es tdesc.
3561 (target_regsets): Rename to ...
3562 (aarch64_regsets): ... this.
3563 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3564 (aarch64_regs_info): New function.
3565 (the_low_target): Adjust.
3566 (initialize_low_arch): New function.
3567 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3568 globals.
3569 (target_regsets): Rename to ...
3570 (tile_regsets): ... this.
3571 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3572 (tile_regs_info): New function.
3573 (tile_arch_setup): Set the current process'es tdesc.
3574 (the_low_target): Adjust.
3575 (initialize_low_arch): New function.
3576 * spu-low.c (tdesc_spu): Declare.
3577 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3578 * win32-arm-low.c (tdesc_arm): Declare.
3579 (arm_arch_setup): New function.
3580 (the_low_target): Install arm_arch_setup instead of
3581 init_registers_arm.
3582 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3583 (init_windows_x86): Rename to ...
3584 (i386_arch_setup): ... this. Set `win32_tdesc'.
3585 (the_low_target): Adjust.
3586 * win32-low.c (win32_tdesc): New global.
3587 (child_add_thread): Don't create the thread cache here.
3588 (do_initial_child_stuff): Set the new process'es tdesc.
3589 * win32-low.h (struct target_desc): Forward declare.
3590 (win32_tdesc): Declare.
3591 * lynx-i386-low.c (tdesc_i386): Declare global.
3592 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3593 * lynx-low.c (lynx_tdesc): New global.
3594 (lynx_add_process): Set the new process'es tdesc.
3595 * lynx-low.h (struct target_desc): Forward declare.
3596 (lynx_tdesc): Declare global.
3597 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3598 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3599 * nto-low.c (nto_tdesc): New global.
3600 (do_attach): Set the new process'es tdesc.
3601 * nto-low.h (struct target_desc): Forward declare.
3602 (nto_tdesc): Declare.
3603 * nto-x86-low.c (tdesc_i386): Declare.
3604 (nto_x86_arch_setup): Set `nto_tdesc'.
3605
3606 2013-06-04 Gary Benson <gbenson@redhat.com>
3607
3608 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3609 to qSupported response when appropriate.
3610 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3611 with nonzero-length annex.
3612 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3613 arguments supplied in annex.
3614
3615 2013-05-31 Doug Evans <dje@google.com>
3616
3617 PR server/15594
3618 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3619 64 bits in 64-cross-32 environment.
3620
3621 2013-05-28 Pedro Alves <palves@redhat.com>
3622
3623 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3624 (aarch64-without-fpu.c): Delete rule.
3625 * configure.srv (aarch64*-*-linux*): Remove references to
3626 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3627 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3628 declaration.
3629
3630 2013-05-24 Pedro Alves <palves@redhat.com>
3631
3632 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3633 instead of strchr/decode_address. Error if the range isn't split
3634 with a ','. Don't assume there's be a ':' in the action.
3635
3636 2013-05-23 Yao Qi <yao@codesourcery.com>
3637 Pedro Alves <palves@redhat.com>
3638
3639 * linux-low.c (lwp_in_step_range): New function.
3640 (linux_wait_1): If the thread was range stepping and stopped
3641 outside the stepping range, report the stop to GDB. Otherwise,
3642 continue stepping. Add range stepping debug output.
3643 (linux_set_resume_request): Copy the step range from the resume
3644 request to the lwp.
3645 (linux_supports_range_stepping): New.
3646 (linux_target_ops) <supports_range_stepping>: Set to
3647 linux_supports_range_stepping.
3648 * linux-low.h (struct linux_target_ops)
3649 <supports_range_stepping>: New field.
3650 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3651 * linux-x86-low.c (x86_supports_range_stepping): New.
3652 (the_low_target) <supports_range_stepping>: Set to
3653 x86_supports_range_stepping.
3654 * server.c (handle_v_cont): Handle 'r' action.
3655 (handle_v_requests): Append ";r" if the target supports range
3656 stepping.
3657 * target.h (struct thread_resume) <step_range_start,
3658 step_range_end>: New fields.
3659 (struct target_ops) <supports_range_stepping>:
3660 New field.
3661 (target_supports_range_stepping): New macro.
3662
3663 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3664
3665 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3666 confusion in comment.
3667
3668 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3669
3670 * lynx-low.c (struct process_info_private): New type.
3671 (lynx_add_process): New function.
3672 (lynx_create_inferior, lynx_attach): Replace calls to
3673 add_process by calls to lynx_add_process.
3674 (lynx_resume): If PTID is null, then try using
3675 current_process()->private->last_wait_event_ptid.
3676 Add comments.
3677 (lynx_clear_inferiors): Delete. The contents of that function
3678 has been inlined in lynx_mourn;
3679 (lynx_wait_1): Save the ptid in the process's private data.
3680 (lynx_mourn): Free the process' private data. Replace call
3681 to lynx_clear_inferiors by call to clear_inferiors.
3682
3683 2013-05-17 Yao Qi <yao@codesourcery.com>
3684
3685 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3686 the right place.
3687
3688 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3689
3690 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3691 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3692 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3693 PT_TEXT_END_ADDR guards. Update comments.
3694 (linux_target_op) <read_offsets>: Conditionally define to
3695 linux_read_offsets if the target is UCLIBC and if it defines
3696 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3697
3698 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3699 Andrew Jenner <andrew@codesourcery.com>
3700
3701 * Makefile.in (SFILES): Add linux-nios2-low.c.
3702 (clean): Add action to delete nios2-linux.c.
3703 (nios2-linux.c): New rule.
3704 * configure.srv: Add nios2*-*-linux*.
3705 * linux-nios2-low.c: New.
3706
3707 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3708
3709 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3710
3711 2013-04-25 Hui Zhu <hui@codesourcery.com>
3712
3713 PR gdb/15186
3714 * ax.c (ax_printf): Add fflush.
3715
3716 2013-04-22 Tom Tromey <tromey@redhat.com>
3717
3718 * Makefile.in (SFILES): Add filestuff.c.
3719 (OBS): Add filestuff.o.
3720 (filestuff.o): New target.
3721 * config.in, configure: Rebuild.
3722 * configure.ac: Check for fdwalk, pipe2.
3723
3724 2013-04-17 Pedro Alves <palves@redhat.com>
3725
3726 * configure.ac (USE_THREAD_DB): Delete variable.
3727 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3728 Don't AC_SUBST USE_THREAD_DB.
3729 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3730 * config.in, configure: Regenerate.
3731
3732 2013-04-16 Pedro Alves <palves@redhat.com>
3733
3734 * linux-low.h (struct lwp_info) <thread_known>: Move under
3735 the USE_THREAD_DB #ifdef.
3736
3737 2013-04-16 Pedro Alves <palves@redhat.com>
3738
3739 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3740 (linux-low.o): Delete rule.
3741 * linux-low.h: Always include "gdb_thread_db.h" instead of
3742 conditionally including thread_db.h.
3743 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3744 HAVE_THREAD_DB_H.
3745
3746 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3747
3748 * Makefile.in (install-only): Fix make install regression.
3749
3750 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3751
3752 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3753 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3754 installation.
3755 * gdbserver.1: Remove.
3756
3757 2013-03-22 Pedro Alves <palves@redhat.com>
3758
3759 * linux-low.c (handle_extended_wait): Don't call
3760 linux_enable_event_reporting.
3761
3762 2013-03-15 Tony Theodore <tonyt@logyst.com>
3763
3764 PR build/9098:
3765 * Makefile.in (SHELL): Use @SHELL@.
3766
3767 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3768
3769 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3770 compiler warning.
3771
3772 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3773
3774 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3775 Remove extraneous NULL element.
3776
3777 2013-03-13 Yao Qi <yao@codesourcery.com>
3778
3779 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3780 'V' block in trace frame.
3781
3782 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3783
3784 * target.h (struct target_ops): Add btrace ops.
3785 (target_supports_btrace): New macro.
3786 (target_enable_btrace): New macro.
3787 (target_disable_btrace): New macro.
3788 (target_read_btrace): New macro.
3789 * gdbthread.h (struct thread_info): Add btrace field.
3790 * server.c: Include btrace-common.h.
3791 (handle_btrace_general_set): New function.
3792 (handle_btrace_enable): New function.
3793 (handle_btrace_disable): New function.
3794 (handle_general_set): Call handle_btrace_general_set.
3795 (handle_qxfer_btrace): New function.
3796 (struct qxfer qxfer_packets[]): Add btrace entry.
3797 * inferiors.c (remove_thread): Disable btrace.
3798 * linux-low: Include linux-btrace.h.
3799 (linux_low_enable_btrace): New function.
3800 (linux_low_read_btrace): New function.
3801 (linux_target_ops): Add btrace ops.
3802 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3803 Add srv_linux_btrace=yes.
3804 (x86_64-*-linux*): Add linux-btrace.o.
3805 Add srv_linux_btrace=yes.
3806 * configure.ac: Define HAVE_LINUX_BTRACE.
3807 * config.in: Regenerated.
3808 * configure: Regenerated.
3809
3810 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3811
3812 * server.c (handle_qxfer): Preserve error message if -3 is
3813 returned.
3814 (qxfer): Document the -3 return value.
3815
3816 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3817
3818 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3819 (linux_btrace_h): New variable.
3820 (linux-btrace.o): New rule.
3821
3822 2013-03-08 Stan Shebs <stan@codesourcery.com>
3823 Hafiz Abid Qadeer <abidh@codesourcery.com>
3824
3825 * tracepoint.c (trace_buffer_size): New global.
3826 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3827 (init_trace_buffer): Change to one-argument function. Allocate
3828 trace buffer memory.
3829 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3830 handle QTBuffer:size packet.
3831 (cmd_bigqtbuffer_size): New function.
3832 (initialize_tracepoint): Call init_trace_buffer with
3833 DEFAULT_TRACE_BUFFER_SIZE.
3834 * server.c (handle_query): Add QTBuffer:size in the
3835 supported packets.
3836
3837 2013-03-07 Yao Qi <yao@codesourcery.com>
3838
3839 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3840 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3841 of -1.
3842 (cmd_qtsp): Adjust condition. Do post increment.
3843 Set cur_action and cur_step_action back to 0.
3844
3845 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3846
3847 PR server/15236
3848 * linux-low.c (linux_write_memory): Return early success if LEN is
3849 zero.
3850
3851 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3852
3853 * configure.srv: Add x86_64-*-cygwin* as target.
3854
3855 2013-02-28 Tom Tromey <tromey@redhat.com>
3856
3857 * configure.ac: Invoke AC_SYS_LARGEFILE.
3858 * configure, config.in: Rebuild.
3859
3860 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3861
3862 * win32-low.c: Throughout, fix format strings and casts of
3863 printf-like functions to avoid type related warnings on all
3864 platforms.
3865 (get_child_debug_event): Print dwDebugEventCode as hex since
3866 that's how it's usually documented.
3867
3868 2013-02-28 Yao Qi <yao@codesourcery.com>
3869
3870 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3871 pulongest.
3872
3873 2013-02-27 Jiong Wang <jiwang@tilera.com>
3874
3875 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3876 (reg-tilegx32.c): New rule.
3877 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3878 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3879 different register info initializer according to elf class.
3880 (init_registers_tilgx32): New function. The tilegx32 register info
3881 initializer.
3882 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3883 (tile_store_gregset): Likewise.
3884
3885 2013-02-27 Yao Qi <yao@codesourcery.com>
3886
3887 * server.c (process_point_options): Print debug message when
3888 debug_threads is true.
3889
3890 2013-02-26 Yao Qi <yao@codesourcery.com>
3891
3892 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3893
3894 2013-02-19 Pedro Alves <palves@redhat.com>
3895 Kai Tietz <ktietz@redhat.com>
3896
3897 PR gdb/15161
3898
3899 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3900 instead of strtoul to extract address from packet.
3901 (process_serial_event) <'z'>: Likewise.
3902
3903 2013-02-18 Yao Qi <yao@codesourcery.com>
3904
3905 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3906
3907 2013-02-14 Pedro Alves <palves@redhat.com>
3908
3909 Plug memory leak.
3910
3911 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3912 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3913
3914 2013-02-14 Pedro Alves <palves@redhat.com>
3915
3916 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3917
3918 2013-02-14 Pedro Alves <palves@redhat.com>
3919
3920 * tracepoint.c (save_string): Delete.
3921 (add_tracepoint_action): Use savestring instead of save_string.
3922
3923 2013-02-12 Pedro Alves <palves@redhat.com>
3924
3925 * linux-xtensa-low.c: Ditto.
3926 * xtensa-xtregs.c: Ditto.
3927
3928 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3929
3930 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3931 thread_db.
3932
3933 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3934
3935 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3936 aarch64_num_wp_regs and aarch64_num_bp_regs to
3937 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3938
3939 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3940
3941 * linux-aarch64-low.c (ps_get_thread_area): Replace
3942 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3943
3944 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3945 Marcus Shawcroft <marcus.shawcroft@arm.com>
3946 Nigel Stephens <nigel.stephens@arm.com>
3947 Yufeng Zhang <yufeng.zhang@arm.com>
3948
3949 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3950 (aarch64.c, aarch64-without-fpu.c): New targets.
3951 * configure.srv (aarch64*-*-linux*): New.
3952 * linux-aarch64-low.c: New file.
3953
3954 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3955
3956 * linux-low.c (handle_extended_wait, linux_create_inferior)
3957 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3958 (dequeue_one_deferred_signal, linux_resume_one_thread)
3959 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3960 (linux_tracefork_grandchild, linux_test_for_tracefork)
3961 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3962 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3963 where the argument is 0.
3964
3965 2013-01-25 Yao Qi <yao@codesourcery.com>
3966
3967 * event-loop.c: Include "queue.h".
3968 (gdb_event_p): New typedef.
3969 (struct gdb_event) <next_event>: Remove.
3970 (event_queue): Change to QUEUE(gdb_event_p).
3971 (async_queue_event): Remove.
3972 (gdb_event_xfree): New.
3973 (initialize_event_loop): New.
3974 (process_event): Use API from QUEUE.
3975 (wait_for_event): Likewise.
3976 * server.c (main): Call initialize_event_loop.
3977 * server.h (initialize_event_loop): Declare.
3978
3979 2013-01-18 Yao Qi <yao@codesourcery.com>
3980
3981 * ax.h (struct eval_agent_expr_context): New.
3982 (gdb_eval_agent_expr): Update declaration.
3983 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3984 TFRAME. Add new argument CTX.
3985 * server.h (struct eval_agent_expr_context): Declare.
3986 (agent_mem_read, agent_tsv_read): Update declaration.
3987 (agent_mem_read_string): Likewise.
3988 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3989 (add_traceframe_block): Add new argument TPOINT.
3990 Increase TPOINT->traceframe_usage.
3991 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3992 eval_tracepoint_agent_expr.
3993 (condition_true_at_tracepoint): Likewise.
3994 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3995 (agent_mem_read_string, agent_tsv_read): Likewise.
3996
3997 2013-01-16 Yao Qi <yao@codesourcery.com>
3998
3999 * linux-low.c (linux_resume_one_lwp): Don't check
4000 'lwp->bp_reinsert != 0'.
4001
4002 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4003 Pedro Alves <palves@redhat.com>
4004
4005 * lynx-low.c (ptrace_request_to_str): Define a temporary
4006 macro and use it to simplify this function's implementation.
4007
4008 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4009
4010 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4011 sets errno.
4012
4013 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4014
4015 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4016
4017 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4018
4019 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4020
4021 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4022
4023 * lynx-low.c (lynx_resume): Use the resume_info parameter
4024 to determine the ptid for the lynx_ptrace call, unless
4025 it is equal to minus_one_ptid, in which case we use the
4026 ptid of the current_inferior.
4027 (lynx_wait_1): After having received a thread create/exit
4028 event, resume the inferior's execution using the signaling
4029 thread's ptid, rather than the old ptid.
4030
4031 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4032
4033 * lynx-low.c (lynx_resume): Delete variable ret.
4034
4035 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4036
4037 * gdbreplay.c (gdbreplay_version): Update copyright year.
4038 * server.c (gdbserver_version): Likewise.
4039
4040 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4041
4042 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4043 new thread.
4044
4045 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4046
4047 * lynx-low.c (ptrace_request_to_str): Add handling for
4048 PTRACE_GETTRACESIG.
4049
4050 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4051
4052 * lynx-low.c (lynx_attach): Delete variable new_process.
4053
4054 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4055
4056 * lynx-low.c (lynx_create_inferior): Delete variable
4057 new_process.
4058
4059 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4060
4061 * lynx-low.c (ptrace_request_to_str): Do not handle
4062 PTRACE_GETTHREADLIST if this macro does not exist.
4063
4064 2012-12-15 Yao Qi <yao@codesourcery.com>
4065
4066 * Makefile.in (OBS): Add notif.o.
4067 * notif.c, notif.h: New.
4068 * server.c: Include "notif.h".
4069 (struct vstop_notif) <next>: Remove.
4070 <base>: New field.
4071 (queue_stop_reply): Update.
4072 (push_event, send_next_stop_reply): Remove.
4073 (discard_queued_stop_replies): Update.
4074 (notif_stop): New variable.
4075 (handle_v_stopped): Remove.
4076 (handle_v_requests): Don't call handle_v_stopped. Call
4077 handle_ack_notif instead.
4078 (queue_stop_reply_callback): Call notif_event_enque instead
4079 of queue_stop_reply.
4080 (handle_status): Don't call send_next_stop_reply, call
4081 notif_write_event instead.
4082 (kill_inferior_callback): Likewise.
4083 (detach_or_kill_inferior_callback): Likewise.
4084 (main): Call initialize_notif.
4085 (process_serial_event): Call QUEUE_is_empty.
4086 (handle_target_event): Call notif_push instead of push event.
4087 * server.h (push_event): Remove declaration.
4088
4089 2012-12-10 Tom Tromey <tromey@redhat.com>
4090
4091 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4092 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4093 macros.
4094 (.c.o): Rewrite.
4095 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4096 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4097 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4098 (amd64-linux-ipa.o, ax.o): Rewrite.
4099 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4100 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4101 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4102 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4103 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4104 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4105 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4106 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4107 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4108 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4109 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4110 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4111 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4112 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4113 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4114 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4115 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4116 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4117 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4118 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4119 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4120 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4121 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4122 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4123 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4124 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4125 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4126 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4127 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4128 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4129 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4130 (reg-tilegx.o): Remove.
4131 (all_object_files): New macro.
4132 Include .deps files.
4133 * aclocal.m4, configure: Rebuild.
4134 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4135 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4136 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4137
4138 2012-12-05 Tom Tromey <tromey@redhat.com>
4139
4140 PR gdb/14917:
4141 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4142
4143 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4144
4145 * configure.ac: Check for linux/perf_event.h.
4146 * config.in: Regenerated.
4147 * configure: Regenerated.
4148
4149 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4150
4151 * hostio.c (handle_readlink): Decrease buffer size
4152 parameter passed to readlink by one byte.
4153
4154 2012-11-26 Yao Qi <yao@codesourcery.com>
4155
4156 * configure.ac (build_warnings): Append '-Wempty-body'.
4157 * configure: Regenerated.
4158 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4159 body.
4160
4161 2012-11-15 Pierre Muller <muller@sourceware.org>
4162
4163 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4164 * config.in: Regenerate.
4165 * configure: Regenerate.
4166 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4167 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4168 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4169 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4170 header.
4171 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4172 instead of <sys/wait.h> header.
4173 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4174
4175 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4176
4177 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4178 (various make rules): Remove -DGDBSERVER
4179
4180 2012-11-09 Yao Qi <yao@codesourcery.com>
4181
4182 * spu-low.c (current_ptid): Move it to ..
4183 * gdbthread.h: ... here. New.
4184 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4185 * server.c (myresume, process_serial_event): Likewise.
4186 * thread-db.c (thread_db_find_new_threads): Likewise.
4187 * tracepoint.c (run_inferior_command): Likewise.
4188
4189 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4190
4191 * server.c (handle_search_memory_1): Include access length in
4192 warning message.
4193
4194 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4195
4196 * linux-crisv32-low.c: Fix compile errors.
4197
4198 2012-09-04 Yao Qi <yao@codesourcery.com>
4199
4200 * tracepoint.c (cmd_qtsv): Adjust debug message.
4201 Don't check CUR_TPOINT.
4202
4203 2012-08-28 Yao Qi <yao@codesourcery.com>
4204
4205 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4206 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4207 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4208 Remove declarations of xmalloc, xreallloc, xstrdup and
4209 freeargv.
4210 * Makefile.in (libiberty_h): New.
4211 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4212 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4213
4214 2012-08-23 Yao Qi <yao@codesourcery.com>
4215
4216 * server.h: Remove declaration of 'xsnprintf'.
4217
4218 2012-08-22 Keith Seitz <keiths@redhat.com>
4219
4220 * server.h: Include build-gnulib-gbserver/config.h.
4221 * gdbreplay.c: Likewise.
4222
4223 2012-08-08 Doug Evans <dje@google.com>
4224
4225 * Makefile.in (SFILES): Add gdb_vecs.c.
4226 (OBS): Add gdb_vecs.o.
4227 (gdb_vecs_h, host_defs_h): New variables.
4228 (thread-db.o): Add $(gdb_vecs_h) dependency.
4229 (gdb_vecs.o): New rule.
4230 * thread-db.c: #include "gdb_vecs.h".
4231 (thread_db_load_search): Use a vector to iterate over path elements.
4232 Handle text appearing after "$pdir".
4233
4234 * configure.ac: Add check for strstr.
4235 * config.in: Regenerate.
4236 * configure: Regenerate.
4237
4238 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4239
4240 * hostio.c (handle_pread): If pread fails, fall back to attempting
4241 lseek/read.
4242 (handle_pwrite): Likewise for pwrite.
4243
4244 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4245
4246 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4247 between unsupported TYPE and unimplementable ADDR/LEN combination.
4248 (arm_insert_point): Act on new return value.
4249
4250 2012-07-31 Pedro Alves <palves@redhat.com>
4251
4252 * server.c (process_point_options): Only skip tokens if we find
4253 one that is unrecognized. Don't treat 'X' specially while
4254 skipping unrecognized tokens.
4255
4256 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4257
4258 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4259 to 4-byte-align HW breakpoint addresses for Thumb.
4260
4261 2012-07-27 Yao Qi <yao@codesourcery.com>
4262
4263 PR remote/14161.
4264
4265 * server.h: Declare gdb_agent_about_to_close.
4266 * target.c (kill_inferior): Include "agent.h".
4267 New. Send command 'kill'.
4268 * target.h (kill_inferior): Removed macro.
4269 * tracepoint.c (gdb_agent_about_to_close): New.
4270 (gdb_agent_helper_thread): Handle command 'close'.
4271 Wait endlessly until the inferior stops.
4272 Install gdb_agent_remove_socket to atexit hook.
4273 (agent_socket_name): New static variable.
4274 (gdb_agent_socket_init): Replace local variable 'name' with
4275 'agent_socket_name'.
4276 (gdb_agent_remove_socket): New.
4277
4278 2012-07-27 Yao Qi <yao@codesourcery.com>
4279
4280 * server.c (process_point_options): Stop at 'X' when parsing.
4281
4282 2012-07-19 Michael Eager <eager@eagercon.com>
4283
4284 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4285 to hw_execute.
4286 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4287 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4288 hardware breakpoint.
4289
4290 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4291
4292 * gdbserver/linux-low.c (initialize_low): Call
4293 linux_ptrace_init_warnings.
4294
4295 2012-07-02 Doug Evans <dje@google.com>
4296
4297 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4298 pointer to int.
4299
4300 2012-07-02 Stan Shebs <stan@codesourcery.com>
4301
4302 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4303 (ax.o): Add it to build rule.
4304 (ax-ipa.o): Ditto.
4305 (OBS): Add format.o.
4306 (IPA_OBS): Add format.o.
4307 * server.c (handle_query): Claim support for breakpoint commands.
4308 (process_point_options): Add command case.
4309 (process_serial_event): Leave running if there are printfs in
4310 effect.
4311 * mem-break.h (any_persistent_commands): Declare.
4312 (add_breakpoint_commands): Declare.
4313 (gdb_no_commands_at_breakpoint): Declare.
4314 (run_breakpoint_commands): Declare.
4315 * mem-break.c (struct point_command_list): New struct.
4316 (struct breakpoint): New field command_list.
4317 (any_persistent_commands): New function.
4318 (add_commands_to_breakpoint): New function.
4319 (add_breakpoint_commands): New function.
4320 (gdb_no_commands_at_breakpoint): New function.
4321 (run_breakpoint_commands): New function.
4322 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4323 locally.
4324 * ax.c: Include format.h.
4325 (ax_printf): New function.
4326 (gdb_eval_agent_expr): Add printf opcode.
4327
4328 2012-06-13 Yao Qi <yao@codesourcery.com>
4329
4330 * server.c (start_inferior): Remove duplicated writes to fields
4331 'last_resume_kind' and 'last_status' of 'current_inferior'.
4332
4333 2012-06-12 Yao Qi <yao@codesourcery.com>
4334 Pedro Alves <palves@redhat.com>
4335
4336 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4337 comment.
4338 * server.c (handle_v_cont): Extend comment.
4339
4340 2012-06-11 Yao Qi <yao@codesourcery.com>
4341
4342 * linux-low.c (linux_attach): Add 'static'.
4343
4344 2012-06-06 Yao Qi <yao@codesourcery.com>
4345
4346 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4347
4348 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4349
4350 Fix gcc -flto compilation warning.
4351 * server.c (main): Make variable multi_mode and attach volatile.
4352
4353 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4354
4355 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4356 if the platform doesn't know about it.
4357
4358 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4359
4360 * Makefile.in (SFILES): Add linux-tile-low.c.
4361 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4362 * configure.srv: Handle tilegx-*-linux*.
4363 * linux-tile-low.c: New file.
4364
4365 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4366
4367 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4368
4369 2012-05-24 Pedro Alves <palves@redhat.com>
4370
4371 PR gdb/7205
4372
4373 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4374
4375 2012-05-24 Pedro Alves <palves@redhat.com>
4376
4377 PR gdb/7205
4378
4379 Replace target_signal with gdb_signal throughout.
4380
4381 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4382
4383 * linux-low.c (linux_store_registers): Avoid the copying sequence
4384 when no data has been retrieved by ptrace.
4385
4386 2012-05-22 Will Deacon <will.deacon@arm.com>
4387
4388 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4389 Include asm/ptrace.h.
4390 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4391 already defined.
4392
4393 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4394
4395 * linux-low.c (linux_store_registers): Don't re-retrieve data
4396 with ptrace that has already been obtained from /proc. Always
4397 copy any data retrieved with ptrace to the buffer supplied.
4398
4399 2012-05-11 Yao Qi <yao@codesourcery.com>
4400 Pedro Alves <palves@redhat.com>
4401
4402 * linux-low.c (enum stopping_threads_kind): New.
4403 (stopping_threads): Change type to `enum stopping_threads_kind'.
4404 (handle_extended_wait): If stopping and suspending threads, leave
4405 the new_lwp suspended too.
4406 (linux_wait_for_event): Adjust.
4407 (stop_all_lwps): Set `stopping_threads' to
4408 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4409 whether we're suspending threads or just stopping them. Assert no
4410 recursion happens.
4411
4412 2012-04-29 Yao Qi <yao@codesourcery.com>
4413
4414 * server.h: Move some code to ...
4415 * gdbthread.h: ... here. New.
4416 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4417 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4418 (nto-low.o, win32-low.o): Likewise.
4419 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4420 * regcache.c, remote-utils.c, server.c: Likewise.
4421 * target.c, tracepoint.c, win32-low.c: Likewise.
4422
4423 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4424
4425 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4426 (PTRACE_ARG4_TYPE): Likewise.
4427 (PTRACE_XFER_TYPE): Likewise.
4428 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4429 ptrace to PTRACE_ARG3_TYPE.
4430 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4431 (PTRACE_ARG4_TYPE): Likewise.
4432 (PTRACE_XFER_TYPE): Likewise.
4433 (linux_detach_one_lwp): Cast fourth argument of
4434 ptrace to long then PTRACE_ARG4_TYPE.
4435 (regsets_fetch_inferior_registers): Cast third argument of
4436 ptrace to long then PTRACE_ARG3_TYPE.
4437 (regsets_store_inferior_registers): Likewise.
4438
4439 2012-04-20 Pedro Alves <palves@redhat.com>
4440
4441 * configure: Regenerate.
4442
4443 2012-04-19 Pedro Alves <palves@redhat.com>
4444
4445 * Makefile.in (GNULIB_BUILDDIR): New.
4446 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4447 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4448 (all, install-only, uninstall, clean-info, all-lib, clean): No
4449 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4450 (maintainer-clean realclean distclean): Use subdir_do.
4451 (subdir_do): New.
4452 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4453 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4454 * acinclude.m4: Include acx_configure_dir.m4.
4455 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4456 calls. Call AC_PROG_RANLIB. Configure gnulib using
4457 ACX_CONFIGURE_DIR.
4458 (GNULIB): New.
4459 (GNULIB_STDINT_H): Adjust.
4460 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4461 * gdbreplay.c: Include build-gnulib/config.h.
4462 * server.h: Likewise.
4463 * aclocal.m4: Regenerate.
4464 * config.in: Regenerate.
4465 * configure: Regenerate.
4466
4467 2012-04-19 Pedro Alves <palves@redhat.com>
4468
4469 * Makefile.in (LIBGNU, INCGNU): Adjust.
4470 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4471 (all, install-only, uninstall, clean-info, all-lib, clean)
4472 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4473 * configure.ac: Adjust AC_OUTPUT output.
4474 * aclocal.m4: Regenerate.
4475 * configure: Regenerate.
4476
4477 2012-04-19 Pedro Alves <palves@redhat.com>
4478
4479 * Makefile.in (generated_files): New.
4480 (server_h): Remove the explicit dependency on config.h, and depend
4481 on $generated_files.
4482
4483 2012-04-19 Pedro Alves <palves@redhat.com>
4484
4485 * Makefile.in (INCGNU): Add -Ignulib.
4486
4487 2012-04-19 Pedro Alves <palves@redhat.com>
4488
4489 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4490 (INCGNU): ... this, and spell out -I here.
4491 (GNULIB_LIB): Rename to ...
4492 (LIBGNU): ... this.
4493 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4494
4495 2012-04-19 Pedro Alves <palves@redhat.com>
4496
4497 * config.in: Regenerate.
4498
4499 2012-04-19 Pedro Alves <palves@redhat.com>
4500
4501 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4502 * server.h (memmem): Remove declaration.
4503 * config.in: Regenerate.
4504 * configure: Regenerate.
4505
4506 2012-04-19 Yao Qi <yao@codesourcery.com>
4507
4508 * Makefile.in (SFILES): Add common/vec.c.
4509 (OBS): Add vec.o.
4510 (vec.o): New rule.
4511
4512 2012-04-19 Yao Qi <yao@codesourcery.com>
4513
4514 * remote-utils.c (prepare_resume_reply): Replace with macro
4515 target_core_of_thread.
4516 * server.c (handle_qxfer_threads_proper): Likewise.
4517 * target.h (traget_core_of_thread): New macro.
4518
4519 2012-04-18 Pedro Alves <palves@redhat.com>
4520
4521 * aclocal.m4: Regenerate.
4522 * configure: Regenerate.
4523
4524 2012-04-16 Yao Qi <yao@codesourcery.com>
4525
4526 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4527 duplicated on address.
4528
4529 2012-04-16 Yao Qi <yao@codesourcery.com>
4530
4531 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4532 (struct tracepoint_action_ops) <send>: New field.
4533 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4534 (agent_expr_send, x_tracepoint_action_send): New.
4535 (l_tracepoint_action_send): New.
4536 (cmd_qtdp): Download and install tracepoint
4537 according to `use_agent'.
4538 (run_inferior_command): Add one more parameter `len'.
4539 Update callers.
4540 (tracepoint_send_agent): New.
4541 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4542
4543 2012-04-16 Yao Qi <yao@codesourcery.com>
4544
4545 * tracepoint.c (download_tracepoints): Moved to ...
4546 (cmd_qtstart): ... here.
4547
4548 2012-04-14 Yao Qi <yao@codesourcery.com>
4549
4550 * tracepoint.c: Include inttypes.h.
4551 (struct collect_memory_action): Use sized types.
4552 (struct tracepoint): Likewise.
4553 (cmd_qtdp, stop_tracing): Update print specifiers.
4554 (cmd_qtp, response_tracepoint): Likewise.
4555 (collect_data_at_tracepoint): Likewise.
4556 (collect_data_at_step): Likewise.
4557
4558 2012-04-14 Yao Qi <yao@codesourcery.com>
4559
4560 Import gnulib module inttypes.
4561 * aclocal.m4, config.in, configure: Regenerated.
4562
4563 2012-04-14 Yao Qi <yao@codesourcery.com>
4564
4565 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4566 Makefile and config.status at last.
4567
4568 2012-04-13 Yao Qi <yao@codesourcery.com>
4569
4570 * tracepoint.c: Include stdint.h unconditionally.
4571
4572 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4573
4574 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4575 on BFD_HAVE_SYS_PROCFS_TYPE.
4576 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4577 * configure: Regenerate.
4578 * config.in: Likewise.
4579
4580 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4581
4582 * Makefile.in (clean): Also remove x32.c x32-linux.c
4583 x32-avx.c x32-avx-linux.c.
4584 (x32.o): New target.
4585 (x32.c): Likewise.
4586 (x32-linux.o): Likewise.
4587 (x32-linux.c): Likewise.
4588 (x32-avx.o): Likewise.
4589 (x32-avx.c): Likewise.
4590 (x32-avx-linux.o): Likewise.
4591 (x32-avx-linux.c): Likewise.
4592
4593 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4594 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4595 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4596 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4597 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4598 i386/x32-avx-linux.xml.
4599
4600 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4601 (init_registers_x32_avx_linux): Likwise.
4602 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4603 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4604
4605 2012-04-13 Pedro Alves <palves@redhat.com>
4606
4607 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4608 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4609 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4610 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4611 the sub-make.
4612
4613 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4614
4615 * linux-x86-low.c (compat_x32_clock_t): New.
4616 (compat_x32_siginfo_t): Likewise.
4617 (compat_x32_siginfo_from_siginfo): Likewise.
4618 (siginfo_from_compat_x32_siginfo): Likewise.
4619 (linux_is_elf64): Likewise.
4620 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4621 and siginfo_from_compat_x32_siginfo for x32.
4622 (x86_arch_setup): Set linux_is_elf64.
4623
4624 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4625
4626 PR gdb/13969
4627 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4628 e_machine field.
4629 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4630 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4631 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4632 compatible with process.
4633
4634 2012-04-12 Yao Qi <yao@codesourcery.com>
4635
4636 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4637 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4638 (install-only, install-info, clean): Handle sub dir gnulib.
4639 (all-lib, am--refresh): New targets.
4640 (memmem.o): Remove target.
4641 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4642 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4643 (AC_REPLACE_FUNCS): Remove memmem.
4644 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4645 (AC_OUTPUT): Generate Makefile in gnulib/.
4646 * aclocal.m4, config.in, configure: Regenerated.
4647
4648 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4649
4650 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4651
4652 2012-04-05 Pedro Alves <palves@redhat.com>
4653
4654 -Werror=strict-aliasing
4655
4656 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4657 pointer.
4658
4659 2012-04-04 Pedro Alves <palves@redhat.com>
4660
4661 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4662 (sparc_store_gregset_from_stack, sparc_store_gregset)
4663 (sparc_breakpoint_at): Fix formatting.
4664
4665 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4666
4667 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4668 are available.
4669 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4670 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4671 * config.in: Regenerate.
4672 * configure: Likewise.
4673
4674 2012-03-29 Pedro Alves <palves@redhat.com>
4675
4676 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4677 Correct ptrace arguments.
4678
4679 2012-03-28 Pedro Alves <palves@redhat.com>
4680
4681 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4682 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4683 (IA64_FR1_REGNUM): New defines.
4684 (ia64_fetch_register): New.
4685 (the_low_target): Install it.
4686 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4687 field.
4688 * linux-low.c (linux_fetch_registers): Try the
4689 the_low_target.fetch_register hook first.
4690
4691 * linux-arm-low.c (the_low_target): Adjust.
4692 * linux-bfin-low.c (the_low_target): Adjust.
4693 * linux-cris-low.c (the_low_target): Adjust.
4694 * linux-crisv32-low.c (the_low_target): Adjust.
4695 * linux-m32r-low.c (the_low_target): Adjust.
4696 * linux-m68k-low.c (the_low_target): Adjust.
4697 * linux-mips-low.c (the_low_target): Adjust.
4698 * linux-ppc-low.c (the_low_target): Adjust.
4699 * linux-s390-low.c (the_low_target): Adjust.
4700 * linux-sh-low.c (the_low_target): Adjust.
4701 * linux-sparc-low.c (the_low_target): Adjust.
4702 * linux-tic6x-low.c (the_low_target): Adjust.
4703 * linux-x86-low.c (the_low_target): Adjust.
4704 * linux-xtensa-low.c (the_low_target): Adjust.
4705
4706 2012-03-26 Pedro Alves <palves@redhat.com>
4707
4708 * server.c (handle_qxfer_libraries): Don't bail early if
4709 the_target->qxfer_libraries_svr4 is not NULL.
4710
4711 2012-03-26 Pedro Alves <palves@redhat.com>
4712
4713 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4714
4715 2012-03-23 Pedro Alves <palves@redhat.com>
4716
4717 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4718 "library-list-svr4" element's start tag when the the DSO list is
4719 empty.
4720
4721 2012-03-23 Pedro Alves <palves@redhat.com>
4722
4723 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4724 a variable whose type size is the same as the inferior's pointer
4725 size.
4726
4727 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4728
4729 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4730 struct siginfo.
4731 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4732 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4733 * linux-low.h: Include <signal.h>.
4734 (struct siginfo): Remove forward declaration.
4735 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4736 struct siginfo.
4737
4738 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4739
4740 * .gitignore: Ignore more files.
4741
4742 2012-03-19 Pedro Alves <palves@redhat.com>
4743 Jan Kratochvil <jan.kratochvil@redhat.com>
4744
4745 * server.c (cont_thread, general_thread): Add describing comments.
4746 (start_inferior): Clear `cont_thread'.
4747 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4748 of a process.
4749
4750 2012-03-15 Yao Qi <yao@codesourcery.com>
4751
4752 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4753 handling to ...
4754 (cmd_qtdp): ... here.
4755
4756 2012-03-15 Yao Qi <yao@codesourcery.com>
4757
4758 * tracepoint.c (struct tracepoint_action_ops): New.
4759 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4760 (m_tracepoint_action_download): New.
4761 (r_tracepoint_action_download): New.
4762 (x_tracepoint_action_download): New.
4763 (l_tracepoint_action_download): New.
4764 (add_tracepoint_action): Install `action->ops' according type.
4765 (download_tracepoint_1): Move code `download' function pointer
4766 of various tracepoint_action_ops.
4767
4768 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4769
4770 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4771 linux_ptrace_attach_warnings.
4772
4773 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4774
4775 * Makefile.in (linux-ptrace.o): New.
4776 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4777 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4778 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4779 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4780 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4781 of these targets.
4782 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4783
4784 2012-03-08 Yao Qi <yao@codesourcery.com>
4785 Pedro Alves <palves@redhat.com>
4786
4787 Fix PR server/13392.
4788 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4789 offset of JMP insn.
4790 * tracepoint.c (remove_tracepoint): New.
4791 (cmd_qtdp): Call remove_tracepoint when failed to install.
4792
4793 2012-03-07 Pedro Alves <palves@redhat.com>
4794
4795 * linux-low.c (get_detach_signal): New.
4796 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4797 Pass on pending signals to PTRACE_DETACH. Check the result of the
4798 ptrace call.
4799 * server.c (program_signals, program_signals_p): New.
4800 (handle_general_set): Handle QProgramSignals.
4801 * server.h (program_signals, program_signals_p): Declare.
4802
4803 2012-03-05 Pedro Alves <palves@redhat.com>
4804 Jan Kratochvil <jan.kratochvil@redhat.com>
4805
4806 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4807 New comment why.
4808
4809 2012-03-03 Yao Qi <yao@codesourcery.com>
4810
4811 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4812 agent_look_up_symbols.
4813
4814 2012-03-03 Yao Qi <yao@codesourcery.com>
4815
4816 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4817 (linux-x86-low.o): Likewise.
4818 * server.h: Remove in_process_agent_loaded.
4819 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4820 common/agent.c.
4821 Update callers.
4822
4823 2012-03-03 Yao Qi <yao@codesourcery.com>
4824
4825 * tracepoint.c (gdb_agent_capability): New global.
4826 (in_process_agent_loaded_ust): Renamed to
4827 `in_process_agent_supports_ust'.
4828 Update callers.
4829 (in_process_agent_supports_ust): Call agent_capability_check.
4830 (clear_installed_tracepoints): Assert that agent supports
4831 agent.
4832
4833 2012-03-03 Yao Qi <yao@codesourcery.com>
4834
4835 * linux-low.c (linux_supports_agent): New.
4836 (linux_target_ops): Initialize field `supports_agent' with
4837 linux_supports_agent.
4838 * target.h (struct target_ops) <supports_agent>: New.
4839 (target_supports_agent): New macro.
4840 * server.c (handle_general_set): Handle packet 'QAgent'.
4841 (handle_query): Send `QAgent+'.
4842 * Makefile.in (server.o): Depends on agent.h.
4843
4844 2012-03-03 Yao Qi <yao@codesourcery.com>
4845
4846 * Makefile.in (OBS): Add agent.o.
4847 Add new rule for agent.o.
4848 Track dependence of tracepoint.c on agent.h.
4849 * tracepoint.c (run_inferior_command_1):
4850 (run_inferior_command): Call agent_run_command.
4851 (gdb_ust_connect_sync_socket): Deleted. Move it to
4852 common/agent.c.
4853 (resume_thread, stop_thread): Likewise.
4854 (gdb_ust_socket_init): Renamed to ...
4855 (gdb_agent_socket_init): ... New.
4856 (gdb_ust_thread): Renamed to ...
4857 (gdb_agent_helper_thread): ... New.
4858 (gdb_ust_init): Move some code to ...
4859 (gdb_agent_init): ... here. New.
4860 [HAVE_UST]: Call gdb_ust_init.
4861 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4862 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4863 * config.in, configure: Regenerated.
4864
4865 2012-03-02 Pedro Alves <palves@redhat.com>
4866
4867 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4868 * linux-low.c (struct simple_pid_list): New.
4869 (stopped_pids): New a struct simple_pid_list pointer.
4870 (add_to_pid_list, pull_pid_from_list): New.
4871 (handle_extended_wait): Don't assume the first signal new children
4872 report is SIGSTOP. Adjust call to pull_pid_from_list.
4873 (linux_wait_for_lwp): Adjust.
4874
4875 2012-03-02 Yao Qi <yao@codesourcery.com>
4876
4877 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4878 debug log.
4879
4880 2012-03-02 Yao Qi <yao@codesourcery.com>
4881
4882 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4883 `stop_pc' and `tpoint'. Update caller.
4884
4885 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4886
4887 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4888 * linux-low.c (use_linux_regsets): New macro.
4889 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4890 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4891 (linux_register_in_regsets): New function.
4892 (usr_fetch_inferior_registers): Skip registers covered by
4893 regsets.
4894 (usr_store_inferior_registers): Likewise.
4895 (usr_fetch_inferior_registers): New macro.
4896 (usr_store_inferior_registers): Likewise.
4897 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4898 (linux_store_registers): Likewise.
4899 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4900 prototype.
4901 (init_registers_mips64_dsp_linux): Likewise.
4902 (init_registers_mips_linux): New macro.
4903 (init_registers_mips_dsp_linux): Likewise.
4904 (mips_dsp_num_regs): Likewise.
4905 (DSP_BASE, DSP_CONTROL): New fallback macros.
4906 (mips_base_regs): New macro.
4907 (mips_regmap): Use it. Fix the size.
4908 (mips_dsp_regmap): New variable.
4909 (mips_dsp_regset_bitmap): Likewise.
4910 (mips_arch_setup): New function.
4911 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4912 than mips_regmap.
4913 (mips_cannot_store_register): Likewise.
4914 (the_low_target): Update .arch_setup, .num_regs and .regmap
4915 initializers. Add .regset_bitmap initializer.
4916 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4917 initializer.
4918 * linux-bfin-low.c (the_low_target): Likewise.
4919 * linux-cris-low.c (the_low_target): Likewise.
4920 * linux-crisv32-low.c (the_low_target): Likewise.
4921 * linux-ia64-low.c (the_low_target): Likewise.
4922 * linux-m32r-low.c (the_low_target): Likewise.
4923 * linux-m68k-low.c (the_low_target): Likewise.
4924 * linux-ppc-low.c (the_low_target): Likewise.
4925 * linux-s390-low.c (the_low_target): Likewise.
4926 * linux-sh-low.c (the_low_target): Likewise.
4927 * linux-sparc-low.c (the_low_target): Likewise.
4928 * linux-tic6x-low.c (the_low_target): Likewise.
4929 * linux-x86-low.c (the_low_target): Likewise.
4930 * linux-xtensa-low.c (the_low_target): Likewise.
4931 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4932 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4933 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4934 srv_xmlfiles.
4935 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4936 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4937
4938 2012-02-29 Yao Qi <yao@codesourcery.com>
4939 Pedro Alves <palves@redhat.com>
4940
4941 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4942 `step_over_finished' is true.
4943
4944 2012-02-27 Pedro Alves <palves@redhat.com>
4945
4946 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4947 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4948
4949 2012-02-27 Pedro Alves <palves@redhat.com>
4950
4951 PR server/9684
4952 * linux-low.c (pid_is_stopped): New.
4953 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4954
4955 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4956
4957 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4958 of conditions.
4959
4960 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4961
4962 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4963
4964 2012-02-24 Luis Machado <lgustavo@codesourcery>
4965
4966 * server.c (handle_query): Advertise support for target-side
4967 breakpoint condition evaluation.
4968 (process_point_options): New function.
4969 (process_serial_event): When inserting a breakpoint, check for
4970 a target-side condition that should be evaluated.
4971
4972 * mem-break.c: Include regcache.h and ax.h.
4973 (point_cond_list_t): New data structure.
4974 (breakpoint) <cond_list>: New field.
4975 (find_gdb_breakpoint_at): Make non-static.
4976 (delete_gdb_breakpoint_at): Clear any target-side
4977 conditions.
4978 (clear_gdb_breakpoint_conditions): New function.
4979 (add_condition_to_breakpoint): Likewise.
4980 (add_breakpoint_condition): Likewise.
4981 (gdb_condition_true_at_breakpoint): Likewise.
4982 (gdb_breakpoint_here): Return result directly instead
4983 of going through a local variable.
4984
4985 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4986 (clear_gdb_breakpoint_conditions): Likewise.
4987 (add_breakpoint_condition): Likewise.
4988 (gdb_condition_true_at_breakpoint): Likewise.
4989
4990 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4991 (need_step_over_p): Take target-side breakpoint condition into
4992 consideration.
4993
4994 2012-02-24 Luis Machado <lgustavo@codesourcery>
4995
4996 * server.h: Include tracepoint.h.
4997 (agent_mem_read, agent_get_trace_state_variable_value,
4998 agent_set_trace_state_variable_value,
4999 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5000 get_set_tsv_func_addr): New prototypes.
5001
5002 * ax.h: New include file.
5003 * ax.c: New source file.
5004
5005 * tracepoint.c: Include ax.h.
5006 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5007 agent_expr, eval_result_type): Move to ax.h.
5008 (parse_agent_expr): Rename to ...
5009 (gdb_parse_agent_expr): ... this, make it non-static and move
5010 to ax.h.
5011 (unparse_agent_expr) Rename to ...
5012 (gdb_unparse_agent_expr): ... this, make it non-static and move
5013 to ax.h.
5014 (eval_agent_expr): Rename to ...
5015 (eval_tracepoint_agent_expr): ... this.
5016 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5017 forward declarations.
5018 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5019 (agent_get_trace_state_variable_value): New function.
5020 (agent_set_trace_state_variable_value): New function.
5021 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5022 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5023 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5024 (condition_true_at_tracepoint): Likewise.
5025 (parse_agent_expr): Rename to ...
5026 (gdb_parse_agent_expr): ... this and move to ax.c.
5027 (unparse_agent_expr): Rename to ...
5028 (gdb_unparse_agent_expr): ... this and move to ax.c.
5029 (gdb_agent_op_name): Move to ax.c.
5030 (eval_agent_expr): Rename to ...
5031 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5032 and move to ax.c.
5033 (eval_tracepoint_agent_expr): New function.
5034 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5035 non-static.
5036 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5037 ax.c.
5038 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5039 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5040 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5041 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5042 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5043 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5044 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5045 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5046 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5047 (compile_bytecodes): Remove forward declaration.
5048 (is_goto_target): Move to ax.c.
5049 (compile_bytecodes): Move to ax.c and call
5050 agent_get_trace_state_variable_value (...) and
5051 agent_set_trace_state_variable_value (...).
5052
5053 * Makefile.in: Update ax.c and IPA dependencies.
5054
5055 2012-02-24 Pedro Alves <palves@redhat.com>
5056
5057 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5058 (cmd_bigqtbuffer_circular): ... this. Only handle
5059 'QTBuffer:circular:'.
5060 (handle_tracepoint_general_set): Adjust.
5061
5062 2012-02-16 Yao Qi <yao@codesourcery.com>
5063
5064 * inferiors.c: Move code to ...
5065 * dll.c: .... here. New.
5066 * server.h: Declare clear_dlls.
5067 * Makefile.in (SFILES): Add dll.c.
5068 (OBS): Add dll.o
5069 (dll.o): New rule.
5070
5071 2012-02-11 Yao Qi <yao@codesourcery.com>
5072
5073 * server.c: (handle_monitor_command): Add a new parameter
5074 `own_buf'.
5075 (handle_query): Update caller.
5076
5077 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5078
5079 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5080 * configure, config.in: Regenerate.
5081 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5082 is not defined.
5083
5084 2012-02-02 Pedro Alves <palves@redhat.com>
5085
5086 Try SIGKILL first, then PTRACE_KILL.
5087 * linux-low.c (linux_kill_one_lwp): New.
5088 (linux_kill_one_lwp): Rename to ...
5089 (kill_one_lwp_callback): ... this. Use the new
5090 linux_kill_one_lwp.
5091
5092 2012-02-02 Pedro Alves <palves@redhat.com>
5093
5094 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5095 inferior.
5096
5097 2012-01-27 Pedro Alves <palves@redhat.com>
5098
5099 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5100 (elf_64_file_p): Make static.
5101 (linux_pid_exe_is_elf_64_file): New.
5102 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5103 Delete declarations.
5104 (linux_pid_exe_is_elf_64_file): Declare.
5105 * linux-x86-low.c (x86_arch_setup): Use
5106 linux_pid_exe_is_elf_64_file.
5107
5108 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5109
5110 * linux-low.c (linux_wait_for_event_1): Rename to ...
5111 (linux_wait_for_event): ... here and merge it with former
5112 linux_wait_for_event - new variable wait_ptid, use it.
5113 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5114
5115 2012-01-23 Pedro Alves <palves@redhat.com>
5116
5117 * server.c (main): Avoid yet another case of infinite loop while
5118 detaching/killing after a longjmp.
5119
5120 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5121
5122 Code cleanup.
5123 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5124
5125 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5126
5127 * hostio.c (handle_readlink): New function.
5128 (handle_vFile): Call it to handle "vFile:readlink" packets.
5129
5130 2012-01-20 Pedro Alves <palves@redhat.com>
5131 Ulrich Weigand <ulrich.weigand@linaro.org>
5132
5133 * server.c (handle_v_requests): Only support vAttach and vRun to
5134 start multiple processes when in extended protocol mode.
5135
5136 2012-01-17 Pedro Alves <palves@redhat.com>
5137
5138 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5139 memalign plus mprotect to allocate the scratch buffer.
5140
5141 2012-01-13 Pedro Alves <palves@redhat.com>
5142
5143 * server.c (attach_inferior): Clear `cont_thread'.
5144
5145 2012-01-13 Pedro Alves <palves@redhat.com>
5146
5147 * server.c (main): Avoid infinite loop while detaching/killing
5148 after a longjmp.
5149
5150 2012-01-09 Doug Evans <dje@google.com>
5151
5152 * server.c (start_inferior): Set last_ptid in --wrapper case.
5153
5154 2012-01-06 Yao Qi <yao@codesourcery.com>
5155
5156 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5157 defined.
5158 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5159
5160 2012-01-04 Yao Qi <yao@codesourcery.com>
5161
5162 * tracepoint.c (cmd_qtdp): Print debug message
5163 for static tracepoint.
5164
5165 2012-01-04 Yao Qi <yao@codesourcery.com>
5166
5167 * tracepoint.c (trace_vdebug): Differentiate debug message
5168 between gdbserver and IPA.
5169
5170 2012-01-03 Yao Qi <yao@codesourcery.com>
5171
5172 * tracepoint.c (tracepoint_was_hit): Don't collect for
5173 static tracepoint.
5174
5175 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5176
5177 * terminal.h: Reformat copyright header.
5178
5179 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5180
5181 * server.c (gdbserver_version): Update copyright year.
5182 * gdbreplay.c (gdbreplay_version): Likewise.
5183
5184 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5185
5186 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5187
5188 Revert:
5189 2011-12-18 Hui Zhu <teawater@gmail.com>
5190 * linux-low.c (linux_create_inferior): Save return value to ret.
5191
5192 2011-12-18 Hui Zhu <teawater@gmail.com>
5193
5194 * linux-low.c (linux_create_inferior): Save return value to ret.
5195
5196 2011-12-16 Doug Evans <dje@google.com>
5197
5198 * linux-low.c (linux_create_inferior): If stdio connection,
5199 redirect stdin from /dev/null, stdout to stderr.
5200 * remote-utils.c (remote_is_stdio): New static global.
5201 (remote_connection_is_stdio): New function.
5202 (remote_prepare): Handle stdio connection.
5203 (remote_open): Ditto.
5204 (remote_close): Don't close stdin for stdio connections.
5205 (read_prim,write_prim): New functions. Replace all calls to
5206 read/write to these.
5207 * server.c (main): Watch for "-" argument. Move call to
5208 remote_prepare before start_inferior.
5209 * server.h (STDIO_CONNECTION_NAME): New macro.
5210 (remote_connection_is_stdio): Declare.
5211
5212 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5213 in debugging output.
5214
5215 2011-12-15 Yao Qi <yao@codesourcery.com>
5216
5217 * tracepoint.c: Include sys/syscall.h.
5218 (gdb_ust_thread): Remove preprocessor conditional.
5219
5220 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5221
5222 * linux-low.c (linux_detach_one_lwp): Call
5223 the_low_target.prepare_to_resume before detaching.
5224
5225 2011-12-14 Yao Qi <yao@codesourcery.com>
5226
5227 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5228 of write.
5229
5230 2011-12-14 Yao Qi <yao@codesourcery.com>
5231
5232 * i386-low.c (i386_low_stopped_data_address): Initialize local
5233 variable `control'.
5234
5235 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5236
5237 PR remote/13492
5238
5239 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5240 DR_CONTROL unless necessary. Extend comments.
5241 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5242 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5243
5244 2011-12-13 Yao Qi <yao@codesourcery.com>
5245
5246 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5247 macros.
5248 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5249
5250 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5251
5252 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5253 Print new debug message for such case.
5254
5255 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5256
5257 Fix overlapping memcpy.
5258 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5259 the read_inferior_memory transfer.
5260 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5261 write_inferior_memory transfer.
5262 (set_fast_tracepoint_jump): New variable buf. Use it for the
5263 read_inferior_memory and write_inferior_memory transfers.
5264 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5265 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5266 Use it for the write_inferior_memory transfer.
5267 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5268 buffers.
5269
5270 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5271
5272 * linux-low.c (fetch_register, store_register): Make code
5273 consistent, fix formatting.
5274
5275 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5276
5277 * linux-low.c (usr_store_inferior_registers): Factor out code
5278 to handle individual registers into...
5279 (store_register): ... this new function.
5280
5281 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5282
5283 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5284 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5285 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5286 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5287 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5288 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5289 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5290 (srv_xmlfiles): Add new XML files.
5291
5292 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5293 and <sys/uio.h>.
5294 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5295 (init_registers_s390_linux32v1): Add prototype.
5296 (init_registers_s390_linux32v2): Likewise.
5297 (init_registers_s390_linux64v1): Likewise.
5298 (init_registers_s390_linux64v2): Likewise.
5299 (init_registers_s390x_linux64v1): Likewise.
5300 (init_registers_s390x_linux64v2): Likewise.
5301 (s390_num_regs): Increment to 52.
5302 (s390_regmap): Add orig_r2 register.
5303 (s390_num_regs_3264): Increment to 68.
5304 (s390_regmap_3264): Add orig_r2 register.
5305 (s390_collect_ptrace_register): Handle orig_r2 register.
5306 (s390_supply_ptrace_register): Likewise.
5307 (s390_fill_last_break): New function.
5308 (s390_store_last_break): Likewise.
5309 (s390_fill_system_call): New function.
5310 (s390_store_system_call): Likewise.
5311 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5312 register sets.
5313 (s390_check_regset): New function.
5314 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5315 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5316 Update target_regsets for available register sets.
5317
5318 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5319 Jan Kratochvil <jan.kratochvil@redhat.com>
5320
5321 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5322 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5323 New.
5324 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5325 * linux-low.h (struct process_info_private): New member r_debug.
5326 * server.c (handle_qxfer_libraries): Call
5327 the_target->qxfer_libraries_svr4.
5328 (handle_qxfer_libraries_svr4): New function.
5329 (qxfer_packets): New entry "libraries-svr4".
5330 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5331 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5332 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5333 PACKET_qXfer_libraries_svr4.
5334
5335 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5336
5337 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5338 PSW address/mask between 8-byte and 16-byte formats.
5339 (s390_supply_ptrace_register): Likewise.
5340 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5341 basic addressing mode bit.
5342
5343 2011-11-24 Stan Shebs <stan@codesourcery.com>
5344
5345 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5346
5347 2011-11-17 Stan Shebs <stan@codesourcery.com>
5348
5349 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5350 (tracing_start_time): New global.
5351 (tracing_stop_time): New global.
5352 (tracing_user_name): New global.
5353 (tracing_notes): New global.
5354 (tracing_stop_note): New global.
5355 (cmd_qtstart): Set traceframe_usage, start_time.
5356 (stop_tracing): Set stop_time.
5357 (cmd_qtstatus): Report additional status.
5358 (cmd_qtp): New function.
5359 (handle_tracepoint_query): Call it.
5360 (cmd_qtnotes): New function.
5361 (handle_tracepoint_general_set): Call it.
5362 (get_timestamp): Rename from tsv_get_timestamp.
5363
5364 2011-11-14 Stan Shebs <stan@codesourcery.com>
5365 Kwok Cheung Yeung <kcy@codesourcery.com>
5366
5367 * linux-x86-low.c (small_jump_insn): New.
5368 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5369 trampoline and error message, build a trampoline and issue a small
5370 jump instruction to it.
5371 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5372 trampoline and error message.
5373 (x86_get_min_fast_tracepoint_insn_len): New.
5374 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5375 * linux-low.h (struct linux_target_ops): Add arguments to
5376 install_fast_tracepoint_jump_pad operation, add new operation.
5377 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5378 arguments.
5379 (linux_get_min_fast_tracepoint_insn_len): New function.
5380 (linux_target_op): Add new operation.
5381 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5382 (gdb_trampoline_buffer_end): Ditto.
5383 (gdb_trampoline_buffer_error): Ditto.
5384 (struct ipa_sym_addresses): Add fields for new IPA variables.
5385 (symbol_list): Add entries for new IPA variables.
5386 (struct tracepoint): Add fields to hold the address range of the
5387 trampoline used by the tracepoint.
5388 (trampoline_buffer_head): New static variable.
5389 (trampoline_buffer_tail): Ditto.
5390 (claim_trampoline_space): New function.
5391 (have_fast_tracepoint_trampoline_buffer): New function.
5392 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5393 structure.
5394 (install_fast_tracepoint): Ditto, also add error buffer argument.
5395 (cmd_qtminftpilen): New function.
5396 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5397 (fast_tracepoint_from_trampoline_address): New function.
5398 (fast_tracepoint_collecting): Handle trampoline as part of jump
5399 pad space.
5400 (set_trampoline_buffer_space): New function.
5401 (initialize_tracepoint): Initialize new IPA variables.
5402 * target.h (struct target_ops): Add arguments to
5403 install_fast_tracepoint_jump_pad operation, add new
5404 get_min_fast_tracepoint_insn_len operation.
5405 (target_get_min_fast_tracepoint_insn_len): New.
5406 (install_fast_tracepoint_jump_pad): Add arguments.
5407 * server.h (IPA_BUFSIZ): Define.
5408 * linux-i386-ipa.c: Include extra header files.
5409 (initialize_fast_tracepoint_trampoline_buffer): New function.
5410 (initialize_low_tracepoint): Call it.
5411 * server.h (set_trampoline_buffer_space): Declare.
5412 (claim_trampoline_space): Ditto.
5413 (have_fast_tracepoint_trampoline_buffer): Ditto.
5414
5415 2011-11-14 Yao Qi <yao@codesourcery.com>
5416
5417 * server.c (handle_query): Handle InstallInTrace for qSupported.
5418 * tracepoint.c (add_tracepoint): Sort list.
5419 (install_tracepoint, download_tracepoint): New.
5420 (cmd_qtdp): Call them to install and download tracepoints.
5421 (sort_tracepoints): Removed.
5422 (cmd_qtstart): Update.
5423
5424 2011-11-14 Yao Qi <yao@codesourcery.com>
5425
5426 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5427 * mem-break.h: Declare.
5428 * tracepoint.c (cmd_qtstart): Move some code to ...
5429 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5430 New.
5431 (download_tracepoints): Move some code to ...
5432 (download_tracepoint_1): ... here. New.
5433
5434 2011-11-08 Yao Qi <yao@codesourcery.com>
5435
5436 * remote-utils.c (relocate_instruction): A comment fix.
5437
5438 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5439
5440 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5441 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5442 dr_status_mirror and dr_control_mirror from debug_reg_state.
5443 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5444 (i386_initial_stuff): Remove use of deleted globals.
5445 (i386_get_thread_context, i386_set_thread_context,
5446 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5447 from debug_reg_state.
5448
5449 2011-11-05 Yao Qi <yao@codesourcery.com>
5450
5451 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5452 address as TPOINT's.
5453
5454 2011-11-02 Stan Shebs <stan@codesourcery.com>
5455
5456 * tracepoint.c (agent_mem_read_string): New function.
5457 (eval_agent_expr): Call it for tracenz.
5458 * server.c (handle_query): Report support for tracenz.
5459
5460 2011-11-02 Yao Qi <yao@codesourcery.com>
5461
5462 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5463
5464 2011-11-02 Yao Qi <yao@codesourcery.com>
5465
5466 * target.h: Fix a typo in comment.
5467
5468 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5469
5470 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5471 clobber the breakpoints' shadows with fast tracepoint jumps.
5472 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5473 * target.c (write_inferior_memory): Also pass MYADDR down to
5474 check_mem_write.
5475
5476 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5477
5478 * configure.ac: Check support for personality routine.
5479 * configure: Regenerate.
5480 * config.in: Likewise.
5481 * linux-low.c: Include <sys/personality.h>.
5482 Define ADDR_NO_RANDOMIZE if necessary.
5483 (linux_create_inferior): Disable address space randomization when
5484 forking inferior, if requested.
5485 (linux_supports_disable_randomization): New function.
5486 (linux_target_ops): Install it.
5487 * server.h (disable_randomization): Declare.
5488 * server.c (disable_randomization): New global variable.
5489 (handle_general_set): Handle QDisableRandomization.
5490 (handle_query): Likewise for qSupported.
5491 (main): Support --disable-randomization and --no-disable-randomization
5492 command line arguments.
5493 * target.h (struct target_ops): Add supports_disable_randomization.
5494 (target_supports_disable_randomization): New macro.
5495
5496 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5497
5498 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5499 ifdef check.
5500 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5501 [!PT_GETDSBT] (target_loadmap): New definition.
5502 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5503 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5504 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5505 and PT_GETDSBT to LINUX_LOADMAP.
5506 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5507 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5508
5509 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5510
5511 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5512 (arm_linux_hwbp_cap): New static variable.
5513 (arm_linux_get_hwbp_cap): Replace by ...
5514 (arm_linux_init_hwbp_cap): ... this new function.
5515 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5516 (arm_linux_get_hw_watchpoint_count): Likewise.
5517 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5518 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5519 (arm_prepare_to_resume): Use perror_with_name instead of error.
5520
5521 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5522
5523 * linux-arm-low.c: Include <signal.h>.
5524 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5525 (struct arm_linux_hwbp_cap): New data type.
5526 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5527 (struct arm_linux_hw_breakpoint): New data type.
5528 (MAX_BPTS, MAX_WPTS): Define.
5529 (struct arch_process_info, struct arch_lwp_info): New data types.
5530 (arm_linux_get_hwbp_cap): New function.
5531 (arm_linux_get_hw_breakpoint_count): Likewise.
5532 (arm_linux_get_hw_watchpoint_count): Likewise.
5533 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5534 (arm_hwbp_control_initialize): Likewise.
5535 (arm_hwbp_control_is_enabled): Likewise.
5536 (arm_hwbp_control_is_initialized): Likewise.
5537 (arm_hwbp_control_disable): Likewise.
5538 (arm_linux_hw_breakpoint_equal): Likewise.
5539 (arm_linux_hw_point_initialize): Likewise.
5540 (struct update_registers_data): New data structure.
5541 (update_registers_callback: New function.
5542 (arm_insert_point): Likewise.
5543 (arm_remove_point): Likewise.
5544 (arm_stopped_by_watchpoint): Likewise.
5545 (arm_stopped_data_address): Likewise.
5546 (arm_new_process): Likewise.
5547 (arm_new_thread): Likewise.
5548 (arm_prepare_to_resume): Likewise.
5549 (the_low_target): Register arm_insert_point, arm_remove_point,
5550 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5551 arm_new_thread, and arm_prepare_to_resume.
5552
5553 2011-09-15 Stan Shebs <stan@codesourcery.com>
5554
5555 * server.h (struct emit_ops): Add compare-goto fields.
5556 * tracepoint.c (gdb_agent_op_sizes): New table.
5557 (emit_eq_goto): New function.
5558 (emit_ne_goto): New function.
5559 (emit_lt_goto): New function.
5560 (emit_le_goto): New function.
5561 (emit_gt_goto): New function.
5562 (emit_ge_goto): New function.
5563 (is_goto_target): New function.
5564 (compile_bytecodes): Recognize special cases of compare-goto
5565 combinations and call specialized emitters for them.
5566 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5567 (amd64_emit_ne_goto): New function.
5568 (amd64_emit_lt_goto): New function.
5569 (amd64_emit_le_goto): New function.
5570 (amd64_emit_gt_goto): New function.
5571 (amd64_emit_ge_goto): New function.
5572 (amd64_emit_ops): Add the new functions.
5573 (i386_emit_eq_goto): New function.
5574 (i386_emit_ne_goto): New function.
5575 (i386_emit_lt_goto): New function.
5576 (i386_emit_le_goto): New function.
5577 (i386_emit_gt_goto): New function.
5578 (i386_emit_ge_goto): New function.
5579 (i386_emit_ops): Add the new functions.
5580
5581 2011-09-08 Stan Shebs <stan@codesourcery.com>
5582
5583 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5584 (i386_emit_epilogue): Restore %ebx.
5585
5586 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5587
5588 * server.c (step_thread): Remove definition.
5589 (process_serial_event): Don't handle Hs.
5590 * server.h (step_thread): Remove declaration.
5591 * target.c (set_desired_inferior): Remove use of step_thread.
5592
5593 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5594
5595 * linux-low.c: Include linux-procfs.h.
5596 (linux_attach_lwp_1): Update comments.
5597 (linux_attach): Scan for existing threads when attaching to a
5598 process that is the tgid.
5599 * Makefile.in: Update dependencies.
5600
5601 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5602
5603 * configure.srv: Add linux-procfs.o dependencies.
5604
5605 2011-08-14 Yao Qi <yao@codesourcery.com>
5606
5607 * target.h (struct target_ops): Fix indent.
5608 * win32-low.c (win32_target_ops): Fix comment.
5609
5610 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5611 Yao Qi <yao@codesourcery.com>
5612
5613 * Makefile.in (clean): Remove tic6x-*.c files.
5614 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5615 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5616 (tic6x-c64xp-linux.c): Likewise.
5617 * configure.srv: Add support for tic6x-*-uclinux.
5618 * linux-tic6x-low.c: New.
5619 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5620
5621 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5622 Yao Qi <yao@codesourcery.com>
5623
5624 * target.h (struct target_ops): Add read_loadmap.
5625 * linux-low.c (struct target_loadseg): New type.
5626 (struct target_loadmap): New type.
5627 (linux_read_loadmap): New function.
5628 (linux_target_ops): Add linux_read_loadmap.
5629 * server.c (handle_query): Support qXfer:fdpic:read packet.
5630 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5631 to NULL.
5632
5633 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5634
5635 * win32-low.c: Include <stdint.h>.
5636
5637 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5638
5639 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5640 to the inferior here.
5641 (i386_remove_aligned_watchpoint): Ditto.
5642 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5643 fit part of the watchpoint in the debug registers.
5644 (i386_update_inferior_debug_regs): New.
5645 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5646 registers, and only update the inferior on success.
5647 (i386_low_remove_watchpoint): Ditto.
5648
5649 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5650
5651 * linux-low.c (compare_ints, unique, list_threads, show_process,
5652 linux_core_of_thread): Delete.
5653 (linux_target_ops): Change linux_core_of_thread to
5654 linux_common_core_of_thread.
5655 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5656 * utils.c (malloc_failure): Change type of argument.
5657 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5658 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5659 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5660 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5661 (IPA_OBJS): Add common-utils-ipa.o.
5662 (ptid_h, linux_osdata_h): New macros.
5663 (server_h): Add common/common-utils.h, common/xml-utils.h,
5664 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5665 common/ptid.h.
5666 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5667 ptid.o, buffer.o): New rules.
5668 (linux-low.o): Add common/linux-osdata.h as a dependency.
5669 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5670 * configure.ac: Add AC_HEADER_DIRENT check.
5671 * config.in: Regenerate.
5672 * configure: Regenerate.
5673 * remote-utils.c (xml_escape_text): Delete.
5674 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5675 buffer_xml_printf): Move to common/buffer.c.
5676 * server.c (main): Remove call to initialize_inferiors.
5677 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5678 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5679 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5680 internal_error, gdb_assert, gdb_assert_fail): Delete.
5681 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5682 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5683 common/buffer.h.
5684 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5685 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5686 initialize_inferiors): Delete.
5687
5688 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5689
5690 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5691 symbol error.
5692
5693 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5694
5695 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5696 assertion.
5697 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5698
5699 2011-05-26 Yao Qi <yao@codesourcery.com>
5700
5701 * Makefile.in (thread-db.o): Track dependence to
5702 common/gdb_thread_db.h.
5703 * thread-db.c: include gdb_thread_db.h from right place.
5704
5705 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5706
5707 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5708 __FILE__ and __LINE__ to internal_error.
5709
5710 2011-05-13 Doug Evans <dje@google.com>
5711
5712 * thread-db.c (try_thread_db_load_from_sdir): New function.
5713 (try_thread_db_load_from_dir): New function.
5714 (thread_db_load_search): Handle $sdir, ignore $pdir.
5715 Remove trying of system directories if search of
5716 libthread-db-search-path fails, that is now done via $sdir.
5717
5718 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5719
5720 * server.c (handle_query): Add EnableDisableTracepoints to the list
5721 of supported features.
5722 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5723 tracepoints.
5724 (cmd_qtenable_disable): New.
5725 (cmd_qtstart): Install tracepoints even if disabled.
5726 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5727 receiving a QTEnable or QTDisable packet.
5728 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5729 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5730 tracepoints.
5731 (gdb_probe): Skip data collection if static tracepoint is disabled.
5732
5733 2011-05-10 Doug Evans <dje@google.com>
5734
5735 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5736
5737 2011-05-04 Doug Evans <dje@google.com>
5738
5739 * linux-low.c (linux_join): Skip process lookup.
5740 * spu-low.c (spu_join): Ditto.
5741 * server.c (join_inferiors_callback): Delete.
5742 (process_serial_event): For 'D' packet (detach) call join_inferior
5743 directly.
5744
5745 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5746
5747 * README: Don't mention xscale*-*-linux*.
5748 * configure.srv (xscale*-*-linux*): Don't handle target.
5749
5750 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5751
5752 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5753 casting pointers.
5754 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5755 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5756 (i386_emit_void_call_2): Likewise.
5757
5758 2011-04-26 Yao Qi <yao@codesourcery.com>
5759
5760 * linux-low.c: Move common macros to linux-ptrace.h.
5761 Include linux-ptrace.h.
5762 * Makefile.in (linux_ptrace_h): New.
5763 (linux-low.o): Depends on linux-ptrace.h.
5764
5765 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5766
5767 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5768 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5769 (remote_prepare): New function with most of the TCP code from ...
5770 (remote_open): ... here. Detect PORT here unconditionally. Move also
5771 setting transport_is_reliable.
5772 * server.c (run_once): New variable.
5773 (gdbserver_usage): Document it.
5774 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5775 the first run if RUN_ONCE.
5776 * server.h (run_once, remote_prepare): New declarations.
5777
5778 2011-04-19 Tom Tromey <tromey@redhat.com>
5779
5780 * win32-low.c (handle_load_dll): Remove duplicate "the".
5781
5782 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5783
5784 Remove support for old Cygwin 1.5 versions.
5785 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5786 function to avoid warning.
5787 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5788 warning.
5789
5790 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5791
5792 * gdbserver/server.h (Macro _): Define it if not available.
5793
5794 2011-03-14 Michael Snyder <msnyder@vmware.com>
5795
5796 * hostio.c (handle_close): Remove unnecessary null test.
5797
5798 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5799
5800 * Makefile.in (maintainer-clean realclean distclean): Remove
5801 "make ... subdir_do" command.
5802
5803 2011-03-10 Michael Snyder <msnyder@vmware.com>
5804
5805 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5806
5807 * server.c (handle_v_run): Free alloced buffer on early return.
5808
5809 2011-03-09 Yao Qi <yao@codesourcery.com>
5810
5811 Revert:
5812 2011-03-04 Yao Qi <yao@codesourcery.com>
5813
5814 * Makefile.in: Remove GNU make feature --directory.
5815
5816 2011-03-05 Yao Qi <yao@codesourcery.com>
5817
5818 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5819 (subdir_do): New make target. Copied from gdb/Makefile.
5820 (maintainer-clean, realclean, distclean, clean): Call corresponding
5821 make targets in common/Makefile.
5822
5823 2011-02-11 Yao Qi <yao@codesourcery.com>
5824
5825 * configure.ac: Call AC_PROG_RANLIB.
5826 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5827 * configure: Regenerate.
5828
5829 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5830
5831 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5832
5833 2011-03-06 Yao Qi <yao@codesourcery.com>
5834
5835 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5836
5837 2011-03-05 Yao Qi <yao@codesourcery.com>
5838
5839 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5840 (subdir_do): New make target. Copied from gdb/Makefile.
5841 (maintainer-clean, realclean, distclean, clean): Call corresponding
5842 make targets in common/Makefile.
5843
5844 2011-03-04 Yao Qi <yao@codesourcery.com>
5845
5846 * Makefile.in: Remove GNU make feature --directory.
5847
5848 2011-03-04 Michael Snyder <msnyder@vmware.com>
5849
5850 * server.c (queue_stop_reply): Call xmalloc not malloc.
5851
5852 2011-03-02 Michael Snyder <msnyder@vmware.com>
5853
5854 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5855
5856 2011-02-28 Michael Snyder <msnyder@vmware.com>
5857
5858 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5859 (cmd_qtframe): Ditto.
5860 (cmd_qtbuffer): Ditto.
5861 (cmd_bigqtbuffer): Ditto.
5862
5863 * utils.c (decimal2str): Initialize 'width' to nine, then
5864 don't mess with it.
5865
5866 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5867
5868 * hostio.c (require_data): Free *data, not data.
5869
5870 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5871
5872 * hostio.c (require_data): Use free, not xfree.
5873
5874 2011-02-27 Michael Snyder <msnyder@vmware.com>
5875
5876 * server.c (handle_query): Discard unused value.
5877
5878 * hostio.c (require_data): Free malloc memory before returning
5879 error.
5880
5881 2011-02-26 Michael Snyder <msnyder@vmware.com>
5882
5883 * linux-low.c (list_threads): Call closedir for dirent.
5884
5885 2011-02-27 Michael Snyder <msnyder@vmware.com>
5886
5887 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5888 a case statement falls through.
5889
5890 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5891
5892 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5893 in comparison.
5894
5895 2011-02-26 Michael Snyder <msnyder@vmware.com>
5896
5897 * utils.c (decimal2str): Eliminate dead code and dead param.
5898 (pulongest): Drop dead param from call to decimal2str.
5899 (plongest): Ditto.
5900
5901 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5902
5903 Revert the following patch (not approved yet):
5904 2011-02-21 Hui Zhu <teawater@gmail.com>
5905 * tracepoint.c (tp_printf): New function.
5906 (eval_agent_expr): Handle gdb_agent_op_printf.
5907
5908 2011-02-21 Hui Zhu <teawater@gmail.com>
5909
5910 * tracepoint.c (tp_printf): New function.
5911 (eval_agent_expr): Handle gdb_agent_op_printf.
5912
5913 2011-02-18 Tom Tromey <tromey@redhat.com>
5914
5915 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5916 (tracepoint.o): Likewise.
5917 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5918 (gdb_agent_op_names): Likewise.
5919
5920 2011-02-18 Tom Tromey <tromey@redhat.com>
5921
5922 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5923 gdb_agent_op_rot>: New constants.
5924 (gdb_agent_op_names): Add pick and roll.
5925 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5926 cases.
5927
5928 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5929
5930 * aclocal.m4: Regenerated with aclocal-1.11.1.
5931
5932 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5933
5934 * server.c (handle_qxfer_traceframe_info): New.
5935 (qxfer_packets): Register "traceframe-info".
5936 (handle_query): Report support for qXfer:traceframe-info:read+.
5937 * tracepoint.c (match_blocktype): New.
5938 (traceframe_find_block_type): Rename to ...
5939 (traceframe_walk_blocks): ... this. Add callback filter argument,
5940 and use it.
5941 (traceframe_find_block_type): New, reimplemented on top of
5942 traceframe_walk_blocks.
5943 (build_traceframe_info_xml): New.
5944 (traceframe_read_info): New.
5945 * server.h (traceframe_read_info): Declare.
5946
5947 2011-02-11 Yao Qi <yao@codesourcery.com>
5948
5949 * configure.ac: Call AC_PROG_RANLIB.
5950 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5951 * configure: Regenerate.
5952
5953 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5954
5955 * server.c (gdb_read_memory): Change return semantics to allow
5956 partial transfers.
5957 (handle_search_memory_1): Adjust.
5958 (process_serial_event) <'m' packet>: Handle partial transfers.
5959 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5960
5961 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5962
5963 * regcache.c (init_register_cache): Initialize
5964 regcache->register_status.
5965 (free_register_cache): Release regcache->register_status.
5966 (regcache_cpy): Copy register_status.
5967 (registers_to_string): Print 'x's for unavailable registers.
5968 (supply_register): Mark the register's status valid or
5969 unavailable, depending on whether a buffer was passed in or not.
5970 (supply_register_zeroed): New.
5971 (supply_regblock): Mark the registers' status valid or
5972 unavailable, depending on whether a buffer was passed in or not.
5973 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5974 (struct regcache): New `register_status' field.
5975 (supply_register_zeroed): Declare.
5976 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5977 supply_register_zeroed, rather than passing a NULL buffer to
5978 supply_register.
5979 * tracepoint.c (fetch_traceframe_registers): Update comment.
5980
5981 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5982
5983 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5984 buffer explicit.
5985
5986 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5987
5988 * server.h (decode_xfer_write): Change prototype.
5989 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5990 and don't extract the annex here.
5991 * server.c (decode_xfer_read): Remove `annex' parameter,
5992 and don't extract the annex here.
5993 (decode_xfer): New.
5994 (struct qxfer): New.
5995 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5996 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5997 (handle_qxfer_statictrace): New functions, abstracted out from
5998 handle_query, and made to use the struct qxfer interface.
5999 (handle_threads_qxfer_proper): Rename to ...
6000 (handle_qxfer_threads_proper): ... this.
6001 (handle_threads_qxfer): Rename to ...
6002 (handle_qxfer_threads): ... this. Adjust.
6003 (qxfer_packets): New array.
6004 (handle_qxfer): New function.
6005 (handle_query): Use handle_qxfer.
6006
6007 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6008
6009 * gdbreplay.c: Shorten lines of >= 80 columns.
6010 * linux-low.c: Ditto.
6011 * linux-ppc-low.c: Ditto.
6012 * linux-s390-low.c: Ditto.
6013 * linux-sparc-low.c: Ditto.
6014 * linux-x86-low.c: Ditto.
6015 * linux-xtensa-low.c: Ditto.
6016 * mem-break.c: Ditto.
6017 * nto-low.c: Ditto.
6018 * regcache.h: Ditto.
6019 * remote-utils.c: Ditto.
6020 * server.c: Ditto.
6021 * server.h: Ditto.
6022 * thread-db.c: Ditto.
6023 * tracepoint.c: Ditto.
6024 * utils.c: Ditto.
6025 * win32-low.h: Ditto.
6026
6027 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6028
6029 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6030 update.
6031
6032 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6033
6034 * server.c (gdbserver_version): Update copyright year in version
6035 output.
6036 * gdbreplay.c (gdbreplay_version): Ditto.
6037
6038 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6039
6040 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6041 * linux-bfin-low.c: New file.
6042 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6043 PT_DATA_ADDR for BFIN targets.
6044 * Makefile.in (SFILES): Add linux-bfin-low.c.
6045 (clean): Remove reg-bfin.c.
6046 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6047 * README: Mention supported Blackfin targets.
6048
6049 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6050
6051 * .gitignore: New file.
6052
6053 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6054
6055 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6056
6057 2010-10-22 Jie Zhang <jie@codesourcery.com>
6058
6059 * Makefile.in: Add FLAGS_TO_PASS variable.
6060 (install): Remove dependency of install-only and recursively
6061 invoke make for install-only.
6062
6063 2010-10-04 Doug Evans <dje@google.com>
6064
6065 * Makefile.in (uninstall): Use $(DESTDIR).
6066
6067 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6068
6069 PR gdb/11842
6070
6071 * linux-x86-low.c (compat_siginfo_from_siginfo)
6072 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6073 si_code is < 0. Check for si_code == SI_TIMER before checking for
6074 si_code < 0.
6075
6076 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6077
6078 * lynx-i386-low.c: New file.
6079 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6080
6081 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6082
6083 * lynx-low.c (ptrace_request_to_str): Remove handling for
6084 request values that have been removed in LynxOS 5.x.
6085
6086 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6087
6088 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6089 <ptrace.h>
6090
6091 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6092
6093 * configure.ac: Add --enable-inprocess-agent option.
6094 * configure: Rebuilt.
6095
6096 2010-09-06 Yao Qi <yao@codesourcery.com>
6097
6098 * linux-low.c (linux_kill): Remove unused variable.
6099 (linux_stabilize_threads): Likewise.
6100 * server.c (start_inferior): Likewise.
6101 (queue_stop_reply_callback): Likewise.
6102 * tracepoint.c (do_action_at_tracepoint): Likewise.
6103
6104 2010-09-06 Yao Qi <yao@codesourcery.com>
6105
6106 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6107 on return.
6108
6109 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6110
6111 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6112
6113 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6114
6115 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6116 "$(IPA_DEPFILES)".
6117
6118 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6119
6120 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6121 gdbserver/lynx-ppc-low.c: New files.
6122 * Makefile.in (lynx_low_h): New variable.
6123 (lynx-low.o, lynx-ppc-low.o): New rules.
6124 * configure.ac: On LynxOS, link with -lnetinet.
6125 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6126 * configure: regenerate.
6127
6128 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6129
6130 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6131 * configure.ac: Add check for vasprintf and vsnprintf.
6132 * configure, config.in: Regenerate.
6133 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6134
6135 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6136
6137 * gdbreplay.c: Move include of alloca.h up, next to include of
6138 malloc.h.
6139 * server.h: Add include of malloc.h.
6140 * mem-break.c: Remove include of malloc.h.
6141 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6142
6143 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6144
6145 * Makefile.in (memmem.o): Build with -Wno-error.
6146
6147 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6148
6149 * utils.c (xsnprintf): Make non-static.
6150 * server.h: Add xsnprintf declaration.
6151 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6152 replace calls to snprintf by calls to xsnprintf throughout.
6153
6154 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6155
6156 * configure.ac: Add configure check for alloca.
6157 * configure, config.in: Regenerate.
6158 * server.h: Include alloca.h if it exists.
6159 * gdbreplay.c: Include alloca.h if it exists.
6160
6161 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6162
6163 * linux-low.c (__SIGRTMIN): Define if not already defined.
6164 (linux_create_inferior): Check for __ANDROID__ rather than
6165 __SIGRTMIN.
6166 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6167 are already deferred.
6168 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6169 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6170 stopped and already has a pending signal to report.
6171 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6172 a pending signal to report or is moving out of a jump pad.
6173 (linux_init_signals): Check for __ANDROID__ rather than
6174 __SIGRTMIN.
6175
6176 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6177
6178 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6179 debug_threads check. Avoid a linear search when not doing debug
6180 output.
6181
6182 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6183
6184 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6185 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6186 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6187 (process_event): Change local fd's type to gdb_fildes_t.
6188 (create_file_handler): Adjust prototype.
6189 (delete_file_handler): Adjust prototype.
6190 (handle_file_event): Adjust prototype. Use pfildes.
6191 (create_file_event): Adjsut prototype.
6192 * remote-utils.c (remote_desc, listen_desc): Change type to
6193 gdb_fildes_t.
6194 * server.h: New gdb_fildes_t typedef.
6195 [USE_WIN32API]: Include winsock2.h.
6196 (delete_file_handler, add_file_handler): Adjust prototypes.
6197 (pfildes): Declare.
6198 * utils.c (pfildes): New.
6199
6200 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6201
6202 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6203 * configure: Regenerate.
6204
6205 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6206
6207 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6208 (linux_done_accessing_memory): ... this.
6209 (linux_target_ops): Adjust.
6210 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6211 * nto-low.c (nto_target_ops): Adjust comment.
6212 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6213 * spu-low.c (spu_target_ops): Adjust comment.
6214 * target.h (target_ops): Rename unprepare_to_access_memory field
6215 to done_accessing_memory.
6216 (unprepare_to_access_memory): Rename to ...
6217 (done_accessing_memory): ... this.
6218
6219 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6220
6221 * linux-low.c (linux_prepare_to_access_memory): New.
6222 (linux_unprepare_to_access_memory): New.
6223 (linux_target_ops): Install them.
6224 * server.c (read_memory): Rename to ...
6225 (gdb_read_memory): ... this. Use
6226 prepare_to_access_memory/prepare_to_access_memory.
6227 (write_memory): Rename to ...
6228 (gdb_write_memory): ... this. Use
6229 prepare_to_access_memory/prepare_to_access_memory.
6230 (handle_search_memory_1): Adjust.
6231 (process_serial_event): Adjust.
6232 * target.h (struct target_ops): New fields
6233 prepare_to_access_memory and unprepare_to_access_memory.
6234 (prepare_to_access_memory, unprepare_to_access_memory): New.
6235 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6236 prepare_to_access_memory/prepare_to_access_memory.
6237 * nto-low.c (nto_target_ops): Adjust.
6238 * spu-low.c (spu_target_ops): Adjust.
6239 * win32-low.c (win32_target_ops): Adjust.
6240
6241 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6242
6243 * Makefile.in (WARN_CFLAGS): Get it from configure.
6244 (WERROR_CFLAGS): New.
6245 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6246 * configure.ac: Introduce --enable-werror, which adds -Werror to
6247 the compiler command line. Enabled by default. Disable with
6248 --disable-werror. Add -Wdeclaration-after-statement
6249 Wpointer-arith and -Wformat-nonliteral to warning flags.
6250 * configure: Regenerate.
6251
6252 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6253
6254 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6255
6256 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6257
6258 * gdbreplay.c (remote_error): New.
6259 (gdbchar): New.
6260 (expect): Use gdbchar. Check for error reading from GDB.
6261 Clarify sync error output.
6262 (play): Check for errors writing to GDB.
6263 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6264 * remote-utils.c (getpkt): Check for errors writing to the remote
6265 descriptor.
6266
6267 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6268
6269 * linux-low.c (linux_wait_1): Move non-debugging code out of
6270 `debug_threads' control.
6271
6272 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6273
6274 * linux-low.c (linux_wait_1): Don't set last_status here.
6275 * server.c (push_event, queue_stop_reply_callback): Assert we're
6276 not pushing a TARGET_WAITKIND_IGNORE event.
6277 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6278 (myresume, handle_target_event): Set the thread's last_resume_kind
6279 and last_status from the target returned status.
6280
6281 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6282
6283 PR threads/10729
6284
6285 * linux-x86-low.c (update_debug_registers_callback): New.
6286 (i386_dr_low_set_addr): Use it.
6287 (i386_dr_low_get_addr): New.
6288 (i386_dr_low_set_control): Use update_debug_registers_callback.
6289 (i386_dr_low_get_control): New.
6290 (i386_dr_low_get_status): Adjust.
6291 * linux-low.c (linux_stop_lwp): New.
6292 * linux-low.h (linux_stop_lwp): Declare.
6293
6294 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6295 argument instead of a i386_debug_reg_state.
6296 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6297 a i386_debug_reg_state.
6298 (i386_insert_aligned_watchpoint): Adjust.
6299 (i386_remove_aligned_watchpoint): Adjust.
6300 (i386_low_stopped_data_address): Read the debug registers from the
6301 inferior instead of from the mirrors.
6302 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6303 (i386_dr_low_get_addr): Declare.
6304 (i386_dr_low_get_control): Declare.
6305 (i386_dr_low_get_status): Change prototype.
6306
6307 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6308 (i386_dr_low_get_addr): New.
6309 (i386_dr_low_get_control): New.
6310 (i386_dr_low_get_status): Adjust prototype. Return
6311 dr_status_mirror.
6312 (i386_initial_stuff): Clear dr_status_mirror and
6313 dr_control_mirror.
6314 (i386_get_thread_context): Adjust.
6315 (i386_set_thread_context): Adjust.
6316 (i386_thread_added): Adjust.
6317
6318 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6319
6320 * linux-low.h (linux_thread_area): Delete declaration.
6321
6322 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6323
6324 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6325 after its termination.
6326
6327 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6328
6329 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6330 (gdb_wants_all_stopped): Delete.
6331 (linux_wait_1): Don't call them.
6332 * server.c (handle_v_cont): Tag all threads as want-stopped.
6333 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6334 stopped as "client-wants-stopped".
6335
6336 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6337
6338 * Makefile.in (signals_h): New.
6339 (server_h): Depend on it.
6340 (server.o): Don't depend on $(signals_def).
6341 (signals.o): Depend on $(signals_def).
6342
6343 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6344
6345 * Makefile.in (signals_def): New.
6346 (server_h): Append include/gdb/signals.h and signals_def.
6347 (server.o): Append signals_def.
6348
6349 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6350
6351 * server.c (handle_target_event): Use target_signal_to_host for
6352 resume_info.sig initialization.
6353 * target.h (struct thread_resume) <sig>: New comment.
6354
6355 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6356
6357 * server.c (handle_query): strcpy() the returned string from paddress()
6358 instead of sprintf().
6359 * utils.c (paddress): Return phex_nz().
6360
6361 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6362
6363 * server.c (handle_v_cont): Call mourn_inferior if process
6364 just exited.
6365 (myresume): Likewise.
6366
6367 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6368
6369 Static tracepoints, and integration with UST.
6370
6371 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6372 * mem-break.c (uninsert_all_breakpoints)
6373 (reinsert_all_breakpoints): New.
6374 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6375 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6376 (gdb_agent_ust_loaded, helper_thread_id)
6377 (gdb_agent_helper_thread_id): New macros.
6378 (struct ipa_sym_addresses): Add addr_ust_loaded,
6379 addr_helper_thread_id, addr_cmd_buf.
6380 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6381 (in_process_agent_loaded_ust): New.
6382 (write_e_ust_not_loaded): New.
6383 (maybe_write_ipa_ust_not_loaded): New.
6384 (struct collect_static_trace_data_action): New.
6385 (enum tracepoint_type) <static_tracepoint>: New.
6386 (struct tracepoint) <handle>: Mention static tracepoints.
6387 (struct static_tracepoint_ctx): New.
6388 (CMD_BUF_SIZE): New.
6389 (add_tracepoint_action): Handle static tracepoint actions.
6390 (unprobe_marker_at): New.
6391 (clear_installed_tracepoints): Handle static tracepoints.
6392 (cmd_qtdp): Handle static tracepoints.
6393 (probe_marker_at): New.
6394 (cmd_qtstart): Handle static tracepoints.
6395 (response_tracepoint): Handle static tracepoints.
6396 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6397 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6398 (get_context_regcache): Handle static tracepoints.
6399 (do_action_at_tracepoint): Handle static tracepoint actions.
6400 (traceframe_find_block_type): Handle static trace data blocks.
6401 (traceframe_read_sdata): New.
6402 (download_tracepoints): Download static tracepoint actions.
6403 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6404 (GDB_PROBE_NAME): New.
6405 (ust_ops): New.
6406 (GET_UST_SYM): New.
6407 (USTF): New.
6408 (dlsym_ust): New.
6409 (ust_marker_to_static_tracepoint): New.
6410 (gdb_probe): New.
6411 (collect_ust_data_at_tracepoint): New.
6412 (gdb_ust_probe): New.
6413 (UNIX_PATH_MAX, SOCK_DIR): New.
6414 (gdb_ust_connect_sync_socket): New.
6415 (resume_thread, stop_thread): New.
6416 (run_inferior_command): New.
6417 (init_named_socket): New.
6418 (gdb_ust_socket_init): New.
6419 (cstr_to_hexstr): New.
6420 (next_st): New.
6421 (first_marker, next_marker): New.
6422 (response_ust_marker): New.
6423 (cmd_qtfstm, cmd_qtsstm): New.
6424 (unprobe_marker_at, probe_marker_at): New.
6425 (cmd_qtstmat, gdb_ust_thread): New.
6426 (gdb_ust_init): New.
6427 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6428 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6429 (ST_REGENTRY): New.
6430 (x86_64_st_collect_regmap): New.
6431 (X86_64_NUM_ST_COLLECT_GREGS): New.
6432 (AMD64_RIP_REGNUM): New.
6433 (supply_static_tracepoint_registers): New.
6434 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6435 (ST_REGENTRY): New.
6436 (i386_st_collect_regmap): New.
6437 (i386_NUM_ST_COLLECT_GREGS): New.
6438 (supply_static_tracepoint_registers): New.
6439 * server.c (handle_query): Handle qXfer:statictrace:read.
6440 <qSupported>: Report support for StaticTracepoints, and
6441 qXfer:statictrace:read features.
6442 * server.h (traceframe_read_sdata)
6443 (supply_static_tracepoint_registers): Declare.
6444 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6445 (unpack_varlen_hex): Include in IPA build.
6446 * Makefile.in (ustlibs, ustinc): New.
6447 (IPA_OBJS): Add remote-utils-ipa.o.
6448 ($(IPA_LIB)): Link -ldl and -lpthread.
6449 (UST_CFLAGS): New.
6450 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6451 * config.in, configure: Regenerate.
6452
6453 2010-06-20 Ian Lance Taylor <iant@google.com>
6454 Pedro Alves <pedro@codesourcery.com>
6455
6456 * linux-x86-low.c (always_true): Delete.
6457 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6458 trying to fool the compiler with always_true.
6459
6460 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6461
6462 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6463 conditions in gdbserver.
6464
6465 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6466
6467 * spu-low.c (spu_read_memory): Wrap around local store limit.
6468 (spu_write_memory): Likewise.
6469
6470 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6471
6472 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6473 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6474 LONGEST uses.
6475 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6476 uses.
6477 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6478 uses with LONGEST uses.
6479
6480 2010-06-14 Stan Shebs <stan@codesourcery.com>
6481 Pedro Alves <pedro@codesourcery.com>
6482
6483 Bytecode compiler.
6484
6485 * linux-x86-low.c: Include limits.h.
6486 (add_insns): New.
6487 (always_true): New.
6488 (EMIT_ASM): New.
6489 (EMIT_ASM32): New.
6490 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6491 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6492 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6493 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6494 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6495 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6496 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6497 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6498 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6499 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6500 (amd64_emit_void_call_2): New.
6501 (amd64_emit_ops): New.
6502 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6503 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6504 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6505 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6506 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6507 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6508 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6509 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6510 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6511 (i386_emit_stack_adjust, i386_emit_int_call_1)
6512 (i386_emit_void_call_2): New.
6513 (i386_emit_ops): New.
6514 (x86_emit_ops): New.
6515 (the_low_target): Install x86_emit_ops.
6516 * server.h (struct emit_ops): New.
6517 (get_raw_reg_func_addr): Declare.
6518 (current_insn_ptr, emit_error): Declare.
6519 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6520 (set_trace_state_variable_value): New defines.
6521 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6522 addr_get_trace_state_variable_value and
6523 addr_set_trace_state_variable_value.
6524 (symbol_list): New fields for get_raw_reg,
6525 get_trace_state_variable_value and set_trace_state_variable_value.
6526 (condfn): New typedef.
6527 (struct tracepoint): New field `compiled_cond'.
6528 (do_action_at_tracepoint): Clear compiled_cond.
6529 (get_trace_state_variable_value, set_trace_state_variable_value):
6530 Export in the IPA.
6531 (condition_true_at_tracepoint): If there's a compiled condition,
6532 run that.
6533 (current_insn_ptr, emit_error): New globals.
6534 (struct bytecode_address): New.
6535 (get_raw_reg_func_addr): New.
6536 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6537 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6538 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6539 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6540 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6541 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6542 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6543 (compile_tracepoint_condition, compile_bytecodes): New.
6544 * target.h (emit_ops): Forward declare.
6545 (struct target_ops): New field emit_ops.
6546 (target_emit_ops): New.
6547 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6548 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6549 * linux-low.c (linux_emit_ops): New.
6550 (linux_target_ops): Install it.
6551 * linux-low.h (struct linux_target_ops): New field emit_ops.
6552
6553 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6554
6555 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6556 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6557
6558 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6559 Stan Shebs <stan@codesourcery.com>
6560
6561 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6562 (all): Depend on $(extra_libraries).
6563 (install-only): Install the IPA.
6564 (IPA_OBJS, IPA_LIB): New.
6565 (clean): Remove the IPA lib.
6566 (IPAGENT_CFLAGS): New.
6567 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6568 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6569 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6570 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6571 * configure.ac: Check for atomic builtins support in the compiler.
6572 (IPA_DEPFILES, extra_libraries): Define.
6573 * configure.srv (ipa_obj): Add description.
6574 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6575 (i[34567]86-*-linux*): Set ipa_obj.
6576 (x86_64-*-linux*): Set ipa_obj.
6577 * linux-low.c (stabilizing_threads): New.
6578 (supports_fast_tracepoints): New.
6579 (linux_detach): Stabilize threads before detaching.
6580 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6581 the lwp is either not stabilizing, or is moving out of a jump pad.
6582 (linux_fast_tracepoint_collecting): New.
6583 (maybe_move_out_of_jump_pad): New.
6584 (enqueue_one_deferred_signal): New.
6585 (dequeue_one_deferred_signal): New.
6586 (linux_wait_for_event_1): If moving out of a jump pad, defer
6587 pending signals to later.
6588 (linux_stabilize_threads): New.
6589 (linux_wait_1): Check if threads need moving out of jump pads, and
6590 do it if so.
6591 (stuck_in_jump_pad_callback): New.
6592 (move_out_of_jump_pad_callback): New.
6593 (lwp_running): New.
6594 (linux_resume_one_lwp): Handle moving out of jump pads.
6595 (linux_set_resume_request): Dequeue deferred signals.
6596 (need_step_over_p): Also step over fast tracepoint jumps.
6597 (start_step_over): Also uninsert fast tracepoint jumps.
6598 (finish_step_over): Also reinsert fast tracepoint jumps.
6599 (linux_install_fast_tracepoint_jump): New.
6600 (linux_target_ops): Install linux_stabilize_threads and
6601 linux_install_fast_tracepoint_jump_pad.
6602 * linux-low.h (linux_target_ops) <get_thread_area,
6603 install_fast_tracepoint_jump_pad>: New fields.
6604 (struct lwp_info) <collecting_fast_tracepoint,
6605 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6606 (linux_get_thread_area): Declare.
6607 * linux-x86-low.c (jump_insn): New.
6608 (x86_get_thread_area): New.
6609 (append_insns): New.
6610 (push_opcode): New.
6611 (amd64_install_fast_tracepoint_jump_pad): New.
6612 (i386_install_fast_tracepoint_jump_pad): New.
6613 (x86_install_fast_tracepoint_jump_pad): New.
6614 (the_low_target): Install x86_get_thread_area and
6615 x86_install_fast_tracepoint_jump_pad.
6616 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6617 (struct fast_tracepoint_jump): New.
6618 (fast_tracepoint_jump_insn): New.
6619 (fast_tracepoint_jump_shadow): New.
6620 (find_fast_tracepoint_jump_at): New.
6621 (fast_tracepoint_jump_here): New.
6622 (delete_fast_tracepoint_jump): New.
6623 (set_fast_tracepoint_jump): New.
6624 (uninsert_fast_tracepoint_jumps_at): New.
6625 (reinsert_fast_tracepoint_jumps_at): New.
6626 (set_breakpoint_at): Use write_inferior_memory.
6627 (uninsert_raw_breakpoint): Use write_inferior_memory.
6628 (check_mem_read): Mask out fast tracepoint jumps.
6629 (check_mem_write): Mask out fast tracepoint jumps.
6630 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6631 (set_fast_tracepoint_jump): Declare.
6632 (delete_fast_tracepoint_jump)
6633 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6634 (reinsert_fast_tracepoint_jumps_at): Declare.
6635 * regcache.c: Don't compile many functions when building the
6636 in-process agent library.
6637 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6638 the register buffer in the heap.
6639 (free_register_cache): If the register buffer isn't owned by the
6640 regcache, don't free it.
6641 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6642 pre-existing register caches.
6643 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6644 type.
6645 (convert_ascii_to_int): : Constify `from' parameter type.
6646 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6647 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6648 the needed buffer in-place.
6649 (relocate_instruction): New.
6650 * server.c (handle_query) <qSymbols>: If the target supports
6651 tracepoints, give it a chance of looking up symbols. Report
6652 support for fast tracepoints.
6653 (handle_status): Stabilize threads.
6654 (process_serial_event): Adjust.
6655 * server.h (struct fast_tracepoint_jump): Forward declare.
6656 (struct process_info) <fast_tracepoint_jumps>: New field.
6657 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6658 (decode_X_packet, decode_M_packet): Adjust.
6659 (relocate_instruction): Declare.
6660 (in_process_agent_loaded): Declare.
6661 (tracepoint_look_up_symbols): Declare.
6662 (struct fast_tpoint_collect_status): Declare.
6663 (fast_tracepoint_collecting): Declare.
6664 (force_unlock_trace_buffer): Declare.
6665 (handle_tracepoint_bkpts): Declare.
6666 (initialize_low_tracepoint)
6667 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6668 * target.h (struct target_ops) <stabilize_threads,
6669 install_fast_tracepoint_jump_pad>: New fields.
6670 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6671 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6672 [HAVE_STDINT_H]: Include stdint.h.
6673 (trace_debug_1): Rename to ...
6674 (trace_vdebug): ... this.
6675 (trace_debug): Rename to ...
6676 (trace_debug_1): ... this. Add `level' parameter.
6677 (trace_debug): New.
6678 (ATTR_USED, ATTR_NOINLINE): New.
6679 (IP_AGENT_EXPORT): New.
6680 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6681 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6682 (about_to_request_buffer_space, trace_buffer_is_full)
6683 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6684 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6685 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6686 (traceframe_write_count, traceframes_created)
6687 (trace_state_variables)
6688 New renaming defines.
6689 (struct ipa_sym_addresses): New.
6690 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6691 (symbol_list): New.
6692 (ipa_sym_addrs): New.
6693 (all_tracepoint_symbols_looked_up): New.
6694 (in_process_agent_loaded): New.
6695 (write_e_ipa_not_loaded): New.
6696 (maybe_write_ipa_not_loaded): New.
6697 (tracepoint_look_up_symbols): New.
6698 (debug_threads) [IN_PROCESS_AGENT]: New.
6699 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6700 (UNKNOWN_SIDE_EFFECTS): New.
6701 (stop_tracing): New.
6702 (flush_trace_buffer): New.
6703 (stop_tracing_bkpt): New.
6704 (flush_trace_buffer_bkpt): New.
6705 (read_inferior_integer): New.
6706 (read_inferior_uinteger): New.
6707 (read_inferior_data_pointer): New.
6708 (write_inferior_data_pointer): New.
6709 (write_inferior_integer): New.
6710 (write_inferior_uinteger): New.
6711 (struct collect_static_trace_data_action): Delete.
6712 (enum tracepoint_type): New.
6713 (struct tracepoint) <type>: New field `type'.
6714 <actions_str, step_actions, step_actions_str>: Only include in
6715 GDBserver.
6716 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6717 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6718 (tracepoints): Use IP_AGENT_EXPORT.
6719 (last_tracepoint): Don't include in the IPA.
6720 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6721 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6722 (alloced_trace_state_variables): New.
6723 (trace_state_variables): Use IP_AGENT_EXPORT.
6724 (traceframe_t): Delete unused variable.
6725 (circular_trace_buffer): Don't include in the IPA.
6726 (trace_buffer_start): Delete.
6727 (struct trace_buffer_control): New.
6728 (trace_buffer_free): Delete.
6729 (struct ipa_trace_buffer_control): New.
6730 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6731 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6732 New.
6733 (trace_buffer_ctrl): New.
6734 (TRACE_BUFFER_CTRL_CURR): New.
6735 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6736 Reimplement as macros.
6737 (trace_buffer_wrap): Delete.
6738 (traceframe_write_count, traceframe_read_count)
6739 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6740 (struct tracepoint_hit_ctx) <type>: New field.
6741 (struct fast_tracepoint_ctx): New.
6742 (memory_barrier): New.
6743 (cmpxchg): New.
6744 (record_tracepoint_error): Update atomically in the IPA.
6745 (clear_inferior_trace_buffer): New.
6746 (about_to_request_buffer_space): New.
6747 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6748 updating the same buffer.
6749 (add_tracepoint): Default the tracepoint's type to trap
6750 tracepoint, and orig_size to -1.
6751 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6752 internal variables.
6753 (create_trace_state_variable): New parameter `gdb'. Handle it.
6754 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6755 (cmd_qtdp): Handle fast tracepoints.
6756 (cmd_qtdv): Adjust.
6757 (max_jump_pad_size): New.
6758 (gdb_jump_pad_head): New.
6759 (get_jump_space_head): New.
6760 (claim_jump_space): New.
6761 (sort_tracepoints): New.
6762 (MAX_JUMP_SIZE): New.
6763 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6764 IPA.
6765 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6766 support. Upload fast traceframes, and delete internal IPA
6767 breakpoints.
6768 (stop_tracing_handler): New.
6769 (flush_trace_buffer_handler): New.
6770 (cmd_qtstop): Upload fast tracepoints.
6771 (response_tracepoint): Handle fast tracepoints.
6772 (tracepoint_finished_step): Upload fast traceframes. Set the
6773 tracepoint hit context's tracepoint type.
6774 (handle_tracepoint_bkpts): New.
6775 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6776 type. Add comment about fast tracepoints.
6777 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6778 non-existing action_str field.
6779 (get_context_regcache): Handle fast tracepoints.
6780 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6781 to the regcache.
6782 (fast_tracepoint_from_jump_pad_address): New.
6783 (fast_tracepoint_from_ipa_tpoint_address): New.
6784 (collecting_t): New.
6785 (force_unlock_trace_buffer): New.
6786 (fast_tracepoint_collecting): New.
6787 (collecting): New.
6788 (gdb_collect): New.
6789 (write_inferior_data_ptr): New.
6790 (target_tp_heap): New.
6791 (target_malloc): New.
6792 (download_agent_expr): New.
6793 (UALIGN): New.
6794 (download_tracepoints): New.
6795 (download_trace_state_variables): New.
6796 (upload_fast_traceframes): New.
6797 (IPA_FIRST_TRACEFRAME): New.
6798 (IPA_NEXT_TRACEFRAME_1): New.
6799 (IPA_NEXT_TRACEFRAME): New.
6800 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6801 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6802 (gdb_jump_pad_buffer_end): New.
6803 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6804 (initialize_tracepoint): Adjust.
6805 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6806 buffer. Initialize the low module.
6807 * utils.c (PREFIX, TOOLNAME): New.
6808 (malloc_failure): Use PREFIX.
6809 (error): In the IPA, an error causes an exit.
6810 (fatal, warning): Use PREFIX.
6811 (internal_error): Use TOOLNAME.
6812 (NUMCELLS): Increase to 10.
6813 * configure, config.in: Regenerate.
6814
6815 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6816
6817 * server.c (handle_query) <qSupported>: Do two passes over the
6818 qSupported string to avoid nesting strtok.
6819
6820 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6821
6822 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6823 (CDEPS): New.
6824 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6825 -Wl,--dynamic-list.
6826 * configure: Regenerate.
6827 * proc-service.list: New.
6828
6829 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6830
6831 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6832 New comment.
6833
6834 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6835
6836 * gdbreplay.c (remote_open): Check error return from socket() call by
6837 its equality to -1 not by it being negative.
6838 * remote-utils.c (remote_open): Likewise.
6839
6840 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6841
6842 * config.h: Regenerate.
6843
6844 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6845
6846 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6847 doesn't provide PTRACE_GET_THREAD_AREA.
6848
6849 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6850
6851 * linux-m68k-low.c: Include <asm/ptrace.h>
6852 (ps_get_thread_area): Implement.
6853
6854 2010-05-03 Doug Evans <dje@google.com>
6855
6856 * event-loop.c (struct callback_event): New struct.
6857 (callback_list): New global.
6858 (append_callback_event, delete_callback_event): New functions.
6859 (process_callback): New function.
6860 (start_event_loop): Call it.
6861 * remote-utils.c (NOT_SCHEDULED): Define.
6862 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6863 moved out of readchar.
6864 (readchar): Rewrite. Call reschedule before returning.
6865 (reset_readchar): New function.
6866 (remote_close): Call it.
6867 (process_remaining, reschedule): New functions.
6868 * server.h (callback_handler_func): New typedef.
6869 (append_callback_event, delete_callback_event): Declare.
6870
6871 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6872
6873 * proc-service.c (ps_pglobal_lookup): Use
6874 thread_db_look_up_one_symbol.
6875 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6876 parameter. Use it instead of all_symbols_looked_up.
6877 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6878 field.
6879 (all_symbols_looked_up): Don't declare.
6880 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6881 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6882 field.
6883 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6884 Set all_symbols_looked_up here.
6885 (thread_db_look_up_one_symbol): New.
6886 (thread_db_get_tls_address): Adjust.
6887 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6888 thread_db object on the heap, and tentatively set it in the
6889 process structure.
6890 (thread_db_init): Don't set all_symbols_looked_up here.
6891 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6892
6893 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6894
6895 * linux-low.c (linux_kill, linux_detach): Adjust.
6896 (status_pending_p_callback): Remove redundant statement. Check
6897 for !TARGET_WAITIKIND_IGNORE, instead of
6898 TARGET_WAITKIND_STOPPED.
6899 (handle_tracepoints): Make sure LWP is locked. Adjust.
6900 (linux_wait_for_event_1): Adjust.
6901 (linux_cancel_breakpoints): New.
6902 (unsuspend_one_lwp): New.
6903 (unsuspend_all_lwps): New.
6904 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6905 (send_sigstop_callback): Change return type to int, add new
6906 `except' parameter and handle it.
6907 (suspend_and_send_sigstop_callback): New.
6908 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6909 pass them down. If SUSPEND, also increment the lwp's suspend
6910 count.
6911 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6912 (need_step_over_p): Don't consider suspended LWPs.
6913 (start_step_over): Adjust.
6914 (proceed_one_lwp): Change return type to int, add new `except'
6915 parameter and handle it.
6916 (unsuspend_and_proceed_one_lwp): New.
6917 (proceed_all_lwps): Use find_inferior instead of
6918 for_each_inferior.
6919 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6920 also decrement the suspend count of LWPs. Pass `except' down,
6921 instead of hacking its suspend count.
6922 (linux_pause_all): Add `freeze' parameter. Adjust.
6923 (linux_unpause_all): New.
6924 (linux_target_ops): Install linux_unpause_all.
6925 * server.c (handle_status): Adjust.
6926 * target.h (struct target_ops): New fields `unpause_all' and
6927 `cancel_breakpoints'. Add new parameter to `pause_all'.
6928 (pause_all): Add new `freeze' parameter.
6929 (unpause_all): New.
6930 (cancel_breakpoints): New.
6931 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6932 cancel breakpoints.
6933 (cmd_qtstart): Pause threads.
6934 (stop_tracing): Pause threads, and cancel breakpoints.
6935 * win32-low.c (win32_target_ops): Adjust.
6936
6937 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6938
6939 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6940 the inferior right away from here...
6941 (linux_wait_1): ... to here, and adjust to check the thread's
6942 last_resume_kind instead of the lwp's step or stop_expected flags.
6943
6944 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6945
6946 * README: Use consistent `GDB' and `GDBserver' spellings.
6947
6948 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6949
6950 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6951 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6952 (linux_detach_one_lwp): Assume the lwp is stopped.
6953 (any_thread_of): Delete.
6954 (linux_detach): Stop all lwps here. Don't blindly delete all
6955 breakpoints.
6956 (delete_lwp_callback): New.
6957 (linux_mourn): Delete all lwps of the process that is gone.
6958 (linux_wait_1): Don't delete the last lwp of the process here.
6959 * mem-break.h (mark_breakpoints_out): Declare.
6960 * mem-break.c (mark_breakpoints_out): New.
6961 (free_all_breakpoints): Use it.
6962 * server.c (handle_target_event): If the process is gone, mark
6963 breakpoints out.
6964 * thread-db.c (struct thread_db) <create_bp>: New field.
6965 (thread_db_enable_reporting): Fix prototype. Store a thread event
6966 breakpoint reference in the thread_db struct.
6967 (thread_db_load_search): Clear the thread_db object.
6968 (try_thread_db_load_1): Ditto.
6969 (switch_to_process): New.
6970 (disable_thread_event_reporting): Use it.
6971 (remove_thread_event_breakpoints): New.
6972 (thread_db_detach, thread_db_mourn): Use it.
6973
6974 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6975
6976 * linux-low.c (linux_enable_event_reporting): New.
6977 (linux_wait_for_event_1, handle_extended_wait): Use it.
6978
6979 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6980
6981 * linux-low.c (linux_kill_one_lwp, linux_kill)
6982 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6983 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6984 SIGSTOP even if the LWP is stopped.
6985 (send_sigstop_callback): New.
6986 (stop_all_lwps): Use send_sigstop_callback instead.
6987 (linux_resume_one_thread): Adjust.
6988 (proceed_one_lwp): Still proceed an LWP that the client has
6989 requested to stop, if we haven't reported it as stopped yet. Make
6990 sure that LWPs the client want stopped, have a pending SIGSTOP.
6991
6992 2010-04-26 Doug Evans <dje@google.com>
6993
6994 * server.c (handle_general_set): Make static.
6995
6996 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6997 Print received char after testing for error/eof instead of before.
6998 (input_interrupt): Tweak comment.
6999
7000 2010-04-23 Doug Evans <dje@google.com>
7001
7002 * server.c (start_inferior): Print inferior argv if --debug.
7003
7004 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7005
7006 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7007 * nto-x86-low.c: Include server.h
7008
7009 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7010
7011 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7012 be consistent with other sources of this directory.
7013 (init_registers_amd64): Correct name of source file of this function
7014 in the comment.
7015
7016 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7017
7018 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7019 64-bit executables.
7020
7021 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7022
7023 * win32-i386-low.c: Add 64-bit support.
7024 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7025 (init_registers_amd64): Declare.
7026 (mappings): Add 64-bit version of array.
7027 (init_windows_x86): New function.
7028 (the_low_target): Change init_arch field to init_windows_x86.
7029
7030 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7031
7032 * win32-low.c: Adapt to support also 64-bit architecture.
7033 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7034 (get_image_name): Use SIZE_T type for local variable `done'.
7035 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7036 (toolhelp_get_dll_name): Idem.
7037 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7038 Use uintptr_t typecast to avoid warning.
7039 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7040 (handle_exception): Use phex_nz to avoid warning.
7041 (win32_wait): Remove unused local variable `process'.
7042
7043 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7044
7045 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7046 `amd64-avx.o'.
7047
7048 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7049
7050 * configure.ac: Use `ws2_32' library for srv_mingw.
7051 * configure: Regenerate.
7052 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7053 * remote-utils.c: Likewise.
7054
7055 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7056
7057 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7058 if __x86_64__ is defined.
7059
7060 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7061
7062 * configure: Regenerate.
7063
7064 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7065
7066 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7067 * target.h (target_ops): New get_tib_address field.
7068 * win32-low.h (win32_thread_info): Add thread_local_base field.
7069 * win32-low.c (child_add_thread): Add tlb argument.
7070 Set thread_local_base field to TLB.
7071 (get_child_debug_event): Adapt to child_add_thread change.
7072 (win32_get_tib_address): New function.
7073 (win32_target_ops): Set get_tib_address field to
7074 win32_get_tib_address.
7075 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7076
7077 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7078
7079 * linux-low.c (linux_mourn): Also remove the process.
7080 * server.c (handle_target_event): Don't remove the process here.
7081 * nto-low.c (nto_mourn): New.
7082 (nto_target_ops): Install it.
7083 * spu-low.c (spu_mourn): New.
7084 (spu_target_ops): Install it.
7085 * win32-low.c (win32_mourn): New.
7086 (win32_target_ops): Install it.
7087
7088 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7089
7090 * server.h (buffer_xml_printf): Remove redundant `;'.
7091
7092 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7093
7094 * regcache.c (set_register_cache): Invalidate regcaches before
7095 changing the register cache layout.
7096 (regcache_invalidate_one): Allow a NULL regcache.
7097 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7098 regcaches before changing the register cache layout or the target
7099 regsets.
7100
7101 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7102
7103 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7104 variable warning on Linux/x86-64.
7105
7106 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7107
7108 GDBserver disconnected tracing support.
7109
7110 * linux-low.c (linux_remove_process): Delete.
7111 (add_lwp): Don't set last_resume_kind here.
7112 (linux_kill): Use `mourn'.
7113 (linux_detach): Use `thread_db_detach', and `mourn'.
7114 (linux_mourn): New.
7115 (linux_attach_lwp_1): Adjust comment.
7116 (linux_attach): last_resume_kind moved the thread_info; adjust.
7117 (status_pending_p_callback): Adjust.
7118 (linux_wait_for_event_1): Adjust.
7119 (count_events_callback, select_singlestep_lwp_callback)
7120 (select_event_lwp_callback, cancel_breakpoints_callback)
7121 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7122 (proceed_one_lwp): Adjust.
7123 (linux_async): Add debug output.
7124 (linux_thread_stopped): New.
7125 (linux_pause_all): New.
7126 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7127 linux_pause_all.
7128 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7129 (thread_db_free): Delete declaration.
7130 (thread_db_detach, thread_db_mourn): Declare.
7131 * thread-db.c (thread_db_init): Use thread_db_mourn.
7132 (thread_db_free): Delete, split in two.
7133 (disable_thread_event_reporting): New.
7134 (thread_db_detach): New.
7135 (thread_db_mourn): New.
7136
7137 * server.h (struct thread_info) <last_resume_kind>: New field.
7138 <attached>: Add comment.
7139 <gdb_detached>: New field.
7140 (handler_func): Change return type to int.
7141 (handle_serial_event, handle_target_event): Ditto.
7142 (gdb_connected): Declare.
7143 (tracing): Delete.
7144 (disconnected_tracing): Declare.
7145 (stop_tracing): Declare.
7146
7147 * server.c (handle_query) <qSupported>: Report support for
7148 disconnected tracing.
7149 (queue_stop_reply_callback): Account for running threads.
7150 (gdb_wants_thread_stopped): New.
7151 (gdb_wants_all_threads_stopped): New.
7152 (gdb_reattached_process): New.
7153 (handle_status): Clear the `gdb_detached' flag of all processes.
7154 In all-stop, stop all threads.
7155 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7156 (process_serial_event): If the remote connection breaks, or if an
7157 exit was forced with "monitor exit", force an event loop exit.
7158 Handle disconnected tracing on detach.
7159 (handle_serial_event): Adjust.
7160 (handle_target_event): If GDB isn't connected, forward events back
7161 to the inferior, unless the last process exited, in which case,
7162 exit gdbserver. Adjust interface.
7163
7164 * remote-utils.c (remote_open): Don't block in accept. Instead
7165 register an event loop source on the listen socket file
7166 descriptor. Refactor bits into ...
7167 (listen_desc): ... this new global.
7168 (gdb_connected): ... this new function.
7169 (enable_async_notification): ... this new function.
7170 (handle_accept_event): ... this new function.
7171 (remote_close): Clear remote_desc.
7172
7173 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7174
7175 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7176 New fields.
7177 (mourn_inferior): Define.
7178 (target_process_qsupported): Avoid the dangling else problem.
7179 (thread_stopped): Define.
7180 (pause_all): Define.
7181 (target_waitstatus_to_string): Declare.
7182 * target.c (target_waitstatus_to_string): New.
7183
7184 * tracepoint.c (tracing): Make extern.
7185 (disconnected_tracing): New.
7186 (stop_tracing): Make extern. Handle tracing stops due to GDB
7187 disconnecting.
7188 (cmd_qtdisconnected): New.
7189 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7190 (handle_tracepoint_general_set): Handle QTDisconnected.
7191
7192 * event-loop.c (event_handler_func): Change return type to int.
7193 (process_event): Bail out if the event handler wants the event
7194 loop to stop.
7195 (handle_file_event): Ditto.
7196 (start_event_loop): Bail out if the event handler wants the event
7197 loop to stop.
7198
7199 * nto-low.c (nto_target_ops): Adjust.
7200 * spu-low.c (spu_wait): Don't remove the process here.
7201 (spu_target_ops): Adjust.
7202 * win32-low.c (win32_wait): Don't remove the process here.
7203 (win32_target_ops): Adjust.
7204
7205 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7206
7207 * regcache.c (realloc_register_cache): Invalidate inferior's
7208 regcache before recreating it.
7209
7210 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7211
7212 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7213
7214 2010-04-09 Stan Shebs <stan@codesourcery.com>
7215 Pedro Alves <pedro@codesourcery.com>
7216
7217 * server.h (LONGEST): New.
7218 (struct thread_info) <while_stepping>: New field.
7219 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7220 Declare.
7221 (initialize_tracepoint, handle_tracepoint_general_set)
7222 (handle_tracepoint_query, tracepoint_finished_step)
7223 (tracepoint_was_hit, release_while_stepping_state_list):
7224 (current_traceframe): Declare.
7225 * server.c (handle_general_set): Handle tracepoint packets.
7226 (read_memory): New.
7227 (write_memory): New.
7228 (handle_search_memory_1): Use read_memory.
7229 (handle_query): Report support for conditional tracepoints, trace
7230 state variables, and tracepoint sources. Handle tracepoint
7231 queries.
7232 (main): Initialize the tracepoints module.
7233 (process_serial_event): Handle traceframe reads/writes.
7234
7235 * linux-low.c (handle_tracepoints): New.
7236 (linux_wait_1): Call it.
7237 (linux_resume_one_lwp): Handle while-stepping.
7238 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7239 (linux_target_ops): Install them.
7240 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7241 New field.
7242 * linux-x86-low.c (x86_supports_tracepoints): New.
7243 (the_low_target). Install it.
7244
7245 * mem-break.h (delete_breakpoint): Declare.
7246 * mem-break.c (delete_breakpoint): Make external.
7247
7248 * target.h (struct target_ops): Add `supports_tracepoints',
7249 `read_pc', and `write_pc' fields.
7250 (target_supports_tracepoints): Define.
7251 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7252 (phex_nz): New.
7253
7254 * regcache.h (struct regcache) <registers_owned>: New field.
7255 (init_register_cache, regcache_cpy): Declare.
7256 (regcache_read_pc, regcache_write_pc): Declare.
7257 (register_cache_size): Declare.
7258 (supply_regblock): Declare.
7259 * regcache.c (init_register_cache): New.
7260 (new_register_cache): Use it.
7261 (regcache_cpy): New.
7262 (register_cache_size): New.
7263 (supply_regblock): New.
7264 (regcache_read_pc, regcache_write_pc): New.
7265
7266 * tracepoint.c: New.
7267
7268 * Makefile.in (OBS): Add tracepoint.o.
7269 (tracepoint.o): New rule.
7270
7271 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7272
7273 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7274 (i386-mmx.o): New.
7275 (i386-mmx.c): Likewise.
7276 (i386-mmx-linux.o): Likewise.
7277 (i386-mmx-linux.c): Likewise.
7278
7279 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7280 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7281 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7282 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7283
7284 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7285 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7286 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7287
7288 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7289
7290 * Makefile.in (clean): Updated.
7291 (i386-avx.o): New.
7292 (i386-avx.c): Likewise.
7293 (i386-avx-linux.o): Likewise.
7294 (i386-avx-linux.c): Likewise.
7295 (amd64-avx.o): Likewise.
7296 (amd64-avx.c): Likewise.
7297 (amd64-avx-linux.o): Likewise.
7298 (amd64-avx-linux.c): Likewise.
7299
7300 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7301 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7302 (srv_amd64_regobj): Add amd64-avx.o.
7303 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7304 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7305 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7306 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7307 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7308 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7309 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7310
7311 * i387-fp.c: Include "i386-xstate.h".
7312 (i387_xsave): New.
7313 (i387_cache_to_xsave): Likewise.
7314 (i387_xsave_to_cache): Likewise.
7315 (x86_xcr0): Likewise.
7316
7317 * i387-fp.h (i387_cache_to_xsave): Likewise.
7318 (i387_xsave_to_cache): Likewise.
7319 (x86_xcr0): Likewise.
7320
7321 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7322 * linux-crisv32-low.c (target_regsets): Likewise.
7323 * linux-m68k-low.c (target_regsets): Likewise.
7324 * linux-mips-low.c (target_regsets): Likewise.
7325 * linux-ppc-low.c (target_regsets): Likewise.
7326 * linux-s390-low.c (target_regsets): Likewise.
7327 * linux-sh-low.c (target_regsets): Likewise.
7328 * linux-sparc-low.c (target_regsets): Likewise.
7329 * linux-xtensa-low.c (target_regsets): Likewise.
7330
7331 * linux-low.c: Include <sys/uio.h>.
7332 (regsets_fetch_inferior_registers): Support nt_type.
7333 (regsets_store_inferior_registers): Likewise.
7334 (linux_process_qsupported): New.
7335 (linux_target_ops): Add linux_process_qsupported.
7336
7337 * linux-low.h (regset_info): Add nt_type.
7338 (linux_target_ops): Add process_qsupported.
7339
7340 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7341 and <sys/uio.h>.
7342 (init_registers_i386_avx_linux): New.
7343 (init_registers_amd64_avx_linux): Likewise.
7344 (xmltarget_i386_linux_no_xml): Likewise.
7345 (xmltarget_amd64_linux_no_xml): Likewise.
7346 (PTRACE_GETREGSET): Likewise.
7347 (PTRACE_SETREGSET): Likewise.
7348 (x86_fill_xstateregset): Likewise.
7349 (x86_store_xstateregset): Likewise.
7350 (use_xml): Likewise.
7351 (x86_linux_update_xmltarget): Likewise.
7352 (x86_linux_process_qsupported): Likewise.
7353 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7354 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7355 init_registers_i386_linux here. Call
7356 x86_linux_update_xmltarget.
7357 (the_low_target): Add x86_linux_process_qsupported.
7358
7359 * server.c (handle_query): Call target_process_qsupported.
7360
7361 * target.h (target_ops): Add process_qsupported.
7362 (target_process_qsupported): New.
7363
7364 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7365
7366 * inferiors.c (add_thread): Set last_status kind to
7367 TARGET_WAITKIND_IGNORE.
7368 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7369 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7370 (linux_wait_1): Move `thread' local definition to block that uses
7371 it. Don't NULL initialize `event_child'.
7372 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7373 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7374 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7375
7376 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7377
7378 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7379 an extended waitstatus, or by a watchpoint.
7380 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7381 thread was stepping or has been stopped by a watchpoint.
7382
7383 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7384
7385 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7386 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7387 of another, then delete the previous, and validate all
7388 breakpoints.
7389 (validate_inserted_breakpoint): New.
7390 (delete_disabled_breakpoints): New.
7391 (validate_breakpoints): New.
7392 (check_mem_read): Validate breakpoints before trusting their
7393 shadow. Delete disabled breakpoints.
7394 (check_mem_write): Validate breakpoints before trusting they
7395 should be inserted. Delete disabled breakpoints.
7396 * mem-break.h (validate_breakpoints):
7397 * server.c (handle_query): Validate breakpoints when we see a
7398 qSymbol query.
7399
7400 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7401
7402 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7403 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7404 if we could tell there's a GDB breakpoint at stop_pc.
7405 (need_step_over_p): Don't do a step over if we find a GDB
7406 breakpoint at the resume PC.
7407
7408 * mem-break.c (struct raw_breakpoint): New.
7409 (enum bkpt_type): New type `gdb_breakpoint'.
7410 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7411 fields. New field `raw'.
7412 (find_raw_breakpoint_at): New.
7413 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7414 breakpoint instead.
7415 (set_breakpoint_at): Adjust.
7416 (delete_raw_breakpoint): New.
7417 (release_breakpoint): New.
7418 (delete_breakpoint): Rename to...
7419 (delete_breakpoint_1): ... this. Add proc parameter. Use
7420 release_breakpoint. Return ENOENT.
7421 (delete_breakpoint): Reimplement.
7422 (find_breakpoint_at): Delete.
7423 (find_gdb_breakpoint_at): New.
7424 (delete_breakpoint_at): Delete.
7425 (set_gdb_breakpoint_at): New.
7426 (delete_gdb_breakpoint_at): New.
7427 (gdb_breakpoint_here): New.
7428 (set_reinsert_breakpoint): Use release_breakpoint.
7429 (uninsert_breakpoint): Rename to ...
7430 (uninsert_raw_breakpoint): ... this.
7431 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7432 (reinsert_raw_breakpoint): Change parameter type to
7433 raw_breakpoint.
7434 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7435 instead.
7436 (check_breakpoints): Adjust. Use release_breakpoint.
7437 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7438 (breakpoint_inserted_here): Ditto.
7439 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7440 Don't trust the breakpoint's shadow if it is not inserted.
7441 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7442 (delete_all_breakpoints): Adjust.
7443 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7444 use delete_breakpoint_1.
7445
7446 * mem-break.h (breakpoints_supported): Delete declaration.
7447 (set_gdb_breakpoint_at): Declare.
7448 (gdb_breakpoint_here): Declare.
7449 (delete_breakpoint_at): Delete.
7450 (delete_gdb_breakpoint_at): Declare.
7451
7452 * server.h (struct raw_breakpoint): Forward declare.
7453 (struct process_info): New field `raw_breakpoints'.
7454
7455 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7456 breakpoints.
7457
7458 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7459
7460 * linux-low.c (status_pending_p_callback): Fix comment.
7461 (linux_wait_for_event_1): Move most of the internal breakpoint
7462 handling from here...
7463 (linux_wait_1): ... to here.
7464 (count_events_callback): New.
7465 (select_singlestep_lwp_callback): New.
7466 (select_event_lwp_callback): New.
7467 (cancel_breakpoints_callback): New.
7468 (select_event_lwp): New.
7469 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7470 priority to all LWPs that have had events that should be reported
7471 to the client. Cancel breakpoints when about to reporting the
7472 event to the client, not while stopping lwps. No longer cancel
7473 finished single-steps here.
7474 (cancel_finished_single_step): Delete.
7475 (cancel_finished_single_steps): Delete.
7476
7477 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7478
7479 * mem-break.c (enum bkpt_type): New.
7480 (struct breakpoint): New field `type'.
7481 (set_breakpoint_at): Change return type to struct breakpoint
7482 pointer. Set type to `other_breakpoint' by default.
7483 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7484 in the breakpoint list.
7485 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7486 (reinsert_breakpoint): Rename to ...
7487 (reinsert_raw_breakpoint): ... this.
7488 (reinsert_breakpoints_at): Adjust.
7489 * mem-break.h (struct breakpoint): Declare.
7490 (set_breakpoint_at): Change return type to struct breakpoint
7491 pointer.
7492
7493 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7494
7495 * server.c (handle_query): Assign, not compare.
7496
7497 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7498
7499 Teach linux gdbserver to step-over-breakpoints.
7500
7501 * linux-low.c (can_hardware_single_step): New.
7502 (supports_breakpoints): New.
7503 (handle_extended_wait): If stopping threads, read the stop pc of
7504 the new cloned LWP.
7505 (get_pc): New.
7506 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7507 low target doesn't support retrieving the PC.
7508 (add_lwp): Set last_resume_kind to resume_continue.
7509 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7510 (linux_attach): Don't clear stop_expected. Set the lwp's
7511 last_resume_kind to resume_stop.
7512 (linux_detach_one_lwp): Don't check for removed breakpoints.
7513 (check_removed_breakpoint): Delete.
7514 (status_pending_p): Rename to ...
7515 (status_pending_p_callback): ... this. Don't check for removed
7516 breakpoints. Don't consider threads that are stopped from GDB's
7517 perspective.
7518 (linux_wait_for_lwp): Always read the stop_pc here.
7519 (cancel_breakpoint): New.
7520 (step_over_bkpt): New global.
7521 (linux_wait_for_event_1): Implement stepping over breakpoints.
7522 (gdb_wants_lwp_stopped): New.
7523 (gdb_wants_all_stopped): New.
7524 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7525 single-step traps here. Store the thread's last reported target
7526 wait status.
7527 (send_sigstop): Don't clear stop_expected. Always set it,
7528 instead.
7529 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7530 (cancel_finished_single_step): New.
7531 (cancel_finished_single_steps): New.
7532 (wait_for_sigstop): Don't cancel finished single-step traps here.
7533 (linux_resume_one_lwp): Don't check for removed breakpoints.
7534 Don't set `step' on non-hardware step archs.
7535 (linux_set_resume_request): Ignore resume_stop requests if already
7536 stopping or stopped. Set the lwp's last_resume_kind.
7537 (resume_status_pending_p): Don't check for removed breakpoints.
7538 (need_step_over_p): New.
7539 (start_step_over): New.
7540 (finish_step_over): New.
7541 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7542 requests. Clear the thread's last reported target waitstatus.
7543 Don't use the `suspended' flag. Don't consider pending breakpoints.
7544 (linux_resume): Start a step-over if necessary.
7545 (proceed_one_lwp): New.
7546 (proceed_all_lwps): New.
7547 (unstop_all_lwps): New.
7548 * linux-low.h (struct lwp_info): Rewrite comment for the
7549 `suspended' flag. Add the `stop_pc' field. Delete the
7550 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7551 Add `'last_resume_kind' and `need_step_over' fields.
7552 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7553 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7554 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7555 (set_raw_breakpoint_at): New.
7556 (set_breakpoint_at): Rewrite to use it.
7557 (reinsert_breakpoint_handler): Delete.
7558 (set_reinsert_breakpoint): New.
7559 (reinsert_breakpoint_by_bp): Delete.
7560 (delete_reinsert_breakpoints): New.
7561 (uninsert_breakpoint): Rewrite.
7562 (uninsert_breakpoints_at): New.
7563 (reinsert_breakpoint): Rewrite.
7564 (reinsert_breakpoints_at): New.
7565 (check_breakpoints): Rewrite.
7566 (breakpoint_here): New.
7567 (breakpoint_inserted_here): New.
7568 (check_mem_read): Adjust.
7569 * mem-break.h (breakpoints_supported, breakpoint_here)
7570 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7571 (reinsert_breakpoint_by_bp): Delete declaration.
7572 (delete_reinsert_breakpoints): Declare.
7573 (reinsert_breakpoint): Delete declaration.
7574 (reinsert_breakpoints_at): Declare.
7575 (uninsert_breakpoint): Delete declaration.
7576 (uninsert_breakpoints_at): Declare.
7577 (check_breakpoints): Adjust prototype.
7578 * server.h: Adjust include order.
7579 (struct thread_info): Declare here. Add a `last_status' field.
7580
7581 2010-03-23 Michael Snyder <msnyder@vmware.com>
7582
7583 * server.c (crc32): New function.
7584 (handle_query): Add handling for 'qCRC:' request.
7585
7586 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7587
7588 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7589 lwp had been stopped by a watchpoint.
7590
7591 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7592
7593 * server.h (internal_error): Declare.
7594 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7595 * utils.c (internal_error): New function.
7596
7597 2010-03-15 Andreas Schwab <schwab@redhat.com>
7598
7599 * configure.srv: Fix typo setting srv_regobj.
7600
7601 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7602
7603 * linux-low.c (fetch_register): Avoid passing a non string literal
7604 format to `error'.
7605 (usr_store_inferior_registers): Ditto.
7606
7607 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7608
7609 * linux-low.c (linux_write_memory): Bail out early if peeking
7610 memory failed.
7611
7612 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7613
7614 * linux-low.h (struct lwp_info): New fields
7615 `stopped_by_watchpoint' and `stopped_data_address'.
7616 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7617 here, and cache them in the lwp object.
7618 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7619 directly.
7620 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7621 field.
7622 (linux_stopped_by_watchpoint): Rewrite.
7623 (linux_stopped_data_address): Rewrite.
7624
7625 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7626
7627 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7628 switching the current inferior, not before.
7629
7630 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7631
7632 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7633 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7634 i386-linux.c and amd64-linux.c.
7635 (reg-i386.o): Removed.
7636 (reg-i386.c): Likewise.
7637 (reg-i386-linux.o): Likewise.
7638 (reg-i386-linux.c): Likewise.
7639 (reg-x86-64.o): Likewise.
7640 (reg-x86-64.c): Likewise.
7641 (reg-x86-64-linux.o): Likewise.
7642 (reg-x86-64-linux.c): Likewise.
7643 (i386.o): New.
7644 (i386.c): Likewise.
7645 (i386-linux.o): Likewise.
7646 (i386-linux.c): Likewise.
7647 (amd64.o): Likewise.
7648 (amd64.c): Likewise.
7649 (amd64-linux.o): Likewise.
7650 (amd64-linux.c): Likewise.
7651
7652 * configure.srv (srv_i386_regobj): New.
7653 (srv_i386_linux_regobj): Likewise.
7654 (srv_amd64_regobj): Likewise.
7655 (srv_amd64_linux_regobj): Likewise.
7656 (srv_i386_32bit_xmlfiles): Likewise.
7657 (srv_i386_64bit_xmlfiles): Likewise.
7658 (srv_i386_xmlfiles): Likewise.
7659 (srv_amd64_xmlfiles): Likewise.
7660 (srv_i386_linux_xmlfiles): Likewise.
7661 (srv_amd64_linux_xmlfiles): Likewise.
7662 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7663 srv_xmlfiles to $srv_i386_xmlfiles.
7664 (i[34567]86-*-mingw32ce*): Likewise.
7665 (i[34567]86-*-mingw*): Likewise.
7666 (i[34567]86-*-nto*): Likewise.
7667 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7668 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7669 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7670 (x86_64-*-linux*): Likewise.
7671
7672 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7673 (init_registers_amd64_linux): New.
7674 (x86_arch_setup): Replace init_registers_x86_64_linux with
7675 init_registers_amd64_linux.
7676
7677 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7678
7679 * configure.ac: Check for libdl. If it is not available link against
7680 static libthread_db.
7681 * configure: Regenerate.
7682
7683 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7684
7685 PR9605
7686
7687 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7688 handing a read watchpoint.
7689 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7690
7691 2010-02-12 Doug Evans <dje@google.com>
7692
7693 * linux-low.c (linux_supports_tracefork_flag): Document.
7694 (linux_look_up_symbols): Add comment.
7695
7696 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7697
7698 * regcache.c (supply_register): Clear regcache if buf is NULL.
7699
7700 2010-02-02 Nicolas Roche <roche@sourceware.org>
7701 Joel Brobecker <brobecker@adacore.com>
7702
7703 * inferiors.c (find_inferior): Add function documentation.
7704 (unloaded_dll): Handle the case where the unloaded dll has not
7705 been previously registered in the dll list.
7706
7707 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7708
7709 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7710 (thumb2_breakpoint): New.
7711 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7712
7713 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7714
7715 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7716 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7717 breakpoints.
7718
7719 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7720
7721 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7722
7723 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7724
7725 * linux-s390-low.c (s390_collect_ptrace_register)
7726 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7727
7728 2010-01-21 Doug Evans <dje@google.com>
7729
7730 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7731 (PTRACE_ARG4_TYPE): New macro.
7732 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7733 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7734 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7735 (usr_store_inferior_registers): Ditto.
7736 (linux_read_memory, linux_write_memory): Ditto.
7737 (linux_test_for_tracefork): Ditto.
7738
7739 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7740 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7741
7742 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7743
7744 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7745 target.
7746
7747 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7748
7749 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7750 prototype to take a regcache. Adjust.
7751
7752 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7753
7754 * regcache.h (struct thread_info): Forward declare.
7755 (struct regcache): New.
7756 (new_register_cache): Adjust prototype.
7757 (get_thread_regcache): Declare.
7758 (free_register_cache): Adjust prototype.
7759 (registers_to_string, registers_from_string): Ditto.
7760 (supply_register, supply_register_by_name, collect_register)
7761 (collect_register_as_string, collect_register_by_name): Ditto.
7762 * regcache.c (struct inferior_regcache_data): Delete.
7763 (get_regcache): Rename to ...
7764 (get_thread_regcache): ... this. Adjust. Switch inferior before
7765 fetching registers.
7766 (regcache_invalidate_one): Adjust.
7767 (regcache_invalidate): Fix prototype.
7768 (new_register_cache): Return the new register cache.
7769 (free_register_cache): Change prototype.
7770 (realloc_register_cache): Adjust.
7771 (registers_to_string): Change prototype to take a regcache. Adjust.
7772 (registers_from_string): Ditto.
7773 (register_data): Ditto.
7774 (supply_register): Ditto.
7775 (supply_register_by_name): Ditto.
7776 (collect_register): Ditto.
7777 (collect_register_as_string): Ditto.
7778 (collect_register_by_name): Ditto.
7779 * server.c (process_serial_event): Adjust.
7780 * linux-low.h (regset_fill_func, regset_store_func): Change
7781 prototype.
7782 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7783 Change prototype.
7784 * linux-low.c (get_stop_pc): Adjust.
7785 (check_removed_breakpoint): Adjust.
7786 (linux_wait_for_event): Adjust.
7787 (linux_resume_one_lwp): Adjust.
7788 (fetch_register): Add regcache parameter. Adjust.
7789 (usr_store_inferior_registers): Ditto.
7790 (regsets_fetch_inferior_registers): Ditto.
7791 (regsets_store_inferior_registers): Ditto.
7792 (linux_fetch_registers, linux_store_registers): Ditto.
7793 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7794 regcache. Adjust.
7795 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7796 Ditto.
7797 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7798 prototype to take a regcache.
7799 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7800 * remote-utils.c (convert_ascii_to_int, outreg)
7801 (prepare_resume_reply): Change prototype to take a regcache.
7802 Adjust.
7803 * target.h (struct target_ops) <fetch_registers, store_registers>:
7804 Change prototype to take a regcache.
7805 (fetch_inferior_registers, store_inferior_registers): Change
7806 prototype to take a regcache. Adjust.
7807 * proc-service.c (ps_lgetregs): Adjust.
7808 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7809 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7810 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7811 take a regcache. Adjust.
7812 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7813 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7814 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7815 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7816 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7817 (cris_cannot_fetch_register):
7818 (cris_breakpoint_at): Change prototype to take a regcache.
7819 Adjust.
7820 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7821 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7822 to take a regcache. Adjust.
7823 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7824 Adjust.
7825 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7826 take a regcache. Adjust.
7827 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7828 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7829 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7830 * linux-mips-low.c (mips_get_pc):
7831 (mips_set_pc): Change prototype to take a regcache. Adjust.
7832 (mips_reinsert_addr): Adjust.
7833 (mips_collect_register): Change prototype to take a regcache.
7834 Adjust.
7835 (mips_supply_register):
7836 (mips_collect_register_32bit, mips_supply_register_32bit)
7837 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7838 (mips_store_fpregset): Ditto.
7839 * linux-ppc-low.c (ppc_supply_ptrace_register)
7840 (ppc_supply_ptrace_register): Ditto.
7841 (parse_spufs_run): Adjust.
7842 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7843 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7844 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7845 take a regcache. Adjust.
7846 * linux-s390-low.c (s390_collect_ptrace_register)
7847 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7848 (s390_set_pc): Change prototype to take a regcache. Adjust.
7849 (s390_arch_setup): Adjust.
7850 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7851 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7852 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7853 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7854 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7855 regcache. Adjust.
7856 (sparc_breakpoint_at): Adjust.
7857 * linux-xtensa-low.c (xtensa_fill_gregset):
7858 (xtensa_store_gregset):
7859 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7860 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7861 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7862 prototype to take a regcache. Adjust.
7863 * win32-arm-low.c (arm_fetch_inferior_register)
7864 (arm_store_inferior_register): Change prototype to take a
7865 regcache. Adjust.
7866 * win32-i386-low.c (i386_fetch_inferior_register)
7867 (i386_store_inferior_register): Change prototype to take a
7868 regcache. Adjust.
7869 * win32-low.c (child_fetch_inferior_registers)
7870 (child_store_inferior_registers): Change prototype to take a
7871 regcache. Adjust.
7872 (win32_wait): Adjust.
7873 (win32_fetch_inferior_registers): Change prototype to take a
7874 regcache. Adjust.
7875 (win32_store_inferior_registers): Adjust.
7876 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7877 store_inferior_register>: Change prototype to take a regcache.
7878
7879 2010-01-20 Doug Evans <dje@google.com>
7880
7881 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7882 #ifdef.
7883 (linux_wait_for_event1, linux_init_signals): Ditto.
7884 (W_STOPCODE): Provide definition if missing.
7885
7886 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7887
7888 * linux-low.c (linux_core_of_thread): New.
7889 (compare_ints, show_process, list_threads): New.
7890 (linux_qxfer_osdata): Report threads and cores.
7891 (linux_target_op): Register linux_core_of_thread.
7892 * remote-utils.c (prepare_resume_reply): Report the core.
7893 (buffer_xml_printf): Support %d specifier.
7894 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7895 New.
7896 (handle_query): Handle qXfer:threads. Announce availability
7897 thereof.
7898 * target.h (struct target_ops): New field core_of_thread.
7899
7900 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7901
7902 * Makefile.in (clean): Remove new generated files.
7903 (reg-s390.o, reg-s390.c): Remove rules.
7904 (reg-s390x.o, reg-s390x.c): Likewise.
7905 (s390-linux32.o, s390-linux32.c): Add rules.
7906 (s390-linux64.o, s390-linux64.c): Likewise.
7907 (s390x-linux64.o, s390x-linux64.c): Likewise.
7908 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7909 * linux-s390-low.c: Include <elf.h>.
7910 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7911 (init_registers_s390): Remove prototype.
7912 (init_registers_s390x): Likewise.
7913 (init_registers_s390_linux32): Add prototype.
7914 (init_registers_s390_linux64): Likewise.
7915 (init_registers_s390x_linux64): Likewise.
7916 (s390_num_regs_3264): New define.
7917 (s390_regmap_3264): New global variable.
7918 (s390_cannot_fetch_register): Remove obsolete check.
7919 (s390_cannot_store_register): Likewise.
7920 (s390_collect_ptrace_register): Handle upper/lower register halves.
7921 (s390_supply_ptrace_register): Likewise.
7922 (s390_fill_gregset): Update to register number changes.
7923 (s390_get_hwcap): New routine.
7924 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7925 Install appropriate regmap and register set.
7926
7927 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7928
7929 * server.c (gdbserver_version): Update copyright year to 2010.
7930 * gdbreplay.c (gdbreplay_version): Likewise.
7931
7932 2009-12-28 Doug Evans <dje@google.com>
7933
7934 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7935 elf/external.h. Include <elf.h> instead but only if necessary.
7936
7937 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7938
7939 * linux-low.c (linux_remove_process): Remove `detaching'
7940 parameter. Don't release/detach from thread_db here.
7941 (linux_kill): Release/detach from thread_db here, ...
7942 (linux_detach): ... and here, before actually detaching.
7943 (linux_wait_1): ... and here, when a process exits.
7944 * thread-db.c (any_thread_of): New.
7945 (thread_db_free): Switch the current inferior to a thread of the
7946 passed in process.
7947
7948 2009-12-21 Doug Evans <dje@google.com>
7949
7950 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7951
7952 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7953 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7954 warning ifndef __NR_tkill. Move setting of errno there too.
7955 Delete unnecessary resetting of errno after syscall.
7956 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7957
7958 * configure.ac: Check for dladdr.
7959 * config.in: Regenerate.
7960 * configure: Regenerate.
7961 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7962 (try_thread_db_load): Update.
7963
7964 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7965
7966 2009-12-18 Doug Evans <dje@google.com>
7967
7968 * event-loop.c: Include unistd.h if it exists.
7969
7970 * linux-low.c (my_waitpid): Move definition away from being in
7971 between linux_tracefork_child/linux_test_for_tracefork.
7972
7973 * gdb_proc_service.h (psaddr_t): Fix type.
7974 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7975 signature to match glibc.
7976
7977 2009-12-16 Doug Evans <dje@google.com>
7978
7979 * linux-low.c (linux_read_memory): Fix argument to read.
7980
7981 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7982
7983 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7984 events, don't leave current_inferior pointing at null.
7985
7986 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7987
7988 * win32-low.c (LOG): Delete.
7989 (OUTMSG): Output to stderr.
7990 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7991 on compile time LOG macro.
7992 (win32_wait): Fix debug output.
7993
7994 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7995
7996 * win32-low.c (win32_add_one_solib): If the dll name is
7997 "ntdll.dll", prepend the system directory to the dll path.
7998
7999 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8000
8001 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8002
8003 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8004 Vladimir Prus <vladimir@codesourcery.com>
8005
8006 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8007 * configure.ac: Check for __mcoldfire__ and set
8008 gdb_cv_m68k_is_coldfire.
8009 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8010 reg-cf.o and reg-m68k.o.
8011 * configure: Regenerated.
8012
8013 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8014
8015 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8016 Pass it to thread_db_free.
8017 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8018 proper `detaching' argument to linux_remove_process.
8019 * linux-low.h (thread_db_free): Add `detaching' parameter.
8020 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8021 to thread_db_free.
8022 (thread_db_free): Add `detaching' parameter. Only
8023 call td_ta_clear_event if detaching from process.
8024
8025 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8026
8027 * thread-db.c (thread_db_free): Fix typo.
8028
8029 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8030
8031 PR gdb/10838
8032 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8033
8034 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8035
8036 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8037 with an i686 compiler.
8038 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8039 needed.
8040 * configure: Rebuilt.
8041
8042 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8043
8044 PR gdb/10783
8045
8046 * server.c (handle_search_memory_1): Correct read_addr initialization
8047 in loop for searching subsequent chunks.
8048
8049 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8050
8051 * configure.ac: New --with-libthread-db option.
8052 * thread-db.c: Allow direct dependence on libthread_db.
8053 (thread_db_free): Adjust.
8054 * config.in: Regenerate.
8055 * configure: Likewise.
8056
8057 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8058
8059 PR gdb/10757
8060 * thread-db.c (attach_thread): New function.
8061 (maybe_attach_thread): Return success/failure.
8062 (find_new_threads_callback): Adjust.
8063 (thread_db_find_new_threads): Loop until no new threads.
8064
8065 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8066
8067 * proc-service.c (ps_lgetregs): Formatting.
8068
8069 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8070
8071 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8072 * configure.ac: Adjust.
8073 * linux-low.h (struct process_info_private): Move members to struct
8074 thread_db.
8075 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8076 * linux-low.c (linux_remove_process): Adjust.
8077 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8078 * server.c (handle_query): Move code ...
8079 (handle_monitor_command): ... here. New function.
8080 * target.h (struct target_ops): New member.
8081 * thread-db.c (struct thread_db): New.
8082 (libthread_db_search_path): New variable.
8083 (thread_db_create_event, thread_db_enable_reporting)
8084 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8085 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8086 (try_thread_db_load_1, dladdr_to_soname): New functions.
8087 (try_thread_db_load, thread_db_load_search): New functions.
8088 (thread_db_init): Search for libthread_db.
8089 (thread_db_free): New function.
8090 (thread_db_handle_monitor_command): Likewise.
8091 * config.in: Regenerate.
8092 * configure: Regenerate.
8093
8094 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8095
8096 * spu-low.c (spu_kill): Wait for inferior to terminate.
8097 Call clear_inferiors.
8098 (spu_detach): Call clear_inferiors.
8099
8100 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8101
8102 * aclocal.m4: Regenerate.
8103 * config.in: Likewise.
8104 * configure: Likewise.
8105
8106 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8107
8108 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8109 (parse_spufs_run): New function.
8110 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8111 (ppc_breakpoint_at): Handle SPU breakpoints.
8112
8113 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8114
8115 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8116 (SPUFS_MAGIC): Define.
8117 (spu_enumerate_spu_ids): New function.
8118 (linux_qxfer_spu): New function.
8119 (linux_target_ops): Install linux_qxfer_spu.
8120
8121 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8122
8123 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8124 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8125 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8126 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8127 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8128 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8129 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8130 (init_registers_powerpc_cell32l): Add prototype.
8131 (init_registers_powerpc_cell64l): Likewise.
8132 (ppc_arch_setup): Detect Cell/B.E. architecture.
8133
8134 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8135
8136 * Makefile.in (datarootdir): New variable.
8137
8138 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8139
8140 * linux-low.c (linux_write_memory): Update debugging output.
8141 * Makefile.in (clean): Add new descriptions.
8142 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8143 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8144 * configure.srv: Add new files for arm*-*-linux*.
8145 * linux-arm-low.c: Add new declarations.
8146 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8147 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8148 (HWCAP_VFPv3D16): New.
8149 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8150 instead of __IWMMXT__.
8151 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8152 (arm_arch_setup): New.
8153 (target_regsets): Remove #ifdef. Add VFP regset.
8154 (the_low_target): Use arm_arch_setup.
8155
8156 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8157
8158 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8159 the main thread again.
8160
8161 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8162
8163 Adding Neutrino gdbserver.
8164 * configure: Regenerated.
8165 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8166 * configure.srv (i[34567]86-*-nto*): New target.
8167 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8168 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8169 (nto_comctrl) [__QNX__]: New function.
8170 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8171
8172 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8173
8174 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8175 srv_tgtobj.
8176
8177 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8178 Pedro Alves <pedro@codesourcery.com>
8179
8180 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8181 don't support CONTEXT_EXTENDED_REGISTERS.
8182 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8183 (the_low_target): Install them.
8184 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8185 failing with ERROR_PIPE_NOT_CONNECTED.
8186
8187 2009-06-30 Doug Evans <dje@google.com>
8188 Pierre Muller <muller@ics.u-strasbg.fr>
8189
8190 Add h/w watchpoint support to x86-linux, win32-i386.
8191 * Makefile.in (SFILES): Add i386-low.c
8192 (i386_low_h): Define.
8193 (i386-low.o): Add dependencies.
8194 (linux-x86-low.o): Add i386-low.h dependency.
8195 (win32-i386-low.o): Ditto.
8196 * i386-low.c: New file.
8197 * i386-low.h: New file.
8198 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8199 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8200 * linux-low.c (linux_add_process): Initialize arch_private.
8201 (linux_remove_process): Free arch_private.
8202 (add_lwp): Initialize arch_private.
8203 (delete_lwp): Free arch_private.
8204 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8205 provided.
8206 * linux-low.h (process_info_private): New member arch_private.
8207 (lwp_info): New member arch_private.
8208 (linux_target_ops): New members new_process, new_thread,
8209 prepare_to_resume.
8210 (ptid_of): New macro.
8211 * linux-x86-low.c: Include stddef.h, i386-low.h.
8212 (arch_process_info): New struct.
8213 (arch_lwp_info): New struct.
8214 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8215 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8216 (i386_dr_low_get_status): New function.
8217 (x86_insert_point, x86_remove_point): New functions.
8218 (x86_stopped_by_watchpoint): New function.
8219 (x86_stopped_data_address): New function.
8220 (x86_linux_new_process, x86_linux_new_thread): New functions.
8221 (x86_linux_prepare_to_resume): New function.
8222 (the_low_target): Add entries for insert_point, remove_point,
8223 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8224 prepare_to_resume.
8225 * server.c (debug_hw_points): New global.
8226 (monitor_show_help): Document set debug-hw-points.
8227 (handle_query): Process "set debug-hw-points".
8228 * server.h (debug_hw_points): Declare.
8229 (paddress): Declare.
8230 * utils.c (NUMCELLS, CELLSIZE): New macros.
8231 (get_sell, xsnprintf, paddress): New functions.
8232 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8233 remove_point, stopped_by_watchpoint, stopped_data_address.
8234 * win32-i386-low.c: Include i386-low.h.
8235 (debug_reg_state): Replaces dr.
8236 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8237 (i386_dr_low_get_status): New function.
8238 (i386_insert_point, i386_remove_point): New functions.
8239 (i386_stopped_by_watchpoint): New function.
8240 (i386_stopped_data_address): New function.
8241 (i386_initial_stuff): Update.
8242 (get_thread_context,set_thread_context,i386_thread_added): Update.
8243 (the_low_target): Add entries for insert_point,
8244 remove_point, stopped_by_watchpoint, stopped_data_address.
8245 * win32-low.c (win32_insert_watchpoint): New function.
8246 (win32_remove_watchpoint): New function.
8247 (win32_stopped_by_watchpoint): New function.
8248 (win32_stopped_data_address): New function.
8249 (win32_target_ops): Add entries for insert_watchpoint,
8250 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8251 * win32-low.h (win32_target_ops): New members insert_point,
8252 remove_point, stopped_by_watchpoint, stopped_data_address.
8253
8254 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8255
8256 * server.c (process_serial_event): Re-return unsupported, not
8257 error, if the type isn't recognized. Re-allow supporting only
8258 insert or remove packets. Also call require_running for
8259 breakpoints. Add missing break statement to default case. Tidy.
8260 * target.h (struct target_ops): Rename insert_watchpoint to
8261 insert_point, and remove_watchpoint to remove_point.
8262
8263 * linux-low.h (struct linux_target_ops): Likewise.
8264 * linux-low.c (linux_insert_watchpoint): Rename to ...
8265 (linux_insert_point): ... this. Adjust.
8266 (linux_remove_watchpoint): Rename to ...
8267 (linux_remove_point): ... this. Adjust.
8268 (linux_target_ops): Adjust.
8269 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8270 (cris_insert_point): ... this.
8271 (cris_remove_watchpoint): Rename to ...
8272 (cris_remove_point): ... this.
8273 (the_low_target): Adjust.
8274
8275 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8276
8277 * server.c (handle_v_kill): Pass signal_pid to
8278 kill_inferior if multi_process is zero.
8279
8280 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8281
8282 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8283 * target.h (target_ops): Comment for *_watchpoint to make it clear
8284 the functions can get types '0' and '1'.
8285
8286 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8287
8288 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8289 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8290 * regcache.c (get_regcache): Likewise.
8291 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8292 * win32-low.c (child_fetch_inferior_registers): Remove check for
8293 regno 0.
8294
8295 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8296 Pedro Alves <pedro@codesourcery.com>
8297
8298 * target.h (struct target_ops) <supports_multi_process>: New
8299 callback.
8300 (target_supports_multi_process): New.
8301 * server.c (handle_query): Even if GDB reports support, only
8302 enable multi-process if the target also supports it. Report
8303 multi-process support only if the target backend supports it.
8304 * linux-low.c (linux_supports_multi_process): New function.
8305 (linux_target_ops): Install it as target_supports_multi_process
8306 callback.
8307
8308 2009-05-24 Doug Evans <dje@google.com>
8309
8310 Global renaming of find_thread_pid to find_thread_ptid.
8311 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8312 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8313 All callers updated.
8314
8315 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8316 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8317 directly.
8318
8319 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8320 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8321 (linux_resume_one_lwp): Ditto.
8322
8323 2009-05-23 Doug Evans <dje@google.com>
8324
8325 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8326 from struct inferior_list_entry * to struct lwp_info *.
8327 All callers updated.
8328
8329 2009-05-13 Doug Evans <dje@google.com>
8330
8331 * linux-x86-low.c: Don't include assert.h.
8332 (x86_siginfo_fixup): Use fatal, not assert.
8333 (x86_arch_setup): Fix comment.
8334
8335 2009-05-12 Doug Evans <dje@google.com>
8336
8337 Biarch support for i386/amd64 gdbserver.
8338 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8339 Add linux-x86-low.c.
8340 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8341 (linux-x86-low.o): Add.
8342 * linux-x86-64-low.c: Delete.
8343 * linux-i386-low.c: Delete.
8344 * linux-x86-low.c: New file.
8345 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8346 linux-x86-low.o.
8347 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8348 linux-x86-low.o.
8349 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8350 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8351 (linux_child_pid_to_exec_file): New function.
8352 (elf_64_header_p, elf_64_file_p): New functions.
8353 (siginfo_fixup): New function.
8354 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8355 give target a chance to convert layout.
8356 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8357 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8358
8359 2009-05-07 Doug Evans <dje@google.com>
8360
8361 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8362 (regsets_store_inferior_registers): Ditto.
8363
8364 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8365
8366 PR server/10048
8367
8368 * linux-low.c (must_set_ptrace_flags): Delete.
8369 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8370 of the global.
8371 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8372 `lwp->must_set_ptrace_flags' instead.
8373 (linux_wait_for_event_1): Set ptrace options here.
8374 (linux_wait_1): ... not here.
8375
8376 2009-04-30 Doug Evans <dje@google.com>
8377
8378 * inferiors.c (started_inferior_callback): New function.
8379 (attached_inferior_callback): New function.
8380 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8381 * server.c (print_started_pid, print_attached_pid): New functions.
8382 (detach_or_kill_for_exit): New function.
8383 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8384 * server.h (have_started_inferiors_p): Declare.
8385 (have_attached_inferiors_p): Declare.
8386
8387 * inferiors.c (remove_process): Fix memory leak, free process.
8388 * linux-low.c (linux_remove_process): New function.
8389 (linux_kill): Call it instead of remove_process.
8390 (linux_detach, linux_wait_1): Ditto.
8391
8392 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8393
8394 * configure.srv: Add x86 Windows CE target.
8395
8396 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8397
8398 * inferiors.c (get_thread_process): Make global.
8399 * server.h (get_thread_process): Add prototype.
8400 * thread-db.c (find_one_thread): Use get_thread_process
8401 instead of current_process.
8402 (thread_db_get_tls_address): Do not crash if called when
8403 thread layer is not yet initialized.
8404
8405 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8406
8407 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8408 * spu-low.c (current_tid): Rename to ...
8409 (current_ptid): ... this.
8410 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8411 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8412 ptid_get_lwp (current_ptid) instead of current_tid.
8413 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8414 instead of current_tid. Use find_process_pid to verify pid
8415 argument is valid. Pass proper argument to remove_process.
8416 (spu_thread_alive): Compare current_ptid instead of current_tid.
8417 (spu_resume): Likewise.
8418
8419 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8420
8421 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8422 variable.
8423
8424 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8425
8426 Implement the multiprocess extensions, and add linux multiprocess
8427 support.
8428
8429 * server.h (ULONGEST): Declare.
8430 (struct ptid, ptid_t): New.
8431 (minus_one_ptid, null_ptid): Declare.
8432 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8433 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8434 (struct inferior_list_entry): Change `id' type from unsigned from
8435 to ptid_t.
8436 (struct sym_cache, struct breakpoint, struct
8437 process_info_private): Forward declare.
8438 (struct process_info): Declare.
8439 (current_process): Declare.
8440 (all_processes): Declare.
8441 (initialize_inferiors): Declare.
8442 (add_thread): Adjust to use ptid_t.
8443 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8444 (add_process, remove_process, find_thread_pid): Declare.
8445 (find_inferior_id): Adjust to use ptid_t.
8446 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8447 (multi_process): Declare.
8448 (push_event): Adjust to use ptid_t.
8449 (read_ptid, write_ptid): Declare.
8450 (prepare_resume_reply): Adjust to use ptid_t.
8451 (clear_symbol_cache): Declare.
8452 * inferiors.c (all_processes): New.
8453 (null_ptid, minus_one_ptid): New.
8454 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8455 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8456 (add_thread): Change unsigned long to ptid. Remove gdb_id
8457 parameter. Adjust.
8458 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8459 (gdb_id_to_thread): Rename to ...
8460 (find_thread_pid): ... this. Change unsigned long to ptid.
8461 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8462 (loaded_dll, pull_pid_from_list): Adjust.
8463 (add_process, remove_process, find_process_pid)
8464 (get_thread_process, current_process, initialize_inferiors): New.
8465 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8466 (struct target_waitstatus) <related_pid>: Ditto.
8467 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8468 return type to int.
8469 (struct target_ops) <join>: Add `pid' argument.
8470 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8471 (struct target_ops) <wait>: Add `ptid' field. Change return type
8472 to ptid.
8473 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8474 (mywait): Add `ptid' argument. Change return type to ptid_t.
8475 (target_pid_to_str): Declare.
8476 * target.c (set_desired_inferior): Adjust to use ptids.
8477 (mywait): Add new `ptid' argument. Adjust.
8478 (target_pid_to_str): New.
8479 * mem-break.h (free_all_breakpoints): Declare.
8480 * mem-break.c (breakpoints): Delelete.
8481 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8482 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8483 to use per-process breakpoint list.
8484 (free_all_breakpoints): New.
8485 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8486 (symbol_cache, all_symbols_looked_up): Delete.
8487 (hexchars): New.
8488 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8489 read_ptid): New.
8490 (prepare_resume_reply): Change ptid argument's type from unsigned
8491 long to ptid_t. Adjust. Implement W;process and X;process.
8492 (free_sym_cache, clear_symbol_cache): New.
8493 (look_up_one_symbol): Adjust to per-process symbol cache. *
8494 * server.c (cont_thread, general_thread, step_thread): Change type
8495 to ptid_t.
8496 (attached): Delete.
8497 (multi_process): New.
8498 (last_ptid): Change type to ptid_t.
8499 (struct vstop_notif) <ptid>: Change type to ptid_t.
8500 (queue_stop_reply, push_event): Change `ptid' argument's type to
8501 ptid_t.
8502 (discard_queued_stop_replies): Add `pid' argument.
8503 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8504 changes. Don't reference the `attached' global.
8505 (attach_inferior): Adjust to mywait interface changes.
8506 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8507 features. Handle and report "multiprocess+". Handle
8508 "qAttached:PID".
8509 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8510 changes.
8511 (handle_v_kill): New.
8512 (handle_v_stopped): Adjust to use target_pid_to_str.
8513 (handle_v_requests): Allow multiple attaches and runs when
8514 multiprocess extensions are in effect. Handle "vKill".
8515 (myresume): Adjust to use ptids.
8516 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8517 (handle_status): Adjust to discard_queued_stop_replies interface
8518 change.
8519 (first_thread_of, kill_inferior_callback)
8520 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8521 (main): Call initialize_inferiors. Adjust to use ptids, killing
8522 and detaching from all inferiors. Handle multiprocess packet
8523 variants.
8524 * linux-low.h: Include gdb_proc_service.h.
8525 (struct process_info_private): New.
8526 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8527 <lwpid_of>: Use ptid_get_lwp.
8528 (get_lwp_thread): Adjust.
8529 (struct lwp_info): Add `dead' member.
8530 (find_lwp_pid): Declare.
8531 * linux-low.c (thread_db_active): Delete.
8532 (new_inferior): Adjust comment.
8533 (inferior_pid): Delete.
8534 (linux_add_process): New.
8535 (handle_extended_wait): Adjust.
8536 (add_lwp): Change unsigned long to ptid.
8537 (linux_create_inferior): Add process to processes table. Adjust
8538 to use ptids. Don't set new_inferior here.
8539 (linux_attach_lwp): Rename to ...
8540 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8541 it. Adjust to use ptids.
8542 (linux_attach_lwp): New.
8543 (linux_attach): Add process to processes table. Don't set
8544 new_inferior here.
8545 (struct counter): New.
8546 (second_thread_of_pid_p, last_thread_of_process_p): New.
8547 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8548 multiple processes.
8549 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8550 processes. Remove process from process table.
8551 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8552 to multiple processes.
8553 (any_thread_of): New.
8554 (linux_detach): Add `pid' argument, and handle it. Remove process
8555 from processes table.
8556 (linux_join): Add `pid' argument. Handle it.
8557 (linux_thread_alive): Change unsighed long argument to ptid_t.
8558 Consider dead lwps as not being alive.
8559 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8560 threads we're not interested in.
8561 (same_lwp, find_lwp_pid): New.
8562 (linux_wait_for_lwp): Change `pid' argument's type from int to
8563 ptid_t. Adjust.
8564 (linux_wait_for_event): Rename to ...
8565 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8566 from int to ptid_t. Adjust.
8567 (linux_wait_for_event): New.
8568 (linux_wait_1): Add `ptid' argument. Change return type to
8569 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8570 that exit from the process table.
8571 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8572 Adjust.
8573 (mark_lwp_dead): New.
8574 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8575 stopping all threads, mark its main lwp as dead.
8576 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8577 ptids.
8578 (fetch_register, usr_store_inferior_registers)
8579 (regsets_fetch_inferior_registers)
8580 (regsets_store_inferior_registers, linux_read_memory)
8581 (linux_write_memory): Inline `inferior_pid'.
8582 (linux_look_up_symbols): Adjust to use per-process
8583 `thread_db_active'.
8584 (linux_request_interrupt): Adjust to use ptids.
8585 (linux_read_auxv): Inline `inferior_pid'.
8586 (initialize_low): Don't reference thread_db_active.
8587 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8588 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8589 (ps_getpid): Return the pid of the current inferior.
8590 * thread-db.c (proc_handle, thread_agent): Delete.
8591 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8592 per-process data.
8593 (find_one_thread): Change argument type to ptid_t. Adjust to
8594 per-process data.
8595 (maybe_attach_thread): Adjust to per-process data and ptids.
8596 (thread_db_find_new_threads): Ditto.
8597 (thread_db_init): Ditto.
8598 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8599 processes table. Adjust to use ptids.
8600 (spu_kill, spu_detach): Adjust interface. Remove process from
8601 processes table.
8602 (spu_join, spu_thread_alive): Adjust interface.
8603 (spu_wait): Adjust interface. Remove process from processes
8604 table. Adjust to use ptids.
8605 * win32-low.c (current_inferior_tid): Delete.
8606 (current_inferior_ptid): New.
8607 (debug_event_ptid): New.
8608 (thread_rec): Take a ptid. Adjust.
8609 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8610 (child_delete_thread): Ditto.
8611 (do_initial_child_stuff): Add `attached' argument. Add process to
8612 processes table.
8613 (child_fetch_inferior_registers, child_store_inferior_registers):
8614 Adjust.
8615 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8616 (win32_attach): Pass 1 to do_initial_child_stuff.
8617 (win32_kill): Adjust interface. Remove process from processes
8618 table.
8619 (win32_detach): Ditto.
8620 (win32_join): Adjust interface.
8621 (win32_thread_alive): Take a ptid.
8622 (win32_resume): Adjust to use ptids.
8623 (get_child_debug_event): Ditto.
8624 (win32_wait): Adjust interface. Remove exiting process from
8625 processes table.
8626
8627 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8628
8629 Non-stop mode support.
8630
8631 * server.h (non_stop): Declare.
8632 (gdb_client_data, handler_func): Declare.
8633 (delete_file_handler, add_file_handler, start_event_loop):
8634 Declare.
8635 (handle_serial_event, handle_target_event, push_event)
8636 (putpkt_notif): Declare.
8637 * target.h (enum resume_kind): New.
8638 (struct thread_resume): Replace `step' field by `kind' field.
8639 (TARGET_WNOHANG): Define.
8640 (struct target_ops) <wait>: Add `options' argument.
8641 <supports_non_stop, async, start_non_stop>: New fields.
8642 (target_supports_non_stop, target_async): New.
8643 (start_non_stop): Declare.
8644 (mywait): Add `options' argument.
8645 * target.c (mywait): Add `options' argument. Print child exit
8646 notifications here.
8647 (start_non_stop): New.
8648 * server.c (non_stop, own_buf, mem_buf): New globals.
8649 (struct vstop_notif): New.
8650 (notif_queue): New global.
8651 (queue_stop_reply, push_event, discard_queued_stop_replies)
8652 (send_next_stop_reply): New.
8653 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8654 interface changes.
8655 (attach_inferior): In non-stop mode, don't wait for the target
8656 here.
8657 (handle_general_set): Handle QNonStop.
8658 (handle_query): When handling qC, return the current general
8659 thread, instead of the first thread of the list.
8660 (handle_query): If the backend supports non-stop mode, include
8661 QNonStop+ in the qSupported query response.
8662 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8663 and non-stop mode.
8664 (handle_v_attach, handle_v_run): Handle non-stop mode.
8665 (handle_v_stopped): New.
8666 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8667 (myresume): Adjust to use resume_kind. Handle non-stop.
8668 (queue_stop_reply_callback): New.
8669 (handle_status): Handle non-stop mode.
8670 (main): Clear non_stop flag on reconnection. Use the event-loop.
8671 Refactor serial protocol handling from here ...
8672 (process_serial_event): ... to this new function. When GDB
8673 selects any thread, select one here. In non-stop mode, wait until
8674 GDB acks all pending events before exiting.
8675 (handle_serial_event, handle_target_event): New.
8676 * remote-utils.c (remote_open): Install remote_desc in the event
8677 loop.
8678 (remote_close): Remove remote_desc from the event loop.
8679 (putpkt_binary): Rename to...
8680 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8681 (putpkt_binary): New as wrapper around putpkt_binary_1.
8682 (putpkt_notif): New.
8683 (prepare_resume_reply): In non-stop mode, don't change the
8684 general_thread.
8685 * event-loop.c: New.
8686 * Makefile.in (OBJ): Add event-loop.o.
8687 (event-loop.o): New rule.
8688
8689 * linux-low.h (pid_of): Moved here.
8690 (lwpid_of): New.
8691 (get_lwp_thread): Use lwpid_of.
8692 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8693 * linux-low.c (pid_of): Delete.
8694 (inferior_pid): Use lwpid_of.
8695 (linux_event_pipe): New.
8696 (target_is_async_p): New.
8697 (delete_lwp): New.
8698 (handle_extended_wait): Use lwpid_of.
8699 (add_lwp): Don't set lwpid field.
8700 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8701 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8702 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8703 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8704 first. Adjust to linux_wait_for_event interface changes. Use
8705 lwpid_of.
8706 (linux_detach): Don't delete the main lwp here.
8707 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8708 (status_pending_p): Don't consider explicitly suspended lwps.
8709 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8710 pointer. Add OPTIONS argument. Change return type to int. Use
8711 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8712 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8713 pointer. Add status pointer argument. Return a pid instead of a
8714 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8715 changes. In non-stop mode, don't switch to a random thread.
8716 (linux_wait): Rename to...
8717 (linux_wait_1): ... this. Add target_options argument, and handle
8718 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8719 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8720 clean exit and signal exit code. Don't stop all threads in
8721 non-stop mode. In all-stop mode, only stop all threads when
8722 reporting a stop to GDB. Handle explicit thread stop requests.
8723 (async_file_flush, async_file_mark): New.
8724 (linux_wait): New.
8725 (send_sigstop): Use lwpid_of.
8726 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8727 interface changes. In non-stop mode, don't switch to a random
8728 thread.
8729 (linux_resume_one_lwp): Use lwpid_of.
8730 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8731 (linux_resume_one_thread): ... this. Handle resume_stop. In
8732 non-stop mode, don't look for pending flag in all threads.
8733 (resume_status_pending_p): Don't consider explicitly suspended
8734 threads.
8735 (my_waitpid): Reimplement. Emulate __WALL.
8736 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8737 Use lwpid_of.
8738 (sigchld_handler, linux_supports_non_stop, linux_async)
8739 (linux_start_non_stop): New.
8740 (linux_target_ops): Register linux_supports_non_stop, linux_async
8741 and linux_start_non_stop.
8742 (initialize_low): Install SIGCHLD handler.
8743 * thread-db.c (thread_db_create_event, find_one_thread)
8744 (thread_db_get_tls_address): Use lwpid_of.
8745 * win32-low.c (win32_detach): Adjust to use resume_kind.
8746 (win32_wait): Add `options' argument.
8747 * spu-low.c (spu_resume): Adjust to use resume_kind.
8748 (spu_wait): Add `options' argument.
8749
8750 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8751
8752 Decouple target code from remote protocol.
8753
8754 * target.h (enum target_waitkind): New.
8755 (struct target_waitstatus): New.
8756 (struct target_ops) <wait>: Return an unsigned long. Take a
8757 target_waitstatus pointer instead of a char pointer.
8758 (mywait): Likewise.
8759 * target.c (mywait): Change prototype to return an unsigned long.
8760 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8761 * server.h (thread_from_wait, old_thread_from_wait): Delete
8762 declarations.
8763 (prepare_resume_reply): Change prototype to take a
8764 target_waitstatus.
8765 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8766 (last_status, last_ptid): New.
8767 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8768 pid instead of a signal.
8769 (attach_inferior): Remove "status" and "signal" parameters.
8770 Adjust.
8771 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8772 not as an address.
8773 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8774 (handle_v_requests, myresume): Remove "status" and "signal"
8775 parameters. Adjust.
8776 (handle_status): New.
8777 (main): Delete local `status'. Adjust.
8778 * remote-utils.c: Include target.h.
8779 (prepare_resume_reply): Change prototype to take a
8780 target_waitstatus. Adjust.
8781
8782 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8783 interface.
8784 * spu-low.c (spu_wait): Adjust.
8785 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8786 Delete.
8787 (win32_wait): Adjust.
8788
8789 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8790
8791 * target.h (struct thread_resume): Delete leave_stopped member.
8792 (struct target_ops): Add a `n' argument to the `resume' callback.
8793 * server.c (start_inferior): Adjust.
8794 (handle_v_cont, myresume): Adjust.
8795 * linux-low.c (check_removed_breakpoint): Adjust to resume
8796 interface change, and to removed leave_stopped field.
8797 (resume_ptr): Delete.
8798 (struct thread_resume_array): New.
8799 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8800 resume interface change.
8801 (linux_continue_one_thread, linux_queue_one_thread)
8802 (resume_status_pending_p): Check if the resume field is NULL
8803 instead of checking the leave_stopped member.
8804 (linux_resume): Adjust to the target resume interface change.
8805 * spu-low.c (spu_resume): Adjust to the target resume interface
8806 change.
8807 * win32-low.c (win32_detach, win32_resume): Ditto.
8808
8809 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8810
8811 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8812 flag.
8813 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8814 pending.
8815 (linux_continue_one_thread): Only preserve the stepping flag if
8816 there's a pending breakpoint.
8817
8818 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8819
8820 * server.c (main): After the inferior having exited, call
8821 remote_close before exiting gdbserver.
8822
8823 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8824
8825 Fix size of FPSCR in Power 7 processors.
8826 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8827 (PPC_FEATURE_HAS_DFP): New #define.
8828 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8829 size of the FPSCR.
8830
8831 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8832
8833 * server.c (handle_query) Whitespace and formatting.
8834
8835 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8836
8837 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8838 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8839 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8840 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8841 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8842 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8843 Makefile.in, configure.ac: Fix whitespace throughout.
8844 * configure: Regenerate.
8845
8846 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8847
8848 * inferiors.c (find_inferior): Make it safe for the callback
8849 function to delete the currently iterated inferior.
8850
8851 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8852
8853 * Makefile.in (linuw_low_h): Move higher.
8854 (thread-db.o): Depend on $(linux_low_h).
8855
8856 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8857
8858 Rename "process" to "lwp" throughout.
8859
8860 * linux-low.c (all_processes): Rename to...
8861 (all_lwps): ... this.
8862 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8863 (add_process): Rename to ...
8864 (add_lwp): ... this. Adjust.
8865 (linux_create_inferior): Adjust.
8866 (linux_attach_lwp): Adjust.
8867 (linux_attach): Adjust.
8868 (linux_kill_one_process): Rename to ...
8869 (linux_kill_one_lwp): ... this. Adjust.
8870 (linux_kill): Adjust.
8871 (linux_detach_one_process): Rename to ...
8872 (linux_detach_one_lwp): ... this. Adjust.
8873 (linux_detach): Adjust.
8874 (check_removed_breakpoint): Adjust.
8875 (status_pending_p): Adjust.
8876 (linux_wait_for_process): Rename to ...
8877 (linux_wait_for_lwp): ... this. Adjust.
8878 (linux_wait_for_event): Adjust.
8879 (send_sigstop): Adjust.
8880 (wait_for_sigstop): Adjust.
8881 (stop_all_processes): Rename to ...
8882 (stop_all_lwps): ... this.
8883 (linux_resume_one_process): Rename to ...
8884 (linux_resume_one_lwp): ... this. Adjust.
8885 (linux_set_resume_request, linux_continue_one_thread)
8886 (linux_queue_one_thread, resume_status_pending_p)
8887 (usr_store_inferior_registers, regsets_store_inferior_registers)
8888 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8889 Adjust.
8890 * linux-low.h (get_process): Rename to ...
8891 (get_lwp): ... this. Adjust.
8892 (get_thread_process): Rename to ...
8893 (get_thread_lwp): ... this. Adjust.
8894 (get_process_thread): Rename to ...
8895 (get_lwp_thread): ... this. Adjust.
8896 (struct process_info): Rename to ...
8897 (struct lwp_info): ... this.
8898 (all_processes): Rename to ...
8899 (all_lwps): ... this.
8900 * proc-service.c (ps_lgetregs): Adjust.
8901 * thread-db.c (thread_db_create_event, find_one_thread)
8902 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8903
8904 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8905
8906 * server.c (handle_query): Handle "qAttached".
8907
8908 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8909
8910 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8911 GPLv3, update license URL.
8912
8913 2009-03-01 Doug Evans <dje@google.com>
8914
8915 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8916 (server_h): Add gdb_signals.h.
8917 (signals.o): Update.
8918 * server.h (target_signal_from_host,target_signal_to_host_p)
8919 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8920
8921 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8922
8923 * remote-utils.c (getpkt): Also generate remote-debug
8924 information if noack_mode is set.
8925
8926 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8927
8928 * server.c (handle_query): Report qXfer:siginfo:read and
8929 qXfer:siginfo:write as supported and handle them.
8930 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8931 * linux-low.c (linux_xfer_siginfo): New.
8932 (linux_target_ops): Set it.
8933
8934 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8935
8936 * server.c (gdbserver_usage): Mention --remote-debug.
8937 (main): Accept '--remote-debug' switch.
8938
8939 2009-01-18 Doug Evans <dje@google.com>
8940
8941 * regcache.c (new_register_cache): No need to check result of xcalloc.
8942 * server.c (handle_search_memory): Back out calls to xmalloc,
8943 result is checked and error is returned to user upon failure.
8944 (handle_query): Ditto. Add more checks for result of malloc.
8945 (handle_v_cont): Check result of malloc, report error back to
8946 user upon failure.
8947 (handle_v_run): Ditto. Call freeargv.
8948 * server.h (freeargv): Declare.
8949 * utils.c (freeargv): New fn.
8950
8951 2009-01-15 Doug Evans <dje@google.com>
8952
8953 * gdbreplay.c (perror_with_name): Make arg const char *.
8954 * server.h (target_signal_to_name): Make return type const char *.
8955 * thread-db.c (thread_db_err_str): Make return type const char *.
8956 * utils.c (perror_with_name): Make arg const char *.
8957
8958 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8959
8960 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8961 when handling a EXIT_PROCESS_DEBUG_EVENT.
8962
8963 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8964
8965 * gdbreplay.c (gdbreplay_version): Update copyright year.
8966 * server.c (gdbserver_version): Likewise.
8967
8968 2009-01-05 Doug Evans <dje@google.com>
8969
8970 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8971 (handle_extended_wait): Improve comment.
8972
8973 2008-12-13 Doug Evans <dje@google.com>
8974
8975 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8976 * server.h (ATTR_MALLOC): New macro.
8977 (xmalloc,xcalloc,xstrdup): Declare.
8978 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8979 * inferiors.c: Ditto.
8980 * linux-low.c: Ditto.
8981 * mem-break.c: Ditto.
8982 * regcache.c: Ditto.
8983 * remote-utils.c: Ditto.
8984 * server.c: Ditto.
8985 * target.c: Ditto.
8986 * win32-low.c: Ditto.
8987
8988 2008-12-12 Doug Evans <dje@google.com>
8989
8990 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8991 in debugging printf.
8992
8993 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8994
8995 2008-12-09 Doug Evans <dje@google.com>
8996
8997 * linux-low.h (struct process_info): Delete member tid, unused.
8998 * thread-db.c (find_one_thread): Update.
8999 (maybe_attach_thread): Update.
9000
9001 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9002
9003 * target.h (struct target_ops): Add qxfer_osdata member.
9004 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9005 and dirent.h.
9006 (linux_qxfer_osdata): New functions.
9007 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9008 callback.
9009 * server.c (handle_query): Handle "qXfer:osdata:read:".
9010 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9011 (buffer_xml_printf): New functions.
9012 * server.h (struct buffer): New.
9013 (buffer_grow_str, buffer_grow_str0): New macros.
9014 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9015 (buffer_xml_printf): Declare.
9016
9017 2008-11-24 Doug Evans <dje@google.com>
9018
9019 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9020
9021 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9022
9023 * server.c (handle_v_run): Always use the supplied argument list.
9024
9025 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9026
9027 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9028 (xtensa_regmap_table): Add entry for scompare1.
9029
9030 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9031
9032 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9033 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9034 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9035 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9036 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9037 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9038 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9039 XML target descriptions.
9040 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9041 when inferior is running on an ISA 2.05 or later processor. Add
9042 special case to return offset for full 64-bit slot of FPSCR when
9043 in 32-bits.
9044
9045 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9046
9047 * Makefile.in (SFILES, clean): Added sparc64 files.
9048 (reg-sparc64.o, reg-sparc64.c): New.
9049 * configure.srv (sparc*-*-linux*): New configuration.
9050 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9051 syscall arguments for SPARC.
9052 (regsets_store_inferior_registers): Likewise.
9053 * linux-sparc-low.c: New file.
9054
9055 2008-10-21 Doug Evans <dje@google.com>
9056
9057 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9058 (READLINE_DIR,READLINE_DEP): Delete.
9059 (INTERNAL_CFLAGS): Update.
9060 (LINTFLAGS): Update.
9061
9062 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9063
9064 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9065 whole argv from the last run, not just argv[0].
9066
9067 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9068
9069 * regcache.c (new_register_cache): Return NULL if the register
9070 cache size isn't known yet.
9071 (free_register_cache): Avoid dereferencing a NULL regcache.
9072
9073 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9074
9075 * configure.srv: Merge MIPS and MIPS64.
9076
9077 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9078
9079 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9080
9081 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9082
9083 * Makefile.in: Add required vsx dependencies.
9084
9085 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9086 Declare init_registers_powerpc_vsx32l.
9087 Declare init_registers_powerpc_vsx64l.
9088 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9089 (ppc_arch_setup): Check for VSX in hwcap.
9090 (ppc_fill_vsxregset): New function.
9091 (ppc_store_vsxregset): New function.
9092 Add new VSX entry in regset_info target_regsets.
9093
9094 * configure.srv: Add new VSX dependencies.
9095
9096 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9097
9098 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9099 (remote_open): Set or clear transport_is_reliable.
9100 (putpkt_binary): Don't expect acks in noack mode.
9101 (getpkt): Don't send ack/nac in noack mode.
9102 * server.c (handle_general_set): Handle QStartNoAckMode.
9103 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9104 qSupported.
9105 (main): Reset noack_mode on every connection.
9106 * server.h (noack_mode): Declare.
9107
9108 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9109
9110 * Makefile.in (GDBREPLAY_OBS): New variable.
9111 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9112
9113 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9114 Daniel Jacobowitz <dan@codesourcery.com>
9115
9116 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9117 (usr_store_inferior_registers): Likewise.
9118 (regsets_store_inferior_registers): Likewise.
9119
9120 2008-07-31 Rolf Jansen <rj@surtec.com>
9121 Pedro Alves <pedro@codesourcery.com>
9122
9123 * configure.ac: Check for memmem declaration.
9124 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9125 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9126 (disable_packet_qfThreadInfo): Unconditionally compile.
9127 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9128 * configure, config.in: Regenerate.
9129
9130 2008-07-28 Doug Kwan <dougkwan@google.com>
9131
9132 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9133 (linux_write_memory): Remove declaration of errno.
9134
9135 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9136
9137 * linux-low.c (handle_extended_wait): Do not use "status"
9138 variable uninitialized.
9139
9140 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9141
9142 * server.c (handle_v_attach): Inhibit reporting dll changes.
9143
9144 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9145
9146 * remote-utils.c (prepare_resume_reply): If requested, don't
9147 output "thread:TID" in the T stop reply.
9148
9149 * server.c (disable_packet_vCont, disable_packet_Tthread)
9150 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9151 (handle_query): If requested, disable support for qC, qfThreadInfo
9152 and qsThreadInfo.
9153 (handle_v_requests): If requested, disable support for vCont.
9154 (gdbserver_show_disableable): New.
9155 (main): Handle --disable-packet and --disable-packet=LIST.
9156
9157 * server.h (disable_packet_vCont, disable_packet_Tthread)
9158 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9159
9160 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9161
9162 * server.c (gdbserver_usage): Mention --version.
9163
9164 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9165
9166 * Makefile.in (gdbreplay.o): New rule.
9167
9168 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9169
9170 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9171 message, not gdbserver.
9172
9173 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9174 Nathan Sidwell <nathan@codesourcery.com>
9175 Joseph Myers <joseph@codesourcery.com>
9176
9177 * acinclude.m4: Include ../../config/acx.m4.
9178 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9179 * configure, config.in: Regenerate.
9180 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9181 * server.c (gdbserver_version): Print PKGVERSION.
9182 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9183 (main): Adjust gdbserver_usage calls.
9184 * gdbreplay.c (version, host_name): Add declarations.
9185 (gdbreplay_version, gdbreplay_usage): New.
9186 (main): Accept --version and --help options.
9187
9188 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9189
9190 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9191 (arm_breakpoint_at): Handle Thumb.
9192 (the_low_target): Add comment.
9193
9194 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9195
9196 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9197
9198 2008-05-09 Doug Evans <dje@google.com>
9199
9200 * server.h (decode_search_memory_packet): Declare.
9201 * remote-utils.c (decode_search_memory_packet): New fn.
9202 * server.c (handle_search_memory_1): New fn.
9203 (handle_search_memory): New fn.
9204 (handle_query): Process qSearch:memory packets.
9205
9206 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9207
9208 * regcache.c (registers_length): Remove.
9209 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9210 full register packet.
9211 * regcache.h (registers_length): Remove prototype.
9212 * server.h (PBUFSIZ): Define to 16384.
9213
9214 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9215
9216 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9217 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9218 powerpc-64l.o, and powerpc-altivec64l.o.
9219 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9220 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9221 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9222 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9223 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9224 to srv_xmlfiles.
9225
9226 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9227 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9228 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9229 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9230 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9231 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9232 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9233 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9234 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9235 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9236 (clean): Update.
9237
9238 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9239 (init_registers_powerpc_32l): ... this new prototype.
9240 (init_registers_powerpc_32): Remove, replace by ...
9241 (init_registers_powerpc_altivec32l): ... this new prototype.
9242 (init_registers_powerpc_e500): Remove, replace by ...
9243 (init_registers_powerpc_e500l): ... this new prototype.
9244 (init_registers_ppc64): Remove, replace by ...
9245 (init_registers_powerpc_64l): ... this new prototype.
9246 (init_registers_powerpc_64): Remove, replace by ...
9247 (init_registers_powerpc_altivec64l): ... this new prototype.
9248 (ppc_num_regs): Set to 73.
9249 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9250 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9251 (ppc_cannot_store_register): Handle orig_r3 and trap.
9252 (ppc_arch_setup): Update init_registers_... calls.
9253 (ppc_fill_gregset): Handle orig_r3 and trap.
9254
9255 * inferiors.c (clear_inferiors): Reset current_inferior.
9256
9257 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9258
9259 * acinclude.m4: Add override.m4.
9260 * configure: Regenerate.
9261
9262 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9263
9264 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9265 initial call to init_register_ppc64.
9266
9267 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9268
9269 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9270 single powerpc*-*-linux* case.
9271 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9272
9273 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9274
9275 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9276 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9277 from reg_xmlfiles.
9278 * linux-ppc-low.c: Include <elf.h>.
9279 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9280 (ppc_hwcap): New global variable.
9281 (ppc_regmap): Remove __SPE__ #ifdef sections.
9282 (ppc_regmap_e500): New global variable.
9283 (ppc_cannot_store_register): Update __SPE__ special case.
9284 (ppc_get_hwcap): New function.
9285 (ppc_arch_setup): Use it to determine whether inferior supports
9286 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9287 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9288 Do not access registers if target does not support AltiVec.
9289 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9290 Do not access registers if target does not support SPE.
9291 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9292
9293 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9294
9295 * linux-low.c (disabled_regsets, num_regsets): New.
9296 (use_regsets_p): Delete.
9297 (linux_wait_for_process): Clear disabled_regsets.
9298 (regsets_fetch_inferior_registers): Check and set it.
9299 (regsets_store_inferior_registers): Likewise.
9300 (linux_fetch_registers, linux_store_registers): Do not use
9301 use_regsets_p.
9302 (initialize_low): Allocate disabled_regsets.
9303
9304 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9305
9306 * Makefile.in (LIBOBJS): New.
9307 (OBS): Use LIBOBJS.
9308 (memmem.o): New rule.
9309 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9310 * configure: Regenerated.
9311
9312 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9313
9314 * server.c (handle_query): Never return "unsupported" for
9315 qXfer:features:read queries.
9316
9317 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9318
9319 * server.c (get_features_xml): Fix inverted condition.
9320 (handle_query): Always support qXfer:feature:read.
9321
9322 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9323
9324 * server.c (wrapper_argv): New.
9325 (start_inferior): Handle wrapper_argv. If set, expect an extra
9326 trap.
9327 (gdbserver_usage): Document --wrapper.
9328 (main): Parse --wrapper.
9329
9330 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9331
9332 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9333 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9334 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9335 (ppc_set_pc): Likewise.
9336 (ppc_arch_setup): New function.
9337 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9338 of collect_register.
9339 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9340
9341 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9342
9343 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9344 instead of linux-ppc64-low.o.
9345 * linux-ppc64-low.c: Remove file.
9346 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9347 (linux-ppc64-low.o): Remove rule.
9348
9349 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9350 (init_registers_powerpc_64): Likewise.
9351 (ppc_regmap): Conditionally define depending on __powerpc64__.
9352 (ppc_cannot_store_register): Do not special-case "fpscr" when
9353 compiled on __powerpc64__.
9354 (ppc_collect_ptrace_register): New function.
9355 (ppc_supply_ptrace_register): New function.
9356 (ppc_breakpoint): Change type to "unsigned int".
9357 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9358 (the_low_target): Conditionally provide initializers for the
9359 arch_setup member depending on __powerpc64__. Install
9360 collect_ptrace_register and supply_ptrace_register members.
9361
9362 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9363
9364 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9365 * server.c (gdbserver_xmltarget): Define.
9366 (get_features_xml): Use it to replace "target.xml" and arch_string.
9367
9368 * configure.srv: Remove srv_xmltarget. Add XML files that were
9369 mentioned there to srv_xmlfiles instead. Remove conditional tests
9370 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9371 srv_xmlfiles and srv_regobj to include all possible choices.
9372 * configure.ac (srv_xmltarget): Remove.
9373 (srv_xmlfiles): Do not add "target.xml".
9374 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9375 checks for supplementary target information.
9376 * configure: Regenerate.
9377 * Makefile.in (XML_TARGET): Remove.
9378 (target.xml): Remove rule.
9379 (clean): Do not clean up target.xml.
9380 (.PRECIOUS): Do not mention target.xml.
9381
9382 * target.h (struct target_ops): Remove arch_string member.
9383 * linux-low.c (linux_arch_string): Remove.
9384 (linux_target_ops): Remove arch_string initializer.
9385 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9386 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9387 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9388 * spu-low.c (spu_arch_string): Remove.
9389 (spu_target_ops): Remove arch_string initializer.
9390 * win32-low.c (win32_arch_string): Remove.
9391 (win32_target_ops): Remove arch_string initializer.
9392 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9393 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9394 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9395
9396 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9397
9398 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9399 by collect_ptrace_register and supply_ptrace_register hooks.
9400 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9401 instead of checking for the_low_target.left_pad_xfer.
9402 (usr_store_inferior_registers): Use collect_ptrace_register callback
9403 instead of checking for the_low_target.left_pad_xfer.
9404
9405 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9406 (s390_supply_ptrace_register): Likewise.
9407 (s390_fill_gregset): Call s390_collect_ptrace_register.
9408 (the_low_target): Update.
9409
9410 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9411 (ppc_supply_ptrace_register): Likewise.
9412 (the_low_target): Update.
9413
9414 * linux-i386-low.c (the_low_target): Update.
9415 * linux-x86-64-low.c (the_low_target): Update.
9416
9417 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9418
9419 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9420 reg-s390.o and reg-s390x.o.
9421
9422 * linux-low.c (new_inferior): New global variable.
9423 (linux_create_inferior, linux_attach): Set it.
9424 (linux_wait_for_process): Call the_low_target.arch_setup after the
9425 target has stopped for the first time.
9426 (initialize_low): Do not call the_low_target.arch_setup.
9427
9428 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9429 (s390_set_pc): Likewise.
9430 (s390_arch_setup): New function.
9431 (the_low_target): Use s390_arch_setup as arch_setup routine.
9432
9433 * regcache.c (realloc_register_cache): New function.
9434 (set_register_cache): Call it for each existing regcache.
9435
9436 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9437
9438 * server.h (init_registers): Remove prototype.
9439
9440 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9441 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9442 instead of init_registers ().
9443 * linux-arm-low.c (init_registers_arm): Add prototype.
9444 (init_registers_arm_with_iwmmxt): Likewise.
9445 (the_low_target): Add initializer for arch_setup field.
9446 * linux-cris-low.c (init_registers_cris): Add prototype.
9447 (the_low_target): Add initializer for arch_setup field.
9448 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9449 (the_low_target): Add initializer for arch_setup field.
9450 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9451 (the_low_target): Add initializer for arch_setup field.
9452 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9453 (the_low_target): Add initializer for arch_setup field.
9454 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9455 (the_low_target): Add initializer for arch_setup field.
9456 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9457 (the_low_target): Add initializer for arch_setup field.
9458 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9459 (init_registers_mips64_linux): Likewise.
9460 (the_low_target): Add initializer for arch_setup field.
9461 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9462 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9463 (the_low_target): Add initializer for arch_setup field.
9464 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9465 (init_registers_powerpc_64): Likewise.
9466 (the_low_target): Add initializer for arch_setup field.
9467 * linux-s390-low.c (init_registers_s390): Add prototype.
9468 (init_registers_s390x): Likewise.
9469 (the_low_target): Add initializer for arch_setup field.
9470 * linux-sh-low.c (init_registers_sh): Add prototype.
9471 (the_low_target): Add initializer for arch_setup field.
9472 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9473 (the_low_target): Add initializer for arch_setup field.
9474 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9475 (the_low_target): Add initializer for arch_setup field.
9476
9477 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9478 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9479 instead of init_registers ().
9480 * win32-arm-low.c (init_registers_arm): Add prototype.
9481 (the_low_target): Add initializer for arch_setup field.
9482 * win32-i386-low.c (init_registers_i386): Add prototype.
9483 (the_low_target): Add initializer for arch_setup field.
9484
9485 * spu-low.c (init_registers_spu): Add prototype.
9486 (initialize_low): Call initialie_registers_spu () instead of
9487 initialize_registers ().
9488
9489 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9490
9491 * server.c (handle_v_requests): When handling the vRun and vAttach
9492 packets, if already debugging a process, don't kill it. Return an
9493 error instead.
9494
9495 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9496
9497 * server.c (handle_query): Correct length check.
9498
9499 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9500
9501 * win32-low.c (do_initial_child_stuff): Add process handle
9502 parameter. Set current_process_handle and current_process_id from the
9503 parameters. Clear globals.
9504 (win32_create_inferior): Don't set current_process_handle and
9505 current_process_id here. Instead pass them on the call to
9506 do_initial_child_stuff.
9507 (win32_attach): Likewise.
9508 (win32_clear_inferiors): New.
9509 (win32_kill): Don't close the current process handle or the
9510 current thread handle here. Instead call win32_clear_inferiors.
9511 (win32_detach): Don't open a new handle to the process. Call
9512 win32_clear_inferiors.
9513 (win32_join): Don't rely on current_process_handle; open a new
9514 handle using the process id.
9515 (win32_wait): Call win32_clear_inferiors when the inferior process
9516 has exited.
9517
9518 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9519
9520 * server.c (monitor_show_help): Add "exit".
9521
9522 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9523
9524 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9525 (clean): Add reg-xtensa.c.
9526 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9527 * configure.srv (xtensa*-*-linux*) New target.
9528 * linux-xtensa-low.c: New.
9529 * xtensa-xtregs.c: New.
9530
9531 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9532
9533 * hostio.c: Don't include errno.h.
9534 (errno_to_fileio_errno): Move to hostio-errno.
9535 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9536 error number outputting to the target->hostio_last_error callback.
9537 (hostio_packet_error): Use FILEIO_EINVAL directly.
9538 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9539 calls to hostio_error.
9540 * hostio-errno.c: New.
9541 * server.h (hostio_last_error_from_errno): Declare.
9542 * target.h (target_ops): Add hostio_last_error member.
9543 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9544 as hostio_last_error handler.
9545 * spu-low.c (spu_target_ops): Likewise.
9546 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9547 (wince_hostio_last_error): New functions.
9548 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9549 as hostio_last_error handler.
9550 (win32_target_ops) [!_WIN32_WCE]: Register
9551 hostio_last_error_from_errno as hostio_last_error handler.
9552 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9553 (hostio-errno.o): New rule.
9554 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9555 * configure.srv (srv_hostio_err_objs): New variable. Default to
9556 hostio-errno.o.
9557 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9558 * configure: Regenerate.
9559
9560 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9561
9562 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9563 (linux_kill, linux_detach): Clean up the process list.
9564 * remote-utils.c (remote_open): Improve port number parsing.
9565 (putpkt_binary, input_interrupt): Only send interrupts if the target
9566 is running.
9567 * server.c (extended_protocol): Make static.
9568 (attached): Define earlier.
9569 (exit_requested, response_needed, program_argv): New variables.
9570 (target_running): New.
9571 (start_inferior): Clear attached here.
9572 (attach_inferior): Set attached here.
9573 (require_running): Define.
9574 (handle_query): Use require_running and target_running. Implement
9575 "monitor exit".
9576 (handle_v_attach, handle_v_run): New.
9577 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9578 (gdbserver_usage): Update.
9579 (main): Redo argument parsing. Handle --debug and --multi. Handle
9580 --attach along with other options or after the port. Save
9581 program_argv. Support no initial program. Resynchronize
9582 communication with GDB after an error. Handle "monitor exit".
9583 Use require_running and target_running. Always allow the extended
9584 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9585 restart in extended mode.
9586 * README: Refer to the GDB manual. Update --attach usage.
9587
9588 2007-12-20 Andreas Schwab <schwab@suse.de>
9589
9590 * linux-low.c (STACK_SIZE): Define.
9591 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9592 (linux_test_for_tracefork): Likewise.
9593
9594 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9595
9596 * linux-low.c (linux_wait_for_event): Update messages. Do not
9597 reinsert auto-delete breakpoints.
9598 * mem-break.c (struct breakpoint): Change return type of handler to
9599 int.
9600 (set_breakpoint_at): Update handler type.
9601 (reinsert_breakpoint_handler): Return 1 instead of calling
9602 delete_breakpoint.
9603 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9604 setting a new one.
9605 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9606 * mem-break.h (set_breakpoint_at): Update handler type.
9607 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9608 * win32-low.c (auto_delete_breakpoint): New.
9609 (get_child_debug_event): Use it.
9610
9611 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9612
9613 * configure.ac: Check for pread and pwrite.
9614 * hostio.c (handle_pread): Fall back to lseek and read.
9615 (handle_pwrite): Fall back to lseek and write.
9616 * config.in, configure: Regenerated.
9617
9618 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9619
9620 * server.c (myresume): Add own_buf argument.
9621 (main): Update calls.
9622
9623 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9624
9625 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9626 * remote-utils.c (remote_open): Do not call disable_async_io.
9627 (block_async_io): Delete.
9628 (unblock_async_io): Make static.
9629 (initialize_async_io): New.
9630 * server.c (handle_v_cont): Handle async I/O here.
9631 (myresume): Likewise. Move other common resume tasks here...
9632 (main): ... from here. Call initialize_async_io. Disable async
9633 I/O before the main loop.
9634 * server.h (initialize_async_io): Declare.
9635 (block_async_io, unblock_async_io): Delete prototypes.
9636 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9637
9638 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9639
9640 * remote-utils.c (readchar): Allow binary data in received messages.
9641
9642 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9643
9644 * win32-low.c (attaching): New global.
9645 (win32_create_inferior): Clear the `attaching' global.
9646 (win32_attach): Set the `attaching' global.
9647 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9648 attaching. Only set a breakpoint at the entry point if not
9649 attaching.
9650
9651 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9652
9653 * server.c (main): Don't report dll events on the initial
9654 connection on attaches.
9655
9656 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9657
9658 * server.c (main): Relax numerical bases supported for the pid of
9659 the --attach command line argument.
9660
9661 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9662
9663 * win32-low.c (win32_attach): Call OpenProcess before
9664 DebugActiveProcess, not after. Add last error output to error
9665 call.
9666
9667 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9668
9669 * win32-low.c (win32_get_thread_context)
9670 (win32_set_thread_context): New functions.
9671 (thread_rec): Use win32_get_thread_context.
9672 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9673 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9674 field.
9675
9676 2007-12-03 Leo Zayas
9677 Pedro Alves <pedro_alves@portugalmail.pt>
9678
9679 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9680 global variables.
9681 (child_add_thread): Minor cleanup.
9682 (child_continue): Resume artificially suspended threads before
9683 calling ContinueDebugEvent.
9684 (suspend_one_thread): New.
9685 (fake_breakpoint_event): New.
9686 (get_child_debug_event): Change return type to int. Check here if
9687 gdb sent an interrupt request. If a soft interrupt was requested,
9688 fake a breakpoint event. Return 0 if there is no event to handle,
9689 and 1 otherwise.
9690 (win32_wait): Don't check here if gdb sent an interrupt request.
9691 Ensure there is a valid event to handle.
9692 (win32_request_interrupt): Add soft interruption method as last
9693 resort.
9694
9695 2007-12-03 Leo Zayas
9696 Pedro Alves <pedro_alves@portugalmail.pt>
9697
9698 * win32-low.h (win32_thread_info): Add descriptions to the
9699 structure members. Replace `suspend_count' counter by a
9700 `suspended' flag.
9701 * win32-low.c (thread_rec): Update condition of when to get the
9702 context from the inferior. Rely on ContextFlags being set if it
9703 has already been retrieved. Only suspend the inferior thread if
9704 we haven't already. Warn if that fails.
9705 (continue_one_thread): s/suspend_count/suspended/. Only call
9706 ResumeThread once. Warn if that fails.
9707
9708 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9709
9710 * win32-low.c (win32_wait): Don't read from the inferior when it
9711 has already exited.
9712
9713 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9714
9715 * Makefile.in (win32_low_h): New variable.
9716 (win32-low.o): Add dependency on $(win32_low_h).
9717 (win32-arm-low.o, win32-i386-low.o): New rules.
9718
9719 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9720
9721 * hostio.c: Correct copyright year.
9722
9723 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9724
9725 * Makefile.in (OBS): Add hostio.o.
9726 (hostio.o): New rule.
9727 * server.h (handle_vFile): Declare.
9728 * hostio.c: New file.
9729 * server.c (handle_v_requests): Take packet_len and new_packet_len
9730 for binary packets. Call handle_vFile.
9731 (main): Update call to handle_v_requests.
9732
9733 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9734
9735 * linux-low.c: Include <sched.h>.
9736
9737 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9738
9739 * linux-low.c (linux_tracefork_grandchild): New.
9740 (linux_tracefork_child): Use clone.
9741 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9742
9743 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9744
9745 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9746
9747 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9748
9749 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9750
9751 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9752
9753 * inferiors.c (change_inferior_id): Delete.
9754 (add_pid_to_list, pull_pid_from_list): New.
9755 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9756 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9757 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9758 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9759 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9760 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9761 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9762 (using_threads): Always set to 1.
9763 (handle_extended_wait): New.
9764 (add_process): Do not set TID.
9765 (linux_create_inferior): Set must_set_ptrace_flags.
9766 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9767 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9768 (linux_thread_alive): Rename TID argument to LWPID.
9769 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9770 (linux_wait_for_event): Do not use TID or check using_threads. Update
9771 call to dead_thread_notify. Call handle_extended_wait.
9772 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9773 (send_sigstop): Delete sigstop_sent.
9774 (wait_for_sigstop): Avoid TID.
9775 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9776 (linux_test_for_tracefork): New.
9777 (linux_lookup_signals): Use thread_db_active and
9778 linux_supports_tracefork_flag.
9779 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9780 * linux-low.h (get_process_thread): Avoid TID.
9781 (struct process_ifo): Move thread_known and tid to the end. Remove
9782 sigstop_sent.
9783 (linux_attach_lwp, thread_db_init): Update prototypes.
9784 * server.h (change_inferior_id): Delete prototype.
9785 (add_pid_to_list, pull_pid_from_list): New prototypes.
9786 * thread-db.c (thread_db_use_events): New.
9787 (find_first_thread): Rename to...
9788 (find_one_thread): ...this. Update callers and messages. Do not
9789 call fatal. Check thread_db_use_events. Do not call
9790 change_inferior_id or new_thread_notify.
9791 (maybe_attach_thread): Update. Do not call new_thread_notify.
9792 (thread_db_init): Set thread_db_use_events. Check use_events.
9793 * utils.c (fatal, warning): Correct message prefix.
9794
9795 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9796
9797 * Makefile.in (clean): Remove new files.
9798 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9799 (powerpc-64.o, powerpc-64.c): New rules.
9800 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9801 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9802 with SPE.
9803 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9804 SPE targets.
9805 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9806 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9807 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9808 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9809 (target_regsets): Add AltiVec and SPE register sets.
9810 * configure.ac: Check for AltiVec and SPE.
9811 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9812 (ppc_fill_vrregset, ppc_store_vrregset): New.
9813 (target_regsets): Add AltiVec register set.
9814 * configure: Regenerated.
9815
9816 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9817
9818 * linux-low.c (O_LARGEFILE): Define.
9819 (linux_read_memory): Use /proc/PID/mem.
9820 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9821 * configure, config.in: Regenerated.
9822
9823 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9824
9825 * linux-low.c (linux_wait_for_event): Do not pass signals while
9826 single-stepping.
9827
9828 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9829
9830 * win32-low.c (create_process): New.
9831 (win32_create_inferior): Use create_process instead of
9832 CreateProcess. If create_process failed retry appending an ".exe"
9833 suffix. Store the GetLastError result immediatelly after
9834 create_process calls and use it on the call to error.
9835
9836 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9837
9838 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9839
9840 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9841
9842 * configure.ac: Switch license to GPLv3.
9843
9844 2007-08-01 Michael Snyder <msnyder@access-company.com>
9845
9846 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9847
9848 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9849
9850 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9851 typedef.
9852 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9853 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9854 CloseToolhelp32Snapshot.
9855 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9856 CloseToolhelp32Snapshot.
9857
9858 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9859
9860 * server.c (main): Check for inferior exit before main loop.
9861
9862 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9863
9864 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9865 instead of on tmp_desc.
9866
9867 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9868 Daniel Jacobowitz <dan@codesourcery.com>
9869
9870 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9871 (add_thread): Minor cleanups.
9872 (clear_inferiors): Move lower in the file. Clear the DLL
9873 list.
9874 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9875 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9876 (xml_escape_text): New.
9877 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9878 for qSupported.
9879 (handle_v_cont): Report errors.
9880 (gdbserver_version): Update.
9881 (main): Correct size of own_buf. Do not report initial DLL events.
9882 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9883 (unloaded_dll, xml_escape_text): New.
9884 * win32-low.c (enum target_waitkind): Update comments.
9885 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9886 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9887 (win32_EnumProcessModules, win32_GetModuleInformation)
9888 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9889 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9890 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9891 (win32_Module32First, win32_Module32Next, load_toolhelp)
9892 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9893 (get_child_debug_event): Handle DLL events.
9894 (win32_wait): Likewise.
9895
9896 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9897
9898 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9899 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9900
9901 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9902
9903 * win32-low.c (handle_output_debug_string): Ignore event if not
9904 waiting.
9905
9906 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9907
9908 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9909
9910 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9911
9912 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9913
9914 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9915
9916 * inferiors.c (change_inferior_id): Add comment.
9917 * linux-low.c (check_removed_breakpoint): Add an early
9918 prototype. Improve debug output.
9919 (linux_attach): Doc update.
9920 (linux_detach_one_process, linux_detach): Clean up before releasing
9921 each process.
9922 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9923 * linux-low.h (struct process_info): Doc improvement.
9924 * mem-break.c (delete_all_breakpoints): New.
9925 * mem-break.h (delete_all_breakpoints): New prototype.
9926 * thread-db.c (find_first_thread): New.
9927 (thread_db_create_event): Call it instead of
9928 thread_db_find_new_threads. Clean up unused variables.
9929 (maybe_attach_thread): Remove first thread handling.
9930 (thread_db_find_new_threads): Use find_first_thread.
9931 (thread_db_get_tls_address): Likewise.
9932
9933 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9934
9935 * thread-db.c (thread_db_find_new_threads): Add prototype.
9936 (thread_db_create_event): Check for the main thread before adding
9937 a new thread.
9938 (maybe_attach_thread): Only enable event reporting if TID == 0.
9939 (thread_db_get_tls_address): Check for new threads.
9940
9941 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9942
9943 * linux-low.c (linux_create_inferior): Try execv before execvp.
9944 * spu-low.c (spu_create_inferior): Likewise.
9945
9946 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9947
9948 * linux-low.c (linux_create_inferior): Change execv to execvp.
9949 * spu-low.c (spu_create_inferior): Likewies.
9950
9951 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9952
9953 * Makefile.in (clean): Clean new files instead of deleted ones.
9954 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9955 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9956 rules.
9957 * configure.srv: Specify XML files and new regformats for MIPS and
9958 MIPS64 GNU/Linux.
9959 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9960 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9961 an entry for the restart register.
9962 (mips_cannot_fetch_register, mips_cannot_store_register)
9963 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9964 register names to match the XML descriptions.
9965 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9966 restart register instead of $0.
9967
9968 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9969 Markus Deuling <deuling@de.ibm.com>
9970
9971 * remote-utils.c (decode_xfer_write): New function.
9972 * server.h (decode_xfer_write): Add prototype.
9973 * server.c (handle_query): Add PACKET_LEN argument. Support
9974 qXfer:spu:read and qXfer:spu:write packets.
9975 (main): Pass packet_len to handle_query.
9976 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9977 * target.h (target_ops): Add qxfer_spu.
9978
9979 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9980
9981 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9982 accessing non-seekable spufs files.
9983
9984 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9985
9986 * server.c (handle_query): Add reply for qC packet.
9987
9988 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9989 Leo Zayas <lerele@champenstudios@com>
9990
9991 * server.h (check_remote_input_interrupt_request): New function.
9992 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9993 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9994 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9995 (check_remote_input_interrupt_request): New function.
9996 * server.h (check_remote_input_interrupt_request): Declare.
9997 * win32-low.c (winapi_DebugBreakProcess,
9998 winapi_GenerateConsoleCtrlEvent): New typedefs.
9999 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10000 to 250 ms.
10001 (win32_wait): Check for remote interrupt request
10002 with check_remote_input_interrupt_request.
10003 (win32_request_interrupt): New function.
10004 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10005
10006 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10007
10008 * win32-low.c (debug_registers_changed,
10009 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10010 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10011 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10012 (thread_rec): Get context using the low target.
10013 (child_add_thread): Call thread_added on the low target,
10014 which does the same thing.
10015 (regptr): Delete.
10016 (do_initial_child_stuff): Remove debug registers references.
10017 Set context using the low target. Resume threads after
10018 setting the contexts.
10019 (child_continue): Remove dead variable. Remove debug
10020 registers references.
10021 (child_fetch_inferior_registers): Go through the low target.
10022 (do_child_store_inferior_registers): Remove.
10023 (child_store_inferior_registers): Go through the low target.
10024 (win32_resume): Remove debug registers references.
10025 Set context using the low target.
10026 (handle_exception): Change return type to void. Don't record
10027 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10028 first chance exception.
10029 (get_child_debug_event): Change return type to void. Remove
10030 goto loop. Always return after waiting for debug event.
10031 (win32_wait): Convert to switch statement. Handle spurious
10032 events.
10033
10034 * win32-i386-low.c (debug_registers_changed,
10035 debug_registers_used): New.
10036 (initial_stuff): Rename to ...
10037 (i386_initial_stuff): ... this. Clear debug registers
10038 state variables.
10039 (store_debug_registers): Delete.
10040 (i386_get_thread_context): New.
10041 (load_debug_registers): Delete.
10042 (i386_set_thread_context): New.
10043 (i386_thread_added): New.
10044 (single_step): Rename to ...
10045 (i386_single_step): ... this.
10046 (do_fetch_inferior_registers): Rename to ...
10047 (i386_fetch_inferior_register): ... this.
10048 (i386_store_inferior_register): New.
10049 (the_low_target): Adapt to new interface.
10050
10051 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10052 (arm_get_thread_context): New.
10053 (arm_set_thread_context): New.
10054 (regptr): New.
10055 (do_fetch_inferior_registers): Rename to ...
10056 (arm_fetch_inferior_register): ... this.
10057 (arm_store_inferior_register): New.
10058 (arm_wince_breakpoint): Reimplement as unsigned long.
10059 (arm_wince_breakpoint_len): Define.
10060 (the_low_target): Adapt to new interface.
10061
10062 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10063 load_debug_registers. Add get_thread_context, set_thread_context,
10064 thread_added and store_inferior_register. Rename
10065 fetch_inferior_registers to fetch_inferior_register.
10066 (regptr): Remove declaration.
10067
10068 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10069
10070 * linux-low.c (linux_detach): Change return type to int. Return 0.
10071 * spu-low.c (spu_detach): Likewise.
10072
10073 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10074
10075 * target.h (target_ops): Change return type of detach to int.
10076 Add join.
10077 (join_inferior): New.
10078 * server.c (main): Don't skip detach support on mingw32.
10079 If the inferior doesn't support detaching return error.
10080 Call join_inferior instead of using waitpid.
10081 * linux-low.c (linux_join): New.
10082 (linux_target_op): Add linux_join.
10083 * spu-low.c (spu_join): New.
10084 (spu_target_ops): Add spu_join.
10085 * win32-low.c (win32_detach): Adapt to new interface.
10086 Reopen current_process_handle before detaching. Issue a child
10087 resume before detaching.
10088 (win32_join): New.
10089 (win32_target_op): Add win32_join.
10090
10091 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10092
10093 * win32-low.c (win32-attach): Fix return value.
10094 * target.h (target_ops): Describe ATTACH return values.
10095
10096 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10097
10098 * win32-low.c (GETPROCADDRESS): Define.
10099 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10100 (winapi_DebugSetProcessKillOnExit): Likewise.
10101 (win32_create_inferior): Force usage of ansi CreateProcessA.
10102 (win32_attach): Use GETPROCADDRESS.
10103 (win32_detach): Likewise.
10104
10105 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10106
10107 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10108
10109 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10110
10111 * win32-low.c: Commit leftover changes from 2007-03-29.
10112
10113 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10114
10115 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10116 fields short instead of int. Add explicit padding.
10117 (i387_cache_to_fsave): Remove unnecessary casts.
10118 (i387_fsave_to_cache): Doc fix.
10119 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10120
10121 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10122
10123 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10124 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10125
10126 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10127
10128 * configure.srv (arm*-*-mingw32ce*): Move near the other
10129 arm targets.
10130
10131 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10132
10133 * configure.ac: Add errno checking.
10134 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10135 sys/file.h and malloc.h.
10136 (AC_CHECK_DECLS): Add perror.
10137 (srv_mingwce): Handle.
10138 * configure.srv (i[34567]86-*-cygwin*): Add
10139 win32-i386-low.o to srv_tgtobj.
10140 (i[34567]86-*-mingw*): Likewise.
10141 (arm*-*-mingw32ce*): Add case.
10142 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10143 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10144 [__MINGW32CE__] (strerror): New function.
10145 [__MINGW32CE__] (errno): Define to GetLastError.
10146 [__MINGW32CE__] (COUNTOF): New macro.
10147 (remote_open): Remove extra close call.
10148 * mem-break.c (delete_breakpoint_at): New function.
10149 * mem-break.h (delete_breakpoint_at): Declare.
10150 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10151 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10152 [USE_WIN32API] (read, write): Add char* casts.
10153 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10154 * server.h: Include wincecompat.h on Windows CE.
10155 [HAVE_ERRNO_H]: Check.
10156 (perror): Declare if not declared.
10157 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10158 (perror_with_name): Remove errno declaration.
10159 * wincecompat.h: New.
10160 * wincecompat.c: New.
10161 * win32-low.h: New.
10162 * win32-arm-low.c: New.
10163 * win32-i386-low.c: New.
10164 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10165 (OUTMSG2): Make it safe.
10166 (_T): New macro.
10167 (COUNTOF): New macro.
10168 (NUM_REGS): Get it from the low target.
10169 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10170 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10171 (thread_rec): Let low target handle debug registers.
10172 (child_add_thread): Likewise.
10173 (child_init_thread_list): Likewise.
10174 (continue_one_thread): Likewise.
10175 (regptr): New.
10176 (do_child_fetch_inferior_registers): Move to ...
10177 * win32-i386-low.c: ... here, and rename to ...
10178 (do_fetch_inferior_registers): ... this.
10179 * win32-low.c (child_fetch_inferior_registers):
10180 Go through the low target.
10181 (do_child_store_inferior_registers): Use regptr.
10182 (strwinerror): New function.
10183 (win32_create_inferior): Handle Windows CE.
10184 Use strwinerror instead of strerror on Windows error
10185 codes. Add program to the error output.
10186 Don't close the main thread handle on Windows CE.
10187 (win32_attach): Use coredll.dll on Windows CE.
10188 (win32_kill): Close current process and current
10189 thread handles.
10190 (win32_detach): Use coredll.dll on Windows CE.
10191 (win32_resume): Let low target handle debug registers, and
10192 step request.
10193 (handle_exception): Add/Remove initial breakpoint. Avoid
10194 non-existant WSTOPSIG on Windows CE.
10195 (win32_read_inferior_memory): Cast to remove warning.
10196 (win32_arch_string): Go through the low target.
10197 (initialize_low): Call set_breakpoint_data with the low
10198 target's breakpoint.
10199 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10200 FOP_REGNUM, mappings): Move to ...
10201 * win32-i386-low.c: ... here.
10202 * win32-low.c (win32_thread_info): Move to ...
10203 * win32-low.h: ... here.
10204 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10205 win32-arm-low.c and wincecompat.c.
10206 (all:): Add $EXEEXT.
10207 (install-only:): Likewise.
10208 (gdbserver:): Likewise.
10209 (gdbreplay:): Likewise.
10210 * config.in: Regenerate.
10211 * configure: Regenerate.
10212
10213 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10214
10215 * win32-low.c: Rename typedef thread_info to
10216 win32_thread_info throughout.
10217
10218 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10219
10220 * win32-i386-low.c: Rename to ...
10221 * win32-low.c: ... this.
10222 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10223 * Makefile.in: Likewise.
10224
10225 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10226
10227 * remote-utils.c (monitor_output): Constify msg parameter.
10228 * server.h (monitor_output): Likewise.
10229 * win32-i386-low.c (handle_output_debug_string): New.
10230 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10231 handle_output_debug_string.
10232 (get_child_debug_event): Likewise.
10233
10234 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10235
10236 * server.c (main): Correct strtoul check.
10237
10238 2007-03-27 Jon Ringle <jon@ringle.org>
10239
10240 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10241
10242 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10243
10244 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10245
10246 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10247
10248 * terminal.h: Check HAVE_SGTTY_H.
10249
10250 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10251
10252 * remote-utils.c (remote_open): Print out the assigned port number.
10253
10254 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10255
10256 * remote-utils.c (monitor_output): New function.
10257 * server.c (debug_threads): Define here.
10258 (monitor_show_help): New function.
10259 (handle_query): Handle qRcmd.
10260 (main): Do not handle 'd' packet.
10261 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10262 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10263 of debug_threads.
10264
10265 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10266
10267 * Makefile.in (EXEEXT): New.
10268 (clean): Use $(EXEEXT).
10269
10270 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10271
10272 * target.h (target_ops): Rename send_signal to request_interrupt,
10273 and remove enum target_signal parameter.
10274 * linux-low.c (linux_request_interrupt): Rename from
10275 linux_send_signal, and always send SIGINT.
10276 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10277 and always send SIGINT.
10278 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10279 of send_signal.
10280 (input_interrupt): Likewise.
10281
10282 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10283
10284 * server.c (get_features_xml): Check if target implemented
10285 arch_string.
10286 * win32-i386-low.c (win32_arch_string): New.
10287 (win32_target_ops): Add win32_arch_string as arch_string member.
10288
10289 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10290
10291 * spu-low.c (spu_arch_string): New.
10292 (spu_target_ops): Add spu_arch_string.
10293
10294 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10295
10296 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10297 * configure.ac: Do not check for terminal.h.
10298 * configure, config.in: Regenerated.
10299
10300 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10301
10302 * Makefile.in (OBS): Add $(XML_BUILTIN).
10303 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10304 (clean): Update.
10305 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10306 (arm-with-iwmmxt.c): New.
10307 * config.in, configure: Regenerate.
10308 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10309 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10310 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10311 (arm*-*-linux*): Add iWMMXt and regset support.
10312 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10313 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10314 (arm_store_wmmxregset, target_regsets): New.
10315 * server.c (get_features_xml): Take annex argument. Check builtin
10316 XML documents.
10317 (handle_query): Handle multiple annexes.
10318
10319 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10320
10321 * remote-utils.c [USE_WIN32API] (read, write): Define.
10322 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10323 write.
10324
10325 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10326
10327 * linux-i386-low.c (the_low_target): Set arch_string.
10328 * linux-x86-64-low.c (the_low_target): Likewise.
10329 * linux-low.c (linux_arch_string): New.
10330 (linux_target_ops): Add it.
10331 * linux-low.h (struct linux_target_ops): Add arch_string.
10332 * server.c (write_qxfer_response): Use const void * for DATA.
10333 (get_features_xml): New.
10334 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10335 * target.h (struct target_ops): Add arch_string method.
10336
10337 2007-01-03 Denis Pilat <denis.pilat@st.com>
10338 Daniel Jacobowitz <dan@codesourcery.com>
10339
10340 * linux-low.c (linux_kill): Handle being called with no threads.
10341 * win32-i386-low.c (win32_kill): Likewise.
10342 (get_child_debug_event): Clear current_process_handle.
10343
10344 2006-12-30 Denis PILAT <denis.pilat@st.com>
10345 Daniel Jacobowitz <dan@codesourcery.com>
10346
10347 * remote-utils.c (remote_open): Check the type of specified
10348 serial port devices before opening them.
10349 * server.c (main): Kill the inferior if an error occurs during
10350 the first remote_open.
10351
10352 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10353
10354 * README: Update supported targets.
10355
10356 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10357
10358 * Makefile.in (clean): Remove reg-mips64.c.
10359 (reg-mips64.c, reg-mips64.o): New rules.
10360 * configure.srv: Handle mips64. Include regset support for mips.
10361 * linux-mips-low.c (union mips_register): New.
10362 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10363 (mips_breakpoint, mips_breakpoint_at): Use int.
10364 (mips_collect_register, mips_supply_register)
10365 (mips_collect_register_32bit, mips_supply_register_32bit)
10366 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10367 (mips_store_fpregset, target_regsets): New.
10368 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10369
10370 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10371
10372 * configure.srv: Add target "spu*-*-*".
10373 * Makefile.in (clean): Remove reg-spu.c.
10374 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10375 * spu-low.c: New file.
10376
10377 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10378
10379 * configure.ac: Correct td_thr_tls_get_addr test.
10380 * configure: Regenerated.
10381
10382 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10383
10384 * linux-low.c (linux_wait_for_event): Reformat. Use the
10385 pass_signals array.
10386 * remote-utils.c (decode_address_to_semicolon): New.
10387 * server.c (pass_signals, handle_general_set): New.
10388 (handle_query): Mention QPassSignals for qSupported.
10389 (main): Call handle_general_set.
10390 * server.h (pass_signals, decode_address_to_semicolon): New.
10391
10392 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10393
10394 * server.c (handle_query): Correct error handling for read_auxv.
10395
10396 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10397
10398 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10399 and srv_linux_thread_db to yes.
10400 * linux-s390-low.c (s390_fill_gregset): New function.
10401 (target_regsets): Define data structure.
10402
10403 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10404
10405 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10406 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10407 * config.in, configure: Regenerated.
10408 * inferiors.c (gdb_id_to_thread): New function.
10409 (gdb_id_to_thread_id): Use it.
10410 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10411 * linux-low.h (struct process_info): Add th member.
10412 (thread_db_get_tls_address): New prototype.
10413 * remote-utils.c (decode_address): Make non-static.
10414 * server.c (handle_query): Handle qGetTLSAddr.
10415 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10416 * target.h (struct target_ops): Add get_tls_address.
10417 * thread-db.c (maybe_attach_thread): Save the thread handle.
10418 (thread_db_get_tls_address): New.
10419
10420 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10421
10422 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10423 (linux_resume_one_process): Take a siginfo_t *. Update all
10424 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10425 (struct pending_signals): Add a siginfo_t.
10426 (linux_wait_for_process): Always set last_status.
10427 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10428 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10429 * linux-low.h (struct process_info): Add last_status.
10430
10431 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10432
10433 * remote-utils.c (try_rle): New function.
10434 (putpkt_binary): Use it.
10435
10436 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10437
10438 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10439 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10440 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10441 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10442 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10443 point registers.
10444
10445 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10446
10447 * server.c (terminal_fd): New variable.
10448 (old_foreground_pgrp): Likewise.
10449 (restore_old_foreground_pgrp): New function.
10450 (start_inferior): Record the terminal file descriptor in terminal_fd
10451 and its original foreground group in old_foreground_pgrp. Register
10452 restore_old_foreground_pgrp with atexit().
10453
10454 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10455
10456 * server.c (handle_query): Correct qPart to qXfer.
10457
10458 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10459
10460 * configure.ac: Check for more headers which are missing on
10461 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10462 * configure.srv: Add Cygwin and mingw32.
10463 * remote-utils.c: Don't include headers unconditionally which
10464 are missing on mingw32. Include <winsock.h> for mingw32.
10465 (remote_open): Adjust for mingw32 support. Flush
10466 standard error after writing to it.
10467 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10468 (unblock_async_io, enable_async_io, disable_async_io)
10469 (readchar, getpkt): Update for Winsock support.
10470 (prepare_resume_reply): Expect a protocol signal number.
10471 * server.c: Disable <sys/wait.h> on mingw32.
10472 (start_inferior): Adjust for mingw32 support. Flush
10473 standard error after writing to it.
10474 (attach_inferior): Likewise. Use protocol signal
10475 numbers.
10476 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10477 and names.
10478 * win32-i386-low.c: New file.
10479 * Makefile.in (XM_CLIBS): Set.
10480 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10481 (win32-i386-low.o): New dependency rule.
10482 * linux-low.c (linux_wait): Use target signal numbers.
10483 * target.h (struct target_ops): Doc fix.
10484 * server.h (target_signal_to_name): New prototype.
10485 * gdbreplay.c: Don't include headers unconditionally which
10486 are missing on mingw32. Include <winsock.h> for mingw32.
10487 (remote_close, remote_open): Adjust for Winsock support.
10488 * configure, config.in: Regenerated.
10489
10490 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10491
10492 * server.c (decode_xfer_read, write_qxfer_response): New.
10493 (handle_query): Take a packet length argument. Handle
10494 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10495 the qSupported response.
10496 (main): Update call to handle_query.
10497
10498 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10499
10500 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10501 (putpkt_binary): Renamed from putpkt and adjusted for binary
10502 data.
10503 (putpkt): New wrapper for putpkt_binary.
10504 (readchar): Don't mask off the high bit.
10505 (decode_X_packet): New function.
10506 * server.c (main): Call putpkt_binary if a handler sets the packet
10507 length. Save the length of the incoming packet. Handle 'X'.
10508 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10509
10510 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10511
10512 * server.c (handle_query): Handle qSupported.
10513
10514 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10515
10516 * remote-utils.c (all_symbols_looked_up): New variable.
10517 (look_up_one_symbol): Check it.
10518 * server.h (look_up_one_symbol): New declaration.
10519 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10520
10521 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10522
10523 * Makefile.in (linux-arm-low.o): Update dependencies.
10524 * linux-arm-low.c: Include "gdb_proc_service.h".
10525 (PTRACE_GET_THREAD_AREA): Define.
10526 (ps_get_thread_area): New function.
10527
10528 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10529
10530 * configure.srv (m68k*-*-uclinux*): New target.
10531 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10532 (linux_resume_one_process): Remove extraneous cast.
10533 (linux_read_offsets): New.
10534 (linux_target_op): Add linux_read_offsets on mmuless systems.
10535 * server.c (handle_query): Add qOffsets logic.
10536 * target.h (struct target_ops): Add read_offsets.
10537
10538 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10539
10540 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10541 (PTRACE_GET_THREAD_AREA): Define.
10542 (ps_get_thread_area): New function.
10543 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10544 (linux-x86-64-low.o): Update.
10545
10546 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10547
10548 * configure.ac: Remove checks for prfpregset_t.
10549 * gdb_proc_service.h: New file.
10550 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10551 new "gdb_proc_service.h".
10552 * proc-service.c: Likewise.
10553 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10554 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10555 * Makefile.in (gdb_proc_service_h): Updated.
10556 * configure, config.in: Regenerated.
10557
10558 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10559
10560 * remote-utils.c (prepare_resume_reply): Move declaration
10561 of gdb_id_from_wait to the top of the block.
10562
10563 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10564
10565 * linux-low.c (regsets_store_inferior_registers): Read the regset
10566 from the target before filling it.
10567
10568 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10569
10570 * server.c (attach_inferior): Return SIGTRAP for a successful
10571 attach.
10572
10573 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10574
10575 * Makefile.in (OBS): Add version.o.
10576 (STAGESTUFF): Delete.
10577 (version.o): Add dependencies.
10578 (version.c): Replace rule.
10579 (clean): Remove version.c.
10580 * server.c (gdbserver_version): New.
10581 (gdbserver_usage): Use printf.
10582 (main): Handle --version and --help.
10583 * server.h (version, host_name): Add declarations.
10584
10585 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10586
10587 * linux-arm-low.c:
10588 * linux-arm-low.c:
10589 * inferiors.c:
10590 * i387-fp.h:
10591 * i387-fp.c:
10592 * gdbreplay.c:
10593 * regcache.c:
10594 * proc-service.c:
10595 * mem-break.h:
10596 * mem-break.c:
10597 * linux-x86-64-low.c:
10598 * linux-sh-low.c:
10599 * linux-s390-low.c:
10600 * linux-ppc64-low.c:
10601 * linux-ppc-low.c:
10602 * linux-mips-low.c:
10603 * linux-m68k-low.c:
10604 * linux-m32r-low.c:
10605 * linux-low.h:
10606 * linux-low.c:
10607 * linux-ia64-low.c:
10608 * linux-i386-low.c:
10609 * linux-crisv32-low.c:
10610 * thread-db.c:
10611 * terminal.h:
10612 * target.h:
10613 * target.c:
10614 * server.h:
10615 * server.c:
10616 * remote-utils.c:
10617 * regcache.h:
10618 * utils.c:
10619 * Makefile.in:
10620 * configure.ac:
10621 * gdbserver.1: Add (C) after Copyright. Update the FSF
10622 address.
10623
10624 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10625
10626 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10627 (arm_breakpoint_at): Recognize both breakpoints.
10628 (the_low_target): Use the correct breakpoint instruction.
10629
10630 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10631
10632 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10633 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10634 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10635 (the_low_target): Update.
10636
10637 2005-10-25 Andreas Schwab <schwab@suse.de>
10638
10639 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10640
10641 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10642 (ia64_num_regs): Reduce to 462.
10643
10644 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10645
10646 * acinclude.m4: Correct quoting.
10647 * aclocal.m4: Regenerated.
10648
10649 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10650 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10651 (thread_db_init): Call thread_db_err_str.
10652 * configure.ac: Check for TD_VERSION.
10653 * config.in, configure: Regenerated.
10654
10655 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10656
10657 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10658
10659 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10660
10661 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10662 is not available. Define HAVE_PTRACE_GETREGS if it is.
10663 * config.in, configure: Regenerated.
10664 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10665 * linux-i386-low.c, linux-m68k-low.c: Update to use
10666 HAVE_PTRACE_GETREGS.
10667 * linux-low.c (regsets_fetch_inferior_registers)
10668 (regsets_store_inferior_registers): Only return 0 if we processed
10669 GENERAL_REGS.
10670 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10671 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10672
10673 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10674
10675 * inferiors.c (struct thread_info): Add gdb_id.
10676 (add_thread): Add gdb_id argument.
10677 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10678 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10679 calls to add_thread.
10680 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10681 * server.c (handle_query): Use thread_to_gdb_id.
10682 (handle_v_cont, main): Use gdb_id_to_thread_id.
10683 * server.h (add_thread): Update prototype.
10684 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10685 prototypes.
10686
10687 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10688
10689 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10690 left-padded registers.
10691 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10692 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10693
10694 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10695
10696 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10697 * configure: Regenerate.
10698 * config.in: Regenerate.
10699 * server.h (NEED_DECLARATION_STRERROR):
10700 Replace with !HAVE_DECL_STRERROR.
10701
10702 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10703
10704 * linux-low.c (linux_wait, linux_send_signal): Don't test
10705 an unsigned long variable for > 0 if it could be MAX_ULONG.
10706 * server.c (myresume): Likewise.
10707 * target.c (set_desired_inferior): Likewise.
10708
10709 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10710
10711 * configure.ac: Simplify and improve check for socklen_t.
10712 * configure, config.in: Regenerate.
10713
10714 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10715
10716 * acconfig.h: Remove.
10717 * configure.ac: Add a test for socklen_t. Use three-argument
10718 AC_DEFINE throughout.
10719 * config.in: Regenerated using autoheader 2.59.
10720 * configure: Regenerated.
10721
10722 * gdbreplay.c (socklen_t): Provide a default.
10723 (remote_open): Use socklen_t.
10724 * remote-utils.c (socklen_t): Provide a default.
10725 (remote_open): Use socklen_t.
10726 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10727 unsigned char.
10728
10729 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10730 char for buffers.
10731 * linux-low.c (linux_read_memory, linux_write_memory)
10732 (linux_read_auxv): Likewise.
10733 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10734 (check_mem_write): Likewise.
10735 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10736 Likewise.
10737 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10738 (registers_from_string, register_data): Likewise.
10739 * server.c (handle_query, main): Likewise.
10740 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10741 (decode_M_packet): Likewise.
10742 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10743 * target.h (struct target_ops): Update read_memory, write_memory,
10744 and read_auxv.
10745 (read_inferior_memory, write_inferior_memory): Update.
10746 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10747 to unsigned char *.
10748 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10749 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10750 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10751 linux-s390-low.c, linux-sh-low.c: Update for changes in
10752 read_inferior_memory and the_low_target->breakpoint.
10753
10754 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10755
10756 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10757 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10758 * configure.srv: Add powerpc64-*-linux*.
10759 * linux-ppc64-low.c: New file.
10760
10761 2005-05-23 Orjan Friberg <orjanf@axis.com>
10762
10763 * linux-cris-low.c: New file with support for CRIS.
10764 * linux-crisv32-low.c: Ditto for CRISv32.
10765 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10766 (clean): Add reg-cris.c and reg-crisv32.c.
10767 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10768 reg-crisv32.o, and reg-crisv32.c to make rules.
10769 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10770 recognized targets.
10771
10772 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10773
10774 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10775 of sizeof (PTRACE_XFER_TYPE).
10776 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10777
10778 2005-05-12 Orjan Friberg <orjanf@axis.com>
10779
10780 * target.h (struct target_ops): Add insert_watchpoint,
10781 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10782 pointers for hardware watchpoint support.
10783 * linux-low.h (struct linux_target_ops): Ditto.
10784 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10785 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10786 to linux_target_ops.
10787 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10788 reply packet.
10789 * server.c (main): Recognize 'Z' and 'z' packets.
10790
10791 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10792
10793 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10794 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10795 (the_low_target): Add new members.
10796
10797 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10798
10799 * proc-service.c (ps_lgetregs): Search all_processes instead of
10800 all_threads.
10801
10802 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10803
10804 * server.c (start_inferior): Change return type to int.
10805 (attach_inferior): Change sigptr to int *.
10806 (handle_v_cont, handle_v_requests): Change signal to int *.
10807 (main): Change signal to int.
10808
10809 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10810
10811 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10812 * configure.srv: Add m32r*-*-linux*.
10813 * linux-m32r-low.c: New file.
10814
10815 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10816
10817 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10818
10819 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10820
10821 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10822 Take unsigned long arguments for PIDs.
10823 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10824 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10825 (wait_for_sigstop, linux_resume_one_process)
10826 (regsets_fetch_inferior_registers, linux_send_signal)
10827 (linux_read_auxv): Likewise. Update the types of variables holding
10828 PIDs. Update format string specifiers.
10829 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10830 * remote-utils.c (prepare_resume_reply): Likewise.
10831 * server.c (cont_thread, general_thread, step_thread)
10832 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10833 unsigned long.
10834 (handle_query): Update format specifiers.
10835 (handle_v_cont, main): Use strtoul for thread IDs.
10836 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10837 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10838 (general_thread, step_thread, thread_from_wait)
10839 (old_thread_from_wait): Update.
10840 * target.h (struct thread_resume): Use unsigned long for THREAD.
10841 (struct target_ops): Use unsigned long for arguments to attach and
10842 thread_alive.
10843
10844 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10845
10846 * acinclude.m4: Include bfd/bfd.m4 directly.
10847 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10848 <agriffis@toolchain.org>.
10849 * aclocal.m4, configure: Regenerated.
10850
10851 2005-01-07 Andrew Cagney <cagney@gnu.org>
10852
10853 * configure.ac: Rename configure.in, require autoconf 2.59.
10854 * configure: Re-generate.
10855
10856 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10857
10858 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10859 LIBS when finished.
10860 * aclocal.m4: Regenerated.
10861 * configure: Regenerated.
10862
10863 2004-11-21 Andreas Schwab <schwab@suse.de>
10864
10865 * linux-m68k-low.c (m68k_num_gregs): Define.
10866 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10867 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10868 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10869 (m68k_breakpoint_at): New. Add to the_low_target.
10870
10871 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10872 srv_linux_thread_db to yes.
10873
10874 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10875
10876 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10877 (ARCH_SET_FS): Likewise.
10878 (ARCH_GET_FS): Likewise.
10879 (ARCH_GET_GS): Likewise.
10880
10881 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10882
10883 * linux-i386-low.c (ps_get_thread_area): New.
10884 * linux-x86-64-low.c (ps_get_thread_area): New.
10885 * linux-low.c: Include <sys/syscall.h>.
10886 (linux_kill_one_process): Don't kill the first thread here.
10887 (linux_kill): Kill the first thread here.
10888 (kill_lwp): New function.
10889 (send_sigstop, linux_send_signal): Use it.
10890 * proc-service.c: Clean up #ifdefs.
10891 (fpregset_info): Delete.
10892 (ps_lgetregs): Update and enable implementation.
10893 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10894 implementations.
10895 * remote-utils.c (struct sym_cache, symbol_cache): New.
10896 (input_interrupt): Print a clearer message.
10897 (async_io_enabled): New variable.
10898 (enable_async_io, disable_async_io): Use it. Update comments.
10899 (look_up_one_symbol): Use the symbol cache.
10900 * thread-db.c (thread_db_look_up_symbols): New function.
10901 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10902
10903 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10904
10905 * configure.in: Test for -rdynamic.
10906 * configure: Regenerated.
10907 * Makefile (INTERNAL_LDFLAGS): New.
10908 (gdbserver, gdbreplay): Use it.
10909
10910 2004-09-02 Andrew Cagney <cagney@gnu.org>
10911
10912 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10913
10914 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10915
10916 * linux-low.c (linux_wait): Clear all_processes list also.
10917
10918 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10919
10920 * linux-low.c: Include <errno.h>. Remove extern declaration of
10921 errno.
10922
10923 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10924
10925 * gdbreplay.c, server.h, utils.c: Update copyright years.
10926
10927 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10928
10929 * server.c (main): Print child status or termination signal from
10930 variable 'signal', not 'sig'.
10931
10932 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10933
10934 * linux-low.c (linux_read_memory): Change return type to
10935 int. Check for and return error from ptrace().
10936 * target.c (read_inferior_memory): Change return type to int. Pass
10937 back return status from the_target->read_memory().
10938 * target.h (struct target_ops): Adapt *read_memory() prototype.
10939 Update comment.
10940 (read_inferior_memory): Adapt prototype.
10941 * server.c (main): Return an error packet if
10942 read_inferior_memory() returns an error.
10943
10944 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10945
10946 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10947 Unify with other clean targets.
10948
10949 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10950
10951 * server.c (handle_v_cont): Call set_desired_inferior.
10952
10953 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10954
10955 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10956
10957 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10958
10959 * linux-low.c (linux_wait): Unblock async I/O.
10960 (linux_resume): Block and enable async I/O.
10961 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10962 * server.h (block_async_io, unblock_async_io): Add prototypes.
10963
10964 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10965
10966 * remote-utils.c (remote_open): Print a status notice after
10967 opening a TCP port.
10968 * server.c (attach_inferior): Print a status notice after
10969 attaching.
10970
10971 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10972
10973 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10974
10975 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10976
10977 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10978 error packet.
10979 * server.c, target.h: Update copyright years.
10980
10981 2004-02-25 Roland McGrath <roland@redhat.com>
10982
10983 * target.h (struct target_ops): New member `read_auxv'.
10984 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10985 * linux-low.c (linux_read_auxv): New function.
10986 (linux_target_ops): Initialize `read_auxv' member to that.
10987
10988 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10989
10990 Committed by Jim Blandy <jimb@redhat.com>.
10991
10992 * linux-s390-low.c (s390_num_regs): Update.
10993 (s390_regmap): Remove control registers. Use __s390x__ predefine
10994 instead of GPR_SIZE to distiguish s390 and s390x targets.
10995
10996 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10997
10998 * linux-low.c: Update copyright year.
10999 (check_removed_breakpoint): Clear pending_is_breakpoint.
11000 (linux_set_resume_request, linux_queue_one_thread)
11001 (resume_status_pending_p): New functions.
11002 (linux_continue_one_thread): Use process->resume.
11003 (linux_resume): Only resume threads if there are no pending events.
11004 * linux-low.h (struct process_info): Add resume request
11005 pointer.
11006
11007 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11008
11009 * regcache.c (new_register_cache): Clear the allocated register
11010 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11011
11012 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11013
11014 * linux-low.c (linux_resume): Take a struct thread_resume *
11015 argument.
11016 (linux_wait): Update call.
11017 (resume_ptr): New static variable.
11018 (linux_continue_one_thread): Renamed from
11019 linux_continue_one_process. Use resume_ptr.
11020 (linux_resume): Use linux_continue_one_thread.
11021 * server.c (handle_v_cont, handle_v_requests): New functions.
11022 (myresume): New function.
11023 (main): Handle 'v' case.
11024 * target.h (struct thread_resume): New type.
11025 (struct target_ops): Change argument of "resume" to struct
11026 thread_resume *.
11027 (myresume): Delete macro.
11028
11029 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11030
11031 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11032 (uninstall): Support DESTDIR.
11033
11034 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11035
11036 * configure.srv: Add xscale*linux copy of arm*linux entry.
11037
11038 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11039
11040 * linux-arm-low.c (arm_reinsert_addr): New function.
11041 (the_low_target): Add arm_reinsert_addr.
11042
11043 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11044
11045 * mem-break.c: Remove whitespace at end of file.
11046
11047 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11048
11049 * configure.in: Check whether we need to prototype strerror.
11050 * server.h: Optionally prototype strerror.
11051 * gdbreplay.c (perror_with_name): Use strerror.
11052 * linux-low.c (linux_attach_lwp): Use strerror.
11053 * utils.c (perror_with_name): Use strerror.
11054 * config.in, configure: Regenerated.
11055
11056 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11057
11058 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11059 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11060
11061 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11062
11063 * Makefile.in (SFILES): Update.
11064 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11065 low-sun3.c: Remove files.
11066
11067 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11068
11069 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11070 (linux_detach_one_process, linux_detach): New functions.
11071 (linux_target_ops): Add linux_detach.
11072 * server.c (main): Handle 'D' packet.
11073 * target.h (struct target_ops): Add "detach" member.
11074 (detach_inferior): Define.
11075
11076 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11077
11078 From Kelley Cook <kelleycook@wideopenwest.com>:
11079 * configure.srv: Accept i[34567]86 variants.
11080
11081 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11082
11083 * linux-low.c (linux_wait_for_event): Correct comment typos.
11084 (linux_resume_one_process): Call check_removed_breakpoint.
11085 (linux_send_signal): New function.
11086 (linux_target_ops): Add linux_send_signal.
11087 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11088 of kill.
11089 * target.h (struct target_ops): Add send_signal.
11090
11091 2003-05-29 Jim Blandy <jimb@redhat.com>
11092
11093 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11094 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11095 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11096 away part of the register's value.
11097
11098 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11099
11100 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11101 (linux_wait_for_event, linux_init_signals): Likewise.
11102
11103 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11104
11105 * configure.in: Check for stdlib.h.
11106 * configure: Regenerated.
11107 * config.in: Regenerated.
11108
11109 2003-01-04 Andreas Schwab <schwab@suse.de>
11110
11111 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11112
11113 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11114
11115 * Makefile.in: Remove obsolete code.
11116
11117 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11118
11119 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11120 defined(PT_FPR0_HI).
11121
11122 2002-11-17 Stuart Hughes <seh@zee2.com>
11123
11124 * linux-arm-low.c (arm_num_regs): Increase.
11125 (arm_regmap): Include status register.
11126
11127 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11128
11129 * linux-low.c (register_addr): Remove incorrect -1 check.
11130
11131 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11132
11133 * linux-low.c (linux_create_inferior): Call setpgid. Return
11134 the new PID.
11135 (unstopped_p, linux_signal_pid): Remove.
11136 (linux_target_ops): Remove linux_signal_pid.
11137 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11138 global instead of target method.
11139 * target.h (struct target_ops): Remove signal_pid. Update comment
11140 for create_inferior.
11141 * server.c (signal_pid): New variable.
11142 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11143 gdbserver. Set the child to be the foreground process group.
11144 (attach_inferior): Set signal_pid.
11145
11146 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11147
11148 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11149
11150 2002-08-20 Jim Blandy <jimb@redhat.com>
11151
11152 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11153 default for this.
11154
11155 2002-08-01 Andrew Cagney <cagney@redhat.com>
11156
11157 * Makefile.in: Make chill references obsolete.
11158
11159 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11160
11161 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11162 * configure: Regenerate.
11163 * config.in: Regenerate.
11164
11165 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11166
11167 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11168 (perror_with_name, remote_close, remote_open, expect, play): Static.
11169
11170 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11171
11172 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11173 byte offsets instead of an array of indexes.
11174 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11175
11176 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11177
11178 * regcache.c: Add comment.
11179
11180 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11181
11182 * thread-db.c: New file.
11183 * proc-service.c: New file.
11184 * acinclude.m4: New file.
11185 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11186 proc-service.o, and thread-db.o.
11187 (linux-low.o): Add USE_THREAD_DB.
11188 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11189 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11190 * aclocal.m4: Regenerated.
11191 * config.in: Regenerated.
11192 * configure: Regenerated.
11193 * configure.in: Check for proc_service.h, sys/procfs.h,
11194 thread_db.h, and linux/elf.h headrs.
11195 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11196 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11197 Check for -lthread_db and thread support.
11198 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11199 PowerPC, and SuperH.
11200 * i387-fp.c: Constify arguments.
11201 * i387-fp.h: Likewise.
11202 * inferiors.c: (struct thread_info): Renamed from
11203 `struct inferior_info'. Remove PID member. Use generic inferior
11204 list header. All uses updated.
11205 (inferiors, signal_pid): Removed.
11206 (all_threads): New variable.
11207 (get_thread): Define.
11208 (add_inferior_to_list): New function.
11209 (for_each_inferior): New function.
11210 (change_inferior_id): New function.
11211 (add_inferior): Removed.
11212 (remove_inferior): New function.
11213 (add_thread): New function.
11214 (free_one_thread): New function.
11215 (remove_thread): New function.
11216 (clear_inferiors): Use for_each_inferior and free_one_thread.
11217 (find_inferior): New function.
11218 (find_inferior_id): New function.
11219 (inferior_target_data): Update argument type.
11220 (set_inferior_target_data): Likewise.
11221 (inferior_regcache_data): Likewise.
11222 (set_inferior_regcache_data): Likewise.
11223 * linux-low.c (linux_bp_reinsert): Remove.
11224 (all_processes, stopping_threads, using_thrads)
11225 (struct pending_signals, debug_threads, pid_of): New.
11226 (inferior_pid): Replace with macro.
11227 (struct inferior_linux_data): Remove.
11228 (get_stop_pc, add_process): New functions.
11229 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11230 Use add_process and add_thread.
11231 (linux_attach_lwp): New function, based on old linux_attach. Use
11232 add_process and add_thread. Set stop_expected for new threads.
11233 (linux_attach): New function.
11234 (linux_kill_one_process): New function.
11235 (linux_kill): Kill all LWPs.
11236 (linux_thread_alive): Use find_inferior_id.
11237 (check_removed_breakpoints, status_pending_p): New functions.
11238 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11239 Update. Use WNOHANG. Wait for cloned processes also. Update process
11240 struct for the found process.
11241 (linux_wait_for_event): New function.
11242 (linux_wait): Use it. Support LWPs.
11243 (send_sigstop, wait_for_sigstop, stop_all_processes)
11244 (linux_resume_one_process, linux_continue_one_process): New functions.
11245 (linux_resume): Support LWPs.
11246 (REGISTER_RAW_SIZE): Remove.
11247 (fetch_register): Use register_size instead. Call supply_register.
11248 (usr_store_inferior_registers): Likewise. Call collect_register.
11249 Fix recursive case.
11250 (regsets_fetch_inferior_registers): Improve error message.
11251 (regsets_store_inferior_registers): Add debugging.
11252 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11253 (unstopped_p, linux_signal_pid): New functions.
11254 (linux_target_ops): Add linux_signal_pid.
11255 (linux_init_signals): New function.
11256 (initialize_low): Call it. Initialize using_threads.
11257 * regcache.c (inferior_regcache_data): Add valid
11258 flag.
11259 (get_regcache): Fetch registers lazily. Add fetch argument
11260 and update all callers.
11261 (regcache_invalidate_one, regcache_invalidate): New
11262 functions.
11263 (new_register_cache): Renamed from create_register_cache.
11264 Return the new regcache.
11265 (free_register_cache): Change argument to a void *.
11266 (registers_to_string, registers_from_string): Call get_regcache
11267 with fetch flag set.
11268 (register_data): Make static. Pass fetch flag to get_regcache.
11269 (supply_register): Call get_regcache with fetch flag clear.
11270 (collect_register): Call get_regcache with fetch flag set.
11271 (collect_register_as_string): New function.
11272 * regcache.h: Update.
11273 * remote-utils.c (putpkt): Flush after debug output and use
11274 stderr.
11275 Handle input interrupts while waiting for an ACK.
11276 (input_interrupt): Use signal_pid method.
11277 (getpkt): Flush after debug output and use stderr.
11278 (outreg): Use collect_register_as_string.
11279 (new_thread_notify, dead_thread_notify): New functions.
11280 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11281 and general_thread.
11282 (look_up_one_symbol): Flush after debug output.
11283 * server.c (step_thread, server_waiting): New variables.
11284 (start_inferior): Don't use signal_pid. Update call to mywait.
11285 (attach_inferior): Update call to mywait.
11286 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11287 (main): Don't fetch/store registers explicitly. Use
11288 set_desired_inferior. Support proposed ``Hs'' packet. Update
11289 calls to mywait.
11290 * server.h: Update.
11291 (struct inferior_list, struct_inferior_list_entry): New.
11292 * target.c (set_desired_inferior): New.
11293 (write_inferior_memory): Constify.
11294 (mywait): New function.
11295 * target.h: Update.
11296 (struct target_ops): New signal_pid method.
11297 (mywait): Removed macro, added prototype.
11298
11299 * linux-low.h (regset_func): Removed.
11300 (regset_fill_func, regset_store_func): New.
11301 (enum regset_type): New.
11302 (struct regset_info): Add type field. Use new operation types.
11303 (struct linux_target_ops): stop_pc renamed to get_pc.
11304 Add decr_pc_after_break and breakpoint_at.
11305 (get_process, get_thread_proess, get_process_thread)
11306 (strut process_info, all_processes, linux_attach_lwp)
11307 (thread_db_init): New.
11308
11309 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11310 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11311 (the_low_target): Add new members.
11312 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11313 (i386_store_fpxregset): Constify.
11314 (target_regsets): Add new kind identifier.
11315 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11316 (i386_set_pc): Add debugging.
11317 (i386_breakpoint_at): New function.
11318 (the_low_target): Add new members.
11319 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11320 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11321 (mips_breakpoint_at): New.
11322 (the_low_target): Add new members.
11323 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11324 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11325 (the_low_target): Add new members.
11326 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11327 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11328 (the_low_target): Add new members.
11329 * linux-x86-64-low.c (target_regsets): Add new kind
11330 identifier.
11331
11332 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11333
11334 From Martin Pool <mbp@samba.org>:
11335 * server.c (gdbserver_usage): New function.
11336 (main): Call it.
11337
11338 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11339
11340 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11341 stop_at -> stop_pc.
11342
11343 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11344
11345 * Makefile.in: Remove obsolete code.
11346
11347 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11348
11349 * linux-low.c (regsets_fetch_inferior_registers),
11350 (regsets_store_inferior_registers): Removed cast to int from
11351 ptrace() calls.
11352 * regcache.h: Added declaration of struct inferior_info.
11353
11354 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11355
11356 * inferiors.c (struct inferior_info): Add regcache_data.
11357 (add_inferior): Call create_register_cache.
11358 (clear_inferiors): Call free_register_cache.
11359 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11360 * regcache.c (struct inferior_regcache_data): New.
11361 (registers): Remove.
11362 (get_regcache): New function.
11363 (create_register_cache, free_register_cache): New functions.
11364 (set_register_cache): Don't initialize the register cache here.
11365 (registers_to_string, registers_from_string, register_data): Call
11366 get_regcache.
11367 * regcache.h: Add prototypes.
11368 * server.h: Likewise.
11369
11370 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11371
11372 * mem-break.c: New file.
11373 * mem-break.h: New file.
11374 * Makefile.in: Add mem-break.o rule; update server.h
11375 dependencies.
11376 * inferiors.c (struct inferior_info): Add target_data
11377 member.
11378 (clear_inferiors): Free target_data member if set.
11379 (inferior_target_data, set_inferior_target_data): New functions.
11380 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11381 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11382 * linux-low.c (linux_bp_reinsert): New variable.
11383 (struct inferior_linux_data): New.
11384 (linux_create_inferior): Use set_inferior_target_data.
11385 (linux_attach): Likewise. Call add_inferior.
11386 (linux_wait_for_one_inferior): New function.
11387 (linux_wait): Call it.
11388 (linux_write_memory): Add const.
11389 (initialize_low): Call set_breakpoint_data.
11390 * linux-low.h (struct linux_target_ops): Add breakpoint
11391 handling members.
11392 * server.c (attach_inferior): Remove extra add_inferior
11393 call.
11394 * server.h: Include mem-break.h. Update inferior.c
11395 prototypes.
11396 * target.c (read_inferior_memory)
11397 (write_inferior_memory): New functions.
11398 * target.h (read_inferior_memory)
11399 (write_inferior_memory): Change macros to prototypes.
11400 (struct target_ops): Update comments. Add const to write_memory
11401 definition.
11402
11403 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11404
11405 * linux-low.c (usr_store_inferior_registers): Support
11406 registers which are allowed to fail to store.
11407 * linux-low.h (linux_target_ops): Likewise.
11408 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11409 (ppc_cannot_store_register): FPSCR may not be storable.
11410
11411 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11412
11413 * server.h: Include <string.h> if HAVE_STRING_H.
11414 * ChangeLog: Correct paths in last ChangeLog entry.
11415
11416 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11417
11418 * linux-low.h: Remove obsolete prototypes.
11419 (struct linux_target_ops): New.
11420 (extern the_low_target): New.
11421 * linux-low.c (num_regs, regmap): Remove declarations.
11422 (register_addr): Use the_low_target explicitly.
11423 (fetch_register): Likewise.
11424 (usr_fetch_inferior_registers): Likewise.
11425 (usr_store_inferior_registers): Likewise.
11426 * linux-arm-low.c (num_regs): Remove.
11427 (arm_num_regs): Define.
11428 (arm_regmap): Renamed from regmap, made static.
11429 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11430 made static.
11431 (arm_cannot_store_register): Renamed from cannot_store_register,
11432 made static.
11433 (the_low_target): New.
11434 * linux-i386-low.c (num_regs): Remove.
11435 (i386_num_regs): Define.
11436 (i386_regmap): Renamed from regmap, made static.
11437 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11438 made static.
11439 (i386_cannot_store_register): Renamed from cannot_store_register,
11440 made static.
11441 (the_low_target): New.
11442 * linux-ia64-low.c (num_regs): Remove.
11443 (ia64_num_regs): Define.
11444 (ia64_regmap): Renamed from regmap, made static.
11445 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11446 made static.
11447 (ia64_cannot_store_register): Renamed from cannot_store_register,
11448 made static.
11449 (the_low_target): New.
11450 * linux-m68k-low.c (num_regs): Remove.
11451 (m68k_num_regs): Define.
11452 (m68k_regmap): Renamed from regmap, made static.
11453 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11454 made static.
11455 (m68k_cannot_store_register): Renamed from cannot_store_register,
11456 made static.
11457 (the_low_target): New.
11458 * linux-mips-low.c (num_regs): Remove.
11459 (mips_num_regs): Define.
11460 (mips_regmap): Renamed from regmap, made static.
11461 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11462 made static.
11463 (mips_cannot_store_register): Renamed from cannot_store_register,
11464 made static.
11465 (the_low_target): New.
11466 * linux-ppc-low.c (num_regs): Remove.
11467 (ppc_num_regs): Define.
11468 (ppc_regmap): Renamed from regmap, made static.
11469 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11470 made static.
11471 (ppc_cannot_store_register): Renamed from cannot_store_register,
11472 made static.
11473 (the_low_target): New.
11474 * linux-s390-low.c (num_regs): Remove.
11475 (s390_num_regs): Define.
11476 (s390_regmap): Renamed from regmap, made static.
11477 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11478 made static.
11479 (s390_cannot_store_register): Renamed from cannot_store_register,
11480 made static.
11481 (the_low_target): New.
11482 * linux-sh-low.c (num_regs): Remove.
11483 (sh_num_regs): Define.
11484 (sh_regmap): Renamed from regmap, made static.
11485 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11486 made static.
11487 (sh_cannot_store_register): Renamed from cannot_store_register,
11488 made static.
11489 (the_low_target): New.
11490 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11491 (the_low_target): New.
11492
11493 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11494
11495 * Makefile.in: Add stamp-h target.
11496 * configure.in: Create stamp-h.
11497 * configure: Regenerated.
11498
11499 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11500
11501 * inferiors.c: New file.
11502 * target.c: New file.
11503 * target.h: New file.
11504 * Makefile.in: Add target.o and inferiors.o. Update
11505 dependencies.
11506 * linux-low.c (inferior_pid): New static variable,
11507 moved from server.c.
11508 (linux_create_inferior): Renamed from create_inferior.
11509 Call add_inferior. Return 0 on success instead of a PID.
11510 (linux_attach): Renamed from myattach.
11511 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11512 (linux_thread_alive): Renamed from mythread_alive.
11513 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11514 child dies.
11515 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11516 (regsets_store_inferior_registers): Correct error message.
11517 Add missing ``return 0''.
11518 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11519 (linux_store_registers): Renamed from store_inferior_registers.
11520 (linux_read_memory): Renamed from read_inferior_memory.
11521 (linux_write_memory): Renamed from write_inferior_memory.
11522 (linux_target_ops): New structure.
11523 (initialize_low): Call set_target_ops ().
11524 * remote-utils.c (unhexify): New function.
11525 (hexify): New function.
11526 (input_interrupt): Send signals to ``signal_pid''.
11527 * server.c (inferior_pid): Remove.
11528 (start_inferior): Update create_inferior call.
11529 (attach_inferior): Call add_inferior.
11530 (handle_query): New function.
11531 (main): Call handle_query for `q' packets.
11532 * server.h: Include "target.h". Remove obsolete prototypes.
11533 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11534
11535 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11536
11537 * Makefile.in: Add WARN_CFLAGS. Update configury
11538 dependencies.
11539 * configure.in: Check for <string.h>
11540 * configure: Regenerate.
11541 * config.in: Regenerate.
11542 * gdbreplay.c: Include needed system headers.
11543 (remote_open): Remove strchr prototype.
11544 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11545 * regcache.c (supply_register): Change buf argument to const void *.
11546 (supply_register_by_name): Likewise.
11547 (collect_register): Change buf argument to void *.
11548 (collect_register_by_name): Likewise.
11549 * regcache.h: Add missing prototypes.
11550 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11551 * server.c (handle_query): New function.
11552 (attached): New static variable, moved out of main.
11553 (main): Quiet longjmp clobber warnings.
11554 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11555 * utils.c (error): Remove NORETURN.
11556 (fatal): Likewise.
This page took 0.334593 seconds and 4 git commands to generate.