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