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