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