1 2015-08-21 Pedro Alves <palves@redhat.com>
3 * linux-low.c (wait_for_sigstop): Always switch to no thread
4 selected if the previously current thread dies.
5 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6 process instead of the current thread's.
7 * remote-utils.c (input_interrupt): Don't check if there's no
9 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10 current thread to the general thread fails, error out.
11 (handle_qxfer_auxv, handle_qxfer_libraries)
12 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
13 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
14 (handle_query): Check if there's a thread selected instead of
15 checking whether there's any thread in the thread list.
16 (handle_qxfer_threads, handle_qxfer_btrace)
17 (handle_qxfer_btrace_conf): Don't error out early if there's no
18 thread in the thread list.
19 (handle_v_cont, myresume): Don't set the current thread to the
21 (process_serial_event) <Hg handling>: Also set thread_id if the
22 previous general thread is still alive.
23 (process_serial_event) <g/G handling>: If setting the current
24 thread to the general thread fails, error out.
25 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
26 thread's lwp instead of the current thread's.
27 * target.c (set_desired_thread): If the desired thread was not
28 found, leave the current thread pointing to NULL. Return an int
29 (boolean) indicating success.
30 * target.h (set_desired_thread): Change return type to int.
32 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
34 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
35 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
37 (ps_get_thread_area): New function.
39 2015-08-19 Gary Benson <gbenson@redhat.com>
41 * hostio.c (handle_pread): Do not attempt to read more data
42 than hostio_reply_with_data can fit in a packet.
44 2015-08-18 Joel Brobecker <brobecker@adacore.com>
46 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
48 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
50 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
52 2015-08-06 Pedro Alves <palves@redhat.com>
54 * tracepoint.c (expr_eval_result): Now an int.
56 2015-08-06 Pedro Alves <palves@redhat.com>
58 * gdbthread.h (struct regcache): Forward declare.
59 (struct thread_info) <regcache_data>: Now a struct regcache
61 * inferiors.c (inferior_regcache_data)
62 (set_inferior_regcache_data): Now work with struct regcache
64 * inferiors.h (struct regcache): Forward declare.
65 (inferior_regcache_data, set_inferior_regcache_data): Now work
66 with struct regcache pointers.
67 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
68 (free_register_cache_thread): Remove struct regcache pointer
71 2015-08-06 Pedro Alves <palves@redhat.com>
73 * server.c (captured_main): On error, print the exception message
74 to stderr, and if run_once is set, throw a quit.
76 2015-08-06 Pedro Alves <palves@redhat.com>
78 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
81 2015-08-06 Pedro Alves <palves@redhat.com>
83 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
84 reading beyond the passed in buffer length.
86 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
88 * tracepoint.c (symbol_list) <required>: Remove.
90 2015-08-06 Pedro Alves <palves@redhat.com>
92 * linux-low.c (handle_extended_wait): Set the fork child's suspend
93 count if stopping and suspending threads.
94 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
95 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
96 (linux_detach): Complete an ongoing step-over.
97 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
99 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
100 (linux_wait_1): If passing a signal to the inferior after
101 finishing a step-over, unsuspend and re-resume all lwps. If we
102 see a single-step event but the thread should be continuing, don't
103 pass the trap to gdb.
104 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
105 internal_error instead of gdb_assert.
106 (enqueue_pending_signal): New function.
107 (check_ptrace_stopped_lwp_gone): Add debug output.
108 (start_step_over): Use internal_error instead of gdb_assert.
109 (complete_ongoing_step_over): New function.
110 (linux_resume_one_thread): Don't resume a suspended thread.
111 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
114 2015-08-06 Pedro Alves <palves@redhat.com>
116 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
117 (linux_thread_alive): Use lwp_is_marked_dead.
118 (extended_event_reported): Delete.
119 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
120 instead of extended_event_reported.
121 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
123 (lwp_is_marked_dead): New function.
124 (lwp_running): Use lwp_is_marked_dead.
125 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
128 2015-08-06 Pedro Alves <palves@redhat.com>
130 * linux-low.c (linux_wait_1): Move fork event output out of the
131 !report_to_gdb check. Pass event_child->waitstatus to
132 target_waitstatus_to_string instead of ourstatus.
134 2015-08-04 Yao Qi <yao.qi@linaro.org>
136 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
137 if current_thread is 32 bit.
139 2015-08-04 Yao Qi <yao.qi@linaro.org>
141 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
142 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
143 * server.c (extended_protocol): Remove "static".
144 * server.h (extended_protocol): Declare it.
146 2015-08-04 Yao Qi <yao.qi@linaro.org>
148 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
149 both aarch64 and aarch32.
150 (aarch64_set_pc): Likewise.
152 2015-08-04 Yao Qi <yao.qi@linaro.org>
154 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
155 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
156 arm-with-neon.xml to srv_xmlfiles.
157 * linux-aarch64-low.c: Include linux-aarch32-low.h.
158 (is_64bit_tdesc): New function.
159 (aarch64_linux_read_description): New function.
160 (aarch64_arch_setup): Call aarch64_linux_read_description.
161 (regs_info): Rename to regs_info_aarch64.
162 (aarch64_regs_info): Return right regs_info.
163 (initialize_low_arch): Call initialize_low_arch_aarch32.
165 2015-08-04 Yao Qi <yao.qi@linaro.org>
167 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
168 * linux-aarch32-low.c: New file.
169 * linux-aarch32-low.h: New file.
170 * linux-arm-low.c (arm_fill_gregset): Move it to
172 (arm_store_gregset): Likewise.
173 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
174 (arm_store_vfpregset): Call arm_store_vfpregset_num.
175 (arm_arch_setup): Check if PTRACE_GETREGSET works.
176 (regs_info): Rename to regs_info_arm.
177 (arm_regs_info): Return regs_info_aarch32 if
178 have_ptrace_getregset is 1 and target description is
179 arm_with_neon or arm_with_vfpv3.
180 (initialize_low_arch): Don't call init_registers_arm_with_neon.
181 Call initialize_low_arch_aarch32 instead.
183 2015-08-04 Yao Qi <yao.qi@linaro.org>
185 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
186 * linux-low.c: ... here.
187 * linux-low.h (have_ptrace_getregset): Declare it.
189 2015-08-04 Pedro Alves <palves@redhat.com>
191 * thread-db.c (struct thread_db): Use new typedefs.
192 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
194 (disable_thread_event_reporting): Cast result of dlsym to
195 destination function pointer type.
196 (thread_db_mourn): Use td_ta_delete_ftype.
198 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
200 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
202 (CDX_BREAKPOINT): Define for R2.
203 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
204 (the_low_target): Add comments.
206 2015-07-30 Yao Qi <yao.qi@linaro.org>
208 * linux-arm-low.c (arm_hwcap): Remove it.
209 (arm_read_description): New local variable arm_hwcap. Don't
210 set arm_hwcap to zero.
212 2015-07-30 Yao Qi <yao.qi@linaro.org>
214 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
215 Use regcache->tdesc instead.
216 (arm_store_wmmxregset): Likewise.
217 (arm_fill_vfpregset): Likewise.
218 (arm_store_vfpregset): Likewise.
220 2015-07-30 Yao Qi <yao.qi@linaro.org>
222 * linux-arm-low.c: Include arch/arm.h.
223 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
224 (arm_store_gregset): Likewise.
226 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
228 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
229 ptrace's 4th parameter.
231 2015-07-27 Yao Qi <yao.qi@linaro.org>
233 * configure.srv (case aarch64*-*-linux*): Don't set
236 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
238 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
240 * linux-arm-low.c: Likewise.
241 * linux-cris-low.c: Likewise.
242 * linux-crisv32-low.c: Likewise.
243 * linux-low.c: Likewise.
244 * linux-m68k-low.c: Likewise.
245 * linux-mips-low.c: Likewise.
246 * linux-nios2-low.c: Likewise.
247 * linux-s390-low.c: Likewise.
248 * linux-sparc-low.c: Likewise.
249 * linux-tic6x-low.c: Likewise.
250 * linux-tile-low.c: Likewise.
251 * linux-x86-low.c: Likewise.
253 2015-07-24 Pedro Alves <palves@redhat.com>
255 * config.in: Regenerate.
256 * configure: Regenerate.
258 2015-07-24 Pedro Alves <palves@redhat.com>
260 * acinclude.m4: Include ../ptrace.m4.
261 * configure.ac: Call GDB_AC_PTRACE.
262 * config.in, configure: Regenerate.
264 2015-07-24 Yao Qi <yao.qi@linaro.org>
266 * linux-low.c (linux_create_inferior): Remove setting to
267 proc->priv->new_inferior.
268 (linux_attach): Likewise.
269 (linux_low_filter_event): Likewise.
270 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
272 2015-07-24 Yao Qi <yao.qi@linaro.org>
274 * linux-low.c (linux_arch_setup): New function.
275 (linux_low_filter_event): If proc->tdesc is NULL and
276 proc->attached is true, call the_low_target.arch_setup.
277 Otherwise, keep status pending, and return.
278 (linux_resume_one_lwp_throw): Don't call get_pc if
279 thread->while_stepping isn't NULL. Don't call
280 get_thread_regcache if proc->tdesc is NULL.
281 (need_step_over_p): Return 0 if proc->tdesc is NULL.
282 (linux_target_ops): Install arch_setup.
283 * server.c (start_inferior): Call the_target->arch_setup.
284 * target.h (struct target_ops) <arch_setup>: New field.
285 (target_arch_setup): New marco.
286 * lynx-low.c (lynx_target_ops): Update.
287 * nto-low.c (nto_target_ops): Update.
288 * spu-low.c (spu_target_ops): Update.
289 * win32-low.c (win32_target_ops): Update.
291 2015-07-24 Yao Qi <yao.qi@linaro.org>
293 * linux-low.c (linux_add_process): Don't set
294 proc->priv->new_inferior.
295 (linux_create_inferior): Set proc->priv->new_inferior to 1.
296 (linux_attach): Likewise.
298 2015-07-24 Yao Qi <yao.qi@linaro.org>
300 * server.c (start_inferior): Code refactor.
302 2015-07-24 Yao Qi <yao.qi@linaro.org>
304 * server.c (process_serial_event): Set general_thread.
306 2015-07-21 Yao Qi <yao.qi@linaro.org>
308 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
309 aarch64_linux_get_debug_reg_capacity.
311 2015-07-17 Yao Qi <yao.qi@linaro.org>
313 * Makefile.in (aarch64-linux-hw-point.o): New rule.
314 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
315 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
316 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
317 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
318 (AARCH64_HWP_ALIGNMENT): Likewise.
319 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
320 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
321 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
322 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
323 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
324 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
325 (struct aarch64_debug_reg_state): Likewise.
326 (struct arch_lwp_info): Likewise.
327 (aarch64_align_watchpoint): Likewise.
328 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
329 (aarch64_watchpoint_length): Likewise.
330 (aarch64_point_encode_ctrl_reg): Likewise
331 (aarch64_point_is_aligned): Likewise.
332 (aarch64_align_watchpoint): Likewise.
333 (aarch64_linux_set_debug_regs):
334 (aarch64_dr_state_insert_one_point): Likewise.
335 (aarch64_dr_state_remove_one_point): Likewise.
336 (aarch64_handle_breakpoint): Likewise.
337 (aarch64_handle_aligned_watchpoint): Likewise.
338 (aarch64_handle_unaligned_watchpoint): Likewise.
339 (aarch64_handle_watchpoint): Likewise.
341 2015-07-17 Yao Qi <yao.qi@linaro.org>
343 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
344 and don't aarch64_get_debug_reg_state. All callers update.
345 (aarch64_handle_aligned_watchpoint): Likewise.
346 (aarch64_handle_unaligned_watchpoint): Likewise.
347 (aarch64_handle_watchpoint): Likewise.
348 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
349 (aarch64_remove_point): Likewise.
351 2015-07-17 Yao Qi <yao.qi@linaro.org>
353 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
355 (aarch64_handle_unaligned_watchpoint): Likewise.
357 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
359 Revert the previous 3 commits:
360 Move gdb_regex* to common/
361 Move linux_find_memory_regions_full & co.
362 gdbserver build-id attribute generator
364 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
365 Jan Kratochvil <jan.kratochvil@redhat.com>
367 gdbserver build-id attribute generator.
368 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
369 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
370 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
372 (get_dynamic): Use find_pdhr to traverse program headers.
373 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
374 (compare_mapping_entry_range, struct find_memory_region_callback_data)
375 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
376 (get_hex_build_id): New.
377 (linux_qxfer_libraries_svr4): Add optional build-id attribute
378 to reply XML document.
380 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
381 Jan Kratochvil <jan.kratochvil@redhat.com>
383 * target.c: Include target/target-utils.h and fcntl.h.
384 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
385 (target_fileio_read_stralloc): New functions.
387 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
389 * Makefile.in (OBS): Add gdb_regex.o.
391 * config.in: Rebuilt.
392 * configure: Rebuilt.
394 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
395 Jan Kratochvil <jan.kratochvil@redhat.com>
397 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
398 * Makefile.in (OBS): Add target-utils.o.
399 (linux-maps.o, target-utils.o): New.
400 * configure.srv (srv_linux_obj): Add linux-maps.o.
402 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
404 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
406 (the_low_target): Install it.
408 2015-07-14 Pedro Alves <palves@redhat.com>
410 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
411 Instead, ignore ECHILD, and throw an error for other errnos.
413 2015-07-10 Pedro Alves <palves@redhat.com>
415 * event-loop.c (struct callback_event) <data>: Change type to
416 gdb_client_data instance instead of gdb_client_data pointer.
417 (append_callback_event): Adjust.
419 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
421 * linux-aarch64-low.c: Add comments for each linux_target_ops
422 method. Remove comments already covered in target_ops and
423 linux_target_ops definitions.
424 (the_low_target): Add comments for each unimplemented method.
426 2015-07-09 Yao Qi <yao.qi@linaro.org>
428 * linux-aarch64-low.c (aarch64_regmap): Remove.
429 (aarch64_usrregs_info): Remove.
430 (regs_info): Set field usrregs to NULL.
432 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
434 * linux-low.c: Include "rsp-low.h"
435 (linux_low_encode_pt_config, linux_low_encode_raw): New.
436 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
437 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
438 (handle_btrace_enable_pt): New.
439 (handle_btrace_general_set): Support "pt".
440 (handle_btrace_conf_general_set): Support "pt:size".
442 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
444 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
447 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
449 * linux-aarch64-low.c: Remove comment about endianness.
450 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
451 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
454 2015-06-24 Gary Benson <gbenson@redhat.com>
456 * linux-i386-ipa.c (stdint.h): Do not include.
457 * lynx-i386-low.c (stdint.h): Likewise.
458 * lynx-ppc-low.c (stdint.h): Likewise.
459 * mem-break.c (stdint.h): Likewise.
460 * thread-db.c (stdint.h): Likewise.
461 * tracepoint.c (stdint.h): Likewise.
462 * win32-low.c (stdint.h): Likewise.
464 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
466 * server.c (write_qxfer_response): Update call to
467 remote_escape_output.
469 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
470 Jan Kratochvil <jan.kratochvil@redhat.com>
472 Merge multiple hex conversions.
473 * gdbreplay.c (tohex): Rename to 'fromhex'.
474 (logchar): Use fromhex.
476 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
478 * server.c (handle_qxfer_libraries): Set `version' attribute for
481 2015-06-10 Gary Benson <gbenson@redhat.com>
483 * target.h (struct target_ops) <multifs_open>: New field.
484 <multifs_unlink>: Likewise.
485 <multifs_readlink>: Likewise.
486 * linux-low.c (nat/linux-namespaces.h): New include.
487 (linux_target_ops): Initialize the_target->multifs_open,
488 the_target->multifs_unlink and the_target->multifs_readlink.
489 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
490 * hostio.c (hostio_fs_pid): New static variable.
491 (hostio_handle_new_gdb_connection): New function.
492 (handle_setfs): Likewise.
493 (handle_open): Use the_target->multifs_open as appropriate.
494 (handle_unlink): Use the_target->multifs_unlink as appropriate.
495 (handle_readlink): Use the_target->multifs_readlink as
497 (handle_vFile): Handle vFile:setfs packets.
498 * server.c (handle_query): Call hostio_handle_new_gdb_connection
499 after target_handle_new_gdb_connection.
501 2015-06-10 Gary Benson <gbenson@redhat.com>
503 * configure.ac (AC_CHECK_FUNCS): Add setns.
504 * config.in: Regenerate.
505 * configure: Likewise.
506 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
507 (linux-namespaces.o): New rule.
508 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
510 2015-06-09 Gary Benson <gbenson@redhat.com>
512 * hostio.c (handle_open): Process mode argument with
515 2015-06-01 Yao Qi <yao.qi@linaro.org>
517 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
518 * linux-x86-low.c: Likewise.
520 2015-05-28 Don Breazeal <donb@codesourcery.com>
522 * linux-low.c (handle_extended_wait): Initialize
523 thread_info.last_resume_kind for new fork children.
525 2015-05-15 Pedro Alves <palves@redhat.com>
527 * target.h (target_handle_new_gdb_connection): Rewrite using if
530 2015-05-14 Joel Brobecker <brobecker@adacore.com>
532 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
533 * configure, config.in: Regenerate.
534 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
537 2015-05-12 Don Breazeal <donb@codesourcery.com>
539 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
540 PTRACE_EVENT_VFORK_DONE.
541 (linux_low_ptrace_options, extended_event_reported): Add vfork
543 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
544 and "vforkdone" for RSP 'T' Stop Reply Packet.
545 * server.h (report_vfork_events): Declare
548 2015-05-12 Don Breazeal <donb@codesourcery.com>
550 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
551 (the_low_target) <new_fork>: Initialize new member.
552 * linux-arm-low.c (arm_new_fork): New function.
553 (the_low_target) <new_fork>: Initialize new member.
554 * linux-low.c (handle_extended_wait): Call new target function
556 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
557 * linux-mips-low.c (mips_add_watchpoint): New function
558 extracted from mips_insert_point.
559 (the_low_target) <new_fork>: Initialize new member.
560 (mips_linux_new_fork): New function.
561 (mips_insert_point): Call mips_add_watchpoint.
562 * linux-x86-low.c (x86_linux_new_fork): New function.
563 (the_low_target) <new_fork>: Initialize new member.
565 2015-05-12 Don Breazeal <donb@codesourcery.com>
567 * linux-low.c (handle_extended_wait): Implement return value,
568 rename argument 'event_child' to 'event_lwp', handle
569 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
570 (linux_low_ptrace_options): New function.
571 (linux_low_filter_event): Call linux_low_ptrace_options,
572 use different argument fo linux_enable_event_reporting,
573 use return value from handle_extended_wait.
574 (extended_event_reported): New function.
575 (linux_wait_1): Call extended_event_reported and set
576 status to report fork events.
577 (linux_write_memory): Add pid to debug message.
578 (reset_lwp_ptrace_options_callback): New function.
579 (linux_handle_new_gdb_connection): New function.
580 (linux_target_ops): Initialize new structure member.
581 * linux-low.h (struct lwp_info) <waitstatus>: New member.
582 * lynx-low.c: Initialize new structure member.
583 * remote-utils.c (prepare_resume_reply): Implement stop reason
584 "fork" for "T" stop message.
585 * server.c (handle_query): Call handle_new_gdb_connection.
586 * server.h (report_fork_events): Declare global flag.
587 * target.h (struct target_ops) <handle_new_gdb_connection>:
589 (target_handle_new_gdb_connection): New macro.
590 * win32-low.c: Initialize new structure member.
592 2015-05-12 Don Breazeal <donb@codesourcery.com>
594 * mem-break.c (APPEND_TO_LIST): Define macro.
595 (clone_agent_expr): New function.
596 (clone_one_breakpoint): New function.
597 (clone_all_breakpoints): New function.
598 * mem-break.h: Declare new functions.
600 2015-05-12 Don Breazeal <donb@codesourcery.com>
602 * linux-low.c (linux_supports_fork_events): New function.
603 (linux_supports_vfork_events): New function.
604 (linux_target_ops): Initialize new structure members.
605 (initialize_low): Call linux_check_ptrace_features.
606 * lynx-low.c (lynx_target_ops): Initialize new structure
608 * server.c (report_fork_events, report_vfork_events):
610 (handle_query): Add new features to qSupported packet and
612 (captured_main): Initialize new global variables.
613 * target.h (struct target_ops) <supports_fork_events>:
615 <supports_vfork_events>: New member.
616 (target_supports_fork_events): New macro.
617 (target_supports_vfork_events): New macro.
618 * win32-low.c (win32_target_ops): Initialize new structure
621 2015-05-12 Gary Benson <gbenson@redhat.com>
623 * server.c (handle_qxfer_exec_file): Use current process
626 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
628 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
629 Remove HAVE_PTRACE_GETREGS conditionals.
630 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
631 instead of PTRACE_GETREGS and PTRACE_SETREGS.
633 2015-05-08 Yao Qi <yao.qi@linaro.org>
635 * linux-low.c (linux_supports_conditional_breakpoints): New
637 (linux_target_ops): Install new target method.
638 * lynx-low.c (lynx_target_ops): Install NULL hook for
639 supports_conditional_breakpoints.
640 * nto-low.c (nto_target_ops): Likewise.
641 * spu-low.c (spu_target_ops): Likewise.
642 * win32-low.c (win32_target_ops): Likewise.
643 * server.c (handle_query): Check
644 target_supports_conditional_breakpoints.
645 * target.h (struct target_ops) <supports_conditional_breakpoints>:
647 (target_supports_conditional_breakpoints): New macro.
649 2015-05-06 Pedro Alves <palves@redhat.com>
652 * server.c (start_inferior): If the process exits, mourn it.
654 2015-04-21 Gary Benson <gbenson@redhat.com>
656 * hostio.c (fileio_open_flags_to_host): Factored out to
657 fileio_to_host_openflags in common/fileio.c. Single use
660 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
662 * linux-xtensa-low.c (xtensa_fill_gregset)
663 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
666 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
668 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
669 (regs_info): Replace usrregs pointer with NULL.
671 2015-04-17 Gary Benson <gbenson@redhat.com>
673 * target.h (struct target_ops) <pid_to_exec_file>: New field.
674 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
675 * server.c (handle_qxfer_exec_file): New function.
676 (qxfer_packets): Add exec-file entry.
677 (handle_query): Report qXfer:exec-file:read as supported packet.
679 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
681 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
683 2015-04-09 Gary Benson <gbenson@redhat.com>
685 * hostio-errno.c (errno_to_fileio_error): Remove function.
686 Update caller to use remote_fileio_to_fio_error.
688 2015-04-09 Yao Qi <yao.qi@linaro.org>
690 * linux-low.c (linux_insert_point): Call
691 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
692 (linux_remove_point): Call remove_memory_breakpoint if type is
694 * linux-x86-low.c (x86_insert_point): Don't call
695 insert_memory_breakpoint.
696 (x86_remove_point): Don't call remove_memory_breakpoint.
698 2015-04-01 Pedro Alves <palves@redhat.com>
699 Cleber Rosa <crosa@redhat.com>
701 * server.c (gdbserver_usage): Reorganize and extend the usage
704 2015-03-24 Pedro Alves <palves@redhat.com>
706 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
707 output. Also dump TRAP_TRACE.
708 (linux_low_filter_event): In debug output, distinguish a
709 resume_stop SIGSTOP from a delayed SIGSTOP.
711 2015-03-24 Gary Benson <gbenson@redhat.com>
713 * linux-x86-low.c (x86_linux_new_thread): Moved to
715 (x86_linux_prepare_to_resume): Likewise.
717 2015-03-24 Gary Benson <gbenson@redhat.com>
719 * Makefile.in (x86-linux-dregs.o): New rule.
720 * configure.srv: Add x86-linux-dregs.o to relevant targets.
721 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
722 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
723 (x86_linux_dr_get): Likewise.
724 (x86_linux_dr_set): Likewise.
725 (update_debug_registers_callback): Likewise.
726 (x86_linux_dr_set_addr): Likewise.
727 (x86_linux_dr_get_addr): Likewise.
728 (x86_linux_dr_set_control): Likewise.
729 (x86_linux_dr_get_control): Likewise.
730 (x86_linux_dr_get_status): Likewise.
731 (x86_linux_update_debug_registers): Likewise.
733 2015-03-24 Gary Benson <gbenson@redhat.com>
735 * linux-x86-low.c (x86_linux_update_debug_registers):
736 New function, factored out from...
737 (x86_linux_prepare_to_resume): ...this.
739 2015-03-24 Gary Benson <gbenson@redhat.com>
741 * linux-x86-low.c (x86_linux_dr_get): Update comments.
742 (x86_linux_dr_set): Likewise.
743 (update_debug_registers_callback): Likewise.
744 (x86_linux_dr_set_addr): Likewise.
745 (x86_linux_dr_get_addr): Likewise.
746 (x86_linux_dr_set_control): Likewise.
747 (x86_linux_dr_get_control): Likewise.
748 (x86_linux_dr_get_status): Likewise.
749 (x86_linux_prepare_to_resume): Likewise.
751 2015-03-24 Gary Benson <gbenson@redhat.com>
753 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
754 Use perror_with_name. Pass string through gettext.
755 (x86_linux_dr_set): Likewise.
757 2015-03-24 Gary Benson <gbenson@redhat.com>
759 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
760 (x86_linux_dr_set_addr): ...this.
761 (x86_dr_low_get_addr): Rename to...
762 (x86_linux_dr_get_addr): ...this.
763 (x86_dr_low_set_control): Rename to...
764 (x86_linux_dr_set_control): ...this.
765 (x86_dr_low_get_control): Rename to...
766 (x86_linux_dr_get_control): ...this.
767 (x86_dr_low_get_status): Rename to...
768 (x86_linux_dr_get_status): ...this.
769 (x86_dr_low): Update with new function names.
771 2015-03-24 Gary Benson <gbenson@redhat.com>
773 * Makefile.in (x86-linux.o): New rule.
774 * configure.srv: Add x86-linux.o to relevant targets.
775 * linux-low.c (lwp_set_arch_private_info): New function.
776 (lwp_arch_private_info): Likewise.
777 * linux-x86-low.c: Include nat/x86-linux.h.
778 (arch_lwp_info): Removed structure.
779 (update_debug_registers_callback):
780 Use lwp_set_debug_registers_changed.
781 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
782 and lwp_set_debug_registers_changed.
783 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
785 2015-03-24 Gary Benson <gbenson@redhat.com>
787 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
788 * linux-arm-low.c (arm_new_thread): Likewise.
789 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
790 * linux-mips-low.c (mips_linux_new_thread): Likewise.
791 * linux-x86-low.c (x86_linux_new_thread): Likewise.
792 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
794 2015-03-24 Gary Benson <gbenson@redhat.com>
796 * linux-low.c (ptid_of_lwp): New function.
797 (lwp_is_stopped): Likewise.
798 (lwp_stop_reason): Likewise.
799 * linux-x86-low.c (update_debug_registers_callback):
801 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
804 2015-03-24 Gary Benson <gbenson@redhat.com>
806 * linux-low.h (linux_stop_lwp): Remove declaration.
808 2015-03-24 Gary Benson <gbenson@redhat.com>
810 * linux-low.h: Include nat/linux-nat.h.
811 * linux-low.c (iterate_over_lwps_args): New structure.
812 (iterate_over_lwps_filter): New function.
813 (iterate_over_lwps): Likewise.
814 * linux-x86-low.c (update_debug_registers_callback):
815 Update signature to what iterate_over_lwps expects.
816 Remove PID check that iterate_over_lwps now performs.
817 (x86_dr_low_set_addr): Use iterate_over_lwps.
818 (x86_dr_low_set_control): Likewise.
820 2015-03-24 Gary Benson <gbenson@redhat.com>
822 * linux-x86-low.c (x86_debug_reg_state): New function.
823 (x86_linux_prepare_to_resume): Use the above.
825 2015-03-24 Gary Benson <gbenson@redhat.com>
827 * linux-low.c (current_lwp_ptid): New function.
828 * linux-x86-low.c: Include nat/linux-nat.h.
829 (x86_dr_low_get_addr): Use current_lwp_ptid.
830 (x86_dr_low_get_control): Likewise.
831 (x86_dr_low_get_status): Likewise.
833 2015-03-20 Pedro Alves <palves@redhat.com>
835 * tracepoint.c (cmd_qtstatus): Make "str" const.
837 2015-03-20 Pedro Alves <palves@redhat.com>
839 * server.c (handle_general_set): Make "req_str" const.
841 2015-03-19 Pedro Alves <palves@redhat.com>
843 * linux-low.c (linux_resume_one_lwp): Rename to ...
844 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
845 instead call perror_with_name.
846 (check_ptrace_stopped_lwp_gone): New function.
847 (linux_resume_one_lwp): Reimplement as wrapper around
848 linux_resume_one_lwp_throw that swallows errors if the LWP is
851 2015-03-19 Pedro Alves <palves@redhat.com>
853 * linux-low.c (count_events_callback, select_event_lwp_callback):
854 No longer check whether the thread has resume_stop as last resume
857 2015-03-19 Pedro Alves <palves@redhat.com>
859 * linux-low.c (count_events_callback, select_event_lwp_callback):
860 Use the lwp's status_pending_p field, not the thread's.
862 2015-03-19 Pedro Alves <palves@redhat.com>
864 * linux-low.c (select_event_lwp_callback): Update comments to
865 no longer mention SIGTRAP.
867 2015-03-18 Gary Benson <gbenson@redhat.com>
869 * server.c (handle_query): Do not report vFile:fstat as supported.
871 2015-03-11 Gary Benson <gbenson@redhat.com>
873 * hostio.c (sys/types.h): New include.
874 (sys/stat.h): Likewise.
875 (common-remote-fileio.h): Likewise.
876 (handle_fstat): New function.
877 (handle_vFile): Handle vFile:fstat packets.
879 2015-03-11 Gary Benson <gbenson@redhat.com>
881 * configure.ac (AC_CHECK_MEMBERS): Add checks for
882 struct stat.st_blocks and struct stat.st_blksize.
883 * configure: Regenerate.
884 * config.in: Likewise.
885 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
886 (OBS): Add common-remote-fileio.o.
887 (common-remote-fileio.o): New rule.
889 2015-03-09 Pedro Alves <palves@redhat.com>
891 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
892 'struct sockaddr' pointer in 'accept' call.
894 2015-03-09 Pedro Alves <palves@redhat.com>
897 2015-03-07 Pedro Alves <palves@redhat.com>
898 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
899 or <winsock2.h> here. Instead include "gdb_socket.h".
900 (remote_open): Use union gdb_sockaddr_u.
901 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
902 or <winsock2.h> here. Instead include "gdb_socket.h".
903 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
904 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
906 (init_named_socket, gdb_agent_helper_thread): Use union
909 2015-03-07 Pedro Alves <palves@redhat.com>
911 * configure.ac (build_warnings): Move
912 -Wdeclaration-after-statement to the C-specific set.
913 * configure: Regenerate.
915 2015-03-07 Pedro Alves <palves@redhat.com>
917 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
918 or <winsock2.h> here. Instead include "gdb_socket.h".
919 (remote_open): Use union gdb_sockaddr_u.
920 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
921 or <winsock2.h> here. Instead include "gdb_socket.h".
922 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
923 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
925 (init_named_socket, gdb_agent_helper_thread): Use union
928 2015-03-07 Pedro Alves <palves@redhat.com>
930 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
933 2015-03-06 Yao Qi <yao.qi@linaro.org>
935 * linux-aarch64-low.c (aarch64_insert_point): Use
936 show_debug_regs as a boolean.
937 (aarch64_remove_point): Likewise.
939 2015-03-05 Pedro Alves <palves@redhat.com>
941 * lynx-low.c (lynx_target_ops): Install NULL hooks for
942 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
943 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
944 * nto-low.c (nto_target_ops): Likewise.
945 * spu-low.c (spu_target_ops): Likewise.
946 * win32-low.c (win32_target_ops): Likewise.
948 2015-03-04 Pedro Alves <palves@redhat.com>
950 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
951 Decide whether a breakpoint triggered based on the SIGTRAP's
953 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
954 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
955 (linux_low_filter_event): Check for breakpoints before checking
957 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
959 (linux_stopped_by_sw_breakpoint)
960 (linux_supports_stopped_by_sw_breakpoint)
961 (linux_stopped_by_hw_breakpoint)
962 (linux_supports_stopped_by_hw_breakpoint): New functions.
963 (linux_target_ops): Install new target methods.
965 2015-03-04 Pedro Alves <palves@redhat.com>
967 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
968 * server.c (swbreak_feature, hwbreak_feature): New globals.
969 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
970 (captured_main): Clear swbreak_feature and hwbreak_feature.
971 * server.h (swbreak_feature, hwbreak_feature): Declare.
972 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
973 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
974 supports_stopped_by_hw_breakpoint>: New fields.
975 (target_supports_stopped_by_sw_breakpoint)
976 (target_stopped_by_sw_breakpoint)
977 (target_supports_stopped_by_hw_breakpoint)
978 (target_stopped_by_hw_breakpoint): Declare.
980 2015-03-04 Pedro Alves <palves@redhat.com>
982 enum lwp_stop_reason -> enum target_stop_reason
983 * linux-low.c (check_stopped_by_breakpoint): Adjust.
984 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
985 (linux_wait_1, stuck_in_jump_pad_callback)
986 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
987 (linux_stopped_by_watchpoint):
988 * linux-low.h (enum lwp_stop_reason): Delete.
989 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
990 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
992 2015-03-04 Yao Qi <yao.qi@linaro.org>
994 * Makefile.in (SFILES): Add linux-aarch64-low.c.
996 2015-03-03 Gary Benson <gbenson@redhat.com>
998 * hostio.c (handle_vFile): Fix prefix lengths.
1000 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1002 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1005 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1007 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1008 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1009 (clean): Add "rm -f" for above C files.
1010 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1011 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1012 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1013 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1014 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1015 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1016 (init_registers_s390x_vx_linux64)
1017 (init_registers_s390x_tevx_linux64)
1018 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1019 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1021 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1022 (s390_store_vxrs_high): New functions.
1023 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1025 (s390_arch_setup): Add logic for selecting one of the new target
1026 descriptions. Activate the new vector regsets if applicable.
1027 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1028 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1029 and init_registers_s390x_tevx_linux64.
1031 2015-03-01 Pedro Alves <palves@redhat.com>
1033 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1036 2015-02-27 Pedro Alves <palves@redhat.com>
1038 * linux-x86-low.c (u_debugreg_offset): New function.
1039 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1041 2015-02-27 Pedro Alves <palves@redhat.com>
1043 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1044 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1045 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1046 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1047 (ps_lsetfpregs, ps_getpid)
1048 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1049 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1050 (ps_lsetxregs, ps_plog): Declare.
1052 2015-02-27 Pedro Alves <palves@redhat.com>
1054 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1055 IP_AGENT_EXPORT_FUNC.
1056 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1057 IP_AGENT_EXPORT_FUNC.
1058 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1059 (IP_AGENT_EXPORT): Delete.
1060 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1061 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1062 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1063 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1064 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1065 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1066 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1067 (traceframe_read_count, traceframe_write_count)
1068 (traceframes_created, trace_state_variables, get_raw_reg)
1069 (get_trace_state_variable_value, set_trace_state_variable_value)
1070 (ust_loaded, helper_thread_id, cmd_buf): Use
1071 IPA_SYM_EXPORTED_NAME.
1072 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1073 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1074 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1075 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1076 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1077 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1078 EXTERN_C_PUSH/EXTERN_C_POP.
1079 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1080 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1081 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1082 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1083 (traceframe_write_count, traceframe_read_count)
1084 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1085 (about_to_request_buffer_space, get_trace_state_variable_value)
1086 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1087 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1088 EXTERN_C_PUSH/EXTERN_C_POP.
1089 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1090 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1091 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1092 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1093 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1094 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1095 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1096 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1098 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1099 (IP_AGENT_EXPORT_VAR_DECL): Define.
1101 (gdb_agent_get_raw_reg): Declare.
1103 2015-02-27 Tom Tromey <tromey@redhat.com>
1104 Pedro Alves <palves@redhat.com>
1106 Rename symbols whose names are reserved C++ keywords throughout.
1108 2015-02-27 Pedro Alves <palves@redhat.com>
1110 * Makefile.in (COMPILER): New, get it from autoconf.
1111 (CXX): Get from autoconf instead.
1112 (COMPILE.pre): Use COMPILER.
1113 (CC-LD): Rename to ...
1114 (CC_LD): ... this. Use COMPILER.
1115 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1116 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1117 * acinclude.m4: Include build-with-cxx.m4.
1118 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1119 Disable -Werror by default if building in C++ mode.
1120 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1121 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1122 the C++ compiler. Save/restore CXXFLAGS too.
1123 * configure: Regenerate.
1125 2015-02-27 Pedro Alves <palves@redhat.com>
1127 * acinclude.m4: Include libiberty.m4.
1128 * configure.ac: Call libiberty_INIT.
1129 * config.in, configure: Regenerate.
1131 2015-02-26 Pedro Alves <palves@redhat.com>
1133 * linux-low.c (linux_wait_1): When incrementing the PC past a
1134 program breakpoint always use the_low_target.breakpoint_len as
1135 increment, rather than the maximum between that and
1136 the_low_target.decr_pc_after_break.
1138 2015-02-23 Pedro Alves <palves@redhat.com>
1140 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1141 thread was doing a step-over; always adjust the PC if
1142 we stepped over a permanent breakpoint.
1143 (linux_wait_1): If we stepped over breakpoint that was on top of a
1144 permanent breakpoint, manually advance the PC past it.
1146 2015-02-23 Pedro Alves <palves@redhat.com>
1148 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1150 (x86_fill_gregset, x86_store_gregset): Use it when handling
1153 2015-02-20 Pedro Alves <palves@redhat.com>
1155 * thread-db.c: Include "nat/linux-procfs.h".
1156 (thread_db_init): Skip listing new threads if the kernel supports
1157 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1159 2015-02-20 Pedro Alves <palves@redhat.com>
1161 * linux-low.c (status_pending_p_callback): Use ptid_match.
1163 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1165 PR breakpoints/16812
1166 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1167 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1168 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1170 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1172 PR breakpoints/15956
1173 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1175 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1177 * linux-low.c (linux_low_btrace_conf): Print size.
1178 * server.c (handle_btrace_conf_general_set): New.
1179 (hanle_general_set): Call handle_btrace_conf_general_set.
1180 (handle_query): Report Qbtrace-conf:bts:size as supported.
1182 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1184 * linux-low.c (linux_low_enable_btrace): Update parameters.
1185 (linux_low_btrace_conf): New.
1186 (linux_target_ops)<to_btrace_conf>: Initialize.
1187 * server.c (current_btrace_conf): New.
1188 (handle_btrace_enable): Rename to ...
1189 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
1190 to target_enable_btrace. Update comment. Update users.
1191 (handle_qxfer_btrace_conf): New.
1192 (qxfer_packets): Add btrace-conf entry.
1193 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1194 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1195 (target_ops)<read_btrace_conf>: New.
1196 (target_enable_btrace): Update parameters.
1197 (target_read_btrace_conf): New.
1199 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1201 * server.c (handle_btrace_general_set): Remove call to
1202 target_supports_btrace.
1203 (supported_btrace_packets): New.
1204 (handle_query): Call supported_btrace_packets.
1205 * target.h: include btrace-common.h.
1206 (btrace_target_info): Removed.
1207 (supports_btrace, target_supports_btrace): Update parameters.
1209 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1211 * Makefile.in (SFILES): Add common/btrace-common.c.
1212 (OBS): Add common/btrace-common.o.
1213 (btrace-common.o): Add build rules.
1214 * linux-low: Include btrace-common.h.
1215 (linux_low_read_btrace): Use struct btrace_data. Call
1216 btrace_data_init and btrace_data_fini.
1218 2015-02-06 Pedro Alves <palves@redhat.com>
1220 * thread-db.c (find_new_threads_callback): Add debug output.
1222 2015-02-04 Pedro Alves <palves@redhat.com>
1224 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1225 (resume_stopped_resumed_lwps): New function.
1226 (linux_wait_for_event_filtered): Use it.
1228 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1230 * Makefile.in (SFILES): Add linux-personality.c.
1231 (linux-personality.o): New rule.
1232 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1233 list of objects to be built.
1234 * linux-low.c: Include nat/linux-personality.h.
1235 (linux_create_inferior): Remove code to disable address space
1236 randomization (moved to ../nat/linux-personality.c). Create
1237 cleanup to disable address space randomization.
1239 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1241 * Makefile.in (posix-strerror.o): New rule.
1242 (mingw-strerror.o): Likewise.
1243 * configure: Regenerated.
1244 * configure.ac: Source file ../common/common.host. Initialize new
1245 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1247 2015-01-14 Yao Qi <yao@codesourcery.com>
1249 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1250 (ppc-linux.o): New rule.
1251 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1252 * configure.ac: AC_CHECK_FUNCS(getauxval).
1253 * config.in: Re-generated.
1254 * configure: Re-generated.
1255 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1256 ppc64_64bit_inferior_p
1258 2015-01-14 Yao Qi <yao@codesourcery.com>
1260 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1261 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1262 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1263 (PT_ORIG_R3, PT_TRAP): Likewise.
1264 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1265 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1266 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1268 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1270 * i387-fp.c (i387_cache_to_xsave): In look over
1271 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1272 zmmh_low_space field by use of zmmh_high_space.
1274 2015-01-09 Pedro Alves <palves@redhat.com>
1276 * linux-low.c (step_over_bkpt): Move higher up in the file.
1277 (handle_extended_wait): Don't store the stop_pc here.
1278 (get_stop_pc): Adjust comments and rename to ...
1279 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1280 stopped for a software breakpoint or hardware breakpoint.
1281 (thread_still_has_status_pending_p): New function.
1282 (status_pending_p_callback): Use
1283 thread_still_has_status_pending_p. If the event is no longer
1284 interesting, resume the LWP.
1285 (handle_tracepoints): Add assert.
1286 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1287 (wstatus_maybe_breakpoint): New function.
1288 (cancel_breakpoint): Delete function.
1289 (check_stopped_by_watchpoint): New function, factored out from
1290 linux_low_filter_event.
1291 (lp_status_maybe_breakpoint): Delete function.
1292 (linux_low_filter_event): Remove filter_ptid argument.
1293 Leave thread group exits pending here. Store the LWP's stop PC.
1294 Always leave events pending.
1295 (linux_wait_for_event_filtered): Pull all events out of the
1296 kernel, and leave them all pending.
1297 (count_events_callback, select_event_lwp_callback): Consider all
1299 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1300 (select_event_lwp): Only give preference to the stepping LWP in
1301 all-stop mode. Adjust comments.
1302 (ignore_event): New function.
1303 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1304 references to cancel_breakpoints. Adjust to renames. Also give
1305 equal priority to all LWPs that have had events in non-stop mode.
1306 If reporting a software breakpoint event, unadjust the LWP's PC.
1307 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1308 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1310 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1311 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1312 (linux_stopped_by_watchpoint): Adjust.
1313 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1314 * linux-low.h (enum lwp_stop_reason): New.
1315 (struct lwp_info) <stop_pc>: Adjust comment.
1316 <stopped_by_watchpoint>: Delete field.
1317 <stop_reason>: New field.
1318 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1319 * mem-break.c (software_breakpoint_inserted_here)
1320 (hardware_breakpoint_inserted_here): New function.
1321 * mem-break.h (software_breakpoint_inserted_here)
1322 (hardware_breakpoint_inserted_here): Declare.
1323 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1324 (cancel_breakpoints): Delete.
1325 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1326 (upload_fast_traceframes): Remove references to
1329 2015-01-09 Pedro Alves <palves@redhat.com>
1331 * thread-db.c (find_new_threads_callback): Ignore thread if the
1332 kernel thread ID is -1.
1334 2015-01-09 Pedro Alves <palves@redhat.com>
1336 * linux-low.c (linux_attach_fail_reason_string): Move to
1337 nat/linux-ptrace.c, and rename.
1338 (linux_attach_lwp): Update comment.
1339 (attach_proc_task_lwp_callback): New function.
1340 (linux_attach): Adjust to rename and use
1341 linux_proc_attach_tgid_threads.
1342 (linux_attach_fail_reason_string): Delete declaration.
1344 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1346 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1347 * server.c (gdbserver_version): Likewise.
1349 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1351 * remote-utils.c: Include ctype.h.
1352 (input_interrupt): Explicitly handle the case when the char
1353 received is the NUL byte. Improve the printing of non-ASCII
1356 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1358 * linux-low.c (linux_low_filter_event): Update call to
1359 linux_enable_event_reporting following the addition of
1360 a new parameter to that function.
1362 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1365 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1366 (AARCH64_FPCR_REGNO): Likewise.
1367 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1368 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1369 (aarch64_store_fpregset): Likewise.
1371 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1373 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1374 Remove FIXME comment about assumption about N.
1376 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1378 * configure.ac: If large-file support is disabled in GDBserver,
1379 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1380 * configure: Regenerate.
1382 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1384 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1385 warning upon ENODATA from ptrace.
1386 * linux-s390-low.c (s390_store_tdb): New.
1387 (s390_regsets): Add regset for NT_S390_TDB.
1389 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1391 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1392 without a fill_function.
1393 * linux-s390-low.c (s390_fill_last_break): Remove.
1394 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1395 (s390_arch_setup): Use regset's size instead of fill_function for
1398 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1400 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1401 the regset's store function when ptrace returned an error.
1402 * regcache.c (get_thread_regcache): Invalidate register cache
1403 before fetching inferior's registers.
1405 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1407 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1408 while-loop as for-loop.
1409 (regsets_store_inferior_registers): Likewise.
1411 2014-11-28 Yao Qi <yao@codesourcery.com>
1413 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1414 * config.in, configure: Re-generate.
1415 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1418 2014-11-21 Yao Qi <yao@codesourcery.com>
1420 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1421 (AC_CHECK_HEADERS): Remove malloc.h.
1422 * configure: Re-generated.
1423 * config.in: Re-generated.
1424 * server.h: Don't include alloca.h and malloc.h.
1425 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1426 Don't include malloc.h.
1428 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1430 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1431 corresponding ERRNO check in same block.
1433 2014-11-12 Pedro Alves <palves@redhat.com>
1435 * server.c (cont_thread): Update comment.
1436 (start_inferior, attach_inferior): No longer clear cont_thread.
1437 (handle_v_cont): No longer set cont_thread.
1438 (captured_main): Clear cont_thread each time a GDB connects.
1440 2014-11-12 Pedro Alves <palves@redhat.com>
1442 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1443 thread, and don't resume all threads if the Hc thread has exited.
1445 2014-11-12 Pedro Alves <palves@redhat.com>
1447 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1448 the process group instead of to a specific LWP.
1450 2014-10-15 Pedro Alves <palves@redhat.com>
1453 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1455 (arm_set_thread_context): Delete.
1456 (the_low_target): Adjust.
1457 * win32-i386-low.c (debug_registers_changed)
1458 (debug_registers_used): Delete.
1459 (update_debug_registers_callback): New function.
1460 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1461 needing to update their debug registers.
1462 (win32_get_current_dr): New function.
1463 (x86_dr_low_get_addr, x86_dr_low_get_control)
1464 (x86_dr_low_get_status): Fetch the debug register from the thread
1466 (i386_initial_stuff): Adjust.
1467 (i386_get_thread_context): Remove current_event parameter. Don't
1468 clear debug_registers_changed nor copy DR values to
1470 (i386_set_thread_context): Delete.
1471 (i386_prepare_to_resume): New function.
1472 (i386_thread_added): Mark the thread as needing to update irs
1474 (the_low_target): Remove i386_set_thread_context and install
1475 i386_prepare_to_resume.
1476 * win32-low.c (win32_get_thread_context): Adjust.
1477 (win32_set_thread_context): Use SetThreadContext
1479 (win32_prepare_to_resume): New function.
1480 (win32_require_context): New function, factored out from ...
1481 (thread_rec): ... this.
1482 (continue_one_thread): Call win32_prepare_to_resume on each thread
1483 we're about to continue.
1484 (win32_resume): Call win32_prepare_to_resume on the event thread.
1485 * win32-low.h (struct win32_thread_info)
1486 <debug_registers_changed>: New field.
1487 (struct win32_target_ops): Change prototype of set_thread_context,
1488 delete set_thread_context and add prepare_to_resume.
1489 (win32_require_context): New declaration.
1491 2014-10-08 Gary Benson <gbenson@redhat.com>
1493 * server.h: Do not include common-exceptions.h.
1495 2014-10-08 Gary Benson <gbenson@redhat.com>
1497 * server.h: Do not include cleanups.h.
1499 2014-09-30 James Hogan <james.hogan@imgtec.com>
1501 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1504 2014-09-23 Yao Qi <yao@codesourcery.com>
1506 * linux-low.c (lp_status_maybe_breakpoint): New function.
1507 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1508 (count_events_callback): Likewise.
1509 (select_event_lwp_callback): Likewise.
1510 (cancel_breakpoints_callback): Likewise.
1512 2014-09-19 Don Breazeal <donb@codesourcery.com>
1514 * linux-low.c (handle_extended_wait): Call
1515 linux_ptrace_get_extended_event.
1516 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1517 linux_is_extended_waitstatus.
1519 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1521 * Makefile.in (CPPFLAGS): Define.
1522 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1523 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1525 2014-09-16 Gary Benson <gbenson@redhat.com>
1527 * inferiors.h (current_inferior): Renamed as...
1528 (current_thread): New variable. All uses updated.
1529 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1530 (maybe_move_out_of_jump_pad): Likewise.
1531 (cancel_breakpoint): Likewise.
1532 (linux_low_filter_event): Likewise.
1533 (wait_for_sigstop): Likewise.
1534 (linux_resume_one_lwp): Likewise.
1535 (need_step_over_p): Likewise.
1536 (start_step_over): Likewise.
1537 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1538 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1539 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1540 and save_inferior as saved_thread.
1541 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1543 (regcache_invalidate_thread): Likewise.
1544 * remote-utils.c (prepare_resume_reply): Likewise.
1545 * thread-db.c (thread_db_get_tls_address): Likewise.
1546 (disable_thread_event_reporting): Likewise.
1547 (remove_thread_event_breakpoints): Likewise.
1548 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1550 * target.h (set_desired_inferior): Renamed as...
1551 (set_desired_thread): New declaration. All uses updated.
1552 * server.c (myresume): Updated comment to reference thread instead
1554 (handle_serial_event): Likewise.
1555 (handle_target_event): Likewise.
1557 2014-09-12 Tom Tromey <tromey@redhat.com>
1558 Gary Benson <gbenson@redhat.com>
1560 * regcache.h: Include common-regcache.h.
1561 (regcache_read_pc): Don't declare.
1562 * regcache.c (get_thread_regcache_for_ptid): New function.
1564 2014-09-11 Tom Tromey <tromey@redhat.com>
1565 Gary Benson <gbenson@redhat.com>
1567 * symbol.c: New file.
1568 * Makefile.in (SFILES): Add symbol.c.
1569 (OBS): Add symbol.o.
1571 2014-09-11 Gary Benson <gbenson@redhat.com>
1573 * target.c (target_stop_ptid, target_continue_ptid): New
1576 2014-09-11 Tom Tromey <tromey@redhat.com>
1577 Gary Benson <gbenson@redhat.com>
1579 * target.h: Include target/target.h.
1580 * target.c (target_read_memory, target_read_uint32)
1581 (target_write_memory): New functions.
1583 2014-09-11 Gary Benson <gbenson@redhat.com>
1585 * server.h (debug_hw_points): Don't declare.
1586 * server.c (debug_hw_points): Don't define. Replace all uses
1587 with show_debug_regs.
1588 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1589 all uses with show_debug_regs.
1591 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1593 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1594 endianness into account.
1595 (ppc_supply_ptrace_register): Likewise.
1597 2014-09-03 James Hogan <james.hogan@imgtec.com>
1599 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1600 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1602 2014-09-03 Gary Benson <gbenson@redhat.com>
1604 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1605 ALL_DEBUG_ADDRESS_REGISTERS.
1607 2014-09-02 Gary Benson <gbenson@redhat.com>
1609 * i386-low.h: Renamed as...
1610 * x86-low.h: New file. All type, function and variable name
1611 prefixes changed from "i386_" to "x86_". All references updated.
1612 * i386-low.c: Renamed as...
1613 * x86-low.c: New file. All type, function and variable name
1614 prefixes changed from "i386_" to "x86_". All references updated.
1616 2014-09-02 Gary Benson <gbenson@redhat.com>
1618 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1619 (x86_linux_new_thread): Likewise.
1621 2014-08-29 Gary Benson <gbenson@redhat.com>
1623 * server.h (setjmp.h): Do not include.
1624 (toplevel): Do not declare.
1625 (common-exceptions.h): Include.
1626 (cleanups.h): Likewise.
1627 * server.c (toplevel): Do not define.
1628 (exit_code): New static global.
1629 (detach_or_kill_for_exit_cleanup): New function.
1630 (main): New function. Original main renamed to...
1631 (captured_main): New function.
1632 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1634 2014-08-29 Gary Benson <gbenson@redhat.com>
1636 * Makefile.in (SFILES): Add common/common-exceptions.c.
1637 (OBS): Add common-exceptions.o.
1638 (common-exceptions.o): New rule.
1639 * utils.c (prepare_to_throw_exception): New function.
1641 2014-08-29 Gary Benson <gbenson@redhat.com>
1643 * config.in: Regenerate.
1644 * configure: Likewise.
1646 2014-08-29 Gary Benson <gbenson@redhat.com>
1648 * Makefile.in (SFILES): Add common/cleanups.c.
1650 (cleanups.o): New rule.
1652 2014-08-29 Gary Benson <gbenson@redhat.com>
1654 * utils.c (internal_vwarning): New function.
1656 2014-08-28 Gary Benson <gbenson@redhat.com>
1658 * utils.h (fatal): Remove declaration.
1659 * utils.c (fatal): Remove function.
1661 2014-08-28 Gary Benson <gbenson@redhat.com>
1663 * tracepoint.c (gdb_agent_init): Replace fatal with
1665 (initialize_tracepoint): Likewise.
1667 2014-08-28 Gary Benson <gbenson@redhat.com>
1669 * remote-utils.c (remote_prepare): Replace fatal with error.
1671 2014-08-28 Gary Benson <gbenson@redhat.com>
1673 * linux-low.c (linux_async): Replace fatal with warning.
1675 (linux_start_non_stop): Return -1 if linux_async failed.
1677 2014-08-28 Gary Benson <gbenson@redhat.com>
1679 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1681 (i386_dr_low_get_addr): Remove vague comment.
1682 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1685 2014-08-28 Gary Benson <gbenson@redhat.com>
1687 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1688 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1690 (linux_resume_one_lwp): Likewise.
1691 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1693 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1694 with internal_error.
1695 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1696 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1697 (find_register_by_name): Replace fatal with internal_error.
1698 (find_regno): Likewise.
1699 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1700 * thread-db.c (thread_db_create_event): Likewise.
1701 (thread_db_load_search): Likewise.
1702 (try_thread_db_load_1): Likewise.
1703 * tracepoint.c (get_jump_space_head): Replace fatal with
1705 (claim_trampoline_space): Likewise.
1706 (have_fast_tracepoint_trampoline_buffer): Likewise.
1707 (cmd_qtstart): Likewise.
1708 (stop_tracing): Likewise.
1709 (fast_tracepoint_collecting): Likewise.
1710 (target_malloc): Likewise.
1711 (download_tracepoint): Likewise.
1712 (download_trace_state_variables): Replace check with gdb_assert.
1713 (upload_fast_traceframes): Replace fatal with internal_error.
1715 2014-08-19 Tom Tromey <tromey@redhat.com>
1716 Gary Benson <gbenson@redhat.com>
1718 * Makefile.in (SFILES): Add common/common-debug.c.
1719 (OBS): Add common-debug.o.
1720 (common-debug.o): New rule.
1721 * debug.h (debug_printf): Don't declare.
1722 * debug.c (debug_printf): Renamed and rewritten as...
1723 (debug_vprintf): New function.
1725 2014-08-19 Gary Benson <gbenson@redhat.com>
1727 * utils.h: Do not include print-utils.h.
1729 2014-08-19 Tom Tromey <tromey@redhat.com>
1730 Gary Benson <gbenson@redhat.com>
1732 * server.h: Add static assertion.
1733 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1735 2014-08-19 Tom Tromey <tromey@redhat.com>
1736 Gary Benson <gbenson@redhat.com>
1738 * Makefile.in (SFILES): Add common/errors.c.
1739 (OBS): Add errors.o.
1740 (IPA_OBS): Add errors-ipa.o.
1741 (errors.o): New rule.
1742 (errors-ipa.o): Likewise.
1743 * utils.h (perror_with_name, error, warning): Don't declare.
1744 * utils.c (warning): Renamed and rewritten as...
1745 (vwarning): New function.
1746 (error): Renamed and rewritten as...
1747 (verror): New function.
1748 (internal_error): Renamed and rewritten as...
1749 (internal_verror): New function.
1751 2014-08-07 Gary Benson <gbenson@redhat.com>
1753 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1754 * configure: Regenerate.
1755 * config.in: Likewise.
1756 * server.h: Do not include errno.h.
1757 * event-loop.c: Likewise.
1758 * hostio-errno.c: Likewise.
1759 * linux-low.c: Likewise.
1760 * remote-utils.c: Likewise.
1761 * spu-low.c: Likewise.
1762 * utils.c: Likewise.
1763 * gdbreplay.c: Unconditionally include errno.h.
1765 2014-08-07 Gary Benson <gbenson@redhat.com>
1767 * server.h: Do not include string.h.
1768 * event-loop.c: Likewise.
1769 * linux-low.c: Likewise.
1770 * regcache.c: Likewise.
1771 * remote-utils.c: Likewise.
1772 * spu-low.c: Likewise.
1773 * utils.c: Likewise.
1775 2014-08-07 Gary Benson <gbenson@redhat.com>
1777 * server.h: Do not include gdb_assert.h.
1779 2014-08-07 Gary Benson <gbenson@redhat.com>
1781 * server.h: Do not include common-utils.h.
1783 2014-08-07 Gary Benson <gbenson@redhat.com>
1785 * server.h: Do not include ptid.h.
1786 * notif.h: Likewise.
1788 2014-08-07 Gary Benson <gbenson@redhat.com>
1790 * server.h: Do not include gdb_locale.h.
1792 2014-08-07 Gary Benson <gbenson@redhat.com>
1794 * server.h: Do not include gdb/signals.h.
1795 * win32-low.c: Likewise.
1797 2014-08-07 Gary Benson <gbenson@redhat.com>
1799 * server.h: Do not include pathmax.h.
1801 2014-08-07 Gary Benson <gbenson@redhat.com>
1803 * server.h: Do not include libiberty.h.
1804 * linux-bfin-low.c: Likewise.
1806 2014-08-07 Gary Benson <gbenson@redhat.com>
1808 * server.h: Do not include ansidecl.h.
1810 2014-08-07 Gary Benson <gbenson@redhat.com>
1812 * linux-x86-low.c: Do not include stddef.h.
1813 * lynx-ppc-low.c: Likewise.
1814 * tracepoint.c: Likewise.
1816 2014-08-07 Gary Benson <gbenson@redhat.com>
1818 * server.h: Do not include stdarg.h.
1819 * nto-low.c: Likewise.
1821 2014-08-07 Gary Benson <gbenson@redhat.com>
1823 * server.h: Do not include stdlib.h.
1824 * inferiors.c: Likewise.
1825 * linux-low.c: Likewise.
1826 * regcache.c: Likewise.
1827 * spu-low.c: Likewise.
1828 * tracepoint.c: Likewise.
1829 * utils.c: Likewise.
1831 2014-08-07 Gary Benson <gbenson@redhat.com>
1833 * server.h: Do not include stdio.h.
1834 * linux-low.c: Likewise.
1835 * remote-utils.c: Likewise.
1836 * spu-low.c: Likewise.
1837 * utils.c: Likewise.
1838 * wincecompat.c: Likewise.
1840 2014-08-06 Gary Benson <gbenson@redhat.com>
1842 * regcache.c (init_register_cache): Move conditionals inside if.
1844 2014-08-06 Gary Benson <gbenson@redhat.com>
1846 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1848 2014-07-31 Gary Benson <gbenson@redhat.com>
1850 * ax.h: Do not include server.h.
1851 * gdbthread.h: Likewise.
1852 * lynx-low.h: Likewise.
1853 * notif.h: Likewise.
1855 2014-07-30 Gary Benson <gbenson@redhat.com>
1857 * server.h: Include common-defs.h.
1858 Do not include config.h or build-gnulib-gdbserver/config.h.
1860 2014-07-30 Gary Benson <gbenson@redhat.com>
1862 * hostio-errno.c: Move server.h to top of includes list.
1863 * inferiors.c: Likewise.
1864 * linux-x86-low.c: Likewise.
1865 * notif.c: Include server.h.
1867 2014-07-24 Tom Tromey <tromey@redhat.com>
1868 Gary Benson <gbenson@redhat.com>
1870 * server.h (CORE_ADDR): Now unsigned.
1872 2014-07-16 Pedro Alves <palves@redhat.com>
1874 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1876 2014-07-15 Pedro Alves <palves@redhat.com>
1878 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1881 2014-07-11 Pedro Alves <palves@redhat.com>
1883 * linux-low.c (kill_wait_lwp): New function, based on
1884 kill_one_lwp_callback, but use my_waitpid directly.
1885 (kill_one_lwp_callback, linux_kill): Use it.
1887 2014-06-23 Pedro Alves <palves@redhat.com>
1889 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1890 before setting DR0..DR3.
1892 2014-06-20 Gary Benson <gbenson@redhat.com>
1894 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1895 * configure: Regenerated.
1896 * config.in: Likewise.
1898 2014-06-20 Gary Benson <gbenson@redhat.com>
1900 * Makefile.in (SFILES): Update locations for files moved
1902 (object file files): Reordered.
1904 2014-06-20 Gary Benson <gbenson@redhat.com>
1906 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1907 (i386_dr_low_set_addr): Likewise.
1908 (i386_dr_low_get_addr): Likewise.
1909 (i386_dr_low_can_set_control): Likewise.
1910 (i386_dr_low_set_control): Likewise.
1911 (i386_dr_low_get_control): Likewise.
1912 (i386_dr_low_get_status): Likewise.
1913 (i386_get_debug_register_length): Likewise.
1914 * linux-x86-low.c (i386_dr_low_set_addr):
1915 Changed signature. Made static.
1916 (i386_dr_low_get_addr): Likewise.
1917 (i386_dr_low_set_control): Likewise.
1918 (i386_dr_low_get_control): Likewise.
1919 (i386_dr_low_get_status): Likewise.
1920 (i386_dr_low): New global variable.
1921 * win32-i386-low.c (i386_dr_low_set_addr):
1922 Changed signature. Made static.
1923 (i386_dr_low_get_addr): Likewise.
1924 (i386_dr_low_set_control): Likewise.
1925 (i386_dr_low_get_control): Likewise.
1926 (i386_dr_low_get_status): Likewise.
1927 (i386_dr_low): New global variable.
1929 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1931 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1932 * Makefile.in (AR, AR_FLAGS): Define.
1933 * configure: Regenerate.
1935 2014-06-19 Gary Benson <gbenson@redhat.com>
1937 * Makefile.in (i386-dregs.o): New rule.
1938 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1939 * i386-low.c (target.h): Remove include.
1940 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1941 (DR_CONTROL_SHIFT): Likewise.
1942 (DR_CONTROL_SIZE): Likewise.
1943 (DR_RW_EXECUTE): Likewise.
1944 (DR_RW_WRITE): Likewise.
1945 (DR_RW_READ): Likewise.
1946 (DR_RW_IORW): Likewise.
1947 (DR_LEN_1): Likewise.
1948 (DR_LEN_2): Likewise.
1949 (DR_LEN_4): Likewise.
1950 (DR_LEN_8): Likewise.
1951 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1952 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1953 (DR_ENABLE_SIZE): Likewise.
1954 (DR_LOCAL_SLOWDOWN): Likewise.
1955 (DR_GLOBAL_SLOWDOWN): Likewise.
1956 (DR_CONTROL_RESERVED): Likewise.
1957 (I386_DR_CONTROL_MASK): Likewise.
1958 (I386_DR_VACANT): Likewise.
1959 (I386_DR_LOCAL_ENABLE): Likewise.
1960 (I386_DR_GLOBAL_ENABLE): Likewise.
1961 (I386_DR_DISABLE): Likewise.
1962 (I386_DR_SET_RW_LEN): Likewise.
1963 (I386_DR_GET_RW_LEN): Likewise.
1964 (I386_DR_WATCH_HIT): Likewise.
1965 (i386_wp_op_t): Likewise.
1966 (i386_show_dr): Likewise.
1967 (i386_length_and_rw_bits): Likewise.
1968 (i386_insert_aligned_watchpoint): Likewise.
1969 (i386_remove_aligned_watchpoint): Likewise.
1970 (i386_handle_nonaligned_watchpoint): Likewise.
1971 i386_update_inferior_debug_regs(): Likewise.
1972 (i386_dr_insert_watchpoint): Likewise.
1973 (i386_dr_remove_watchpoint): Likewise.
1974 (i386_dr_region_ok_for_watchpoint): Likewise.
1975 (i386_dr_stopped_data_address): Likewise.
1976 (i386_dr_stopped_by_watchpoint): Likewise.
1978 2014-06-19 Gary Benson <gbenson@redhat.com>
1980 * i386-low.c (i386_dr_show): Renamed to
1981 i386_show_dr and made static. All uses updated.
1982 (i386_dr_length_and_rw_bits): Renamed to
1983 i386_length_and_rw_bits and made static.
1985 (i386_dr_insert_aligned_watchpoint): Renamed to
1986 i386_insert_aligned_watchpoint and made static.
1988 (i386_dr_remove_aligned_watchpoint): Renamed to
1989 i386_remove_aligned_watchpoint and made static.
1991 (i386_dr_update_inferior_debug_regs): Renamed to
1992 i386_update_inferior_debug_regs and made static.
1995 2014-06-18 Gary Benson <gbenson@redhat.com>
1997 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1998 (i386_dr_low_can_set_control): Likewise.
1999 (i386_get_debug_register_length): Likewise.
2000 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2001 (i386_dr_low_can_set_control): Likewise.
2002 (i386_get_debug_register_length): Likewise.
2004 2014-06-17 Gary Benson <gbenson@redhat.com>
2006 * i386-low.h (i386-dregs.h): New include.
2007 (DR_FIRSTADDR): Now in i386-dregs.h.
2008 (DR_LASTADDR): Likewise.
2009 (DR_NADDR): Likewise.
2010 (DR_STATUS): Likewise.
2011 (DR_CONTROL): Likewise.
2012 (i386_debug_reg_state): Likewise.
2013 (i386_dr_insert_watchpoint): Likewise.
2014 (i386_dr_remove_watchpoint): Likewise.
2015 (i386_dr_region_ok_for_watchpoint): Likewise.
2016 (i386_dr_stopped_data_address): Likewise.
2017 (i386_dr_stopped_by_watchpoint): Likewise.
2018 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2020 2014-06-18 Gary Benson <gbenson@redhat.com>
2022 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2023 i386_dr_insert_watchpoint.
2024 (i386_low_remove_watchpoint): Renamed to
2025 i386_dr_remove_watchpoint.
2026 (i386_low_region_ok_for_watchpoint): Renamed to
2027 i386_dr_region_ok_for_watchpoint.
2028 (i386_low_stopped_data_address): Renamed to
2029 i386_dr_stopped_data_address.
2030 (i386_low_stopped_by_watchpoint): Renamed to
2031 i386_dr_stopped_by_watchpoint.
2032 * i386-low.c (i386_show_dr): Renamed to
2033 i386_dr_show and made nonstatic. All uses updated.
2034 (i386_length_and_rw_bits): Renamed to
2035 i386_dr_length_and_rw_bits and made nonstatic.
2037 (i386_insert_aligned_watchpoint): Renamed to
2038 i386_dr_insert_aligned_watchpoint and made nonstatic.
2040 (i386_remove_aligned_watchpoint): Renamed to
2041 i386_dr_remove_aligned_watchpoint and made nonstatic.
2043 (i386_update_inferior_debug_regs): Renamed to
2044 i386_dr_update_inferior_debug_regs and made nonstatic.
2046 (i386_low_insert_watchpoint): Renamed to
2047 i386_dr_insert_watchpoint. All uses updated.
2048 (i386_low_remove_watchpoint): Renamed to
2049 i386_dr_remove_watchpoint. All uses updated.
2050 (i386_low_region_ok_for_watchpoint): Renamed to
2051 i386_dr_region_ok_for_watchpoint. All uses updated.
2052 (i386_low_stopped_data_address): Renamed to
2053 i386_dr_stopped_data_address. All uses updated.
2054 (i386_low_stopped_by_watchpoint): Renamed to
2055 i386_dr_stopped_by_watchpoint. All uses updated.
2057 2014-06-18 Gary Benson <gbenson@redhat.com>
2059 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2060 (i386_dr_low_can_set_control): Likewise.
2061 (i386_insert_aligned_watchpoint): New check.
2063 2014-06-18 Gary Benson <gbenson@redhat.com>
2065 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2068 2014-06-18 Gary Benson <gbenson@redhat.com>
2070 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2071 instead of fatal and error.
2072 (i386_handle_nonaligned_watchpoint): Likewise.
2074 2014-06-18 Gary Benson <gbenson@redhat.com>
2076 * i386-low.c (i386_get_debug_register_length): New macro.
2077 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2078 (i386_show_dr): Use debug_printf instead of fprintf. Use
2079 phex to format values.
2081 2014-06-18 Gary Benson <gbenson@redhat.com>
2083 * i386-low.h: Comment changes.
2084 * i386-low.c: Likewise.
2086 2014-06-18 Gary Benson <gbenson@redhat.com>
2088 * i386-low.c: Whitespace changes.
2090 2014-06-12 Tom Tromey <tromey@redhat.com>
2092 * utils.c (freeargv): Remove.
2094 2014-06-12 Tom Tromey <tromey@redhat.com>
2096 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2097 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2098 (parse_debug_format_options): Likewise.
2099 (gdbserver_usage): Likewise.
2100 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2101 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2102 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2104 ($(LIBGNU)): Depend on libiberty.
2105 (all-lib): Recurse into all subdirs.
2106 (install-only): Invoke "install" target in subdirs.
2107 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2109 * configure: Rebuild.
2110 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2111 for vasprintf, vsnprintf, or gettimeofday.
2112 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2115 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2117 * development.sh: Delete.
2118 * Makefile.in (config.status): Adjust dependency on development.sh.
2119 * configure.ac: Adjust development.sh source call.
2120 * configure: Regenerate.
2122 2014-06-02 Pedro Alves <palves@redhat.com>
2124 * ax.c (gdb_free_agent_expr): New function.
2125 * ax.h (gdb_free_agent_expr): New declaration.
2126 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2128 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2130 (clear_breakpoint_conditions_and_commands): New function.
2131 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2132 (clear_breakpoint_conditions_and_commands): New declaration.
2134 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2136 * linux-aarch64-low.c (asm/ptrace.h): Include.
2138 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2140 Fix TLS access for -static -pthread.
2141 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2142 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2143 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2145 2014-05-20 Pedro Alves <palves@redhat.com>
2147 * linux-aarch64-low.c (aarch64_insert_point)
2148 (aarch64_remove_point): No longer check whether the type is
2149 supported here. Adjust to new interface.
2150 (the_low_target): Install aarch64_supports_z_point_type as
2151 supports_z_point_type method.
2152 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2153 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2154 instead of a Z packet char. Adjust.
2155 (arm_supports_z_point_type): New function.
2156 (arm_insert_point, arm_remove_point): Adjust to new interface.
2157 (the_low_target): Install arm_supports_z_point_type.
2158 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2159 (cris_insert_point, cris_remove_point): Adjust to new interface.
2160 Don't check whether the type is supported here.
2161 (the_low_target): Install cris_supports_z_point_type.
2162 * linux-low.c (linux_supports_z_point_type): New function.
2163 (linux_insert_point, linux_remove_point): Adjust to new interface.
2164 * linux-low.h (struct linux_target_ops) <insert_point,
2165 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2166 raw_breakpoint pointer parameter.
2167 <supports_z_point_type>: New method.
2168 * linux-mips-low.c (mips_supports_z_point_type): New function.
2169 (mips_insert_point, mips_remove_point): Adjust to new interface.
2170 Use mips_supports_z_point_type.
2171 (the_low_target): Install mips_supports_z_point_type.
2172 * linux-ppc-low.c (the_low_target): Install NULL as
2173 supports_z_point_type method.
2174 * linux-s390-low.c (the_low_target): Install NULL as
2175 supports_z_point_type method.
2176 * linux-sparc-low.c (the_low_target): Install NULL as
2177 supports_z_point_type method.
2178 * linux-x86-low.c (x86_supports_z_point_type): New function.
2179 (x86_insert_point): Adjust to new insert_point interface. Use
2180 insert_memory_breakpoint. Adjust to new
2181 i386_low_insert_watchpoint interface.
2182 (x86_remove_point): Adjust to remove_point interface. Use
2183 remove_memory_breakpoint. Adjust to new
2184 i386_low_remove_watchpoint interface.
2185 (the_low_target): Install x86_supports_z_point_type.
2186 * lynx-low.c (lynx_target_ops): Install NULL as
2187 supports_z_point_type callback.
2188 * nto-low.c (nto_supports_z_point_type): New.
2189 (nto_insert_point, nto_remove_point): Adjust to new interface.
2190 (nto_target_ops): Install nto_supports_z_point_type.
2191 * mem-break.c: Adjust intro comment.
2192 (struct raw_breakpoint) <raw_type, size>: New fields.
2193 <inserted>: Update comment.
2194 <shlib_disabled>: Delete field.
2195 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2196 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2197 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2198 (raw_bkpt_type_to_target_hw_bp_type): New function.
2199 (find_enabled_raw_code_breakpoint_at): New function.
2200 (find_raw_breakpoint_at): New type and size parameters. Use them.
2201 (insert_memory_breakpoint): New function, based off
2202 set_raw_breakpoint_at.
2203 (remove_memory_breakpoint): New function.
2204 (set_raw_breakpoint_at): Reimplement.
2205 (set_breakpoint): New, based on set_breakpoint_at.
2206 (set_breakpoint_at): Reimplement.
2207 (delete_raw_breakpoint): Go through the_target->remove_point
2208 instead of assuming memory breakpoints.
2209 (find_gdb_breakpoint_at): Delete.
2210 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2211 (find_gdb_breakpoint): New function.
2212 (set_gdb_breakpoint_at): Delete.
2213 (z_type_supported): New function.
2214 (set_gdb_breakpoint_1): New function, loosely based off
2215 set_gdb_breakpoint_at.
2216 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2217 (delete_gdb_breakpoint_at): Delete.
2218 (delete_gdb_breakpoint_1): New function, loosely based off
2219 delete_gdb_breakpoint_at.
2220 (delete_gdb_breakpoint): New function.
2221 (clear_gdb_breakpoint_conditions): Rename to ...
2222 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2224 (add_condition_to_breakpoint): Make static.
2225 (add_breakpoint_condition): Take a struct breakpoint pointer
2226 instead of an address. Adjust.
2227 (gdb_condition_true_at_breakpoint): Rename to ...
2228 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2230 (gdb_condition_true_at_breakpoint): Reimplement.
2231 (add_breakpoint_commands): Take a struct breakpoint pointer
2232 instead of an address. Adjust.
2233 (gdb_no_commands_at_breakpoint): Rename to ...
2234 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2235 parameter. Return true if no breakpoint was found. Change debug
2237 (gdb_no_commands_at_breakpoint): Reimplement.
2238 (run_breakpoint_commands): Rename to ...
2239 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2240 and change return type to boolean.
2241 (run_breakpoint_commands): New function.
2242 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2243 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2244 breakpoint. Go through the_target->remove_point instead of
2245 assuming memory breakpoint.
2246 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2247 software and hardware breakpoints.
2248 (reinsert_raw_breakpoint): Go through the_target->insert_point
2249 instead of assuming memory breakpoint.
2250 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2251 software and hardware breakpoints.
2252 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2253 Check both software and hardware breakpoints.
2254 (validate_inserted_breakpoint): Assert the breakpoint is a
2255 software breakpoint. Set the inserted flag to -1 instead of
2256 setting shlib_disabled.
2257 (delete_disabled_breakpoints): Adjust.
2258 (validate_breakpoints): Only validate software breakpoints.
2259 Adjust to inserted flag change.
2260 (check_mem_read, check_mem_write): Skip breakpoint types other
2261 than software breakpoints. Adjust to inserted flag change.
2262 * mem-break.h (enum raw_bkpt_type): New enum.
2263 (raw_breakpoint, struct process_info): Forward declare.
2264 (Z_packet_to_target_hw_bp_type): Delete declaration.
2265 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2266 (set_gdb_breakpoint, delete_gdb_breakpoint)
2267 (clear_breakpoint_conditions): New declarations.
2268 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2269 (breakpoint_inserted_here): Update comment.
2270 (add_breakpoint_condition, add_breakpoint_commands): Replace
2271 address parameter with a breakpoint pointer parameter.
2272 (gdb_breakpoint_here): Update comment.
2273 (delete_gdb_breakpoint_at): Delete.
2274 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2275 * server.c (process_point_options): Take a struct breakpoint
2276 pointer instead of an address. Adjust.
2277 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2278 delete_gdb_breakpoint.
2279 * spu-low.c (spu_target_ops): Install NULL as
2280 supports_z_point_type method.
2281 * target.h: Include mem-break.h.
2282 (struct target_ops) <prepare_to_access_memory>: Update comment.
2283 <supports_z_point_type>: New field.
2284 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2285 instead of a char. Also take a raw breakpoint pointer.
2286 * win32-arm-low.c (the_low_target): Install NULL as
2287 supports_z_point_type.
2288 * win32-i386-low.c (i386_supports_z_point_type): New function.
2289 (i386_insert_point, i386_remove_point): Adjust to new interface.
2290 (the_low_target): Install i386_supports_z_point_type.
2291 * win32-low.c (win32_supports_z_point_type): New function.
2292 (win32_insert_point, win32_remove_point): Adjust to new interface.
2293 (win32_target_ops): Install win32_supports_z_point_type.
2294 * win32-low.h (struct win32_target_ops):
2295 <supports_z_point_type>: New method.
2296 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2297 instead of a char. Also take a raw breakpoint pointer.
2299 2014-05-20 Pedro Alves <palves@redhat.com>
2301 * mem-break.h: Include break-common.h.
2302 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2303 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2304 (Z_packet_to_target_hw_bp_type): New declaration.
2305 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2306 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2307 (Z_PACKET_ACCESS_WP): Delete macros.
2308 (Z_packet_to_hw_type): Delete function.
2309 * i386-low.h: Don't include break-common.h here.
2310 (Z_packet_to_hw_type): Delete declaration.
2311 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2312 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2313 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2314 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2315 * linux-aarch64-low.c: Don't include break-common.h here.
2316 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2317 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2318 (Z_packet_to_target_hw_bp_type): Delete function.
2319 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2321 (mips_insert_point, mips_remove_point): Use
2322 Z_packet_to_target_hw_bp_type.
2324 2014-05-20 Pedro Alves <palves@redhat.com>
2326 * linux-aarch64-low.c: Include break-common.h.
2327 (enum target_point_type): Delete.
2328 (Z_packet_to_point_type): Rename to ...
2329 (Z_packet_to_target_hw_bp_type): ... this, and return a
2330 target_hw_bp_type instead.
2331 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2332 instead of an enum target_point_type.
2333 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2335 (aarch64_dr_state_insert_one_point)
2336 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2337 (aarch64_handle_aligned_watchpoint)
2338 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2339 Take an enum target_hw_bp_type instead of an enum
2341 (aarch64_supports_z_point_type): New function.
2342 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2343 use Z_packet_to_target_hw_bp_type.
2345 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2347 * configure.ac: Only use -Werror by default when DEVELOPMENT
2349 * configure: Regenerate.
2351 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2353 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2354 * linux-x86-low.c (X86_64_USER_REGS): New.
2355 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2357 2014-04-28 Yao Qi <yao@codesourcery.com>
2359 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2362 2014-04-25 Pedro Alves <palves@redhat.com>
2365 * linux-low.c (linux_attach_fail_reason_string): New function.
2366 (linux_attach_lwp): Delete.
2367 (linux_attach_lwp_1): Rename to ...
2368 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2369 argument. Remove "initial" parameter. Return int instead of
2370 void. Don't error or warn here.
2371 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2372 failure to attach to the tgid. Call warning when failing to
2374 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2375 argument. Remove "initial" parameter. Return int instead of
2376 void. Don't error or warn here.
2377 (linux_attach_fail_reason_string): New declaration.
2378 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2379 interface change. Use linux_attach_fail_reason_string.
2381 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2382 Walfred Tedeschi <walfred.tedeschi@intel.com>
2384 * Makefile.in: Added rules to handle new files
2385 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2386 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2387 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2388 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2389 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2390 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2392 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2393 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2394 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2395 i386/x32-avx512.xml.
2396 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2397 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2398 i386/x32-avx512-linux.xml.
2399 * i387-fp.c (num_avx512_k_registers): New constant for number
2401 (num_avx512_zmmh_low_registers): New constant for number of
2402 lower ZMM registers (0-15).
2403 (num_avx512_zmmh_high_registers): New constant for number of
2404 higher ZMM registers (16-31).
2405 (num_avx512_ymmh_registers): New contant for number of higher
2406 YMM registers (ymm16-31 added by avx521 on x86_64).
2407 (num_avx512_xmm_registers): New constant for number of higher
2408 XMM registers (xmm16-31 added by AVX512 on x86_64).
2409 (struct i387_xsave): Add space for AVX512 registers.
2410 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2411 Add code to handle AVX512 registers.
2412 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2413 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2414 prototypei from generated file.
2415 (tdesc_amd64_avx512_linux): Likewise.
2416 (init_registers_x32_avx512_linux): Likewise.
2417 (tdesc_x32_avx512_linux): Likewise.
2418 (init_registers_i386_avx512_linux): Likewise.
2419 (tdesc_i386_avx512_linux): Likewise.
2420 (x86_64_regmap): Add AVX512 registers.
2421 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2423 (initialize_low_arch): Add code to initialize AVX512 registers.
2425 2014-04-23 Pedro Alves <palves@redhat.com>
2427 * mem-break.c (find_gdb_breakpoint_at): Make static.
2428 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2430 2014-04-23 Pedro Alves <palves@redhat.com>
2432 * i386-low.c: Don't include break-common.h here.
2433 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2434 prototype to take target_hw_bp_type as argument instead of a Z
2436 * i386-low.h: Include break-common.h here.
2437 (Z_packet_to_hw_type): Declare.
2438 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2440 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2441 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2442 (x86_remove_point): Convert the packet number to a
2443 target_hw_bp_type before calling i386_low_remove_watchpoint.
2444 * win32-i386-low.c (i386_insert_point): Convert the packet number
2445 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2446 (i386_remove_point): Convert the packet number to a
2447 target_hw_bp_type before calling i386_low_remove_watchpoint.
2449 2014-04-23 Pedro Alves <palves@redhat.com>
2451 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2453 2014-04-10 Pedro Alves <palves@redhat.com>
2455 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2456 Check if the condition or command is NULL before checking if the
2457 breakpoint is known. On success, return true.
2458 * mem-break.h (add_breakpoint_condition): Document return.
2459 (add_breakpoint_commands): Add describing comment.
2460 * server.c (skip_to_semicolon): New function.
2461 (process_point_options): Use it.
2463 2014-04-09 Pedro Alves <palves@redhat.com>
2465 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2468 2014-02-27 Pedro Alves <palves@redhat.com>
2471 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2473 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2475 (last_thread_of_process_p): Take a PID argument instead of a
2477 (linux_wait_for_lwp): Delete.
2478 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2480 (linux_low_filter_event): New function, party factored out from
2481 linux_wait_for_event.
2482 (linux_wait_for_event): Rename to ...
2483 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2484 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2485 sigsuspend. Check for zombie leaders.
2486 (linux_wait_for_event): Reimplement as wrapper around
2487 linux_wait_for_event_filtered.
2488 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2489 a normal or signal exit is seen, it's the whole process exiting.
2490 (wait_for_sigstop): No longer a for_each_inferior callback.
2491 Rewrite on top of linux_wait_for_event_filtered.
2492 (stop_all_lwps): Call wait_for_sigstop directly.
2493 * server.c (resume, handle_target_event): Handle
2494 TARGET_WAITKIND_NO_RESUMED.
2496 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2498 * win32-low.c (psapi_get_dll_name,
2499 * win32_CreateToolhelp32Snapshot): Delete.
2500 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2501 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2503 (handle_load_dll): Add function description.
2504 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2506 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2508 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2510 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2511 base address when calling win32_add_one_solib.
2512 (handle_load_dll): Delete local variable load_addr.
2513 Remove 0x1000 offset applied to DLL base address when calling
2514 win32_add_one_solib.
2515 (handle_unload_dll): Add comment.
2517 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2519 * win32-low.c (win32_add_all_dlls): Renames
2520 win32_ensure_ntdll_loaded. Rewrite function documentation.
2521 Adjust implementation to always load all DLLs.
2522 Add 0x1000 offset to DLL base address when calling
2523 win32_add_one_solib.
2524 (child_initialization_done): New static global.
2525 (do_initial_child_stuff): Set child_initialization_done to
2526 zero during child initialization, and 1 after. Replace call
2527 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2529 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2530 (handle_unload_dll): Add function documentation.
2531 (get_child_debug_event): Ignore load and unload DLL events
2532 during child initialization.
2534 2014-02-20 Doug Evans <dje@google.com>
2536 Remove global all_lwps.
2537 * inferiors.h (ptid_of): Move here from linux-low.h.
2538 (pid_of, lwpid_of): Ditto.
2539 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2540 parameter is a struct thread_info * now.
2541 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2542 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2543 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2545 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2546 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2547 * linux-arm-low.c (update_registers_callback): Update, "entry"
2548 parameter is a struct thread_info * now.
2549 Fetch lwpid from current_inferior directly.
2550 (arm_insert_point): Pass &all_threads to find_inferior instead of
2552 (arm_remove_point): Ditto.
2553 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2554 (arm_prepare_to_resume): Fetch pid from thread.
2555 (arm_read_description): Fetch lwpid from current_inferior directly.
2556 * linux-low.c (all_lwps): Delete.
2557 (delete_lwp): Delete call to remove_inferior.
2558 (handle_extended_wait): Fetch lwpid from thread.
2559 (add_lwp): Don't set lwp->entry.id. Remove call to
2560 add_inferior_to_list.
2561 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2562 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2563 (kill_one_lwp_callback): Ditto.
2564 (linux_kill): Don't dereference NULL pointer.
2565 Fetch ptid,lwpid from thread.
2566 (get_detach_signal): Fetch ptid from thread.
2567 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2568 Simplify call to regcache_invalidate_thread.
2569 (delete_lwp_callback): Update, "entry" parameter is a
2570 struct thread_info * now. Fetch pid from thread.
2571 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2572 (status_pending_p_callback): Update, "entry" parameter is a
2573 struct thread_info * now. Fetch ptid from thread.
2574 (find_lwp_pid): Update, "entry" parameter is a
2575 struct thread_info * now.
2576 (linux_wait_for_lwp): Fetch pid from thread.
2577 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2578 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2579 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2580 (dequeue_one_deferred_signal): Ditto.
2581 (cancel_breakpoint): Fetch ptid from current_inferior.
2582 (linux_wait_for_event): Pass &all_threads to find_inferior,
2583 not &all_lwps. Fetch ptid, lwpid from thread.
2584 (count_events_callback): Update, "entry" parameter is a
2585 struct thread_info * now.
2586 (select_singlestep_lwp_callback): Ditto.
2587 (select_event_lwp_callback): Ditto.
2588 (cancel_breakpoints_callback): Ditto.
2589 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2591 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2592 (unsuspend_one_lwp): Update, "entry" parameter is a
2593 struct thread_info * now.
2594 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2596 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2597 Fetch lwpid from thread, not lwp.
2598 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2599 Pass &all_threads to find_inferior, not &all_lwps.
2600 (send_sigstop): Fetch lwpid from thread, not lwp.
2601 (send_sigstop_callback): Update, "entry" parameter is a
2602 struct thread_info * now.
2603 (suspend_and_send_sigstop_callback): Ditto.
2604 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2605 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2606 struct thread_info * now.
2607 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2609 (lwp_running): Update, "entry" parameter is a
2610 struct thread_info * now.
2611 (stop_all_lwps): Fetch ptid from thread.
2612 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2613 (linux_resume_one_lwp): Fetch lwpid from thread.
2614 (linux_set_resume_request): Update, "entry" parameter is a
2615 struct thread_info * now. Fetch pid, lwpid from thread.
2616 (resume_status_pending_p): Update, "entry" parameter is a
2617 struct thread_info * now.
2618 (need_step_over_p): Ditto. Fetch lwpid from thread.
2619 (start_step_over): Fetch lwpid from thread.
2620 (linux_resume_one_thread): Update, "entry" parameter is a
2621 struct thread_info * now. Fetch lwpid from thread.
2622 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2623 (proceed_one_lwp): Update, "entry" parameter is a
2624 struct thread_info * now. Fetch lwpid from thread.
2625 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2626 struct thread_info * now.
2627 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2628 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2629 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2631 (regsets_store_inferior_registers): Ditto.
2632 (fetch_register, store_register): Ditto.
2633 (linux_read_memory, linux_write_memory): Ditto.
2634 (linux_request_interrupt): Ditto.
2635 (linux_read_auxv): Ditto.
2636 (linux_xfer_siginfo): Ditto.
2637 (linux_qxfer_spu): Ditto.
2638 (linux_qxfer_libraries_svr4): Ditto.
2639 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2640 moved to inferiors.h.
2642 (get_thread_lwp): Update.
2643 (struct lwp_info): Delete member "entry". Simplify comment for
2646 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2647 current_inferior directly.
2648 (update_watch_registers_callback): Update, "entry" parameter is a
2649 struct thread_info * now. Fetch pid from thread.
2650 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2651 (mips_insert_point): Fetch lwpid from current_inferior.
2652 Pass &all_threads to find_inferior, not &all_lwps.
2653 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2654 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2656 (mips_stopped_data_address): Ditto.
2657 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2659 * linux-tile-low.c (tile_arch_setup): Ditto.
2660 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2661 (update_debug_registers_callback): Update, "entry" parameter is a
2662 struct thread_info * now. Fetch pid from thread.
2663 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2664 Pass &all_threads to find_inferior, not &all_lwps.
2665 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2666 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2667 Pass &all_threads to find_inferior, not &all_lwps.
2668 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2669 (i386_dr_low_get_status): Ditto.
2670 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2671 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2672 (x86_linux_read_description): Ditto.
2673 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2675 2014-02-20 Doug Evans <dje@google.com>
2677 * inferiors.c (get_first_inferior): Fix buglet.
2679 2014-02-19 Doug Evans <dje@google.com>
2681 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2682 * inferiors.c (add_thread): Change result type to struct thread_info *.
2683 All callers updated.
2684 (add_lwp): Call add_thread here instead of in callers.
2685 All callers updated.
2686 * linux-low.h (get_lwp_thread): Rewrite.
2687 (struct lwp_info): New member "thread".
2689 2014-02-19 Doug Evans <dje@google.com>
2691 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2692 All callers updated.
2694 2014-02-19 Doug Evans <dje@google.com>
2696 * inferiors.c (add_thread): Fix whitespace.
2698 2014-02-19 Doug Evans <dje@google.com>
2700 * dll.c (clear_dlls): Replace accessing list implemention details
2702 * gdbthread.h (get_first_thread): Declare.
2703 * inferiors.c (for_each_inferior_with_data): New function.
2704 (get_first_thread): New function.
2705 (find_thread_ptid): Simplify.
2706 (get_first_inferior): New function.
2707 (clear_list): Delete.
2708 (one_inferior_p): New function.
2709 (clear_inferior_list): New function.
2710 (clear_inferiors): Update.
2711 * inferiors.h (for_each_inferior_with_data): Declare.
2712 (clear_inferior_list): Declare.
2713 (one_inferior_p): Declare.
2714 (get_first_inferior): Declare.
2715 * linux-low.c (linux_wait_for_event): Replace accessing list
2716 implemention details with API function.
2717 * server.c (target_running): Ditto.
2718 (accumulate_file_name_length): New function.
2719 (emit_dll_description): New function.
2720 (handle_qxfer_libraries): Replace accessing list implemention
2721 details with API function.
2722 (handle_qxfer_threads_worker): New function.
2723 (handle_qxfer_threads_proper): Replace accessing list implemention
2724 details with API function.
2725 (handle_query): Ditto.
2726 (visit_actioned_threads_callback_ftype): New typedef.
2727 (visit_actioned_threads_data): New struct.
2728 (visit_actioned_threads): Rewrite to be find_inferior callback.
2729 (resume): Call find_inferior.
2730 (handle_status): Replace accessing list implemention
2731 details with API function.
2732 (process_serial_event): Replace accessing list implemention details
2734 * target.c (set_desired_inferior): Replace accessing list implemention
2735 details with API function.
2736 * tracepoint.c (same_process_p): New function.
2737 (gdb_agent_about_to_close): Replace accessing list implemention
2738 details with API function.
2739 * win32-low.c (child_delete_thread): Replace accessing list
2740 implemention details with API function.
2741 (match_dll_by_basename): New function.
2742 (dll_is_loaded_by_basename): New function.
2743 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2744 details call to dll_is_loaded_by_basename.
2746 2014-02-19 Doug Evans <dje@google.com>
2748 * dll.h (struct dll_info): Add comment.
2749 * gdbthread.h (struct thread_info): Add comment.
2750 (current_ptid): Simplify.
2751 * inferiors.c (add_process): Update.
2752 (remove_process): Update.
2753 * inferiors.h (struct process_info): Rename member "head" to "entry".
2754 * linux-low.c (delete_lwp): Update.
2756 (last_thread_of_process_p): Update.
2757 (kill_one_lwp_callback, linux_kill): Update.
2758 (status_pending_p_callback): Update.
2759 (wait_for_sigstop): Update. Simplify read of ptid.
2760 (start_step_over): Update.
2761 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2762 (get_lwp_thread): Update.
2763 (struct lwp_info): Rename member "head" to "entry".
2764 * regcache.h (inferior_list_entry): Delete.
2765 * server.c (kill_inferior_callback): Update.
2766 (detach_or_kill_inferior_callback): Update.
2767 (print_started_pid): Update.
2768 (print_attached_pid): Update.
2769 (process_serial_event): Simplify read of ptid.
2770 * thread-db.c (thread_db_create_event): Update.
2771 (thread_db_get_tls_address): Update.
2772 * win32-low.c (current_inferior_ptid): Simplify.
2774 2014-02-19 Tom Tromey <tromey@redhat.com>
2776 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2778 (target_supports_btrace): Update.
2780 2014-02-14 Yao Qi <yao@codesourcery.com>
2782 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2783 (rsp-low-ipa.o): New target.
2785 2014-02-12 Tom Tromey <tromey@redhat.com>
2787 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2788 convert_ascii_to_int.
2789 * regcache.c (registers_to_string): Likewise.
2790 * remote-utils.c (decode_M_packet): Likewise.
2791 * server.c (process_serial_event): Likewise.
2793 2014-02-12 Tom Tromey <tromey@redhat.com>
2795 * server.c (handle_query, handle_v_run): Use hex2bin, not
2797 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2799 2014-02-12 Tom Tromey <tromey@redhat.com>
2801 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2802 convert_int_to_ascii.
2803 * regcache.c (registers_to_string, collect_register_as_string):
2805 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2807 * server.c (process_serial_event): Likewise.
2808 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2809 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2811 2014-02-12 Tom Tromey <tromey@redhat.com>
2813 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2814 bin2hex, not hexify.
2815 * tracepoint.c (cmd_qtstatus): Likewise.
2817 2014-02-12 Tom Tromey <tromey@redhat.com>
2819 * remote-utils.c (monitor_output): Pass explicit length to
2822 2014-02-12 Tom Tromey <tromey@redhat.com>
2824 * tracepoint.c: Include rsp-low.h.
2825 * server.c: Include rsp-low.h.
2826 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2827 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2829 * remote-utils.c: Include rsp-low.h.
2830 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2831 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2832 (convert_int_to_ascii, convert_ascii_to_int): Move to
2834 * regcache.c: Include rsp-low.h.
2835 * ax.c: Include rsp-low.h.
2836 * Makefile.in (SFILES): Add common/rsp-low.c.
2837 (OBS): Add rsp-low.o.
2838 (rsp-low.o): New target.
2840 2014-02-12 Tom Tromey <tromey@redhat.com>
2842 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2843 Include print-utils.h.
2844 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2845 (plongest, thirty_two, phex_nz): Remove.
2846 * Makefile.in (SFILES): Add common/print-utils.c.
2847 (OBS): Add print-utils.o.
2848 (print-utils-ipa.o): New target.
2849 (print-utils.o): New target.
2850 (IPA_OBJS): Add print-utils-ipa.o.
2852 2014-02-06 Tom Tromey <tromey@redhat.com>
2854 * Makefile.in (SFILES): Fix indentation.
2856 2014-02-05 Doug Evans <dje@google.com>
2858 * linux-low.c (linux_wait_for_event): Improve comment.
2859 (linux_wait_1): Keep current_inferior in sync with event_child.
2861 2014-01-22 Doug Evans <dje@google.com>
2863 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2865 2014-01-22 Doug Evans <dje@google.com>
2867 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2868 * configure: Regenerate.
2869 * config.in: Regenerate.
2870 * Makefile.in (SFILES): Add debug.c.
2872 * debug.c: New file.
2873 * debug.h: New file.
2874 * linux-aarch64-low.c (*): Update all debugging printfs to use
2875 debug_printf instead of fprintf.
2876 * linux-arm-low.c (*): Ditto.
2877 * linux-cris-low.c (*): Ditto.
2878 * linux-crisv32-low.c (*): Ditto.
2879 * linux-m32r-low.c (*): Ditto.
2880 * linux-sparc-low.c (*): Ditto.
2881 * linux-x86.c (*): Ditto.
2882 * linux-low.c (*): Ditto.
2883 (linux_wait_1): Add calls to debug_enter, debug_exit.
2884 (linux_wait): Remove redundant debugging printf.
2885 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2886 (linux_resume, unstop_all_lwps): Ditto.
2887 * mem-break.c (*): Update all debugging printfs to use
2888 debug_printf instead of fprintf.
2889 * remote-utils.c (*): Ditto.
2890 * thread-db.c (*): Ditto.
2891 * server.c #include <ctype.h>, "gdb_vecs.h".
2892 (debug_threads): Moved to debug.c.
2893 (*): Update all debugging printfs to use debug_printf instead of
2895 (start_inferior): Replace call to fflush with call to debug_flush.
2896 (monitor_show_help): Mention set debug-format.
2897 (parse_debug_format_options): New function.
2898 (handle_monitor_command): Handle "monitor set debug-format".
2899 (gdbserver_usage): Mention --debug-format.
2900 (main): Parse --debug-format.
2901 * server.h (debug_threads): Declaration moved to debug.h.
2903 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2904 trace_debug_1 that uses debug_printf.
2905 (tracepoint_look_up_symbols): Update all debugging printfs to use
2906 debug_printf instead of fprintf.
2908 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2910 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2913 2014-01-17 Pedro Alves <palves@redhat.com>
2916 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2917 defined after including gdb_proc_service.h.
2919 2014-01-16 Doug Evans <dje@google.com>
2921 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2922 (match_dll): Use it.
2924 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2926 * target.h (target_ops) <read_btrace>: Change parameters and
2927 return type to allow error reporting.
2928 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2929 trace reading errors on.
2930 * linux-low.c (linux_low_read_btrace): Pass trace reading
2932 (linux_low_disable_btrace): New.
2934 2014-01-15 Doug Evans <dje@google.com>
2936 * inferiors.c (thread_id_to_gdb_id): Delete.
2937 * inferiors.h (thread_id_to_gdb_id): Delete.
2939 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2941 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2942 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2945 2014-01-08 Pedro Alves <palves@redhat.com>
2947 * server.c (handle_status): Don't discard previous queued stop
2948 replies or thread's pending status here.
2949 (main) <disconnection>: Do it here instead.
2951 2014-01-08 Pedro Alves <palves@redhat.com>
2953 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2954 * server.c (visit_actioned_threads, handle_pending_status): New
2956 (handle_v_cont): Factor out parts to ...
2957 (resume): ... this new function. If in all-stop, and a thread
2958 being resumed has a pending status, report it without actually
2960 (myresume): Adjust to use the new 'resume' function.
2961 (clear_pending_status_callback, set_pending_status_callback)
2962 (find_status_pending_thread_callback): New functions.
2963 (handle_status): Handle the case of multiple threads having
2964 interesting statuses to report. Report threads' real last signal
2965 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2966 with an interesting thread to report the status for, instead of
2967 always reporting the status of the first thread.
2969 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2971 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2972 * gdbreplay.c (gdbreplay_version): Likewise.
2974 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2976 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2977 iov.iov_len with the real length in use.
2979 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2981 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2982 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2983 for all targets that use win32-low.c.
2984 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2985 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2987 2013-12-13 Pedro Alves <palves@redhat.com>
2989 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2990 if equal to TARGET_WAITKIND_LOADED.
2991 * win32-low.c (cached_status): New static global.
2992 (win32_wait): Add declaration.
2993 (do_initial_child_stuff): Flush all initial pending debug events
2994 up to the initial breakpoint.
2995 (win32_wait): If CACHED_STATUS was set, return that instead
2996 of doing a real wait. Remove the code resuming the execution
2997 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2998 during the initial phase. Also remove the code changing
2999 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3000 TARGET_WAITKIND_STOPPED.
3002 2013-12-11 Yao Qi <yao@codesourcery.com>
3004 * notif.c (handle_notif_ack): Return 0 if no notification
3007 2013-11-20 Doug Evans <dje@google.com>
3009 * linux-low.c (linux_set_resume_request): Fix comment.
3011 2013-11-20 Doug Evans <dje@google.com>
3013 * linux-low.c (resume_status_pending_p): Tweak comment.
3015 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3017 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3018 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3019 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3020 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3021 (srv_amd64_regobj): Add amd64-mpx.o.
3022 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3023 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3024 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3025 * i387-fp.c (num_pl_bnd_register) Added constant.
3026 (num_pl_bnd_cfg_registers) Added constant.
3027 (struct i387_xsave) Added reserved area and MPX fields.
3028 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3029 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3031 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3032 (init_registers_amd64_mpx_linux): Declare new function.
3033 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3034 (x86_64_regmap): Add MPX registers.
3035 (x86_linux_read_description): Add MPX case.
3036 (initialize_low_arch): Initialize MPX targets.
3038 2013-11-18 Tom Tromey <tromey@redhat.com>
3040 * configure: Rebuild.
3041 * configure.ac: Don't check for stdlib.h.
3042 * gdbreplay.c: Unconditionally include stdlib.h.
3044 2013-11-18 Tom Tromey <tromey@redhat.com>
3046 * config.in: Rebuild.
3047 * configure: Rebuild.
3048 * configure.ac: Don't use AC_HEADER_DIRENT.
3050 2013-11-18 Tom Tromey <tromey@redhat.com>
3052 * server.h: Don't check HAVE_STRING_H.
3053 * gdbreplay.c: Don't check HAVE_STRING_H.
3054 * configure: Rebuild.
3056 2013-11-18 Tom Tromey <tromey@redhat.com>
3058 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3061 2013-11-08 Tom Tromey <tromey@redhat.com>
3063 * configure, config.in: Rebuild.
3064 * configure.ac: Remove unused configury.
3066 2013-11-08 Tom Tromey <tromey@redhat.com>
3068 * acinclude.m4: Include common.m4, codeset.m4.
3069 * configure, config.in: Rebuild.
3070 * configure.ac: Use GDB_AC_COMMON.
3072 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3074 * linux-s390-low.c (HWCAP_S390_TE): New define.
3075 (s390_arch_setup): Consider the TE field in the HWCAP for
3076 determining 'have_regset_tdb'.
3078 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3081 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3084 2013-10-02 Pedro Alves <palves@redhat.com>
3086 * server.c (process_serial_event): Don't output "GDBserver
3087 exiting" if GDB is connected through stdio.
3088 * target.c (mywait): Likewise, be silent if GDB is connected
3091 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3093 * lynx-low.c (lynx_add_threads_after_attach): New function.
3094 (lynx_attach): Remove call to add_thread. Add call to
3095 lynx_add_threads_after_attach instead.
3097 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3099 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3100 * config.in, configure: Regenerated.
3102 2013-09-18 Yao Qi <yao@codesourcery.com>
3105 * server.c (start_inferior): Clear 'resume_info'.
3107 2013-09-16 Jiong Wang <jiwang@tilera.com>
3109 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3112 2013-09-16 Jiong Wang <jiwang@tilera.com>
3114 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3115 linux-tile-low.o to srv_tgtobj.
3117 2013-09-16 Will Newton <will.newton@linaro.org>
3119 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3122 2013-09-06 Pedro Alves <palves@redhat.com>
3124 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3125 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3126 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3127 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3128 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3129 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3131 2013-09-06 Pedro Alves <palves@redhat.com>
3133 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3134 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3136 2013-09-06 Pedro Alves <palves@redhat.com>
3138 * linux-amd64-ipa.c: Include tracepoint.h.
3139 * linux-i386-ipa.c: Include tracepoint.h.
3141 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3143 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3144 (ps_get_thread_area): New function.
3146 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3148 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3149 (initialize_low_arch): Call init_registers_crisv32 rather than
3150 init_register_crisv32.
3152 2013-09-05 Pedro Alves <palves@redhat.com>
3154 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3156 * hostio.h: ... this new file.
3157 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3158 win32-low.c: Include hostio.h.
3160 2013-09-05 Pedro Alves <palves@redhat.com>
3162 * server.h (gdb_client_data, handler_func, callback_handler_func)
3163 (delete_file_handler, add_file_handler, append_callback_event)
3164 (delete_callback_event, start_event_loop, initialize_event_loop):
3165 Move to event-loop.h and include it.
3166 * event-loop.h: New file.
3168 2013-09-05 Pedro Alves <palves@redhat.com>
3170 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3171 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3172 (loaded_dll, unloaded_dll): Move to ...
3173 * dll.h: ... this new file.
3174 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3176 2013-09-05 Pedro Alves <palves@redhat.com>
3178 * server.h (current_process, get_thread_process, all_processes)
3179 (add_inferior_to_list, for_each_inferior, current_inferior)
3180 (remove_inferior, add_process, remove_process, find_process_pid)
3181 (have_started_inferiors_p, have_attached_inferiors_p)
3182 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3183 (clear_inferiors, find_inferior, find_inferior_id)
3184 (inferior_target_data, set_inferior_target_data)
3185 (inferior_regcache_data, set_inferior_regcache_data): Move to
3186 inferiors.h, and include it.
3187 * inferiors.h: New file.
3189 2013-09-05 Pedro Alves <palves@redhat.com>
3191 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3195 2013-09-05 Pedro Alves <palves@redhat.com>
3197 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3199 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3200 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3201 (handle_tracepoint_general_set, handle_tracepoint_query)
3202 (tracepoint_finished_step, tracepoint_was_hit)
3203 (release_while_stepping_state_list, current_traceframe)
3204 (in_readonly_region, traceframe_read_mem)
3205 (fetch_traceframe_registers, traceframe_read_sdata)
3206 (traceframe_read_info, struct fast_tpoint_collect_status)
3207 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3208 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3209 (supply_fast_tracepoint_registers)
3210 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3211 (ipa_tdesc, claim_trampoline_space)
3212 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3213 (agent_mem_read, agent_get_trace_state_variable_value)
3214 (agent_set_trace_state_variable_value, agent_tsv_read)
3215 (agent_mem_read_string, get_raw_reg_func_addr)
3216 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3217 * tracepoint.h: ... this new file.
3219 2013-09-05 Pedro Alves <palves@redhat.com>
3221 * server.h (perror_with_name, error, fatal, warning, paddress)
3222 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3224 * utils.h: New file.
3226 2013-09-05 Pedro Alves <palves@redhat.com>
3228 * server.h (remote_debug, noack_mode, transport_is_reliable)
3229 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3230 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3231 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3232 (write_enn, initialize_async_io, enable_async_io)
3233 (disable_async_io, check_remote_input_interrupt_request)
3234 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3235 (dead_thread_notify, prepare_resume_reply)
3236 (decode_address_to_semicolon, decode_address, decode_m_packet)
3237 (decode_M_packet, decode_X_packet, decode_xfer_write)
3238 (decode_search_memory_packet, unhexify, hexify)
3239 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3240 (look_up_one_symbol, relocate_instruction)
3241 (monitor_output): Move to remote-utils.h, and include it.
3242 * remote-utils.h: New file.
3244 2013-09-05 Pedro Alves <palves@redhat.com>
3246 * server.h (_): Delete.
3248 2013-09-02 Pedro Alves <palves@redhat.com>
3250 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3251 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3253 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3255 2013-09-02 Pierre Muller <muller@sourceware.org>
3257 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3258 or WriteProcessMemory complete successfully and handle
3259 ERROR_PARTIAL_COPY error.
3261 2013-09-02 Pedro Alves <palves@redhat.com>
3263 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3264 error instead of EIO.
3266 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3269 * linux-low.c: Include filestuff.h.
3270 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3271 * lynx-low.c: Include filestuff.h.
3272 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3273 * server.c: Include filestuff.h.
3274 (main): Call notice_open_fds.
3275 * spu-low.c: Include filestuff.h.
3276 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3278 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3280 * Makefile.in: Explain why ../target and ../nat are not
3281 listed as include file search paths.
3282 (linux-waitpid.o): New object file rule.
3283 * configure.srv (srv_native_linux_obj): New variable.
3284 Replace all occurrences of linux native object files with
3285 $srv_native_linux_obj.
3286 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3287 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3288 (linux_enable_event_reporting): Remove declaration.
3289 (my_waitpid): Moved to common/linux-waitpid.c.
3290 (linux_wait_for_event): Pass ptid when calling
3291 linux_enable_event_reporting.
3292 (linux_supports_tracefork_flag): Remove.
3293 (linux_enable_event_reporting): Likewise.
3294 (linux_tracefork_grandchild): Remove.
3295 (STACK_SIZE): Moved to common/linux-ptrace.c.
3296 (linux_tracefork_child): Remove.
3297 (linux_test_for_tracefork): Remove.
3298 (linux_look_up_symbols): Call linux_supports_traceclone.
3299 (initialize_low): Remove call to linux_test_for_tracefork.
3300 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3301 common/linux-ptrace.h.
3302 (PTRACE_TYPE_ARG4): Likewise.
3303 Include linux-ptrace.h.
3305 2013-08-21 Pedro Alves <palves@redhat.com>
3307 * config.in: Renegerate.
3309 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3311 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3312 (SFILES): Remove $(srcdir)/common/target-common.c and
3313 add $(srcdir)/target/waitstatus.c.
3314 (OBS): Remove target-common.o and add waitstatus.o.
3315 (server_h): Remove $(srcdir)/../common/target-common.h and
3316 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3317 and $(srcdir)/../target/waitstatus.h.
3318 (target-common.o): Remove.
3319 (waitstatus.o): New target object file.
3320 * target.h: Do not include target-common.h and
3321 include target/resume.h, target/wait.h and
3322 target/waitstatus.h.
3324 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3326 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3327 to PTRACE_TYPE_ARG3.
3328 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3329 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3331 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3332 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3334 2013-07-27 Jie Zhang <jie@codesourcery.com>
3335 Daniel Jacobowitz <dan@codesourcery.com>
3336 Yao Qi <yao@codesourcery.com>
3338 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3339 (mips-linux-watch.o): New rule.
3340 (mips_linux_watch_h): New variable.
3341 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3343 * linux-mips-low.c: Include mips-linux-watch.h.
3344 (struct arch_process_info, struct arch_lwp_info): New.
3345 (update_watch_registers_callback): New function.
3346 (mips_linux_new_process, mips_linux_new_thread) New functions.
3347 (mips_linux_prepare_to_resume, mips_insert_point): New
3349 (mips_remove_point, mips_stopped_by_watchpoint): New
3351 (rsp_bp_type_to_target_hw_bp_type): New function.
3352 (mips_stopped_data_address): New function.
3353 (the_low_target): Add watchpoint support functions.
3355 2013-07-27 Yao Qi <yao@codesourcery.com>
3357 * i386-low.c: Include break-common.h.
3358 (enum target_hw_bp_type): Remove.
3360 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3362 * Makefile.in (SFILES): /common/target-common.c.
3363 (OBS): Add target-common.o.
3364 (server_h): Add $(srcdir)/../common/target-common.h.
3365 (target-common.o): New target.
3366 * server.c (queue_stop_reply_callback): Free
3367 status string after use.
3368 * target.c (target_waitstatus_to_string): Remove.
3369 * target.h: Include target-common.h.
3370 (resume_kind): Likewise.
3371 (target_waitkind): Likewise.
3372 (target_waitstatus): Likewise.
3373 (TARGET_WNOHANG): Likewise.
3375 2013-07-04 Yao Qi <yao@codesourcery.com>
3377 * Makefile.in (host_alias): Use @host_noncanonical@.
3378 (target_alias): Use @target_noncanonical@.
3379 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3380 ACX_NONCANONICAL_HOST.
3381 * configure: Regenerated.
3384 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3386 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3387 * configure: Rebuild.
3388 * Makefile.in (version_host, version_target): Get from configure.
3389 (version.c): Use $(version_host) and $(version_target).
3391 2013-07-03 Pedro Alves <palves@redhat.com>
3393 * Makefile.in (config.status): Depend on development.sh.
3394 * acinclude.m4: Include libmcheck.m4.
3395 * configure: Regenerate.
3397 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3399 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3400 attribute inside the parentheses.
3401 (winapi_DebugSetProcessKillOnExit): Ditto.
3402 (winapi_DebugBreakProcess): Ditto.
3403 (winapi_GenerateConsoleCtrlEvent): Ditto.
3405 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3407 * notif.h (notif_event): Add a dummy member to avoid compiler
3410 2013-07-01 Pedro Alves <palves@redhat.com>
3412 * hostio.c (HOSTIO_PATH_MAX): Define.
3413 (require_filename, handle_open, handle_unlink, handle_readlink):
3416 2013-07-01 Pedro Alves <palves@redhat.com>
3418 * server.h: Include "pathmax.h".
3419 * linux-low.c: Don't include sys/param.h.
3420 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3422 * win32-low.c: Don't include sys/param.h.
3423 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3425 2013-07-01 Pedro Alves <palves@redhat.com>
3427 * event-loop.c: Don't check HAVE_UNISTD_H before including
3429 * gdbreplay.c: Likewise.
3430 * remote-utils.c: Likewise.
3431 * server.c: Likewise.
3432 * configure.ac: Don't check for unistd.h.
3433 * configure: Regenerate.
3435 2013-06-28 Tom Tromey <tromey@redhat.com>
3437 * Makefile.in (version.c): Use version.in, not
3440 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3442 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3443 * configure: Rebuild.
3444 * Makefile.in (version_host, version_target): Get from configure.
3445 (version.c): Use $(version_host) and $(version_target).
3447 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3449 Fix trace-status to output user name without trailing colon.
3450 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3452 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3454 Fix trace-status to output proper start-time and stop-time.
3455 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3456 output start time and stop time in hex as gdb expects.
3458 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3460 * tracepoint.c (build_traceframe_info_xml): Output trace state
3461 variables present in the trace buffer.
3463 2013-06-24 Tom Tromey <tromey@redhat.com>
3465 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3467 (version.o): Remove.
3468 * gdbreplay.c: Include version.h.
3469 (version, host_name): Don't declare.
3470 * server.h: Include version.h.
3471 (version, host_name): Don't declare.
3473 2013-06-12 Pedro Alves <palves@redhat.com>
3475 * linux-x86-low.c (linux_is_elf64): Delete global.
3476 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3477 with local linux_pid_exe_is_elf_64_file use.
3479 2013-06-11 Pedro Alves <palves@redhat.com>
3481 * linux-low.c (regset_disabled, disable_regset): New functions.
3482 (regsets_fetch_inferior_registers)
3483 (regsets_store_inferior_registers): Use them.
3484 (initialize_regsets_info); Don't allocate the disabled_regsets
3486 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3489 2013-06-11 Pedro Alves <palves@redhat.com>
3491 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3494 2013-06-11 Pedro Alves <palves@redhat.com>
3496 * linux-x86-low.c (initialize_low_arch): Call
3497 init_registers_x32_avx_linux.
3499 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3501 Fix compatibility with Android Bionic.
3502 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3505 2013-06-07 Pedro Alves <palves@redhat.com>
3508 * Makefile.in (OBS): Add tdesc.o.
3509 (IPA_OBJS): Add tdesc-ipa.o.
3510 (tdesc-ipa.o): New rule.
3511 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3513 * linux-low.c (new_inferior): Delete.
3514 (disabled_regsets, num_regsets): Delete.
3515 (linux_add_process): Adjust to set the new per-process
3517 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3518 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3519 was a stop. When calling arch_setup, switch the current inferior
3520 to the thread that got an event.
3521 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3522 (regsets_fetch_inferior_registers)
3523 (regsets_store_inferior_registers): New regsets_info parameter.
3525 (linux_register_in_regsets): New regs_info parameter. Adjust to
3527 (register_addr, fetch_register, store_register): New usrregs_info
3528 parameter. Adjust to use it.
3529 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3530 parameter regs_info. Adjust to use it.
3531 (linux_fetch_registers): Get the current inferior's regs_info, and
3533 (linux_store_registers): Ditto.
3534 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3535 (initialize_low): Don't initialize the target_regsets here. Call
3536 initialize_low_arch.
3537 * linux-low.h (target_regsets): Delete declaration.
3538 (struct regsets_info): New.
3539 (struct usrregs_info): New.
3540 (struct regs_info): New.
3541 (struct process_info_private) <new_inferior>: New field.
3542 (struct linux_target_ops): Delete the num_regs, regmap, and
3543 regset_bitmap fields. New field regs_info.
3544 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3545 * i387-fp.c (num_xmm_registers): Delete.
3546 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3547 calls to new interface.
3548 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3549 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3550 Infer the number of xmm registers from the regcache's target
3552 * i387-fp.h (num_xmm_registers): Delete.
3553 * inferiors.c (add_thread): Don't install the thread's regcache
3555 * proc-service.c (gregset_info): Fetch the current inferior's
3556 regs_info. Adjust to use it.
3557 * regcache.c: Include tdesc.h.
3558 (register_bytes, reg_defs, num_registers)
3559 (gdbserver_expedite_regs): Delete.
3560 (get_thread_regcache): If the thread doesn't have a regcache yet,
3561 create one, instead of aborting gdbserver.
3562 (regcache_invalidate_one): Rename to ...
3563 (regcache_invalidate_thread): ... this.
3564 (regcache_invalidate_one): New.
3565 (regcache_invalidate): Only invalidate registers of the current
3567 (init_register_cache): Add target_desc parameter, and use it.
3568 (new_register_cache): Ditto. Assert the target description has a
3569 non zero registers_size.
3570 (regcache_cpy): Add assertions. Adjust.
3571 (realloc_register_cache, set_register_cache): Delete.
3572 (registers_to_string, registers_from_string): Adjust.
3573 (find_register_by_name, find_regno, find_register_by_number)
3574 (register_cache_size): Add target_desc parameter, and use it.
3575 (free_register_cache_thread, free_register_cache_thread_one)
3576 (regcache_release, register_cache_size): New.
3577 (register_size): Add target_desc parameter, and use it.
3578 (register_data, supply_register, supply_register_zeroed)
3579 (supply_regblock, supply_register_by_name, collect_register)
3580 (collect_register_as_string, collect_register_by_name): Adjust.
3581 * regcache.h (struct target_desc): Forward declare.
3582 (struct regcache) <tdesc>: New field.
3583 (init_register_cache, new_register_cache): Add target_desc
3585 (regcache_invalidate_thread): Declare.
3586 (regcache_invalidate_one): Delete declaration.
3587 (regcache_release): Declare.
3588 (find_register_by_number, register_cache_size, register_size)
3589 (find_regno): Add target_desc parameter.
3590 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3592 * remote-utils.c: Include tdesc.h.
3593 (outreg, prepare_resume_reply): Adjust.
3594 * server.c: Include tdesc.h.
3595 (gdbserver_xmltarget): Delete declaration.
3596 (get_features_xml, process_serial_event): Adjust.
3597 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3599 (struct process_info) <tdesc>: New field.
3600 (ipa_tdesc): Declare.
3601 * tdesc.c: New file.
3602 * tdesc.h: New file.
3603 * tracepoint.c: Include tdesc.h.
3604 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3605 (get_context_regcache): Adjust to pass ipa_tdesc down.
3606 (do_action_at_tracepoint): Adjust to get the register cache size
3607 from the context regcache's description.
3608 (traceframe_walk_blocks): Adjust to get the register cache size
3609 from the current trace frame's description.
3610 (traceframe_get_pc): Adjust to get current trace frame's
3611 description and pass it down.
3612 (gdb_collect): Adjust to get the register cache size from the
3614 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3615 (gdbserver_xmltarget): Delete.
3616 (initialize_low_tracepoint): Set the ipa's target description.
3617 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3618 (initialize_low_tracepoint): Set the ipa's target description.
3619 * linux-x86-low.c: Include tdesc.h.
3620 [__x86_64__] (is_64bit_tdesc): New.
3621 (ps_get_thread_area, x86_get_thread_area): Use it.
3622 (i386_cannot_store_register): Rename to ...
3623 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3624 (i386_cannot_fetch_register): Rename to ...
3625 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3626 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3628 (target_regsets): Rename to ...
3629 (x86_regsets): ... this.
3630 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3632 (x86_siginfo_fixup): Use is_64bit_tdesc.
3633 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3634 (tdesc_x32_avx_linux, tdesc_x32_linux)
3635 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3637 (x86_linux_update_xmltarget): Delete.
3638 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3639 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3640 (AMD64_LINUX_USER64_CS): New.
3641 (x86_linux_read_description): New, based on
3642 x86_linux_update_xmltarget.
3643 (same_process_callback): New.
3644 (x86_arch_setup_process_callback): New.
3645 (x86_linux_update_xmltarget): New.
3646 (x86_regsets_info): New.
3647 (amd64_linux_regs_info): New.
3648 (i386_linux_usrregs_info): New.
3649 (i386_linux_regs_info): New.
3650 (x86_linux_regs_info): New.
3651 (x86_arch_setup): Reimplement.
3652 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3653 (x86_emit_ops): Ditto.
3654 (the_low_target): Adjust. Install x86_linux_regs_info,
3655 x86_cannot_fetch_register, and x86_cannot_store_register.
3656 (initialize_low_arch): New.
3657 * linux-ia64-low.c (tdesc_ia64): Declare.
3658 (ia64_fetch_register): Adjust.
3659 (ia64_usrregs_info, regs_info): New globals.
3660 (ia64_regs_info): New function.
3661 (the_low_target): Adjust.
3662 (initialize_low_arch): New function.
3663 * linux-sparc-low.c (tdesc_sparc64): Declare.
3664 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3666 (sparc_arch_setup): New function.
3667 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3668 (the_low_target): Adjust.
3669 (initialize_low_arch): New function.
3670 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3671 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3672 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3673 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3674 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3675 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3676 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3677 (tdesc_powerpc_isa205_vsx64l): Declare.
3678 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3679 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3680 (ppc_set_pc, ppc_get_hwcap): Adjust.
3681 (ppc_usrregs_info): Forward declare.
3682 (!__powerpc64__) ppc_regmap_adjusted: New global.
3683 (ppc_arch_setup): Adjust to the current process'es target
3685 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3686 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3687 (ppc_store_evrregset): Adjust.
3688 (target_regsets): Rename to ...
3689 (ppc_regsets): ... this, and make static.
3690 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3691 (ppc_regs_info): New function.
3692 (the_low_target): Adjust.
3693 (initialize_low_arch): New function.
3694 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3695 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3696 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3697 (tdesc_s390x_linux64v2): Declare.
3698 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3699 (s390_fill_gregset, s390_store_last_break): Adjust.
3700 (target_regsets): Rename to ...
3701 (s390_regsets): ... this, and make static.
3702 (s390_get_pc, s390_set_pc): Adjust.
3703 (s390_get_hwcap): New target_desc parameter, and use it.
3704 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3705 (s390_arch_setup): Adjust to set the current process'es target
3706 description. Don't adjust the regmap.
3707 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3708 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3709 (regs_info_3264): New globals.
3710 (s390_regs_info): New function.
3711 (the_low_target): Adjust.
3712 (initialize_low_arch): New function.
3713 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3714 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3715 [__mips64] (init_registers_mips_linux)
3716 (init_registers_mips_dsp_linux): Delete defines.
3717 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3718 (have_dsp): New global.
3719 (mips_read_description): New, based on mips_arch_setup.
3720 (mips_arch_setup): Reimplement.
3721 (get_usrregs_info): New function.
3722 (mips_cannot_fetch_register, mips_cannot_store_register)
3723 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3724 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3725 (target_regsets): Rename to ...
3726 (mips_regsets): ... this, and make static.
3727 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3728 (dsp_regs_info, regs_info): New globals.
3729 (mips_regs_info): New function.
3730 (the_low_target): Adjust.
3731 (initialize_low_arch): New function.
3732 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3733 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3735 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3736 (arm_read_description): New, with bits factored from
3738 (arm_arch_setup): Reimplement.
3739 (target_regsets): Rename to ...
3740 (arm_regsets): ... this, and make static.
3741 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3742 (arm_regs_info): New function.
3743 (the_low_target): Adjust.
3744 (initialize_low_arch): New function.
3745 * linux-m68k-low.c (tdesc_m68k): Declare.
3746 (target_regsets): Rename to ...
3747 (m68k_regsets): ... this, and make static.
3748 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3749 (m68k_regs_info): New function.
3750 (m68k_arch_setup): New function.
3751 (the_low_target): Adjust.
3752 (initialize_low_arch): New function.
3753 * linux-sh-low.c (tdesc_sharch): Declare.
3754 (target_regsets): Rename to ...
3755 (sh_regsets): ... this, and make static.
3756 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3757 (sh_regs_info, sh_arch_setup): New functions.
3758 (the_low_target): Adjust.
3759 (initialize_low_arch): New function.
3760 * linux-bfin-low.c (tdesc_bfin): Declare.
3761 (bfin_arch_setup): New function.
3762 (bfin_usrregs_info, regs_info): New globals.
3763 (bfin_regs_info): New function.
3764 (the_low_target): Adjust.
3765 (initialize_low_arch): New function.
3766 * linux-cris-low.c (tdesc_cris): Declare.
3767 (cris_arch_setup): New function.
3768 (cris_usrregs_info, regs_info): New globals.
3769 (cris_regs_info): New function.
3770 (the_low_target): Adjust.
3771 (initialize_low_arch): New function.
3772 * linux-cris-low.c (tdesc_crisv32): Declare.
3773 (cris_arch_setup): New function.
3774 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3775 (cris_regs_info): New function.
3776 (the_low_target): Adjust.
3777 (initialize_low_arch): New function.
3778 * linux-m32r-low.c (tdesc_m32r): Declare.
3779 (m32r_arch_setup): New function.
3780 (m32r_usrregs_info, regs_info): New globals.
3781 (m32r_regs_info): Adjust.
3782 (initialize_low_arch): New function.
3783 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3784 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3785 (tic6x_usrregs_info): Forward declare.
3786 (tic6x_read_description): New function, based on ...
3787 (tic6x_arch_setup): ... this. Reimplement.
3788 (target_regsets): Rename to ...
3789 (tic6x_regsets): ... this, and make static.
3790 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3791 (tic6x_regs_info): New function.
3792 (the_low_target): Adjust.
3793 (initialize_low_arch): New function.
3794 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3795 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3796 (target_regsets): Rename to ...
3797 (xtensa_regsets): ... this, and make static.
3798 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3800 (xtensa_arch_setup, xtensa_regs_info): New functions.
3801 (the_low_target): Adjust.
3802 (initialize_low_arch): New function.
3803 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3804 (nios2_arch_setup): Set the current process'es tdesc.
3805 (target_regsets): Rename to ...
3806 (nios2_regsets): ... this.
3807 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3808 (nios2_regs_info): New function.
3809 (the_low_target): Adjust.
3810 (initialize_low_arch): New function.
3811 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3812 (aarch64_arch_setup): Set the current process'es tdesc.
3813 (target_regsets): Rename to ...
3814 (aarch64_regsets): ... this.
3815 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3816 (aarch64_regs_info): New function.
3817 (the_low_target): Adjust.
3818 (initialize_low_arch): New function.
3819 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3821 (target_regsets): Rename to ...
3822 (tile_regsets): ... this.
3823 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3824 (tile_regs_info): New function.
3825 (tile_arch_setup): Set the current process'es tdesc.
3826 (the_low_target): Adjust.
3827 (initialize_low_arch): New function.
3828 * spu-low.c (tdesc_spu): Declare.
3829 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3830 * win32-arm-low.c (tdesc_arm): Declare.
3831 (arm_arch_setup): New function.
3832 (the_low_target): Install arm_arch_setup instead of
3834 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3835 (init_windows_x86): Rename to ...
3836 (i386_arch_setup): ... this. Set `win32_tdesc'.
3837 (the_low_target): Adjust.
3838 * win32-low.c (win32_tdesc): New global.
3839 (child_add_thread): Don't create the thread cache here.
3840 (do_initial_child_stuff): Set the new process'es tdesc.
3841 * win32-low.h (struct target_desc): Forward declare.
3842 (win32_tdesc): Declare.
3843 * lynx-i386-low.c (tdesc_i386): Declare global.
3844 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3845 * lynx-low.c (lynx_tdesc): New global.
3846 (lynx_add_process): Set the new process'es tdesc.
3847 * lynx-low.h (struct target_desc): Forward declare.
3848 (lynx_tdesc): Declare global.
3849 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3850 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3851 * nto-low.c (nto_tdesc): New global.
3852 (do_attach): Set the new process'es tdesc.
3853 * nto-low.h (struct target_desc): Forward declare.
3854 (nto_tdesc): Declare.
3855 * nto-x86-low.c (tdesc_i386): Declare.
3856 (nto_x86_arch_setup): Set `nto_tdesc'.
3858 2013-06-04 Gary Benson <gbenson@redhat.com>
3860 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3861 to qSupported response when appropriate.
3862 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3863 with nonzero-length annex.
3864 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3865 arguments supplied in annex.
3867 2013-05-31 Doug Evans <dje@google.com>
3870 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3871 64 bits in 64-cross-32 environment.
3873 2013-05-28 Pedro Alves <palves@redhat.com>
3875 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3876 (aarch64-without-fpu.c): Delete rule.
3877 * configure.srv (aarch64*-*-linux*): Remove references to
3878 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3879 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3882 2013-05-24 Pedro Alves <palves@redhat.com>
3884 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3885 instead of strchr/decode_address. Error if the range isn't split
3886 with a ','. Don't assume there's be a ':' in the action.
3888 2013-05-23 Yao Qi <yao@codesourcery.com>
3889 Pedro Alves <palves@redhat.com>
3891 * linux-low.c (lwp_in_step_range): New function.
3892 (linux_wait_1): If the thread was range stepping and stopped
3893 outside the stepping range, report the stop to GDB. Otherwise,
3894 continue stepping. Add range stepping debug output.
3895 (linux_set_resume_request): Copy the step range from the resume
3897 (linux_supports_range_stepping): New.
3898 (linux_target_ops) <supports_range_stepping>: Set to
3899 linux_supports_range_stepping.
3900 * linux-low.h (struct linux_target_ops)
3901 <supports_range_stepping>: New field.
3902 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3903 * linux-x86-low.c (x86_supports_range_stepping): New.
3904 (the_low_target) <supports_range_stepping>: Set to
3905 x86_supports_range_stepping.
3906 * server.c (handle_v_cont): Handle 'r' action.
3907 (handle_v_requests): Append ";r" if the target supports range
3909 * target.h (struct thread_resume) <step_range_start,
3910 step_range_end>: New fields.
3911 (struct target_ops) <supports_range_stepping>:
3913 (target_supports_range_stepping): New macro.
3915 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3917 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3918 confusion in comment.
3920 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3922 * lynx-low.c (struct process_info_private): New type.
3923 (lynx_add_process): New function.
3924 (lynx_create_inferior, lynx_attach): Replace calls to
3925 add_process by calls to lynx_add_process.
3926 (lynx_resume): If PTID is null, then try using
3927 current_process()->private->last_wait_event_ptid.
3929 (lynx_clear_inferiors): Delete. The contents of that function
3930 has been inlined in lynx_mourn;
3931 (lynx_wait_1): Save the ptid in the process's private data.
3932 (lynx_mourn): Free the process' private data. Replace call
3933 to lynx_clear_inferiors by call to clear_inferiors.
3935 2013-05-17 Yao Qi <yao@codesourcery.com>
3937 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3940 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3942 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3943 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3944 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3945 PT_TEXT_END_ADDR guards. Update comments.
3946 (linux_target_op) <read_offsets>: Conditionally define to
3947 linux_read_offsets if the target is UCLIBC and if it defines
3948 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3950 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3951 Andrew Jenner <andrew@codesourcery.com>
3953 * Makefile.in (SFILES): Add linux-nios2-low.c.
3954 (clean): Add action to delete nios2-linux.c.
3955 (nios2-linux.c): New rule.
3956 * configure.srv: Add nios2*-*-linux*.
3957 * linux-nios2-low.c: New.
3959 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3961 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3963 2013-04-25 Hui Zhu <hui@codesourcery.com>
3966 * ax.c (ax_printf): Add fflush.
3968 2013-04-22 Tom Tromey <tromey@redhat.com>
3970 * Makefile.in (SFILES): Add filestuff.c.
3971 (OBS): Add filestuff.o.
3972 (filestuff.o): New target.
3973 * config.in, configure: Rebuild.
3974 * configure.ac: Check for fdwalk, pipe2.
3976 2013-04-17 Pedro Alves <palves@redhat.com>
3978 * configure.ac (USE_THREAD_DB): Delete variable.
3979 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3980 Don't AC_SUBST USE_THREAD_DB.
3981 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3982 * config.in, configure: Regenerate.
3984 2013-04-16 Pedro Alves <palves@redhat.com>
3986 * linux-low.h (struct lwp_info) <thread_known>: Move under
3987 the USE_THREAD_DB #ifdef.
3989 2013-04-16 Pedro Alves <palves@redhat.com>
3991 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3992 (linux-low.o): Delete rule.
3993 * linux-low.h: Always include "gdb_thread_db.h" instead of
3994 conditionally including thread_db.h.
3995 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3998 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4000 * Makefile.in (install-only): Fix make install regression.
4002 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4004 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4005 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4007 * gdbserver.1: Remove.
4009 2013-03-22 Pedro Alves <palves@redhat.com>
4011 * linux-low.c (handle_extended_wait): Don't call
4012 linux_enable_event_reporting.
4014 2013-03-15 Tony Theodore <tonyt@logyst.com>
4017 * Makefile.in (SHELL): Use @SHELL@.
4019 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4021 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4024 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4026 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4027 Remove extraneous NULL element.
4029 2013-03-13 Yao Qi <yao@codesourcery.com>
4031 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4032 'V' block in trace frame.
4034 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4036 * target.h (struct target_ops): Add btrace ops.
4037 (target_supports_btrace): New macro.
4038 (target_enable_btrace): New macro.
4039 (target_disable_btrace): New macro.
4040 (target_read_btrace): New macro.
4041 * gdbthread.h (struct thread_info): Add btrace field.
4042 * server.c: Include btrace-common.h.
4043 (handle_btrace_general_set): New function.
4044 (handle_btrace_enable): New function.
4045 (handle_btrace_disable): New function.
4046 (handle_general_set): Call handle_btrace_general_set.
4047 (handle_qxfer_btrace): New function.
4048 (struct qxfer qxfer_packets[]): Add btrace entry.
4049 * inferiors.c (remove_thread): Disable btrace.
4050 * linux-low: Include linux-btrace.h.
4051 (linux_low_enable_btrace): New function.
4052 (linux_low_read_btrace): New function.
4053 (linux_target_ops): Add btrace ops.
4054 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4055 Add srv_linux_btrace=yes.
4056 (x86_64-*-linux*): Add linux-btrace.o.
4057 Add srv_linux_btrace=yes.
4058 * configure.ac: Define HAVE_LINUX_BTRACE.
4059 * config.in: Regenerated.
4060 * configure: Regenerated.
4062 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4064 * server.c (handle_qxfer): Preserve error message if -3 is
4066 (qxfer): Document the -3 return value.
4068 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4070 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4071 (linux_btrace_h): New variable.
4072 (linux-btrace.o): New rule.
4074 2013-03-08 Stan Shebs <stan@codesourcery.com>
4075 Hafiz Abid Qadeer <abidh@codesourcery.com>
4077 * tracepoint.c (trace_buffer_size): New global.
4078 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4079 (init_trace_buffer): Change to one-argument function. Allocate
4080 trace buffer memory.
4081 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4082 handle QTBuffer:size packet.
4083 (cmd_bigqtbuffer_size): New function.
4084 (initialize_tracepoint): Call init_trace_buffer with
4085 DEFAULT_TRACE_BUFFER_SIZE.
4086 * server.c (handle_query): Add QTBuffer:size in the
4089 2013-03-07 Yao Qi <yao@codesourcery.com>
4091 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4092 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4094 (cmd_qtsp): Adjust condition. Do post increment.
4095 Set cur_action and cur_step_action back to 0.
4097 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4100 * linux-low.c (linux_write_memory): Return early success if LEN is
4103 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4105 * configure.srv: Add x86_64-*-cygwin* as target.
4107 2013-02-28 Tom Tromey <tromey@redhat.com>
4109 * configure.ac: Invoke AC_SYS_LARGEFILE.
4110 * configure, config.in: Rebuild.
4112 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4114 * win32-low.c: Throughout, fix format strings and casts of
4115 printf-like functions to avoid type related warnings on all
4117 (get_child_debug_event): Print dwDebugEventCode as hex since
4118 that's how it's usually documented.
4120 2013-02-28 Yao Qi <yao@codesourcery.com>
4122 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4125 2013-02-27 Jiong Wang <jiwang@tilera.com>
4127 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4128 (reg-tilegx32.c): New rule.
4129 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4130 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4131 different register info initializer according to elf class.
4132 (init_registers_tilgx32): New function. The tilegx32 register info
4134 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4135 (tile_store_gregset): Likewise.
4137 2013-02-27 Yao Qi <yao@codesourcery.com>
4139 * server.c (process_point_options): Print debug message when
4140 debug_threads is true.
4142 2013-02-26 Yao Qi <yao@codesourcery.com>
4144 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4146 2013-02-19 Pedro Alves <palves@redhat.com>
4147 Kai Tietz <ktietz@redhat.com>
4151 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4152 instead of strtoul to extract address from packet.
4153 (process_serial_event) <'z'>: Likewise.
4155 2013-02-18 Yao Qi <yao@codesourcery.com>
4157 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4159 2013-02-14 Pedro Alves <palves@redhat.com>
4163 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4164 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4166 2013-02-14 Pedro Alves <palves@redhat.com>
4168 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4170 2013-02-14 Pedro Alves <palves@redhat.com>
4172 * tracepoint.c (save_string): Delete.
4173 (add_tracepoint_action): Use savestring instead of save_string.
4175 2013-02-12 Pedro Alves <palves@redhat.com>
4177 * linux-xtensa-low.c: Ditto.
4178 * xtensa-xtregs.c: Ditto.
4180 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4182 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4185 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4187 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4188 aarch64_num_wp_regs and aarch64_num_bp_regs to
4189 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4191 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4193 * linux-aarch64-low.c (ps_get_thread_area): Replace
4194 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4196 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4197 Marcus Shawcroft <marcus.shawcroft@arm.com>
4198 Nigel Stephens <nigel.stephens@arm.com>
4199 Yufeng Zhang <yufeng.zhang@arm.com>
4201 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4202 (aarch64.c, aarch64-without-fpu.c): New targets.
4203 * configure.srv (aarch64*-*-linux*): New.
4204 * linux-aarch64-low.c: New file.
4206 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4208 * linux-low.c (handle_extended_wait, linux_create_inferior)
4209 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4210 (dequeue_one_deferred_signal, linux_resume_one_thread)
4211 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4212 (linux_tracefork_grandchild, linux_test_for_tracefork)
4213 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4214 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4215 where the argument is 0.
4217 2013-01-25 Yao Qi <yao@codesourcery.com>
4219 * event-loop.c: Include "queue.h".
4220 (gdb_event_p): New typedef.
4221 (struct gdb_event) <next_event>: Remove.
4222 (event_queue): Change to QUEUE(gdb_event_p).
4223 (async_queue_event): Remove.
4224 (gdb_event_xfree): New.
4225 (initialize_event_loop): New.
4226 (process_event): Use API from QUEUE.
4227 (wait_for_event): Likewise.
4228 * server.c (main): Call initialize_event_loop.
4229 * server.h (initialize_event_loop): Declare.
4231 2013-01-18 Yao Qi <yao@codesourcery.com>
4233 * ax.h (struct eval_agent_expr_context): New.
4234 (gdb_eval_agent_expr): Update declaration.
4235 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4236 TFRAME. Add new argument CTX.
4237 * server.h (struct eval_agent_expr_context): Declare.
4238 (agent_mem_read, agent_tsv_read): Update declaration.
4239 (agent_mem_read_string): Likewise.
4240 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4241 (add_traceframe_block): Add new argument TPOINT.
4242 Increase TPOINT->traceframe_usage.
4243 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4244 eval_tracepoint_agent_expr.
4245 (condition_true_at_tracepoint): Likewise.
4246 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4247 (agent_mem_read_string, agent_tsv_read): Likewise.
4249 2013-01-16 Yao Qi <yao@codesourcery.com>
4251 * linux-low.c (linux_resume_one_lwp): Don't check
4252 'lwp->bp_reinsert != 0'.
4254 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4255 Pedro Alves <palves@redhat.com>
4257 * lynx-low.c (ptrace_request_to_str): Define a temporary
4258 macro and use it to simplify this function's implementation.
4260 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4262 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4265 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4267 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4269 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4271 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4273 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4275 * lynx-low.c (lynx_resume): Use the resume_info parameter
4276 to determine the ptid for the lynx_ptrace call, unless
4277 it is equal to minus_one_ptid, in which case we use the
4278 ptid of the current_inferior.
4279 (lynx_wait_1): After having received a thread create/exit
4280 event, resume the inferior's execution using the signaling
4281 thread's ptid, rather than the old ptid.
4283 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4285 * lynx-low.c (lynx_resume): Delete variable ret.
4287 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4289 * gdbreplay.c (gdbreplay_version): Update copyright year.
4290 * server.c (gdbserver_version): Likewise.
4292 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4294 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4297 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4299 * lynx-low.c (ptrace_request_to_str): Add handling for
4302 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4304 * lynx-low.c (lynx_attach): Delete variable new_process.
4306 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4308 * lynx-low.c (lynx_create_inferior): Delete variable
4311 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4313 * lynx-low.c (ptrace_request_to_str): Do not handle
4314 PTRACE_GETTHREADLIST if this macro does not exist.
4316 2012-12-15 Yao Qi <yao@codesourcery.com>
4318 * Makefile.in (OBS): Add notif.o.
4319 * notif.c, notif.h: New.
4320 * server.c: Include "notif.h".
4321 (struct vstop_notif) <next>: Remove.
4323 (queue_stop_reply): Update.
4324 (push_event, send_next_stop_reply): Remove.
4325 (discard_queued_stop_replies): Update.
4326 (notif_stop): New variable.
4327 (handle_v_stopped): Remove.
4328 (handle_v_requests): Don't call handle_v_stopped. Call
4329 handle_ack_notif instead.
4330 (queue_stop_reply_callback): Call notif_event_enque instead
4331 of queue_stop_reply.
4332 (handle_status): Don't call send_next_stop_reply, call
4333 notif_write_event instead.
4334 (kill_inferior_callback): Likewise.
4335 (detach_or_kill_inferior_callback): Likewise.
4336 (main): Call initialize_notif.
4337 (process_serial_event): Call QUEUE_is_empty.
4338 (handle_target_event): Call notif_push instead of push event.
4339 * server.h (push_event): Remove declaration.
4341 2012-12-10 Tom Tromey <tromey@redhat.com>
4343 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4344 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4347 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4348 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4349 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4350 (amd64-linux-ipa.o, ax.o): Rewrite.
4351 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4352 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4353 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4354 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4355 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4356 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4357 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4358 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4359 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4360 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4361 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4362 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4363 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4364 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4365 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4366 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4367 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4368 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4369 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4370 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4371 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4372 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4373 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4374 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4375 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4376 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4377 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4378 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4379 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4380 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4381 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4382 (reg-tilegx.o): Remove.
4383 (all_object_files): New macro.
4384 Include .deps files.
4385 * aclocal.m4, configure: Rebuild.
4386 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4387 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4388 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4390 2012-12-05 Tom Tromey <tromey@redhat.com>
4393 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4395 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4397 * configure.ac: Check for linux/perf_event.h.
4398 * config.in: Regenerated.
4399 * configure: Regenerated.
4401 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4403 * hostio.c (handle_readlink): Decrease buffer size
4404 parameter passed to readlink by one byte.
4406 2012-11-26 Yao Qi <yao@codesourcery.com>
4408 * configure.ac (build_warnings): Append '-Wempty-body'.
4409 * configure: Regenerated.
4410 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4413 2012-11-15 Pierre Muller <muller@sourceware.org>
4415 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4416 * config.in: Regenerate.
4417 * configure: Regenerate.
4418 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4419 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4420 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4421 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4423 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4424 instead of <sys/wait.h> header.
4425 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4427 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4429 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4430 (various make rules): Remove -DGDBSERVER
4432 2012-11-09 Yao Qi <yao@codesourcery.com>
4434 * spu-low.c (current_ptid): Move it to ..
4435 * gdbthread.h: ... here. New.
4436 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4437 * server.c (myresume, process_serial_event): Likewise.
4438 * thread-db.c (thread_db_find_new_threads): Likewise.
4439 * tracepoint.c (run_inferior_command): Likewise.
4441 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4443 * server.c (handle_search_memory_1): Include access length in
4446 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4448 * linux-crisv32-low.c: Fix compile errors.
4450 2012-09-04 Yao Qi <yao@codesourcery.com>
4452 * tracepoint.c (cmd_qtsv): Adjust debug message.
4453 Don't check CUR_TPOINT.
4455 2012-08-28 Yao Qi <yao@codesourcery.com>
4457 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4458 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4459 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4460 Remove declarations of xmalloc, xreallloc, xstrdup and
4462 * Makefile.in (libiberty_h): New.
4463 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4464 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4466 2012-08-23 Yao Qi <yao@codesourcery.com>
4468 * server.h: Remove declaration of 'xsnprintf'.
4470 2012-08-22 Keith Seitz <keiths@redhat.com>
4472 * server.h: Include build-gnulib-gbserver/config.h.
4473 * gdbreplay.c: Likewise.
4475 2012-08-08 Doug Evans <dje@google.com>
4477 * Makefile.in (SFILES): Add gdb_vecs.c.
4478 (OBS): Add gdb_vecs.o.
4479 (gdb_vecs_h, host_defs_h): New variables.
4480 (thread-db.o): Add $(gdb_vecs_h) dependency.
4481 (gdb_vecs.o): New rule.
4482 * thread-db.c: #include "gdb_vecs.h".
4483 (thread_db_load_search): Use a vector to iterate over path elements.
4484 Handle text appearing after "$pdir".
4486 * configure.ac: Add check for strstr.
4487 * config.in: Regenerate.
4488 * configure: Regenerate.
4490 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4492 * hostio.c (handle_pread): If pread fails, fall back to attempting
4494 (handle_pwrite): Likewise for pwrite.
4496 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4498 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4499 between unsupported TYPE and unimplementable ADDR/LEN combination.
4500 (arm_insert_point): Act on new return value.
4502 2012-07-31 Pedro Alves <palves@redhat.com>
4504 * server.c (process_point_options): Only skip tokens if we find
4505 one that is unrecognized. Don't treat 'X' specially while
4506 skipping unrecognized tokens.
4508 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4510 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4511 to 4-byte-align HW breakpoint addresses for Thumb.
4513 2012-07-27 Yao Qi <yao@codesourcery.com>
4517 * server.h: Declare gdb_agent_about_to_close.
4518 * target.c (kill_inferior): Include "agent.h".
4519 New. Send command 'kill'.
4520 * target.h (kill_inferior): Removed macro.
4521 * tracepoint.c (gdb_agent_about_to_close): New.
4522 (gdb_agent_helper_thread): Handle command 'close'.
4523 Wait endlessly until the inferior stops.
4524 Install gdb_agent_remove_socket to atexit hook.
4525 (agent_socket_name): New static variable.
4526 (gdb_agent_socket_init): Replace local variable 'name' with
4527 'agent_socket_name'.
4528 (gdb_agent_remove_socket): New.
4530 2012-07-27 Yao Qi <yao@codesourcery.com>
4532 * server.c (process_point_options): Stop at 'X' when parsing.
4534 2012-07-19 Michael Eager <eager@eagercon.com>
4536 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4538 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4539 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4540 hardware breakpoint.
4542 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4544 * gdbserver/linux-low.c (initialize_low): Call
4545 linux_ptrace_init_warnings.
4547 2012-07-02 Doug Evans <dje@google.com>
4549 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4552 2012-07-02 Stan Shebs <stan@codesourcery.com>
4554 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4555 (ax.o): Add it to build rule.
4557 (OBS): Add format.o.
4558 (IPA_OBS): Add format.o.
4559 * server.c (handle_query): Claim support for breakpoint commands.
4560 (process_point_options): Add command case.
4561 (process_serial_event): Leave running if there are printfs in
4563 * mem-break.h (any_persistent_commands): Declare.
4564 (add_breakpoint_commands): Declare.
4565 (gdb_no_commands_at_breakpoint): Declare.
4566 (run_breakpoint_commands): Declare.
4567 * mem-break.c (struct point_command_list): New struct.
4568 (struct breakpoint): New field command_list.
4569 (any_persistent_commands): New function.
4570 (add_commands_to_breakpoint): New function.
4571 (add_breakpoint_commands): New function.
4572 (gdb_no_commands_at_breakpoint): New function.
4573 (run_breakpoint_commands): New function.
4574 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4576 * ax.c: Include format.h.
4577 (ax_printf): New function.
4578 (gdb_eval_agent_expr): Add printf opcode.
4580 2012-06-13 Yao Qi <yao@codesourcery.com>
4582 * server.c (start_inferior): Remove duplicated writes to fields
4583 'last_resume_kind' and 'last_status' of 'current_inferior'.
4585 2012-06-12 Yao Qi <yao@codesourcery.com>
4586 Pedro Alves <palves@redhat.com>
4588 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4590 * server.c (handle_v_cont): Extend comment.
4592 2012-06-11 Yao Qi <yao@codesourcery.com>
4594 * linux-low.c (linux_attach): Add 'static'.
4596 2012-06-06 Yao Qi <yao@codesourcery.com>
4598 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4600 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4602 Fix gcc -flto compilation warning.
4603 * server.c (main): Make variable multi_mode and attach volatile.
4605 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4607 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4608 if the platform doesn't know about it.
4610 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4612 * Makefile.in (SFILES): Add linux-tile-low.c.
4613 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4614 * configure.srv: Handle tilegx-*-linux*.
4615 * linux-tile-low.c: New file.
4617 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4619 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4621 2012-05-24 Pedro Alves <palves@redhat.com>
4625 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4627 2012-05-24 Pedro Alves <palves@redhat.com>
4631 Replace target_signal with gdb_signal throughout.
4633 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4635 * linux-low.c (linux_store_registers): Avoid the copying sequence
4636 when no data has been retrieved by ptrace.
4638 2012-05-22 Will Deacon <will.deacon@arm.com>
4640 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4641 Include asm/ptrace.h.
4642 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4645 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4647 * linux-low.c (linux_store_registers): Don't re-retrieve data
4648 with ptrace that has already been obtained from /proc. Always
4649 copy any data retrieved with ptrace to the buffer supplied.
4651 2012-05-11 Yao Qi <yao@codesourcery.com>
4652 Pedro Alves <palves@redhat.com>
4654 * linux-low.c (enum stopping_threads_kind): New.
4655 (stopping_threads): Change type to `enum stopping_threads_kind'.
4656 (handle_extended_wait): If stopping and suspending threads, leave
4657 the new_lwp suspended too.
4658 (linux_wait_for_event): Adjust.
4659 (stop_all_lwps): Set `stopping_threads' to
4660 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4661 whether we're suspending threads or just stopping them. Assert no
4664 2012-04-29 Yao Qi <yao@codesourcery.com>
4666 * server.h: Move some code to ...
4667 * gdbthread.h: ... here. New.
4668 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4669 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4670 (nto-low.o, win32-low.o): Likewise.
4671 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4672 * regcache.c, remote-utils.c, server.c: Likewise.
4673 * target.c, tracepoint.c, win32-low.c: Likewise.
4675 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4677 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4678 (PTRACE_ARG4_TYPE): Likewise.
4679 (PTRACE_XFER_TYPE): Likewise.
4680 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4681 ptrace to PTRACE_ARG3_TYPE.
4682 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4683 (PTRACE_ARG4_TYPE): Likewise.
4684 (PTRACE_XFER_TYPE): Likewise.
4685 (linux_detach_one_lwp): Cast fourth argument of
4686 ptrace to long then PTRACE_ARG4_TYPE.
4687 (regsets_fetch_inferior_registers): Cast third argument of
4688 ptrace to long then PTRACE_ARG3_TYPE.
4689 (regsets_store_inferior_registers): Likewise.
4691 2012-04-20 Pedro Alves <palves@redhat.com>
4693 * configure: Regenerate.
4695 2012-04-19 Pedro Alves <palves@redhat.com>
4697 * Makefile.in (GNULIB_BUILDDIR): New.
4698 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4699 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4700 (all, install-only, uninstall, clean-info, all-lib, clean): No
4701 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4702 (maintainer-clean realclean distclean): Use subdir_do.
4704 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4705 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4706 * acinclude.m4: Include acx_configure_dir.m4.
4707 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4708 calls. Call AC_PROG_RANLIB. Configure gnulib using
4711 (GNULIB_STDINT_H): Adjust.
4712 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4713 * gdbreplay.c: Include build-gnulib/config.h.
4714 * server.h: Likewise.
4715 * aclocal.m4: Regenerate.
4716 * config.in: Regenerate.
4717 * configure: Regenerate.
4719 2012-04-19 Pedro Alves <palves@redhat.com>
4721 * Makefile.in (LIBGNU, INCGNU): Adjust.
4722 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4723 (all, install-only, uninstall, clean-info, all-lib, clean)
4724 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4725 * configure.ac: Adjust AC_OUTPUT output.
4726 * aclocal.m4: Regenerate.
4727 * configure: Regenerate.
4729 2012-04-19 Pedro Alves <palves@redhat.com>
4731 * Makefile.in (generated_files): New.
4732 (server_h): Remove the explicit dependency on config.h, and depend
4733 on $generated_files.
4735 2012-04-19 Pedro Alves <palves@redhat.com>
4737 * Makefile.in (INCGNU): Add -Ignulib.
4739 2012-04-19 Pedro Alves <palves@redhat.com>
4741 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4742 (INCGNU): ... this, and spell out -I here.
4743 (GNULIB_LIB): Rename to ...
4745 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4747 2012-04-19 Pedro Alves <palves@redhat.com>
4749 * config.in: Regenerate.
4751 2012-04-19 Pedro Alves <palves@redhat.com>
4753 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4754 * server.h (memmem): Remove declaration.
4755 * config.in: Regenerate.
4756 * configure: Regenerate.
4758 2012-04-19 Yao Qi <yao@codesourcery.com>
4760 * Makefile.in (SFILES): Add common/vec.c.
4764 2012-04-19 Yao Qi <yao@codesourcery.com>
4766 * remote-utils.c (prepare_resume_reply): Replace with macro
4767 target_core_of_thread.
4768 * server.c (handle_qxfer_threads_proper): Likewise.
4769 * target.h (traget_core_of_thread): New macro.
4771 2012-04-18 Pedro Alves <palves@redhat.com>
4773 * aclocal.m4: Regenerate.
4774 * configure: Regenerate.
4776 2012-04-16 Yao Qi <yao@codesourcery.com>
4778 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4779 duplicated on address.
4781 2012-04-16 Yao Qi <yao@codesourcery.com>
4783 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4784 (struct tracepoint_action_ops) <send>: New field.
4785 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4786 (agent_expr_send, x_tracepoint_action_send): New.
4787 (l_tracepoint_action_send): New.
4788 (cmd_qtdp): Download and install tracepoint
4789 according to `use_agent'.
4790 (run_inferior_command): Add one more parameter `len'.
4792 (tracepoint_send_agent): New.
4793 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4795 2012-04-16 Yao Qi <yao@codesourcery.com>
4797 * tracepoint.c (download_tracepoints): Moved to ...
4798 (cmd_qtstart): ... here.
4800 2012-04-14 Yao Qi <yao@codesourcery.com>
4802 * tracepoint.c: Include inttypes.h.
4803 (struct collect_memory_action): Use sized types.
4804 (struct tracepoint): Likewise.
4805 (cmd_qtdp, stop_tracing): Update print specifiers.
4806 (cmd_qtp, response_tracepoint): Likewise.
4807 (collect_data_at_tracepoint): Likewise.
4808 (collect_data_at_step): Likewise.
4810 2012-04-14 Yao Qi <yao@codesourcery.com>
4812 Import gnulib module inttypes.
4813 * aclocal.m4, config.in, configure: Regenerated.
4815 2012-04-14 Yao Qi <yao@codesourcery.com>
4817 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4818 Makefile and config.status at last.
4820 2012-04-13 Yao Qi <yao@codesourcery.com>
4822 * tracepoint.c: Include stdint.h unconditionally.
4824 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4826 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4827 on BFD_HAVE_SYS_PROCFS_TYPE.
4828 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4829 * configure: Regenerate.
4830 * config.in: Likewise.
4832 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4834 * Makefile.in (clean): Also remove x32.c x32-linux.c
4835 x32-avx.c x32-avx-linux.c.
4836 (x32.o): New target.
4838 (x32-linux.o): Likewise.
4839 (x32-linux.c): Likewise.
4840 (x32-avx.o): Likewise.
4841 (x32-avx.c): Likewise.
4842 (x32-avx-linux.o): Likewise.
4843 (x32-avx-linux.c): Likewise.
4845 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4846 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4847 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4848 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4849 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4850 i386/x32-avx-linux.xml.
4852 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4853 (init_registers_x32_avx_linux): Likwise.
4854 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4855 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4857 2012-04-13 Pedro Alves <palves@redhat.com>
4859 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4860 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4861 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4862 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4865 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4867 * linux-x86-low.c (compat_x32_clock_t): New.
4868 (compat_x32_siginfo_t): Likewise.
4869 (compat_x32_siginfo_from_siginfo): Likewise.
4870 (siginfo_from_compat_x32_siginfo): Likewise.
4871 (linux_is_elf64): Likewise.
4872 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4873 and siginfo_from_compat_x32_siginfo for x32.
4874 (x86_arch_setup): Set linux_is_elf64.
4876 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4879 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4881 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4882 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4883 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4884 compatible with process.
4886 2012-04-12 Yao Qi <yao@codesourcery.com>
4888 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4889 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4890 (install-only, install-info, clean): Handle sub dir gnulib.
4891 (all-lib, am--refresh): New targets.
4892 (memmem.o): Remove target.
4893 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4894 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4895 (AC_REPLACE_FUNCS): Remove memmem.
4896 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4897 (AC_OUTPUT): Generate Makefile in gnulib/.
4898 * aclocal.m4, config.in, configure: Regenerated.
4900 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4902 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4904 2012-04-05 Pedro Alves <palves@redhat.com>
4906 -Werror=strict-aliasing
4908 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4911 2012-04-04 Pedro Alves <palves@redhat.com>
4913 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4914 (sparc_store_gregset_from_stack, sparc_store_gregset)
4915 (sparc_breakpoint_at): Fix formatting.
4917 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4919 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4921 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4922 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4923 * config.in: Regenerate.
4924 * configure: Likewise.
4926 2012-03-29 Pedro Alves <palves@redhat.com>
4928 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4929 Correct ptrace arguments.
4931 2012-03-28 Pedro Alves <palves@redhat.com>
4933 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4934 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4935 (IA64_FR1_REGNUM): New defines.
4936 (ia64_fetch_register): New.
4937 (the_low_target): Install it.
4938 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4940 * linux-low.c (linux_fetch_registers): Try the
4941 the_low_target.fetch_register hook first.
4943 * linux-arm-low.c (the_low_target): Adjust.
4944 * linux-bfin-low.c (the_low_target): Adjust.
4945 * linux-cris-low.c (the_low_target): Adjust.
4946 * linux-crisv32-low.c (the_low_target): Adjust.
4947 * linux-m32r-low.c (the_low_target): Adjust.
4948 * linux-m68k-low.c (the_low_target): Adjust.
4949 * linux-mips-low.c (the_low_target): Adjust.
4950 * linux-ppc-low.c (the_low_target): Adjust.
4951 * linux-s390-low.c (the_low_target): Adjust.
4952 * linux-sh-low.c (the_low_target): Adjust.
4953 * linux-sparc-low.c (the_low_target): Adjust.
4954 * linux-tic6x-low.c (the_low_target): Adjust.
4955 * linux-x86-low.c (the_low_target): Adjust.
4956 * linux-xtensa-low.c (the_low_target): Adjust.
4958 2012-03-26 Pedro Alves <palves@redhat.com>
4960 * server.c (handle_qxfer_libraries): Don't bail early if
4961 the_target->qxfer_libraries_svr4 is not NULL.
4963 2012-03-26 Pedro Alves <palves@redhat.com>
4965 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4967 2012-03-23 Pedro Alves <palves@redhat.com>
4969 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4970 "library-list-svr4" element's start tag when the the DSO list is
4973 2012-03-23 Pedro Alves <palves@redhat.com>
4975 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4976 a variable whose type size is the same as the inferior's pointer
4979 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4981 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4983 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4984 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4985 * linux-low.h: Include <signal.h>.
4986 (struct siginfo): Remove forward declaration.
4987 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4990 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4992 * .gitignore: Ignore more files.
4994 2012-03-19 Pedro Alves <palves@redhat.com>
4995 Jan Kratochvil <jan.kratochvil@redhat.com>
4997 * server.c (cont_thread, general_thread): Add describing comments.
4998 (start_inferior): Clear `cont_thread'.
4999 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5002 2012-03-15 Yao Qi <yao@codesourcery.com>
5004 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5006 (cmd_qtdp): ... here.
5008 2012-03-15 Yao Qi <yao@codesourcery.com>
5010 * tracepoint.c (struct tracepoint_action_ops): New.
5011 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5012 (m_tracepoint_action_download): New.
5013 (r_tracepoint_action_download): New.
5014 (x_tracepoint_action_download): New.
5015 (l_tracepoint_action_download): New.
5016 (add_tracepoint_action): Install `action->ops' according type.
5017 (download_tracepoint_1): Move code `download' function pointer
5018 of various tracepoint_action_ops.
5020 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5022 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5023 linux_ptrace_attach_warnings.
5025 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5027 * Makefile.in (linux-ptrace.o): New.
5028 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5029 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5030 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5031 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5032 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5034 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5036 2012-03-08 Yao Qi <yao@codesourcery.com>
5037 Pedro Alves <palves@redhat.com>
5039 Fix PR server/13392.
5040 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5042 * tracepoint.c (remove_tracepoint): New.
5043 (cmd_qtdp): Call remove_tracepoint when failed to install.
5045 2012-03-07 Pedro Alves <palves@redhat.com>
5047 * linux-low.c (get_detach_signal): New.
5048 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5049 Pass on pending signals to PTRACE_DETACH. Check the result of the
5051 * server.c (program_signals, program_signals_p): New.
5052 (handle_general_set): Handle QProgramSignals.
5053 * server.h (program_signals, program_signals_p): Declare.
5055 2012-03-05 Pedro Alves <palves@redhat.com>
5056 Jan Kratochvil <jan.kratochvil@redhat.com>
5058 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5061 2012-03-03 Yao Qi <yao@codesourcery.com>
5063 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5064 agent_look_up_symbols.
5066 2012-03-03 Yao Qi <yao@codesourcery.com>
5068 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5069 (linux-x86-low.o): Likewise.
5070 * server.h: Remove in_process_agent_loaded.
5071 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5075 2012-03-03 Yao Qi <yao@codesourcery.com>
5077 * tracepoint.c (gdb_agent_capability): New global.
5078 (in_process_agent_loaded_ust): Renamed to
5079 `in_process_agent_supports_ust'.
5081 (in_process_agent_supports_ust): Call agent_capability_check.
5082 (clear_installed_tracepoints): Assert that agent supports
5085 2012-03-03 Yao Qi <yao@codesourcery.com>
5087 * linux-low.c (linux_supports_agent): New.
5088 (linux_target_ops): Initialize field `supports_agent' with
5089 linux_supports_agent.
5090 * target.h (struct target_ops) <supports_agent>: New.
5091 (target_supports_agent): New macro.
5092 * server.c (handle_general_set): Handle packet 'QAgent'.
5093 (handle_query): Send `QAgent+'.
5094 * Makefile.in (server.o): Depends on agent.h.
5096 2012-03-03 Yao Qi <yao@codesourcery.com>
5098 * Makefile.in (OBS): Add agent.o.
5099 Add new rule for agent.o.
5100 Track dependence of tracepoint.c on agent.h.
5101 * tracepoint.c (run_inferior_command_1):
5102 (run_inferior_command): Call agent_run_command.
5103 (gdb_ust_connect_sync_socket): Deleted. Move it to
5105 (resume_thread, stop_thread): Likewise.
5106 (gdb_ust_socket_init): Renamed to ...
5107 (gdb_agent_socket_init): ... New.
5108 (gdb_ust_thread): Renamed to ...
5109 (gdb_agent_helper_thread): ... New.
5110 (gdb_ust_init): Move some code to ...
5111 (gdb_agent_init): ... here. New.
5112 [HAVE_UST]: Call gdb_ust_init.
5113 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5114 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5115 * config.in, configure: Regenerated.
5117 2012-03-02 Pedro Alves <palves@redhat.com>
5119 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5120 * linux-low.c (struct simple_pid_list): New.
5121 (stopped_pids): New a struct simple_pid_list pointer.
5122 (add_to_pid_list, pull_pid_from_list): New.
5123 (handle_extended_wait): Don't assume the first signal new children
5124 report is SIGSTOP. Adjust call to pull_pid_from_list.
5125 (linux_wait_for_lwp): Adjust.
5127 2012-03-02 Yao Qi <yao@codesourcery.com>
5129 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5132 2012-03-02 Yao Qi <yao@codesourcery.com>
5134 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5135 `stop_pc' and `tpoint'. Update caller.
5137 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5139 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5140 * linux-low.c (use_linux_regsets): New macro.
5141 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5142 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5143 (linux_register_in_regsets): New function.
5144 (usr_fetch_inferior_registers): Skip registers covered by
5146 (usr_store_inferior_registers): Likewise.
5147 (usr_fetch_inferior_registers): New macro.
5148 (usr_store_inferior_registers): Likewise.
5149 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5150 (linux_store_registers): Likewise.
5151 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5153 (init_registers_mips64_dsp_linux): Likewise.
5154 (init_registers_mips_linux): New macro.
5155 (init_registers_mips_dsp_linux): Likewise.
5156 (mips_dsp_num_regs): Likewise.
5157 (DSP_BASE, DSP_CONTROL): New fallback macros.
5158 (mips_base_regs): New macro.
5159 (mips_regmap): Use it. Fix the size.
5160 (mips_dsp_regmap): New variable.
5161 (mips_dsp_regset_bitmap): Likewise.
5162 (mips_arch_setup): New function.
5163 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5165 (mips_cannot_store_register): Likewise.
5166 (the_low_target): Update .arch_setup, .num_regs and .regmap
5167 initializers. Add .regset_bitmap initializer.
5168 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5170 * linux-bfin-low.c (the_low_target): Likewise.
5171 * linux-cris-low.c (the_low_target): Likewise.
5172 * linux-crisv32-low.c (the_low_target): Likewise.
5173 * linux-ia64-low.c (the_low_target): Likewise.
5174 * linux-m32r-low.c (the_low_target): Likewise.
5175 * linux-m68k-low.c (the_low_target): Likewise.
5176 * linux-ppc-low.c (the_low_target): Likewise.
5177 * linux-s390-low.c (the_low_target): Likewise.
5178 * linux-sh-low.c (the_low_target): Likewise.
5179 * linux-sparc-low.c (the_low_target): Likewise.
5180 * linux-tic6x-low.c (the_low_target): Likewise.
5181 * linux-x86-low.c (the_low_target): Likewise.
5182 * linux-xtensa-low.c (the_low_target): Likewise.
5183 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5184 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5185 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5187 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5188 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5190 2012-02-29 Yao Qi <yao@codesourcery.com>
5191 Pedro Alves <palves@redhat.com>
5193 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5194 `step_over_finished' is true.
5196 2012-02-27 Pedro Alves <palves@redhat.com>
5198 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5199 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5201 2012-02-27 Pedro Alves <palves@redhat.com>
5204 * linux-low.c (pid_is_stopped): New.
5205 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5207 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5209 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5212 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5214 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5216 2012-02-24 Luis Machado <lgustavo@codesourcery>
5218 * server.c (handle_query): Advertise support for target-side
5219 breakpoint condition evaluation.
5220 (process_point_options): New function.
5221 (process_serial_event): When inserting a breakpoint, check for
5222 a target-side condition that should be evaluated.
5224 * mem-break.c: Include regcache.h and ax.h.
5225 (point_cond_list_t): New data structure.
5226 (breakpoint) <cond_list>: New field.
5227 (find_gdb_breakpoint_at): Make non-static.
5228 (delete_gdb_breakpoint_at): Clear any target-side
5230 (clear_gdb_breakpoint_conditions): New function.
5231 (add_condition_to_breakpoint): Likewise.
5232 (add_breakpoint_condition): Likewise.
5233 (gdb_condition_true_at_breakpoint): Likewise.
5234 (gdb_breakpoint_here): Return result directly instead
5235 of going through a local variable.
5237 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5238 (clear_gdb_breakpoint_conditions): Likewise.
5239 (add_breakpoint_condition): Likewise.
5240 (gdb_condition_true_at_breakpoint): Likewise.
5242 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5243 (need_step_over_p): Take target-side breakpoint condition into
5246 2012-02-24 Luis Machado <lgustavo@codesourcery>
5248 * server.h: Include tracepoint.h.
5249 (agent_mem_read, agent_get_trace_state_variable_value,
5250 agent_set_trace_state_variable_value,
5251 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5252 get_set_tsv_func_addr): New prototypes.
5254 * ax.h: New include file.
5255 * ax.c: New source file.
5257 * tracepoint.c: Include ax.h.
5258 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5259 agent_expr, eval_result_type): Move to ax.h.
5260 (parse_agent_expr): Rename to ...
5261 (gdb_parse_agent_expr): ... this, make it non-static and move
5263 (unparse_agent_expr) Rename to ...
5264 (gdb_unparse_agent_expr): ... this, make it non-static and move
5266 (eval_agent_expr): Rename to ...
5267 (eval_tracepoint_agent_expr): ... this.
5268 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5269 forward declarations.
5270 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5271 (agent_get_trace_state_variable_value): New function.
5272 (agent_set_trace_state_variable_value): New function.
5273 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5274 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5275 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5276 (condition_true_at_tracepoint): Likewise.
5277 (parse_agent_expr): Rename to ...
5278 (gdb_parse_agent_expr): ... this and move to ax.c.
5279 (unparse_agent_expr): Rename to ...
5280 (gdb_unparse_agent_expr): ... this and move to ax.c.
5281 (gdb_agent_op_name): Move to ax.c.
5282 (eval_agent_expr): Rename to ...
5283 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5285 (eval_tracepoint_agent_expr): New function.
5286 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5288 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5290 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5291 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5292 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5293 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5294 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5295 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5296 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5297 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5298 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5299 (compile_bytecodes): Remove forward declaration.
5300 (is_goto_target): Move to ax.c.
5301 (compile_bytecodes): Move to ax.c and call
5302 agent_get_trace_state_variable_value (...) and
5303 agent_set_trace_state_variable_value (...).
5305 * Makefile.in: Update ax.c and IPA dependencies.
5307 2012-02-24 Pedro Alves <palves@redhat.com>
5309 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5310 (cmd_bigqtbuffer_circular): ... this. Only handle
5311 'QTBuffer:circular:'.
5312 (handle_tracepoint_general_set): Adjust.
5314 2012-02-16 Yao Qi <yao@codesourcery.com>
5316 * inferiors.c: Move code to ...
5317 * dll.c: .... here. New.
5318 * server.h: Declare clear_dlls.
5319 * Makefile.in (SFILES): Add dll.c.
5323 2012-02-11 Yao Qi <yao@codesourcery.com>
5325 * server.c: (handle_monitor_command): Add a new parameter
5327 (handle_query): Update caller.
5329 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5331 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5332 * configure, config.in: Regenerate.
5333 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5336 2012-02-02 Pedro Alves <palves@redhat.com>
5338 Try SIGKILL first, then PTRACE_KILL.
5339 * linux-low.c (linux_kill_one_lwp): New.
5340 (linux_kill_one_lwp): Rename to ...
5341 (kill_one_lwp_callback): ... this. Use the new
5344 2012-02-02 Pedro Alves <palves@redhat.com>
5346 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5349 2012-01-27 Pedro Alves <palves@redhat.com>
5351 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5352 (elf_64_file_p): Make static.
5353 (linux_pid_exe_is_elf_64_file): New.
5354 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5355 Delete declarations.
5356 (linux_pid_exe_is_elf_64_file): Declare.
5357 * linux-x86-low.c (x86_arch_setup): Use
5358 linux_pid_exe_is_elf_64_file.
5360 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5362 * linux-low.c (linux_wait_for_event_1): Rename to ...
5363 (linux_wait_for_event): ... here and merge it with former
5364 linux_wait_for_event - new variable wait_ptid, use it.
5365 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5367 2012-01-23 Pedro Alves <palves@redhat.com>
5369 * server.c (main): Avoid yet another case of infinite loop while
5370 detaching/killing after a longjmp.
5372 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5375 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5377 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5379 * hostio.c (handle_readlink): New function.
5380 (handle_vFile): Call it to handle "vFile:readlink" packets.
5382 2012-01-20 Pedro Alves <palves@redhat.com>
5383 Ulrich Weigand <ulrich.weigand@linaro.org>
5385 * server.c (handle_v_requests): Only support vAttach and vRun to
5386 start multiple processes when in extended protocol mode.
5388 2012-01-17 Pedro Alves <palves@redhat.com>
5390 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5391 memalign plus mprotect to allocate the scratch buffer.
5393 2012-01-13 Pedro Alves <palves@redhat.com>
5395 * server.c (attach_inferior): Clear `cont_thread'.
5397 2012-01-13 Pedro Alves <palves@redhat.com>
5399 * server.c (main): Avoid infinite loop while detaching/killing
5402 2012-01-09 Doug Evans <dje@google.com>
5404 * server.c (start_inferior): Set last_ptid in --wrapper case.
5406 2012-01-06 Yao Qi <yao@codesourcery.com>
5408 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5410 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5412 2012-01-04 Yao Qi <yao@codesourcery.com>
5414 * tracepoint.c (cmd_qtdp): Print debug message
5415 for static tracepoint.
5417 2012-01-04 Yao Qi <yao@codesourcery.com>
5419 * tracepoint.c (trace_vdebug): Differentiate debug message
5420 between gdbserver and IPA.
5422 2012-01-03 Yao Qi <yao@codesourcery.com>
5424 * tracepoint.c (tracepoint_was_hit): Don't collect for
5427 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5429 * terminal.h: Reformat copyright header.
5431 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5433 * server.c (gdbserver_version): Update copyright year.
5434 * gdbreplay.c (gdbreplay_version): Likewise.
5436 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5438 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5441 2011-12-18 Hui Zhu <teawater@gmail.com>
5442 * linux-low.c (linux_create_inferior): Save return value to ret.
5444 2011-12-18 Hui Zhu <teawater@gmail.com>
5446 * linux-low.c (linux_create_inferior): Save return value to ret.
5448 2011-12-16 Doug Evans <dje@google.com>
5450 * linux-low.c (linux_create_inferior): If stdio connection,
5451 redirect stdin from /dev/null, stdout to stderr.
5452 * remote-utils.c (remote_is_stdio): New static global.
5453 (remote_connection_is_stdio): New function.
5454 (remote_prepare): Handle stdio connection.
5455 (remote_open): Ditto.
5456 (remote_close): Don't close stdin for stdio connections.
5457 (read_prim,write_prim): New functions. Replace all calls to
5458 read/write to these.
5459 * server.c (main): Watch for "-" argument. Move call to
5460 remote_prepare before start_inferior.
5461 * server.h (STDIO_CONNECTION_NAME): New macro.
5462 (remote_connection_is_stdio): Declare.
5464 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5465 in debugging output.
5467 2011-12-15 Yao Qi <yao@codesourcery.com>
5469 * tracepoint.c: Include sys/syscall.h.
5470 (gdb_ust_thread): Remove preprocessor conditional.
5472 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5474 * linux-low.c (linux_detach_one_lwp): Call
5475 the_low_target.prepare_to_resume before detaching.
5477 2011-12-14 Yao Qi <yao@codesourcery.com>
5479 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5482 2011-12-14 Yao Qi <yao@codesourcery.com>
5484 * i386-low.c (i386_low_stopped_data_address): Initialize local
5487 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5491 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5492 DR_CONTROL unless necessary. Extend comments.
5493 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5494 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5496 2011-12-13 Yao Qi <yao@codesourcery.com>
5498 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5500 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5502 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5504 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5505 Print new debug message for such case.
5507 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5509 Fix overlapping memcpy.
5510 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5511 the read_inferior_memory transfer.
5512 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5513 write_inferior_memory transfer.
5514 (set_fast_tracepoint_jump): New variable buf. Use it for the
5515 read_inferior_memory and write_inferior_memory transfers.
5516 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5517 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5518 Use it for the write_inferior_memory transfer.
5519 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5522 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5524 * linux-low.c (fetch_register, store_register): Make code
5525 consistent, fix formatting.
5527 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5529 * linux-low.c (usr_store_inferior_registers): Factor out code
5530 to handle individual registers into...
5531 (store_register): ... this new function.
5533 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5535 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5536 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5537 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5538 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5539 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5540 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5541 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5542 (srv_xmlfiles): Add new XML files.
5544 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5546 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5547 (init_registers_s390_linux32v1): Add prototype.
5548 (init_registers_s390_linux32v2): Likewise.
5549 (init_registers_s390_linux64v1): Likewise.
5550 (init_registers_s390_linux64v2): Likewise.
5551 (init_registers_s390x_linux64v1): Likewise.
5552 (init_registers_s390x_linux64v2): Likewise.
5553 (s390_num_regs): Increment to 52.
5554 (s390_regmap): Add orig_r2 register.
5555 (s390_num_regs_3264): Increment to 68.
5556 (s390_regmap_3264): Add orig_r2 register.
5557 (s390_collect_ptrace_register): Handle orig_r2 register.
5558 (s390_supply_ptrace_register): Likewise.
5559 (s390_fill_last_break): New function.
5560 (s390_store_last_break): Likewise.
5561 (s390_fill_system_call): New function.
5562 (s390_store_system_call): Likewise.
5563 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5565 (s390_check_regset): New function.
5566 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5567 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5568 Update target_regsets for available register sets.
5570 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5571 Jan Kratochvil <jan.kratochvil@redhat.com>
5573 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5574 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5576 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5577 * linux-low.h (struct process_info_private): New member r_debug.
5578 * server.c (handle_qxfer_libraries): Call
5579 the_target->qxfer_libraries_svr4.
5580 (handle_qxfer_libraries_svr4): New function.
5581 (qxfer_packets): New entry "libraries-svr4".
5582 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5583 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5584 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5585 PACKET_qXfer_libraries_svr4.
5587 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5589 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5590 PSW address/mask between 8-byte and 16-byte formats.
5591 (s390_supply_ptrace_register): Likewise.
5592 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5593 basic addressing mode bit.
5595 2011-11-24 Stan Shebs <stan@codesourcery.com>
5597 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5599 2011-11-17 Stan Shebs <stan@codesourcery.com>
5601 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5602 (tracing_start_time): New global.
5603 (tracing_stop_time): New global.
5604 (tracing_user_name): New global.
5605 (tracing_notes): New global.
5606 (tracing_stop_note): New global.
5607 (cmd_qtstart): Set traceframe_usage, start_time.
5608 (stop_tracing): Set stop_time.
5609 (cmd_qtstatus): Report additional status.
5610 (cmd_qtp): New function.
5611 (handle_tracepoint_query): Call it.
5612 (cmd_qtnotes): New function.
5613 (handle_tracepoint_general_set): Call it.
5614 (get_timestamp): Rename from tsv_get_timestamp.
5616 2011-11-14 Stan Shebs <stan@codesourcery.com>
5617 Kwok Cheung Yeung <kcy@codesourcery.com>
5619 * linux-x86-low.c (small_jump_insn): New.
5620 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5621 trampoline and error message, build a trampoline and issue a small
5622 jump instruction to it.
5623 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5624 trampoline and error message.
5625 (x86_get_min_fast_tracepoint_insn_len): New.
5626 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5627 * linux-low.h (struct linux_target_ops): Add arguments to
5628 install_fast_tracepoint_jump_pad operation, add new operation.
5629 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5631 (linux_get_min_fast_tracepoint_insn_len): New function.
5632 (linux_target_op): Add new operation.
5633 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5634 (gdb_trampoline_buffer_end): Ditto.
5635 (gdb_trampoline_buffer_error): Ditto.
5636 (struct ipa_sym_addresses): Add fields for new IPA variables.
5637 (symbol_list): Add entries for new IPA variables.
5638 (struct tracepoint): Add fields to hold the address range of the
5639 trampoline used by the tracepoint.
5640 (trampoline_buffer_head): New static variable.
5641 (trampoline_buffer_tail): Ditto.
5642 (claim_trampoline_space): New function.
5643 (have_fast_tracepoint_trampoline_buffer): New function.
5644 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5646 (install_fast_tracepoint): Ditto, also add error buffer argument.
5647 (cmd_qtminftpilen): New function.
5648 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5649 (fast_tracepoint_from_trampoline_address): New function.
5650 (fast_tracepoint_collecting): Handle trampoline as part of jump
5652 (set_trampoline_buffer_space): New function.
5653 (initialize_tracepoint): Initialize new IPA variables.
5654 * target.h (struct target_ops): Add arguments to
5655 install_fast_tracepoint_jump_pad operation, add new
5656 get_min_fast_tracepoint_insn_len operation.
5657 (target_get_min_fast_tracepoint_insn_len): New.
5658 (install_fast_tracepoint_jump_pad): Add arguments.
5659 * server.h (IPA_BUFSIZ): Define.
5660 * linux-i386-ipa.c: Include extra header files.
5661 (initialize_fast_tracepoint_trampoline_buffer): New function.
5662 (initialize_low_tracepoint): Call it.
5663 * server.h (set_trampoline_buffer_space): Declare.
5664 (claim_trampoline_space): Ditto.
5665 (have_fast_tracepoint_trampoline_buffer): Ditto.
5667 2011-11-14 Yao Qi <yao@codesourcery.com>
5669 * server.c (handle_query): Handle InstallInTrace for qSupported.
5670 * tracepoint.c (add_tracepoint): Sort list.
5671 (install_tracepoint, download_tracepoint): New.
5672 (cmd_qtdp): Call them to install and download tracepoints.
5673 (sort_tracepoints): Removed.
5674 (cmd_qtstart): Update.
5676 2011-11-14 Yao Qi <yao@codesourcery.com>
5678 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5679 * mem-break.h: Declare.
5680 * tracepoint.c (cmd_qtstart): Move some code to ...
5681 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5683 (download_tracepoints): Move some code to ...
5684 (download_tracepoint_1): ... here. New.
5686 2011-11-08 Yao Qi <yao@codesourcery.com>
5688 * remote-utils.c (relocate_instruction): A comment fix.
5690 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5692 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5693 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5694 dr_status_mirror and dr_control_mirror from debug_reg_state.
5695 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5696 (i386_initial_stuff): Remove use of deleted globals.
5697 (i386_get_thread_context, i386_set_thread_context,
5698 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5699 from debug_reg_state.
5701 2011-11-05 Yao Qi <yao@codesourcery.com>
5703 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5704 address as TPOINT's.
5706 2011-11-02 Stan Shebs <stan@codesourcery.com>
5708 * tracepoint.c (agent_mem_read_string): New function.
5709 (eval_agent_expr): Call it for tracenz.
5710 * server.c (handle_query): Report support for tracenz.
5712 2011-11-02 Yao Qi <yao@codesourcery.com>
5714 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5716 2011-11-02 Yao Qi <yao@codesourcery.com>
5718 * target.h: Fix a typo in comment.
5720 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5722 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5723 clobber the breakpoints' shadows with fast tracepoint jumps.
5724 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5725 * target.c (write_inferior_memory): Also pass MYADDR down to
5728 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5730 * configure.ac: Check support for personality routine.
5731 * configure: Regenerate.
5732 * config.in: Likewise.
5733 * linux-low.c: Include <sys/personality.h>.
5734 Define ADDR_NO_RANDOMIZE if necessary.
5735 (linux_create_inferior): Disable address space randomization when
5736 forking inferior, if requested.
5737 (linux_supports_disable_randomization): New function.
5738 (linux_target_ops): Install it.
5739 * server.h (disable_randomization): Declare.
5740 * server.c (disable_randomization): New global variable.
5741 (handle_general_set): Handle QDisableRandomization.
5742 (handle_query): Likewise for qSupported.
5743 (main): Support --disable-randomization and --no-disable-randomization
5744 command line arguments.
5745 * target.h (struct target_ops): Add supports_disable_randomization.
5746 (target_supports_disable_randomization): New macro.
5748 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5750 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5752 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5753 [!PT_GETDSBT] (target_loadmap): New definition.
5754 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5755 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5756 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5757 and PT_GETDSBT to LINUX_LOADMAP.
5758 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5759 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5761 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5763 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5764 (arm_linux_hwbp_cap): New static variable.
5765 (arm_linux_get_hwbp_cap): Replace by ...
5766 (arm_linux_init_hwbp_cap): ... this new function.
5767 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5768 (arm_linux_get_hw_watchpoint_count): Likewise.
5769 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5770 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5771 (arm_prepare_to_resume): Use perror_with_name instead of error.
5773 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5775 * linux-arm-low.c: Include <signal.h>.
5776 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5777 (struct arm_linux_hwbp_cap): New data type.
5778 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5779 (struct arm_linux_hw_breakpoint): New data type.
5780 (MAX_BPTS, MAX_WPTS): Define.
5781 (struct arch_process_info, struct arch_lwp_info): New data types.
5782 (arm_linux_get_hwbp_cap): New function.
5783 (arm_linux_get_hw_breakpoint_count): Likewise.
5784 (arm_linux_get_hw_watchpoint_count): Likewise.
5785 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5786 (arm_hwbp_control_initialize): Likewise.
5787 (arm_hwbp_control_is_enabled): Likewise.
5788 (arm_hwbp_control_is_initialized): Likewise.
5789 (arm_hwbp_control_disable): Likewise.
5790 (arm_linux_hw_breakpoint_equal): Likewise.
5791 (arm_linux_hw_point_initialize): Likewise.
5792 (struct update_registers_data): New data structure.
5793 (update_registers_callback: New function.
5794 (arm_insert_point): Likewise.
5795 (arm_remove_point): Likewise.
5796 (arm_stopped_by_watchpoint): Likewise.
5797 (arm_stopped_data_address): Likewise.
5798 (arm_new_process): Likewise.
5799 (arm_new_thread): Likewise.
5800 (arm_prepare_to_resume): Likewise.
5801 (the_low_target): Register arm_insert_point, arm_remove_point,
5802 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5803 arm_new_thread, and arm_prepare_to_resume.
5805 2011-09-15 Stan Shebs <stan@codesourcery.com>
5807 * server.h (struct emit_ops): Add compare-goto fields.
5808 * tracepoint.c (gdb_agent_op_sizes): New table.
5809 (emit_eq_goto): New function.
5810 (emit_ne_goto): New function.
5811 (emit_lt_goto): New function.
5812 (emit_le_goto): New function.
5813 (emit_gt_goto): New function.
5814 (emit_ge_goto): New function.
5815 (is_goto_target): New function.
5816 (compile_bytecodes): Recognize special cases of compare-goto
5817 combinations and call specialized emitters for them.
5818 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5819 (amd64_emit_ne_goto): New function.
5820 (amd64_emit_lt_goto): New function.
5821 (amd64_emit_le_goto): New function.
5822 (amd64_emit_gt_goto): New function.
5823 (amd64_emit_ge_goto): New function.
5824 (amd64_emit_ops): Add the new functions.
5825 (i386_emit_eq_goto): New function.
5826 (i386_emit_ne_goto): New function.
5827 (i386_emit_lt_goto): New function.
5828 (i386_emit_le_goto): New function.
5829 (i386_emit_gt_goto): New function.
5830 (i386_emit_ge_goto): New function.
5831 (i386_emit_ops): Add the new functions.
5833 2011-09-08 Stan Shebs <stan@codesourcery.com>
5835 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5836 (i386_emit_epilogue): Restore %ebx.
5838 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5840 * server.c (step_thread): Remove definition.
5841 (process_serial_event): Don't handle Hs.
5842 * server.h (step_thread): Remove declaration.
5843 * target.c (set_desired_inferior): Remove use of step_thread.
5845 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5847 * linux-low.c: Include linux-procfs.h.
5848 (linux_attach_lwp_1): Update comments.
5849 (linux_attach): Scan for existing threads when attaching to a
5850 process that is the tgid.
5851 * Makefile.in: Update dependencies.
5853 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5855 * configure.srv: Add linux-procfs.o dependencies.
5857 2011-08-14 Yao Qi <yao@codesourcery.com>
5859 * target.h (struct target_ops): Fix indent.
5860 * win32-low.c (win32_target_ops): Fix comment.
5862 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5863 Yao Qi <yao@codesourcery.com>
5865 * Makefile.in (clean): Remove tic6x-*.c files.
5866 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5867 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5868 (tic6x-c64xp-linux.c): Likewise.
5869 * configure.srv: Add support for tic6x-*-uclinux.
5870 * linux-tic6x-low.c: New.
5871 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5873 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5874 Yao Qi <yao@codesourcery.com>
5876 * target.h (struct target_ops): Add read_loadmap.
5877 * linux-low.c (struct target_loadseg): New type.
5878 (struct target_loadmap): New type.
5879 (linux_read_loadmap): New function.
5880 (linux_target_ops): Add linux_read_loadmap.
5881 * server.c (handle_query): Support qXfer:fdpic:read packet.
5882 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5885 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5887 * win32-low.c: Include <stdint.h>.
5889 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5891 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5892 to the inferior here.
5893 (i386_remove_aligned_watchpoint): Ditto.
5894 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5895 fit part of the watchpoint in the debug registers.
5896 (i386_update_inferior_debug_regs): New.
5897 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5898 registers, and only update the inferior on success.
5899 (i386_low_remove_watchpoint): Ditto.
5901 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5903 * linux-low.c (compare_ints, unique, list_threads, show_process,
5904 linux_core_of_thread): Delete.
5905 (linux_target_ops): Change linux_core_of_thread to
5906 linux_common_core_of_thread.
5907 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5908 * utils.c (malloc_failure): Change type of argument.
5909 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5910 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5911 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5912 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5913 (IPA_OBJS): Add common-utils-ipa.o.
5914 (ptid_h, linux_osdata_h): New macros.
5915 (server_h): Add common/common-utils.h, common/xml-utils.h,
5916 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5918 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5919 ptid.o, buffer.o): New rules.
5920 (linux-low.o): Add common/linux-osdata.h as a dependency.
5921 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5922 * configure.ac: Add AC_HEADER_DIRENT check.
5923 * config.in: Regenerate.
5924 * configure: Regenerate.
5925 * remote-utils.c (xml_escape_text): Delete.
5926 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5927 buffer_xml_printf): Move to common/buffer.c.
5928 * server.c (main): Remove call to initialize_inferiors.
5929 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5930 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5931 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5932 internal_error, gdb_assert, gdb_assert_fail): Delete.
5933 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5934 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5936 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5937 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5938 initialize_inferiors): Delete.
5940 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5942 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5945 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5947 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5949 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5951 2011-05-26 Yao Qi <yao@codesourcery.com>
5953 * Makefile.in (thread-db.o): Track dependence to
5954 common/gdb_thread_db.h.
5955 * thread-db.c: include gdb_thread_db.h from right place.
5957 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5959 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5960 __FILE__ and __LINE__ to internal_error.
5962 2011-05-13 Doug Evans <dje@google.com>
5964 * thread-db.c (try_thread_db_load_from_sdir): New function.
5965 (try_thread_db_load_from_dir): New function.
5966 (thread_db_load_search): Handle $sdir, ignore $pdir.
5967 Remove trying of system directories if search of
5968 libthread-db-search-path fails, that is now done via $sdir.
5970 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5972 * server.c (handle_query): Add EnableDisableTracepoints to the list
5973 of supported features.
5974 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5976 (cmd_qtenable_disable): New.
5977 (cmd_qtstart): Install tracepoints even if disabled.
5978 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5979 receiving a QTEnable or QTDisable packet.
5980 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5981 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5983 (gdb_probe): Skip data collection if static tracepoint is disabled.
5985 2011-05-10 Doug Evans <dje@google.com>
5987 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5989 2011-05-04 Doug Evans <dje@google.com>
5991 * linux-low.c (linux_join): Skip process lookup.
5992 * spu-low.c (spu_join): Ditto.
5993 * server.c (join_inferiors_callback): Delete.
5994 (process_serial_event): For 'D' packet (detach) call join_inferior
5997 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5999 * README: Don't mention xscale*-*-linux*.
6000 * configure.srv (xscale*-*-linux*): Don't handle target.
6002 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6004 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6006 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6007 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6008 (i386_emit_void_call_2): Likewise.
6010 2011-04-26 Yao Qi <yao@codesourcery.com>
6012 * linux-low.c: Move common macros to linux-ptrace.h.
6013 Include linux-ptrace.h.
6014 * Makefile.in (linux_ptrace_h): New.
6015 (linux-low.o): Depends on linux-ptrace.h.
6017 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6019 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6020 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6021 (remote_prepare): New function with most of the TCP code from ...
6022 (remote_open): ... here. Detect PORT here unconditionally. Move also
6023 setting transport_is_reliable.
6024 * server.c (run_once): New variable.
6025 (gdbserver_usage): Document it.
6026 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6027 the first run if RUN_ONCE.
6028 * server.h (run_once, remote_prepare): New declarations.
6030 2011-04-19 Tom Tromey <tromey@redhat.com>
6032 * win32-low.c (handle_load_dll): Remove duplicate "the".
6034 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6036 Remove support for old Cygwin 1.5 versions.
6037 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6038 function to avoid warning.
6039 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6042 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6044 * gdbserver/server.h (Macro _): Define it if not available.
6046 2011-03-14 Michael Snyder <msnyder@vmware.com>
6048 * hostio.c (handle_close): Remove unnecessary null test.
6050 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6052 * Makefile.in (maintainer-clean realclean distclean): Remove
6053 "make ... subdir_do" command.
6055 2011-03-10 Michael Snyder <msnyder@vmware.com>
6057 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6059 * server.c (handle_v_run): Free alloced buffer on early return.
6061 2011-03-09 Yao Qi <yao@codesourcery.com>
6064 2011-03-04 Yao Qi <yao@codesourcery.com>
6066 * Makefile.in: Remove GNU make feature --directory.
6068 2011-03-05 Yao Qi <yao@codesourcery.com>
6070 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6071 (subdir_do): New make target. Copied from gdb/Makefile.
6072 (maintainer-clean, realclean, distclean, clean): Call corresponding
6073 make targets in common/Makefile.
6075 2011-02-11 Yao Qi <yao@codesourcery.com>
6077 * configure.ac: Call AC_PROG_RANLIB.
6078 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6079 * configure: Regenerate.
6081 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6083 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6085 2011-03-06 Yao Qi <yao@codesourcery.com>
6087 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6089 2011-03-05 Yao Qi <yao@codesourcery.com>
6091 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6092 (subdir_do): New make target. Copied from gdb/Makefile.
6093 (maintainer-clean, realclean, distclean, clean): Call corresponding
6094 make targets in common/Makefile.
6096 2011-03-04 Yao Qi <yao@codesourcery.com>
6098 * Makefile.in: Remove GNU make feature --directory.
6100 2011-03-04 Michael Snyder <msnyder@vmware.com>
6102 * server.c (queue_stop_reply): Call xmalloc not malloc.
6104 2011-03-02 Michael Snyder <msnyder@vmware.com>
6106 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6108 2011-02-28 Michael Snyder <msnyder@vmware.com>
6110 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6111 (cmd_qtframe): Ditto.
6112 (cmd_qtbuffer): Ditto.
6113 (cmd_bigqtbuffer): Ditto.
6115 * utils.c (decimal2str): Initialize 'width' to nine, then
6118 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6120 * hostio.c (require_data): Free *data, not data.
6122 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6124 * hostio.c (require_data): Use free, not xfree.
6126 2011-02-27 Michael Snyder <msnyder@vmware.com>
6128 * server.c (handle_query): Discard unused value.
6130 * hostio.c (require_data): Free malloc memory before returning
6133 2011-02-26 Michael Snyder <msnyder@vmware.com>
6135 * linux-low.c (list_threads): Call closedir for dirent.
6137 2011-02-27 Michael Snyder <msnyder@vmware.com>
6139 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6140 a case statement falls through.
6142 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6144 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6147 2011-02-26 Michael Snyder <msnyder@vmware.com>
6149 * utils.c (decimal2str): Eliminate dead code and dead param.
6150 (pulongest): Drop dead param from call to decimal2str.
6153 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6155 Revert the following patch (not approved yet):
6156 2011-02-21 Hui Zhu <teawater@gmail.com>
6157 * tracepoint.c (tp_printf): New function.
6158 (eval_agent_expr): Handle gdb_agent_op_printf.
6160 2011-02-21 Hui Zhu <teawater@gmail.com>
6162 * tracepoint.c (tp_printf): New function.
6163 (eval_agent_expr): Handle gdb_agent_op_printf.
6165 2011-02-18 Tom Tromey <tromey@redhat.com>
6167 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6168 (tracepoint.o): Likewise.
6169 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6170 (gdb_agent_op_names): Likewise.
6172 2011-02-18 Tom Tromey <tromey@redhat.com>
6174 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6175 gdb_agent_op_rot>: New constants.
6176 (gdb_agent_op_names): Add pick and roll.
6177 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6180 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6182 * aclocal.m4: Regenerated with aclocal-1.11.1.
6184 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6186 * server.c (handle_qxfer_traceframe_info): New.
6187 (qxfer_packets): Register "traceframe-info".
6188 (handle_query): Report support for qXfer:traceframe-info:read+.
6189 * tracepoint.c (match_blocktype): New.
6190 (traceframe_find_block_type): Rename to ...
6191 (traceframe_walk_blocks): ... this. Add callback filter argument,
6193 (traceframe_find_block_type): New, reimplemented on top of
6194 traceframe_walk_blocks.
6195 (build_traceframe_info_xml): New.
6196 (traceframe_read_info): New.
6197 * server.h (traceframe_read_info): Declare.
6199 2011-02-11 Yao Qi <yao@codesourcery.com>
6201 * configure.ac: Call AC_PROG_RANLIB.
6202 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6203 * configure: Regenerate.
6205 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6207 * server.c (gdb_read_memory): Change return semantics to allow
6209 (handle_search_memory_1): Adjust.
6210 (process_serial_event) <'m' packet>: Handle partial transfers.
6211 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6213 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6215 * regcache.c (init_register_cache): Initialize
6216 regcache->register_status.
6217 (free_register_cache): Release regcache->register_status.
6218 (regcache_cpy): Copy register_status.
6219 (registers_to_string): Print 'x's for unavailable registers.
6220 (supply_register): Mark the register's status valid or
6221 unavailable, depending on whether a buffer was passed in or not.
6222 (supply_register_zeroed): New.
6223 (supply_regblock): Mark the registers' status valid or
6224 unavailable, depending on whether a buffer was passed in or not.
6225 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6226 (struct regcache): New `register_status' field.
6227 (supply_register_zeroed): Declare.
6228 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6229 supply_register_zeroed, rather than passing a NULL buffer to
6231 * tracepoint.c (fetch_traceframe_registers): Update comment.
6233 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6235 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6238 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6240 * server.h (decode_xfer_write): Change prototype.
6241 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6242 and don't extract the annex here.
6243 * server.c (decode_xfer_read): Remove `annex' parameter,
6244 and don't extract the annex here.
6246 (struct qxfer): New.
6247 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6248 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6249 (handle_qxfer_statictrace): New functions, abstracted out from
6250 handle_query, and made to use the struct qxfer interface.
6251 (handle_threads_qxfer_proper): Rename to ...
6252 (handle_qxfer_threads_proper): ... this.
6253 (handle_threads_qxfer): Rename to ...
6254 (handle_qxfer_threads): ... this. Adjust.
6255 (qxfer_packets): New array.
6256 (handle_qxfer): New function.
6257 (handle_query): Use handle_qxfer.
6259 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6261 * gdbreplay.c: Shorten lines of >= 80 columns.
6262 * linux-low.c: Ditto.
6263 * linux-ppc-low.c: Ditto.
6264 * linux-s390-low.c: Ditto.
6265 * linux-sparc-low.c: Ditto.
6266 * linux-x86-low.c: Ditto.
6267 * linux-xtensa-low.c: Ditto.
6268 * mem-break.c: Ditto.
6270 * regcache.h: Ditto.
6271 * remote-utils.c: Ditto.
6274 * thread-db.c: Ditto.
6275 * tracepoint.c: Ditto.
6277 * win32-low.h: Ditto.
6279 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6281 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6284 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6286 * server.c (gdbserver_version): Update copyright year in version
6288 * gdbreplay.c (gdbreplay_version): Ditto.
6290 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6292 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6293 * linux-bfin-low.c: New file.
6294 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6295 PT_DATA_ADDR for BFIN targets.
6296 * Makefile.in (SFILES): Add linux-bfin-low.c.
6297 (clean): Remove reg-bfin.c.
6298 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6299 * README: Mention supported Blackfin targets.
6301 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6303 * .gitignore: New file.
6305 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6307 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6309 2010-10-22 Jie Zhang <jie@codesourcery.com>
6311 * Makefile.in: Add FLAGS_TO_PASS variable.
6312 (install): Remove dependency of install-only and recursively
6313 invoke make for install-only.
6315 2010-10-04 Doug Evans <dje@google.com>
6317 * Makefile.in (uninstall): Use $(DESTDIR).
6319 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6323 * linux-x86-low.c (compat_siginfo_from_siginfo)
6324 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6325 si_code is < 0. Check for si_code == SI_TIMER before checking for
6328 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6330 * lynx-i386-low.c: New file.
6331 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6333 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6335 * lynx-low.c (ptrace_request_to_str): Remove handling for
6336 request values that have been removed in LynxOS 5.x.
6338 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6340 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6343 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6345 * configure.ac: Add --enable-inprocess-agent option.
6346 * configure: Rebuilt.
6348 2010-09-06 Yao Qi <yao@codesourcery.com>
6350 * linux-low.c (linux_kill): Remove unused variable.
6351 (linux_stabilize_threads): Likewise.
6352 * server.c (start_inferior): Likewise.
6353 (queue_stop_reply_callback): Likewise.
6354 * tracepoint.c (do_action_at_tracepoint): Likewise.
6356 2010-09-06 Yao Qi <yao@codesourcery.com>
6358 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6361 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6363 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6365 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6367 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6370 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6372 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6373 gdbserver/lynx-ppc-low.c: New files.
6374 * Makefile.in (lynx_low_h): New variable.
6375 (lynx-low.o, lynx-ppc-low.o): New rules.
6376 * configure.ac: On LynxOS, link with -lnetinet.
6377 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6378 * configure: regenerate.
6380 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6382 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6383 * configure.ac: Add check for vasprintf and vsnprintf.
6384 * configure, config.in: Regenerate.
6385 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6387 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6389 * gdbreplay.c: Move include of alloca.h up, next to include of
6391 * server.h: Add include of malloc.h.
6392 * mem-break.c: Remove include of malloc.h.
6393 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6395 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6397 * Makefile.in (memmem.o): Build with -Wno-error.
6399 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6401 * utils.c (xsnprintf): Make non-static.
6402 * server.h: Add xsnprintf declaration.
6403 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6404 replace calls to snprintf by calls to xsnprintf throughout.
6406 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6408 * configure.ac: Add configure check for alloca.
6409 * configure, config.in: Regenerate.
6410 * server.h: Include alloca.h if it exists.
6411 * gdbreplay.c: Include alloca.h if it exists.
6413 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6415 * linux-low.c (__SIGRTMIN): Define if not already defined.
6416 (linux_create_inferior): Check for __ANDROID__ rather than
6418 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6419 are already deferred.
6420 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6421 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6422 stopped and already has a pending signal to report.
6423 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6424 a pending signal to report or is moving out of a jump pad.
6425 (linux_init_signals): Check for __ANDROID__ rather than
6428 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6430 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6431 debug_threads check. Avoid a linear search when not doing debug
6434 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6436 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6437 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6438 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6439 (process_event): Change local fd's type to gdb_fildes_t.
6440 (create_file_handler): Adjust prototype.
6441 (delete_file_handler): Adjust prototype.
6442 (handle_file_event): Adjust prototype. Use pfildes.
6443 (create_file_event): Adjsut prototype.
6444 * remote-utils.c (remote_desc, listen_desc): Change type to
6446 * server.h: New gdb_fildes_t typedef.
6447 [USE_WIN32API]: Include winsock2.h.
6448 (delete_file_handler, add_file_handler): Adjust prototypes.
6450 * utils.c (pfildes): New.
6452 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6454 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6455 * configure: Regenerate.
6457 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6459 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6460 (linux_done_accessing_memory): ... this.
6461 (linux_target_ops): Adjust.
6462 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6463 * nto-low.c (nto_target_ops): Adjust comment.
6464 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6465 * spu-low.c (spu_target_ops): Adjust comment.
6466 * target.h (target_ops): Rename unprepare_to_access_memory field
6467 to done_accessing_memory.
6468 (unprepare_to_access_memory): Rename to ...
6469 (done_accessing_memory): ... this.
6471 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6473 * linux-low.c (linux_prepare_to_access_memory): New.
6474 (linux_unprepare_to_access_memory): New.
6475 (linux_target_ops): Install them.
6476 * server.c (read_memory): Rename to ...
6477 (gdb_read_memory): ... this. Use
6478 prepare_to_access_memory/prepare_to_access_memory.
6479 (write_memory): Rename to ...
6480 (gdb_write_memory): ... this. Use
6481 prepare_to_access_memory/prepare_to_access_memory.
6482 (handle_search_memory_1): Adjust.
6483 (process_serial_event): Adjust.
6484 * target.h (struct target_ops): New fields
6485 prepare_to_access_memory and unprepare_to_access_memory.
6486 (prepare_to_access_memory, unprepare_to_access_memory): New.
6487 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6488 prepare_to_access_memory/prepare_to_access_memory.
6489 * nto-low.c (nto_target_ops): Adjust.
6490 * spu-low.c (spu_target_ops): Adjust.
6491 * win32-low.c (win32_target_ops): Adjust.
6493 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6495 * Makefile.in (WARN_CFLAGS): Get it from configure.
6496 (WERROR_CFLAGS): New.
6497 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6498 * configure.ac: Introduce --enable-werror, which adds -Werror to
6499 the compiler command line. Enabled by default. Disable with
6500 --disable-werror. Add -Wdeclaration-after-statement
6501 Wpointer-arith and -Wformat-nonliteral to warning flags.
6502 * configure: Regenerate.
6504 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6506 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6508 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6510 * gdbreplay.c (remote_error): New.
6512 (expect): Use gdbchar. Check for error reading from GDB.
6513 Clarify sync error output.
6514 (play): Check for errors writing to GDB.
6515 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6516 * remote-utils.c (getpkt): Check for errors writing to the remote
6519 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6521 * linux-low.c (linux_wait_1): Move non-debugging code out of
6522 `debug_threads' control.
6524 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6526 * linux-low.c (linux_wait_1): Don't set last_status here.
6527 * server.c (push_event, queue_stop_reply_callback): Assert we're
6528 not pushing a TARGET_WAITKIND_IGNORE event.
6529 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6530 (myresume, handle_target_event): Set the thread's last_resume_kind
6531 and last_status from the target returned status.
6533 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6537 * linux-x86-low.c (update_debug_registers_callback): New.
6538 (i386_dr_low_set_addr): Use it.
6539 (i386_dr_low_get_addr): New.
6540 (i386_dr_low_set_control): Use update_debug_registers_callback.
6541 (i386_dr_low_get_control): New.
6542 (i386_dr_low_get_status): Adjust.
6543 * linux-low.c (linux_stop_lwp): New.
6544 * linux-low.h (linux_stop_lwp): Declare.
6546 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6547 argument instead of a i386_debug_reg_state.
6548 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6549 a i386_debug_reg_state.
6550 (i386_insert_aligned_watchpoint): Adjust.
6551 (i386_remove_aligned_watchpoint): Adjust.
6552 (i386_low_stopped_data_address): Read the debug registers from the
6553 inferior instead of from the mirrors.
6554 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6555 (i386_dr_low_get_addr): Declare.
6556 (i386_dr_low_get_control): Declare.
6557 (i386_dr_low_get_status): Change prototype.
6559 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6560 (i386_dr_low_get_addr): New.
6561 (i386_dr_low_get_control): New.
6562 (i386_dr_low_get_status): Adjust prototype. Return
6564 (i386_initial_stuff): Clear dr_status_mirror and
6566 (i386_get_thread_context): Adjust.
6567 (i386_set_thread_context): Adjust.
6568 (i386_thread_added): Adjust.
6570 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6572 * linux-low.h (linux_thread_area): Delete declaration.
6574 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6576 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6577 after its termination.
6579 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6581 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6582 (gdb_wants_all_stopped): Delete.
6583 (linux_wait_1): Don't call them.
6584 * server.c (handle_v_cont): Tag all threads as want-stopped.
6585 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6586 stopped as "client-wants-stopped".
6588 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6590 * Makefile.in (signals_h): New.
6591 (server_h): Depend on it.
6592 (server.o): Don't depend on $(signals_def).
6593 (signals.o): Depend on $(signals_def).
6595 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6597 * Makefile.in (signals_def): New.
6598 (server_h): Append include/gdb/signals.h and signals_def.
6599 (server.o): Append signals_def.
6601 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6603 * server.c (handle_target_event): Use target_signal_to_host for
6604 resume_info.sig initialization.
6605 * target.h (struct thread_resume) <sig>: New comment.
6607 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6609 * server.c (handle_query): strcpy() the returned string from paddress()
6610 instead of sprintf().
6611 * utils.c (paddress): Return phex_nz().
6613 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6615 * server.c (handle_v_cont): Call mourn_inferior if process
6617 (myresume): Likewise.
6619 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6621 Static tracepoints, and integration with UST.
6623 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6624 * mem-break.c (uninsert_all_breakpoints)
6625 (reinsert_all_breakpoints): New.
6626 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6627 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6628 (gdb_agent_ust_loaded, helper_thread_id)
6629 (gdb_agent_helper_thread_id): New macros.
6630 (struct ipa_sym_addresses): Add addr_ust_loaded,
6631 addr_helper_thread_id, addr_cmd_buf.
6632 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6633 (in_process_agent_loaded_ust): New.
6634 (write_e_ust_not_loaded): New.
6635 (maybe_write_ipa_ust_not_loaded): New.
6636 (struct collect_static_trace_data_action): New.
6637 (enum tracepoint_type) <static_tracepoint>: New.
6638 (struct tracepoint) <handle>: Mention static tracepoints.
6639 (struct static_tracepoint_ctx): New.
6640 (CMD_BUF_SIZE): New.
6641 (add_tracepoint_action): Handle static tracepoint actions.
6642 (unprobe_marker_at): New.
6643 (clear_installed_tracepoints): Handle static tracepoints.
6644 (cmd_qtdp): Handle static tracepoints.
6645 (probe_marker_at): New.
6646 (cmd_qtstart): Handle static tracepoints.
6647 (response_tracepoint): Handle static tracepoints.
6648 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6649 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6650 (get_context_regcache): Handle static tracepoints.
6651 (do_action_at_tracepoint): Handle static tracepoint actions.
6652 (traceframe_find_block_type): Handle static trace data blocks.
6653 (traceframe_read_sdata): New.
6654 (download_tracepoints): Download static tracepoint actions.
6655 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6656 (GDB_PROBE_NAME): New.
6661 (ust_marker_to_static_tracepoint): New.
6663 (collect_ust_data_at_tracepoint): New.
6664 (gdb_ust_probe): New.
6665 (UNIX_PATH_MAX, SOCK_DIR): New.
6666 (gdb_ust_connect_sync_socket): New.
6667 (resume_thread, stop_thread): New.
6668 (run_inferior_command): New.
6669 (init_named_socket): New.
6670 (gdb_ust_socket_init): New.
6671 (cstr_to_hexstr): New.
6673 (first_marker, next_marker): New.
6674 (response_ust_marker): New.
6675 (cmd_qtfstm, cmd_qtsstm): New.
6676 (unprobe_marker_at, probe_marker_at): New.
6677 (cmd_qtstmat, gdb_ust_thread): New.
6678 (gdb_ust_init): New.
6679 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6680 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6682 (x86_64_st_collect_regmap): New.
6683 (X86_64_NUM_ST_COLLECT_GREGS): New.
6684 (AMD64_RIP_REGNUM): New.
6685 (supply_static_tracepoint_registers): New.
6686 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6688 (i386_st_collect_regmap): New.
6689 (i386_NUM_ST_COLLECT_GREGS): New.
6690 (supply_static_tracepoint_registers): New.
6691 * server.c (handle_query): Handle qXfer:statictrace:read.
6692 <qSupported>: Report support for StaticTracepoints, and
6693 qXfer:statictrace:read features.
6694 * server.h (traceframe_read_sdata)
6695 (supply_static_tracepoint_registers): Declare.
6696 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6697 (unpack_varlen_hex): Include in IPA build.
6698 * Makefile.in (ustlibs, ustinc): New.
6699 (IPA_OBJS): Add remote-utils-ipa.o.
6700 ($(IPA_LIB)): Link -ldl and -lpthread.
6702 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6703 * config.in, configure: Regenerate.
6705 2010-06-20 Ian Lance Taylor <iant@google.com>
6706 Pedro Alves <pedro@codesourcery.com>
6708 * linux-x86-low.c (always_true): Delete.
6709 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6710 trying to fool the compiler with always_true.
6712 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6714 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6715 conditions in gdbserver.
6717 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6719 * spu-low.c (spu_read_memory): Wrap around local store limit.
6720 (spu_write_memory): Likewise.
6722 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6724 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6725 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6727 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6729 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6730 uses with LONGEST uses.
6732 2010-06-14 Stan Shebs <stan@codesourcery.com>
6733 Pedro Alves <pedro@codesourcery.com>
6737 * linux-x86-low.c: Include limits.h.
6742 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6743 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6744 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6745 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6746 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6747 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6748 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6749 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6750 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6751 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6752 (amd64_emit_void_call_2): New.
6753 (amd64_emit_ops): New.
6754 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6755 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6756 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6757 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6758 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6759 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6760 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6761 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6762 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6763 (i386_emit_stack_adjust, i386_emit_int_call_1)
6764 (i386_emit_void_call_2): New.
6765 (i386_emit_ops): New.
6766 (x86_emit_ops): New.
6767 (the_low_target): Install x86_emit_ops.
6768 * server.h (struct emit_ops): New.
6769 (get_raw_reg_func_addr): Declare.
6770 (current_insn_ptr, emit_error): Declare.
6771 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6772 (set_trace_state_variable_value): New defines.
6773 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6774 addr_get_trace_state_variable_value and
6775 addr_set_trace_state_variable_value.
6776 (symbol_list): New fields for get_raw_reg,
6777 get_trace_state_variable_value and set_trace_state_variable_value.
6778 (condfn): New typedef.
6779 (struct tracepoint): New field `compiled_cond'.
6780 (do_action_at_tracepoint): Clear compiled_cond.
6781 (get_trace_state_variable_value, set_trace_state_variable_value):
6783 (condition_true_at_tracepoint): If there's a compiled condition,
6785 (current_insn_ptr, emit_error): New globals.
6786 (struct bytecode_address): New.
6787 (get_raw_reg_func_addr): New.
6788 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6789 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6790 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6791 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6792 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6793 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6794 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6795 (compile_tracepoint_condition, compile_bytecodes): New.
6796 * target.h (emit_ops): Forward declare.
6797 (struct target_ops): New field emit_ops.
6798 (target_emit_ops): New.
6799 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6800 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6801 * linux-low.c (linux_emit_ops): New.
6802 (linux_target_ops): Install it.
6803 * linux-low.h (struct linux_target_ops): New field emit_ops.
6805 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6807 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6808 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6810 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6811 Stan Shebs <stan@codesourcery.com>
6813 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6814 (all): Depend on $(extra_libraries).
6815 (install-only): Install the IPA.
6816 (IPA_OBJS, IPA_LIB): New.
6817 (clean): Remove the IPA lib.
6818 (IPAGENT_CFLAGS): New.
6819 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6820 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6821 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6822 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6823 * configure.ac: Check for atomic builtins support in the compiler.
6824 (IPA_DEPFILES, extra_libraries): Define.
6825 * configure.srv (ipa_obj): Add description.
6826 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6827 (i[34567]86-*-linux*): Set ipa_obj.
6828 (x86_64-*-linux*): Set ipa_obj.
6829 * linux-low.c (stabilizing_threads): New.
6830 (supports_fast_tracepoints): New.
6831 (linux_detach): Stabilize threads before detaching.
6832 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6833 the lwp is either not stabilizing, or is moving out of a jump pad.
6834 (linux_fast_tracepoint_collecting): New.
6835 (maybe_move_out_of_jump_pad): New.
6836 (enqueue_one_deferred_signal): New.
6837 (dequeue_one_deferred_signal): New.
6838 (linux_wait_for_event_1): If moving out of a jump pad, defer
6839 pending signals to later.
6840 (linux_stabilize_threads): New.
6841 (linux_wait_1): Check if threads need moving out of jump pads, and
6843 (stuck_in_jump_pad_callback): New.
6844 (move_out_of_jump_pad_callback): New.
6846 (linux_resume_one_lwp): Handle moving out of jump pads.
6847 (linux_set_resume_request): Dequeue deferred signals.
6848 (need_step_over_p): Also step over fast tracepoint jumps.
6849 (start_step_over): Also uninsert fast tracepoint jumps.
6850 (finish_step_over): Also reinsert fast tracepoint jumps.
6851 (linux_install_fast_tracepoint_jump): New.
6852 (linux_target_ops): Install linux_stabilize_threads and
6853 linux_install_fast_tracepoint_jump_pad.
6854 * linux-low.h (linux_target_ops) <get_thread_area,
6855 install_fast_tracepoint_jump_pad>: New fields.
6856 (struct lwp_info) <collecting_fast_tracepoint,
6857 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6858 (linux_get_thread_area): Declare.
6859 * linux-x86-low.c (jump_insn): New.
6860 (x86_get_thread_area): New.
6861 (append_insns): New.
6863 (amd64_install_fast_tracepoint_jump_pad): New.
6864 (i386_install_fast_tracepoint_jump_pad): New.
6865 (x86_install_fast_tracepoint_jump_pad): New.
6866 (the_low_target): Install x86_get_thread_area and
6867 x86_install_fast_tracepoint_jump_pad.
6868 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6869 (struct fast_tracepoint_jump): New.
6870 (fast_tracepoint_jump_insn): New.
6871 (fast_tracepoint_jump_shadow): New.
6872 (find_fast_tracepoint_jump_at): New.
6873 (fast_tracepoint_jump_here): New.
6874 (delete_fast_tracepoint_jump): New.
6875 (set_fast_tracepoint_jump): New.
6876 (uninsert_fast_tracepoint_jumps_at): New.
6877 (reinsert_fast_tracepoint_jumps_at): New.
6878 (set_breakpoint_at): Use write_inferior_memory.
6879 (uninsert_raw_breakpoint): Use write_inferior_memory.
6880 (check_mem_read): Mask out fast tracepoint jumps.
6881 (check_mem_write): Mask out fast tracepoint jumps.
6882 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6883 (set_fast_tracepoint_jump): Declare.
6884 (delete_fast_tracepoint_jump)
6885 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6886 (reinsert_fast_tracepoint_jumps_at): Declare.
6887 * regcache.c: Don't compile many functions when building the
6888 in-process agent library.
6889 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6890 the register buffer in the heap.
6891 (free_register_cache): If the register buffer isn't owned by the
6892 regcache, don't free it.
6893 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6894 pre-existing register caches.
6895 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6897 (convert_ascii_to_int): : Constify `from' parameter type.
6898 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6899 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6900 the needed buffer in-place.
6901 (relocate_instruction): New.
6902 * server.c (handle_query) <qSymbols>: If the target supports
6903 tracepoints, give it a chance of looking up symbols. Report
6904 support for fast tracepoints.
6905 (handle_status): Stabilize threads.
6906 (process_serial_event): Adjust.
6907 * server.h (struct fast_tracepoint_jump): Forward declare.
6908 (struct process_info) <fast_tracepoint_jumps>: New field.
6909 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6910 (decode_X_packet, decode_M_packet): Adjust.
6911 (relocate_instruction): Declare.
6912 (in_process_agent_loaded): Declare.
6913 (tracepoint_look_up_symbols): Declare.
6914 (struct fast_tpoint_collect_status): Declare.
6915 (fast_tracepoint_collecting): Declare.
6916 (force_unlock_trace_buffer): Declare.
6917 (handle_tracepoint_bkpts): Declare.
6918 (initialize_low_tracepoint)
6919 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6920 * target.h (struct target_ops) <stabilize_threads,
6921 install_fast_tracepoint_jump_pad>: New fields.
6922 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6923 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6924 [HAVE_STDINT_H]: Include stdint.h.
6925 (trace_debug_1): Rename to ...
6926 (trace_vdebug): ... this.
6927 (trace_debug): Rename to ...
6928 (trace_debug_1): ... this. Add `level' parameter.
6930 (ATTR_USED, ATTR_NOINLINE): New.
6931 (IP_AGENT_EXPORT): New.
6932 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6933 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6934 (about_to_request_buffer_space, trace_buffer_is_full)
6935 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6936 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6937 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6938 (traceframe_write_count, traceframes_created)
6939 (trace_state_variables)
6940 New renaming defines.
6941 (struct ipa_sym_addresses): New.
6942 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6944 (ipa_sym_addrs): New.
6945 (all_tracepoint_symbols_looked_up): New.
6946 (in_process_agent_loaded): New.
6947 (write_e_ipa_not_loaded): New.
6948 (maybe_write_ipa_not_loaded): New.
6949 (tracepoint_look_up_symbols): New.
6950 (debug_threads) [IN_PROCESS_AGENT]: New.
6951 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6952 (UNKNOWN_SIDE_EFFECTS): New.
6953 (stop_tracing): New.
6954 (flush_trace_buffer): New.
6955 (stop_tracing_bkpt): New.
6956 (flush_trace_buffer_bkpt): New.
6957 (read_inferior_integer): New.
6958 (read_inferior_uinteger): New.
6959 (read_inferior_data_pointer): New.
6960 (write_inferior_data_pointer): New.
6961 (write_inferior_integer): New.
6962 (write_inferior_uinteger): New.
6963 (struct collect_static_trace_data_action): Delete.
6964 (enum tracepoint_type): New.
6965 (struct tracepoint) <type>: New field `type'.
6966 <actions_str, step_actions, step_actions_str>: Only include in
6968 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6969 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6970 (tracepoints): Use IP_AGENT_EXPORT.
6971 (last_tracepoint): Don't include in the IPA.
6972 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6973 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6974 (alloced_trace_state_variables): New.
6975 (trace_state_variables): Use IP_AGENT_EXPORT.
6976 (traceframe_t): Delete unused variable.
6977 (circular_trace_buffer): Don't include in the IPA.
6978 (trace_buffer_start): Delete.
6979 (struct trace_buffer_control): New.
6980 (trace_buffer_free): Delete.
6981 (struct ipa_trace_buffer_control): New.
6982 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6983 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6985 (trace_buffer_ctrl): New.
6986 (TRACE_BUFFER_CTRL_CURR): New.
6987 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6988 Reimplement as macros.
6989 (trace_buffer_wrap): Delete.
6990 (traceframe_write_count, traceframe_read_count)
6991 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6992 (struct tracepoint_hit_ctx) <type>: New field.
6993 (struct fast_tracepoint_ctx): New.
6994 (memory_barrier): New.
6996 (record_tracepoint_error): Update atomically in the IPA.
6997 (clear_inferior_trace_buffer): New.
6998 (about_to_request_buffer_space): New.
6999 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7000 updating the same buffer.
7001 (add_tracepoint): Default the tracepoint's type to trap
7002 tracepoint, and orig_size to -1.
7003 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7005 (create_trace_state_variable): New parameter `gdb'. Handle it.
7006 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7007 (cmd_qtdp): Handle fast tracepoints.
7009 (max_jump_pad_size): New.
7010 (gdb_jump_pad_head): New.
7011 (get_jump_space_head): New.
7012 (claim_jump_space): New.
7013 (sort_tracepoints): New.
7014 (MAX_JUMP_SIZE): New.
7015 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7017 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7018 support. Upload fast traceframes, and delete internal IPA
7020 (stop_tracing_handler): New.
7021 (flush_trace_buffer_handler): New.
7022 (cmd_qtstop): Upload fast tracepoints.
7023 (response_tracepoint): Handle fast tracepoints.
7024 (tracepoint_finished_step): Upload fast traceframes. Set the
7025 tracepoint hit context's tracepoint type.
7026 (handle_tracepoint_bkpts): New.
7027 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7028 type. Add comment about fast tracepoints.
7029 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7030 non-existing action_str field.
7031 (get_context_regcache): Handle fast tracepoints.
7032 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7034 (fast_tracepoint_from_jump_pad_address): New.
7035 (fast_tracepoint_from_ipa_tpoint_address): New.
7036 (collecting_t): New.
7037 (force_unlock_trace_buffer): New.
7038 (fast_tracepoint_collecting): New.
7041 (write_inferior_data_ptr): New.
7042 (target_tp_heap): New.
7043 (target_malloc): New.
7044 (download_agent_expr): New.
7046 (download_tracepoints): New.
7047 (download_trace_state_variables): New.
7048 (upload_fast_traceframes): New.
7049 (IPA_FIRST_TRACEFRAME): New.
7050 (IPA_NEXT_TRACEFRAME_1): New.
7051 (IPA_NEXT_TRACEFRAME): New.
7052 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7053 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7054 (gdb_jump_pad_buffer_end): New.
7055 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7056 (initialize_tracepoint): Adjust.
7057 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7058 buffer. Initialize the low module.
7059 * utils.c (PREFIX, TOOLNAME): New.
7060 (malloc_failure): Use PREFIX.
7061 (error): In the IPA, an error causes an exit.
7062 (fatal, warning): Use PREFIX.
7063 (internal_error): Use TOOLNAME.
7064 (NUMCELLS): Increase to 10.
7065 * configure, config.in: Regenerate.
7067 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7069 * server.c (handle_query) <qSupported>: Do two passes over the
7070 qSupported string to avoid nesting strtok.
7072 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7074 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7076 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7078 * configure: Regenerate.
7079 * proc-service.list: New.
7081 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7083 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7086 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7088 * gdbreplay.c (remote_open): Check error return from socket() call by
7089 its equality to -1 not by it being negative.
7090 * remote-utils.c (remote_open): Likewise.
7092 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7094 * config.h: Regenerate.
7096 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7098 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7099 doesn't provide PTRACE_GET_THREAD_AREA.
7101 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7103 * linux-m68k-low.c: Include <asm/ptrace.h>
7104 (ps_get_thread_area): Implement.
7106 2010-05-03 Doug Evans <dje@google.com>
7108 * event-loop.c (struct callback_event): New struct.
7109 (callback_list): New global.
7110 (append_callback_event, delete_callback_event): New functions.
7111 (process_callback): New function.
7112 (start_event_loop): Call it.
7113 * remote-utils.c (NOT_SCHEDULED): Define.
7114 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7115 moved out of readchar.
7116 (readchar): Rewrite. Call reschedule before returning.
7117 (reset_readchar): New function.
7118 (remote_close): Call it.
7119 (process_remaining, reschedule): New functions.
7120 * server.h (callback_handler_func): New typedef.
7121 (append_callback_event, delete_callback_event): Declare.
7123 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7125 * proc-service.c (ps_pglobal_lookup): Use
7126 thread_db_look_up_one_symbol.
7127 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7128 parameter. Use it instead of all_symbols_looked_up.
7129 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7131 (all_symbols_looked_up): Don't declare.
7132 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7133 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7135 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7136 Set all_symbols_looked_up here.
7137 (thread_db_look_up_one_symbol): New.
7138 (thread_db_get_tls_address): Adjust.
7139 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7140 thread_db object on the heap, and tentatively set it in the
7142 (thread_db_init): Don't set all_symbols_looked_up here.
7143 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7145 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7147 * linux-low.c (linux_kill, linux_detach): Adjust.
7148 (status_pending_p_callback): Remove redundant statement. Check
7149 for !TARGET_WAITIKIND_IGNORE, instead of
7150 TARGET_WAITKIND_STOPPED.
7151 (handle_tracepoints): Make sure LWP is locked. Adjust.
7152 (linux_wait_for_event_1): Adjust.
7153 (linux_cancel_breakpoints): New.
7154 (unsuspend_one_lwp): New.
7155 (unsuspend_all_lwps): New.
7156 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7157 (send_sigstop_callback): Change return type to int, add new
7158 `except' parameter and handle it.
7159 (suspend_and_send_sigstop_callback): New.
7160 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7161 pass them down. If SUSPEND, also increment the lwp's suspend
7163 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7164 (need_step_over_p): Don't consider suspended LWPs.
7165 (start_step_over): Adjust.
7166 (proceed_one_lwp): Change return type to int, add new `except'
7167 parameter and handle it.
7168 (unsuspend_and_proceed_one_lwp): New.
7169 (proceed_all_lwps): Use find_inferior instead of
7171 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7172 also decrement the suspend count of LWPs. Pass `except' down,
7173 instead of hacking its suspend count.
7174 (linux_pause_all): Add `freeze' parameter. Adjust.
7175 (linux_unpause_all): New.
7176 (linux_target_ops): Install linux_unpause_all.
7177 * server.c (handle_status): Adjust.
7178 * target.h (struct target_ops): New fields `unpause_all' and
7179 `cancel_breakpoints'. Add new parameter to `pause_all'.
7180 (pause_all): Add new `freeze' parameter.
7182 (cancel_breakpoints): New.
7183 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7185 (cmd_qtstart): Pause threads.
7186 (stop_tracing): Pause threads, and cancel breakpoints.
7187 * win32-low.c (win32_target_ops): Adjust.
7189 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7191 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7192 the inferior right away from here...
7193 (linux_wait_1): ... to here, and adjust to check the thread's
7194 last_resume_kind instead of the lwp's step or stop_expected flags.
7196 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7198 * README: Use consistent `GDB' and `GDBserver' spellings.
7200 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7202 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7203 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7204 (linux_detach_one_lwp): Assume the lwp is stopped.
7205 (any_thread_of): Delete.
7206 (linux_detach): Stop all lwps here. Don't blindly delete all
7208 (delete_lwp_callback): New.
7209 (linux_mourn): Delete all lwps of the process that is gone.
7210 (linux_wait_1): Don't delete the last lwp of the process here.
7211 * mem-break.h (mark_breakpoints_out): Declare.
7212 * mem-break.c (mark_breakpoints_out): New.
7213 (free_all_breakpoints): Use it.
7214 * server.c (handle_target_event): If the process is gone, mark
7216 * thread-db.c (struct thread_db) <create_bp>: New field.
7217 (thread_db_enable_reporting): Fix prototype. Store a thread event
7218 breakpoint reference in the thread_db struct.
7219 (thread_db_load_search): Clear the thread_db object.
7220 (try_thread_db_load_1): Ditto.
7221 (switch_to_process): New.
7222 (disable_thread_event_reporting): Use it.
7223 (remove_thread_event_breakpoints): New.
7224 (thread_db_detach, thread_db_mourn): Use it.
7226 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7228 * linux-low.c (linux_enable_event_reporting): New.
7229 (linux_wait_for_event_1, handle_extended_wait): Use it.
7231 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7233 * linux-low.c (linux_kill_one_lwp, linux_kill)
7234 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7235 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7236 SIGSTOP even if the LWP is stopped.
7237 (send_sigstop_callback): New.
7238 (stop_all_lwps): Use send_sigstop_callback instead.
7239 (linux_resume_one_thread): Adjust.
7240 (proceed_one_lwp): Still proceed an LWP that the client has
7241 requested to stop, if we haven't reported it as stopped yet. Make
7242 sure that LWPs the client want stopped, have a pending SIGSTOP.
7244 2010-04-26 Doug Evans <dje@google.com>
7246 * server.c (handle_general_set): Make static.
7248 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7249 Print received char after testing for error/eof instead of before.
7250 (input_interrupt): Tweak comment.
7252 2010-04-23 Doug Evans <dje@google.com>
7254 * server.c (start_inferior): Print inferior argv if --debug.
7256 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7258 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7259 * nto-x86-low.c: Include server.h
7261 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7263 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7264 be consistent with other sources of this directory.
7265 (init_registers_amd64): Correct name of source file of this function
7268 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7270 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7273 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7275 * win32-i386-low.c: Add 64-bit support.
7276 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7277 (init_registers_amd64): Declare.
7278 (mappings): Add 64-bit version of array.
7279 (init_windows_x86): New function.
7280 (the_low_target): Change init_arch field to init_windows_x86.
7282 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7284 * win32-low.c: Adapt to support also 64-bit architecture.
7285 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7286 (get_image_name): Use SIZE_T type for local variable `done'.
7287 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7288 (toolhelp_get_dll_name): Idem.
7289 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7290 Use uintptr_t typecast to avoid warning.
7291 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7292 (handle_exception): Use phex_nz to avoid warning.
7293 (win32_wait): Remove unused local variable `process'.
7295 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7297 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7300 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7302 * configure.ac: Use `ws2_32' library for srv_mingw.
7303 * configure: Regenerate.
7304 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7305 * remote-utils.c: Likewise.
7307 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7309 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7310 if __x86_64__ is defined.
7312 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7314 * configure: Regenerate.
7316 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7318 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7319 * target.h (target_ops): New get_tib_address field.
7320 * win32-low.h (win32_thread_info): Add thread_local_base field.
7321 * win32-low.c (child_add_thread): Add tlb argument.
7322 Set thread_local_base field to TLB.
7323 (get_child_debug_event): Adapt to child_add_thread change.
7324 (win32_get_tib_address): New function.
7325 (win32_target_ops): Set get_tib_address field to
7326 win32_get_tib_address.
7327 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7329 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7331 * linux-low.c (linux_mourn): Also remove the process.
7332 * server.c (handle_target_event): Don't remove the process here.
7333 * nto-low.c (nto_mourn): New.
7334 (nto_target_ops): Install it.
7335 * spu-low.c (spu_mourn): New.
7336 (spu_target_ops): Install it.
7337 * win32-low.c (win32_mourn): New.
7338 (win32_target_ops): Install it.
7340 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7342 * server.h (buffer_xml_printf): Remove redundant `;'.
7344 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7346 * regcache.c (set_register_cache): Invalidate regcaches before
7347 changing the register cache layout.
7348 (regcache_invalidate_one): Allow a NULL regcache.
7349 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7350 regcaches before changing the register cache layout or the target
7353 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7355 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7356 variable warning on Linux/x86-64.
7358 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7360 GDBserver disconnected tracing support.
7362 * linux-low.c (linux_remove_process): Delete.
7363 (add_lwp): Don't set last_resume_kind here.
7364 (linux_kill): Use `mourn'.
7365 (linux_detach): Use `thread_db_detach', and `mourn'.
7367 (linux_attach_lwp_1): Adjust comment.
7368 (linux_attach): last_resume_kind moved the thread_info; adjust.
7369 (status_pending_p_callback): Adjust.
7370 (linux_wait_for_event_1): Adjust.
7371 (count_events_callback, select_singlestep_lwp_callback)
7372 (select_event_lwp_callback, cancel_breakpoints_callback)
7373 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7374 (proceed_one_lwp): Adjust.
7375 (linux_async): Add debug output.
7376 (linux_thread_stopped): New.
7377 (linux_pause_all): New.
7378 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7380 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7381 (thread_db_free): Delete declaration.
7382 (thread_db_detach, thread_db_mourn): Declare.
7383 * thread-db.c (thread_db_init): Use thread_db_mourn.
7384 (thread_db_free): Delete, split in two.
7385 (disable_thread_event_reporting): New.
7386 (thread_db_detach): New.
7387 (thread_db_mourn): New.
7389 * server.h (struct thread_info) <last_resume_kind>: New field.
7390 <attached>: Add comment.
7391 <gdb_detached>: New field.
7392 (handler_func): Change return type to int.
7393 (handle_serial_event, handle_target_event): Ditto.
7394 (gdb_connected): Declare.
7396 (disconnected_tracing): Declare.
7397 (stop_tracing): Declare.
7399 * server.c (handle_query) <qSupported>: Report support for
7400 disconnected tracing.
7401 (queue_stop_reply_callback): Account for running threads.
7402 (gdb_wants_thread_stopped): New.
7403 (gdb_wants_all_threads_stopped): New.
7404 (gdb_reattached_process): New.
7405 (handle_status): Clear the `gdb_detached' flag of all processes.
7406 In all-stop, stop all threads.
7407 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7408 (process_serial_event): If the remote connection breaks, or if an
7409 exit was forced with "monitor exit", force an event loop exit.
7410 Handle disconnected tracing on detach.
7411 (handle_serial_event): Adjust.
7412 (handle_target_event): If GDB isn't connected, forward events back
7413 to the inferior, unless the last process exited, in which case,
7414 exit gdbserver. Adjust interface.
7416 * remote-utils.c (remote_open): Don't block in accept. Instead
7417 register an event loop source on the listen socket file
7418 descriptor. Refactor bits into ...
7419 (listen_desc): ... this new global.
7420 (gdb_connected): ... this new function.
7421 (enable_async_notification): ... this new function.
7422 (handle_accept_event): ... this new function.
7423 (remote_close): Clear remote_desc.
7425 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7427 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7429 (mourn_inferior): Define.
7430 (target_process_qsupported): Avoid the dangling else problem.
7431 (thread_stopped): Define.
7432 (pause_all): Define.
7433 (target_waitstatus_to_string): Declare.
7434 * target.c (target_waitstatus_to_string): New.
7436 * tracepoint.c (tracing): Make extern.
7437 (disconnected_tracing): New.
7438 (stop_tracing): Make extern. Handle tracing stops due to GDB
7440 (cmd_qtdisconnected): New.
7441 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7442 (handle_tracepoint_general_set): Handle QTDisconnected.
7444 * event-loop.c (event_handler_func): Change return type to int.
7445 (process_event): Bail out if the event handler wants the event
7447 (handle_file_event): Ditto.
7448 (start_event_loop): Bail out if the event handler wants the event
7451 * nto-low.c (nto_target_ops): Adjust.
7452 * spu-low.c (spu_wait): Don't remove the process here.
7453 (spu_target_ops): Adjust.
7454 * win32-low.c (win32_wait): Don't remove the process here.
7455 (win32_target_ops): Adjust.
7457 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7459 * regcache.c (realloc_register_cache): Invalidate inferior's
7460 regcache before recreating it.
7462 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7464 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7466 2010-04-09 Stan Shebs <stan@codesourcery.com>
7467 Pedro Alves <pedro@codesourcery.com>
7469 * server.h (LONGEST): New.
7470 (struct thread_info) <while_stepping>: New field.
7471 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7473 (initialize_tracepoint, handle_tracepoint_general_set)
7474 (handle_tracepoint_query, tracepoint_finished_step)
7475 (tracepoint_was_hit, release_while_stepping_state_list):
7476 (current_traceframe): Declare.
7477 * server.c (handle_general_set): Handle tracepoint packets.
7479 (write_memory): New.
7480 (handle_search_memory_1): Use read_memory.
7481 (handle_query): Report support for conditional tracepoints, trace
7482 state variables, and tracepoint sources. Handle tracepoint
7484 (main): Initialize the tracepoints module.
7485 (process_serial_event): Handle traceframe reads/writes.
7487 * linux-low.c (handle_tracepoints): New.
7488 (linux_wait_1): Call it.
7489 (linux_resume_one_lwp): Handle while-stepping.
7490 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7491 (linux_target_ops): Install them.
7492 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7494 * linux-x86-low.c (x86_supports_tracepoints): New.
7495 (the_low_target). Install it.
7497 * mem-break.h (delete_breakpoint): Declare.
7498 * mem-break.c (delete_breakpoint): Make external.
7500 * target.h (struct target_ops): Add `supports_tracepoints',
7501 `read_pc', and `write_pc' fields.
7502 (target_supports_tracepoints): Define.
7503 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7506 * regcache.h (struct regcache) <registers_owned>: New field.
7507 (init_register_cache, regcache_cpy): Declare.
7508 (regcache_read_pc, regcache_write_pc): Declare.
7509 (register_cache_size): Declare.
7510 (supply_regblock): Declare.
7511 * regcache.c (init_register_cache): New.
7512 (new_register_cache): Use it.
7513 (regcache_cpy): New.
7514 (register_cache_size): New.
7515 (supply_regblock): New.
7516 (regcache_read_pc, regcache_write_pc): New.
7518 * tracepoint.c: New.
7520 * Makefile.in (OBS): Add tracepoint.o.
7521 (tracepoint.o): New rule.
7523 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7525 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7527 (i386-mmx.c): Likewise.
7528 (i386-mmx-linux.o): Likewise.
7529 (i386-mmx-linux.c): Likewise.
7531 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7532 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7533 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7534 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7536 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7537 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7538 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7540 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7542 * Makefile.in (clean): Updated.
7544 (i386-avx.c): Likewise.
7545 (i386-avx-linux.o): Likewise.
7546 (i386-avx-linux.c): Likewise.
7547 (amd64-avx.o): Likewise.
7548 (amd64-avx.c): Likewise.
7549 (amd64-avx-linux.o): Likewise.
7550 (amd64-avx-linux.c): Likewise.
7552 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7553 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7554 (srv_amd64_regobj): Add amd64-avx.o.
7555 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7556 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7557 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7558 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7559 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7560 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7561 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7563 * i387-fp.c: Include "i386-xstate.h".
7565 (i387_cache_to_xsave): Likewise.
7566 (i387_xsave_to_cache): Likewise.
7567 (x86_xcr0): Likewise.
7569 * i387-fp.h (i387_cache_to_xsave): Likewise.
7570 (i387_xsave_to_cache): Likewise.
7571 (x86_xcr0): Likewise.
7573 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7574 * linux-crisv32-low.c (target_regsets): Likewise.
7575 * linux-m68k-low.c (target_regsets): Likewise.
7576 * linux-mips-low.c (target_regsets): Likewise.
7577 * linux-ppc-low.c (target_regsets): Likewise.
7578 * linux-s390-low.c (target_regsets): Likewise.
7579 * linux-sh-low.c (target_regsets): Likewise.
7580 * linux-sparc-low.c (target_regsets): Likewise.
7581 * linux-xtensa-low.c (target_regsets): Likewise.
7583 * linux-low.c: Include <sys/uio.h>.
7584 (regsets_fetch_inferior_registers): Support nt_type.
7585 (regsets_store_inferior_registers): Likewise.
7586 (linux_process_qsupported): New.
7587 (linux_target_ops): Add linux_process_qsupported.
7589 * linux-low.h (regset_info): Add nt_type.
7590 (linux_target_ops): Add process_qsupported.
7592 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7594 (init_registers_i386_avx_linux): New.
7595 (init_registers_amd64_avx_linux): Likewise.
7596 (xmltarget_i386_linux_no_xml): Likewise.
7597 (xmltarget_amd64_linux_no_xml): Likewise.
7598 (PTRACE_GETREGSET): Likewise.
7599 (PTRACE_SETREGSET): Likewise.
7600 (x86_fill_xstateregset): Likewise.
7601 (x86_store_xstateregset): Likewise.
7602 (use_xml): Likewise.
7603 (x86_linux_update_xmltarget): Likewise.
7604 (x86_linux_process_qsupported): Likewise.
7605 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7606 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7607 init_registers_i386_linux here. Call
7608 x86_linux_update_xmltarget.
7609 (the_low_target): Add x86_linux_process_qsupported.
7611 * server.c (handle_query): Call target_process_qsupported.
7613 * target.h (target_ops): Add process_qsupported.
7614 (target_process_qsupported): New.
7616 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7618 * inferiors.c (add_thread): Set last_status kind to
7619 TARGET_WAITKIND_IGNORE.
7620 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7621 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7622 (linux_wait_1): Move `thread' local definition to block that uses
7623 it. Don't NULL initialize `event_child'.
7624 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7625 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7626 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7628 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7630 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7631 an extended waitstatus, or by a watchpoint.
7632 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7633 thread was stepping or has been stopped by a watchpoint.
7635 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7637 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7638 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7639 of another, then delete the previous, and validate all
7641 (validate_inserted_breakpoint): New.
7642 (delete_disabled_breakpoints): New.
7643 (validate_breakpoints): New.
7644 (check_mem_read): Validate breakpoints before trusting their
7645 shadow. Delete disabled breakpoints.
7646 (check_mem_write): Validate breakpoints before trusting they
7647 should be inserted. Delete disabled breakpoints.
7648 * mem-break.h (validate_breakpoints):
7649 * server.c (handle_query): Validate breakpoints when we see a
7652 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7654 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7655 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7656 if we could tell there's a GDB breakpoint at stop_pc.
7657 (need_step_over_p): Don't do a step over if we find a GDB
7658 breakpoint at the resume PC.
7660 * mem-break.c (struct raw_breakpoint): New.
7661 (enum bkpt_type): New type `gdb_breakpoint'.
7662 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7663 fields. New field `raw'.
7664 (find_raw_breakpoint_at): New.
7665 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7667 (set_breakpoint_at): Adjust.
7668 (delete_raw_breakpoint): New.
7669 (release_breakpoint): New.
7670 (delete_breakpoint): Rename to...
7671 (delete_breakpoint_1): ... this. Add proc parameter. Use
7672 release_breakpoint. Return ENOENT.
7673 (delete_breakpoint): Reimplement.
7674 (find_breakpoint_at): Delete.
7675 (find_gdb_breakpoint_at): New.
7676 (delete_breakpoint_at): Delete.
7677 (set_gdb_breakpoint_at): New.
7678 (delete_gdb_breakpoint_at): New.
7679 (gdb_breakpoint_here): New.
7680 (set_reinsert_breakpoint): Use release_breakpoint.
7681 (uninsert_breakpoint): Rename to ...
7682 (uninsert_raw_breakpoint): ... this.
7683 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7684 (reinsert_raw_breakpoint): Change parameter type to
7686 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7688 (check_breakpoints): Adjust. Use release_breakpoint.
7689 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7690 (breakpoint_inserted_here): Ditto.
7691 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7692 Don't trust the breakpoint's shadow if it is not inserted.
7693 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7694 (delete_all_breakpoints): Adjust.
7695 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7696 use delete_breakpoint_1.
7698 * mem-break.h (breakpoints_supported): Delete declaration.
7699 (set_gdb_breakpoint_at): Declare.
7700 (gdb_breakpoint_here): Declare.
7701 (delete_breakpoint_at): Delete.
7702 (delete_gdb_breakpoint_at): Declare.
7704 * server.h (struct raw_breakpoint): Forward declare.
7705 (struct process_info): New field `raw_breakpoints'.
7707 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7710 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7712 * linux-low.c (status_pending_p_callback): Fix comment.
7713 (linux_wait_for_event_1): Move most of the internal breakpoint
7714 handling from here...
7715 (linux_wait_1): ... to here.
7716 (count_events_callback): New.
7717 (select_singlestep_lwp_callback): New.
7718 (select_event_lwp_callback): New.
7719 (cancel_breakpoints_callback): New.
7720 (select_event_lwp): New.
7721 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7722 priority to all LWPs that have had events that should be reported
7723 to the client. Cancel breakpoints when about to reporting the
7724 event to the client, not while stopping lwps. No longer cancel
7725 finished single-steps here.
7726 (cancel_finished_single_step): Delete.
7727 (cancel_finished_single_steps): Delete.
7729 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7731 * mem-break.c (enum bkpt_type): New.
7732 (struct breakpoint): New field `type'.
7733 (set_breakpoint_at): Change return type to struct breakpoint
7734 pointer. Set type to `other_breakpoint' by default.
7735 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7736 in the breakpoint list.
7737 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7738 (reinsert_breakpoint): Rename to ...
7739 (reinsert_raw_breakpoint): ... this.
7740 (reinsert_breakpoints_at): Adjust.
7741 * mem-break.h (struct breakpoint): Declare.
7742 (set_breakpoint_at): Change return type to struct breakpoint
7745 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7747 * server.c (handle_query): Assign, not compare.
7749 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7751 Teach linux gdbserver to step-over-breakpoints.
7753 * linux-low.c (can_hardware_single_step): New.
7754 (supports_breakpoints): New.
7755 (handle_extended_wait): If stopping threads, read the stop pc of
7758 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7759 low target doesn't support retrieving the PC.
7760 (add_lwp): Set last_resume_kind to resume_continue.
7761 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7762 (linux_attach): Don't clear stop_expected. Set the lwp's
7763 last_resume_kind to resume_stop.
7764 (linux_detach_one_lwp): Don't check for removed breakpoints.
7765 (check_removed_breakpoint): Delete.
7766 (status_pending_p): Rename to ...
7767 (status_pending_p_callback): ... this. Don't check for removed
7768 breakpoints. Don't consider threads that are stopped from GDB's
7770 (linux_wait_for_lwp): Always read the stop_pc here.
7771 (cancel_breakpoint): New.
7772 (step_over_bkpt): New global.
7773 (linux_wait_for_event_1): Implement stepping over breakpoints.
7774 (gdb_wants_lwp_stopped): New.
7775 (gdb_wants_all_stopped): New.
7776 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7777 single-step traps here. Store the thread's last reported target
7779 (send_sigstop): Don't clear stop_expected. Always set it,
7781 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7782 (cancel_finished_single_step): New.
7783 (cancel_finished_single_steps): New.
7784 (wait_for_sigstop): Don't cancel finished single-step traps here.
7785 (linux_resume_one_lwp): Don't check for removed breakpoints.
7786 Don't set `step' on non-hardware step archs.
7787 (linux_set_resume_request): Ignore resume_stop requests if already
7788 stopping or stopped. Set the lwp's last_resume_kind.
7789 (resume_status_pending_p): Don't check for removed breakpoints.
7790 (need_step_over_p): New.
7791 (start_step_over): New.
7792 (finish_step_over): New.
7793 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7794 requests. Clear the thread's last reported target waitstatus.
7795 Don't use the `suspended' flag. Don't consider pending breakpoints.
7796 (linux_resume): Start a step-over if necessary.
7797 (proceed_one_lwp): New.
7798 (proceed_all_lwps): New.
7799 (unstop_all_lwps): New.
7800 * linux-low.h (struct lwp_info): Rewrite comment for the
7801 `suspended' flag. Add the `stop_pc' field. Delete the
7802 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7803 Add `'last_resume_kind' and `need_step_over' fields.
7804 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7805 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7806 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7807 (set_raw_breakpoint_at): New.
7808 (set_breakpoint_at): Rewrite to use it.
7809 (reinsert_breakpoint_handler): Delete.
7810 (set_reinsert_breakpoint): New.
7811 (reinsert_breakpoint_by_bp): Delete.
7812 (delete_reinsert_breakpoints): New.
7813 (uninsert_breakpoint): Rewrite.
7814 (uninsert_breakpoints_at): New.
7815 (reinsert_breakpoint): Rewrite.
7816 (reinsert_breakpoints_at): New.
7817 (check_breakpoints): Rewrite.
7818 (breakpoint_here): New.
7819 (breakpoint_inserted_here): New.
7820 (check_mem_read): Adjust.
7821 * mem-break.h (breakpoints_supported, breakpoint_here)
7822 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7823 (reinsert_breakpoint_by_bp): Delete declaration.
7824 (delete_reinsert_breakpoints): Declare.
7825 (reinsert_breakpoint): Delete declaration.
7826 (reinsert_breakpoints_at): Declare.
7827 (uninsert_breakpoint): Delete declaration.
7828 (uninsert_breakpoints_at): Declare.
7829 (check_breakpoints): Adjust prototype.
7830 * server.h: Adjust include order.
7831 (struct thread_info): Declare here. Add a `last_status' field.
7833 2010-03-23 Michael Snyder <msnyder@vmware.com>
7835 * server.c (crc32): New function.
7836 (handle_query): Add handling for 'qCRC:' request.
7838 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7840 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7841 lwp had been stopped by a watchpoint.
7843 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7845 * server.h (internal_error): Declare.
7846 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7847 * utils.c (internal_error): New function.
7849 2010-03-15 Andreas Schwab <schwab@redhat.com>
7851 * configure.srv: Fix typo setting srv_regobj.
7853 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7855 * linux-low.c (fetch_register): Avoid passing a non string literal
7857 (usr_store_inferior_registers): Ditto.
7859 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7861 * linux-low.c (linux_write_memory): Bail out early if peeking
7864 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7866 * linux-low.h (struct lwp_info): New fields
7867 `stopped_by_watchpoint' and `stopped_data_address'.
7868 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7869 here, and cache them in the lwp object.
7870 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7872 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7874 (linux_stopped_by_watchpoint): Rewrite.
7875 (linux_stopped_data_address): Rewrite.
7877 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7879 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7880 switching the current inferior, not before.
7882 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7884 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7885 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7886 i386-linux.c and amd64-linux.c.
7887 (reg-i386.o): Removed.
7888 (reg-i386.c): Likewise.
7889 (reg-i386-linux.o): Likewise.
7890 (reg-i386-linux.c): Likewise.
7891 (reg-x86-64.o): Likewise.
7892 (reg-x86-64.c): Likewise.
7893 (reg-x86-64-linux.o): Likewise.
7894 (reg-x86-64-linux.c): Likewise.
7897 (i386-linux.o): Likewise.
7898 (i386-linux.c): Likewise.
7899 (amd64.o): Likewise.
7900 (amd64.c): Likewise.
7901 (amd64-linux.o): Likewise.
7902 (amd64-linux.c): Likewise.
7904 * configure.srv (srv_i386_regobj): New.
7905 (srv_i386_linux_regobj): Likewise.
7906 (srv_amd64_regobj): Likewise.
7907 (srv_amd64_linux_regobj): Likewise.
7908 (srv_i386_32bit_xmlfiles): Likewise.
7909 (srv_i386_64bit_xmlfiles): Likewise.
7910 (srv_i386_xmlfiles): Likewise.
7911 (srv_amd64_xmlfiles): Likewise.
7912 (srv_i386_linux_xmlfiles): Likewise.
7913 (srv_amd64_linux_xmlfiles): Likewise.
7914 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7915 srv_xmlfiles to $srv_i386_xmlfiles.
7916 (i[34567]86-*-mingw32ce*): Likewise.
7917 (i[34567]86-*-mingw*): Likewise.
7918 (i[34567]86-*-nto*): Likewise.
7919 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7920 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7921 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7922 (x86_64-*-linux*): Likewise.
7924 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7925 (init_registers_amd64_linux): New.
7926 (x86_arch_setup): Replace init_registers_x86_64_linux with
7927 init_registers_amd64_linux.
7929 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7931 * configure.ac: Check for libdl. If it is not available link against
7932 static libthread_db.
7933 * configure: Regenerate.
7935 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7939 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7940 handing a read watchpoint.
7941 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7943 2010-02-12 Doug Evans <dje@google.com>
7945 * linux-low.c (linux_supports_tracefork_flag): Document.
7946 (linux_look_up_symbols): Add comment.
7948 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7950 * regcache.c (supply_register): Clear regcache if buf is NULL.
7952 2010-02-02 Nicolas Roche <roche@sourceware.org>
7953 Joel Brobecker <brobecker@adacore.com>
7955 * inferiors.c (find_inferior): Add function documentation.
7956 (unloaded_dll): Handle the case where the unloaded dll has not
7957 been previously registered in the dll list.
7959 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7961 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7962 (thumb2_breakpoint): New.
7963 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7965 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7967 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7968 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7971 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7973 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7975 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7977 * linux-s390-low.c (s390_collect_ptrace_register)
7978 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7980 2010-01-21 Doug Evans <dje@google.com>
7982 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7983 (PTRACE_ARG4_TYPE): New macro.
7984 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7985 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7986 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7987 (usr_store_inferior_registers): Ditto.
7988 (linux_read_memory, linux_write_memory): Ditto.
7989 (linux_test_for_tracefork): Ditto.
7991 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7992 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7994 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7996 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7999 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8001 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8002 prototype to take a regcache. Adjust.
8004 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8006 * regcache.h (struct thread_info): Forward declare.
8007 (struct regcache): New.
8008 (new_register_cache): Adjust prototype.
8009 (get_thread_regcache): Declare.
8010 (free_register_cache): Adjust prototype.
8011 (registers_to_string, registers_from_string): Ditto.
8012 (supply_register, supply_register_by_name, collect_register)
8013 (collect_register_as_string, collect_register_by_name): Ditto.
8014 * regcache.c (struct inferior_regcache_data): Delete.
8015 (get_regcache): Rename to ...
8016 (get_thread_regcache): ... this. Adjust. Switch inferior before
8018 (regcache_invalidate_one): Adjust.
8019 (regcache_invalidate): Fix prototype.
8020 (new_register_cache): Return the new register cache.
8021 (free_register_cache): Change prototype.
8022 (realloc_register_cache): Adjust.
8023 (registers_to_string): Change prototype to take a regcache. Adjust.
8024 (registers_from_string): Ditto.
8025 (register_data): Ditto.
8026 (supply_register): Ditto.
8027 (supply_register_by_name): Ditto.
8028 (collect_register): Ditto.
8029 (collect_register_as_string): Ditto.
8030 (collect_register_by_name): Ditto.
8031 * server.c (process_serial_event): Adjust.
8032 * linux-low.h (regset_fill_func, regset_store_func): Change
8034 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8036 * linux-low.c (get_stop_pc): Adjust.
8037 (check_removed_breakpoint): Adjust.
8038 (linux_wait_for_event): Adjust.
8039 (linux_resume_one_lwp): Adjust.
8040 (fetch_register): Add regcache parameter. Adjust.
8041 (usr_store_inferior_registers): Ditto.
8042 (regsets_fetch_inferior_registers): Ditto.
8043 (regsets_store_inferior_registers): Ditto.
8044 (linux_fetch_registers, linux_store_registers): Ditto.
8045 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8047 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8049 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8050 prototype to take a regcache.
8051 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8052 * remote-utils.c (convert_ascii_to_int, outreg)
8053 (prepare_resume_reply): Change prototype to take a regcache.
8055 * target.h (struct target_ops) <fetch_registers, store_registers>:
8056 Change prototype to take a regcache.
8057 (fetch_inferior_registers, store_inferior_registers): Change
8058 prototype to take a regcache. Adjust.
8059 * proc-service.c (ps_lgetregs): Adjust.
8060 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8061 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8062 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8063 take a regcache. Adjust.
8064 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8065 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8066 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8067 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8068 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8069 (cris_cannot_fetch_register):
8070 (cris_breakpoint_at): Change prototype to take a regcache.
8072 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8073 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8074 to take a regcache. Adjust.
8075 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8077 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8078 take a regcache. Adjust.
8079 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8080 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8081 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8082 * linux-mips-low.c (mips_get_pc):
8083 (mips_set_pc): Change prototype to take a regcache. Adjust.
8084 (mips_reinsert_addr): Adjust.
8085 (mips_collect_register): Change prototype to take a regcache.
8087 (mips_supply_register):
8088 (mips_collect_register_32bit, mips_supply_register_32bit)
8089 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8090 (mips_store_fpregset): Ditto.
8091 * linux-ppc-low.c (ppc_supply_ptrace_register)
8092 (ppc_supply_ptrace_register): Ditto.
8093 (parse_spufs_run): Adjust.
8094 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8095 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8096 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8097 take a regcache. Adjust.
8098 * linux-s390-low.c (s390_collect_ptrace_register)
8099 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8100 (s390_set_pc): Change prototype to take a regcache. Adjust.
8101 (s390_arch_setup): Adjust.
8102 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8103 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8104 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8105 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8106 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8108 (sparc_breakpoint_at): Adjust.
8109 * linux-xtensa-low.c (xtensa_fill_gregset):
8110 (xtensa_store_gregset):
8111 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8112 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8113 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8114 prototype to take a regcache. Adjust.
8115 * win32-arm-low.c (arm_fetch_inferior_register)
8116 (arm_store_inferior_register): Change prototype to take a
8118 * win32-i386-low.c (i386_fetch_inferior_register)
8119 (i386_store_inferior_register): Change prototype to take a
8121 * win32-low.c (child_fetch_inferior_registers)
8122 (child_store_inferior_registers): Change prototype to take a
8124 (win32_wait): Adjust.
8125 (win32_fetch_inferior_registers): Change prototype to take a
8127 (win32_store_inferior_registers): Adjust.
8128 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8129 store_inferior_register>: Change prototype to take a regcache.
8131 2010-01-20 Doug Evans <dje@google.com>
8133 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8135 (linux_wait_for_event1, linux_init_signals): Ditto.
8136 (W_STOPCODE): Provide definition if missing.
8138 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8140 * linux-low.c (linux_core_of_thread): New.
8141 (compare_ints, show_process, list_threads): New.
8142 (linux_qxfer_osdata): Report threads and cores.
8143 (linux_target_op): Register linux_core_of_thread.
8144 * remote-utils.c (prepare_resume_reply): Report the core.
8145 (buffer_xml_printf): Support %d specifier.
8146 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8148 (handle_query): Handle qXfer:threads. Announce availability
8150 * target.h (struct target_ops): New field core_of_thread.
8152 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8154 * Makefile.in (clean): Remove new generated files.
8155 (reg-s390.o, reg-s390.c): Remove rules.
8156 (reg-s390x.o, reg-s390x.c): Likewise.
8157 (s390-linux32.o, s390-linux32.c): Add rules.
8158 (s390-linux64.o, s390-linux64.c): Likewise.
8159 (s390x-linux64.o, s390x-linux64.c): Likewise.
8160 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8161 * linux-s390-low.c: Include <elf.h>.
8162 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8163 (init_registers_s390): Remove prototype.
8164 (init_registers_s390x): Likewise.
8165 (init_registers_s390_linux32): Add prototype.
8166 (init_registers_s390_linux64): Likewise.
8167 (init_registers_s390x_linux64): Likewise.
8168 (s390_num_regs_3264): New define.
8169 (s390_regmap_3264): New global variable.
8170 (s390_cannot_fetch_register): Remove obsolete check.
8171 (s390_cannot_store_register): Likewise.
8172 (s390_collect_ptrace_register): Handle upper/lower register halves.
8173 (s390_supply_ptrace_register): Likewise.
8174 (s390_fill_gregset): Update to register number changes.
8175 (s390_get_hwcap): New routine.
8176 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8177 Install appropriate regmap and register set.
8179 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8181 * server.c (gdbserver_version): Update copyright year to 2010.
8182 * gdbreplay.c (gdbreplay_version): Likewise.
8184 2009-12-28 Doug Evans <dje@google.com>
8186 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8187 elf/external.h. Include <elf.h> instead but only if necessary.
8189 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8191 * linux-low.c (linux_remove_process): Remove `detaching'
8192 parameter. Don't release/detach from thread_db here.
8193 (linux_kill): Release/detach from thread_db here, ...
8194 (linux_detach): ... and here, before actually detaching.
8195 (linux_wait_1): ... and here, when a process exits.
8196 * thread-db.c (any_thread_of): New.
8197 (thread_db_free): Switch the current inferior to a thread of the
8200 2009-12-21 Doug Evans <dje@google.com>
8202 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8204 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8205 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8206 warning ifndef __NR_tkill. Move setting of errno there too.
8207 Delete unnecessary resetting of errno after syscall.
8208 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8210 * configure.ac: Check for dladdr.
8211 * config.in: Regenerate.
8212 * configure: Regenerate.
8213 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8214 (try_thread_db_load): Update.
8216 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8218 2009-12-18 Doug Evans <dje@google.com>
8220 * event-loop.c: Include unistd.h if it exists.
8222 * linux-low.c (my_waitpid): Move definition away from being in
8223 between linux_tracefork_child/linux_test_for_tracefork.
8225 * gdb_proc_service.h (psaddr_t): Fix type.
8226 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8227 signature to match glibc.
8229 2009-12-16 Doug Evans <dje@google.com>
8231 * linux-low.c (linux_read_memory): Fix argument to read.
8233 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8235 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8236 events, don't leave current_inferior pointing at null.
8238 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8240 * win32-low.c (LOG): Delete.
8241 (OUTMSG): Output to stderr.
8242 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8243 on compile time LOG macro.
8244 (win32_wait): Fix debug output.
8246 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8248 * win32-low.c (win32_add_one_solib): If the dll name is
8249 "ntdll.dll", prepend the system directory to the dll path.
8251 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8253 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8255 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8256 Vladimir Prus <vladimir@codesourcery.com>
8258 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8259 * configure.ac: Check for __mcoldfire__ and set
8260 gdb_cv_m68k_is_coldfire.
8261 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8262 reg-cf.o and reg-m68k.o.
8263 * configure: Regenerated.
8265 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8267 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8268 Pass it to thread_db_free.
8269 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8270 proper `detaching' argument to linux_remove_process.
8271 * linux-low.h (thread_db_free): Add `detaching' parameter.
8272 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8274 (thread_db_free): Add `detaching' parameter. Only
8275 call td_ta_clear_event if detaching from process.
8277 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8279 * thread-db.c (thread_db_free): Fix typo.
8281 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8284 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8286 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8288 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8289 with an i686 compiler.
8290 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8292 * configure: Rebuilt.
8294 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8298 * server.c (handle_search_memory_1): Correct read_addr initialization
8299 in loop for searching subsequent chunks.
8301 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8303 * configure.ac: New --with-libthread-db option.
8304 * thread-db.c: Allow direct dependence on libthread_db.
8305 (thread_db_free): Adjust.
8306 * config.in: Regenerate.
8307 * configure: Likewise.
8309 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8312 * thread-db.c (attach_thread): New function.
8313 (maybe_attach_thread): Return success/failure.
8314 (find_new_threads_callback): Adjust.
8315 (thread_db_find_new_threads): Loop until no new threads.
8317 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8319 * proc-service.c (ps_lgetregs): Formatting.
8321 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8323 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8324 * configure.ac: Adjust.
8325 * linux-low.h (struct process_info_private): Move members to struct
8327 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8328 * linux-low.c (linux_remove_process): Adjust.
8329 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8330 * server.c (handle_query): Move code ...
8331 (handle_monitor_command): ... here. New function.
8332 * target.h (struct target_ops): New member.
8333 * thread-db.c (struct thread_db): New.
8334 (libthread_db_search_path): New variable.
8335 (thread_db_create_event, thread_db_enable_reporting)
8336 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8337 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8338 (try_thread_db_load_1, dladdr_to_soname): New functions.
8339 (try_thread_db_load, thread_db_load_search): New functions.
8340 (thread_db_init): Search for libthread_db.
8341 (thread_db_free): New function.
8342 (thread_db_handle_monitor_command): Likewise.
8343 * config.in: Regenerate.
8344 * configure: Regenerate.
8346 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8348 * spu-low.c (spu_kill): Wait for inferior to terminate.
8349 Call clear_inferiors.
8350 (spu_detach): Call clear_inferiors.
8352 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8354 * aclocal.m4: Regenerate.
8355 * config.in: Likewise.
8356 * configure: Likewise.
8358 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8360 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8361 (parse_spufs_run): New function.
8362 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8363 (ppc_breakpoint_at): Handle SPU breakpoints.
8365 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8367 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8368 (SPUFS_MAGIC): Define.
8369 (spu_enumerate_spu_ids): New function.
8370 (linux_qxfer_spu): New function.
8371 (linux_target_ops): Install linux_qxfer_spu.
8373 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8375 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8376 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8377 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8378 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8379 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8380 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8381 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8382 (init_registers_powerpc_cell32l): Add prototype.
8383 (init_registers_powerpc_cell64l): Likewise.
8384 (ppc_arch_setup): Detect Cell/B.E. architecture.
8386 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8388 * Makefile.in (datarootdir): New variable.
8390 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8392 * linux-low.c (linux_write_memory): Update debugging output.
8393 * Makefile.in (clean): Add new descriptions.
8394 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8395 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8396 * configure.srv: Add new files for arm*-*-linux*.
8397 * linux-arm-low.c: Add new declarations.
8398 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8399 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8400 (HWCAP_VFPv3D16): New.
8401 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8402 instead of __IWMMXT__.
8403 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8404 (arm_arch_setup): New.
8405 (target_regsets): Remove #ifdef. Add VFP regset.
8406 (the_low_target): Use arm_arch_setup.
8408 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8410 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8411 the main thread again.
8413 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8415 Adding Neutrino gdbserver.
8416 * configure: Regenerated.
8417 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8418 * configure.srv (i[34567]86-*-nto*): New target.
8419 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8420 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8421 (nto_comctrl) [__QNX__]: New function.
8422 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8424 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8426 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8429 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8430 Pedro Alves <pedro@codesourcery.com>
8432 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8433 don't support CONTEXT_EXTENDED_REGISTERS.
8434 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8435 (the_low_target): Install them.
8436 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8437 failing with ERROR_PIPE_NOT_CONNECTED.
8439 2009-06-30 Doug Evans <dje@google.com>
8440 Pierre Muller <muller@ics.u-strasbg.fr>
8442 Add h/w watchpoint support to x86-linux, win32-i386.
8443 * Makefile.in (SFILES): Add i386-low.c
8444 (i386_low_h): Define.
8445 (i386-low.o): Add dependencies.
8446 (linux-x86-low.o): Add i386-low.h dependency.
8447 (win32-i386-low.o): Ditto.
8448 * i386-low.c: New file.
8449 * i386-low.h: New file.
8450 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8451 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8452 * linux-low.c (linux_add_process): Initialize arch_private.
8453 (linux_remove_process): Free arch_private.
8454 (add_lwp): Initialize arch_private.
8455 (delete_lwp): Free arch_private.
8456 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8458 * linux-low.h (process_info_private): New member arch_private.
8459 (lwp_info): New member arch_private.
8460 (linux_target_ops): New members new_process, new_thread,
8462 (ptid_of): New macro.
8463 * linux-x86-low.c: Include stddef.h, i386-low.h.
8464 (arch_process_info): New struct.
8465 (arch_lwp_info): New struct.
8466 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8467 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8468 (i386_dr_low_get_status): New function.
8469 (x86_insert_point, x86_remove_point): New functions.
8470 (x86_stopped_by_watchpoint): New function.
8471 (x86_stopped_data_address): New function.
8472 (x86_linux_new_process, x86_linux_new_thread): New functions.
8473 (x86_linux_prepare_to_resume): New function.
8474 (the_low_target): Add entries for insert_point, remove_point,
8475 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8477 * server.c (debug_hw_points): New global.
8478 (monitor_show_help): Document set debug-hw-points.
8479 (handle_query): Process "set debug-hw-points".
8480 * server.h (debug_hw_points): Declare.
8481 (paddress): Declare.
8482 * utils.c (NUMCELLS, CELLSIZE): New macros.
8483 (get_sell, xsnprintf, paddress): New functions.
8484 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8485 remove_point, stopped_by_watchpoint, stopped_data_address.
8486 * win32-i386-low.c: Include i386-low.h.
8487 (debug_reg_state): Replaces dr.
8488 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8489 (i386_dr_low_get_status): New function.
8490 (i386_insert_point, i386_remove_point): New functions.
8491 (i386_stopped_by_watchpoint): New function.
8492 (i386_stopped_data_address): New function.
8493 (i386_initial_stuff): Update.
8494 (get_thread_context,set_thread_context,i386_thread_added): Update.
8495 (the_low_target): Add entries for insert_point,
8496 remove_point, stopped_by_watchpoint, stopped_data_address.
8497 * win32-low.c (win32_insert_watchpoint): New function.
8498 (win32_remove_watchpoint): New function.
8499 (win32_stopped_by_watchpoint): New function.
8500 (win32_stopped_data_address): New function.
8501 (win32_target_ops): Add entries for insert_watchpoint,
8502 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8503 * win32-low.h (win32_target_ops): New members insert_point,
8504 remove_point, stopped_by_watchpoint, stopped_data_address.
8506 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8508 * server.c (process_serial_event): Re-return unsupported, not
8509 error, if the type isn't recognized. Re-allow supporting only
8510 insert or remove packets. Also call require_running for
8511 breakpoints. Add missing break statement to default case. Tidy.
8512 * target.h (struct target_ops): Rename insert_watchpoint to
8513 insert_point, and remove_watchpoint to remove_point.
8515 * linux-low.h (struct linux_target_ops): Likewise.
8516 * linux-low.c (linux_insert_watchpoint): Rename to ...
8517 (linux_insert_point): ... this. Adjust.
8518 (linux_remove_watchpoint): Rename to ...
8519 (linux_remove_point): ... this. Adjust.
8520 (linux_target_ops): Adjust.
8521 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8522 (cris_insert_point): ... this.
8523 (cris_remove_watchpoint): Rename to ...
8524 (cris_remove_point): ... this.
8525 (the_low_target): Adjust.
8527 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8529 * server.c (handle_v_kill): Pass signal_pid to
8530 kill_inferior if multi_process is zero.
8532 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8534 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8535 * target.h (target_ops): Comment for *_watchpoint to make it clear
8536 the functions can get types '0' and '1'.
8538 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8540 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8541 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8542 * regcache.c (get_regcache): Likewise.
8543 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8544 * win32-low.c (child_fetch_inferior_registers): Remove check for
8547 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8548 Pedro Alves <pedro@codesourcery.com>
8550 * target.h (struct target_ops) <supports_multi_process>: New
8552 (target_supports_multi_process): New.
8553 * server.c (handle_query): Even if GDB reports support, only
8554 enable multi-process if the target also supports it. Report
8555 multi-process support only if the target backend supports it.
8556 * linux-low.c (linux_supports_multi_process): New function.
8557 (linux_target_ops): Install it as target_supports_multi_process
8560 2009-05-24 Doug Evans <dje@google.com>
8562 Global renaming of find_thread_pid to find_thread_ptid.
8563 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8564 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8565 All callers updated.
8567 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8568 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8571 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8572 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8573 (linux_resume_one_lwp): Ditto.
8575 2009-05-23 Doug Evans <dje@google.com>
8577 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8578 from struct inferior_list_entry * to struct lwp_info *.
8579 All callers updated.
8581 2009-05-13 Doug Evans <dje@google.com>
8583 * linux-x86-low.c: Don't include assert.h.
8584 (x86_siginfo_fixup): Use fatal, not assert.
8585 (x86_arch_setup): Fix comment.
8587 2009-05-12 Doug Evans <dje@google.com>
8589 Biarch support for i386/amd64 gdbserver.
8590 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8591 Add linux-x86-low.c.
8592 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8593 (linux-x86-low.o): Add.
8594 * linux-x86-64-low.c: Delete.
8595 * linux-i386-low.c: Delete.
8596 * linux-x86-low.c: New file.
8597 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8599 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8601 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8602 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8603 (linux_child_pid_to_exec_file): New function.
8604 (elf_64_header_p, elf_64_file_p): New functions.
8605 (siginfo_fixup): New function.
8606 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8607 give target a chance to convert layout.
8608 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8609 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8611 2009-05-07 Doug Evans <dje@google.com>
8613 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8614 (regsets_store_inferior_registers): Ditto.
8616 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8620 * linux-low.c (must_set_ptrace_flags): Delete.
8621 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8623 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8624 `lwp->must_set_ptrace_flags' instead.
8625 (linux_wait_for_event_1): Set ptrace options here.
8626 (linux_wait_1): ... not here.
8628 2009-04-30 Doug Evans <dje@google.com>
8630 * inferiors.c (started_inferior_callback): New function.
8631 (attached_inferior_callback): New function.
8632 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8633 * server.c (print_started_pid, print_attached_pid): New functions.
8634 (detach_or_kill_for_exit): New function.
8635 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8636 * server.h (have_started_inferiors_p): Declare.
8637 (have_attached_inferiors_p): Declare.
8639 * inferiors.c (remove_process): Fix memory leak, free process.
8640 * linux-low.c (linux_remove_process): New function.
8641 (linux_kill): Call it instead of remove_process.
8642 (linux_detach, linux_wait_1): Ditto.
8644 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8646 * configure.srv: Add x86 Windows CE target.
8648 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8650 * inferiors.c (get_thread_process): Make global.
8651 * server.h (get_thread_process): Add prototype.
8652 * thread-db.c (find_one_thread): Use get_thread_process
8653 instead of current_process.
8654 (thread_db_get_tls_address): Do not crash if called when
8655 thread layer is not yet initialized.
8657 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8659 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8660 * spu-low.c (current_tid): Rename to ...
8661 (current_ptid): ... this.
8662 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8663 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8664 ptid_get_lwp (current_ptid) instead of current_tid.
8665 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8666 instead of current_tid. Use find_process_pid to verify pid
8667 argument is valid. Pass proper argument to remove_process.
8668 (spu_thread_alive): Compare current_ptid instead of current_tid.
8669 (spu_resume): Likewise.
8671 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8673 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8676 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8678 Implement the multiprocess extensions, and add linux multiprocess
8681 * server.h (ULONGEST): Declare.
8682 (struct ptid, ptid_t): New.
8683 (minus_one_ptid, null_ptid): Declare.
8684 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8685 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8686 (struct inferior_list_entry): Change `id' type from unsigned from
8688 (struct sym_cache, struct breakpoint, struct
8689 process_info_private): Forward declare.
8690 (struct process_info): Declare.
8691 (current_process): Declare.
8692 (all_processes): Declare.
8693 (initialize_inferiors): Declare.
8694 (add_thread): Adjust to use ptid_t.
8695 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8696 (add_process, remove_process, find_thread_pid): Declare.
8697 (find_inferior_id): Adjust to use ptid_t.
8698 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8699 (multi_process): Declare.
8700 (push_event): Adjust to use ptid_t.
8701 (read_ptid, write_ptid): Declare.
8702 (prepare_resume_reply): Adjust to use ptid_t.
8703 (clear_symbol_cache): Declare.
8704 * inferiors.c (all_processes): New.
8705 (null_ptid, minus_one_ptid): New.
8706 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8707 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8708 (add_thread): Change unsigned long to ptid. Remove gdb_id
8710 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8711 (gdb_id_to_thread): Rename to ...
8712 (find_thread_pid): ... this. Change unsigned long to ptid.
8713 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8714 (loaded_dll, pull_pid_from_list): Adjust.
8715 (add_process, remove_process, find_process_pid)
8716 (get_thread_process, current_process, initialize_inferiors): New.
8717 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8718 (struct target_waitstatus) <related_pid>: Ditto.
8719 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8721 (struct target_ops) <join>: Add `pid' argument.
8722 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8723 (struct target_ops) <wait>: Add `ptid' field. Change return type
8725 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8726 (mywait): Add `ptid' argument. Change return type to ptid_t.
8727 (target_pid_to_str): Declare.
8728 * target.c (set_desired_inferior): Adjust to use ptids.
8729 (mywait): Add new `ptid' argument. Adjust.
8730 (target_pid_to_str): New.
8731 * mem-break.h (free_all_breakpoints): Declare.
8732 * mem-break.c (breakpoints): Delelete.
8733 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8734 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8735 to use per-process breakpoint list.
8736 (free_all_breakpoints): New.
8737 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8738 (symbol_cache, all_symbols_looked_up): Delete.
8740 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8742 (prepare_resume_reply): Change ptid argument's type from unsigned
8743 long to ptid_t. Adjust. Implement W;process and X;process.
8744 (free_sym_cache, clear_symbol_cache): New.
8745 (look_up_one_symbol): Adjust to per-process symbol cache. *
8746 * server.c (cont_thread, general_thread, step_thread): Change type
8749 (multi_process): New.
8750 (last_ptid): Change type to ptid_t.
8751 (struct vstop_notif) <ptid>: Change type to ptid_t.
8752 (queue_stop_reply, push_event): Change `ptid' argument's type to
8754 (discard_queued_stop_replies): Add `pid' argument.
8755 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8756 changes. Don't reference the `attached' global.
8757 (attach_inferior): Adjust to mywait interface changes.
8758 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8759 features. Handle and report "multiprocess+". Handle
8761 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8763 (handle_v_kill): New.
8764 (handle_v_stopped): Adjust to use target_pid_to_str.
8765 (handle_v_requests): Allow multiple attaches and runs when
8766 multiprocess extensions are in effect. Handle "vKill".
8767 (myresume): Adjust to use ptids.
8768 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8769 (handle_status): Adjust to discard_queued_stop_replies interface
8771 (first_thread_of, kill_inferior_callback)
8772 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8773 (main): Call initialize_inferiors. Adjust to use ptids, killing
8774 and detaching from all inferiors. Handle multiprocess packet
8776 * linux-low.h: Include gdb_proc_service.h.
8777 (struct process_info_private): New.
8778 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8779 <lwpid_of>: Use ptid_get_lwp.
8780 (get_lwp_thread): Adjust.
8781 (struct lwp_info): Add `dead' member.
8782 (find_lwp_pid): Declare.
8783 * linux-low.c (thread_db_active): Delete.
8784 (new_inferior): Adjust comment.
8785 (inferior_pid): Delete.
8786 (linux_add_process): New.
8787 (handle_extended_wait): Adjust.
8788 (add_lwp): Change unsigned long to ptid.
8789 (linux_create_inferior): Add process to processes table. Adjust
8790 to use ptids. Don't set new_inferior here.
8791 (linux_attach_lwp): Rename to ...
8792 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8793 it. Adjust to use ptids.
8794 (linux_attach_lwp): New.
8795 (linux_attach): Add process to processes table. Don't set
8797 (struct counter): New.
8798 (second_thread_of_pid_p, last_thread_of_process_p): New.
8799 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8801 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8802 processes. Remove process from process table.
8803 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8804 to multiple processes.
8805 (any_thread_of): New.
8806 (linux_detach): Add `pid' argument, and handle it. Remove process
8807 from processes table.
8808 (linux_join): Add `pid' argument. Handle it.
8809 (linux_thread_alive): Change unsighed long argument to ptid_t.
8810 Consider dead lwps as not being alive.
8811 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8812 threads we're not interested in.
8813 (same_lwp, find_lwp_pid): New.
8814 (linux_wait_for_lwp): Change `pid' argument's type from int to
8816 (linux_wait_for_event): Rename to ...
8817 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8818 from int to ptid_t. Adjust.
8819 (linux_wait_for_event): New.
8820 (linux_wait_1): Add `ptid' argument. Change return type to
8821 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8822 that exit from the process table.
8823 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8825 (mark_lwp_dead): New.
8826 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8827 stopping all threads, mark its main lwp as dead.
8828 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8830 (fetch_register, usr_store_inferior_registers)
8831 (regsets_fetch_inferior_registers)
8832 (regsets_store_inferior_registers, linux_read_memory)
8833 (linux_write_memory): Inline `inferior_pid'.
8834 (linux_look_up_symbols): Adjust to use per-process
8836 (linux_request_interrupt): Adjust to use ptids.
8837 (linux_read_auxv): Inline `inferior_pid'.
8838 (initialize_low): Don't reference thread_db_active.
8839 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8840 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8841 (ps_getpid): Return the pid of the current inferior.
8842 * thread-db.c (proc_handle, thread_agent): Delete.
8843 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8845 (find_one_thread): Change argument type to ptid_t. Adjust to
8847 (maybe_attach_thread): Adjust to per-process data and ptids.
8848 (thread_db_find_new_threads): Ditto.
8849 (thread_db_init): Ditto.
8850 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8851 processes table. Adjust to use ptids.
8852 (spu_kill, spu_detach): Adjust interface. Remove process from
8854 (spu_join, spu_thread_alive): Adjust interface.
8855 (spu_wait): Adjust interface. Remove process from processes
8856 table. Adjust to use ptids.
8857 * win32-low.c (current_inferior_tid): Delete.
8858 (current_inferior_ptid): New.
8859 (debug_event_ptid): New.
8860 (thread_rec): Take a ptid. Adjust.
8861 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8862 (child_delete_thread): Ditto.
8863 (do_initial_child_stuff): Add `attached' argument. Add process to
8865 (child_fetch_inferior_registers, child_store_inferior_registers):
8867 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8868 (win32_attach): Pass 1 to do_initial_child_stuff.
8869 (win32_kill): Adjust interface. Remove process from processes
8871 (win32_detach): Ditto.
8872 (win32_join): Adjust interface.
8873 (win32_thread_alive): Take a ptid.
8874 (win32_resume): Adjust to use ptids.
8875 (get_child_debug_event): Ditto.
8876 (win32_wait): Adjust interface. Remove exiting process from
8879 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8881 Non-stop mode support.
8883 * server.h (non_stop): Declare.
8884 (gdb_client_data, handler_func): Declare.
8885 (delete_file_handler, add_file_handler, start_event_loop):
8887 (handle_serial_event, handle_target_event, push_event)
8888 (putpkt_notif): Declare.
8889 * target.h (enum resume_kind): New.
8890 (struct thread_resume): Replace `step' field by `kind' field.
8891 (TARGET_WNOHANG): Define.
8892 (struct target_ops) <wait>: Add `options' argument.
8893 <supports_non_stop, async, start_non_stop>: New fields.
8894 (target_supports_non_stop, target_async): New.
8895 (start_non_stop): Declare.
8896 (mywait): Add `options' argument.
8897 * target.c (mywait): Add `options' argument. Print child exit
8899 (start_non_stop): New.
8900 * server.c (non_stop, own_buf, mem_buf): New globals.
8901 (struct vstop_notif): New.
8902 (notif_queue): New global.
8903 (queue_stop_reply, push_event, discard_queued_stop_replies)
8904 (send_next_stop_reply): New.
8905 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8907 (attach_inferior): In non-stop mode, don't wait for the target
8909 (handle_general_set): Handle QNonStop.
8910 (handle_query): When handling qC, return the current general
8911 thread, instead of the first thread of the list.
8912 (handle_query): If the backend supports non-stop mode, include
8913 QNonStop+ in the qSupported query response.
8914 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8916 (handle_v_attach, handle_v_run): Handle non-stop mode.
8917 (handle_v_stopped): New.
8918 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8919 (myresume): Adjust to use resume_kind. Handle non-stop.
8920 (queue_stop_reply_callback): New.
8921 (handle_status): Handle non-stop mode.
8922 (main): Clear non_stop flag on reconnection. Use the event-loop.
8923 Refactor serial protocol handling from here ...
8924 (process_serial_event): ... to this new function. When GDB
8925 selects any thread, select one here. In non-stop mode, wait until
8926 GDB acks all pending events before exiting.
8927 (handle_serial_event, handle_target_event): New.
8928 * remote-utils.c (remote_open): Install remote_desc in the event
8930 (remote_close): Remove remote_desc from the event loop.
8931 (putpkt_binary): Rename to...
8932 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8933 (putpkt_binary): New as wrapper around putpkt_binary_1.
8934 (putpkt_notif): New.
8935 (prepare_resume_reply): In non-stop mode, don't change the
8937 * event-loop.c: New.
8938 * Makefile.in (OBJ): Add event-loop.o.
8939 (event-loop.o): New rule.
8941 * linux-low.h (pid_of): Moved here.
8943 (get_lwp_thread): Use lwpid_of.
8944 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8945 * linux-low.c (pid_of): Delete.
8946 (inferior_pid): Use lwpid_of.
8947 (linux_event_pipe): New.
8948 (target_is_async_p): New.
8950 (handle_extended_wait): Use lwpid_of.
8951 (add_lwp): Don't set lwpid field.
8952 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8953 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8954 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8955 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8956 first. Adjust to linux_wait_for_event interface changes. Use
8958 (linux_detach): Don't delete the main lwp here.
8959 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8960 (status_pending_p): Don't consider explicitly suspended lwps.
8961 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8962 pointer. Add OPTIONS argument. Change return type to int. Use
8963 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8964 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8965 pointer. Add status pointer argument. Return a pid instead of a
8966 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8967 changes. In non-stop mode, don't switch to a random thread.
8968 (linux_wait): Rename to...
8969 (linux_wait_1): ... this. Add target_options argument, and handle
8970 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8971 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8972 clean exit and signal exit code. Don't stop all threads in
8973 non-stop mode. In all-stop mode, only stop all threads when
8974 reporting a stop to GDB. Handle explicit thread stop requests.
8975 (async_file_flush, async_file_mark): New.
8977 (send_sigstop): Use lwpid_of.
8978 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8979 interface changes. In non-stop mode, don't switch to a random
8981 (linux_resume_one_lwp): Use lwpid_of.
8982 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8983 (linux_resume_one_thread): ... this. Handle resume_stop. In
8984 non-stop mode, don't look for pending flag in all threads.
8985 (resume_status_pending_p): Don't consider explicitly suspended
8987 (my_waitpid): Reimplement. Emulate __WALL.
8988 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8990 (sigchld_handler, linux_supports_non_stop, linux_async)
8991 (linux_start_non_stop): New.
8992 (linux_target_ops): Register linux_supports_non_stop, linux_async
8993 and linux_start_non_stop.
8994 (initialize_low): Install SIGCHLD handler.
8995 * thread-db.c (thread_db_create_event, find_one_thread)
8996 (thread_db_get_tls_address): Use lwpid_of.
8997 * win32-low.c (win32_detach): Adjust to use resume_kind.
8998 (win32_wait): Add `options' argument.
8999 * spu-low.c (spu_resume): Adjust to use resume_kind.
9000 (spu_wait): Add `options' argument.
9002 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9004 Decouple target code from remote protocol.
9006 * target.h (enum target_waitkind): New.
9007 (struct target_waitstatus): New.
9008 (struct target_ops) <wait>: Return an unsigned long. Take a
9009 target_waitstatus pointer instead of a char pointer.
9011 * target.c (mywait): Change prototype to return an unsigned long.
9012 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9013 * server.h (thread_from_wait, old_thread_from_wait): Delete
9015 (prepare_resume_reply): Change prototype to take a
9017 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9018 (last_status, last_ptid): New.
9019 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9020 pid instead of a signal.
9021 (attach_inferior): Remove "status" and "signal" parameters.
9023 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9025 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9026 (handle_v_requests, myresume): Remove "status" and "signal"
9028 (handle_status): New.
9029 (main): Delete local `status'. Adjust.
9030 * remote-utils.c: Include target.h.
9031 (prepare_resume_reply): Change prototype to take a
9032 target_waitstatus. Adjust.
9034 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9036 * spu-low.c (spu_wait): Adjust.
9037 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9039 (win32_wait): Adjust.
9041 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9043 * target.h (struct thread_resume): Delete leave_stopped member.
9044 (struct target_ops): Add a `n' argument to the `resume' callback.
9045 * server.c (start_inferior): Adjust.
9046 (handle_v_cont, myresume): Adjust.
9047 * linux-low.c (check_removed_breakpoint): Adjust to resume
9048 interface change, and to removed leave_stopped field.
9049 (resume_ptr): Delete.
9050 (struct thread_resume_array): New.
9051 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9052 resume interface change.
9053 (linux_continue_one_thread, linux_queue_one_thread)
9054 (resume_status_pending_p): Check if the resume field is NULL
9055 instead of checking the leave_stopped member.
9056 (linux_resume): Adjust to the target resume interface change.
9057 * spu-low.c (spu_resume): Adjust to the target resume interface
9059 * win32-low.c (win32_detach, win32_resume): Ditto.
9061 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9063 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9065 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9067 (linux_continue_one_thread): Only preserve the stepping flag if
9068 there's a pending breakpoint.
9070 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9072 * server.c (main): After the inferior having exited, call
9073 remote_close before exiting gdbserver.
9075 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9077 Fix size of FPSCR in Power 7 processors.
9078 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9079 (PPC_FEATURE_HAS_DFP): New #define.
9080 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9083 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9085 * server.c (handle_query) Whitespace and formatting.
9087 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9089 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9090 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9091 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9092 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9093 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9094 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9095 Makefile.in, configure.ac: Fix whitespace throughout.
9096 * configure: Regenerate.
9098 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9100 * inferiors.c (find_inferior): Make it safe for the callback
9101 function to delete the currently iterated inferior.
9103 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9105 * Makefile.in (linuw_low_h): Move higher.
9106 (thread-db.o): Depend on $(linux_low_h).
9108 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9110 Rename "process" to "lwp" throughout.
9112 * linux-low.c (all_processes): Rename to...
9113 (all_lwps): ... this.
9114 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9115 (add_process): Rename to ...
9116 (add_lwp): ... this. Adjust.
9117 (linux_create_inferior): Adjust.
9118 (linux_attach_lwp): Adjust.
9119 (linux_attach): Adjust.
9120 (linux_kill_one_process): Rename to ...
9121 (linux_kill_one_lwp): ... this. Adjust.
9122 (linux_kill): Adjust.
9123 (linux_detach_one_process): Rename to ...
9124 (linux_detach_one_lwp): ... this. Adjust.
9125 (linux_detach): Adjust.
9126 (check_removed_breakpoint): Adjust.
9127 (status_pending_p): Adjust.
9128 (linux_wait_for_process): Rename to ...
9129 (linux_wait_for_lwp): ... this. Adjust.
9130 (linux_wait_for_event): Adjust.
9131 (send_sigstop): Adjust.
9132 (wait_for_sigstop): Adjust.
9133 (stop_all_processes): Rename to ...
9134 (stop_all_lwps): ... this.
9135 (linux_resume_one_process): Rename to ...
9136 (linux_resume_one_lwp): ... this. Adjust.
9137 (linux_set_resume_request, linux_continue_one_thread)
9138 (linux_queue_one_thread, resume_status_pending_p)
9139 (usr_store_inferior_registers, regsets_store_inferior_registers)
9140 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9142 * linux-low.h (get_process): Rename to ...
9143 (get_lwp): ... this. Adjust.
9144 (get_thread_process): Rename to ...
9145 (get_thread_lwp): ... this. Adjust.
9146 (get_process_thread): Rename to ...
9147 (get_lwp_thread): ... this. Adjust.
9148 (struct process_info): Rename to ...
9149 (struct lwp_info): ... this.
9150 (all_processes): Rename to ...
9151 (all_lwps): ... this.
9152 * proc-service.c (ps_lgetregs): Adjust.
9153 * thread-db.c (thread_db_create_event, find_one_thread)
9154 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9156 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9158 * server.c (handle_query): Handle "qAttached".
9160 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9162 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9163 GPLv3, update license URL.
9165 2009-03-01 Doug Evans <dje@google.com>
9167 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9168 (server_h): Add gdb_signals.h.
9169 (signals.o): Update.
9170 * server.h (target_signal_from_host,target_signal_to_host_p)
9171 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9173 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9175 * remote-utils.c (getpkt): Also generate remote-debug
9176 information if noack_mode is set.
9178 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9180 * server.c (handle_query): Report qXfer:siginfo:read and
9181 qXfer:siginfo:write as supported and handle them.
9182 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9183 * linux-low.c (linux_xfer_siginfo): New.
9184 (linux_target_ops): Set it.
9186 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9188 * server.c (gdbserver_usage): Mention --remote-debug.
9189 (main): Accept '--remote-debug' switch.
9191 2009-01-18 Doug Evans <dje@google.com>
9193 * regcache.c (new_register_cache): No need to check result of xcalloc.
9194 * server.c (handle_search_memory): Back out calls to xmalloc,
9195 result is checked and error is returned to user upon failure.
9196 (handle_query): Ditto. Add more checks for result of malloc.
9197 (handle_v_cont): Check result of malloc, report error back to
9199 (handle_v_run): Ditto. Call freeargv.
9200 * server.h (freeargv): Declare.
9201 * utils.c (freeargv): New fn.
9203 2009-01-15 Doug Evans <dje@google.com>
9205 * gdbreplay.c (perror_with_name): Make arg const char *.
9206 * server.h (target_signal_to_name): Make return type const char *.
9207 * thread-db.c (thread_db_err_str): Make return type const char *.
9208 * utils.c (perror_with_name): Make arg const char *.
9210 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9212 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9213 when handling a EXIT_PROCESS_DEBUG_EVENT.
9215 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9217 * gdbreplay.c (gdbreplay_version): Update copyright year.
9218 * server.c (gdbserver_version): Likewise.
9220 2009-01-05 Doug Evans <dje@google.com>
9222 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9223 (handle_extended_wait): Improve comment.
9225 2008-12-13 Doug Evans <dje@google.com>
9227 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9228 * server.h (ATTR_MALLOC): New macro.
9229 (xmalloc,xcalloc,xstrdup): Declare.
9230 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9231 * inferiors.c: Ditto.
9232 * linux-low.c: Ditto.
9233 * mem-break.c: Ditto.
9234 * regcache.c: Ditto.
9235 * remote-utils.c: Ditto.
9238 * win32-low.c: Ditto.
9240 2008-12-12 Doug Evans <dje@google.com>
9242 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9243 in debugging printf.
9245 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9247 2008-12-09 Doug Evans <dje@google.com>
9249 * linux-low.h (struct process_info): Delete member tid, unused.
9250 * thread-db.c (find_one_thread): Update.
9251 (maybe_attach_thread): Update.
9253 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9255 * target.h (struct target_ops): Add qxfer_osdata member.
9256 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9258 (linux_qxfer_osdata): New functions.
9259 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9261 * server.c (handle_query): Handle "qXfer:osdata:read:".
9262 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9263 (buffer_xml_printf): New functions.
9264 * server.h (struct buffer): New.
9265 (buffer_grow_str, buffer_grow_str0): New macros.
9266 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9267 (buffer_xml_printf): Declare.
9269 2008-11-24 Doug Evans <dje@google.com>
9271 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9273 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9275 * server.c (handle_v_run): Always use the supplied argument list.
9277 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9279 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9280 (xtensa_regmap_table): Add entry for scompare1.
9282 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9284 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9285 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9286 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9287 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9288 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9289 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9290 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9291 XML target descriptions.
9292 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9293 when inferior is running on an ISA 2.05 or later processor. Add
9294 special case to return offset for full 64-bit slot of FPSCR when
9297 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9299 * Makefile.in (SFILES, clean): Added sparc64 files.
9300 (reg-sparc64.o, reg-sparc64.c): New.
9301 * configure.srv (sparc*-*-linux*): New configuration.
9302 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9303 syscall arguments for SPARC.
9304 (regsets_store_inferior_registers): Likewise.
9305 * linux-sparc-low.c: New file.
9307 2008-10-21 Doug Evans <dje@google.com>
9309 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9310 (READLINE_DIR,READLINE_DEP): Delete.
9311 (INTERNAL_CFLAGS): Update.
9312 (LINTFLAGS): Update.
9314 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9316 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9317 whole argv from the last run, not just argv[0].
9319 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9321 * regcache.c (new_register_cache): Return NULL if the register
9322 cache size isn't known yet.
9323 (free_register_cache): Avoid dereferencing a NULL regcache.
9325 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9327 * configure.srv: Merge MIPS and MIPS64.
9329 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9331 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9333 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9335 * Makefile.in: Add required vsx dependencies.
9337 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9338 Declare init_registers_powerpc_vsx32l.
9339 Declare init_registers_powerpc_vsx64l.
9340 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9341 (ppc_arch_setup): Check for VSX in hwcap.
9342 (ppc_fill_vsxregset): New function.
9343 (ppc_store_vsxregset): New function.
9344 Add new VSX entry in regset_info target_regsets.
9346 * configure.srv: Add new VSX dependencies.
9348 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9350 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9351 (remote_open): Set or clear transport_is_reliable.
9352 (putpkt_binary): Don't expect acks in noack mode.
9353 (getpkt): Don't send ack/nac in noack mode.
9354 * server.c (handle_general_set): Handle QStartNoAckMode.
9355 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9357 (main): Reset noack_mode on every connection.
9358 * server.h (noack_mode): Declare.
9360 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9362 * Makefile.in (GDBREPLAY_OBS): New variable.
9363 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9365 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9366 Daniel Jacobowitz <dan@codesourcery.com>
9368 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9369 (usr_store_inferior_registers): Likewise.
9370 (regsets_store_inferior_registers): Likewise.
9372 2008-07-31 Rolf Jansen <rj@surtec.com>
9373 Pedro Alves <pedro@codesourcery.com>
9375 * configure.ac: Check for memmem declaration.
9376 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9377 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9378 (disable_packet_qfThreadInfo): Unconditionally compile.
9379 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9380 * configure, config.in: Regenerate.
9382 2008-07-28 Doug Kwan <dougkwan@google.com>
9384 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9385 (linux_write_memory): Remove declaration of errno.
9387 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9389 * linux-low.c (handle_extended_wait): Do not use "status"
9390 variable uninitialized.
9392 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9394 * server.c (handle_v_attach): Inhibit reporting dll changes.
9396 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9398 * remote-utils.c (prepare_resume_reply): If requested, don't
9399 output "thread:TID" in the T stop reply.
9401 * server.c (disable_packet_vCont, disable_packet_Tthread)
9402 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9403 (handle_query): If requested, disable support for qC, qfThreadInfo
9405 (handle_v_requests): If requested, disable support for vCont.
9406 (gdbserver_show_disableable): New.
9407 (main): Handle --disable-packet and --disable-packet=LIST.
9409 * server.h (disable_packet_vCont, disable_packet_Tthread)
9410 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9412 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9414 * server.c (gdbserver_usage): Mention --version.
9416 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9418 * Makefile.in (gdbreplay.o): New rule.
9420 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9422 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9423 message, not gdbserver.
9425 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9426 Nathan Sidwell <nathan@codesourcery.com>
9427 Joseph Myers <joseph@codesourcery.com>
9429 * acinclude.m4: Include ../../config/acx.m4.
9430 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9431 * configure, config.in: Regenerate.
9432 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9433 * server.c (gdbserver_version): Print PKGVERSION.
9434 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9435 (main): Adjust gdbserver_usage calls.
9436 * gdbreplay.c (version, host_name): Add declarations.
9437 (gdbreplay_version, gdbreplay_usage): New.
9438 (main): Accept --version and --help options.
9440 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9442 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9443 (arm_breakpoint_at): Handle Thumb.
9444 (the_low_target): Add comment.
9446 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9448 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9450 2008-05-09 Doug Evans <dje@google.com>
9452 * server.h (decode_search_memory_packet): Declare.
9453 * remote-utils.c (decode_search_memory_packet): New fn.
9454 * server.c (handle_search_memory_1): New fn.
9455 (handle_search_memory): New fn.
9456 (handle_query): Process qSearch:memory packets.
9458 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9460 * regcache.c (registers_length): Remove.
9461 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9462 full register packet.
9463 * regcache.h (registers_length): Remove prototype.
9464 * server.h (PBUFSIZ): Define to 16384.
9466 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9468 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9469 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9470 powerpc-64l.o, and powerpc-altivec64l.o.
9471 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9472 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9473 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9474 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9475 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9478 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9479 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9480 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9481 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9482 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9483 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9484 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9485 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9486 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9487 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9490 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9491 (init_registers_powerpc_32l): ... this new prototype.
9492 (init_registers_powerpc_32): Remove, replace by ...
9493 (init_registers_powerpc_altivec32l): ... this new prototype.
9494 (init_registers_powerpc_e500): Remove, replace by ...
9495 (init_registers_powerpc_e500l): ... this new prototype.
9496 (init_registers_ppc64): Remove, replace by ...
9497 (init_registers_powerpc_64l): ... this new prototype.
9498 (init_registers_powerpc_64): Remove, replace by ...
9499 (init_registers_powerpc_altivec64l): ... this new prototype.
9500 (ppc_num_regs): Set to 73.
9501 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9502 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9503 (ppc_cannot_store_register): Handle orig_r3 and trap.
9504 (ppc_arch_setup): Update init_registers_... calls.
9505 (ppc_fill_gregset): Handle orig_r3 and trap.
9507 * inferiors.c (clear_inferiors): Reset current_inferior.
9509 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9511 * acinclude.m4: Add override.m4.
9512 * configure: Regenerate.
9514 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9516 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9517 initial call to init_register_ppc64.
9519 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9521 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9522 single powerpc*-*-linux* case.
9523 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9525 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9527 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9528 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9530 * linux-ppc-low.c: Include <elf.h>.
9531 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9532 (ppc_hwcap): New global variable.
9533 (ppc_regmap): Remove __SPE__ #ifdef sections.
9534 (ppc_regmap_e500): New global variable.
9535 (ppc_cannot_store_register): Update __SPE__ special case.
9536 (ppc_get_hwcap): New function.
9537 (ppc_arch_setup): Use it to determine whether inferior supports
9538 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9539 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9540 Do not access registers if target does not support AltiVec.
9541 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9542 Do not access registers if target does not support SPE.
9543 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9545 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9547 * linux-low.c (disabled_regsets, num_regsets): New.
9548 (use_regsets_p): Delete.
9549 (linux_wait_for_process): Clear disabled_regsets.
9550 (regsets_fetch_inferior_registers): Check and set it.
9551 (regsets_store_inferior_registers): Likewise.
9552 (linux_fetch_registers, linux_store_registers): Do not use
9554 (initialize_low): Allocate disabled_regsets.
9556 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9558 * Makefile.in (LIBOBJS): New.
9560 (memmem.o): New rule.
9561 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9562 * configure: Regenerated.
9564 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9566 * server.c (handle_query): Never return "unsupported" for
9567 qXfer:features:read queries.
9569 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9571 * server.c (get_features_xml): Fix inverted condition.
9572 (handle_query): Always support qXfer:feature:read.
9574 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9576 * server.c (wrapper_argv): New.
9577 (start_inferior): Handle wrapper_argv. If set, expect an extra
9579 (gdbserver_usage): Document --wrapper.
9580 (main): Parse --wrapper.
9582 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9584 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9585 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9586 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9587 (ppc_set_pc): Likewise.
9588 (ppc_arch_setup): New function.
9589 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9590 of collect_register.
9591 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9593 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9595 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9596 instead of linux-ppc64-low.o.
9597 * linux-ppc64-low.c: Remove file.
9598 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9599 (linux-ppc64-low.o): Remove rule.
9601 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9602 (init_registers_powerpc_64): Likewise.
9603 (ppc_regmap): Conditionally define depending on __powerpc64__.
9604 (ppc_cannot_store_register): Do not special-case "fpscr" when
9605 compiled on __powerpc64__.
9606 (ppc_collect_ptrace_register): New function.
9607 (ppc_supply_ptrace_register): New function.
9608 (ppc_breakpoint): Change type to "unsigned int".
9609 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9610 (the_low_target): Conditionally provide initializers for the
9611 arch_setup member depending on __powerpc64__. Install
9612 collect_ptrace_register and supply_ptrace_register members.
9614 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9616 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9617 * server.c (gdbserver_xmltarget): Define.
9618 (get_features_xml): Use it to replace "target.xml" and arch_string.
9620 * configure.srv: Remove srv_xmltarget. Add XML files that were
9621 mentioned there to srv_xmlfiles instead. Remove conditional tests
9622 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9623 srv_xmlfiles and srv_regobj to include all possible choices.
9624 * configure.ac (srv_xmltarget): Remove.
9625 (srv_xmlfiles): Do not add "target.xml".
9626 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9627 checks for supplementary target information.
9628 * configure: Regenerate.
9629 * Makefile.in (XML_TARGET): Remove.
9630 (target.xml): Remove rule.
9631 (clean): Do not clean up target.xml.
9632 (.PRECIOUS): Do not mention target.xml.
9634 * target.h (struct target_ops): Remove arch_string member.
9635 * linux-low.c (linux_arch_string): Remove.
9636 (linux_target_ops): Remove arch_string initializer.
9637 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9638 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9639 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9640 * spu-low.c (spu_arch_string): Remove.
9641 (spu_target_ops): Remove arch_string initializer.
9642 * win32-low.c (win32_arch_string): Remove.
9643 (win32_target_ops): Remove arch_string initializer.
9644 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9645 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9646 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9648 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9650 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9651 by collect_ptrace_register and supply_ptrace_register hooks.
9652 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9653 instead of checking for the_low_target.left_pad_xfer.
9654 (usr_store_inferior_registers): Use collect_ptrace_register callback
9655 instead of checking for the_low_target.left_pad_xfer.
9657 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9658 (s390_supply_ptrace_register): Likewise.
9659 (s390_fill_gregset): Call s390_collect_ptrace_register.
9660 (the_low_target): Update.
9662 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9663 (ppc_supply_ptrace_register): Likewise.
9664 (the_low_target): Update.
9666 * linux-i386-low.c (the_low_target): Update.
9667 * linux-x86-64-low.c (the_low_target): Update.
9669 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9671 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9672 reg-s390.o and reg-s390x.o.
9674 * linux-low.c (new_inferior): New global variable.
9675 (linux_create_inferior, linux_attach): Set it.
9676 (linux_wait_for_process): Call the_low_target.arch_setup after the
9677 target has stopped for the first time.
9678 (initialize_low): Do not call the_low_target.arch_setup.
9680 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9681 (s390_set_pc): Likewise.
9682 (s390_arch_setup): New function.
9683 (the_low_target): Use s390_arch_setup as arch_setup routine.
9685 * regcache.c (realloc_register_cache): New function.
9686 (set_register_cache): Call it for each existing regcache.
9688 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9690 * server.h (init_registers): Remove prototype.
9692 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9693 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9694 instead of init_registers ().
9695 * linux-arm-low.c (init_registers_arm): Add prototype.
9696 (init_registers_arm_with_iwmmxt): Likewise.
9697 (the_low_target): Add initializer for arch_setup field.
9698 * linux-cris-low.c (init_registers_cris): Add prototype.
9699 (the_low_target): Add initializer for arch_setup field.
9700 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9701 (the_low_target): Add initializer for arch_setup field.
9702 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9703 (the_low_target): Add initializer for arch_setup field.
9704 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9705 (the_low_target): Add initializer for arch_setup field.
9706 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9707 (the_low_target): Add initializer for arch_setup field.
9708 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9709 (the_low_target): Add initializer for arch_setup field.
9710 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9711 (init_registers_mips64_linux): Likewise.
9712 (the_low_target): Add initializer for arch_setup field.
9713 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9714 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9715 (the_low_target): Add initializer for arch_setup field.
9716 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9717 (init_registers_powerpc_64): Likewise.
9718 (the_low_target): Add initializer for arch_setup field.
9719 * linux-s390-low.c (init_registers_s390): Add prototype.
9720 (init_registers_s390x): Likewise.
9721 (the_low_target): Add initializer for arch_setup field.
9722 * linux-sh-low.c (init_registers_sh): Add prototype.
9723 (the_low_target): Add initializer for arch_setup field.
9724 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9725 (the_low_target): Add initializer for arch_setup field.
9726 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9727 (the_low_target): Add initializer for arch_setup field.
9729 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9730 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9731 instead of init_registers ().
9732 * win32-arm-low.c (init_registers_arm): Add prototype.
9733 (the_low_target): Add initializer for arch_setup field.
9734 * win32-i386-low.c (init_registers_i386): Add prototype.
9735 (the_low_target): Add initializer for arch_setup field.
9737 * spu-low.c (init_registers_spu): Add prototype.
9738 (initialize_low): Call initialie_registers_spu () instead of
9739 initialize_registers ().
9741 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9743 * server.c (handle_v_requests): When handling the vRun and vAttach
9744 packets, if already debugging a process, don't kill it. Return an
9747 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9749 * server.c (handle_query): Correct length check.
9751 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9753 * win32-low.c (do_initial_child_stuff): Add process handle
9754 parameter. Set current_process_handle and current_process_id from the
9755 parameters. Clear globals.
9756 (win32_create_inferior): Don't set current_process_handle and
9757 current_process_id here. Instead pass them on the call to
9758 do_initial_child_stuff.
9759 (win32_attach): Likewise.
9760 (win32_clear_inferiors): New.
9761 (win32_kill): Don't close the current process handle or the
9762 current thread handle here. Instead call win32_clear_inferiors.
9763 (win32_detach): Don't open a new handle to the process. Call
9764 win32_clear_inferiors.
9765 (win32_join): Don't rely on current_process_handle; open a new
9766 handle using the process id.
9767 (win32_wait): Call win32_clear_inferiors when the inferior process
9770 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9772 * server.c (monitor_show_help): Add "exit".
9774 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9776 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9777 (clean): Add reg-xtensa.c.
9778 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9779 * configure.srv (xtensa*-*-linux*) New target.
9780 * linux-xtensa-low.c: New.
9781 * xtensa-xtregs.c: New.
9783 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9785 * hostio.c: Don't include errno.h.
9786 (errno_to_fileio_errno): Move to hostio-errno.
9787 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9788 error number outputting to the target->hostio_last_error callback.
9789 (hostio_packet_error): Use FILEIO_EINVAL directly.
9790 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9791 calls to hostio_error.
9792 * hostio-errno.c: New.
9793 * server.h (hostio_last_error_from_errno): Declare.
9794 * target.h (target_ops): Add hostio_last_error member.
9795 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9796 as hostio_last_error handler.
9797 * spu-low.c (spu_target_ops): Likewise.
9798 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9799 (wince_hostio_last_error): New functions.
9800 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9801 as hostio_last_error handler.
9802 (win32_target_ops) [!_WIN32_WCE]: Register
9803 hostio_last_error_from_errno as hostio_last_error handler.
9804 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9805 (hostio-errno.o): New rule.
9806 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9807 * configure.srv (srv_hostio_err_objs): New variable. Default to
9809 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9810 * configure: Regenerate.
9812 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9814 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9815 (linux_kill, linux_detach): Clean up the process list.
9816 * remote-utils.c (remote_open): Improve port number parsing.
9817 (putpkt_binary, input_interrupt): Only send interrupts if the target
9819 * server.c (extended_protocol): Make static.
9820 (attached): Define earlier.
9821 (exit_requested, response_needed, program_argv): New variables.
9822 (target_running): New.
9823 (start_inferior): Clear attached here.
9824 (attach_inferior): Set attached here.
9825 (require_running): Define.
9826 (handle_query): Use require_running and target_running. Implement
9828 (handle_v_attach, handle_v_run): New.
9829 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9830 (gdbserver_usage): Update.
9831 (main): Redo argument parsing. Handle --debug and --multi. Handle
9832 --attach along with other options or after the port. Save
9833 program_argv. Support no initial program. Resynchronize
9834 communication with GDB after an error. Handle "monitor exit".
9835 Use require_running and target_running. Always allow the extended
9836 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9837 restart in extended mode.
9838 * README: Refer to the GDB manual. Update --attach usage.
9840 2007-12-20 Andreas Schwab <schwab@suse.de>
9842 * linux-low.c (STACK_SIZE): Define.
9843 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9844 (linux_test_for_tracefork): Likewise.
9846 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9848 * linux-low.c (linux_wait_for_event): Update messages. Do not
9849 reinsert auto-delete breakpoints.
9850 * mem-break.c (struct breakpoint): Change return type of handler to
9852 (set_breakpoint_at): Update handler type.
9853 (reinsert_breakpoint_handler): Return 1 instead of calling
9855 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9857 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9858 * mem-break.h (set_breakpoint_at): Update handler type.
9859 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9860 * win32-low.c (auto_delete_breakpoint): New.
9861 (get_child_debug_event): Use it.
9863 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9865 * configure.ac: Check for pread and pwrite.
9866 * hostio.c (handle_pread): Fall back to lseek and read.
9867 (handle_pwrite): Fall back to lseek and write.
9868 * config.in, configure: Regenerated.
9870 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9872 * server.c (myresume): Add own_buf argument.
9873 (main): Update calls.
9875 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9877 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9878 * remote-utils.c (remote_open): Do not call disable_async_io.
9879 (block_async_io): Delete.
9880 (unblock_async_io): Make static.
9881 (initialize_async_io): New.
9882 * server.c (handle_v_cont): Handle async I/O here.
9883 (myresume): Likewise. Move other common resume tasks here...
9884 (main): ... from here. Call initialize_async_io. Disable async
9885 I/O before the main loop.
9886 * server.h (initialize_async_io): Declare.
9887 (block_async_io, unblock_async_io): Delete prototypes.
9888 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9890 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9892 * remote-utils.c (readchar): Allow binary data in received messages.
9894 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9896 * win32-low.c (attaching): New global.
9897 (win32_create_inferior): Clear the `attaching' global.
9898 (win32_attach): Set the `attaching' global.
9899 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9900 attaching. Only set a breakpoint at the entry point if not
9903 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9905 * server.c (main): Don't report dll events on the initial
9906 connection on attaches.
9908 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9910 * server.c (main): Relax numerical bases supported for the pid of
9911 the --attach command line argument.
9913 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9915 * win32-low.c (win32_attach): Call OpenProcess before
9916 DebugActiveProcess, not after. Add last error output to error
9919 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9921 * win32-low.c (win32_get_thread_context)
9922 (win32_set_thread_context): New functions.
9923 (thread_rec): Use win32_get_thread_context.
9924 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9925 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9928 2007-12-03 Leo Zayas
9929 Pedro Alves <pedro_alves@portugalmail.pt>
9931 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9933 (child_add_thread): Minor cleanup.
9934 (child_continue): Resume artificially suspended threads before
9935 calling ContinueDebugEvent.
9936 (suspend_one_thread): New.
9937 (fake_breakpoint_event): New.
9938 (get_child_debug_event): Change return type to int. Check here if
9939 gdb sent an interrupt request. If a soft interrupt was requested,
9940 fake a breakpoint event. Return 0 if there is no event to handle,
9942 (win32_wait): Don't check here if gdb sent an interrupt request.
9943 Ensure there is a valid event to handle.
9944 (win32_request_interrupt): Add soft interruption method as last
9947 2007-12-03 Leo Zayas
9948 Pedro Alves <pedro_alves@portugalmail.pt>
9950 * win32-low.h (win32_thread_info): Add descriptions to the
9951 structure members. Replace `suspend_count' counter by a
9953 * win32-low.c (thread_rec): Update condition of when to get the
9954 context from the inferior. Rely on ContextFlags being set if it
9955 has already been retrieved. Only suspend the inferior thread if
9956 we haven't already. Warn if that fails.
9957 (continue_one_thread): s/suspend_count/suspended/. Only call
9958 ResumeThread once. Warn if that fails.
9960 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9962 * win32-low.c (win32_wait): Don't read from the inferior when it
9965 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9967 * Makefile.in (win32_low_h): New variable.
9968 (win32-low.o): Add dependency on $(win32_low_h).
9969 (win32-arm-low.o, win32-i386-low.o): New rules.
9971 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9973 * hostio.c: Correct copyright year.
9975 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9977 * Makefile.in (OBS): Add hostio.o.
9978 (hostio.o): New rule.
9979 * server.h (handle_vFile): Declare.
9980 * hostio.c: New file.
9981 * server.c (handle_v_requests): Take packet_len and new_packet_len
9982 for binary packets. Call handle_vFile.
9983 (main): Update call to handle_v_requests.
9985 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9987 * linux-low.c: Include <sched.h>.
9989 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9991 * linux-low.c (linux_tracefork_grandchild): New.
9992 (linux_tracefork_child): Use clone.
9993 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9995 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9997 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9999 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10001 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10003 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10005 * inferiors.c (change_inferior_id): Delete.
10006 (add_pid_to_list, pull_pid_from_list): New.
10007 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10008 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10009 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10010 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10011 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10012 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10013 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10014 (using_threads): Always set to 1.
10015 (handle_extended_wait): New.
10016 (add_process): Do not set TID.
10017 (linux_create_inferior): Set must_set_ptrace_flags.
10018 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10019 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10020 (linux_thread_alive): Rename TID argument to LWPID.
10021 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10022 (linux_wait_for_event): Do not use TID or check using_threads. Update
10023 call to dead_thread_notify. Call handle_extended_wait.
10024 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10025 (send_sigstop): Delete sigstop_sent.
10026 (wait_for_sigstop): Avoid TID.
10027 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10028 (linux_test_for_tracefork): New.
10029 (linux_lookup_signals): Use thread_db_active and
10030 linux_supports_tracefork_flag.
10031 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10032 * linux-low.h (get_process_thread): Avoid TID.
10033 (struct process_ifo): Move thread_known and tid to the end. Remove
10035 (linux_attach_lwp, thread_db_init): Update prototypes.
10036 * server.h (change_inferior_id): Delete prototype.
10037 (add_pid_to_list, pull_pid_from_list): New prototypes.
10038 * thread-db.c (thread_db_use_events): New.
10039 (find_first_thread): Rename to...
10040 (find_one_thread): ...this. Update callers and messages. Do not
10041 call fatal. Check thread_db_use_events. Do not call
10042 change_inferior_id or new_thread_notify.
10043 (maybe_attach_thread): Update. Do not call new_thread_notify.
10044 (thread_db_init): Set thread_db_use_events. Check use_events.
10045 * utils.c (fatal, warning): Correct message prefix.
10047 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10049 * Makefile.in (clean): Remove new files.
10050 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10051 (powerpc-64.o, powerpc-64.c): New rules.
10052 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10053 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10055 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10057 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10058 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10059 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10060 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10061 (target_regsets): Add AltiVec and SPE register sets.
10062 * configure.ac: Check for AltiVec and SPE.
10063 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10064 (ppc_fill_vrregset, ppc_store_vrregset): New.
10065 (target_regsets): Add AltiVec register set.
10066 * configure: Regenerated.
10068 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10070 * linux-low.c (O_LARGEFILE): Define.
10071 (linux_read_memory): Use /proc/PID/mem.
10072 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10073 * configure, config.in: Regenerated.
10075 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10077 * linux-low.c (linux_wait_for_event): Do not pass signals while
10080 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10082 * win32-low.c (create_process): New.
10083 (win32_create_inferior): Use create_process instead of
10084 CreateProcess. If create_process failed retry appending an ".exe"
10085 suffix. Store the GetLastError result immediatelly after
10086 create_process calls and use it on the call to error.
10088 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10090 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10092 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10094 * configure.ac: Switch license to GPLv3.
10096 2007-08-01 Michael Snyder <msnyder@access-company.com>
10098 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10100 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10102 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10104 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10105 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10106 CloseToolhelp32Snapshot.
10107 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10108 CloseToolhelp32Snapshot.
10110 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10112 * server.c (main): Check for inferior exit before main loop.
10114 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10116 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10117 instead of on tmp_desc.
10119 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10120 Daniel Jacobowitz <dan@codesourcery.com>
10122 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10123 (add_thread): Minor cleanups.
10124 (clear_inferiors): Move lower in the file. Clear the DLL
10126 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10127 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10128 (xml_escape_text): New.
10129 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10131 (handle_v_cont): Report errors.
10132 (gdbserver_version): Update.
10133 (main): Correct size of own_buf. Do not report initial DLL events.
10134 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10135 (unloaded_dll, xml_escape_text): New.
10136 * win32-low.c (enum target_waitkind): Update comments.
10137 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10138 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10139 (win32_EnumProcessModules, win32_GetModuleInformation)
10140 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10141 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10142 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10143 (win32_Module32First, win32_Module32Next, load_toolhelp)
10144 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10145 (get_child_debug_event): Handle DLL events.
10146 (win32_wait): Likewise.
10148 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10150 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10151 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10153 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10155 * win32-low.c (handle_output_debug_string): Ignore event if not
10158 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10160 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10162 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10164 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10166 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10168 * inferiors.c (change_inferior_id): Add comment.
10169 * linux-low.c (check_removed_breakpoint): Add an early
10170 prototype. Improve debug output.
10171 (linux_attach): Doc update.
10172 (linux_detach_one_process, linux_detach): Clean up before releasing
10174 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10175 * linux-low.h (struct process_info): Doc improvement.
10176 * mem-break.c (delete_all_breakpoints): New.
10177 * mem-break.h (delete_all_breakpoints): New prototype.
10178 * thread-db.c (find_first_thread): New.
10179 (thread_db_create_event): Call it instead of
10180 thread_db_find_new_threads. Clean up unused variables.
10181 (maybe_attach_thread): Remove first thread handling.
10182 (thread_db_find_new_threads): Use find_first_thread.
10183 (thread_db_get_tls_address): Likewise.
10185 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10187 * thread-db.c (thread_db_find_new_threads): Add prototype.
10188 (thread_db_create_event): Check for the main thread before adding
10190 (maybe_attach_thread): Only enable event reporting if TID == 0.
10191 (thread_db_get_tls_address): Check for new threads.
10193 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10195 * linux-low.c (linux_create_inferior): Try execv before execvp.
10196 * spu-low.c (spu_create_inferior): Likewise.
10198 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10200 * linux-low.c (linux_create_inferior): Change execv to execvp.
10201 * spu-low.c (spu_create_inferior): Likewies.
10203 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10205 * Makefile.in (clean): Clean new files instead of deleted ones.
10206 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10207 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10209 * configure.srv: Specify XML files and new regformats for MIPS and
10211 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10212 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10213 an entry for the restart register.
10214 (mips_cannot_fetch_register, mips_cannot_store_register)
10215 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10216 register names to match the XML descriptions.
10217 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10218 restart register instead of $0.
10220 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10221 Markus Deuling <deuling@de.ibm.com>
10223 * remote-utils.c (decode_xfer_write): New function.
10224 * server.h (decode_xfer_write): Add prototype.
10225 * server.c (handle_query): Add PACKET_LEN argument. Support
10226 qXfer:spu:read and qXfer:spu:write packets.
10227 (main): Pass packet_len to handle_query.
10228 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10229 * target.h (target_ops): Add qxfer_spu.
10231 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10233 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10234 accessing non-seekable spufs files.
10236 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10238 * server.c (handle_query): Add reply for qC packet.
10240 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10241 Leo Zayas <lerele@champenstudios@com>
10243 * server.h (check_remote_input_interrupt_request): New function.
10244 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10245 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10246 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10247 (check_remote_input_interrupt_request): New function.
10248 * server.h (check_remote_input_interrupt_request): Declare.
10249 * win32-low.c (winapi_DebugBreakProcess,
10250 winapi_GenerateConsoleCtrlEvent): New typedefs.
10251 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10253 (win32_wait): Check for remote interrupt request
10254 with check_remote_input_interrupt_request.
10255 (win32_request_interrupt): New function.
10256 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10258 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10260 * win32-low.c (debug_registers_changed,
10261 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10262 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10263 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10264 (thread_rec): Get context using the low target.
10265 (child_add_thread): Call thread_added on the low target,
10266 which does the same thing.
10268 (do_initial_child_stuff): Remove debug registers references.
10269 Set context using the low target. Resume threads after
10270 setting the contexts.
10271 (child_continue): Remove dead variable. Remove debug
10272 registers references.
10273 (child_fetch_inferior_registers): Go through the low target.
10274 (do_child_store_inferior_registers): Remove.
10275 (child_store_inferior_registers): Go through the low target.
10276 (win32_resume): Remove debug registers references.
10277 Set context using the low target.
10278 (handle_exception): Change return type to void. Don't record
10279 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10280 first chance exception.
10281 (get_child_debug_event): Change return type to void. Remove
10282 goto loop. Always return after waiting for debug event.
10283 (win32_wait): Convert to switch statement. Handle spurious
10286 * win32-i386-low.c (debug_registers_changed,
10287 debug_registers_used): New.
10288 (initial_stuff): Rename to ...
10289 (i386_initial_stuff): ... this. Clear debug registers
10291 (store_debug_registers): Delete.
10292 (i386_get_thread_context): New.
10293 (load_debug_registers): Delete.
10294 (i386_set_thread_context): New.
10295 (i386_thread_added): New.
10296 (single_step): Rename to ...
10297 (i386_single_step): ... this.
10298 (do_fetch_inferior_registers): Rename to ...
10299 (i386_fetch_inferior_register): ... this.
10300 (i386_store_inferior_register): New.
10301 (the_low_target): Adapt to new interface.
10303 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10304 (arm_get_thread_context): New.
10305 (arm_set_thread_context): New.
10307 (do_fetch_inferior_registers): Rename to ...
10308 (arm_fetch_inferior_register): ... this.
10309 (arm_store_inferior_register): New.
10310 (arm_wince_breakpoint): Reimplement as unsigned long.
10311 (arm_wince_breakpoint_len): Define.
10312 (the_low_target): Adapt to new interface.
10314 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10315 load_debug_registers. Add get_thread_context, set_thread_context,
10316 thread_added and store_inferior_register. Rename
10317 fetch_inferior_registers to fetch_inferior_register.
10318 (regptr): Remove declaration.
10320 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10322 * linux-low.c (linux_detach): Change return type to int. Return 0.
10323 * spu-low.c (spu_detach): Likewise.
10325 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10327 * target.h (target_ops): Change return type of detach to int.
10329 (join_inferior): New.
10330 * server.c (main): Don't skip detach support on mingw32.
10331 If the inferior doesn't support detaching return error.
10332 Call join_inferior instead of using waitpid.
10333 * linux-low.c (linux_join): New.
10334 (linux_target_op): Add linux_join.
10335 * spu-low.c (spu_join): New.
10336 (spu_target_ops): Add spu_join.
10337 * win32-low.c (win32_detach): Adapt to new interface.
10338 Reopen current_process_handle before detaching. Issue a child
10339 resume before detaching.
10341 (win32_target_op): Add win32_join.
10343 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10345 * win32-low.c (win32-attach): Fix return value.
10346 * target.h (target_ops): Describe ATTACH return values.
10348 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10350 * win32-low.c (GETPROCADDRESS): Define.
10351 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10352 (winapi_DebugSetProcessKillOnExit): Likewise.
10353 (win32_create_inferior): Force usage of ansi CreateProcessA.
10354 (win32_attach): Use GETPROCADDRESS.
10355 (win32_detach): Likewise.
10357 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10359 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10361 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10363 * win32-low.c: Commit leftover changes from 2007-03-29.
10365 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10367 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10368 fields short instead of int. Add explicit padding.
10369 (i387_cache_to_fsave): Remove unnecessary casts.
10370 (i387_fsave_to_cache): Doc fix.
10371 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10373 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10375 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10376 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10378 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10380 * configure.srv (arm*-*-mingw32ce*): Move near the other
10383 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10385 * configure.ac: Add errno checking.
10386 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10387 sys/file.h and malloc.h.
10388 (AC_CHECK_DECLS): Add perror.
10389 (srv_mingwce): Handle.
10390 * configure.srv (i[34567]86-*-cygwin*): Add
10391 win32-i386-low.o to srv_tgtobj.
10392 (i[34567]86-*-mingw*): Likewise.
10393 (arm*-*-mingw32ce*): Add case.
10394 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10395 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10396 [__MINGW32CE__] (strerror): New function.
10397 [__MINGW32CE__] (errno): Define to GetLastError.
10398 [__MINGW32CE__] (COUNTOF): New macro.
10399 (remote_open): Remove extra close call.
10400 * mem-break.c (delete_breakpoint_at): New function.
10401 * mem-break.h (delete_breakpoint_at): Declare.
10402 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10403 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10404 [USE_WIN32API] (read, write): Add char* casts.
10405 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10406 * server.h: Include wincecompat.h on Windows CE.
10407 [HAVE_ERRNO_H]: Check.
10408 (perror): Declare if not declared.
10409 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10410 (perror_with_name): Remove errno declaration.
10411 * wincecompat.h: New.
10412 * wincecompat.c: New.
10413 * win32-low.h: New.
10414 * win32-arm-low.c: New.
10415 * win32-i386-low.c: New.
10416 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10417 (OUTMSG2): Make it safe.
10419 (COUNTOF): New macro.
10420 (NUM_REGS): Get it from the low target.
10421 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10422 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10423 (thread_rec): Let low target handle debug registers.
10424 (child_add_thread): Likewise.
10425 (child_init_thread_list): Likewise.
10426 (continue_one_thread): Likewise.
10428 (do_child_fetch_inferior_registers): Move to ...
10429 * win32-i386-low.c: ... here, and rename to ...
10430 (do_fetch_inferior_registers): ... this.
10431 * win32-low.c (child_fetch_inferior_registers):
10432 Go through the low target.
10433 (do_child_store_inferior_registers): Use regptr.
10434 (strwinerror): New function.
10435 (win32_create_inferior): Handle Windows CE.
10436 Use strwinerror instead of strerror on Windows error
10437 codes. Add program to the error output.
10438 Don't close the main thread handle on Windows CE.
10439 (win32_attach): Use coredll.dll on Windows CE.
10440 (win32_kill): Close current process and current
10442 (win32_detach): Use coredll.dll on Windows CE.
10443 (win32_resume): Let low target handle debug registers, and
10445 (handle_exception): Add/Remove initial breakpoint. Avoid
10446 non-existant WSTOPSIG on Windows CE.
10447 (win32_read_inferior_memory): Cast to remove warning.
10448 (win32_arch_string): Go through the low target.
10449 (initialize_low): Call set_breakpoint_data with the low
10450 target's breakpoint.
10451 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10452 FOP_REGNUM, mappings): Move to ...
10453 * win32-i386-low.c: ... here.
10454 * win32-low.c (win32_thread_info): Move to ...
10455 * win32-low.h: ... here.
10456 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10457 win32-arm-low.c and wincecompat.c.
10458 (all:): Add $EXEEXT.
10459 (install-only:): Likewise.
10460 (gdbserver:): Likewise.
10461 (gdbreplay:): Likewise.
10462 * config.in: Regenerate.
10463 * configure: Regenerate.
10465 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10467 * win32-low.c: Rename typedef thread_info to
10468 win32_thread_info throughout.
10470 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10472 * win32-i386-low.c: Rename to ...
10473 * win32-low.c: ... this.
10474 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10475 * Makefile.in: Likewise.
10477 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10479 * remote-utils.c (monitor_output): Constify msg parameter.
10480 * server.h (monitor_output): Likewise.
10481 * win32-i386-low.c (handle_output_debug_string): New.
10482 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10483 handle_output_debug_string.
10484 (get_child_debug_event): Likewise.
10486 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10488 * server.c (main): Correct strtoul check.
10490 2007-03-27 Jon Ringle <jon@ringle.org>
10492 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10494 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10496 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10498 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10500 * terminal.h: Check HAVE_SGTTY_H.
10502 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10504 * remote-utils.c (remote_open): Print out the assigned port number.
10506 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10508 * remote-utils.c (monitor_output): New function.
10509 * server.c (debug_threads): Define here.
10510 (monitor_show_help): New function.
10511 (handle_query): Handle qRcmd.
10512 (main): Do not handle 'd' packet.
10513 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10514 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10517 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10519 * Makefile.in (EXEEXT): New.
10520 (clean): Use $(EXEEXT).
10522 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10524 * target.h (target_ops): Rename send_signal to request_interrupt,
10525 and remove enum target_signal parameter.
10526 * linux-low.c (linux_request_interrupt): Rename from
10527 linux_send_signal, and always send SIGINT.
10528 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10529 and always send SIGINT.
10530 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10532 (input_interrupt): Likewise.
10534 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10536 * server.c (get_features_xml): Check if target implemented
10538 * win32-i386-low.c (win32_arch_string): New.
10539 (win32_target_ops): Add win32_arch_string as arch_string member.
10541 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10543 * spu-low.c (spu_arch_string): New.
10544 (spu_target_ops): Add spu_arch_string.
10546 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10548 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10549 * configure.ac: Do not check for terminal.h.
10550 * configure, config.in: Regenerated.
10552 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10554 * Makefile.in (OBS): Add $(XML_BUILTIN).
10555 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10557 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10558 (arm-with-iwmmxt.c): New.
10559 * config.in, configure: Regenerate.
10560 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10561 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10562 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10563 (arm*-*-linux*): Add iWMMXt and regset support.
10564 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10565 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10566 (arm_store_wmmxregset, target_regsets): New.
10567 * server.c (get_features_xml): Take annex argument. Check builtin
10569 (handle_query): Handle multiple annexes.
10571 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10573 * remote-utils.c [USE_WIN32API] (read, write): Define.
10574 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10577 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10579 * linux-i386-low.c (the_low_target): Set arch_string.
10580 * linux-x86-64-low.c (the_low_target): Likewise.
10581 * linux-low.c (linux_arch_string): New.
10582 (linux_target_ops): Add it.
10583 * linux-low.h (struct linux_target_ops): Add arch_string.
10584 * server.c (write_qxfer_response): Use const void * for DATA.
10585 (get_features_xml): New.
10586 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10587 * target.h (struct target_ops): Add arch_string method.
10589 2007-01-03 Denis Pilat <denis.pilat@st.com>
10590 Daniel Jacobowitz <dan@codesourcery.com>
10592 * linux-low.c (linux_kill): Handle being called with no threads.
10593 * win32-i386-low.c (win32_kill): Likewise.
10594 (get_child_debug_event): Clear current_process_handle.
10596 2006-12-30 Denis PILAT <denis.pilat@st.com>
10597 Daniel Jacobowitz <dan@codesourcery.com>
10599 * remote-utils.c (remote_open): Check the type of specified
10600 serial port devices before opening them.
10601 * server.c (main): Kill the inferior if an error occurs during
10602 the first remote_open.
10604 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10606 * README: Update supported targets.
10608 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10610 * Makefile.in (clean): Remove reg-mips64.c.
10611 (reg-mips64.c, reg-mips64.o): New rules.
10612 * configure.srv: Handle mips64. Include regset support for mips.
10613 * linux-mips-low.c (union mips_register): New.
10614 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10615 (mips_breakpoint, mips_breakpoint_at): Use int.
10616 (mips_collect_register, mips_supply_register)
10617 (mips_collect_register_32bit, mips_supply_register_32bit)
10618 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10619 (mips_store_fpregset, target_regsets): New.
10620 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10622 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10624 * configure.srv: Add target "spu*-*-*".
10625 * Makefile.in (clean): Remove reg-spu.c.
10626 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10627 * spu-low.c: New file.
10629 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10631 * configure.ac: Correct td_thr_tls_get_addr test.
10632 * configure: Regenerated.
10634 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10636 * linux-low.c (linux_wait_for_event): Reformat. Use the
10637 pass_signals array.
10638 * remote-utils.c (decode_address_to_semicolon): New.
10639 * server.c (pass_signals, handle_general_set): New.
10640 (handle_query): Mention QPassSignals for qSupported.
10641 (main): Call handle_general_set.
10642 * server.h (pass_signals, decode_address_to_semicolon): New.
10644 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10646 * server.c (handle_query): Correct error handling for read_auxv.
10648 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10650 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10651 and srv_linux_thread_db to yes.
10652 * linux-s390-low.c (s390_fill_gregset): New function.
10653 (target_regsets): Define data structure.
10655 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10657 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10658 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10659 * config.in, configure: Regenerated.
10660 * inferiors.c (gdb_id_to_thread): New function.
10661 (gdb_id_to_thread_id): Use it.
10662 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10663 * linux-low.h (struct process_info): Add th member.
10664 (thread_db_get_tls_address): New prototype.
10665 * remote-utils.c (decode_address): Make non-static.
10666 * server.c (handle_query): Handle qGetTLSAddr.
10667 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10668 * target.h (struct target_ops): Add get_tls_address.
10669 * thread-db.c (maybe_attach_thread): Save the thread handle.
10670 (thread_db_get_tls_address): New.
10672 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10674 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10675 (linux_resume_one_process): Take a siginfo_t *. Update all
10676 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10677 (struct pending_signals): Add a siginfo_t.
10678 (linux_wait_for_process): Always set last_status.
10679 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10680 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10681 * linux-low.h (struct process_info): Add last_status.
10683 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10685 * remote-utils.c (try_rle): New function.
10686 (putpkt_binary): Use it.
10688 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10690 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10691 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10692 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10693 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10694 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10697 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10699 * server.c (terminal_fd): New variable.
10700 (old_foreground_pgrp): Likewise.
10701 (restore_old_foreground_pgrp): New function.
10702 (start_inferior): Record the terminal file descriptor in terminal_fd
10703 and its original foreground group in old_foreground_pgrp. Register
10704 restore_old_foreground_pgrp with atexit().
10706 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10708 * server.c (handle_query): Correct qPart to qXfer.
10710 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10712 * configure.ac: Check for more headers which are missing on
10713 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10714 * configure.srv: Add Cygwin and mingw32.
10715 * remote-utils.c: Don't include headers unconditionally which
10716 are missing on mingw32. Include <winsock.h> for mingw32.
10717 (remote_open): Adjust for mingw32 support. Flush
10718 standard error after writing to it.
10719 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10720 (unblock_async_io, enable_async_io, disable_async_io)
10721 (readchar, getpkt): Update for Winsock support.
10722 (prepare_resume_reply): Expect a protocol signal number.
10723 * server.c: Disable <sys/wait.h> on mingw32.
10724 (start_inferior): Adjust for mingw32 support. Flush
10725 standard error after writing to it.
10726 (attach_inferior): Likewise. Use protocol signal
10728 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10730 * win32-i386-low.c: New file.
10731 * Makefile.in (XM_CLIBS): Set.
10732 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10733 (win32-i386-low.o): New dependency rule.
10734 * linux-low.c (linux_wait): Use target signal numbers.
10735 * target.h (struct target_ops): Doc fix.
10736 * server.h (target_signal_to_name): New prototype.
10737 * gdbreplay.c: Don't include headers unconditionally which
10738 are missing on mingw32. Include <winsock.h> for mingw32.
10739 (remote_close, remote_open): Adjust for Winsock support.
10740 * configure, config.in: Regenerated.
10742 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10744 * server.c (decode_xfer_read, write_qxfer_response): New.
10745 (handle_query): Take a packet length argument. Handle
10746 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10747 the qSupported response.
10748 (main): Update call to handle_query.
10750 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10752 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10753 (putpkt_binary): Renamed from putpkt and adjusted for binary
10755 (putpkt): New wrapper for putpkt_binary.
10756 (readchar): Don't mask off the high bit.
10757 (decode_X_packet): New function.
10758 * server.c (main): Call putpkt_binary if a handler sets the packet
10759 length. Save the length of the incoming packet. Handle 'X'.
10760 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10762 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10764 * server.c (handle_query): Handle qSupported.
10766 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10768 * remote-utils.c (all_symbols_looked_up): New variable.
10769 (look_up_one_symbol): Check it.
10770 * server.h (look_up_one_symbol): New declaration.
10771 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10773 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10775 * Makefile.in (linux-arm-low.o): Update dependencies.
10776 * linux-arm-low.c: Include "gdb_proc_service.h".
10777 (PTRACE_GET_THREAD_AREA): Define.
10778 (ps_get_thread_area): New function.
10780 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10782 * configure.srv (m68k*-*-uclinux*): New target.
10783 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10784 (linux_resume_one_process): Remove extraneous cast.
10785 (linux_read_offsets): New.
10786 (linux_target_op): Add linux_read_offsets on mmuless systems.
10787 * server.c (handle_query): Add qOffsets logic.
10788 * target.h (struct target_ops): Add read_offsets.
10790 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10792 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10793 (PTRACE_GET_THREAD_AREA): Define.
10794 (ps_get_thread_area): New function.
10795 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10796 (linux-x86-64-low.o): Update.
10798 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10800 * configure.ac: Remove checks for prfpregset_t.
10801 * gdb_proc_service.h: New file.
10802 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10803 new "gdb_proc_service.h".
10804 * proc-service.c: Likewise.
10805 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10806 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10807 * Makefile.in (gdb_proc_service_h): Updated.
10808 * configure, config.in: Regenerated.
10810 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10812 * remote-utils.c (prepare_resume_reply): Move declaration
10813 of gdb_id_from_wait to the top of the block.
10815 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10817 * linux-low.c (regsets_store_inferior_registers): Read the regset
10818 from the target before filling it.
10820 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10822 * server.c (attach_inferior): Return SIGTRAP for a successful
10825 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10827 * Makefile.in (OBS): Add version.o.
10828 (STAGESTUFF): Delete.
10829 (version.o): Add dependencies.
10830 (version.c): Replace rule.
10831 (clean): Remove version.c.
10832 * server.c (gdbserver_version): New.
10833 (gdbserver_usage): Use printf.
10834 (main): Handle --version and --help.
10835 * server.h (version, host_name): Add declarations.
10837 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10849 * linux-x86-64-low.c:
10851 * linux-s390-low.c:
10852 * linux-ppc64-low.c:
10854 * linux-mips-low.c:
10855 * linux-m68k-low.c:
10856 * linux-m32r-low.c:
10859 * linux-ia64-low.c:
10860 * linux-i386-low.c:
10861 * linux-crisv32-low.c:
10873 * gdbserver.1: Add (C) after Copyright. Update the FSF
10876 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10878 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10879 (arm_breakpoint_at): Recognize both breakpoints.
10880 (the_low_target): Use the correct breakpoint instruction.
10882 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10884 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10885 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10886 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10887 (the_low_target): Update.
10889 2005-10-25 Andreas Schwab <schwab@suse.de>
10891 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10893 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10894 (ia64_num_regs): Reduce to 462.
10896 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10898 * acinclude.m4: Correct quoting.
10899 * aclocal.m4: Regenerated.
10901 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10902 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10903 (thread_db_init): Call thread_db_err_str.
10904 * configure.ac: Check for TD_VERSION.
10905 * config.in, configure: Regenerated.
10907 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10909 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10911 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10913 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10914 is not available. Define HAVE_PTRACE_GETREGS if it is.
10915 * config.in, configure: Regenerated.
10916 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10917 * linux-i386-low.c, linux-m68k-low.c: Update to use
10918 HAVE_PTRACE_GETREGS.
10919 * linux-low.c (regsets_fetch_inferior_registers)
10920 (regsets_store_inferior_registers): Only return 0 if we processed
10922 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10923 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10925 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10927 * inferiors.c (struct thread_info): Add gdb_id.
10928 (add_thread): Add gdb_id argument.
10929 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10930 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10931 calls to add_thread.
10932 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10933 * server.c (handle_query): Use thread_to_gdb_id.
10934 (handle_v_cont, main): Use gdb_id_to_thread_id.
10935 * server.h (add_thread): Update prototype.
10936 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10939 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10941 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10942 left-padded registers.
10943 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10944 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10946 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10948 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10949 * configure: Regenerate.
10950 * config.in: Regenerate.
10951 * server.h (NEED_DECLARATION_STRERROR):
10952 Replace with !HAVE_DECL_STRERROR.
10954 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10956 * linux-low.c (linux_wait, linux_send_signal): Don't test
10957 an unsigned long variable for > 0 if it could be MAX_ULONG.
10958 * server.c (myresume): Likewise.
10959 * target.c (set_desired_inferior): Likewise.
10961 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10963 * configure.ac: Simplify and improve check for socklen_t.
10964 * configure, config.in: Regenerate.
10966 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10968 * acconfig.h: Remove.
10969 * configure.ac: Add a test for socklen_t. Use three-argument
10970 AC_DEFINE throughout.
10971 * config.in: Regenerated using autoheader 2.59.
10972 * configure: Regenerated.
10974 * gdbreplay.c (socklen_t): Provide a default.
10975 (remote_open): Use socklen_t.
10976 * remote-utils.c (socklen_t): Provide a default.
10977 (remote_open): Use socklen_t.
10978 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10981 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10983 * linux-low.c (linux_read_memory, linux_write_memory)
10984 (linux_read_auxv): Likewise.
10985 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10986 (check_mem_write): Likewise.
10987 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10989 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10990 (registers_from_string, register_data): Likewise.
10991 * server.c (handle_query, main): Likewise.
10992 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10993 (decode_M_packet): Likewise.
10994 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10995 * target.h (struct target_ops): Update read_memory, write_memory,
10997 (read_inferior_memory, write_inferior_memory): Update.
10998 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10999 to unsigned char *.
11000 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11001 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11002 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11003 linux-s390-low.c, linux-sh-low.c: Update for changes in
11004 read_inferior_memory and the_low_target->breakpoint.
11006 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11008 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11009 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11010 * configure.srv: Add powerpc64-*-linux*.
11011 * linux-ppc64-low.c: New file.
11013 2005-05-23 Orjan Friberg <orjanf@axis.com>
11015 * linux-cris-low.c: New file with support for CRIS.
11016 * linux-crisv32-low.c: Ditto for CRISv32.
11017 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11018 (clean): Add reg-cris.c and reg-crisv32.c.
11019 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11020 reg-crisv32.o, and reg-crisv32.c to make rules.
11021 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11022 recognized targets.
11024 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11026 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11027 of sizeof (PTRACE_XFER_TYPE).
11028 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11030 2005-05-12 Orjan Friberg <orjanf@axis.com>
11032 * target.h (struct target_ops): Add insert_watchpoint,
11033 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11034 pointers for hardware watchpoint support.
11035 * linux-low.h (struct linux_target_ops): Ditto.
11036 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11037 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11038 to linux_target_ops.
11039 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11041 * server.c (main): Recognize 'Z' and 'z' packets.
11043 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11045 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11046 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11047 (the_low_target): Add new members.
11049 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11051 * proc-service.c (ps_lgetregs): Search all_processes instead of
11054 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11056 * server.c (start_inferior): Change return type to int.
11057 (attach_inferior): Change sigptr to int *.
11058 (handle_v_cont, handle_v_requests): Change signal to int *.
11059 (main): Change signal to int.
11061 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11063 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11064 * configure.srv: Add m32r*-*-linux*.
11065 * linux-m32r-low.c: New file.
11067 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11069 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11071 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11073 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11074 Take unsigned long arguments for PIDs.
11075 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11076 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11077 (wait_for_sigstop, linux_resume_one_process)
11078 (regsets_fetch_inferior_registers, linux_send_signal)
11079 (linux_read_auxv): Likewise. Update the types of variables holding
11080 PIDs. Update format string specifiers.
11081 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11082 * remote-utils.c (prepare_resume_reply): Likewise.
11083 * server.c (cont_thread, general_thread, step_thread)
11084 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11086 (handle_query): Update format specifiers.
11087 (handle_v_cont, main): Use strtoul for thread IDs.
11088 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11089 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11090 (general_thread, step_thread, thread_from_wait)
11091 (old_thread_from_wait): Update.
11092 * target.h (struct thread_resume): Use unsigned long for THREAD.
11093 (struct target_ops): Use unsigned long for arguments to attach and
11096 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11098 * acinclude.m4: Include bfd/bfd.m4 directly.
11099 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11100 <agriffis@toolchain.org>.
11101 * aclocal.m4, configure: Regenerated.
11103 2005-01-07 Andrew Cagney <cagney@gnu.org>
11105 * configure.ac: Rename configure.in, require autoconf 2.59.
11106 * configure: Re-generate.
11108 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11110 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11111 LIBS when finished.
11112 * aclocal.m4: Regenerated.
11113 * configure: Regenerated.
11115 2004-11-21 Andreas Schwab <schwab@suse.de>
11117 * linux-m68k-low.c (m68k_num_gregs): Define.
11118 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11119 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11120 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11121 (m68k_breakpoint_at): New. Add to the_low_target.
11123 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11124 srv_linux_thread_db to yes.
11126 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11128 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11129 (ARCH_SET_FS): Likewise.
11130 (ARCH_GET_FS): Likewise.
11131 (ARCH_GET_GS): Likewise.
11133 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11135 * linux-i386-low.c (ps_get_thread_area): New.
11136 * linux-x86-64-low.c (ps_get_thread_area): New.
11137 * linux-low.c: Include <sys/syscall.h>.
11138 (linux_kill_one_process): Don't kill the first thread here.
11139 (linux_kill): Kill the first thread here.
11140 (kill_lwp): New function.
11141 (send_sigstop, linux_send_signal): Use it.
11142 * proc-service.c: Clean up #ifdefs.
11143 (fpregset_info): Delete.
11144 (ps_lgetregs): Update and enable implementation.
11145 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11147 * remote-utils.c (struct sym_cache, symbol_cache): New.
11148 (input_interrupt): Print a clearer message.
11149 (async_io_enabled): New variable.
11150 (enable_async_io, disable_async_io): Use it. Update comments.
11151 (look_up_one_symbol): Use the symbol cache.
11152 * thread-db.c (thread_db_look_up_symbols): New function.
11153 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11155 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11157 * configure.in: Test for -rdynamic.
11158 * configure: Regenerated.
11159 * Makefile (INTERNAL_LDFLAGS): New.
11160 (gdbserver, gdbreplay): Use it.
11162 2004-09-02 Andrew Cagney <cagney@gnu.org>
11164 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11166 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11168 * linux-low.c (linux_wait): Clear all_processes list also.
11170 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11172 * linux-low.c: Include <errno.h>. Remove extern declaration of
11175 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11177 * gdbreplay.c, server.h, utils.c: Update copyright years.
11179 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11181 * server.c (main): Print child status or termination signal from
11182 variable 'signal', not 'sig'.
11184 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11186 * linux-low.c (linux_read_memory): Change return type to
11187 int. Check for and return error from ptrace().
11188 * target.c (read_inferior_memory): Change return type to int. Pass
11189 back return status from the_target->read_memory().
11190 * target.h (struct target_ops): Adapt *read_memory() prototype.
11192 (read_inferior_memory): Adapt prototype.
11193 * server.c (main): Return an error packet if
11194 read_inferior_memory() returns an error.
11196 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11198 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11199 Unify with other clean targets.
11201 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11203 * server.c (handle_v_cont): Call set_desired_inferior.
11205 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11207 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11209 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11211 * linux-low.c (linux_wait): Unblock async I/O.
11212 (linux_resume): Block and enable async I/O.
11213 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11214 * server.h (block_async_io, unblock_async_io): Add prototypes.
11216 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11218 * remote-utils.c (remote_open): Print a status notice after
11219 opening a TCP port.
11220 * server.c (attach_inferior): Print a status notice after
11223 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11225 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11227 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11229 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11231 * server.c, target.h: Update copyright years.
11233 2004-02-25 Roland McGrath <roland@redhat.com>
11235 * target.h (struct target_ops): New member `read_auxv'.
11236 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11237 * linux-low.c (linux_read_auxv): New function.
11238 (linux_target_ops): Initialize `read_auxv' member to that.
11240 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11242 Committed by Jim Blandy <jimb@redhat.com>.
11244 * linux-s390-low.c (s390_num_regs): Update.
11245 (s390_regmap): Remove control registers. Use __s390x__ predefine
11246 instead of GPR_SIZE to distiguish s390 and s390x targets.
11248 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11250 * linux-low.c: Update copyright year.
11251 (check_removed_breakpoint): Clear pending_is_breakpoint.
11252 (linux_set_resume_request, linux_queue_one_thread)
11253 (resume_status_pending_p): New functions.
11254 (linux_continue_one_thread): Use process->resume.
11255 (linux_resume): Only resume threads if there are no pending events.
11256 * linux-low.h (struct process_info): Add resume request
11259 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11261 * regcache.c (new_register_cache): Clear the allocated register
11262 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11264 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11266 * linux-low.c (linux_resume): Take a struct thread_resume *
11268 (linux_wait): Update call.
11269 (resume_ptr): New static variable.
11270 (linux_continue_one_thread): Renamed from
11271 linux_continue_one_process. Use resume_ptr.
11272 (linux_resume): Use linux_continue_one_thread.
11273 * server.c (handle_v_cont, handle_v_requests): New functions.
11274 (myresume): New function.
11275 (main): Handle 'v' case.
11276 * target.h (struct thread_resume): New type.
11277 (struct target_ops): Change argument of "resume" to struct
11279 (myresume): Delete macro.
11281 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11283 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11284 (uninstall): Support DESTDIR.
11286 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11288 * configure.srv: Add xscale*linux copy of arm*linux entry.
11290 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11292 * linux-arm-low.c (arm_reinsert_addr): New function.
11293 (the_low_target): Add arm_reinsert_addr.
11295 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11297 * mem-break.c: Remove whitespace at end of file.
11299 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11301 * configure.in: Check whether we need to prototype strerror.
11302 * server.h: Optionally prototype strerror.
11303 * gdbreplay.c (perror_with_name): Use strerror.
11304 * linux-low.c (linux_attach_lwp): Use strerror.
11305 * utils.c (perror_with_name): Use strerror.
11306 * config.in, configure: Regenerated.
11308 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11310 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11311 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11313 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11315 * Makefile.in (SFILES): Update.
11316 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11317 low-sun3.c: Remove files.
11319 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11321 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11322 (linux_detach_one_process, linux_detach): New functions.
11323 (linux_target_ops): Add linux_detach.
11324 * server.c (main): Handle 'D' packet.
11325 * target.h (struct target_ops): Add "detach" member.
11326 (detach_inferior): Define.
11328 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11330 From Kelley Cook <kelleycook@wideopenwest.com>:
11331 * configure.srv: Accept i[34567]86 variants.
11333 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11335 * linux-low.c (linux_wait_for_event): Correct comment typos.
11336 (linux_resume_one_process): Call check_removed_breakpoint.
11337 (linux_send_signal): New function.
11338 (linux_target_ops): Add linux_send_signal.
11339 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11341 * target.h (struct target_ops): Add send_signal.
11343 2003-05-29 Jim Blandy <jimb@redhat.com>
11345 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11346 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11347 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11348 away part of the register's value.
11350 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11352 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11353 (linux_wait_for_event, linux_init_signals): Likewise.
11355 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11357 * configure.in: Check for stdlib.h.
11358 * configure: Regenerated.
11359 * config.in: Regenerated.
11361 2003-01-04 Andreas Schwab <schwab@suse.de>
11363 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11365 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11367 * Makefile.in: Remove obsolete code.
11369 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11371 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11372 defined(PT_FPR0_HI).
11374 2002-11-17 Stuart Hughes <seh@zee2.com>
11376 * linux-arm-low.c (arm_num_regs): Increase.
11377 (arm_regmap): Include status register.
11379 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11381 * linux-low.c (register_addr): Remove incorrect -1 check.
11383 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11385 * linux-low.c (linux_create_inferior): Call setpgid. Return
11387 (unstopped_p, linux_signal_pid): Remove.
11388 (linux_target_ops): Remove linux_signal_pid.
11389 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11390 global instead of target method.
11391 * target.h (struct target_ops): Remove signal_pid. Update comment
11392 for create_inferior.
11393 * server.c (signal_pid): New variable.
11394 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11395 gdbserver. Set the child to be the foreground process group.
11396 (attach_inferior): Set signal_pid.
11398 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11400 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11402 2002-08-20 Jim Blandy <jimb@redhat.com>
11404 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11407 2002-08-01 Andrew Cagney <cagney@redhat.com>
11409 * Makefile.in: Make chill references obsolete.
11411 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11413 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11414 * configure: Regenerate.
11415 * config.in: Regenerate.
11417 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11419 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11420 (perror_with_name, remote_close, remote_open, expect, play): Static.
11422 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11424 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11425 byte offsets instead of an array of indexes.
11426 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11428 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11430 * regcache.c: Add comment.
11432 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11434 * thread-db.c: New file.
11435 * proc-service.c: New file.
11436 * acinclude.m4: New file.
11437 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11438 proc-service.o, and thread-db.o.
11439 (linux-low.o): Add USE_THREAD_DB.
11440 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11441 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11442 * aclocal.m4: Regenerated.
11443 * config.in: Regenerated.
11444 * configure: Regenerated.
11445 * configure.in: Check for proc_service.h, sys/procfs.h,
11446 thread_db.h, and linux/elf.h headrs.
11447 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11448 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11449 Check for -lthread_db and thread support.
11450 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11451 PowerPC, and SuperH.
11452 * i387-fp.c: Constify arguments.
11453 * i387-fp.h: Likewise.
11454 * inferiors.c: (struct thread_info): Renamed from
11455 `struct inferior_info'. Remove PID member. Use generic inferior
11456 list header. All uses updated.
11457 (inferiors, signal_pid): Removed.
11458 (all_threads): New variable.
11459 (get_thread): Define.
11460 (add_inferior_to_list): New function.
11461 (for_each_inferior): New function.
11462 (change_inferior_id): New function.
11463 (add_inferior): Removed.
11464 (remove_inferior): New function.
11465 (add_thread): New function.
11466 (free_one_thread): New function.
11467 (remove_thread): New function.
11468 (clear_inferiors): Use for_each_inferior and free_one_thread.
11469 (find_inferior): New function.
11470 (find_inferior_id): New function.
11471 (inferior_target_data): Update argument type.
11472 (set_inferior_target_data): Likewise.
11473 (inferior_regcache_data): Likewise.
11474 (set_inferior_regcache_data): Likewise.
11475 * linux-low.c (linux_bp_reinsert): Remove.
11476 (all_processes, stopping_threads, using_thrads)
11477 (struct pending_signals, debug_threads, pid_of): New.
11478 (inferior_pid): Replace with macro.
11479 (struct inferior_linux_data): Remove.
11480 (get_stop_pc, add_process): New functions.
11481 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11482 Use add_process and add_thread.
11483 (linux_attach_lwp): New function, based on old linux_attach. Use
11484 add_process and add_thread. Set stop_expected for new threads.
11485 (linux_attach): New function.
11486 (linux_kill_one_process): New function.
11487 (linux_kill): Kill all LWPs.
11488 (linux_thread_alive): Use find_inferior_id.
11489 (check_removed_breakpoints, status_pending_p): New functions.
11490 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11491 Update. Use WNOHANG. Wait for cloned processes also. Update process
11492 struct for the found process.
11493 (linux_wait_for_event): New function.
11494 (linux_wait): Use it. Support LWPs.
11495 (send_sigstop, wait_for_sigstop, stop_all_processes)
11496 (linux_resume_one_process, linux_continue_one_process): New functions.
11497 (linux_resume): Support LWPs.
11498 (REGISTER_RAW_SIZE): Remove.
11499 (fetch_register): Use register_size instead. Call supply_register.
11500 (usr_store_inferior_registers): Likewise. Call collect_register.
11501 Fix recursive case.
11502 (regsets_fetch_inferior_registers): Improve error message.
11503 (regsets_store_inferior_registers): Add debugging.
11504 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11505 (unstopped_p, linux_signal_pid): New functions.
11506 (linux_target_ops): Add linux_signal_pid.
11507 (linux_init_signals): New function.
11508 (initialize_low): Call it. Initialize using_threads.
11509 * regcache.c (inferior_regcache_data): Add valid
11511 (get_regcache): Fetch registers lazily. Add fetch argument
11512 and update all callers.
11513 (regcache_invalidate_one, regcache_invalidate): New
11515 (new_register_cache): Renamed from create_register_cache.
11516 Return the new regcache.
11517 (free_register_cache): Change argument to a void *.
11518 (registers_to_string, registers_from_string): Call get_regcache
11519 with fetch flag set.
11520 (register_data): Make static. Pass fetch flag to get_regcache.
11521 (supply_register): Call get_regcache with fetch flag clear.
11522 (collect_register): Call get_regcache with fetch flag set.
11523 (collect_register_as_string): New function.
11524 * regcache.h: Update.
11525 * remote-utils.c (putpkt): Flush after debug output and use
11527 Handle input interrupts while waiting for an ACK.
11528 (input_interrupt): Use signal_pid method.
11529 (getpkt): Flush after debug output and use stderr.
11530 (outreg): Use collect_register_as_string.
11531 (new_thread_notify, dead_thread_notify): New functions.
11532 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11533 and general_thread.
11534 (look_up_one_symbol): Flush after debug output.
11535 * server.c (step_thread, server_waiting): New variables.
11536 (start_inferior): Don't use signal_pid. Update call to mywait.
11537 (attach_inferior): Update call to mywait.
11538 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11539 (main): Don't fetch/store registers explicitly. Use
11540 set_desired_inferior. Support proposed ``Hs'' packet. Update
11542 * server.h: Update.
11543 (struct inferior_list, struct_inferior_list_entry): New.
11544 * target.c (set_desired_inferior): New.
11545 (write_inferior_memory): Constify.
11546 (mywait): New function.
11547 * target.h: Update.
11548 (struct target_ops): New signal_pid method.
11549 (mywait): Removed macro, added prototype.
11551 * linux-low.h (regset_func): Removed.
11552 (regset_fill_func, regset_store_func): New.
11553 (enum regset_type): New.
11554 (struct regset_info): Add type field. Use new operation types.
11555 (struct linux_target_ops): stop_pc renamed to get_pc.
11556 Add decr_pc_after_break and breakpoint_at.
11557 (get_process, get_thread_proess, get_process_thread)
11558 (strut process_info, all_processes, linux_attach_lwp)
11559 (thread_db_init): New.
11561 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11562 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11563 (the_low_target): Add new members.
11564 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11565 (i386_store_fpxregset): Constify.
11566 (target_regsets): Add new kind identifier.
11567 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11568 (i386_set_pc): Add debugging.
11569 (i386_breakpoint_at): New function.
11570 (the_low_target): Add new members.
11571 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11572 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11573 (mips_breakpoint_at): New.
11574 (the_low_target): Add new members.
11575 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11576 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11577 (the_low_target): Add new members.
11578 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11579 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11580 (the_low_target): Add new members.
11581 * linux-x86-64-low.c (target_regsets): Add new kind
11584 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11586 From Martin Pool <mbp@samba.org>:
11587 * server.c (gdbserver_usage): New function.
11590 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11592 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11593 stop_at -> stop_pc.
11595 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11597 * Makefile.in: Remove obsolete code.
11599 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11601 * linux-low.c (regsets_fetch_inferior_registers),
11602 (regsets_store_inferior_registers): Removed cast to int from
11604 * regcache.h: Added declaration of struct inferior_info.
11606 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11608 * inferiors.c (struct inferior_info): Add regcache_data.
11609 (add_inferior): Call create_register_cache.
11610 (clear_inferiors): Call free_register_cache.
11611 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11612 * regcache.c (struct inferior_regcache_data): New.
11613 (registers): Remove.
11614 (get_regcache): New function.
11615 (create_register_cache, free_register_cache): New functions.
11616 (set_register_cache): Don't initialize the register cache here.
11617 (registers_to_string, registers_from_string, register_data): Call
11619 * regcache.h: Add prototypes.
11620 * server.h: Likewise.
11622 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11624 * mem-break.c: New file.
11625 * mem-break.h: New file.
11626 * Makefile.in: Add mem-break.o rule; update server.h
11628 * inferiors.c (struct inferior_info): Add target_data
11630 (clear_inferiors): Free target_data member if set.
11631 (inferior_target_data, set_inferior_target_data): New functions.
11632 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11633 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11634 * linux-low.c (linux_bp_reinsert): New variable.
11635 (struct inferior_linux_data): New.
11636 (linux_create_inferior): Use set_inferior_target_data.
11637 (linux_attach): Likewise. Call add_inferior.
11638 (linux_wait_for_one_inferior): New function.
11639 (linux_wait): Call it.
11640 (linux_write_memory): Add const.
11641 (initialize_low): Call set_breakpoint_data.
11642 * linux-low.h (struct linux_target_ops): Add breakpoint
11644 * server.c (attach_inferior): Remove extra add_inferior
11646 * server.h: Include mem-break.h. Update inferior.c
11648 * target.c (read_inferior_memory)
11649 (write_inferior_memory): New functions.
11650 * target.h (read_inferior_memory)
11651 (write_inferior_memory): Change macros to prototypes.
11652 (struct target_ops): Update comments. Add const to write_memory
11655 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11657 * linux-low.c (usr_store_inferior_registers): Support
11658 registers which are allowed to fail to store.
11659 * linux-low.h (linux_target_ops): Likewise.
11660 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11661 (ppc_cannot_store_register): FPSCR may not be storable.
11663 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11665 * server.h: Include <string.h> if HAVE_STRING_H.
11666 * ChangeLog: Correct paths in last ChangeLog entry.
11668 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11670 * linux-low.h: Remove obsolete prototypes.
11671 (struct linux_target_ops): New.
11672 (extern the_low_target): New.
11673 * linux-low.c (num_regs, regmap): Remove declarations.
11674 (register_addr): Use the_low_target explicitly.
11675 (fetch_register): Likewise.
11676 (usr_fetch_inferior_registers): Likewise.
11677 (usr_store_inferior_registers): Likewise.
11678 * linux-arm-low.c (num_regs): Remove.
11679 (arm_num_regs): Define.
11680 (arm_regmap): Renamed from regmap, made static.
11681 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11683 (arm_cannot_store_register): Renamed from cannot_store_register,
11685 (the_low_target): New.
11686 * linux-i386-low.c (num_regs): Remove.
11687 (i386_num_regs): Define.
11688 (i386_regmap): Renamed from regmap, made static.
11689 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11691 (i386_cannot_store_register): Renamed from cannot_store_register,
11693 (the_low_target): New.
11694 * linux-ia64-low.c (num_regs): Remove.
11695 (ia64_num_regs): Define.
11696 (ia64_regmap): Renamed from regmap, made static.
11697 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11699 (ia64_cannot_store_register): Renamed from cannot_store_register,
11701 (the_low_target): New.
11702 * linux-m68k-low.c (num_regs): Remove.
11703 (m68k_num_regs): Define.
11704 (m68k_regmap): Renamed from regmap, made static.
11705 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11707 (m68k_cannot_store_register): Renamed from cannot_store_register,
11709 (the_low_target): New.
11710 * linux-mips-low.c (num_regs): Remove.
11711 (mips_num_regs): Define.
11712 (mips_regmap): Renamed from regmap, made static.
11713 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11715 (mips_cannot_store_register): Renamed from cannot_store_register,
11717 (the_low_target): New.
11718 * linux-ppc-low.c (num_regs): Remove.
11719 (ppc_num_regs): Define.
11720 (ppc_regmap): Renamed from regmap, made static.
11721 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11723 (ppc_cannot_store_register): Renamed from cannot_store_register,
11725 (the_low_target): New.
11726 * linux-s390-low.c (num_regs): Remove.
11727 (s390_num_regs): Define.
11728 (s390_regmap): Renamed from regmap, made static.
11729 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11731 (s390_cannot_store_register): Renamed from cannot_store_register,
11733 (the_low_target): New.
11734 * linux-sh-low.c (num_regs): Remove.
11735 (sh_num_regs): Define.
11736 (sh_regmap): Renamed from regmap, made static.
11737 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11739 (sh_cannot_store_register): Renamed from cannot_store_register,
11741 (the_low_target): New.
11742 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11743 (the_low_target): New.
11745 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11747 * Makefile.in: Add stamp-h target.
11748 * configure.in: Create stamp-h.
11749 * configure: Regenerated.
11751 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11753 * inferiors.c: New file.
11754 * target.c: New file.
11755 * target.h: New file.
11756 * Makefile.in: Add target.o and inferiors.o. Update
11758 * linux-low.c (inferior_pid): New static variable,
11759 moved from server.c.
11760 (linux_create_inferior): Renamed from create_inferior.
11761 Call add_inferior. Return 0 on success instead of a PID.
11762 (linux_attach): Renamed from myattach.
11763 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11764 (linux_thread_alive): Renamed from mythread_alive.
11765 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11767 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11768 (regsets_store_inferior_registers): Correct error message.
11769 Add missing ``return 0''.
11770 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11771 (linux_store_registers): Renamed from store_inferior_registers.
11772 (linux_read_memory): Renamed from read_inferior_memory.
11773 (linux_write_memory): Renamed from write_inferior_memory.
11774 (linux_target_ops): New structure.
11775 (initialize_low): Call set_target_ops ().
11776 * remote-utils.c (unhexify): New function.
11777 (hexify): New function.
11778 (input_interrupt): Send signals to ``signal_pid''.
11779 * server.c (inferior_pid): Remove.
11780 (start_inferior): Update create_inferior call.
11781 (attach_inferior): Call add_inferior.
11782 (handle_query): New function.
11783 (main): Call handle_query for `q' packets.
11784 * server.h: Include "target.h". Remove obsolete prototypes.
11785 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11787 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11789 * Makefile.in: Add WARN_CFLAGS. Update configury
11791 * configure.in: Check for <string.h>
11792 * configure: Regenerate.
11793 * config.in: Regenerate.
11794 * gdbreplay.c: Include needed system headers.
11795 (remote_open): Remove strchr prototype.
11796 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11797 * regcache.c (supply_register): Change buf argument to const void *.
11798 (supply_register_by_name): Likewise.
11799 (collect_register): Change buf argument to void *.
11800 (collect_register_by_name): Likewise.
11801 * regcache.h: Add missing prototypes.
11802 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11803 * server.c (handle_query): New function.
11804 (attached): New static variable, moved out of main.
11805 (main): Quiet longjmp clobber warnings.
11806 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11807 * utils.c (error): Remove NORETURN.