1 2015-08-25 Yao Qi <yao.qi@linaro.org>
3 * Makefile.in (aarch64-linux.o): New rule.
4 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7 (aarch64_init_debug_reg_state): Make it extern.
8 (aarch64_linux_prepare_to_resume): Remove.
10 2015-08-25 Yao Qi <yao.qi@linaro.org>
12 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
13 lwp_arch_private_info and ptid_of_lwp.
15 2015-08-25 Yao Qi <yao.qi@linaro.org>
17 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
18 Find proc_info by find_process_pid. All callers updated.
20 2015-08-25 Yao Qi <yao.qi@linaro.org>
22 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
24 (debug_reg_change_callback): Remove.
25 (aarch64_notify_debug_reg_change): Remove.
27 2015-08-25 Yao Qi <yao.qi@linaro.org>
29 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
30 Call current_lwp_ptid.
32 2015-08-25 Yao Qi <yao.qi@linaro.org>
34 * linux-aarch64-low.c (debug_reg_change_callback): Use
37 2015-08-25 Yao Qi <yao.qi@linaro.org>
39 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
41 2015-08-25 Yao Qi <yao.qi@linaro.org>
43 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
45 2015-08-25 Yao Qi <yao.qi@linaro.org>
47 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
50 2015-08-25 Yao Qi <yao.qi@linaro.org>
52 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
54 (debug_reg_change_callback): Remove argument entry and add argument
55 lwp. Remove local variable thread. Don't print thread id in the
56 debugging output. Don't check whether pid of thread equals to pid.
57 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
58 iterate_over_lwps instead find_inferior.
60 2015-08-24 Pedro Alves <palves@redhat.com>
62 * inferiors.c (get_first_process): New function.
63 * inferiors.h (get_first_process): New declaration.
64 * remote-utils.c (read_ptid): Default to the first process in the
65 list, instead of to the current thread's process.
67 2015-08-24 Pedro Alves <palves@redhat.com>
69 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
70 * event-loop.c: Likewise.
71 * remote-utils.c: Likewise.
72 * tracepoint.c: Likewise.
74 2015-08-24 Pedro Alves <palves@redhat.com>
76 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
79 2015-08-21 Pedro Alves <palves@redhat.com>
81 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
84 2015-08-21 Pedro Alves <palves@redhat.com>
86 * tdesc.c (default_description): Explicitly zero-initialize.
88 2015-08-21 Pedro Alves <palves@redhat.com>
91 * inferiors.c (remove_thread): Discard any pending stop reply for
93 * server.c (remove_all_on_match_pid): Rename to ...
94 (remove_all_on_match_ptid): ... this. Work with a filter ptid
96 (discard_queued_stop_replies): Change parameter to a ptid. Now
98 (handle_v_kill, kill_inferior_callback, captured_main)
99 (process_serial_event): Adjust.
100 * server.h (discard_queued_stop_replies): Declare.
102 2015-08-21 Pedro Alves <palves@redhat.com>
104 * linux-low.c (wait_for_sigstop): Always switch to no thread
105 selected if the previously current thread dies.
106 * lynx-low.c (lynx_request_interrupt): Use the first thread's
107 process instead of the current thread's.
108 * remote-utils.c (input_interrupt): Don't check if there's no
110 * server.c (gdb_read_memory, gdb_write_memory): If setting the
111 current thread to the general thread fails, error out.
112 (handle_qxfer_auxv, handle_qxfer_libraries)
113 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
114 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
115 (handle_query): Check if there's a thread selected instead of
116 checking whether there's any thread in the thread list.
117 (handle_qxfer_threads, handle_qxfer_btrace)
118 (handle_qxfer_btrace_conf): Don't error out early if there's no
119 thread in the thread list.
120 (handle_v_cont, myresume): Don't set the current thread to the
122 (process_serial_event) <Hg handling>: Also set thread_id if the
123 previous general thread is still alive.
124 (process_serial_event) <g/G handling>: If setting the current
125 thread to the general thread fails, error out.
126 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
127 thread's lwp instead of the current thread's.
128 * target.c (set_desired_thread): If the desired thread was not
129 found, leave the current thread pointing to NULL. Return an int
130 (boolean) indicating success.
131 * target.h (set_desired_thread): Change return type to int.
133 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
135 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
136 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
138 (ps_get_thread_area): New function.
140 2015-08-19 Gary Benson <gbenson@redhat.com>
142 * hostio.c (handle_pread): Do not attempt to read more data
143 than hostio_reply_with_data can fit in a packet.
145 2015-08-18 Joel Brobecker <brobecker@adacore.com>
147 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
149 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
151 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
153 2015-08-06 Pedro Alves <palves@redhat.com>
155 * tracepoint.c (expr_eval_result): Now an int.
157 2015-08-06 Pedro Alves <palves@redhat.com>
159 * gdbthread.h (struct regcache): Forward declare.
160 (struct thread_info) <regcache_data>: Now a struct regcache
162 * inferiors.c (inferior_regcache_data)
163 (set_inferior_regcache_data): Now work with struct regcache
165 * inferiors.h (struct regcache): Forward declare.
166 (inferior_regcache_data, set_inferior_regcache_data): Now work
167 with struct regcache pointers.
168 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
169 (free_register_cache_thread): Remove struct regcache pointer
172 2015-08-06 Pedro Alves <palves@redhat.com>
174 * server.c (captured_main): On error, print the exception message
175 to stderr, and if run_once is set, throw a quit.
177 2015-08-06 Pedro Alves <palves@redhat.com>
179 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
182 2015-08-06 Pedro Alves <palves@redhat.com>
184 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
185 reading beyond the passed in buffer length.
187 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
189 * tracepoint.c (symbol_list) <required>: Remove.
191 2015-08-06 Pedro Alves <palves@redhat.com>
193 * linux-low.c (handle_extended_wait): Set the fork child's suspend
194 count if stopping and suspending threads.
195 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
196 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
197 (linux_detach): Complete an ongoing step-over.
198 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
200 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
201 (linux_wait_1): If passing a signal to the inferior after
202 finishing a step-over, unsuspend and re-resume all lwps. If we
203 see a single-step event but the thread should be continuing, don't
204 pass the trap to gdb.
205 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
206 internal_error instead of gdb_assert.
207 (enqueue_pending_signal): New function.
208 (check_ptrace_stopped_lwp_gone): Add debug output.
209 (start_step_over): Use internal_error instead of gdb_assert.
210 (complete_ongoing_step_over): New function.
211 (linux_resume_one_thread): Don't resume a suspended thread.
212 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
215 2015-08-06 Pedro Alves <palves@redhat.com>
217 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
218 (linux_thread_alive): Use lwp_is_marked_dead.
219 (extended_event_reported): Delete.
220 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
221 instead of extended_event_reported.
222 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
224 (lwp_is_marked_dead): New function.
225 (lwp_running): Use lwp_is_marked_dead.
226 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
229 2015-08-06 Pedro Alves <palves@redhat.com>
231 * linux-low.c (linux_wait_1): Move fork event output out of the
232 !report_to_gdb check. Pass event_child->waitstatus to
233 target_waitstatus_to_string instead of ourstatus.
235 2015-08-04 Yao Qi <yao.qi@linaro.org>
237 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
238 if current_thread is 32 bit.
240 2015-08-04 Yao Qi <yao.qi@linaro.org>
242 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
243 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
244 * server.c (extended_protocol): Remove "static".
245 * server.h (extended_protocol): Declare it.
247 2015-08-04 Yao Qi <yao.qi@linaro.org>
249 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
250 both aarch64 and aarch32.
251 (aarch64_set_pc): Likewise.
253 2015-08-04 Yao Qi <yao.qi@linaro.org>
255 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
256 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
257 arm-with-neon.xml to srv_xmlfiles.
258 * linux-aarch64-low.c: Include linux-aarch32-low.h.
259 (is_64bit_tdesc): New function.
260 (aarch64_linux_read_description): New function.
261 (aarch64_arch_setup): Call aarch64_linux_read_description.
262 (regs_info): Rename to regs_info_aarch64.
263 (aarch64_regs_info): Return right regs_info.
264 (initialize_low_arch): Call initialize_low_arch_aarch32.
266 2015-08-04 Yao Qi <yao.qi@linaro.org>
268 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
269 * linux-aarch32-low.c: New file.
270 * linux-aarch32-low.h: New file.
271 * linux-arm-low.c (arm_fill_gregset): Move it to
273 (arm_store_gregset): Likewise.
274 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
275 (arm_store_vfpregset): Call arm_store_vfpregset_num.
276 (arm_arch_setup): Check if PTRACE_GETREGSET works.
277 (regs_info): Rename to regs_info_arm.
278 (arm_regs_info): Return regs_info_aarch32 if
279 have_ptrace_getregset is 1 and target description is
280 arm_with_neon or arm_with_vfpv3.
281 (initialize_low_arch): Don't call init_registers_arm_with_neon.
282 Call initialize_low_arch_aarch32 instead.
284 2015-08-04 Yao Qi <yao.qi@linaro.org>
286 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
287 * linux-low.c: ... here.
288 * linux-low.h (have_ptrace_getregset): Declare it.
290 2015-08-04 Pedro Alves <palves@redhat.com>
292 * thread-db.c (struct thread_db): Use new typedefs.
293 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
295 (disable_thread_event_reporting): Cast result of dlsym to
296 destination function pointer type.
297 (thread_db_mourn): Use td_ta_delete_ftype.
299 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
301 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
303 (CDX_BREAKPOINT): Define for R2.
304 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
305 (the_low_target): Add comments.
307 2015-07-30 Yao Qi <yao.qi@linaro.org>
309 * linux-arm-low.c (arm_hwcap): Remove it.
310 (arm_read_description): New local variable arm_hwcap. Don't
311 set arm_hwcap to zero.
313 2015-07-30 Yao Qi <yao.qi@linaro.org>
315 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
316 Use regcache->tdesc instead.
317 (arm_store_wmmxregset): Likewise.
318 (arm_fill_vfpregset): Likewise.
319 (arm_store_vfpregset): Likewise.
321 2015-07-30 Yao Qi <yao.qi@linaro.org>
323 * linux-arm-low.c: Include arch/arm.h.
324 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
325 (arm_store_gregset): Likewise.
327 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
329 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
330 ptrace's 4th parameter.
332 2015-07-27 Yao Qi <yao.qi@linaro.org>
334 * configure.srv (case aarch64*-*-linux*): Don't set
337 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
339 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
341 * linux-arm-low.c: Likewise.
342 * linux-cris-low.c: Likewise.
343 * linux-crisv32-low.c: Likewise.
344 * linux-low.c: Likewise.
345 * linux-m68k-low.c: Likewise.
346 * linux-mips-low.c: Likewise.
347 * linux-nios2-low.c: Likewise.
348 * linux-s390-low.c: Likewise.
349 * linux-sparc-low.c: Likewise.
350 * linux-tic6x-low.c: Likewise.
351 * linux-tile-low.c: Likewise.
352 * linux-x86-low.c: Likewise.
354 2015-07-24 Pedro Alves <palves@redhat.com>
356 * config.in: Regenerate.
357 * configure: Regenerate.
359 2015-07-24 Pedro Alves <palves@redhat.com>
361 * acinclude.m4: Include ../ptrace.m4.
362 * configure.ac: Call GDB_AC_PTRACE.
363 * config.in, configure: Regenerate.
365 2015-07-24 Yao Qi <yao.qi@linaro.org>
367 * linux-low.c (linux_create_inferior): Remove setting to
368 proc->priv->new_inferior.
369 (linux_attach): Likewise.
370 (linux_low_filter_event): Likewise.
371 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
373 2015-07-24 Yao Qi <yao.qi@linaro.org>
375 * linux-low.c (linux_arch_setup): New function.
376 (linux_low_filter_event): If proc->tdesc is NULL and
377 proc->attached is true, call the_low_target.arch_setup.
378 Otherwise, keep status pending, and return.
379 (linux_resume_one_lwp_throw): Don't call get_pc if
380 thread->while_stepping isn't NULL. Don't call
381 get_thread_regcache if proc->tdesc is NULL.
382 (need_step_over_p): Return 0 if proc->tdesc is NULL.
383 (linux_target_ops): Install arch_setup.
384 * server.c (start_inferior): Call the_target->arch_setup.
385 * target.h (struct target_ops) <arch_setup>: New field.
386 (target_arch_setup): New marco.
387 * lynx-low.c (lynx_target_ops): Update.
388 * nto-low.c (nto_target_ops): Update.
389 * spu-low.c (spu_target_ops): Update.
390 * win32-low.c (win32_target_ops): Update.
392 2015-07-24 Yao Qi <yao.qi@linaro.org>
394 * linux-low.c (linux_add_process): Don't set
395 proc->priv->new_inferior.
396 (linux_create_inferior): Set proc->priv->new_inferior to 1.
397 (linux_attach): Likewise.
399 2015-07-24 Yao Qi <yao.qi@linaro.org>
401 * server.c (start_inferior): Code refactor.
403 2015-07-24 Yao Qi <yao.qi@linaro.org>
405 * server.c (process_serial_event): Set general_thread.
407 2015-07-21 Yao Qi <yao.qi@linaro.org>
409 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
410 aarch64_linux_get_debug_reg_capacity.
412 2015-07-17 Yao Qi <yao.qi@linaro.org>
414 * Makefile.in (aarch64-linux-hw-point.o): New rule.
415 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
416 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
417 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
418 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
419 (AARCH64_HWP_ALIGNMENT): Likewise.
420 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
421 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
422 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
423 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
424 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
425 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
426 (struct aarch64_debug_reg_state): Likewise.
427 (struct arch_lwp_info): Likewise.
428 (aarch64_align_watchpoint): Likewise.
429 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
430 (aarch64_watchpoint_length): Likewise.
431 (aarch64_point_encode_ctrl_reg): Likewise
432 (aarch64_point_is_aligned): Likewise.
433 (aarch64_align_watchpoint): Likewise.
434 (aarch64_linux_set_debug_regs):
435 (aarch64_dr_state_insert_one_point): Likewise.
436 (aarch64_dr_state_remove_one_point): Likewise.
437 (aarch64_handle_breakpoint): Likewise.
438 (aarch64_handle_aligned_watchpoint): Likewise.
439 (aarch64_handle_unaligned_watchpoint): Likewise.
440 (aarch64_handle_watchpoint): Likewise.
442 2015-07-17 Yao Qi <yao.qi@linaro.org>
444 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
445 and don't aarch64_get_debug_reg_state. All callers update.
446 (aarch64_handle_aligned_watchpoint): Likewise.
447 (aarch64_handle_unaligned_watchpoint): Likewise.
448 (aarch64_handle_watchpoint): Likewise.
449 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
450 (aarch64_remove_point): Likewise.
452 2015-07-17 Yao Qi <yao.qi@linaro.org>
454 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
456 (aarch64_handle_unaligned_watchpoint): Likewise.
458 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
460 Revert the previous 3 commits:
461 Move gdb_regex* to common/
462 Move linux_find_memory_regions_full & co.
463 gdbserver build-id attribute generator
465 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
466 Jan Kratochvil <jan.kratochvil@redhat.com>
468 gdbserver build-id attribute generator.
469 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
470 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
471 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
473 (get_dynamic): Use find_pdhr to traverse program headers.
474 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
475 (compare_mapping_entry_range, struct find_memory_region_callback_data)
476 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
477 (get_hex_build_id): New.
478 (linux_qxfer_libraries_svr4): Add optional build-id attribute
479 to reply XML document.
481 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
482 Jan Kratochvil <jan.kratochvil@redhat.com>
484 * target.c: Include target/target-utils.h and fcntl.h.
485 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
486 (target_fileio_read_stralloc): New functions.
488 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
490 * Makefile.in (OBS): Add gdb_regex.o.
492 * config.in: Rebuilt.
493 * configure: Rebuilt.
495 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
496 Jan Kratochvil <jan.kratochvil@redhat.com>
498 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
499 * Makefile.in (OBS): Add target-utils.o.
500 (linux-maps.o, target-utils.o): New.
501 * configure.srv (srv_linux_obj): Add linux-maps.o.
503 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
505 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
507 (the_low_target): Install it.
509 2015-07-14 Pedro Alves <palves@redhat.com>
511 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
512 Instead, ignore ECHILD, and throw an error for other errnos.
514 2015-07-10 Pedro Alves <palves@redhat.com>
516 * event-loop.c (struct callback_event) <data>: Change type to
517 gdb_client_data instance instead of gdb_client_data pointer.
518 (append_callback_event): Adjust.
520 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
522 * linux-aarch64-low.c: Add comments for each linux_target_ops
523 method. Remove comments already covered in target_ops and
524 linux_target_ops definitions.
525 (the_low_target): Add comments for each unimplemented method.
527 2015-07-09 Yao Qi <yao.qi@linaro.org>
529 * linux-aarch64-low.c (aarch64_regmap): Remove.
530 (aarch64_usrregs_info): Remove.
531 (regs_info): Set field usrregs to NULL.
533 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
535 * linux-low.c: Include "rsp-low.h"
536 (linux_low_encode_pt_config, linux_low_encode_raw): New.
537 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
538 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
539 (handle_btrace_enable_pt): New.
540 (handle_btrace_general_set): Support "pt".
541 (handle_btrace_conf_general_set): Support "pt:size".
543 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
545 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
548 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
550 * linux-aarch64-low.c: Remove comment about endianness.
551 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
552 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
555 2015-06-24 Gary Benson <gbenson@redhat.com>
557 * linux-i386-ipa.c (stdint.h): Do not include.
558 * lynx-i386-low.c (stdint.h): Likewise.
559 * lynx-ppc-low.c (stdint.h): Likewise.
560 * mem-break.c (stdint.h): Likewise.
561 * thread-db.c (stdint.h): Likewise.
562 * tracepoint.c (stdint.h): Likewise.
563 * win32-low.c (stdint.h): Likewise.
565 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
567 * server.c (write_qxfer_response): Update call to
568 remote_escape_output.
570 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
571 Jan Kratochvil <jan.kratochvil@redhat.com>
573 Merge multiple hex conversions.
574 * gdbreplay.c (tohex): Rename to 'fromhex'.
575 (logchar): Use fromhex.
577 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
579 * server.c (handle_qxfer_libraries): Set `version' attribute for
582 2015-06-10 Gary Benson <gbenson@redhat.com>
584 * target.h (struct target_ops) <multifs_open>: New field.
585 <multifs_unlink>: Likewise.
586 <multifs_readlink>: Likewise.
587 * linux-low.c (nat/linux-namespaces.h): New include.
588 (linux_target_ops): Initialize the_target->multifs_open,
589 the_target->multifs_unlink and the_target->multifs_readlink.
590 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
591 * hostio.c (hostio_fs_pid): New static variable.
592 (hostio_handle_new_gdb_connection): New function.
593 (handle_setfs): Likewise.
594 (handle_open): Use the_target->multifs_open as appropriate.
595 (handle_unlink): Use the_target->multifs_unlink as appropriate.
596 (handle_readlink): Use the_target->multifs_readlink as
598 (handle_vFile): Handle vFile:setfs packets.
599 * server.c (handle_query): Call hostio_handle_new_gdb_connection
600 after target_handle_new_gdb_connection.
602 2015-06-10 Gary Benson <gbenson@redhat.com>
604 * configure.ac (AC_CHECK_FUNCS): Add setns.
605 * config.in: Regenerate.
606 * configure: Likewise.
607 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
608 (linux-namespaces.o): New rule.
609 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
611 2015-06-09 Gary Benson <gbenson@redhat.com>
613 * hostio.c (handle_open): Process mode argument with
616 2015-06-01 Yao Qi <yao.qi@linaro.org>
618 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
619 * linux-x86-low.c: Likewise.
621 2015-05-28 Don Breazeal <donb@codesourcery.com>
623 * linux-low.c (handle_extended_wait): Initialize
624 thread_info.last_resume_kind for new fork children.
626 2015-05-15 Pedro Alves <palves@redhat.com>
628 * target.h (target_handle_new_gdb_connection): Rewrite using if
631 2015-05-14 Joel Brobecker <brobecker@adacore.com>
633 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
634 * configure, config.in: Regenerate.
635 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
638 2015-05-12 Don Breazeal <donb@codesourcery.com>
640 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
641 PTRACE_EVENT_VFORK_DONE.
642 (linux_low_ptrace_options, extended_event_reported): Add vfork
644 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
645 and "vforkdone" for RSP 'T' Stop Reply Packet.
646 * server.h (report_vfork_events): Declare
649 2015-05-12 Don Breazeal <donb@codesourcery.com>
651 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
652 (the_low_target) <new_fork>: Initialize new member.
653 * linux-arm-low.c (arm_new_fork): New function.
654 (the_low_target) <new_fork>: Initialize new member.
655 * linux-low.c (handle_extended_wait): Call new target function
657 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
658 * linux-mips-low.c (mips_add_watchpoint): New function
659 extracted from mips_insert_point.
660 (the_low_target) <new_fork>: Initialize new member.
661 (mips_linux_new_fork): New function.
662 (mips_insert_point): Call mips_add_watchpoint.
663 * linux-x86-low.c (x86_linux_new_fork): New function.
664 (the_low_target) <new_fork>: Initialize new member.
666 2015-05-12 Don Breazeal <donb@codesourcery.com>
668 * linux-low.c (handle_extended_wait): Implement return value,
669 rename argument 'event_child' to 'event_lwp', handle
670 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
671 (linux_low_ptrace_options): New function.
672 (linux_low_filter_event): Call linux_low_ptrace_options,
673 use different argument fo linux_enable_event_reporting,
674 use return value from handle_extended_wait.
675 (extended_event_reported): New function.
676 (linux_wait_1): Call extended_event_reported and set
677 status to report fork events.
678 (linux_write_memory): Add pid to debug message.
679 (reset_lwp_ptrace_options_callback): New function.
680 (linux_handle_new_gdb_connection): New function.
681 (linux_target_ops): Initialize new structure member.
682 * linux-low.h (struct lwp_info) <waitstatus>: New member.
683 * lynx-low.c: Initialize new structure member.
684 * remote-utils.c (prepare_resume_reply): Implement stop reason
685 "fork" for "T" stop message.
686 * server.c (handle_query): Call handle_new_gdb_connection.
687 * server.h (report_fork_events): Declare global flag.
688 * target.h (struct target_ops) <handle_new_gdb_connection>:
690 (target_handle_new_gdb_connection): New macro.
691 * win32-low.c: Initialize new structure member.
693 2015-05-12 Don Breazeal <donb@codesourcery.com>
695 * mem-break.c (APPEND_TO_LIST): Define macro.
696 (clone_agent_expr): New function.
697 (clone_one_breakpoint): New function.
698 (clone_all_breakpoints): New function.
699 * mem-break.h: Declare new functions.
701 2015-05-12 Don Breazeal <donb@codesourcery.com>
703 * linux-low.c (linux_supports_fork_events): New function.
704 (linux_supports_vfork_events): New function.
705 (linux_target_ops): Initialize new structure members.
706 (initialize_low): Call linux_check_ptrace_features.
707 * lynx-low.c (lynx_target_ops): Initialize new structure
709 * server.c (report_fork_events, report_vfork_events):
711 (handle_query): Add new features to qSupported packet and
713 (captured_main): Initialize new global variables.
714 * target.h (struct target_ops) <supports_fork_events>:
716 <supports_vfork_events>: New member.
717 (target_supports_fork_events): New macro.
718 (target_supports_vfork_events): New macro.
719 * win32-low.c (win32_target_ops): Initialize new structure
722 2015-05-12 Gary Benson <gbenson@redhat.com>
724 * server.c (handle_qxfer_exec_file): Use current process
727 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
729 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
730 Remove HAVE_PTRACE_GETREGS conditionals.
731 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
732 instead of PTRACE_GETREGS and PTRACE_SETREGS.
734 2015-05-08 Yao Qi <yao.qi@linaro.org>
736 * linux-low.c (linux_supports_conditional_breakpoints): New
738 (linux_target_ops): Install new target method.
739 * lynx-low.c (lynx_target_ops): Install NULL hook for
740 supports_conditional_breakpoints.
741 * nto-low.c (nto_target_ops): Likewise.
742 * spu-low.c (spu_target_ops): Likewise.
743 * win32-low.c (win32_target_ops): Likewise.
744 * server.c (handle_query): Check
745 target_supports_conditional_breakpoints.
746 * target.h (struct target_ops) <supports_conditional_breakpoints>:
748 (target_supports_conditional_breakpoints): New macro.
750 2015-05-06 Pedro Alves <palves@redhat.com>
753 * server.c (start_inferior): If the process exits, mourn it.
755 2015-04-21 Gary Benson <gbenson@redhat.com>
757 * hostio.c (fileio_open_flags_to_host): Factored out to
758 fileio_to_host_openflags in common/fileio.c. Single use
761 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
763 * linux-xtensa-low.c (xtensa_fill_gregset)
764 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
767 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
769 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
770 (regs_info): Replace usrregs pointer with NULL.
772 2015-04-17 Gary Benson <gbenson@redhat.com>
774 * target.h (struct target_ops) <pid_to_exec_file>: New field.
775 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
776 * server.c (handle_qxfer_exec_file): New function.
777 (qxfer_packets): Add exec-file entry.
778 (handle_query): Report qXfer:exec-file:read as supported packet.
780 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
782 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
784 2015-04-09 Gary Benson <gbenson@redhat.com>
786 * hostio-errno.c (errno_to_fileio_error): Remove function.
787 Update caller to use remote_fileio_to_fio_error.
789 2015-04-09 Yao Qi <yao.qi@linaro.org>
791 * linux-low.c (linux_insert_point): Call
792 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
793 (linux_remove_point): Call remove_memory_breakpoint if type is
795 * linux-x86-low.c (x86_insert_point): Don't call
796 insert_memory_breakpoint.
797 (x86_remove_point): Don't call remove_memory_breakpoint.
799 2015-04-01 Pedro Alves <palves@redhat.com>
800 Cleber Rosa <crosa@redhat.com>
802 * server.c (gdbserver_usage): Reorganize and extend the usage
805 2015-03-24 Pedro Alves <palves@redhat.com>
807 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
808 output. Also dump TRAP_TRACE.
809 (linux_low_filter_event): In debug output, distinguish a
810 resume_stop SIGSTOP from a delayed SIGSTOP.
812 2015-03-24 Gary Benson <gbenson@redhat.com>
814 * linux-x86-low.c (x86_linux_new_thread): Moved to
816 (x86_linux_prepare_to_resume): Likewise.
818 2015-03-24 Gary Benson <gbenson@redhat.com>
820 * Makefile.in (x86-linux-dregs.o): New rule.
821 * configure.srv: Add x86-linux-dregs.o to relevant targets.
822 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
823 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
824 (x86_linux_dr_get): Likewise.
825 (x86_linux_dr_set): Likewise.
826 (update_debug_registers_callback): Likewise.
827 (x86_linux_dr_set_addr): Likewise.
828 (x86_linux_dr_get_addr): Likewise.
829 (x86_linux_dr_set_control): Likewise.
830 (x86_linux_dr_get_control): Likewise.
831 (x86_linux_dr_get_status): Likewise.
832 (x86_linux_update_debug_registers): Likewise.
834 2015-03-24 Gary Benson <gbenson@redhat.com>
836 * linux-x86-low.c (x86_linux_update_debug_registers):
837 New function, factored out from...
838 (x86_linux_prepare_to_resume): ...this.
840 2015-03-24 Gary Benson <gbenson@redhat.com>
842 * linux-x86-low.c (x86_linux_dr_get): Update comments.
843 (x86_linux_dr_set): Likewise.
844 (update_debug_registers_callback): Likewise.
845 (x86_linux_dr_set_addr): Likewise.
846 (x86_linux_dr_get_addr): Likewise.
847 (x86_linux_dr_set_control): Likewise.
848 (x86_linux_dr_get_control): Likewise.
849 (x86_linux_dr_get_status): Likewise.
850 (x86_linux_prepare_to_resume): Likewise.
852 2015-03-24 Gary Benson <gbenson@redhat.com>
854 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
855 Use perror_with_name. Pass string through gettext.
856 (x86_linux_dr_set): Likewise.
858 2015-03-24 Gary Benson <gbenson@redhat.com>
860 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
861 (x86_linux_dr_set_addr): ...this.
862 (x86_dr_low_get_addr): Rename to...
863 (x86_linux_dr_get_addr): ...this.
864 (x86_dr_low_set_control): Rename to...
865 (x86_linux_dr_set_control): ...this.
866 (x86_dr_low_get_control): Rename to...
867 (x86_linux_dr_get_control): ...this.
868 (x86_dr_low_get_status): Rename to...
869 (x86_linux_dr_get_status): ...this.
870 (x86_dr_low): Update with new function names.
872 2015-03-24 Gary Benson <gbenson@redhat.com>
874 * Makefile.in (x86-linux.o): New rule.
875 * configure.srv: Add x86-linux.o to relevant targets.
876 * linux-low.c (lwp_set_arch_private_info): New function.
877 (lwp_arch_private_info): Likewise.
878 * linux-x86-low.c: Include nat/x86-linux.h.
879 (arch_lwp_info): Removed structure.
880 (update_debug_registers_callback):
881 Use lwp_set_debug_registers_changed.
882 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
883 and lwp_set_debug_registers_changed.
884 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
886 2015-03-24 Gary Benson <gbenson@redhat.com>
888 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
889 * linux-arm-low.c (arm_new_thread): Likewise.
890 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
891 * linux-mips-low.c (mips_linux_new_thread): Likewise.
892 * linux-x86-low.c (x86_linux_new_thread): Likewise.
893 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
895 2015-03-24 Gary Benson <gbenson@redhat.com>
897 * linux-low.c (ptid_of_lwp): New function.
898 (lwp_is_stopped): Likewise.
899 (lwp_stop_reason): Likewise.
900 * linux-x86-low.c (update_debug_registers_callback):
902 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
905 2015-03-24 Gary Benson <gbenson@redhat.com>
907 * linux-low.h (linux_stop_lwp): Remove declaration.
909 2015-03-24 Gary Benson <gbenson@redhat.com>
911 * linux-low.h: Include nat/linux-nat.h.
912 * linux-low.c (iterate_over_lwps_args): New structure.
913 (iterate_over_lwps_filter): New function.
914 (iterate_over_lwps): Likewise.
915 * linux-x86-low.c (update_debug_registers_callback):
916 Update signature to what iterate_over_lwps expects.
917 Remove PID check that iterate_over_lwps now performs.
918 (x86_dr_low_set_addr): Use iterate_over_lwps.
919 (x86_dr_low_set_control): Likewise.
921 2015-03-24 Gary Benson <gbenson@redhat.com>
923 * linux-x86-low.c (x86_debug_reg_state): New function.
924 (x86_linux_prepare_to_resume): Use the above.
926 2015-03-24 Gary Benson <gbenson@redhat.com>
928 * linux-low.c (current_lwp_ptid): New function.
929 * linux-x86-low.c: Include nat/linux-nat.h.
930 (x86_dr_low_get_addr): Use current_lwp_ptid.
931 (x86_dr_low_get_control): Likewise.
932 (x86_dr_low_get_status): Likewise.
934 2015-03-20 Pedro Alves <palves@redhat.com>
936 * tracepoint.c (cmd_qtstatus): Make "str" const.
938 2015-03-20 Pedro Alves <palves@redhat.com>
940 * server.c (handle_general_set): Make "req_str" const.
942 2015-03-19 Pedro Alves <palves@redhat.com>
944 * linux-low.c (linux_resume_one_lwp): Rename to ...
945 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
946 instead call perror_with_name.
947 (check_ptrace_stopped_lwp_gone): New function.
948 (linux_resume_one_lwp): Reimplement as wrapper around
949 linux_resume_one_lwp_throw that swallows errors if the LWP is
952 2015-03-19 Pedro Alves <palves@redhat.com>
954 * linux-low.c (count_events_callback, select_event_lwp_callback):
955 No longer check whether the thread has resume_stop as last resume
958 2015-03-19 Pedro Alves <palves@redhat.com>
960 * linux-low.c (count_events_callback, select_event_lwp_callback):
961 Use the lwp's status_pending_p field, not the thread's.
963 2015-03-19 Pedro Alves <palves@redhat.com>
965 * linux-low.c (select_event_lwp_callback): Update comments to
966 no longer mention SIGTRAP.
968 2015-03-18 Gary Benson <gbenson@redhat.com>
970 * server.c (handle_query): Do not report vFile:fstat as supported.
972 2015-03-11 Gary Benson <gbenson@redhat.com>
974 * hostio.c (sys/types.h): New include.
975 (sys/stat.h): Likewise.
976 (common-remote-fileio.h): Likewise.
977 (handle_fstat): New function.
978 (handle_vFile): Handle vFile:fstat packets.
980 2015-03-11 Gary Benson <gbenson@redhat.com>
982 * configure.ac (AC_CHECK_MEMBERS): Add checks for
983 struct stat.st_blocks and struct stat.st_blksize.
984 * configure: Regenerate.
985 * config.in: Likewise.
986 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
987 (OBS): Add common-remote-fileio.o.
988 (common-remote-fileio.o): New rule.
990 2015-03-09 Pedro Alves <palves@redhat.com>
992 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
993 'struct sockaddr' pointer in 'accept' call.
995 2015-03-09 Pedro Alves <palves@redhat.com>
998 2015-03-07 Pedro Alves <palves@redhat.com>
999 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1000 or <winsock2.h> here. Instead include "gdb_socket.h".
1001 (remote_open): Use union gdb_sockaddr_u.
1002 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1003 or <winsock2.h> here. Instead include "gdb_socket.h".
1004 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1005 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1007 (init_named_socket, gdb_agent_helper_thread): Use union
1010 2015-03-07 Pedro Alves <palves@redhat.com>
1012 * configure.ac (build_warnings): Move
1013 -Wdeclaration-after-statement to the C-specific set.
1014 * configure: Regenerate.
1016 2015-03-07 Pedro Alves <palves@redhat.com>
1018 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1019 or <winsock2.h> here. Instead include "gdb_socket.h".
1020 (remote_open): Use union gdb_sockaddr_u.
1021 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1022 or <winsock2.h> here. Instead include "gdb_socket.h".
1023 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1024 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1026 (init_named_socket, gdb_agent_helper_thread): Use union
1029 2015-03-07 Pedro Alves <palves@redhat.com>
1031 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1034 2015-03-06 Yao Qi <yao.qi@linaro.org>
1036 * linux-aarch64-low.c (aarch64_insert_point): Use
1037 show_debug_regs as a boolean.
1038 (aarch64_remove_point): Likewise.
1040 2015-03-05 Pedro Alves <palves@redhat.com>
1042 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1043 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1044 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1045 * nto-low.c (nto_target_ops): Likewise.
1046 * spu-low.c (spu_target_ops): Likewise.
1047 * win32-low.c (win32_target_ops): Likewise.
1049 2015-03-04 Pedro Alves <palves@redhat.com>
1051 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1052 Decide whether a breakpoint triggered based on the SIGTRAP's
1054 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1055 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1056 (linux_low_filter_event): Check for breakpoints before checking
1058 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1060 (linux_stopped_by_sw_breakpoint)
1061 (linux_supports_stopped_by_sw_breakpoint)
1062 (linux_stopped_by_hw_breakpoint)
1063 (linux_supports_stopped_by_hw_breakpoint): New functions.
1064 (linux_target_ops): Install new target methods.
1066 2015-03-04 Pedro Alves <palves@redhat.com>
1068 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1069 * server.c (swbreak_feature, hwbreak_feature): New globals.
1070 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1071 (captured_main): Clear swbreak_feature and hwbreak_feature.
1072 * server.h (swbreak_feature, hwbreak_feature): Declare.
1073 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1074 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1075 supports_stopped_by_hw_breakpoint>: New fields.
1076 (target_supports_stopped_by_sw_breakpoint)
1077 (target_stopped_by_sw_breakpoint)
1078 (target_supports_stopped_by_hw_breakpoint)
1079 (target_stopped_by_hw_breakpoint): Declare.
1081 2015-03-04 Pedro Alves <palves@redhat.com>
1083 enum lwp_stop_reason -> enum target_stop_reason
1084 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1085 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1086 (linux_wait_1, stuck_in_jump_pad_callback)
1087 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1088 (linux_stopped_by_watchpoint):
1089 * linux-low.h (enum lwp_stop_reason): Delete.
1090 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1091 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1093 2015-03-04 Yao Qi <yao.qi@linaro.org>
1095 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1097 2015-03-03 Gary Benson <gbenson@redhat.com>
1099 * hostio.c (handle_vFile): Fix prefix lengths.
1101 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1103 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1106 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1108 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1109 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1110 (clean): Add "rm -f" for above C files.
1111 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1112 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1113 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1114 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1115 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1116 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1117 (init_registers_s390x_vx_linux64)
1118 (init_registers_s390x_tevx_linux64)
1119 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1120 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1122 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1123 (s390_store_vxrs_high): New functions.
1124 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1126 (s390_arch_setup): Add logic for selecting one of the new target
1127 descriptions. Activate the new vector regsets if applicable.
1128 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1129 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1130 and init_registers_s390x_tevx_linux64.
1132 2015-03-01 Pedro Alves <palves@redhat.com>
1134 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1137 2015-02-27 Pedro Alves <palves@redhat.com>
1139 * linux-x86-low.c (u_debugreg_offset): New function.
1140 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1142 2015-02-27 Pedro Alves <palves@redhat.com>
1144 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1145 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1146 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1147 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1148 (ps_lsetfpregs, ps_getpid)
1149 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1150 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1151 (ps_lsetxregs, ps_plog): Declare.
1153 2015-02-27 Pedro Alves <palves@redhat.com>
1155 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1156 IP_AGENT_EXPORT_FUNC.
1157 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1158 IP_AGENT_EXPORT_FUNC.
1159 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1160 (IP_AGENT_EXPORT): Delete.
1161 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1162 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1163 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1164 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1165 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1166 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1167 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1168 (traceframe_read_count, traceframe_write_count)
1169 (traceframes_created, trace_state_variables, get_raw_reg)
1170 (get_trace_state_variable_value, set_trace_state_variable_value)
1171 (ust_loaded, helper_thread_id, cmd_buf): Use
1172 IPA_SYM_EXPORTED_NAME.
1173 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1174 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1175 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1176 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1177 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1178 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1179 EXTERN_C_PUSH/EXTERN_C_POP.
1180 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1181 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1182 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1183 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1184 (traceframe_write_count, traceframe_read_count)
1185 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1186 (about_to_request_buffer_space, get_trace_state_variable_value)
1187 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1188 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1189 EXTERN_C_PUSH/EXTERN_C_POP.
1190 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1191 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1192 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1193 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1194 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1195 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1196 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1197 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1199 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1200 (IP_AGENT_EXPORT_VAR_DECL): Define.
1202 (gdb_agent_get_raw_reg): Declare.
1204 2015-02-27 Tom Tromey <tromey@redhat.com>
1205 Pedro Alves <palves@redhat.com>
1207 Rename symbols whose names are reserved C++ keywords throughout.
1209 2015-02-27 Pedro Alves <palves@redhat.com>
1211 * Makefile.in (COMPILER): New, get it from autoconf.
1212 (CXX): Get from autoconf instead.
1213 (COMPILE.pre): Use COMPILER.
1214 (CC-LD): Rename to ...
1215 (CC_LD): ... this. Use COMPILER.
1216 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1217 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1218 * acinclude.m4: Include build-with-cxx.m4.
1219 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1220 Disable -Werror by default if building in C++ mode.
1221 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1222 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1223 the C++ compiler. Save/restore CXXFLAGS too.
1224 * configure: Regenerate.
1226 2015-02-27 Pedro Alves <palves@redhat.com>
1228 * acinclude.m4: Include libiberty.m4.
1229 * configure.ac: Call libiberty_INIT.
1230 * config.in, configure: Regenerate.
1232 2015-02-26 Pedro Alves <palves@redhat.com>
1234 * linux-low.c (linux_wait_1): When incrementing the PC past a
1235 program breakpoint always use the_low_target.breakpoint_len as
1236 increment, rather than the maximum between that and
1237 the_low_target.decr_pc_after_break.
1239 2015-02-23 Pedro Alves <palves@redhat.com>
1241 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1242 thread was doing a step-over; always adjust the PC if
1243 we stepped over a permanent breakpoint.
1244 (linux_wait_1): If we stepped over breakpoint that was on top of a
1245 permanent breakpoint, manually advance the PC past it.
1247 2015-02-23 Pedro Alves <palves@redhat.com>
1249 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1251 (x86_fill_gregset, x86_store_gregset): Use it when handling
1254 2015-02-20 Pedro Alves <palves@redhat.com>
1256 * thread-db.c: Include "nat/linux-procfs.h".
1257 (thread_db_init): Skip listing new threads if the kernel supports
1258 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1260 2015-02-20 Pedro Alves <palves@redhat.com>
1262 * linux-low.c (status_pending_p_callback): Use ptid_match.
1264 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1266 PR breakpoints/16812
1267 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1268 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1269 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1271 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1273 PR breakpoints/15956
1274 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1276 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1278 * linux-low.c (linux_low_btrace_conf): Print size.
1279 * server.c (handle_btrace_conf_general_set): New.
1280 (hanle_general_set): Call handle_btrace_conf_general_set.
1281 (handle_query): Report Qbtrace-conf:bts:size as supported.
1283 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1285 * linux-low.c (linux_low_enable_btrace): Update parameters.
1286 (linux_low_btrace_conf): New.
1287 (linux_target_ops)<to_btrace_conf>: Initialize.
1288 * server.c (current_btrace_conf): New.
1289 (handle_btrace_enable): Rename to ...
1290 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
1291 to target_enable_btrace. Update comment. Update users.
1292 (handle_qxfer_btrace_conf): New.
1293 (qxfer_packets): Add btrace-conf entry.
1294 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1295 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1296 (target_ops)<read_btrace_conf>: New.
1297 (target_enable_btrace): Update parameters.
1298 (target_read_btrace_conf): New.
1300 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1302 * server.c (handle_btrace_general_set): Remove call to
1303 target_supports_btrace.
1304 (supported_btrace_packets): New.
1305 (handle_query): Call supported_btrace_packets.
1306 * target.h: include btrace-common.h.
1307 (btrace_target_info): Removed.
1308 (supports_btrace, target_supports_btrace): Update parameters.
1310 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1312 * Makefile.in (SFILES): Add common/btrace-common.c.
1313 (OBS): Add common/btrace-common.o.
1314 (btrace-common.o): Add build rules.
1315 * linux-low: Include btrace-common.h.
1316 (linux_low_read_btrace): Use struct btrace_data. Call
1317 btrace_data_init and btrace_data_fini.
1319 2015-02-06 Pedro Alves <palves@redhat.com>
1321 * thread-db.c (find_new_threads_callback): Add debug output.
1323 2015-02-04 Pedro Alves <palves@redhat.com>
1325 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1326 (resume_stopped_resumed_lwps): New function.
1327 (linux_wait_for_event_filtered): Use it.
1329 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1331 * Makefile.in (SFILES): Add linux-personality.c.
1332 (linux-personality.o): New rule.
1333 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1334 list of objects to be built.
1335 * linux-low.c: Include nat/linux-personality.h.
1336 (linux_create_inferior): Remove code to disable address space
1337 randomization (moved to ../nat/linux-personality.c). Create
1338 cleanup to disable address space randomization.
1340 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1342 * Makefile.in (posix-strerror.o): New rule.
1343 (mingw-strerror.o): Likewise.
1344 * configure: Regenerated.
1345 * configure.ac: Source file ../common/common.host. Initialize new
1346 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1348 2015-01-14 Yao Qi <yao@codesourcery.com>
1350 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1351 (ppc-linux.o): New rule.
1352 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1353 * configure.ac: AC_CHECK_FUNCS(getauxval).
1354 * config.in: Re-generated.
1355 * configure: Re-generated.
1356 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1357 ppc64_64bit_inferior_p
1359 2015-01-14 Yao Qi <yao@codesourcery.com>
1361 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1362 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1363 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1364 (PT_ORIG_R3, PT_TRAP): Likewise.
1365 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1366 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1367 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1369 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1371 * i387-fp.c (i387_cache_to_xsave): In look over
1372 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1373 zmmh_low_space field by use of zmmh_high_space.
1375 2015-01-09 Pedro Alves <palves@redhat.com>
1377 * linux-low.c (step_over_bkpt): Move higher up in the file.
1378 (handle_extended_wait): Don't store the stop_pc here.
1379 (get_stop_pc): Adjust comments and rename to ...
1380 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1381 stopped for a software breakpoint or hardware breakpoint.
1382 (thread_still_has_status_pending_p): New function.
1383 (status_pending_p_callback): Use
1384 thread_still_has_status_pending_p. If the event is no longer
1385 interesting, resume the LWP.
1386 (handle_tracepoints): Add assert.
1387 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1388 (wstatus_maybe_breakpoint): New function.
1389 (cancel_breakpoint): Delete function.
1390 (check_stopped_by_watchpoint): New function, factored out from
1391 linux_low_filter_event.
1392 (lp_status_maybe_breakpoint): Delete function.
1393 (linux_low_filter_event): Remove filter_ptid argument.
1394 Leave thread group exits pending here. Store the LWP's stop PC.
1395 Always leave events pending.
1396 (linux_wait_for_event_filtered): Pull all events out of the
1397 kernel, and leave them all pending.
1398 (count_events_callback, select_event_lwp_callback): Consider all
1400 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1401 (select_event_lwp): Only give preference to the stepping LWP in
1402 all-stop mode. Adjust comments.
1403 (ignore_event): New function.
1404 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1405 references to cancel_breakpoints. Adjust to renames. Also give
1406 equal priority to all LWPs that have had events in non-stop mode.
1407 If reporting a software breakpoint event, unadjust the LWP's PC.
1408 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1409 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1411 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1412 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1413 (linux_stopped_by_watchpoint): Adjust.
1414 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1415 * linux-low.h (enum lwp_stop_reason): New.
1416 (struct lwp_info) <stop_pc>: Adjust comment.
1417 <stopped_by_watchpoint>: Delete field.
1418 <stop_reason>: New field.
1419 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1420 * mem-break.c (software_breakpoint_inserted_here)
1421 (hardware_breakpoint_inserted_here): New function.
1422 * mem-break.h (software_breakpoint_inserted_here)
1423 (hardware_breakpoint_inserted_here): Declare.
1424 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1425 (cancel_breakpoints): Delete.
1426 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1427 (upload_fast_traceframes): Remove references to
1430 2015-01-09 Pedro Alves <palves@redhat.com>
1432 * thread-db.c (find_new_threads_callback): Ignore thread if the
1433 kernel thread ID is -1.
1435 2015-01-09 Pedro Alves <palves@redhat.com>
1437 * linux-low.c (linux_attach_fail_reason_string): Move to
1438 nat/linux-ptrace.c, and rename.
1439 (linux_attach_lwp): Update comment.
1440 (attach_proc_task_lwp_callback): New function.
1441 (linux_attach): Adjust to rename and use
1442 linux_proc_attach_tgid_threads.
1443 (linux_attach_fail_reason_string): Delete declaration.
1445 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1447 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1448 * server.c (gdbserver_version): Likewise.
1450 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1452 * remote-utils.c: Include ctype.h.
1453 (input_interrupt): Explicitly handle the case when the char
1454 received is the NUL byte. Improve the printing of non-ASCII
1457 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1459 * linux-low.c (linux_low_filter_event): Update call to
1460 linux_enable_event_reporting following the addition of
1461 a new parameter to that function.
1463 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1466 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1467 (AARCH64_FPCR_REGNO): Likewise.
1468 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1469 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1470 (aarch64_store_fpregset): Likewise.
1472 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1474 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1475 Remove FIXME comment about assumption about N.
1477 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1479 * configure.ac: If large-file support is disabled in GDBserver,
1480 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1481 * configure: Regenerate.
1483 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1485 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1486 warning upon ENODATA from ptrace.
1487 * linux-s390-low.c (s390_store_tdb): New.
1488 (s390_regsets): Add regset for NT_S390_TDB.
1490 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1492 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1493 without a fill_function.
1494 * linux-s390-low.c (s390_fill_last_break): Remove.
1495 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1496 (s390_arch_setup): Use regset's size instead of fill_function for
1499 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1501 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1502 the regset's store function when ptrace returned an error.
1503 * regcache.c (get_thread_regcache): Invalidate register cache
1504 before fetching inferior's registers.
1506 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1508 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1509 while-loop as for-loop.
1510 (regsets_store_inferior_registers): Likewise.
1512 2014-11-28 Yao Qi <yao@codesourcery.com>
1514 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1515 * config.in, configure: Re-generate.
1516 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1519 2014-11-21 Yao Qi <yao@codesourcery.com>
1521 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1522 (AC_CHECK_HEADERS): Remove malloc.h.
1523 * configure: Re-generated.
1524 * config.in: Re-generated.
1525 * server.h: Don't include alloca.h and malloc.h.
1526 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1527 Don't include malloc.h.
1529 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1531 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1532 corresponding ERRNO check in same block.
1534 2014-11-12 Pedro Alves <palves@redhat.com>
1536 * server.c (cont_thread): Update comment.
1537 (start_inferior, attach_inferior): No longer clear cont_thread.
1538 (handle_v_cont): No longer set cont_thread.
1539 (captured_main): Clear cont_thread each time a GDB connects.
1541 2014-11-12 Pedro Alves <palves@redhat.com>
1543 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1544 thread, and don't resume all threads if the Hc thread has exited.
1546 2014-11-12 Pedro Alves <palves@redhat.com>
1548 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1549 the process group instead of to a specific LWP.
1551 2014-10-15 Pedro Alves <palves@redhat.com>
1554 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1556 (arm_set_thread_context): Delete.
1557 (the_low_target): Adjust.
1558 * win32-i386-low.c (debug_registers_changed)
1559 (debug_registers_used): Delete.
1560 (update_debug_registers_callback): New function.
1561 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1562 needing to update their debug registers.
1563 (win32_get_current_dr): New function.
1564 (x86_dr_low_get_addr, x86_dr_low_get_control)
1565 (x86_dr_low_get_status): Fetch the debug register from the thread
1567 (i386_initial_stuff): Adjust.
1568 (i386_get_thread_context): Remove current_event parameter. Don't
1569 clear debug_registers_changed nor copy DR values to
1571 (i386_set_thread_context): Delete.
1572 (i386_prepare_to_resume): New function.
1573 (i386_thread_added): Mark the thread as needing to update irs
1575 (the_low_target): Remove i386_set_thread_context and install
1576 i386_prepare_to_resume.
1577 * win32-low.c (win32_get_thread_context): Adjust.
1578 (win32_set_thread_context): Use SetThreadContext
1580 (win32_prepare_to_resume): New function.
1581 (win32_require_context): New function, factored out from ...
1582 (thread_rec): ... this.
1583 (continue_one_thread): Call win32_prepare_to_resume on each thread
1584 we're about to continue.
1585 (win32_resume): Call win32_prepare_to_resume on the event thread.
1586 * win32-low.h (struct win32_thread_info)
1587 <debug_registers_changed>: New field.
1588 (struct win32_target_ops): Change prototype of set_thread_context,
1589 delete set_thread_context and add prepare_to_resume.
1590 (win32_require_context): New declaration.
1592 2014-10-08 Gary Benson <gbenson@redhat.com>
1594 * server.h: Do not include common-exceptions.h.
1596 2014-10-08 Gary Benson <gbenson@redhat.com>
1598 * server.h: Do not include cleanups.h.
1600 2014-09-30 James Hogan <james.hogan@imgtec.com>
1602 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1605 2014-09-23 Yao Qi <yao@codesourcery.com>
1607 * linux-low.c (lp_status_maybe_breakpoint): New function.
1608 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1609 (count_events_callback): Likewise.
1610 (select_event_lwp_callback): Likewise.
1611 (cancel_breakpoints_callback): Likewise.
1613 2014-09-19 Don Breazeal <donb@codesourcery.com>
1615 * linux-low.c (handle_extended_wait): Call
1616 linux_ptrace_get_extended_event.
1617 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1618 linux_is_extended_waitstatus.
1620 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1622 * Makefile.in (CPPFLAGS): Define.
1623 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1624 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1626 2014-09-16 Gary Benson <gbenson@redhat.com>
1628 * inferiors.h (current_inferior): Renamed as...
1629 (current_thread): New variable. All uses updated.
1630 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1631 (maybe_move_out_of_jump_pad): Likewise.
1632 (cancel_breakpoint): Likewise.
1633 (linux_low_filter_event): Likewise.
1634 (wait_for_sigstop): Likewise.
1635 (linux_resume_one_lwp): Likewise.
1636 (need_step_over_p): Likewise.
1637 (start_step_over): Likewise.
1638 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1639 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1640 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1641 and save_inferior as saved_thread.
1642 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1644 (regcache_invalidate_thread): Likewise.
1645 * remote-utils.c (prepare_resume_reply): Likewise.
1646 * thread-db.c (thread_db_get_tls_address): Likewise.
1647 (disable_thread_event_reporting): Likewise.
1648 (remove_thread_event_breakpoints): Likewise.
1649 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1651 * target.h (set_desired_inferior): Renamed as...
1652 (set_desired_thread): New declaration. All uses updated.
1653 * server.c (myresume): Updated comment to reference thread instead
1655 (handle_serial_event): Likewise.
1656 (handle_target_event): Likewise.
1658 2014-09-12 Tom Tromey <tromey@redhat.com>
1659 Gary Benson <gbenson@redhat.com>
1661 * regcache.h: Include common-regcache.h.
1662 (regcache_read_pc): Don't declare.
1663 * regcache.c (get_thread_regcache_for_ptid): New function.
1665 2014-09-11 Tom Tromey <tromey@redhat.com>
1666 Gary Benson <gbenson@redhat.com>
1668 * symbol.c: New file.
1669 * Makefile.in (SFILES): Add symbol.c.
1670 (OBS): Add symbol.o.
1672 2014-09-11 Gary Benson <gbenson@redhat.com>
1674 * target.c (target_stop_ptid, target_continue_ptid): New
1677 2014-09-11 Tom Tromey <tromey@redhat.com>
1678 Gary Benson <gbenson@redhat.com>
1680 * target.h: Include target/target.h.
1681 * target.c (target_read_memory, target_read_uint32)
1682 (target_write_memory): New functions.
1684 2014-09-11 Gary Benson <gbenson@redhat.com>
1686 * server.h (debug_hw_points): Don't declare.
1687 * server.c (debug_hw_points): Don't define. Replace all uses
1688 with show_debug_regs.
1689 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1690 all uses with show_debug_regs.
1692 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1694 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1695 endianness into account.
1696 (ppc_supply_ptrace_register): Likewise.
1698 2014-09-03 James Hogan <james.hogan@imgtec.com>
1700 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1701 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1703 2014-09-03 Gary Benson <gbenson@redhat.com>
1705 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1706 ALL_DEBUG_ADDRESS_REGISTERS.
1708 2014-09-02 Gary Benson <gbenson@redhat.com>
1710 * i386-low.h: Renamed as...
1711 * x86-low.h: New file. All type, function and variable name
1712 prefixes changed from "i386_" to "x86_". All references updated.
1713 * i386-low.c: Renamed as...
1714 * x86-low.c: New file. All type, function and variable name
1715 prefixes changed from "i386_" to "x86_". All references updated.
1717 2014-09-02 Gary Benson <gbenson@redhat.com>
1719 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1720 (x86_linux_new_thread): Likewise.
1722 2014-08-29 Gary Benson <gbenson@redhat.com>
1724 * server.h (setjmp.h): Do not include.
1725 (toplevel): Do not declare.
1726 (common-exceptions.h): Include.
1727 (cleanups.h): Likewise.
1728 * server.c (toplevel): Do not define.
1729 (exit_code): New static global.
1730 (detach_or_kill_for_exit_cleanup): New function.
1731 (main): New function. Original main renamed to...
1732 (captured_main): New function.
1733 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1735 2014-08-29 Gary Benson <gbenson@redhat.com>
1737 * Makefile.in (SFILES): Add common/common-exceptions.c.
1738 (OBS): Add common-exceptions.o.
1739 (common-exceptions.o): New rule.
1740 * utils.c (prepare_to_throw_exception): New function.
1742 2014-08-29 Gary Benson <gbenson@redhat.com>
1744 * config.in: Regenerate.
1745 * configure: Likewise.
1747 2014-08-29 Gary Benson <gbenson@redhat.com>
1749 * Makefile.in (SFILES): Add common/cleanups.c.
1751 (cleanups.o): New rule.
1753 2014-08-29 Gary Benson <gbenson@redhat.com>
1755 * utils.c (internal_vwarning): New function.
1757 2014-08-28 Gary Benson <gbenson@redhat.com>
1759 * utils.h (fatal): Remove declaration.
1760 * utils.c (fatal): Remove function.
1762 2014-08-28 Gary Benson <gbenson@redhat.com>
1764 * tracepoint.c (gdb_agent_init): Replace fatal with
1766 (initialize_tracepoint): Likewise.
1768 2014-08-28 Gary Benson <gbenson@redhat.com>
1770 * remote-utils.c (remote_prepare): Replace fatal with error.
1772 2014-08-28 Gary Benson <gbenson@redhat.com>
1774 * linux-low.c (linux_async): Replace fatal with warning.
1776 (linux_start_non_stop): Return -1 if linux_async failed.
1778 2014-08-28 Gary Benson <gbenson@redhat.com>
1780 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1782 (i386_dr_low_get_addr): Remove vague comment.
1783 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1786 2014-08-28 Gary Benson <gbenson@redhat.com>
1788 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1789 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1791 (linux_resume_one_lwp): Likewise.
1792 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1794 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1795 with internal_error.
1796 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1797 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1798 (find_register_by_name): Replace fatal with internal_error.
1799 (find_regno): Likewise.
1800 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1801 * thread-db.c (thread_db_create_event): Likewise.
1802 (thread_db_load_search): Likewise.
1803 (try_thread_db_load_1): Likewise.
1804 * tracepoint.c (get_jump_space_head): Replace fatal with
1806 (claim_trampoline_space): Likewise.
1807 (have_fast_tracepoint_trampoline_buffer): Likewise.
1808 (cmd_qtstart): Likewise.
1809 (stop_tracing): Likewise.
1810 (fast_tracepoint_collecting): Likewise.
1811 (target_malloc): Likewise.
1812 (download_tracepoint): Likewise.
1813 (download_trace_state_variables): Replace check with gdb_assert.
1814 (upload_fast_traceframes): Replace fatal with internal_error.
1816 2014-08-19 Tom Tromey <tromey@redhat.com>
1817 Gary Benson <gbenson@redhat.com>
1819 * Makefile.in (SFILES): Add common/common-debug.c.
1820 (OBS): Add common-debug.o.
1821 (common-debug.o): New rule.
1822 * debug.h (debug_printf): Don't declare.
1823 * debug.c (debug_printf): Renamed and rewritten as...
1824 (debug_vprintf): New function.
1826 2014-08-19 Gary Benson <gbenson@redhat.com>
1828 * utils.h: Do not include print-utils.h.
1830 2014-08-19 Tom Tromey <tromey@redhat.com>
1831 Gary Benson <gbenson@redhat.com>
1833 * server.h: Add static assertion.
1834 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1836 2014-08-19 Tom Tromey <tromey@redhat.com>
1837 Gary Benson <gbenson@redhat.com>
1839 * Makefile.in (SFILES): Add common/errors.c.
1840 (OBS): Add errors.o.
1841 (IPA_OBS): Add errors-ipa.o.
1842 (errors.o): New rule.
1843 (errors-ipa.o): Likewise.
1844 * utils.h (perror_with_name, error, warning): Don't declare.
1845 * utils.c (warning): Renamed and rewritten as...
1846 (vwarning): New function.
1847 (error): Renamed and rewritten as...
1848 (verror): New function.
1849 (internal_error): Renamed and rewritten as...
1850 (internal_verror): New function.
1852 2014-08-07 Gary Benson <gbenson@redhat.com>
1854 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1855 * configure: Regenerate.
1856 * config.in: Likewise.
1857 * server.h: Do not include errno.h.
1858 * event-loop.c: Likewise.
1859 * hostio-errno.c: Likewise.
1860 * linux-low.c: Likewise.
1861 * remote-utils.c: Likewise.
1862 * spu-low.c: Likewise.
1863 * utils.c: Likewise.
1864 * gdbreplay.c: Unconditionally include errno.h.
1866 2014-08-07 Gary Benson <gbenson@redhat.com>
1868 * server.h: Do not include string.h.
1869 * event-loop.c: Likewise.
1870 * linux-low.c: Likewise.
1871 * regcache.c: Likewise.
1872 * remote-utils.c: Likewise.
1873 * spu-low.c: Likewise.
1874 * utils.c: Likewise.
1876 2014-08-07 Gary Benson <gbenson@redhat.com>
1878 * server.h: Do not include gdb_assert.h.
1880 2014-08-07 Gary Benson <gbenson@redhat.com>
1882 * server.h: Do not include common-utils.h.
1884 2014-08-07 Gary Benson <gbenson@redhat.com>
1886 * server.h: Do not include ptid.h.
1887 * notif.h: Likewise.
1889 2014-08-07 Gary Benson <gbenson@redhat.com>
1891 * server.h: Do not include gdb_locale.h.
1893 2014-08-07 Gary Benson <gbenson@redhat.com>
1895 * server.h: Do not include gdb/signals.h.
1896 * win32-low.c: Likewise.
1898 2014-08-07 Gary Benson <gbenson@redhat.com>
1900 * server.h: Do not include pathmax.h.
1902 2014-08-07 Gary Benson <gbenson@redhat.com>
1904 * server.h: Do not include libiberty.h.
1905 * linux-bfin-low.c: Likewise.
1907 2014-08-07 Gary Benson <gbenson@redhat.com>
1909 * server.h: Do not include ansidecl.h.
1911 2014-08-07 Gary Benson <gbenson@redhat.com>
1913 * linux-x86-low.c: Do not include stddef.h.
1914 * lynx-ppc-low.c: Likewise.
1915 * tracepoint.c: Likewise.
1917 2014-08-07 Gary Benson <gbenson@redhat.com>
1919 * server.h: Do not include stdarg.h.
1920 * nto-low.c: Likewise.
1922 2014-08-07 Gary Benson <gbenson@redhat.com>
1924 * server.h: Do not include stdlib.h.
1925 * inferiors.c: Likewise.
1926 * linux-low.c: Likewise.
1927 * regcache.c: Likewise.
1928 * spu-low.c: Likewise.
1929 * tracepoint.c: Likewise.
1930 * utils.c: Likewise.
1932 2014-08-07 Gary Benson <gbenson@redhat.com>
1934 * server.h: Do not include stdio.h.
1935 * linux-low.c: Likewise.
1936 * remote-utils.c: Likewise.
1937 * spu-low.c: Likewise.
1938 * utils.c: Likewise.
1939 * wincecompat.c: Likewise.
1941 2014-08-06 Gary Benson <gbenson@redhat.com>
1943 * regcache.c (init_register_cache): Move conditionals inside if.
1945 2014-08-06 Gary Benson <gbenson@redhat.com>
1947 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1949 2014-07-31 Gary Benson <gbenson@redhat.com>
1951 * ax.h: Do not include server.h.
1952 * gdbthread.h: Likewise.
1953 * lynx-low.h: Likewise.
1954 * notif.h: Likewise.
1956 2014-07-30 Gary Benson <gbenson@redhat.com>
1958 * server.h: Include common-defs.h.
1959 Do not include config.h or build-gnulib-gdbserver/config.h.
1961 2014-07-30 Gary Benson <gbenson@redhat.com>
1963 * hostio-errno.c: Move server.h to top of includes list.
1964 * inferiors.c: Likewise.
1965 * linux-x86-low.c: Likewise.
1966 * notif.c: Include server.h.
1968 2014-07-24 Tom Tromey <tromey@redhat.com>
1969 Gary Benson <gbenson@redhat.com>
1971 * server.h (CORE_ADDR): Now unsigned.
1973 2014-07-16 Pedro Alves <palves@redhat.com>
1975 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1977 2014-07-15 Pedro Alves <palves@redhat.com>
1979 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1982 2014-07-11 Pedro Alves <palves@redhat.com>
1984 * linux-low.c (kill_wait_lwp): New function, based on
1985 kill_one_lwp_callback, but use my_waitpid directly.
1986 (kill_one_lwp_callback, linux_kill): Use it.
1988 2014-06-23 Pedro Alves <palves@redhat.com>
1990 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1991 before setting DR0..DR3.
1993 2014-06-20 Gary Benson <gbenson@redhat.com>
1995 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1996 * configure: Regenerated.
1997 * config.in: Likewise.
1999 2014-06-20 Gary Benson <gbenson@redhat.com>
2001 * Makefile.in (SFILES): Update locations for files moved
2003 (object file files): Reordered.
2005 2014-06-20 Gary Benson <gbenson@redhat.com>
2007 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2008 (i386_dr_low_set_addr): Likewise.
2009 (i386_dr_low_get_addr): Likewise.
2010 (i386_dr_low_can_set_control): Likewise.
2011 (i386_dr_low_set_control): Likewise.
2012 (i386_dr_low_get_control): Likewise.
2013 (i386_dr_low_get_status): Likewise.
2014 (i386_get_debug_register_length): Likewise.
2015 * linux-x86-low.c (i386_dr_low_set_addr):
2016 Changed signature. Made static.
2017 (i386_dr_low_get_addr): Likewise.
2018 (i386_dr_low_set_control): Likewise.
2019 (i386_dr_low_get_control): Likewise.
2020 (i386_dr_low_get_status): Likewise.
2021 (i386_dr_low): New global variable.
2022 * win32-i386-low.c (i386_dr_low_set_addr):
2023 Changed signature. Made static.
2024 (i386_dr_low_get_addr): Likewise.
2025 (i386_dr_low_set_control): Likewise.
2026 (i386_dr_low_get_control): Likewise.
2027 (i386_dr_low_get_status): Likewise.
2028 (i386_dr_low): New global variable.
2030 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2032 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2033 * Makefile.in (AR, AR_FLAGS): Define.
2034 * configure: Regenerate.
2036 2014-06-19 Gary Benson <gbenson@redhat.com>
2038 * Makefile.in (i386-dregs.o): New rule.
2039 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2040 * i386-low.c (target.h): Remove include.
2041 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2042 (DR_CONTROL_SHIFT): Likewise.
2043 (DR_CONTROL_SIZE): Likewise.
2044 (DR_RW_EXECUTE): Likewise.
2045 (DR_RW_WRITE): Likewise.
2046 (DR_RW_READ): Likewise.
2047 (DR_RW_IORW): Likewise.
2048 (DR_LEN_1): Likewise.
2049 (DR_LEN_2): Likewise.
2050 (DR_LEN_4): Likewise.
2051 (DR_LEN_8): Likewise.
2052 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2053 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2054 (DR_ENABLE_SIZE): Likewise.
2055 (DR_LOCAL_SLOWDOWN): Likewise.
2056 (DR_GLOBAL_SLOWDOWN): Likewise.
2057 (DR_CONTROL_RESERVED): Likewise.
2058 (I386_DR_CONTROL_MASK): Likewise.
2059 (I386_DR_VACANT): Likewise.
2060 (I386_DR_LOCAL_ENABLE): Likewise.
2061 (I386_DR_GLOBAL_ENABLE): Likewise.
2062 (I386_DR_DISABLE): Likewise.
2063 (I386_DR_SET_RW_LEN): Likewise.
2064 (I386_DR_GET_RW_LEN): Likewise.
2065 (I386_DR_WATCH_HIT): Likewise.
2066 (i386_wp_op_t): Likewise.
2067 (i386_show_dr): Likewise.
2068 (i386_length_and_rw_bits): Likewise.
2069 (i386_insert_aligned_watchpoint): Likewise.
2070 (i386_remove_aligned_watchpoint): Likewise.
2071 (i386_handle_nonaligned_watchpoint): Likewise.
2072 i386_update_inferior_debug_regs(): Likewise.
2073 (i386_dr_insert_watchpoint): Likewise.
2074 (i386_dr_remove_watchpoint): Likewise.
2075 (i386_dr_region_ok_for_watchpoint): Likewise.
2076 (i386_dr_stopped_data_address): Likewise.
2077 (i386_dr_stopped_by_watchpoint): Likewise.
2079 2014-06-19 Gary Benson <gbenson@redhat.com>
2081 * i386-low.c (i386_dr_show): Renamed to
2082 i386_show_dr and made static. All uses updated.
2083 (i386_dr_length_and_rw_bits): Renamed to
2084 i386_length_and_rw_bits and made static.
2086 (i386_dr_insert_aligned_watchpoint): Renamed to
2087 i386_insert_aligned_watchpoint and made static.
2089 (i386_dr_remove_aligned_watchpoint): Renamed to
2090 i386_remove_aligned_watchpoint and made static.
2092 (i386_dr_update_inferior_debug_regs): Renamed to
2093 i386_update_inferior_debug_regs and made static.
2096 2014-06-18 Gary Benson <gbenson@redhat.com>
2098 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2099 (i386_dr_low_can_set_control): Likewise.
2100 (i386_get_debug_register_length): Likewise.
2101 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2102 (i386_dr_low_can_set_control): Likewise.
2103 (i386_get_debug_register_length): Likewise.
2105 2014-06-17 Gary Benson <gbenson@redhat.com>
2107 * i386-low.h (i386-dregs.h): New include.
2108 (DR_FIRSTADDR): Now in i386-dregs.h.
2109 (DR_LASTADDR): Likewise.
2110 (DR_NADDR): Likewise.
2111 (DR_STATUS): Likewise.
2112 (DR_CONTROL): Likewise.
2113 (i386_debug_reg_state): Likewise.
2114 (i386_dr_insert_watchpoint): Likewise.
2115 (i386_dr_remove_watchpoint): Likewise.
2116 (i386_dr_region_ok_for_watchpoint): Likewise.
2117 (i386_dr_stopped_data_address): Likewise.
2118 (i386_dr_stopped_by_watchpoint): Likewise.
2119 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2121 2014-06-18 Gary Benson <gbenson@redhat.com>
2123 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2124 i386_dr_insert_watchpoint.
2125 (i386_low_remove_watchpoint): Renamed to
2126 i386_dr_remove_watchpoint.
2127 (i386_low_region_ok_for_watchpoint): Renamed to
2128 i386_dr_region_ok_for_watchpoint.
2129 (i386_low_stopped_data_address): Renamed to
2130 i386_dr_stopped_data_address.
2131 (i386_low_stopped_by_watchpoint): Renamed to
2132 i386_dr_stopped_by_watchpoint.
2133 * i386-low.c (i386_show_dr): Renamed to
2134 i386_dr_show and made nonstatic. All uses updated.
2135 (i386_length_and_rw_bits): Renamed to
2136 i386_dr_length_and_rw_bits and made nonstatic.
2138 (i386_insert_aligned_watchpoint): Renamed to
2139 i386_dr_insert_aligned_watchpoint and made nonstatic.
2141 (i386_remove_aligned_watchpoint): Renamed to
2142 i386_dr_remove_aligned_watchpoint and made nonstatic.
2144 (i386_update_inferior_debug_regs): Renamed to
2145 i386_dr_update_inferior_debug_regs and made nonstatic.
2147 (i386_low_insert_watchpoint): Renamed to
2148 i386_dr_insert_watchpoint. All uses updated.
2149 (i386_low_remove_watchpoint): Renamed to
2150 i386_dr_remove_watchpoint. All uses updated.
2151 (i386_low_region_ok_for_watchpoint): Renamed to
2152 i386_dr_region_ok_for_watchpoint. All uses updated.
2153 (i386_low_stopped_data_address): Renamed to
2154 i386_dr_stopped_data_address. All uses updated.
2155 (i386_low_stopped_by_watchpoint): Renamed to
2156 i386_dr_stopped_by_watchpoint. All uses updated.
2158 2014-06-18 Gary Benson <gbenson@redhat.com>
2160 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2161 (i386_dr_low_can_set_control): Likewise.
2162 (i386_insert_aligned_watchpoint): New check.
2164 2014-06-18 Gary Benson <gbenson@redhat.com>
2166 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2169 2014-06-18 Gary Benson <gbenson@redhat.com>
2171 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2172 instead of fatal and error.
2173 (i386_handle_nonaligned_watchpoint): Likewise.
2175 2014-06-18 Gary Benson <gbenson@redhat.com>
2177 * i386-low.c (i386_get_debug_register_length): New macro.
2178 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2179 (i386_show_dr): Use debug_printf instead of fprintf. Use
2180 phex to format values.
2182 2014-06-18 Gary Benson <gbenson@redhat.com>
2184 * i386-low.h: Comment changes.
2185 * i386-low.c: Likewise.
2187 2014-06-18 Gary Benson <gbenson@redhat.com>
2189 * i386-low.c: Whitespace changes.
2191 2014-06-12 Tom Tromey <tromey@redhat.com>
2193 * utils.c (freeargv): Remove.
2195 2014-06-12 Tom Tromey <tromey@redhat.com>
2197 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2198 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2199 (parse_debug_format_options): Likewise.
2200 (gdbserver_usage): Likewise.
2201 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2202 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2203 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2205 ($(LIBGNU)): Depend on libiberty.
2206 (all-lib): Recurse into all subdirs.
2207 (install-only): Invoke "install" target in subdirs.
2208 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2210 * configure: Rebuild.
2211 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2212 for vasprintf, vsnprintf, or gettimeofday.
2213 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2216 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2218 * development.sh: Delete.
2219 * Makefile.in (config.status): Adjust dependency on development.sh.
2220 * configure.ac: Adjust development.sh source call.
2221 * configure: Regenerate.
2223 2014-06-02 Pedro Alves <palves@redhat.com>
2225 * ax.c (gdb_free_agent_expr): New function.
2226 * ax.h (gdb_free_agent_expr): New declaration.
2227 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2229 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2231 (clear_breakpoint_conditions_and_commands): New function.
2232 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2233 (clear_breakpoint_conditions_and_commands): New declaration.
2235 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2237 * linux-aarch64-low.c (asm/ptrace.h): Include.
2239 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2241 Fix TLS access for -static -pthread.
2242 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2243 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2244 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2246 2014-05-20 Pedro Alves <palves@redhat.com>
2248 * linux-aarch64-low.c (aarch64_insert_point)
2249 (aarch64_remove_point): No longer check whether the type is
2250 supported here. Adjust to new interface.
2251 (the_low_target): Install aarch64_supports_z_point_type as
2252 supports_z_point_type method.
2253 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2254 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2255 instead of a Z packet char. Adjust.
2256 (arm_supports_z_point_type): New function.
2257 (arm_insert_point, arm_remove_point): Adjust to new interface.
2258 (the_low_target): Install arm_supports_z_point_type.
2259 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2260 (cris_insert_point, cris_remove_point): Adjust to new interface.
2261 Don't check whether the type is supported here.
2262 (the_low_target): Install cris_supports_z_point_type.
2263 * linux-low.c (linux_supports_z_point_type): New function.
2264 (linux_insert_point, linux_remove_point): Adjust to new interface.
2265 * linux-low.h (struct linux_target_ops) <insert_point,
2266 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2267 raw_breakpoint pointer parameter.
2268 <supports_z_point_type>: New method.
2269 * linux-mips-low.c (mips_supports_z_point_type): New function.
2270 (mips_insert_point, mips_remove_point): Adjust to new interface.
2271 Use mips_supports_z_point_type.
2272 (the_low_target): Install mips_supports_z_point_type.
2273 * linux-ppc-low.c (the_low_target): Install NULL as
2274 supports_z_point_type method.
2275 * linux-s390-low.c (the_low_target): Install NULL as
2276 supports_z_point_type method.
2277 * linux-sparc-low.c (the_low_target): Install NULL as
2278 supports_z_point_type method.
2279 * linux-x86-low.c (x86_supports_z_point_type): New function.
2280 (x86_insert_point): Adjust to new insert_point interface. Use
2281 insert_memory_breakpoint. Adjust to new
2282 i386_low_insert_watchpoint interface.
2283 (x86_remove_point): Adjust to remove_point interface. Use
2284 remove_memory_breakpoint. Adjust to new
2285 i386_low_remove_watchpoint interface.
2286 (the_low_target): Install x86_supports_z_point_type.
2287 * lynx-low.c (lynx_target_ops): Install NULL as
2288 supports_z_point_type callback.
2289 * nto-low.c (nto_supports_z_point_type): New.
2290 (nto_insert_point, nto_remove_point): Adjust to new interface.
2291 (nto_target_ops): Install nto_supports_z_point_type.
2292 * mem-break.c: Adjust intro comment.
2293 (struct raw_breakpoint) <raw_type, size>: New fields.
2294 <inserted>: Update comment.
2295 <shlib_disabled>: Delete field.
2296 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2297 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2298 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2299 (raw_bkpt_type_to_target_hw_bp_type): New function.
2300 (find_enabled_raw_code_breakpoint_at): New function.
2301 (find_raw_breakpoint_at): New type and size parameters. Use them.
2302 (insert_memory_breakpoint): New function, based off
2303 set_raw_breakpoint_at.
2304 (remove_memory_breakpoint): New function.
2305 (set_raw_breakpoint_at): Reimplement.
2306 (set_breakpoint): New, based on set_breakpoint_at.
2307 (set_breakpoint_at): Reimplement.
2308 (delete_raw_breakpoint): Go through the_target->remove_point
2309 instead of assuming memory breakpoints.
2310 (find_gdb_breakpoint_at): Delete.
2311 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2312 (find_gdb_breakpoint): New function.
2313 (set_gdb_breakpoint_at): Delete.
2314 (z_type_supported): New function.
2315 (set_gdb_breakpoint_1): New function, loosely based off
2316 set_gdb_breakpoint_at.
2317 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2318 (delete_gdb_breakpoint_at): Delete.
2319 (delete_gdb_breakpoint_1): New function, loosely based off
2320 delete_gdb_breakpoint_at.
2321 (delete_gdb_breakpoint): New function.
2322 (clear_gdb_breakpoint_conditions): Rename to ...
2323 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2325 (add_condition_to_breakpoint): Make static.
2326 (add_breakpoint_condition): Take a struct breakpoint pointer
2327 instead of an address. Adjust.
2328 (gdb_condition_true_at_breakpoint): Rename to ...
2329 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2331 (gdb_condition_true_at_breakpoint): Reimplement.
2332 (add_breakpoint_commands): Take a struct breakpoint pointer
2333 instead of an address. Adjust.
2334 (gdb_no_commands_at_breakpoint): Rename to ...
2335 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2336 parameter. Return true if no breakpoint was found. Change debug
2338 (gdb_no_commands_at_breakpoint): Reimplement.
2339 (run_breakpoint_commands): Rename to ...
2340 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2341 and change return type to boolean.
2342 (run_breakpoint_commands): New function.
2343 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2344 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2345 breakpoint. Go through the_target->remove_point instead of
2346 assuming memory breakpoint.
2347 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2348 software and hardware breakpoints.
2349 (reinsert_raw_breakpoint): Go through the_target->insert_point
2350 instead of assuming memory breakpoint.
2351 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2352 software and hardware breakpoints.
2353 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2354 Check both software and hardware breakpoints.
2355 (validate_inserted_breakpoint): Assert the breakpoint is a
2356 software breakpoint. Set the inserted flag to -1 instead of
2357 setting shlib_disabled.
2358 (delete_disabled_breakpoints): Adjust.
2359 (validate_breakpoints): Only validate software breakpoints.
2360 Adjust to inserted flag change.
2361 (check_mem_read, check_mem_write): Skip breakpoint types other
2362 than software breakpoints. Adjust to inserted flag change.
2363 * mem-break.h (enum raw_bkpt_type): New enum.
2364 (raw_breakpoint, struct process_info): Forward declare.
2365 (Z_packet_to_target_hw_bp_type): Delete declaration.
2366 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2367 (set_gdb_breakpoint, delete_gdb_breakpoint)
2368 (clear_breakpoint_conditions): New declarations.
2369 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2370 (breakpoint_inserted_here): Update comment.
2371 (add_breakpoint_condition, add_breakpoint_commands): Replace
2372 address parameter with a breakpoint pointer parameter.
2373 (gdb_breakpoint_here): Update comment.
2374 (delete_gdb_breakpoint_at): Delete.
2375 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2376 * server.c (process_point_options): Take a struct breakpoint
2377 pointer instead of an address. Adjust.
2378 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2379 delete_gdb_breakpoint.
2380 * spu-low.c (spu_target_ops): Install NULL as
2381 supports_z_point_type method.
2382 * target.h: Include mem-break.h.
2383 (struct target_ops) <prepare_to_access_memory>: Update comment.
2384 <supports_z_point_type>: New field.
2385 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2386 instead of a char. Also take a raw breakpoint pointer.
2387 * win32-arm-low.c (the_low_target): Install NULL as
2388 supports_z_point_type.
2389 * win32-i386-low.c (i386_supports_z_point_type): New function.
2390 (i386_insert_point, i386_remove_point): Adjust to new interface.
2391 (the_low_target): Install i386_supports_z_point_type.
2392 * win32-low.c (win32_supports_z_point_type): New function.
2393 (win32_insert_point, win32_remove_point): Adjust to new interface.
2394 (win32_target_ops): Install win32_supports_z_point_type.
2395 * win32-low.h (struct win32_target_ops):
2396 <supports_z_point_type>: New method.
2397 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2398 instead of a char. Also take a raw breakpoint pointer.
2400 2014-05-20 Pedro Alves <palves@redhat.com>
2402 * mem-break.h: Include break-common.h.
2403 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2404 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2405 (Z_packet_to_target_hw_bp_type): New declaration.
2406 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2407 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2408 (Z_PACKET_ACCESS_WP): Delete macros.
2409 (Z_packet_to_hw_type): Delete function.
2410 * i386-low.h: Don't include break-common.h here.
2411 (Z_packet_to_hw_type): Delete declaration.
2412 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2413 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2414 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2415 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2416 * linux-aarch64-low.c: Don't include break-common.h here.
2417 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2418 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2419 (Z_packet_to_target_hw_bp_type): Delete function.
2420 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2422 (mips_insert_point, mips_remove_point): Use
2423 Z_packet_to_target_hw_bp_type.
2425 2014-05-20 Pedro Alves <palves@redhat.com>
2427 * linux-aarch64-low.c: Include break-common.h.
2428 (enum target_point_type): Delete.
2429 (Z_packet_to_point_type): Rename to ...
2430 (Z_packet_to_target_hw_bp_type): ... this, and return a
2431 target_hw_bp_type instead.
2432 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2433 instead of an enum target_point_type.
2434 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2436 (aarch64_dr_state_insert_one_point)
2437 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2438 (aarch64_handle_aligned_watchpoint)
2439 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2440 Take an enum target_hw_bp_type instead of an enum
2442 (aarch64_supports_z_point_type): New function.
2443 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2444 use Z_packet_to_target_hw_bp_type.
2446 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2448 * configure.ac: Only use -Werror by default when DEVELOPMENT
2450 * configure: Regenerate.
2452 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2454 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2455 * linux-x86-low.c (X86_64_USER_REGS): New.
2456 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2458 2014-04-28 Yao Qi <yao@codesourcery.com>
2460 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2463 2014-04-25 Pedro Alves <palves@redhat.com>
2466 * linux-low.c (linux_attach_fail_reason_string): New function.
2467 (linux_attach_lwp): Delete.
2468 (linux_attach_lwp_1): Rename to ...
2469 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2470 argument. Remove "initial" parameter. Return int instead of
2471 void. Don't error or warn here.
2472 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2473 failure to attach to the tgid. Call warning when failing to
2475 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2476 argument. Remove "initial" parameter. Return int instead of
2477 void. Don't error or warn here.
2478 (linux_attach_fail_reason_string): New declaration.
2479 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2480 interface change. Use linux_attach_fail_reason_string.
2482 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2483 Walfred Tedeschi <walfred.tedeschi@intel.com>
2485 * Makefile.in: Added rules to handle new files
2486 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2487 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2488 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2489 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2490 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2491 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2493 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2494 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2495 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2496 i386/x32-avx512.xml.
2497 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2498 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2499 i386/x32-avx512-linux.xml.
2500 * i387-fp.c (num_avx512_k_registers): New constant for number
2502 (num_avx512_zmmh_low_registers): New constant for number of
2503 lower ZMM registers (0-15).
2504 (num_avx512_zmmh_high_registers): New constant for number of
2505 higher ZMM registers (16-31).
2506 (num_avx512_ymmh_registers): New contant for number of higher
2507 YMM registers (ymm16-31 added by avx521 on x86_64).
2508 (num_avx512_xmm_registers): New constant for number of higher
2509 XMM registers (xmm16-31 added by AVX512 on x86_64).
2510 (struct i387_xsave): Add space for AVX512 registers.
2511 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2512 Add code to handle AVX512 registers.
2513 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2514 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2515 prototypei from generated file.
2516 (tdesc_amd64_avx512_linux): Likewise.
2517 (init_registers_x32_avx512_linux): Likewise.
2518 (tdesc_x32_avx512_linux): Likewise.
2519 (init_registers_i386_avx512_linux): Likewise.
2520 (tdesc_i386_avx512_linux): Likewise.
2521 (x86_64_regmap): Add AVX512 registers.
2522 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2524 (initialize_low_arch): Add code to initialize AVX512 registers.
2526 2014-04-23 Pedro Alves <palves@redhat.com>
2528 * mem-break.c (find_gdb_breakpoint_at): Make static.
2529 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2531 2014-04-23 Pedro Alves <palves@redhat.com>
2533 * i386-low.c: Don't include break-common.h here.
2534 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2535 prototype to take target_hw_bp_type as argument instead of a Z
2537 * i386-low.h: Include break-common.h here.
2538 (Z_packet_to_hw_type): Declare.
2539 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2541 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2542 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2543 (x86_remove_point): Convert the packet number to a
2544 target_hw_bp_type before calling i386_low_remove_watchpoint.
2545 * win32-i386-low.c (i386_insert_point): Convert the packet number
2546 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2547 (i386_remove_point): Convert the packet number to a
2548 target_hw_bp_type before calling i386_low_remove_watchpoint.
2550 2014-04-23 Pedro Alves <palves@redhat.com>
2552 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2554 2014-04-10 Pedro Alves <palves@redhat.com>
2556 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2557 Check if the condition or command is NULL before checking if the
2558 breakpoint is known. On success, return true.
2559 * mem-break.h (add_breakpoint_condition): Document return.
2560 (add_breakpoint_commands): Add describing comment.
2561 * server.c (skip_to_semicolon): New function.
2562 (process_point_options): Use it.
2564 2014-04-09 Pedro Alves <palves@redhat.com>
2566 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2569 2014-02-27 Pedro Alves <palves@redhat.com>
2572 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2574 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2576 (last_thread_of_process_p): Take a PID argument instead of a
2578 (linux_wait_for_lwp): Delete.
2579 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2581 (linux_low_filter_event): New function, party factored out from
2582 linux_wait_for_event.
2583 (linux_wait_for_event): Rename to ...
2584 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2585 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2586 sigsuspend. Check for zombie leaders.
2587 (linux_wait_for_event): Reimplement as wrapper around
2588 linux_wait_for_event_filtered.
2589 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2590 a normal or signal exit is seen, it's the whole process exiting.
2591 (wait_for_sigstop): No longer a for_each_inferior callback.
2592 Rewrite on top of linux_wait_for_event_filtered.
2593 (stop_all_lwps): Call wait_for_sigstop directly.
2594 * server.c (resume, handle_target_event): Handle
2595 TARGET_WAITKIND_NO_RESUMED.
2597 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2599 * win32-low.c (psapi_get_dll_name,
2600 * win32_CreateToolhelp32Snapshot): Delete.
2601 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2602 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2604 (handle_load_dll): Add function description.
2605 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2607 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2609 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2611 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2612 base address when calling win32_add_one_solib.
2613 (handle_load_dll): Delete local variable load_addr.
2614 Remove 0x1000 offset applied to DLL base address when calling
2615 win32_add_one_solib.
2616 (handle_unload_dll): Add comment.
2618 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2620 * win32-low.c (win32_add_all_dlls): Renames
2621 win32_ensure_ntdll_loaded. Rewrite function documentation.
2622 Adjust implementation to always load all DLLs.
2623 Add 0x1000 offset to DLL base address when calling
2624 win32_add_one_solib.
2625 (child_initialization_done): New static global.
2626 (do_initial_child_stuff): Set child_initialization_done to
2627 zero during child initialization, and 1 after. Replace call
2628 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2630 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2631 (handle_unload_dll): Add function documentation.
2632 (get_child_debug_event): Ignore load and unload DLL events
2633 during child initialization.
2635 2014-02-20 Doug Evans <dje@google.com>
2637 Remove global all_lwps.
2638 * inferiors.h (ptid_of): Move here from linux-low.h.
2639 (pid_of, lwpid_of): Ditto.
2640 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2641 parameter is a struct thread_info * now.
2642 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2643 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2644 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2646 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2647 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2648 * linux-arm-low.c (update_registers_callback): Update, "entry"
2649 parameter is a struct thread_info * now.
2650 Fetch lwpid from current_inferior directly.
2651 (arm_insert_point): Pass &all_threads to find_inferior instead of
2653 (arm_remove_point): Ditto.
2654 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2655 (arm_prepare_to_resume): Fetch pid from thread.
2656 (arm_read_description): Fetch lwpid from current_inferior directly.
2657 * linux-low.c (all_lwps): Delete.
2658 (delete_lwp): Delete call to remove_inferior.
2659 (handle_extended_wait): Fetch lwpid from thread.
2660 (add_lwp): Don't set lwp->entry.id. Remove call to
2661 add_inferior_to_list.
2662 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2663 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2664 (kill_one_lwp_callback): Ditto.
2665 (linux_kill): Don't dereference NULL pointer.
2666 Fetch ptid,lwpid from thread.
2667 (get_detach_signal): Fetch ptid from thread.
2668 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2669 Simplify call to regcache_invalidate_thread.
2670 (delete_lwp_callback): Update, "entry" parameter is a
2671 struct thread_info * now. Fetch pid from thread.
2672 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2673 (status_pending_p_callback): Update, "entry" parameter is a
2674 struct thread_info * now. Fetch ptid from thread.
2675 (find_lwp_pid): Update, "entry" parameter is a
2676 struct thread_info * now.
2677 (linux_wait_for_lwp): Fetch pid from thread.
2678 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2679 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2680 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2681 (dequeue_one_deferred_signal): Ditto.
2682 (cancel_breakpoint): Fetch ptid from current_inferior.
2683 (linux_wait_for_event): Pass &all_threads to find_inferior,
2684 not &all_lwps. Fetch ptid, lwpid from thread.
2685 (count_events_callback): Update, "entry" parameter is a
2686 struct thread_info * now.
2687 (select_singlestep_lwp_callback): Ditto.
2688 (select_event_lwp_callback): Ditto.
2689 (cancel_breakpoints_callback): Ditto.
2690 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2692 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2693 (unsuspend_one_lwp): Update, "entry" parameter is a
2694 struct thread_info * now.
2695 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2697 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2698 Fetch lwpid from thread, not lwp.
2699 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2700 Pass &all_threads to find_inferior, not &all_lwps.
2701 (send_sigstop): Fetch lwpid from thread, not lwp.
2702 (send_sigstop_callback): Update, "entry" parameter is a
2703 struct thread_info * now.
2704 (suspend_and_send_sigstop_callback): Ditto.
2705 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2706 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2707 struct thread_info * now.
2708 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2710 (lwp_running): Update, "entry" parameter is a
2711 struct thread_info * now.
2712 (stop_all_lwps): Fetch ptid from thread.
2713 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2714 (linux_resume_one_lwp): Fetch lwpid from thread.
2715 (linux_set_resume_request): Update, "entry" parameter is a
2716 struct thread_info * now. Fetch pid, lwpid from thread.
2717 (resume_status_pending_p): Update, "entry" parameter is a
2718 struct thread_info * now.
2719 (need_step_over_p): Ditto. Fetch lwpid from thread.
2720 (start_step_over): Fetch lwpid from thread.
2721 (linux_resume_one_thread): Update, "entry" parameter is a
2722 struct thread_info * now. Fetch lwpid from thread.
2723 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2724 (proceed_one_lwp): Update, "entry" parameter is a
2725 struct thread_info * now. Fetch lwpid from thread.
2726 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2727 struct thread_info * now.
2728 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2729 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2730 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2732 (regsets_store_inferior_registers): Ditto.
2733 (fetch_register, store_register): Ditto.
2734 (linux_read_memory, linux_write_memory): Ditto.
2735 (linux_request_interrupt): Ditto.
2736 (linux_read_auxv): Ditto.
2737 (linux_xfer_siginfo): Ditto.
2738 (linux_qxfer_spu): Ditto.
2739 (linux_qxfer_libraries_svr4): Ditto.
2740 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2741 moved to inferiors.h.
2743 (get_thread_lwp): Update.
2744 (struct lwp_info): Delete member "entry". Simplify comment for
2747 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2748 current_inferior directly.
2749 (update_watch_registers_callback): Update, "entry" parameter is a
2750 struct thread_info * now. Fetch pid from thread.
2751 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2752 (mips_insert_point): Fetch lwpid from current_inferior.
2753 Pass &all_threads to find_inferior, not &all_lwps.
2754 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2755 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2757 (mips_stopped_data_address): Ditto.
2758 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2760 * linux-tile-low.c (tile_arch_setup): Ditto.
2761 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2762 (update_debug_registers_callback): Update, "entry" parameter is a
2763 struct thread_info * now. Fetch pid from thread.
2764 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2765 Pass &all_threads to find_inferior, not &all_lwps.
2766 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2767 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2768 Pass &all_threads to find_inferior, not &all_lwps.
2769 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2770 (i386_dr_low_get_status): Ditto.
2771 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2772 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2773 (x86_linux_read_description): Ditto.
2774 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2776 2014-02-20 Doug Evans <dje@google.com>
2778 * inferiors.c (get_first_inferior): Fix buglet.
2780 2014-02-19 Doug Evans <dje@google.com>
2782 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2783 * inferiors.c (add_thread): Change result type to struct thread_info *.
2784 All callers updated.
2785 (add_lwp): Call add_thread here instead of in callers.
2786 All callers updated.
2787 * linux-low.h (get_lwp_thread): Rewrite.
2788 (struct lwp_info): New member "thread".
2790 2014-02-19 Doug Evans <dje@google.com>
2792 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2793 All callers updated.
2795 2014-02-19 Doug Evans <dje@google.com>
2797 * inferiors.c (add_thread): Fix whitespace.
2799 2014-02-19 Doug Evans <dje@google.com>
2801 * dll.c (clear_dlls): Replace accessing list implemention details
2803 * gdbthread.h (get_first_thread): Declare.
2804 * inferiors.c (for_each_inferior_with_data): New function.
2805 (get_first_thread): New function.
2806 (find_thread_ptid): Simplify.
2807 (get_first_inferior): New function.
2808 (clear_list): Delete.
2809 (one_inferior_p): New function.
2810 (clear_inferior_list): New function.
2811 (clear_inferiors): Update.
2812 * inferiors.h (for_each_inferior_with_data): Declare.
2813 (clear_inferior_list): Declare.
2814 (one_inferior_p): Declare.
2815 (get_first_inferior): Declare.
2816 * linux-low.c (linux_wait_for_event): Replace accessing list
2817 implemention details with API function.
2818 * server.c (target_running): Ditto.
2819 (accumulate_file_name_length): New function.
2820 (emit_dll_description): New function.
2821 (handle_qxfer_libraries): Replace accessing list implemention
2822 details with API function.
2823 (handle_qxfer_threads_worker): New function.
2824 (handle_qxfer_threads_proper): Replace accessing list implemention
2825 details with API function.
2826 (handle_query): Ditto.
2827 (visit_actioned_threads_callback_ftype): New typedef.
2828 (visit_actioned_threads_data): New struct.
2829 (visit_actioned_threads): Rewrite to be find_inferior callback.
2830 (resume): Call find_inferior.
2831 (handle_status): Replace accessing list implemention
2832 details with API function.
2833 (process_serial_event): Replace accessing list implemention details
2835 * target.c (set_desired_inferior): Replace accessing list implemention
2836 details with API function.
2837 * tracepoint.c (same_process_p): New function.
2838 (gdb_agent_about_to_close): Replace accessing list implemention
2839 details with API function.
2840 * win32-low.c (child_delete_thread): Replace accessing list
2841 implemention details with API function.
2842 (match_dll_by_basename): New function.
2843 (dll_is_loaded_by_basename): New function.
2844 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2845 details call to dll_is_loaded_by_basename.
2847 2014-02-19 Doug Evans <dje@google.com>
2849 * dll.h (struct dll_info): Add comment.
2850 * gdbthread.h (struct thread_info): Add comment.
2851 (current_ptid): Simplify.
2852 * inferiors.c (add_process): Update.
2853 (remove_process): Update.
2854 * inferiors.h (struct process_info): Rename member "head" to "entry".
2855 * linux-low.c (delete_lwp): Update.
2857 (last_thread_of_process_p): Update.
2858 (kill_one_lwp_callback, linux_kill): Update.
2859 (status_pending_p_callback): Update.
2860 (wait_for_sigstop): Update. Simplify read of ptid.
2861 (start_step_over): Update.
2862 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2863 (get_lwp_thread): Update.
2864 (struct lwp_info): Rename member "head" to "entry".
2865 * regcache.h (inferior_list_entry): Delete.
2866 * server.c (kill_inferior_callback): Update.
2867 (detach_or_kill_inferior_callback): Update.
2868 (print_started_pid): Update.
2869 (print_attached_pid): Update.
2870 (process_serial_event): Simplify read of ptid.
2871 * thread-db.c (thread_db_create_event): Update.
2872 (thread_db_get_tls_address): Update.
2873 * win32-low.c (current_inferior_ptid): Simplify.
2875 2014-02-19 Tom Tromey <tromey@redhat.com>
2877 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2879 (target_supports_btrace): Update.
2881 2014-02-14 Yao Qi <yao@codesourcery.com>
2883 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2884 (rsp-low-ipa.o): New target.
2886 2014-02-12 Tom Tromey <tromey@redhat.com>
2888 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2889 convert_ascii_to_int.
2890 * regcache.c (registers_to_string): Likewise.
2891 * remote-utils.c (decode_M_packet): Likewise.
2892 * server.c (process_serial_event): Likewise.
2894 2014-02-12 Tom Tromey <tromey@redhat.com>
2896 * server.c (handle_query, handle_v_run): Use hex2bin, not
2898 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2900 2014-02-12 Tom Tromey <tromey@redhat.com>
2902 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2903 convert_int_to_ascii.
2904 * regcache.c (registers_to_string, collect_register_as_string):
2906 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2908 * server.c (process_serial_event): Likewise.
2909 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2910 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2912 2014-02-12 Tom Tromey <tromey@redhat.com>
2914 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2915 bin2hex, not hexify.
2916 * tracepoint.c (cmd_qtstatus): Likewise.
2918 2014-02-12 Tom Tromey <tromey@redhat.com>
2920 * remote-utils.c (monitor_output): Pass explicit length to
2923 2014-02-12 Tom Tromey <tromey@redhat.com>
2925 * tracepoint.c: Include rsp-low.h.
2926 * server.c: Include rsp-low.h.
2927 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2928 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2930 * remote-utils.c: Include rsp-low.h.
2931 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2932 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2933 (convert_int_to_ascii, convert_ascii_to_int): Move to
2935 * regcache.c: Include rsp-low.h.
2936 * ax.c: Include rsp-low.h.
2937 * Makefile.in (SFILES): Add common/rsp-low.c.
2938 (OBS): Add rsp-low.o.
2939 (rsp-low.o): New target.
2941 2014-02-12 Tom Tromey <tromey@redhat.com>
2943 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2944 Include print-utils.h.
2945 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2946 (plongest, thirty_two, phex_nz): Remove.
2947 * Makefile.in (SFILES): Add common/print-utils.c.
2948 (OBS): Add print-utils.o.
2949 (print-utils-ipa.o): New target.
2950 (print-utils.o): New target.
2951 (IPA_OBJS): Add print-utils-ipa.o.
2953 2014-02-06 Tom Tromey <tromey@redhat.com>
2955 * Makefile.in (SFILES): Fix indentation.
2957 2014-02-05 Doug Evans <dje@google.com>
2959 * linux-low.c (linux_wait_for_event): Improve comment.
2960 (linux_wait_1): Keep current_inferior in sync with event_child.
2962 2014-01-22 Doug Evans <dje@google.com>
2964 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2966 2014-01-22 Doug Evans <dje@google.com>
2968 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2969 * configure: Regenerate.
2970 * config.in: Regenerate.
2971 * Makefile.in (SFILES): Add debug.c.
2973 * debug.c: New file.
2974 * debug.h: New file.
2975 * linux-aarch64-low.c (*): Update all debugging printfs to use
2976 debug_printf instead of fprintf.
2977 * linux-arm-low.c (*): Ditto.
2978 * linux-cris-low.c (*): Ditto.
2979 * linux-crisv32-low.c (*): Ditto.
2980 * linux-m32r-low.c (*): Ditto.
2981 * linux-sparc-low.c (*): Ditto.
2982 * linux-x86.c (*): Ditto.
2983 * linux-low.c (*): Ditto.
2984 (linux_wait_1): Add calls to debug_enter, debug_exit.
2985 (linux_wait): Remove redundant debugging printf.
2986 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2987 (linux_resume, unstop_all_lwps): Ditto.
2988 * mem-break.c (*): Update all debugging printfs to use
2989 debug_printf instead of fprintf.
2990 * remote-utils.c (*): Ditto.
2991 * thread-db.c (*): Ditto.
2992 * server.c #include <ctype.h>, "gdb_vecs.h".
2993 (debug_threads): Moved to debug.c.
2994 (*): Update all debugging printfs to use debug_printf instead of
2996 (start_inferior): Replace call to fflush with call to debug_flush.
2997 (monitor_show_help): Mention set debug-format.
2998 (parse_debug_format_options): New function.
2999 (handle_monitor_command): Handle "monitor set debug-format".
3000 (gdbserver_usage): Mention --debug-format.
3001 (main): Parse --debug-format.
3002 * server.h (debug_threads): Declaration moved to debug.h.
3004 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3005 trace_debug_1 that uses debug_printf.
3006 (tracepoint_look_up_symbols): Update all debugging printfs to use
3007 debug_printf instead of fprintf.
3009 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3011 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3014 2014-01-17 Pedro Alves <palves@redhat.com>
3017 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3018 defined after including gdb_proc_service.h.
3020 2014-01-16 Doug Evans <dje@google.com>
3022 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3023 (match_dll): Use it.
3025 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3027 * target.h (target_ops) <read_btrace>: Change parameters and
3028 return type to allow error reporting.
3029 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3030 trace reading errors on.
3031 * linux-low.c (linux_low_read_btrace): Pass trace reading
3033 (linux_low_disable_btrace): New.
3035 2014-01-15 Doug Evans <dje@google.com>
3037 * inferiors.c (thread_id_to_gdb_id): Delete.
3038 * inferiors.h (thread_id_to_gdb_id): Delete.
3040 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3042 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3043 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3046 2014-01-08 Pedro Alves <palves@redhat.com>
3048 * server.c (handle_status): Don't discard previous queued stop
3049 replies or thread's pending status here.
3050 (main) <disconnection>: Do it here instead.
3052 2014-01-08 Pedro Alves <palves@redhat.com>
3054 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3055 * server.c (visit_actioned_threads, handle_pending_status): New
3057 (handle_v_cont): Factor out parts to ...
3058 (resume): ... this new function. If in all-stop, and a thread
3059 being resumed has a pending status, report it without actually
3061 (myresume): Adjust to use the new 'resume' function.
3062 (clear_pending_status_callback, set_pending_status_callback)
3063 (find_status_pending_thread_callback): New functions.
3064 (handle_status): Handle the case of multiple threads having
3065 interesting statuses to report. Report threads' real last signal
3066 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3067 with an interesting thread to report the status for, instead of
3068 always reporting the status of the first thread.
3070 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3072 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3073 * gdbreplay.c (gdbreplay_version): Likewise.
3075 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3077 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3078 iov.iov_len with the real length in use.
3080 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3082 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3083 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3084 for all targets that use win32-low.c.
3085 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3086 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3088 2013-12-13 Pedro Alves <palves@redhat.com>
3090 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3091 if equal to TARGET_WAITKIND_LOADED.
3092 * win32-low.c (cached_status): New static global.
3093 (win32_wait): Add declaration.
3094 (do_initial_child_stuff): Flush all initial pending debug events
3095 up to the initial breakpoint.
3096 (win32_wait): If CACHED_STATUS was set, return that instead
3097 of doing a real wait. Remove the code resuming the execution
3098 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3099 during the initial phase. Also remove the code changing
3100 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3101 TARGET_WAITKIND_STOPPED.
3103 2013-12-11 Yao Qi <yao@codesourcery.com>
3105 * notif.c (handle_notif_ack): Return 0 if no notification
3108 2013-11-20 Doug Evans <dje@google.com>
3110 * linux-low.c (linux_set_resume_request): Fix comment.
3112 2013-11-20 Doug Evans <dje@google.com>
3114 * linux-low.c (resume_status_pending_p): Tweak comment.
3116 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3118 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3119 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3120 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3121 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3122 (srv_amd64_regobj): Add amd64-mpx.o.
3123 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3124 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3125 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3126 * i387-fp.c (num_pl_bnd_register) Added constant.
3127 (num_pl_bnd_cfg_registers) Added constant.
3128 (struct i387_xsave) Added reserved area and MPX fields.
3129 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3130 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3132 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3133 (init_registers_amd64_mpx_linux): Declare new function.
3134 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3135 (x86_64_regmap): Add MPX registers.
3136 (x86_linux_read_description): Add MPX case.
3137 (initialize_low_arch): Initialize MPX targets.
3139 2013-11-18 Tom Tromey <tromey@redhat.com>
3141 * configure: Rebuild.
3142 * configure.ac: Don't check for stdlib.h.
3143 * gdbreplay.c: Unconditionally include stdlib.h.
3145 2013-11-18 Tom Tromey <tromey@redhat.com>
3147 * config.in: Rebuild.
3148 * configure: Rebuild.
3149 * configure.ac: Don't use AC_HEADER_DIRENT.
3151 2013-11-18 Tom Tromey <tromey@redhat.com>
3153 * server.h: Don't check HAVE_STRING_H.
3154 * gdbreplay.c: Don't check HAVE_STRING_H.
3155 * configure: Rebuild.
3157 2013-11-18 Tom Tromey <tromey@redhat.com>
3159 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3162 2013-11-08 Tom Tromey <tromey@redhat.com>
3164 * configure, config.in: Rebuild.
3165 * configure.ac: Remove unused configury.
3167 2013-11-08 Tom Tromey <tromey@redhat.com>
3169 * acinclude.m4: Include common.m4, codeset.m4.
3170 * configure, config.in: Rebuild.
3171 * configure.ac: Use GDB_AC_COMMON.
3173 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3175 * linux-s390-low.c (HWCAP_S390_TE): New define.
3176 (s390_arch_setup): Consider the TE field in the HWCAP for
3177 determining 'have_regset_tdb'.
3179 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3182 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3185 2013-10-02 Pedro Alves <palves@redhat.com>
3187 * server.c (process_serial_event): Don't output "GDBserver
3188 exiting" if GDB is connected through stdio.
3189 * target.c (mywait): Likewise, be silent if GDB is connected
3192 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3194 * lynx-low.c (lynx_add_threads_after_attach): New function.
3195 (lynx_attach): Remove call to add_thread. Add call to
3196 lynx_add_threads_after_attach instead.
3198 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3200 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3201 * config.in, configure: Regenerated.
3203 2013-09-18 Yao Qi <yao@codesourcery.com>
3206 * server.c (start_inferior): Clear 'resume_info'.
3208 2013-09-16 Jiong Wang <jiwang@tilera.com>
3210 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3213 2013-09-16 Jiong Wang <jiwang@tilera.com>
3215 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3216 linux-tile-low.o to srv_tgtobj.
3218 2013-09-16 Will Newton <will.newton@linaro.org>
3220 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3223 2013-09-06 Pedro Alves <palves@redhat.com>
3225 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3226 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3227 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3228 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3229 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3230 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3232 2013-09-06 Pedro Alves <palves@redhat.com>
3234 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3235 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3237 2013-09-06 Pedro Alves <palves@redhat.com>
3239 * linux-amd64-ipa.c: Include tracepoint.h.
3240 * linux-i386-ipa.c: Include tracepoint.h.
3242 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3244 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3245 (ps_get_thread_area): New function.
3247 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3249 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3250 (initialize_low_arch): Call init_registers_crisv32 rather than
3251 init_register_crisv32.
3253 2013-09-05 Pedro Alves <palves@redhat.com>
3255 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3257 * hostio.h: ... this new file.
3258 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3259 win32-low.c: Include hostio.h.
3261 2013-09-05 Pedro Alves <palves@redhat.com>
3263 * server.h (gdb_client_data, handler_func, callback_handler_func)
3264 (delete_file_handler, add_file_handler, append_callback_event)
3265 (delete_callback_event, start_event_loop, initialize_event_loop):
3266 Move to event-loop.h and include it.
3267 * event-loop.h: New file.
3269 2013-09-05 Pedro Alves <palves@redhat.com>
3271 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3272 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3273 (loaded_dll, unloaded_dll): Move to ...
3274 * dll.h: ... this new file.
3275 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3277 2013-09-05 Pedro Alves <palves@redhat.com>
3279 * server.h (current_process, get_thread_process, all_processes)
3280 (add_inferior_to_list, for_each_inferior, current_inferior)
3281 (remove_inferior, add_process, remove_process, find_process_pid)
3282 (have_started_inferiors_p, have_attached_inferiors_p)
3283 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3284 (clear_inferiors, find_inferior, find_inferior_id)
3285 (inferior_target_data, set_inferior_target_data)
3286 (inferior_regcache_data, set_inferior_regcache_data): Move to
3287 inferiors.h, and include it.
3288 * inferiors.h: New file.
3290 2013-09-05 Pedro Alves <palves@redhat.com>
3292 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3296 2013-09-05 Pedro Alves <palves@redhat.com>
3298 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3300 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3301 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3302 (handle_tracepoint_general_set, handle_tracepoint_query)
3303 (tracepoint_finished_step, tracepoint_was_hit)
3304 (release_while_stepping_state_list, current_traceframe)
3305 (in_readonly_region, traceframe_read_mem)
3306 (fetch_traceframe_registers, traceframe_read_sdata)
3307 (traceframe_read_info, struct fast_tpoint_collect_status)
3308 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3309 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3310 (supply_fast_tracepoint_registers)
3311 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3312 (ipa_tdesc, claim_trampoline_space)
3313 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3314 (agent_mem_read, agent_get_trace_state_variable_value)
3315 (agent_set_trace_state_variable_value, agent_tsv_read)
3316 (agent_mem_read_string, get_raw_reg_func_addr)
3317 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3318 * tracepoint.h: ... this new file.
3320 2013-09-05 Pedro Alves <palves@redhat.com>
3322 * server.h (perror_with_name, error, fatal, warning, paddress)
3323 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3325 * utils.h: New file.
3327 2013-09-05 Pedro Alves <palves@redhat.com>
3329 * server.h (remote_debug, noack_mode, transport_is_reliable)
3330 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3331 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3332 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3333 (write_enn, initialize_async_io, enable_async_io)
3334 (disable_async_io, check_remote_input_interrupt_request)
3335 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3336 (dead_thread_notify, prepare_resume_reply)
3337 (decode_address_to_semicolon, decode_address, decode_m_packet)
3338 (decode_M_packet, decode_X_packet, decode_xfer_write)
3339 (decode_search_memory_packet, unhexify, hexify)
3340 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3341 (look_up_one_symbol, relocate_instruction)
3342 (monitor_output): Move to remote-utils.h, and include it.
3343 * remote-utils.h: New file.
3345 2013-09-05 Pedro Alves <palves@redhat.com>
3347 * server.h (_): Delete.
3349 2013-09-02 Pedro Alves <palves@redhat.com>
3351 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3352 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3354 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3356 2013-09-02 Pierre Muller <muller@sourceware.org>
3358 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3359 or WriteProcessMemory complete successfully and handle
3360 ERROR_PARTIAL_COPY error.
3362 2013-09-02 Pedro Alves <palves@redhat.com>
3364 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3365 error instead of EIO.
3367 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3370 * linux-low.c: Include filestuff.h.
3371 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3372 * lynx-low.c: Include filestuff.h.
3373 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3374 * server.c: Include filestuff.h.
3375 (main): Call notice_open_fds.
3376 * spu-low.c: Include filestuff.h.
3377 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3379 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3381 * Makefile.in: Explain why ../target and ../nat are not
3382 listed as include file search paths.
3383 (linux-waitpid.o): New object file rule.
3384 * configure.srv (srv_native_linux_obj): New variable.
3385 Replace all occurrences of linux native object files with
3386 $srv_native_linux_obj.
3387 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3388 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3389 (linux_enable_event_reporting): Remove declaration.
3390 (my_waitpid): Moved to common/linux-waitpid.c.
3391 (linux_wait_for_event): Pass ptid when calling
3392 linux_enable_event_reporting.
3393 (linux_supports_tracefork_flag): Remove.
3394 (linux_enable_event_reporting): Likewise.
3395 (linux_tracefork_grandchild): Remove.
3396 (STACK_SIZE): Moved to common/linux-ptrace.c.
3397 (linux_tracefork_child): Remove.
3398 (linux_test_for_tracefork): Remove.
3399 (linux_look_up_symbols): Call linux_supports_traceclone.
3400 (initialize_low): Remove call to linux_test_for_tracefork.
3401 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3402 common/linux-ptrace.h.
3403 (PTRACE_TYPE_ARG4): Likewise.
3404 Include linux-ptrace.h.
3406 2013-08-21 Pedro Alves <palves@redhat.com>
3408 * config.in: Renegerate.
3410 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3412 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3413 (SFILES): Remove $(srcdir)/common/target-common.c and
3414 add $(srcdir)/target/waitstatus.c.
3415 (OBS): Remove target-common.o and add waitstatus.o.
3416 (server_h): Remove $(srcdir)/../common/target-common.h and
3417 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3418 and $(srcdir)/../target/waitstatus.h.
3419 (target-common.o): Remove.
3420 (waitstatus.o): New target object file.
3421 * target.h: Do not include target-common.h and
3422 include target/resume.h, target/wait.h and
3423 target/waitstatus.h.
3425 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3427 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3428 to PTRACE_TYPE_ARG3.
3429 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3430 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3432 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3433 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3435 2013-07-27 Jie Zhang <jie@codesourcery.com>
3436 Daniel Jacobowitz <dan@codesourcery.com>
3437 Yao Qi <yao@codesourcery.com>
3439 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3440 (mips-linux-watch.o): New rule.
3441 (mips_linux_watch_h): New variable.
3442 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3444 * linux-mips-low.c: Include mips-linux-watch.h.
3445 (struct arch_process_info, struct arch_lwp_info): New.
3446 (update_watch_registers_callback): New function.
3447 (mips_linux_new_process, mips_linux_new_thread) New functions.
3448 (mips_linux_prepare_to_resume, mips_insert_point): New
3450 (mips_remove_point, mips_stopped_by_watchpoint): New
3452 (rsp_bp_type_to_target_hw_bp_type): New function.
3453 (mips_stopped_data_address): New function.
3454 (the_low_target): Add watchpoint support functions.
3456 2013-07-27 Yao Qi <yao@codesourcery.com>
3458 * i386-low.c: Include break-common.h.
3459 (enum target_hw_bp_type): Remove.
3461 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3463 * Makefile.in (SFILES): /common/target-common.c.
3464 (OBS): Add target-common.o.
3465 (server_h): Add $(srcdir)/../common/target-common.h.
3466 (target-common.o): New target.
3467 * server.c (queue_stop_reply_callback): Free
3468 status string after use.
3469 * target.c (target_waitstatus_to_string): Remove.
3470 * target.h: Include target-common.h.
3471 (resume_kind): Likewise.
3472 (target_waitkind): Likewise.
3473 (target_waitstatus): Likewise.
3474 (TARGET_WNOHANG): Likewise.
3476 2013-07-04 Yao Qi <yao@codesourcery.com>
3478 * Makefile.in (host_alias): Use @host_noncanonical@.
3479 (target_alias): Use @target_noncanonical@.
3480 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3481 ACX_NONCANONICAL_HOST.
3482 * configure: Regenerated.
3485 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3487 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3488 * configure: Rebuild.
3489 * Makefile.in (version_host, version_target): Get from configure.
3490 (version.c): Use $(version_host) and $(version_target).
3492 2013-07-03 Pedro Alves <palves@redhat.com>
3494 * Makefile.in (config.status): Depend on development.sh.
3495 * acinclude.m4: Include libmcheck.m4.
3496 * configure: Regenerate.
3498 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3500 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3501 attribute inside the parentheses.
3502 (winapi_DebugSetProcessKillOnExit): Ditto.
3503 (winapi_DebugBreakProcess): Ditto.
3504 (winapi_GenerateConsoleCtrlEvent): Ditto.
3506 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3508 * notif.h (notif_event): Add a dummy member to avoid compiler
3511 2013-07-01 Pedro Alves <palves@redhat.com>
3513 * hostio.c (HOSTIO_PATH_MAX): Define.
3514 (require_filename, handle_open, handle_unlink, handle_readlink):
3517 2013-07-01 Pedro Alves <palves@redhat.com>
3519 * server.h: Include "pathmax.h".
3520 * linux-low.c: Don't include sys/param.h.
3521 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3523 * win32-low.c: Don't include sys/param.h.
3524 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3526 2013-07-01 Pedro Alves <palves@redhat.com>
3528 * event-loop.c: Don't check HAVE_UNISTD_H before including
3530 * gdbreplay.c: Likewise.
3531 * remote-utils.c: Likewise.
3532 * server.c: Likewise.
3533 * configure.ac: Don't check for unistd.h.
3534 * configure: Regenerate.
3536 2013-06-28 Tom Tromey <tromey@redhat.com>
3538 * Makefile.in (version.c): Use version.in, not
3541 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3543 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3544 * configure: Rebuild.
3545 * Makefile.in (version_host, version_target): Get from configure.
3546 (version.c): Use $(version_host) and $(version_target).
3548 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3550 Fix trace-status to output user name without trailing colon.
3551 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3553 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3555 Fix trace-status to output proper start-time and stop-time.
3556 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3557 output start time and stop time in hex as gdb expects.
3559 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3561 * tracepoint.c (build_traceframe_info_xml): Output trace state
3562 variables present in the trace buffer.
3564 2013-06-24 Tom Tromey <tromey@redhat.com>
3566 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3568 (version.o): Remove.
3569 * gdbreplay.c: Include version.h.
3570 (version, host_name): Don't declare.
3571 * server.h: Include version.h.
3572 (version, host_name): Don't declare.
3574 2013-06-12 Pedro Alves <palves@redhat.com>
3576 * linux-x86-low.c (linux_is_elf64): Delete global.
3577 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3578 with local linux_pid_exe_is_elf_64_file use.
3580 2013-06-11 Pedro Alves <palves@redhat.com>
3582 * linux-low.c (regset_disabled, disable_regset): New functions.
3583 (regsets_fetch_inferior_registers)
3584 (regsets_store_inferior_registers): Use them.
3585 (initialize_regsets_info); Don't allocate the disabled_regsets
3587 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3590 2013-06-11 Pedro Alves <palves@redhat.com>
3592 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3595 2013-06-11 Pedro Alves <palves@redhat.com>
3597 * linux-x86-low.c (initialize_low_arch): Call
3598 init_registers_x32_avx_linux.
3600 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3602 Fix compatibility with Android Bionic.
3603 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3606 2013-06-07 Pedro Alves <palves@redhat.com>
3609 * Makefile.in (OBS): Add tdesc.o.
3610 (IPA_OBJS): Add tdesc-ipa.o.
3611 (tdesc-ipa.o): New rule.
3612 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3614 * linux-low.c (new_inferior): Delete.
3615 (disabled_regsets, num_regsets): Delete.
3616 (linux_add_process): Adjust to set the new per-process
3618 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3619 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3620 was a stop. When calling arch_setup, switch the current inferior
3621 to the thread that got an event.
3622 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3623 (regsets_fetch_inferior_registers)
3624 (regsets_store_inferior_registers): New regsets_info parameter.
3626 (linux_register_in_regsets): New regs_info parameter. Adjust to
3628 (register_addr, fetch_register, store_register): New usrregs_info
3629 parameter. Adjust to use it.
3630 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3631 parameter regs_info. Adjust to use it.
3632 (linux_fetch_registers): Get the current inferior's regs_info, and
3634 (linux_store_registers): Ditto.
3635 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3636 (initialize_low): Don't initialize the target_regsets here. Call
3637 initialize_low_arch.
3638 * linux-low.h (target_regsets): Delete declaration.
3639 (struct regsets_info): New.
3640 (struct usrregs_info): New.
3641 (struct regs_info): New.
3642 (struct process_info_private) <new_inferior>: New field.
3643 (struct linux_target_ops): Delete the num_regs, regmap, and
3644 regset_bitmap fields. New field regs_info.
3645 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3646 * i387-fp.c (num_xmm_registers): Delete.
3647 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3648 calls to new interface.
3649 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3650 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3651 Infer the number of xmm registers from the regcache's target
3653 * i387-fp.h (num_xmm_registers): Delete.
3654 * inferiors.c (add_thread): Don't install the thread's regcache
3656 * proc-service.c (gregset_info): Fetch the current inferior's
3657 regs_info. Adjust to use it.
3658 * regcache.c: Include tdesc.h.
3659 (register_bytes, reg_defs, num_registers)
3660 (gdbserver_expedite_regs): Delete.
3661 (get_thread_regcache): If the thread doesn't have a regcache yet,
3662 create one, instead of aborting gdbserver.
3663 (regcache_invalidate_one): Rename to ...
3664 (regcache_invalidate_thread): ... this.
3665 (regcache_invalidate_one): New.
3666 (regcache_invalidate): Only invalidate registers of the current
3668 (init_register_cache): Add target_desc parameter, and use it.
3669 (new_register_cache): Ditto. Assert the target description has a
3670 non zero registers_size.
3671 (regcache_cpy): Add assertions. Adjust.
3672 (realloc_register_cache, set_register_cache): Delete.
3673 (registers_to_string, registers_from_string): Adjust.
3674 (find_register_by_name, find_regno, find_register_by_number)
3675 (register_cache_size): Add target_desc parameter, and use it.
3676 (free_register_cache_thread, free_register_cache_thread_one)
3677 (regcache_release, register_cache_size): New.
3678 (register_size): Add target_desc parameter, and use it.
3679 (register_data, supply_register, supply_register_zeroed)
3680 (supply_regblock, supply_register_by_name, collect_register)
3681 (collect_register_as_string, collect_register_by_name): Adjust.
3682 * regcache.h (struct target_desc): Forward declare.
3683 (struct regcache) <tdesc>: New field.
3684 (init_register_cache, new_register_cache): Add target_desc
3686 (regcache_invalidate_thread): Declare.
3687 (regcache_invalidate_one): Delete declaration.
3688 (regcache_release): Declare.
3689 (find_register_by_number, register_cache_size, register_size)
3690 (find_regno): Add target_desc parameter.
3691 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3693 * remote-utils.c: Include tdesc.h.
3694 (outreg, prepare_resume_reply): Adjust.
3695 * server.c: Include tdesc.h.
3696 (gdbserver_xmltarget): Delete declaration.
3697 (get_features_xml, process_serial_event): Adjust.
3698 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3700 (struct process_info) <tdesc>: New field.
3701 (ipa_tdesc): Declare.
3702 * tdesc.c: New file.
3703 * tdesc.h: New file.
3704 * tracepoint.c: Include tdesc.h.
3705 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3706 (get_context_regcache): Adjust to pass ipa_tdesc down.
3707 (do_action_at_tracepoint): Adjust to get the register cache size
3708 from the context regcache's description.
3709 (traceframe_walk_blocks): Adjust to get the register cache size
3710 from the current trace frame's description.
3711 (traceframe_get_pc): Adjust to get current trace frame's
3712 description and pass it down.
3713 (gdb_collect): Adjust to get the register cache size from the
3715 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3716 (gdbserver_xmltarget): Delete.
3717 (initialize_low_tracepoint): Set the ipa's target description.
3718 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3719 (initialize_low_tracepoint): Set the ipa's target description.
3720 * linux-x86-low.c: Include tdesc.h.
3721 [__x86_64__] (is_64bit_tdesc): New.
3722 (ps_get_thread_area, x86_get_thread_area): Use it.
3723 (i386_cannot_store_register): Rename to ...
3724 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3725 (i386_cannot_fetch_register): Rename to ...
3726 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3727 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3729 (target_regsets): Rename to ...
3730 (x86_regsets): ... this.
3731 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3733 (x86_siginfo_fixup): Use is_64bit_tdesc.
3734 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3735 (tdesc_x32_avx_linux, tdesc_x32_linux)
3736 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3738 (x86_linux_update_xmltarget): Delete.
3739 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3740 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3741 (AMD64_LINUX_USER64_CS): New.
3742 (x86_linux_read_description): New, based on
3743 x86_linux_update_xmltarget.
3744 (same_process_callback): New.
3745 (x86_arch_setup_process_callback): New.
3746 (x86_linux_update_xmltarget): New.
3747 (x86_regsets_info): New.
3748 (amd64_linux_regs_info): New.
3749 (i386_linux_usrregs_info): New.
3750 (i386_linux_regs_info): New.
3751 (x86_linux_regs_info): New.
3752 (x86_arch_setup): Reimplement.
3753 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3754 (x86_emit_ops): Ditto.
3755 (the_low_target): Adjust. Install x86_linux_regs_info,
3756 x86_cannot_fetch_register, and x86_cannot_store_register.
3757 (initialize_low_arch): New.
3758 * linux-ia64-low.c (tdesc_ia64): Declare.
3759 (ia64_fetch_register): Adjust.
3760 (ia64_usrregs_info, regs_info): New globals.
3761 (ia64_regs_info): New function.
3762 (the_low_target): Adjust.
3763 (initialize_low_arch): New function.
3764 * linux-sparc-low.c (tdesc_sparc64): Declare.
3765 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3767 (sparc_arch_setup): New function.
3768 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3769 (the_low_target): Adjust.
3770 (initialize_low_arch): New function.
3771 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3772 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3773 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3774 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3775 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3776 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3777 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3778 (tdesc_powerpc_isa205_vsx64l): Declare.
3779 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3780 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3781 (ppc_set_pc, ppc_get_hwcap): Adjust.
3782 (ppc_usrregs_info): Forward declare.
3783 (!__powerpc64__) ppc_regmap_adjusted: New global.
3784 (ppc_arch_setup): Adjust to the current process'es target
3786 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3787 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3788 (ppc_store_evrregset): Adjust.
3789 (target_regsets): Rename to ...
3790 (ppc_regsets): ... this, and make static.
3791 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3792 (ppc_regs_info): New function.
3793 (the_low_target): Adjust.
3794 (initialize_low_arch): New function.
3795 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3796 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3797 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3798 (tdesc_s390x_linux64v2): Declare.
3799 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3800 (s390_fill_gregset, s390_store_last_break): Adjust.
3801 (target_regsets): Rename to ...
3802 (s390_regsets): ... this, and make static.
3803 (s390_get_pc, s390_set_pc): Adjust.
3804 (s390_get_hwcap): New target_desc parameter, and use it.
3805 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3806 (s390_arch_setup): Adjust to set the current process'es target
3807 description. Don't adjust the regmap.
3808 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3809 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3810 (regs_info_3264): New globals.
3811 (s390_regs_info): New function.
3812 (the_low_target): Adjust.
3813 (initialize_low_arch): New function.
3814 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3815 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3816 [__mips64] (init_registers_mips_linux)
3817 (init_registers_mips_dsp_linux): Delete defines.
3818 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3819 (have_dsp): New global.
3820 (mips_read_description): New, based on mips_arch_setup.
3821 (mips_arch_setup): Reimplement.
3822 (get_usrregs_info): New function.
3823 (mips_cannot_fetch_register, mips_cannot_store_register)
3824 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3825 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3826 (target_regsets): Rename to ...
3827 (mips_regsets): ... this, and make static.
3828 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3829 (dsp_regs_info, regs_info): New globals.
3830 (mips_regs_info): New function.
3831 (the_low_target): Adjust.
3832 (initialize_low_arch): New function.
3833 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3834 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3836 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3837 (arm_read_description): New, with bits factored from
3839 (arm_arch_setup): Reimplement.
3840 (target_regsets): Rename to ...
3841 (arm_regsets): ... this, and make static.
3842 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3843 (arm_regs_info): New function.
3844 (the_low_target): Adjust.
3845 (initialize_low_arch): New function.
3846 * linux-m68k-low.c (tdesc_m68k): Declare.
3847 (target_regsets): Rename to ...
3848 (m68k_regsets): ... this, and make static.
3849 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3850 (m68k_regs_info): New function.
3851 (m68k_arch_setup): New function.
3852 (the_low_target): Adjust.
3853 (initialize_low_arch): New function.
3854 * linux-sh-low.c (tdesc_sharch): Declare.
3855 (target_regsets): Rename to ...
3856 (sh_regsets): ... this, and make static.
3857 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3858 (sh_regs_info, sh_arch_setup): New functions.
3859 (the_low_target): Adjust.
3860 (initialize_low_arch): New function.
3861 * linux-bfin-low.c (tdesc_bfin): Declare.
3862 (bfin_arch_setup): New function.
3863 (bfin_usrregs_info, regs_info): New globals.
3864 (bfin_regs_info): New function.
3865 (the_low_target): Adjust.
3866 (initialize_low_arch): New function.
3867 * linux-cris-low.c (tdesc_cris): Declare.
3868 (cris_arch_setup): New function.
3869 (cris_usrregs_info, regs_info): New globals.
3870 (cris_regs_info): New function.
3871 (the_low_target): Adjust.
3872 (initialize_low_arch): New function.
3873 * linux-cris-low.c (tdesc_crisv32): Declare.
3874 (cris_arch_setup): New function.
3875 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3876 (cris_regs_info): New function.
3877 (the_low_target): Adjust.
3878 (initialize_low_arch): New function.
3879 * linux-m32r-low.c (tdesc_m32r): Declare.
3880 (m32r_arch_setup): New function.
3881 (m32r_usrregs_info, regs_info): New globals.
3882 (m32r_regs_info): Adjust.
3883 (initialize_low_arch): New function.
3884 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3885 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3886 (tic6x_usrregs_info): Forward declare.
3887 (tic6x_read_description): New function, based on ...
3888 (tic6x_arch_setup): ... this. Reimplement.
3889 (target_regsets): Rename to ...
3890 (tic6x_regsets): ... this, and make static.
3891 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3892 (tic6x_regs_info): New function.
3893 (the_low_target): Adjust.
3894 (initialize_low_arch): New function.
3895 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3896 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3897 (target_regsets): Rename to ...
3898 (xtensa_regsets): ... this, and make static.
3899 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3901 (xtensa_arch_setup, xtensa_regs_info): New functions.
3902 (the_low_target): Adjust.
3903 (initialize_low_arch): New function.
3904 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3905 (nios2_arch_setup): Set the current process'es tdesc.
3906 (target_regsets): Rename to ...
3907 (nios2_regsets): ... this.
3908 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3909 (nios2_regs_info): New function.
3910 (the_low_target): Adjust.
3911 (initialize_low_arch): New function.
3912 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3913 (aarch64_arch_setup): Set the current process'es tdesc.
3914 (target_regsets): Rename to ...
3915 (aarch64_regsets): ... this.
3916 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3917 (aarch64_regs_info): New function.
3918 (the_low_target): Adjust.
3919 (initialize_low_arch): New function.
3920 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3922 (target_regsets): Rename to ...
3923 (tile_regsets): ... this.
3924 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3925 (tile_regs_info): New function.
3926 (tile_arch_setup): Set the current process'es tdesc.
3927 (the_low_target): Adjust.
3928 (initialize_low_arch): New function.
3929 * spu-low.c (tdesc_spu): Declare.
3930 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3931 * win32-arm-low.c (tdesc_arm): Declare.
3932 (arm_arch_setup): New function.
3933 (the_low_target): Install arm_arch_setup instead of
3935 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3936 (init_windows_x86): Rename to ...
3937 (i386_arch_setup): ... this. Set `win32_tdesc'.
3938 (the_low_target): Adjust.
3939 * win32-low.c (win32_tdesc): New global.
3940 (child_add_thread): Don't create the thread cache here.
3941 (do_initial_child_stuff): Set the new process'es tdesc.
3942 * win32-low.h (struct target_desc): Forward declare.
3943 (win32_tdesc): Declare.
3944 * lynx-i386-low.c (tdesc_i386): Declare global.
3945 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3946 * lynx-low.c (lynx_tdesc): New global.
3947 (lynx_add_process): Set the new process'es tdesc.
3948 * lynx-low.h (struct target_desc): Forward declare.
3949 (lynx_tdesc): Declare global.
3950 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3951 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3952 * nto-low.c (nto_tdesc): New global.
3953 (do_attach): Set the new process'es tdesc.
3954 * nto-low.h (struct target_desc): Forward declare.
3955 (nto_tdesc): Declare.
3956 * nto-x86-low.c (tdesc_i386): Declare.
3957 (nto_x86_arch_setup): Set `nto_tdesc'.
3959 2013-06-04 Gary Benson <gbenson@redhat.com>
3961 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3962 to qSupported response when appropriate.
3963 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3964 with nonzero-length annex.
3965 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3966 arguments supplied in annex.
3968 2013-05-31 Doug Evans <dje@google.com>
3971 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3972 64 bits in 64-cross-32 environment.
3974 2013-05-28 Pedro Alves <palves@redhat.com>
3976 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3977 (aarch64-without-fpu.c): Delete rule.
3978 * configure.srv (aarch64*-*-linux*): Remove references to
3979 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3980 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3983 2013-05-24 Pedro Alves <palves@redhat.com>
3985 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3986 instead of strchr/decode_address. Error if the range isn't split
3987 with a ','. Don't assume there's be a ':' in the action.
3989 2013-05-23 Yao Qi <yao@codesourcery.com>
3990 Pedro Alves <palves@redhat.com>
3992 * linux-low.c (lwp_in_step_range): New function.
3993 (linux_wait_1): If the thread was range stepping and stopped
3994 outside the stepping range, report the stop to GDB. Otherwise,
3995 continue stepping. Add range stepping debug output.
3996 (linux_set_resume_request): Copy the step range from the resume
3998 (linux_supports_range_stepping): New.
3999 (linux_target_ops) <supports_range_stepping>: Set to
4000 linux_supports_range_stepping.
4001 * linux-low.h (struct linux_target_ops)
4002 <supports_range_stepping>: New field.
4003 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4004 * linux-x86-low.c (x86_supports_range_stepping): New.
4005 (the_low_target) <supports_range_stepping>: Set to
4006 x86_supports_range_stepping.
4007 * server.c (handle_v_cont): Handle 'r' action.
4008 (handle_v_requests): Append ";r" if the target supports range
4010 * target.h (struct thread_resume) <step_range_start,
4011 step_range_end>: New fields.
4012 (struct target_ops) <supports_range_stepping>:
4014 (target_supports_range_stepping): New macro.
4016 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4018 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4019 confusion in comment.
4021 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4023 * lynx-low.c (struct process_info_private): New type.
4024 (lynx_add_process): New function.
4025 (lynx_create_inferior, lynx_attach): Replace calls to
4026 add_process by calls to lynx_add_process.
4027 (lynx_resume): If PTID is null, then try using
4028 current_process()->private->last_wait_event_ptid.
4030 (lynx_clear_inferiors): Delete. The contents of that function
4031 has been inlined in lynx_mourn;
4032 (lynx_wait_1): Save the ptid in the process's private data.
4033 (lynx_mourn): Free the process' private data. Replace call
4034 to lynx_clear_inferiors by call to clear_inferiors.
4036 2013-05-17 Yao Qi <yao@codesourcery.com>
4038 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4041 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4043 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4044 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4045 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4046 PT_TEXT_END_ADDR guards. Update comments.
4047 (linux_target_op) <read_offsets>: Conditionally define to
4048 linux_read_offsets if the target is UCLIBC and if it defines
4049 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4051 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4052 Andrew Jenner <andrew@codesourcery.com>
4054 * Makefile.in (SFILES): Add linux-nios2-low.c.
4055 (clean): Add action to delete nios2-linux.c.
4056 (nios2-linux.c): New rule.
4057 * configure.srv: Add nios2*-*-linux*.
4058 * linux-nios2-low.c: New.
4060 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4062 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4064 2013-04-25 Hui Zhu <hui@codesourcery.com>
4067 * ax.c (ax_printf): Add fflush.
4069 2013-04-22 Tom Tromey <tromey@redhat.com>
4071 * Makefile.in (SFILES): Add filestuff.c.
4072 (OBS): Add filestuff.o.
4073 (filestuff.o): New target.
4074 * config.in, configure: Rebuild.
4075 * configure.ac: Check for fdwalk, pipe2.
4077 2013-04-17 Pedro Alves <palves@redhat.com>
4079 * configure.ac (USE_THREAD_DB): Delete variable.
4080 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4081 Don't AC_SUBST USE_THREAD_DB.
4082 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4083 * config.in, configure: Regenerate.
4085 2013-04-16 Pedro Alves <palves@redhat.com>
4087 * linux-low.h (struct lwp_info) <thread_known>: Move under
4088 the USE_THREAD_DB #ifdef.
4090 2013-04-16 Pedro Alves <palves@redhat.com>
4092 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4093 (linux-low.o): Delete rule.
4094 * linux-low.h: Always include "gdb_thread_db.h" instead of
4095 conditionally including thread_db.h.
4096 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4099 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4101 * Makefile.in (install-only): Fix make install regression.
4103 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4105 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4106 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4108 * gdbserver.1: Remove.
4110 2013-03-22 Pedro Alves <palves@redhat.com>
4112 * linux-low.c (handle_extended_wait): Don't call
4113 linux_enable_event_reporting.
4115 2013-03-15 Tony Theodore <tonyt@logyst.com>
4118 * Makefile.in (SHELL): Use @SHELL@.
4120 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4122 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4125 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4127 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4128 Remove extraneous NULL element.
4130 2013-03-13 Yao Qi <yao@codesourcery.com>
4132 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4133 'V' block in trace frame.
4135 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4137 * target.h (struct target_ops): Add btrace ops.
4138 (target_supports_btrace): New macro.
4139 (target_enable_btrace): New macro.
4140 (target_disable_btrace): New macro.
4141 (target_read_btrace): New macro.
4142 * gdbthread.h (struct thread_info): Add btrace field.
4143 * server.c: Include btrace-common.h.
4144 (handle_btrace_general_set): New function.
4145 (handle_btrace_enable): New function.
4146 (handle_btrace_disable): New function.
4147 (handle_general_set): Call handle_btrace_general_set.
4148 (handle_qxfer_btrace): New function.
4149 (struct qxfer qxfer_packets[]): Add btrace entry.
4150 * inferiors.c (remove_thread): Disable btrace.
4151 * linux-low: Include linux-btrace.h.
4152 (linux_low_enable_btrace): New function.
4153 (linux_low_read_btrace): New function.
4154 (linux_target_ops): Add btrace ops.
4155 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4156 Add srv_linux_btrace=yes.
4157 (x86_64-*-linux*): Add linux-btrace.o.
4158 Add srv_linux_btrace=yes.
4159 * configure.ac: Define HAVE_LINUX_BTRACE.
4160 * config.in: Regenerated.
4161 * configure: Regenerated.
4163 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4165 * server.c (handle_qxfer): Preserve error message if -3 is
4167 (qxfer): Document the -3 return value.
4169 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4171 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4172 (linux_btrace_h): New variable.
4173 (linux-btrace.o): New rule.
4175 2013-03-08 Stan Shebs <stan@codesourcery.com>
4176 Hafiz Abid Qadeer <abidh@codesourcery.com>
4178 * tracepoint.c (trace_buffer_size): New global.
4179 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4180 (init_trace_buffer): Change to one-argument function. Allocate
4181 trace buffer memory.
4182 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4183 handle QTBuffer:size packet.
4184 (cmd_bigqtbuffer_size): New function.
4185 (initialize_tracepoint): Call init_trace_buffer with
4186 DEFAULT_TRACE_BUFFER_SIZE.
4187 * server.c (handle_query): Add QTBuffer:size in the
4190 2013-03-07 Yao Qi <yao@codesourcery.com>
4192 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4193 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4195 (cmd_qtsp): Adjust condition. Do post increment.
4196 Set cur_action and cur_step_action back to 0.
4198 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4201 * linux-low.c (linux_write_memory): Return early success if LEN is
4204 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4206 * configure.srv: Add x86_64-*-cygwin* as target.
4208 2013-02-28 Tom Tromey <tromey@redhat.com>
4210 * configure.ac: Invoke AC_SYS_LARGEFILE.
4211 * configure, config.in: Rebuild.
4213 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4215 * win32-low.c: Throughout, fix format strings and casts of
4216 printf-like functions to avoid type related warnings on all
4218 (get_child_debug_event): Print dwDebugEventCode as hex since
4219 that's how it's usually documented.
4221 2013-02-28 Yao Qi <yao@codesourcery.com>
4223 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4226 2013-02-27 Jiong Wang <jiwang@tilera.com>
4228 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4229 (reg-tilegx32.c): New rule.
4230 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4231 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4232 different register info initializer according to elf class.
4233 (init_registers_tilgx32): New function. The tilegx32 register info
4235 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4236 (tile_store_gregset): Likewise.
4238 2013-02-27 Yao Qi <yao@codesourcery.com>
4240 * server.c (process_point_options): Print debug message when
4241 debug_threads is true.
4243 2013-02-26 Yao Qi <yao@codesourcery.com>
4245 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4247 2013-02-19 Pedro Alves <palves@redhat.com>
4248 Kai Tietz <ktietz@redhat.com>
4252 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4253 instead of strtoul to extract address from packet.
4254 (process_serial_event) <'z'>: Likewise.
4256 2013-02-18 Yao Qi <yao@codesourcery.com>
4258 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4260 2013-02-14 Pedro Alves <palves@redhat.com>
4264 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4265 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4267 2013-02-14 Pedro Alves <palves@redhat.com>
4269 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4271 2013-02-14 Pedro Alves <palves@redhat.com>
4273 * tracepoint.c (save_string): Delete.
4274 (add_tracepoint_action): Use savestring instead of save_string.
4276 2013-02-12 Pedro Alves <palves@redhat.com>
4278 * linux-xtensa-low.c: Ditto.
4279 * xtensa-xtregs.c: Ditto.
4281 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4283 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4286 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4288 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4289 aarch64_num_wp_regs and aarch64_num_bp_regs to
4290 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4292 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4294 * linux-aarch64-low.c (ps_get_thread_area): Replace
4295 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4297 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4298 Marcus Shawcroft <marcus.shawcroft@arm.com>
4299 Nigel Stephens <nigel.stephens@arm.com>
4300 Yufeng Zhang <yufeng.zhang@arm.com>
4302 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4303 (aarch64.c, aarch64-without-fpu.c): New targets.
4304 * configure.srv (aarch64*-*-linux*): New.
4305 * linux-aarch64-low.c: New file.
4307 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4309 * linux-low.c (handle_extended_wait, linux_create_inferior)
4310 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4311 (dequeue_one_deferred_signal, linux_resume_one_thread)
4312 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4313 (linux_tracefork_grandchild, linux_test_for_tracefork)
4314 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4315 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4316 where the argument is 0.
4318 2013-01-25 Yao Qi <yao@codesourcery.com>
4320 * event-loop.c: Include "queue.h".
4321 (gdb_event_p): New typedef.
4322 (struct gdb_event) <next_event>: Remove.
4323 (event_queue): Change to QUEUE(gdb_event_p).
4324 (async_queue_event): Remove.
4325 (gdb_event_xfree): New.
4326 (initialize_event_loop): New.
4327 (process_event): Use API from QUEUE.
4328 (wait_for_event): Likewise.
4329 * server.c (main): Call initialize_event_loop.
4330 * server.h (initialize_event_loop): Declare.
4332 2013-01-18 Yao Qi <yao@codesourcery.com>
4334 * ax.h (struct eval_agent_expr_context): New.
4335 (gdb_eval_agent_expr): Update declaration.
4336 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4337 TFRAME. Add new argument CTX.
4338 * server.h (struct eval_agent_expr_context): Declare.
4339 (agent_mem_read, agent_tsv_read): Update declaration.
4340 (agent_mem_read_string): Likewise.
4341 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4342 (add_traceframe_block): Add new argument TPOINT.
4343 Increase TPOINT->traceframe_usage.
4344 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4345 eval_tracepoint_agent_expr.
4346 (condition_true_at_tracepoint): Likewise.
4347 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4348 (agent_mem_read_string, agent_tsv_read): Likewise.
4350 2013-01-16 Yao Qi <yao@codesourcery.com>
4352 * linux-low.c (linux_resume_one_lwp): Don't check
4353 'lwp->bp_reinsert != 0'.
4355 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4356 Pedro Alves <palves@redhat.com>
4358 * lynx-low.c (ptrace_request_to_str): Define a temporary
4359 macro and use it to simplify this function's implementation.
4361 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4363 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4366 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4368 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4370 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4372 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4374 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4376 * lynx-low.c (lynx_resume): Use the resume_info parameter
4377 to determine the ptid for the lynx_ptrace call, unless
4378 it is equal to minus_one_ptid, in which case we use the
4379 ptid of the current_inferior.
4380 (lynx_wait_1): After having received a thread create/exit
4381 event, resume the inferior's execution using the signaling
4382 thread's ptid, rather than the old ptid.
4384 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4386 * lynx-low.c (lynx_resume): Delete variable ret.
4388 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4390 * gdbreplay.c (gdbreplay_version): Update copyright year.
4391 * server.c (gdbserver_version): Likewise.
4393 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4395 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4398 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4400 * lynx-low.c (ptrace_request_to_str): Add handling for
4403 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4405 * lynx-low.c (lynx_attach): Delete variable new_process.
4407 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4409 * lynx-low.c (lynx_create_inferior): Delete variable
4412 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4414 * lynx-low.c (ptrace_request_to_str): Do not handle
4415 PTRACE_GETTHREADLIST if this macro does not exist.
4417 2012-12-15 Yao Qi <yao@codesourcery.com>
4419 * Makefile.in (OBS): Add notif.o.
4420 * notif.c, notif.h: New.
4421 * server.c: Include "notif.h".
4422 (struct vstop_notif) <next>: Remove.
4424 (queue_stop_reply): Update.
4425 (push_event, send_next_stop_reply): Remove.
4426 (discard_queued_stop_replies): Update.
4427 (notif_stop): New variable.
4428 (handle_v_stopped): Remove.
4429 (handle_v_requests): Don't call handle_v_stopped. Call
4430 handle_ack_notif instead.
4431 (queue_stop_reply_callback): Call notif_event_enque instead
4432 of queue_stop_reply.
4433 (handle_status): Don't call send_next_stop_reply, call
4434 notif_write_event instead.
4435 (kill_inferior_callback): Likewise.
4436 (detach_or_kill_inferior_callback): Likewise.
4437 (main): Call initialize_notif.
4438 (process_serial_event): Call QUEUE_is_empty.
4439 (handle_target_event): Call notif_push instead of push event.
4440 * server.h (push_event): Remove declaration.
4442 2012-12-10 Tom Tromey <tromey@redhat.com>
4444 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4445 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4448 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4449 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4450 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4451 (amd64-linux-ipa.o, ax.o): Rewrite.
4452 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4453 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4454 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4455 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4456 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4457 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4458 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4459 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4460 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4461 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4462 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4463 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4464 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4465 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4466 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4467 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4468 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4469 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4470 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4471 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4472 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4473 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4474 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4475 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4476 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4477 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4478 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4479 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4480 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4481 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4482 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4483 (reg-tilegx.o): Remove.
4484 (all_object_files): New macro.
4485 Include .deps files.
4486 * aclocal.m4, configure: Rebuild.
4487 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4488 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4489 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4491 2012-12-05 Tom Tromey <tromey@redhat.com>
4494 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4496 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4498 * configure.ac: Check for linux/perf_event.h.
4499 * config.in: Regenerated.
4500 * configure: Regenerated.
4502 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4504 * hostio.c (handle_readlink): Decrease buffer size
4505 parameter passed to readlink by one byte.
4507 2012-11-26 Yao Qi <yao@codesourcery.com>
4509 * configure.ac (build_warnings): Append '-Wempty-body'.
4510 * configure: Regenerated.
4511 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4514 2012-11-15 Pierre Muller <muller@sourceware.org>
4516 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4517 * config.in: Regenerate.
4518 * configure: Regenerate.
4519 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4520 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4521 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4522 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4524 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4525 instead of <sys/wait.h> header.
4526 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4528 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4530 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4531 (various make rules): Remove -DGDBSERVER
4533 2012-11-09 Yao Qi <yao@codesourcery.com>
4535 * spu-low.c (current_ptid): Move it to ..
4536 * gdbthread.h: ... here. New.
4537 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4538 * server.c (myresume, process_serial_event): Likewise.
4539 * thread-db.c (thread_db_find_new_threads): Likewise.
4540 * tracepoint.c (run_inferior_command): Likewise.
4542 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4544 * server.c (handle_search_memory_1): Include access length in
4547 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4549 * linux-crisv32-low.c: Fix compile errors.
4551 2012-09-04 Yao Qi <yao@codesourcery.com>
4553 * tracepoint.c (cmd_qtsv): Adjust debug message.
4554 Don't check CUR_TPOINT.
4556 2012-08-28 Yao Qi <yao@codesourcery.com>
4558 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4559 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4560 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4561 Remove declarations of xmalloc, xreallloc, xstrdup and
4563 * Makefile.in (libiberty_h): New.
4564 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4565 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4567 2012-08-23 Yao Qi <yao@codesourcery.com>
4569 * server.h: Remove declaration of 'xsnprintf'.
4571 2012-08-22 Keith Seitz <keiths@redhat.com>
4573 * server.h: Include build-gnulib-gbserver/config.h.
4574 * gdbreplay.c: Likewise.
4576 2012-08-08 Doug Evans <dje@google.com>
4578 * Makefile.in (SFILES): Add gdb_vecs.c.
4579 (OBS): Add gdb_vecs.o.
4580 (gdb_vecs_h, host_defs_h): New variables.
4581 (thread-db.o): Add $(gdb_vecs_h) dependency.
4582 (gdb_vecs.o): New rule.
4583 * thread-db.c: #include "gdb_vecs.h".
4584 (thread_db_load_search): Use a vector to iterate over path elements.
4585 Handle text appearing after "$pdir".
4587 * configure.ac: Add check for strstr.
4588 * config.in: Regenerate.
4589 * configure: Regenerate.
4591 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4593 * hostio.c (handle_pread): If pread fails, fall back to attempting
4595 (handle_pwrite): Likewise for pwrite.
4597 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4599 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4600 between unsupported TYPE and unimplementable ADDR/LEN combination.
4601 (arm_insert_point): Act on new return value.
4603 2012-07-31 Pedro Alves <palves@redhat.com>
4605 * server.c (process_point_options): Only skip tokens if we find
4606 one that is unrecognized. Don't treat 'X' specially while
4607 skipping unrecognized tokens.
4609 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4611 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4612 to 4-byte-align HW breakpoint addresses for Thumb.
4614 2012-07-27 Yao Qi <yao@codesourcery.com>
4618 * server.h: Declare gdb_agent_about_to_close.
4619 * target.c (kill_inferior): Include "agent.h".
4620 New. Send command 'kill'.
4621 * target.h (kill_inferior): Removed macro.
4622 * tracepoint.c (gdb_agent_about_to_close): New.
4623 (gdb_agent_helper_thread): Handle command 'close'.
4624 Wait endlessly until the inferior stops.
4625 Install gdb_agent_remove_socket to atexit hook.
4626 (agent_socket_name): New static variable.
4627 (gdb_agent_socket_init): Replace local variable 'name' with
4628 'agent_socket_name'.
4629 (gdb_agent_remove_socket): New.
4631 2012-07-27 Yao Qi <yao@codesourcery.com>
4633 * server.c (process_point_options): Stop at 'X' when parsing.
4635 2012-07-19 Michael Eager <eager@eagercon.com>
4637 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4639 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4640 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4641 hardware breakpoint.
4643 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4645 * gdbserver/linux-low.c (initialize_low): Call
4646 linux_ptrace_init_warnings.
4648 2012-07-02 Doug Evans <dje@google.com>
4650 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4653 2012-07-02 Stan Shebs <stan@codesourcery.com>
4655 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4656 (ax.o): Add it to build rule.
4658 (OBS): Add format.o.
4659 (IPA_OBS): Add format.o.
4660 * server.c (handle_query): Claim support for breakpoint commands.
4661 (process_point_options): Add command case.
4662 (process_serial_event): Leave running if there are printfs in
4664 * mem-break.h (any_persistent_commands): Declare.
4665 (add_breakpoint_commands): Declare.
4666 (gdb_no_commands_at_breakpoint): Declare.
4667 (run_breakpoint_commands): Declare.
4668 * mem-break.c (struct point_command_list): New struct.
4669 (struct breakpoint): New field command_list.
4670 (any_persistent_commands): New function.
4671 (add_commands_to_breakpoint): New function.
4672 (add_breakpoint_commands): New function.
4673 (gdb_no_commands_at_breakpoint): New function.
4674 (run_breakpoint_commands): New function.
4675 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4677 * ax.c: Include format.h.
4678 (ax_printf): New function.
4679 (gdb_eval_agent_expr): Add printf opcode.
4681 2012-06-13 Yao Qi <yao@codesourcery.com>
4683 * server.c (start_inferior): Remove duplicated writes to fields
4684 'last_resume_kind' and 'last_status' of 'current_inferior'.
4686 2012-06-12 Yao Qi <yao@codesourcery.com>
4687 Pedro Alves <palves@redhat.com>
4689 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4691 * server.c (handle_v_cont): Extend comment.
4693 2012-06-11 Yao Qi <yao@codesourcery.com>
4695 * linux-low.c (linux_attach): Add 'static'.
4697 2012-06-06 Yao Qi <yao@codesourcery.com>
4699 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4701 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4703 Fix gcc -flto compilation warning.
4704 * server.c (main): Make variable multi_mode and attach volatile.
4706 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4708 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4709 if the platform doesn't know about it.
4711 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4713 * Makefile.in (SFILES): Add linux-tile-low.c.
4714 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4715 * configure.srv: Handle tilegx-*-linux*.
4716 * linux-tile-low.c: New file.
4718 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4720 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4722 2012-05-24 Pedro Alves <palves@redhat.com>
4726 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4728 2012-05-24 Pedro Alves <palves@redhat.com>
4732 Replace target_signal with gdb_signal throughout.
4734 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4736 * linux-low.c (linux_store_registers): Avoid the copying sequence
4737 when no data has been retrieved by ptrace.
4739 2012-05-22 Will Deacon <will.deacon@arm.com>
4741 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4742 Include asm/ptrace.h.
4743 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4746 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4748 * linux-low.c (linux_store_registers): Don't re-retrieve data
4749 with ptrace that has already been obtained from /proc. Always
4750 copy any data retrieved with ptrace to the buffer supplied.
4752 2012-05-11 Yao Qi <yao@codesourcery.com>
4753 Pedro Alves <palves@redhat.com>
4755 * linux-low.c (enum stopping_threads_kind): New.
4756 (stopping_threads): Change type to `enum stopping_threads_kind'.
4757 (handle_extended_wait): If stopping and suspending threads, leave
4758 the new_lwp suspended too.
4759 (linux_wait_for_event): Adjust.
4760 (stop_all_lwps): Set `stopping_threads' to
4761 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4762 whether we're suspending threads or just stopping them. Assert no
4765 2012-04-29 Yao Qi <yao@codesourcery.com>
4767 * server.h: Move some code to ...
4768 * gdbthread.h: ... here. New.
4769 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4770 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4771 (nto-low.o, win32-low.o): Likewise.
4772 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4773 * regcache.c, remote-utils.c, server.c: Likewise.
4774 * target.c, tracepoint.c, win32-low.c: Likewise.
4776 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4778 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4779 (PTRACE_ARG4_TYPE): Likewise.
4780 (PTRACE_XFER_TYPE): Likewise.
4781 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4782 ptrace to PTRACE_ARG3_TYPE.
4783 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4784 (PTRACE_ARG4_TYPE): Likewise.
4785 (PTRACE_XFER_TYPE): Likewise.
4786 (linux_detach_one_lwp): Cast fourth argument of
4787 ptrace to long then PTRACE_ARG4_TYPE.
4788 (regsets_fetch_inferior_registers): Cast third argument of
4789 ptrace to long then PTRACE_ARG3_TYPE.
4790 (regsets_store_inferior_registers): Likewise.
4792 2012-04-20 Pedro Alves <palves@redhat.com>
4794 * configure: Regenerate.
4796 2012-04-19 Pedro Alves <palves@redhat.com>
4798 * Makefile.in (GNULIB_BUILDDIR): New.
4799 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4800 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4801 (all, install-only, uninstall, clean-info, all-lib, clean): No
4802 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4803 (maintainer-clean realclean distclean): Use subdir_do.
4805 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4806 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4807 * acinclude.m4: Include acx_configure_dir.m4.
4808 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4809 calls. Call AC_PROG_RANLIB. Configure gnulib using
4812 (GNULIB_STDINT_H): Adjust.
4813 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4814 * gdbreplay.c: Include build-gnulib/config.h.
4815 * server.h: Likewise.
4816 * aclocal.m4: Regenerate.
4817 * config.in: Regenerate.
4818 * configure: Regenerate.
4820 2012-04-19 Pedro Alves <palves@redhat.com>
4822 * Makefile.in (LIBGNU, INCGNU): Adjust.
4823 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4824 (all, install-only, uninstall, clean-info, all-lib, clean)
4825 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4826 * configure.ac: Adjust AC_OUTPUT output.
4827 * aclocal.m4: Regenerate.
4828 * configure: Regenerate.
4830 2012-04-19 Pedro Alves <palves@redhat.com>
4832 * Makefile.in (generated_files): New.
4833 (server_h): Remove the explicit dependency on config.h, and depend
4834 on $generated_files.
4836 2012-04-19 Pedro Alves <palves@redhat.com>
4838 * Makefile.in (INCGNU): Add -Ignulib.
4840 2012-04-19 Pedro Alves <palves@redhat.com>
4842 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4843 (INCGNU): ... this, and spell out -I here.
4844 (GNULIB_LIB): Rename to ...
4846 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4848 2012-04-19 Pedro Alves <palves@redhat.com>
4850 * config.in: Regenerate.
4852 2012-04-19 Pedro Alves <palves@redhat.com>
4854 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4855 * server.h (memmem): Remove declaration.
4856 * config.in: Regenerate.
4857 * configure: Regenerate.
4859 2012-04-19 Yao Qi <yao@codesourcery.com>
4861 * Makefile.in (SFILES): Add common/vec.c.
4865 2012-04-19 Yao Qi <yao@codesourcery.com>
4867 * remote-utils.c (prepare_resume_reply): Replace with macro
4868 target_core_of_thread.
4869 * server.c (handle_qxfer_threads_proper): Likewise.
4870 * target.h (traget_core_of_thread): New macro.
4872 2012-04-18 Pedro Alves <palves@redhat.com>
4874 * aclocal.m4: Regenerate.
4875 * configure: Regenerate.
4877 2012-04-16 Yao Qi <yao@codesourcery.com>
4879 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4880 duplicated on address.
4882 2012-04-16 Yao Qi <yao@codesourcery.com>
4884 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4885 (struct tracepoint_action_ops) <send>: New field.
4886 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4887 (agent_expr_send, x_tracepoint_action_send): New.
4888 (l_tracepoint_action_send): New.
4889 (cmd_qtdp): Download and install tracepoint
4890 according to `use_agent'.
4891 (run_inferior_command): Add one more parameter `len'.
4893 (tracepoint_send_agent): New.
4894 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4896 2012-04-16 Yao Qi <yao@codesourcery.com>
4898 * tracepoint.c (download_tracepoints): Moved to ...
4899 (cmd_qtstart): ... here.
4901 2012-04-14 Yao Qi <yao@codesourcery.com>
4903 * tracepoint.c: Include inttypes.h.
4904 (struct collect_memory_action): Use sized types.
4905 (struct tracepoint): Likewise.
4906 (cmd_qtdp, stop_tracing): Update print specifiers.
4907 (cmd_qtp, response_tracepoint): Likewise.
4908 (collect_data_at_tracepoint): Likewise.
4909 (collect_data_at_step): Likewise.
4911 2012-04-14 Yao Qi <yao@codesourcery.com>
4913 Import gnulib module inttypes.
4914 * aclocal.m4, config.in, configure: Regenerated.
4916 2012-04-14 Yao Qi <yao@codesourcery.com>
4918 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4919 Makefile and config.status at last.
4921 2012-04-13 Yao Qi <yao@codesourcery.com>
4923 * tracepoint.c: Include stdint.h unconditionally.
4925 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4927 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4928 on BFD_HAVE_SYS_PROCFS_TYPE.
4929 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4930 * configure: Regenerate.
4931 * config.in: Likewise.
4933 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4935 * Makefile.in (clean): Also remove x32.c x32-linux.c
4936 x32-avx.c x32-avx-linux.c.
4937 (x32.o): New target.
4939 (x32-linux.o): Likewise.
4940 (x32-linux.c): Likewise.
4941 (x32-avx.o): Likewise.
4942 (x32-avx.c): Likewise.
4943 (x32-avx-linux.o): Likewise.
4944 (x32-avx-linux.c): Likewise.
4946 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4947 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4948 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4949 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4950 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4951 i386/x32-avx-linux.xml.
4953 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4954 (init_registers_x32_avx_linux): Likwise.
4955 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4956 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4958 2012-04-13 Pedro Alves <palves@redhat.com>
4960 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4961 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4962 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4963 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4966 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4968 * linux-x86-low.c (compat_x32_clock_t): New.
4969 (compat_x32_siginfo_t): Likewise.
4970 (compat_x32_siginfo_from_siginfo): Likewise.
4971 (siginfo_from_compat_x32_siginfo): Likewise.
4972 (linux_is_elf64): Likewise.
4973 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4974 and siginfo_from_compat_x32_siginfo for x32.
4975 (x86_arch_setup): Set linux_is_elf64.
4977 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4980 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4982 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4983 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4984 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4985 compatible with process.
4987 2012-04-12 Yao Qi <yao@codesourcery.com>
4989 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4990 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4991 (install-only, install-info, clean): Handle sub dir gnulib.
4992 (all-lib, am--refresh): New targets.
4993 (memmem.o): Remove target.
4994 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4995 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4996 (AC_REPLACE_FUNCS): Remove memmem.
4997 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4998 (AC_OUTPUT): Generate Makefile in gnulib/.
4999 * aclocal.m4, config.in, configure: Regenerated.
5001 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5003 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5005 2012-04-05 Pedro Alves <palves@redhat.com>
5007 -Werror=strict-aliasing
5009 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5012 2012-04-04 Pedro Alves <palves@redhat.com>
5014 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5015 (sparc_store_gregset_from_stack, sparc_store_gregset)
5016 (sparc_breakpoint_at): Fix formatting.
5018 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5020 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5022 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5023 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5024 * config.in: Regenerate.
5025 * configure: Likewise.
5027 2012-03-29 Pedro Alves <palves@redhat.com>
5029 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5030 Correct ptrace arguments.
5032 2012-03-28 Pedro Alves <palves@redhat.com>
5034 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5035 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5036 (IA64_FR1_REGNUM): New defines.
5037 (ia64_fetch_register): New.
5038 (the_low_target): Install it.
5039 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5041 * linux-low.c (linux_fetch_registers): Try the
5042 the_low_target.fetch_register hook first.
5044 * linux-arm-low.c (the_low_target): Adjust.
5045 * linux-bfin-low.c (the_low_target): Adjust.
5046 * linux-cris-low.c (the_low_target): Adjust.
5047 * linux-crisv32-low.c (the_low_target): Adjust.
5048 * linux-m32r-low.c (the_low_target): Adjust.
5049 * linux-m68k-low.c (the_low_target): Adjust.
5050 * linux-mips-low.c (the_low_target): Adjust.
5051 * linux-ppc-low.c (the_low_target): Adjust.
5052 * linux-s390-low.c (the_low_target): Adjust.
5053 * linux-sh-low.c (the_low_target): Adjust.
5054 * linux-sparc-low.c (the_low_target): Adjust.
5055 * linux-tic6x-low.c (the_low_target): Adjust.
5056 * linux-x86-low.c (the_low_target): Adjust.
5057 * linux-xtensa-low.c (the_low_target): Adjust.
5059 2012-03-26 Pedro Alves <palves@redhat.com>
5061 * server.c (handle_qxfer_libraries): Don't bail early if
5062 the_target->qxfer_libraries_svr4 is not NULL.
5064 2012-03-26 Pedro Alves <palves@redhat.com>
5066 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5068 2012-03-23 Pedro Alves <palves@redhat.com>
5070 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5071 "library-list-svr4" element's start tag when the the DSO list is
5074 2012-03-23 Pedro Alves <palves@redhat.com>
5076 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5077 a variable whose type size is the same as the inferior's pointer
5080 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5082 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5084 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5085 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5086 * linux-low.h: Include <signal.h>.
5087 (struct siginfo): Remove forward declaration.
5088 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5091 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5093 * .gitignore: Ignore more files.
5095 2012-03-19 Pedro Alves <palves@redhat.com>
5096 Jan Kratochvil <jan.kratochvil@redhat.com>
5098 * server.c (cont_thread, general_thread): Add describing comments.
5099 (start_inferior): Clear `cont_thread'.
5100 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5103 2012-03-15 Yao Qi <yao@codesourcery.com>
5105 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5107 (cmd_qtdp): ... here.
5109 2012-03-15 Yao Qi <yao@codesourcery.com>
5111 * tracepoint.c (struct tracepoint_action_ops): New.
5112 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5113 (m_tracepoint_action_download): New.
5114 (r_tracepoint_action_download): New.
5115 (x_tracepoint_action_download): New.
5116 (l_tracepoint_action_download): New.
5117 (add_tracepoint_action): Install `action->ops' according type.
5118 (download_tracepoint_1): Move code `download' function pointer
5119 of various tracepoint_action_ops.
5121 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5123 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5124 linux_ptrace_attach_warnings.
5126 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5128 * Makefile.in (linux-ptrace.o): New.
5129 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5130 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5131 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5132 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5133 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5135 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5137 2012-03-08 Yao Qi <yao@codesourcery.com>
5138 Pedro Alves <palves@redhat.com>
5140 Fix PR server/13392.
5141 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5143 * tracepoint.c (remove_tracepoint): New.
5144 (cmd_qtdp): Call remove_tracepoint when failed to install.
5146 2012-03-07 Pedro Alves <palves@redhat.com>
5148 * linux-low.c (get_detach_signal): New.
5149 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5150 Pass on pending signals to PTRACE_DETACH. Check the result of the
5152 * server.c (program_signals, program_signals_p): New.
5153 (handle_general_set): Handle QProgramSignals.
5154 * server.h (program_signals, program_signals_p): Declare.
5156 2012-03-05 Pedro Alves <palves@redhat.com>
5157 Jan Kratochvil <jan.kratochvil@redhat.com>
5159 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5162 2012-03-03 Yao Qi <yao@codesourcery.com>
5164 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5165 agent_look_up_symbols.
5167 2012-03-03 Yao Qi <yao@codesourcery.com>
5169 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5170 (linux-x86-low.o): Likewise.
5171 * server.h: Remove in_process_agent_loaded.
5172 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5176 2012-03-03 Yao Qi <yao@codesourcery.com>
5178 * tracepoint.c (gdb_agent_capability): New global.
5179 (in_process_agent_loaded_ust): Renamed to
5180 `in_process_agent_supports_ust'.
5182 (in_process_agent_supports_ust): Call agent_capability_check.
5183 (clear_installed_tracepoints): Assert that agent supports
5186 2012-03-03 Yao Qi <yao@codesourcery.com>
5188 * linux-low.c (linux_supports_agent): New.
5189 (linux_target_ops): Initialize field `supports_agent' with
5190 linux_supports_agent.
5191 * target.h (struct target_ops) <supports_agent>: New.
5192 (target_supports_agent): New macro.
5193 * server.c (handle_general_set): Handle packet 'QAgent'.
5194 (handle_query): Send `QAgent+'.
5195 * Makefile.in (server.o): Depends on agent.h.
5197 2012-03-03 Yao Qi <yao@codesourcery.com>
5199 * Makefile.in (OBS): Add agent.o.
5200 Add new rule for agent.o.
5201 Track dependence of tracepoint.c on agent.h.
5202 * tracepoint.c (run_inferior_command_1):
5203 (run_inferior_command): Call agent_run_command.
5204 (gdb_ust_connect_sync_socket): Deleted. Move it to
5206 (resume_thread, stop_thread): Likewise.
5207 (gdb_ust_socket_init): Renamed to ...
5208 (gdb_agent_socket_init): ... New.
5209 (gdb_ust_thread): Renamed to ...
5210 (gdb_agent_helper_thread): ... New.
5211 (gdb_ust_init): Move some code to ...
5212 (gdb_agent_init): ... here. New.
5213 [HAVE_UST]: Call gdb_ust_init.
5214 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5215 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5216 * config.in, configure: Regenerated.
5218 2012-03-02 Pedro Alves <palves@redhat.com>
5220 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5221 * linux-low.c (struct simple_pid_list): New.
5222 (stopped_pids): New a struct simple_pid_list pointer.
5223 (add_to_pid_list, pull_pid_from_list): New.
5224 (handle_extended_wait): Don't assume the first signal new children
5225 report is SIGSTOP. Adjust call to pull_pid_from_list.
5226 (linux_wait_for_lwp): Adjust.
5228 2012-03-02 Yao Qi <yao@codesourcery.com>
5230 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5233 2012-03-02 Yao Qi <yao@codesourcery.com>
5235 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5236 `stop_pc' and `tpoint'. Update caller.
5238 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5240 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5241 * linux-low.c (use_linux_regsets): New macro.
5242 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5243 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5244 (linux_register_in_regsets): New function.
5245 (usr_fetch_inferior_registers): Skip registers covered by
5247 (usr_store_inferior_registers): Likewise.
5248 (usr_fetch_inferior_registers): New macro.
5249 (usr_store_inferior_registers): Likewise.
5250 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5251 (linux_store_registers): Likewise.
5252 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5254 (init_registers_mips64_dsp_linux): Likewise.
5255 (init_registers_mips_linux): New macro.
5256 (init_registers_mips_dsp_linux): Likewise.
5257 (mips_dsp_num_regs): Likewise.
5258 (DSP_BASE, DSP_CONTROL): New fallback macros.
5259 (mips_base_regs): New macro.
5260 (mips_regmap): Use it. Fix the size.
5261 (mips_dsp_regmap): New variable.
5262 (mips_dsp_regset_bitmap): Likewise.
5263 (mips_arch_setup): New function.
5264 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5266 (mips_cannot_store_register): Likewise.
5267 (the_low_target): Update .arch_setup, .num_regs and .regmap
5268 initializers. Add .regset_bitmap initializer.
5269 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5271 * linux-bfin-low.c (the_low_target): Likewise.
5272 * linux-cris-low.c (the_low_target): Likewise.
5273 * linux-crisv32-low.c (the_low_target): Likewise.
5274 * linux-ia64-low.c (the_low_target): Likewise.
5275 * linux-m32r-low.c (the_low_target): Likewise.
5276 * linux-m68k-low.c (the_low_target): Likewise.
5277 * linux-ppc-low.c (the_low_target): Likewise.
5278 * linux-s390-low.c (the_low_target): Likewise.
5279 * linux-sh-low.c (the_low_target): Likewise.
5280 * linux-sparc-low.c (the_low_target): Likewise.
5281 * linux-tic6x-low.c (the_low_target): Likewise.
5282 * linux-x86-low.c (the_low_target): Likewise.
5283 * linux-xtensa-low.c (the_low_target): Likewise.
5284 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5285 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5286 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5288 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5289 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5291 2012-02-29 Yao Qi <yao@codesourcery.com>
5292 Pedro Alves <palves@redhat.com>
5294 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5295 `step_over_finished' is true.
5297 2012-02-27 Pedro Alves <palves@redhat.com>
5299 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5300 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5302 2012-02-27 Pedro Alves <palves@redhat.com>
5305 * linux-low.c (pid_is_stopped): New.
5306 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5308 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5310 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5313 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5315 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5317 2012-02-24 Luis Machado <lgustavo@codesourcery>
5319 * server.c (handle_query): Advertise support for target-side
5320 breakpoint condition evaluation.
5321 (process_point_options): New function.
5322 (process_serial_event): When inserting a breakpoint, check for
5323 a target-side condition that should be evaluated.
5325 * mem-break.c: Include regcache.h and ax.h.
5326 (point_cond_list_t): New data structure.
5327 (breakpoint) <cond_list>: New field.
5328 (find_gdb_breakpoint_at): Make non-static.
5329 (delete_gdb_breakpoint_at): Clear any target-side
5331 (clear_gdb_breakpoint_conditions): New function.
5332 (add_condition_to_breakpoint): Likewise.
5333 (add_breakpoint_condition): Likewise.
5334 (gdb_condition_true_at_breakpoint): Likewise.
5335 (gdb_breakpoint_here): Return result directly instead
5336 of going through a local variable.
5338 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5339 (clear_gdb_breakpoint_conditions): Likewise.
5340 (add_breakpoint_condition): Likewise.
5341 (gdb_condition_true_at_breakpoint): Likewise.
5343 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5344 (need_step_over_p): Take target-side breakpoint condition into
5347 2012-02-24 Luis Machado <lgustavo@codesourcery>
5349 * server.h: Include tracepoint.h.
5350 (agent_mem_read, agent_get_trace_state_variable_value,
5351 agent_set_trace_state_variable_value,
5352 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5353 get_set_tsv_func_addr): New prototypes.
5355 * ax.h: New include file.
5356 * ax.c: New source file.
5358 * tracepoint.c: Include ax.h.
5359 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5360 agent_expr, eval_result_type): Move to ax.h.
5361 (parse_agent_expr): Rename to ...
5362 (gdb_parse_agent_expr): ... this, make it non-static and move
5364 (unparse_agent_expr) Rename to ...
5365 (gdb_unparse_agent_expr): ... this, make it non-static and move
5367 (eval_agent_expr): Rename to ...
5368 (eval_tracepoint_agent_expr): ... this.
5369 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5370 forward declarations.
5371 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5372 (agent_get_trace_state_variable_value): New function.
5373 (agent_set_trace_state_variable_value): New function.
5374 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5375 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5376 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5377 (condition_true_at_tracepoint): Likewise.
5378 (parse_agent_expr): Rename to ...
5379 (gdb_parse_agent_expr): ... this and move to ax.c.
5380 (unparse_agent_expr): Rename to ...
5381 (gdb_unparse_agent_expr): ... this and move to ax.c.
5382 (gdb_agent_op_name): Move to ax.c.
5383 (eval_agent_expr): Rename to ...
5384 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5386 (eval_tracepoint_agent_expr): New function.
5387 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5389 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5391 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5392 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5393 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5394 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5395 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5396 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5397 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5398 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5399 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5400 (compile_bytecodes): Remove forward declaration.
5401 (is_goto_target): Move to ax.c.
5402 (compile_bytecodes): Move to ax.c and call
5403 agent_get_trace_state_variable_value (...) and
5404 agent_set_trace_state_variable_value (...).
5406 * Makefile.in: Update ax.c and IPA dependencies.
5408 2012-02-24 Pedro Alves <palves@redhat.com>
5410 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5411 (cmd_bigqtbuffer_circular): ... this. Only handle
5412 'QTBuffer:circular:'.
5413 (handle_tracepoint_general_set): Adjust.
5415 2012-02-16 Yao Qi <yao@codesourcery.com>
5417 * inferiors.c: Move code to ...
5418 * dll.c: .... here. New.
5419 * server.h: Declare clear_dlls.
5420 * Makefile.in (SFILES): Add dll.c.
5424 2012-02-11 Yao Qi <yao@codesourcery.com>
5426 * server.c: (handle_monitor_command): Add a new parameter
5428 (handle_query): Update caller.
5430 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5432 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5433 * configure, config.in: Regenerate.
5434 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5437 2012-02-02 Pedro Alves <palves@redhat.com>
5439 Try SIGKILL first, then PTRACE_KILL.
5440 * linux-low.c (linux_kill_one_lwp): New.
5441 (linux_kill_one_lwp): Rename to ...
5442 (kill_one_lwp_callback): ... this. Use the new
5445 2012-02-02 Pedro Alves <palves@redhat.com>
5447 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5450 2012-01-27 Pedro Alves <palves@redhat.com>
5452 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5453 (elf_64_file_p): Make static.
5454 (linux_pid_exe_is_elf_64_file): New.
5455 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5456 Delete declarations.
5457 (linux_pid_exe_is_elf_64_file): Declare.
5458 * linux-x86-low.c (x86_arch_setup): Use
5459 linux_pid_exe_is_elf_64_file.
5461 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5463 * linux-low.c (linux_wait_for_event_1): Rename to ...
5464 (linux_wait_for_event): ... here and merge it with former
5465 linux_wait_for_event - new variable wait_ptid, use it.
5466 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5468 2012-01-23 Pedro Alves <palves@redhat.com>
5470 * server.c (main): Avoid yet another case of infinite loop while
5471 detaching/killing after a longjmp.
5473 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5476 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5478 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5480 * hostio.c (handle_readlink): New function.
5481 (handle_vFile): Call it to handle "vFile:readlink" packets.
5483 2012-01-20 Pedro Alves <palves@redhat.com>
5484 Ulrich Weigand <ulrich.weigand@linaro.org>
5486 * server.c (handle_v_requests): Only support vAttach and vRun to
5487 start multiple processes when in extended protocol mode.
5489 2012-01-17 Pedro Alves <palves@redhat.com>
5491 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5492 memalign plus mprotect to allocate the scratch buffer.
5494 2012-01-13 Pedro Alves <palves@redhat.com>
5496 * server.c (attach_inferior): Clear `cont_thread'.
5498 2012-01-13 Pedro Alves <palves@redhat.com>
5500 * server.c (main): Avoid infinite loop while detaching/killing
5503 2012-01-09 Doug Evans <dje@google.com>
5505 * server.c (start_inferior): Set last_ptid in --wrapper case.
5507 2012-01-06 Yao Qi <yao@codesourcery.com>
5509 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5511 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5513 2012-01-04 Yao Qi <yao@codesourcery.com>
5515 * tracepoint.c (cmd_qtdp): Print debug message
5516 for static tracepoint.
5518 2012-01-04 Yao Qi <yao@codesourcery.com>
5520 * tracepoint.c (trace_vdebug): Differentiate debug message
5521 between gdbserver and IPA.
5523 2012-01-03 Yao Qi <yao@codesourcery.com>
5525 * tracepoint.c (tracepoint_was_hit): Don't collect for
5528 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5530 * terminal.h: Reformat copyright header.
5532 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5534 * server.c (gdbserver_version): Update copyright year.
5535 * gdbreplay.c (gdbreplay_version): Likewise.
5537 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5539 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5542 2011-12-18 Hui Zhu <teawater@gmail.com>
5543 * linux-low.c (linux_create_inferior): Save return value to ret.
5545 2011-12-18 Hui Zhu <teawater@gmail.com>
5547 * linux-low.c (linux_create_inferior): Save return value to ret.
5549 2011-12-16 Doug Evans <dje@google.com>
5551 * linux-low.c (linux_create_inferior): If stdio connection,
5552 redirect stdin from /dev/null, stdout to stderr.
5553 * remote-utils.c (remote_is_stdio): New static global.
5554 (remote_connection_is_stdio): New function.
5555 (remote_prepare): Handle stdio connection.
5556 (remote_open): Ditto.
5557 (remote_close): Don't close stdin for stdio connections.
5558 (read_prim,write_prim): New functions. Replace all calls to
5559 read/write to these.
5560 * server.c (main): Watch for "-" argument. Move call to
5561 remote_prepare before start_inferior.
5562 * server.h (STDIO_CONNECTION_NAME): New macro.
5563 (remote_connection_is_stdio): Declare.
5565 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5566 in debugging output.
5568 2011-12-15 Yao Qi <yao@codesourcery.com>
5570 * tracepoint.c: Include sys/syscall.h.
5571 (gdb_ust_thread): Remove preprocessor conditional.
5573 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5575 * linux-low.c (linux_detach_one_lwp): Call
5576 the_low_target.prepare_to_resume before detaching.
5578 2011-12-14 Yao Qi <yao@codesourcery.com>
5580 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5583 2011-12-14 Yao Qi <yao@codesourcery.com>
5585 * i386-low.c (i386_low_stopped_data_address): Initialize local
5588 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5592 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5593 DR_CONTROL unless necessary. Extend comments.
5594 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5595 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5597 2011-12-13 Yao Qi <yao@codesourcery.com>
5599 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5601 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5603 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5605 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5606 Print new debug message for such case.
5608 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5610 Fix overlapping memcpy.
5611 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5612 the read_inferior_memory transfer.
5613 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5614 write_inferior_memory transfer.
5615 (set_fast_tracepoint_jump): New variable buf. Use it for the
5616 read_inferior_memory and write_inferior_memory transfers.
5617 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5618 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5619 Use it for the write_inferior_memory transfer.
5620 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5623 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5625 * linux-low.c (fetch_register, store_register): Make code
5626 consistent, fix formatting.
5628 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5630 * linux-low.c (usr_store_inferior_registers): Factor out code
5631 to handle individual registers into...
5632 (store_register): ... this new function.
5634 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5636 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5637 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5638 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5639 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5640 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5641 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5642 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5643 (srv_xmlfiles): Add new XML files.
5645 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5647 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5648 (init_registers_s390_linux32v1): Add prototype.
5649 (init_registers_s390_linux32v2): Likewise.
5650 (init_registers_s390_linux64v1): Likewise.
5651 (init_registers_s390_linux64v2): Likewise.
5652 (init_registers_s390x_linux64v1): Likewise.
5653 (init_registers_s390x_linux64v2): Likewise.
5654 (s390_num_regs): Increment to 52.
5655 (s390_regmap): Add orig_r2 register.
5656 (s390_num_regs_3264): Increment to 68.
5657 (s390_regmap_3264): Add orig_r2 register.
5658 (s390_collect_ptrace_register): Handle orig_r2 register.
5659 (s390_supply_ptrace_register): Likewise.
5660 (s390_fill_last_break): New function.
5661 (s390_store_last_break): Likewise.
5662 (s390_fill_system_call): New function.
5663 (s390_store_system_call): Likewise.
5664 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5666 (s390_check_regset): New function.
5667 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5668 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5669 Update target_regsets for available register sets.
5671 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5672 Jan Kratochvil <jan.kratochvil@redhat.com>
5674 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5675 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5677 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5678 * linux-low.h (struct process_info_private): New member r_debug.
5679 * server.c (handle_qxfer_libraries): Call
5680 the_target->qxfer_libraries_svr4.
5681 (handle_qxfer_libraries_svr4): New function.
5682 (qxfer_packets): New entry "libraries-svr4".
5683 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5684 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5685 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5686 PACKET_qXfer_libraries_svr4.
5688 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5690 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5691 PSW address/mask between 8-byte and 16-byte formats.
5692 (s390_supply_ptrace_register): Likewise.
5693 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5694 basic addressing mode bit.
5696 2011-11-24 Stan Shebs <stan@codesourcery.com>
5698 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5700 2011-11-17 Stan Shebs <stan@codesourcery.com>
5702 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5703 (tracing_start_time): New global.
5704 (tracing_stop_time): New global.
5705 (tracing_user_name): New global.
5706 (tracing_notes): New global.
5707 (tracing_stop_note): New global.
5708 (cmd_qtstart): Set traceframe_usage, start_time.
5709 (stop_tracing): Set stop_time.
5710 (cmd_qtstatus): Report additional status.
5711 (cmd_qtp): New function.
5712 (handle_tracepoint_query): Call it.
5713 (cmd_qtnotes): New function.
5714 (handle_tracepoint_general_set): Call it.
5715 (get_timestamp): Rename from tsv_get_timestamp.
5717 2011-11-14 Stan Shebs <stan@codesourcery.com>
5718 Kwok Cheung Yeung <kcy@codesourcery.com>
5720 * linux-x86-low.c (small_jump_insn): New.
5721 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5722 trampoline and error message, build a trampoline and issue a small
5723 jump instruction to it.
5724 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5725 trampoline and error message.
5726 (x86_get_min_fast_tracepoint_insn_len): New.
5727 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5728 * linux-low.h (struct linux_target_ops): Add arguments to
5729 install_fast_tracepoint_jump_pad operation, add new operation.
5730 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5732 (linux_get_min_fast_tracepoint_insn_len): New function.
5733 (linux_target_op): Add new operation.
5734 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5735 (gdb_trampoline_buffer_end): Ditto.
5736 (gdb_trampoline_buffer_error): Ditto.
5737 (struct ipa_sym_addresses): Add fields for new IPA variables.
5738 (symbol_list): Add entries for new IPA variables.
5739 (struct tracepoint): Add fields to hold the address range of the
5740 trampoline used by the tracepoint.
5741 (trampoline_buffer_head): New static variable.
5742 (trampoline_buffer_tail): Ditto.
5743 (claim_trampoline_space): New function.
5744 (have_fast_tracepoint_trampoline_buffer): New function.
5745 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5747 (install_fast_tracepoint): Ditto, also add error buffer argument.
5748 (cmd_qtminftpilen): New function.
5749 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5750 (fast_tracepoint_from_trampoline_address): New function.
5751 (fast_tracepoint_collecting): Handle trampoline as part of jump
5753 (set_trampoline_buffer_space): New function.
5754 (initialize_tracepoint): Initialize new IPA variables.
5755 * target.h (struct target_ops): Add arguments to
5756 install_fast_tracepoint_jump_pad operation, add new
5757 get_min_fast_tracepoint_insn_len operation.
5758 (target_get_min_fast_tracepoint_insn_len): New.
5759 (install_fast_tracepoint_jump_pad): Add arguments.
5760 * server.h (IPA_BUFSIZ): Define.
5761 * linux-i386-ipa.c: Include extra header files.
5762 (initialize_fast_tracepoint_trampoline_buffer): New function.
5763 (initialize_low_tracepoint): Call it.
5764 * server.h (set_trampoline_buffer_space): Declare.
5765 (claim_trampoline_space): Ditto.
5766 (have_fast_tracepoint_trampoline_buffer): Ditto.
5768 2011-11-14 Yao Qi <yao@codesourcery.com>
5770 * server.c (handle_query): Handle InstallInTrace for qSupported.
5771 * tracepoint.c (add_tracepoint): Sort list.
5772 (install_tracepoint, download_tracepoint): New.
5773 (cmd_qtdp): Call them to install and download tracepoints.
5774 (sort_tracepoints): Removed.
5775 (cmd_qtstart): Update.
5777 2011-11-14 Yao Qi <yao@codesourcery.com>
5779 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5780 * mem-break.h: Declare.
5781 * tracepoint.c (cmd_qtstart): Move some code to ...
5782 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5784 (download_tracepoints): Move some code to ...
5785 (download_tracepoint_1): ... here. New.
5787 2011-11-08 Yao Qi <yao@codesourcery.com>
5789 * remote-utils.c (relocate_instruction): A comment fix.
5791 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5793 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5794 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5795 dr_status_mirror and dr_control_mirror from debug_reg_state.
5796 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5797 (i386_initial_stuff): Remove use of deleted globals.
5798 (i386_get_thread_context, i386_set_thread_context,
5799 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5800 from debug_reg_state.
5802 2011-11-05 Yao Qi <yao@codesourcery.com>
5804 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5805 address as TPOINT's.
5807 2011-11-02 Stan Shebs <stan@codesourcery.com>
5809 * tracepoint.c (agent_mem_read_string): New function.
5810 (eval_agent_expr): Call it for tracenz.
5811 * server.c (handle_query): Report support for tracenz.
5813 2011-11-02 Yao Qi <yao@codesourcery.com>
5815 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5817 2011-11-02 Yao Qi <yao@codesourcery.com>
5819 * target.h: Fix a typo in comment.
5821 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5823 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5824 clobber the breakpoints' shadows with fast tracepoint jumps.
5825 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5826 * target.c (write_inferior_memory): Also pass MYADDR down to
5829 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5831 * configure.ac: Check support for personality routine.
5832 * configure: Regenerate.
5833 * config.in: Likewise.
5834 * linux-low.c: Include <sys/personality.h>.
5835 Define ADDR_NO_RANDOMIZE if necessary.
5836 (linux_create_inferior): Disable address space randomization when
5837 forking inferior, if requested.
5838 (linux_supports_disable_randomization): New function.
5839 (linux_target_ops): Install it.
5840 * server.h (disable_randomization): Declare.
5841 * server.c (disable_randomization): New global variable.
5842 (handle_general_set): Handle QDisableRandomization.
5843 (handle_query): Likewise for qSupported.
5844 (main): Support --disable-randomization and --no-disable-randomization
5845 command line arguments.
5846 * target.h (struct target_ops): Add supports_disable_randomization.
5847 (target_supports_disable_randomization): New macro.
5849 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5851 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5853 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5854 [!PT_GETDSBT] (target_loadmap): New definition.
5855 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5856 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5857 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5858 and PT_GETDSBT to LINUX_LOADMAP.
5859 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5860 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5862 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5864 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5865 (arm_linux_hwbp_cap): New static variable.
5866 (arm_linux_get_hwbp_cap): Replace by ...
5867 (arm_linux_init_hwbp_cap): ... this new function.
5868 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5869 (arm_linux_get_hw_watchpoint_count): Likewise.
5870 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5871 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5872 (arm_prepare_to_resume): Use perror_with_name instead of error.
5874 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5876 * linux-arm-low.c: Include <signal.h>.
5877 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5878 (struct arm_linux_hwbp_cap): New data type.
5879 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5880 (struct arm_linux_hw_breakpoint): New data type.
5881 (MAX_BPTS, MAX_WPTS): Define.
5882 (struct arch_process_info, struct arch_lwp_info): New data types.
5883 (arm_linux_get_hwbp_cap): New function.
5884 (arm_linux_get_hw_breakpoint_count): Likewise.
5885 (arm_linux_get_hw_watchpoint_count): Likewise.
5886 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5887 (arm_hwbp_control_initialize): Likewise.
5888 (arm_hwbp_control_is_enabled): Likewise.
5889 (arm_hwbp_control_is_initialized): Likewise.
5890 (arm_hwbp_control_disable): Likewise.
5891 (arm_linux_hw_breakpoint_equal): Likewise.
5892 (arm_linux_hw_point_initialize): Likewise.
5893 (struct update_registers_data): New data structure.
5894 (update_registers_callback: New function.
5895 (arm_insert_point): Likewise.
5896 (arm_remove_point): Likewise.
5897 (arm_stopped_by_watchpoint): Likewise.
5898 (arm_stopped_data_address): Likewise.
5899 (arm_new_process): Likewise.
5900 (arm_new_thread): Likewise.
5901 (arm_prepare_to_resume): Likewise.
5902 (the_low_target): Register arm_insert_point, arm_remove_point,
5903 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5904 arm_new_thread, and arm_prepare_to_resume.
5906 2011-09-15 Stan Shebs <stan@codesourcery.com>
5908 * server.h (struct emit_ops): Add compare-goto fields.
5909 * tracepoint.c (gdb_agent_op_sizes): New table.
5910 (emit_eq_goto): New function.
5911 (emit_ne_goto): New function.
5912 (emit_lt_goto): New function.
5913 (emit_le_goto): New function.
5914 (emit_gt_goto): New function.
5915 (emit_ge_goto): New function.
5916 (is_goto_target): New function.
5917 (compile_bytecodes): Recognize special cases of compare-goto
5918 combinations and call specialized emitters for them.
5919 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5920 (amd64_emit_ne_goto): New function.
5921 (amd64_emit_lt_goto): New function.
5922 (amd64_emit_le_goto): New function.
5923 (amd64_emit_gt_goto): New function.
5924 (amd64_emit_ge_goto): New function.
5925 (amd64_emit_ops): Add the new functions.
5926 (i386_emit_eq_goto): New function.
5927 (i386_emit_ne_goto): New function.
5928 (i386_emit_lt_goto): New function.
5929 (i386_emit_le_goto): New function.
5930 (i386_emit_gt_goto): New function.
5931 (i386_emit_ge_goto): New function.
5932 (i386_emit_ops): Add the new functions.
5934 2011-09-08 Stan Shebs <stan@codesourcery.com>
5936 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5937 (i386_emit_epilogue): Restore %ebx.
5939 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5941 * server.c (step_thread): Remove definition.
5942 (process_serial_event): Don't handle Hs.
5943 * server.h (step_thread): Remove declaration.
5944 * target.c (set_desired_inferior): Remove use of step_thread.
5946 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5948 * linux-low.c: Include linux-procfs.h.
5949 (linux_attach_lwp_1): Update comments.
5950 (linux_attach): Scan for existing threads when attaching to a
5951 process that is the tgid.
5952 * Makefile.in: Update dependencies.
5954 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5956 * configure.srv: Add linux-procfs.o dependencies.
5958 2011-08-14 Yao Qi <yao@codesourcery.com>
5960 * target.h (struct target_ops): Fix indent.
5961 * win32-low.c (win32_target_ops): Fix comment.
5963 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5964 Yao Qi <yao@codesourcery.com>
5966 * Makefile.in (clean): Remove tic6x-*.c files.
5967 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5968 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5969 (tic6x-c64xp-linux.c): Likewise.
5970 * configure.srv: Add support for tic6x-*-uclinux.
5971 * linux-tic6x-low.c: New.
5972 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5974 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5975 Yao Qi <yao@codesourcery.com>
5977 * target.h (struct target_ops): Add read_loadmap.
5978 * linux-low.c (struct target_loadseg): New type.
5979 (struct target_loadmap): New type.
5980 (linux_read_loadmap): New function.
5981 (linux_target_ops): Add linux_read_loadmap.
5982 * server.c (handle_query): Support qXfer:fdpic:read packet.
5983 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5986 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5988 * win32-low.c: Include <stdint.h>.
5990 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5992 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5993 to the inferior here.
5994 (i386_remove_aligned_watchpoint): Ditto.
5995 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5996 fit part of the watchpoint in the debug registers.
5997 (i386_update_inferior_debug_regs): New.
5998 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5999 registers, and only update the inferior on success.
6000 (i386_low_remove_watchpoint): Ditto.
6002 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6004 * linux-low.c (compare_ints, unique, list_threads, show_process,
6005 linux_core_of_thread): Delete.
6006 (linux_target_ops): Change linux_core_of_thread to
6007 linux_common_core_of_thread.
6008 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6009 * utils.c (malloc_failure): Change type of argument.
6010 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6011 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6012 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6013 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6014 (IPA_OBJS): Add common-utils-ipa.o.
6015 (ptid_h, linux_osdata_h): New macros.
6016 (server_h): Add common/common-utils.h, common/xml-utils.h,
6017 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6019 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6020 ptid.o, buffer.o): New rules.
6021 (linux-low.o): Add common/linux-osdata.h as a dependency.
6022 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6023 * configure.ac: Add AC_HEADER_DIRENT check.
6024 * config.in: Regenerate.
6025 * configure: Regenerate.
6026 * remote-utils.c (xml_escape_text): Delete.
6027 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6028 buffer_xml_printf): Move to common/buffer.c.
6029 * server.c (main): Remove call to initialize_inferiors.
6030 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6031 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6032 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6033 internal_error, gdb_assert, gdb_assert_fail): Delete.
6034 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6035 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6037 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6038 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6039 initialize_inferiors): Delete.
6041 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6043 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6046 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6048 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6050 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6052 2011-05-26 Yao Qi <yao@codesourcery.com>
6054 * Makefile.in (thread-db.o): Track dependence to
6055 common/gdb_thread_db.h.
6056 * thread-db.c: include gdb_thread_db.h from right place.
6058 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6060 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6061 __FILE__ and __LINE__ to internal_error.
6063 2011-05-13 Doug Evans <dje@google.com>
6065 * thread-db.c (try_thread_db_load_from_sdir): New function.
6066 (try_thread_db_load_from_dir): New function.
6067 (thread_db_load_search): Handle $sdir, ignore $pdir.
6068 Remove trying of system directories if search of
6069 libthread-db-search-path fails, that is now done via $sdir.
6071 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6073 * server.c (handle_query): Add EnableDisableTracepoints to the list
6074 of supported features.
6075 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6077 (cmd_qtenable_disable): New.
6078 (cmd_qtstart): Install tracepoints even if disabled.
6079 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6080 receiving a QTEnable or QTDisable packet.
6081 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6082 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6084 (gdb_probe): Skip data collection if static tracepoint is disabled.
6086 2011-05-10 Doug Evans <dje@google.com>
6088 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6090 2011-05-04 Doug Evans <dje@google.com>
6092 * linux-low.c (linux_join): Skip process lookup.
6093 * spu-low.c (spu_join): Ditto.
6094 * server.c (join_inferiors_callback): Delete.
6095 (process_serial_event): For 'D' packet (detach) call join_inferior
6098 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6100 * README: Don't mention xscale*-*-linux*.
6101 * configure.srv (xscale*-*-linux*): Don't handle target.
6103 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6105 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6107 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6108 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6109 (i386_emit_void_call_2): Likewise.
6111 2011-04-26 Yao Qi <yao@codesourcery.com>
6113 * linux-low.c: Move common macros to linux-ptrace.h.
6114 Include linux-ptrace.h.
6115 * Makefile.in (linux_ptrace_h): New.
6116 (linux-low.o): Depends on linux-ptrace.h.
6118 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6120 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6121 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6122 (remote_prepare): New function with most of the TCP code from ...
6123 (remote_open): ... here. Detect PORT here unconditionally. Move also
6124 setting transport_is_reliable.
6125 * server.c (run_once): New variable.
6126 (gdbserver_usage): Document it.
6127 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6128 the first run if RUN_ONCE.
6129 * server.h (run_once, remote_prepare): New declarations.
6131 2011-04-19 Tom Tromey <tromey@redhat.com>
6133 * win32-low.c (handle_load_dll): Remove duplicate "the".
6135 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6137 Remove support for old Cygwin 1.5 versions.
6138 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6139 function to avoid warning.
6140 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6143 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6145 * gdbserver/server.h (Macro _): Define it if not available.
6147 2011-03-14 Michael Snyder <msnyder@vmware.com>
6149 * hostio.c (handle_close): Remove unnecessary null test.
6151 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6153 * Makefile.in (maintainer-clean realclean distclean): Remove
6154 "make ... subdir_do" command.
6156 2011-03-10 Michael Snyder <msnyder@vmware.com>
6158 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6160 * server.c (handle_v_run): Free alloced buffer on early return.
6162 2011-03-09 Yao Qi <yao@codesourcery.com>
6165 2011-03-04 Yao Qi <yao@codesourcery.com>
6167 * Makefile.in: Remove GNU make feature --directory.
6169 2011-03-05 Yao Qi <yao@codesourcery.com>
6171 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6172 (subdir_do): New make target. Copied from gdb/Makefile.
6173 (maintainer-clean, realclean, distclean, clean): Call corresponding
6174 make targets in common/Makefile.
6176 2011-02-11 Yao Qi <yao@codesourcery.com>
6178 * configure.ac: Call AC_PROG_RANLIB.
6179 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6180 * configure: Regenerate.
6182 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6184 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6186 2011-03-06 Yao Qi <yao@codesourcery.com>
6188 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6190 2011-03-05 Yao Qi <yao@codesourcery.com>
6192 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6193 (subdir_do): New make target. Copied from gdb/Makefile.
6194 (maintainer-clean, realclean, distclean, clean): Call corresponding
6195 make targets in common/Makefile.
6197 2011-03-04 Yao Qi <yao@codesourcery.com>
6199 * Makefile.in: Remove GNU make feature --directory.
6201 2011-03-04 Michael Snyder <msnyder@vmware.com>
6203 * server.c (queue_stop_reply): Call xmalloc not malloc.
6205 2011-03-02 Michael Snyder <msnyder@vmware.com>
6207 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6209 2011-02-28 Michael Snyder <msnyder@vmware.com>
6211 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6212 (cmd_qtframe): Ditto.
6213 (cmd_qtbuffer): Ditto.
6214 (cmd_bigqtbuffer): Ditto.
6216 * utils.c (decimal2str): Initialize 'width' to nine, then
6219 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6221 * hostio.c (require_data): Free *data, not data.
6223 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6225 * hostio.c (require_data): Use free, not xfree.
6227 2011-02-27 Michael Snyder <msnyder@vmware.com>
6229 * server.c (handle_query): Discard unused value.
6231 * hostio.c (require_data): Free malloc memory before returning
6234 2011-02-26 Michael Snyder <msnyder@vmware.com>
6236 * linux-low.c (list_threads): Call closedir for dirent.
6238 2011-02-27 Michael Snyder <msnyder@vmware.com>
6240 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6241 a case statement falls through.
6243 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6245 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6248 2011-02-26 Michael Snyder <msnyder@vmware.com>
6250 * utils.c (decimal2str): Eliminate dead code and dead param.
6251 (pulongest): Drop dead param from call to decimal2str.
6254 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6256 Revert the following patch (not approved yet):
6257 2011-02-21 Hui Zhu <teawater@gmail.com>
6258 * tracepoint.c (tp_printf): New function.
6259 (eval_agent_expr): Handle gdb_agent_op_printf.
6261 2011-02-21 Hui Zhu <teawater@gmail.com>
6263 * tracepoint.c (tp_printf): New function.
6264 (eval_agent_expr): Handle gdb_agent_op_printf.
6266 2011-02-18 Tom Tromey <tromey@redhat.com>
6268 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6269 (tracepoint.o): Likewise.
6270 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6271 (gdb_agent_op_names): Likewise.
6273 2011-02-18 Tom Tromey <tromey@redhat.com>
6275 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6276 gdb_agent_op_rot>: New constants.
6277 (gdb_agent_op_names): Add pick and roll.
6278 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6281 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6283 * aclocal.m4: Regenerated with aclocal-1.11.1.
6285 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6287 * server.c (handle_qxfer_traceframe_info): New.
6288 (qxfer_packets): Register "traceframe-info".
6289 (handle_query): Report support for qXfer:traceframe-info:read+.
6290 * tracepoint.c (match_blocktype): New.
6291 (traceframe_find_block_type): Rename to ...
6292 (traceframe_walk_blocks): ... this. Add callback filter argument,
6294 (traceframe_find_block_type): New, reimplemented on top of
6295 traceframe_walk_blocks.
6296 (build_traceframe_info_xml): New.
6297 (traceframe_read_info): New.
6298 * server.h (traceframe_read_info): Declare.
6300 2011-02-11 Yao Qi <yao@codesourcery.com>
6302 * configure.ac: Call AC_PROG_RANLIB.
6303 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6304 * configure: Regenerate.
6306 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6308 * server.c (gdb_read_memory): Change return semantics to allow
6310 (handle_search_memory_1): Adjust.
6311 (process_serial_event) <'m' packet>: Handle partial transfers.
6312 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6314 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6316 * regcache.c (init_register_cache): Initialize
6317 regcache->register_status.
6318 (free_register_cache): Release regcache->register_status.
6319 (regcache_cpy): Copy register_status.
6320 (registers_to_string): Print 'x's for unavailable registers.
6321 (supply_register): Mark the register's status valid or
6322 unavailable, depending on whether a buffer was passed in or not.
6323 (supply_register_zeroed): New.
6324 (supply_regblock): Mark the registers' status valid or
6325 unavailable, depending on whether a buffer was passed in or not.
6326 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6327 (struct regcache): New `register_status' field.
6328 (supply_register_zeroed): Declare.
6329 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6330 supply_register_zeroed, rather than passing a NULL buffer to
6332 * tracepoint.c (fetch_traceframe_registers): Update comment.
6334 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6336 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6339 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6341 * server.h (decode_xfer_write): Change prototype.
6342 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6343 and don't extract the annex here.
6344 * server.c (decode_xfer_read): Remove `annex' parameter,
6345 and don't extract the annex here.
6347 (struct qxfer): New.
6348 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6349 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6350 (handle_qxfer_statictrace): New functions, abstracted out from
6351 handle_query, and made to use the struct qxfer interface.
6352 (handle_threads_qxfer_proper): Rename to ...
6353 (handle_qxfer_threads_proper): ... this.
6354 (handle_threads_qxfer): Rename to ...
6355 (handle_qxfer_threads): ... this. Adjust.
6356 (qxfer_packets): New array.
6357 (handle_qxfer): New function.
6358 (handle_query): Use handle_qxfer.
6360 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6362 * gdbreplay.c: Shorten lines of >= 80 columns.
6363 * linux-low.c: Ditto.
6364 * linux-ppc-low.c: Ditto.
6365 * linux-s390-low.c: Ditto.
6366 * linux-sparc-low.c: Ditto.
6367 * linux-x86-low.c: Ditto.
6368 * linux-xtensa-low.c: Ditto.
6369 * mem-break.c: Ditto.
6371 * regcache.h: Ditto.
6372 * remote-utils.c: Ditto.
6375 * thread-db.c: Ditto.
6376 * tracepoint.c: Ditto.
6378 * win32-low.h: Ditto.
6380 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6382 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6385 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6387 * server.c (gdbserver_version): Update copyright year in version
6389 * gdbreplay.c (gdbreplay_version): Ditto.
6391 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6393 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6394 * linux-bfin-low.c: New file.
6395 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6396 PT_DATA_ADDR for BFIN targets.
6397 * Makefile.in (SFILES): Add linux-bfin-low.c.
6398 (clean): Remove reg-bfin.c.
6399 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6400 * README: Mention supported Blackfin targets.
6402 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6404 * .gitignore: New file.
6406 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6408 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6410 2010-10-22 Jie Zhang <jie@codesourcery.com>
6412 * Makefile.in: Add FLAGS_TO_PASS variable.
6413 (install): Remove dependency of install-only and recursively
6414 invoke make for install-only.
6416 2010-10-04 Doug Evans <dje@google.com>
6418 * Makefile.in (uninstall): Use $(DESTDIR).
6420 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6424 * linux-x86-low.c (compat_siginfo_from_siginfo)
6425 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6426 si_code is < 0. Check for si_code == SI_TIMER before checking for
6429 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6431 * lynx-i386-low.c: New file.
6432 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6434 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6436 * lynx-low.c (ptrace_request_to_str): Remove handling for
6437 request values that have been removed in LynxOS 5.x.
6439 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6441 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6444 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6446 * configure.ac: Add --enable-inprocess-agent option.
6447 * configure: Rebuilt.
6449 2010-09-06 Yao Qi <yao@codesourcery.com>
6451 * linux-low.c (linux_kill): Remove unused variable.
6452 (linux_stabilize_threads): Likewise.
6453 * server.c (start_inferior): Likewise.
6454 (queue_stop_reply_callback): Likewise.
6455 * tracepoint.c (do_action_at_tracepoint): Likewise.
6457 2010-09-06 Yao Qi <yao@codesourcery.com>
6459 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6462 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6464 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6466 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6468 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6471 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6473 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6474 gdbserver/lynx-ppc-low.c: New files.
6475 * Makefile.in (lynx_low_h): New variable.
6476 (lynx-low.o, lynx-ppc-low.o): New rules.
6477 * configure.ac: On LynxOS, link with -lnetinet.
6478 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6479 * configure: regenerate.
6481 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6483 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6484 * configure.ac: Add check for vasprintf and vsnprintf.
6485 * configure, config.in: Regenerate.
6486 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6488 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6490 * gdbreplay.c: Move include of alloca.h up, next to include of
6492 * server.h: Add include of malloc.h.
6493 * mem-break.c: Remove include of malloc.h.
6494 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6496 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6498 * Makefile.in (memmem.o): Build with -Wno-error.
6500 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6502 * utils.c (xsnprintf): Make non-static.
6503 * server.h: Add xsnprintf declaration.
6504 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6505 replace calls to snprintf by calls to xsnprintf throughout.
6507 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6509 * configure.ac: Add configure check for alloca.
6510 * configure, config.in: Regenerate.
6511 * server.h: Include alloca.h if it exists.
6512 * gdbreplay.c: Include alloca.h if it exists.
6514 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6516 * linux-low.c (__SIGRTMIN): Define if not already defined.
6517 (linux_create_inferior): Check for __ANDROID__ rather than
6519 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6520 are already deferred.
6521 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6522 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6523 stopped and already has a pending signal to report.
6524 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6525 a pending signal to report or is moving out of a jump pad.
6526 (linux_init_signals): Check for __ANDROID__ rather than
6529 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6531 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6532 debug_threads check. Avoid a linear search when not doing debug
6535 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6537 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6538 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6539 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6540 (process_event): Change local fd's type to gdb_fildes_t.
6541 (create_file_handler): Adjust prototype.
6542 (delete_file_handler): Adjust prototype.
6543 (handle_file_event): Adjust prototype. Use pfildes.
6544 (create_file_event): Adjsut prototype.
6545 * remote-utils.c (remote_desc, listen_desc): Change type to
6547 * server.h: New gdb_fildes_t typedef.
6548 [USE_WIN32API]: Include winsock2.h.
6549 (delete_file_handler, add_file_handler): Adjust prototypes.
6551 * utils.c (pfildes): New.
6553 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6555 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6556 * configure: Regenerate.
6558 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6560 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6561 (linux_done_accessing_memory): ... this.
6562 (linux_target_ops): Adjust.
6563 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6564 * nto-low.c (nto_target_ops): Adjust comment.
6565 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6566 * spu-low.c (spu_target_ops): Adjust comment.
6567 * target.h (target_ops): Rename unprepare_to_access_memory field
6568 to done_accessing_memory.
6569 (unprepare_to_access_memory): Rename to ...
6570 (done_accessing_memory): ... this.
6572 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6574 * linux-low.c (linux_prepare_to_access_memory): New.
6575 (linux_unprepare_to_access_memory): New.
6576 (linux_target_ops): Install them.
6577 * server.c (read_memory): Rename to ...
6578 (gdb_read_memory): ... this. Use
6579 prepare_to_access_memory/prepare_to_access_memory.
6580 (write_memory): Rename to ...
6581 (gdb_write_memory): ... this. Use
6582 prepare_to_access_memory/prepare_to_access_memory.
6583 (handle_search_memory_1): Adjust.
6584 (process_serial_event): Adjust.
6585 * target.h (struct target_ops): New fields
6586 prepare_to_access_memory and unprepare_to_access_memory.
6587 (prepare_to_access_memory, unprepare_to_access_memory): New.
6588 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6589 prepare_to_access_memory/prepare_to_access_memory.
6590 * nto-low.c (nto_target_ops): Adjust.
6591 * spu-low.c (spu_target_ops): Adjust.
6592 * win32-low.c (win32_target_ops): Adjust.
6594 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6596 * Makefile.in (WARN_CFLAGS): Get it from configure.
6597 (WERROR_CFLAGS): New.
6598 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6599 * configure.ac: Introduce --enable-werror, which adds -Werror to
6600 the compiler command line. Enabled by default. Disable with
6601 --disable-werror. Add -Wdeclaration-after-statement
6602 Wpointer-arith and -Wformat-nonliteral to warning flags.
6603 * configure: Regenerate.
6605 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6607 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6609 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6611 * gdbreplay.c (remote_error): New.
6613 (expect): Use gdbchar. Check for error reading from GDB.
6614 Clarify sync error output.
6615 (play): Check for errors writing to GDB.
6616 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6617 * remote-utils.c (getpkt): Check for errors writing to the remote
6620 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6622 * linux-low.c (linux_wait_1): Move non-debugging code out of
6623 `debug_threads' control.
6625 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6627 * linux-low.c (linux_wait_1): Don't set last_status here.
6628 * server.c (push_event, queue_stop_reply_callback): Assert we're
6629 not pushing a TARGET_WAITKIND_IGNORE event.
6630 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6631 (myresume, handle_target_event): Set the thread's last_resume_kind
6632 and last_status from the target returned status.
6634 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6638 * linux-x86-low.c (update_debug_registers_callback): New.
6639 (i386_dr_low_set_addr): Use it.
6640 (i386_dr_low_get_addr): New.
6641 (i386_dr_low_set_control): Use update_debug_registers_callback.
6642 (i386_dr_low_get_control): New.
6643 (i386_dr_low_get_status): Adjust.
6644 * linux-low.c (linux_stop_lwp): New.
6645 * linux-low.h (linux_stop_lwp): Declare.
6647 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6648 argument instead of a i386_debug_reg_state.
6649 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6650 a i386_debug_reg_state.
6651 (i386_insert_aligned_watchpoint): Adjust.
6652 (i386_remove_aligned_watchpoint): Adjust.
6653 (i386_low_stopped_data_address): Read the debug registers from the
6654 inferior instead of from the mirrors.
6655 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6656 (i386_dr_low_get_addr): Declare.
6657 (i386_dr_low_get_control): Declare.
6658 (i386_dr_low_get_status): Change prototype.
6660 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6661 (i386_dr_low_get_addr): New.
6662 (i386_dr_low_get_control): New.
6663 (i386_dr_low_get_status): Adjust prototype. Return
6665 (i386_initial_stuff): Clear dr_status_mirror and
6667 (i386_get_thread_context): Adjust.
6668 (i386_set_thread_context): Adjust.
6669 (i386_thread_added): Adjust.
6671 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6673 * linux-low.h (linux_thread_area): Delete declaration.
6675 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6677 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6678 after its termination.
6680 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6682 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6683 (gdb_wants_all_stopped): Delete.
6684 (linux_wait_1): Don't call them.
6685 * server.c (handle_v_cont): Tag all threads as want-stopped.
6686 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6687 stopped as "client-wants-stopped".
6689 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6691 * Makefile.in (signals_h): New.
6692 (server_h): Depend on it.
6693 (server.o): Don't depend on $(signals_def).
6694 (signals.o): Depend on $(signals_def).
6696 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6698 * Makefile.in (signals_def): New.
6699 (server_h): Append include/gdb/signals.h and signals_def.
6700 (server.o): Append signals_def.
6702 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6704 * server.c (handle_target_event): Use target_signal_to_host for
6705 resume_info.sig initialization.
6706 * target.h (struct thread_resume) <sig>: New comment.
6708 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6710 * server.c (handle_query): strcpy() the returned string from paddress()
6711 instead of sprintf().
6712 * utils.c (paddress): Return phex_nz().
6714 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6716 * server.c (handle_v_cont): Call mourn_inferior if process
6718 (myresume): Likewise.
6720 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6722 Static tracepoints, and integration with UST.
6724 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6725 * mem-break.c (uninsert_all_breakpoints)
6726 (reinsert_all_breakpoints): New.
6727 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6728 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6729 (gdb_agent_ust_loaded, helper_thread_id)
6730 (gdb_agent_helper_thread_id): New macros.
6731 (struct ipa_sym_addresses): Add addr_ust_loaded,
6732 addr_helper_thread_id, addr_cmd_buf.
6733 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6734 (in_process_agent_loaded_ust): New.
6735 (write_e_ust_not_loaded): New.
6736 (maybe_write_ipa_ust_not_loaded): New.
6737 (struct collect_static_trace_data_action): New.
6738 (enum tracepoint_type) <static_tracepoint>: New.
6739 (struct tracepoint) <handle>: Mention static tracepoints.
6740 (struct static_tracepoint_ctx): New.
6741 (CMD_BUF_SIZE): New.
6742 (add_tracepoint_action): Handle static tracepoint actions.
6743 (unprobe_marker_at): New.
6744 (clear_installed_tracepoints): Handle static tracepoints.
6745 (cmd_qtdp): Handle static tracepoints.
6746 (probe_marker_at): New.
6747 (cmd_qtstart): Handle static tracepoints.
6748 (response_tracepoint): Handle static tracepoints.
6749 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6750 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6751 (get_context_regcache): Handle static tracepoints.
6752 (do_action_at_tracepoint): Handle static tracepoint actions.
6753 (traceframe_find_block_type): Handle static trace data blocks.
6754 (traceframe_read_sdata): New.
6755 (download_tracepoints): Download static tracepoint actions.
6756 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6757 (GDB_PROBE_NAME): New.
6762 (ust_marker_to_static_tracepoint): New.
6764 (collect_ust_data_at_tracepoint): New.
6765 (gdb_ust_probe): New.
6766 (UNIX_PATH_MAX, SOCK_DIR): New.
6767 (gdb_ust_connect_sync_socket): New.
6768 (resume_thread, stop_thread): New.
6769 (run_inferior_command): New.
6770 (init_named_socket): New.
6771 (gdb_ust_socket_init): New.
6772 (cstr_to_hexstr): New.
6774 (first_marker, next_marker): New.
6775 (response_ust_marker): New.
6776 (cmd_qtfstm, cmd_qtsstm): New.
6777 (unprobe_marker_at, probe_marker_at): New.
6778 (cmd_qtstmat, gdb_ust_thread): New.
6779 (gdb_ust_init): New.
6780 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6781 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6783 (x86_64_st_collect_regmap): New.
6784 (X86_64_NUM_ST_COLLECT_GREGS): New.
6785 (AMD64_RIP_REGNUM): New.
6786 (supply_static_tracepoint_registers): New.
6787 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6789 (i386_st_collect_regmap): New.
6790 (i386_NUM_ST_COLLECT_GREGS): New.
6791 (supply_static_tracepoint_registers): New.
6792 * server.c (handle_query): Handle qXfer:statictrace:read.
6793 <qSupported>: Report support for StaticTracepoints, and
6794 qXfer:statictrace:read features.
6795 * server.h (traceframe_read_sdata)
6796 (supply_static_tracepoint_registers): Declare.
6797 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6798 (unpack_varlen_hex): Include in IPA build.
6799 * Makefile.in (ustlibs, ustinc): New.
6800 (IPA_OBJS): Add remote-utils-ipa.o.
6801 ($(IPA_LIB)): Link -ldl and -lpthread.
6803 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6804 * config.in, configure: Regenerate.
6806 2010-06-20 Ian Lance Taylor <iant@google.com>
6807 Pedro Alves <pedro@codesourcery.com>
6809 * linux-x86-low.c (always_true): Delete.
6810 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6811 trying to fool the compiler with always_true.
6813 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6815 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6816 conditions in gdbserver.
6818 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6820 * spu-low.c (spu_read_memory): Wrap around local store limit.
6821 (spu_write_memory): Likewise.
6823 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6825 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6826 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6828 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6830 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6831 uses with LONGEST uses.
6833 2010-06-14 Stan Shebs <stan@codesourcery.com>
6834 Pedro Alves <pedro@codesourcery.com>
6838 * linux-x86-low.c: Include limits.h.
6843 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6844 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6845 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6846 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6847 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6848 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6849 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6850 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6851 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6852 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6853 (amd64_emit_void_call_2): New.
6854 (amd64_emit_ops): New.
6855 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6856 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6857 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6858 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6859 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6860 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6861 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6862 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6863 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6864 (i386_emit_stack_adjust, i386_emit_int_call_1)
6865 (i386_emit_void_call_2): New.
6866 (i386_emit_ops): New.
6867 (x86_emit_ops): New.
6868 (the_low_target): Install x86_emit_ops.
6869 * server.h (struct emit_ops): New.
6870 (get_raw_reg_func_addr): Declare.
6871 (current_insn_ptr, emit_error): Declare.
6872 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6873 (set_trace_state_variable_value): New defines.
6874 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6875 addr_get_trace_state_variable_value and
6876 addr_set_trace_state_variable_value.
6877 (symbol_list): New fields for get_raw_reg,
6878 get_trace_state_variable_value and set_trace_state_variable_value.
6879 (condfn): New typedef.
6880 (struct tracepoint): New field `compiled_cond'.
6881 (do_action_at_tracepoint): Clear compiled_cond.
6882 (get_trace_state_variable_value, set_trace_state_variable_value):
6884 (condition_true_at_tracepoint): If there's a compiled condition,
6886 (current_insn_ptr, emit_error): New globals.
6887 (struct bytecode_address): New.
6888 (get_raw_reg_func_addr): New.
6889 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6890 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6891 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6892 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6893 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6894 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6895 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6896 (compile_tracepoint_condition, compile_bytecodes): New.
6897 * target.h (emit_ops): Forward declare.
6898 (struct target_ops): New field emit_ops.
6899 (target_emit_ops): New.
6900 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6901 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6902 * linux-low.c (linux_emit_ops): New.
6903 (linux_target_ops): Install it.
6904 * linux-low.h (struct linux_target_ops): New field emit_ops.
6906 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6908 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6909 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6911 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6912 Stan Shebs <stan@codesourcery.com>
6914 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6915 (all): Depend on $(extra_libraries).
6916 (install-only): Install the IPA.
6917 (IPA_OBJS, IPA_LIB): New.
6918 (clean): Remove the IPA lib.
6919 (IPAGENT_CFLAGS): New.
6920 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6921 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6922 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6923 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6924 * configure.ac: Check for atomic builtins support in the compiler.
6925 (IPA_DEPFILES, extra_libraries): Define.
6926 * configure.srv (ipa_obj): Add description.
6927 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6928 (i[34567]86-*-linux*): Set ipa_obj.
6929 (x86_64-*-linux*): Set ipa_obj.
6930 * linux-low.c (stabilizing_threads): New.
6931 (supports_fast_tracepoints): New.
6932 (linux_detach): Stabilize threads before detaching.
6933 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6934 the lwp is either not stabilizing, or is moving out of a jump pad.
6935 (linux_fast_tracepoint_collecting): New.
6936 (maybe_move_out_of_jump_pad): New.
6937 (enqueue_one_deferred_signal): New.
6938 (dequeue_one_deferred_signal): New.
6939 (linux_wait_for_event_1): If moving out of a jump pad, defer
6940 pending signals to later.
6941 (linux_stabilize_threads): New.
6942 (linux_wait_1): Check if threads need moving out of jump pads, and
6944 (stuck_in_jump_pad_callback): New.
6945 (move_out_of_jump_pad_callback): New.
6947 (linux_resume_one_lwp): Handle moving out of jump pads.
6948 (linux_set_resume_request): Dequeue deferred signals.
6949 (need_step_over_p): Also step over fast tracepoint jumps.
6950 (start_step_over): Also uninsert fast tracepoint jumps.
6951 (finish_step_over): Also reinsert fast tracepoint jumps.
6952 (linux_install_fast_tracepoint_jump): New.
6953 (linux_target_ops): Install linux_stabilize_threads and
6954 linux_install_fast_tracepoint_jump_pad.
6955 * linux-low.h (linux_target_ops) <get_thread_area,
6956 install_fast_tracepoint_jump_pad>: New fields.
6957 (struct lwp_info) <collecting_fast_tracepoint,
6958 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6959 (linux_get_thread_area): Declare.
6960 * linux-x86-low.c (jump_insn): New.
6961 (x86_get_thread_area): New.
6962 (append_insns): New.
6964 (amd64_install_fast_tracepoint_jump_pad): New.
6965 (i386_install_fast_tracepoint_jump_pad): New.
6966 (x86_install_fast_tracepoint_jump_pad): New.
6967 (the_low_target): Install x86_get_thread_area and
6968 x86_install_fast_tracepoint_jump_pad.
6969 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6970 (struct fast_tracepoint_jump): New.
6971 (fast_tracepoint_jump_insn): New.
6972 (fast_tracepoint_jump_shadow): New.
6973 (find_fast_tracepoint_jump_at): New.
6974 (fast_tracepoint_jump_here): New.
6975 (delete_fast_tracepoint_jump): New.
6976 (set_fast_tracepoint_jump): New.
6977 (uninsert_fast_tracepoint_jumps_at): New.
6978 (reinsert_fast_tracepoint_jumps_at): New.
6979 (set_breakpoint_at): Use write_inferior_memory.
6980 (uninsert_raw_breakpoint): Use write_inferior_memory.
6981 (check_mem_read): Mask out fast tracepoint jumps.
6982 (check_mem_write): Mask out fast tracepoint jumps.
6983 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6984 (set_fast_tracepoint_jump): Declare.
6985 (delete_fast_tracepoint_jump)
6986 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6987 (reinsert_fast_tracepoint_jumps_at): Declare.
6988 * regcache.c: Don't compile many functions when building the
6989 in-process agent library.
6990 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6991 the register buffer in the heap.
6992 (free_register_cache): If the register buffer isn't owned by the
6993 regcache, don't free it.
6994 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6995 pre-existing register caches.
6996 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6998 (convert_ascii_to_int): : Constify `from' parameter type.
6999 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7000 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7001 the needed buffer in-place.
7002 (relocate_instruction): New.
7003 * server.c (handle_query) <qSymbols>: If the target supports
7004 tracepoints, give it a chance of looking up symbols. Report
7005 support for fast tracepoints.
7006 (handle_status): Stabilize threads.
7007 (process_serial_event): Adjust.
7008 * server.h (struct fast_tracepoint_jump): Forward declare.
7009 (struct process_info) <fast_tracepoint_jumps>: New field.
7010 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7011 (decode_X_packet, decode_M_packet): Adjust.
7012 (relocate_instruction): Declare.
7013 (in_process_agent_loaded): Declare.
7014 (tracepoint_look_up_symbols): Declare.
7015 (struct fast_tpoint_collect_status): Declare.
7016 (fast_tracepoint_collecting): Declare.
7017 (force_unlock_trace_buffer): Declare.
7018 (handle_tracepoint_bkpts): Declare.
7019 (initialize_low_tracepoint)
7020 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7021 * target.h (struct target_ops) <stabilize_threads,
7022 install_fast_tracepoint_jump_pad>: New fields.
7023 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7024 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7025 [HAVE_STDINT_H]: Include stdint.h.
7026 (trace_debug_1): Rename to ...
7027 (trace_vdebug): ... this.
7028 (trace_debug): Rename to ...
7029 (trace_debug_1): ... this. Add `level' parameter.
7031 (ATTR_USED, ATTR_NOINLINE): New.
7032 (IP_AGENT_EXPORT): New.
7033 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7034 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7035 (about_to_request_buffer_space, trace_buffer_is_full)
7036 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7037 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7038 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7039 (traceframe_write_count, traceframes_created)
7040 (trace_state_variables)
7041 New renaming defines.
7042 (struct ipa_sym_addresses): New.
7043 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7045 (ipa_sym_addrs): New.
7046 (all_tracepoint_symbols_looked_up): New.
7047 (in_process_agent_loaded): New.
7048 (write_e_ipa_not_loaded): New.
7049 (maybe_write_ipa_not_loaded): New.
7050 (tracepoint_look_up_symbols): New.
7051 (debug_threads) [IN_PROCESS_AGENT]: New.
7052 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7053 (UNKNOWN_SIDE_EFFECTS): New.
7054 (stop_tracing): New.
7055 (flush_trace_buffer): New.
7056 (stop_tracing_bkpt): New.
7057 (flush_trace_buffer_bkpt): New.
7058 (read_inferior_integer): New.
7059 (read_inferior_uinteger): New.
7060 (read_inferior_data_pointer): New.
7061 (write_inferior_data_pointer): New.
7062 (write_inferior_integer): New.
7063 (write_inferior_uinteger): New.
7064 (struct collect_static_trace_data_action): Delete.
7065 (enum tracepoint_type): New.
7066 (struct tracepoint) <type>: New field `type'.
7067 <actions_str, step_actions, step_actions_str>: Only include in
7069 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7070 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7071 (tracepoints): Use IP_AGENT_EXPORT.
7072 (last_tracepoint): Don't include in the IPA.
7073 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7074 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7075 (alloced_trace_state_variables): New.
7076 (trace_state_variables): Use IP_AGENT_EXPORT.
7077 (traceframe_t): Delete unused variable.
7078 (circular_trace_buffer): Don't include in the IPA.
7079 (trace_buffer_start): Delete.
7080 (struct trace_buffer_control): New.
7081 (trace_buffer_free): Delete.
7082 (struct ipa_trace_buffer_control): New.
7083 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7084 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7086 (trace_buffer_ctrl): New.
7087 (TRACE_BUFFER_CTRL_CURR): New.
7088 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7089 Reimplement as macros.
7090 (trace_buffer_wrap): Delete.
7091 (traceframe_write_count, traceframe_read_count)
7092 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7093 (struct tracepoint_hit_ctx) <type>: New field.
7094 (struct fast_tracepoint_ctx): New.
7095 (memory_barrier): New.
7097 (record_tracepoint_error): Update atomically in the IPA.
7098 (clear_inferior_trace_buffer): New.
7099 (about_to_request_buffer_space): New.
7100 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7101 updating the same buffer.
7102 (add_tracepoint): Default the tracepoint's type to trap
7103 tracepoint, and orig_size to -1.
7104 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7106 (create_trace_state_variable): New parameter `gdb'. Handle it.
7107 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7108 (cmd_qtdp): Handle fast tracepoints.
7110 (max_jump_pad_size): New.
7111 (gdb_jump_pad_head): New.
7112 (get_jump_space_head): New.
7113 (claim_jump_space): New.
7114 (sort_tracepoints): New.
7115 (MAX_JUMP_SIZE): New.
7116 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7118 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7119 support. Upload fast traceframes, and delete internal IPA
7121 (stop_tracing_handler): New.
7122 (flush_trace_buffer_handler): New.
7123 (cmd_qtstop): Upload fast tracepoints.
7124 (response_tracepoint): Handle fast tracepoints.
7125 (tracepoint_finished_step): Upload fast traceframes. Set the
7126 tracepoint hit context's tracepoint type.
7127 (handle_tracepoint_bkpts): New.
7128 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7129 type. Add comment about fast tracepoints.
7130 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7131 non-existing action_str field.
7132 (get_context_regcache): Handle fast tracepoints.
7133 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7135 (fast_tracepoint_from_jump_pad_address): New.
7136 (fast_tracepoint_from_ipa_tpoint_address): New.
7137 (collecting_t): New.
7138 (force_unlock_trace_buffer): New.
7139 (fast_tracepoint_collecting): New.
7142 (write_inferior_data_ptr): New.
7143 (target_tp_heap): New.
7144 (target_malloc): New.
7145 (download_agent_expr): New.
7147 (download_tracepoints): New.
7148 (download_trace_state_variables): New.
7149 (upload_fast_traceframes): New.
7150 (IPA_FIRST_TRACEFRAME): New.
7151 (IPA_NEXT_TRACEFRAME_1): New.
7152 (IPA_NEXT_TRACEFRAME): New.
7153 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7154 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7155 (gdb_jump_pad_buffer_end): New.
7156 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7157 (initialize_tracepoint): Adjust.
7158 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7159 buffer. Initialize the low module.
7160 * utils.c (PREFIX, TOOLNAME): New.
7161 (malloc_failure): Use PREFIX.
7162 (error): In the IPA, an error causes an exit.
7163 (fatal, warning): Use PREFIX.
7164 (internal_error): Use TOOLNAME.
7165 (NUMCELLS): Increase to 10.
7166 * configure, config.in: Regenerate.
7168 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7170 * server.c (handle_query) <qSupported>: Do two passes over the
7171 qSupported string to avoid nesting strtok.
7173 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7175 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7177 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7179 * configure: Regenerate.
7180 * proc-service.list: New.
7182 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7184 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7187 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7189 * gdbreplay.c (remote_open): Check error return from socket() call by
7190 its equality to -1 not by it being negative.
7191 * remote-utils.c (remote_open): Likewise.
7193 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7195 * config.h: Regenerate.
7197 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7199 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7200 doesn't provide PTRACE_GET_THREAD_AREA.
7202 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7204 * linux-m68k-low.c: Include <asm/ptrace.h>
7205 (ps_get_thread_area): Implement.
7207 2010-05-03 Doug Evans <dje@google.com>
7209 * event-loop.c (struct callback_event): New struct.
7210 (callback_list): New global.
7211 (append_callback_event, delete_callback_event): New functions.
7212 (process_callback): New function.
7213 (start_event_loop): Call it.
7214 * remote-utils.c (NOT_SCHEDULED): Define.
7215 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7216 moved out of readchar.
7217 (readchar): Rewrite. Call reschedule before returning.
7218 (reset_readchar): New function.
7219 (remote_close): Call it.
7220 (process_remaining, reschedule): New functions.
7221 * server.h (callback_handler_func): New typedef.
7222 (append_callback_event, delete_callback_event): Declare.
7224 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7226 * proc-service.c (ps_pglobal_lookup): Use
7227 thread_db_look_up_one_symbol.
7228 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7229 parameter. Use it instead of all_symbols_looked_up.
7230 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7232 (all_symbols_looked_up): Don't declare.
7233 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7234 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7236 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7237 Set all_symbols_looked_up here.
7238 (thread_db_look_up_one_symbol): New.
7239 (thread_db_get_tls_address): Adjust.
7240 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7241 thread_db object on the heap, and tentatively set it in the
7243 (thread_db_init): Don't set all_symbols_looked_up here.
7244 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7246 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7248 * linux-low.c (linux_kill, linux_detach): Adjust.
7249 (status_pending_p_callback): Remove redundant statement. Check
7250 for !TARGET_WAITIKIND_IGNORE, instead of
7251 TARGET_WAITKIND_STOPPED.
7252 (handle_tracepoints): Make sure LWP is locked. Adjust.
7253 (linux_wait_for_event_1): Adjust.
7254 (linux_cancel_breakpoints): New.
7255 (unsuspend_one_lwp): New.
7256 (unsuspend_all_lwps): New.
7257 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7258 (send_sigstop_callback): Change return type to int, add new
7259 `except' parameter and handle it.
7260 (suspend_and_send_sigstop_callback): New.
7261 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7262 pass them down. If SUSPEND, also increment the lwp's suspend
7264 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7265 (need_step_over_p): Don't consider suspended LWPs.
7266 (start_step_over): Adjust.
7267 (proceed_one_lwp): Change return type to int, add new `except'
7268 parameter and handle it.
7269 (unsuspend_and_proceed_one_lwp): New.
7270 (proceed_all_lwps): Use find_inferior instead of
7272 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7273 also decrement the suspend count of LWPs. Pass `except' down,
7274 instead of hacking its suspend count.
7275 (linux_pause_all): Add `freeze' parameter. Adjust.
7276 (linux_unpause_all): New.
7277 (linux_target_ops): Install linux_unpause_all.
7278 * server.c (handle_status): Adjust.
7279 * target.h (struct target_ops): New fields `unpause_all' and
7280 `cancel_breakpoints'. Add new parameter to `pause_all'.
7281 (pause_all): Add new `freeze' parameter.
7283 (cancel_breakpoints): New.
7284 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7286 (cmd_qtstart): Pause threads.
7287 (stop_tracing): Pause threads, and cancel breakpoints.
7288 * win32-low.c (win32_target_ops): Adjust.
7290 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7292 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7293 the inferior right away from here...
7294 (linux_wait_1): ... to here, and adjust to check the thread's
7295 last_resume_kind instead of the lwp's step or stop_expected flags.
7297 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7299 * README: Use consistent `GDB' and `GDBserver' spellings.
7301 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7303 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7304 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7305 (linux_detach_one_lwp): Assume the lwp is stopped.
7306 (any_thread_of): Delete.
7307 (linux_detach): Stop all lwps here. Don't blindly delete all
7309 (delete_lwp_callback): New.
7310 (linux_mourn): Delete all lwps of the process that is gone.
7311 (linux_wait_1): Don't delete the last lwp of the process here.
7312 * mem-break.h (mark_breakpoints_out): Declare.
7313 * mem-break.c (mark_breakpoints_out): New.
7314 (free_all_breakpoints): Use it.
7315 * server.c (handle_target_event): If the process is gone, mark
7317 * thread-db.c (struct thread_db) <create_bp>: New field.
7318 (thread_db_enable_reporting): Fix prototype. Store a thread event
7319 breakpoint reference in the thread_db struct.
7320 (thread_db_load_search): Clear the thread_db object.
7321 (try_thread_db_load_1): Ditto.
7322 (switch_to_process): New.
7323 (disable_thread_event_reporting): Use it.
7324 (remove_thread_event_breakpoints): New.
7325 (thread_db_detach, thread_db_mourn): Use it.
7327 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7329 * linux-low.c (linux_enable_event_reporting): New.
7330 (linux_wait_for_event_1, handle_extended_wait): Use it.
7332 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7334 * linux-low.c (linux_kill_one_lwp, linux_kill)
7335 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7336 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7337 SIGSTOP even if the LWP is stopped.
7338 (send_sigstop_callback): New.
7339 (stop_all_lwps): Use send_sigstop_callback instead.
7340 (linux_resume_one_thread): Adjust.
7341 (proceed_one_lwp): Still proceed an LWP that the client has
7342 requested to stop, if we haven't reported it as stopped yet. Make
7343 sure that LWPs the client want stopped, have a pending SIGSTOP.
7345 2010-04-26 Doug Evans <dje@google.com>
7347 * server.c (handle_general_set): Make static.
7349 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7350 Print received char after testing for error/eof instead of before.
7351 (input_interrupt): Tweak comment.
7353 2010-04-23 Doug Evans <dje@google.com>
7355 * server.c (start_inferior): Print inferior argv if --debug.
7357 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7359 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7360 * nto-x86-low.c: Include server.h
7362 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7364 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7365 be consistent with other sources of this directory.
7366 (init_registers_amd64): Correct name of source file of this function
7369 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7371 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7374 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7376 * win32-i386-low.c: Add 64-bit support.
7377 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7378 (init_registers_amd64): Declare.
7379 (mappings): Add 64-bit version of array.
7380 (init_windows_x86): New function.
7381 (the_low_target): Change init_arch field to init_windows_x86.
7383 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7385 * win32-low.c: Adapt to support also 64-bit architecture.
7386 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7387 (get_image_name): Use SIZE_T type for local variable `done'.
7388 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7389 (toolhelp_get_dll_name): Idem.
7390 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7391 Use uintptr_t typecast to avoid warning.
7392 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7393 (handle_exception): Use phex_nz to avoid warning.
7394 (win32_wait): Remove unused local variable `process'.
7396 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7398 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7401 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7403 * configure.ac: Use `ws2_32' library for srv_mingw.
7404 * configure: Regenerate.
7405 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7406 * remote-utils.c: Likewise.
7408 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7410 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7411 if __x86_64__ is defined.
7413 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7415 * configure: Regenerate.
7417 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7419 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7420 * target.h (target_ops): New get_tib_address field.
7421 * win32-low.h (win32_thread_info): Add thread_local_base field.
7422 * win32-low.c (child_add_thread): Add tlb argument.
7423 Set thread_local_base field to TLB.
7424 (get_child_debug_event): Adapt to child_add_thread change.
7425 (win32_get_tib_address): New function.
7426 (win32_target_ops): Set get_tib_address field to
7427 win32_get_tib_address.
7428 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7430 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7432 * linux-low.c (linux_mourn): Also remove the process.
7433 * server.c (handle_target_event): Don't remove the process here.
7434 * nto-low.c (nto_mourn): New.
7435 (nto_target_ops): Install it.
7436 * spu-low.c (spu_mourn): New.
7437 (spu_target_ops): Install it.
7438 * win32-low.c (win32_mourn): New.
7439 (win32_target_ops): Install it.
7441 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7443 * server.h (buffer_xml_printf): Remove redundant `;'.
7445 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7447 * regcache.c (set_register_cache): Invalidate regcaches before
7448 changing the register cache layout.
7449 (regcache_invalidate_one): Allow a NULL regcache.
7450 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7451 regcaches before changing the register cache layout or the target
7454 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7456 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7457 variable warning on Linux/x86-64.
7459 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7461 GDBserver disconnected tracing support.
7463 * linux-low.c (linux_remove_process): Delete.
7464 (add_lwp): Don't set last_resume_kind here.
7465 (linux_kill): Use `mourn'.
7466 (linux_detach): Use `thread_db_detach', and `mourn'.
7468 (linux_attach_lwp_1): Adjust comment.
7469 (linux_attach): last_resume_kind moved the thread_info; adjust.
7470 (status_pending_p_callback): Adjust.
7471 (linux_wait_for_event_1): Adjust.
7472 (count_events_callback, select_singlestep_lwp_callback)
7473 (select_event_lwp_callback, cancel_breakpoints_callback)
7474 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7475 (proceed_one_lwp): Adjust.
7476 (linux_async): Add debug output.
7477 (linux_thread_stopped): New.
7478 (linux_pause_all): New.
7479 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7481 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7482 (thread_db_free): Delete declaration.
7483 (thread_db_detach, thread_db_mourn): Declare.
7484 * thread-db.c (thread_db_init): Use thread_db_mourn.
7485 (thread_db_free): Delete, split in two.
7486 (disable_thread_event_reporting): New.
7487 (thread_db_detach): New.
7488 (thread_db_mourn): New.
7490 * server.h (struct thread_info) <last_resume_kind>: New field.
7491 <attached>: Add comment.
7492 <gdb_detached>: New field.
7493 (handler_func): Change return type to int.
7494 (handle_serial_event, handle_target_event): Ditto.
7495 (gdb_connected): Declare.
7497 (disconnected_tracing): Declare.
7498 (stop_tracing): Declare.
7500 * server.c (handle_query) <qSupported>: Report support for
7501 disconnected tracing.
7502 (queue_stop_reply_callback): Account for running threads.
7503 (gdb_wants_thread_stopped): New.
7504 (gdb_wants_all_threads_stopped): New.
7505 (gdb_reattached_process): New.
7506 (handle_status): Clear the `gdb_detached' flag of all processes.
7507 In all-stop, stop all threads.
7508 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7509 (process_serial_event): If the remote connection breaks, or if an
7510 exit was forced with "monitor exit", force an event loop exit.
7511 Handle disconnected tracing on detach.
7512 (handle_serial_event): Adjust.
7513 (handle_target_event): If GDB isn't connected, forward events back
7514 to the inferior, unless the last process exited, in which case,
7515 exit gdbserver. Adjust interface.
7517 * remote-utils.c (remote_open): Don't block in accept. Instead
7518 register an event loop source on the listen socket file
7519 descriptor. Refactor bits into ...
7520 (listen_desc): ... this new global.
7521 (gdb_connected): ... this new function.
7522 (enable_async_notification): ... this new function.
7523 (handle_accept_event): ... this new function.
7524 (remote_close): Clear remote_desc.
7526 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7528 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7530 (mourn_inferior): Define.
7531 (target_process_qsupported): Avoid the dangling else problem.
7532 (thread_stopped): Define.
7533 (pause_all): Define.
7534 (target_waitstatus_to_string): Declare.
7535 * target.c (target_waitstatus_to_string): New.
7537 * tracepoint.c (tracing): Make extern.
7538 (disconnected_tracing): New.
7539 (stop_tracing): Make extern. Handle tracing stops due to GDB
7541 (cmd_qtdisconnected): New.
7542 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7543 (handle_tracepoint_general_set): Handle QTDisconnected.
7545 * event-loop.c (event_handler_func): Change return type to int.
7546 (process_event): Bail out if the event handler wants the event
7548 (handle_file_event): Ditto.
7549 (start_event_loop): Bail out if the event handler wants the event
7552 * nto-low.c (nto_target_ops): Adjust.
7553 * spu-low.c (spu_wait): Don't remove the process here.
7554 (spu_target_ops): Adjust.
7555 * win32-low.c (win32_wait): Don't remove the process here.
7556 (win32_target_ops): Adjust.
7558 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7560 * regcache.c (realloc_register_cache): Invalidate inferior's
7561 regcache before recreating it.
7563 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7565 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7567 2010-04-09 Stan Shebs <stan@codesourcery.com>
7568 Pedro Alves <pedro@codesourcery.com>
7570 * server.h (LONGEST): New.
7571 (struct thread_info) <while_stepping>: New field.
7572 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7574 (initialize_tracepoint, handle_tracepoint_general_set)
7575 (handle_tracepoint_query, tracepoint_finished_step)
7576 (tracepoint_was_hit, release_while_stepping_state_list):
7577 (current_traceframe): Declare.
7578 * server.c (handle_general_set): Handle tracepoint packets.
7580 (write_memory): New.
7581 (handle_search_memory_1): Use read_memory.
7582 (handle_query): Report support for conditional tracepoints, trace
7583 state variables, and tracepoint sources. Handle tracepoint
7585 (main): Initialize the tracepoints module.
7586 (process_serial_event): Handle traceframe reads/writes.
7588 * linux-low.c (handle_tracepoints): New.
7589 (linux_wait_1): Call it.
7590 (linux_resume_one_lwp): Handle while-stepping.
7591 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7592 (linux_target_ops): Install them.
7593 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7595 * linux-x86-low.c (x86_supports_tracepoints): New.
7596 (the_low_target). Install it.
7598 * mem-break.h (delete_breakpoint): Declare.
7599 * mem-break.c (delete_breakpoint): Make external.
7601 * target.h (struct target_ops): Add `supports_tracepoints',
7602 `read_pc', and `write_pc' fields.
7603 (target_supports_tracepoints): Define.
7604 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7607 * regcache.h (struct regcache) <registers_owned>: New field.
7608 (init_register_cache, regcache_cpy): Declare.
7609 (regcache_read_pc, regcache_write_pc): Declare.
7610 (register_cache_size): Declare.
7611 (supply_regblock): Declare.
7612 * regcache.c (init_register_cache): New.
7613 (new_register_cache): Use it.
7614 (regcache_cpy): New.
7615 (register_cache_size): New.
7616 (supply_regblock): New.
7617 (regcache_read_pc, regcache_write_pc): New.
7619 * tracepoint.c: New.
7621 * Makefile.in (OBS): Add tracepoint.o.
7622 (tracepoint.o): New rule.
7624 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7626 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7628 (i386-mmx.c): Likewise.
7629 (i386-mmx-linux.o): Likewise.
7630 (i386-mmx-linux.c): Likewise.
7632 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7633 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7634 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7635 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7637 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7638 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7639 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7641 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7643 * Makefile.in (clean): Updated.
7645 (i386-avx.c): Likewise.
7646 (i386-avx-linux.o): Likewise.
7647 (i386-avx-linux.c): Likewise.
7648 (amd64-avx.o): Likewise.
7649 (amd64-avx.c): Likewise.
7650 (amd64-avx-linux.o): Likewise.
7651 (amd64-avx-linux.c): Likewise.
7653 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7654 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7655 (srv_amd64_regobj): Add amd64-avx.o.
7656 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7657 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7658 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7659 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7660 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7661 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7662 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7664 * i387-fp.c: Include "i386-xstate.h".
7666 (i387_cache_to_xsave): Likewise.
7667 (i387_xsave_to_cache): Likewise.
7668 (x86_xcr0): Likewise.
7670 * i387-fp.h (i387_cache_to_xsave): Likewise.
7671 (i387_xsave_to_cache): Likewise.
7672 (x86_xcr0): Likewise.
7674 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7675 * linux-crisv32-low.c (target_regsets): Likewise.
7676 * linux-m68k-low.c (target_regsets): Likewise.
7677 * linux-mips-low.c (target_regsets): Likewise.
7678 * linux-ppc-low.c (target_regsets): Likewise.
7679 * linux-s390-low.c (target_regsets): Likewise.
7680 * linux-sh-low.c (target_regsets): Likewise.
7681 * linux-sparc-low.c (target_regsets): Likewise.
7682 * linux-xtensa-low.c (target_regsets): Likewise.
7684 * linux-low.c: Include <sys/uio.h>.
7685 (regsets_fetch_inferior_registers): Support nt_type.
7686 (regsets_store_inferior_registers): Likewise.
7687 (linux_process_qsupported): New.
7688 (linux_target_ops): Add linux_process_qsupported.
7690 * linux-low.h (regset_info): Add nt_type.
7691 (linux_target_ops): Add process_qsupported.
7693 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7695 (init_registers_i386_avx_linux): New.
7696 (init_registers_amd64_avx_linux): Likewise.
7697 (xmltarget_i386_linux_no_xml): Likewise.
7698 (xmltarget_amd64_linux_no_xml): Likewise.
7699 (PTRACE_GETREGSET): Likewise.
7700 (PTRACE_SETREGSET): Likewise.
7701 (x86_fill_xstateregset): Likewise.
7702 (x86_store_xstateregset): Likewise.
7703 (use_xml): Likewise.
7704 (x86_linux_update_xmltarget): Likewise.
7705 (x86_linux_process_qsupported): Likewise.
7706 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7707 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7708 init_registers_i386_linux here. Call
7709 x86_linux_update_xmltarget.
7710 (the_low_target): Add x86_linux_process_qsupported.
7712 * server.c (handle_query): Call target_process_qsupported.
7714 * target.h (target_ops): Add process_qsupported.
7715 (target_process_qsupported): New.
7717 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7719 * inferiors.c (add_thread): Set last_status kind to
7720 TARGET_WAITKIND_IGNORE.
7721 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7722 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7723 (linux_wait_1): Move `thread' local definition to block that uses
7724 it. Don't NULL initialize `event_child'.
7725 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7726 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7727 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7729 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7731 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7732 an extended waitstatus, or by a watchpoint.
7733 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7734 thread was stepping or has been stopped by a watchpoint.
7736 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7738 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7739 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7740 of another, then delete the previous, and validate all
7742 (validate_inserted_breakpoint): New.
7743 (delete_disabled_breakpoints): New.
7744 (validate_breakpoints): New.
7745 (check_mem_read): Validate breakpoints before trusting their
7746 shadow. Delete disabled breakpoints.
7747 (check_mem_write): Validate breakpoints before trusting they
7748 should be inserted. Delete disabled breakpoints.
7749 * mem-break.h (validate_breakpoints):
7750 * server.c (handle_query): Validate breakpoints when we see a
7753 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7755 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7756 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7757 if we could tell there's a GDB breakpoint at stop_pc.
7758 (need_step_over_p): Don't do a step over if we find a GDB
7759 breakpoint at the resume PC.
7761 * mem-break.c (struct raw_breakpoint): New.
7762 (enum bkpt_type): New type `gdb_breakpoint'.
7763 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7764 fields. New field `raw'.
7765 (find_raw_breakpoint_at): New.
7766 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7768 (set_breakpoint_at): Adjust.
7769 (delete_raw_breakpoint): New.
7770 (release_breakpoint): New.
7771 (delete_breakpoint): Rename to...
7772 (delete_breakpoint_1): ... this. Add proc parameter. Use
7773 release_breakpoint. Return ENOENT.
7774 (delete_breakpoint): Reimplement.
7775 (find_breakpoint_at): Delete.
7776 (find_gdb_breakpoint_at): New.
7777 (delete_breakpoint_at): Delete.
7778 (set_gdb_breakpoint_at): New.
7779 (delete_gdb_breakpoint_at): New.
7780 (gdb_breakpoint_here): New.
7781 (set_reinsert_breakpoint): Use release_breakpoint.
7782 (uninsert_breakpoint): Rename to ...
7783 (uninsert_raw_breakpoint): ... this.
7784 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7785 (reinsert_raw_breakpoint): Change parameter type to
7787 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7789 (check_breakpoints): Adjust. Use release_breakpoint.
7790 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7791 (breakpoint_inserted_here): Ditto.
7792 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7793 Don't trust the breakpoint's shadow if it is not inserted.
7794 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7795 (delete_all_breakpoints): Adjust.
7796 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7797 use delete_breakpoint_1.
7799 * mem-break.h (breakpoints_supported): Delete declaration.
7800 (set_gdb_breakpoint_at): Declare.
7801 (gdb_breakpoint_here): Declare.
7802 (delete_breakpoint_at): Delete.
7803 (delete_gdb_breakpoint_at): Declare.
7805 * server.h (struct raw_breakpoint): Forward declare.
7806 (struct process_info): New field `raw_breakpoints'.
7808 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7811 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7813 * linux-low.c (status_pending_p_callback): Fix comment.
7814 (linux_wait_for_event_1): Move most of the internal breakpoint
7815 handling from here...
7816 (linux_wait_1): ... to here.
7817 (count_events_callback): New.
7818 (select_singlestep_lwp_callback): New.
7819 (select_event_lwp_callback): New.
7820 (cancel_breakpoints_callback): New.
7821 (select_event_lwp): New.
7822 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7823 priority to all LWPs that have had events that should be reported
7824 to the client. Cancel breakpoints when about to reporting the
7825 event to the client, not while stopping lwps. No longer cancel
7826 finished single-steps here.
7827 (cancel_finished_single_step): Delete.
7828 (cancel_finished_single_steps): Delete.
7830 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7832 * mem-break.c (enum bkpt_type): New.
7833 (struct breakpoint): New field `type'.
7834 (set_breakpoint_at): Change return type to struct breakpoint
7835 pointer. Set type to `other_breakpoint' by default.
7836 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7837 in the breakpoint list.
7838 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7839 (reinsert_breakpoint): Rename to ...
7840 (reinsert_raw_breakpoint): ... this.
7841 (reinsert_breakpoints_at): Adjust.
7842 * mem-break.h (struct breakpoint): Declare.
7843 (set_breakpoint_at): Change return type to struct breakpoint
7846 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7848 * server.c (handle_query): Assign, not compare.
7850 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7852 Teach linux gdbserver to step-over-breakpoints.
7854 * linux-low.c (can_hardware_single_step): New.
7855 (supports_breakpoints): New.
7856 (handle_extended_wait): If stopping threads, read the stop pc of
7859 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7860 low target doesn't support retrieving the PC.
7861 (add_lwp): Set last_resume_kind to resume_continue.
7862 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7863 (linux_attach): Don't clear stop_expected. Set the lwp's
7864 last_resume_kind to resume_stop.
7865 (linux_detach_one_lwp): Don't check for removed breakpoints.
7866 (check_removed_breakpoint): Delete.
7867 (status_pending_p): Rename to ...
7868 (status_pending_p_callback): ... this. Don't check for removed
7869 breakpoints. Don't consider threads that are stopped from GDB's
7871 (linux_wait_for_lwp): Always read the stop_pc here.
7872 (cancel_breakpoint): New.
7873 (step_over_bkpt): New global.
7874 (linux_wait_for_event_1): Implement stepping over breakpoints.
7875 (gdb_wants_lwp_stopped): New.
7876 (gdb_wants_all_stopped): New.
7877 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7878 single-step traps here. Store the thread's last reported target
7880 (send_sigstop): Don't clear stop_expected. Always set it,
7882 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7883 (cancel_finished_single_step): New.
7884 (cancel_finished_single_steps): New.
7885 (wait_for_sigstop): Don't cancel finished single-step traps here.
7886 (linux_resume_one_lwp): Don't check for removed breakpoints.
7887 Don't set `step' on non-hardware step archs.
7888 (linux_set_resume_request): Ignore resume_stop requests if already
7889 stopping or stopped. Set the lwp's last_resume_kind.
7890 (resume_status_pending_p): Don't check for removed breakpoints.
7891 (need_step_over_p): New.
7892 (start_step_over): New.
7893 (finish_step_over): New.
7894 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7895 requests. Clear the thread's last reported target waitstatus.
7896 Don't use the `suspended' flag. Don't consider pending breakpoints.
7897 (linux_resume): Start a step-over if necessary.
7898 (proceed_one_lwp): New.
7899 (proceed_all_lwps): New.
7900 (unstop_all_lwps): New.
7901 * linux-low.h (struct lwp_info): Rewrite comment for the
7902 `suspended' flag. Add the `stop_pc' field. Delete the
7903 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7904 Add `'last_resume_kind' and `need_step_over' fields.
7905 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7906 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7907 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7908 (set_raw_breakpoint_at): New.
7909 (set_breakpoint_at): Rewrite to use it.
7910 (reinsert_breakpoint_handler): Delete.
7911 (set_reinsert_breakpoint): New.
7912 (reinsert_breakpoint_by_bp): Delete.
7913 (delete_reinsert_breakpoints): New.
7914 (uninsert_breakpoint): Rewrite.
7915 (uninsert_breakpoints_at): New.
7916 (reinsert_breakpoint): Rewrite.
7917 (reinsert_breakpoints_at): New.
7918 (check_breakpoints): Rewrite.
7919 (breakpoint_here): New.
7920 (breakpoint_inserted_here): New.
7921 (check_mem_read): Adjust.
7922 * mem-break.h (breakpoints_supported, breakpoint_here)
7923 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7924 (reinsert_breakpoint_by_bp): Delete declaration.
7925 (delete_reinsert_breakpoints): Declare.
7926 (reinsert_breakpoint): Delete declaration.
7927 (reinsert_breakpoints_at): Declare.
7928 (uninsert_breakpoint): Delete declaration.
7929 (uninsert_breakpoints_at): Declare.
7930 (check_breakpoints): Adjust prototype.
7931 * server.h: Adjust include order.
7932 (struct thread_info): Declare here. Add a `last_status' field.
7934 2010-03-23 Michael Snyder <msnyder@vmware.com>
7936 * server.c (crc32): New function.
7937 (handle_query): Add handling for 'qCRC:' request.
7939 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7941 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7942 lwp had been stopped by a watchpoint.
7944 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7946 * server.h (internal_error): Declare.
7947 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7948 * utils.c (internal_error): New function.
7950 2010-03-15 Andreas Schwab <schwab@redhat.com>
7952 * configure.srv: Fix typo setting srv_regobj.
7954 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7956 * linux-low.c (fetch_register): Avoid passing a non string literal
7958 (usr_store_inferior_registers): Ditto.
7960 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7962 * linux-low.c (linux_write_memory): Bail out early if peeking
7965 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7967 * linux-low.h (struct lwp_info): New fields
7968 `stopped_by_watchpoint' and `stopped_data_address'.
7969 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7970 here, and cache them in the lwp object.
7971 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7973 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7975 (linux_stopped_by_watchpoint): Rewrite.
7976 (linux_stopped_data_address): Rewrite.
7978 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7980 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7981 switching the current inferior, not before.
7983 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7985 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7986 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7987 i386-linux.c and amd64-linux.c.
7988 (reg-i386.o): Removed.
7989 (reg-i386.c): Likewise.
7990 (reg-i386-linux.o): Likewise.
7991 (reg-i386-linux.c): Likewise.
7992 (reg-x86-64.o): Likewise.
7993 (reg-x86-64.c): Likewise.
7994 (reg-x86-64-linux.o): Likewise.
7995 (reg-x86-64-linux.c): Likewise.
7998 (i386-linux.o): Likewise.
7999 (i386-linux.c): Likewise.
8000 (amd64.o): Likewise.
8001 (amd64.c): Likewise.
8002 (amd64-linux.o): Likewise.
8003 (amd64-linux.c): Likewise.
8005 * configure.srv (srv_i386_regobj): New.
8006 (srv_i386_linux_regobj): Likewise.
8007 (srv_amd64_regobj): Likewise.
8008 (srv_amd64_linux_regobj): Likewise.
8009 (srv_i386_32bit_xmlfiles): Likewise.
8010 (srv_i386_64bit_xmlfiles): Likewise.
8011 (srv_i386_xmlfiles): Likewise.
8012 (srv_amd64_xmlfiles): Likewise.
8013 (srv_i386_linux_xmlfiles): Likewise.
8014 (srv_amd64_linux_xmlfiles): Likewise.
8015 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8016 srv_xmlfiles to $srv_i386_xmlfiles.
8017 (i[34567]86-*-mingw32ce*): Likewise.
8018 (i[34567]86-*-mingw*): Likewise.
8019 (i[34567]86-*-nto*): Likewise.
8020 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8021 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8022 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8023 (x86_64-*-linux*): Likewise.
8025 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8026 (init_registers_amd64_linux): New.
8027 (x86_arch_setup): Replace init_registers_x86_64_linux with
8028 init_registers_amd64_linux.
8030 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8032 * configure.ac: Check for libdl. If it is not available link against
8033 static libthread_db.
8034 * configure: Regenerate.
8036 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8040 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8041 handing a read watchpoint.
8042 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8044 2010-02-12 Doug Evans <dje@google.com>
8046 * linux-low.c (linux_supports_tracefork_flag): Document.
8047 (linux_look_up_symbols): Add comment.
8049 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8051 * regcache.c (supply_register): Clear regcache if buf is NULL.
8053 2010-02-02 Nicolas Roche <roche@sourceware.org>
8054 Joel Brobecker <brobecker@adacore.com>
8056 * inferiors.c (find_inferior): Add function documentation.
8057 (unloaded_dll): Handle the case where the unloaded dll has not
8058 been previously registered in the dll list.
8060 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8062 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8063 (thumb2_breakpoint): New.
8064 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8066 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8068 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8069 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8072 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8074 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8076 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8078 * linux-s390-low.c (s390_collect_ptrace_register)
8079 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8081 2010-01-21 Doug Evans <dje@google.com>
8083 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8084 (PTRACE_ARG4_TYPE): New macro.
8085 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8086 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8087 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8088 (usr_store_inferior_registers): Ditto.
8089 (linux_read_memory, linux_write_memory): Ditto.
8090 (linux_test_for_tracefork): Ditto.
8092 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8093 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8095 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8097 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8100 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8102 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8103 prototype to take a regcache. Adjust.
8105 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8107 * regcache.h (struct thread_info): Forward declare.
8108 (struct regcache): New.
8109 (new_register_cache): Adjust prototype.
8110 (get_thread_regcache): Declare.
8111 (free_register_cache): Adjust prototype.
8112 (registers_to_string, registers_from_string): Ditto.
8113 (supply_register, supply_register_by_name, collect_register)
8114 (collect_register_as_string, collect_register_by_name): Ditto.
8115 * regcache.c (struct inferior_regcache_data): Delete.
8116 (get_regcache): Rename to ...
8117 (get_thread_regcache): ... this. Adjust. Switch inferior before
8119 (regcache_invalidate_one): Adjust.
8120 (regcache_invalidate): Fix prototype.
8121 (new_register_cache): Return the new register cache.
8122 (free_register_cache): Change prototype.
8123 (realloc_register_cache): Adjust.
8124 (registers_to_string): Change prototype to take a regcache. Adjust.
8125 (registers_from_string): Ditto.
8126 (register_data): Ditto.
8127 (supply_register): Ditto.
8128 (supply_register_by_name): Ditto.
8129 (collect_register): Ditto.
8130 (collect_register_as_string): Ditto.
8131 (collect_register_by_name): Ditto.
8132 * server.c (process_serial_event): Adjust.
8133 * linux-low.h (regset_fill_func, regset_store_func): Change
8135 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8137 * linux-low.c (get_stop_pc): Adjust.
8138 (check_removed_breakpoint): Adjust.
8139 (linux_wait_for_event): Adjust.
8140 (linux_resume_one_lwp): Adjust.
8141 (fetch_register): Add regcache parameter. Adjust.
8142 (usr_store_inferior_registers): Ditto.
8143 (regsets_fetch_inferior_registers): Ditto.
8144 (regsets_store_inferior_registers): Ditto.
8145 (linux_fetch_registers, linux_store_registers): Ditto.
8146 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8148 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8150 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8151 prototype to take a regcache.
8152 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8153 * remote-utils.c (convert_ascii_to_int, outreg)
8154 (prepare_resume_reply): Change prototype to take a regcache.
8156 * target.h (struct target_ops) <fetch_registers, store_registers>:
8157 Change prototype to take a regcache.
8158 (fetch_inferior_registers, store_inferior_registers): Change
8159 prototype to take a regcache. Adjust.
8160 * proc-service.c (ps_lgetregs): Adjust.
8161 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8162 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8163 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8164 take a regcache. Adjust.
8165 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8166 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8167 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8168 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8169 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8170 (cris_cannot_fetch_register):
8171 (cris_breakpoint_at): Change prototype to take a regcache.
8173 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8174 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8175 to take a regcache. Adjust.
8176 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8178 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8179 take a regcache. Adjust.
8180 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8181 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8182 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8183 * linux-mips-low.c (mips_get_pc):
8184 (mips_set_pc): Change prototype to take a regcache. Adjust.
8185 (mips_reinsert_addr): Adjust.
8186 (mips_collect_register): Change prototype to take a regcache.
8188 (mips_supply_register):
8189 (mips_collect_register_32bit, mips_supply_register_32bit)
8190 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8191 (mips_store_fpregset): Ditto.
8192 * linux-ppc-low.c (ppc_supply_ptrace_register)
8193 (ppc_supply_ptrace_register): Ditto.
8194 (parse_spufs_run): Adjust.
8195 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8196 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8197 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8198 take a regcache. Adjust.
8199 * linux-s390-low.c (s390_collect_ptrace_register)
8200 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8201 (s390_set_pc): Change prototype to take a regcache. Adjust.
8202 (s390_arch_setup): Adjust.
8203 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8204 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8205 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8206 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8207 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8209 (sparc_breakpoint_at): Adjust.
8210 * linux-xtensa-low.c (xtensa_fill_gregset):
8211 (xtensa_store_gregset):
8212 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8213 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8214 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8215 prototype to take a regcache. Adjust.
8216 * win32-arm-low.c (arm_fetch_inferior_register)
8217 (arm_store_inferior_register): Change prototype to take a
8219 * win32-i386-low.c (i386_fetch_inferior_register)
8220 (i386_store_inferior_register): Change prototype to take a
8222 * win32-low.c (child_fetch_inferior_registers)
8223 (child_store_inferior_registers): Change prototype to take a
8225 (win32_wait): Adjust.
8226 (win32_fetch_inferior_registers): Change prototype to take a
8228 (win32_store_inferior_registers): Adjust.
8229 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8230 store_inferior_register>: Change prototype to take a regcache.
8232 2010-01-20 Doug Evans <dje@google.com>
8234 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8236 (linux_wait_for_event1, linux_init_signals): Ditto.
8237 (W_STOPCODE): Provide definition if missing.
8239 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8241 * linux-low.c (linux_core_of_thread): New.
8242 (compare_ints, show_process, list_threads): New.
8243 (linux_qxfer_osdata): Report threads and cores.
8244 (linux_target_op): Register linux_core_of_thread.
8245 * remote-utils.c (prepare_resume_reply): Report the core.
8246 (buffer_xml_printf): Support %d specifier.
8247 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8249 (handle_query): Handle qXfer:threads. Announce availability
8251 * target.h (struct target_ops): New field core_of_thread.
8253 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8255 * Makefile.in (clean): Remove new generated files.
8256 (reg-s390.o, reg-s390.c): Remove rules.
8257 (reg-s390x.o, reg-s390x.c): Likewise.
8258 (s390-linux32.o, s390-linux32.c): Add rules.
8259 (s390-linux64.o, s390-linux64.c): Likewise.
8260 (s390x-linux64.o, s390x-linux64.c): Likewise.
8261 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8262 * linux-s390-low.c: Include <elf.h>.
8263 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8264 (init_registers_s390): Remove prototype.
8265 (init_registers_s390x): Likewise.
8266 (init_registers_s390_linux32): Add prototype.
8267 (init_registers_s390_linux64): Likewise.
8268 (init_registers_s390x_linux64): Likewise.
8269 (s390_num_regs_3264): New define.
8270 (s390_regmap_3264): New global variable.
8271 (s390_cannot_fetch_register): Remove obsolete check.
8272 (s390_cannot_store_register): Likewise.
8273 (s390_collect_ptrace_register): Handle upper/lower register halves.
8274 (s390_supply_ptrace_register): Likewise.
8275 (s390_fill_gregset): Update to register number changes.
8276 (s390_get_hwcap): New routine.
8277 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8278 Install appropriate regmap and register set.
8280 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8282 * server.c (gdbserver_version): Update copyright year to 2010.
8283 * gdbreplay.c (gdbreplay_version): Likewise.
8285 2009-12-28 Doug Evans <dje@google.com>
8287 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8288 elf/external.h. Include <elf.h> instead but only if necessary.
8290 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8292 * linux-low.c (linux_remove_process): Remove `detaching'
8293 parameter. Don't release/detach from thread_db here.
8294 (linux_kill): Release/detach from thread_db here, ...
8295 (linux_detach): ... and here, before actually detaching.
8296 (linux_wait_1): ... and here, when a process exits.
8297 * thread-db.c (any_thread_of): New.
8298 (thread_db_free): Switch the current inferior to a thread of the
8301 2009-12-21 Doug Evans <dje@google.com>
8303 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8305 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8306 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8307 warning ifndef __NR_tkill. Move setting of errno there too.
8308 Delete unnecessary resetting of errno after syscall.
8309 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8311 * configure.ac: Check for dladdr.
8312 * config.in: Regenerate.
8313 * configure: Regenerate.
8314 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8315 (try_thread_db_load): Update.
8317 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8319 2009-12-18 Doug Evans <dje@google.com>
8321 * event-loop.c: Include unistd.h if it exists.
8323 * linux-low.c (my_waitpid): Move definition away from being in
8324 between linux_tracefork_child/linux_test_for_tracefork.
8326 * gdb_proc_service.h (psaddr_t): Fix type.
8327 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8328 signature to match glibc.
8330 2009-12-16 Doug Evans <dje@google.com>
8332 * linux-low.c (linux_read_memory): Fix argument to read.
8334 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8336 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8337 events, don't leave current_inferior pointing at null.
8339 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8341 * win32-low.c (LOG): Delete.
8342 (OUTMSG): Output to stderr.
8343 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8344 on compile time LOG macro.
8345 (win32_wait): Fix debug output.
8347 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8349 * win32-low.c (win32_add_one_solib): If the dll name is
8350 "ntdll.dll", prepend the system directory to the dll path.
8352 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8354 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8356 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8357 Vladimir Prus <vladimir@codesourcery.com>
8359 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8360 * configure.ac: Check for __mcoldfire__ and set
8361 gdb_cv_m68k_is_coldfire.
8362 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8363 reg-cf.o and reg-m68k.o.
8364 * configure: Regenerated.
8366 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8368 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8369 Pass it to thread_db_free.
8370 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8371 proper `detaching' argument to linux_remove_process.
8372 * linux-low.h (thread_db_free): Add `detaching' parameter.
8373 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8375 (thread_db_free): Add `detaching' parameter. Only
8376 call td_ta_clear_event if detaching from process.
8378 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8380 * thread-db.c (thread_db_free): Fix typo.
8382 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8385 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8387 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8389 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8390 with an i686 compiler.
8391 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8393 * configure: Rebuilt.
8395 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8399 * server.c (handle_search_memory_1): Correct read_addr initialization
8400 in loop for searching subsequent chunks.
8402 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8404 * configure.ac: New --with-libthread-db option.
8405 * thread-db.c: Allow direct dependence on libthread_db.
8406 (thread_db_free): Adjust.
8407 * config.in: Regenerate.
8408 * configure: Likewise.
8410 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8413 * thread-db.c (attach_thread): New function.
8414 (maybe_attach_thread): Return success/failure.
8415 (find_new_threads_callback): Adjust.
8416 (thread_db_find_new_threads): Loop until no new threads.
8418 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8420 * proc-service.c (ps_lgetregs): Formatting.
8422 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8424 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8425 * configure.ac: Adjust.
8426 * linux-low.h (struct process_info_private): Move members to struct
8428 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8429 * linux-low.c (linux_remove_process): Adjust.
8430 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8431 * server.c (handle_query): Move code ...
8432 (handle_monitor_command): ... here. New function.
8433 * target.h (struct target_ops): New member.
8434 * thread-db.c (struct thread_db): New.
8435 (libthread_db_search_path): New variable.
8436 (thread_db_create_event, thread_db_enable_reporting)
8437 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8438 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8439 (try_thread_db_load_1, dladdr_to_soname): New functions.
8440 (try_thread_db_load, thread_db_load_search): New functions.
8441 (thread_db_init): Search for libthread_db.
8442 (thread_db_free): New function.
8443 (thread_db_handle_monitor_command): Likewise.
8444 * config.in: Regenerate.
8445 * configure: Regenerate.
8447 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8449 * spu-low.c (spu_kill): Wait for inferior to terminate.
8450 Call clear_inferiors.
8451 (spu_detach): Call clear_inferiors.
8453 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8455 * aclocal.m4: Regenerate.
8456 * config.in: Likewise.
8457 * configure: Likewise.
8459 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8461 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8462 (parse_spufs_run): New function.
8463 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8464 (ppc_breakpoint_at): Handle SPU breakpoints.
8466 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8468 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8469 (SPUFS_MAGIC): Define.
8470 (spu_enumerate_spu_ids): New function.
8471 (linux_qxfer_spu): New function.
8472 (linux_target_ops): Install linux_qxfer_spu.
8474 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8476 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8477 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8478 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8479 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8480 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8481 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8482 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8483 (init_registers_powerpc_cell32l): Add prototype.
8484 (init_registers_powerpc_cell64l): Likewise.
8485 (ppc_arch_setup): Detect Cell/B.E. architecture.
8487 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8489 * Makefile.in (datarootdir): New variable.
8491 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8493 * linux-low.c (linux_write_memory): Update debugging output.
8494 * Makefile.in (clean): Add new descriptions.
8495 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8496 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8497 * configure.srv: Add new files for arm*-*-linux*.
8498 * linux-arm-low.c: Add new declarations.
8499 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8500 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8501 (HWCAP_VFPv3D16): New.
8502 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8503 instead of __IWMMXT__.
8504 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8505 (arm_arch_setup): New.
8506 (target_regsets): Remove #ifdef. Add VFP regset.
8507 (the_low_target): Use arm_arch_setup.
8509 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8511 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8512 the main thread again.
8514 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8516 Adding Neutrino gdbserver.
8517 * configure: Regenerated.
8518 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8519 * configure.srv (i[34567]86-*-nto*): New target.
8520 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8521 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8522 (nto_comctrl) [__QNX__]: New function.
8523 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8525 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8527 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8530 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8531 Pedro Alves <pedro@codesourcery.com>
8533 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8534 don't support CONTEXT_EXTENDED_REGISTERS.
8535 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8536 (the_low_target): Install them.
8537 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8538 failing with ERROR_PIPE_NOT_CONNECTED.
8540 2009-06-30 Doug Evans <dje@google.com>
8541 Pierre Muller <muller@ics.u-strasbg.fr>
8543 Add h/w watchpoint support to x86-linux, win32-i386.
8544 * Makefile.in (SFILES): Add i386-low.c
8545 (i386_low_h): Define.
8546 (i386-low.o): Add dependencies.
8547 (linux-x86-low.o): Add i386-low.h dependency.
8548 (win32-i386-low.o): Ditto.
8549 * i386-low.c: New file.
8550 * i386-low.h: New file.
8551 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8552 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8553 * linux-low.c (linux_add_process): Initialize arch_private.
8554 (linux_remove_process): Free arch_private.
8555 (add_lwp): Initialize arch_private.
8556 (delete_lwp): Free arch_private.
8557 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8559 * linux-low.h (process_info_private): New member arch_private.
8560 (lwp_info): New member arch_private.
8561 (linux_target_ops): New members new_process, new_thread,
8563 (ptid_of): New macro.
8564 * linux-x86-low.c: Include stddef.h, i386-low.h.
8565 (arch_process_info): New struct.
8566 (arch_lwp_info): New struct.
8567 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8568 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8569 (i386_dr_low_get_status): New function.
8570 (x86_insert_point, x86_remove_point): New functions.
8571 (x86_stopped_by_watchpoint): New function.
8572 (x86_stopped_data_address): New function.
8573 (x86_linux_new_process, x86_linux_new_thread): New functions.
8574 (x86_linux_prepare_to_resume): New function.
8575 (the_low_target): Add entries for insert_point, remove_point,
8576 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8578 * server.c (debug_hw_points): New global.
8579 (monitor_show_help): Document set debug-hw-points.
8580 (handle_query): Process "set debug-hw-points".
8581 * server.h (debug_hw_points): Declare.
8582 (paddress): Declare.
8583 * utils.c (NUMCELLS, CELLSIZE): New macros.
8584 (get_sell, xsnprintf, paddress): New functions.
8585 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8586 remove_point, stopped_by_watchpoint, stopped_data_address.
8587 * win32-i386-low.c: Include i386-low.h.
8588 (debug_reg_state): Replaces dr.
8589 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8590 (i386_dr_low_get_status): New function.
8591 (i386_insert_point, i386_remove_point): New functions.
8592 (i386_stopped_by_watchpoint): New function.
8593 (i386_stopped_data_address): New function.
8594 (i386_initial_stuff): Update.
8595 (get_thread_context,set_thread_context,i386_thread_added): Update.
8596 (the_low_target): Add entries for insert_point,
8597 remove_point, stopped_by_watchpoint, stopped_data_address.
8598 * win32-low.c (win32_insert_watchpoint): New function.
8599 (win32_remove_watchpoint): New function.
8600 (win32_stopped_by_watchpoint): New function.
8601 (win32_stopped_data_address): New function.
8602 (win32_target_ops): Add entries for insert_watchpoint,
8603 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8604 * win32-low.h (win32_target_ops): New members insert_point,
8605 remove_point, stopped_by_watchpoint, stopped_data_address.
8607 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8609 * server.c (process_serial_event): Re-return unsupported, not
8610 error, if the type isn't recognized. Re-allow supporting only
8611 insert or remove packets. Also call require_running for
8612 breakpoints. Add missing break statement to default case. Tidy.
8613 * target.h (struct target_ops): Rename insert_watchpoint to
8614 insert_point, and remove_watchpoint to remove_point.
8616 * linux-low.h (struct linux_target_ops): Likewise.
8617 * linux-low.c (linux_insert_watchpoint): Rename to ...
8618 (linux_insert_point): ... this. Adjust.
8619 (linux_remove_watchpoint): Rename to ...
8620 (linux_remove_point): ... this. Adjust.
8621 (linux_target_ops): Adjust.
8622 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8623 (cris_insert_point): ... this.
8624 (cris_remove_watchpoint): Rename to ...
8625 (cris_remove_point): ... this.
8626 (the_low_target): Adjust.
8628 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8630 * server.c (handle_v_kill): Pass signal_pid to
8631 kill_inferior if multi_process is zero.
8633 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8635 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8636 * target.h (target_ops): Comment for *_watchpoint to make it clear
8637 the functions can get types '0' and '1'.
8639 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8641 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8642 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8643 * regcache.c (get_regcache): Likewise.
8644 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8645 * win32-low.c (child_fetch_inferior_registers): Remove check for
8648 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8649 Pedro Alves <pedro@codesourcery.com>
8651 * target.h (struct target_ops) <supports_multi_process>: New
8653 (target_supports_multi_process): New.
8654 * server.c (handle_query): Even if GDB reports support, only
8655 enable multi-process if the target also supports it. Report
8656 multi-process support only if the target backend supports it.
8657 * linux-low.c (linux_supports_multi_process): New function.
8658 (linux_target_ops): Install it as target_supports_multi_process
8661 2009-05-24 Doug Evans <dje@google.com>
8663 Global renaming of find_thread_pid to find_thread_ptid.
8664 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8665 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8666 All callers updated.
8668 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8669 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8672 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8673 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8674 (linux_resume_one_lwp): Ditto.
8676 2009-05-23 Doug Evans <dje@google.com>
8678 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8679 from struct inferior_list_entry * to struct lwp_info *.
8680 All callers updated.
8682 2009-05-13 Doug Evans <dje@google.com>
8684 * linux-x86-low.c: Don't include assert.h.
8685 (x86_siginfo_fixup): Use fatal, not assert.
8686 (x86_arch_setup): Fix comment.
8688 2009-05-12 Doug Evans <dje@google.com>
8690 Biarch support for i386/amd64 gdbserver.
8691 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8692 Add linux-x86-low.c.
8693 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8694 (linux-x86-low.o): Add.
8695 * linux-x86-64-low.c: Delete.
8696 * linux-i386-low.c: Delete.
8697 * linux-x86-low.c: New file.
8698 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8700 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8702 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8703 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8704 (linux_child_pid_to_exec_file): New function.
8705 (elf_64_header_p, elf_64_file_p): New functions.
8706 (siginfo_fixup): New function.
8707 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8708 give target a chance to convert layout.
8709 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8710 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8712 2009-05-07 Doug Evans <dje@google.com>
8714 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8715 (regsets_store_inferior_registers): Ditto.
8717 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8721 * linux-low.c (must_set_ptrace_flags): Delete.
8722 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8724 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8725 `lwp->must_set_ptrace_flags' instead.
8726 (linux_wait_for_event_1): Set ptrace options here.
8727 (linux_wait_1): ... not here.
8729 2009-04-30 Doug Evans <dje@google.com>
8731 * inferiors.c (started_inferior_callback): New function.
8732 (attached_inferior_callback): New function.
8733 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8734 * server.c (print_started_pid, print_attached_pid): New functions.
8735 (detach_or_kill_for_exit): New function.
8736 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8737 * server.h (have_started_inferiors_p): Declare.
8738 (have_attached_inferiors_p): Declare.
8740 * inferiors.c (remove_process): Fix memory leak, free process.
8741 * linux-low.c (linux_remove_process): New function.
8742 (linux_kill): Call it instead of remove_process.
8743 (linux_detach, linux_wait_1): Ditto.
8745 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8747 * configure.srv: Add x86 Windows CE target.
8749 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8751 * inferiors.c (get_thread_process): Make global.
8752 * server.h (get_thread_process): Add prototype.
8753 * thread-db.c (find_one_thread): Use get_thread_process
8754 instead of current_process.
8755 (thread_db_get_tls_address): Do not crash if called when
8756 thread layer is not yet initialized.
8758 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8760 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8761 * spu-low.c (current_tid): Rename to ...
8762 (current_ptid): ... this.
8763 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8764 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8765 ptid_get_lwp (current_ptid) instead of current_tid.
8766 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8767 instead of current_tid. Use find_process_pid to verify pid
8768 argument is valid. Pass proper argument to remove_process.
8769 (spu_thread_alive): Compare current_ptid instead of current_tid.
8770 (spu_resume): Likewise.
8772 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8774 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8777 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8779 Implement the multiprocess extensions, and add linux multiprocess
8782 * server.h (ULONGEST): Declare.
8783 (struct ptid, ptid_t): New.
8784 (minus_one_ptid, null_ptid): Declare.
8785 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8786 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8787 (struct inferior_list_entry): Change `id' type from unsigned from
8789 (struct sym_cache, struct breakpoint, struct
8790 process_info_private): Forward declare.
8791 (struct process_info): Declare.
8792 (current_process): Declare.
8793 (all_processes): Declare.
8794 (initialize_inferiors): Declare.
8795 (add_thread): Adjust to use ptid_t.
8796 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8797 (add_process, remove_process, find_thread_pid): Declare.
8798 (find_inferior_id): Adjust to use ptid_t.
8799 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8800 (multi_process): Declare.
8801 (push_event): Adjust to use ptid_t.
8802 (read_ptid, write_ptid): Declare.
8803 (prepare_resume_reply): Adjust to use ptid_t.
8804 (clear_symbol_cache): Declare.
8805 * inferiors.c (all_processes): New.
8806 (null_ptid, minus_one_ptid): New.
8807 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8808 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8809 (add_thread): Change unsigned long to ptid. Remove gdb_id
8811 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8812 (gdb_id_to_thread): Rename to ...
8813 (find_thread_pid): ... this. Change unsigned long to ptid.
8814 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8815 (loaded_dll, pull_pid_from_list): Adjust.
8816 (add_process, remove_process, find_process_pid)
8817 (get_thread_process, current_process, initialize_inferiors): New.
8818 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8819 (struct target_waitstatus) <related_pid>: Ditto.
8820 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8822 (struct target_ops) <join>: Add `pid' argument.
8823 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8824 (struct target_ops) <wait>: Add `ptid' field. Change return type
8826 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8827 (mywait): Add `ptid' argument. Change return type to ptid_t.
8828 (target_pid_to_str): Declare.
8829 * target.c (set_desired_inferior): Adjust to use ptids.
8830 (mywait): Add new `ptid' argument. Adjust.
8831 (target_pid_to_str): New.
8832 * mem-break.h (free_all_breakpoints): Declare.
8833 * mem-break.c (breakpoints): Delelete.
8834 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8835 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8836 to use per-process breakpoint list.
8837 (free_all_breakpoints): New.
8838 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8839 (symbol_cache, all_symbols_looked_up): Delete.
8841 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8843 (prepare_resume_reply): Change ptid argument's type from unsigned
8844 long to ptid_t. Adjust. Implement W;process and X;process.
8845 (free_sym_cache, clear_symbol_cache): New.
8846 (look_up_one_symbol): Adjust to per-process symbol cache. *
8847 * server.c (cont_thread, general_thread, step_thread): Change type
8850 (multi_process): New.
8851 (last_ptid): Change type to ptid_t.
8852 (struct vstop_notif) <ptid>: Change type to ptid_t.
8853 (queue_stop_reply, push_event): Change `ptid' argument's type to
8855 (discard_queued_stop_replies): Add `pid' argument.
8856 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8857 changes. Don't reference the `attached' global.
8858 (attach_inferior): Adjust to mywait interface changes.
8859 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8860 features. Handle and report "multiprocess+". Handle
8862 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8864 (handle_v_kill): New.
8865 (handle_v_stopped): Adjust to use target_pid_to_str.
8866 (handle_v_requests): Allow multiple attaches and runs when
8867 multiprocess extensions are in effect. Handle "vKill".
8868 (myresume): Adjust to use ptids.
8869 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8870 (handle_status): Adjust to discard_queued_stop_replies interface
8872 (first_thread_of, kill_inferior_callback)
8873 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8874 (main): Call initialize_inferiors. Adjust to use ptids, killing
8875 and detaching from all inferiors. Handle multiprocess packet
8877 * linux-low.h: Include gdb_proc_service.h.
8878 (struct process_info_private): New.
8879 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8880 <lwpid_of>: Use ptid_get_lwp.
8881 (get_lwp_thread): Adjust.
8882 (struct lwp_info): Add `dead' member.
8883 (find_lwp_pid): Declare.
8884 * linux-low.c (thread_db_active): Delete.
8885 (new_inferior): Adjust comment.
8886 (inferior_pid): Delete.
8887 (linux_add_process): New.
8888 (handle_extended_wait): Adjust.
8889 (add_lwp): Change unsigned long to ptid.
8890 (linux_create_inferior): Add process to processes table. Adjust
8891 to use ptids. Don't set new_inferior here.
8892 (linux_attach_lwp): Rename to ...
8893 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8894 it. Adjust to use ptids.
8895 (linux_attach_lwp): New.
8896 (linux_attach): Add process to processes table. Don't set
8898 (struct counter): New.
8899 (second_thread_of_pid_p, last_thread_of_process_p): New.
8900 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8902 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8903 processes. Remove process from process table.
8904 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8905 to multiple processes.
8906 (any_thread_of): New.
8907 (linux_detach): Add `pid' argument, and handle it. Remove process
8908 from processes table.
8909 (linux_join): Add `pid' argument. Handle it.
8910 (linux_thread_alive): Change unsighed long argument to ptid_t.
8911 Consider dead lwps as not being alive.
8912 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8913 threads we're not interested in.
8914 (same_lwp, find_lwp_pid): New.
8915 (linux_wait_for_lwp): Change `pid' argument's type from int to
8917 (linux_wait_for_event): Rename to ...
8918 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8919 from int to ptid_t. Adjust.
8920 (linux_wait_for_event): New.
8921 (linux_wait_1): Add `ptid' argument. Change return type to
8922 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8923 that exit from the process table.
8924 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8926 (mark_lwp_dead): New.
8927 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8928 stopping all threads, mark its main lwp as dead.
8929 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8931 (fetch_register, usr_store_inferior_registers)
8932 (regsets_fetch_inferior_registers)
8933 (regsets_store_inferior_registers, linux_read_memory)
8934 (linux_write_memory): Inline `inferior_pid'.
8935 (linux_look_up_symbols): Adjust to use per-process
8937 (linux_request_interrupt): Adjust to use ptids.
8938 (linux_read_auxv): Inline `inferior_pid'.
8939 (initialize_low): Don't reference thread_db_active.
8940 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8941 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8942 (ps_getpid): Return the pid of the current inferior.
8943 * thread-db.c (proc_handle, thread_agent): Delete.
8944 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8946 (find_one_thread): Change argument type to ptid_t. Adjust to
8948 (maybe_attach_thread): Adjust to per-process data and ptids.
8949 (thread_db_find_new_threads): Ditto.
8950 (thread_db_init): Ditto.
8951 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8952 processes table. Adjust to use ptids.
8953 (spu_kill, spu_detach): Adjust interface. Remove process from
8955 (spu_join, spu_thread_alive): Adjust interface.
8956 (spu_wait): Adjust interface. Remove process from processes
8957 table. Adjust to use ptids.
8958 * win32-low.c (current_inferior_tid): Delete.
8959 (current_inferior_ptid): New.
8960 (debug_event_ptid): New.
8961 (thread_rec): Take a ptid. Adjust.
8962 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8963 (child_delete_thread): Ditto.
8964 (do_initial_child_stuff): Add `attached' argument. Add process to
8966 (child_fetch_inferior_registers, child_store_inferior_registers):
8968 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8969 (win32_attach): Pass 1 to do_initial_child_stuff.
8970 (win32_kill): Adjust interface. Remove process from processes
8972 (win32_detach): Ditto.
8973 (win32_join): Adjust interface.
8974 (win32_thread_alive): Take a ptid.
8975 (win32_resume): Adjust to use ptids.
8976 (get_child_debug_event): Ditto.
8977 (win32_wait): Adjust interface. Remove exiting process from
8980 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8982 Non-stop mode support.
8984 * server.h (non_stop): Declare.
8985 (gdb_client_data, handler_func): Declare.
8986 (delete_file_handler, add_file_handler, start_event_loop):
8988 (handle_serial_event, handle_target_event, push_event)
8989 (putpkt_notif): Declare.
8990 * target.h (enum resume_kind): New.
8991 (struct thread_resume): Replace `step' field by `kind' field.
8992 (TARGET_WNOHANG): Define.
8993 (struct target_ops) <wait>: Add `options' argument.
8994 <supports_non_stop, async, start_non_stop>: New fields.
8995 (target_supports_non_stop, target_async): New.
8996 (start_non_stop): Declare.
8997 (mywait): Add `options' argument.
8998 * target.c (mywait): Add `options' argument. Print child exit
9000 (start_non_stop): New.
9001 * server.c (non_stop, own_buf, mem_buf): New globals.
9002 (struct vstop_notif): New.
9003 (notif_queue): New global.
9004 (queue_stop_reply, push_event, discard_queued_stop_replies)
9005 (send_next_stop_reply): New.
9006 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9008 (attach_inferior): In non-stop mode, don't wait for the target
9010 (handle_general_set): Handle QNonStop.
9011 (handle_query): When handling qC, return the current general
9012 thread, instead of the first thread of the list.
9013 (handle_query): If the backend supports non-stop mode, include
9014 QNonStop+ in the qSupported query response.
9015 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9017 (handle_v_attach, handle_v_run): Handle non-stop mode.
9018 (handle_v_stopped): New.
9019 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9020 (myresume): Adjust to use resume_kind. Handle non-stop.
9021 (queue_stop_reply_callback): New.
9022 (handle_status): Handle non-stop mode.
9023 (main): Clear non_stop flag on reconnection. Use the event-loop.
9024 Refactor serial protocol handling from here ...
9025 (process_serial_event): ... to this new function. When GDB
9026 selects any thread, select one here. In non-stop mode, wait until
9027 GDB acks all pending events before exiting.
9028 (handle_serial_event, handle_target_event): New.
9029 * remote-utils.c (remote_open): Install remote_desc in the event
9031 (remote_close): Remove remote_desc from the event loop.
9032 (putpkt_binary): Rename to...
9033 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9034 (putpkt_binary): New as wrapper around putpkt_binary_1.
9035 (putpkt_notif): New.
9036 (prepare_resume_reply): In non-stop mode, don't change the
9038 * event-loop.c: New.
9039 * Makefile.in (OBJ): Add event-loop.o.
9040 (event-loop.o): New rule.
9042 * linux-low.h (pid_of): Moved here.
9044 (get_lwp_thread): Use lwpid_of.
9045 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9046 * linux-low.c (pid_of): Delete.
9047 (inferior_pid): Use lwpid_of.
9048 (linux_event_pipe): New.
9049 (target_is_async_p): New.
9051 (handle_extended_wait): Use lwpid_of.
9052 (add_lwp): Don't set lwpid field.
9053 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9054 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9055 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9056 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9057 first. Adjust to linux_wait_for_event interface changes. Use
9059 (linux_detach): Don't delete the main lwp here.
9060 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9061 (status_pending_p): Don't consider explicitly suspended lwps.
9062 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9063 pointer. Add OPTIONS argument. Change return type to int. Use
9064 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9065 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9066 pointer. Add status pointer argument. Return a pid instead of a
9067 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9068 changes. In non-stop mode, don't switch to a random thread.
9069 (linux_wait): Rename to...
9070 (linux_wait_1): ... this. Add target_options argument, and handle
9071 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9072 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9073 clean exit and signal exit code. Don't stop all threads in
9074 non-stop mode. In all-stop mode, only stop all threads when
9075 reporting a stop to GDB. Handle explicit thread stop requests.
9076 (async_file_flush, async_file_mark): New.
9078 (send_sigstop): Use lwpid_of.
9079 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9080 interface changes. In non-stop mode, don't switch to a random
9082 (linux_resume_one_lwp): Use lwpid_of.
9083 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9084 (linux_resume_one_thread): ... this. Handle resume_stop. In
9085 non-stop mode, don't look for pending flag in all threads.
9086 (resume_status_pending_p): Don't consider explicitly suspended
9088 (my_waitpid): Reimplement. Emulate __WALL.
9089 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9091 (sigchld_handler, linux_supports_non_stop, linux_async)
9092 (linux_start_non_stop): New.
9093 (linux_target_ops): Register linux_supports_non_stop, linux_async
9094 and linux_start_non_stop.
9095 (initialize_low): Install SIGCHLD handler.
9096 * thread-db.c (thread_db_create_event, find_one_thread)
9097 (thread_db_get_tls_address): Use lwpid_of.
9098 * win32-low.c (win32_detach): Adjust to use resume_kind.
9099 (win32_wait): Add `options' argument.
9100 * spu-low.c (spu_resume): Adjust to use resume_kind.
9101 (spu_wait): Add `options' argument.
9103 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9105 Decouple target code from remote protocol.
9107 * target.h (enum target_waitkind): New.
9108 (struct target_waitstatus): New.
9109 (struct target_ops) <wait>: Return an unsigned long. Take a
9110 target_waitstatus pointer instead of a char pointer.
9112 * target.c (mywait): Change prototype to return an unsigned long.
9113 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9114 * server.h (thread_from_wait, old_thread_from_wait): Delete
9116 (prepare_resume_reply): Change prototype to take a
9118 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9119 (last_status, last_ptid): New.
9120 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9121 pid instead of a signal.
9122 (attach_inferior): Remove "status" and "signal" parameters.
9124 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9126 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9127 (handle_v_requests, myresume): Remove "status" and "signal"
9129 (handle_status): New.
9130 (main): Delete local `status'. Adjust.
9131 * remote-utils.c: Include target.h.
9132 (prepare_resume_reply): Change prototype to take a
9133 target_waitstatus. Adjust.
9135 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9137 * spu-low.c (spu_wait): Adjust.
9138 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9140 (win32_wait): Adjust.
9142 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9144 * target.h (struct thread_resume): Delete leave_stopped member.
9145 (struct target_ops): Add a `n' argument to the `resume' callback.
9146 * server.c (start_inferior): Adjust.
9147 (handle_v_cont, myresume): Adjust.
9148 * linux-low.c (check_removed_breakpoint): Adjust to resume
9149 interface change, and to removed leave_stopped field.
9150 (resume_ptr): Delete.
9151 (struct thread_resume_array): New.
9152 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9153 resume interface change.
9154 (linux_continue_one_thread, linux_queue_one_thread)
9155 (resume_status_pending_p): Check if the resume field is NULL
9156 instead of checking the leave_stopped member.
9157 (linux_resume): Adjust to the target resume interface change.
9158 * spu-low.c (spu_resume): Adjust to the target resume interface
9160 * win32-low.c (win32_detach, win32_resume): Ditto.
9162 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9164 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9166 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9168 (linux_continue_one_thread): Only preserve the stepping flag if
9169 there's a pending breakpoint.
9171 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9173 * server.c (main): After the inferior having exited, call
9174 remote_close before exiting gdbserver.
9176 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9178 Fix size of FPSCR in Power 7 processors.
9179 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9180 (PPC_FEATURE_HAS_DFP): New #define.
9181 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9184 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9186 * server.c (handle_query) Whitespace and formatting.
9188 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9190 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9191 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9192 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9193 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9194 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9195 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9196 Makefile.in, configure.ac: Fix whitespace throughout.
9197 * configure: Regenerate.
9199 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9201 * inferiors.c (find_inferior): Make it safe for the callback
9202 function to delete the currently iterated inferior.
9204 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9206 * Makefile.in (linuw_low_h): Move higher.
9207 (thread-db.o): Depend on $(linux_low_h).
9209 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9211 Rename "process" to "lwp" throughout.
9213 * linux-low.c (all_processes): Rename to...
9214 (all_lwps): ... this.
9215 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9216 (add_process): Rename to ...
9217 (add_lwp): ... this. Adjust.
9218 (linux_create_inferior): Adjust.
9219 (linux_attach_lwp): Adjust.
9220 (linux_attach): Adjust.
9221 (linux_kill_one_process): Rename to ...
9222 (linux_kill_one_lwp): ... this. Adjust.
9223 (linux_kill): Adjust.
9224 (linux_detach_one_process): Rename to ...
9225 (linux_detach_one_lwp): ... this. Adjust.
9226 (linux_detach): Adjust.
9227 (check_removed_breakpoint): Adjust.
9228 (status_pending_p): Adjust.
9229 (linux_wait_for_process): Rename to ...
9230 (linux_wait_for_lwp): ... this. Adjust.
9231 (linux_wait_for_event): Adjust.
9232 (send_sigstop): Adjust.
9233 (wait_for_sigstop): Adjust.
9234 (stop_all_processes): Rename to ...
9235 (stop_all_lwps): ... this.
9236 (linux_resume_one_process): Rename to ...
9237 (linux_resume_one_lwp): ... this. Adjust.
9238 (linux_set_resume_request, linux_continue_one_thread)
9239 (linux_queue_one_thread, resume_status_pending_p)
9240 (usr_store_inferior_registers, regsets_store_inferior_registers)
9241 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9243 * linux-low.h (get_process): Rename to ...
9244 (get_lwp): ... this. Adjust.
9245 (get_thread_process): Rename to ...
9246 (get_thread_lwp): ... this. Adjust.
9247 (get_process_thread): Rename to ...
9248 (get_lwp_thread): ... this. Adjust.
9249 (struct process_info): Rename to ...
9250 (struct lwp_info): ... this.
9251 (all_processes): Rename to ...
9252 (all_lwps): ... this.
9253 * proc-service.c (ps_lgetregs): Adjust.
9254 * thread-db.c (thread_db_create_event, find_one_thread)
9255 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9257 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9259 * server.c (handle_query): Handle "qAttached".
9261 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9263 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9264 GPLv3, update license URL.
9266 2009-03-01 Doug Evans <dje@google.com>
9268 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9269 (server_h): Add gdb_signals.h.
9270 (signals.o): Update.
9271 * server.h (target_signal_from_host,target_signal_to_host_p)
9272 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9274 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9276 * remote-utils.c (getpkt): Also generate remote-debug
9277 information if noack_mode is set.
9279 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9281 * server.c (handle_query): Report qXfer:siginfo:read and
9282 qXfer:siginfo:write as supported and handle them.
9283 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9284 * linux-low.c (linux_xfer_siginfo): New.
9285 (linux_target_ops): Set it.
9287 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9289 * server.c (gdbserver_usage): Mention --remote-debug.
9290 (main): Accept '--remote-debug' switch.
9292 2009-01-18 Doug Evans <dje@google.com>
9294 * regcache.c (new_register_cache): No need to check result of xcalloc.
9295 * server.c (handle_search_memory): Back out calls to xmalloc,
9296 result is checked and error is returned to user upon failure.
9297 (handle_query): Ditto. Add more checks for result of malloc.
9298 (handle_v_cont): Check result of malloc, report error back to
9300 (handle_v_run): Ditto. Call freeargv.
9301 * server.h (freeargv): Declare.
9302 * utils.c (freeargv): New fn.
9304 2009-01-15 Doug Evans <dje@google.com>
9306 * gdbreplay.c (perror_with_name): Make arg const char *.
9307 * server.h (target_signal_to_name): Make return type const char *.
9308 * thread-db.c (thread_db_err_str): Make return type const char *.
9309 * utils.c (perror_with_name): Make arg const char *.
9311 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9313 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9314 when handling a EXIT_PROCESS_DEBUG_EVENT.
9316 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9318 * gdbreplay.c (gdbreplay_version): Update copyright year.
9319 * server.c (gdbserver_version): Likewise.
9321 2009-01-05 Doug Evans <dje@google.com>
9323 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9324 (handle_extended_wait): Improve comment.
9326 2008-12-13 Doug Evans <dje@google.com>
9328 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9329 * server.h (ATTR_MALLOC): New macro.
9330 (xmalloc,xcalloc,xstrdup): Declare.
9331 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9332 * inferiors.c: Ditto.
9333 * linux-low.c: Ditto.
9334 * mem-break.c: Ditto.
9335 * regcache.c: Ditto.
9336 * remote-utils.c: Ditto.
9339 * win32-low.c: Ditto.
9341 2008-12-12 Doug Evans <dje@google.com>
9343 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9344 in debugging printf.
9346 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9348 2008-12-09 Doug Evans <dje@google.com>
9350 * linux-low.h (struct process_info): Delete member tid, unused.
9351 * thread-db.c (find_one_thread): Update.
9352 (maybe_attach_thread): Update.
9354 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9356 * target.h (struct target_ops): Add qxfer_osdata member.
9357 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9359 (linux_qxfer_osdata): New functions.
9360 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9362 * server.c (handle_query): Handle "qXfer:osdata:read:".
9363 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9364 (buffer_xml_printf): New functions.
9365 * server.h (struct buffer): New.
9366 (buffer_grow_str, buffer_grow_str0): New macros.
9367 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9368 (buffer_xml_printf): Declare.
9370 2008-11-24 Doug Evans <dje@google.com>
9372 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9374 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9376 * server.c (handle_v_run): Always use the supplied argument list.
9378 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9380 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9381 (xtensa_regmap_table): Add entry for scompare1.
9383 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9385 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9386 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9387 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9388 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9389 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9390 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9391 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9392 XML target descriptions.
9393 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9394 when inferior is running on an ISA 2.05 or later processor. Add
9395 special case to return offset for full 64-bit slot of FPSCR when
9398 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9400 * Makefile.in (SFILES, clean): Added sparc64 files.
9401 (reg-sparc64.o, reg-sparc64.c): New.
9402 * configure.srv (sparc*-*-linux*): New configuration.
9403 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9404 syscall arguments for SPARC.
9405 (regsets_store_inferior_registers): Likewise.
9406 * linux-sparc-low.c: New file.
9408 2008-10-21 Doug Evans <dje@google.com>
9410 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9411 (READLINE_DIR,READLINE_DEP): Delete.
9412 (INTERNAL_CFLAGS): Update.
9413 (LINTFLAGS): Update.
9415 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9417 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9418 whole argv from the last run, not just argv[0].
9420 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9422 * regcache.c (new_register_cache): Return NULL if the register
9423 cache size isn't known yet.
9424 (free_register_cache): Avoid dereferencing a NULL regcache.
9426 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9428 * configure.srv: Merge MIPS and MIPS64.
9430 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9432 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9434 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9436 * Makefile.in: Add required vsx dependencies.
9438 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9439 Declare init_registers_powerpc_vsx32l.
9440 Declare init_registers_powerpc_vsx64l.
9441 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9442 (ppc_arch_setup): Check for VSX in hwcap.
9443 (ppc_fill_vsxregset): New function.
9444 (ppc_store_vsxregset): New function.
9445 Add new VSX entry in regset_info target_regsets.
9447 * configure.srv: Add new VSX dependencies.
9449 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9451 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9452 (remote_open): Set or clear transport_is_reliable.
9453 (putpkt_binary): Don't expect acks in noack mode.
9454 (getpkt): Don't send ack/nac in noack mode.
9455 * server.c (handle_general_set): Handle QStartNoAckMode.
9456 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9458 (main): Reset noack_mode on every connection.
9459 * server.h (noack_mode): Declare.
9461 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9463 * Makefile.in (GDBREPLAY_OBS): New variable.
9464 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9466 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9467 Daniel Jacobowitz <dan@codesourcery.com>
9469 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9470 (usr_store_inferior_registers): Likewise.
9471 (regsets_store_inferior_registers): Likewise.
9473 2008-07-31 Rolf Jansen <rj@surtec.com>
9474 Pedro Alves <pedro@codesourcery.com>
9476 * configure.ac: Check for memmem declaration.
9477 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9478 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9479 (disable_packet_qfThreadInfo): Unconditionally compile.
9480 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9481 * configure, config.in: Regenerate.
9483 2008-07-28 Doug Kwan <dougkwan@google.com>
9485 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9486 (linux_write_memory): Remove declaration of errno.
9488 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9490 * linux-low.c (handle_extended_wait): Do not use "status"
9491 variable uninitialized.
9493 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9495 * server.c (handle_v_attach): Inhibit reporting dll changes.
9497 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9499 * remote-utils.c (prepare_resume_reply): If requested, don't
9500 output "thread:TID" in the T stop reply.
9502 * server.c (disable_packet_vCont, disable_packet_Tthread)
9503 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9504 (handle_query): If requested, disable support for qC, qfThreadInfo
9506 (handle_v_requests): If requested, disable support for vCont.
9507 (gdbserver_show_disableable): New.
9508 (main): Handle --disable-packet and --disable-packet=LIST.
9510 * server.h (disable_packet_vCont, disable_packet_Tthread)
9511 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9513 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9515 * server.c (gdbserver_usage): Mention --version.
9517 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9519 * Makefile.in (gdbreplay.o): New rule.
9521 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9523 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9524 message, not gdbserver.
9526 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9527 Nathan Sidwell <nathan@codesourcery.com>
9528 Joseph Myers <joseph@codesourcery.com>
9530 * acinclude.m4: Include ../../config/acx.m4.
9531 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9532 * configure, config.in: Regenerate.
9533 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9534 * server.c (gdbserver_version): Print PKGVERSION.
9535 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9536 (main): Adjust gdbserver_usage calls.
9537 * gdbreplay.c (version, host_name): Add declarations.
9538 (gdbreplay_version, gdbreplay_usage): New.
9539 (main): Accept --version and --help options.
9541 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9543 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9544 (arm_breakpoint_at): Handle Thumb.
9545 (the_low_target): Add comment.
9547 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9549 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9551 2008-05-09 Doug Evans <dje@google.com>
9553 * server.h (decode_search_memory_packet): Declare.
9554 * remote-utils.c (decode_search_memory_packet): New fn.
9555 * server.c (handle_search_memory_1): New fn.
9556 (handle_search_memory): New fn.
9557 (handle_query): Process qSearch:memory packets.
9559 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9561 * regcache.c (registers_length): Remove.
9562 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9563 full register packet.
9564 * regcache.h (registers_length): Remove prototype.
9565 * server.h (PBUFSIZ): Define to 16384.
9567 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9569 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9570 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9571 powerpc-64l.o, and powerpc-altivec64l.o.
9572 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9573 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9574 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9575 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9576 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9579 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9580 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9581 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9582 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9583 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9584 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9585 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9586 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9587 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9588 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9591 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9592 (init_registers_powerpc_32l): ... this new prototype.
9593 (init_registers_powerpc_32): Remove, replace by ...
9594 (init_registers_powerpc_altivec32l): ... this new prototype.
9595 (init_registers_powerpc_e500): Remove, replace by ...
9596 (init_registers_powerpc_e500l): ... this new prototype.
9597 (init_registers_ppc64): Remove, replace by ...
9598 (init_registers_powerpc_64l): ... this new prototype.
9599 (init_registers_powerpc_64): Remove, replace by ...
9600 (init_registers_powerpc_altivec64l): ... this new prototype.
9601 (ppc_num_regs): Set to 73.
9602 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9603 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9604 (ppc_cannot_store_register): Handle orig_r3 and trap.
9605 (ppc_arch_setup): Update init_registers_... calls.
9606 (ppc_fill_gregset): Handle orig_r3 and trap.
9608 * inferiors.c (clear_inferiors): Reset current_inferior.
9610 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9612 * acinclude.m4: Add override.m4.
9613 * configure: Regenerate.
9615 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9617 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9618 initial call to init_register_ppc64.
9620 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9622 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9623 single powerpc*-*-linux* case.
9624 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9626 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9628 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9629 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9631 * linux-ppc-low.c: Include <elf.h>.
9632 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9633 (ppc_hwcap): New global variable.
9634 (ppc_regmap): Remove __SPE__ #ifdef sections.
9635 (ppc_regmap_e500): New global variable.
9636 (ppc_cannot_store_register): Update __SPE__ special case.
9637 (ppc_get_hwcap): New function.
9638 (ppc_arch_setup): Use it to determine whether inferior supports
9639 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9640 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9641 Do not access registers if target does not support AltiVec.
9642 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9643 Do not access registers if target does not support SPE.
9644 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9646 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9648 * linux-low.c (disabled_regsets, num_regsets): New.
9649 (use_regsets_p): Delete.
9650 (linux_wait_for_process): Clear disabled_regsets.
9651 (regsets_fetch_inferior_registers): Check and set it.
9652 (regsets_store_inferior_registers): Likewise.
9653 (linux_fetch_registers, linux_store_registers): Do not use
9655 (initialize_low): Allocate disabled_regsets.
9657 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9659 * Makefile.in (LIBOBJS): New.
9661 (memmem.o): New rule.
9662 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9663 * configure: Regenerated.
9665 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9667 * server.c (handle_query): Never return "unsupported" for
9668 qXfer:features:read queries.
9670 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9672 * server.c (get_features_xml): Fix inverted condition.
9673 (handle_query): Always support qXfer:feature:read.
9675 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9677 * server.c (wrapper_argv): New.
9678 (start_inferior): Handle wrapper_argv. If set, expect an extra
9680 (gdbserver_usage): Document --wrapper.
9681 (main): Parse --wrapper.
9683 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9685 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9686 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9687 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9688 (ppc_set_pc): Likewise.
9689 (ppc_arch_setup): New function.
9690 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9691 of collect_register.
9692 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9694 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9696 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9697 instead of linux-ppc64-low.o.
9698 * linux-ppc64-low.c: Remove file.
9699 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9700 (linux-ppc64-low.o): Remove rule.
9702 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9703 (init_registers_powerpc_64): Likewise.
9704 (ppc_regmap): Conditionally define depending on __powerpc64__.
9705 (ppc_cannot_store_register): Do not special-case "fpscr" when
9706 compiled on __powerpc64__.
9707 (ppc_collect_ptrace_register): New function.
9708 (ppc_supply_ptrace_register): New function.
9709 (ppc_breakpoint): Change type to "unsigned int".
9710 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9711 (the_low_target): Conditionally provide initializers for the
9712 arch_setup member depending on __powerpc64__. Install
9713 collect_ptrace_register and supply_ptrace_register members.
9715 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9717 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9718 * server.c (gdbserver_xmltarget): Define.
9719 (get_features_xml): Use it to replace "target.xml" and arch_string.
9721 * configure.srv: Remove srv_xmltarget. Add XML files that were
9722 mentioned there to srv_xmlfiles instead. Remove conditional tests
9723 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9724 srv_xmlfiles and srv_regobj to include all possible choices.
9725 * configure.ac (srv_xmltarget): Remove.
9726 (srv_xmlfiles): Do not add "target.xml".
9727 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9728 checks for supplementary target information.
9729 * configure: Regenerate.
9730 * Makefile.in (XML_TARGET): Remove.
9731 (target.xml): Remove rule.
9732 (clean): Do not clean up target.xml.
9733 (.PRECIOUS): Do not mention target.xml.
9735 * target.h (struct target_ops): Remove arch_string member.
9736 * linux-low.c (linux_arch_string): Remove.
9737 (linux_target_ops): Remove arch_string initializer.
9738 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9739 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9740 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9741 * spu-low.c (spu_arch_string): Remove.
9742 (spu_target_ops): Remove arch_string initializer.
9743 * win32-low.c (win32_arch_string): Remove.
9744 (win32_target_ops): Remove arch_string initializer.
9745 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9746 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9747 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9749 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9751 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9752 by collect_ptrace_register and supply_ptrace_register hooks.
9753 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9754 instead of checking for the_low_target.left_pad_xfer.
9755 (usr_store_inferior_registers): Use collect_ptrace_register callback
9756 instead of checking for the_low_target.left_pad_xfer.
9758 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9759 (s390_supply_ptrace_register): Likewise.
9760 (s390_fill_gregset): Call s390_collect_ptrace_register.
9761 (the_low_target): Update.
9763 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9764 (ppc_supply_ptrace_register): Likewise.
9765 (the_low_target): Update.
9767 * linux-i386-low.c (the_low_target): Update.
9768 * linux-x86-64-low.c (the_low_target): Update.
9770 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9772 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9773 reg-s390.o and reg-s390x.o.
9775 * linux-low.c (new_inferior): New global variable.
9776 (linux_create_inferior, linux_attach): Set it.
9777 (linux_wait_for_process): Call the_low_target.arch_setup after the
9778 target has stopped for the first time.
9779 (initialize_low): Do not call the_low_target.arch_setup.
9781 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9782 (s390_set_pc): Likewise.
9783 (s390_arch_setup): New function.
9784 (the_low_target): Use s390_arch_setup as arch_setup routine.
9786 * regcache.c (realloc_register_cache): New function.
9787 (set_register_cache): Call it for each existing regcache.
9789 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9791 * server.h (init_registers): Remove prototype.
9793 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9794 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9795 instead of init_registers ().
9796 * linux-arm-low.c (init_registers_arm): Add prototype.
9797 (init_registers_arm_with_iwmmxt): Likewise.
9798 (the_low_target): Add initializer for arch_setup field.
9799 * linux-cris-low.c (init_registers_cris): Add prototype.
9800 (the_low_target): Add initializer for arch_setup field.
9801 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9802 (the_low_target): Add initializer for arch_setup field.
9803 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9804 (the_low_target): Add initializer for arch_setup field.
9805 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9806 (the_low_target): Add initializer for arch_setup field.
9807 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9808 (the_low_target): Add initializer for arch_setup field.
9809 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9810 (the_low_target): Add initializer for arch_setup field.
9811 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9812 (init_registers_mips64_linux): Likewise.
9813 (the_low_target): Add initializer for arch_setup field.
9814 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9815 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9816 (the_low_target): Add initializer for arch_setup field.
9817 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9818 (init_registers_powerpc_64): Likewise.
9819 (the_low_target): Add initializer for arch_setup field.
9820 * linux-s390-low.c (init_registers_s390): Add prototype.
9821 (init_registers_s390x): Likewise.
9822 (the_low_target): Add initializer for arch_setup field.
9823 * linux-sh-low.c (init_registers_sh): Add prototype.
9824 (the_low_target): Add initializer for arch_setup field.
9825 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9826 (the_low_target): Add initializer for arch_setup field.
9827 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9828 (the_low_target): Add initializer for arch_setup field.
9830 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9831 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9832 instead of init_registers ().
9833 * win32-arm-low.c (init_registers_arm): Add prototype.
9834 (the_low_target): Add initializer for arch_setup field.
9835 * win32-i386-low.c (init_registers_i386): Add prototype.
9836 (the_low_target): Add initializer for arch_setup field.
9838 * spu-low.c (init_registers_spu): Add prototype.
9839 (initialize_low): Call initialie_registers_spu () instead of
9840 initialize_registers ().
9842 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9844 * server.c (handle_v_requests): When handling the vRun and vAttach
9845 packets, if already debugging a process, don't kill it. Return an
9848 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9850 * server.c (handle_query): Correct length check.
9852 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9854 * win32-low.c (do_initial_child_stuff): Add process handle
9855 parameter. Set current_process_handle and current_process_id from the
9856 parameters. Clear globals.
9857 (win32_create_inferior): Don't set current_process_handle and
9858 current_process_id here. Instead pass them on the call to
9859 do_initial_child_stuff.
9860 (win32_attach): Likewise.
9861 (win32_clear_inferiors): New.
9862 (win32_kill): Don't close the current process handle or the
9863 current thread handle here. Instead call win32_clear_inferiors.
9864 (win32_detach): Don't open a new handle to the process. Call
9865 win32_clear_inferiors.
9866 (win32_join): Don't rely on current_process_handle; open a new
9867 handle using the process id.
9868 (win32_wait): Call win32_clear_inferiors when the inferior process
9871 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9873 * server.c (monitor_show_help): Add "exit".
9875 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9877 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9878 (clean): Add reg-xtensa.c.
9879 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9880 * configure.srv (xtensa*-*-linux*) New target.
9881 * linux-xtensa-low.c: New.
9882 * xtensa-xtregs.c: New.
9884 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9886 * hostio.c: Don't include errno.h.
9887 (errno_to_fileio_errno): Move to hostio-errno.
9888 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9889 error number outputting to the target->hostio_last_error callback.
9890 (hostio_packet_error): Use FILEIO_EINVAL directly.
9891 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9892 calls to hostio_error.
9893 * hostio-errno.c: New.
9894 * server.h (hostio_last_error_from_errno): Declare.
9895 * target.h (target_ops): Add hostio_last_error member.
9896 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9897 as hostio_last_error handler.
9898 * spu-low.c (spu_target_ops): Likewise.
9899 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9900 (wince_hostio_last_error): New functions.
9901 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9902 as hostio_last_error handler.
9903 (win32_target_ops) [!_WIN32_WCE]: Register
9904 hostio_last_error_from_errno as hostio_last_error handler.
9905 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9906 (hostio-errno.o): New rule.
9907 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9908 * configure.srv (srv_hostio_err_objs): New variable. Default to
9910 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9911 * configure: Regenerate.
9913 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9915 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9916 (linux_kill, linux_detach): Clean up the process list.
9917 * remote-utils.c (remote_open): Improve port number parsing.
9918 (putpkt_binary, input_interrupt): Only send interrupts if the target
9920 * server.c (extended_protocol): Make static.
9921 (attached): Define earlier.
9922 (exit_requested, response_needed, program_argv): New variables.
9923 (target_running): New.
9924 (start_inferior): Clear attached here.
9925 (attach_inferior): Set attached here.
9926 (require_running): Define.
9927 (handle_query): Use require_running and target_running. Implement
9929 (handle_v_attach, handle_v_run): New.
9930 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9931 (gdbserver_usage): Update.
9932 (main): Redo argument parsing. Handle --debug and --multi. Handle
9933 --attach along with other options or after the port. Save
9934 program_argv. Support no initial program. Resynchronize
9935 communication with GDB after an error. Handle "monitor exit".
9936 Use require_running and target_running. Always allow the extended
9937 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9938 restart in extended mode.
9939 * README: Refer to the GDB manual. Update --attach usage.
9941 2007-12-20 Andreas Schwab <schwab@suse.de>
9943 * linux-low.c (STACK_SIZE): Define.
9944 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9945 (linux_test_for_tracefork): Likewise.
9947 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9949 * linux-low.c (linux_wait_for_event): Update messages. Do not
9950 reinsert auto-delete breakpoints.
9951 * mem-break.c (struct breakpoint): Change return type of handler to
9953 (set_breakpoint_at): Update handler type.
9954 (reinsert_breakpoint_handler): Return 1 instead of calling
9956 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9958 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9959 * mem-break.h (set_breakpoint_at): Update handler type.
9960 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9961 * win32-low.c (auto_delete_breakpoint): New.
9962 (get_child_debug_event): Use it.
9964 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9966 * configure.ac: Check for pread and pwrite.
9967 * hostio.c (handle_pread): Fall back to lseek and read.
9968 (handle_pwrite): Fall back to lseek and write.
9969 * config.in, configure: Regenerated.
9971 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9973 * server.c (myresume): Add own_buf argument.
9974 (main): Update calls.
9976 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9978 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9979 * remote-utils.c (remote_open): Do not call disable_async_io.
9980 (block_async_io): Delete.
9981 (unblock_async_io): Make static.
9982 (initialize_async_io): New.
9983 * server.c (handle_v_cont): Handle async I/O here.
9984 (myresume): Likewise. Move other common resume tasks here...
9985 (main): ... from here. Call initialize_async_io. Disable async
9986 I/O before the main loop.
9987 * server.h (initialize_async_io): Declare.
9988 (block_async_io, unblock_async_io): Delete prototypes.
9989 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9991 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9993 * remote-utils.c (readchar): Allow binary data in received messages.
9995 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9997 * win32-low.c (attaching): New global.
9998 (win32_create_inferior): Clear the `attaching' global.
9999 (win32_attach): Set the `attaching' global.
10000 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10001 attaching. Only set a breakpoint at the entry point if not
10004 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10006 * server.c (main): Don't report dll events on the initial
10007 connection on attaches.
10009 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10011 * server.c (main): Relax numerical bases supported for the pid of
10012 the --attach command line argument.
10014 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10016 * win32-low.c (win32_attach): Call OpenProcess before
10017 DebugActiveProcess, not after. Add last error output to error
10020 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10022 * win32-low.c (win32_get_thread_context)
10023 (win32_set_thread_context): New functions.
10024 (thread_rec): Use win32_get_thread_context.
10025 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10026 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10029 2007-12-03 Leo Zayas
10030 Pedro Alves <pedro_alves@portugalmail.pt>
10032 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10034 (child_add_thread): Minor cleanup.
10035 (child_continue): Resume artificially suspended threads before
10036 calling ContinueDebugEvent.
10037 (suspend_one_thread): New.
10038 (fake_breakpoint_event): New.
10039 (get_child_debug_event): Change return type to int. Check here if
10040 gdb sent an interrupt request. If a soft interrupt was requested,
10041 fake a breakpoint event. Return 0 if there is no event to handle,
10043 (win32_wait): Don't check here if gdb sent an interrupt request.
10044 Ensure there is a valid event to handle.
10045 (win32_request_interrupt): Add soft interruption method as last
10048 2007-12-03 Leo Zayas
10049 Pedro Alves <pedro_alves@portugalmail.pt>
10051 * win32-low.h (win32_thread_info): Add descriptions to the
10052 structure members. Replace `suspend_count' counter by a
10054 * win32-low.c (thread_rec): Update condition of when to get the
10055 context from the inferior. Rely on ContextFlags being set if it
10056 has already been retrieved. Only suspend the inferior thread if
10057 we haven't already. Warn if that fails.
10058 (continue_one_thread): s/suspend_count/suspended/. Only call
10059 ResumeThread once. Warn if that fails.
10061 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10063 * win32-low.c (win32_wait): Don't read from the inferior when it
10064 has already exited.
10066 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10068 * Makefile.in (win32_low_h): New variable.
10069 (win32-low.o): Add dependency on $(win32_low_h).
10070 (win32-arm-low.o, win32-i386-low.o): New rules.
10072 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10074 * hostio.c: Correct copyright year.
10076 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10078 * Makefile.in (OBS): Add hostio.o.
10079 (hostio.o): New rule.
10080 * server.h (handle_vFile): Declare.
10081 * hostio.c: New file.
10082 * server.c (handle_v_requests): Take packet_len and new_packet_len
10083 for binary packets. Call handle_vFile.
10084 (main): Update call to handle_v_requests.
10086 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10088 * linux-low.c: Include <sched.h>.
10090 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10092 * linux-low.c (linux_tracefork_grandchild): New.
10093 (linux_tracefork_child): Use clone.
10094 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10096 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10098 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10100 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10102 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10104 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10106 * inferiors.c (change_inferior_id): Delete.
10107 (add_pid_to_list, pull_pid_from_list): New.
10108 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10109 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10110 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10111 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10112 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10113 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10114 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10115 (using_threads): Always set to 1.
10116 (handle_extended_wait): New.
10117 (add_process): Do not set TID.
10118 (linux_create_inferior): Set must_set_ptrace_flags.
10119 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10120 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10121 (linux_thread_alive): Rename TID argument to LWPID.
10122 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10123 (linux_wait_for_event): Do not use TID or check using_threads. Update
10124 call to dead_thread_notify. Call handle_extended_wait.
10125 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10126 (send_sigstop): Delete sigstop_sent.
10127 (wait_for_sigstop): Avoid TID.
10128 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10129 (linux_test_for_tracefork): New.
10130 (linux_lookup_signals): Use thread_db_active and
10131 linux_supports_tracefork_flag.
10132 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10133 * linux-low.h (get_process_thread): Avoid TID.
10134 (struct process_ifo): Move thread_known and tid to the end. Remove
10136 (linux_attach_lwp, thread_db_init): Update prototypes.
10137 * server.h (change_inferior_id): Delete prototype.
10138 (add_pid_to_list, pull_pid_from_list): New prototypes.
10139 * thread-db.c (thread_db_use_events): New.
10140 (find_first_thread): Rename to...
10141 (find_one_thread): ...this. Update callers and messages. Do not
10142 call fatal. Check thread_db_use_events. Do not call
10143 change_inferior_id or new_thread_notify.
10144 (maybe_attach_thread): Update. Do not call new_thread_notify.
10145 (thread_db_init): Set thread_db_use_events. Check use_events.
10146 * utils.c (fatal, warning): Correct message prefix.
10148 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10150 * Makefile.in (clean): Remove new files.
10151 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10152 (powerpc-64.o, powerpc-64.c): New rules.
10153 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10154 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10156 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10158 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10159 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10160 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10161 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10162 (target_regsets): Add AltiVec and SPE register sets.
10163 * configure.ac: Check for AltiVec and SPE.
10164 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10165 (ppc_fill_vrregset, ppc_store_vrregset): New.
10166 (target_regsets): Add AltiVec register set.
10167 * configure: Regenerated.
10169 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10171 * linux-low.c (O_LARGEFILE): Define.
10172 (linux_read_memory): Use /proc/PID/mem.
10173 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10174 * configure, config.in: Regenerated.
10176 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10178 * linux-low.c (linux_wait_for_event): Do not pass signals while
10181 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10183 * win32-low.c (create_process): New.
10184 (win32_create_inferior): Use create_process instead of
10185 CreateProcess. If create_process failed retry appending an ".exe"
10186 suffix. Store the GetLastError result immediatelly after
10187 create_process calls and use it on the call to error.
10189 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10191 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10193 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10195 * configure.ac: Switch license to GPLv3.
10197 2007-08-01 Michael Snyder <msnyder@access-company.com>
10199 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10201 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10203 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10205 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10206 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10207 CloseToolhelp32Snapshot.
10208 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10209 CloseToolhelp32Snapshot.
10211 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10213 * server.c (main): Check for inferior exit before main loop.
10215 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10217 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10218 instead of on tmp_desc.
10220 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10221 Daniel Jacobowitz <dan@codesourcery.com>
10223 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10224 (add_thread): Minor cleanups.
10225 (clear_inferiors): Move lower in the file. Clear the DLL
10227 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10228 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10229 (xml_escape_text): New.
10230 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10232 (handle_v_cont): Report errors.
10233 (gdbserver_version): Update.
10234 (main): Correct size of own_buf. Do not report initial DLL events.
10235 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10236 (unloaded_dll, xml_escape_text): New.
10237 * win32-low.c (enum target_waitkind): Update comments.
10238 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10239 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10240 (win32_EnumProcessModules, win32_GetModuleInformation)
10241 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10242 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10243 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10244 (win32_Module32First, win32_Module32Next, load_toolhelp)
10245 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10246 (get_child_debug_event): Handle DLL events.
10247 (win32_wait): Likewise.
10249 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10251 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10252 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10254 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10256 * win32-low.c (handle_output_debug_string): Ignore event if not
10259 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10261 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10263 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10265 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10267 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10269 * inferiors.c (change_inferior_id): Add comment.
10270 * linux-low.c (check_removed_breakpoint): Add an early
10271 prototype. Improve debug output.
10272 (linux_attach): Doc update.
10273 (linux_detach_one_process, linux_detach): Clean up before releasing
10275 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10276 * linux-low.h (struct process_info): Doc improvement.
10277 * mem-break.c (delete_all_breakpoints): New.
10278 * mem-break.h (delete_all_breakpoints): New prototype.
10279 * thread-db.c (find_first_thread): New.
10280 (thread_db_create_event): Call it instead of
10281 thread_db_find_new_threads. Clean up unused variables.
10282 (maybe_attach_thread): Remove first thread handling.
10283 (thread_db_find_new_threads): Use find_first_thread.
10284 (thread_db_get_tls_address): Likewise.
10286 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10288 * thread-db.c (thread_db_find_new_threads): Add prototype.
10289 (thread_db_create_event): Check for the main thread before adding
10291 (maybe_attach_thread): Only enable event reporting if TID == 0.
10292 (thread_db_get_tls_address): Check for new threads.
10294 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10296 * linux-low.c (linux_create_inferior): Try execv before execvp.
10297 * spu-low.c (spu_create_inferior): Likewise.
10299 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10301 * linux-low.c (linux_create_inferior): Change execv to execvp.
10302 * spu-low.c (spu_create_inferior): Likewies.
10304 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10306 * Makefile.in (clean): Clean new files instead of deleted ones.
10307 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10308 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10310 * configure.srv: Specify XML files and new regformats for MIPS and
10312 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10313 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10314 an entry for the restart register.
10315 (mips_cannot_fetch_register, mips_cannot_store_register)
10316 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10317 register names to match the XML descriptions.
10318 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10319 restart register instead of $0.
10321 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10322 Markus Deuling <deuling@de.ibm.com>
10324 * remote-utils.c (decode_xfer_write): New function.
10325 * server.h (decode_xfer_write): Add prototype.
10326 * server.c (handle_query): Add PACKET_LEN argument. Support
10327 qXfer:spu:read and qXfer:spu:write packets.
10328 (main): Pass packet_len to handle_query.
10329 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10330 * target.h (target_ops): Add qxfer_spu.
10332 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10334 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10335 accessing non-seekable spufs files.
10337 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10339 * server.c (handle_query): Add reply for qC packet.
10341 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10342 Leo Zayas <lerele@champenstudios@com>
10344 * server.h (check_remote_input_interrupt_request): New function.
10345 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10346 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10347 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10348 (check_remote_input_interrupt_request): New function.
10349 * server.h (check_remote_input_interrupt_request): Declare.
10350 * win32-low.c (winapi_DebugBreakProcess,
10351 winapi_GenerateConsoleCtrlEvent): New typedefs.
10352 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10354 (win32_wait): Check for remote interrupt request
10355 with check_remote_input_interrupt_request.
10356 (win32_request_interrupt): New function.
10357 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10359 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10361 * win32-low.c (debug_registers_changed,
10362 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10363 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10364 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10365 (thread_rec): Get context using the low target.
10366 (child_add_thread): Call thread_added on the low target,
10367 which does the same thing.
10369 (do_initial_child_stuff): Remove debug registers references.
10370 Set context using the low target. Resume threads after
10371 setting the contexts.
10372 (child_continue): Remove dead variable. Remove debug
10373 registers references.
10374 (child_fetch_inferior_registers): Go through the low target.
10375 (do_child_store_inferior_registers): Remove.
10376 (child_store_inferior_registers): Go through the low target.
10377 (win32_resume): Remove debug registers references.
10378 Set context using the low target.
10379 (handle_exception): Change return type to void. Don't record
10380 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10381 first chance exception.
10382 (get_child_debug_event): Change return type to void. Remove
10383 goto loop. Always return after waiting for debug event.
10384 (win32_wait): Convert to switch statement. Handle spurious
10387 * win32-i386-low.c (debug_registers_changed,
10388 debug_registers_used): New.
10389 (initial_stuff): Rename to ...
10390 (i386_initial_stuff): ... this. Clear debug registers
10392 (store_debug_registers): Delete.
10393 (i386_get_thread_context): New.
10394 (load_debug_registers): Delete.
10395 (i386_set_thread_context): New.
10396 (i386_thread_added): New.
10397 (single_step): Rename to ...
10398 (i386_single_step): ... this.
10399 (do_fetch_inferior_registers): Rename to ...
10400 (i386_fetch_inferior_register): ... this.
10401 (i386_store_inferior_register): New.
10402 (the_low_target): Adapt to new interface.
10404 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10405 (arm_get_thread_context): New.
10406 (arm_set_thread_context): New.
10408 (do_fetch_inferior_registers): Rename to ...
10409 (arm_fetch_inferior_register): ... this.
10410 (arm_store_inferior_register): New.
10411 (arm_wince_breakpoint): Reimplement as unsigned long.
10412 (arm_wince_breakpoint_len): Define.
10413 (the_low_target): Adapt to new interface.
10415 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10416 load_debug_registers. Add get_thread_context, set_thread_context,
10417 thread_added and store_inferior_register. Rename
10418 fetch_inferior_registers to fetch_inferior_register.
10419 (regptr): Remove declaration.
10421 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10423 * linux-low.c (linux_detach): Change return type to int. Return 0.
10424 * spu-low.c (spu_detach): Likewise.
10426 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10428 * target.h (target_ops): Change return type of detach to int.
10430 (join_inferior): New.
10431 * server.c (main): Don't skip detach support on mingw32.
10432 If the inferior doesn't support detaching return error.
10433 Call join_inferior instead of using waitpid.
10434 * linux-low.c (linux_join): New.
10435 (linux_target_op): Add linux_join.
10436 * spu-low.c (spu_join): New.
10437 (spu_target_ops): Add spu_join.
10438 * win32-low.c (win32_detach): Adapt to new interface.
10439 Reopen current_process_handle before detaching. Issue a child
10440 resume before detaching.
10442 (win32_target_op): Add win32_join.
10444 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10446 * win32-low.c (win32-attach): Fix return value.
10447 * target.h (target_ops): Describe ATTACH return values.
10449 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10451 * win32-low.c (GETPROCADDRESS): Define.
10452 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10453 (winapi_DebugSetProcessKillOnExit): Likewise.
10454 (win32_create_inferior): Force usage of ansi CreateProcessA.
10455 (win32_attach): Use GETPROCADDRESS.
10456 (win32_detach): Likewise.
10458 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10460 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10462 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10464 * win32-low.c: Commit leftover changes from 2007-03-29.
10466 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10468 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10469 fields short instead of int. Add explicit padding.
10470 (i387_cache_to_fsave): Remove unnecessary casts.
10471 (i387_fsave_to_cache): Doc fix.
10472 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10474 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10476 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10477 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10479 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10481 * configure.srv (arm*-*-mingw32ce*): Move near the other
10484 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10486 * configure.ac: Add errno checking.
10487 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10488 sys/file.h and malloc.h.
10489 (AC_CHECK_DECLS): Add perror.
10490 (srv_mingwce): Handle.
10491 * configure.srv (i[34567]86-*-cygwin*): Add
10492 win32-i386-low.o to srv_tgtobj.
10493 (i[34567]86-*-mingw*): Likewise.
10494 (arm*-*-mingw32ce*): Add case.
10495 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10496 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10497 [__MINGW32CE__] (strerror): New function.
10498 [__MINGW32CE__] (errno): Define to GetLastError.
10499 [__MINGW32CE__] (COUNTOF): New macro.
10500 (remote_open): Remove extra close call.
10501 * mem-break.c (delete_breakpoint_at): New function.
10502 * mem-break.h (delete_breakpoint_at): Declare.
10503 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10504 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10505 [USE_WIN32API] (read, write): Add char* casts.
10506 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10507 * server.h: Include wincecompat.h on Windows CE.
10508 [HAVE_ERRNO_H]: Check.
10509 (perror): Declare if not declared.
10510 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10511 (perror_with_name): Remove errno declaration.
10512 * wincecompat.h: New.
10513 * wincecompat.c: New.
10514 * win32-low.h: New.
10515 * win32-arm-low.c: New.
10516 * win32-i386-low.c: New.
10517 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10518 (OUTMSG2): Make it safe.
10520 (COUNTOF): New macro.
10521 (NUM_REGS): Get it from the low target.
10522 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10523 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10524 (thread_rec): Let low target handle debug registers.
10525 (child_add_thread): Likewise.
10526 (child_init_thread_list): Likewise.
10527 (continue_one_thread): Likewise.
10529 (do_child_fetch_inferior_registers): Move to ...
10530 * win32-i386-low.c: ... here, and rename to ...
10531 (do_fetch_inferior_registers): ... this.
10532 * win32-low.c (child_fetch_inferior_registers):
10533 Go through the low target.
10534 (do_child_store_inferior_registers): Use regptr.
10535 (strwinerror): New function.
10536 (win32_create_inferior): Handle Windows CE.
10537 Use strwinerror instead of strerror on Windows error
10538 codes. Add program to the error output.
10539 Don't close the main thread handle on Windows CE.
10540 (win32_attach): Use coredll.dll on Windows CE.
10541 (win32_kill): Close current process and current
10543 (win32_detach): Use coredll.dll on Windows CE.
10544 (win32_resume): Let low target handle debug registers, and
10546 (handle_exception): Add/Remove initial breakpoint. Avoid
10547 non-existant WSTOPSIG on Windows CE.
10548 (win32_read_inferior_memory): Cast to remove warning.
10549 (win32_arch_string): Go through the low target.
10550 (initialize_low): Call set_breakpoint_data with the low
10551 target's breakpoint.
10552 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10553 FOP_REGNUM, mappings): Move to ...
10554 * win32-i386-low.c: ... here.
10555 * win32-low.c (win32_thread_info): Move to ...
10556 * win32-low.h: ... here.
10557 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10558 win32-arm-low.c and wincecompat.c.
10559 (all:): Add $EXEEXT.
10560 (install-only:): Likewise.
10561 (gdbserver:): Likewise.
10562 (gdbreplay:): Likewise.
10563 * config.in: Regenerate.
10564 * configure: Regenerate.
10566 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10568 * win32-low.c: Rename typedef thread_info to
10569 win32_thread_info throughout.
10571 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10573 * win32-i386-low.c: Rename to ...
10574 * win32-low.c: ... this.
10575 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10576 * Makefile.in: Likewise.
10578 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10580 * remote-utils.c (monitor_output): Constify msg parameter.
10581 * server.h (monitor_output): Likewise.
10582 * win32-i386-low.c (handle_output_debug_string): New.
10583 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10584 handle_output_debug_string.
10585 (get_child_debug_event): Likewise.
10587 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10589 * server.c (main): Correct strtoul check.
10591 2007-03-27 Jon Ringle <jon@ringle.org>
10593 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10595 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10597 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10599 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10601 * terminal.h: Check HAVE_SGTTY_H.
10603 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10605 * remote-utils.c (remote_open): Print out the assigned port number.
10607 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10609 * remote-utils.c (monitor_output): New function.
10610 * server.c (debug_threads): Define here.
10611 (monitor_show_help): New function.
10612 (handle_query): Handle qRcmd.
10613 (main): Do not handle 'd' packet.
10614 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10615 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10618 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10620 * Makefile.in (EXEEXT): New.
10621 (clean): Use $(EXEEXT).
10623 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10625 * target.h (target_ops): Rename send_signal to request_interrupt,
10626 and remove enum target_signal parameter.
10627 * linux-low.c (linux_request_interrupt): Rename from
10628 linux_send_signal, and always send SIGINT.
10629 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10630 and always send SIGINT.
10631 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10633 (input_interrupt): Likewise.
10635 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10637 * server.c (get_features_xml): Check if target implemented
10639 * win32-i386-low.c (win32_arch_string): New.
10640 (win32_target_ops): Add win32_arch_string as arch_string member.
10642 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10644 * spu-low.c (spu_arch_string): New.
10645 (spu_target_ops): Add spu_arch_string.
10647 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10649 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10650 * configure.ac: Do not check for terminal.h.
10651 * configure, config.in: Regenerated.
10653 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10655 * Makefile.in (OBS): Add $(XML_BUILTIN).
10656 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10658 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10659 (arm-with-iwmmxt.c): New.
10660 * config.in, configure: Regenerate.
10661 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10662 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10663 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10664 (arm*-*-linux*): Add iWMMXt and regset support.
10665 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10666 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10667 (arm_store_wmmxregset, target_regsets): New.
10668 * server.c (get_features_xml): Take annex argument. Check builtin
10670 (handle_query): Handle multiple annexes.
10672 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10674 * remote-utils.c [USE_WIN32API] (read, write): Define.
10675 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10678 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10680 * linux-i386-low.c (the_low_target): Set arch_string.
10681 * linux-x86-64-low.c (the_low_target): Likewise.
10682 * linux-low.c (linux_arch_string): New.
10683 (linux_target_ops): Add it.
10684 * linux-low.h (struct linux_target_ops): Add arch_string.
10685 * server.c (write_qxfer_response): Use const void * for DATA.
10686 (get_features_xml): New.
10687 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10688 * target.h (struct target_ops): Add arch_string method.
10690 2007-01-03 Denis Pilat <denis.pilat@st.com>
10691 Daniel Jacobowitz <dan@codesourcery.com>
10693 * linux-low.c (linux_kill): Handle being called with no threads.
10694 * win32-i386-low.c (win32_kill): Likewise.
10695 (get_child_debug_event): Clear current_process_handle.
10697 2006-12-30 Denis PILAT <denis.pilat@st.com>
10698 Daniel Jacobowitz <dan@codesourcery.com>
10700 * remote-utils.c (remote_open): Check the type of specified
10701 serial port devices before opening them.
10702 * server.c (main): Kill the inferior if an error occurs during
10703 the first remote_open.
10705 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10707 * README: Update supported targets.
10709 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10711 * Makefile.in (clean): Remove reg-mips64.c.
10712 (reg-mips64.c, reg-mips64.o): New rules.
10713 * configure.srv: Handle mips64. Include regset support for mips.
10714 * linux-mips-low.c (union mips_register): New.
10715 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10716 (mips_breakpoint, mips_breakpoint_at): Use int.
10717 (mips_collect_register, mips_supply_register)
10718 (mips_collect_register_32bit, mips_supply_register_32bit)
10719 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10720 (mips_store_fpregset, target_regsets): New.
10721 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10723 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10725 * configure.srv: Add target "spu*-*-*".
10726 * Makefile.in (clean): Remove reg-spu.c.
10727 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10728 * spu-low.c: New file.
10730 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10732 * configure.ac: Correct td_thr_tls_get_addr test.
10733 * configure: Regenerated.
10735 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10737 * linux-low.c (linux_wait_for_event): Reformat. Use the
10738 pass_signals array.
10739 * remote-utils.c (decode_address_to_semicolon): New.
10740 * server.c (pass_signals, handle_general_set): New.
10741 (handle_query): Mention QPassSignals for qSupported.
10742 (main): Call handle_general_set.
10743 * server.h (pass_signals, decode_address_to_semicolon): New.
10745 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10747 * server.c (handle_query): Correct error handling for read_auxv.
10749 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10751 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10752 and srv_linux_thread_db to yes.
10753 * linux-s390-low.c (s390_fill_gregset): New function.
10754 (target_regsets): Define data structure.
10756 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10758 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10759 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10760 * config.in, configure: Regenerated.
10761 * inferiors.c (gdb_id_to_thread): New function.
10762 (gdb_id_to_thread_id): Use it.
10763 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10764 * linux-low.h (struct process_info): Add th member.
10765 (thread_db_get_tls_address): New prototype.
10766 * remote-utils.c (decode_address): Make non-static.
10767 * server.c (handle_query): Handle qGetTLSAddr.
10768 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10769 * target.h (struct target_ops): Add get_tls_address.
10770 * thread-db.c (maybe_attach_thread): Save the thread handle.
10771 (thread_db_get_tls_address): New.
10773 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10775 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10776 (linux_resume_one_process): Take a siginfo_t *. Update all
10777 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10778 (struct pending_signals): Add a siginfo_t.
10779 (linux_wait_for_process): Always set last_status.
10780 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10781 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10782 * linux-low.h (struct process_info): Add last_status.
10784 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10786 * remote-utils.c (try_rle): New function.
10787 (putpkt_binary): Use it.
10789 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10791 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10792 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10793 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10794 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10795 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10798 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10800 * server.c (terminal_fd): New variable.
10801 (old_foreground_pgrp): Likewise.
10802 (restore_old_foreground_pgrp): New function.
10803 (start_inferior): Record the terminal file descriptor in terminal_fd
10804 and its original foreground group in old_foreground_pgrp. Register
10805 restore_old_foreground_pgrp with atexit().
10807 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10809 * server.c (handle_query): Correct qPart to qXfer.
10811 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10813 * configure.ac: Check for more headers which are missing on
10814 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10815 * configure.srv: Add Cygwin and mingw32.
10816 * remote-utils.c: Don't include headers unconditionally which
10817 are missing on mingw32. Include <winsock.h> for mingw32.
10818 (remote_open): Adjust for mingw32 support. Flush
10819 standard error after writing to it.
10820 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10821 (unblock_async_io, enable_async_io, disable_async_io)
10822 (readchar, getpkt): Update for Winsock support.
10823 (prepare_resume_reply): Expect a protocol signal number.
10824 * server.c: Disable <sys/wait.h> on mingw32.
10825 (start_inferior): Adjust for mingw32 support. Flush
10826 standard error after writing to it.
10827 (attach_inferior): Likewise. Use protocol signal
10829 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10831 * win32-i386-low.c: New file.
10832 * Makefile.in (XM_CLIBS): Set.
10833 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10834 (win32-i386-low.o): New dependency rule.
10835 * linux-low.c (linux_wait): Use target signal numbers.
10836 * target.h (struct target_ops): Doc fix.
10837 * server.h (target_signal_to_name): New prototype.
10838 * gdbreplay.c: Don't include headers unconditionally which
10839 are missing on mingw32. Include <winsock.h> for mingw32.
10840 (remote_close, remote_open): Adjust for Winsock support.
10841 * configure, config.in: Regenerated.
10843 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10845 * server.c (decode_xfer_read, write_qxfer_response): New.
10846 (handle_query): Take a packet length argument. Handle
10847 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10848 the qSupported response.
10849 (main): Update call to handle_query.
10851 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10853 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10854 (putpkt_binary): Renamed from putpkt and adjusted for binary
10856 (putpkt): New wrapper for putpkt_binary.
10857 (readchar): Don't mask off the high bit.
10858 (decode_X_packet): New function.
10859 * server.c (main): Call putpkt_binary if a handler sets the packet
10860 length. Save the length of the incoming packet. Handle 'X'.
10861 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10863 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10865 * server.c (handle_query): Handle qSupported.
10867 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10869 * remote-utils.c (all_symbols_looked_up): New variable.
10870 (look_up_one_symbol): Check it.
10871 * server.h (look_up_one_symbol): New declaration.
10872 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10874 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10876 * Makefile.in (linux-arm-low.o): Update dependencies.
10877 * linux-arm-low.c: Include "gdb_proc_service.h".
10878 (PTRACE_GET_THREAD_AREA): Define.
10879 (ps_get_thread_area): New function.
10881 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10883 * configure.srv (m68k*-*-uclinux*): New target.
10884 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10885 (linux_resume_one_process): Remove extraneous cast.
10886 (linux_read_offsets): New.
10887 (linux_target_op): Add linux_read_offsets on mmuless systems.
10888 * server.c (handle_query): Add qOffsets logic.
10889 * target.h (struct target_ops): Add read_offsets.
10891 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10893 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10894 (PTRACE_GET_THREAD_AREA): Define.
10895 (ps_get_thread_area): New function.
10896 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10897 (linux-x86-64-low.o): Update.
10899 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10901 * configure.ac: Remove checks for prfpregset_t.
10902 * gdb_proc_service.h: New file.
10903 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10904 new "gdb_proc_service.h".
10905 * proc-service.c: Likewise.
10906 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10907 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10908 * Makefile.in (gdb_proc_service_h): Updated.
10909 * configure, config.in: Regenerated.
10911 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10913 * remote-utils.c (prepare_resume_reply): Move declaration
10914 of gdb_id_from_wait to the top of the block.
10916 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10918 * linux-low.c (regsets_store_inferior_registers): Read the regset
10919 from the target before filling it.
10921 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10923 * server.c (attach_inferior): Return SIGTRAP for a successful
10926 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10928 * Makefile.in (OBS): Add version.o.
10929 (STAGESTUFF): Delete.
10930 (version.o): Add dependencies.
10931 (version.c): Replace rule.
10932 (clean): Remove version.c.
10933 * server.c (gdbserver_version): New.
10934 (gdbserver_usage): Use printf.
10935 (main): Handle --version and --help.
10936 * server.h (version, host_name): Add declarations.
10938 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10950 * linux-x86-64-low.c:
10952 * linux-s390-low.c:
10953 * linux-ppc64-low.c:
10955 * linux-mips-low.c:
10956 * linux-m68k-low.c:
10957 * linux-m32r-low.c:
10960 * linux-ia64-low.c:
10961 * linux-i386-low.c:
10962 * linux-crisv32-low.c:
10974 * gdbserver.1: Add (C) after Copyright. Update the FSF
10977 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10979 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10980 (arm_breakpoint_at): Recognize both breakpoints.
10981 (the_low_target): Use the correct breakpoint instruction.
10983 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10985 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10986 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10987 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10988 (the_low_target): Update.
10990 2005-10-25 Andreas Schwab <schwab@suse.de>
10992 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10994 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10995 (ia64_num_regs): Reduce to 462.
10997 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10999 * acinclude.m4: Correct quoting.
11000 * aclocal.m4: Regenerated.
11002 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11003 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11004 (thread_db_init): Call thread_db_err_str.
11005 * configure.ac: Check for TD_VERSION.
11006 * config.in, configure: Regenerated.
11008 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11010 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11012 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11014 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11015 is not available. Define HAVE_PTRACE_GETREGS if it is.
11016 * config.in, configure: Regenerated.
11017 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11018 * linux-i386-low.c, linux-m68k-low.c: Update to use
11019 HAVE_PTRACE_GETREGS.
11020 * linux-low.c (regsets_fetch_inferior_registers)
11021 (regsets_store_inferior_registers): Only return 0 if we processed
11023 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11024 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11026 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11028 * inferiors.c (struct thread_info): Add gdb_id.
11029 (add_thread): Add gdb_id argument.
11030 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11031 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11032 calls to add_thread.
11033 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11034 * server.c (handle_query): Use thread_to_gdb_id.
11035 (handle_v_cont, main): Use gdb_id_to_thread_id.
11036 * server.h (add_thread): Update prototype.
11037 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11040 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11042 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11043 left-padded registers.
11044 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11045 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11047 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11049 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11050 * configure: Regenerate.
11051 * config.in: Regenerate.
11052 * server.h (NEED_DECLARATION_STRERROR):
11053 Replace with !HAVE_DECL_STRERROR.
11055 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11057 * linux-low.c (linux_wait, linux_send_signal): Don't test
11058 an unsigned long variable for > 0 if it could be MAX_ULONG.
11059 * server.c (myresume): Likewise.
11060 * target.c (set_desired_inferior): Likewise.
11062 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11064 * configure.ac: Simplify and improve check for socklen_t.
11065 * configure, config.in: Regenerate.
11067 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11069 * acconfig.h: Remove.
11070 * configure.ac: Add a test for socklen_t. Use three-argument
11071 AC_DEFINE throughout.
11072 * config.in: Regenerated using autoheader 2.59.
11073 * configure: Regenerated.
11075 * gdbreplay.c (socklen_t): Provide a default.
11076 (remote_open): Use socklen_t.
11077 * remote-utils.c (socklen_t): Provide a default.
11078 (remote_open): Use socklen_t.
11079 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11082 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11084 * linux-low.c (linux_read_memory, linux_write_memory)
11085 (linux_read_auxv): Likewise.
11086 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11087 (check_mem_write): Likewise.
11088 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11090 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11091 (registers_from_string, register_data): Likewise.
11092 * server.c (handle_query, main): Likewise.
11093 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11094 (decode_M_packet): Likewise.
11095 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11096 * target.h (struct target_ops): Update read_memory, write_memory,
11098 (read_inferior_memory, write_inferior_memory): Update.
11099 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11100 to unsigned char *.
11101 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11102 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11103 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11104 linux-s390-low.c, linux-sh-low.c: Update for changes in
11105 read_inferior_memory and the_low_target->breakpoint.
11107 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11109 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11110 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11111 * configure.srv: Add powerpc64-*-linux*.
11112 * linux-ppc64-low.c: New file.
11114 2005-05-23 Orjan Friberg <orjanf@axis.com>
11116 * linux-cris-low.c: New file with support for CRIS.
11117 * linux-crisv32-low.c: Ditto for CRISv32.
11118 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11119 (clean): Add reg-cris.c and reg-crisv32.c.
11120 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11121 reg-crisv32.o, and reg-crisv32.c to make rules.
11122 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11123 recognized targets.
11125 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11127 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11128 of sizeof (PTRACE_XFER_TYPE).
11129 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11131 2005-05-12 Orjan Friberg <orjanf@axis.com>
11133 * target.h (struct target_ops): Add insert_watchpoint,
11134 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11135 pointers for hardware watchpoint support.
11136 * linux-low.h (struct linux_target_ops): Ditto.
11137 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11138 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11139 to linux_target_ops.
11140 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11142 * server.c (main): Recognize 'Z' and 'z' packets.
11144 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11146 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11147 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11148 (the_low_target): Add new members.
11150 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11152 * proc-service.c (ps_lgetregs): Search all_processes instead of
11155 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11157 * server.c (start_inferior): Change return type to int.
11158 (attach_inferior): Change sigptr to int *.
11159 (handle_v_cont, handle_v_requests): Change signal to int *.
11160 (main): Change signal to int.
11162 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11164 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11165 * configure.srv: Add m32r*-*-linux*.
11166 * linux-m32r-low.c: New file.
11168 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11170 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11172 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11174 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11175 Take unsigned long arguments for PIDs.
11176 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11177 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11178 (wait_for_sigstop, linux_resume_one_process)
11179 (regsets_fetch_inferior_registers, linux_send_signal)
11180 (linux_read_auxv): Likewise. Update the types of variables holding
11181 PIDs. Update format string specifiers.
11182 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11183 * remote-utils.c (prepare_resume_reply): Likewise.
11184 * server.c (cont_thread, general_thread, step_thread)
11185 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11187 (handle_query): Update format specifiers.
11188 (handle_v_cont, main): Use strtoul for thread IDs.
11189 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11190 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11191 (general_thread, step_thread, thread_from_wait)
11192 (old_thread_from_wait): Update.
11193 * target.h (struct thread_resume): Use unsigned long for THREAD.
11194 (struct target_ops): Use unsigned long for arguments to attach and
11197 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11199 * acinclude.m4: Include bfd/bfd.m4 directly.
11200 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11201 <agriffis@toolchain.org>.
11202 * aclocal.m4, configure: Regenerated.
11204 2005-01-07 Andrew Cagney <cagney@gnu.org>
11206 * configure.ac: Rename configure.in, require autoconf 2.59.
11207 * configure: Re-generate.
11209 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11211 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11212 LIBS when finished.
11213 * aclocal.m4: Regenerated.
11214 * configure: Regenerated.
11216 2004-11-21 Andreas Schwab <schwab@suse.de>
11218 * linux-m68k-low.c (m68k_num_gregs): Define.
11219 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11220 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11221 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11222 (m68k_breakpoint_at): New. Add to the_low_target.
11224 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11225 srv_linux_thread_db to yes.
11227 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11229 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11230 (ARCH_SET_FS): Likewise.
11231 (ARCH_GET_FS): Likewise.
11232 (ARCH_GET_GS): Likewise.
11234 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11236 * linux-i386-low.c (ps_get_thread_area): New.
11237 * linux-x86-64-low.c (ps_get_thread_area): New.
11238 * linux-low.c: Include <sys/syscall.h>.
11239 (linux_kill_one_process): Don't kill the first thread here.
11240 (linux_kill): Kill the first thread here.
11241 (kill_lwp): New function.
11242 (send_sigstop, linux_send_signal): Use it.
11243 * proc-service.c: Clean up #ifdefs.
11244 (fpregset_info): Delete.
11245 (ps_lgetregs): Update and enable implementation.
11246 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11248 * remote-utils.c (struct sym_cache, symbol_cache): New.
11249 (input_interrupt): Print a clearer message.
11250 (async_io_enabled): New variable.
11251 (enable_async_io, disable_async_io): Use it. Update comments.
11252 (look_up_one_symbol): Use the symbol cache.
11253 * thread-db.c (thread_db_look_up_symbols): New function.
11254 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11256 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11258 * configure.in: Test for -rdynamic.
11259 * configure: Regenerated.
11260 * Makefile (INTERNAL_LDFLAGS): New.
11261 (gdbserver, gdbreplay): Use it.
11263 2004-09-02 Andrew Cagney <cagney@gnu.org>
11265 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11267 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11269 * linux-low.c (linux_wait): Clear all_processes list also.
11271 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11273 * linux-low.c: Include <errno.h>. Remove extern declaration of
11276 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11278 * gdbreplay.c, server.h, utils.c: Update copyright years.
11280 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11282 * server.c (main): Print child status or termination signal from
11283 variable 'signal', not 'sig'.
11285 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11287 * linux-low.c (linux_read_memory): Change return type to
11288 int. Check for and return error from ptrace().
11289 * target.c (read_inferior_memory): Change return type to int. Pass
11290 back return status from the_target->read_memory().
11291 * target.h (struct target_ops): Adapt *read_memory() prototype.
11293 (read_inferior_memory): Adapt prototype.
11294 * server.c (main): Return an error packet if
11295 read_inferior_memory() returns an error.
11297 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11299 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11300 Unify with other clean targets.
11302 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11304 * server.c (handle_v_cont): Call set_desired_inferior.
11306 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11308 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11310 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11312 * linux-low.c (linux_wait): Unblock async I/O.
11313 (linux_resume): Block and enable async I/O.
11314 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11315 * server.h (block_async_io, unblock_async_io): Add prototypes.
11317 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11319 * remote-utils.c (remote_open): Print a status notice after
11320 opening a TCP port.
11321 * server.c (attach_inferior): Print a status notice after
11324 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11326 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11328 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11330 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11332 * server.c, target.h: Update copyright years.
11334 2004-02-25 Roland McGrath <roland@redhat.com>
11336 * target.h (struct target_ops): New member `read_auxv'.
11337 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11338 * linux-low.c (linux_read_auxv): New function.
11339 (linux_target_ops): Initialize `read_auxv' member to that.
11341 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11343 Committed by Jim Blandy <jimb@redhat.com>.
11345 * linux-s390-low.c (s390_num_regs): Update.
11346 (s390_regmap): Remove control registers. Use __s390x__ predefine
11347 instead of GPR_SIZE to distiguish s390 and s390x targets.
11349 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11351 * linux-low.c: Update copyright year.
11352 (check_removed_breakpoint): Clear pending_is_breakpoint.
11353 (linux_set_resume_request, linux_queue_one_thread)
11354 (resume_status_pending_p): New functions.
11355 (linux_continue_one_thread): Use process->resume.
11356 (linux_resume): Only resume threads if there are no pending events.
11357 * linux-low.h (struct process_info): Add resume request
11360 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11362 * regcache.c (new_register_cache): Clear the allocated register
11363 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11365 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11367 * linux-low.c (linux_resume): Take a struct thread_resume *
11369 (linux_wait): Update call.
11370 (resume_ptr): New static variable.
11371 (linux_continue_one_thread): Renamed from
11372 linux_continue_one_process. Use resume_ptr.
11373 (linux_resume): Use linux_continue_one_thread.
11374 * server.c (handle_v_cont, handle_v_requests): New functions.
11375 (myresume): New function.
11376 (main): Handle 'v' case.
11377 * target.h (struct thread_resume): New type.
11378 (struct target_ops): Change argument of "resume" to struct
11380 (myresume): Delete macro.
11382 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11384 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11385 (uninstall): Support DESTDIR.
11387 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11389 * configure.srv: Add xscale*linux copy of arm*linux entry.
11391 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11393 * linux-arm-low.c (arm_reinsert_addr): New function.
11394 (the_low_target): Add arm_reinsert_addr.
11396 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11398 * mem-break.c: Remove whitespace at end of file.
11400 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11402 * configure.in: Check whether we need to prototype strerror.
11403 * server.h: Optionally prototype strerror.
11404 * gdbreplay.c (perror_with_name): Use strerror.
11405 * linux-low.c (linux_attach_lwp): Use strerror.
11406 * utils.c (perror_with_name): Use strerror.
11407 * config.in, configure: Regenerated.
11409 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11411 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11412 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11414 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11416 * Makefile.in (SFILES): Update.
11417 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11418 low-sun3.c: Remove files.
11420 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11422 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11423 (linux_detach_one_process, linux_detach): New functions.
11424 (linux_target_ops): Add linux_detach.
11425 * server.c (main): Handle 'D' packet.
11426 * target.h (struct target_ops): Add "detach" member.
11427 (detach_inferior): Define.
11429 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11431 From Kelley Cook <kelleycook@wideopenwest.com>:
11432 * configure.srv: Accept i[34567]86 variants.
11434 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11436 * linux-low.c (linux_wait_for_event): Correct comment typos.
11437 (linux_resume_one_process): Call check_removed_breakpoint.
11438 (linux_send_signal): New function.
11439 (linux_target_ops): Add linux_send_signal.
11440 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11442 * target.h (struct target_ops): Add send_signal.
11444 2003-05-29 Jim Blandy <jimb@redhat.com>
11446 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11447 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11448 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11449 away part of the register's value.
11451 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11453 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11454 (linux_wait_for_event, linux_init_signals): Likewise.
11456 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11458 * configure.in: Check for stdlib.h.
11459 * configure: Regenerated.
11460 * config.in: Regenerated.
11462 2003-01-04 Andreas Schwab <schwab@suse.de>
11464 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11466 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11468 * Makefile.in: Remove obsolete code.
11470 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11472 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11473 defined(PT_FPR0_HI).
11475 2002-11-17 Stuart Hughes <seh@zee2.com>
11477 * linux-arm-low.c (arm_num_regs): Increase.
11478 (arm_regmap): Include status register.
11480 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11482 * linux-low.c (register_addr): Remove incorrect -1 check.
11484 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11486 * linux-low.c (linux_create_inferior): Call setpgid. Return
11488 (unstopped_p, linux_signal_pid): Remove.
11489 (linux_target_ops): Remove linux_signal_pid.
11490 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11491 global instead of target method.
11492 * target.h (struct target_ops): Remove signal_pid. Update comment
11493 for create_inferior.
11494 * server.c (signal_pid): New variable.
11495 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11496 gdbserver. Set the child to be the foreground process group.
11497 (attach_inferior): Set signal_pid.
11499 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11501 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11503 2002-08-20 Jim Blandy <jimb@redhat.com>
11505 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11508 2002-08-01 Andrew Cagney <cagney@redhat.com>
11510 * Makefile.in: Make chill references obsolete.
11512 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11514 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11515 * configure: Regenerate.
11516 * config.in: Regenerate.
11518 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11520 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11521 (perror_with_name, remote_close, remote_open, expect, play): Static.
11523 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11525 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11526 byte offsets instead of an array of indexes.
11527 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11529 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11531 * regcache.c: Add comment.
11533 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11535 * thread-db.c: New file.
11536 * proc-service.c: New file.
11537 * acinclude.m4: New file.
11538 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11539 proc-service.o, and thread-db.o.
11540 (linux-low.o): Add USE_THREAD_DB.
11541 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11542 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11543 * aclocal.m4: Regenerated.
11544 * config.in: Regenerated.
11545 * configure: Regenerated.
11546 * configure.in: Check for proc_service.h, sys/procfs.h,
11547 thread_db.h, and linux/elf.h headrs.
11548 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11549 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11550 Check for -lthread_db and thread support.
11551 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11552 PowerPC, and SuperH.
11553 * i387-fp.c: Constify arguments.
11554 * i387-fp.h: Likewise.
11555 * inferiors.c: (struct thread_info): Renamed from
11556 `struct inferior_info'. Remove PID member. Use generic inferior
11557 list header. All uses updated.
11558 (inferiors, signal_pid): Removed.
11559 (all_threads): New variable.
11560 (get_thread): Define.
11561 (add_inferior_to_list): New function.
11562 (for_each_inferior): New function.
11563 (change_inferior_id): New function.
11564 (add_inferior): Removed.
11565 (remove_inferior): New function.
11566 (add_thread): New function.
11567 (free_one_thread): New function.
11568 (remove_thread): New function.
11569 (clear_inferiors): Use for_each_inferior and free_one_thread.
11570 (find_inferior): New function.
11571 (find_inferior_id): New function.
11572 (inferior_target_data): Update argument type.
11573 (set_inferior_target_data): Likewise.
11574 (inferior_regcache_data): Likewise.
11575 (set_inferior_regcache_data): Likewise.
11576 * linux-low.c (linux_bp_reinsert): Remove.
11577 (all_processes, stopping_threads, using_thrads)
11578 (struct pending_signals, debug_threads, pid_of): New.
11579 (inferior_pid): Replace with macro.
11580 (struct inferior_linux_data): Remove.
11581 (get_stop_pc, add_process): New functions.
11582 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11583 Use add_process and add_thread.
11584 (linux_attach_lwp): New function, based on old linux_attach. Use
11585 add_process and add_thread. Set stop_expected for new threads.
11586 (linux_attach): New function.
11587 (linux_kill_one_process): New function.
11588 (linux_kill): Kill all LWPs.
11589 (linux_thread_alive): Use find_inferior_id.
11590 (check_removed_breakpoints, status_pending_p): New functions.
11591 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11592 Update. Use WNOHANG. Wait for cloned processes also. Update process
11593 struct for the found process.
11594 (linux_wait_for_event): New function.
11595 (linux_wait): Use it. Support LWPs.
11596 (send_sigstop, wait_for_sigstop, stop_all_processes)
11597 (linux_resume_one_process, linux_continue_one_process): New functions.
11598 (linux_resume): Support LWPs.
11599 (REGISTER_RAW_SIZE): Remove.
11600 (fetch_register): Use register_size instead. Call supply_register.
11601 (usr_store_inferior_registers): Likewise. Call collect_register.
11602 Fix recursive case.
11603 (regsets_fetch_inferior_registers): Improve error message.
11604 (regsets_store_inferior_registers): Add debugging.
11605 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11606 (unstopped_p, linux_signal_pid): New functions.
11607 (linux_target_ops): Add linux_signal_pid.
11608 (linux_init_signals): New function.
11609 (initialize_low): Call it. Initialize using_threads.
11610 * regcache.c (inferior_regcache_data): Add valid
11612 (get_regcache): Fetch registers lazily. Add fetch argument
11613 and update all callers.
11614 (regcache_invalidate_one, regcache_invalidate): New
11616 (new_register_cache): Renamed from create_register_cache.
11617 Return the new regcache.
11618 (free_register_cache): Change argument to a void *.
11619 (registers_to_string, registers_from_string): Call get_regcache
11620 with fetch flag set.
11621 (register_data): Make static. Pass fetch flag to get_regcache.
11622 (supply_register): Call get_regcache with fetch flag clear.
11623 (collect_register): Call get_regcache with fetch flag set.
11624 (collect_register_as_string): New function.
11625 * regcache.h: Update.
11626 * remote-utils.c (putpkt): Flush after debug output and use
11628 Handle input interrupts while waiting for an ACK.
11629 (input_interrupt): Use signal_pid method.
11630 (getpkt): Flush after debug output and use stderr.
11631 (outreg): Use collect_register_as_string.
11632 (new_thread_notify, dead_thread_notify): New functions.
11633 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11634 and general_thread.
11635 (look_up_one_symbol): Flush after debug output.
11636 * server.c (step_thread, server_waiting): New variables.
11637 (start_inferior): Don't use signal_pid. Update call to mywait.
11638 (attach_inferior): Update call to mywait.
11639 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11640 (main): Don't fetch/store registers explicitly. Use
11641 set_desired_inferior. Support proposed ``Hs'' packet. Update
11643 * server.h: Update.
11644 (struct inferior_list, struct_inferior_list_entry): New.
11645 * target.c (set_desired_inferior): New.
11646 (write_inferior_memory): Constify.
11647 (mywait): New function.
11648 * target.h: Update.
11649 (struct target_ops): New signal_pid method.
11650 (mywait): Removed macro, added prototype.
11652 * linux-low.h (regset_func): Removed.
11653 (regset_fill_func, regset_store_func): New.
11654 (enum regset_type): New.
11655 (struct regset_info): Add type field. Use new operation types.
11656 (struct linux_target_ops): stop_pc renamed to get_pc.
11657 Add decr_pc_after_break and breakpoint_at.
11658 (get_process, get_thread_proess, get_process_thread)
11659 (strut process_info, all_processes, linux_attach_lwp)
11660 (thread_db_init): New.
11662 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11663 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11664 (the_low_target): Add new members.
11665 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11666 (i386_store_fpxregset): Constify.
11667 (target_regsets): Add new kind identifier.
11668 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11669 (i386_set_pc): Add debugging.
11670 (i386_breakpoint_at): New function.
11671 (the_low_target): Add new members.
11672 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11673 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11674 (mips_breakpoint_at): New.
11675 (the_low_target): Add new members.
11676 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11677 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11678 (the_low_target): Add new members.
11679 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11680 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11681 (the_low_target): Add new members.
11682 * linux-x86-64-low.c (target_regsets): Add new kind
11685 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11687 From Martin Pool <mbp@samba.org>:
11688 * server.c (gdbserver_usage): New function.
11691 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11693 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11694 stop_at -> stop_pc.
11696 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11698 * Makefile.in: Remove obsolete code.
11700 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11702 * linux-low.c (regsets_fetch_inferior_registers),
11703 (regsets_store_inferior_registers): Removed cast to int from
11705 * regcache.h: Added declaration of struct inferior_info.
11707 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11709 * inferiors.c (struct inferior_info): Add regcache_data.
11710 (add_inferior): Call create_register_cache.
11711 (clear_inferiors): Call free_register_cache.
11712 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11713 * regcache.c (struct inferior_regcache_data): New.
11714 (registers): Remove.
11715 (get_regcache): New function.
11716 (create_register_cache, free_register_cache): New functions.
11717 (set_register_cache): Don't initialize the register cache here.
11718 (registers_to_string, registers_from_string, register_data): Call
11720 * regcache.h: Add prototypes.
11721 * server.h: Likewise.
11723 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11725 * mem-break.c: New file.
11726 * mem-break.h: New file.
11727 * Makefile.in: Add mem-break.o rule; update server.h
11729 * inferiors.c (struct inferior_info): Add target_data
11731 (clear_inferiors): Free target_data member if set.
11732 (inferior_target_data, set_inferior_target_data): New functions.
11733 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11734 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11735 * linux-low.c (linux_bp_reinsert): New variable.
11736 (struct inferior_linux_data): New.
11737 (linux_create_inferior): Use set_inferior_target_data.
11738 (linux_attach): Likewise. Call add_inferior.
11739 (linux_wait_for_one_inferior): New function.
11740 (linux_wait): Call it.
11741 (linux_write_memory): Add const.
11742 (initialize_low): Call set_breakpoint_data.
11743 * linux-low.h (struct linux_target_ops): Add breakpoint
11745 * server.c (attach_inferior): Remove extra add_inferior
11747 * server.h: Include mem-break.h. Update inferior.c
11749 * target.c (read_inferior_memory)
11750 (write_inferior_memory): New functions.
11751 * target.h (read_inferior_memory)
11752 (write_inferior_memory): Change macros to prototypes.
11753 (struct target_ops): Update comments. Add const to write_memory
11756 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11758 * linux-low.c (usr_store_inferior_registers): Support
11759 registers which are allowed to fail to store.
11760 * linux-low.h (linux_target_ops): Likewise.
11761 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11762 (ppc_cannot_store_register): FPSCR may not be storable.
11764 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11766 * server.h: Include <string.h> if HAVE_STRING_H.
11767 * ChangeLog: Correct paths in last ChangeLog entry.
11769 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11771 * linux-low.h: Remove obsolete prototypes.
11772 (struct linux_target_ops): New.
11773 (extern the_low_target): New.
11774 * linux-low.c (num_regs, regmap): Remove declarations.
11775 (register_addr): Use the_low_target explicitly.
11776 (fetch_register): Likewise.
11777 (usr_fetch_inferior_registers): Likewise.
11778 (usr_store_inferior_registers): Likewise.
11779 * linux-arm-low.c (num_regs): Remove.
11780 (arm_num_regs): Define.
11781 (arm_regmap): Renamed from regmap, made static.
11782 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11784 (arm_cannot_store_register): Renamed from cannot_store_register,
11786 (the_low_target): New.
11787 * linux-i386-low.c (num_regs): Remove.
11788 (i386_num_regs): Define.
11789 (i386_regmap): Renamed from regmap, made static.
11790 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11792 (i386_cannot_store_register): Renamed from cannot_store_register,
11794 (the_low_target): New.
11795 * linux-ia64-low.c (num_regs): Remove.
11796 (ia64_num_regs): Define.
11797 (ia64_regmap): Renamed from regmap, made static.
11798 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11800 (ia64_cannot_store_register): Renamed from cannot_store_register,
11802 (the_low_target): New.
11803 * linux-m68k-low.c (num_regs): Remove.
11804 (m68k_num_regs): Define.
11805 (m68k_regmap): Renamed from regmap, made static.
11806 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11808 (m68k_cannot_store_register): Renamed from cannot_store_register,
11810 (the_low_target): New.
11811 * linux-mips-low.c (num_regs): Remove.
11812 (mips_num_regs): Define.
11813 (mips_regmap): Renamed from regmap, made static.
11814 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11816 (mips_cannot_store_register): Renamed from cannot_store_register,
11818 (the_low_target): New.
11819 * linux-ppc-low.c (num_regs): Remove.
11820 (ppc_num_regs): Define.
11821 (ppc_regmap): Renamed from regmap, made static.
11822 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11824 (ppc_cannot_store_register): Renamed from cannot_store_register,
11826 (the_low_target): New.
11827 * linux-s390-low.c (num_regs): Remove.
11828 (s390_num_regs): Define.
11829 (s390_regmap): Renamed from regmap, made static.
11830 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11832 (s390_cannot_store_register): Renamed from cannot_store_register,
11834 (the_low_target): New.
11835 * linux-sh-low.c (num_regs): Remove.
11836 (sh_num_regs): Define.
11837 (sh_regmap): Renamed from regmap, made static.
11838 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11840 (sh_cannot_store_register): Renamed from cannot_store_register,
11842 (the_low_target): New.
11843 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11844 (the_low_target): New.
11846 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11848 * Makefile.in: Add stamp-h target.
11849 * configure.in: Create stamp-h.
11850 * configure: Regenerated.
11852 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11854 * inferiors.c: New file.
11855 * target.c: New file.
11856 * target.h: New file.
11857 * Makefile.in: Add target.o and inferiors.o. Update
11859 * linux-low.c (inferior_pid): New static variable,
11860 moved from server.c.
11861 (linux_create_inferior): Renamed from create_inferior.
11862 Call add_inferior. Return 0 on success instead of a PID.
11863 (linux_attach): Renamed from myattach.
11864 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11865 (linux_thread_alive): Renamed from mythread_alive.
11866 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11868 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11869 (regsets_store_inferior_registers): Correct error message.
11870 Add missing ``return 0''.
11871 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11872 (linux_store_registers): Renamed from store_inferior_registers.
11873 (linux_read_memory): Renamed from read_inferior_memory.
11874 (linux_write_memory): Renamed from write_inferior_memory.
11875 (linux_target_ops): New structure.
11876 (initialize_low): Call set_target_ops ().
11877 * remote-utils.c (unhexify): New function.
11878 (hexify): New function.
11879 (input_interrupt): Send signals to ``signal_pid''.
11880 * server.c (inferior_pid): Remove.
11881 (start_inferior): Update create_inferior call.
11882 (attach_inferior): Call add_inferior.
11883 (handle_query): New function.
11884 (main): Call handle_query for `q' packets.
11885 * server.h: Include "target.h". Remove obsolete prototypes.
11886 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11888 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11890 * Makefile.in: Add WARN_CFLAGS. Update configury
11892 * configure.in: Check for <string.h>
11893 * configure: Regenerate.
11894 * config.in: Regenerate.
11895 * gdbreplay.c: Include needed system headers.
11896 (remote_open): Remove strchr prototype.
11897 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11898 * regcache.c (supply_register): Change buf argument to const void *.
11899 (supply_register_by_name): Likewise.
11900 (collect_register): Change buf argument to void *.
11901 (collect_register_by_name): Likewise.
11902 * regcache.h: Add missing prototypes.
11903 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11904 * server.c (handle_query): New function.
11905 (attached): New static variable, moved out of main.
11906 (main): Quiet longjmp clobber warnings.
11907 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11908 * utils.c (error): Remove NORETURN.