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