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