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