1 2014-04-25 Pedro Alves <palves@redhat.com>
4 * linux-low.c (linux_attach_fail_reason_string): New function.
5 (linux_attach_lwp): Delete.
6 (linux_attach_lwp_1): Rename to ...
7 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8 argument. Remove "initial" parameter. Return int instead of
9 void. Don't error or warn here.
10 (linux_attach): Adjust to call linux_attach_lwp. Call error on
11 failure to attach to the tgid. Call warning when failing to
13 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
14 argument. Remove "initial" parameter. Return int instead of
15 void. Don't error or warn here.
16 (linux_attach_fail_reason_string): New declaration.
17 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
18 interface change. Use linux_attach_fail_reason_string.
20 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
21 Walfred Tedeschi <walfred.tedeschi@intel.com>
23 * Makefile.in: Added rules to handle new files
24 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
25 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
26 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
27 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
28 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
29 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
31 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
32 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
33 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
35 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
36 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
37 i386/x32-avx512-linux.xml.
38 * i387-fp.c (num_avx512_k_registers): New constant for number
40 (num_avx512_zmmh_low_registers): New constant for number of
41 lower ZMM registers (0-15).
42 (num_avx512_zmmh_high_registers): New constant for number of
43 higher ZMM registers (16-31).
44 (num_avx512_ymmh_registers): New contant for number of higher
45 YMM registers (ymm16-31 added by avx521 on x86_64).
46 (num_avx512_xmm_registers): New constant for number of higher
47 XMM registers (xmm16-31 added by AVX512 on x86_64).
48 (struct i387_xsave): Add space for AVX512 registers.
49 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
50 Add code to handle AVX512 registers.
51 (i387_xsave_to_cache): Add code to handle AVX512 registers.
52 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
53 prototypei from generated file.
54 (tdesc_amd64_avx512_linux): Likewise.
55 (init_registers_x32_avx512_linux): Likewise.
56 (tdesc_x32_avx512_linux): Likewise.
57 (init_registers_i386_avx512_linux): Likewise.
58 (tdesc_i386_avx512_linux): Likewise.
59 (x86_64_regmap): Add AVX512 registers.
60 (x86_linux_read_description): Add code to handle AVX512 XSTATE
62 (initialize_low_arch): Add code to initialize AVX512 registers.
64 2014-04-23 Pedro Alves <palves@redhat.com>
66 * mem-break.c (find_gdb_breakpoint_at): Make static.
67 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
69 2014-04-23 Pedro Alves <palves@redhat.com>
71 * i386-low.c: Don't include break-common.h here.
72 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
73 prototype to take target_hw_bp_type as argument instead of a Z
75 * i386-low.h: Include break-common.h here.
76 (Z_packet_to_hw_type): Declare.
77 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
79 * linux-x86-low.c (x86_insert_point): Convert the packet number to
80 a target_hw_bp_type before calling i386_low_insert_watchpoint.
81 (x86_remove_point): Convert the packet number to a
82 target_hw_bp_type before calling i386_low_remove_watchpoint.
83 * win32-i386-low.c (i386_insert_point): Convert the packet number
84 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
85 (i386_remove_point): Convert the packet number to a
86 target_hw_bp_type before calling i386_low_remove_watchpoint.
88 2014-04-23 Pedro Alves <palves@redhat.com>
90 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
92 2014-04-10 Pedro Alves <palves@redhat.com>
94 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
95 Check if the condition or command is NULL before checking if the
96 breakpoint is known. On success, return true.
97 * mem-break.h (add_breakpoint_condition): Document return.
98 (add_breakpoint_commands): Add describing comment.
99 * server.c (skip_to_semicolon): New function.
100 (process_point_options): Use it.
102 2014-04-09 Pedro Alves <palves@redhat.com>
104 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
107 2014-02-27 Pedro Alves <palves@redhat.com>
110 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
112 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
114 (last_thread_of_process_p): Take a PID argument instead of a
116 (linux_wait_for_lwp): Delete.
117 (num_lwps, check_zombie_leaders, not_stopped_callback): New
119 (linux_low_filter_event): New function, party factored out from
120 linux_wait_for_event.
121 (linux_wait_for_event): Rename to ...
122 (linux_wait_for_event_filtered): ... this. Add new filter ptid
123 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
124 sigsuspend. Check for zombie leaders.
125 (linux_wait_for_event): Reimplement as wrapper around
126 linux_wait_for_event_filtered.
127 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
128 a normal or signal exit is seen, it's the whole process exiting.
129 (wait_for_sigstop): No longer a for_each_inferior callback.
130 Rewrite on top of linux_wait_for_event_filtered.
131 (stop_all_lwps): Call wait_for_sigstop directly.
132 * server.c (resume, handle_target_event): Handle
133 TARGET_WAITKIND_NO_RESUMED.
135 2014-02-26 Joel Brobecker <brobecker@adacore.com>
137 * win32-low.c (psapi_get_dll_name,
138 * win32_CreateToolhelp32Snapshot): Delete.
139 (win32_CreateToolhelp32Snapshot, win32_Module32First)
140 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
142 (handle_load_dll): Add function description.
143 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
145 2014-02-26 Joel Brobecker <brobecker@adacore.com>
147 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
149 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
150 base address when calling win32_add_one_solib.
151 (handle_load_dll): Delete local variable load_addr.
152 Remove 0x1000 offset applied to DLL base address when calling
154 (handle_unload_dll): Add comment.
156 2014-02-26 Joel Brobecker <brobecker@adacore.com>
158 * win32-low.c (win32_add_all_dlls): Renames
159 win32_ensure_ntdll_loaded. Rewrite function documentation.
160 Adjust implementation to always load all DLLs.
161 Add 0x1000 offset to DLL base address when calling
163 (child_initialization_done): New static global.
164 (do_initial_child_stuff): Set child_initialization_done to
165 zero during child initialization, and 1 after. Replace call
166 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
168 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
169 (handle_unload_dll): Add function documentation.
170 (get_child_debug_event): Ignore load and unload DLL events
171 during child initialization.
173 2014-02-20 Doug Evans <dje@google.com>
175 Remove global all_lwps.
176 * inferiors.h (ptid_of): Move here from linux-low.h.
177 (pid_of, lwpid_of): Ditto.
178 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
179 parameter is a struct thread_info * now.
180 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
181 directly. Pass &all_threads to find_inferior instead of &all_lwps.
182 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
184 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
185 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
186 * linux-arm-low.c (update_registers_callback): Update, "entry"
187 parameter is a struct thread_info * now.
188 Fetch lwpid from current_inferior directly.
189 (arm_insert_point): Pass &all_threads to find_inferior instead of
191 (arm_remove_point): Ditto.
192 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
193 (arm_prepare_to_resume): Fetch pid from thread.
194 (arm_read_description): Fetch lwpid from current_inferior directly.
195 * linux-low.c (all_lwps): Delete.
196 (delete_lwp): Delete call to remove_inferior.
197 (handle_extended_wait): Fetch lwpid from thread.
198 (add_lwp): Don't set lwp->entry.id. Remove call to
199 add_inferior_to_list.
200 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
201 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
202 (kill_one_lwp_callback): Ditto.
203 (linux_kill): Don't dereference NULL pointer.
204 Fetch ptid,lwpid from thread.
205 (get_detach_signal): Fetch ptid from thread.
206 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
207 Simplify call to regcache_invalidate_thread.
208 (delete_lwp_callback): Update, "entry" parameter is a
209 struct thread_info * now. Fetch pid from thread.
210 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
211 (status_pending_p_callback): Update, "entry" parameter is a
212 struct thread_info * now. Fetch ptid from thread.
213 (find_lwp_pid): Update, "entry" parameter is a
214 struct thread_info * now.
215 (linux_wait_for_lwp): Fetch pid from thread.
216 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
217 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
218 (enqueue_one_deferred_signal): Fetch lwpid from thread.
219 (dequeue_one_deferred_signal): Ditto.
220 (cancel_breakpoint): Fetch ptid from current_inferior.
221 (linux_wait_for_event): Pass &all_threads to find_inferior,
222 not &all_lwps. Fetch ptid, lwpid from thread.
223 (count_events_callback): Update, "entry" parameter is a
224 struct thread_info * now.
225 (select_singlestep_lwp_callback): Ditto.
226 (select_event_lwp_callback): Ditto.
227 (cancel_breakpoints_callback): Ditto.
228 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
230 (select_event_lwp): Ditto. Fetch ptid from event_thread.
231 (unsuspend_one_lwp): Update, "entry" parameter is a
232 struct thread_info * now.
233 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
235 (linux_stabilize_threads): Ditto. And for for_each_inferior.
236 Fetch lwpid from thread, not lwp.
237 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
238 Pass &all_threads to find_inferior, not &all_lwps.
239 (send_sigstop): Fetch lwpid from thread, not lwp.
240 (send_sigstop_callback): Update, "entry" parameter is a
241 struct thread_info * now.
242 (suspend_and_send_sigstop_callback): Ditto.
243 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
244 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
245 struct thread_info * now.
246 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
248 (lwp_running): Update, "entry" parameter is a
249 struct thread_info * now.
250 (stop_all_lwps): Fetch ptid from thread.
251 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
252 (linux_resume_one_lwp): Fetch lwpid from thread.
253 (linux_set_resume_request): Update, "entry" parameter is a
254 struct thread_info * now. Fetch pid, lwpid from thread.
255 (resume_status_pending_p): Update, "entry" parameter is a
256 struct thread_info * now.
257 (need_step_over_p): Ditto. Fetch lwpid from thread.
258 (start_step_over): Fetch lwpid from thread.
259 (linux_resume_one_thread): Update, "entry" parameter is a
260 struct thread_info * now. Fetch lwpid from thread.
261 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
262 (proceed_one_lwp): Update, "entry" parameter is a
263 struct thread_info * now. Fetch lwpid from thread.
264 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
265 struct thread_info * now.
266 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
267 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
268 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
270 (regsets_store_inferior_registers): Ditto.
271 (fetch_register, store_register): Ditto.
272 (linux_read_memory, linux_write_memory): Ditto.
273 (linux_request_interrupt): Ditto.
274 (linux_read_auxv): Ditto.
275 (linux_xfer_siginfo): Ditto.
276 (linux_qxfer_spu): Ditto.
277 (linux_qxfer_libraries_svr4): Ditto.
278 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
279 moved to inferiors.h.
281 (get_thread_lwp): Update.
282 (struct lwp_info): Delete member "entry". Simplify comment for
285 * linux-mips-low.c (mips_read_description): Fetch lwpid from
286 current_inferior directly.
287 (update_watch_registers_callback): Update, "entry" parameter is a
288 struct thread_info * now. Fetch pid from thread.
289 (mips_linux_prepare_to_resume): Fetch ptid from thread.
290 (mips_insert_point): Fetch lwpid from current_inferior.
291 Pass &all_threads to find_inferior, not &all_lwps.
292 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
293 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
295 (mips_stopped_data_address): Ditto.
296 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
298 * linux-tile-low.c (tile_arch_setup): Ditto.
299 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
300 (update_debug_registers_callback): Update, "entry" parameter is a
301 struct thread_info * now. Fetch pid from thread.
302 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
303 Pass &all_threads to find_inferior, not &all_lwps.
304 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
305 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
306 Pass &all_threads to find_inferior, not &all_lwps.
307 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
308 (i386_dr_low_get_status): Ditto.
309 (x86_linux_prepare_to_resume): Fetch ptid from thread.
310 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
311 (x86_linux_read_description): Ditto.
312 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
314 2014-02-20 Doug Evans <dje@google.com>
316 * inferiors.c (get_first_inferior): Fix buglet.
318 2014-02-19 Doug Evans <dje@google.com>
320 * gdbthread.h (add_thread): Change result type to struct thread_info *.
321 * inferiors.c (add_thread): Change result type to struct thread_info *.
323 (add_lwp): Call add_thread here instead of in callers.
325 * linux-low.h (get_lwp_thread): Rewrite.
326 (struct lwp_info): New member "thread".
328 2014-02-19 Doug Evans <dje@google.com>
330 * linux-low.c (add_lwp): Change result to struct lwp_info *.
333 2014-02-19 Doug Evans <dje@google.com>
335 * inferiors.c (add_thread): Fix whitespace.
337 2014-02-19 Doug Evans <dje@google.com>
339 * dll.c (clear_dlls): Replace accessing list implemention details
341 * gdbthread.h (get_first_thread): Declare.
342 * inferiors.c (for_each_inferior_with_data): New function.
343 (get_first_thread): New function.
344 (find_thread_ptid): Simplify.
345 (get_first_inferior): New function.
346 (clear_list): Delete.
347 (one_inferior_p): New function.
348 (clear_inferior_list): New function.
349 (clear_inferiors): Update.
350 * inferiors.h (for_each_inferior_with_data): Declare.
351 (clear_inferior_list): Declare.
352 (one_inferior_p): Declare.
353 (get_first_inferior): Declare.
354 * linux-low.c (linux_wait_for_event): Replace accessing list
355 implemention details with API function.
356 * server.c (target_running): Ditto.
357 (accumulate_file_name_length): New function.
358 (emit_dll_description): New function.
359 (handle_qxfer_libraries): Replace accessing list implemention
360 details with API function.
361 (handle_qxfer_threads_worker): New function.
362 (handle_qxfer_threads_proper): Replace accessing list implemention
363 details with API function.
364 (handle_query): Ditto.
365 (visit_actioned_threads_callback_ftype): New typedef.
366 (visit_actioned_threads_data): New struct.
367 (visit_actioned_threads): Rewrite to be find_inferior callback.
368 (resume): Call find_inferior.
369 (handle_status): Replace accessing list implemention
370 details with API function.
371 (process_serial_event): Replace accessing list implemention details
373 * target.c (set_desired_inferior): Replace accessing list implemention
374 details with API function.
375 * tracepoint.c (same_process_p): New function.
376 (gdb_agent_about_to_close): Replace accessing list implemention
377 details with API function.
378 * win32-low.c (child_delete_thread): Replace accessing list
379 implemention details with API function.
380 (match_dll_by_basename): New function.
381 (dll_is_loaded_by_basename): New function.
382 (win32_ensure_ntdll_loaded): Replace accessing list implemention
383 details call to dll_is_loaded_by_basename.
385 2014-02-19 Doug Evans <dje@google.com>
387 * dll.h (struct dll_info): Add comment.
388 * gdbthread.h (struct thread_info): Add comment.
389 (current_ptid): Simplify.
390 * inferiors.c (add_process): Update.
391 (remove_process): Update.
392 * inferiors.h (struct process_info): Rename member "head" to "entry".
393 * linux-low.c (delete_lwp): Update.
395 (last_thread_of_process_p): Update.
396 (kill_one_lwp_callback, linux_kill): Update.
397 (status_pending_p_callback): Update.
398 (wait_for_sigstop): Update. Simplify read of ptid.
399 (start_step_over): Update.
400 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
401 (get_lwp_thread): Update.
402 (struct lwp_info): Rename member "head" to "entry".
403 * regcache.h (inferior_list_entry): Delete.
404 * server.c (kill_inferior_callback): Update.
405 (detach_or_kill_inferior_callback): Update.
406 (print_started_pid): Update.
407 (print_attached_pid): Update.
408 (process_serial_event): Simplify read of ptid.
409 * thread-db.c (thread_db_create_event): Update.
410 (thread_db_get_tls_address): Update.
411 * win32-low.c (current_inferior_ptid): Simplify.
413 2014-02-19 Tom Tromey <tromey@redhat.com>
415 * target.h (struct target_ops) <supports_btrace>: Add target_ops
417 (target_supports_btrace): Update.
419 2014-02-14 Yao Qi <yao@codesourcery.com>
421 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
422 (rsp-low-ipa.o): New target.
424 2014-02-12 Tom Tromey <tromey@redhat.com>
426 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
427 convert_ascii_to_int.
428 * regcache.c (registers_to_string): Likewise.
429 * remote-utils.c (decode_M_packet): Likewise.
430 * server.c (process_serial_event): Likewise.
432 2014-02-12 Tom Tromey <tromey@redhat.com>
434 * server.c (handle_query, handle_v_run): Use hex2bin, not
436 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
438 2014-02-12 Tom Tromey <tromey@redhat.com>
440 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
441 convert_int_to_ascii.
442 * regcache.c (registers_to_string, collect_register_as_string):
444 * remote-utils.c (look_up_one_symbol, relocate_instruction):
446 * server.c (process_serial_event): Likewise.
447 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
448 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
450 2014-02-12 Tom Tromey <tromey@redhat.com>
452 * remote-utils.c (look_up_one_symbol, monitor_output): Use
454 * tracepoint.c (cmd_qtstatus): Likewise.
456 2014-02-12 Tom Tromey <tromey@redhat.com>
458 * remote-utils.c (monitor_output): Pass explicit length to
461 2014-02-12 Tom Tromey <tromey@redhat.com>
463 * tracepoint.c: Include rsp-low.h.
464 * server.c: Include rsp-low.h.
465 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
466 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
468 * remote-utils.c: Include rsp-low.h.
469 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
470 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
471 (convert_int_to_ascii, convert_ascii_to_int): Move to
473 * regcache.c: Include rsp-low.h.
474 * ax.c: Include rsp-low.h.
475 * Makefile.in (SFILES): Add common/rsp-low.c.
476 (OBS): Add rsp-low.o.
477 (rsp-low.o): New target.
479 2014-02-12 Tom Tromey <tromey@redhat.com>
481 * utils.h (pulongest, plongest, phex_nz): Don't declare.
482 Include print-utils.h.
483 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
484 (plongest, thirty_two, phex_nz): Remove.
485 * Makefile.in (SFILES): Add common/print-utils.c.
486 (OBS): Add print-utils.o.
487 (print-utils-ipa.o): New target.
488 (print-utils.o): New target.
489 (IPA_OBJS): Add print-utils-ipa.o.
491 2014-02-06 Tom Tromey <tromey@redhat.com>
493 * Makefile.in (SFILES): Fix indentation.
495 2014-02-05 Doug Evans <dje@google.com>
497 * linux-low.c (linux_wait_for_event): Improve comment.
498 (linux_wait_1): Keep current_inferior in sync with event_child.
500 2014-01-22 Doug Evans <dje@google.com>
502 * gdbthread.h (gdb_id_to_thread): Delete, unused.
504 2014-01-22 Doug Evans <dje@google.com>
506 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
507 * configure: Regenerate.
508 * config.in: Regenerate.
509 * Makefile.in (SFILES): Add debug.c.
513 * linux-aarch64-low.c (*): Update all debugging printfs to use
514 debug_printf instead of fprintf.
515 * linux-arm-low.c (*): Ditto.
516 * linux-cris-low.c (*): Ditto.
517 * linux-crisv32-low.c (*): Ditto.
518 * linux-m32r-low.c (*): Ditto.
519 * linux-sparc-low.c (*): Ditto.
520 * linux-x86.c (*): Ditto.
521 * linux-low.c (*): Ditto.
522 (linux_wait_1): Add calls to debug_enter, debug_exit.
523 (linux_wait): Remove redundant debugging printf.
524 (stop_all_lwps): Add calls to debug_enter, debug_exit.
525 (linux_resume, unstop_all_lwps): Ditto.
526 * mem-break.c (*): Update all debugging printfs to use
527 debug_printf instead of fprintf.
528 * remote-utils.c (*): Ditto.
529 * thread-db.c (*): Ditto.
530 * server.c #include <ctype.h>, "gdb_vecs.h".
531 (debug_threads): Moved to debug.c.
532 (*): Update all debugging printfs to use debug_printf instead of
534 (start_inferior): Replace call to fflush with call to debug_flush.
535 (monitor_show_help): Mention set debug-format.
536 (parse_debug_format_options): New function.
537 (handle_monitor_command): Handle "monitor set debug-format".
538 (gdbserver_usage): Mention --debug-format.
539 (main): Parse --debug-format.
540 * server.h (debug_threads): Declaration moved to debug.h.
542 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
543 trace_debug_1 that uses debug_printf.
544 (tracepoint_look_up_symbols): Update all debugging printfs to use
545 debug_printf instead of fprintf.
547 2014-01-20 Baruch Siach <baruch@tkos.co.il>
549 * linux-xtensa-low.c: Include asm/ptrace.h instead of
552 2014-01-17 Pedro Alves <palves@redhat.com>
555 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
556 defined after including gdb_proc_service.h.
558 2014-01-16 Doug Evans <dje@google.com>
560 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
563 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
565 * target.h (target_ops) <read_btrace>: Change parameters and
566 return type to allow error reporting.
567 * server.c (handle_qxfer_btrace): Support delta reads. Pass
568 trace reading errors on.
569 * linux-low.c (linux_low_read_btrace): Pass trace reading
571 (linux_low_disable_btrace): New.
573 2014-01-15 Doug Evans <dje@google.com>
575 * inferiors.c (thread_id_to_gdb_id): Delete.
576 * inferiors.h (thread_id_to_gdb_id): Delete.
578 2014-01-13 Eli Zaretskii <eliz@gnu.org>
580 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
581 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
584 2014-01-08 Pedro Alves <palves@redhat.com>
586 * server.c (handle_status): Don't discard previous queued stop
587 replies or thread's pending status here.
588 (main) <disconnection>: Do it here instead.
590 2014-01-08 Pedro Alves <palves@redhat.com>
592 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
593 * server.c (visit_actioned_threads, handle_pending_status): New
595 (handle_v_cont): Factor out parts to ...
596 (resume): ... this new function. If in all-stop, and a thread
597 being resumed has a pending status, report it without actually
599 (myresume): Adjust to use the new 'resume' function.
600 (clear_pending_status_callback, set_pending_status_callback)
601 (find_status_pending_thread_callback): New functions.
602 (handle_status): Handle the case of multiple threads having
603 interesting statuses to report. Report threads' real last signal
604 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
605 with an interesting thread to report the status for, instead of
606 always reporting the status of the first thread.
608 2014-01-01 Joel Brobecker <brobecker@adacore.com>
610 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
611 * gdbreplay.c (gdbreplay_version): Likewise.
613 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
615 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
616 iov.iov_len with the real length in use.
618 2013-12-13 Joel Brobecker <brobecker@adacore.com>
620 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
621 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
622 for all targets that use win32-low.c.
623 * win32-low.c (win32_ensure_ntdll_loaded): New function.
624 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
626 2013-12-13 Pedro Alves <palves@redhat.com>
628 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
629 if equal to TARGET_WAITKIND_LOADED.
630 * win32-low.c (cached_status): New static global.
631 (win32_wait): Add declaration.
632 (do_initial_child_stuff): Flush all initial pending debug events
633 up to the initial breakpoint.
634 (win32_wait): If CACHED_STATUS was set, return that instead
635 of doing a real wait. Remove the code resuming the execution
636 of the inferior after receiving a TARGET_WAITKIND_LOADED event
637 during the initial phase. Also remove the code changing
638 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
639 TARGET_WAITKIND_STOPPED.
641 2013-12-11 Yao Qi <yao@codesourcery.com>
643 * notif.c (handle_notif_ack): Return 0 if no notification
646 2013-11-20 Doug Evans <dje@google.com>
648 * linux-low.c (linux_set_resume_request): Fix comment.
650 2013-11-20 Doug Evans <dje@google.com>
652 * linux-low.c (resume_status_pending_p): Tweak comment.
654 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
656 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
657 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
658 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
659 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
660 (srv_amd64_regobj): Add amd64-mpx.o.
661 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
662 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
663 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
664 * i387-fp.c (num_pl_bnd_register) Added constant.
665 (num_pl_bnd_cfg_registers) Added constant.
666 (struct i387_xsave) Added reserved area and MPX fields.
667 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
668 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
670 (tdesc_i386_mpx_linux): Add MPX amd64 target.
671 (init_registers_amd64_mpx_linux): Declare new function.
672 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
673 (x86_64_regmap): Add MPX registers.
674 (x86_linux_read_description): Add MPX case.
675 (initialize_low_arch): Initialize MPX targets.
677 2013-11-18 Tom Tromey <tromey@redhat.com>
679 * configure: Rebuild.
680 * configure.ac: Don't check for stdlib.h.
681 * gdbreplay.c: Unconditionally include stdlib.h.
683 2013-11-18 Tom Tromey <tromey@redhat.com>
685 * config.in: Rebuild.
686 * configure: Rebuild.
687 * configure.ac: Don't use AC_HEADER_DIRENT.
689 2013-11-18 Tom Tromey <tromey@redhat.com>
691 * server.h: Don't check HAVE_STRING_H.
692 * gdbreplay.c: Don't check HAVE_STRING_H.
693 * configure: Rebuild.
695 2013-11-18 Tom Tromey <tromey@redhat.com>
697 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
700 2013-11-08 Tom Tromey <tromey@redhat.com>
702 * configure, config.in: Rebuild.
703 * configure.ac: Remove unused configury.
705 2013-11-08 Tom Tromey <tromey@redhat.com>
707 * acinclude.m4: Include common.m4, codeset.m4.
708 * configure, config.in: Rebuild.
709 * configure.ac: Use GDB_AC_COMMON.
711 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
713 * linux-s390-low.c (HWCAP_S390_TE): New define.
714 (s390_arch_setup): Consider the TE field in the HWCAP for
715 determining 'have_regset_tdb'.
717 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
720 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
723 2013-10-02 Pedro Alves <palves@redhat.com>
725 * server.c (process_serial_event): Don't output "GDBserver
726 exiting" if GDB is connected through stdio.
727 * target.c (mywait): Likewise, be silent if GDB is connected
730 2013-10-01 Joel Brobecker <brobecker@adacore.com>
732 * lynx-low.c (lynx_add_threads_after_attach): New function.
733 (lynx_attach): Remove call to add_thread. Add call to
734 lynx_add_threads_after_attach instead.
736 2013-09-28 Mike Frysinger <vapier@gentoo.org>
738 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
739 * config.in, configure: Regenerated.
741 2013-09-18 Yao Qi <yao@codesourcery.com>
744 * server.c (start_inferior): Clear 'resume_info'.
746 2013-09-16 Jiong Wang <jiwang@tilera.com>
748 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
751 2013-09-16 Jiong Wang <jiwang@tilera.com>
753 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
754 linux-tile-low.o to srv_tgtobj.
756 2013-09-16 Will Newton <will.newton@linaro.org>
758 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
761 2013-09-06 Pedro Alves <palves@redhat.com>
763 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
764 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
765 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
766 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
767 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
768 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
770 2013-09-06 Pedro Alves <palves@redhat.com>
772 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
773 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
775 2013-09-06 Pedro Alves <palves@redhat.com>
777 * linux-amd64-ipa.c: Include tracepoint.h.
778 * linux-i386-ipa.c: Include tracepoint.h.
780 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
782 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
783 (ps_get_thread_area): New function.
785 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
787 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
788 (initialize_low_arch): Call init_registers_crisv32 rather than
789 init_register_crisv32.
791 2013-09-05 Pedro Alves <palves@redhat.com>
793 * server.h (handle_vFile, hostio_last_error_from_errno): Move
795 * hostio.h: ... this new file.
796 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
797 win32-low.c: Include hostio.h.
799 2013-09-05 Pedro Alves <palves@redhat.com>
801 * server.h (gdb_client_data, handler_func, callback_handler_func)
802 (delete_file_handler, add_file_handler, append_callback_event)
803 (delete_callback_event, start_event_loop, initialize_event_loop):
804 Move to event-loop.h and include it.
805 * event-loop.h: New file.
807 2013-09-05 Pedro Alves <palves@redhat.com>
809 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
810 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
811 (loaded_dll, unloaded_dll): Move to ...
812 * dll.h: ... this new file.
813 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
815 2013-09-05 Pedro Alves <palves@redhat.com>
817 * server.h (current_process, get_thread_process, all_processes)
818 (add_inferior_to_list, for_each_inferior, current_inferior)
819 (remove_inferior, add_process, remove_process, find_process_pid)
820 (have_started_inferiors_p, have_attached_inferiors_p)
821 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
822 (clear_inferiors, find_inferior, find_inferior_id)
823 (inferior_target_data, set_inferior_target_data)
824 (inferior_regcache_data, set_inferior_regcache_data): Move to
825 inferiors.h, and include it.
826 * inferiors.h: New file.
828 2013-09-05 Pedro Alves <palves@redhat.com>
830 * server.h (struct emit_ops, current_insn_ptr, emit_error):
834 2013-09-05 Pedro Alves <palves@redhat.com>
836 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
838 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
839 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
840 (handle_tracepoint_general_set, handle_tracepoint_query)
841 (tracepoint_finished_step, tracepoint_was_hit)
842 (release_while_stepping_state_list, current_traceframe)
843 (in_readonly_region, traceframe_read_mem)
844 (fetch_traceframe_registers, traceframe_read_sdata)
845 (traceframe_read_info, struct fast_tpoint_collect_status)
846 (fast_tracepoint_collecting, force_unlock_trace_buffer)
847 (handle_tracepoit_bkpts, initialize_low_tracepoint)
848 (supply_fast_tracepoint_registers)
849 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
850 (ipa_tdesc, claim_trampoline_space)
851 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
852 (agent_mem_read, agent_get_trace_state_variable_value)
853 (agent_set_trace_state_variable_value, agent_tsv_read)
854 (agent_mem_read_string, get_raw_reg_func_addr)
855 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
856 * tracepoint.h: ... this new file.
858 2013-09-05 Pedro Alves <palves@redhat.com>
860 * server.h (perror_with_name, error, fatal, warning, paddress)
861 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
865 2013-09-05 Pedro Alves <palves@redhat.com>
867 * server.h (remote_debug, noack_mode, transport_is_reliable)
868 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
869 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
870 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
871 (write_enn, initialize_async_io, enable_async_io)
872 (disable_async_io, check_remote_input_interrupt_request)
873 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
874 (dead_thread_notify, prepare_resume_reply)
875 (decode_address_to_semicolon, decode_address, decode_m_packet)
876 (decode_M_packet, decode_X_packet, decode_xfer_write)
877 (decode_search_memory_packet, unhexify, hexify)
878 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
879 (look_up_one_symbol, relocate_instruction)
880 (monitor_output): Move to remote-utils.h, and include it.
881 * remote-utils.h: New file.
883 2013-09-05 Pedro Alves <palves@redhat.com>
885 * server.h (_): Delete.
887 2013-09-02 Pedro Alves <palves@redhat.com>
889 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
890 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
892 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
894 2013-09-02 Pierre Muller <muller@sourceware.org>
896 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
897 or WriteProcessMemory complete successfully and handle
898 ERROR_PARTIAL_COPY error.
900 2013-09-02 Pedro Alves <palves@redhat.com>
902 * server.c (gdb_read_memory): Return -1 on traceframe memory read
903 error instead of EIO.
905 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
908 * linux-low.c: Include filestuff.h.
909 (linux_create_inferior) <pid == 0>: Call close_most_fds.
910 * lynx-low.c: Include filestuff.h.
911 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
912 * server.c: Include filestuff.h.
913 (main): Call notice_open_fds.
914 * spu-low.c: Include filestuff.h.
915 (spu_create_inferior) <pid == 0>: Call close_most_fds.
917 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
919 * Makefile.in: Explain why ../target and ../nat are not
920 listed as include file search paths.
921 (linux-waitpid.o): New object file rule.
922 * configure.srv (srv_native_linux_obj): New variable.
923 Replace all occurrences of linux native object files with
924 $srv_native_linux_obj.
925 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
926 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
927 (linux_enable_event_reporting): Remove declaration.
928 (my_waitpid): Moved to common/linux-waitpid.c.
929 (linux_wait_for_event): Pass ptid when calling
930 linux_enable_event_reporting.
931 (linux_supports_tracefork_flag): Remove.
932 (linux_enable_event_reporting): Likewise.
933 (linux_tracefork_grandchild): Remove.
934 (STACK_SIZE): Moved to common/linux-ptrace.c.
935 (linux_tracefork_child): Remove.
936 (linux_test_for_tracefork): Remove.
937 (linux_look_up_symbols): Call linux_supports_traceclone.
938 (initialize_low): Remove call to linux_test_for_tracefork.
939 * linux-low.h (PTRACE_TYPE_ARG3): Move to
940 common/linux-ptrace.h.
941 (PTRACE_TYPE_ARG4): Likewise.
942 Include linux-ptrace.h.
944 2013-08-21 Pedro Alves <palves@redhat.com>
946 * config.in: Renegerate.
948 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
950 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
951 (SFILES): Remove $(srcdir)/common/target-common.c and
952 add $(srcdir)/target/waitstatus.c.
953 (OBS): Remove target-common.o and add waitstatus.o.
954 (server_h): Remove $(srcdir)/../common/target-common.h and
955 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
956 and $(srcdir)/../target/waitstatus.h.
957 (target-common.o): Remove.
958 (waitstatus.o): New target object file.
959 * target.h: Do not include target-common.h and
960 include target/resume.h, target/wait.h and
963 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
965 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
967 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
968 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
970 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
971 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
973 2013-07-27 Jie Zhang <jie@codesourcery.com>
974 Daniel Jacobowitz <dan@codesourcery.com>
975 Yao Qi <yao@codesourcery.com>
977 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
978 (mips-linux-watch.o): New rule.
979 (mips_linux_watch_h): New variable.
980 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
982 * linux-mips-low.c: Include mips-linux-watch.h.
983 (struct arch_process_info, struct arch_lwp_info): New.
984 (update_watch_registers_callback): New function.
985 (mips_linux_new_process, mips_linux_new_thread) New functions.
986 (mips_linux_prepare_to_resume, mips_insert_point): New
988 (mips_remove_point, mips_stopped_by_watchpoint): New
990 (rsp_bp_type_to_target_hw_bp_type): New function.
991 (mips_stopped_data_address): New function.
992 (the_low_target): Add watchpoint support functions.
994 2013-07-27 Yao Qi <yao@codesourcery.com>
996 * i386-low.c: Include break-common.h.
997 (enum target_hw_bp_type): Remove.
999 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
1001 * Makefile.in (SFILES): /common/target-common.c.
1002 (OBS): Add target-common.o.
1003 (server_h): Add $(srcdir)/../common/target-common.h.
1004 (target-common.o): New target.
1005 * server.c (queue_stop_reply_callback): Free
1006 status string after use.
1007 * target.c (target_waitstatus_to_string): Remove.
1008 * target.h: Include target-common.h.
1009 (resume_kind): Likewise.
1010 (target_waitkind): Likewise.
1011 (target_waitstatus): Likewise.
1012 (TARGET_WNOHANG): Likewise.
1014 2013-07-04 Yao Qi <yao@codesourcery.com>
1016 * Makefile.in (host_alias): Use @host_noncanonical@.
1017 (target_alias): Use @target_noncanonical@.
1018 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1019 ACX_NONCANONICAL_HOST.
1020 * configure: Regenerated.
1023 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1025 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1026 * configure: Rebuild.
1027 * Makefile.in (version_host, version_target): Get from configure.
1028 (version.c): Use $(version_host) and $(version_target).
1030 2013-07-03 Pedro Alves <palves@redhat.com>
1032 * Makefile.in (config.status): Depend on development.sh.
1033 * acinclude.m4: Include libmcheck.m4.
1034 * configure: Regenerate.
1036 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1038 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1039 attribute inside the parentheses.
1040 (winapi_DebugSetProcessKillOnExit): Ditto.
1041 (winapi_DebugBreakProcess): Ditto.
1042 (winapi_GenerateConsoleCtrlEvent): Ditto.
1044 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1046 * notif.h (notif_event): Add a dummy member to avoid compiler
1049 2013-07-01 Pedro Alves <palves@redhat.com>
1051 * hostio.c (HOSTIO_PATH_MAX): Define.
1052 (require_filename, handle_open, handle_unlink, handle_readlink):
1055 2013-07-01 Pedro Alves <palves@redhat.com>
1057 * server.h: Include "pathmax.h".
1058 * linux-low.c: Don't include sys/param.h.
1059 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1061 * win32-low.c: Don't include sys/param.h.
1062 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1064 2013-07-01 Pedro Alves <palves@redhat.com>
1066 * event-loop.c: Don't check HAVE_UNISTD_H before including
1068 * gdbreplay.c: Likewise.
1069 * remote-utils.c: Likewise.
1070 * server.c: Likewise.
1071 * configure.ac: Don't check for unistd.h.
1072 * configure: Regenerate.
1074 2013-06-28 Tom Tromey <tromey@redhat.com>
1076 * Makefile.in (version.c): Use version.in, not
1079 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1081 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1082 * configure: Rebuild.
1083 * Makefile.in (version_host, version_target): Get from configure.
1084 (version.c): Use $(version_host) and $(version_target).
1086 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1088 Fix trace-status to output user name without trailing colon.
1089 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1091 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1093 Fix trace-status to output proper start-time and stop-time.
1094 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1095 output start time and stop time in hex as gdb expects.
1097 2013-06-26 Pedro Alves <pedro@codesourcery.com>
1099 * tracepoint.c (build_traceframe_info_xml): Output trace state
1100 variables present in the trace buffer.
1102 2013-06-24 Tom Tromey <tromey@redhat.com>
1104 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1106 (version.o): Remove.
1107 * gdbreplay.c: Include version.h.
1108 (version, host_name): Don't declare.
1109 * server.h: Include version.h.
1110 (version, host_name): Don't declare.
1112 2013-06-12 Pedro Alves <palves@redhat.com>
1114 * linux-x86-low.c (linux_is_elf64): Delete global.
1115 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1116 with local linux_pid_exe_is_elf_64_file use.
1118 2013-06-11 Pedro Alves <palves@redhat.com>
1120 * linux-low.c (regset_disabled, disable_regset): New functions.
1121 (regsets_fetch_inferior_registers)
1122 (regsets_store_inferior_registers): Use them.
1123 (initialize_regsets_info); Don't allocate the disabled_regsets
1125 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1128 2013-06-11 Pedro Alves <palves@redhat.com>
1130 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1133 2013-06-11 Pedro Alves <palves@redhat.com>
1135 * linux-x86-low.c (initialize_low_arch): Call
1136 init_registers_x32_avx_linux.
1138 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1140 Fix compatibility with Android Bionic.
1141 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1144 2013-06-07 Pedro Alves <palves@redhat.com>
1147 * Makefile.in (OBS): Add tdesc.o.
1148 (IPA_OBJS): Add tdesc-ipa.o.
1149 (tdesc-ipa.o): New rule.
1150 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1152 * linux-low.c (new_inferior): Delete.
1153 (disabled_regsets, num_regsets): Delete.
1154 (linux_add_process): Adjust to set the new per-process
1156 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1157 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1158 was a stop. When calling arch_setup, switch the current inferior
1159 to the thread that got an event.
1160 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1161 (regsets_fetch_inferior_registers)
1162 (regsets_store_inferior_registers): New regsets_info parameter.
1164 (linux_register_in_regsets): New regs_info parameter. Adjust to
1166 (register_addr, fetch_register, store_register): New usrregs_info
1167 parameter. Adjust to use it.
1168 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1169 parameter regs_info. Adjust to use it.
1170 (linux_fetch_registers): Get the current inferior's regs_info, and
1172 (linux_store_registers): Ditto.
1173 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1174 (initialize_low): Don't initialize the target_regsets here. Call
1175 initialize_low_arch.
1176 * linux-low.h (target_regsets): Delete declaration.
1177 (struct regsets_info): New.
1178 (struct usrregs_info): New.
1179 (struct regs_info): New.
1180 (struct process_info_private) <new_inferior>: New field.
1181 (struct linux_target_ops): Delete the num_regs, regmap, and
1182 regset_bitmap fields. New field regs_info.
1183 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1184 * i387-fp.c (num_xmm_registers): Delete.
1185 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1186 calls to new interface.
1187 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1188 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1189 Infer the number of xmm registers from the regcache's target
1191 * i387-fp.h (num_xmm_registers): Delete.
1192 * inferiors.c (add_thread): Don't install the thread's regcache
1194 * proc-service.c (gregset_info): Fetch the current inferior's
1195 regs_info. Adjust to use it.
1196 * regcache.c: Include tdesc.h.
1197 (register_bytes, reg_defs, num_registers)
1198 (gdbserver_expedite_regs): Delete.
1199 (get_thread_regcache): If the thread doesn't have a regcache yet,
1200 create one, instead of aborting gdbserver.
1201 (regcache_invalidate_one): Rename to ...
1202 (regcache_invalidate_thread): ... this.
1203 (regcache_invalidate_one): New.
1204 (regcache_invalidate): Only invalidate registers of the current
1206 (init_register_cache): Add target_desc parameter, and use it.
1207 (new_register_cache): Ditto. Assert the target description has a
1208 non zero registers_size.
1209 (regcache_cpy): Add assertions. Adjust.
1210 (realloc_register_cache, set_register_cache): Delete.
1211 (registers_to_string, registers_from_string): Adjust.
1212 (find_register_by_name, find_regno, find_register_by_number)
1213 (register_cache_size): Add target_desc parameter, and use it.
1214 (free_register_cache_thread, free_register_cache_thread_one)
1215 (regcache_release, register_cache_size): New.
1216 (register_size): Add target_desc parameter, and use it.
1217 (register_data, supply_register, supply_register_zeroed)
1218 (supply_regblock, supply_register_by_name, collect_register)
1219 (collect_register_as_string, collect_register_by_name): Adjust.
1220 * regcache.h (struct target_desc): Forward declare.
1221 (struct regcache) <tdesc>: New field.
1222 (init_register_cache, new_register_cache): Add target_desc
1224 (regcache_invalidate_thread): Declare.
1225 (regcache_invalidate_one): Delete declaration.
1226 (regcache_release): Declare.
1227 (find_register_by_number, register_cache_size, register_size)
1228 (find_regno): Add target_desc parameter.
1229 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
1231 * remote-utils.c: Include tdesc.h.
1232 (outreg, prepare_resume_reply): Adjust.
1233 * server.c: Include tdesc.h.
1234 (gdbserver_xmltarget): Delete declaration.
1235 (get_features_xml, process_serial_event): Adjust.
1236 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
1238 (struct process_info) <tdesc>: New field.
1239 (ipa_tdesc): Declare.
1240 * tdesc.c: New file.
1241 * tdesc.h: New file.
1242 * tracepoint.c: Include tdesc.h.
1243 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
1244 (get_context_regcache): Adjust to pass ipa_tdesc down.
1245 (do_action_at_tracepoint): Adjust to get the register cache size
1246 from the context regcache's description.
1247 (traceframe_walk_blocks): Adjust to get the register cache size
1248 from the current trace frame's description.
1249 (traceframe_get_pc): Adjust to get current trace frame's
1250 description and pass it down.
1251 (gdb_collect): Adjust to get the register cache size from the
1253 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
1254 (gdbserver_xmltarget): Delete.
1255 (initialize_low_tracepoint): Set the ipa's target description.
1256 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
1257 (initialize_low_tracepoint): Set the ipa's target description.
1258 * linux-x86-low.c: Include tdesc.h.
1259 [__x86_64__] (is_64bit_tdesc): New.
1260 (ps_get_thread_area, x86_get_thread_area): Use it.
1261 (i386_cannot_store_register): Rename to ...
1262 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
1263 (i386_cannot_fetch_register): Rename to ...
1264 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
1265 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
1267 (target_regsets): Rename to ...
1268 (x86_regsets): ... this.
1269 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
1271 (x86_siginfo_fixup): Use is_64bit_tdesc.
1272 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
1273 (tdesc_x32_avx_linux, tdesc_x32_linux)
1274 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
1276 (x86_linux_update_xmltarget): Delete.
1277 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
1278 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
1279 (AMD64_LINUX_USER64_CS): New.
1280 (x86_linux_read_description): New, based on
1281 x86_linux_update_xmltarget.
1282 (same_process_callback): New.
1283 (x86_arch_setup_process_callback): New.
1284 (x86_linux_update_xmltarget): New.
1285 (x86_regsets_info): New.
1286 (amd64_linux_regs_info): New.
1287 (i386_linux_usrregs_info): New.
1288 (i386_linux_regs_info): New.
1289 (x86_linux_regs_info): New.
1290 (x86_arch_setup): Reimplement.
1291 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
1292 (x86_emit_ops): Ditto.
1293 (the_low_target): Adjust. Install x86_linux_regs_info,
1294 x86_cannot_fetch_register, and x86_cannot_store_register.
1295 (initialize_low_arch): New.
1296 * linux-ia64-low.c (tdesc_ia64): Declare.
1297 (ia64_fetch_register): Adjust.
1298 (ia64_usrregs_info, regs_info): New globals.
1299 (ia64_regs_info): New function.
1300 (the_low_target): Adjust.
1301 (initialize_low_arch): New function.
1302 * linux-sparc-low.c (tdesc_sparc64): Declare.
1303 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
1305 (sparc_arch_setup): New function.
1306 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
1307 (the_low_target): Adjust.
1308 (initialize_low_arch): New function.
1309 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
1310 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
1311 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
1312 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
1313 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
1314 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
1315 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
1316 (tdesc_powerpc_isa205_vsx64l): Declare.
1317 (ppc_cannot_store_register, ppc_collect_ptrace_register)
1318 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
1319 (ppc_set_pc, ppc_get_hwcap): Adjust.
1320 (ppc_usrregs_info): Forward declare.
1321 (!__powerpc64__) ppc_regmap_adjusted: New global.
1322 (ppc_arch_setup): Adjust to the current process'es target
1324 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
1325 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
1326 (ppc_store_evrregset): Adjust.
1327 (target_regsets): Rename to ...
1328 (ppc_regsets): ... this, and make static.
1329 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
1330 (ppc_regs_info): New function.
1331 (the_low_target): Adjust.
1332 (initialize_low_arch): New function.
1333 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
1334 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
1335 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
1336 (tdesc_s390x_linux64v2): Declare.
1337 (s390_collect_ptrace_register, s390_supply_ptrace_register)
1338 (s390_fill_gregset, s390_store_last_break): Adjust.
1339 (target_regsets): Rename to ...
1340 (s390_regsets): ... this, and make static.
1341 (s390_get_pc, s390_set_pc): Adjust.
1342 (s390_get_hwcap): New target_desc parameter, and use it.
1343 [__s390x__] (have_hwcap_s390_high_gprs): New global.
1344 (s390_arch_setup): Adjust to set the current process'es target
1345 description. Don't adjust the regmap.
1346 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
1347 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
1348 (regs_info_3264): New globals.
1349 (s390_regs_info): New function.
1350 (the_low_target): Adjust.
1351 (initialize_low_arch): New function.
1352 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
1353 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
1354 [__mips64] (init_registers_mips_linux)
1355 (init_registers_mips_dsp_linux): Delete defines.
1356 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
1357 (have_dsp): New global.
1358 (mips_read_description): New, based on mips_arch_setup.
1359 (mips_arch_setup): Reimplement.
1360 (get_usrregs_info): New function.
1361 (mips_cannot_fetch_register, mips_cannot_store_register)
1362 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
1363 (mips_fill_fpregset, mips_store_fpregset): Adjust.
1364 (target_regsets): Rename to ...
1365 (mips_regsets): ... this, and make static.
1366 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
1367 (dsp_regs_info, regs_info): New globals.
1368 (mips_regs_info): New function.
1369 (the_low_target): Adjust.
1370 (initialize_low_arch): New function.
1371 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
1372 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
1374 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
1375 (arm_read_description): New, with bits factored from
1377 (arm_arch_setup): Reimplement.
1378 (target_regsets): Rename to ...
1379 (arm_regsets): ... this, and make static.
1380 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
1381 (arm_regs_info): New function.
1382 (the_low_target): Adjust.
1383 (initialize_low_arch): New function.
1384 * linux-m68k-low.c (tdesc_m68k): Declare.
1385 (target_regsets): Rename to ...
1386 (m68k_regsets): ... this, and make static.
1387 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
1388 (m68k_regs_info): New function.
1389 (m68k_arch_setup): New function.
1390 (the_low_target): Adjust.
1391 (initialize_low_arch): New function.
1392 * linux-sh-low.c (tdesc_sharch): Declare.
1393 (target_regsets): Rename to ...
1394 (sh_regsets): ... this, and make static.
1395 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
1396 (sh_regs_info, sh_arch_setup): New functions.
1397 (the_low_target): Adjust.
1398 (initialize_low_arch): New function.
1399 * linux-bfin-low.c (tdesc_bfin): Declare.
1400 (bfin_arch_setup): New function.
1401 (bfin_usrregs_info, regs_info): New globals.
1402 (bfin_regs_info): New function.
1403 (the_low_target): Adjust.
1404 (initialize_low_arch): New function.
1405 * linux-cris-low.c (tdesc_cris): Declare.
1406 (cris_arch_setup): New function.
1407 (cris_usrregs_info, regs_info): New globals.
1408 (cris_regs_info): New function.
1409 (the_low_target): Adjust.
1410 (initialize_low_arch): New function.
1411 * linux-cris-low.c (tdesc_crisv32): Declare.
1412 (cris_arch_setup): New function.
1413 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
1414 (cris_regs_info): New function.
1415 (the_low_target): Adjust.
1416 (initialize_low_arch): New function.
1417 * linux-m32r-low.c (tdesc_m32r): Declare.
1418 (m32r_arch_setup): New function.
1419 (m32r_usrregs_info, regs_info): New globals.
1420 (m32r_regs_info): Adjust.
1421 (initialize_low_arch): New function.
1422 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
1423 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
1424 (tic6x_usrregs_info): Forward declare.
1425 (tic6x_read_description): New function, based on ...
1426 (tic6x_arch_setup): ... this. Reimplement.
1427 (target_regsets): Rename to ...
1428 (tic6x_regsets): ... this, and make static.
1429 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
1430 (tic6x_regs_info): New function.
1431 (the_low_target): Adjust.
1432 (initialize_low_arch): New function.
1433 * linux-xtensa-low.c (tdesc_xtensa): Declare.
1434 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
1435 (target_regsets): Rename to ...
1436 (xtensa_regsets): ... this, and make static.
1437 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
1439 (xtensa_arch_setup, xtensa_regs_info): New functions.
1440 (the_low_target): Adjust.
1441 (initialize_low_arch): New function.
1442 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
1443 (nios2_arch_setup): Set the current process'es tdesc.
1444 (target_regsets): Rename to ...
1445 (nios2_regsets): ... this.
1446 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
1447 (nios2_regs_info): New function.
1448 (the_low_target): Adjust.
1449 (initialize_low_arch): New function.
1450 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1451 (aarch64_arch_setup): Set the current process'es tdesc.
1452 (target_regsets): Rename to ...
1453 (aarch64_regsets): ... this.
1454 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1455 (aarch64_regs_info): New function.
1456 (the_low_target): Adjust.
1457 (initialize_low_arch): New function.
1458 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
1460 (target_regsets): Rename to ...
1461 (tile_regsets): ... this.
1462 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
1463 (tile_regs_info): New function.
1464 (tile_arch_setup): Set the current process'es tdesc.
1465 (the_low_target): Adjust.
1466 (initialize_low_arch): New function.
1467 * spu-low.c (tdesc_spu): Declare.
1468 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
1469 * win32-arm-low.c (tdesc_arm): Declare.
1470 (arm_arch_setup): New function.
1471 (the_low_target): Install arm_arch_setup instead of
1473 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
1474 (init_windows_x86): Rename to ...
1475 (i386_arch_setup): ... this. Set `win32_tdesc'.
1476 (the_low_target): Adjust.
1477 * win32-low.c (win32_tdesc): New global.
1478 (child_add_thread): Don't create the thread cache here.
1479 (do_initial_child_stuff): Set the new process'es tdesc.
1480 * win32-low.h (struct target_desc): Forward declare.
1481 (win32_tdesc): Declare.
1482 * lynx-i386-low.c (tdesc_i386): Declare global.
1483 (lynx_i386_arch_setup): Set `lynx_tdesc'.
1484 * lynx-low.c (lynx_tdesc): New global.
1485 (lynx_add_process): Set the new process'es tdesc.
1486 * lynx-low.h (struct target_desc): Forward declare.
1487 (lynx_tdesc): Declare global.
1488 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
1489 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
1490 * nto-low.c (nto_tdesc): New global.
1491 (do_attach): Set the new process'es tdesc.
1492 * nto-low.h (struct target_desc): Forward declare.
1493 (nto_tdesc): Declare.
1494 * nto-x86-low.c (tdesc_i386): Declare.
1495 (nto_x86_arch_setup): Set `nto_tdesc'.
1497 2013-06-04 Gary Benson <gbenson@redhat.com>
1499 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
1500 to qSupported response when appropriate.
1501 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
1502 with nonzero-length annex.
1503 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
1504 arguments supplied in annex.
1506 2013-05-31 Doug Evans <dje@google.com>
1509 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
1510 64 bits in 64-cross-32 environment.
1512 2013-05-28 Pedro Alves <palves@redhat.com>
1514 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
1515 (aarch64-without-fpu.c): Delete rule.
1516 * configure.srv (aarch64*-*-linux*): Remove references to
1517 aarch64-without-fpu.o and aarch64-without-fpu.xml.
1518 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
1521 2013-05-24 Pedro Alves <palves@redhat.com>
1523 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
1524 instead of strchr/decode_address. Error if the range isn't split
1525 with a ','. Don't assume there's be a ':' in the action.
1527 2013-05-23 Yao Qi <yao@codesourcery.com>
1528 Pedro Alves <palves@redhat.com>
1530 * linux-low.c (lwp_in_step_range): New function.
1531 (linux_wait_1): If the thread was range stepping and stopped
1532 outside the stepping range, report the stop to GDB. Otherwise,
1533 continue stepping. Add range stepping debug output.
1534 (linux_set_resume_request): Copy the step range from the resume
1536 (linux_supports_range_stepping): New.
1537 (linux_target_ops) <supports_range_stepping>: Set to
1538 linux_supports_range_stepping.
1539 * linux-low.h (struct linux_target_ops)
1540 <supports_range_stepping>: New field.
1541 (struct lwp_info) <step_range_start, step_range_end>: New fields.
1542 * linux-x86-low.c (x86_supports_range_stepping): New.
1543 (the_low_target) <supports_range_stepping>: Set to
1544 x86_supports_range_stepping.
1545 * server.c (handle_v_cont): Handle 'r' action.
1546 (handle_v_requests): Append ";r" if the target supports range
1548 * target.h (struct thread_resume) <step_range_start,
1549 step_range_end>: New fields.
1550 (struct target_ops) <supports_range_stepping>:
1552 (target_supports_range_stepping): New macro.
1554 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1556 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
1557 confusion in comment.
1559 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1561 * lynx-low.c (struct process_info_private): New type.
1562 (lynx_add_process): New function.
1563 (lynx_create_inferior, lynx_attach): Replace calls to
1564 add_process by calls to lynx_add_process.
1565 (lynx_resume): If PTID is null, then try using
1566 current_process()->private->last_wait_event_ptid.
1568 (lynx_clear_inferiors): Delete. The contents of that function
1569 has been inlined in lynx_mourn;
1570 (lynx_wait_1): Save the ptid in the process's private data.
1571 (lynx_mourn): Free the process' private data. Replace call
1572 to lynx_clear_inferiors by call to clear_inferiors.
1574 2013-05-17 Yao Qi <yao@codesourcery.com>
1576 * i386-low.c (i386_length_and_rw_bits): Move the comment to
1579 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
1581 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
1582 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
1583 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
1584 PT_TEXT_END_ADDR guards. Update comments.
1585 (linux_target_op) <read_offsets>: Conditionally define to
1586 linux_read_offsets if the target is UCLIBC and if it defines
1587 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
1589 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
1590 Andrew Jenner <andrew@codesourcery.com>
1592 * Makefile.in (SFILES): Add linux-nios2-low.c.
1593 (clean): Add action to delete nios2-linux.c.
1594 (nios2-linux.c): New rule.
1595 * configure.srv: Add nios2*-*-linux*.
1596 * linux-nios2-low.c: New.
1598 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
1600 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
1602 2013-04-25 Hui Zhu <hui@codesourcery.com>
1605 * ax.c (ax_printf): Add fflush.
1607 2013-04-22 Tom Tromey <tromey@redhat.com>
1609 * Makefile.in (SFILES): Add filestuff.c.
1610 (OBS): Add filestuff.o.
1611 (filestuff.o): New target.
1612 * config.in, configure: Rebuild.
1613 * configure.ac: Check for fdwalk, pipe2.
1615 2013-04-17 Pedro Alves <palves@redhat.com>
1617 * configure.ac (USE_THREAD_DB): Delete variable.
1618 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
1619 Don't AC_SUBST USE_THREAD_DB.
1620 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
1621 * config.in, configure: Regenerate.
1623 2013-04-16 Pedro Alves <palves@redhat.com>
1625 * linux-low.h (struct lwp_info) <thread_known>: Move under
1626 the USE_THREAD_DB #ifdef.
1628 2013-04-16 Pedro Alves <palves@redhat.com>
1630 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
1631 (linux-low.o): Delete rule.
1632 * linux-low.h: Always include "gdb_thread_db.h" instead of
1633 conditionally including thread_db.h.
1634 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
1637 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1639 * Makefile.in (install-only): Fix make install regression.
1641 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1643 Convert man pages to texinfo, new gdbinit.5 texinfo page.
1644 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
1646 * gdbserver.1: Remove.
1648 2013-03-22 Pedro Alves <palves@redhat.com>
1650 * linux-low.c (handle_extended_wait): Don't call
1651 linux_enable_event_reporting.
1653 2013-03-15 Tony Theodore <tonyt@logyst.com>
1656 * Makefile.in (SHELL): Use @SHELL@.
1658 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
1660 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
1663 2013-03-13 Joel Brobecker <brobecker@adacore.com>
1665 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
1666 Remove extraneous NULL element.
1668 2013-03-13 Yao Qi <yao@codesourcery.com>
1670 * tracepoint.c (traceframe_read_tsv): Look for the last matched
1671 'V' block in trace frame.
1673 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1675 * target.h (struct target_ops): Add btrace ops.
1676 (target_supports_btrace): New macro.
1677 (target_enable_btrace): New macro.
1678 (target_disable_btrace): New macro.
1679 (target_read_btrace): New macro.
1680 * gdbthread.h (struct thread_info): Add btrace field.
1681 * server.c: Include btrace-common.h.
1682 (handle_btrace_general_set): New function.
1683 (handle_btrace_enable): New function.
1684 (handle_btrace_disable): New function.
1685 (handle_general_set): Call handle_btrace_general_set.
1686 (handle_qxfer_btrace): New function.
1687 (struct qxfer qxfer_packets[]): Add btrace entry.
1688 * inferiors.c (remove_thread): Disable btrace.
1689 * linux-low: Include linux-btrace.h.
1690 (linux_low_enable_btrace): New function.
1691 (linux_low_read_btrace): New function.
1692 (linux_target_ops): Add btrace ops.
1693 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
1694 Add srv_linux_btrace=yes.
1695 (x86_64-*-linux*): Add linux-btrace.o.
1696 Add srv_linux_btrace=yes.
1697 * configure.ac: Define HAVE_LINUX_BTRACE.
1698 * config.in: Regenerated.
1699 * configure: Regenerated.
1701 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1703 * server.c (handle_qxfer): Preserve error message if -3 is
1705 (qxfer): Document the -3 return value.
1707 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1709 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
1710 (linux_btrace_h): New variable.
1711 (linux-btrace.o): New rule.
1713 2013-03-08 Stan Shebs <stan@codesourcery.com>
1714 Hafiz Abid Qadeer <abidh@codesourcery.com>
1716 * tracepoint.c (trace_buffer_size): New global.
1717 (DEFAULT_TRACE_BUFFER_SIZE): New define.
1718 (init_trace_buffer): Change to one-argument function. Allocate
1719 trace buffer memory.
1720 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
1721 handle QTBuffer:size packet.
1722 (cmd_bigqtbuffer_size): New function.
1723 (initialize_tracepoint): Call init_trace_buffer with
1724 DEFAULT_TRACE_BUFFER_SIZE.
1725 * server.c (handle_query): Add QTBuffer:size in the
1728 2013-03-07 Yao Qi <yao@codesourcery.com>
1730 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
1731 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
1733 (cmd_qtsp): Adjust condition. Do post increment.
1734 Set cur_action and cur_step_action back to 0.
1736 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
1739 * linux-low.c (linux_write_memory): Return early success if LEN is
1742 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
1744 * configure.srv: Add x86_64-*-cygwin* as target.
1746 2013-02-28 Tom Tromey <tromey@redhat.com>
1748 * configure.ac: Invoke AC_SYS_LARGEFILE.
1749 * configure, config.in: Rebuild.
1751 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
1753 * win32-low.c: Throughout, fix format strings and casts of
1754 printf-like functions to avoid type related warnings on all
1756 (get_child_debug_event): Print dwDebugEventCode as hex since
1757 that's how it's usually documented.
1759 2013-02-28 Yao Qi <yao@codesourcery.com>
1761 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1764 2013-02-27 Jiong Wang <jiwang@tilera.com>
1766 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1767 (reg-tilegx32.c): New rule.
1768 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1769 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1770 different register info initializer according to elf class.
1771 (init_registers_tilgx32): New function. The tilegx32 register info
1773 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1774 (tile_store_gregset): Likewise.
1776 2013-02-27 Yao Qi <yao@codesourcery.com>
1778 * server.c (process_point_options): Print debug message when
1779 debug_threads is true.
1781 2013-02-26 Yao Qi <yao@codesourcery.com>
1783 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1785 2013-02-19 Pedro Alves <palves@redhat.com>
1786 Kai Tietz <ktietz@redhat.com>
1790 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1791 instead of strtoul to extract address from packet.
1792 (process_serial_event) <'z'>: Likewise.
1794 2013-02-18 Yao Qi <yao@codesourcery.com>
1796 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1798 2013-02-14 Pedro Alves <palves@redhat.com>
1802 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1803 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1805 2013-02-14 Pedro Alves <palves@redhat.com>
1807 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1809 2013-02-14 Pedro Alves <palves@redhat.com>
1811 * tracepoint.c (save_string): Delete.
1812 (add_tracepoint_action): Use savestring instead of save_string.
1814 2013-02-12 Pedro Alves <palves@redhat.com>
1816 * linux-xtensa-low.c: Ditto.
1817 * xtensa-xtregs.c: Ditto.
1819 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1821 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1824 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1826 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1827 aarch64_num_wp_regs and aarch64_num_bp_regs to
1828 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1830 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1832 * linux-aarch64-low.c (ps_get_thread_area): Replace
1833 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1835 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1836 Marcus Shawcroft <marcus.shawcroft@arm.com>
1837 Nigel Stephens <nigel.stephens@arm.com>
1838 Yufeng Zhang <yufeng.zhang@arm.com>
1840 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1841 (aarch64.c, aarch64-without-fpu.c): New targets.
1842 * configure.srv (aarch64*-*-linux*): New.
1843 * linux-aarch64-low.c: New file.
1845 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1847 * linux-low.c (handle_extended_wait, linux_create_inferior)
1848 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1849 (dequeue_one_deferred_signal, linux_resume_one_thread)
1850 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1851 (linux_tracefork_grandchild, linux_test_for_tracefork)
1852 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1853 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1854 where the argument is 0.
1856 2013-01-25 Yao Qi <yao@codesourcery.com>
1858 * event-loop.c: Include "queue.h".
1859 (gdb_event_p): New typedef.
1860 (struct gdb_event) <next_event>: Remove.
1861 (event_queue): Change to QUEUE(gdb_event_p).
1862 (async_queue_event): Remove.
1863 (gdb_event_xfree): New.
1864 (initialize_event_loop): New.
1865 (process_event): Use API from QUEUE.
1866 (wait_for_event): Likewise.
1867 * server.c (main): Call initialize_event_loop.
1868 * server.h (initialize_event_loop): Declare.
1870 2013-01-18 Yao Qi <yao@codesourcery.com>
1872 * ax.h (struct eval_agent_expr_context): New.
1873 (gdb_eval_agent_expr): Update declaration.
1874 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1875 TFRAME. Add new argument CTX.
1876 * server.h (struct eval_agent_expr_context): Declare.
1877 (agent_mem_read, agent_tsv_read): Update declaration.
1878 (agent_mem_read_string): Likewise.
1879 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1880 (add_traceframe_block): Add new argument TPOINT.
1881 Increase TPOINT->traceframe_usage.
1882 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1883 eval_tracepoint_agent_expr.
1884 (condition_true_at_tracepoint): Likewise.
1885 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1886 (agent_mem_read_string, agent_tsv_read): Likewise.
1888 2013-01-16 Yao Qi <yao@codesourcery.com>
1890 * linux-low.c (linux_resume_one_lwp): Don't check
1891 'lwp->bp_reinsert != 0'.
1893 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1894 Pedro Alves <palves@redhat.com>
1896 * lynx-low.c (ptrace_request_to_str): Define a temporary
1897 macro and use it to simplify this function's implementation.
1899 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1901 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1904 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1906 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1908 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1910 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1912 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1914 * lynx-low.c (lynx_resume): Use the resume_info parameter
1915 to determine the ptid for the lynx_ptrace call, unless
1916 it is equal to minus_one_ptid, in which case we use the
1917 ptid of the current_inferior.
1918 (lynx_wait_1): After having received a thread create/exit
1919 event, resume the inferior's execution using the signaling
1920 thread's ptid, rather than the old ptid.
1922 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1924 * lynx-low.c (lynx_resume): Delete variable ret.
1926 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1928 * gdbreplay.c (gdbreplay_version): Update copyright year.
1929 * server.c (gdbserver_version): Likewise.
1931 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1933 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1936 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1938 * lynx-low.c (ptrace_request_to_str): Add handling for
1941 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1943 * lynx-low.c (lynx_attach): Delete variable new_process.
1945 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1947 * lynx-low.c (lynx_create_inferior): Delete variable
1950 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1952 * lynx-low.c (ptrace_request_to_str): Do not handle
1953 PTRACE_GETTHREADLIST if this macro does not exist.
1955 2012-12-15 Yao Qi <yao@codesourcery.com>
1957 * Makefile.in (OBS): Add notif.o.
1958 * notif.c, notif.h: New.
1959 * server.c: Include "notif.h".
1960 (struct vstop_notif) <next>: Remove.
1962 (queue_stop_reply): Update.
1963 (push_event, send_next_stop_reply): Remove.
1964 (discard_queued_stop_replies): Update.
1965 (notif_stop): New variable.
1966 (handle_v_stopped): Remove.
1967 (handle_v_requests): Don't call handle_v_stopped. Call
1968 handle_ack_notif instead.
1969 (queue_stop_reply_callback): Call notif_event_enque instead
1970 of queue_stop_reply.
1971 (handle_status): Don't call send_next_stop_reply, call
1972 notif_write_event instead.
1973 (kill_inferior_callback): Likewise.
1974 (detach_or_kill_inferior_callback): Likewise.
1975 (main): Call initialize_notif.
1976 (process_serial_event): Call QUEUE_is_empty.
1977 (handle_target_event): Call notif_push instead of push event.
1978 * server.h (push_event): Remove declaration.
1980 2012-12-10 Tom Tromey <tromey@redhat.com>
1982 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1983 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1986 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1987 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1988 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1989 (amd64-linux-ipa.o, ax.o): Rewrite.
1990 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1991 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1992 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1993 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1994 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1995 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1996 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1997 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1998 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1999 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2000 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2001 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2002 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2003 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2004 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2005 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2006 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2007 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2008 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2009 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2010 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2011 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2012 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2013 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2014 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2015 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2016 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2017 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2018 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2019 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2020 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2021 (reg-tilegx.o): Remove.
2022 (all_object_files): New macro.
2023 Include .deps files.
2024 * aclocal.m4, configure: Rebuild.
2025 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2026 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2027 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2029 2012-12-05 Tom Tromey <tromey@redhat.com>
2032 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2034 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
2036 * configure.ac: Check for linux/perf_event.h.
2037 * config.in: Regenerated.
2038 * configure: Regenerated.
2040 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2042 * hostio.c (handle_readlink): Decrease buffer size
2043 parameter passed to readlink by one byte.
2045 2012-11-26 Yao Qi <yao@codesourcery.com>
2047 * configure.ac (build_warnings): Append '-Wempty-body'.
2048 * configure: Regenerated.
2049 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2052 2012-11-15 Pierre Muller <muller@sourceware.org>
2054 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2055 * config.in: Regenerate.
2056 * configure: Regenerate.
2057 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2058 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2059 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2060 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2062 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2063 instead of <sys/wait.h> header.
2064 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2066 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
2068 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2069 (various make rules): Remove -DGDBSERVER
2071 2012-11-09 Yao Qi <yao@codesourcery.com>
2073 * spu-low.c (current_ptid): Move it to ..
2074 * gdbthread.h: ... here. New.
2075 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2076 * server.c (myresume, process_serial_event): Likewise.
2077 * thread-db.c (thread_db_find_new_threads): Likewise.
2078 * tracepoint.c (run_inferior_command): Likewise.
2080 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
2082 * server.c (handle_search_memory_1): Include access length in
2085 2012-09-05 Michael Brandt <michael.brandt@axis.com>
2087 * linux-crisv32-low.c: Fix compile errors.
2089 2012-09-04 Yao Qi <yao@codesourcery.com>
2091 * tracepoint.c (cmd_qtsv): Adjust debug message.
2092 Don't check CUR_TPOINT.
2094 2012-08-28 Yao Qi <yao@codesourcery.com>
2096 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2097 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2098 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2099 Remove declarations of xmalloc, xreallloc, xstrdup and
2101 * Makefile.in (libiberty_h): New.
2102 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2103 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2105 2012-08-23 Yao Qi <yao@codesourcery.com>
2107 * server.h: Remove declaration of 'xsnprintf'.
2109 2012-08-22 Keith Seitz <keiths@redhat.com>
2111 * server.h: Include build-gnulib-gbserver/config.h.
2112 * gdbreplay.c: Likewise.
2114 2012-08-08 Doug Evans <dje@google.com>
2116 * Makefile.in (SFILES): Add gdb_vecs.c.
2117 (OBS): Add gdb_vecs.o.
2118 (gdb_vecs_h, host_defs_h): New variables.
2119 (thread-db.o): Add $(gdb_vecs_h) dependency.
2120 (gdb_vecs.o): New rule.
2121 * thread-db.c: #include "gdb_vecs.h".
2122 (thread_db_load_search): Use a vector to iterate over path elements.
2123 Handle text appearing after "$pdir".
2125 * configure.ac: Add check for strstr.
2126 * config.in: Regenerate.
2127 * configure: Regenerate.
2129 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2131 * hostio.c (handle_pread): If pread fails, fall back to attempting
2133 (handle_pwrite): Likewise for pwrite.
2135 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2137 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2138 between unsupported TYPE and unimplementable ADDR/LEN combination.
2139 (arm_insert_point): Act on new return value.
2141 2012-07-31 Pedro Alves <palves@redhat.com>
2143 * server.c (process_point_options): Only skip tokens if we find
2144 one that is unrecognized. Don't treat 'X' specially while
2145 skipping unrecognized tokens.
2147 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2149 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2150 to 4-byte-align HW breakpoint addresses for Thumb.
2152 2012-07-27 Yao Qi <yao@codesourcery.com>
2156 * server.h: Declare gdb_agent_about_to_close.
2157 * target.c (kill_inferior): Include "agent.h".
2158 New. Send command 'kill'.
2159 * target.h (kill_inferior): Removed macro.
2160 * tracepoint.c (gdb_agent_about_to_close): New.
2161 (gdb_agent_helper_thread): Handle command 'close'.
2162 Wait endlessly until the inferior stops.
2163 Install gdb_agent_remove_socket to atexit hook.
2164 (agent_socket_name): New static variable.
2165 (gdb_agent_socket_init): Replace local variable 'name' with
2166 'agent_socket_name'.
2167 (gdb_agent_remove_socket): New.
2169 2012-07-27 Yao Qi <yao@codesourcery.com>
2171 * server.c (process_point_options): Stop at 'X' when parsing.
2173 2012-07-19 Michael Eager <eager@eagercon.com>
2175 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
2177 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2178 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2179 hardware breakpoint.
2181 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2183 * gdbserver/linux-low.c (initialize_low): Call
2184 linux_ptrace_init_warnings.
2186 2012-07-02 Doug Evans <dje@google.com>
2188 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2191 2012-07-02 Stan Shebs <stan@codesourcery.com>
2193 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2194 (ax.o): Add it to build rule.
2196 (OBS): Add format.o.
2197 (IPA_OBS): Add format.o.
2198 * server.c (handle_query): Claim support for breakpoint commands.
2199 (process_point_options): Add command case.
2200 (process_serial_event): Leave running if there are printfs in
2202 * mem-break.h (any_persistent_commands): Declare.
2203 (add_breakpoint_commands): Declare.
2204 (gdb_no_commands_at_breakpoint): Declare.
2205 (run_breakpoint_commands): Declare.
2206 * mem-break.c (struct point_command_list): New struct.
2207 (struct breakpoint): New field command_list.
2208 (any_persistent_commands): New function.
2209 (add_commands_to_breakpoint): New function.
2210 (add_breakpoint_commands): New function.
2211 (gdb_no_commands_at_breakpoint): New function.
2212 (run_breakpoint_commands): New function.
2213 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2215 * ax.c: Include format.h.
2216 (ax_printf): New function.
2217 (gdb_eval_agent_expr): Add printf opcode.
2219 2012-06-13 Yao Qi <yao@codesourcery.com>
2221 * server.c (start_inferior): Remove duplicated writes to fields
2222 'last_resume_kind' and 'last_status' of 'current_inferior'.
2224 2012-06-12 Yao Qi <yao@codesourcery.com>
2225 Pedro Alves <palves@redhat.com>
2227 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
2229 * server.c (handle_v_cont): Extend comment.
2231 2012-06-11 Yao Qi <yao@codesourcery.com>
2233 * linux-low.c (linux_attach): Add 'static'.
2235 2012-06-06 Yao Qi <yao@codesourcery.com>
2237 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
2239 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2241 Fix gcc -flto compilation warning.
2242 * server.c (main): Make variable multi_mode and attach volatile.
2244 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2246 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
2247 if the platform doesn't know about it.
2249 2012-05-30 Jeff Kenton <jkenton@tilera.com>
2251 * Makefile.in (SFILES): Add linux-tile-low.c.
2252 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
2253 * configure.srv: Handle tilegx-*-linux*.
2254 * linux-tile-low.c: New file.
2256 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2258 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
2260 2012-05-24 Pedro Alves <palves@redhat.com>
2264 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2266 2012-05-24 Pedro Alves <palves@redhat.com>
2270 Replace target_signal with gdb_signal throughout.
2272 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
2274 * linux-low.c (linux_store_registers): Avoid the copying sequence
2275 when no data has been retrieved by ptrace.
2277 2012-05-22 Will Deacon <will.deacon@arm.com>
2279 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
2280 Include asm/ptrace.h.
2281 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
2284 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
2286 * linux-low.c (linux_store_registers): Don't re-retrieve data
2287 with ptrace that has already been obtained from /proc. Always
2288 copy any data retrieved with ptrace to the buffer supplied.
2290 2012-05-11 Yao Qi <yao@codesourcery.com>
2291 Pedro Alves <palves@redhat.com>
2293 * linux-low.c (enum stopping_threads_kind): New.
2294 (stopping_threads): Change type to `enum stopping_threads_kind'.
2295 (handle_extended_wait): If stopping and suspending threads, leave
2296 the new_lwp suspended too.
2297 (linux_wait_for_event): Adjust.
2298 (stop_all_lwps): Set `stopping_threads' to
2299 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
2300 whether we're suspending threads or just stopping them. Assert no
2303 2012-04-29 Yao Qi <yao@codesourcery.com>
2305 * server.h: Move some code to ...
2306 * gdbthread.h: ... here. New.
2307 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
2308 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
2309 (nto-low.o, win32-low.o): Likewise.
2310 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
2311 * regcache.c, remote-utils.c, server.c: Likewise.
2312 * target.c, tracepoint.c, win32-low.c: Likewise.
2314 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2316 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
2317 (PTRACE_ARG4_TYPE): Likewise.
2318 (PTRACE_XFER_TYPE): Likewise.
2319 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
2320 ptrace to PTRACE_ARG3_TYPE.
2321 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
2322 (PTRACE_ARG4_TYPE): Likewise.
2323 (PTRACE_XFER_TYPE): Likewise.
2324 (linux_detach_one_lwp): Cast fourth argument of
2325 ptrace to long then PTRACE_ARG4_TYPE.
2326 (regsets_fetch_inferior_registers): Cast third argument of
2327 ptrace to long then PTRACE_ARG3_TYPE.
2328 (regsets_store_inferior_registers): Likewise.
2330 2012-04-20 Pedro Alves <palves@redhat.com>
2332 * configure: Regenerate.
2334 2012-04-19 Pedro Alves <palves@redhat.com>
2336 * Makefile.in (GNULIB_BUILDDIR): New.
2337 (LIBGNU, INCGNU, GNULIB_H): Adjust.
2338 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
2339 (all, install-only, uninstall, clean-info, all-lib, clean): No
2340 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
2341 (maintainer-clean realclean distclean): Use subdir_do.
2343 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
2344 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
2345 * acinclude.m4: Include acx_configure_dir.m4.
2346 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
2347 calls. Call AC_PROG_RANLIB. Configure gnulib using
2350 (GNULIB_STDINT_H): Adjust.
2351 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
2352 * gdbreplay.c: Include build-gnulib/config.h.
2353 * server.h: Likewise.
2354 * aclocal.m4: Regenerate.
2355 * config.in: Regenerate.
2356 * configure: Regenerate.
2358 2012-04-19 Pedro Alves <palves@redhat.com>
2360 * Makefile.in (LIBGNU, INCGNU): Adjust.
2361 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
2362 (all, install-only, uninstall, clean-info, all-lib, clean)
2363 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
2364 * configure.ac: Adjust AC_OUTPUT output.
2365 * aclocal.m4: Regenerate.
2366 * configure: Regenerate.
2368 2012-04-19 Pedro Alves <palves@redhat.com>
2370 * Makefile.in (generated_files): New.
2371 (server_h): Remove the explicit dependency on config.h, and depend
2372 on $generated_files.
2374 2012-04-19 Pedro Alves <palves@redhat.com>
2376 * Makefile.in (INCGNU): Add -Ignulib.
2378 2012-04-19 Pedro Alves <palves@redhat.com>
2380 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
2381 (INCGNU): ... this, and spell out -I here.
2382 (GNULIB_LIB): Rename to ...
2384 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
2386 2012-04-19 Pedro Alves <palves@redhat.com>
2388 * config.in: Regenerate.
2390 2012-04-19 Pedro Alves <palves@redhat.com>
2392 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
2393 * server.h (memmem): Remove declaration.
2394 * config.in: Regenerate.
2395 * configure: Regenerate.
2397 2012-04-19 Yao Qi <yao@codesourcery.com>
2399 * Makefile.in (SFILES): Add common/vec.c.
2403 2012-04-19 Yao Qi <yao@codesourcery.com>
2405 * remote-utils.c (prepare_resume_reply): Replace with macro
2406 target_core_of_thread.
2407 * server.c (handle_qxfer_threads_proper): Likewise.
2408 * target.h (traget_core_of_thread): New macro.
2410 2012-04-18 Pedro Alves <palves@redhat.com>
2412 * aclocal.m4: Regenerate.
2413 * configure: Regenerate.
2415 2012-04-16 Yao Qi <yao@codesourcery.com>
2417 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
2418 duplicated on address.
2420 2012-04-16 Yao Qi <yao@codesourcery.com>
2422 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
2423 (struct tracepoint_action_ops) <send>: New field.
2424 (m_tracepoint_action_send, r_tracepoint_action_send): New.
2425 (agent_expr_send, x_tracepoint_action_send): New.
2426 (l_tracepoint_action_send): New.
2427 (cmd_qtdp): Download and install tracepoint
2428 according to `use_agent'.
2429 (run_inferior_command): Add one more parameter `len'.
2431 (tracepoint_send_agent): New.
2432 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2434 2012-04-16 Yao Qi <yao@codesourcery.com>
2436 * tracepoint.c (download_tracepoints): Moved to ...
2437 (cmd_qtstart): ... here.
2439 2012-04-14 Yao Qi <yao@codesourcery.com>
2441 * tracepoint.c: Include inttypes.h.
2442 (struct collect_memory_action): Use sized types.
2443 (struct tracepoint): Likewise.
2444 (cmd_qtdp, stop_tracing): Update print specifiers.
2445 (cmd_qtp, response_tracepoint): Likewise.
2446 (collect_data_at_tracepoint): Likewise.
2447 (collect_data_at_step): Likewise.
2449 2012-04-14 Yao Qi <yao@codesourcery.com>
2451 Import gnulib module inttypes.
2452 * aclocal.m4, config.in, configure: Regenerated.
2454 2012-04-14 Yao Qi <yao@codesourcery.com>
2456 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2457 Makefile and config.status at last.
2459 2012-04-13 Yao Qi <yao@codesourcery.com>
2461 * tracepoint.c: Include stdint.h unconditionally.
2463 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2465 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
2466 on BFD_HAVE_SYS_PROCFS_TYPE.
2467 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
2468 * configure: Regenerate.
2469 * config.in: Likewise.
2471 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
2473 * Makefile.in (clean): Also remove x32.c x32-linux.c
2474 x32-avx.c x32-avx-linux.c.
2475 (x32.o): New target.
2477 (x32-linux.o): Likewise.
2478 (x32-linux.c): Likewise.
2479 (x32-avx.o): Likewise.
2480 (x32-avx.c): Likewise.
2481 (x32-avx-linux.o): Likewise.
2482 (x32-avx-linux.c): Likewise.
2484 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
2485 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
2486 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
2487 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
2488 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
2489 i386/x32-avx-linux.xml.
2491 * linux-x86-low.c (init_registers_x32_linux): New prototype.
2492 (init_registers_x32_avx_linux): Likwise.
2493 (x86_linux_update_xmltarget): Call init_registers_x32_linux
2494 or init_registers_x32_avx_linux if linux_is_elf64 is false.
2496 2012-04-13 Pedro Alves <palves@redhat.com>
2498 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
2499 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
2500 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
2501 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
2504 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2506 * linux-x86-low.c (compat_x32_clock_t): New.
2507 (compat_x32_siginfo_t): Likewise.
2508 (compat_x32_siginfo_from_siginfo): Likewise.
2509 (siginfo_from_compat_x32_siginfo): Likewise.
2510 (linux_is_elf64): Likewise.
2511 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
2512 and siginfo_from_compat_x32_siginfo for x32.
2513 (x86_arch_setup): Set linux_is_elf64.
2515 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2518 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
2520 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
2521 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
2522 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
2523 compatible with process.
2525 2012-04-12 Yao Qi <yao@codesourcery.com>
2527 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
2528 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
2529 (install-only, install-info, clean): Handle sub dir gnulib.
2530 (all-lib, am--refresh): New targets.
2531 (memmem.o): Remove target.
2532 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
2533 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
2534 (AC_REPLACE_FUNCS): Remove memmem.
2535 Invoke gl_INIT and AM_INIT_AUTOMAKE.
2536 (AC_OUTPUT): Generate Makefile in gnulib/.
2537 * aclocal.m4, config.in, configure: Regenerated.
2539 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
2541 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
2543 2012-04-05 Pedro Alves <palves@redhat.com>
2545 -Werror=strict-aliasing
2547 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
2550 2012-04-04 Pedro Alves <palves@redhat.com>
2552 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2553 (sparc_store_gregset_from_stack, sparc_store_gregset)
2554 (sparc_breakpoint_at): Fix formatting.
2556 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2558 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
2560 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
2561 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
2562 * config.in: Regenerate.
2563 * configure: Likewise.
2565 2012-03-29 Pedro Alves <palves@redhat.com>
2567 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
2568 Correct ptrace arguments.
2570 2012-03-28 Pedro Alves <palves@redhat.com>
2572 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
2573 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
2574 (IA64_FR1_REGNUM): New defines.
2575 (ia64_fetch_register): New.
2576 (the_low_target): Install it.
2577 * linux-low.h (struct linux_target_ops) <fetch_register>: New
2579 * linux-low.c (linux_fetch_registers): Try the
2580 the_low_target.fetch_register hook first.
2582 * linux-arm-low.c (the_low_target): Adjust.
2583 * linux-bfin-low.c (the_low_target): Adjust.
2584 * linux-cris-low.c (the_low_target): Adjust.
2585 * linux-crisv32-low.c (the_low_target): Adjust.
2586 * linux-m32r-low.c (the_low_target): Adjust.
2587 * linux-m68k-low.c (the_low_target): Adjust.
2588 * linux-mips-low.c (the_low_target): Adjust.
2589 * linux-ppc-low.c (the_low_target): Adjust.
2590 * linux-s390-low.c (the_low_target): Adjust.
2591 * linux-sh-low.c (the_low_target): Adjust.
2592 * linux-sparc-low.c (the_low_target): Adjust.
2593 * linux-tic6x-low.c (the_low_target): Adjust.
2594 * linux-x86-low.c (the_low_target): Adjust.
2595 * linux-xtensa-low.c (the_low_target): Adjust.
2597 2012-03-26 Pedro Alves <palves@redhat.com>
2599 * server.c (handle_qxfer_libraries): Don't bail early if
2600 the_target->qxfer_libraries_svr4 is not NULL.
2602 2012-03-26 Pedro Alves <palves@redhat.com>
2604 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2606 2012-03-23 Pedro Alves <palves@redhat.com>
2608 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
2609 "library-list-svr4" element's start tag when the the DSO list is
2612 2012-03-23 Pedro Alves <palves@redhat.com>
2614 * linux-low.c (read_one_ptr): Read the inferior's pointer through
2615 a variable whose type size is the same as the inferior's pointer
2618 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
2620 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
2622 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
2623 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2624 * linux-low.h: Include <signal.h>.
2625 (struct siginfo): Remove forward declaration.
2626 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
2629 2012-03-21 Mike Frysinger <vapier@gentoo.org>
2631 * .gitignore: Ignore more files.
2633 2012-03-19 Pedro Alves <palves@redhat.com>
2634 Jan Kratochvil <jan.kratochvil@redhat.com>
2636 * server.c (cont_thread, general_thread): Add describing comments.
2637 (start_inferior): Clear `cont_thread'.
2638 (handle_v_cont): Don't set `cont_thread' if resuming all threads
2641 2012-03-15 Yao Qi <yao@codesourcery.com>
2643 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
2645 (cmd_qtdp): ... here.
2647 2012-03-15 Yao Qi <yao@codesourcery.com>
2649 * tracepoint.c (struct tracepoint_action_ops): New.
2650 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
2651 (m_tracepoint_action_download): New.
2652 (r_tracepoint_action_download): New.
2653 (x_tracepoint_action_download): New.
2654 (l_tracepoint_action_download): New.
2655 (add_tracepoint_action): Install `action->ops' according type.
2656 (download_tracepoint_1): Move code `download' function pointer
2657 of various tracepoint_action_ops.
2659 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2661 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
2662 linux_ptrace_attach_warnings.
2664 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2666 * Makefile.in (linux-ptrace.o): New.
2667 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
2668 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
2669 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
2670 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
2671 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
2673 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2675 2012-03-08 Yao Qi <yao@codesourcery.com>
2676 Pedro Alves <palves@redhat.com>
2678 Fix PR server/13392.
2679 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
2681 * tracepoint.c (remove_tracepoint): New.
2682 (cmd_qtdp): Call remove_tracepoint when failed to install.
2684 2012-03-07 Pedro Alves <palves@redhat.com>
2686 * linux-low.c (get_detach_signal): New.
2687 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
2688 Pass on pending signals to PTRACE_DETACH. Check the result of the
2690 * server.c (program_signals, program_signals_p): New.
2691 (handle_general_set): Handle QProgramSignals.
2692 * server.h (program_signals, program_signals_p): Declare.
2694 2012-03-05 Pedro Alves <palves@redhat.com>
2695 Jan Kratochvil <jan.kratochvil@redhat.com>
2697 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
2700 2012-03-03 Yao Qi <yao@codesourcery.com>
2702 * tracepoint.c (tracepoint_look_up_symbols): Update call to
2703 agent_look_up_symbols.
2705 2012-03-03 Yao Qi <yao@codesourcery.com>
2707 * Makefile.in (linux-low.o): Keep dependence on agent.h.
2708 (linux-x86-low.o): Likewise.
2709 * server.h: Remove in_process_agent_loaded.
2710 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
2714 2012-03-03 Yao Qi <yao@codesourcery.com>
2716 * tracepoint.c (gdb_agent_capability): New global.
2717 (in_process_agent_loaded_ust): Renamed to
2718 `in_process_agent_supports_ust'.
2720 (in_process_agent_supports_ust): Call agent_capability_check.
2721 (clear_installed_tracepoints): Assert that agent supports
2724 2012-03-03 Yao Qi <yao@codesourcery.com>
2726 * linux-low.c (linux_supports_agent): New.
2727 (linux_target_ops): Initialize field `supports_agent' with
2728 linux_supports_agent.
2729 * target.h (struct target_ops) <supports_agent>: New.
2730 (target_supports_agent): New macro.
2731 * server.c (handle_general_set): Handle packet 'QAgent'.
2732 (handle_query): Send `QAgent+'.
2733 * Makefile.in (server.o): Depends on agent.h.
2735 2012-03-03 Yao Qi <yao@codesourcery.com>
2737 * Makefile.in (OBS): Add agent.o.
2738 Add new rule for agent.o.
2739 Track dependence of tracepoint.c on agent.h.
2740 * tracepoint.c (run_inferior_command_1):
2741 (run_inferior_command): Call agent_run_command.
2742 (gdb_ust_connect_sync_socket): Deleted. Move it to
2744 (resume_thread, stop_thread): Likewise.
2745 (gdb_ust_socket_init): Renamed to ...
2746 (gdb_agent_socket_init): ... New.
2747 (gdb_ust_thread): Renamed to ...
2748 (gdb_agent_helper_thread): ... New.
2749 (gdb_ust_init): Move some code to ...
2750 (gdb_agent_init): ... here. New.
2751 [HAVE_UST]: Call gdb_ust_init.
2752 (initialize_tracepoint_ftlib): Call gdb_agent_init.
2753 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2754 * config.in, configure: Regenerated.
2756 2012-03-02 Pedro Alves <palves@redhat.com>
2758 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2759 * linux-low.c (struct simple_pid_list): New.
2760 (stopped_pids): New a struct simple_pid_list pointer.
2761 (add_to_pid_list, pull_pid_from_list): New.
2762 (handle_extended_wait): Don't assume the first signal new children
2763 report is SIGSTOP. Adjust call to pull_pid_from_list.
2764 (linux_wait_for_lwp): Adjust.
2766 2012-03-02 Yao Qi <yao@codesourcery.com>
2768 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2771 2012-03-02 Yao Qi <yao@codesourcery.com>
2773 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2774 `stop_pc' and `tpoint'. Update caller.
2776 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
2778 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2779 * linux-low.c (use_linux_regsets): New macro.
2780 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2781 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2782 (linux_register_in_regsets): New function.
2783 (usr_fetch_inferior_registers): Skip registers covered by
2785 (usr_store_inferior_registers): Likewise.
2786 (usr_fetch_inferior_registers): New macro.
2787 (usr_store_inferior_registers): Likewise.
2788 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2789 (linux_store_registers): Likewise.
2790 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2792 (init_registers_mips64_dsp_linux): Likewise.
2793 (init_registers_mips_linux): New macro.
2794 (init_registers_mips_dsp_linux): Likewise.
2795 (mips_dsp_num_regs): Likewise.
2796 (DSP_BASE, DSP_CONTROL): New fallback macros.
2797 (mips_base_regs): New macro.
2798 (mips_regmap): Use it. Fix the size.
2799 (mips_dsp_regmap): New variable.
2800 (mips_dsp_regset_bitmap): Likewise.
2801 (mips_arch_setup): New function.
2802 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2804 (mips_cannot_store_register): Likewise.
2805 (the_low_target): Update .arch_setup, .num_regs and .regmap
2806 initializers. Add .regset_bitmap initializer.
2807 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2809 * linux-bfin-low.c (the_low_target): Likewise.
2810 * linux-cris-low.c (the_low_target): Likewise.
2811 * linux-crisv32-low.c (the_low_target): Likewise.
2812 * linux-ia64-low.c (the_low_target): Likewise.
2813 * linux-m32r-low.c (the_low_target): Likewise.
2814 * linux-m68k-low.c (the_low_target): Likewise.
2815 * linux-ppc-low.c (the_low_target): Likewise.
2816 * linux-s390-low.c (the_low_target): Likewise.
2817 * linux-sh-low.c (the_low_target): Likewise.
2818 * linux-sparc-low.c (the_low_target): Likewise.
2819 * linux-tic6x-low.c (the_low_target): Likewise.
2820 * linux-x86-low.c (the_low_target): Likewise.
2821 * linux-xtensa-low.c (the_low_target): Likewise.
2822 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2823 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2824 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2826 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2827 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2829 2012-02-29 Yao Qi <yao@codesourcery.com>
2830 Pedro Alves <palves@redhat.com>
2832 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2833 `step_over_finished' is true.
2835 2012-02-27 Pedro Alves <palves@redhat.com>
2837 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2838 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2840 2012-02-27 Pedro Alves <palves@redhat.com>
2843 * linux-low.c (pid_is_stopped): New.
2844 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2846 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2848 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2851 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2853 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2855 2012-02-24 Luis Machado <lgustavo@codesourcery>
2857 * server.c (handle_query): Advertise support for target-side
2858 breakpoint condition evaluation.
2859 (process_point_options): New function.
2860 (process_serial_event): When inserting a breakpoint, check for
2861 a target-side condition that should be evaluated.
2863 * mem-break.c: Include regcache.h and ax.h.
2864 (point_cond_list_t): New data structure.
2865 (breakpoint) <cond_list>: New field.
2866 (find_gdb_breakpoint_at): Make non-static.
2867 (delete_gdb_breakpoint_at): Clear any target-side
2869 (clear_gdb_breakpoint_conditions): New function.
2870 (add_condition_to_breakpoint): Likewise.
2871 (add_breakpoint_condition): Likewise.
2872 (gdb_condition_true_at_breakpoint): Likewise.
2873 (gdb_breakpoint_here): Return result directly instead
2874 of going through a local variable.
2876 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2877 (clear_gdb_breakpoint_conditions): Likewise.
2878 (add_breakpoint_condition): Likewise.
2879 (gdb_condition_true_at_breakpoint): Likewise.
2881 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2882 (need_step_over_p): Take target-side breakpoint condition into
2885 2012-02-24 Luis Machado <lgustavo@codesourcery>
2887 * server.h: Include tracepoint.h.
2888 (agent_mem_read, agent_get_trace_state_variable_value,
2889 agent_set_trace_state_variable_value,
2890 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2891 get_set_tsv_func_addr): New prototypes.
2893 * ax.h: New include file.
2894 * ax.c: New source file.
2896 * tracepoint.c: Include ax.h.
2897 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2898 agent_expr, eval_result_type): Move to ax.h.
2899 (parse_agent_expr): Rename to ...
2900 (gdb_parse_agent_expr): ... this, make it non-static and move
2902 (unparse_agent_expr) Rename to ...
2903 (gdb_unparse_agent_expr): ... this, make it non-static and move
2905 (eval_agent_expr): Rename to ...
2906 (eval_tracepoint_agent_expr): ... this.
2907 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2908 forward declarations.
2909 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2910 (agent_get_trace_state_variable_value): New function.
2911 (agent_set_trace_state_variable_value): New function.
2912 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2913 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2914 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2915 (condition_true_at_tracepoint): Likewise.
2916 (parse_agent_expr): Rename to ...
2917 (gdb_parse_agent_expr): ... this and move to ax.c.
2918 (unparse_agent_expr): Rename to ...
2919 (gdb_unparse_agent_expr): ... this and move to ax.c.
2920 (gdb_agent_op_name): Move to ax.c.
2921 (eval_agent_expr): Rename to ...
2922 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2924 (eval_tracepoint_agent_expr): New function.
2925 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2927 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2929 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2930 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2931 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2932 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2933 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2934 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2935 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2936 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2937 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2938 (compile_bytecodes): Remove forward declaration.
2939 (is_goto_target): Move to ax.c.
2940 (compile_bytecodes): Move to ax.c and call
2941 agent_get_trace_state_variable_value (...) and
2942 agent_set_trace_state_variable_value (...).
2944 * Makefile.in: Update ax.c and IPA dependencies.
2946 2012-02-24 Pedro Alves <palves@redhat.com>
2948 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2949 (cmd_bigqtbuffer_circular): ... this. Only handle
2950 'QTBuffer:circular:'.
2951 (handle_tracepoint_general_set): Adjust.
2953 2012-02-16 Yao Qi <yao@codesourcery.com>
2955 * inferiors.c: Move code to ...
2956 * dll.c: .... here. New.
2957 * server.h: Declare clear_dlls.
2958 * Makefile.in (SFILES): Add dll.c.
2962 2012-02-11 Yao Qi <yao@codesourcery.com>
2964 * server.c: (handle_monitor_command): Add a new parameter
2966 (handle_query): Update caller.
2968 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2970 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2971 * configure, config.in: Regenerate.
2972 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2975 2012-02-02 Pedro Alves <palves@redhat.com>
2977 Try SIGKILL first, then PTRACE_KILL.
2978 * linux-low.c (linux_kill_one_lwp): New.
2979 (linux_kill_one_lwp): Rename to ...
2980 (kill_one_lwp_callback): ... this. Use the new
2983 2012-02-02 Pedro Alves <palves@redhat.com>
2985 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2988 2012-01-27 Pedro Alves <palves@redhat.com>
2990 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2991 (elf_64_file_p): Make static.
2992 (linux_pid_exe_is_elf_64_file): New.
2993 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2994 Delete declarations.
2995 (linux_pid_exe_is_elf_64_file): Declare.
2996 * linux-x86-low.c (x86_arch_setup): Use
2997 linux_pid_exe_is_elf_64_file.
2999 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3001 * linux-low.c (linux_wait_for_event_1): Rename to ...
3002 (linux_wait_for_event): ... here and merge it with former
3003 linux_wait_for_event - new variable wait_ptid, use it.
3004 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3006 2012-01-23 Pedro Alves <palves@redhat.com>
3008 * server.c (main): Avoid yet another case of infinite loop while
3009 detaching/killing after a longjmp.
3011 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3014 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3016 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3018 * hostio.c (handle_readlink): New function.
3019 (handle_vFile): Call it to handle "vFile:readlink" packets.
3021 2012-01-20 Pedro Alves <palves@redhat.com>
3022 Ulrich Weigand <ulrich.weigand@linaro.org>
3024 * server.c (handle_v_requests): Only support vAttach and vRun to
3025 start multiple processes when in extended protocol mode.
3027 2012-01-17 Pedro Alves <palves@redhat.com>
3029 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3030 memalign plus mprotect to allocate the scratch buffer.
3032 2012-01-13 Pedro Alves <palves@redhat.com>
3034 * server.c (attach_inferior): Clear `cont_thread'.
3036 2012-01-13 Pedro Alves <palves@redhat.com>
3038 * server.c (main): Avoid infinite loop while detaching/killing
3041 2012-01-09 Doug Evans <dje@google.com>
3043 * server.c (start_inferior): Set last_ptid in --wrapper case.
3045 2012-01-06 Yao Qi <yao@codesourcery.com>
3047 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3049 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3051 2012-01-04 Yao Qi <yao@codesourcery.com>
3053 * tracepoint.c (cmd_qtdp): Print debug message
3054 for static tracepoint.
3056 2012-01-04 Yao Qi <yao@codesourcery.com>
3058 * tracepoint.c (trace_vdebug): Differentiate debug message
3059 between gdbserver and IPA.
3061 2012-01-03 Yao Qi <yao@codesourcery.com>
3063 * tracepoint.c (tracepoint_was_hit): Don't collect for
3066 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3068 * terminal.h: Reformat copyright header.
3070 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3072 * server.c (gdbserver_version): Update copyright year.
3073 * gdbreplay.c (gdbreplay_version): Likewise.
3075 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3077 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3080 2011-12-18 Hui Zhu <teawater@gmail.com>
3081 * linux-low.c (linux_create_inferior): Save return value to ret.
3083 2011-12-18 Hui Zhu <teawater@gmail.com>
3085 * linux-low.c (linux_create_inferior): Save return value to ret.
3087 2011-12-16 Doug Evans <dje@google.com>
3089 * linux-low.c (linux_create_inferior): If stdio connection,
3090 redirect stdin from /dev/null, stdout to stderr.
3091 * remote-utils.c (remote_is_stdio): New static global.
3092 (remote_connection_is_stdio): New function.
3093 (remote_prepare): Handle stdio connection.
3094 (remote_open): Ditto.
3095 (remote_close): Don't close stdin for stdio connections.
3096 (read_prim,write_prim): New functions. Replace all calls to
3097 read/write to these.
3098 * server.c (main): Watch for "-" argument. Move call to
3099 remote_prepare before start_inferior.
3100 * server.h (STDIO_CONNECTION_NAME): New macro.
3101 (remote_connection_is_stdio): Declare.
3103 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3104 in debugging output.
3106 2011-12-15 Yao Qi <yao@codesourcery.com>
3108 * tracepoint.c: Include sys/syscall.h.
3109 (gdb_ust_thread): Remove preprocessor conditional.
3111 2011-12-14 Pedro Alves <pedro@codesourcery.com>
3113 * linux-low.c (linux_detach_one_lwp): Call
3114 the_low_target.prepare_to_resume before detaching.
3116 2011-12-14 Yao Qi <yao@codesourcery.com>
3118 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3121 2011-12-14 Yao Qi <yao@codesourcery.com>
3123 * i386-low.c (i386_low_stopped_data_address): Initialize local
3126 2011-12-13 Pedro Alves <pedro@codesourcery.com>
3130 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3131 DR_CONTROL unless necessary. Extend comments.
3132 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3133 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3135 2011-12-13 Yao Qi <yao@codesourcery.com>
3137 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3139 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3141 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3143 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3144 Print new debug message for such case.
3146 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3148 Fix overlapping memcpy.
3149 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3150 the read_inferior_memory transfer.
3151 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3152 write_inferior_memory transfer.
3153 (set_fast_tracepoint_jump): New variable buf. Use it for the
3154 read_inferior_memory and write_inferior_memory transfers.
3155 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3156 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3157 Use it for the write_inferior_memory transfer.
3158 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3161 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3163 * linux-low.c (fetch_register, store_register): Make code
3164 consistent, fix formatting.
3166 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3168 * linux-low.c (usr_store_inferior_registers): Factor out code
3169 to handle individual registers into...
3170 (store_register): ... this new function.
3172 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3174 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3175 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3176 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3177 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3178 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3179 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3180 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3181 (srv_xmlfiles): Add new XML files.
3183 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3185 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3186 (init_registers_s390_linux32v1): Add prototype.
3187 (init_registers_s390_linux32v2): Likewise.
3188 (init_registers_s390_linux64v1): Likewise.
3189 (init_registers_s390_linux64v2): Likewise.
3190 (init_registers_s390x_linux64v1): Likewise.
3191 (init_registers_s390x_linux64v2): Likewise.
3192 (s390_num_regs): Increment to 52.
3193 (s390_regmap): Add orig_r2 register.
3194 (s390_num_regs_3264): Increment to 68.
3195 (s390_regmap_3264): Add orig_r2 register.
3196 (s390_collect_ptrace_register): Handle orig_r2 register.
3197 (s390_supply_ptrace_register): Likewise.
3198 (s390_fill_last_break): New function.
3199 (s390_store_last_break): Likewise.
3200 (s390_fill_system_call): New function.
3201 (s390_store_system_call): Likewise.
3202 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3204 (s390_check_regset): New function.
3205 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3206 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3207 Update target_regsets for available register sets.
3209 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3210 Jan Kratochvil <jan.kratochvil@redhat.com>
3212 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3213 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3215 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3216 * linux-low.h (struct process_info_private): New member r_debug.
3217 * server.c (handle_qxfer_libraries): Call
3218 the_target->qxfer_libraries_svr4.
3219 (handle_qxfer_libraries_svr4): New function.
3220 (qxfer_packets): New entry "libraries-svr4".
3221 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3222 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3223 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3224 PACKET_qXfer_libraries_svr4.
3226 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3228 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
3229 PSW address/mask between 8-byte and 16-byte formats.
3230 (s390_supply_ptrace_register): Likewise.
3231 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
3232 basic addressing mode bit.
3234 2011-11-24 Stan Shebs <stan@codesourcery.com>
3236 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
3238 2011-11-17 Stan Shebs <stan@codesourcery.com>
3240 * tracepoint.c (struct tracepoint): New field traceframe_usage.
3241 (tracing_start_time): New global.
3242 (tracing_stop_time): New global.
3243 (tracing_user_name): New global.
3244 (tracing_notes): New global.
3245 (tracing_stop_note): New global.
3246 (cmd_qtstart): Set traceframe_usage, start_time.
3247 (stop_tracing): Set stop_time.
3248 (cmd_qtstatus): Report additional status.
3249 (cmd_qtp): New function.
3250 (handle_tracepoint_query): Call it.
3251 (cmd_qtnotes): New function.
3252 (handle_tracepoint_general_set): Call it.
3253 (get_timestamp): Rename from tsv_get_timestamp.
3255 2011-11-14 Stan Shebs <stan@codesourcery.com>
3256 Kwok Cheung Yeung <kcy@codesourcery.com>
3258 * linux-x86-low.c (small_jump_insn): New.
3259 (i386_install_fast_tracepoint_jump_pad): Add arguments for
3260 trampoline and error message, build a trampoline and issue a small
3261 jump instruction to it.
3262 (x86_install_fast_tracepoint_jump_pad): Add arguments for
3263 trampoline and error message.
3264 (x86_get_min_fast_tracepoint_insn_len): New.
3265 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
3266 * linux-low.h (struct linux_target_ops): Add arguments to
3267 install_fast_tracepoint_jump_pad operation, add new operation.
3268 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
3270 (linux_get_min_fast_tracepoint_insn_len): New function.
3271 (linux_target_op): Add new operation.
3272 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
3273 (gdb_trampoline_buffer_end): Ditto.
3274 (gdb_trampoline_buffer_error): Ditto.
3275 (struct ipa_sym_addresses): Add fields for new IPA variables.
3276 (symbol_list): Add entries for new IPA variables.
3277 (struct tracepoint): Add fields to hold the address range of the
3278 trampoline used by the tracepoint.
3279 (trampoline_buffer_head): New static variable.
3280 (trampoline_buffer_tail): Ditto.
3281 (claim_trampoline_space): New function.
3282 (have_fast_tracepoint_trampoline_buffer): New function.
3283 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
3285 (install_fast_tracepoint): Ditto, also add error buffer argument.
3286 (cmd_qtminftpilen): New function.
3287 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
3288 (fast_tracepoint_from_trampoline_address): New function.
3289 (fast_tracepoint_collecting): Handle trampoline as part of jump
3291 (set_trampoline_buffer_space): New function.
3292 (initialize_tracepoint): Initialize new IPA variables.
3293 * target.h (struct target_ops): Add arguments to
3294 install_fast_tracepoint_jump_pad operation, add new
3295 get_min_fast_tracepoint_insn_len operation.
3296 (target_get_min_fast_tracepoint_insn_len): New.
3297 (install_fast_tracepoint_jump_pad): Add arguments.
3298 * server.h (IPA_BUFSIZ): Define.
3299 * linux-i386-ipa.c: Include extra header files.
3300 (initialize_fast_tracepoint_trampoline_buffer): New function.
3301 (initialize_low_tracepoint): Call it.
3302 * server.h (set_trampoline_buffer_space): Declare.
3303 (claim_trampoline_space): Ditto.
3304 (have_fast_tracepoint_trampoline_buffer): Ditto.
3306 2011-11-14 Yao Qi <yao@codesourcery.com>
3308 * server.c (handle_query): Handle InstallInTrace for qSupported.
3309 * tracepoint.c (add_tracepoint): Sort list.
3310 (install_tracepoint, download_tracepoint): New.
3311 (cmd_qtdp): Call them to install and download tracepoints.
3312 (sort_tracepoints): Removed.
3313 (cmd_qtstart): Update.
3315 2011-11-14 Yao Qi <yao@codesourcery.com>
3317 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
3318 * mem-break.h: Declare.
3319 * tracepoint.c (cmd_qtstart): Move some code to ...
3320 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
3322 (download_tracepoints): Move some code to ...
3323 (download_tracepoint_1): ... here. New.
3325 2011-11-08 Yao Qi <yao@codesourcery.com>
3327 * remote-utils.c (relocate_instruction): A comment fix.
3329 2011-11-07 Joel Brobecker <brobecker@adacore.com>
3331 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
3332 (i386_dr_low_get_control, i386_dr_low_get_status): Use
3333 dr_status_mirror and dr_control_mirror from debug_reg_state.
3334 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
3335 (i386_initial_stuff): Remove use of deleted globals.
3336 (i386_get_thread_context, i386_set_thread_context,
3337 i386_thread_added): Use dr_status_mirror and dr_control_mirror
3338 from debug_reg_state.
3340 2011-11-05 Yao Qi <yao@codesourcery.com>
3342 * tracepoint.c (gdb_collect): Loop over tracepoints of same
3343 address as TPOINT's.
3345 2011-11-02 Stan Shebs <stan@codesourcery.com>
3347 * tracepoint.c (agent_mem_read_string): New function.
3348 (eval_agent_expr): Call it for tracenz.
3349 * server.c (handle_query): Report support for tracenz.
3351 2011-11-02 Yao Qi <yao@codesourcery.com>
3353 * tracepoint.c (cmd_qtstart): Remove unused local variables.
3355 2011-11-02 Yao Qi <yao@codesourcery.com>
3357 * target.h: Fix a typo in comment.
3359 2011-10-31 Pedro Alves <pedro@codesourcery.com>
3361 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
3362 clobber the breakpoints' shadows with fast tracepoint jumps.
3363 * mem-break.h (check_mem_write): Add `myaddr' parameter.
3364 * target.c (write_inferior_memory): Also pass MYADDR down to
3367 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
3369 * configure.ac: Check support for personality routine.
3370 * configure: Regenerate.
3371 * config.in: Likewise.
3372 * linux-low.c: Include <sys/personality.h>.
3373 Define ADDR_NO_RANDOMIZE if necessary.
3374 (linux_create_inferior): Disable address space randomization when
3375 forking inferior, if requested.
3376 (linux_supports_disable_randomization): New function.
3377 (linux_target_ops): Install it.
3378 * server.h (disable_randomization): Declare.
3379 * server.c (disable_randomization): New global variable.
3380 (handle_general_set): Handle QDisableRandomization.
3381 (handle_query): Likewise for qSupported.
3382 (main): Support --disable-randomization and --no-disable-randomization
3383 command line arguments.
3384 * target.h (struct target_ops): Add supports_disable_randomization.
3385 (target_supports_disable_randomization): New macro.
3387 2011-09-29 Mike Frysinger <vapier@gentoo.org>
3389 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
3391 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
3392 [!PT_GETDSBT] (target_loadmap): New definition.
3393 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
3394 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
3395 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
3396 and PT_GETDSBT to LINUX_LOADMAP.
3397 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
3398 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
3400 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3402 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
3403 (arm_linux_hwbp_cap): New static variable.
3404 (arm_linux_get_hwbp_cap): Replace by ...
3405 (arm_linux_init_hwbp_cap): ... this new function.
3406 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
3407 (arm_linux_get_hw_watchpoint_count): Likewise.
3408 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3409 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
3410 (arm_prepare_to_resume): Use perror_with_name instead of error.
3412 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3414 * linux-arm-low.c: Include <signal.h>.
3415 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
3416 (struct arm_linux_hwbp_cap): New data type.
3417 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
3418 (struct arm_linux_hw_breakpoint): New data type.
3419 (MAX_BPTS, MAX_WPTS): Define.
3420 (struct arch_process_info, struct arch_lwp_info): New data types.
3421 (arm_linux_get_hwbp_cap): New function.
3422 (arm_linux_get_hw_breakpoint_count): Likewise.
3423 (arm_linux_get_hw_watchpoint_count): Likewise.
3424 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3425 (arm_hwbp_control_initialize): Likewise.
3426 (arm_hwbp_control_is_enabled): Likewise.
3427 (arm_hwbp_control_is_initialized): Likewise.
3428 (arm_hwbp_control_disable): Likewise.
3429 (arm_linux_hw_breakpoint_equal): Likewise.
3430 (arm_linux_hw_point_initialize): Likewise.
3431 (struct update_registers_data): New data structure.
3432 (update_registers_callback: New function.
3433 (arm_insert_point): Likewise.
3434 (arm_remove_point): Likewise.
3435 (arm_stopped_by_watchpoint): Likewise.
3436 (arm_stopped_data_address): Likewise.
3437 (arm_new_process): Likewise.
3438 (arm_new_thread): Likewise.
3439 (arm_prepare_to_resume): Likewise.
3440 (the_low_target): Register arm_insert_point, arm_remove_point,
3441 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
3442 arm_new_thread, and arm_prepare_to_resume.
3444 2011-09-15 Stan Shebs <stan@codesourcery.com>
3446 * server.h (struct emit_ops): Add compare-goto fields.
3447 * tracepoint.c (gdb_agent_op_sizes): New table.
3448 (emit_eq_goto): New function.
3449 (emit_ne_goto): New function.
3450 (emit_lt_goto): New function.
3451 (emit_le_goto): New function.
3452 (emit_gt_goto): New function.
3453 (emit_ge_goto): New function.
3454 (is_goto_target): New function.
3455 (compile_bytecodes): Recognize special cases of compare-goto
3456 combinations and call specialized emitters for them.
3457 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3458 (amd64_emit_ne_goto): New function.
3459 (amd64_emit_lt_goto): New function.
3460 (amd64_emit_le_goto): New function.
3461 (amd64_emit_gt_goto): New function.
3462 (amd64_emit_ge_goto): New function.
3463 (amd64_emit_ops): Add the new functions.
3464 (i386_emit_eq_goto): New function.
3465 (i386_emit_ne_goto): New function.
3466 (i386_emit_lt_goto): New function.
3467 (i386_emit_le_goto): New function.
3468 (i386_emit_gt_goto): New function.
3469 (i386_emit_ge_goto): New function.
3470 (i386_emit_ops): Add the new functions.
3472 2011-09-08 Stan Shebs <stan@codesourcery.com>
3474 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
3475 (i386_emit_epilogue): Restore %ebx.
3477 2011-08-31 Jie Zhang <jzhang918@gmail.com>
3479 * server.c (step_thread): Remove definition.
3480 (process_serial_event): Don't handle Hs.
3481 * server.h (step_thread): Remove declaration.
3482 * target.c (set_desired_inferior): Remove use of step_thread.
3484 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3486 * linux-low.c: Include linux-procfs.h.
3487 (linux_attach_lwp_1): Update comments.
3488 (linux_attach): Scan for existing threads when attaching to a
3489 process that is the tgid.
3490 * Makefile.in: Update dependencies.
3492 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3494 * configure.srv: Add linux-procfs.o dependencies.
3496 2011-08-14 Yao Qi <yao@codesourcery.com>
3498 * target.h (struct target_ops): Fix indent.
3499 * win32-low.c (win32_target_ops): Fix comment.
3501 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
3502 Yao Qi <yao@codesourcery.com>
3504 * Makefile.in (clean): Remove tic6x-*.c files.
3505 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
3506 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
3507 (tic6x-c64xp-linux.c): Likewise.
3508 * configure.srv: Add support for tic6x-*-uclinux.
3509 * linux-tic6x-low.c: New.
3510 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
3512 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
3513 Yao Qi <yao@codesourcery.com>
3515 * target.h (struct target_ops): Add read_loadmap.
3516 * linux-low.c (struct target_loadseg): New type.
3517 (struct target_loadmap): New type.
3518 (linux_read_loadmap): New function.
3519 (linux_target_ops): Add linux_read_loadmap.
3520 * server.c (handle_query): Support qXfer:fdpic:read packet.
3521 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
3524 2011-08-05 Eli Zaretskii <eliz@gnu.org>
3526 * win32-low.c: Include <stdint.h>.
3528 2011-07-22 Pedro Alves <pedro@codesourcery.com>
3530 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
3531 to the inferior here.
3532 (i386_remove_aligned_watchpoint): Ditto.
3533 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
3534 fit part of the watchpoint in the debug registers.
3535 (i386_update_inferior_debug_regs): New.
3536 (i386_low_insert_watchpoint): Work on a local mirror of the debug
3537 registers, and only update the inferior on success.
3538 (i386_low_remove_watchpoint): Ditto.
3540 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
3542 * linux-low.c (compare_ints, unique, list_threads, show_process,
3543 linux_core_of_thread): Delete.
3544 (linux_target_ops): Change linux_core_of_thread to
3545 linux_common_core_of_thread.
3546 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
3547 * utils.c (malloc_failure): Change type of argument.
3548 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
3549 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
3550 common/linux-osdata.c, common/ptid.c and common/buffer.c.
3551 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
3552 (IPA_OBJS): Add common-utils-ipa.o.
3553 (ptid_h, linux_osdata_h): New macros.
3554 (server_h): Add common/common-utils.h, common/xml-utils.h,
3555 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
3557 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
3558 ptid.o, buffer.o): New rules.
3559 (linux-low.o): Add common/linux-osdata.h as a dependency.
3560 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
3561 * configure.ac: Add AC_HEADER_DIRENT check.
3562 * config.in: Regenerate.
3563 * configure: Regenerate.
3564 * remote-utils.c (xml_escape_text): Delete.
3565 (buffer_grow, buffer_free, buffer_init, buffer_finish,
3566 buffer_xml_printf): Move to common/buffer.c.
3567 * server.c (main): Remove call to initialize_inferiors.
3568 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
3569 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
3570 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
3571 internal_error, gdb_assert, gdb_assert_fail): Delete.
3572 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
3573 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
3575 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
3576 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
3577 initialize_inferiors): Delete.
3579 2011-07-20 Pedro Alves <pedro@codesourcery.com>
3581 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
3584 2011-05-31 Pedro Alves <pedro@codesourcery.com>
3586 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
3588 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
3590 2011-05-26 Yao Qi <yao@codesourcery.com>
3592 * Makefile.in (thread-db.o): Track dependence to
3593 common/gdb_thread_db.h.
3594 * thread-db.c: include gdb_thread_db.h from right place.
3596 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
3598 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
3599 __FILE__ and __LINE__ to internal_error.
3601 2011-05-13 Doug Evans <dje@google.com>
3603 * thread-db.c (try_thread_db_load_from_sdir): New function.
3604 (try_thread_db_load_from_dir): New function.
3605 (thread_db_load_search): Handle $sdir, ignore $pdir.
3606 Remove trying of system directories if search of
3607 libthread-db-search-path fails, that is now done via $sdir.
3609 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
3611 * server.c (handle_query): Add EnableDisableTracepoints to the list
3612 of supported features.
3613 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
3615 (cmd_qtenable_disable): New.
3616 (cmd_qtstart): Install tracepoints even if disabled.
3617 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
3618 receiving a QTEnable or QTDisable packet.
3619 (gdb_collect): Skip data collection if fast tracepoint is disabled.
3620 (ust_marker_to_static_tracepoint): Do not ignore disabled static
3622 (gdb_probe): Skip data collection if static tracepoint is disabled.
3624 2011-05-10 Doug Evans <dje@google.com>
3626 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
3628 2011-05-04 Doug Evans <dje@google.com>
3630 * linux-low.c (linux_join): Skip process lookup.
3631 * spu-low.c (spu_join): Ditto.
3632 * server.c (join_inferiors_callback): Delete.
3633 (process_serial_event): For 'D' packet (detach) call join_inferior
3636 2011-05-04 Joseph Myers <joseph@codesourcery.com>
3638 * README: Don't mention xscale*-*-linux*.
3639 * configure.srv (xscale*-*-linux*): Don't handle target.
3641 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
3643 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
3645 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
3646 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
3647 (i386_emit_void_call_2): Likewise.
3649 2011-04-26 Yao Qi <yao@codesourcery.com>
3651 * linux-low.c: Move common macros to linux-ptrace.h.
3652 Include linux-ptrace.h.
3653 * Makefile.in (linux_ptrace_h): New.
3654 (linux-low.o): Depends on linux-ptrace.h.
3656 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3658 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
3659 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
3660 (remote_prepare): New function with most of the TCP code from ...
3661 (remote_open): ... here. Detect PORT here unconditionally. Move also
3662 setting transport_is_reliable.
3663 * server.c (run_once): New variable.
3664 (gdbserver_usage): Document it.
3665 (main): Set run_once for `--once'. Call remote_prepare. Exit after
3666 the first run if RUN_ONCE.
3667 * server.h (run_once, remote_prepare): New declarations.
3669 2011-04-19 Tom Tromey <tromey@redhat.com>
3671 * win32-low.c (handle_load_dll): Remove duplicate "the".
3673 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
3675 Remove support for old Cygwin 1.5 versions.
3676 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
3677 function to avoid warning.
3678 (win32_add_one_solib): Use cygwin_conv_path function to avoid
3681 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
3683 * gdbserver/server.h (Macro _): Define it if not available.
3685 2011-03-14 Michael Snyder <msnyder@vmware.com>
3687 * hostio.c (handle_close): Remove unnecessary null test.
3689 2011-03-10 Joel Brobecker <brobecker@adacore.com>
3691 * Makefile.in (maintainer-clean realclean distclean): Remove
3692 "make ... subdir_do" command.
3694 2011-03-10 Michael Snyder <msnyder@vmware.com>
3696 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
3698 * server.c (handle_v_run): Free alloced buffer on early return.
3700 2011-03-09 Yao Qi <yao@codesourcery.com>
3703 2011-03-04 Yao Qi <yao@codesourcery.com>
3705 * Makefile.in: Remove GNU make feature --directory.
3707 2011-03-05 Yao Qi <yao@codesourcery.com>
3709 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3710 (subdir_do): New make target. Copied from gdb/Makefile.
3711 (maintainer-clean, realclean, distclean, clean): Call corresponding
3712 make targets in common/Makefile.
3714 2011-02-11 Yao Qi <yao@codesourcery.com>
3716 * configure.ac: Call AC_PROG_RANLIB.
3717 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3718 * configure: Regenerate.
3720 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3722 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
3724 2011-03-06 Yao Qi <yao@codesourcery.com>
3726 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
3728 2011-03-05 Yao Qi <yao@codesourcery.com>
3730 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3731 (subdir_do): New make target. Copied from gdb/Makefile.
3732 (maintainer-clean, realclean, distclean, clean): Call corresponding
3733 make targets in common/Makefile.
3735 2011-03-04 Yao Qi <yao@codesourcery.com>
3737 * Makefile.in: Remove GNU make feature --directory.
3739 2011-03-04 Michael Snyder <msnyder@vmware.com>
3741 * server.c (queue_stop_reply): Call xmalloc not malloc.
3743 2011-03-02 Michael Snyder <msnyder@vmware.com>
3745 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3747 2011-02-28 Michael Snyder <msnyder@vmware.com>
3749 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3750 (cmd_qtframe): Ditto.
3751 (cmd_qtbuffer): Ditto.
3752 (cmd_bigqtbuffer): Ditto.
3754 * utils.c (decimal2str): Initialize 'width' to nine, then
3757 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3759 * hostio.c (require_data): Free *data, not data.
3761 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3763 * hostio.c (require_data): Use free, not xfree.
3765 2011-02-27 Michael Snyder <msnyder@vmware.com>
3767 * server.c (handle_query): Discard unused value.
3769 * hostio.c (require_data): Free malloc memory before returning
3772 2011-02-26 Michael Snyder <msnyder@vmware.com>
3774 * linux-low.c (list_threads): Call closedir for dirent.
3776 2011-02-27 Michael Snyder <msnyder@vmware.com>
3778 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3779 a case statement falls through.
3781 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3783 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3786 2011-02-26 Michael Snyder <msnyder@vmware.com>
3788 * utils.c (decimal2str): Eliminate dead code and dead param.
3789 (pulongest): Drop dead param from call to decimal2str.
3792 2011-02-24 Joel Brobecker <brobecker@adacore.com>
3794 Revert the following patch (not approved yet):
3795 2011-02-21 Hui Zhu <teawater@gmail.com>
3796 * tracepoint.c (tp_printf): New function.
3797 (eval_agent_expr): Handle gdb_agent_op_printf.
3799 2011-02-21 Hui Zhu <teawater@gmail.com>
3801 * tracepoint.c (tp_printf): New function.
3802 (eval_agent_expr): Handle gdb_agent_op_printf.
3804 2011-02-18 Tom Tromey <tromey@redhat.com>
3806 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3807 (tracepoint.o): Likewise.
3808 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3809 (gdb_agent_op_names): Likewise.
3811 2011-02-18 Tom Tromey <tromey@redhat.com>
3813 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3814 gdb_agent_op_rot>: New constants.
3815 (gdb_agent_op_names): Add pick and roll.
3816 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3819 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3821 * aclocal.m4: Regenerated with aclocal-1.11.1.
3823 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3825 * server.c (handle_qxfer_traceframe_info): New.
3826 (qxfer_packets): Register "traceframe-info".
3827 (handle_query): Report support for qXfer:traceframe-info:read+.
3828 * tracepoint.c (match_blocktype): New.
3829 (traceframe_find_block_type): Rename to ...
3830 (traceframe_walk_blocks): ... this. Add callback filter argument,
3832 (traceframe_find_block_type): New, reimplemented on top of
3833 traceframe_walk_blocks.
3834 (build_traceframe_info_xml): New.
3835 (traceframe_read_info): New.
3836 * server.h (traceframe_read_info): Declare.
3838 2011-02-11 Yao Qi <yao@codesourcery.com>
3840 * configure.ac: Call AC_PROG_RANLIB.
3841 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3842 * configure: Regenerate.
3844 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3846 * server.c (gdb_read_memory): Change return semantics to allow
3848 (handle_search_memory_1): Adjust.
3849 (process_serial_event) <'m' packet>: Handle partial transfers.
3850 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3852 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3854 * regcache.c (init_register_cache): Initialize
3855 regcache->register_status.
3856 (free_register_cache): Release regcache->register_status.
3857 (regcache_cpy): Copy register_status.
3858 (registers_to_string): Print 'x's for unavailable registers.
3859 (supply_register): Mark the register's status valid or
3860 unavailable, depending on whether a buffer was passed in or not.
3861 (supply_register_zeroed): New.
3862 (supply_regblock): Mark the registers' status valid or
3863 unavailable, depending on whether a buffer was passed in or not.
3864 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3865 (struct regcache): New `register_status' field.
3866 (supply_register_zeroed): Declare.
3867 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3868 supply_register_zeroed, rather than passing a NULL buffer to
3870 * tracepoint.c (fetch_traceframe_registers): Update comment.
3872 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3874 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3877 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3879 * server.h (decode_xfer_write): Change prototype.
3880 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3881 and don't extract the annex here.
3882 * server.c (decode_xfer_read): Remove `annex' parameter,
3883 and don't extract the annex here.
3885 (struct qxfer): New.
3886 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3887 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3888 (handle_qxfer_statictrace): New functions, abstracted out from
3889 handle_query, and made to use the struct qxfer interface.
3890 (handle_threads_qxfer_proper): Rename to ...
3891 (handle_qxfer_threads_proper): ... this.
3892 (handle_threads_qxfer): Rename to ...
3893 (handle_qxfer_threads): ... this. Adjust.
3894 (qxfer_packets): New array.
3895 (handle_qxfer): New function.
3896 (handle_query): Use handle_qxfer.
3898 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3900 * gdbreplay.c: Shorten lines of >= 80 columns.
3901 * linux-low.c: Ditto.
3902 * linux-ppc-low.c: Ditto.
3903 * linux-s390-low.c: Ditto.
3904 * linux-sparc-low.c: Ditto.
3905 * linux-x86-low.c: Ditto.
3906 * linux-xtensa-low.c: Ditto.
3907 * mem-break.c: Ditto.
3909 * regcache.h: Ditto.
3910 * remote-utils.c: Ditto.
3913 * thread-db.c: Ditto.
3914 * tracepoint.c: Ditto.
3916 * win32-low.h: Ditto.
3918 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3920 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3923 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3925 * server.c (gdbserver_version): Update copyright year in version
3927 * gdbreplay.c (gdbreplay_version): Ditto.
3929 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3931 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3932 * linux-bfin-low.c: New file.
3933 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3934 PT_DATA_ADDR for BFIN targets.
3935 * Makefile.in (SFILES): Add linux-bfin-low.c.
3936 (clean): Remove reg-bfin.c.
3937 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3938 * README: Mention supported Blackfin targets.
3940 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3942 * .gitignore: New file.
3944 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3946 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3948 2010-10-22 Jie Zhang <jie@codesourcery.com>
3950 * Makefile.in: Add FLAGS_TO_PASS variable.
3951 (install): Remove dependency of install-only and recursively
3952 invoke make for install-only.
3954 2010-10-04 Doug Evans <dje@google.com>
3956 * Makefile.in (uninstall): Use $(DESTDIR).
3958 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3962 * linux-x86-low.c (compat_siginfo_from_siginfo)
3963 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3964 si_code is < 0. Check for si_code == SI_TIMER before checking for
3967 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3969 * lynx-i386-low.c: New file.
3970 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3972 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3974 * lynx-low.c (ptrace_request_to_str): Remove handling for
3975 request values that have been removed in LynxOS 5.x.
3977 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3979 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3982 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3984 * configure.ac: Add --enable-inprocess-agent option.
3985 * configure: Rebuilt.
3987 2010-09-06 Yao Qi <yao@codesourcery.com>
3989 * linux-low.c (linux_kill): Remove unused variable.
3990 (linux_stabilize_threads): Likewise.
3991 * server.c (start_inferior): Likewise.
3992 (queue_stop_reply_callback): Likewise.
3993 * tracepoint.c (do_action_at_tracepoint): Likewise.
3995 2010-09-06 Yao Qi <yao@codesourcery.com>
3997 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4000 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4002 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4004 2010-09-06 Pedro Alves <pedro@codesourcery.com>
4006 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4009 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4011 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4012 gdbserver/lynx-ppc-low.c: New files.
4013 * Makefile.in (lynx_low_h): New variable.
4014 (lynx-low.o, lynx-ppc-low.o): New rules.
4015 * configure.ac: On LynxOS, link with -lnetinet.
4016 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4017 * configure: regenerate.
4019 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4021 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4022 * configure.ac: Add check for vasprintf and vsnprintf.
4023 * configure, config.in: Regenerate.
4024 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4026 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4028 * gdbreplay.c: Move include of alloca.h up, next to include of
4030 * server.h: Add include of malloc.h.
4031 * mem-break.c: Remove include of malloc.h.
4032 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4034 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4036 * Makefile.in (memmem.o): Build with -Wno-error.
4038 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4040 * utils.c (xsnprintf): Make non-static.
4041 * server.h: Add xsnprintf declaration.
4042 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4043 replace calls to snprintf by calls to xsnprintf throughout.
4045 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4047 * configure.ac: Add configure check for alloca.
4048 * configure, config.in: Regenerate.
4049 * server.h: Include alloca.h if it exists.
4050 * gdbreplay.c: Include alloca.h if it exists.
4052 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4054 * linux-low.c (__SIGRTMIN): Define if not already defined.
4055 (linux_create_inferior): Check for __ANDROID__ rather than
4057 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4058 are already deferred.
4059 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4060 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4061 stopped and already has a pending signal to report.
4062 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4063 a pending signal to report or is moving out of a jump pad.
4064 (linux_init_signals): Check for __ANDROID__ rather than
4067 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4069 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4070 debug_threads check. Avoid a linear search when not doing debug
4073 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4075 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4076 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4077 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4078 (process_event): Change local fd's type to gdb_fildes_t.
4079 (create_file_handler): Adjust prototype.
4080 (delete_file_handler): Adjust prototype.
4081 (handle_file_event): Adjust prototype. Use pfildes.
4082 (create_file_event): Adjsut prototype.
4083 * remote-utils.c (remote_desc, listen_desc): Change type to
4085 * server.h: New gdb_fildes_t typedef.
4086 [USE_WIN32API]: Include winsock2.h.
4087 (delete_file_handler, add_file_handler): Adjust prototypes.
4089 * utils.c (pfildes): New.
4091 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4093 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4094 * configure: Regenerate.
4096 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4098 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4099 (linux_done_accessing_memory): ... this.
4100 (linux_target_ops): Adjust.
4101 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4102 * nto-low.c (nto_target_ops): Adjust comment.
4103 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4104 * spu-low.c (spu_target_ops): Adjust comment.
4105 * target.h (target_ops): Rename unprepare_to_access_memory field
4106 to done_accessing_memory.
4107 (unprepare_to_access_memory): Rename to ...
4108 (done_accessing_memory): ... this.
4110 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4112 * linux-low.c (linux_prepare_to_access_memory): New.
4113 (linux_unprepare_to_access_memory): New.
4114 (linux_target_ops): Install them.
4115 * server.c (read_memory): Rename to ...
4116 (gdb_read_memory): ... this. Use
4117 prepare_to_access_memory/prepare_to_access_memory.
4118 (write_memory): Rename to ...
4119 (gdb_write_memory): ... this. Use
4120 prepare_to_access_memory/prepare_to_access_memory.
4121 (handle_search_memory_1): Adjust.
4122 (process_serial_event): Adjust.
4123 * target.h (struct target_ops): New fields
4124 prepare_to_access_memory and unprepare_to_access_memory.
4125 (prepare_to_access_memory, unprepare_to_access_memory): New.
4126 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4127 prepare_to_access_memory/prepare_to_access_memory.
4128 * nto-low.c (nto_target_ops): Adjust.
4129 * spu-low.c (spu_target_ops): Adjust.
4130 * win32-low.c (win32_target_ops): Adjust.
4132 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4134 * Makefile.in (WARN_CFLAGS): Get it from configure.
4135 (WERROR_CFLAGS): New.
4136 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4137 * configure.ac: Introduce --enable-werror, which adds -Werror to
4138 the compiler command line. Enabled by default. Disable with
4139 --disable-werror. Add -Wdeclaration-after-statement
4140 Wpointer-arith and -Wformat-nonliteral to warning flags.
4141 * configure: Regenerate.
4143 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4145 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4147 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4149 * gdbreplay.c (remote_error): New.
4151 (expect): Use gdbchar. Check for error reading from GDB.
4152 Clarify sync error output.
4153 (play): Check for errors writing to GDB.
4154 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4155 * remote-utils.c (getpkt): Check for errors writing to the remote
4158 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4160 * linux-low.c (linux_wait_1): Move non-debugging code out of
4161 `debug_threads' control.
4163 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4165 * linux-low.c (linux_wait_1): Don't set last_status here.
4166 * server.c (push_event, queue_stop_reply_callback): Assert we're
4167 not pushing a TARGET_WAITKIND_IGNORE event.
4168 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4169 (myresume, handle_target_event): Set the thread's last_resume_kind
4170 and last_status from the target returned status.
4172 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4176 * linux-x86-low.c (update_debug_registers_callback): New.
4177 (i386_dr_low_set_addr): Use it.
4178 (i386_dr_low_get_addr): New.
4179 (i386_dr_low_set_control): Use update_debug_registers_callback.
4180 (i386_dr_low_get_control): New.
4181 (i386_dr_low_get_status): Adjust.
4182 * linux-low.c (linux_stop_lwp): New.
4183 * linux-low.h (linux_stop_lwp): Declare.
4185 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4186 argument instead of a i386_debug_reg_state.
4187 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4188 a i386_debug_reg_state.
4189 (i386_insert_aligned_watchpoint): Adjust.
4190 (i386_remove_aligned_watchpoint): Adjust.
4191 (i386_low_stopped_data_address): Read the debug registers from the
4192 inferior instead of from the mirrors.
4193 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4194 (i386_dr_low_get_addr): Declare.
4195 (i386_dr_low_get_control): Declare.
4196 (i386_dr_low_get_status): Change prototype.
4198 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4199 (i386_dr_low_get_addr): New.
4200 (i386_dr_low_get_control): New.
4201 (i386_dr_low_get_status): Adjust prototype. Return
4203 (i386_initial_stuff): Clear dr_status_mirror and
4205 (i386_get_thread_context): Adjust.
4206 (i386_set_thread_context): Adjust.
4207 (i386_thread_added): Adjust.
4209 2010-08-24 Pedro Alves <pedro@codesourcery.com>
4211 * linux-low.h (linux_thread_area): Delete declaration.
4213 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4215 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4216 after its termination.
4218 2010-08-09 Pedro Alves <pedro@codesourcery.com>
4220 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4221 (gdb_wants_all_stopped): Delete.
4222 (linux_wait_1): Don't call them.
4223 * server.c (handle_v_cont): Tag all threads as want-stopped.
4224 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4225 stopped as "client-wants-stopped".
4227 2010-07-31 Pedro Alves <pedro@codesourcery.com>
4229 * Makefile.in (signals_h): New.
4230 (server_h): Depend on it.
4231 (server.o): Don't depend on $(signals_def).
4232 (signals.o): Depend on $(signals_def).
4234 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
4236 * Makefile.in (signals_def): New.
4237 (server_h): Append include/gdb/signals.h and signals_def.
4238 (server.o): Append signals_def.
4240 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4242 * server.c (handle_target_event): Use target_signal_to_host for
4243 resume_info.sig initialization.
4244 * target.h (struct thread_resume) <sig>: New comment.
4246 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
4248 * server.c (handle_query): strcpy() the returned string from paddress()
4249 instead of sprintf().
4250 * utils.c (paddress): Return phex_nz().
4252 2010-07-07 Joel Brobecker <brobecker@adacore.com>
4254 * server.c (handle_v_cont): Call mourn_inferior if process
4256 (myresume): Likewise.
4258 2010-07-01 Pedro Alves <pedro@codesourcery.com>
4260 Static tracepoints, and integration with UST.
4262 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
4263 * mem-break.c (uninsert_all_breakpoints)
4264 (reinsert_all_breakpoints): New.
4265 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
4266 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
4267 (gdb_agent_ust_loaded, helper_thread_id)
4268 (gdb_agent_helper_thread_id): New macros.
4269 (struct ipa_sym_addresses): Add addr_ust_loaded,
4270 addr_helper_thread_id, addr_cmd_buf.
4271 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
4272 (in_process_agent_loaded_ust): New.
4273 (write_e_ust_not_loaded): New.
4274 (maybe_write_ipa_ust_not_loaded): New.
4275 (struct collect_static_trace_data_action): New.
4276 (enum tracepoint_type) <static_tracepoint>: New.
4277 (struct tracepoint) <handle>: Mention static tracepoints.
4278 (struct static_tracepoint_ctx): New.
4279 (CMD_BUF_SIZE): New.
4280 (add_tracepoint_action): Handle static tracepoint actions.
4281 (unprobe_marker_at): New.
4282 (clear_installed_tracepoints): Handle static tracepoints.
4283 (cmd_qtdp): Handle static tracepoints.
4284 (probe_marker_at): New.
4285 (cmd_qtstart): Handle static tracepoints.
4286 (response_tracepoint): Handle static tracepoints.
4287 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
4288 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
4289 (get_context_regcache): Handle static tracepoints.
4290 (do_action_at_tracepoint): Handle static tracepoint actions.
4291 (traceframe_find_block_type): Handle static trace data blocks.
4292 (traceframe_read_sdata): New.
4293 (download_tracepoints): Download static tracepoint actions.
4294 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
4295 (GDB_PROBE_NAME): New.
4300 (ust_marker_to_static_tracepoint): New.
4302 (collect_ust_data_at_tracepoint): New.
4303 (gdb_ust_probe): New.
4304 (UNIX_PATH_MAX, SOCK_DIR): New.
4305 (gdb_ust_connect_sync_socket): New.
4306 (resume_thread, stop_thread): New.
4307 (run_inferior_command): New.
4308 (init_named_socket): New.
4309 (gdb_ust_socket_init): New.
4310 (cstr_to_hexstr): New.
4312 (first_marker, next_marker): New.
4313 (response_ust_marker): New.
4314 (cmd_qtfstm, cmd_qtsstm): New.
4315 (unprobe_marker_at, probe_marker_at): New.
4316 (cmd_qtstmat, gdb_ust_thread): New.
4317 (gdb_ust_init): New.
4318 (initialize_tracepoint_ftlib): Call gdb_ust_init.
4319 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
4321 (x86_64_st_collect_regmap): New.
4322 (X86_64_NUM_ST_COLLECT_GREGS): New.
4323 (AMD64_RIP_REGNUM): New.
4324 (supply_static_tracepoint_registers): New.
4325 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
4327 (i386_st_collect_regmap): New.
4328 (i386_NUM_ST_COLLECT_GREGS): New.
4329 (supply_static_tracepoint_registers): New.
4330 * server.c (handle_query): Handle qXfer:statictrace:read.
4331 <qSupported>: Report support for StaticTracepoints, and
4332 qXfer:statictrace:read features.
4333 * server.h (traceframe_read_sdata)
4334 (supply_static_tracepoint_registers): Declare.
4335 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
4336 (unpack_varlen_hex): Include in IPA build.
4337 * Makefile.in (ustlibs, ustinc): New.
4338 (IPA_OBJS): Add remote-utils-ipa.o.
4339 ($(IPA_LIB)): Link -ldl and -lpthread.
4341 (IPAGENT_CFLAGS): Add UST_CFLAGS.
4342 * config.in, configure: Regenerate.
4344 2010-06-20 Ian Lance Taylor <iant@google.com>
4345 Pedro Alves <pedro@codesourcery.com>
4347 * linux-x86-low.c (always_true): Delete.
4348 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
4349 trying to fool the compiler with always_true.
4351 2010-06-20 Pedro Alves <pedro@codesourcery.com>
4353 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
4354 conditions in gdbserver.
4356 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
4358 * spu-low.c (spu_read_memory): Wrap around local store limit.
4359 (spu_write_memory): Likewise.
4361 2010-06-15 Pedro Alves <pedro@codesourcery.com>
4363 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
4364 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
4366 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
4368 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
4369 uses with LONGEST uses.
4371 2010-06-14 Stan Shebs <stan@codesourcery.com>
4372 Pedro Alves <pedro@codesourcery.com>
4376 * linux-x86-low.c: Include limits.h.
4381 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
4382 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
4383 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
4384 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
4385 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
4386 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
4387 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
4388 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
4389 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
4390 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
4391 (amd64_emit_void_call_2): New.
4392 (amd64_emit_ops): New.
4393 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
4394 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
4395 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
4396 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
4397 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
4398 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
4399 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
4400 (i386_emit_call, i386_emit_reg, i386_emit_pop)
4401 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
4402 (i386_emit_stack_adjust, i386_emit_int_call_1)
4403 (i386_emit_void_call_2): New.
4404 (i386_emit_ops): New.
4405 (x86_emit_ops): New.
4406 (the_low_target): Install x86_emit_ops.
4407 * server.h (struct emit_ops): New.
4408 (get_raw_reg_func_addr): Declare.
4409 (current_insn_ptr, emit_error): Declare.
4410 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
4411 (set_trace_state_variable_value): New defines.
4412 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
4413 addr_get_trace_state_variable_value and
4414 addr_set_trace_state_variable_value.
4415 (symbol_list): New fields for get_raw_reg,
4416 get_trace_state_variable_value and set_trace_state_variable_value.
4417 (condfn): New typedef.
4418 (struct tracepoint): New field `compiled_cond'.
4419 (do_action_at_tracepoint): Clear compiled_cond.
4420 (get_trace_state_variable_value, set_trace_state_variable_value):
4422 (condition_true_at_tracepoint): If there's a compiled condition,
4424 (current_insn_ptr, emit_error): New globals.
4425 (struct bytecode_address): New.
4426 (get_raw_reg_func_addr): New.
4427 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
4428 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
4429 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
4430 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
4431 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
4432 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
4433 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
4434 (compile_tracepoint_condition, compile_bytecodes): New.
4435 * target.h (emit_ops): Forward declare.
4436 (struct target_ops): New field emit_ops.
4437 (target_emit_ops): New.
4438 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
4439 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
4440 * linux-low.c (linux_emit_ops): New.
4441 (linux_target_ops): Install it.
4442 * linux-low.h (struct linux_target_ops): New field emit_ops.
4444 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
4446 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4447 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4449 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4450 Stan Shebs <stan@codesourcery.com>
4452 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4453 (all): Depend on $(extra_libraries).
4454 (install-only): Install the IPA.
4455 (IPA_OBJS, IPA_LIB): New.
4456 (clean): Remove the IPA lib.
4457 (IPAGENT_CFLAGS): New.
4458 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
4459 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
4460 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
4461 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
4462 * configure.ac: Check for atomic builtins support in the compiler.
4463 (IPA_DEPFILES, extra_libraries): Define.
4464 * configure.srv (ipa_obj): Add description.
4465 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
4466 (i[34567]86-*-linux*): Set ipa_obj.
4467 (x86_64-*-linux*): Set ipa_obj.
4468 * linux-low.c (stabilizing_threads): New.
4469 (supports_fast_tracepoints): New.
4470 (linux_detach): Stabilize threads before detaching.
4471 (handle_tracepoints): Handle internal tracing breakpoints. Assert
4472 the lwp is either not stabilizing, or is moving out of a jump pad.
4473 (linux_fast_tracepoint_collecting): New.
4474 (maybe_move_out_of_jump_pad): New.
4475 (enqueue_one_deferred_signal): New.
4476 (dequeue_one_deferred_signal): New.
4477 (linux_wait_for_event_1): If moving out of a jump pad, defer
4478 pending signals to later.
4479 (linux_stabilize_threads): New.
4480 (linux_wait_1): Check if threads need moving out of jump pads, and
4482 (stuck_in_jump_pad_callback): New.
4483 (move_out_of_jump_pad_callback): New.
4485 (linux_resume_one_lwp): Handle moving out of jump pads.
4486 (linux_set_resume_request): Dequeue deferred signals.
4487 (need_step_over_p): Also step over fast tracepoint jumps.
4488 (start_step_over): Also uninsert fast tracepoint jumps.
4489 (finish_step_over): Also reinsert fast tracepoint jumps.
4490 (linux_install_fast_tracepoint_jump): New.
4491 (linux_target_ops): Install linux_stabilize_threads and
4492 linux_install_fast_tracepoint_jump_pad.
4493 * linux-low.h (linux_target_ops) <get_thread_area,
4494 install_fast_tracepoint_jump_pad>: New fields.
4495 (struct lwp_info) <collecting_fast_tracepoint,
4496 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
4497 (linux_get_thread_area): Declare.
4498 * linux-x86-low.c (jump_insn): New.
4499 (x86_get_thread_area): New.
4500 (append_insns): New.
4502 (amd64_install_fast_tracepoint_jump_pad): New.
4503 (i386_install_fast_tracepoint_jump_pad): New.
4504 (x86_install_fast_tracepoint_jump_pad): New.
4505 (the_low_target): Install x86_get_thread_area and
4506 x86_install_fast_tracepoint_jump_pad.
4507 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
4508 (struct fast_tracepoint_jump): New.
4509 (fast_tracepoint_jump_insn): New.
4510 (fast_tracepoint_jump_shadow): New.
4511 (find_fast_tracepoint_jump_at): New.
4512 (fast_tracepoint_jump_here): New.
4513 (delete_fast_tracepoint_jump): New.
4514 (set_fast_tracepoint_jump): New.
4515 (uninsert_fast_tracepoint_jumps_at): New.
4516 (reinsert_fast_tracepoint_jumps_at): New.
4517 (set_breakpoint_at): Use write_inferior_memory.
4518 (uninsert_raw_breakpoint): Use write_inferior_memory.
4519 (check_mem_read): Mask out fast tracepoint jumps.
4520 (check_mem_write): Mask out fast tracepoint jumps.
4521 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
4522 (set_fast_tracepoint_jump): Declare.
4523 (delete_fast_tracepoint_jump)
4524 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
4525 (reinsert_fast_tracepoint_jumps_at): Declare.
4526 * regcache.c: Don't compile many functions when building the
4527 in-process agent library.
4528 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
4529 the register buffer in the heap.
4530 (free_register_cache): If the register buffer isn't owned by the
4531 regcache, don't free it.
4532 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
4533 pre-existing register caches.
4534 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
4536 (convert_ascii_to_int): : Constify `from' parameter type.
4537 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
4538 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
4539 the needed buffer in-place.
4540 (relocate_instruction): New.
4541 * server.c (handle_query) <qSymbols>: If the target supports
4542 tracepoints, give it a chance of looking up symbols. Report
4543 support for fast tracepoints.
4544 (handle_status): Stabilize threads.
4545 (process_serial_event): Adjust.
4546 * server.h (struct fast_tracepoint_jump): Forward declare.
4547 (struct process_info) <fast_tracepoint_jumps>: New field.
4548 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
4549 (decode_X_packet, decode_M_packet): Adjust.
4550 (relocate_instruction): Declare.
4551 (in_process_agent_loaded): Declare.
4552 (tracepoint_look_up_symbols): Declare.
4553 (struct fast_tpoint_collect_status): Declare.
4554 (fast_tracepoint_collecting): Declare.
4555 (force_unlock_trace_buffer): Declare.
4556 (handle_tracepoint_bkpts): Declare.
4557 (initialize_low_tracepoint)
4558 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
4559 * target.h (struct target_ops) <stabilize_threads,
4560 install_fast_tracepoint_jump_pad>: New fields.
4561 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
4562 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
4563 [HAVE_STDINT_H]: Include stdint.h.
4564 (trace_debug_1): Rename to ...
4565 (trace_vdebug): ... this.
4566 (trace_debug): Rename to ...
4567 (trace_debug_1): ... this. Add `level' parameter.
4569 (ATTR_USED, ATTR_NOINLINE): New.
4570 (IP_AGENT_EXPORT): New.
4571 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4572 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
4573 (about_to_request_buffer_space, trace_buffer_is_full)
4574 (stopping_tracepoint, expr_eval_result, error_tracepoint)
4575 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
4576 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
4577 (traceframe_write_count, traceframes_created)
4578 (trace_state_variables)
4579 New renaming defines.
4580 (struct ipa_sym_addresses): New.
4581 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
4583 (ipa_sym_addrs): New.
4584 (all_tracepoint_symbols_looked_up): New.
4585 (in_process_agent_loaded): New.
4586 (write_e_ipa_not_loaded): New.
4587 (maybe_write_ipa_not_loaded): New.
4588 (tracepoint_look_up_symbols): New.
4589 (debug_threads) [IN_PROCESS_AGENT]: New.
4590 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
4591 (UNKNOWN_SIDE_EFFECTS): New.
4592 (stop_tracing): New.
4593 (flush_trace_buffer): New.
4594 (stop_tracing_bkpt): New.
4595 (flush_trace_buffer_bkpt): New.
4596 (read_inferior_integer): New.
4597 (read_inferior_uinteger): New.
4598 (read_inferior_data_pointer): New.
4599 (write_inferior_data_pointer): New.
4600 (write_inferior_integer): New.
4601 (write_inferior_uinteger): New.
4602 (struct collect_static_trace_data_action): Delete.
4603 (enum tracepoint_type): New.
4604 (struct tracepoint) <type>: New field `type'.
4605 <actions_str, step_actions, step_actions_str>: Only include in
4607 <orig_size, obj_addr_on_target, adjusted_insn_addr>
4608 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
4609 (tracepoints): Use IP_AGENT_EXPORT.
4610 (last_tracepoint): Don't include in the IPA.
4611 (stopping_tracepoint): Use IP_AGENT_EXPORT.
4612 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
4613 (alloced_trace_state_variables): New.
4614 (trace_state_variables): Use IP_AGENT_EXPORT.
4615 (traceframe_t): Delete unused variable.
4616 (circular_trace_buffer): Don't include in the IPA.
4617 (trace_buffer_start): Delete.
4618 (struct trace_buffer_control): New.
4619 (trace_buffer_free): Delete.
4620 (struct ipa_trace_buffer_control): New.
4621 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
4622 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
4624 (trace_buffer_ctrl): New.
4625 (TRACE_BUFFER_CTRL_CURR): New.
4626 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
4627 Reimplement as macros.
4628 (trace_buffer_wrap): Delete.
4629 (traceframe_write_count, traceframe_read_count)
4630 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
4631 (struct tracepoint_hit_ctx) <type>: New field.
4632 (struct fast_tracepoint_ctx): New.
4633 (memory_barrier): New.
4635 (record_tracepoint_error): Update atomically in the IPA.
4636 (clear_inferior_trace_buffer): New.
4637 (about_to_request_buffer_space): New.
4638 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
4639 updating the same buffer.
4640 (add_tracepoint): Default the tracepoint's type to trap
4641 tracepoint, and orig_size to -1.
4642 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
4644 (create_trace_state_variable): New parameter `gdb'. Handle it.
4645 (clear_installed_tracepoints): Clear fast tracepoint jumps.
4646 (cmd_qtdp): Handle fast tracepoints.
4648 (max_jump_pad_size): New.
4649 (gdb_jump_pad_head): New.
4650 (get_jump_space_head): New.
4651 (claim_jump_space): New.
4652 (sort_tracepoints): New.
4653 (MAX_JUMP_SIZE): New.
4654 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
4656 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
4657 support. Upload fast traceframes, and delete internal IPA
4659 (stop_tracing_handler): New.
4660 (flush_trace_buffer_handler): New.
4661 (cmd_qtstop): Upload fast tracepoints.
4662 (response_tracepoint): Handle fast tracepoints.
4663 (tracepoint_finished_step): Upload fast traceframes. Set the
4664 tracepoint hit context's tracepoint type.
4665 (handle_tracepoint_bkpts): New.
4666 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
4667 type. Add comment about fast tracepoints.
4668 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
4669 non-existing action_str field.
4670 (get_context_regcache): Handle fast tracepoints.
4671 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
4673 (fast_tracepoint_from_jump_pad_address): New.
4674 (fast_tracepoint_from_ipa_tpoint_address): New.
4675 (collecting_t): New.
4676 (force_unlock_trace_buffer): New.
4677 (fast_tracepoint_collecting): New.
4680 (write_inferior_data_ptr): New.
4681 (target_tp_heap): New.
4682 (target_malloc): New.
4683 (download_agent_expr): New.
4685 (download_tracepoints): New.
4686 (download_trace_state_variables): New.
4687 (upload_fast_traceframes): New.
4688 (IPA_FIRST_TRACEFRAME): New.
4689 (IPA_NEXT_TRACEFRAME_1): New.
4690 (IPA_NEXT_TRACEFRAME): New.
4691 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
4692 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
4693 (gdb_jump_pad_buffer_end): New.
4694 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
4695 (initialize_tracepoint): Adjust.
4696 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
4697 buffer. Initialize the low module.
4698 * utils.c (PREFIX, TOOLNAME): New.
4699 (malloc_failure): Use PREFIX.
4700 (error): In the IPA, an error causes an exit.
4701 (fatal, warning): Use PREFIX.
4702 (internal_error): Use TOOLNAME.
4703 (NUMCELLS): Increase to 10.
4704 * configure, config.in: Regenerate.
4706 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4708 * server.c (handle_query) <qSupported>: Do two passes over the
4709 qSupported string to avoid nesting strtok.
4711 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4713 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
4715 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
4717 * configure: Regenerate.
4718 * proc-service.list: New.
4720 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4722 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
4725 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
4727 * gdbreplay.c (remote_open): Check error return from socket() call by
4728 its equality to -1 not by it being negative.
4729 * remote-utils.c (remote_open): Likewise.
4731 2010-05-23 Pedro Alves <pedro@codesourcery.com>
4733 * config.h: Regenerate.
4735 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4737 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4738 doesn't provide PTRACE_GET_THREAD_AREA.
4740 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4742 * linux-m68k-low.c: Include <asm/ptrace.h>
4743 (ps_get_thread_area): Implement.
4745 2010-05-03 Doug Evans <dje@google.com>
4747 * event-loop.c (struct callback_event): New struct.
4748 (callback_list): New global.
4749 (append_callback_event, delete_callback_event): New functions.
4750 (process_callback): New function.
4751 (start_event_loop): Call it.
4752 * remote-utils.c (NOT_SCHEDULED): Define.
4753 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4754 moved out of readchar.
4755 (readchar): Rewrite. Call reschedule before returning.
4756 (reset_readchar): New function.
4757 (remote_close): Call it.
4758 (process_remaining, reschedule): New functions.
4759 * server.h (callback_handler_func): New typedef.
4760 (append_callback_event, delete_callback_event): Declare.
4762 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4764 * proc-service.c (ps_pglobal_lookup): Use
4765 thread_db_look_up_one_symbol.
4766 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4767 parameter. Use it instead of all_symbols_looked_up.
4768 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4770 (all_symbols_looked_up): Don't declare.
4771 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4772 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4774 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4775 Set all_symbols_looked_up here.
4776 (thread_db_look_up_one_symbol): New.
4777 (thread_db_get_tls_address): Adjust.
4778 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4779 thread_db object on the heap, and tentatively set it in the
4781 (thread_db_init): Don't set all_symbols_looked_up here.
4782 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4784 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4786 * linux-low.c (linux_kill, linux_detach): Adjust.
4787 (status_pending_p_callback): Remove redundant statement. Check
4788 for !TARGET_WAITIKIND_IGNORE, instead of
4789 TARGET_WAITKIND_STOPPED.
4790 (handle_tracepoints): Make sure LWP is locked. Adjust.
4791 (linux_wait_for_event_1): Adjust.
4792 (linux_cancel_breakpoints): New.
4793 (unsuspend_one_lwp): New.
4794 (unsuspend_all_lwps): New.
4795 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4796 (send_sigstop_callback): Change return type to int, add new
4797 `except' parameter and handle it.
4798 (suspend_and_send_sigstop_callback): New.
4799 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4800 pass them down. If SUSPEND, also increment the lwp's suspend
4802 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4803 (need_step_over_p): Don't consider suspended LWPs.
4804 (start_step_over): Adjust.
4805 (proceed_one_lwp): Change return type to int, add new `except'
4806 parameter and handle it.
4807 (unsuspend_and_proceed_one_lwp): New.
4808 (proceed_all_lwps): Use find_inferior instead of
4810 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4811 also decrement the suspend count of LWPs. Pass `except' down,
4812 instead of hacking its suspend count.
4813 (linux_pause_all): Add `freeze' parameter. Adjust.
4814 (linux_unpause_all): New.
4815 (linux_target_ops): Install linux_unpause_all.
4816 * server.c (handle_status): Adjust.
4817 * target.h (struct target_ops): New fields `unpause_all' and
4818 `cancel_breakpoints'. Add new parameter to `pause_all'.
4819 (pause_all): Add new `freeze' parameter.
4821 (cancel_breakpoints): New.
4822 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4824 (cmd_qtstart): Pause threads.
4825 (stop_tracing): Pause threads, and cancel breakpoints.
4826 * win32-low.c (win32_target_ops): Adjust.
4828 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4830 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4831 the inferior right away from here...
4832 (linux_wait_1): ... to here, and adjust to check the thread's
4833 last_resume_kind instead of the lwp's step or stop_expected flags.
4835 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4837 * README: Use consistent `GDB' and `GDBserver' spellings.
4839 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4841 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4842 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4843 (linux_detach_one_lwp): Assume the lwp is stopped.
4844 (any_thread_of): Delete.
4845 (linux_detach): Stop all lwps here. Don't blindly delete all
4847 (delete_lwp_callback): New.
4848 (linux_mourn): Delete all lwps of the process that is gone.
4849 (linux_wait_1): Don't delete the last lwp of the process here.
4850 * mem-break.h (mark_breakpoints_out): Declare.
4851 * mem-break.c (mark_breakpoints_out): New.
4852 (free_all_breakpoints): Use it.
4853 * server.c (handle_target_event): If the process is gone, mark
4855 * thread-db.c (struct thread_db) <create_bp>: New field.
4856 (thread_db_enable_reporting): Fix prototype. Store a thread event
4857 breakpoint reference in the thread_db struct.
4858 (thread_db_load_search): Clear the thread_db object.
4859 (try_thread_db_load_1): Ditto.
4860 (switch_to_process): New.
4861 (disable_thread_event_reporting): Use it.
4862 (remove_thread_event_breakpoints): New.
4863 (thread_db_detach, thread_db_mourn): Use it.
4865 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4867 * linux-low.c (linux_enable_event_reporting): New.
4868 (linux_wait_for_event_1, handle_extended_wait): Use it.
4870 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4872 * linux-low.c (linux_kill_one_lwp, linux_kill)
4873 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4874 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4875 SIGSTOP even if the LWP is stopped.
4876 (send_sigstop_callback): New.
4877 (stop_all_lwps): Use send_sigstop_callback instead.
4878 (linux_resume_one_thread): Adjust.
4879 (proceed_one_lwp): Still proceed an LWP that the client has
4880 requested to stop, if we haven't reported it as stopped yet. Make
4881 sure that LWPs the client want stopped, have a pending SIGSTOP.
4883 2010-04-26 Doug Evans <dje@google.com>
4885 * server.c (handle_general_set): Make static.
4887 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4888 Print received char after testing for error/eof instead of before.
4889 (input_interrupt): Tweak comment.
4891 2010-04-23 Doug Evans <dje@google.com>
4893 * server.c (start_inferior): Print inferior argv if --debug.
4895 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4897 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4898 * nto-x86-low.c: Include server.h
4900 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4902 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4903 be consistent with other sources of this directory.
4904 (init_registers_amd64): Correct name of source file of this function
4907 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4909 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4912 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4914 * win32-i386-low.c: Add 64-bit support.
4915 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4916 (init_registers_amd64): Declare.
4917 (mappings): Add 64-bit version of array.
4918 (init_windows_x86): New function.
4919 (the_low_target): Change init_arch field to init_windows_x86.
4921 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4923 * win32-low.c: Adapt to support also 64-bit architecture.
4924 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4925 (get_image_name): Use SIZE_T type for local variable `done'.
4926 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4927 (toolhelp_get_dll_name): Idem.
4928 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4929 Use uintptr_t typecast to avoid warning.
4930 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4931 (handle_exception): Use phex_nz to avoid warning.
4932 (win32_wait): Remove unused local variable `process'.
4934 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4936 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4939 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4941 * configure.ac: Use `ws2_32' library for srv_mingw.
4942 * configure: Regenerate.
4943 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4944 * remote-utils.c: Likewise.
4946 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4948 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4949 if __x86_64__ is defined.
4951 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4953 * configure: Regenerate.
4955 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4957 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4958 * target.h (target_ops): New get_tib_address field.
4959 * win32-low.h (win32_thread_info): Add thread_local_base field.
4960 * win32-low.c (child_add_thread): Add tlb argument.
4961 Set thread_local_base field to TLB.
4962 (get_child_debug_event): Adapt to child_add_thread change.
4963 (win32_get_tib_address): New function.
4964 (win32_target_ops): Set get_tib_address field to
4965 win32_get_tib_address.
4966 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4968 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4970 * linux-low.c (linux_mourn): Also remove the process.
4971 * server.c (handle_target_event): Don't remove the process here.
4972 * nto-low.c (nto_mourn): New.
4973 (nto_target_ops): Install it.
4974 * spu-low.c (spu_mourn): New.
4975 (spu_target_ops): Install it.
4976 * win32-low.c (win32_mourn): New.
4977 (win32_target_ops): Install it.
4979 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4981 * server.h (buffer_xml_printf): Remove redundant `;'.
4983 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4985 * regcache.c (set_register_cache): Invalidate regcaches before
4986 changing the register cache layout.
4987 (regcache_invalidate_one): Allow a NULL regcache.
4988 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4989 regcaches before changing the register cache layout or the target
4992 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4994 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4995 variable warning on Linux/x86-64.
4997 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4999 GDBserver disconnected tracing support.
5001 * linux-low.c (linux_remove_process): Delete.
5002 (add_lwp): Don't set last_resume_kind here.
5003 (linux_kill): Use `mourn'.
5004 (linux_detach): Use `thread_db_detach', and `mourn'.
5006 (linux_attach_lwp_1): Adjust comment.
5007 (linux_attach): last_resume_kind moved the thread_info; adjust.
5008 (status_pending_p_callback): Adjust.
5009 (linux_wait_for_event_1): Adjust.
5010 (count_events_callback, select_singlestep_lwp_callback)
5011 (select_event_lwp_callback, cancel_breakpoints_callback)
5012 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5013 (proceed_one_lwp): Adjust.
5014 (linux_async): Add debug output.
5015 (linux_thread_stopped): New.
5016 (linux_pause_all): New.
5017 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5019 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5020 (thread_db_free): Delete declaration.
5021 (thread_db_detach, thread_db_mourn): Declare.
5022 * thread-db.c (thread_db_init): Use thread_db_mourn.
5023 (thread_db_free): Delete, split in two.
5024 (disable_thread_event_reporting): New.
5025 (thread_db_detach): New.
5026 (thread_db_mourn): New.
5028 * server.h (struct thread_info) <last_resume_kind>: New field.
5029 <attached>: Add comment.
5030 <gdb_detached>: New field.
5031 (handler_func): Change return type to int.
5032 (handle_serial_event, handle_target_event): Ditto.
5033 (gdb_connected): Declare.
5035 (disconnected_tracing): Declare.
5036 (stop_tracing): Declare.
5038 * server.c (handle_query) <qSupported>: Report support for
5039 disconnected tracing.
5040 (queue_stop_reply_callback): Account for running threads.
5041 (gdb_wants_thread_stopped): New.
5042 (gdb_wants_all_threads_stopped): New.
5043 (gdb_reattached_process): New.
5044 (handle_status): Clear the `gdb_detached' flag of all processes.
5045 In all-stop, stop all threads.
5046 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5047 (process_serial_event): If the remote connection breaks, or if an
5048 exit was forced with "monitor exit", force an event loop exit.
5049 Handle disconnected tracing on detach.
5050 (handle_serial_event): Adjust.
5051 (handle_target_event): If GDB isn't connected, forward events back
5052 to the inferior, unless the last process exited, in which case,
5053 exit gdbserver. Adjust interface.
5055 * remote-utils.c (remote_open): Don't block in accept. Instead
5056 register an event loop source on the listen socket file
5057 descriptor. Refactor bits into ...
5058 (listen_desc): ... this new global.
5059 (gdb_connected): ... this new function.
5060 (enable_async_notification): ... this new function.
5061 (handle_accept_event): ... this new function.
5062 (remote_close): Clear remote_desc.
5064 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5066 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5068 (mourn_inferior): Define.
5069 (target_process_qsupported): Avoid the dangling else problem.
5070 (thread_stopped): Define.
5071 (pause_all): Define.
5072 (target_waitstatus_to_string): Declare.
5073 * target.c (target_waitstatus_to_string): New.
5075 * tracepoint.c (tracing): Make extern.
5076 (disconnected_tracing): New.
5077 (stop_tracing): Make extern. Handle tracing stops due to GDB
5079 (cmd_qtdisconnected): New.
5080 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5081 (handle_tracepoint_general_set): Handle QTDisconnected.
5083 * event-loop.c (event_handler_func): Change return type to int.
5084 (process_event): Bail out if the event handler wants the event
5086 (handle_file_event): Ditto.
5087 (start_event_loop): Bail out if the event handler wants the event
5090 * nto-low.c (nto_target_ops): Adjust.
5091 * spu-low.c (spu_wait): Don't remove the process here.
5092 (spu_target_ops): Adjust.
5093 * win32-low.c (win32_wait): Don't remove the process here.
5094 (win32_target_ops): Adjust.
5096 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5098 * regcache.c (realloc_register_cache): Invalidate inferior's
5099 regcache before recreating it.
5101 2010-04-09 Pedro Alves <pedro@codesourcery.com>
5103 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5105 2010-04-09 Stan Shebs <stan@codesourcery.com>
5106 Pedro Alves <pedro@codesourcery.com>
5108 * server.h (LONGEST): New.
5109 (struct thread_info) <while_stepping>: New field.
5110 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5112 (initialize_tracepoint, handle_tracepoint_general_set)
5113 (handle_tracepoint_query, tracepoint_finished_step)
5114 (tracepoint_was_hit, release_while_stepping_state_list):
5115 (current_traceframe): Declare.
5116 * server.c (handle_general_set): Handle tracepoint packets.
5118 (write_memory): New.
5119 (handle_search_memory_1): Use read_memory.
5120 (handle_query): Report support for conditional tracepoints, trace
5121 state variables, and tracepoint sources. Handle tracepoint
5123 (main): Initialize the tracepoints module.
5124 (process_serial_event): Handle traceframe reads/writes.
5126 * linux-low.c (handle_tracepoints): New.
5127 (linux_wait_1): Call it.
5128 (linux_resume_one_lwp): Handle while-stepping.
5129 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5130 (linux_target_ops): Install them.
5131 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5133 * linux-x86-low.c (x86_supports_tracepoints): New.
5134 (the_low_target). Install it.
5136 * mem-break.h (delete_breakpoint): Declare.
5137 * mem-break.c (delete_breakpoint): Make external.
5139 * target.h (struct target_ops): Add `supports_tracepoints',
5140 `read_pc', and `write_pc' fields.
5141 (target_supports_tracepoints): Define.
5142 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5145 * regcache.h (struct regcache) <registers_owned>: New field.
5146 (init_register_cache, regcache_cpy): Declare.
5147 (regcache_read_pc, regcache_write_pc): Declare.
5148 (register_cache_size): Declare.
5149 (supply_regblock): Declare.
5150 * regcache.c (init_register_cache): New.
5151 (new_register_cache): Use it.
5152 (regcache_cpy): New.
5153 (register_cache_size): New.
5154 (supply_regblock): New.
5155 (regcache_read_pc, regcache_write_pc): New.
5157 * tracepoint.c: New.
5159 * Makefile.in (OBS): Add tracepoint.o.
5160 (tracepoint.o): New rule.
5162 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5164 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5166 (i386-mmx.c): Likewise.
5167 (i386-mmx-linux.o): Likewise.
5168 (i386-mmx-linux.c): Likewise.
5170 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5171 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5172 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5173 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5175 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5176 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5177 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5179 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5181 * Makefile.in (clean): Updated.
5183 (i386-avx.c): Likewise.
5184 (i386-avx-linux.o): Likewise.
5185 (i386-avx-linux.c): Likewise.
5186 (amd64-avx.o): Likewise.
5187 (amd64-avx.c): Likewise.
5188 (amd64-avx-linux.o): Likewise.
5189 (amd64-avx-linux.c): Likewise.
5191 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5192 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5193 (srv_amd64_regobj): Add amd64-avx.o.
5194 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5195 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5196 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5197 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5198 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5199 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5200 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5202 * i387-fp.c: Include "i386-xstate.h".
5204 (i387_cache_to_xsave): Likewise.
5205 (i387_xsave_to_cache): Likewise.
5206 (x86_xcr0): Likewise.
5208 * i387-fp.h (i387_cache_to_xsave): Likewise.
5209 (i387_xsave_to_cache): Likewise.
5210 (x86_xcr0): Likewise.
5212 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5213 * linux-crisv32-low.c (target_regsets): Likewise.
5214 * linux-m68k-low.c (target_regsets): Likewise.
5215 * linux-mips-low.c (target_regsets): Likewise.
5216 * linux-ppc-low.c (target_regsets): Likewise.
5217 * linux-s390-low.c (target_regsets): Likewise.
5218 * linux-sh-low.c (target_regsets): Likewise.
5219 * linux-sparc-low.c (target_regsets): Likewise.
5220 * linux-xtensa-low.c (target_regsets): Likewise.
5222 * linux-low.c: Include <sys/uio.h>.
5223 (regsets_fetch_inferior_registers): Support nt_type.
5224 (regsets_store_inferior_registers): Likewise.
5225 (linux_process_qsupported): New.
5226 (linux_target_ops): Add linux_process_qsupported.
5228 * linux-low.h (regset_info): Add nt_type.
5229 (linux_target_ops): Add process_qsupported.
5231 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
5233 (init_registers_i386_avx_linux): New.
5234 (init_registers_amd64_avx_linux): Likewise.
5235 (xmltarget_i386_linux_no_xml): Likewise.
5236 (xmltarget_amd64_linux_no_xml): Likewise.
5237 (PTRACE_GETREGSET): Likewise.
5238 (PTRACE_SETREGSET): Likewise.
5239 (x86_fill_xstateregset): Likewise.
5240 (x86_store_xstateregset): Likewise.
5241 (use_xml): Likewise.
5242 (x86_linux_update_xmltarget): Likewise.
5243 (x86_linux_process_qsupported): Likewise.
5244 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
5245 (x86_arch_setup): Don't call init_registers_amd64_linux nor
5246 init_registers_i386_linux here. Call
5247 x86_linux_update_xmltarget.
5248 (the_low_target): Add x86_linux_process_qsupported.
5250 * server.c (handle_query): Call target_process_qsupported.
5252 * target.h (target_ops): Add process_qsupported.
5253 (target_process_qsupported): New.
5255 2010-04-03 Pedro Alves <pedro@codesourcery.com>
5257 * inferiors.c (add_thread): Set last_status kind to
5258 TARGET_WAITKIND_IGNORE.
5259 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
5260 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
5261 (linux_wait_1): Move `thread' local definition to block that uses
5262 it. Don't NULL initialize `event_child'.
5263 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
5264 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
5265 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
5267 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5269 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
5270 an extended waitstatus, or by a watchpoint.
5271 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
5272 thread was stepping or has been stopped by a watchpoint.
5274 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5276 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
5277 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
5278 of another, then delete the previous, and validate all
5280 (validate_inserted_breakpoint): New.
5281 (delete_disabled_breakpoints): New.
5282 (validate_breakpoints): New.
5283 (check_mem_read): Validate breakpoints before trusting their
5284 shadow. Delete disabled breakpoints.
5285 (check_mem_write): Validate breakpoints before trusting they
5286 should be inserted. Delete disabled breakpoints.
5287 * mem-break.h (validate_breakpoints):
5288 * server.c (handle_query): Validate breakpoints when we see a
5291 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5293 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
5294 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
5295 if we could tell there's a GDB breakpoint at stop_pc.
5296 (need_step_over_p): Don't do a step over if we find a GDB
5297 breakpoint at the resume PC.
5299 * mem-break.c (struct raw_breakpoint): New.
5300 (enum bkpt_type): New type `gdb_breakpoint'.
5301 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
5302 fields. New field `raw'.
5303 (find_raw_breakpoint_at): New.
5304 (set_raw_breakpoint_at): Handle refcounting. Create a raw
5306 (set_breakpoint_at): Adjust.
5307 (delete_raw_breakpoint): New.
5308 (release_breakpoint): New.
5309 (delete_breakpoint): Rename to...
5310 (delete_breakpoint_1): ... this. Add proc parameter. Use
5311 release_breakpoint. Return ENOENT.
5312 (delete_breakpoint): Reimplement.
5313 (find_breakpoint_at): Delete.
5314 (find_gdb_breakpoint_at): New.
5315 (delete_breakpoint_at): Delete.
5316 (set_gdb_breakpoint_at): New.
5317 (delete_gdb_breakpoint_at): New.
5318 (gdb_breakpoint_here): New.
5319 (set_reinsert_breakpoint): Use release_breakpoint.
5320 (uninsert_breakpoint): Rename to ...
5321 (uninsert_raw_breakpoint): ... this.
5322 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
5323 (reinsert_raw_breakpoint): Change parameter type to
5325 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
5327 (check_breakpoints): Adjust. Use release_breakpoint.
5328 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
5329 (breakpoint_inserted_here): Ditto.
5330 (check_mem_read): Adjust to iterate over raw breakpoints instead.
5331 Don't trust the breakpoint's shadow if it is not inserted.
5332 (check_mem_write): Adjust to iterate over raw breakpoints instead.
5333 (delete_all_breakpoints): Adjust.
5334 (free_all_breakpoints): Mark all breakpoints as uninserted, and
5335 use delete_breakpoint_1.
5337 * mem-break.h (breakpoints_supported): Delete declaration.
5338 (set_gdb_breakpoint_at): Declare.
5339 (gdb_breakpoint_here): Declare.
5340 (delete_breakpoint_at): Delete.
5341 (delete_gdb_breakpoint_at): Declare.
5343 * server.h (struct raw_breakpoint): Forward declare.
5344 (struct process_info): New field `raw_breakpoints'.
5346 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
5349 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5351 * linux-low.c (status_pending_p_callback): Fix comment.
5352 (linux_wait_for_event_1): Move most of the internal breakpoint
5353 handling from here...
5354 (linux_wait_1): ... to here.
5355 (count_events_callback): New.
5356 (select_singlestep_lwp_callback): New.
5357 (select_event_lwp_callback): New.
5358 (cancel_breakpoints_callback): New.
5359 (select_event_lwp): New.
5360 (linux_wait_1): Simplify internal breakpoint handling. Give equal
5361 priority to all LWPs that have had events that should be reported
5362 to the client. Cancel breakpoints when about to reporting the
5363 event to the client, not while stopping lwps. No longer cancel
5364 finished single-steps here.
5365 (cancel_finished_single_step): Delete.
5366 (cancel_finished_single_steps): Delete.
5368 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5370 * mem-break.c (enum bkpt_type): New.
5371 (struct breakpoint): New field `type'.
5372 (set_breakpoint_at): Change return type to struct breakpoint
5373 pointer. Set type to `other_breakpoint' by default.
5374 (delete_breakpoint): Rewrite, supporting more than one breakpoint
5375 in the breakpoint list.
5376 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
5377 (reinsert_breakpoint): Rename to ...
5378 (reinsert_raw_breakpoint): ... this.
5379 (reinsert_breakpoints_at): Adjust.
5380 * mem-break.h (struct breakpoint): Declare.
5381 (set_breakpoint_at): Change return type to struct breakpoint
5384 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5386 * server.c (handle_query): Assign, not compare.
5388 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5390 Teach linux gdbserver to step-over-breakpoints.
5392 * linux-low.c (can_hardware_single_step): New.
5393 (supports_breakpoints): New.
5394 (handle_extended_wait): If stopping threads, read the stop pc of
5397 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
5398 low target doesn't support retrieving the PC.
5399 (add_lwp): Set last_resume_kind to resume_continue.
5400 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
5401 (linux_attach): Don't clear stop_expected. Set the lwp's
5402 last_resume_kind to resume_stop.
5403 (linux_detach_one_lwp): Don't check for removed breakpoints.
5404 (check_removed_breakpoint): Delete.
5405 (status_pending_p): Rename to ...
5406 (status_pending_p_callback): ... this. Don't check for removed
5407 breakpoints. Don't consider threads that are stopped from GDB's
5409 (linux_wait_for_lwp): Always read the stop_pc here.
5410 (cancel_breakpoint): New.
5411 (step_over_bkpt): New global.
5412 (linux_wait_for_event_1): Implement stepping over breakpoints.
5413 (gdb_wants_lwp_stopped): New.
5414 (gdb_wants_all_stopped): New.
5415 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
5416 single-step traps here. Store the thread's last reported target
5418 (send_sigstop): Don't clear stop_expected. Always set it,
5420 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
5421 (cancel_finished_single_step): New.
5422 (cancel_finished_single_steps): New.
5423 (wait_for_sigstop): Don't cancel finished single-step traps here.
5424 (linux_resume_one_lwp): Don't check for removed breakpoints.
5425 Don't set `step' on non-hardware step archs.
5426 (linux_set_resume_request): Ignore resume_stop requests if already
5427 stopping or stopped. Set the lwp's last_resume_kind.
5428 (resume_status_pending_p): Don't check for removed breakpoints.
5429 (need_step_over_p): New.
5430 (start_step_over): New.
5431 (finish_step_over): New.
5432 (linux_resume_one_thread): Always queue a sigstop for resume_stop
5433 requests. Clear the thread's last reported target waitstatus.
5434 Don't use the `suspended' flag. Don't consider pending breakpoints.
5435 (linux_resume): Start a step-over if necessary.
5436 (proceed_one_lwp): New.
5437 (proceed_all_lwps): New.
5438 (unstop_all_lwps): New.
5439 * linux-low.h (struct lwp_info): Rewrite comment for the
5440 `suspended' flag. Add the `stop_pc' field. Delete the
5441 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
5442 Add `'last_resume_kind' and `need_step_over' fields.
5443 * inferiors.c (struct thread_info): Delete, moved elsewhere.
5444 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
5445 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
5446 (set_raw_breakpoint_at): New.
5447 (set_breakpoint_at): Rewrite to use it.
5448 (reinsert_breakpoint_handler): Delete.
5449 (set_reinsert_breakpoint): New.
5450 (reinsert_breakpoint_by_bp): Delete.
5451 (delete_reinsert_breakpoints): New.
5452 (uninsert_breakpoint): Rewrite.
5453 (uninsert_breakpoints_at): New.
5454 (reinsert_breakpoint): Rewrite.
5455 (reinsert_breakpoints_at): New.
5456 (check_breakpoints): Rewrite.
5457 (breakpoint_here): New.
5458 (breakpoint_inserted_here): New.
5459 (check_mem_read): Adjust.
5460 * mem-break.h (breakpoints_supported, breakpoint_here)
5461 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
5462 (reinsert_breakpoint_by_bp): Delete declaration.
5463 (delete_reinsert_breakpoints): Declare.
5464 (reinsert_breakpoint): Delete declaration.
5465 (reinsert_breakpoints_at): Declare.
5466 (uninsert_breakpoint): Delete declaration.
5467 (uninsert_breakpoints_at): Declare.
5468 (check_breakpoints): Adjust prototype.
5469 * server.h: Adjust include order.
5470 (struct thread_info): Declare here. Add a `last_status' field.
5472 2010-03-23 Michael Snyder <msnyder@vmware.com>
5474 * server.c (crc32): New function.
5475 (handle_query): Add handling for 'qCRC:' request.
5477 2010-03-23 Pedro Alves <pedro@codesourcery.com>
5479 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
5480 lwp had been stopped by a watchpoint.
5482 2010-03-16 Pedro Alves <pedro@codesourcery.com>
5484 * server.h (internal_error): Declare.
5485 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
5486 * utils.c (internal_error): New function.
5488 2010-03-15 Andreas Schwab <schwab@redhat.com>
5490 * configure.srv: Fix typo setting srv_regobj.
5492 2010-03-15 Pedro Alves <pedro@codesourcery.com>
5494 * linux-low.c (fetch_register): Avoid passing a non string literal
5496 (usr_store_inferior_registers): Ditto.
5498 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5500 * linux-low.c (linux_write_memory): Bail out early if peeking
5503 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5505 * linux-low.h (struct lwp_info): New fields
5506 `stopped_by_watchpoint' and `stopped_data_address'.
5507 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
5508 here, and cache them in the lwp object.
5509 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
5511 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
5513 (linux_stopped_by_watchpoint): Rewrite.
5514 (linux_stopped_data_address): Rewrite.
5516 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
5518 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
5519 switching the current inferior, not before.
5521 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
5523 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
5524 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
5525 i386-linux.c and amd64-linux.c.
5526 (reg-i386.o): Removed.
5527 (reg-i386.c): Likewise.
5528 (reg-i386-linux.o): Likewise.
5529 (reg-i386-linux.c): Likewise.
5530 (reg-x86-64.o): Likewise.
5531 (reg-x86-64.c): Likewise.
5532 (reg-x86-64-linux.o): Likewise.
5533 (reg-x86-64-linux.c): Likewise.
5536 (i386-linux.o): Likewise.
5537 (i386-linux.c): Likewise.
5538 (amd64.o): Likewise.
5539 (amd64.c): Likewise.
5540 (amd64-linux.o): Likewise.
5541 (amd64-linux.c): Likewise.
5543 * configure.srv (srv_i386_regobj): New.
5544 (srv_i386_linux_regobj): Likewise.
5545 (srv_amd64_regobj): Likewise.
5546 (srv_amd64_linux_regobj): Likewise.
5547 (srv_i386_32bit_xmlfiles): Likewise.
5548 (srv_i386_64bit_xmlfiles): Likewise.
5549 (srv_i386_xmlfiles): Likewise.
5550 (srv_amd64_xmlfiles): Likewise.
5551 (srv_i386_linux_xmlfiles): Likewise.
5552 (srv_amd64_linux_xmlfiles): Likewise.
5553 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
5554 srv_xmlfiles to $srv_i386_xmlfiles.
5555 (i[34567]86-*-mingw32ce*): Likewise.
5556 (i[34567]86-*-mingw*): Likewise.
5557 (i[34567]86-*-nto*): Likewise.
5558 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
5559 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
5560 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
5561 (x86_64-*-linux*): Likewise.
5563 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
5564 (init_registers_amd64_linux): New.
5565 (x86_arch_setup): Replace init_registers_x86_64_linux with
5566 init_registers_amd64_linux.
5568 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
5570 * configure.ac: Check for libdl. If it is not available link against
5571 static libthread_db.
5572 * configure: Regenerate.
5574 2010-02-22 Pedro Alves <pedro@codesourcery.com>
5578 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
5579 handing a read watchpoint.
5580 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
5582 2010-02-12 Doug Evans <dje@google.com>
5584 * linux-low.c (linux_supports_tracefork_flag): Document.
5585 (linux_look_up_symbols): Add comment.
5587 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
5589 * regcache.c (supply_register): Clear regcache if buf is NULL.
5591 2010-02-02 Nicolas Roche <roche@sourceware.org>
5592 Joel Brobecker <brobecker@adacore.com>
5594 * inferiors.c (find_inferior): Add function documentation.
5595 (unloaded_dll): Handle the case where the unloaded dll has not
5596 been previously registered in the dll list.
5598 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5600 * linux-arm-low.c (thumb_breakpoint_len): Delete.
5601 (thumb2_breakpoint): New.
5602 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
5604 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5606 * linux-low.c (get_stop_pc): Check for SIGTRAP.
5607 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
5610 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5612 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
5614 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5616 * linux-s390-low.c (s390_collect_ptrace_register)
5617 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
5619 2010-01-21 Doug Evans <dje@google.com>
5621 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
5622 (PTRACE_ARG4_TYPE): New macro.
5623 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
5624 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
5625 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
5626 (usr_store_inferior_registers): Ditto.
5627 (linux_read_memory, linux_write_memory): Ditto.
5628 (linux_test_for_tracefork): Ditto.
5630 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
5631 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
5633 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5635 * proc-service.c (ps_lgetregs): Don't refetch registers from the
5638 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5640 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
5641 prototype to take a regcache. Adjust.
5643 2010-01-20 Pedro Alves <pedro@codesourcery.com>
5645 * regcache.h (struct thread_info): Forward declare.
5646 (struct regcache): New.
5647 (new_register_cache): Adjust prototype.
5648 (get_thread_regcache): Declare.
5649 (free_register_cache): Adjust prototype.
5650 (registers_to_string, registers_from_string): Ditto.
5651 (supply_register, supply_register_by_name, collect_register)
5652 (collect_register_as_string, collect_register_by_name): Ditto.
5653 * regcache.c (struct inferior_regcache_data): Delete.
5654 (get_regcache): Rename to ...
5655 (get_thread_regcache): ... this. Adjust. Switch inferior before
5657 (regcache_invalidate_one): Adjust.
5658 (regcache_invalidate): Fix prototype.
5659 (new_register_cache): Return the new register cache.
5660 (free_register_cache): Change prototype.
5661 (realloc_register_cache): Adjust.
5662 (registers_to_string): Change prototype to take a regcache. Adjust.
5663 (registers_from_string): Ditto.
5664 (register_data): Ditto.
5665 (supply_register): Ditto.
5666 (supply_register_by_name): Ditto.
5667 (collect_register): Ditto.
5668 (collect_register_as_string): Ditto.
5669 (collect_register_by_name): Ditto.
5670 * server.c (process_serial_event): Adjust.
5671 * linux-low.h (regset_fill_func, regset_store_func): Change
5673 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
5675 * linux-low.c (get_stop_pc): Adjust.
5676 (check_removed_breakpoint): Adjust.
5677 (linux_wait_for_event): Adjust.
5678 (linux_resume_one_lwp): Adjust.
5679 (fetch_register): Add regcache parameter. Adjust.
5680 (usr_store_inferior_registers): Ditto.
5681 (regsets_fetch_inferior_registers): Ditto.
5682 (regsets_store_inferior_registers): Ditto.
5683 (linux_fetch_registers, linux_store_registers): Ditto.
5684 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
5686 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
5688 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
5689 prototype to take a regcache.
5690 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
5691 * remote-utils.c (convert_ascii_to_int, outreg)
5692 (prepare_resume_reply): Change prototype to take a regcache.
5694 * target.h (struct target_ops) <fetch_registers, store_registers>:
5695 Change prototype to take a regcache.
5696 (fetch_inferior_registers, store_inferior_registers): Change
5697 prototype to take a regcache. Adjust.
5698 * proc-service.c (ps_lgetregs): Adjust.
5699 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
5700 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
5701 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
5702 take a regcache. Adjust.
5703 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
5704 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5705 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
5706 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
5707 * linux-cris-low.c (cris_get_pc, cris_set_pc)
5708 (cris_cannot_fetch_register):
5709 (cris_breakpoint_at): Change prototype to take a regcache.
5711 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
5712 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
5713 to take a regcache. Adjust.
5714 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
5716 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
5717 take a regcache. Adjust.
5718 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
5719 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
5720 (m68k_set_pc): Change prototype to take a regcache. Adjust.
5721 * linux-mips-low.c (mips_get_pc):
5722 (mips_set_pc): Change prototype to take a regcache. Adjust.
5723 (mips_reinsert_addr): Adjust.
5724 (mips_collect_register): Change prototype to take a regcache.
5726 (mips_supply_register):
5727 (mips_collect_register_32bit, mips_supply_register_32bit)
5728 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5729 (mips_store_fpregset): Ditto.
5730 * linux-ppc-low.c (ppc_supply_ptrace_register)
5731 (ppc_supply_ptrace_register): Ditto.
5732 (parse_spufs_run): Adjust.
5733 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
5734 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5735 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5736 take a regcache. Adjust.
5737 * linux-s390-low.c (s390_collect_ptrace_register)
5738 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5739 (s390_set_pc): Change prototype to take a regcache. Adjust.
5740 (s390_arch_setup): Adjust.
5741 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5742 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
5743 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5744 (sparc_fill_gregset, sparc_store_gregset_from_stack)
5745 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5747 (sparc_breakpoint_at): Adjust.
5748 * linux-xtensa-low.c (xtensa_fill_gregset):
5749 (xtensa_store_gregset):
5750 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5751 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
5752 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5753 prototype to take a regcache. Adjust.
5754 * win32-arm-low.c (arm_fetch_inferior_register)
5755 (arm_store_inferior_register): Change prototype to take a
5757 * win32-i386-low.c (i386_fetch_inferior_register)
5758 (i386_store_inferior_register): Change prototype to take a
5760 * win32-low.c (child_fetch_inferior_registers)
5761 (child_store_inferior_registers): Change prototype to take a
5763 (win32_wait): Adjust.
5764 (win32_fetch_inferior_registers): Change prototype to take a
5766 (win32_store_inferior_registers): Adjust.
5767 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5768 store_inferior_register>: Change prototype to take a regcache.
5770 2010-01-20 Doug Evans <dje@google.com>
5772 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5774 (linux_wait_for_event1, linux_init_signals): Ditto.
5775 (W_STOPCODE): Provide definition if missing.
5777 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5779 * linux-low.c (linux_core_of_thread): New.
5780 (compare_ints, show_process, list_threads): New.
5781 (linux_qxfer_osdata): Report threads and cores.
5782 (linux_target_op): Register linux_core_of_thread.
5783 * remote-utils.c (prepare_resume_reply): Report the core.
5784 (buffer_xml_printf): Support %d specifier.
5785 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5787 (handle_query): Handle qXfer:threads. Announce availability
5789 * target.h (struct target_ops): New field core_of_thread.
5791 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5793 * Makefile.in (clean): Remove new generated files.
5794 (reg-s390.o, reg-s390.c): Remove rules.
5795 (reg-s390x.o, reg-s390x.c): Likewise.
5796 (s390-linux32.o, s390-linux32.c): Add rules.
5797 (s390-linux64.o, s390-linux64.c): Likewise.
5798 (s390x-linux64.o, s390x-linux64.c): Likewise.
5799 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5800 * linux-s390-low.c: Include <elf.h>.
5801 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5802 (init_registers_s390): Remove prototype.
5803 (init_registers_s390x): Likewise.
5804 (init_registers_s390_linux32): Add prototype.
5805 (init_registers_s390_linux64): Likewise.
5806 (init_registers_s390x_linux64): Likewise.
5807 (s390_num_regs_3264): New define.
5808 (s390_regmap_3264): New global variable.
5809 (s390_cannot_fetch_register): Remove obsolete check.
5810 (s390_cannot_store_register): Likewise.
5811 (s390_collect_ptrace_register): Handle upper/lower register halves.
5812 (s390_supply_ptrace_register): Likewise.
5813 (s390_fill_gregset): Update to register number changes.
5814 (s390_get_hwcap): New routine.
5815 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5816 Install appropriate regmap and register set.
5818 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5820 * server.c (gdbserver_version): Update copyright year to 2010.
5821 * gdbreplay.c (gdbreplay_version): Likewise.
5823 2009-12-28 Doug Evans <dje@google.com>
5825 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5826 elf/external.h. Include <elf.h> instead but only if necessary.
5828 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5830 * linux-low.c (linux_remove_process): Remove `detaching'
5831 parameter. Don't release/detach from thread_db here.
5832 (linux_kill): Release/detach from thread_db here, ...
5833 (linux_detach): ... and here, before actually detaching.
5834 (linux_wait_1): ... and here, when a process exits.
5835 * thread-db.c (any_thread_of): New.
5836 (thread_db_free): Switch the current inferior to a thread of the
5839 2009-12-21 Doug Evans <dje@google.com>
5841 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5843 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5844 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5845 warning ifndef __NR_tkill. Move setting of errno there too.
5846 Delete unnecessary resetting of errno after syscall.
5847 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5849 * configure.ac: Check for dladdr.
5850 * config.in: Regenerate.
5851 * configure: Regenerate.
5852 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5853 (try_thread_db_load): Update.
5855 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5857 2009-12-18 Doug Evans <dje@google.com>
5859 * event-loop.c: Include unistd.h if it exists.
5861 * linux-low.c (my_waitpid): Move definition away from being in
5862 between linux_tracefork_child/linux_test_for_tracefork.
5864 * gdb_proc_service.h (psaddr_t): Fix type.
5865 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5866 signature to match glibc.
5868 2009-12-16 Doug Evans <dje@google.com>
5870 * linux-low.c (linux_read_memory): Fix argument to read.
5872 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5874 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5875 events, don't leave current_inferior pointing at null.
5877 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5879 * win32-low.c (LOG): Delete.
5880 (OUTMSG): Output to stderr.
5881 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5882 on compile time LOG macro.
5883 (win32_wait): Fix debug output.
5885 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5887 * win32-low.c (win32_add_one_solib): If the dll name is
5888 "ntdll.dll", prepend the system directory to the dll path.
5890 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5892 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5894 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5895 Vladimir Prus <vladimir@codesourcery.com>
5897 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5898 * configure.ac: Check for __mcoldfire__ and set
5899 gdb_cv_m68k_is_coldfire.
5900 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5901 reg-cf.o and reg-m68k.o.
5902 * configure: Regenerated.
5904 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5906 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5907 Pass it to thread_db_free.
5908 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5909 proper `detaching' argument to linux_remove_process.
5910 * linux-low.h (thread_db_free): Add `detaching' parameter.
5911 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5913 (thread_db_free): Add `detaching' parameter. Only
5914 call td_ta_clear_event if detaching from process.
5916 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5918 * thread-db.c (thread_db_free): Fix typo.
5920 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5923 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5925 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5927 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5928 with an i686 compiler.
5929 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5931 * configure: Rebuilt.
5933 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5937 * server.c (handle_search_memory_1): Correct read_addr initialization
5938 in loop for searching subsequent chunks.
5940 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5942 * configure.ac: New --with-libthread-db option.
5943 * thread-db.c: Allow direct dependence on libthread_db.
5944 (thread_db_free): Adjust.
5945 * config.in: Regenerate.
5946 * configure: Likewise.
5948 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5951 * thread-db.c (attach_thread): New function.
5952 (maybe_attach_thread): Return success/failure.
5953 (find_new_threads_callback): Adjust.
5954 (thread_db_find_new_threads): Loop until no new threads.
5956 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5958 * proc-service.c (ps_lgetregs): Formatting.
5960 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5962 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5963 * configure.ac: Adjust.
5964 * linux-low.h (struct process_info_private): Move members to struct
5966 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5967 * linux-low.c (linux_remove_process): Adjust.
5968 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5969 * server.c (handle_query): Move code ...
5970 (handle_monitor_command): ... here. New function.
5971 * target.h (struct target_ops): New member.
5972 * thread-db.c (struct thread_db): New.
5973 (libthread_db_search_path): New variable.
5974 (thread_db_create_event, thread_db_enable_reporting)
5975 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5976 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5977 (try_thread_db_load_1, dladdr_to_soname): New functions.
5978 (try_thread_db_load, thread_db_load_search): New functions.
5979 (thread_db_init): Search for libthread_db.
5980 (thread_db_free): New function.
5981 (thread_db_handle_monitor_command): Likewise.
5982 * config.in: Regenerate.
5983 * configure: Regenerate.
5985 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5987 * spu-low.c (spu_kill): Wait for inferior to terminate.
5988 Call clear_inferiors.
5989 (spu_detach): Call clear_inferiors.
5991 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5993 * aclocal.m4: Regenerate.
5994 * config.in: Likewise.
5995 * configure: Likewise.
5997 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5999 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6000 (parse_spufs_run): New function.
6001 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6002 (ppc_breakpoint_at): Handle SPU breakpoints.
6004 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6006 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6007 (SPUFS_MAGIC): Define.
6008 (spu_enumerate_spu_ids): New function.
6009 (linux_qxfer_spu): New function.
6010 (linux_target_ops): Install linux_qxfer_spu.
6012 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6014 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6015 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6016 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6017 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6018 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6019 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6020 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6021 (init_registers_powerpc_cell32l): Add prototype.
6022 (init_registers_powerpc_cell64l): Likewise.
6023 (ppc_arch_setup): Detect Cell/B.E. architecture.
6025 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6027 * Makefile.in (datarootdir): New variable.
6029 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6031 * linux-low.c (linux_write_memory): Update debugging output.
6032 * Makefile.in (clean): Add new descriptions.
6033 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6034 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6035 * configure.srv: Add new files for arm*-*-linux*.
6036 * linux-arm-low.c: Add new declarations.
6037 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6038 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6039 (HWCAP_VFPv3D16): New.
6040 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6041 instead of __IWMMXT__.
6042 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6043 (arm_arch_setup): New.
6044 (target_regsets): Remove #ifdef. Add VFP regset.
6045 (the_low_target): Use arm_arch_setup.
6047 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6049 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6050 the main thread again.
6052 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6054 Adding Neutrino gdbserver.
6055 * configure: Regenerated.
6056 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6057 * configure.srv (i[34567]86-*-nto*): New target.
6058 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6059 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6060 (nto_comctrl) [__QNX__]: New function.
6061 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6063 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
6065 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6068 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6069 Pedro Alves <pedro@codesourcery.com>
6071 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6072 don't support CONTEXT_EXTENDED_REGISTERS.
6073 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6074 (the_low_target): Install them.
6075 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6076 failing with ERROR_PIPE_NOT_CONNECTED.
6078 2009-06-30 Doug Evans <dje@google.com>
6079 Pierre Muller <muller@ics.u-strasbg.fr>
6081 Add h/w watchpoint support to x86-linux, win32-i386.
6082 * Makefile.in (SFILES): Add i386-low.c
6083 (i386_low_h): Define.
6084 (i386-low.o): Add dependencies.
6085 (linux-x86-low.o): Add i386-low.h dependency.
6086 (win32-i386-low.o): Ditto.
6087 * i386-low.c: New file.
6088 * i386-low.h: New file.
6089 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6090 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6091 * linux-low.c (linux_add_process): Initialize arch_private.
6092 (linux_remove_process): Free arch_private.
6093 (add_lwp): Initialize arch_private.
6094 (delete_lwp): Free arch_private.
6095 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6097 * linux-low.h (process_info_private): New member arch_private.
6098 (lwp_info): New member arch_private.
6099 (linux_target_ops): New members new_process, new_thread,
6101 (ptid_of): New macro.
6102 * linux-x86-low.c: Include stddef.h, i386-low.h.
6103 (arch_process_info): New struct.
6104 (arch_lwp_info): New struct.
6105 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6106 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6107 (i386_dr_low_get_status): New function.
6108 (x86_insert_point, x86_remove_point): New functions.
6109 (x86_stopped_by_watchpoint): New function.
6110 (x86_stopped_data_address): New function.
6111 (x86_linux_new_process, x86_linux_new_thread): New functions.
6112 (x86_linux_prepare_to_resume): New function.
6113 (the_low_target): Add entries for insert_point, remove_point,
6114 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6116 * server.c (debug_hw_points): New global.
6117 (monitor_show_help): Document set debug-hw-points.
6118 (handle_query): Process "set debug-hw-points".
6119 * server.h (debug_hw_points): Declare.
6120 (paddress): Declare.
6121 * utils.c (NUMCELLS, CELLSIZE): New macros.
6122 (get_sell, xsnprintf, paddress): New functions.
6123 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6124 remove_point, stopped_by_watchpoint, stopped_data_address.
6125 * win32-i386-low.c: Include i386-low.h.
6126 (debug_reg_state): Replaces dr.
6127 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6128 (i386_dr_low_get_status): New function.
6129 (i386_insert_point, i386_remove_point): New functions.
6130 (i386_stopped_by_watchpoint): New function.
6131 (i386_stopped_data_address): New function.
6132 (i386_initial_stuff): Update.
6133 (get_thread_context,set_thread_context,i386_thread_added): Update.
6134 (the_low_target): Add entries for insert_point,
6135 remove_point, stopped_by_watchpoint, stopped_data_address.
6136 * win32-low.c (win32_insert_watchpoint): New function.
6137 (win32_remove_watchpoint): New function.
6138 (win32_stopped_by_watchpoint): New function.
6139 (win32_stopped_data_address): New function.
6140 (win32_target_ops): Add entries for insert_watchpoint,
6141 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6142 * win32-low.h (win32_target_ops): New members insert_point,
6143 remove_point, stopped_by_watchpoint, stopped_data_address.
6145 2009-06-25 Pedro Alves <pedro@codesourcery.com>
6147 * server.c (process_serial_event): Re-return unsupported, not
6148 error, if the type isn't recognized. Re-allow supporting only
6149 insert or remove packets. Also call require_running for
6150 breakpoints. Add missing break statement to default case. Tidy.
6151 * target.h (struct target_ops): Rename insert_watchpoint to
6152 insert_point, and remove_watchpoint to remove_point.
6154 * linux-low.h (struct linux_target_ops): Likewise.
6155 * linux-low.c (linux_insert_watchpoint): Rename to ...
6156 (linux_insert_point): ... this. Adjust.
6157 (linux_remove_watchpoint): Rename to ...
6158 (linux_remove_point): ... this. Adjust.
6159 (linux_target_ops): Adjust.
6160 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6161 (cris_insert_point): ... this.
6162 (cris_remove_watchpoint): Rename to ...
6163 (cris_remove_point): ... this.
6164 (the_low_target): Adjust.
6166 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6168 * server.c (handle_v_kill): Pass signal_pid to
6169 kill_inferior if multi_process is zero.
6171 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6173 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6174 * target.h (target_ops): Comment for *_watchpoint to make it clear
6175 the functions can get types '0' and '1'.
6177 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6179 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6180 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6181 * regcache.c (get_regcache): Likewise.
6182 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6183 * win32-low.c (child_fetch_inferior_registers): Remove check for
6186 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6187 Pedro Alves <pedro@codesourcery.com>
6189 * target.h (struct target_ops) <supports_multi_process>: New
6191 (target_supports_multi_process): New.
6192 * server.c (handle_query): Even if GDB reports support, only
6193 enable multi-process if the target also supports it. Report
6194 multi-process support only if the target backend supports it.
6195 * linux-low.c (linux_supports_multi_process): New function.
6196 (linux_target_ops): Install it as target_supports_multi_process
6199 2009-05-24 Doug Evans <dje@google.com>
6201 Global renaming of find_thread_pid to find_thread_ptid.
6202 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6203 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6204 All callers updated.
6206 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6207 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6210 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6211 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6212 (linux_resume_one_lwp): Ditto.
6214 2009-05-23 Doug Evans <dje@google.com>
6216 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6217 from struct inferior_list_entry * to struct lwp_info *.
6218 All callers updated.
6220 2009-05-13 Doug Evans <dje@google.com>
6222 * linux-x86-low.c: Don't include assert.h.
6223 (x86_siginfo_fixup): Use fatal, not assert.
6224 (x86_arch_setup): Fix comment.
6226 2009-05-12 Doug Evans <dje@google.com>
6228 Biarch support for i386/amd64 gdbserver.
6229 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
6230 Add linux-x86-low.c.
6231 (linux-i386-low.o, linux-x86-64-low.o): Delete.
6232 (linux-x86-low.o): Add.
6233 * linux-x86-64-low.c: Delete.
6234 * linux-i386-low.c: Delete.
6235 * linux-x86-low.c: New file.
6236 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
6238 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
6240 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
6241 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
6242 (linux_child_pid_to_exec_file): New function.
6243 (elf_64_header_p, elf_64_file_p): New functions.
6244 (siginfo_fixup): New function.
6245 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
6246 give target a chance to convert layout.
6247 * linux-low.h (linux_target_ops): New member siginfo_fixup.
6248 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
6250 2009-05-07 Doug Evans <dje@google.com>
6252 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
6253 (regsets_store_inferior_registers): Ditto.
6255 2009-05-06 Pedro Alves <pedro@codesourcery.com>
6259 * linux-low.c (must_set_ptrace_flags): Delete.
6260 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
6262 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
6263 `lwp->must_set_ptrace_flags' instead.
6264 (linux_wait_for_event_1): Set ptrace options here.
6265 (linux_wait_1): ... not here.
6267 2009-04-30 Doug Evans <dje@google.com>
6269 * inferiors.c (started_inferior_callback): New function.
6270 (attached_inferior_callback): New function.
6271 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
6272 * server.c (print_started_pid, print_attached_pid): New functions.
6273 (detach_or_kill_for_exit): New function.
6274 (main): Call it instead of for_each_inferior (kill_inferior_callback).
6275 * server.h (have_started_inferiors_p): Declare.
6276 (have_attached_inferiors_p): Declare.
6278 * inferiors.c (remove_process): Fix memory leak, free process.
6279 * linux-low.c (linux_remove_process): New function.
6280 (linux_kill): Call it instead of remove_process.
6281 (linux_detach, linux_wait_1): Ditto.
6283 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
6285 * configure.srv: Add x86 Windows CE target.
6287 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6289 * inferiors.c (get_thread_process): Make global.
6290 * server.h (get_thread_process): Add prototype.
6291 * thread-db.c (find_one_thread): Use get_thread_process
6292 instead of current_process.
6293 (thread_db_get_tls_address): Do not crash if called when
6294 thread layer is not yet initialized.
6296 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6298 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
6299 * spu-low.c (current_tid): Rename to ...
6300 (current_ptid): ... this.
6301 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
6302 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
6303 ptid_get_lwp (current_ptid) instead of current_tid.
6304 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
6305 instead of current_tid. Use find_process_pid to verify pid
6306 argument is valid. Pass proper argument to remove_process.
6307 (spu_thread_alive): Compare current_ptid instead of current_tid.
6308 (spu_resume): Likewise.
6310 2009-04-02 Pedro Alves <pedro@codesourcery.com>
6312 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
6315 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6317 Implement the multiprocess extensions, and add linux multiprocess
6320 * server.h (ULONGEST): Declare.
6321 (struct ptid, ptid_t): New.
6322 (minus_one_ptid, null_ptid): Declare.
6323 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6324 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
6325 (struct inferior_list_entry): Change `id' type from unsigned from
6327 (struct sym_cache, struct breakpoint, struct
6328 process_info_private): Forward declare.
6329 (struct process_info): Declare.
6330 (current_process): Declare.
6331 (all_processes): Declare.
6332 (initialize_inferiors): Declare.
6333 (add_thread): Adjust to use ptid_t.
6334 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
6335 (add_process, remove_process, find_thread_pid): Declare.
6336 (find_inferior_id): Adjust to use ptid_t.
6337 (cont_thread, general_thread, step_thread): Change type to ptid_t.
6338 (multi_process): Declare.
6339 (push_event): Adjust to use ptid_t.
6340 (read_ptid, write_ptid): Declare.
6341 (prepare_resume_reply): Adjust to use ptid_t.
6342 (clear_symbol_cache): Declare.
6343 * inferiors.c (all_processes): New.
6344 (null_ptid, minus_one_ptid): New.
6345 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6346 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
6347 (add_thread): Change unsigned long to ptid. Remove gdb_id
6349 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
6350 (gdb_id_to_thread): Rename to ...
6351 (find_thread_pid): ... this. Change unsigned long to ptid.
6352 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
6353 (loaded_dll, pull_pid_from_list): Adjust.
6354 (add_process, remove_process, find_process_pid)
6355 (get_thread_process, current_process, initialize_inferiors): New.
6356 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
6357 (struct target_waitstatus) <related_pid>: Ditto.
6358 (struct target_ops) <kill, detach>: Add `pid' argument. Change
6360 (struct target_ops) <join>: Add `pid' argument.
6361 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
6362 (struct target_ops) <wait>: Add `ptid' field. Change return type
6364 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
6365 (mywait): Add `ptid' argument. Change return type to ptid_t.
6366 (target_pid_to_str): Declare.
6367 * target.c (set_desired_inferior): Adjust to use ptids.
6368 (mywait): Add new `ptid' argument. Adjust.
6369 (target_pid_to_str): New.
6370 * mem-break.h (free_all_breakpoints): Declare.
6371 * mem-break.c (breakpoints): Delelete.
6372 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
6373 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
6374 to use per-process breakpoint list.
6375 (free_all_breakpoints): New.
6376 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
6377 (symbol_cache, all_symbols_looked_up): Delete.
6379 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
6381 (prepare_resume_reply): Change ptid argument's type from unsigned
6382 long to ptid_t. Adjust. Implement W;process and X;process.
6383 (free_sym_cache, clear_symbol_cache): New.
6384 (look_up_one_symbol): Adjust to per-process symbol cache. *
6385 * server.c (cont_thread, general_thread, step_thread): Change type
6388 (multi_process): New.
6389 (last_ptid): Change type to ptid_t.
6390 (struct vstop_notif) <ptid>: Change type to ptid_t.
6391 (queue_stop_reply, push_event): Change `ptid' argument's type to
6393 (discard_queued_stop_replies): Add `pid' argument.
6394 (start_inferior): Adjust to use ptids. Adjust to mywait interface
6395 changes. Don't reference the `attached' global.
6396 (attach_inferior): Adjust to mywait interface changes.
6397 (handle_query): Adjust to use ptids. Parse GDB's qSupported
6398 features. Handle and report "multiprocess+". Handle
6400 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
6402 (handle_v_kill): New.
6403 (handle_v_stopped): Adjust to use target_pid_to_str.
6404 (handle_v_requests): Allow multiple attaches and runs when
6405 multiprocess extensions are in effect. Handle "vKill".
6406 (myresume): Adjust to use ptids.
6407 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
6408 (handle_status): Adjust to discard_queued_stop_replies interface
6410 (first_thread_of, kill_inferior_callback)
6411 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
6412 (main): Call initialize_inferiors. Adjust to use ptids, killing
6413 and detaching from all inferiors. Handle multiprocess packet
6415 * linux-low.h: Include gdb_proc_service.h.
6416 (struct process_info_private): New.
6417 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
6418 <lwpid_of>: Use ptid_get_lwp.
6419 (get_lwp_thread): Adjust.
6420 (struct lwp_info): Add `dead' member.
6421 (find_lwp_pid): Declare.
6422 * linux-low.c (thread_db_active): Delete.
6423 (new_inferior): Adjust comment.
6424 (inferior_pid): Delete.
6425 (linux_add_process): New.
6426 (handle_extended_wait): Adjust.
6427 (add_lwp): Change unsigned long to ptid.
6428 (linux_create_inferior): Add process to processes table. Adjust
6429 to use ptids. Don't set new_inferior here.
6430 (linux_attach_lwp): Rename to ...
6431 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
6432 it. Adjust to use ptids.
6433 (linux_attach_lwp): New.
6434 (linux_attach): Add process to processes table. Don't set
6436 (struct counter): New.
6437 (second_thread_of_pid_p, last_thread_of_process_p): New.
6438 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
6440 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
6441 processes. Remove process from process table.
6442 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
6443 to multiple processes.
6444 (any_thread_of): New.
6445 (linux_detach): Add `pid' argument, and handle it. Remove process
6446 from processes table.
6447 (linux_join): Add `pid' argument. Handle it.
6448 (linux_thread_alive): Change unsighed long argument to ptid_t.
6449 Consider dead lwps as not being alive.
6450 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6451 threads we're not interested in.
6452 (same_lwp, find_lwp_pid): New.
6453 (linux_wait_for_lwp): Change `pid' argument's type from int to
6455 (linux_wait_for_event): Rename to ...
6456 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6457 from int to ptid_t. Adjust.
6458 (linux_wait_for_event): New.
6459 (linux_wait_1): Add `ptid' argument. Change return type to
6460 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
6461 that exit from the process table.
6462 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
6464 (mark_lwp_dead): New.
6465 (wait_for_sigstop): Adjust to use ptids. If a process exits while
6466 stopping all threads, mark its main lwp as dead.
6467 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
6469 (fetch_register, usr_store_inferior_registers)
6470 (regsets_fetch_inferior_registers)
6471 (regsets_store_inferior_registers, linux_read_memory)
6472 (linux_write_memory): Inline `inferior_pid'.
6473 (linux_look_up_symbols): Adjust to use per-process
6475 (linux_request_interrupt): Adjust to use ptids.
6476 (linux_read_auxv): Inline `inferior_pid'.
6477 (initialize_low): Don't reference thread_db_active.
6478 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
6479 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
6480 (ps_getpid): Return the pid of the current inferior.
6481 * thread-db.c (proc_handle, thread_agent): Delete.
6482 (thread_db_create_event, thread_db_enable_reporting): Adjust to
6484 (find_one_thread): Change argument type to ptid_t. Adjust to
6486 (maybe_attach_thread): Adjust to per-process data and ptids.
6487 (thread_db_find_new_threads): Ditto.
6488 (thread_db_init): Ditto.
6489 * spu-low.c (spu_create_inferior, spu_attach): Add process to
6490 processes table. Adjust to use ptids.
6491 (spu_kill, spu_detach): Adjust interface. Remove process from
6493 (spu_join, spu_thread_alive): Adjust interface.
6494 (spu_wait): Adjust interface. Remove process from processes
6495 table. Adjust to use ptids.
6496 * win32-low.c (current_inferior_tid): Delete.
6497 (current_inferior_ptid): New.
6498 (debug_event_ptid): New.
6499 (thread_rec): Take a ptid. Adjust.
6500 (child_add_thread): Add `pid' argument. Adjust to use ptids.
6501 (child_delete_thread): Ditto.
6502 (do_initial_child_stuff): Add `attached' argument. Add process to
6504 (child_fetch_inferior_registers, child_store_inferior_registers):
6506 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
6507 (win32_attach): Pass 1 to do_initial_child_stuff.
6508 (win32_kill): Adjust interface. Remove process from processes
6510 (win32_detach): Ditto.
6511 (win32_join): Adjust interface.
6512 (win32_thread_alive): Take a ptid.
6513 (win32_resume): Adjust to use ptids.
6514 (get_child_debug_event): Ditto.
6515 (win32_wait): Adjust interface. Remove exiting process from
6518 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6520 Non-stop mode support.
6522 * server.h (non_stop): Declare.
6523 (gdb_client_data, handler_func): Declare.
6524 (delete_file_handler, add_file_handler, start_event_loop):
6526 (handle_serial_event, handle_target_event, push_event)
6527 (putpkt_notif): Declare.
6528 * target.h (enum resume_kind): New.
6529 (struct thread_resume): Replace `step' field by `kind' field.
6530 (TARGET_WNOHANG): Define.
6531 (struct target_ops) <wait>: Add `options' argument.
6532 <supports_non_stop, async, start_non_stop>: New fields.
6533 (target_supports_non_stop, target_async): New.
6534 (start_non_stop): Declare.
6535 (mywait): Add `options' argument.
6536 * target.c (mywait): Add `options' argument. Print child exit
6538 (start_non_stop): New.
6539 * server.c (non_stop, own_buf, mem_buf): New globals.
6540 (struct vstop_notif): New.
6541 (notif_queue): New global.
6542 (queue_stop_reply, push_event, discard_queued_stop_replies)
6543 (send_next_stop_reply): New.
6544 (start_inferior): Adjust to use resume_kind. Adjust to mywait
6546 (attach_inferior): In non-stop mode, don't wait for the target
6548 (handle_general_set): Handle QNonStop.
6549 (handle_query): When handling qC, return the current general
6550 thread, instead of the first thread of the list.
6551 (handle_query): If the backend supports non-stop mode, include
6552 QNonStop+ in the qSupported query response.
6553 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
6555 (handle_v_attach, handle_v_run): Handle non-stop mode.
6556 (handle_v_stopped): New.
6557 (handle_v_requests): Report support for vCont;t. Handle vStopped.
6558 (myresume): Adjust to use resume_kind. Handle non-stop.
6559 (queue_stop_reply_callback): New.
6560 (handle_status): Handle non-stop mode.
6561 (main): Clear non_stop flag on reconnection. Use the event-loop.
6562 Refactor serial protocol handling from here ...
6563 (process_serial_event): ... to this new function. When GDB
6564 selects any thread, select one here. In non-stop mode, wait until
6565 GDB acks all pending events before exiting.
6566 (handle_serial_event, handle_target_event): New.
6567 * remote-utils.c (remote_open): Install remote_desc in the event
6569 (remote_close): Remove remote_desc from the event loop.
6570 (putpkt_binary): Rename to...
6571 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
6572 (putpkt_binary): New as wrapper around putpkt_binary_1.
6573 (putpkt_notif): New.
6574 (prepare_resume_reply): In non-stop mode, don't change the
6576 * event-loop.c: New.
6577 * Makefile.in (OBJ): Add event-loop.o.
6578 (event-loop.o): New rule.
6580 * linux-low.h (pid_of): Moved here.
6582 (get_lwp_thread): Use lwpid_of.
6583 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
6584 * linux-low.c (pid_of): Delete.
6585 (inferior_pid): Use lwpid_of.
6586 (linux_event_pipe): New.
6587 (target_is_async_p): New.
6589 (handle_extended_wait): Use lwpid_of.
6590 (add_lwp): Don't set lwpid field.
6591 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
6592 (linux_kill_one_lwp): If killing a running lwp, stop it first.
6593 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
6594 (linux_detach_one_lwp): If detaching from a running lwp, stop it
6595 first. Adjust to linux_wait_for_event interface changes. Use
6597 (linux_detach): Don't delete the main lwp here.
6598 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
6599 (status_pending_p): Don't consider explicitly suspended lwps.
6600 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
6601 pointer. Add OPTIONS argument. Change return type to int. Use
6602 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
6603 (linux_wait_for_event): Take an integer pid instead of a lwp_info
6604 pointer. Add status pointer argument. Return a pid instead of a
6605 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
6606 changes. In non-stop mode, don't switch to a random thread.
6607 (linux_wait): Rename to...
6608 (linux_wait_1): ... this. Add target_options argument, and handle
6609 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
6610 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
6611 clean exit and signal exit code. Don't stop all threads in
6612 non-stop mode. In all-stop mode, only stop all threads when
6613 reporting a stop to GDB. Handle explicit thread stop requests.
6614 (async_file_flush, async_file_mark): New.
6616 (send_sigstop): Use lwpid_of.
6617 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
6618 interface changes. In non-stop mode, don't switch to a random
6620 (linux_resume_one_lwp): Use lwpid_of.
6621 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
6622 (linux_resume_one_thread): ... this. Handle resume_stop. In
6623 non-stop mode, don't look for pending flag in all threads.
6624 (resume_status_pending_p): Don't consider explicitly suspended
6626 (my_waitpid): Reimplement. Emulate __WALL.
6627 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6629 (sigchld_handler, linux_supports_non_stop, linux_async)
6630 (linux_start_non_stop): New.
6631 (linux_target_ops): Register linux_supports_non_stop, linux_async
6632 and linux_start_non_stop.
6633 (initialize_low): Install SIGCHLD handler.
6634 * thread-db.c (thread_db_create_event, find_one_thread)
6635 (thread_db_get_tls_address): Use lwpid_of.
6636 * win32-low.c (win32_detach): Adjust to use resume_kind.
6637 (win32_wait): Add `options' argument.
6638 * spu-low.c (spu_resume): Adjust to use resume_kind.
6639 (spu_wait): Add `options' argument.
6641 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6643 Decouple target code from remote protocol.
6645 * target.h (enum target_waitkind): New.
6646 (struct target_waitstatus): New.
6647 (struct target_ops) <wait>: Return an unsigned long. Take a
6648 target_waitstatus pointer instead of a char pointer.
6650 * target.c (mywait): Change prototype to return an unsigned long.
6651 Take a target_waitstatus pointer instead of a char pointer. Adjust.
6652 * server.h (thread_from_wait, old_thread_from_wait): Delete
6654 (prepare_resume_reply): Change prototype to take a
6656 * server.c (thread_from_wait, old_thread_from_wait): Delete.
6657 (last_status, last_ptid): New.
6658 (start_inferior): Remove "statusptr" argument. Adjust. Return a
6659 pid instead of a signal.
6660 (attach_inferior): Remove "status" and "signal" parameters.
6662 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
6664 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
6665 (handle_v_requests, myresume): Remove "status" and "signal"
6667 (handle_status): New.
6668 (main): Delete local `status'. Adjust.
6669 * remote-utils.c: Include target.h.
6670 (prepare_resume_reply): Change prototype to take a
6671 target_waitstatus. Adjust.
6673 * linux-low.c (linux_wait): Adjust to new target_ops->wait
6675 * spu-low.c (spu_wait): Adjust.
6676 * win32-low.c (enum target_waitkind, struct target_waitstatus):
6678 (win32_wait): Adjust.
6680 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6682 * target.h (struct thread_resume): Delete leave_stopped member.
6683 (struct target_ops): Add a `n' argument to the `resume' callback.
6684 * server.c (start_inferior): Adjust.
6685 (handle_v_cont, myresume): Adjust.
6686 * linux-low.c (check_removed_breakpoint): Adjust to resume
6687 interface change, and to removed leave_stopped field.
6688 (resume_ptr): Delete.
6689 (struct thread_resume_array): New.
6690 (linux_set_resume_request): Add new `arg' parameter. Adjust to
6691 resume interface change.
6692 (linux_continue_one_thread, linux_queue_one_thread)
6693 (resume_status_pending_p): Check if the resume field is NULL
6694 instead of checking the leave_stopped member.
6695 (linux_resume): Adjust to the target resume interface change.
6696 * spu-low.c (spu_resume): Adjust to the target resume interface
6698 * win32-low.c (win32_detach, win32_resume): Ditto.
6700 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6702 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
6704 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
6706 (linux_continue_one_thread): Only preserve the stepping flag if
6707 there's a pending breakpoint.
6709 2009-03-31 Pedro Alves <pedro@codesourcery.com>
6711 * server.c (main): After the inferior having exited, call
6712 remote_close before exiting gdbserver.
6714 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6716 Fix size of FPSCR in Power 7 processors.
6717 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6718 (PPC_FEATURE_HAS_DFP): New #define.
6719 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
6722 2009-03-23 Pedro Alves <pedro@codesourcery.com>
6724 * server.c (handle_query) Whitespace and formatting.
6726 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6728 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
6729 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
6730 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
6731 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
6732 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
6733 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
6734 Makefile.in, configure.ac: Fix whitespace throughout.
6735 * configure: Regenerate.
6737 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6739 * inferiors.c (find_inferior): Make it safe for the callback
6740 function to delete the currently iterated inferior.
6742 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6744 * Makefile.in (linuw_low_h): Move higher.
6745 (thread-db.o): Depend on $(linux_low_h).
6747 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6749 Rename "process" to "lwp" throughout.
6751 * linux-low.c (all_processes): Rename to...
6752 (all_lwps): ... this.
6753 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6754 (add_process): Rename to ...
6755 (add_lwp): ... this. Adjust.
6756 (linux_create_inferior): Adjust.
6757 (linux_attach_lwp): Adjust.
6758 (linux_attach): Adjust.
6759 (linux_kill_one_process): Rename to ...
6760 (linux_kill_one_lwp): ... this. Adjust.
6761 (linux_kill): Adjust.
6762 (linux_detach_one_process): Rename to ...
6763 (linux_detach_one_lwp): ... this. Adjust.
6764 (linux_detach): Adjust.
6765 (check_removed_breakpoint): Adjust.
6766 (status_pending_p): Adjust.
6767 (linux_wait_for_process): Rename to ...
6768 (linux_wait_for_lwp): ... this. Adjust.
6769 (linux_wait_for_event): Adjust.
6770 (send_sigstop): Adjust.
6771 (wait_for_sigstop): Adjust.
6772 (stop_all_processes): Rename to ...
6773 (stop_all_lwps): ... this.
6774 (linux_resume_one_process): Rename to ...
6775 (linux_resume_one_lwp): ... this. Adjust.
6776 (linux_set_resume_request, linux_continue_one_thread)
6777 (linux_queue_one_thread, resume_status_pending_p)
6778 (usr_store_inferior_registers, regsets_store_inferior_registers)
6779 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6781 * linux-low.h (get_process): Rename to ...
6782 (get_lwp): ... this. Adjust.
6783 (get_thread_process): Rename to ...
6784 (get_thread_lwp): ... this. Adjust.
6785 (get_process_thread): Rename to ...
6786 (get_lwp_thread): ... this. Adjust.
6787 (struct process_info): Rename to ...
6788 (struct lwp_info): ... this.
6789 (all_processes): Rename to ...
6790 (all_lwps): ... this.
6791 * proc-service.c (ps_lgetregs): Adjust.
6792 * thread-db.c (thread_db_create_event, find_one_thread)
6793 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6795 2009-03-14 Pedro Alves <pedro@codesourcery.com>
6797 * server.c (handle_query): Handle "qAttached".
6799 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6801 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6802 GPLv3, update license URL.
6804 2009-03-01 Doug Evans <dje@google.com>
6806 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6807 (server_h): Add gdb_signals.h.
6808 (signals.o): Update.
6809 * server.h (target_signal_from_host,target_signal_to_host_p)
6810 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6812 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6814 * remote-utils.c (getpkt): Also generate remote-debug
6815 information if noack_mode is set.
6817 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6819 * server.c (handle_query): Report qXfer:siginfo:read and
6820 qXfer:siginfo:write as supported and handle them.
6821 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6822 * linux-low.c (linux_xfer_siginfo): New.
6823 (linux_target_ops): Set it.
6825 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6827 * server.c (gdbserver_usage): Mention --remote-debug.
6828 (main): Accept '--remote-debug' switch.
6830 2009-01-18 Doug Evans <dje@google.com>
6832 * regcache.c (new_register_cache): No need to check result of xcalloc.
6833 * server.c (handle_search_memory): Back out calls to xmalloc,
6834 result is checked and error is returned to user upon failure.
6835 (handle_query): Ditto. Add more checks for result of malloc.
6836 (handle_v_cont): Check result of malloc, report error back to
6838 (handle_v_run): Ditto. Call freeargv.
6839 * server.h (freeargv): Declare.
6840 * utils.c (freeargv): New fn.
6842 2009-01-15 Doug Evans <dje@google.com>
6844 * gdbreplay.c (perror_with_name): Make arg const char *.
6845 * server.h (target_signal_to_name): Make return type const char *.
6846 * thread-db.c (thread_db_err_str): Make return type const char *.
6847 * utils.c (perror_with_name): Make arg const char *.
6849 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6851 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6852 when handling a EXIT_PROCESS_DEBUG_EVENT.
6854 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6856 * gdbreplay.c (gdbreplay_version): Update copyright year.
6857 * server.c (gdbserver_version): Likewise.
6859 2009-01-05 Doug Evans <dje@google.com>
6861 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6862 (handle_extended_wait): Improve comment.
6864 2008-12-13 Doug Evans <dje@google.com>
6866 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6867 * server.h (ATTR_MALLOC): New macro.
6868 (xmalloc,xcalloc,xstrdup): Declare.
6869 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6870 * inferiors.c: Ditto.
6871 * linux-low.c: Ditto.
6872 * mem-break.c: Ditto.
6873 * regcache.c: Ditto.
6874 * remote-utils.c: Ditto.
6877 * win32-low.c: Ditto.
6879 2008-12-12 Doug Evans <dje@google.com>
6881 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6882 in debugging printf.
6884 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6886 2008-12-09 Doug Evans <dje@google.com>
6888 * linux-low.h (struct process_info): Delete member tid, unused.
6889 * thread-db.c (find_one_thread): Update.
6890 (maybe_attach_thread): Update.
6892 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6894 * target.h (struct target_ops): Add qxfer_osdata member.
6895 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6897 (linux_qxfer_osdata): New functions.
6898 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6900 * server.c (handle_query): Handle "qXfer:osdata:read:".
6901 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6902 (buffer_xml_printf): New functions.
6903 * server.h (struct buffer): New.
6904 (buffer_grow_str, buffer_grow_str0): New macros.
6905 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6906 (buffer_xml_printf): Declare.
6908 2008-11-24 Doug Evans <dje@google.com>
6910 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6912 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6914 * server.c (handle_v_run): Always use the supplied argument list.
6916 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6918 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6919 (xtensa_regmap_table): Add entry for scompare1.
6921 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6923 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6924 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6925 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6926 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6927 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6928 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6929 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6930 XML target descriptions.
6931 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6932 when inferior is running on an ISA 2.05 or later processor. Add
6933 special case to return offset for full 64-bit slot of FPSCR when
6936 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6938 * Makefile.in (SFILES, clean): Added sparc64 files.
6939 (reg-sparc64.o, reg-sparc64.c): New.
6940 * configure.srv (sparc*-*-linux*): New configuration.
6941 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6942 syscall arguments for SPARC.
6943 (regsets_store_inferior_registers): Likewise.
6944 * linux-sparc-low.c: New file.
6946 2008-10-21 Doug Evans <dje@google.com>
6948 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6949 (READLINE_DIR,READLINE_DEP): Delete.
6950 (INTERNAL_CFLAGS): Update.
6951 (LINTFLAGS): Update.
6953 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6955 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6956 whole argv from the last run, not just argv[0].
6958 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6960 * regcache.c (new_register_cache): Return NULL if the register
6961 cache size isn't known yet.
6962 (free_register_cache): Avoid dereferencing a NULL regcache.
6964 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6966 * configure.srv: Merge MIPS and MIPS64.
6968 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6970 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6972 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6974 * Makefile.in: Add required vsx dependencies.
6976 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6977 Declare init_registers_powerpc_vsx32l.
6978 Declare init_registers_powerpc_vsx64l.
6979 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6980 (ppc_arch_setup): Check for VSX in hwcap.
6981 (ppc_fill_vsxregset): New function.
6982 (ppc_store_vsxregset): New function.
6983 Add new VSX entry in regset_info target_regsets.
6985 * configure.srv: Add new VSX dependencies.
6987 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6989 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6990 (remote_open): Set or clear transport_is_reliable.
6991 (putpkt_binary): Don't expect acks in noack mode.
6992 (getpkt): Don't send ack/nac in noack mode.
6993 * server.c (handle_general_set): Handle QStartNoAckMode.
6994 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6996 (main): Reset noack_mode on every connection.
6997 * server.h (noack_mode): Declare.
6999 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7001 * Makefile.in (GDBREPLAY_OBS): New variable.
7002 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7004 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7005 Daniel Jacobowitz <dan@codesourcery.com>
7007 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7008 (usr_store_inferior_registers): Likewise.
7009 (regsets_store_inferior_registers): Likewise.
7011 2008-07-31 Rolf Jansen <rj@surtec.com>
7012 Pedro Alves <pedro@codesourcery.com>
7014 * configure.ac: Check for memmem declaration.
7015 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7016 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7017 (disable_packet_qfThreadInfo): Unconditionally compile.
7018 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7019 * configure, config.in: Regenerate.
7021 2008-07-28 Doug Kwan <dougkwan@google.com>
7023 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7024 (linux_write_memory): Remove declaration of errno.
7026 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7028 * linux-low.c (handle_extended_wait): Do not use "status"
7029 variable uninitialized.
7031 2008-07-07 Pedro Alves <pedro@codesourcery.com>
7033 * server.c (handle_v_attach): Inhibit reporting dll changes.
7035 2008-06-27 Pedro Alves <pedro@codesourcery.com>
7037 * remote-utils.c (prepare_resume_reply): If requested, don't
7038 output "thread:TID" in the T stop reply.
7040 * server.c (disable_packet_vCont, disable_packet_Tthread)
7041 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7042 (handle_query): If requested, disable support for qC, qfThreadInfo
7044 (handle_v_requests): If requested, disable support for vCont.
7045 (gdbserver_show_disableable): New.
7046 (main): Handle --disable-packet and --disable-packet=LIST.
7048 * server.h (disable_packet_vCont, disable_packet_Tthread)
7049 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7051 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7053 * server.c (gdbserver_usage): Mention --version.
7055 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7057 * Makefile.in (gdbreplay.o): New rule.
7059 2008-06-06 Joseph Myers <joseph@codesourcery.com>
7061 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7062 message, not gdbserver.
7064 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
7065 Nathan Sidwell <nathan@codesourcery.com>
7066 Joseph Myers <joseph@codesourcery.com>
7068 * acinclude.m4: Include ../../config/acx.m4.
7069 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7070 * configure, config.in: Regenerate.
7071 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7072 * server.c (gdbserver_version): Print PKGVERSION.
7073 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7074 (main): Adjust gdbserver_usage calls.
7075 * gdbreplay.c (version, host_name): Add declarations.
7076 (gdbreplay_version, gdbreplay_usage): New.
7077 (main): Accept --version and --help options.
7079 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7081 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7082 (arm_breakpoint_at): Handle Thumb.
7083 (the_low_target): Add comment.
7085 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7087 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7089 2008-05-09 Doug Evans <dje@google.com>
7091 * server.h (decode_search_memory_packet): Declare.
7092 * remote-utils.c (decode_search_memory_packet): New fn.
7093 * server.c (handle_search_memory_1): New fn.
7094 (handle_search_memory): New fn.
7095 (handle_query): Process qSearch:memory packets.
7097 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7099 * regcache.c (registers_length): Remove.
7100 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7101 full register packet.
7102 * regcache.h (registers_length): Remove prototype.
7103 * server.h (PBUFSIZ): Define to 16384.
7105 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7107 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7108 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7109 powerpc-64l.o, and powerpc-altivec64l.o.
7110 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7111 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7112 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7113 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7114 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7117 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7118 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7119 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7120 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7121 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7122 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7123 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7124 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7125 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7126 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7129 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7130 (init_registers_powerpc_32l): ... this new prototype.
7131 (init_registers_powerpc_32): Remove, replace by ...
7132 (init_registers_powerpc_altivec32l): ... this new prototype.
7133 (init_registers_powerpc_e500): Remove, replace by ...
7134 (init_registers_powerpc_e500l): ... this new prototype.
7135 (init_registers_ppc64): Remove, replace by ...
7136 (init_registers_powerpc_64l): ... this new prototype.
7137 (init_registers_powerpc_64): Remove, replace by ...
7138 (init_registers_powerpc_altivec64l): ... this new prototype.
7139 (ppc_num_regs): Set to 73.
7140 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7141 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7142 (ppc_cannot_store_register): Handle orig_r3 and trap.
7143 (ppc_arch_setup): Update init_registers_... calls.
7144 (ppc_fill_gregset): Handle orig_r3 and trap.
7146 * inferiors.c (clear_inferiors): Reset current_inferior.
7148 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
7150 * acinclude.m4: Add override.m4.
7151 * configure: Regenerate.
7153 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7155 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7156 initial call to init_register_ppc64.
7158 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7160 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7161 single powerpc*-*-linux* case.
7162 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7164 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7166 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
7167 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
7169 * linux-ppc-low.c: Include <elf.h>.
7170 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7171 (ppc_hwcap): New global variable.
7172 (ppc_regmap): Remove __SPE__ #ifdef sections.
7173 (ppc_regmap_e500): New global variable.
7174 (ppc_cannot_store_register): Update __SPE__ special case.
7175 (ppc_get_hwcap): New function.
7176 (ppc_arch_setup): Use it to determine whether inferior supports
7177 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7178 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7179 Do not access registers if target does not support AltiVec.
7180 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7181 Do not access registers if target does not support SPE.
7182 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7184 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7186 * linux-low.c (disabled_regsets, num_regsets): New.
7187 (use_regsets_p): Delete.
7188 (linux_wait_for_process): Clear disabled_regsets.
7189 (regsets_fetch_inferior_registers): Check and set it.
7190 (regsets_store_inferior_registers): Likewise.
7191 (linux_fetch_registers, linux_store_registers): Do not use
7193 (initialize_low): Allocate disabled_regsets.
7195 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7197 * Makefile.in (LIBOBJS): New.
7199 (memmem.o): New rule.
7200 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7201 * configure: Regenerated.
7203 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7205 * server.c (handle_query): Never return "unsupported" for
7206 qXfer:features:read queries.
7208 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7210 * server.c (get_features_xml): Fix inverted condition.
7211 (handle_query): Always support qXfer:feature:read.
7213 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7215 * server.c (wrapper_argv): New.
7216 (start_inferior): Handle wrapper_argv. If set, expect an extra
7218 (gdbserver_usage): Document --wrapper.
7219 (main): Parse --wrapper.
7221 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7223 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7224 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7225 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7226 (ppc_set_pc): Likewise.
7227 (ppc_arch_setup): New function.
7228 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
7229 of collect_register.
7230 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
7232 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7234 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
7235 instead of linux-ppc64-low.o.
7236 * linux-ppc64-low.c: Remove file.
7237 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
7238 (linux-ppc64-low.o): Remove rule.
7240 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
7241 (init_registers_powerpc_64): Likewise.
7242 (ppc_regmap): Conditionally define depending on __powerpc64__.
7243 (ppc_cannot_store_register): Do not special-case "fpscr" when
7244 compiled on __powerpc64__.
7245 (ppc_collect_ptrace_register): New function.
7246 (ppc_supply_ptrace_register): New function.
7247 (ppc_breakpoint): Change type to "unsigned int".
7248 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
7249 (the_low_target): Conditionally provide initializers for the
7250 arch_setup member depending on __powerpc64__. Install
7251 collect_ptrace_register and supply_ptrace_register members.
7253 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7255 * regcache.h (gdbserver_xmltarget): Add extern declaration.
7256 * server.c (gdbserver_xmltarget): Define.
7257 (get_features_xml): Use it to replace "target.xml" and arch_string.
7259 * configure.srv: Remove srv_xmltarget. Add XML files that were
7260 mentioned there to srv_xmlfiles instead. Remove conditional tests
7261 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
7262 srv_xmlfiles and srv_regobj to include all possible choices.
7263 * configure.ac (srv_xmltarget): Remove.
7264 (srv_xmlfiles): Do not add "target.xml".
7265 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
7266 checks for supplementary target information.
7267 * configure: Regenerate.
7268 * Makefile.in (XML_TARGET): Remove.
7269 (target.xml): Remove rule.
7270 (clean): Do not clean up target.xml.
7271 (.PRECIOUS): Do not mention target.xml.
7273 * target.h (struct target_ops): Remove arch_string member.
7274 * linux-low.c (linux_arch_string): Remove.
7275 (linux_target_ops): Remove arch_string initializer.
7276 * linux-low.h (struct linux_target_ops): Remove arch_string member.
7277 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
7278 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
7279 * spu-low.c (spu_arch_string): Remove.
7280 (spu_target_ops): Remove arch_string initializer.
7281 * win32-low.c (win32_arch_string): Remove.
7282 (win32_target_ops): Remove arch_string initializer.
7283 * win32-low.h (struct win32_target_ops): Remove arch_string member.
7284 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
7285 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
7287 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7289 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
7290 by collect_ptrace_register and supply_ptrace_register hooks.
7291 * linux-low.c (fetch_register): Use supply_ptrace_register callback
7292 instead of checking for the_low_target.left_pad_xfer.
7293 (usr_store_inferior_registers): Use collect_ptrace_register callback
7294 instead of checking for the_low_target.left_pad_xfer.
7296 * linux-s390-low.c (s390_collect_ptrace_register): New function.
7297 (s390_supply_ptrace_register): Likewise.
7298 (s390_fill_gregset): Call s390_collect_ptrace_register.
7299 (the_low_target): Update.
7301 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
7302 (ppc_supply_ptrace_register): Likewise.
7303 (the_low_target): Update.
7305 * linux-i386-low.c (the_low_target): Update.
7306 * linux-x86-64-low.c (the_low_target): Update.
7308 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7310 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
7311 reg-s390.o and reg-s390x.o.
7313 * linux-low.c (new_inferior): New global variable.
7314 (linux_create_inferior, linux_attach): Set it.
7315 (linux_wait_for_process): Call the_low_target.arch_setup after the
7316 target has stopped for the first time.
7317 (initialize_low): Do not call the_low_target.arch_setup.
7319 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
7320 (s390_set_pc): Likewise.
7321 (s390_arch_setup): New function.
7322 (the_low_target): Use s390_arch_setup as arch_setup routine.
7324 * regcache.c (realloc_register_cache): New function.
7325 (set_register_cache): Call it for each existing regcache.
7327 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7329 * server.h (init_registers): Remove prototype.
7331 * linux-low.h (struct linux_target_ops): Add arch_setup field.
7332 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
7333 instead of init_registers ().
7334 * linux-arm-low.c (init_registers_arm): Add prototype.
7335 (init_registers_arm_with_iwmmxt): Likewise.
7336 (the_low_target): Add initializer for arch_setup field.
7337 * linux-cris-low.c (init_registers_cris): Add prototype.
7338 (the_low_target): Add initializer for arch_setup field.
7339 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
7340 (the_low_target): Add initializer for arch_setup field.
7341 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
7342 (the_low_target): Add initializer for arch_setup field.
7343 * linux-ia64-low.c (init_registers_ia64): Add prototype.
7344 (the_low_target): Add initializer for arch_setup field.
7345 * linux-m32r-low.c (init_registers_m32r): Add prototype.
7346 (the_low_target): Add initializer for arch_setup field.
7347 * linux-m68k-low.c (init_registers_m68k): Add prototype.
7348 (the_low_target): Add initializer for arch_setup field.
7349 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
7350 (init_registers_mips64_linux): Likewise.
7351 (the_low_target): Add initializer for arch_setup field.
7352 * linux-ppc-low.c (init_registers_ppc): Add prototype.
7353 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
7354 (the_low_target): Add initializer for arch_setup field.
7355 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
7356 (init_registers_powerpc_64): Likewise.
7357 (the_low_target): Add initializer for arch_setup field.
7358 * linux-s390-low.c (init_registers_s390): Add prototype.
7359 (init_registers_s390x): Likewise.
7360 (the_low_target): Add initializer for arch_setup field.
7361 * linux-sh-low.c (init_registers_sh): Add prototype.
7362 (the_low_target): Add initializer for arch_setup field.
7363 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
7364 (the_low_target): Add initializer for arch_setup field.
7365 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
7366 (the_low_target): Add initializer for arch_setup field.
7368 * win32-low.h (struct win32_target_ops): Add arch_setup field.
7369 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
7370 instead of init_registers ().
7371 * win32-arm-low.c (init_registers_arm): Add prototype.
7372 (the_low_target): Add initializer for arch_setup field.
7373 * win32-i386-low.c (init_registers_i386): Add prototype.
7374 (the_low_target): Add initializer for arch_setup field.
7376 * spu-low.c (init_registers_spu): Add prototype.
7377 (initialize_low): Call initialie_registers_spu () instead of
7378 initialize_registers ().
7380 2008-02-19 Pedro Alves <pedro@codesourcery.com>
7382 * server.c (handle_v_requests): When handling the vRun and vAttach
7383 packets, if already debugging a process, don't kill it. Return an
7386 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
7388 * server.c (handle_query): Correct length check.
7390 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
7392 * win32-low.c (do_initial_child_stuff): Add process handle
7393 parameter. Set current_process_handle and current_process_id from the
7394 parameters. Clear globals.
7395 (win32_create_inferior): Don't set current_process_handle and
7396 current_process_id here. Instead pass them on the call to
7397 do_initial_child_stuff.
7398 (win32_attach): Likewise.
7399 (win32_clear_inferiors): New.
7400 (win32_kill): Don't close the current process handle or the
7401 current thread handle here. Instead call win32_clear_inferiors.
7402 (win32_detach): Don't open a new handle to the process. Call
7403 win32_clear_inferiors.
7404 (win32_join): Don't rely on current_process_handle; open a new
7405 handle using the process id.
7406 (win32_wait): Call win32_clear_inferiors when the inferior process
7409 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
7411 * server.c (monitor_show_help): Add "exit".
7413 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
7415 * Makefile.in (SFILES): Add linux-xtensa-low.c.
7416 (clean): Add reg-xtensa.c.
7417 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
7418 * configure.srv (xtensa*-*-linux*) New target.
7419 * linux-xtensa-low.c: New.
7420 * xtensa-xtregs.c: New.
7422 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
7424 * hostio.c: Don't include errno.h.
7425 (errno_to_fileio_errno): Move to hostio-errno.
7426 * hostio.c: (hostio_error): Remove the error parameter. Defer the
7427 error number outputting to the target->hostio_last_error callback.
7428 (hostio_packet_error): Use FILEIO_EINVAL directly.
7429 (handle_open, handle_pread, hostio_error, handle_unlink): Update
7430 calls to hostio_error.
7431 * hostio-errno.c: New.
7432 * server.h (hostio_last_error_from_errno): Declare.
7433 * target.h (target_ops): Add hostio_last_error member.
7434 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
7435 as hostio_last_error handler.
7436 * spu-low.c (spu_target_ops): Likewise.
7437 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
7438 (wince_hostio_last_error): New functions.
7439 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
7440 as hostio_last_error handler.
7441 (win32_target_ops) [!_WIN32_WCE]: Register
7442 hostio_last_error_from_errno as hostio_last_error handler.
7443 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
7444 (hostio-errno.o): New rule.
7445 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
7446 * configure.srv (srv_hostio_err_objs): New variable. Default to
7448 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7449 * configure: Regenerate.
7451 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7453 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7454 (linux_kill, linux_detach): Clean up the process list.
7455 * remote-utils.c (remote_open): Improve port number parsing.
7456 (putpkt_binary, input_interrupt): Only send interrupts if the target
7458 * server.c (extended_protocol): Make static.
7459 (attached): Define earlier.
7460 (exit_requested, response_needed, program_argv): New variables.
7461 (target_running): New.
7462 (start_inferior): Clear attached here.
7463 (attach_inferior): Set attached here.
7464 (require_running): Define.
7465 (handle_query): Use require_running and target_running. Implement
7467 (handle_v_attach, handle_v_run): New.
7468 (handle_v_requests): Use require_running. Handle vAttach and vRun.
7469 (gdbserver_usage): Update.
7470 (main): Redo argument parsing. Handle --debug and --multi. Handle
7471 --attach along with other options or after the port. Save
7472 program_argv. Support no initial program. Resynchronize
7473 communication with GDB after an error. Handle "monitor exit".
7474 Use require_running and target_running. Always allow the extended
7475 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
7476 restart in extended mode.
7477 * README: Refer to the GDB manual. Update --attach usage.
7479 2007-12-20 Andreas Schwab <schwab@suse.de>
7481 * linux-low.c (STACK_SIZE): Define.
7482 (linux_tracefork_child): Use it. Use __clone2 on ia64.
7483 (linux_test_for_tracefork): Likewise.
7485 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
7487 * linux-low.c (linux_wait_for_event): Update messages. Do not
7488 reinsert auto-delete breakpoints.
7489 * mem-break.c (struct breakpoint): Change return type of handler to
7491 (set_breakpoint_at): Update handler type.
7492 (reinsert_breakpoint_handler): Return 1 instead of calling
7494 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
7496 (check_breakpoints): Delete auto-delete breakpoints and return 2.
7497 * mem-break.h (set_breakpoint_at): Update handler type.
7498 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
7499 * win32-low.c (auto_delete_breakpoint): New.
7500 (get_child_debug_event): Use it.
7502 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
7504 * configure.ac: Check for pread and pwrite.
7505 * hostio.c (handle_pread): Fall back to lseek and read.
7506 (handle_pwrite): Fall back to lseek and write.
7507 * config.in, configure: Regenerated.
7509 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
7511 * server.c (myresume): Add own_buf argument.
7512 (main): Update calls.
7514 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
7516 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
7517 * remote-utils.c (remote_open): Do not call disable_async_io.
7518 (block_async_io): Delete.
7519 (unblock_async_io): Make static.
7520 (initialize_async_io): New.
7521 * server.c (handle_v_cont): Handle async I/O here.
7522 (myresume): Likewise. Move other common resume tasks here...
7523 (main): ... from here. Call initialize_async_io. Disable async
7524 I/O before the main loop.
7525 * server.h (initialize_async_io): Declare.
7526 (block_async_io, unblock_async_io): Delete prototypes.
7527 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
7529 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
7531 * remote-utils.c (readchar): Allow binary data in received messages.
7533 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7535 * win32-low.c (attaching): New global.
7536 (win32_create_inferior): Clear the `attaching' global.
7537 (win32_attach): Set the `attaching' global.
7538 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
7539 attaching. Only set a breakpoint at the entry point if not
7542 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7544 * server.c (main): Don't report dll events on the initial
7545 connection on attaches.
7547 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7549 * server.c (main): Relax numerical bases supported for the pid of
7550 the --attach command line argument.
7552 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7554 * win32-low.c (win32_attach): Call OpenProcess before
7555 DebugActiveProcess, not after. Add last error output to error
7558 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7560 * win32-low.c (win32_get_thread_context)
7561 (win32_set_thread_context): New functions.
7562 (thread_rec): Use win32_get_thread_context.
7563 (continue_one_thread, win32_resume): Use win32_set_thread_context.
7564 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
7567 2007-12-03 Leo Zayas
7568 Pedro Alves <pedro_alves@portugalmail.pt>
7570 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
7572 (child_add_thread): Minor cleanup.
7573 (child_continue): Resume artificially suspended threads before
7574 calling ContinueDebugEvent.
7575 (suspend_one_thread): New.
7576 (fake_breakpoint_event): New.
7577 (get_child_debug_event): Change return type to int. Check here if
7578 gdb sent an interrupt request. If a soft interrupt was requested,
7579 fake a breakpoint event. Return 0 if there is no event to handle,
7581 (win32_wait): Don't check here if gdb sent an interrupt request.
7582 Ensure there is a valid event to handle.
7583 (win32_request_interrupt): Add soft interruption method as last
7586 2007-12-03 Leo Zayas
7587 Pedro Alves <pedro_alves@portugalmail.pt>
7589 * win32-low.h (win32_thread_info): Add descriptions to the
7590 structure members. Replace `suspend_count' counter by a
7592 * win32-low.c (thread_rec): Update condition of when to get the
7593 context from the inferior. Rely on ContextFlags being set if it
7594 has already been retrieved. Only suspend the inferior thread if
7595 we haven't already. Warn if that fails.
7596 (continue_one_thread): s/suspend_count/suspended/. Only call
7597 ResumeThread once. Warn if that fails.
7599 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7601 * win32-low.c (win32_wait): Don't read from the inferior when it
7604 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7606 * Makefile.in (win32_low_h): New variable.
7607 (win32-low.o): Add dependency on $(win32_low_h).
7608 (win32-arm-low.o, win32-i386-low.o): New rules.
7610 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7612 * hostio.c: Correct copyright year.
7614 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7616 * Makefile.in (OBS): Add hostio.o.
7617 (hostio.o): New rule.
7618 * server.h (handle_vFile): Declare.
7619 * hostio.c: New file.
7620 * server.c (handle_v_requests): Take packet_len and new_packet_len
7621 for binary packets. Call handle_vFile.
7622 (main): Update call to handle_v_requests.
7624 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
7626 * linux-low.c: Include <sched.h>.
7628 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
7630 * linux-low.c (linux_tracefork_grandchild): New.
7631 (linux_tracefork_child): Use clone.
7632 (linux_test_for_tracefork): Use clone; allocate and free a stack.
7634 2007-10-31 Joel Brobecker <brobecker@adacore.com>
7636 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
7638 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
7640 * linux-low.c (handle_extended_wait): Handle unexpected signals.
7642 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
7644 * inferiors.c (change_inferior_id): Delete.
7645 (add_pid_to_list, pull_pid_from_list): New.
7646 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
7647 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
7648 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
7649 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
7650 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
7651 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
7652 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
7653 (using_threads): Always set to 1.
7654 (handle_extended_wait): New.
7655 (add_process): Do not set TID.
7656 (linux_create_inferior): Set must_set_ptrace_flags.
7657 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
7658 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
7659 (linux_thread_alive): Rename TID argument to LWPID.
7660 (linux_wait_for_process): Handle unknown processes. Do not use TID.
7661 (linux_wait_for_event): Do not use TID or check using_threads. Update
7662 call to dead_thread_notify. Call handle_extended_wait.
7663 (linux_create_inferior): Use PTRACE_SETOPTIONS.
7664 (send_sigstop): Delete sigstop_sent.
7665 (wait_for_sigstop): Avoid TID.
7666 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
7667 (linux_test_for_tracefork): New.
7668 (linux_lookup_signals): Use thread_db_active and
7669 linux_supports_tracefork_flag.
7670 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
7671 * linux-low.h (get_process_thread): Avoid TID.
7672 (struct process_ifo): Move thread_known and tid to the end. Remove
7674 (linux_attach_lwp, thread_db_init): Update prototypes.
7675 * server.h (change_inferior_id): Delete prototype.
7676 (add_pid_to_list, pull_pid_from_list): New prototypes.
7677 * thread-db.c (thread_db_use_events): New.
7678 (find_first_thread): Rename to...
7679 (find_one_thread): ...this. Update callers and messages. Do not
7680 call fatal. Check thread_db_use_events. Do not call
7681 change_inferior_id or new_thread_notify.
7682 (maybe_attach_thread): Update. Do not call new_thread_notify.
7683 (thread_db_init): Set thread_db_use_events. Check use_events.
7684 * utils.c (fatal, warning): Correct message prefix.
7686 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
7688 * Makefile.in (clean): Remove new files.
7689 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
7690 (powerpc-64.o, powerpc-64.c): New rules.
7691 * configure.srv: Use alternate register sets for powerpc64-*-linux*
7692 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
7694 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
7696 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
7697 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
7698 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
7699 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
7700 (target_regsets): Add AltiVec and SPE register sets.
7701 * configure.ac: Check for AltiVec and SPE.
7702 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
7703 (ppc_fill_vrregset, ppc_store_vrregset): New.
7704 (target_regsets): Add AltiVec register set.
7705 * configure: Regenerated.
7707 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
7709 * linux-low.c (O_LARGEFILE): Define.
7710 (linux_read_memory): Use /proc/PID/mem.
7711 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
7712 * configure, config.in: Regenerated.
7714 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7716 * linux-low.c (linux_wait_for_event): Do not pass signals while
7719 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7721 * win32-low.c (create_process): New.
7722 (win32_create_inferior): Use create_process instead of
7723 CreateProcess. If create_process failed retry appending an ".exe"
7724 suffix. Store the GetLastError result immediatelly after
7725 create_process calls and use it on the call to error.
7727 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7729 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
7731 2007-08-23 Joel Brobecker <brobecker@adacore.com>
7733 * configure.ac: Switch license to GPLv3.
7735 2007-08-01 Michael Snyder <msnyder@access-company.com>
7737 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7739 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
7741 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7743 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7744 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
7745 CloseToolhelp32Snapshot.
7746 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7747 CloseToolhelp32Snapshot.
7749 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
7751 * server.c (main): Check for inferior exit before main loop.
7753 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
7755 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7756 instead of on tmp_desc.
7758 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7759 Daniel Jacobowitz <dan@codesourcery.com>
7761 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7762 (add_thread): Minor cleanups.
7763 (clear_inferiors): Move lower in the file. Clear the DLL
7765 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7766 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7767 (xml_escape_text): New.
7768 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7770 (handle_v_cont): Report errors.
7771 (gdbserver_version): Update.
7772 (main): Correct size of own_buf. Do not report initial DLL events.
7773 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7774 (unloaded_dll, xml_escape_text): New.
7775 * win32-low.c (enum target_waitkind): Update comments.
7776 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7777 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7778 (win32_EnumProcessModules, win32_GetModuleInformation)
7779 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7780 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7781 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7782 (win32_Module32First, win32_Module32Next, load_toolhelp)
7783 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7784 (get_child_debug_event): Handle DLL events.
7785 (win32_wait): Likewise.
7787 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7789 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7790 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7792 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7794 * win32-low.c (handle_output_debug_string): Ignore event if not
7797 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7799 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7801 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7803 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7805 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7807 * inferiors.c (change_inferior_id): Add comment.
7808 * linux-low.c (check_removed_breakpoint): Add an early
7809 prototype. Improve debug output.
7810 (linux_attach): Doc update.
7811 (linux_detach_one_process, linux_detach): Clean up before releasing
7813 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7814 * linux-low.h (struct process_info): Doc improvement.
7815 * mem-break.c (delete_all_breakpoints): New.
7816 * mem-break.h (delete_all_breakpoints): New prototype.
7817 * thread-db.c (find_first_thread): New.
7818 (thread_db_create_event): Call it instead of
7819 thread_db_find_new_threads. Clean up unused variables.
7820 (maybe_attach_thread): Remove first thread handling.
7821 (thread_db_find_new_threads): Use find_first_thread.
7822 (thread_db_get_tls_address): Likewise.
7824 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7826 * thread-db.c (thread_db_find_new_threads): Add prototype.
7827 (thread_db_create_event): Check for the main thread before adding
7829 (maybe_attach_thread): Only enable event reporting if TID == 0.
7830 (thread_db_get_tls_address): Check for new threads.
7832 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7834 * linux-low.c (linux_create_inferior): Try execv before execvp.
7835 * spu-low.c (spu_create_inferior): Likewise.
7837 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7839 * linux-low.c (linux_create_inferior): Change execv to execvp.
7840 * spu-low.c (spu_create_inferior): Likewies.
7842 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7844 * Makefile.in (clean): Clean new files instead of deleted ones.
7845 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7846 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7848 * configure.srv: Specify XML files and new regformats for MIPS and
7850 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7851 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7852 an entry for the restart register.
7853 (mips_cannot_fetch_register, mips_cannot_store_register)
7854 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7855 register names to match the XML descriptions.
7856 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7857 restart register instead of $0.
7859 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7860 Markus Deuling <deuling@de.ibm.com>
7862 * remote-utils.c (decode_xfer_write): New function.
7863 * server.h (decode_xfer_write): Add prototype.
7864 * server.c (handle_query): Add PACKET_LEN argument. Support
7865 qXfer:spu:read and qXfer:spu:write packets.
7866 (main): Pass packet_len to handle_query.
7867 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7868 * target.h (target_ops): Add qxfer_spu.
7870 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7872 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7873 accessing non-seekable spufs files.
7875 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7877 * server.c (handle_query): Add reply for qC packet.
7879 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7880 Leo Zayas <lerele@champenstudios@com>
7882 * server.h (check_remote_input_interrupt_request): New function.
7883 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7884 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7885 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7886 (check_remote_input_interrupt_request): New function.
7887 * server.h (check_remote_input_interrupt_request): Declare.
7888 * win32-low.c (winapi_DebugBreakProcess,
7889 winapi_GenerateConsoleCtrlEvent): New typedefs.
7890 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7892 (win32_wait): Check for remote interrupt request
7893 with check_remote_input_interrupt_request.
7894 (win32_request_interrupt): New function.
7895 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7897 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7899 * win32-low.c (debug_registers_changed,
7900 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7901 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7902 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7903 (thread_rec): Get context using the low target.
7904 (child_add_thread): Call thread_added on the low target,
7905 which does the same thing.
7907 (do_initial_child_stuff): Remove debug registers references.
7908 Set context using the low target. Resume threads after
7909 setting the contexts.
7910 (child_continue): Remove dead variable. Remove debug
7911 registers references.
7912 (child_fetch_inferior_registers): Go through the low target.
7913 (do_child_store_inferior_registers): Remove.
7914 (child_store_inferior_registers): Go through the low target.
7915 (win32_resume): Remove debug registers references.
7916 Set context using the low target.
7917 (handle_exception): Change return type to void. Don't record
7918 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7919 first chance exception.
7920 (get_child_debug_event): Change return type to void. Remove
7921 goto loop. Always return after waiting for debug event.
7922 (win32_wait): Convert to switch statement. Handle spurious
7925 * win32-i386-low.c (debug_registers_changed,
7926 debug_registers_used): New.
7927 (initial_stuff): Rename to ...
7928 (i386_initial_stuff): ... this. Clear debug registers
7930 (store_debug_registers): Delete.
7931 (i386_get_thread_context): New.
7932 (load_debug_registers): Delete.
7933 (i386_set_thread_context): New.
7934 (i386_thread_added): New.
7935 (single_step): Rename to ...
7936 (i386_single_step): ... this.
7937 (do_fetch_inferior_registers): Rename to ...
7938 (i386_fetch_inferior_register): ... this.
7939 (i386_store_inferior_register): New.
7940 (the_low_target): Adapt to new interface.
7942 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7943 (arm_get_thread_context): New.
7944 (arm_set_thread_context): New.
7946 (do_fetch_inferior_registers): Rename to ...
7947 (arm_fetch_inferior_register): ... this.
7948 (arm_store_inferior_register): New.
7949 (arm_wince_breakpoint): Reimplement as unsigned long.
7950 (arm_wince_breakpoint_len): Define.
7951 (the_low_target): Adapt to new interface.
7953 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7954 load_debug_registers. Add get_thread_context, set_thread_context,
7955 thread_added and store_inferior_register. Rename
7956 fetch_inferior_registers to fetch_inferior_register.
7957 (regptr): Remove declaration.
7959 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7961 * linux-low.c (linux_detach): Change return type to int. Return 0.
7962 * spu-low.c (spu_detach): Likewise.
7964 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7966 * target.h (target_ops): Change return type of detach to int.
7968 (join_inferior): New.
7969 * server.c (main): Don't skip detach support on mingw32.
7970 If the inferior doesn't support detaching return error.
7971 Call join_inferior instead of using waitpid.
7972 * linux-low.c (linux_join): New.
7973 (linux_target_op): Add linux_join.
7974 * spu-low.c (spu_join): New.
7975 (spu_target_ops): Add spu_join.
7976 * win32-low.c (win32_detach): Adapt to new interface.
7977 Reopen current_process_handle before detaching. Issue a child
7978 resume before detaching.
7980 (win32_target_op): Add win32_join.
7982 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7984 * win32-low.c (win32-attach): Fix return value.
7985 * target.h (target_ops): Describe ATTACH return values.
7987 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7989 * win32-low.c (GETPROCADDRESS): Define.
7990 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7991 (winapi_DebugSetProcessKillOnExit): Likewise.
7992 (win32_create_inferior): Force usage of ansi CreateProcessA.
7993 (win32_attach): Use GETPROCADDRESS.
7994 (win32_detach): Likewise.
7996 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7998 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8000 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8002 * win32-low.c: Commit leftover changes from 2007-03-29.
8004 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8006 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8007 fields short instead of int. Add explicit padding.
8008 (i387_cache_to_fsave): Remove unnecessary casts.
8009 (i387_fsave_to_cache): Doc fix.
8010 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8012 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8014 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8015 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8017 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8019 * configure.srv (arm*-*-mingw32ce*): Move near the other
8022 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8024 * configure.ac: Add errno checking.
8025 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8026 sys/file.h and malloc.h.
8027 (AC_CHECK_DECLS): Add perror.
8028 (srv_mingwce): Handle.
8029 * configure.srv (i[34567]86-*-cygwin*): Add
8030 win32-i386-low.o to srv_tgtobj.
8031 (i[34567]86-*-mingw*): Likewise.
8032 (arm*-*-mingw32ce*): Add case.
8033 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8034 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8035 [__MINGW32CE__] (strerror): New function.
8036 [__MINGW32CE__] (errno): Define to GetLastError.
8037 [__MINGW32CE__] (COUNTOF): New macro.
8038 (remote_open): Remove extra close call.
8039 * mem-break.c (delete_breakpoint_at): New function.
8040 * mem-break.h (delete_breakpoint_at): Declare.
8041 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8042 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8043 [USE_WIN32API] (read, write): Add char* casts.
8044 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8045 * server.h: Include wincecompat.h on Windows CE.
8046 [HAVE_ERRNO_H]: Check.
8047 (perror): Declare if not declared.
8048 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8049 (perror_with_name): Remove errno declaration.
8050 * wincecompat.h: New.
8051 * wincecompat.c: New.
8053 * win32-arm-low.c: New.
8054 * win32-i386-low.c: New.
8055 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8056 (OUTMSG2): Make it safe.
8058 (COUNTOF): New macro.
8059 (NUM_REGS): Get it from the low target.
8060 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8061 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8062 (thread_rec): Let low target handle debug registers.
8063 (child_add_thread): Likewise.
8064 (child_init_thread_list): Likewise.
8065 (continue_one_thread): Likewise.
8067 (do_child_fetch_inferior_registers): Move to ...
8068 * win32-i386-low.c: ... here, and rename to ...
8069 (do_fetch_inferior_registers): ... this.
8070 * win32-low.c (child_fetch_inferior_registers):
8071 Go through the low target.
8072 (do_child_store_inferior_registers): Use regptr.
8073 (strwinerror): New function.
8074 (win32_create_inferior): Handle Windows CE.
8075 Use strwinerror instead of strerror on Windows error
8076 codes. Add program to the error output.
8077 Don't close the main thread handle on Windows CE.
8078 (win32_attach): Use coredll.dll on Windows CE.
8079 (win32_kill): Close current process and current
8081 (win32_detach): Use coredll.dll on Windows CE.
8082 (win32_resume): Let low target handle debug registers, and
8084 (handle_exception): Add/Remove initial breakpoint. Avoid
8085 non-existant WSTOPSIG on Windows CE.
8086 (win32_read_inferior_memory): Cast to remove warning.
8087 (win32_arch_string): Go through the low target.
8088 (initialize_low): Call set_breakpoint_data with the low
8089 target's breakpoint.
8090 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8091 FOP_REGNUM, mappings): Move to ...
8092 * win32-i386-low.c: ... here.
8093 * win32-low.c (win32_thread_info): Move to ...
8094 * win32-low.h: ... here.
8095 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8096 win32-arm-low.c and wincecompat.c.
8097 (all:): Add $EXEEXT.
8098 (install-only:): Likewise.
8099 (gdbserver:): Likewise.
8100 (gdbreplay:): Likewise.
8101 * config.in: Regenerate.
8102 * configure: Regenerate.
8104 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8106 * win32-low.c: Rename typedef thread_info to
8107 win32_thread_info throughout.
8109 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8111 * win32-i386-low.c: Rename to ...
8112 * win32-low.c: ... this.
8113 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8114 * Makefile.in: Likewise.
8116 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8118 * remote-utils.c (monitor_output): Constify msg parameter.
8119 * server.h (monitor_output): Likewise.
8120 * win32-i386-low.c (handle_output_debug_string): New.
8121 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8122 handle_output_debug_string.
8123 (get_child_debug_event): Likewise.
8125 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8127 * server.c (main): Correct strtoul check.
8129 2007-03-27 Jon Ringle <jon@ringle.org>
8131 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8133 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8135 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8137 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8139 * terminal.h: Check HAVE_SGTTY_H.
8141 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
8143 * remote-utils.c (remote_open): Print out the assigned port number.
8145 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8147 * remote-utils.c (monitor_output): New function.
8148 * server.c (debug_threads): Define here.
8149 (monitor_show_help): New function.
8150 (handle_query): Handle qRcmd.
8151 (main): Do not handle 'd' packet.
8152 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8153 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8156 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8158 * Makefile.in (EXEEXT): New.
8159 (clean): Use $(EXEEXT).
8161 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8163 * target.h (target_ops): Rename send_signal to request_interrupt,
8164 and remove enum target_signal parameter.
8165 * linux-low.c (linux_request_interrupt): Rename from
8166 linux_send_signal, and always send SIGINT.
8167 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8168 and always send SIGINT.
8169 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8171 (input_interrupt): Likewise.
8173 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8175 * server.c (get_features_xml): Check if target implemented
8177 * win32-i386-low.c (win32_arch_string): New.
8178 (win32_target_ops): Add win32_arch_string as arch_string member.
8180 2007-02-22 Markus Deuling <deuling@de.ibm.com>
8182 * spu-low.c (spu_arch_string): New.
8183 (spu_target_ops): Add spu_arch_string.
8185 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8187 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8188 * configure.ac: Do not check for terminal.h.
8189 * configure, config.in: Regenerated.
8191 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8193 * Makefile.in (OBS): Add $(XML_BUILTIN).
8194 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8196 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8197 (arm-with-iwmmxt.c): New.
8198 * config.in, configure: Regenerate.
8199 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8200 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8201 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8202 (arm*-*-linux*): Add iWMMXt and regset support.
8203 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8204 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8205 (arm_store_wmmxregset, target_regsets): New.
8206 * server.c (get_features_xml): Take annex argument. Check builtin
8208 (handle_query): Handle multiple annexes.
8210 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8212 * remote-utils.c [USE_WIN32API] (read, write): Define.
8213 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8216 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8218 * linux-i386-low.c (the_low_target): Set arch_string.
8219 * linux-x86-64-low.c (the_low_target): Likewise.
8220 * linux-low.c (linux_arch_string): New.
8221 (linux_target_ops): Add it.
8222 * linux-low.h (struct linux_target_ops): Add arch_string.
8223 * server.c (write_qxfer_response): Use const void * for DATA.
8224 (get_features_xml): New.
8225 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8226 * target.h (struct target_ops): Add arch_string method.
8228 2007-01-03 Denis Pilat <denis.pilat@st.com>
8229 Daniel Jacobowitz <dan@codesourcery.com>
8231 * linux-low.c (linux_kill): Handle being called with no threads.
8232 * win32-i386-low.c (win32_kill): Likewise.
8233 (get_child_debug_event): Clear current_process_handle.
8235 2006-12-30 Denis PILAT <denis.pilat@st.com>
8236 Daniel Jacobowitz <dan@codesourcery.com>
8238 * remote-utils.c (remote_open): Check the type of specified
8239 serial port devices before opening them.
8240 * server.c (main): Kill the inferior if an error occurs during
8241 the first remote_open.
8243 2006-12-05 Markus Deuling <deuling@de.ibm.com>
8245 * README: Update supported targets.
8247 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
8249 * Makefile.in (clean): Remove reg-mips64.c.
8250 (reg-mips64.c, reg-mips64.o): New rules.
8251 * configure.srv: Handle mips64. Include regset support for mips.
8252 * linux-mips-low.c (union mips_register): New.
8253 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
8254 (mips_breakpoint, mips_breakpoint_at): Use int.
8255 (mips_collect_register, mips_supply_register)
8256 (mips_collect_register_32bit, mips_supply_register_32bit)
8257 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8258 (mips_store_fpregset, target_regsets): New.
8259 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
8261 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
8263 * configure.srv: Add target "spu*-*-*".
8264 * Makefile.in (clean): Remove reg-spu.c.
8265 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
8266 * spu-low.c: New file.
8268 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8270 * configure.ac: Correct td_thr_tls_get_addr test.
8271 * configure: Regenerated.
8273 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8275 * linux-low.c (linux_wait_for_event): Reformat. Use the
8277 * remote-utils.c (decode_address_to_semicolon): New.
8278 * server.c (pass_signals, handle_general_set): New.
8279 (handle_query): Mention QPassSignals for qSupported.
8280 (main): Call handle_general_set.
8281 * server.h (pass_signals, decode_address_to_semicolon): New.
8283 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
8285 * server.c (handle_query): Correct error handling for read_auxv.
8287 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
8289 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
8290 and srv_linux_thread_db to yes.
8291 * linux-s390-low.c (s390_fill_gregset): New function.
8292 (target_regsets): Define data structure.
8294 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
8296 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
8297 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
8298 * config.in, configure: Regenerated.
8299 * inferiors.c (gdb_id_to_thread): New function.
8300 (gdb_id_to_thread_id): Use it.
8301 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
8302 * linux-low.h (struct process_info): Add th member.
8303 (thread_db_get_tls_address): New prototype.
8304 * remote-utils.c (decode_address): Make non-static.
8305 * server.c (handle_query): Handle qGetTLSAddr.
8306 * server.h (gdb_id_to_thread, decode_address): New prototypes.
8307 * target.h (struct target_ops): Add get_tls_address.
8308 * thread-db.c (maybe_attach_thread): Save the thread handle.
8309 (thread_db_get_tls_address): New.
8311 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
8313 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
8314 (linux_resume_one_process): Take a siginfo_t *. Update all
8315 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
8316 (struct pending_signals): Add a siginfo_t.
8317 (linux_wait_for_process): Always set last_status.
8318 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
8319 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
8320 * linux-low.h (struct process_info): Add last_status.
8322 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
8324 * remote-utils.c (try_rle): New function.
8325 (putpkt_binary): Use it.
8327 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
8329 * Makefile.in (clean): Clean reg-x86-64-linux.c.
8330 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
8331 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
8332 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
8333 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
8336 2006-08-08 Richard Sandiford <richard@codesourcery.com>
8338 * server.c (terminal_fd): New variable.
8339 (old_foreground_pgrp): Likewise.
8340 (restore_old_foreground_pgrp): New function.
8341 (start_inferior): Record the terminal file descriptor in terminal_fd
8342 and its original foreground group in old_foreground_pgrp. Register
8343 restore_old_foreground_pgrp with atexit().
8345 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
8347 * server.c (handle_query): Correct qPart to qXfer.
8349 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
8351 * configure.ac: Check for more headers which are missing on
8352 Windows. Automatically supply -lwsock32 and USE_WIN32API.
8353 * configure.srv: Add Cygwin and mingw32.
8354 * remote-utils.c: Don't include headers unconditionally which
8355 are missing on mingw32. Include <winsock.h> for mingw32.
8356 (remote_open): Adjust for mingw32 support. Flush
8357 standard error after writing to it.
8358 (remote_close, putpkt_binary, input_interrupt, block_async_io)
8359 (unblock_async_io, enable_async_io, disable_async_io)
8360 (readchar, getpkt): Update for Winsock support.
8361 (prepare_resume_reply): Expect a protocol signal number.
8362 * server.c: Disable <sys/wait.h> on mingw32.
8363 (start_inferior): Adjust for mingw32 support. Flush
8364 standard error after writing to it.
8365 (attach_inferior): Likewise. Use protocol signal
8367 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
8369 * win32-i386-low.c: New file.
8370 * Makefile.in (XM_CLIBS): Set.
8371 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
8372 (win32-i386-low.o): New dependency rule.
8373 * linux-low.c (linux_wait): Use target signal numbers.
8374 * target.h (struct target_ops): Doc fix.
8375 * server.h (target_signal_to_name): New prototype.
8376 * gdbreplay.c: Don't include headers unconditionally which
8377 are missing on mingw32. Include <winsock.h> for mingw32.
8378 (remote_close, remote_open): Adjust for Winsock support.
8379 * configure, config.in: Regenerated.
8381 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8383 * server.c (decode_xfer_read, write_qxfer_response): New.
8384 (handle_query): Take a packet length argument. Handle
8385 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
8386 the qSupported response.
8387 (main): Update call to handle_query.
8389 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
8391 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
8392 (putpkt_binary): Renamed from putpkt and adjusted for binary
8394 (putpkt): New wrapper for putpkt_binary.
8395 (readchar): Don't mask off the high bit.
8396 (decode_X_packet): New function.
8397 * server.c (main): Call putpkt_binary if a handler sets the packet
8398 length. Save the length of the incoming packet. Handle 'X'.
8399 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
8401 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
8403 * server.c (handle_query): Handle qSupported.
8405 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8407 * remote-utils.c (all_symbols_looked_up): New variable.
8408 (look_up_one_symbol): Check it.
8409 * server.h (look_up_one_symbol): New declaration.
8410 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
8412 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8414 * Makefile.in (linux-arm-low.o): Update dependencies.
8415 * linux-arm-low.c: Include "gdb_proc_service.h".
8416 (PTRACE_GET_THREAD_AREA): Define.
8417 (ps_get_thread_area): New function.
8419 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
8421 * configure.srv (m68k*-*-uclinux*): New target.
8422 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
8423 (linux_resume_one_process): Remove extraneous cast.
8424 (linux_read_offsets): New.
8425 (linux_target_op): Add linux_read_offsets on mmuless systems.
8426 * server.c (handle_query): Add qOffsets logic.
8427 * target.h (struct target_ops): Add read_offsets.
8429 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8431 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
8432 (PTRACE_GET_THREAD_AREA): Define.
8433 (ps_get_thread_area): New function.
8434 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
8435 (linux-x86-64-low.o): Update.
8437 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8439 * configure.ac: Remove checks for prfpregset_t.
8440 * gdb_proc_service.h: New file.
8441 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
8442 new "gdb_proc_service.h".
8443 * proc-service.c: Likewise.
8444 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
8445 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
8446 * Makefile.in (gdb_proc_service_h): Updated.
8447 * configure, config.in: Regenerated.
8449 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8451 * remote-utils.c (prepare_resume_reply): Move declaration
8452 of gdb_id_from_wait to the top of the block.
8454 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8456 * linux-low.c (regsets_store_inferior_registers): Read the regset
8457 from the target before filling it.
8459 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8461 * server.c (attach_inferior): Return SIGTRAP for a successful
8464 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8466 * Makefile.in (OBS): Add version.o.
8467 (STAGESTUFF): Delete.
8468 (version.o): Add dependencies.
8469 (version.c): Replace rule.
8470 (clean): Remove version.c.
8471 * server.c (gdbserver_version): New.
8472 (gdbserver_usage): Use printf.
8473 (main): Handle --version and --help.
8474 * server.h (version, host_name): Add declarations.
8476 2005-12-23 Eli Zaretskii <eliz@gnu.org>
8488 * linux-x86-64-low.c:
8491 * linux-ppc64-low.c:
8500 * linux-crisv32-low.c:
8512 * gdbserver.1: Add (C) after Copyright. Update the FSF
8515 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
8517 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
8518 (arm_breakpoint_at): Recognize both breakpoints.
8519 (the_low_target): Use the correct breakpoint instruction.
8521 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
8523 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
8524 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
8525 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
8526 (the_low_target): Update.
8528 2005-10-25 Andreas Schwab <schwab@suse.de>
8530 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
8532 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
8533 (ia64_num_regs): Reduce to 462.
8535 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
8537 * acinclude.m4: Correct quoting.
8538 * aclocal.m4: Regenerated.
8540 Suggested by SZOKOVACS Robert <szo@ies.hu>:
8541 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
8542 (thread_db_init): Call thread_db_err_str.
8543 * configure.ac: Check for TD_VERSION.
8544 * config.in, configure: Regenerated.
8546 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8548 * server.h (error, fatal, warning): Add ATTR_FORMAT.
8550 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8552 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
8553 is not available. Define HAVE_PTRACE_GETREGS if it is.
8554 * config.in, configure: Regenerated.
8555 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
8556 * linux-i386-low.c, linux-m68k-low.c: Update to use
8557 HAVE_PTRACE_GETREGS.
8558 * linux-low.c (regsets_fetch_inferior_registers)
8559 (regsets_store_inferior_registers): Only return 0 if we processed
8561 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
8562 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
8564 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8566 * inferiors.c (struct thread_info): Add gdb_id.
8567 (add_thread): Add gdb_id argument.
8568 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
8569 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
8570 calls to add_thread.
8571 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
8572 * server.c (handle_query): Use thread_to_gdb_id.
8573 (handle_v_cont, main): Use gdb_id_to_thread_id.
8574 * server.h (add_thread): Update prototype.
8575 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
8578 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8580 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
8581 left-padded registers.
8582 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
8583 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
8585 2005-07-01 Steve Ellcey <sje@cup.hp.com>
8587 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
8588 * configure: Regenerate.
8589 * config.in: Regenerate.
8590 * server.h (NEED_DECLARATION_STRERROR):
8591 Replace with !HAVE_DECL_STRERROR.
8593 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
8595 * linux-low.c (linux_wait, linux_send_signal): Don't test
8596 an unsigned long variable for > 0 if it could be MAX_ULONG.
8597 * server.c (myresume): Likewise.
8598 * target.c (set_desired_inferior): Likewise.
8600 2005-06-13 Mark Kettenis <kettenis@gnu.org>
8602 * configure.ac: Simplify and improve check for socklen_t.
8603 * configure, config.in: Regenerate.
8605 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
8607 * acconfig.h: Remove.
8608 * configure.ac: Add a test for socklen_t. Use three-argument
8609 AC_DEFINE throughout.
8610 * config.in: Regenerated using autoheader 2.59.
8611 * configure: Regenerated.
8613 * gdbreplay.c (socklen_t): Provide a default.
8614 (remote_open): Use socklen_t.
8615 * remote-utils.c (socklen_t): Provide a default.
8616 (remote_open): Use socklen_t.
8617 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
8620 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
8622 * linux-low.c (linux_read_memory, linux_write_memory)
8623 (linux_read_auxv): Likewise.
8624 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
8625 (check_mem_write): Likewise.
8626 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
8628 * regcache.c (struct inferior_rgcache_data, registers_to_string)
8629 (registers_from_string, register_data): Likewise.
8630 * server.c (handle_query, main): Likewise.
8631 * server.h (convert_ascii_to_int, convert_int_to_ascii)
8632 (decode_M_packet): Likewise.
8633 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
8634 * target.h (struct target_ops): Update read_memory, write_memory,
8636 (read_inferior_memory, write_inferior_memory): Update.
8637 * linux-low.h (struct linux_target_ops): Change type of breakpoint
8639 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
8640 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
8641 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
8642 linux-s390-low.c, linux-sh-low.c: Update for changes in
8643 read_inferior_memory and the_low_target->breakpoint.
8645 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
8647 * Makefile.in (SFILES): Add linux-ppc64-low.c.
8648 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
8649 * configure.srv: Add powerpc64-*-linux*.
8650 * linux-ppc64-low.c: New file.
8652 2005-05-23 Orjan Friberg <orjanf@axis.com>
8654 * linux-cris-low.c: New file with support for CRIS.
8655 * linux-crisv32-low.c: Ditto for CRISv32.
8656 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
8657 (clean): Add reg-cris.c and reg-crisv32.c.
8658 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
8659 reg-crisv32.o, and reg-crisv32.c to make rules.
8660 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
8663 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
8665 * linux-low.c (fetch_register): Ensure buffer size is a multiple
8666 of sizeof (PTRACE_XFER_TYPE).
8667 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
8669 2005-05-12 Orjan Friberg <orjanf@axis.com>
8671 * target.h (struct target_ops): Add insert_watchpoint,
8672 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
8673 pointers for hardware watchpoint support.
8674 * linux-low.h (struct linux_target_ops): Ditto.
8675 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
8676 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
8677 to linux_target_ops.
8678 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
8680 * server.c (main): Recognize 'Z' and 'z' packets.
8682 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
8684 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
8685 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
8686 (the_low_target): Add new members.
8688 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8690 * proc-service.c (ps_lgetregs): Search all_processes instead of
8693 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8695 * server.c (start_inferior): Change return type to int.
8696 (attach_inferior): Change sigptr to int *.
8697 (handle_v_cont, handle_v_requests): Change signal to int *.
8698 (main): Change signal to int.
8700 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
8702 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
8703 * configure.srv: Add m32r*-*-linux*.
8704 * linux-m32r-low.c: New file.
8706 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
8708 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
8710 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8712 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
8713 Take unsigned long arguments for PIDs.
8714 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
8715 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
8716 (wait_for_sigstop, linux_resume_one_process)
8717 (regsets_fetch_inferior_registers, linux_send_signal)
8718 (linux_read_auxv): Likewise. Update the types of variables holding
8719 PIDs. Update format string specifiers.
8720 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
8721 * remote-utils.c (prepare_resume_reply): Likewise.
8722 * server.c (cont_thread, general_thread, step_thread)
8723 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
8725 (handle_query): Update format specifiers.
8726 (handle_v_cont, main): Use strtoul for thread IDs.
8727 * server.h (struct inferior_list_entry): Use unsigned long for ID.
8728 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
8729 (general_thread, step_thread, thread_from_wait)
8730 (old_thread_from_wait): Update.
8731 * target.h (struct thread_resume): Use unsigned long for THREAD.
8732 (struct target_ops): Use unsigned long for arguments to attach and
8735 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
8737 * acinclude.m4: Include bfd/bfd.m4 directly.
8738 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
8739 <agriffis@toolchain.org>.
8740 * aclocal.m4, configure: Regenerated.
8742 2005-01-07 Andrew Cagney <cagney@gnu.org>
8744 * configure.ac: Rename configure.in, require autoconf 2.59.
8745 * configure: Re-generate.
8747 2004-12-08 Daniel Jacobowitz <dan@debian.org>
8749 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
8751 * aclocal.m4: Regenerated.
8752 * configure: Regenerated.
8754 2004-11-21 Andreas Schwab <schwab@suse.de>
8756 * linux-m68k-low.c (m68k_num_gregs): Define.
8757 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8758 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8759 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8760 (m68k_breakpoint_at): New. Add to the_low_target.
8762 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8763 srv_linux_thread_db to yes.
8765 2004-10-20 Joel Brobecker <brobecker@gnat.com>
8767 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8768 (ARCH_SET_FS): Likewise.
8769 (ARCH_GET_FS): Likewise.
8770 (ARCH_GET_GS): Likewise.
8772 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8774 * linux-i386-low.c (ps_get_thread_area): New.
8775 * linux-x86-64-low.c (ps_get_thread_area): New.
8776 * linux-low.c: Include <sys/syscall.h>.
8777 (linux_kill_one_process): Don't kill the first thread here.
8778 (linux_kill): Kill the first thread here.
8779 (kill_lwp): New function.
8780 (send_sigstop, linux_send_signal): Use it.
8781 * proc-service.c: Clean up #ifdefs.
8782 (fpregset_info): Delete.
8783 (ps_lgetregs): Update and enable implementation.
8784 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8786 * remote-utils.c (struct sym_cache, symbol_cache): New.
8787 (input_interrupt): Print a clearer message.
8788 (async_io_enabled): New variable.
8789 (enable_async_io, disable_async_io): Use it. Update comments.
8790 (look_up_one_symbol): Use the symbol cache.
8791 * thread-db.c (thread_db_look_up_symbols): New function.
8792 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8794 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8796 * configure.in: Test for -rdynamic.
8797 * configure: Regenerated.
8798 * Makefile (INTERNAL_LDFLAGS): New.
8799 (gdbserver, gdbreplay): Use it.
8801 2004-09-02 Andrew Cagney <cagney@gnu.org>
8803 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8805 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8807 * linux-low.c (linux_wait): Clear all_processes list also.
8809 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8811 * linux-low.c: Include <errno.h>. Remove extern declaration of
8814 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8816 * gdbreplay.c, server.h, utils.c: Update copyright years.
8818 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8820 * server.c (main): Print child status or termination signal from
8821 variable 'signal', not 'sig'.
8823 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8825 * linux-low.c (linux_read_memory): Change return type to
8826 int. Check for and return error from ptrace().
8827 * target.c (read_inferior_memory): Change return type to int. Pass
8828 back return status from the_target->read_memory().
8829 * target.h (struct target_ops): Adapt *read_memory() prototype.
8831 (read_inferior_memory): Adapt prototype.
8832 * server.c (main): Return an error packet if
8833 read_inferior_memory() returns an error.
8835 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8837 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8838 Unify with other clean targets.
8840 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8842 * server.c (handle_v_cont): Call set_desired_inferior.
8844 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8846 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8848 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8850 * linux-low.c (linux_wait): Unblock async I/O.
8851 (linux_resume): Block and enable async I/O.
8852 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8853 * server.h (block_async_io, unblock_async_io): Add prototypes.
8855 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8857 * remote-utils.c (remote_open): Print a status notice after
8859 * server.c (attach_inferior): Print a status notice after
8862 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8864 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8866 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8868 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8870 * server.c, target.h: Update copyright years.
8872 2004-02-25 Roland McGrath <roland@redhat.com>
8874 * target.h (struct target_ops): New member `read_auxv'.
8875 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8876 * linux-low.c (linux_read_auxv): New function.
8877 (linux_target_ops): Initialize `read_auxv' member to that.
8879 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8881 Committed by Jim Blandy <jimb@redhat.com>.
8883 * linux-s390-low.c (s390_num_regs): Update.
8884 (s390_regmap): Remove control registers. Use __s390x__ predefine
8885 instead of GPR_SIZE to distiguish s390 and s390x targets.
8887 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8889 * linux-low.c: Update copyright year.
8890 (check_removed_breakpoint): Clear pending_is_breakpoint.
8891 (linux_set_resume_request, linux_queue_one_thread)
8892 (resume_status_pending_p): New functions.
8893 (linux_continue_one_thread): Use process->resume.
8894 (linux_resume): Only resume threads if there are no pending events.
8895 * linux-low.h (struct process_info): Add resume request
8898 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8900 * regcache.c (new_register_cache): Clear the allocated register
8901 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8903 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8905 * linux-low.c (linux_resume): Take a struct thread_resume *
8907 (linux_wait): Update call.
8908 (resume_ptr): New static variable.
8909 (linux_continue_one_thread): Renamed from
8910 linux_continue_one_process. Use resume_ptr.
8911 (linux_resume): Use linux_continue_one_thread.
8912 * server.c (handle_v_cont, handle_v_requests): New functions.
8913 (myresume): New function.
8914 (main): Handle 'v' case.
8915 * target.h (struct thread_resume): New type.
8916 (struct target_ops): Change argument of "resume" to struct
8918 (myresume): Delete macro.
8920 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8922 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8923 (uninstall): Support DESTDIR.
8925 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8927 * configure.srv: Add xscale*linux copy of arm*linux entry.
8929 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8931 * linux-arm-low.c (arm_reinsert_addr): New function.
8932 (the_low_target): Add arm_reinsert_addr.
8934 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8936 * mem-break.c: Remove whitespace at end of file.
8938 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8940 * configure.in: Check whether we need to prototype strerror.
8941 * server.h: Optionally prototype strerror.
8942 * gdbreplay.c (perror_with_name): Use strerror.
8943 * linux-low.c (linux_attach_lwp): Use strerror.
8944 * utils.c (perror_with_name): Use strerror.
8945 * config.in, configure: Regenerated.
8947 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8949 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8950 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8952 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8954 * Makefile.in (SFILES): Update.
8955 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8956 low-sun3.c: Remove files.
8958 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8960 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8961 (linux_detach_one_process, linux_detach): New functions.
8962 (linux_target_ops): Add linux_detach.
8963 * server.c (main): Handle 'D' packet.
8964 * target.h (struct target_ops): Add "detach" member.
8965 (detach_inferior): Define.
8967 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8969 From Kelley Cook <kelleycook@wideopenwest.com>:
8970 * configure.srv: Accept i[34567]86 variants.
8972 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8974 * linux-low.c (linux_wait_for_event): Correct comment typos.
8975 (linux_resume_one_process): Call check_removed_breakpoint.
8976 (linux_send_signal): New function.
8977 (linux_target_ops): Add linux_send_signal.
8978 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8980 * target.h (struct target_ops): Add send_signal.
8982 2003-05-29 Jim Blandy <jimb@redhat.com>
8984 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8985 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8986 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8987 away part of the register's value.
8989 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8991 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8992 (linux_wait_for_event, linux_init_signals): Likewise.
8994 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8996 * configure.in: Check for stdlib.h.
8997 * configure: Regenerated.
8998 * config.in: Regenerated.
9000 2003-01-04 Andreas Schwab <schwab@suse.de>
9002 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9004 2003-01-02 Andrew Cagney <ac131313@redhat.com>
9006 * Makefile.in: Remove obsolete code.
9008 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
9010 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9011 defined(PT_FPR0_HI).
9013 2002-11-17 Stuart Hughes <seh@zee2.com>
9015 * linux-arm-low.c (arm_num_regs): Increase.
9016 (arm_regmap): Include status register.
9018 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
9020 * linux-low.c (register_addr): Remove incorrect -1 check.
9022 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
9024 * linux-low.c (linux_create_inferior): Call setpgid. Return
9026 (unstopped_p, linux_signal_pid): Remove.
9027 (linux_target_ops): Remove linux_signal_pid.
9028 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9029 global instead of target method.
9030 * target.h (struct target_ops): Remove signal_pid. Update comment
9031 for create_inferior.
9032 * server.c (signal_pid): New variable.
9033 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
9034 gdbserver. Set the child to be the foreground process group.
9035 (attach_inferior): Set signal_pid.
9037 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
9039 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9041 2002-08-20 Jim Blandy <jimb@redhat.com>
9043 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9046 2002-08-01 Andrew Cagney <cagney@redhat.com>
9048 * Makefile.in: Make chill references obsolete.
9050 2002-07-24 Kevin Buettner <kevinb@redhat.com>
9052 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9053 * configure: Regenerate.
9054 * config.in: Regenerate.
9056 2002-07-09 David O'Brien <obrien@FreeBSD.org>
9058 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9059 (perror_with_name, remote_close, remote_open, expect, play): Static.
9061 2002-07-04 Michal Ludvig <mludvig@suse.cz>
9063 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
9064 byte offsets instead of an array of indexes.
9065 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9067 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
9069 * regcache.c: Add comment.
9071 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
9073 * thread-db.c: New file.
9074 * proc-service.c: New file.
9075 * acinclude.m4: New file.
9076 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9077 proc-service.o, and thread-db.o.
9078 (linux-low.o): Add USE_THREAD_DB.
9079 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9080 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9081 * aclocal.m4: Regenerated.
9082 * config.in: Regenerated.
9083 * configure: Regenerated.
9084 * configure.in: Check for proc_service.h, sys/procfs.h,
9085 thread_db.h, and linux/elf.h headrs.
9086 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9087 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9088 Check for -lthread_db and thread support.
9089 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9090 PowerPC, and SuperH.
9091 * i387-fp.c: Constify arguments.
9092 * i387-fp.h: Likewise.
9093 * inferiors.c: (struct thread_info): Renamed from
9094 `struct inferior_info'. Remove PID member. Use generic inferior
9095 list header. All uses updated.
9096 (inferiors, signal_pid): Removed.
9097 (all_threads): New variable.
9098 (get_thread): Define.
9099 (add_inferior_to_list): New function.
9100 (for_each_inferior): New function.
9101 (change_inferior_id): New function.
9102 (add_inferior): Removed.
9103 (remove_inferior): New function.
9104 (add_thread): New function.
9105 (free_one_thread): New function.
9106 (remove_thread): New function.
9107 (clear_inferiors): Use for_each_inferior and free_one_thread.
9108 (find_inferior): New function.
9109 (find_inferior_id): New function.
9110 (inferior_target_data): Update argument type.
9111 (set_inferior_target_data): Likewise.
9112 (inferior_regcache_data): Likewise.
9113 (set_inferior_regcache_data): Likewise.
9114 * linux-low.c (linux_bp_reinsert): Remove.
9115 (all_processes, stopping_threads, using_thrads)
9116 (struct pending_signals, debug_threads, pid_of): New.
9117 (inferior_pid): Replace with macro.
9118 (struct inferior_linux_data): Remove.
9119 (get_stop_pc, add_process): New functions.
9120 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9121 Use add_process and add_thread.
9122 (linux_attach_lwp): New function, based on old linux_attach. Use
9123 add_process and add_thread. Set stop_expected for new threads.
9124 (linux_attach): New function.
9125 (linux_kill_one_process): New function.
9126 (linux_kill): Kill all LWPs.
9127 (linux_thread_alive): Use find_inferior_id.
9128 (check_removed_breakpoints, status_pending_p): New functions.
9129 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9130 Update. Use WNOHANG. Wait for cloned processes also. Update process
9131 struct for the found process.
9132 (linux_wait_for_event): New function.
9133 (linux_wait): Use it. Support LWPs.
9134 (send_sigstop, wait_for_sigstop, stop_all_processes)
9135 (linux_resume_one_process, linux_continue_one_process): New functions.
9136 (linux_resume): Support LWPs.
9137 (REGISTER_RAW_SIZE): Remove.
9138 (fetch_register): Use register_size instead. Call supply_register.
9139 (usr_store_inferior_registers): Likewise. Call collect_register.
9141 (regsets_fetch_inferior_registers): Improve error message.
9142 (regsets_store_inferior_registers): Add debugging.
9143 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9144 (unstopped_p, linux_signal_pid): New functions.
9145 (linux_target_ops): Add linux_signal_pid.
9146 (linux_init_signals): New function.
9147 (initialize_low): Call it. Initialize using_threads.
9148 * regcache.c (inferior_regcache_data): Add valid
9150 (get_regcache): Fetch registers lazily. Add fetch argument
9151 and update all callers.
9152 (regcache_invalidate_one, regcache_invalidate): New
9154 (new_register_cache): Renamed from create_register_cache.
9155 Return the new regcache.
9156 (free_register_cache): Change argument to a void *.
9157 (registers_to_string, registers_from_string): Call get_regcache
9158 with fetch flag set.
9159 (register_data): Make static. Pass fetch flag to get_regcache.
9160 (supply_register): Call get_regcache with fetch flag clear.
9161 (collect_register): Call get_regcache with fetch flag set.
9162 (collect_register_as_string): New function.
9163 * regcache.h: Update.
9164 * remote-utils.c (putpkt): Flush after debug output and use
9166 Handle input interrupts while waiting for an ACK.
9167 (input_interrupt): Use signal_pid method.
9168 (getpkt): Flush after debug output and use stderr.
9169 (outreg): Use collect_register_as_string.
9170 (new_thread_notify, dead_thread_notify): New functions.
9171 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9173 (look_up_one_symbol): Flush after debug output.
9174 * server.c (step_thread, server_waiting): New variables.
9175 (start_inferior): Don't use signal_pid. Update call to mywait.
9176 (attach_inferior): Update call to mywait.
9177 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9178 (main): Don't fetch/store registers explicitly. Use
9179 set_desired_inferior. Support proposed ``Hs'' packet. Update
9182 (struct inferior_list, struct_inferior_list_entry): New.
9183 * target.c (set_desired_inferior): New.
9184 (write_inferior_memory): Constify.
9185 (mywait): New function.
9187 (struct target_ops): New signal_pid method.
9188 (mywait): Removed macro, added prototype.
9190 * linux-low.h (regset_func): Removed.
9191 (regset_fill_func, regset_store_func): New.
9192 (enum regset_type): New.
9193 (struct regset_info): Add type field. Use new operation types.
9194 (struct linux_target_ops): stop_pc renamed to get_pc.
9195 Add decr_pc_after_break and breakpoint_at.
9196 (get_process, get_thread_proess, get_process_thread)
9197 (strut process_info, all_processes, linux_attach_lwp)
9198 (thread_db_init): New.
9200 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9201 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9202 (the_low_target): Add new members.
9203 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9204 (i386_store_fpxregset): Constify.
9205 (target_regsets): Add new kind identifier.
9206 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9207 (i386_set_pc): Add debugging.
9208 (i386_breakpoint_at): New function.
9209 (the_low_target): Add new members.
9210 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9211 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9212 (mips_breakpoint_at): New.
9213 (the_low_target): Add new members.
9214 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9215 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9216 (the_low_target): Add new members.
9217 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9218 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9219 (the_low_target): Add new members.
9220 * linux-x86-64-low.c (target_regsets): Add new kind
9223 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
9225 From Martin Pool <mbp@samba.org>:
9226 * server.c (gdbserver_usage): New function.
9229 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
9231 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
9234 2002-05-04 Andrew Cagney <ac131313@redhat.com>
9236 * Makefile.in: Remove obsolete code.
9238 2002-04-24 Michal Ludvig <mludvig@suse.cz>
9240 * linux-low.c (regsets_fetch_inferior_registers),
9241 (regsets_store_inferior_registers): Removed cast to int from
9243 * regcache.h: Added declaration of struct inferior_info.
9245 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9247 * inferiors.c (struct inferior_info): Add regcache_data.
9248 (add_inferior): Call create_register_cache.
9249 (clear_inferiors): Call free_register_cache.
9250 (inferior_regcache_data, set_inferior_regcache_data): New functions.
9251 * regcache.c (struct inferior_regcache_data): New.
9252 (registers): Remove.
9253 (get_regcache): New function.
9254 (create_register_cache, free_register_cache): New functions.
9255 (set_register_cache): Don't initialize the register cache here.
9256 (registers_to_string, registers_from_string, register_data): Call
9258 * regcache.h: Add prototypes.
9259 * server.h: Likewise.
9261 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9263 * mem-break.c: New file.
9264 * mem-break.h: New file.
9265 * Makefile.in: Add mem-break.o rule; update server.h
9267 * inferiors.c (struct inferior_info): Add target_data
9269 (clear_inferiors): Free target_data member if set.
9270 (inferior_target_data, set_inferior_target_data): New functions.
9271 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
9272 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
9273 * linux-low.c (linux_bp_reinsert): New variable.
9274 (struct inferior_linux_data): New.
9275 (linux_create_inferior): Use set_inferior_target_data.
9276 (linux_attach): Likewise. Call add_inferior.
9277 (linux_wait_for_one_inferior): New function.
9278 (linux_wait): Call it.
9279 (linux_write_memory): Add const.
9280 (initialize_low): Call set_breakpoint_data.
9281 * linux-low.h (struct linux_target_ops): Add breakpoint
9283 * server.c (attach_inferior): Remove extra add_inferior
9285 * server.h: Include mem-break.h. Update inferior.c
9287 * target.c (read_inferior_memory)
9288 (write_inferior_memory): New functions.
9289 * target.h (read_inferior_memory)
9290 (write_inferior_memory): Change macros to prototypes.
9291 (struct target_ops): Update comments. Add const to write_memory
9294 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
9296 * linux-low.c (usr_store_inferior_registers): Support
9297 registers which are allowed to fail to store.
9298 * linux-low.h (linux_target_ops): Likewise.
9299 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
9300 (ppc_cannot_store_register): FPSCR may not be storable.
9302 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9304 * server.h: Include <string.h> if HAVE_STRING_H.
9305 * ChangeLog: Correct paths in last ChangeLog entry.
9307 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9309 * linux-low.h: Remove obsolete prototypes.
9310 (struct linux_target_ops): New.
9311 (extern the_low_target): New.
9312 * linux-low.c (num_regs, regmap): Remove declarations.
9313 (register_addr): Use the_low_target explicitly.
9314 (fetch_register): Likewise.
9315 (usr_fetch_inferior_registers): Likewise.
9316 (usr_store_inferior_registers): Likewise.
9317 * linux-arm-low.c (num_regs): Remove.
9318 (arm_num_regs): Define.
9319 (arm_regmap): Renamed from regmap, made static.
9320 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
9322 (arm_cannot_store_register): Renamed from cannot_store_register,
9324 (the_low_target): New.
9325 * linux-i386-low.c (num_regs): Remove.
9326 (i386_num_regs): Define.
9327 (i386_regmap): Renamed from regmap, made static.
9328 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
9330 (i386_cannot_store_register): Renamed from cannot_store_register,
9332 (the_low_target): New.
9333 * linux-ia64-low.c (num_regs): Remove.
9334 (ia64_num_regs): Define.
9335 (ia64_regmap): Renamed from regmap, made static.
9336 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
9338 (ia64_cannot_store_register): Renamed from cannot_store_register,
9340 (the_low_target): New.
9341 * linux-m68k-low.c (num_regs): Remove.
9342 (m68k_num_regs): Define.
9343 (m68k_regmap): Renamed from regmap, made static.
9344 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
9346 (m68k_cannot_store_register): Renamed from cannot_store_register,
9348 (the_low_target): New.
9349 * linux-mips-low.c (num_regs): Remove.
9350 (mips_num_regs): Define.
9351 (mips_regmap): Renamed from regmap, made static.
9352 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
9354 (mips_cannot_store_register): Renamed from cannot_store_register,
9356 (the_low_target): New.
9357 * linux-ppc-low.c (num_regs): Remove.
9358 (ppc_num_regs): Define.
9359 (ppc_regmap): Renamed from regmap, made static.
9360 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
9362 (ppc_cannot_store_register): Renamed from cannot_store_register,
9364 (the_low_target): New.
9365 * linux-s390-low.c (num_regs): Remove.
9366 (s390_num_regs): Define.
9367 (s390_regmap): Renamed from regmap, made static.
9368 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
9370 (s390_cannot_store_register): Renamed from cannot_store_register,
9372 (the_low_target): New.
9373 * linux-sh-low.c (num_regs): Remove.
9374 (sh_num_regs): Define.
9375 (sh_regmap): Renamed from regmap, made static.
9376 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
9378 (sh_cannot_store_register): Renamed from cannot_store_register,
9380 (the_low_target): New.
9381 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
9382 (the_low_target): New.
9384 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9386 * Makefile.in: Add stamp-h target.
9387 * configure.in: Create stamp-h.
9388 * configure: Regenerated.
9390 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9392 * inferiors.c: New file.
9393 * target.c: New file.
9394 * target.h: New file.
9395 * Makefile.in: Add target.o and inferiors.o. Update
9397 * linux-low.c (inferior_pid): New static variable,
9398 moved from server.c.
9399 (linux_create_inferior): Renamed from create_inferior.
9400 Call add_inferior. Return 0 on success instead of a PID.
9401 (linux_attach): Renamed from myattach.
9402 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
9403 (linux_thread_alive): Renamed from mythread_alive.
9404 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
9406 (linux_resume): Renamed from myresume. Add missing ``return 0''.
9407 (regsets_store_inferior_registers): Correct error message.
9408 Add missing ``return 0''.
9409 (linux_fetch_registers): Renamed from fetch_inferior_registers.
9410 (linux_store_registers): Renamed from store_inferior_registers.
9411 (linux_read_memory): Renamed from read_inferior_memory.
9412 (linux_write_memory): Renamed from write_inferior_memory.
9413 (linux_target_ops): New structure.
9414 (initialize_low): Call set_target_ops ().
9415 * remote-utils.c (unhexify): New function.
9416 (hexify): New function.
9417 (input_interrupt): Send signals to ``signal_pid''.
9418 * server.c (inferior_pid): Remove.
9419 (start_inferior): Update create_inferior call.
9420 (attach_inferior): Call add_inferior.
9421 (handle_query): New function.
9422 (main): Call handle_query for `q' packets.
9423 * server.h: Include "target.h". Remove obsolete prototypes.
9424 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
9426 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9428 * Makefile.in: Add WARN_CFLAGS. Update configury
9430 * configure.in: Check for <string.h>
9431 * configure: Regenerate.
9432 * config.in: Regenerate.
9433 * gdbreplay.c: Include needed system headers.
9434 (remote_open): Remove strchr prototype.
9435 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
9436 * regcache.c (supply_register): Change buf argument to const void *.
9437 (supply_register_by_name): Likewise.
9438 (collect_register): Change buf argument to void *.
9439 (collect_register_by_name): Likewise.
9440 * regcache.h: Add missing prototypes.
9441 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
9442 * server.c (handle_query): New function.
9443 (attached): New static variable, moved out of main.
9444 (main): Quiet longjmp clobber warnings.
9445 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
9446 * utils.c (error): Remove NORETURN.