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