gdb/gdbserver/
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2 Stan Shebs <stan@codesourcery.com>
3
4 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5 (all): Depend on $(extra_libraries).
6 (install-only): Install the IPA.
7 (IPA_OBJS, IPA_LIB): New.
8 (clean): Remove the IPA lib.
9 (IPAGENT_CFLAGS): New.
10 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14 * configure.ac: Check for atomic builtins support in the compiler.
15 (IPA_DEPFILES, extra_libraries): Define.
16 * configure.srv (ipa_obj): Add description.
17 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
18 (i[34567]86-*-linux*): Set ipa_obj.
19 (x86_64-*-linux*): Set ipa_obj.
20 * linux-low.c (stabilizing_threads): New.
21 (supports_fast_tracepoints): New.
22 (linux_detach): Stabilize threads before detaching.
23 (handle_tracepoints): Handle internal tracing breakpoints. Assert
24 the lwp is either not stabilizing, or is moving out of a jump pad.
25 (linux_fast_tracepoint_collecting): New.
26 (maybe_move_out_of_jump_pad): New.
27 (enqueue_one_deferred_signal): New.
28 (dequeue_one_deferred_signal): New.
29 (linux_wait_for_event_1): If moving out of a jump pad, defer
30 pending signals to later.
31 (linux_stabilize_threads): New.
32 (linux_wait_1): Check if threads need moving out of jump pads, and
33 do it if so.
34 (stuck_in_jump_pad_callback): New.
35 (move_out_of_jump_pad_callback): New.
36 (lwp_running): New.
37 (linux_resume_one_lwp): Handle moving out of jump pads.
38 (linux_set_resume_request): Dequeue deferred signals.
39 (need_step_over_p): Also step over fast tracepoint jumps.
40 (start_step_over): Also uninsert fast tracepoint jumps.
41 (finish_step_over): Also reinsert fast tracepoint jumps.
42 (linux_install_fast_tracepoint_jump): New.
43 (linux_target_ops): Install linux_stabilize_threads and
44 linux_install_fast_tracepoint_jump_pad.
45 * linux-low.h (linux_target_ops) <get_thread_area,
46 install_fast_tracepoint_jump_pad>: New fields.
47 (struct lwp_info) <collecting_fast_tracepoint,
48 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
49 (linux_get_thread_area): Declare.
50 * linux-x86-low.c (jump_insn): New.
51 (x86_get_thread_area): New.
52 (append_insns): New.
53 (push_opcode): New.
54 (amd64_install_fast_tracepoint_jump_pad): New.
55 (i386_install_fast_tracepoint_jump_pad): New.
56 (x86_install_fast_tracepoint_jump_pad): New.
57 (the_low_target): Install x86_get_thread_area and
58 x86_install_fast_tracepoint_jump_pad.
59 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
60 (struct fast_tracepoint_jump): New.
61 (fast_tracepoint_jump_insn): New.
62 (fast_tracepoint_jump_shadow): New.
63 (find_fast_tracepoint_jump_at): New.
64 (fast_tracepoint_jump_here): New.
65 (delete_fast_tracepoint_jump): New.
66 (set_fast_tracepoint_jump): New.
67 (uninsert_fast_tracepoint_jumps_at): New.
68 (reinsert_fast_tracepoint_jumps_at): New.
69 (set_breakpoint_at): Use write_inferior_memory.
70 (uninsert_raw_breakpoint): Use write_inferior_memory.
71 (check_mem_read): Mask out fast tracepoint jumps.
72 (check_mem_write): Mask out fast tracepoint jumps.
73 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
74 (set_fast_tracepoint_jump): Declare.
75 (delete_fast_tracepoint_jump)
76 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
77 (reinsert_fast_tracepoint_jumps_at): Declare.
78 * regcache.c: Don't compile many functions when building the
79 in-process agent library.
80 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
81 the register buffer in the heap.
82 (free_register_cache): If the register buffer isn't owned by the
83 regcache, don't free it.
84 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
85 pre-existing register caches.
86 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
87 type.
88 (convert_ascii_to_int): : Constify `from' parameter type.
89 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
90 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
91 the needed buffer in-place.
92 (relocate_instruction): New.
93 * server.c (handle_query) <qSymbols>: If the target supports
94 tracepoints, give it a chance of looking up symbols. Report
95 support for fast tracepoints.
96 (handle_status): Stabilize threads.
97 (process_serial_event): Adjust.
98 * server.h (struct fast_tracepoint_jump): Forward declare.
99 (struct process_info) <fast_tracepoint_jumps>: New field.
100 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
101 (decode_X_packet, decode_M_packet): Adjust.
102 (relocate_instruction): Declare.
103 (in_process_agent_loaded): Declare.
104 (tracepoint_look_up_symbols): Declare.
105 (struct fast_tpoint_collect_status): Declare.
106 (fast_tracepoint_collecting): Declare.
107 (force_unlock_trace_buffer): Declare.
108 (handle_tracepoint_bkpts): Declare.
109 (initialize_low_tracepoint)
110 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
111 * target.h (struct target_ops) <stabilize_threads,
112 install_fast_tracepoint_jump_pad>: New fields.
113 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
114 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
115 [HAVE_STDINT_H]: Include stdint.h.
116 (trace_debug_1): Rename to ...
117 (trace_vdebug): ... this.
118 (trace_debug): Rename to ...
119 (trace_debug_1): ... this. Add `level' parameter.
120 (trace_debug): New.
121 (ATTR_USED, ATTR_NOINLINE): New.
122 (IP_AGENT_EXPORT): New.
123 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
124 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
125 (about_to_request_buffer_space, trace_buffer_is_full)
126 (stopping_tracepoint, expr_eval_result, error_tracepoint)
127 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
128 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
129 (traceframe_write_count, traceframes_created)
130 (trace_state_variables)
131 New renaming defines.
132 (struct ipa_sym_addresses): New.
133 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
134 (symbol_list): New.
135 (ipa_sym_addrs): New.
136 (all_tracepoint_symbols_looked_up): New.
137 (in_process_agent_loaded): New.
138 (write_e_ipa_not_loaded): New.
139 (maybe_write_ipa_not_loaded): New.
140 (tracepoint_look_up_symbols): New.
141 (debug_threads) [IN_PROCESS_AGENT]: New.
142 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
143 (UNKNOWN_SIDE_EFFECTS): New.
144 (stop_tracing): New.
145 (flush_trace_buffer): New.
146 (stop_tracing_bkpt): New.
147 (flush_trace_buffer_bkpt): New.
148 (read_inferior_integer): New.
149 (read_inferior_uinteger): New.
150 (read_inferior_data_pointer): New.
151 (write_inferior_data_pointer): New.
152 (write_inferior_integer): New.
153 (write_inferior_uinteger): New.
154 (struct collect_static_trace_data_action): Delete.
155 (enum tracepoint_type): New.
156 (struct tracepoint) <type>: New field `type'.
157 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
158 <orig_size, obj_addr_on_target, adjusted_insn_addr>
159 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
160 (tracepoints): Use IP_AGENT_EXPORT.
161 (last_tracepoint): Don't include in the IPA.
162 (stopping_tracepoint): Use IP_AGENT_EXPORT.
163 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
164 (alloced_trace_state_variables): New.
165 (trace_state_variables): Use IP_AGENT_EXPORT.
166 (traceframe_t): Delete unused variable.
167 (circular_trace_buffer): Don't include in the IPA.
168 (trace_buffer_start): Delete.
169 (struct trace_buffer_control): New.
170 (trace_buffer_free): Delete.
171 (struct ipa_trace_buffer_control): New.
172 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
173 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
174 New.
175 (trace_buffer_ctrl): New.
176 (TRACE_BUFFER_CTRL_CURR): New.
177 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
178 Reimplement as macros.
179 (trace_buffer_wrap): Delete.
180 (traceframe_write_count, traceframe_read_count)
181 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
182 (struct tracepoint_hit_ctx) <type>: New field.
183 (struct fast_tracepoint_ctx): New.
184 (memory_barrier): New.
185 (cmpxchg): New.
186 (record_tracepoint_error): Update atomically in the IPA.
187 (clear_inferior_trace_buffer): New.
188 (about_to_request_buffer_space): New.
189 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
190 updating the same buffer.
191 (add_tracepoint): Default the tracepoint's type to trap
192 tracepoint, and orig_size to -1.
193 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
194 internal variables.
195 (create_trace_state_variable): New parameter `gdb'. Handle it.
196 (clear_installed_tracepoints): Clear fast tracepoint jumps.
197 (cmd_qtdp): Handle fast tracepoints.
198 (cmd_qtdv): Adjust.
199 (max_jump_pad_size): New.
200 (gdb_jump_pad_head): New.
201 (get_jump_space_head): New.
202 (claim_jump_space): New.
203 (sort_tracepoints): New.
204 (MAX_JUMP_SIZE): New.
205 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
206 IPA.
207 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
208 support. Upload fast traceframes, and delete internal IPA
209 breakpoints.
210 (stop_tracing_handler): New.
211 (flush_trace_buffer_handler): New.
212 (cmd_qtstop): Upload fast tracepoints.
213 (response_tracepoint): Handle fast tracepoints.
214 (tracepoint_finished_step): Upload fast traceframes. Set the
215 tracepoint hit context's tracepoint type.
216 (handle_tracepoint_bkpts): New.
217 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
218 type. Add comment about fast tracepoints.
219 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
220 non-existing action_str field.
221 (get_context_regcache): Handle fast tracepoints.
222 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
223 to the regcache.
224 (fast_tracepoint_from_jump_pad_address): New.
225 (fast_tracepoint_from_ipa_tpoint_address): New.
226 (collecting_t): New.
227 (force_unlock_trace_buffer): New.
228 (fast_tracepoint_collecting): New.
229 (collecting): New.
230 (gdb_collect): New.
231 (write_inferior_data_ptr): New.
232 (target_tp_heap): New.
233 (target_malloc): New.
234 (download_agent_expr): New.
235 (UALIGN): New.
236 (download_tracepoints): New.
237 (download_trace_state_variables): New.
238 (upload_fast_traceframes): New.
239 (IPA_FIRST_TRACEFRAME): New.
240 (IPA_NEXT_TRACEFRAME_1): New.
241 (IPA_NEXT_TRACEFRAME): New.
242 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
243 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
244 (gdb_jump_pad_buffer_end): New.
245 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
246 (initialize_tracepoint): Adjust.
247 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
248 buffer. Initialize the low module.
249 * utils.c (PREFIX, TOOLNAME): New.
250 (malloc_failure): Use PREFIX.
251 (error): In the IPA, an error causes an exit.
252 (fatal, warning): Use PREFIX.
253 (internal_error): Use TOOLNAME.
254 (NUMCELLS): Increase to 10.
255 * configure, config.in: Regenerate.
256
257 2010-06-01 Pedro Alves <pedro@codesourcery.com>
258
259 * server.c (handle_query) <qSupported>: Do two passes over the
260 qSupported string to avoid nesting strtok.
261
262 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
263
264 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
265 (CDEPS): New.
266 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
267 -Wl,--dynamic-list.
268 * configure: Regenerate.
269 * proc-service.list: New.
270
271 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
272
273 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
274 New comment.
275
276 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
277
278 * gdbreplay.c (remote_open): Check error return from socket() call by
279 its equality to -1 not by it being negative.
280 * remote-utils.c (remote_open): Likewise.
281
282 2010-05-23 Pedro Alves <pedro@codesourcery.com>
283
284 * config.h: Regenerate.
285
286 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
287
288 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
289 doesn't provide PTRACE_GET_THREAD_AREA.
290
291 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
292
293 * linux-m68k-low.c: Include <asm/ptrace.h>
294 (ps_get_thread_area): Implement.
295
296 2010-05-03 Doug Evans <dje@google.com>
297
298 * event-loop.c (struct callback_event): New struct.
299 (callback_list): New global.
300 (append_callback_event, delete_callback_event): New functions.
301 (process_callback): New function.
302 (start_event_loop): Call it.
303 * remote-utils.c (NOT_SCHEDULED): Define.
304 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
305 moved out of readchar.
306 (readchar): Rewrite. Call reschedule before returning.
307 (reset_readchar): New function.
308 (remote_close): Call it.
309 (process_remaining, reschedule): New functions.
310 * server.h (callback_handler_func): New typedef.
311 (append_callback_event, delete_callback_event): Declare.
312
313 2010-05-03 Pedro Alves <pedro@codesourcery.com>
314
315 * proc-service.c (ps_pglobal_lookup): Use
316 thread_db_look_up_one_symbol.
317 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
318 parameter. Use it instead of all_symbols_looked_up.
319 * server.h (struct process_info) <all_symbols_looked_up>: Delete
320 field.
321 (all_symbols_looked_up): Don't declare.
322 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
323 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
324 field.
325 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
326 Set all_symbols_looked_up here.
327 (thread_db_look_up_one_symbol): New.
328 (thread_db_get_tls_address): Adjust.
329 (thread_db_load_search, try_thread_db_load_1): Always allocate the
330 thread_db object on the heap, and tentatively set it in the
331 process structure.
332 (thread_db_init): Don't set all_symbols_looked_up here.
333 * linux-low.h (thread_db_look_up_one_symbol): Declare.
334
335 2010-05-03 Pedro Alves <pedro@codesourcery.com>
336
337 * linux-low.c (linux_kill, linux_detach): Adjust.
338 (status_pending_p_callback): Remove redundant statement. Check
339 for !TARGET_WAITIKIND_IGNORE, instead of
340 TARGET_WAITKIND_STOPPED.
341 (handle_tracepoints): Make sure LWP is locked. Adjust.
342 (linux_wait_for_event_1): Adjust.
343 (linux_cancel_breakpoints): New.
344 (unsuspend_one_lwp): New.
345 (unsuspend_all_lwps): New.
346 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
347 (send_sigstop_callback): Change return type to int, add new
348 `except' parameter and handle it.
349 (suspend_and_send_sigstop_callback): New.
350 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
351 pass them down. If SUSPEND, also increment the lwp's suspend
352 count.
353 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
354 (need_step_over_p): Don't consider suspended LWPs.
355 (start_step_over): Adjust.
356 (proceed_one_lwp): Change return type to int, add new `except'
357 parameter and handle it.
358 (unsuspend_and_proceed_one_lwp): New.
359 (proceed_all_lwps): Use find_inferior instead of
360 for_each_inferior.
361 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
362 also decrement the suspend count of LWPs. Pass `except' down,
363 instead of hacking its suspend count.
364 (linux_pause_all): Add `freeze' parameter. Adjust.
365 (linux_unpause_all): New.
366 (linux_target_ops): Install linux_unpause_all.
367 * server.c (handle_status): Adjust.
368 * target.h (struct target_ops): New fields `unpause_all' and
369 `cancel_breakpoints'. Add new parameter to `pause_all'.
370 (pause_all): Add new `freeze' parameter.
371 (unpause_all): New.
372 (cancel_breakpoints): New.
373 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
374 cancel breakpoints.
375 (cmd_qtstart): Pause threads.
376 (stop_tracing): Pause threads, and cancel breakpoints.
377 * win32-low.c (win32_target_ops): Adjust.
378
379 2010-05-03 Pedro Alves <pedro@codesourcery.com>
380
381 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
382 the inferior right away from here...
383 (linux_wait_1): ... to here, and adjust to check the thread's
384 last_resume_kind instead of the lwp's step or stop_expected flags.
385
386 2010-05-02 Pedro Alves <pedro@codesourcery.com>
387
388 * README: Use consistent `GDB' and `GDBserver' spellings.
389
390 2010-05-02 Pedro Alves <pedro@codesourcery.com>
391
392 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
393 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
394 (linux_detach_one_lwp): Assume the lwp is stopped.
395 (any_thread_of): Delete.
396 (linux_detach): Stop all lwps here. Don't blindly delete all
397 breakpoints.
398 (delete_lwp_callback): New.
399 (linux_mourn): Delete all lwps of the process that is gone.
400 (linux_wait_1): Don't delete the last lwp of the process here.
401 * mem-break.h (mark_breakpoints_out): Declare.
402 * mem-break.c (mark_breakpoints_out): New.
403 (free_all_breakpoints): Use it.
404 * server.c (handle_target_event): If the process is gone, mark
405 breakpoints out.
406 * thread-db.c (struct thread_db) <create_bp>: New field.
407 (thread_db_enable_reporting): Fix prototype. Store a thread event
408 breakpoint reference in the thread_db struct.
409 (thread_db_load_search): Clear the thread_db object.
410 (try_thread_db_load_1): Ditto.
411 (switch_to_process): New.
412 (disable_thread_event_reporting): Use it.
413 (remove_thread_event_breakpoints): New.
414 (thread_db_detach, thread_db_mourn): Use it.
415
416 2010-05-01 Pedro Alves <pedro@codesourcery.com>
417
418 * linux-low.c (linux_enable_event_reporting): New.
419 (linux_wait_for_event_1, handle_extended_wait): Use it.
420
421 2010-04-30 Pedro Alves <pedro@codesourcery.com>
422
423 * linux-low.c (linux_kill_one_lwp, linux_kill)
424 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
425 (send_sigstop): Take an lwp_info as parameter instead. Queue a
426 SIGSTOP even if the LWP is stopped.
427 (send_sigstop_callback): New.
428 (stop_all_lwps): Use send_sigstop_callback instead.
429 (linux_resume_one_thread): Adjust.
430 (proceed_one_lwp): Still proceed an LWP that the client has
431 requested to stop, if we haven't reported it as stopped yet. Make
432 sure that LWPs the client want stopped, have a pending SIGSTOP.
433
434 2010-04-26 Doug Evans <dje@google.com>
435
436 * server.c (handle_general_set): Make static.
437
438 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
439 Print received char after testing for error/eof instead of before.
440 (input_interrupt): Tweak comment.
441
442 2010-04-23 Doug Evans <dje@google.com>
443
444 * server.c (start_inferior): Print inferior argv if --debug.
445
446 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
447
448 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
449 * nto-x86-low.c: Include server.h
450
451 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
452
453 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
454 be consistent with other sources of this directory.
455 (init_registers_amd64): Correct name of source file of this function
456 in the comment.
457
458 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
459
460 * configure.srv (x86_64-*-mingw*): New configuration for Windows
461 64-bit executables.
462
463 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
464
465 * win32-i386-low.c: Add 64-bit support.
466 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
467 (init_registers_amd64): Declare.
468 (mappings): Add 64-bit version of array.
469 (init_windows_x86): New function.
470 (the_low_target): Change init_arch field to init_windows_x86.
471
472 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
473
474 * win32-low.c: Adapt to support also 64-bit architecture.
475 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
476 (get_image_name): Use SIZE_T type for local variable `done'.
477 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
478 (toolhelp_get_dll_name): Idem.
479 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
480 Use uintptr_t typecast to avoid warning.
481 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
482 (handle_exception): Use phex_nz to avoid warning.
483 (win32_wait): Remove unused local variable `process'.
484
485 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
486
487 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
488 `amd64-avx.o'.
489
490 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
491
492 * configure.ac: Use `ws2_32' library for srv_mingw.
493 * configure: Regenerate.
494 * gdbreplay.c: Include winsock2.h instead of winsock.h.
495 * remote-utils.c: Likewise.
496
497 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
498
499 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
500 if __x86_64__ is defined.
501
502 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
503
504 * configure: Regenerate.
505
506 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
507
508 * server.c (handle_query): Handle 'qGetTIBAddr' query.
509 * target.h (target_ops): New get_tib_address field.
510 * win32-low.h (win32_thread_info): Add thread_local_base field.
511 * win32-low.c (child_add_thread): Add tlb argument.
512 Set thread_local_base field to TLB.
513 (get_child_debug_event): Adapt to child_add_thread change.
514 (win32_get_tib_address): New function.
515 (win32_target_ops): Set get_tib_address field to
516 win32_get_tib_address.
517 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
518
519 2010-04-12 Pedro Alves <pedro@codesourcery.com>
520
521 * linux-low.c (linux_mourn): Also remove the process.
522 * server.c (handle_target_event): Don't remove the process here.
523 * nto-low.c (nto_mourn): New.
524 (nto_target_ops): Install it.
525 * spu-low.c (spu_mourn): New.
526 (spu_target_ops): Install it.
527 * win32-low.c (win32_mourn): New.
528 (win32_target_ops): Install it.
529
530 2010-04-12 Pedro Alves <pedro@codesourcery.com>
531
532 * server.h (buffer_xml_printf): Remove redundant `;'.
533
534 2010-04-12 Pedro Alves <pedro@codesourcery.com>
535
536 * regcache.c (set_register_cache): Invalidate regcaches before
537 changing the register cache layout.
538 (regcache_invalidate_one): Allow a NULL regcache.
539 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
540 regcaches before changing the register cache layout or the target
541 regsets.
542
543 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
544
545 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
546 variable warning on Linux/x86-64.
547
548 2010-04-11 Pedro Alves <pedro@codesourcery.com>
549
550 GDBserver disconnected tracing support.
551
552 * linux-low.c (linux_remove_process): Delete.
553 (add_lwp): Don't set last_resume_kind here.
554 (linux_kill): Use `mourn'.
555 (linux_detach): Use `thread_db_detach', and `mourn'.
556 (linux_mourn): New.
557 (linux_attach_lwp_1): Adjust comment.
558 (linux_attach): last_resume_kind moved the thread_info; adjust.
559 (status_pending_p_callback): Adjust.
560 (linux_wait_for_event_1): Adjust.
561 (count_events_callback, select_singlestep_lwp_callback)
562 (select_event_lwp_callback, cancel_breakpoints_callback)
563 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
564 (proceed_one_lwp): Adjust.
565 (linux_async): Add debug output.
566 (linux_thread_stopped): New.
567 (linux_pause_all): New.
568 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
569 linux_pause_all.
570 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
571 (thread_db_free): Delete declaration.
572 (thread_db_detach, thread_db_mourn): Declare.
573 * thread-db.c (thread_db_init): Use thread_db_mourn.
574 (thread_db_free): Delete, split in two.
575 (disable_thread_event_reporting): New.
576 (thread_db_detach): New.
577 (thread_db_mourn): New.
578
579 * server.h (struct thread_info) <last_resume_kind>: New field.
580 <attached>: Add comment.
581 <gdb_detached>: New field.
582 (handler_func): Change return type to int.
583 (handle_serial_event, handle_target_event): Ditto.
584 (gdb_connected): Declare.
585 (tracing): Delete.
586 (disconnected_tracing): Declare.
587 (stop_tracing): Declare.
588
589 * server.c (handle_query) <qSupported>: Report support for
590 disconnected tracing.
591 (queue_stop_reply_callback): Account for running threads.
592 (gdb_wants_thread_stopped): New.
593 (gdb_wants_all_threads_stopped): New.
594 (gdb_reattached_process): New.
595 (handle_status): Clear the `gdb_detached' flag of all processes.
596 In all-stop, stop all threads.
597 (main): Be sure to leave tfind mode. Handle disconnected tracing.
598 (process_serial_event): If the remote connection breaks, or if an
599 exit was forced with "monitor exit", force an event loop exit.
600 Handle disconnected tracing on detach.
601 (handle_serial_event): Adjust.
602 (handle_target_event): If GDB isn't connected, forward events back
603 to the inferior, unless the last process exited, in which case,
604 exit gdbserver. Adjust interface.
605
606 * remote-utils.c (remote_open): Don't block in accept. Instead
607 register an event loop source on the listen socket file
608 descriptor. Refactor bits into ...
609 (listen_desc): ... this new global.
610 (gdb_connected): ... this new function.
611 (enable_async_notification): ... this new function.
612 (handle_accept_event): ... this new function.
613 (remote_close): Clear remote_desc.
614
615 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
616
617 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
618 New fields.
619 (mourn_inferior): Define.
620 (target_process_qsupported): Avoid the dangling else problem.
621 (thread_stopped): Define.
622 (pause_all): Define.
623 (target_waitstatus_to_string): Declare.
624 * target.c (target_waitstatus_to_string): New.
625
626 * tracepoint.c (tracing): Make extern.
627 (disconnected_tracing): New.
628 (stop_tracing): Make extern. Handle tracing stops due to GDB
629 disconnecting.
630 (cmd_qtdisconnected): New.
631 (cmd_qtstatus): Report disconnected tracing status in trace reply.
632 (handle_tracepoint_general_set): Handle QTDisconnected.
633
634 * event-loop.c (event_handler_func): Change return type to int.
635 (process_event): Bail out if the event handler wants the event
636 loop to stop.
637 (handle_file_event): Ditto.
638 (start_event_loop): Bail out if the event handler wants the event
639 loop to stop.
640
641 * nto-low.c (nto_target_ops): Adjust.
642 * spu-low.c (spu_wait): Don't remove the process here.
643 (spu_target_ops): Adjust.
644 * win32-low.c (win32_wait): Don't remove the process here.
645 (win32_target_ops): Adjust.
646
647 2010-04-11 Pedro Alves <pedro@codesourcery.com>
648
649 * regcache.c (realloc_register_cache): Invalidate inferior's
650 regcache before recreating it.
651
652 2010-04-09 Pedro Alves <pedro@codesourcery.com>
653
654 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
655
656 2010-04-09 Stan Shebs <stan@codesourcery.com>
657 Pedro Alves <pedro@codesourcery.com>
658
659 * server.h (LONGEST): New.
660 (struct thread_info) <while_stepping>: New field.
661 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
662 Declare.
663 (initialize_tracepoint, handle_tracepoint_general_set)
664 (handle_tracepoint_query, tracepoint_finished_step)
665 (tracepoint_was_hit, release_while_stepping_state_list):
666 (current_traceframe): Declare.
667 * server.c (handle_general_set): Handle tracepoint packets.
668 (read_memory): New.
669 (write_memory): New.
670 (handle_search_memory_1): Use read_memory.
671 (handle_query): Report support for conditional tracepoints, trace
672 state variables, and tracepoint sources. Handle tracepoint
673 queries.
674 (main): Initialize the tracepoints module.
675 (process_serial_event): Handle traceframe reads/writes.
676
677 * linux-low.c (handle_tracepoints): New.
678 (linux_wait_1): Call it.
679 (linux_resume_one_lwp): Handle while-stepping.
680 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
681 (linux_target_ops): Install them.
682 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
683 New field.
684 * linux-x86-low.c (x86_supports_tracepoints): New.
685 (the_low_target). Install it.
686
687 * mem-break.h (delete_breakpoint): Declare.
688 * mem-break.c (delete_breakpoint): Make external.
689
690 * target.h (struct target_ops): Add `supports_tracepoints',
691 `read_pc', and `write_pc' fields.
692 (target_supports_tracepoints): Define.
693 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
694 (phex_nz): New.
695
696 * regcache.h (struct regcache) <registers_owned>: New field.
697 (init_register_cache, regcache_cpy): Declare.
698 (regcache_read_pc, regcache_write_pc): Declare.
699 (register_cache_size): Declare.
700 (supply_regblock): Declare.
701 * regcache.c (init_register_cache): New.
702 (new_register_cache): Use it.
703 (regcache_cpy): New.
704 (register_cache_size): New.
705 (supply_regblock): New.
706 (regcache_read_pc, regcache_write_pc): New.
707
708 * tracepoint.c: New.
709
710 * Makefile.in (OBS): Add tracepoint.o.
711 (tracepoint.o): New rule.
712
713 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
714
715 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
716 (i386-mmx.o): New.
717 (i386-mmx.c): Likewise.
718 (i386-mmx-linux.o): Likewise.
719 (i386-mmx-linux.c): Likewise.
720
721 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
722 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
723 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
724 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
725
726 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
727 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
728 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
729
730 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
731
732 * Makefile.in (clean): Updated.
733 (i386-avx.o): New.
734 (i386-avx.c): Likewise.
735 (i386-avx-linux.o): Likewise.
736 (i386-avx-linux.c): Likewise.
737 (amd64-avx.o): Likewise.
738 (amd64-avx.c): Likewise.
739 (amd64-avx-linux.o): Likewise.
740 (amd64-avx-linux.c): Likewise.
741
742 * configure.srv (srv_i386_regobj): Add i386-avx.o.
743 (srv_i386_linux_regobj): Add i386-avx-linux.o.
744 (srv_amd64_regobj): Add amd64-avx.o.
745 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
746 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
747 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
748 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
749 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
750 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
751 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
752
753 * i387-fp.c: Include "i386-xstate.h".
754 (i387_xsave): New.
755 (i387_cache_to_xsave): Likewise.
756 (i387_xsave_to_cache): Likewise.
757 (x86_xcr0): Likewise.
758
759 * i387-fp.h (i387_cache_to_xsave): Likewise.
760 (i387_xsave_to_cache): Likewise.
761 (x86_xcr0): Likewise.
762
763 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
764 * linux-crisv32-low.c (target_regsets): Likewise.
765 * linux-m68k-low.c (target_regsets): Likewise.
766 * linux-mips-low.c (target_regsets): Likewise.
767 * linux-ppc-low.c (target_regsets): Likewise.
768 * linux-s390-low.c (target_regsets): Likewise.
769 * linux-sh-low.c (target_regsets): Likewise.
770 * linux-sparc-low.c (target_regsets): Likewise.
771 * linux-xtensa-low.c (target_regsets): Likewise.
772
773 * linux-low.c: Include <sys/uio.h>.
774 (regsets_fetch_inferior_registers): Support nt_type.
775 (regsets_store_inferior_registers): Likewise.
776 (linux_process_qsupported): New.
777 (linux_target_ops): Add linux_process_qsupported.
778
779 * linux-low.h (regset_info): Add nt_type.
780 (linux_target_ops): Add process_qsupported.
781
782 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
783 and <sys/uio.h>.
784 (init_registers_i386_avx_linux): New.
785 (init_registers_amd64_avx_linux): Likewise.
786 (xmltarget_i386_linux_no_xml): Likewise.
787 (xmltarget_amd64_linux_no_xml): Likewise.
788 (PTRACE_GETREGSET): Likewise.
789 (PTRACE_SETREGSET): Likewise.
790 (x86_fill_xstateregset): Likewise.
791 (x86_store_xstateregset): Likewise.
792 (use_xml): Likewise.
793 (x86_linux_update_xmltarget): Likewise.
794 (x86_linux_process_qsupported): Likewise.
795 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
796 (x86_arch_setup): Don't call init_registers_amd64_linux nor
797 init_registers_i386_linux here. Call
798 x86_linux_update_xmltarget.
799 (the_low_target): Add x86_linux_process_qsupported.
800
801 * server.c (handle_query): Call target_process_qsupported.
802
803 * target.h (target_ops): Add process_qsupported.
804 (target_process_qsupported): New.
805
806 2010-04-03 Pedro Alves <pedro@codesourcery.com>
807
808 * inferiors.c (add_thread): Set last_status kind to
809 TARGET_WAITKIND_IGNORE.
810 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
811 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
812 (linux_wait_1): Move `thread' local definition to block that uses
813 it. Don't NULL initialize `event_child'.
814 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
815 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
816 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
817
818 2010-04-01 Pedro Alves <pedro@codesourcery.com>
819
820 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
821 an extended waitstatus, or by a watchpoint.
822 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
823 thread was stepping or has been stopped by a watchpoint.
824
825 2010-04-01 Pedro Alves <pedro@codesourcery.com>
826
827 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
828 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
829 of another, then delete the previous, and validate all
830 breakpoints.
831 (validate_inserted_breakpoint): New.
832 (delete_disabled_breakpoints): New.
833 (validate_breakpoints): New.
834 (check_mem_read): Validate breakpoints before trusting their
835 shadow. Delete disabled breakpoints.
836 (check_mem_write): Validate breakpoints before trusting they
837 should be inserted. Delete disabled breakpoints.
838 * mem-break.h (validate_breakpoints):
839 * server.c (handle_query): Validate breakpoints when we see a
840 qSymbol query.
841
842 2010-04-01 Pedro Alves <pedro@codesourcery.com>
843
844 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
845 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
846 if we could tell there's a GDB breakpoint at stop_pc.
847 (need_step_over_p): Don't do a step over if we find a GDB
848 breakpoint at the resume PC.
849
850 * mem-break.c (struct raw_breakpoint): New.
851 (enum bkpt_type): New type `gdb_breakpoint'.
852 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
853 fields. New field `raw'.
854 (find_raw_breakpoint_at): New.
855 (set_raw_breakpoint_at): Handle refcounting. Create a raw
856 breakpoint instead.
857 (set_breakpoint_at): Adjust.
858 (delete_raw_breakpoint): New.
859 (release_breakpoint): New.
860 (delete_breakpoint): Rename to...
861 (delete_breakpoint_1): ... this. Add proc parameter. Use
862 release_breakpoint. Return ENOENT.
863 (delete_breakpoint): Reimplement.
864 (find_breakpoint_at): Delete.
865 (find_gdb_breakpoint_at): New.
866 (delete_breakpoint_at): Delete.
867 (set_gdb_breakpoint_at): New.
868 (delete_gdb_breakpoint_at): New.
869 (gdb_breakpoint_here): New.
870 (set_reinsert_breakpoint): Use release_breakpoint.
871 (uninsert_breakpoint): Rename to ...
872 (uninsert_raw_breakpoint): ... this.
873 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
874 (reinsert_raw_breakpoint): Change parameter type to
875 raw_breakpoint.
876 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
877 instead.
878 (check_breakpoints): Adjust. Use release_breakpoint.
879 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
880 (breakpoint_inserted_here): Ditto.
881 (check_mem_read): Adjust to iterate over raw breakpoints instead.
882 Don't trust the breakpoint's shadow if it is not inserted.
883 (check_mem_write): Adjust to iterate over raw breakpoints instead.
884 (delete_all_breakpoints): Adjust.
885 (free_all_breakpoints): Mark all breakpoints as uninserted, and
886 use delete_breakpoint_1.
887
888 * mem-break.h (breakpoints_supported): Delete declaration.
889 (set_gdb_breakpoint_at): Declare.
890 (gdb_breakpoint_here): Declare.
891 (delete_breakpoint_at): Delete.
892 (delete_gdb_breakpoint_at): Declare.
893
894 * server.h (struct raw_breakpoint): Forward declare.
895 (struct process_info): New field `raw_breakpoints'.
896
897 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
898 breakpoints.
899
900 2010-03-24 Pedro Alves <pedro@codesourcery.com>
901
902 * linux-low.c (status_pending_p_callback): Fix comment.
903 (linux_wait_for_event_1): Move most of the internal breakpoint
904 handling from here...
905 (linux_wait_1): ... to here.
906 (count_events_callback): New.
907 (select_singlestep_lwp_callback): New.
908 (select_event_lwp_callback): New.
909 (cancel_breakpoints_callback): New.
910 (select_event_lwp): New.
911 (linux_wait_1): Simplify internal breakpoint handling. Give equal
912 priority to all LWPs that have had events that should be reported
913 to the client. Cancel breakpoints when about to reporting the
914 event to the client, not while stopping lwps. No longer cancel
915 finished single-steps here.
916 (cancel_finished_single_step): Delete.
917 (cancel_finished_single_steps): Delete.
918
919 2010-03-24 Pedro Alves <pedro@codesourcery.com>
920
921 * mem-break.c (enum bkpt_type): New.
922 (struct breakpoint): New field `type'.
923 (set_breakpoint_at): Change return type to struct breakpoint
924 pointer. Set type to `other_breakpoint' by default.
925 (delete_breakpoint): Rewrite, supporting more than one breakpoint
926 in the breakpoint list.
927 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
928 (reinsert_breakpoint): Rename to ...
929 (reinsert_raw_breakpoint): ... this.
930 (reinsert_breakpoints_at): Adjust.
931 * mem-break.h (struct breakpoint): Declare.
932 (set_breakpoint_at): Change return type to struct breakpoint
933 pointer.
934
935 2010-03-24 Pedro Alves <pedro@codesourcery.com>
936
937 * server.c (handle_query): Assign, not compare.
938
939 2010-03-24 Pedro Alves <pedro@codesourcery.com>
940
941 Teach linux gdbserver to step-over-breakpoints.
942
943 * linux-low.c (can_hardware_single_step): New.
944 (supports_breakpoints): New.
945 (handle_extended_wait): If stopping threads, read the stop pc of
946 the new cloned LWP.
947 (get_pc): New.
948 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
949 low target doesn't support retrieving the PC.
950 (add_lwp): Set last_resume_kind to resume_continue.
951 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
952 (linux_attach): Don't clear stop_expected. Set the lwp's
953 last_resume_kind to resume_stop.
954 (linux_detach_one_lwp): Don't check for removed breakpoints.
955 (check_removed_breakpoint): Delete.
956 (status_pending_p): Rename to ...
957 (status_pending_p_callback): ... this. Don't check for removed
958 breakpoints. Don't consider threads that are stopped from GDB's
959 perspective.
960 (linux_wait_for_lwp): Always read the stop_pc here.
961 (cancel_breakpoint): New.
962 (step_over_bkpt): New global.
963 (linux_wait_for_event_1): Implement stepping over breakpoints.
964 (gdb_wants_lwp_stopped): New.
965 (gdb_wants_all_stopped): New.
966 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
967 single-step traps here. Store the thread's last reported target
968 wait status.
969 (send_sigstop): Don't clear stop_expected. Always set it,
970 instead.
971 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
972 (cancel_finished_single_step): New.
973 (cancel_finished_single_steps): New.
974 (wait_for_sigstop): Don't cancel finished single-step traps here.
975 (linux_resume_one_lwp): Don't check for removed breakpoints.
976 Don't set `step' on non-hardware step archs.
977 (linux_set_resume_request): Ignore resume_stop requests if already
978 stopping or stopped. Set the lwp's last_resume_kind.
979 (resume_status_pending_p): Don't check for removed breakpoints.
980 (need_step_over_p): New.
981 (start_step_over): New.
982 (finish_step_over): New.
983 (linux_resume_one_thread): Always queue a sigstop for resume_stop
984 requests. Clear the thread's last reported target waitstatus.
985 Don't use the `suspended' flag. Don't consider pending breakpoints.
986 (linux_resume): Start a step-over if necessary.
987 (proceed_one_lwp): New.
988 (proceed_all_lwps): New.
989 (unstop_all_lwps): New.
990 * linux-low.h (struct lwp_info): Rewrite comment for the
991 `suspended' flag. Add the `stop_pc' field. Delete the
992 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
993 Add `'last_resume_kind' and `need_step_over' fields.
994 * inferiors.c (struct thread_info): Delete, moved elsewhere.
995 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
996 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
997 (set_raw_breakpoint_at): New.
998 (set_breakpoint_at): Rewrite to use it.
999 (reinsert_breakpoint_handler): Delete.
1000 (set_reinsert_breakpoint): New.
1001 (reinsert_breakpoint_by_bp): Delete.
1002 (delete_reinsert_breakpoints): New.
1003 (uninsert_breakpoint): Rewrite.
1004 (uninsert_breakpoints_at): New.
1005 (reinsert_breakpoint): Rewrite.
1006 (reinsert_breakpoints_at): New.
1007 (check_breakpoints): Rewrite.
1008 (breakpoint_here): New.
1009 (breakpoint_inserted_here): New.
1010 (check_mem_read): Adjust.
1011 * mem-break.h (breakpoints_supported, breakpoint_here)
1012 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1013 (reinsert_breakpoint_by_bp): Delete declaration.
1014 (delete_reinsert_breakpoints): Declare.
1015 (reinsert_breakpoint): Delete declaration.
1016 (reinsert_breakpoints_at): Declare.
1017 (uninsert_breakpoint): Delete declaration.
1018 (uninsert_breakpoints_at): Declare.
1019 (check_breakpoints): Adjust prototype.
1020 * server.h: Adjust include order.
1021 (struct thread_info): Declare here. Add a `last_status' field.
1022
1023 2010-03-23 Michael Snyder <msnyder@vmware.com>
1024
1025 * server.c (crc32): New function.
1026 (handle_query): Add handling for 'qCRC:' request.
1027
1028 2010-03-23 Pedro Alves <pedro@codesourcery.com>
1029
1030 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1031 lwp had been stopped by a watchpoint.
1032
1033 2010-03-16 Pedro Alves <pedro@codesourcery.com>
1034
1035 * server.h (internal_error): Declare.
1036 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1037 * utils.c (internal_error): New function.
1038
1039 2010-03-15 Andreas Schwab <schwab@redhat.com>
1040
1041 * configure.srv: Fix typo setting srv_regobj.
1042
1043 2010-03-15 Pedro Alves <pedro@codesourcery.com>
1044
1045 * linux-low.c (fetch_register): Avoid passing a non string literal
1046 format to `error'.
1047 (usr_store_inferior_registers): Ditto.
1048
1049 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1050
1051 * linux-low.c (linux_write_memory): Bail out early if peeking
1052 memory failed.
1053
1054 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1055
1056 * linux-low.h (struct lwp_info): New fields
1057 `stopped_by_watchpoint' and `stopped_data_address'.
1058 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1059 here, and cache them in the lwp object.
1060 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1061 directly.
1062 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1063 field.
1064 (linux_stopped_by_watchpoint): Rewrite.
1065 (linux_stopped_data_address): Rewrite.
1066
1067 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
1068
1069 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1070 switching the current inferior, not before.
1071
1072 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1073
1074 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1075 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1076 i386-linux.c and amd64-linux.c.
1077 (reg-i386.o): Removed.
1078 (reg-i386.c): Likewise.
1079 (reg-i386-linux.o): Likewise.
1080 (reg-i386-linux.c): Likewise.
1081 (reg-x86-64.o): Likewise.
1082 (reg-x86-64.c): Likewise.
1083 (reg-x86-64-linux.o): Likewise.
1084 (reg-x86-64-linux.c): Likewise.
1085 (i386.o): New.
1086 (i386.c): Likewise.
1087 (i386-linux.o): Likewise.
1088 (i386-linux.c): Likewise.
1089 (amd64.o): Likewise.
1090 (amd64.c): Likewise.
1091 (amd64-linux.o): Likewise.
1092 (amd64-linux.c): Likewise.
1093
1094 * configure.srv (srv_i386_regobj): New.
1095 (srv_i386_linux_regobj): Likewise.
1096 (srv_amd64_regobj): Likewise.
1097 (srv_amd64_linux_regobj): Likewise.
1098 (srv_i386_32bit_xmlfiles): Likewise.
1099 (srv_i386_64bit_xmlfiles): Likewise.
1100 (srv_i386_xmlfiles): Likewise.
1101 (srv_amd64_xmlfiles): Likewise.
1102 (srv_i386_linux_xmlfiles): Likewise.
1103 (srv_amd64_linux_xmlfiles): Likewise.
1104 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1105 srv_xmlfiles to $srv_i386_xmlfiles.
1106 (i[34567]86-*-mingw32ce*): Likewise.
1107 (i[34567]86-*-mingw*): Likewise.
1108 (i[34567]86-*-nto*): Likewise.
1109 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1110 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1111 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1112 (x86_64-*-linux*): Likewise.
1113
1114 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1115 (init_registers_amd64_linux): New.
1116 (x86_arch_setup): Replace init_registers_x86_64_linux with
1117 init_registers_amd64_linux.
1118
1119 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1120
1121 * configure.ac: Check for libdl. If it is not available link against
1122 static libthread_db.
1123 * configure: Regenerate.
1124
1125 2010-02-22 Pedro Alves <pedro@codesourcery.com>
1126
1127 PR9605
1128
1129 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1130 handing a read watchpoint.
1131 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1132
1133 2010-02-12 Doug Evans <dje@google.com>
1134
1135 * linux-low.c (linux_supports_tracefork_flag): Document.
1136 (linux_look_up_symbols): Add comment.
1137
1138 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1139
1140 * regcache.c (supply_register): Clear regcache if buf is NULL.
1141
1142 2010-02-02 Nicolas Roche <roche@sourceware.org>
1143 Joel Brobecker <brobecker@adacore.com>
1144
1145 * inferiors.c (find_inferior): Add function documentation.
1146 (unloaded_dll): Handle the case where the unloaded dll has not
1147 been previously registered in the dll list.
1148
1149 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1150
1151 * linux-arm-low.c (thumb_breakpoint_len): Delete.
1152 (thumb2_breakpoint): New.
1153 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1154
1155 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1156
1157 * linux-low.c (get_stop_pc): Check for SIGTRAP.
1158 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
1159 breakpoints.
1160
1161 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1162
1163 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
1164
1165 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1166
1167 * linux-s390-low.c (s390_collect_ptrace_register)
1168 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
1169
1170 2010-01-21 Doug Evans <dje@google.com>
1171
1172 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
1173 (PTRACE_ARG4_TYPE): New macro.
1174 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
1175 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
1176 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
1177 (usr_store_inferior_registers): Ditto.
1178 (linux_read_memory, linux_write_memory): Ditto.
1179 (linux_test_for_tracefork): Ditto.
1180
1181 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
1182 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
1183
1184 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1185
1186 * proc-service.c (ps_lgetregs): Don't refetch registers from the
1187 target.
1188
1189 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1190
1191 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
1192 prototype to take a regcache. Adjust.
1193
1194 2010-01-20 Pedro Alves <pedro@codesourcery.com>
1195
1196 * regcache.h (struct thread_info): Forward declare.
1197 (struct regcache): New.
1198 (new_register_cache): Adjust prototype.
1199 (get_thread_regcache): Declare.
1200 (free_register_cache): Adjust prototype.
1201 (registers_to_string, registers_from_string): Ditto.
1202 (supply_register, supply_register_by_name, collect_register)
1203 (collect_register_as_string, collect_register_by_name): Ditto.
1204 * regcache.c (struct inferior_regcache_data): Delete.
1205 (get_regcache): Rename to ...
1206 (get_thread_regcache): ... this. Adjust. Switch inferior before
1207 fetching registers.
1208 (regcache_invalidate_one): Adjust.
1209 (regcache_invalidate): Fix prototype.
1210 (new_register_cache): Return the new register cache.
1211 (free_register_cache): Change prototype.
1212 (realloc_register_cache): Adjust.
1213 (registers_to_string): Change prototype to take a regcache. Adjust.
1214 (registers_from_string): Ditto.
1215 (register_data): Ditto.
1216 (supply_register): Ditto.
1217 (supply_register_by_name): Ditto.
1218 (collect_register): Ditto.
1219 (collect_register_as_string): Ditto.
1220 (collect_register_by_name): Ditto.
1221 * server.c (process_serial_event): Adjust.
1222 * linux-low.h (regset_fill_func, regset_store_func): Change
1223 prototype.
1224 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
1225 Change prototype.
1226 * linux-low.c (get_stop_pc): Adjust.
1227 (check_removed_breakpoint): Adjust.
1228 (linux_wait_for_event): Adjust.
1229 (linux_resume_one_lwp): Adjust.
1230 (fetch_register): Add regcache parameter. Adjust.
1231 (usr_store_inferior_registers): Ditto.
1232 (regsets_fetch_inferior_registers): Ditto.
1233 (regsets_store_inferior_registers): Ditto.
1234 (linux_fetch_registers, linux_store_registers): Ditto.
1235 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
1236 regcache. Adjust.
1237 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1238 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
1239 prototype to take a regcache.
1240 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1241 * remote-utils.c (convert_ascii_to_int, outreg)
1242 (prepare_resume_reply): Change prototype to take a regcache.
1243 Adjust.
1244 * target.h (struct target_ops) <fetch_registers, store_registers>:
1245 Change prototype to take a regcache.
1246 (fetch_inferior_registers, store_inferior_registers): Change
1247 prototype to take a regcache. Adjust.
1248 * proc-service.c (ps_lgetregs): Adjust.
1249 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
1250 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
1251 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
1252 take a regcache. Adjust.
1253 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
1254 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1255 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
1256 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
1257 * linux-cris-low.c (cris_get_pc, cris_set_pc)
1258 (cris_cannot_fetch_register):
1259 (cris_breakpoint_at): Change prototype to take a regcache.
1260 Adjust.
1261 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
1262 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
1263 to take a regcache. Adjust.
1264 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
1265 Adjust.
1266 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
1267 take a regcache. Adjust.
1268 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
1269 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
1270 (m68k_set_pc): Change prototype to take a regcache. Adjust.
1271 * linux-mips-low.c (mips_get_pc):
1272 (mips_set_pc): Change prototype to take a regcache. Adjust.
1273 (mips_reinsert_addr): Adjust.
1274 (mips_collect_register): Change prototype to take a regcache.
1275 Adjust.
1276 (mips_supply_register):
1277 (mips_collect_register_32bit, mips_supply_register_32bit)
1278 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1279 (mips_store_fpregset): Ditto.
1280 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
1281 Ditto.
1282 (parse_spufs_run): Adjust.
1283 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
1284 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
1285 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
1286 take a regcache. Adjust.
1287 * linux-s390-low.c (s390_collect_ptrace_register)
1288 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
1289 (s390_set_pc): Change prototype to take a regcache. Adjust.
1290 (s390_arch_setup): Adjust.
1291 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
1292 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
1293 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1294 (sparc_fill_gregset, sparc_store_gregset_from_stack)
1295 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
1296 regcache. Adjust.
1297 (sparc_breakpoint_at): Adjust.
1298 * linux-xtensa-low.c (xtensa_fill_gregset):
1299 (xtensa_store_gregset):
1300 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
1301 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
1302 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
1303 prototype to take a regcache. Adjust.
1304 * win32-arm-low.c (arm_fetch_inferior_register)
1305 (arm_store_inferior_register): Change prototype to take a
1306 regcache. Adjust.
1307 * win32-i386-low.c (i386_fetch_inferior_register)
1308 (i386_store_inferior_register): Change prototype to take a
1309 regcache. Adjust.
1310 * win32-low.c (child_fetch_inferior_registers)
1311 (child_store_inferior_registers): Change prototype to take a
1312 regcache. Adjust.
1313 (win32_wait): Adjust.
1314 (win32_fetch_inferior_registers): Change prototype to take a
1315 regcache. Adjust.
1316 (win32_store_inferior_registers): Adjust.
1317 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
1318 store_inferior_register>: Change prototype to take a regcache.
1319
1320 2010-01-20 Doug Evans <dje@google.com>
1321
1322 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
1323 #ifdef.
1324 (linux_wait_for_event1, linux_init_signals): Ditto.
1325 (W_STOPCODE): Provide definition if missing.
1326
1327 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
1328
1329 * linux-low.c (linux_core_of_thread): New.
1330 (compare_ints, show_process, list_threads): New.
1331 (linux_qxfer_osdata): Report threads and cores.
1332 (linux_target_op): Register linux_core_of_thread.
1333 * remote-utils.c (prepare_resume_reply): Report the core.
1334 (buffer_xml_printf): Support %d specifier.
1335 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
1336 New.
1337 (handle_query): Handle qXfer:threads. Announce availability
1338 thereof.
1339 * target.h (struct target_ops): New field core_of_thread.
1340
1341 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1342
1343 * Makefile.in (clean): Remove new generated files.
1344 (reg-s390.o, reg-s390.c): Remove rules.
1345 (reg-s390x.o, reg-s390x.c): Likewise.
1346 (s390-linux32.o, s390-linux32.c): Add rules.
1347 (s390-linux64.o, s390-linux64.c): Likewise.
1348 (s390x-linux64.o, s390x-linux64.c): Likewise.
1349 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
1350 * linux-s390-low.c: Include <elf.h>.
1351 (HWCAP_S390_HIGH_GPRS): Define if undefined.
1352 (init_registers_s390): Remove prototype.
1353 (init_registers_s390x): Likewise.
1354 (init_registers_s390_linux32): Add prototype.
1355 (init_registers_s390_linux64): Likewise.
1356 (init_registers_s390x_linux64): Likewise.
1357 (s390_num_regs_3264): New define.
1358 (s390_regmap_3264): New global variable.
1359 (s390_cannot_fetch_register): Remove obsolete check.
1360 (s390_cannot_store_register): Likewise.
1361 (s390_collect_ptrace_register): Handle upper/lower register halves.
1362 (s390_supply_ptrace_register): Likewise.
1363 (s390_fill_gregset): Update to register number changes.
1364 (s390_get_hwcap): New routine.
1365 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
1366 Install appropriate regmap and register set.
1367
1368 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1369
1370 * server.c (gdbserver_version): Update copyright year to 2010.
1371 * gdbreplay.c (gdbreplay_version): Likewise.
1372
1373 2009-12-28 Doug Evans <dje@google.com>
1374
1375 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
1376 elf/external.h. Include <elf.h> instead but only if necessary.
1377
1378 2009-12-28 Pedro Alves <pedro@codesourcery.com>
1379
1380 * linux-low.c (linux_remove_process): Remove `detaching'
1381 parameter. Don't release/detach from thread_db here.
1382 (linux_kill): Release/detach from thread_db here, ...
1383 (linux_detach): ... and here, before actually detaching.
1384 (linux_wait_1): ... and here, when a process exits.
1385 * thread-db.c (any_thread_of): New.
1386 (thread_db_free): Switch the current inferior to a thread of the
1387 passed in process.
1388
1389 2009-12-21 Doug Evans <dje@google.com>
1390
1391 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
1392
1393 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
1394 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
1395 warning ifndef __NR_tkill. Move setting of errno there too.
1396 Delete unnecessary resetting of errno after syscall.
1397 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
1398
1399 * configure.ac: Check for dladdr.
1400 * config.in: Regenerate.
1401 * configure: Regenerate.
1402 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
1403 (try_thread_db_load): Update.
1404
1405 * linux-low.c (my_waitpid): Delete unnecessary prototype.
1406
1407 2009-12-18 Doug Evans <dje@google.com>
1408
1409 * event-loop.c: Include unistd.h if it exists.
1410
1411 * linux-low.c (my_waitpid): Move definition away from being in
1412 between linux_tracefork_child/linux_test_for_tracefork.
1413
1414 * gdb_proc_service.h (psaddr_t): Fix type.
1415 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
1416 signature to match glibc.
1417
1418 2009-12-16 Doug Evans <dje@google.com>
1419
1420 * linux-low.c (linux_read_memory): Fix argument to read.
1421
1422 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1423
1424 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
1425 events, don't leave current_inferior pointing at null.
1426
1427 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1428
1429 * win32-low.c (LOG): Delete.
1430 (OUTMSG): Output to stderr.
1431 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
1432 on compile time LOG macro.
1433 (win32_wait): Fix debug output.
1434
1435 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1436
1437 * win32-low.c (win32_add_one_solib): If the dll name is
1438 "ntdll.dll", prepend the system directory to the dll path.
1439
1440 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
1441
1442 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
1443
1444 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
1445 Vladimir Prus <vladimir@codesourcery.com>
1446
1447 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
1448 * configure.ac: Check for __mcoldfire__ and set
1449 gdb_cv_m68k_is_coldfire.
1450 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
1451 reg-cf.o and reg-m68k.o.
1452 * configure: Regenerated.
1453
1454 2009-11-16 Pedro Alves <pedro@codesourcery.com>
1455
1456 * linux-low.c (linux_remove_process): Add `detaching' parameter.
1457 Pass it to thread_db_free.
1458 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
1459 proper `detaching' argument to linux_remove_process.
1460 * linux-low.h (thread_db_free): Add `detaching' parameter.
1461 * thread-db.c (thread_db_init): Pass false as `detaching' argument
1462 to thread_db_free.
1463 (thread_db_free): Add `detaching' parameter. Only
1464 call td_ta_clear_event if detaching from process.
1465
1466 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
1467
1468 * thread-db.c (thread_db_free): Fix typo.
1469
1470 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
1471
1472 PR gdb/10838
1473 * thread-db.c (thread_db_free): Call td_ta_clear_event.
1474
1475 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
1476
1477 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
1478 with an i686 compiler.
1479 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
1480 needed.
1481 * configure: Rebuilt.
1482
1483 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
1484
1485 PR gdb/10783
1486
1487 * server.c (handle_search_memory_1): Correct read_addr initialization
1488 in loop for searching subsequent chunks.
1489
1490 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
1491
1492 * configure.ac: New --with-libthread-db option.
1493 * thread-db.c: Allow direct dependence on libthread_db.
1494 (thread_db_free): Adjust.
1495 * config.in: Regenerate.
1496 * configure: Likewise.
1497
1498 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
1499
1500 PR gdb/10757
1501 * thread-db.c (attach_thread): New function.
1502 (maybe_attach_thread): Return success/failure.
1503 (find_new_threads_callback): Adjust.
1504 (thread_db_find_new_threads): Loop until no new threads.
1505
1506 2009-10-13 Pedro Alves <pedro@codesourcery.com>
1507
1508 * proc-service.c (ps_lgetregs): Formatting.
1509
1510 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
1511
1512 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1513 * configure.ac: Adjust.
1514 * linux-low.h (struct process_info_private): Move members to struct
1515 thread_db.
1516 (thread_db_free, thread_db_handle_monitor_command): New prototype.
1517 * linux-low.c (linux_remove_process): Adjust.
1518 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1519 * server.c (handle_query): Move code ...
1520 (handle_monitor_command): ... here. New function.
1521 * target.h (struct target_ops): New member.
1522 * thread-db.c (struct thread_db): New.
1523 (libthread_db_search_path): New variable.
1524 (thread_db_create_event, thread_db_enable_reporting)
1525 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1526 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1527 (try_thread_db_load_1, dladdr_to_soname): New functions.
1528 (try_thread_db_load, thread_db_load_search): New functions.
1529 (thread_db_init): Search for libthread_db.
1530 (thread_db_free): New function.
1531 (thread_db_handle_monitor_command): Likewise.
1532 * config.in: Regenerate.
1533 * configure: Regenerate.
1534
1535 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1536
1537 * spu-low.c (spu_kill): Wait for inferior to terminate.
1538 Call clear_inferiors.
1539 (spu_detach): Call clear_inferiors.
1540
1541 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1542
1543 * aclocal.m4: Regenerate.
1544 * config.in: Likewise.
1545 * configure: Likewise.
1546
1547 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1548
1549 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1550 (parse_spufs_run): New function.
1551 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1552 (ppc_breakpoint_at): Handle SPU breakpoints.
1553
1554 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1555
1556 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1557 (SPUFS_MAGIC): Define.
1558 (spu_enumerate_spu_ids): New function.
1559 (linux_qxfer_spu): New function.
1560 (linux_target_ops): Install linux_qxfer_spu.
1561
1562 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1563
1564 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1565 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1566 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1567 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1568 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1569 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1570 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1571 (init_registers_powerpc_cell32l): Add prototype.
1572 (init_registers_powerpc_cell64l): Likewise.
1573 (ppc_arch_setup): Detect Cell/B.E. architecture.
1574
1575 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1576
1577 * Makefile.in (datarootdir): New variable.
1578
1579 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1580
1581 * linux-low.c (linux_write_memory): Update debugging output.
1582 * Makefile.in (clean): Add new descriptions.
1583 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1584 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1585 * configure.srv: Add new files for arm*-*-linux*.
1586 * linux-arm-low.c: Add new declarations.
1587 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1588 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1589 (HWCAP_VFPv3D16): New.
1590 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1591 instead of __IWMMXT__.
1592 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1593 (arm_arch_setup): New.
1594 (target_regsets): Remove #ifdef. Add VFP regset.
1595 (the_low_target): Use arm_arch_setup.
1596
1597 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1598
1599 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1600 the main thread again.
1601
1602 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1603
1604 Adding Neutrino gdbserver.
1605 * configure: Regenerated.
1606 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1607 * configure.srv (i[34567]86-*-nto*): New target.
1608 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1609 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1610 (nto_comctrl) [__QNX__]: New function.
1611 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1612
1613 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
1614
1615 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1616 srv_tgtobj.
1617
1618 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1619 Pedro Alves <pedro@codesourcery.com>
1620
1621 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1622 don't support CONTEXT_EXTENDED_REGISTERS.
1623 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1624 (the_low_target): Install them.
1625 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1626 failing with ERROR_PIPE_NOT_CONNECTED.
1627
1628 2009-06-30 Doug Evans <dje@google.com>
1629 Pierre Muller <muller@ics.u-strasbg.fr>
1630
1631 Add h/w watchpoint support to x86-linux, win32-i386.
1632 * Makefile.in (SFILES): Add i386-low.c
1633 (i386_low_h): Define.
1634 (i386-low.o): Add dependencies.
1635 (linux-x86-low.o): Add i386-low.h dependency.
1636 (win32-i386-low.o): Ditto.
1637 * i386-low.c: New file.
1638 * i386-low.h: New file.
1639 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1640 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1641 * linux-low.c (linux_add_process): Initialize arch_private.
1642 (linux_remove_process): Free arch_private.
1643 (add_lwp): Initialize arch_private.
1644 (delete_lwp): Free arch_private.
1645 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1646 provided.
1647 * linux-low.h (process_info_private): New member arch_private.
1648 (lwp_info): New member arch_private.
1649 (linux_target_ops): New members new_process, new_thread,
1650 prepare_to_resume.
1651 (ptid_of): New macro.
1652 * linux-x86-low.c: Include stddef.h, i386-low.h.
1653 (arch_process_info): New struct.
1654 (arch_lwp_info): New struct.
1655 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1656 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1657 (i386_dr_low_get_status): New function.
1658 (x86_insert_point, x86_remove_point): New functions.
1659 (x86_stopped_by_watchpoint): New function.
1660 (x86_stopped_data_address): New function.
1661 (x86_linux_new_process, x86_linux_new_thread): New functions.
1662 (x86_linux_prepare_to_resume): New function.
1663 (the_low_target): Add entries for insert_point, remove_point,
1664 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1665 prepare_to_resume.
1666 * server.c (debug_hw_points): New global.
1667 (monitor_show_help): Document set debug-hw-points.
1668 (handle_query): Process "set debug-hw-points".
1669 * server.h (debug_hw_points): Declare.
1670 (paddress): Declare.
1671 * utils.c (NUMCELLS, CELLSIZE): New macros.
1672 (get_sell, xsnprintf, paddress): New functions.
1673 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1674 remove_point, stopped_by_watchpoint, stopped_data_address.
1675 * win32-i386-low.c: Include i386-low.h.
1676 (debug_reg_state): Replaces dr.
1677 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1678 (i386_dr_low_get_status): New function.
1679 (i386_insert_point, i386_remove_point): New functions.
1680 (i386_stopped_by_watchpoint): New function.
1681 (i386_stopped_data_address): New function.
1682 (i386_initial_stuff): Update.
1683 (get_thread_context,set_thread_context,i386_thread_added): Update.
1684 (the_low_target): Add entries for insert_point,
1685 remove_point, stopped_by_watchpoint, stopped_data_address.
1686 * win32-low.c (win32_insert_watchpoint): New function.
1687 (win32_remove_watchpoint): New function.
1688 (win32_stopped_by_watchpoint): New function.
1689 (win32_stopped_data_address): New function.
1690 (win32_target_ops): Add entries for insert_watchpoint,
1691 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1692 * win32-low.h (win32_target_ops): New members insert_point,
1693 remove_point, stopped_by_watchpoint, stopped_data_address.
1694
1695 2009-06-25 Pedro Alves <pedro@codesourcery.com>
1696
1697 * server.c (process_serial_event): Re-return unsupported, not
1698 error, if the type isn't recognized. Re-allow supporting only
1699 insert or remove packets. Also call require_running for
1700 breakpoints. Add missing break statement to default case. Tidy.
1701 * target.h (struct target_ops): Rename insert_watchpoint to
1702 insert_point, and remove_watchpoint to remove_point.
1703
1704 * linux-low.h (struct linux_target_ops): Likewise.
1705 * linux-low.c (linux_insert_watchpoint): Rename to ...
1706 (linux_insert_point): ... this. Adjust.
1707 (linux_remove_watchpoint): Rename to ...
1708 (linux_remove_point): ... this. Adjust.
1709 (linux_target_ops): Adjust.
1710 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1711 (cris_insert_point): ... this.
1712 (cris_remove_watchpoint): Rename to ...
1713 (cris_remove_point): ... this.
1714 (the_low_target): Adjust.
1715
1716 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1717
1718 * server.c (handle_v_kill): Pass signal_pid to
1719 kill_inferior if multi_process is zero.
1720
1721 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1722
1723 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1724 * target.h (target_ops): Comment for *_watchpoint to make it clear
1725 the functions can get types '0' and '1'.
1726
1727 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1728
1729 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1730 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1731 * regcache.c (get_regcache): Likewise.
1732 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1733 * win32-low.c (child_fetch_inferior_registers): Remove check for
1734 regno 0.
1735
1736 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1737 Pedro Alves <pedro@codesourcery.com>
1738
1739 * target.h (struct target_ops) <supports_multi_process>: New
1740 callback.
1741 (target_supports_multi_process): New.
1742 * server.c (handle_query): Even if GDB reports support, only
1743 enable multi-process if the target also supports it. Report
1744 multi-process support only if the target backend supports it.
1745 * linux-low.c (linux_supports_multi_process): New function.
1746 (linux_target_ops): Install it as target_supports_multi_process
1747 callback.
1748
1749 2009-05-24 Doug Evans <dje@google.com>
1750
1751 Global renaming of find_thread_pid to find_thread_ptid.
1752 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1753 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1754 All callers updated.
1755
1756 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1757 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1758 directly.
1759
1760 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1761 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1762 (linux_resume_one_lwp): Ditto.
1763
1764 2009-05-23 Doug Evans <dje@google.com>
1765
1766 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1767 from struct inferior_list_entry * to struct lwp_info *.
1768 All callers updated.
1769
1770 2009-05-13 Doug Evans <dje@google.com>
1771
1772 * linux-x86-low.c: Don't include assert.h.
1773 (x86_siginfo_fixup): Use fatal, not assert.
1774 (x86_arch_setup): Fix comment.
1775
1776 2009-05-12 Doug Evans <dje@google.com>
1777
1778 Biarch support for i386/amd64 gdbserver.
1779 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1780 Add linux-x86-low.c.
1781 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1782 (linux-x86-low.o): Add.
1783 * linux-x86-64-low.c: Delete.
1784 * linux-i386-low.c: Delete.
1785 * linux-x86-low.c: New file.
1786 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1787 linux-x86-low.o.
1788 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1789 linux-x86-low.o.
1790 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1791 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1792 (linux_child_pid_to_exec_file): New function.
1793 (elf_64_header_p, elf_64_file_p): New functions.
1794 (siginfo_fixup): New function.
1795 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1796 give target a chance to convert layout.
1797 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1798 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1799
1800 2009-05-07 Doug Evans <dje@google.com>
1801
1802 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
1803 (regsets_store_inferior_registers): Ditto.
1804
1805 2009-05-06 Pedro Alves <pedro@codesourcery.com>
1806
1807 PR server/10048
1808
1809 * linux-low.c (must_set_ptrace_flags): Delete.
1810 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
1811 of the global.
1812 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
1813 `lwp->must_set_ptrace_flags' instead.
1814 (linux_wait_for_event_1): Set ptrace options here.
1815 (linux_wait_1): ... not here.
1816
1817 2009-04-30 Doug Evans <dje@google.com>
1818
1819 * inferiors.c (started_inferior_callback): New function.
1820 (attached_inferior_callback): New function.
1821 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
1822 * server.c (print_started_pid, print_attached_pid): New functions.
1823 (detach_or_kill_for_exit): New function.
1824 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1825 * server.h (have_started_inferiors_p): Declare.
1826 (have_attached_inferiors_p): Declare.
1827
1828 * inferiors.c (remove_process): Fix memory leak, free process.
1829 * linux-low.c (linux_remove_process): New function.
1830 (linux_kill): Call it instead of remove_process.
1831 (linux_detach, linux_wait_1): Ditto.
1832
1833 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1834
1835 * configure.srv: Add x86 Windows CE target.
1836
1837 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1838
1839 * inferiors.c (get_thread_process): Make global.
1840 * server.h (get_thread_process): Add prototype.
1841 * thread-db.c (find_one_thread): Use get_thread_process
1842 instead of current_process.
1843 (thread_db_get_tls_address): Do not crash if called when
1844 thread layer is not yet initialized.
1845
1846 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1847
1848 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1849 * spu-low.c (current_tid): Rename to ...
1850 (current_ptid): ... this.
1851 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1852 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1853 ptid_get_lwp (current_ptid) instead of current_tid.
1854 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1855 instead of current_tid. Use find_process_pid to verify pid
1856 argument is valid. Pass proper argument to remove_process.
1857 (spu_thread_alive): Compare current_ptid instead of current_tid.
1858 (spu_resume): Likewise.
1859
1860 2009-04-02 Pedro Alves <pedro@codesourcery.com>
1861
1862 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1863 variable.
1864
1865 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1866
1867 Implement the multiprocess extensions, and add linux multiprocess
1868 support.
1869
1870 * server.h (ULONGEST): Declare.
1871 (struct ptid, ptid_t): New.
1872 (minus_one_ptid, null_ptid): Declare.
1873 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1874 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1875 (struct inferior_list_entry): Change `id' type from unsigned from
1876 to ptid_t.
1877 (struct sym_cache, struct breakpoint, struct
1878 process_info_private): Forward declare.
1879 (struct process_info): Declare.
1880 (current_process): Declare.
1881 (all_processes): Declare.
1882 (initialize_inferiors): Declare.
1883 (add_thread): Adjust to use ptid_t.
1884 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1885 (add_process, remove_process, find_thread_pid): Declare.
1886 (find_inferior_id): Adjust to use ptid_t.
1887 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1888 (multi_process): Declare.
1889 (push_event): Adjust to use ptid_t.
1890 (read_ptid, write_ptid): Declare.
1891 (prepare_resume_reply): Adjust to use ptid_t.
1892 (clear_symbol_cache): Declare.
1893 * inferiors.c (all_processes): New.
1894 (null_ptid, minus_one_ptid): New.
1895 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1896 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1897 (add_thread): Change unsigned long to ptid. Remove gdb_id
1898 parameter. Adjust.
1899 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1900 (gdb_id_to_thread): Rename to ...
1901 (find_thread_pid): ... this. Change unsigned long to ptid.
1902 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1903 (loaded_dll, pull_pid_from_list): Adjust.
1904 (add_process, remove_process, find_process_pid)
1905 (get_thread_process, current_process, initialize_inferiors): New.
1906 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1907 (struct target_waitstatus) <related_pid>: Ditto.
1908 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1909 return type to int.
1910 (struct target_ops) <join>: Add `pid' argument.
1911 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1912 (struct target_ops) <wait>: Add `ptid' field. Change return type
1913 to ptid.
1914 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1915 (mywait): Add `ptid' argument. Change return type to ptid_t.
1916 (target_pid_to_str): Declare.
1917 * target.c (set_desired_inferior): Adjust to use ptids.
1918 (mywait): Add new `ptid' argument. Adjust.
1919 (target_pid_to_str): New.
1920 * mem-break.h (free_all_breakpoints): Declare.
1921 * mem-break.c (breakpoints): Delelete.
1922 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1923 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1924 to use per-process breakpoint list.
1925 (free_all_breakpoints): New.
1926 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1927 (symbol_cache, all_symbols_looked_up): Delete.
1928 (hexchars): New.
1929 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1930 read_ptid): New.
1931 (prepare_resume_reply): Change ptid argument's type from unsigned
1932 long to ptid_t. Adjust. Implement W;process and X;process.
1933 (free_sym_cache, clear_symbol_cache): New.
1934 (look_up_one_symbol): Adjust to per-process symbol cache. *
1935 * server.c (cont_thread, general_thread, step_thread): Change type
1936 to ptid_t.
1937 (attached): Delete.
1938 (multi_process): New.
1939 (last_ptid): Change type to ptid_t.
1940 (struct vstop_notif) <ptid>: Change type to ptid_t.
1941 (queue_stop_reply, push_event): Change `ptid' argument's type to
1942 ptid_t.
1943 (discard_queued_stop_replies): Add `pid' argument.
1944 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1945 changes. Don't reference the `attached' global.
1946 (attach_inferior): Adjust to mywait interface changes.
1947 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1948 features. Handle and report "multiprocess+". Handle
1949 "qAttached:PID".
1950 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1951 changes.
1952 (handle_v_kill): New.
1953 (handle_v_stopped): Adjust to use target_pid_to_str.
1954 (handle_v_requests): Allow multiple attaches and runs when
1955 multiprocess extensions are in effect. Handle "vKill".
1956 (myresume): Adjust to use ptids.
1957 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1958 (handle_status): Adjust to discard_queued_stop_replies interface
1959 change.
1960 (first_thread_of, kill_inferior_callback)
1961 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1962 (main): Call initialize_inferiors. Adjust to use ptids, killing
1963 and detaching from all inferiors. Handle multiprocess packet
1964 variants.
1965 * linux-low.h: Include gdb_proc_service.h.
1966 (struct process_info_private): New.
1967 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1968 <lwpid_of>: Use ptid_get_lwp.
1969 (get_lwp_thread): Adjust.
1970 (struct lwp_info): Add `dead' member.
1971 (find_lwp_pid): Declare.
1972 * linux-low.c (thread_db_active): Delete.
1973 (new_inferior): Adjust comment.
1974 (inferior_pid): Delete.
1975 (linux_add_process): New.
1976 (handle_extended_wait): Adjust.
1977 (add_lwp): Change unsigned long to ptid.
1978 (linux_create_inferior): Add process to processes table. Adjust
1979 to use ptids. Don't set new_inferior here.
1980 (linux_attach_lwp): Rename to ...
1981 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1982 it. Adjust to use ptids.
1983 (linux_attach_lwp): New.
1984 (linux_attach): Add process to processes table. Don't set
1985 new_inferior here.
1986 (struct counter): New.
1987 (second_thread_of_pid_p, last_thread_of_process_p): New.
1988 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1989 multiple processes.
1990 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1991 processes. Remove process from process table.
1992 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1993 to multiple processes.
1994 (any_thread_of): New.
1995 (linux_detach): Add `pid' argument, and handle it. Remove process
1996 from processes table.
1997 (linux_join): Add `pid' argument. Handle it.
1998 (linux_thread_alive): Change unsighed long argument to ptid_t.
1999 Consider dead lwps as not being alive.
2000 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2001 threads we're not interested in.
2002 (same_lwp, find_lwp_pid): New.
2003 (linux_wait_for_lwp): Change `pid' argument's type from int to
2004 ptid_t. Adjust.
2005 (linux_wait_for_event): Rename to ...
2006 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2007 from int to ptid_t. Adjust.
2008 (linux_wait_for_event): New.
2009 (linux_wait_1): Add `ptid' argument. Change return type to
2010 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2011 that exit from the process table.
2012 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2013 Adjust.
2014 (mark_lwp_dead): New.
2015 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2016 stopping all threads, mark its main lwp as dead.
2017 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2018 ptids.
2019 (fetch_register, usr_store_inferior_registers)
2020 (regsets_fetch_inferior_registers)
2021 (regsets_store_inferior_registers, linux_read_memory)
2022 (linux_write_memory): Inline `inferior_pid'.
2023 (linux_look_up_symbols): Adjust to use per-process
2024 `thread_db_active'.
2025 (linux_request_interrupt): Adjust to use ptids.
2026 (linux_read_auxv): Inline `inferior_pid'.
2027 (initialize_low): Don't reference thread_db_active.
2028 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2029 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2030 (ps_getpid): Return the pid of the current inferior.
2031 * thread-db.c (proc_handle, thread_agent): Delete.
2032 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2033 per-process data.
2034 (find_one_thread): Change argument type to ptid_t. Adjust to
2035 per-process data.
2036 (maybe_attach_thread): Adjust to per-process data and ptids.
2037 (thread_db_find_new_threads): Ditto.
2038 (thread_db_init): Ditto.
2039 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2040 processes table. Adjust to use ptids.
2041 (spu_kill, spu_detach): Adjust interface. Remove process from
2042 processes table.
2043 (spu_join, spu_thread_alive): Adjust interface.
2044 (spu_wait): Adjust interface. Remove process from processes
2045 table. Adjust to use ptids.
2046 * win32-low.c (current_inferior_tid): Delete.
2047 (current_inferior_ptid): New.
2048 (debug_event_ptid): New.
2049 (thread_rec): Take a ptid. Adjust.
2050 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2051 (child_delete_thread): Ditto.
2052 (do_initial_child_stuff): Add `attached' argument. Add process to
2053 processes table.
2054 (child_fetch_inferior_registers, child_store_inferior_registers):
2055 Adjust.
2056 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2057 (win32_attach): Pass 1 to do_initial_child_stuff.
2058 (win32_kill): Adjust interface. Remove process from processes
2059 table.
2060 (win32_detach): Ditto.
2061 (win32_join): Adjust interface.
2062 (win32_thread_alive): Take a ptid.
2063 (win32_resume): Adjust to use ptids.
2064 (get_child_debug_event): Ditto.
2065 (win32_wait): Adjust interface. Remove exiting process from
2066 processes table.
2067
2068 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2069
2070 Non-stop mode support.
2071
2072 * server.h (non_stop): Declare.
2073 (gdb_client_data, handler_func): Declare.
2074 (delete_file_handler, add_file_handler, start_event_loop):
2075 Declare.
2076 (handle_serial_event, handle_target_event, push_event)
2077 (putpkt_notif): Declare.
2078 * target.h (enum resume_kind): New.
2079 (struct thread_resume): Replace `step' field by `kind' field.
2080 (TARGET_WNOHANG): Define.
2081 (struct target_ops) <wait>: Add `options' argument.
2082 <supports_non_stop, async, start_non_stop>: New fields.
2083 (target_supports_non_stop, target_async): New.
2084 (start_non_stop): Declare.
2085 (mywait): Add `options' argument.
2086 * target.c (mywait): Add `options' argument. Print child exit
2087 notifications here.
2088 (start_non_stop): New.
2089 * server.c (non_stop, own_buf, mem_buf): New globals.
2090 (struct vstop_notif): New.
2091 (notif_queue): New global.
2092 (queue_stop_reply, push_event, discard_queued_stop_replies)
2093 (send_next_stop_reply): New.
2094 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2095 interface changes.
2096 (attach_inferior): In non-stop mode, don't wait for the target
2097 here.
2098 (handle_general_set): Handle QNonStop.
2099 (handle_query): When handling qC, return the current general
2100 thread, instead of the first thread of the list.
2101 (handle_query): If the backend supports non-stop mode, include
2102 QNonStop+ in the qSupported query response.
2103 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2104 and non-stop mode.
2105 (handle_v_attach, handle_v_run): Handle non-stop mode.
2106 (handle_v_stopped): New.
2107 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2108 (myresume): Adjust to use resume_kind. Handle non-stop.
2109 (queue_stop_reply_callback): New.
2110 (handle_status): Handle non-stop mode.
2111 (main): Clear non_stop flag on reconnection. Use the event-loop.
2112 Refactor serial protocol handling from here ...
2113 (process_serial_event): ... to this new function. When GDB
2114 selects any thread, select one here. In non-stop mode, wait until
2115 GDB acks all pending events before exiting.
2116 (handle_serial_event, handle_target_event): New.
2117 * remote-utils.c (remote_open): Install remote_desc in the event
2118 loop.
2119 (remote_close): Remove remote_desc from the event loop.
2120 (putpkt_binary): Rename to...
2121 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2122 (putpkt_binary): New as wrapper around putpkt_binary_1.
2123 (putpkt_notif): New.
2124 (prepare_resume_reply): In non-stop mode, don't change the
2125 general_thread.
2126 * event-loop.c: New.
2127 * Makefile.in (OBJ): Add event-loop.o.
2128 (event-loop.o): New rule.
2129
2130 * linux-low.h (pid_of): Moved here.
2131 (lwpid_of): New.
2132 (get_lwp_thread): Use lwpid_of.
2133 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2134 * linux-low.c (pid_of): Delete.
2135 (inferior_pid): Use lwpid_of.
2136 (linux_event_pipe): New.
2137 (target_is_async_p): New.
2138 (delete_lwp): New.
2139 (handle_extended_wait): Use lwpid_of.
2140 (add_lwp): Don't set lwpid field.
2141 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2142 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2143 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2144 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2145 first. Adjust to linux_wait_for_event interface changes. Use
2146 lwpid_of.
2147 (linux_detach): Don't delete the main lwp here.
2148 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2149 (status_pending_p): Don't consider explicitly suspended lwps.
2150 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2151 pointer. Add OPTIONS argument. Change return type to int. Use
2152 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
2153 (linux_wait_for_event): Take an integer pid instead of a lwp_info
2154 pointer. Add status pointer argument. Return a pid instead of a
2155 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
2156 changes. In non-stop mode, don't switch to a random thread.
2157 (linux_wait): Rename to...
2158 (linux_wait_1): ... this. Add target_options argument, and handle
2159 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
2160 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
2161 clean exit and signal exit code. Don't stop all threads in
2162 non-stop mode. In all-stop mode, only stop all threads when
2163 reporting a stop to GDB. Handle explicit thread stop requests.
2164 (async_file_flush, async_file_mark): New.
2165 (linux_wait): New.
2166 (send_sigstop): Use lwpid_of.
2167 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
2168 interface changes. In non-stop mode, don't switch to a random
2169 thread.
2170 (linux_resume_one_lwp): Use lwpid_of.
2171 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
2172 (linux_resume_one_thread): ... this. Handle resume_stop. In
2173 non-stop mode, don't look for pending flag in all threads.
2174 (resume_status_pending_p): Don't consider explicitly suspended
2175 threads.
2176 (my_waitpid): Reimplement. Emulate __WALL.
2177 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2178 Use lwpid_of.
2179 (sigchld_handler, linux_supports_non_stop, linux_async)
2180 (linux_start_non_stop): New.
2181 (linux_target_ops): Register linux_supports_non_stop, linux_async
2182 and linux_start_non_stop.
2183 (initialize_low): Install SIGCHLD handler.
2184 * thread-db.c (thread_db_create_event, find_one_thread)
2185 (thread_db_get_tls_address): Use lwpid_of.
2186 * win32-low.c (win32_detach): Adjust to use resume_kind.
2187 (win32_wait): Add `options' argument.
2188 * spu-low.c (spu_resume): Adjust to use resume_kind.
2189 (spu_wait): Add `options' argument.
2190
2191 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2192
2193 Decouple target code from remote protocol.
2194
2195 * target.h (enum target_waitkind): New.
2196 (struct target_waitstatus): New.
2197 (struct target_ops) <wait>: Return an unsigned long. Take a
2198 target_waitstatus pointer instead of a char pointer.
2199 (mywait): Likewise.
2200 * target.c (mywait): Change prototype to return an unsigned long.
2201 Take a target_waitstatus pointer instead of a char pointer. Adjust.
2202 * server.h (thread_from_wait, old_thread_from_wait): Delete
2203 declarations.
2204 (prepare_resume_reply): Change prototype to take a
2205 target_waitstatus.
2206 * server.c (thread_from_wait, old_thread_from_wait): Delete.
2207 (last_status, last_ptid): New.
2208 (start_inferior): Remove "statusptr" argument. Adjust. Return a
2209 pid instead of a signal.
2210 (attach_inferior): Remove "status" and "signal" parameters.
2211 Adjust.
2212 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
2213 not as an address.
2214 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
2215 (handle_v_requests, myresume): Remove "status" and "signal"
2216 parameters. Adjust.
2217 (handle_status): New.
2218 (main): Delete local `status'. Adjust.
2219 * remote-utils.c: Include target.h.
2220 (prepare_resume_reply): Change prototype to take a
2221 target_waitstatus. Adjust.
2222
2223 * linux-low.c (linux_wait): Adjust to new target_ops->wait
2224 interface.
2225 * spu-low.c (spu_wait): Adjust.
2226 * win32-low.c (enum target_waitkind, struct target_waitstatus):
2227 Delete.
2228 (win32_wait): Adjust.
2229
2230 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2231
2232 * target.h (struct thread_resume): Delete leave_stopped member.
2233 (struct target_ops): Add a `n' argument to the `resume' callback.
2234 * server.c (start_inferior): Adjust.
2235 (handle_v_cont, myresume): Adjust.
2236 * linux-low.c (check_removed_breakpoint): Adjust to resume
2237 interface change, and to removed leave_stopped field.
2238 (resume_ptr): Delete.
2239 (struct thread_resume_array): New.
2240 (linux_set_resume_request): Add new `arg' parameter. Adjust to
2241 resume interface change.
2242 (linux_continue_one_thread, linux_queue_one_thread)
2243 (resume_status_pending_p): Check if the resume field is NULL
2244 instead of checking the leave_stopped member.
2245 (linux_resume): Adjust to the target resume interface change.
2246 * spu-low.c (spu_resume): Adjust to the target resume interface
2247 change.
2248 * win32-low.c (win32_detach, win32_resume): Ditto.
2249
2250 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2251
2252 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
2253 flag.
2254 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
2255 pending.
2256 (linux_continue_one_thread): Only preserve the stepping flag if
2257 there's a pending breakpoint.
2258
2259 2009-03-31 Pedro Alves <pedro@codesourcery.com>
2260
2261 * server.c (main): After the inferior having exited, call
2262 remote_close before exiting gdbserver.
2263
2264 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
2265
2266 Fix size of FPSCR in Power 7 processors.
2267 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
2268 (PPC_FEATURE_HAS_DFP): New #define.
2269 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
2270 size of the FPSCR.
2271
2272 2009-03-23 Pedro Alves <pedro@codesourcery.com>
2273
2274 * server.c (handle_query) Whitespace and formatting.
2275
2276 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2277
2278 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
2279 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
2280 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
2281 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
2282 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
2283 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
2284 Makefile.in, configure.ac: Fix whitespace throughout.
2285 * configure: Regenerate.
2286
2287 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2288
2289 * inferiors.c (find_inferior): Make it safe for the callback
2290 function to delete the currently iterated inferior.
2291
2292 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2293
2294 * Makefile.in (linuw_low_h): Move higher.
2295 (thread-db.o): Depend on $(linux_low_h).
2296
2297 2009-03-17 Pedro Alves <pedro@codesourcery.com>
2298
2299 Rename "process" to "lwp" throughout.
2300
2301 * linux-low.c (all_processes): Rename to...
2302 (all_lwps): ... this.
2303 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
2304 (add_process): Rename to ...
2305 (add_lwp): ... this. Adjust.
2306 (linux_create_inferior): Adjust.
2307 (linux_attach_lwp): Adjust.
2308 (linux_attach): Adjust.
2309 (linux_kill_one_process): Rename to ...
2310 (linux_kill_one_lwp): ... this. Adjust.
2311 (linux_kill): Adjust.
2312 (linux_detach_one_process): Rename to ...
2313 (linux_detach_one_lwp): ... this. Adjust.
2314 (linux_detach): Adjust.
2315 (check_removed_breakpoint): Adjust.
2316 (status_pending_p): Adjust.
2317 (linux_wait_for_process): Rename to ...
2318 (linux_wait_for_lwp): ... this. Adjust.
2319 (linux_wait_for_event): Adjust.
2320 (send_sigstop): Adjust.
2321 (wait_for_sigstop): Adjust.
2322 (stop_all_processes): Rename to ...
2323 (stop_all_lwps): ... this.
2324 (linux_resume_one_process): Rename to ...
2325 (linux_resume_one_lwp): ... this. Adjust.
2326 (linux_set_resume_request, linux_continue_one_thread)
2327 (linux_queue_one_thread, resume_status_pending_p)
2328 (usr_store_inferior_registers, regsets_store_inferior_registers)
2329 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2330 Adjust.
2331 * linux-low.h (get_process): Rename to ...
2332 (get_lwp): ... this. Adjust.
2333 (get_thread_process): Rename to ...
2334 (get_thread_lwp): ... this. Adjust.
2335 (get_process_thread): Rename to ...
2336 (get_lwp_thread): ... this. Adjust.
2337 (struct process_info): Rename to ...
2338 (struct lwp_info): ... this.
2339 (all_processes): Rename to ...
2340 (all_lwps): ... this.
2341 * proc-service.c (ps_lgetregs): Adjust.
2342 * thread-db.c (thread_db_create_event, find_one_thread)
2343 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
2344
2345 2009-03-14 Pedro Alves <pedro@codesourcery.com>
2346
2347 * server.c (handle_query): Handle "qAttached".
2348
2349 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
2350
2351 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
2352 GPLv3, update license URL.
2353
2354 2009-03-01 Doug Evans <dje@google.com>
2355
2356 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2357 (server_h): Add gdb_signals.h.
2358 (signals.o): Update.
2359 * server.h (target_signal_from_host,target_signal_to_host_p)
2360 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
2361
2362 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
2363
2364 * remote-utils.c (getpkt): Also generate remote-debug
2365 information if noack_mode is set.
2366
2367 2009-02-06 Pedro Alves <pedro@codesourcery.com>
2368
2369 * server.c (handle_query): Report qXfer:siginfo:read and
2370 qXfer:siginfo:write as supported and handle them.
2371 * target.h (struct target_ops) <qxfer_siginfo>: New field.
2372 * linux-low.c (linux_xfer_siginfo): New.
2373 (linux_target_ops): Set it.
2374
2375 2009-01-26 Pedro Alves <pedro@codesourcery.com>
2376
2377 * server.c (gdbserver_usage): Mention --remote-debug.
2378 (main): Accept '--remote-debug' switch.
2379
2380 2009-01-18 Doug Evans <dje@google.com>
2381
2382 * regcache.c (new_register_cache): No need to check result of xcalloc.
2383 * server.c (handle_search_memory): Back out calls to xmalloc,
2384 result is checked and error is returned to user upon failure.
2385 (handle_query): Ditto. Add more checks for result of malloc.
2386 (handle_v_cont): Check result of malloc, report error back to
2387 user upon failure.
2388 (handle_v_run): Ditto. Call freeargv.
2389 * server.h (freeargv): Declare.
2390 * utils.c (freeargv): New fn.
2391
2392 2009-01-15 Doug Evans <dje@google.com>
2393
2394 * gdbreplay.c (perror_with_name): Make arg const char *.
2395 * server.h (target_signal_to_name): Make return type const char *.
2396 * thread-db.c (thread_db_err_str): Make return type const char *.
2397 * utils.c (perror_with_name): Make arg const char *.
2398
2399 2009-01-14 Pedro Alves <pedro@codesourcery.com>
2400
2401 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
2402 when handling a EXIT_PROCESS_DEBUG_EVENT.
2403
2404 2009-01-06 Joel Brobecker <brobecker@adacore.com>
2405
2406 * gdbreplay.c (gdbreplay_version): Update copyright year.
2407 * server.c (gdbserver_version): Likewise.
2408
2409 2009-01-05 Doug Evans <dje@google.com>
2410
2411 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
2412 (handle_extended_wait): Improve comment.
2413
2414 2008-12-13 Doug Evans <dje@google.com>
2415
2416 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
2417 * server.h (ATTR_MALLOC): New macro.
2418 (xmalloc,xcalloc,xstrdup): Declare.
2419 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
2420 * inferiors.c: Ditto.
2421 * linux-low.c: Ditto.
2422 * mem-break.c: Ditto.
2423 * regcache.c: Ditto.
2424 * remote-utils.c: Ditto.
2425 * server.c: Ditto.
2426 * target.c: Ditto.
2427 * win32-low.c: Ditto.
2428
2429 2008-12-12 Doug Evans <dje@google.com>
2430
2431 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
2432 in debugging printf.
2433
2434 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
2435
2436 2008-12-09 Doug Evans <dje@google.com>
2437
2438 * linux-low.h (struct process_info): Delete member tid, unused.
2439 * thread-db.c (find_one_thread): Update.
2440 (maybe_attach_thread): Update.
2441
2442 2008-12-02 Pedro Alves <pedro@codesourcery.com>
2443
2444 * target.h (struct target_ops): Add qxfer_osdata member.
2445 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
2446 and dirent.h.
2447 (linux_qxfer_osdata): New functions.
2448 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
2449 callback.
2450 * server.c (handle_query): Handle "qXfer:osdata:read:".
2451 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
2452 (buffer_xml_printf): New functions.
2453 * server.h (struct buffer): New.
2454 (buffer_grow_str, buffer_grow_str0): New macros.
2455 (buffer_grow, buffer_free, buffer_init, buffer_finish)
2456 (buffer_xml_printf): Declare.
2457
2458 2008-11-24 Doug Evans <dje@google.com>
2459
2460 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
2461
2462 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
2463
2464 * server.c (handle_v_run): Always use the supplied argument list.
2465
2466 2008-11-19 Bob Wilson <bob.wilson@acm.org>
2467
2468 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
2469 (xtensa_regmap_table): Add entry for scompare1.
2470
2471 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
2472
2473 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
2474 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
2475 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
2476 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
2477 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
2478 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
2479 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
2480 XML target descriptions.
2481 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
2482 when inferior is running on an ISA 2.05 or later processor. Add
2483 special case to return offset for full 64-bit slot of FPSCR when
2484 in 32-bits.
2485
2486 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
2487
2488 * Makefile.in (SFILES, clean): Added sparc64 files.
2489 (reg-sparc64.o, reg-sparc64.c): New.
2490 * configure.srv (sparc*-*-linux*): New configuration.
2491 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2492 syscall arguments for SPARC.
2493 (regsets_store_inferior_registers): Likewise.
2494 * linux-sparc-low.c: New file.
2495
2496 2008-10-21 Doug Evans <dje@google.com>
2497
2498 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2499 (READLINE_DIR,READLINE_DEP): Delete.
2500 (INTERNAL_CFLAGS): Update.
2501 (LINTFLAGS): Update.
2502
2503 2008-10-10 Pedro Alves <pedro@codesourcery.com>
2504
2505 * server.c (handle_v_run): If GDB didn't specify an argv, use the
2506 whole argv from the last run, not just argv[0].
2507
2508 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2509
2510 * regcache.c (new_register_cache): Return NULL if the register
2511 cache size isn't known yet.
2512 (free_register_cache): Avoid dereferencing a NULL regcache.
2513
2514 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2515
2516 * configure.srv: Merge MIPS and MIPS64.
2517
2518 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
2519
2520 * Makefile.in (uninstall): Apply $(EXEEXT) too.
2521
2522 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
2523
2524 * Makefile.in: Add required vsx dependencies.
2525
2526 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2527 Declare init_registers_powerpc_vsx32l.
2528 Declare init_registers_powerpc_vsx64l.
2529 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2530 (ppc_arch_setup): Check for VSX in hwcap.
2531 (ppc_fill_vsxregset): New function.
2532 (ppc_store_vsxregset): New function.
2533 Add new VSX entry in regset_info target_regsets.
2534
2535 * configure.srv: Add new VSX dependencies.
2536
2537 2008-08-12 Pedro Alves <pedro@codesourcery.com>
2538
2539 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2540 (remote_open): Set or clear transport_is_reliable.
2541 (putpkt_binary): Don't expect acks in noack mode.
2542 (getpkt): Don't send ack/nac in noack mode.
2543 * server.c (handle_general_set): Handle QStartNoAckMode.
2544 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2545 qSupported.
2546 (main): Reset noack_mode on every connection.
2547 * server.h (noack_mode): Declare.
2548
2549 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2550
2551 * Makefile.in (GDBREPLAY_OBS): New variable.
2552 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2553
2554 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2555 Daniel Jacobowitz <dan@codesourcery.com>
2556
2557 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2558 (usr_store_inferior_registers): Likewise.
2559 (regsets_store_inferior_registers): Likewise.
2560
2561 2008-07-31 Rolf Jansen <rj@surtec.com>
2562 Pedro Alves <pedro@codesourcery.com>
2563
2564 * configure.ac: Check for memmem declaration.
2565 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2566 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2567 (disable_packet_qfThreadInfo): Unconditionally compile.
2568 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2569 * configure, config.in: Regenerate.
2570
2571 2008-07-28 Doug Kwan <dougkwan@google.com>
2572
2573 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2574 (linux_write_memory): Remove declaration of errno.
2575
2576 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2577
2578 * linux-low.c (handle_extended_wait): Do not use "status"
2579 variable uninitialized.
2580
2581 2008-07-07 Pedro Alves <pedro@codesourcery.com>
2582
2583 * server.c (handle_v_attach): Inhibit reporting dll changes.
2584
2585 2008-06-27 Pedro Alves <pedro@codesourcery.com>
2586
2587 * remote-utils.c (prepare_resume_reply): If requested, don't
2588 output "thread:TID" in the T stop reply.
2589
2590 * server.c (disable_packet_vCont, disable_packet_Tthread)
2591 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2592 (handle_query): If requested, disable support for qC, qfThreadInfo
2593 and qsThreadInfo.
2594 (handle_v_requests): If requested, disable support for vCont.
2595 (gdbserver_show_disableable): New.
2596 (main): Handle --disable-packet and --disable-packet=LIST.
2597
2598 * server.h (disable_packet_vCont, disable_packet_Tthread)
2599 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2600
2601 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2602
2603 * server.c (gdbserver_usage): Mention --version.
2604
2605 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2606
2607 * Makefile.in (gdbreplay.o): New rule.
2608
2609 2008-06-06 Joseph Myers <joseph@codesourcery.com>
2610
2611 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2612 message, not gdbserver.
2613
2614 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2615 Nathan Sidwell <nathan@codesourcery.com>
2616 Joseph Myers <joseph@codesourcery.com>
2617
2618 * acinclude.m4: Include ../../config/acx.m4.
2619 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2620 * configure, config.in: Regenerate.
2621 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2622 * server.c (gdbserver_version): Print PKGVERSION.
2623 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2624 (main): Adjust gdbserver_usage calls.
2625 * gdbreplay.c (version, host_name): Add declarations.
2626 (gdbreplay_version, gdbreplay_usage): New.
2627 (main): Accept --version and --help options.
2628
2629 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2630
2631 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2632 (arm_breakpoint_at): Handle Thumb.
2633 (the_low_target): Add comment.
2634
2635 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2636
2637 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2638
2639 2008-05-09 Doug Evans <dje@google.com>
2640
2641 * server.h (decode_search_memory_packet): Declare.
2642 * remote-utils.c (decode_search_memory_packet): New fn.
2643 * server.c (handle_search_memory_1): New fn.
2644 (handle_search_memory): New fn.
2645 (handle_query): Process qSearch:memory packets.
2646
2647 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2648
2649 * regcache.c (registers_length): Remove.
2650 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2651 full register packet.
2652 * regcache.h (registers_length): Remove prototype.
2653 * server.h (PBUFSIZ): Define to 16384.
2654
2655 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2656
2657 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2658 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2659 powerpc-64l.o, and powerpc-altivec64l.o.
2660 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2661 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2662 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2663 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2664 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2665 to srv_xmlfiles.
2666
2667 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2668 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2669 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2670 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2671 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2672 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2673 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2674 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2675 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2676 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2677 (clean): Update.
2678
2679 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2680 (init_registers_powerpc_32l): ... this new prototype.
2681 (init_registers_powerpc_32): Remove, replace by ...
2682 (init_registers_powerpc_altivec32l): ... this new prototype.
2683 (init_registers_powerpc_e500): Remove, replace by ...
2684 (init_registers_powerpc_e500l): ... this new prototype.
2685 (init_registers_ppc64): Remove, replace by ...
2686 (init_registers_powerpc_64l): ... this new prototype.
2687 (init_registers_powerpc_64): Remove, replace by ...
2688 (init_registers_powerpc_altivec64l): ... this new prototype.
2689 (ppc_num_regs): Set to 73.
2690 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2691 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2692 (ppc_cannot_store_register): Handle orig_r3 and trap.
2693 (ppc_arch_setup): Update init_registers_... calls.
2694 (ppc_fill_gregset): Handle orig_r3 and trap.
2695
2696 * inferiors.c (clear_inferiors): Reset current_inferior.
2697
2698 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2699
2700 * acinclude.m4: Add override.m4.
2701 * configure: Regenerate.
2702
2703 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2704
2705 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2706 initial call to init_register_ppc64.
2707
2708 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2709
2710 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2711 powerpc*-*-linux* case.
2712 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2713
2714 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2715
2716 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2717 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2718 from reg_xmlfiles.
2719 * linux-ppc-low.c: Include <elf.h>.
2720 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2721 (ppc_hwcap): New global variable.
2722 (ppc_regmap): Remove __SPE__ #ifdef sections.
2723 (ppc_regmap_e500): New global variable.
2724 (ppc_cannot_store_register): Update __SPE__ special case.
2725 (ppc_get_hwcap): New function.
2726 (ppc_arch_setup): Use it to determine whether inferior supports
2727 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2728 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2729 Do not access registers if target does not support AltiVec.
2730 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2731 Do not access registers if target does not support SPE.
2732 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2733
2734 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2735
2736 * linux-low.c (disabled_regsets, num_regsets): New.
2737 (use_regsets_p): Delete.
2738 (linux_wait_for_process): Clear disabled_regsets.
2739 (regsets_fetch_inferior_registers): Check and set it.
2740 (regsets_store_inferior_registers): Likewise.
2741 (linux_fetch_registers, linux_store_registers): Do not use
2742 use_regsets_p.
2743 (initialize_low): Allocate disabled_regsets.
2744
2745 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2746
2747 * Makefile.in (LIBOBJS): New.
2748 (OBS): Use LIBOBJS.
2749 (memmem.o): New rule.
2750 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2751 * configure: Regenerated.
2752
2753 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2754
2755 * server.c (handle_query): Never return "unsupported" for
2756 qXfer:features:read queries.
2757
2758 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2759
2760 * server.c (get_features_xml): Fix inverted condition.
2761 (handle_query): Always support qXfer:feature:read.
2762
2763 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2764
2765 * server.c (wrapper_argv): New.
2766 (start_inferior): Handle wrapper_argv. If set, expect an extra
2767 trap.
2768 (gdbserver_usage): Document --wrapper.
2769 (main): Parse --wrapper.
2770
2771 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2772
2773 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2774 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2775 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2776 (ppc_set_pc): Likewise.
2777 (ppc_arch_setup): New function.
2778 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2779 of collect_register.
2780 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2781
2782 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2783
2784 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2785 instead of linux-ppc64-low.o.
2786 * linux-ppc64-low.c: Remove file.
2787 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2788 (linux-ppc64-low.o): Remove rule.
2789
2790 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2791 (init_registers_powerpc_64): Likewise.
2792 (ppc_regmap): Conditionally define depending on __powerpc64__.
2793 (ppc_cannot_store_register): Do not special-case "fpscr" when
2794 compiled on __powerpc64__.
2795 (ppc_collect_ptrace_register): New function.
2796 (ppc_supply_ptrace_register): New function.
2797 (ppc_breakpoint): Change type to "unsigned int".
2798 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2799 (the_low_target): Conditionally provide initializers for the
2800 arch_setup member depending on __powerpc64__. Install
2801 collect_ptrace_register and supply_ptrace_register members.
2802
2803 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2804
2805 * regcache.h (gdbserver_xmltarget): Add extern declaration.
2806 * server.c (gdbserver_xmltarget): Define.
2807 (get_features_xml): Use it to replace "target.xml" and arch_string.
2808
2809 * configure.srv: Remove srv_xmltarget. Add XML files that were
2810 mentioned there to srv_xmlfiles instead. Remove conditional tests
2811 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
2812 srv_xmlfiles and srv_regobj to include all possible choices.
2813 * configure.ac (srv_xmltarget): Remove.
2814 (srv_xmlfiles): Do not add "target.xml".
2815 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
2816 checks for supplementary target information.
2817 * configure: Regenerate.
2818 * Makefile.in (XML_TARGET): Remove.
2819 (target.xml): Remove rule.
2820 (clean): Do not clean up target.xml.
2821 (.PRECIOUS): Do not mention target.xml.
2822
2823 * target.h (struct target_ops): Remove arch_string member.
2824 * linux-low.c (linux_arch_string): Remove.
2825 (linux_target_ops): Remove arch_string initializer.
2826 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2827 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2828 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2829 * spu-low.c (spu_arch_string): Remove.
2830 (spu_target_ops): Remove arch_string initializer.
2831 * win32-low.c (win32_arch_string): Remove.
2832 (win32_target_ops): Remove arch_string initializer.
2833 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2834 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2835 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2836
2837 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2838
2839 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2840 by collect_ptrace_register and supply_ptrace_register hooks.
2841 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2842 instead of checking for the_low_target.left_pad_xfer.
2843 (usr_store_inferior_registers): Use collect_ptrace_register callback
2844 instead of checking for the_low_target.left_pad_xfer.
2845
2846 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2847 (s390_supply_ptrace_register): Likewise.
2848 (s390_fill_gregset): Call s390_collect_ptrace_register.
2849 (the_low_target): Update.
2850
2851 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2852 (ppc_supply_ptrace_register): Likewise.
2853 (the_low_target): Update.
2854
2855 * linux-i386-low.c (the_low_target): Update.
2856 * linux-x86-64-low.c (the_low_target): Update.
2857
2858 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2859
2860 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2861 reg-s390.o and reg-s390x.o.
2862
2863 * linux-low.c (new_inferior): New global variable.
2864 (linux_create_inferior, linux_attach): Set it.
2865 (linux_wait_for_process): Call the_low_target.arch_setup after the
2866 target has stopped for the first time.
2867 (initialize_low): Do not call the_low_target.arch_setup.
2868
2869 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2870 (s390_set_pc): Likewise.
2871 (s390_arch_setup): New function.
2872 (the_low_target): Use s390_arch_setup as arch_setup routine.
2873
2874 * regcache.c (realloc_register_cache): New function.
2875 (set_register_cache): Call it for each existing regcache.
2876
2877 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2878
2879 * server.h (init_registers): Remove prototype.
2880
2881 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2882 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2883 instead of init_registers ().
2884 * linux-arm-low.c (init_registers_arm): Add prototype.
2885 (init_registers_arm_with_iwmmxt): Likewise.
2886 (the_low_target): Add initializer for arch_setup field.
2887 * linux-cris-low.c (init_registers_cris): Add prototype.
2888 (the_low_target): Add initializer for arch_setup field.
2889 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2890 (the_low_target): Add initializer for arch_setup field.
2891 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2892 (the_low_target): Add initializer for arch_setup field.
2893 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2894 (the_low_target): Add initializer for arch_setup field.
2895 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2896 (the_low_target): Add initializer for arch_setup field.
2897 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2898 (the_low_target): Add initializer for arch_setup field.
2899 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2900 (init_registers_mips64_linux): Likewise.
2901 (the_low_target): Add initializer for arch_setup field.
2902 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2903 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2904 (the_low_target): Add initializer for arch_setup field.
2905 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2906 (init_registers_powerpc_64): Likewise.
2907 (the_low_target): Add initializer for arch_setup field.
2908 * linux-s390-low.c (init_registers_s390): Add prototype.
2909 (init_registers_s390x): Likewise.
2910 (the_low_target): Add initializer for arch_setup field.
2911 * linux-sh-low.c (init_registers_sh): Add prototype.
2912 (the_low_target): Add initializer for arch_setup field.
2913 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2914 (the_low_target): Add initializer for arch_setup field.
2915 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2916 (the_low_target): Add initializer for arch_setup field.
2917
2918 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2919 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2920 instead of init_registers ().
2921 * win32-arm-low.c (init_registers_arm): Add prototype.
2922 (the_low_target): Add initializer for arch_setup field.
2923 * win32-i386-low.c (init_registers_i386): Add prototype.
2924 (the_low_target): Add initializer for arch_setup field.
2925
2926 * spu-low.c (init_registers_spu): Add prototype.
2927 (initialize_low): Call initialie_registers_spu () instead of
2928 initialize_registers ().
2929
2930 2008-02-19 Pedro Alves <pedro@codesourcery.com>
2931
2932 * server.c (handle_v_requests): When handling the vRun and vAttach
2933 packets, if already debugging a process, don't kill it. Return an
2934 error instead.
2935
2936 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2937
2938 * server.c (handle_query): Correct length check.
2939
2940 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2941
2942 * win32-low.c (do_initial_child_stuff): Add process handle
2943 parameter. Set current_process_handle and current_process_id from the
2944 parameters. Clear globals.
2945 (win32_create_inferior): Don't set current_process_handle and
2946 current_process_id here. Instead pass them on the call to
2947 do_initial_child_stuff.
2948 (win32_attach): Likewise.
2949 (win32_clear_inferiors): New.
2950 (win32_kill): Don't close the current process handle or the
2951 current thread handle here. Instead call win32_clear_inferiors.
2952 (win32_detach): Don't open a new handle to the process. Call
2953 win32_clear_inferiors.
2954 (win32_join): Don't rely on current_process_handle; open a new
2955 handle using the process id.
2956 (win32_wait): Call win32_clear_inferiors when the inferior process
2957 has exited.
2958
2959 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2960
2961 * server.c (monitor_show_help): Add "exit".
2962
2963 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2964
2965 * Makefile.in (SFILES): Add linux-xtensa-low.c.
2966 (clean): Add reg-xtensa.c.
2967 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
2968 * configure.srv (xtensa*-*-linux*) New target.
2969 * linux-xtensa-low.c: New.
2970 * xtensa-xtregs.c: New.
2971
2972 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2973
2974 * hostio.c: Don't include errno.h.
2975 (errno_to_fileio_errno): Move to hostio-errno.
2976 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2977 error number outputting to the target->hostio_last_error callback.
2978 (hostio_packet_error): Use FILEIO_EINVAL directly.
2979 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2980 calls to hostio_error.
2981 * hostio-errno.c: New.
2982 * server.h (hostio_last_error_from_errno): Declare.
2983 * target.h (target_ops): Add hostio_last_error member.
2984 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2985 as hostio_last_error handler.
2986 * spu-low.c (spu_target_ops): Likewise.
2987 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2988 (wince_hostio_last_error): New functions.
2989 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2990 as hostio_last_error handler.
2991 (win32_target_ops) [!_WIN32_WCE]: Register
2992 hostio_last_error_from_errno as hostio_last_error handler.
2993 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2994 (hostio-errno.o): New rule.
2995 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
2996 * configure.srv (srv_hostio_err_objs): New variable. Default to
2997 hostio-errno.o.
2998 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
2999 * configure: Regenerate.
3000
3001 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3002
3003 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3004 (linux_kill, linux_detach): Clean up the process list.
3005 * remote-utils.c (remote_open): Improve port number parsing.
3006 (putpkt_binary, input_interrupt): Only send interrupts if the target
3007 is running.
3008 * server.c (extended_protocol): Make static.
3009 (attached): Define earlier.
3010 (exit_requested, response_needed, program_argv): New variables.
3011 (target_running): New.
3012 (start_inferior): Clear attached here.
3013 (attach_inferior): Set attached here.
3014 (require_running): Define.
3015 (handle_query): Use require_running and target_running. Implement
3016 "monitor exit".
3017 (handle_v_attach, handle_v_run): New.
3018 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3019 (gdbserver_usage): Update.
3020 (main): Redo argument parsing. Handle --debug and --multi. Handle
3021 --attach along with other options or after the port. Save
3022 program_argv. Support no initial program. Resynchronize
3023 communication with GDB after an error. Handle "monitor exit".
3024 Use require_running and target_running. Always allow the extended
3025 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3026 restart in extended mode.
3027 * README: Refer to the GDB manual. Update --attach usage.
3028
3029 2007-12-20 Andreas Schwab <schwab@suse.de>
3030
3031 * linux-low.c (STACK_SIZE): Define.
3032 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3033 (linux_test_for_tracefork): Likewise.
3034
3035 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3036
3037 * linux-low.c (linux_wait_for_event): Update messages. Do not
3038 reinsert auto-delete breakpoints.
3039 * mem-break.c (struct breakpoint): Change return type of handler to
3040 int.
3041 (set_breakpoint_at): Update handler type.
3042 (reinsert_breakpoint_handler): Return 1 instead of calling
3043 delete_breakpoint.
3044 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3045 setting a new one.
3046 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3047 * mem-break.h (set_breakpoint_at): Update handler type.
3048 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3049 * win32-low.c (auto_delete_breakpoint): New.
3050 (get_child_debug_event): Use it.
3051
3052 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3053
3054 * configure.ac: Check for pread and pwrite.
3055 * hostio.c (handle_pread): Fall back to lseek and read.
3056 (handle_pwrite): Fall back to lseek and write.
3057 * config.in, configure: Regenerated.
3058
3059 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3060
3061 * server.c (myresume): Add own_buf argument.
3062 (main): Update calls.
3063
3064 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3065
3066 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3067 * remote-utils.c (remote_open): Do not call disable_async_io.
3068 (block_async_io): Delete.
3069 (unblock_async_io): Make static.
3070 (initialize_async_io): New.
3071 * server.c (handle_v_cont): Handle async I/O here.
3072 (myresume): Likewise. Move other common resume tasks here...
3073 (main): ... from here. Call initialize_async_io. Disable async
3074 I/O before the main loop.
3075 * server.h (initialize_async_io): Declare.
3076 (block_async_io, unblock_async_io): Delete prototypes.
3077 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3078
3079 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3080
3081 * remote-utils.c (readchar): Allow binary data in received messages.
3082
3083 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3084
3085 * win32-low.c (attaching): New global.
3086 (win32_create_inferior): Clear the `attaching' global.
3087 (win32_attach): Set the `attaching' global.
3088 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3089 attaching. Only set a breakpoint at the entry point if not
3090 attaching.
3091
3092 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3093
3094 * server.c (main): Don't report dll events on the initial
3095 connection on attaches.
3096
3097 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3098
3099 * server.c (main): Relax numerical bases supported for the pid of
3100 the --attach command line argument.
3101
3102 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3103
3104 * win32-low.c (win32_attach): Call OpenProcess before
3105 DebugActiveProcess, not after. Add last error output to error
3106 call.
3107
3108 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3109
3110 * win32-low.c (win32_get_thread_context)
3111 (win32_set_thread_context): New functions.
3112 (thread_rec): Use win32_get_thread_context.
3113 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3114 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3115 field.
3116
3117 2007-12-03 Leo Zayas
3118 Pedro Alves <pedro_alves@portugalmail.pt>
3119
3120 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3121 global variables.
3122 (child_add_thread): Minor cleanup.
3123 (child_continue): Resume artificially suspended threads before
3124 calling ContinueDebugEvent.
3125 (suspend_one_thread): New.
3126 (fake_breakpoint_event): New.
3127 (get_child_debug_event): Change return type to int. Check here if
3128 gdb sent an interrupt request. If a soft interrupt was requested,
3129 fake a breakpoint event. Return 0 if there is no event to handle,
3130 and 1 otherwise.
3131 (win32_wait): Don't check here if gdb sent an interrupt request.
3132 Ensure there is a valid event to handle.
3133 (win32_request_interrupt): Add soft interruption method as last
3134 resort.
3135
3136 2007-12-03 Leo Zayas
3137 Pedro Alves <pedro_alves@portugalmail.pt>
3138
3139 * win32-low.h (win32_thread_info): Add descriptions to the
3140 structure members. Replace `suspend_count' counter by a
3141 `suspended' flag.
3142 * win32-low.c (thread_rec): Update condition of when to get the
3143 context from the inferior. Rely on ContextFlags being set if it
3144 has already been retrieved. Only suspend the inferior thread if
3145 we haven't already. Warn if that fails.
3146 (continue_one_thread): s/suspend_count/suspended/. Only call
3147 ResumeThread once. Warn if that fails.
3148
3149 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3150
3151 * win32-low.c (win32_wait): Don't read from the inferior when it
3152 has already exited.
3153
3154 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3155
3156 * Makefile.in (win32_low_h): New variable.
3157 (win32-low.o): Add dependency on $(win32_low_h).
3158 (win32-arm-low.o, win32-i386-low.o): New rules.
3159
3160 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3161
3162 * hostio.c: Correct copyright year.
3163
3164 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3165
3166 * Makefile.in (OBS): Add hostio.o.
3167 (hostio.o): New rule.
3168 * server.h (handle_vFile): Declare.
3169 * hostio.c: New file.
3170 * server.c (handle_v_requests): Take packet_len and new_packet_len
3171 for binary packets. Call handle_vFile.
3172 (main): Update call to handle_v_requests.
3173
3174 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
3175
3176 * linux-low.c: Include <sched.h>.
3177
3178 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
3179
3180 * linux-low.c (linux_tracefork_grandchild): New.
3181 (linux_tracefork_child): Use clone.
3182 (linux_test_for_tracefork): Use clone; allocate and free a stack.
3183
3184 2007-10-31 Joel Brobecker <brobecker@adacore.com>
3185
3186 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
3187
3188 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
3189
3190 * linux-low.c (handle_extended_wait): Handle unexpected signals.
3191
3192 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
3193
3194 * inferiors.c (change_inferior_id): Delete.
3195 (add_pid_to_list, pull_pid_from_list): New.
3196 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
3197 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
3198 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
3199 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
3200 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
3201 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
3202 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
3203 (using_threads): Always set to 1.
3204 (handle_extended_wait): New.
3205 (add_process): Do not set TID.
3206 (linux_create_inferior): Set must_set_ptrace_flags.
3207 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
3208 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
3209 (linux_thread_alive): Rename TID argument to LWPID.
3210 (linux_wait_for_process): Handle unknown processes. Do not use TID.
3211 (linux_wait_for_event): Do not use TID or check using_threads. Update
3212 call to dead_thread_notify. Call handle_extended_wait.
3213 (linux_create_inferior): Use PTRACE_SETOPTIONS.
3214 (send_sigstop): Delete sigstop_sent.
3215 (wait_for_sigstop): Avoid TID.
3216 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
3217 (linux_test_for_tracefork): New.
3218 (linux_lookup_signals): Use thread_db_active and
3219 linux_supports_tracefork_flag.
3220 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
3221 * linux-low.h (get_process_thread): Avoid TID.
3222 (struct process_ifo): Move thread_known and tid to the end. Remove
3223 sigstop_sent.
3224 (linux_attach_lwp, thread_db_init): Update prototypes.
3225 * server.h (change_inferior_id): Delete prototype.
3226 (add_pid_to_list, pull_pid_from_list): New prototypes.
3227 * thread-db.c (thread_db_use_events): New.
3228 (find_first_thread): Rename to...
3229 (find_one_thread): ...this. Update callers and messages. Do not
3230 call fatal. Check thread_db_use_events. Do not call
3231 change_inferior_id or new_thread_notify.
3232 (maybe_attach_thread): Update. Do not call new_thread_notify.
3233 (thread_db_init): Set thread_db_use_events. Check use_events.
3234 * utils.c (fatal, warning): Correct message prefix.
3235
3236 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
3237
3238 * Makefile.in (clean): Remove new files.
3239 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
3240 (powerpc-64.o, powerpc-64.c): New rules.
3241 * configure.srv: Use alternate register sets for powerpc64-*-linux*
3242 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
3243 with SPE.
3244 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
3245 SPE targets.
3246 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
3247 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
3248 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
3249 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
3250 (target_regsets): Add AltiVec and SPE register sets.
3251 * configure.ac: Check for AltiVec and SPE.
3252 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
3253 (ppc_fill_vrregset, ppc_store_vrregset): New.
3254 (target_regsets): Add AltiVec register set.
3255 * configure: Regenerated.
3256
3257 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
3258
3259 * linux-low.c (O_LARGEFILE): Define.
3260 (linux_read_memory): Use /proc/PID/mem.
3261 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
3262 * configure, config.in: Regenerated.
3263
3264 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3265
3266 * linux-low.c (linux_wait_for_event): Do not pass signals while
3267 single-stepping.
3268
3269 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3270
3271 * win32-low.c (create_process): New.
3272 (win32_create_inferior): Use create_process instead of
3273 CreateProcess. If create_process failed retry appending an ".exe"
3274 suffix. Store the GetLastError result immediatelly after
3275 create_process calls and use it on the call to error.
3276
3277 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3278
3279 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
3280
3281 2007-08-23 Joel Brobecker <brobecker@adacore.com>
3282
3283 * configure.ac: Switch license to GPLv3.
3284
3285 2007-08-01 Michael Snyder <msnyder@access-company.com>
3286
3287 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
3288
3289 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
3290
3291 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
3292 typedef.
3293 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
3294 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
3295 CloseToolhelp32Snapshot.
3296 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
3297 CloseToolhelp32Snapshot.
3298
3299 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
3300
3301 * server.c (main): Check for inferior exit before main loop.
3302
3303 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
3304
3305 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
3306 instead of on tmp_desc.
3307
3308 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
3309 Daniel Jacobowitz <dan@codesourcery.com>
3310
3311 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
3312 (add_thread): Minor cleanups.
3313 (clear_inferiors): Move lower in the file. Clear the DLL
3314 list.
3315 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
3316 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
3317 (xml_escape_text): New.
3318 * server.c (handle_query): Handle qXfer:libraries:read. Report it
3319 for qSupported.
3320 (handle_v_cont): Report errors.
3321 (gdbserver_version): Update.
3322 (main): Correct size of own_buf. Do not report initial DLL events.
3323 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
3324 (unloaded_dll, xml_escape_text): New.
3325 * win32-low.c (enum target_waitkind): Update comments.
3326 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
3327 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
3328 (win32_EnumProcessModules, win32_GetModuleInformation)
3329 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
3330 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
3331 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
3332 (win32_Module32First, win32_Module32Next, load_toolhelp)
3333 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
3334 (get_child_debug_event): Handle DLL events.
3335 (win32_wait): Likewise.
3336
3337 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3338
3339 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
3340 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
3341
3342 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3343
3344 * win32-low.c (handle_output_debug_string): Ignore event if not
3345 waiting.
3346
3347 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3348
3349 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
3350
3351 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
3352
3353 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
3354
3355 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
3356
3357 * inferiors.c (change_inferior_id): Add comment.
3358 * linux-low.c (check_removed_breakpoint): Add an early
3359 prototype. Improve debug output.
3360 (linux_attach): Doc update.
3361 (linux_detach_one_process, linux_detach): Clean up before releasing
3362 each process.
3363 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
3364 * linux-low.h (struct process_info): Doc improvement.
3365 * mem-break.c (delete_all_breakpoints): New.
3366 * mem-break.h (delete_all_breakpoints): New prototype.
3367 * thread-db.c (find_first_thread): New.
3368 (thread_db_create_event): Call it instead of
3369 thread_db_find_new_threads. Clean up unused variables.
3370 (maybe_attach_thread): Remove first thread handling.
3371 (thread_db_find_new_threads): Use find_first_thread.
3372 (thread_db_get_tls_address): Likewise.
3373
3374 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
3375
3376 * thread-db.c (thread_db_find_new_threads): Add prototype.
3377 (thread_db_create_event): Check for the main thread before adding
3378 a new thread.
3379 (maybe_attach_thread): Only enable event reporting if TID == 0.
3380 (thread_db_get_tls_address): Check for new threads.
3381
3382 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
3383
3384 * linux-low.c (linux_create_inferior): Try execv before execvp.
3385 * spu-low.c (spu_create_inferior): Likewise.
3386
3387 2007-06-13 Mike Frysinger <vapier@gentoo.org>
3388
3389 * linux-low.c (linux_create_inferior): Change execv to execvp.
3390 * spu-low.c (spu_create_inferior): Likewies.
3391
3392 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
3393
3394 * Makefile.in (clean): Clean new files instead of deleted ones.
3395 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
3396 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
3397 rules.
3398 * configure.srv: Specify XML files and new regformats for MIPS and
3399 MIPS64 GNU/Linux.
3400 * linux-mips-low.c (mips_num_regs): Set to only used registers.
3401 (mips_regmap): Do not fetch $0. Remove unused registers. Add
3402 an entry for the restart register.
3403 (mips_cannot_fetch_register, mips_cannot_store_register)
3404 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
3405 register names to match the XML descriptions.
3406 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
3407 restart register instead of $0.
3408
3409 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3410 Markus Deuling <deuling@de.ibm.com>
3411
3412 * remote-utils.c (decode_xfer_write): New function.
3413 * server.h (decode_xfer_write): Add prototype.
3414 * server.c (handle_query): Add PACKET_LEN argument. Support
3415 qXfer:spu:read and qXfer:spu:write packets.
3416 (main): Pass packet_len to handle_query.
3417 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
3418 * target.h (target_ops): Add qxfer_spu.
3419
3420 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3421
3422 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
3423 accessing non-seekable spufs files.
3424
3425 2007-05-16 Markus Deuling <deuling@de.ibm.com>
3426
3427 * server.c (handle_query): Add reply for qC packet.
3428
3429 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3430 Leo Zayas <lerele@champenstudios@com>
3431
3432 * server.h (check_remote_input_interrupt_request): New function.
3433 * remote_utils.c (INVALID_DESCRIPTOR): New define.
3434 (remote_desc): Initialize with INVALID_DESCRIPTOR.
3435 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
3436 (check_remote_input_interrupt_request): New function.
3437 * server.h (check_remote_input_interrupt_request): Declare.
3438 * win32-low.c (winapi_DebugBreakProcess,
3439 winapi_GenerateConsoleCtrlEvent): New typedefs.
3440 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
3441 to 250 ms.
3442 (win32_wait): Check for remote interrupt request
3443 with check_remote_input_interrupt_request.
3444 (win32_request_interrupt): New function.
3445 (win32_target_op): Set request_interrupt to win32_request_interrupt.
3446
3447 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3448
3449 * win32-low.c (debug_registers_changed,
3450 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
3451 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
3452 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
3453 (thread_rec): Get context using the low target.
3454 (child_add_thread): Call thread_added on the low target,
3455 which does the same thing.
3456 (regptr): Delete.
3457 (do_initial_child_stuff): Remove debug registers references.
3458 Set context using the low target. Resume threads after
3459 setting the contexts.
3460 (child_continue): Remove dead variable. Remove debug
3461 registers references.
3462 (child_fetch_inferior_registers): Go through the low target.
3463 (do_child_store_inferior_registers): Remove.
3464 (child_store_inferior_registers): Go through the low target.
3465 (win32_resume): Remove debug registers references.
3466 Set context using the low target.
3467 (handle_exception): Change return type to void. Don't record
3468 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
3469 first chance exception.
3470 (get_child_debug_event): Change return type to void. Remove
3471 goto loop. Always return after waiting for debug event.
3472 (win32_wait): Convert to switch statement. Handle spurious
3473 events.
3474
3475 * win32-i386-low.c (debug_registers_changed,
3476 debug_registers_used): New.
3477 (initial_stuff): Rename to ...
3478 (i386_initial_stuff): ... this. Clear debug registers
3479 state variables.
3480 (store_debug_registers): Delete.
3481 (i386_get_thread_context): New.
3482 (load_debug_registers): Delete.
3483 (i386_set_thread_context): New.
3484 (i386_thread_added): New.
3485 (single_step): Rename to ...
3486 (i386_single_step): ... this.
3487 (do_fetch_inferior_registers): Rename to ...
3488 (i386_fetch_inferior_register): ... this.
3489 (i386_store_inferior_register): New.
3490 (the_low_target): Adapt to new interface.
3491
3492 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3493 (arm_get_thread_context): New.
3494 (arm_set_thread_context): New.
3495 (regptr): New.
3496 (do_fetch_inferior_registers): Rename to ...
3497 (arm_fetch_inferior_register): ... this.
3498 (arm_store_inferior_register): New.
3499 (arm_wince_breakpoint): Reimplement as unsigned long.
3500 (arm_wince_breakpoint_len): Define.
3501 (the_low_target): Adapt to new interface.
3502
3503 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3504 load_debug_registers. Add get_thread_context, set_thread_context,
3505 thread_added and store_inferior_register. Rename
3506 fetch_inferior_registers to fetch_inferior_register.
3507 (regptr): Remove declaration.
3508
3509 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3510
3511 * linux-low.c (linux_detach): Change return type to int. Return 0.
3512 * spu-low.c (spu_detach): Likewise.
3513
3514 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3515
3516 * target.h (target_ops): Change return type of detach to int.
3517 Add join.
3518 (join_inferior): New.
3519 * server.c (main): Don't skip detach support on mingw32.
3520 If the inferior doesn't support detaching return error.
3521 Call join_inferior instead of using waitpid.
3522 * linux-low.c (linux_join): New.
3523 (linux_target_op): Add linux_join.
3524 * spu-low.c (spu_join): New.
3525 (spu_target_ops): Add spu_join.
3526 * win32-low.c (win32_detach): Adapt to new interface.
3527 Reopen current_process_handle before detaching. Issue a child
3528 resume before detaching.
3529 (win32_join): New.
3530 (win32_target_op): Add win32_join.
3531
3532 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3533
3534 * win32-low.c (win32-attach): Fix return value.
3535 * target.h (target_ops): Describe ATTACH return values.
3536
3537 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3538
3539 * win32-low.c (GETPROCADDRESS): Define.
3540 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3541 (winapi_DebugSetProcessKillOnExit): Likewise.
3542 (win32_create_inferior): Force usage of ansi CreateProcessA.
3543 (win32_attach): Use GETPROCADDRESS.
3544 (win32_detach): Likewise.
3545
3546 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3547
3548 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3549
3550 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3551
3552 * win32-low.c: Commit leftover changes from 2007-03-29.
3553
3554 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3555
3556 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3557 fields short instead of int. Add explicit padding.
3558 (i387_cache_to_fsave): Remove unnecessary casts.
3559 (i387_fsave_to_cache): Doc fix.
3560 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3561
3562 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3563
3564 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3565 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3566
3567 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3568
3569 * configure.srv (arm*-*-mingw32ce*): Move near the other
3570 arm targets.
3571
3572 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3573
3574 * configure.ac: Add errno checking.
3575 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3576 sys/file.h and malloc.h.
3577 (AC_CHECK_DECLS): Add perror.
3578 (srv_mingwce): Handle.
3579 * configure.srv (i[34567]86-*-cygwin*): Add
3580 win32-i386-low.o to srv_tgtobj.
3581 (i[34567]86-*-mingw*): Likewise.
3582 (arm*-*-mingw32ce*): Add case.
3583 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3584 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3585 [__MINGW32CE__] (strerror): New function.
3586 [__MINGW32CE__] (errno): Define to GetLastError.
3587 [__MINGW32CE__] (COUNTOF): New macro.
3588 (remote_open): Remove extra close call.
3589 * mem-break.c (delete_breakpoint_at): New function.
3590 * mem-break.h (delete_breakpoint_at): Declare.
3591 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3592 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3593 [USE_WIN32API] (read, write): Add char* casts.
3594 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3595 * server.h: Include wincecompat.h on Windows CE.
3596 [HAVE_ERRNO_H]: Check.
3597 (perror): Declare if not declared.
3598 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3599 (perror_with_name): Remove errno declaration.
3600 * wincecompat.h: New.
3601 * wincecompat.c: New.
3602 * win32-low.h: New.
3603 * win32-arm-low.c: New.
3604 * win32-i386-low.c: New.
3605 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3606 (OUTMSG2): Make it safe.
3607 (_T): New macro.
3608 (COUNTOF): New macro.
3609 (NUM_REGS): Get it from the low target.
3610 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3611 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3612 (thread_rec): Let low target handle debug registers.
3613 (child_add_thread): Likewise.
3614 (child_init_thread_list): Likewise.
3615 (continue_one_thread): Likewise.
3616 (regptr): New.
3617 (do_child_fetch_inferior_registers): Move to ...
3618 * win32-i386-low.c: ... here, and rename to ...
3619 (do_fetch_inferior_registers): ... this.
3620 * win32-low.c (child_fetch_inferior_registers):
3621 Go through the low target.
3622 (do_child_store_inferior_registers): Use regptr.
3623 (strwinerror): New function.
3624 (win32_create_inferior): Handle Windows CE.
3625 Use strwinerror instead of strerror on Windows error
3626 codes. Add program to the error output.
3627 Don't close the main thread handle on Windows CE.
3628 (win32_attach): Use coredll.dll on Windows CE.
3629 (win32_kill): Close current process and current
3630 thread handles.
3631 (win32_detach): Use coredll.dll on Windows CE.
3632 (win32_resume): Let low target handle debug registers, and
3633 step request.
3634 (handle_exception): Add/Remove initial breakpoint. Avoid
3635 non-existant WSTOPSIG on Windows CE.
3636 (win32_read_inferior_memory): Cast to remove warning.
3637 (win32_arch_string): Go through the low target.
3638 (initialize_low): Call set_breakpoint_data with the low
3639 target's breakpoint.
3640 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3641 FOP_REGNUM, mappings): Move to ...
3642 * win32-i386-low.c: ... here.
3643 * win32-low.c (win32_thread_info): Move to ...
3644 * win32-low.h: ... here.
3645 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3646 win32-arm-low.c and wincecompat.c.
3647 (all:): Add $EXEEXT.
3648 (install-only:): Likewise.
3649 (gdbserver:): Likewise.
3650 (gdbreplay:): Likewise.
3651 * config.in: Regenerate.
3652 * configure: Regenerate.
3653
3654 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3655
3656 * win32-low.c: Rename typedef thread_info to
3657 win32_thread_info throughout.
3658
3659 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3660
3661 * win32-i386-low.c: Rename to ...
3662 * win32-low.c: ... this.
3663 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3664 * Makefile.in: Likewise.
3665
3666 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3667
3668 * remote-utils.c (monitor_output): Constify msg parameter.
3669 * server.h (monitor_output): Likewise.
3670 * win32-i386-low.c (handle_output_debug_string): New.
3671 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3672 handle_output_debug_string.
3673 (get_child_debug_event): Likewise.
3674
3675 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3676
3677 * server.c (main): Correct strtoul check.
3678
3679 2007-03-27 Jon Ringle <jon@ringle.org>
3680
3681 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3682
3683 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3684
3685 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3686
3687 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3688
3689 * terminal.h: Check HAVE_SGTTY_H.
3690
3691 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
3692
3693 * remote-utils.c (remote_open): Print out the assigned port number.
3694
3695 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3696
3697 * remote-utils.c (monitor_output): New function.
3698 * server.c (debug_threads): Define here.
3699 (monitor_show_help): New function.
3700 (handle_query): Handle qRcmd.
3701 (main): Do not handle 'd' packet.
3702 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3703 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3704 of debug_threads.
3705
3706 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3707
3708 * Makefile.in (EXEEXT): New.
3709 (clean): Use $(EXEEXT).
3710
3711 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3712
3713 * target.h (target_ops): Rename send_signal to request_interrupt,
3714 and remove enum target_signal parameter.
3715 * linux-low.c (linux_request_interrupt): Rename from
3716 linux_send_signal, and always send SIGINT.
3717 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3718 and always send SIGINT.
3719 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3720 of send_signal.
3721 (input_interrupt): Likewise.
3722
3723 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3724
3725 * server.c (get_features_xml): Check if target implemented
3726 arch_string.
3727 * win32-i386-low.c (win32_arch_string): New.
3728 (win32_target_ops): Add win32_arch_string as arch_string member.
3729
3730 2007-02-22 Markus Deuling <deuling@de.ibm.com>
3731
3732 * spu-low.c (spu_arch_string): New.
3733 (spu_target_ops): Add spu_arch_string.
3734
3735 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3736
3737 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3738 * configure.ac: Do not check for terminal.h.
3739 * configure, config.in: Regenerated.
3740
3741 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3742
3743 * Makefile.in (OBS): Add $(XML_BUILTIN).
3744 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3745 (clean): Update.
3746 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3747 (arm-with-iwmmxt.c): New.
3748 * config.in, configure: Regenerate.
3749 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3750 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3751 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3752 (arm*-*-linux*): Add iWMMXt and regset support.
3753 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3754 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3755 (arm_store_wmmxregset, target_regsets): New.
3756 * server.c (get_features_xml): Take annex argument. Check builtin
3757 XML documents.
3758 (handle_query): Handle multiple annexes.
3759
3760 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3761
3762 * remote-utils.c [USE_WIN32API] (read, write): Define.
3763 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3764 write.
3765
3766 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3767
3768 * linux-i386-low.c (the_low_target): Set arch_string.
3769 * linux-x86-64-low.c (the_low_target): Likewise.
3770 * linux-low.c (linux_arch_string): New.
3771 (linux_target_ops): Add it.
3772 * linux-low.h (struct linux_target_ops): Add arch_string.
3773 * server.c (write_qxfer_response): Use const void * for DATA.
3774 (get_features_xml): New.
3775 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3776 * target.h (struct target_ops): Add arch_string method.
3777
3778 2007-01-03 Denis Pilat <denis.pilat@st.com>
3779 Daniel Jacobowitz <dan@codesourcery.com>
3780
3781 * linux-low.c (linux_kill): Handle being called with no threads.
3782 * win32-i386-low.c (win32_kill): Likewise.
3783 (get_child_debug_event): Clear current_process_handle.
3784
3785 2006-12-30 Denis PILAT <denis.pilat@st.com>
3786 Daniel Jacobowitz <dan@codesourcery.com>
3787
3788 * remote-utils.c (remote_open): Check the type of specified
3789 serial port devices before opening them.
3790 * server.c (main): Kill the inferior if an error occurs during
3791 the first remote_open.
3792
3793 2006-12-05 Markus Deuling <deuling@de.ibm.com>
3794
3795 * README: Update supported targets.
3796
3797 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3798
3799 * Makefile.in (clean): Remove reg-mips64.c.
3800 (reg-mips64.c, reg-mips64.o): New rules.
3801 * configure.srv: Handle mips64. Include regset support for mips.
3802 * linux-mips-low.c (union mips_register): New.
3803 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
3804 (mips_breakpoint, mips_breakpoint_at): Use int.
3805 (mips_collect_register, mips_supply_register)
3806 (mips_collect_register_32bit, mips_supply_register_32bit)
3807 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3808 (mips_store_fpregset, target_regsets): New.
3809 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
3810
3811 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
3812
3813 * configure.srv: Add target "spu*-*-*".
3814 * Makefile.in (clean): Remove reg-spu.c.
3815 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
3816 * spu-low.c: New file.
3817
3818 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3819
3820 * configure.ac: Correct td_thr_tls_get_addr test.
3821 * configure: Regenerated.
3822
3823 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3824
3825 * linux-low.c (linux_wait_for_event): Reformat. Use the
3826 pass_signals array.
3827 * remote-utils.c (decode_address_to_semicolon): New.
3828 * server.c (pass_signals, handle_general_set): New.
3829 (handle_query): Mention QPassSignals for qSupported.
3830 (main): Call handle_general_set.
3831 * server.h (pass_signals, decode_address_to_semicolon): New.
3832
3833 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3834
3835 * server.c (handle_query): Correct error handling for read_auxv.
3836
3837 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3838
3839 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3840 and srv_linux_thread_db to yes.
3841 * linux-s390-low.c (s390_fill_gregset): New function.
3842 (target_regsets): Define data structure.
3843
3844 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3845
3846 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3847 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3848 * config.in, configure: Regenerated.
3849 * inferiors.c (gdb_id_to_thread): New function.
3850 (gdb_id_to_thread_id): Use it.
3851 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3852 * linux-low.h (struct process_info): Add th member.
3853 (thread_db_get_tls_address): New prototype.
3854 * remote-utils.c (decode_address): Make non-static.
3855 * server.c (handle_query): Handle qGetTLSAddr.
3856 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3857 * target.h (struct target_ops): Add get_tls_address.
3858 * thread-db.c (maybe_attach_thread): Save the thread handle.
3859 (thread_db_get_tls_address): New.
3860
3861 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3862
3863 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3864 (linux_resume_one_process): Take a siginfo_t *. Update all
3865 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3866 (struct pending_signals): Add a siginfo_t.
3867 (linux_wait_for_process): Always set last_status.
3868 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3869 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3870 * linux-low.h (struct process_info): Add last_status.
3871
3872 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3873
3874 * remote-utils.c (try_rle): New function.
3875 (putpkt_binary): Use it.
3876
3877 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3878
3879 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3880 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3881 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3882 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3883 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3884 point registers.
3885
3886 2006-08-08 Richard Sandiford <richard@codesourcery.com>
3887
3888 * server.c (terminal_fd): New variable.
3889 (old_foreground_pgrp): Likewise.
3890 (restore_old_foreground_pgrp): New function.
3891 (start_inferior): Record the terminal file descriptor in terminal_fd
3892 and its original foreground group in old_foreground_pgrp. Register
3893 restore_old_foreground_pgrp with atexit().
3894
3895 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3896
3897 * server.c (handle_query): Correct qPart to qXfer.
3898
3899 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3900
3901 * configure.ac: Check for more headers which are missing on
3902 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3903 * configure.srv: Add Cygwin and mingw32.
3904 * remote-utils.c: Don't include headers unconditionally which
3905 are missing on mingw32. Include <winsock.h> for mingw32.
3906 (remote_open): Adjust for mingw32 support. Flush
3907 standard error after writing to it.
3908 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3909 (unblock_async_io, enable_async_io, disable_async_io)
3910 (readchar, getpkt): Update for Winsock support.
3911 (prepare_resume_reply): Expect a protocol signal number.
3912 * server.c: Disable <sys/wait.h> on mingw32.
3913 (start_inferior): Adjust for mingw32 support. Flush
3914 standard error after writing to it.
3915 (attach_inferior): Likewise. Use protocol signal
3916 numbers.
3917 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3918 and names.
3919 * win32-i386-low.c: New file.
3920 * Makefile.in (XM_CLIBS): Set.
3921 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3922 (win32-i386-low.o): New dependency rule.
3923 * linux-low.c (linux_wait): Use target signal numbers.
3924 * target.h (struct target_ops): Doc fix.
3925 * server.h (target_signal_to_name): New prototype.
3926 * gdbreplay.c: Don't include headers unconditionally which
3927 are missing on mingw32. Include <winsock.h> for mingw32.
3928 (remote_close, remote_open): Adjust for Winsock support.
3929 * configure, config.in: Regenerated.
3930
3931 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3932
3933 * server.c (decode_xfer_read, write_qxfer_response): New.
3934 (handle_query): Take a packet length argument. Handle
3935 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3936 the qSupported response.
3937 (main): Update call to handle_query.
3938
3939 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3940
3941 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3942 (putpkt_binary): Renamed from putpkt and adjusted for binary
3943 data.
3944 (putpkt): New wrapper for putpkt_binary.
3945 (readchar): Don't mask off the high bit.
3946 (decode_X_packet): New function.
3947 * server.c (main): Call putpkt_binary if a handler sets the packet
3948 length. Save the length of the incoming packet. Handle 'X'.
3949 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3950
3951 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3952
3953 * server.c (handle_query): Handle qSupported.
3954
3955 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3956
3957 * remote-utils.c (all_symbols_looked_up): New variable.
3958 (look_up_one_symbol): Check it.
3959 * server.h (look_up_one_symbol): New declaration.
3960 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3961
3962 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3963
3964 * Makefile.in (linux-arm-low.o): Update dependencies.
3965 * linux-arm-low.c: Include "gdb_proc_service.h".
3966 (PTRACE_GET_THREAD_AREA): Define.
3967 (ps_get_thread_area): New function.
3968
3969 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3970
3971 * configure.srv (m68k*-*-uclinux*): New target.
3972 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3973 (linux_resume_one_process): Remove extraneous cast.
3974 (linux_read_offsets): New.
3975 (linux_target_op): Add linux_read_offsets on mmuless systems.
3976 * server.c (handle_query): Add qOffsets logic.
3977 * target.h (struct target_ops): Add read_offsets.
3978
3979 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3980
3981 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3982 (PTRACE_GET_THREAD_AREA): Define.
3983 (ps_get_thread_area): New function.
3984 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3985 (linux-x86-64-low.o): Update.
3986
3987 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3988
3989 * configure.ac: Remove checks for prfpregset_t.
3990 * gdb_proc_service.h: New file.
3991 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3992 new "gdb_proc_service.h".
3993 * proc-service.c: Likewise.
3994 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
3995 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
3996 * Makefile.in (gdb_proc_service_h): Updated.
3997 * configure, config.in: Regenerated.
3998
3999 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4000
4001 * remote-utils.c (prepare_resume_reply): Move declaration
4002 of gdb_id_from_wait to the top of the block.
4003
4004 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4005
4006 * linux-low.c (regsets_store_inferior_registers): Read the regset
4007 from the target before filling it.
4008
4009 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4010
4011 * server.c (attach_inferior): Return SIGTRAP for a successful
4012 attach.
4013
4014 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4015
4016 * Makefile.in (OBS): Add version.o.
4017 (STAGESTUFF): Delete.
4018 (version.o): Add dependencies.
4019 (version.c): Replace rule.
4020 (clean): Remove version.c.
4021 * server.c (gdbserver_version): New.
4022 (gdbserver_usage): Use printf.
4023 (main): Handle --version and --help.
4024 * server.h (version, host_name): Add declarations.
4025
4026 2005-12-23 Eli Zaretskii <eliz@gnu.org>
4027
4028 * linux-arm-low.c:
4029 * linux-arm-low.c:
4030 * inferiors.c:
4031 * i387-fp.h:
4032 * i387-fp.c:
4033 * gdbreplay.c:
4034 * regcache.c:
4035 * proc-service.c:
4036 * mem-break.h:
4037 * mem-break.c:
4038 * linux-x86-64-low.c:
4039 * linux-sh-low.c:
4040 * linux-s390-low.c:
4041 * linux-ppc64-low.c:
4042 * linux-ppc-low.c:
4043 * linux-mips-low.c:
4044 * linux-m68k-low.c:
4045 * linux-m32r-low.c:
4046 * linux-low.h:
4047 * linux-low.c:
4048 * linux-ia64-low.c:
4049 * linux-i386-low.c:
4050 * linux-crisv32-low.c:
4051 * thread-db.c:
4052 * terminal.h:
4053 * target.h:
4054 * target.c:
4055 * server.h:
4056 * server.c:
4057 * remote-utils.c:
4058 * regcache.h:
4059 * utils.c:
4060 * Makefile.in:
4061 * configure.ac:
4062 * gdbserver.1: Add (C) after Copyright. Update the FSF
4063 address.
4064
4065 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4066
4067 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4068 (arm_breakpoint_at): Recognize both breakpoints.
4069 (the_low_target): Use the correct breakpoint instruction.
4070
4071 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4072
4073 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4074 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4075 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4076 (the_low_target): Update.
4077
4078 2005-10-25 Andreas Schwab <schwab@suse.de>
4079
4080 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4081
4082 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4083 (ia64_num_regs): Reduce to 462.
4084
4085 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4086
4087 * acinclude.m4: Correct quoting.
4088 * aclocal.m4: Regenerated.
4089
4090 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4091 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4092 (thread_db_init): Call thread_db_err_str.
4093 * configure.ac: Check for TD_VERSION.
4094 * config.in, configure: Regenerated.
4095
4096 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4097
4098 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4099
4100 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4101
4102 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4103 is not available. Define HAVE_PTRACE_GETREGS if it is.
4104 * config.in, configure: Regenerated.
4105 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4106 * linux-i386-low.c, linux-m68k-low.c: Update to use
4107 HAVE_PTRACE_GETREGS.
4108 * linux-low.c (regsets_fetch_inferior_registers)
4109 (regsets_store_inferior_registers): Only return 0 if we processed
4110 GENERAL_REGS.
4111 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4112 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4113
4114 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4115
4116 * inferiors.c (struct thread_info): Add gdb_id.
4117 (add_thread): Add gdb_id argument.
4118 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4119 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4120 calls to add_thread.
4121 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4122 * server.c (handle_query): Use thread_to_gdb_id.
4123 (handle_v_cont, main): Use gdb_id_to_thread_id.
4124 * server.h (add_thread): Update prototype.
4125 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4126 prototypes.
4127
4128 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4129
4130 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4131 left-padded registers.
4132 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4133 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4134
4135 2005-07-01 Steve Ellcey <sje@cup.hp.com>
4136
4137 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4138 * configure: Regenerate.
4139 * config.in: Regenerate.
4140 * server.h (NEED_DECLARATION_STRERROR):
4141 Replace with !HAVE_DECL_STRERROR.
4142
4143 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4144
4145 * linux-low.c (linux_wait, linux_send_signal): Don't test
4146 an unsigned long variable for > 0 if it could be MAX_ULONG.
4147 * server.c (myresume): Likewise.
4148 * target.c (set_desired_inferior): Likewise.
4149
4150 2005-06-13 Mark Kettenis <kettenis@gnu.org>
4151
4152 * configure.ac: Simplify and improve check for socklen_t.
4153 * configure, config.in: Regenerate.
4154
4155 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
4156
4157 * acconfig.h: Remove.
4158 * configure.ac: Add a test for socklen_t. Use three-argument
4159 AC_DEFINE throughout.
4160 * config.in: Regenerated using autoheader 2.59.
4161 * configure: Regenerated.
4162
4163 * gdbreplay.c (socklen_t): Provide a default.
4164 (remote_open): Use socklen_t.
4165 * remote-utils.c (socklen_t): Provide a default.
4166 (remote_open): Use socklen_t.
4167 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
4168 unsigned char.
4169
4170 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
4171 char for buffers.
4172 * linux-low.c (linux_read_memory, linux_write_memory)
4173 (linux_read_auxv): Likewise.
4174 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
4175 (check_mem_write): Likewise.
4176 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
4177 Likewise.
4178 * regcache.c (struct inferior_rgcache_data, registers_to_string)
4179 (registers_from_string, register_data): Likewise.
4180 * server.c (handle_query, main): Likewise.
4181 * server.h (convert_ascii_to_int, convert_int_to_ascii)
4182 (decode_M_packet): Likewise.
4183 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
4184 * target.h (struct target_ops): Update read_memory, write_memory,
4185 and read_auxv.
4186 (read_inferior_memory, write_inferior_memory): Update.
4187 * linux-low.h (struct linux_target_ops): Change type of breakpoint
4188 to unsigned char *.
4189 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
4190 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
4191 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
4192 linux-s390-low.c, linux-sh-low.c: Update for changes in
4193 read_inferior_memory and the_low_target->breakpoint.
4194
4195 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
4196
4197 * Makefile.in (SFILES): Add linux-ppc64-low.c.
4198 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
4199 * configure.srv: Add powerpc64-*-linux*.
4200 * linux-ppc64-low.c: New file.
4201
4202 2005-05-23 Orjan Friberg <orjanf@axis.com>
4203
4204 * linux-cris-low.c: New file with support for CRIS.
4205 * linux-crisv32-low.c: Ditto for CRISv32.
4206 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
4207 (clean): Add reg-cris.c and reg-crisv32.c.
4208 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
4209 reg-crisv32.o, and reg-crisv32.c to make rules.
4210 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
4211 recognized targets.
4212
4213 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
4214
4215 * linux-low.c (fetch_register): Ensure buffer size is a multiple
4216 of sizeof (PTRACE_XFER_TYPE).
4217 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
4218
4219 2005-05-12 Orjan Friberg <orjanf@axis.com>
4220
4221 * target.h (struct target_ops): Add insert_watchpoint,
4222 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
4223 pointers for hardware watchpoint support.
4224 * linux-low.h (struct linux_target_ops): Ditto.
4225 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
4226 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
4227 to linux_target_ops.
4228 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
4229 reply packet.
4230 * server.c (main): Recognize 'Z' and 'z' packets.
4231
4232 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
4233
4234 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
4235 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
4236 (the_low_target): Add new members.
4237
4238 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4239
4240 * proc-service.c (ps_lgetregs): Search all_processes instead of
4241 all_threads.
4242
4243 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4244
4245 * server.c (start_inferior): Change return type to int.
4246 (attach_inferior): Change sigptr to int *.
4247 (handle_v_cont, handle_v_requests): Change signal to int *.
4248 (main): Change signal to int.
4249
4250 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
4251
4252 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
4253 * configure.srv: Add m32r*-*-linux*.
4254 * linux-m32r-low.c: New file.
4255
4256 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
4257
4258 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
4259
4260 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4261
4262 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
4263 Take unsigned long arguments for PIDs.
4264 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
4265 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
4266 (wait_for_sigstop, linux_resume_one_process)
4267 (regsets_fetch_inferior_registers, linux_send_signal)
4268 (linux_read_auxv): Likewise. Update the types of variables holding
4269 PIDs. Update format string specifiers.
4270 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
4271 * remote-utils.c (prepare_resume_reply): Likewise.
4272 * server.c (cont_thread, general_thread, step_thread)
4273 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
4274 unsigned long.
4275 (handle_query): Update format specifiers.
4276 (handle_v_cont, main): Use strtoul for thread IDs.
4277 * server.h (struct inferior_list_entry): Use unsigned long for ID.
4278 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
4279 (general_thread, step_thread, thread_from_wait)
4280 (old_thread_from_wait): Update.
4281 * target.h (struct thread_resume): Use unsigned long for THREAD.
4282 (struct target_ops): Use unsigned long for arguments to attach and
4283 thread_alive.
4284
4285 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
4286
4287 * acinclude.m4: Include bfd/bfd.m4 directly.
4288 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
4289 <agriffis@toolchain.org>.
4290 * aclocal.m4, configure: Regenerated.
4291
4292 2005-01-07 Andrew Cagney <cagney@gnu.org>
4293
4294 * configure.ac: Rename configure.in, require autoconf 2.59.
4295 * configure: Re-generate.
4296
4297 2004-12-08 Daniel Jacobowitz <dan@debian.org>
4298
4299 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
4300 LIBS when finished.
4301 * aclocal.m4: Regenerated.
4302 * configure: Regenerated.
4303
4304 2004-11-21 Andreas Schwab <schwab@suse.de>
4305
4306 * linux-m68k-low.c (m68k_num_gregs): Define.
4307 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
4308 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
4309 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
4310 (m68k_breakpoint_at): New. Add to the_low_target.
4311
4312 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
4313 srv_linux_thread_db to yes.
4314
4315 2004-10-20 Joel Brobecker <brobecker@gnat.com>
4316
4317 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
4318 (ARCH_SET_FS): Likewise.
4319 (ARCH_GET_FS): Likewise.
4320 (ARCH_GET_GS): Likewise.
4321
4322 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4323
4324 * linux-i386-low.c (ps_get_thread_area): New.
4325 * linux-x86-64-low.c (ps_get_thread_area): New.
4326 * linux-low.c: Include <sys/syscall.h>.
4327 (linux_kill_one_process): Don't kill the first thread here.
4328 (linux_kill): Kill the first thread here.
4329 (kill_lwp): New function.
4330 (send_sigstop, linux_send_signal): Use it.
4331 * proc-service.c: Clean up #ifdefs.
4332 (fpregset_info): Delete.
4333 (ps_lgetregs): Update and enable implementation.
4334 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
4335 implementations.
4336 * remote-utils.c (struct sym_cache, symbol_cache): New.
4337 (input_interrupt): Print a clearer message.
4338 (async_io_enabled): New variable.
4339 (enable_async_io, disable_async_io): Use it. Update comments.
4340 (look_up_one_symbol): Use the symbol cache.
4341 * thread-db.c (thread_db_look_up_symbols): New function.
4342 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
4343
4344 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4345
4346 * configure.in: Test for -rdynamic.
4347 * configure: Regenerated.
4348 * Makefile (INTERNAL_LDFLAGS): New.
4349 (gdbserver, gdbreplay): Use it.
4350
4351 2004-09-02 Andrew Cagney <cagney@gnu.org>
4352
4353 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
4354
4355 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
4356
4357 * linux-low.c (linux_wait): Clear all_processes list also.
4358
4359 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4360
4361 * linux-low.c: Include <errno.h>. Remove extern declaration of
4362 errno.
4363
4364 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4365
4366 * gdbreplay.c, server.h, utils.c: Update copyright years.
4367
4368 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4369
4370 * server.c (main): Print child status or termination signal from
4371 variable 'signal', not 'sig'.
4372
4373 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4374
4375 * linux-low.c (linux_read_memory): Change return type to
4376 int. Check for and return error from ptrace().
4377 * target.c (read_inferior_memory): Change return type to int. Pass
4378 back return status from the_target->read_memory().
4379 * target.h (struct target_ops): Adapt *read_memory() prototype.
4380 Update comment.
4381 (read_inferior_memory): Adapt prototype.
4382 * server.c (main): Return an error packet if
4383 read_inferior_memory() returns an error.
4384
4385 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
4386
4387 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
4388 Unify with other clean targets.
4389
4390 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4391
4392 * server.c (handle_v_cont): Call set_desired_inferior.
4393
4394 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4395
4396 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
4397
4398 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4399
4400 * linux-low.c (linux_wait): Unblock async I/O.
4401 (linux_resume): Block and enable async I/O.
4402 * remote-utils.c (block_async_io, unblock_async_io): New functions.
4403 * server.h (block_async_io, unblock_async_io): Add prototypes.
4404
4405 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4406
4407 * remote-utils.c (remote_open): Print a status notice after
4408 opening a TCP port.
4409 * server.c (attach_inferior): Print a status notice after
4410 attaching.
4411
4412 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4413
4414 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
4415
4416 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
4417
4418 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
4419 error packet.
4420 * server.c, target.h: Update copyright years.
4421
4422 2004-02-25 Roland McGrath <roland@redhat.com>
4423
4424 * target.h (struct target_ops): New member `read_auxv'.
4425 * server.c (handle_query): Handle qPart:auxv:read: query using that.
4426 * linux-low.c (linux_read_auxv): New function.
4427 (linux_target_ops): Initialize `read_auxv' member to that.
4428
4429 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4430
4431 Committed by Jim Blandy <jimb@redhat.com>.
4432
4433 * linux-s390-low.c (s390_num_regs): Update.
4434 (s390_regmap): Remove control registers. Use __s390x__ predefine
4435 instead of GPR_SIZE to distiguish s390 and s390x targets.
4436
4437 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
4438
4439 * linux-low.c: Update copyright year.
4440 (check_removed_breakpoint): Clear pending_is_breakpoint.
4441 (linux_set_resume_request, linux_queue_one_thread)
4442 (resume_status_pending_p): New functions.
4443 (linux_continue_one_thread): Use process->resume.
4444 (linux_resume): Only resume threads if there are no pending events.
4445 * linux-low.h (struct process_info): Add resume request
4446 pointer.
4447
4448 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
4449
4450 * regcache.c (new_register_cache): Clear the allocated register
4451 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4452
4453 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
4454
4455 * linux-low.c (linux_resume): Take a struct thread_resume *
4456 argument.
4457 (linux_wait): Update call.
4458 (resume_ptr): New static variable.
4459 (linux_continue_one_thread): Renamed from
4460 linux_continue_one_process. Use resume_ptr.
4461 (linux_resume): Use linux_continue_one_thread.
4462 * server.c (handle_v_cont, handle_v_requests): New functions.
4463 (myresume): New function.
4464 (main): Handle 'v' case.
4465 * target.h (struct thread_resume): New type.
4466 (struct target_ops): Change argument of "resume" to struct
4467 thread_resume *.
4468 (myresume): Delete macro.
4469
4470 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
4471
4472 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
4473 (uninstall): Support DESTDIR.
4474
4475 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
4476
4477 * configure.srv: Add xscale*linux copy of arm*linux entry.
4478
4479 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
4480
4481 * linux-arm-low.c (arm_reinsert_addr): New function.
4482 (the_low_target): Add arm_reinsert_addr.
4483
4484 2003-07-08 Mark Kettenis <kettenis@gnu.org>
4485
4486 * mem-break.c: Remove whitespace at end of file.
4487
4488 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4489
4490 * configure.in: Check whether we need to prototype strerror.
4491 * server.h: Optionally prototype strerror.
4492 * gdbreplay.c (perror_with_name): Use strerror.
4493 * linux-low.c (linux_attach_lwp): Use strerror.
4494 * utils.c (perror_with_name): Use strerror.
4495 * config.in, configure: Regenerated.
4496
4497 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4498
4499 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4500 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
4501
4502 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
4503
4504 * Makefile.in (SFILES): Update.
4505 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4506 low-sun3.c: Remove files.
4507
4508 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
4509
4510 * linux-low.c: Move comment to linux_thread_alive where it belonged.
4511 (linux_detach_one_process, linux_detach): New functions.
4512 (linux_target_ops): Add linux_detach.
4513 * server.c (main): Handle 'D' packet.
4514 * target.h (struct target_ops): Add "detach" member.
4515 (detach_inferior): Define.
4516
4517 2003-06-13 Mark Kettenis <kettenis@gnu.org>
4518
4519 From Kelley Cook <kelleycook@wideopenwest.com>:
4520 * configure.srv: Accept i[34567]86 variants.
4521
4522 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
4523
4524 * linux-low.c (linux_wait_for_event): Correct comment typos.
4525 (linux_resume_one_process): Call check_removed_breakpoint.
4526 (linux_send_signal): New function.
4527 (linux_target_ops): Add linux_send_signal.
4528 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4529 of kill.
4530 * target.h (struct target_ops): Add send_signal.
4531
4532 2003-05-29 Jim Blandy <jimb@redhat.com>
4533
4534 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4535 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4536 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4537 away part of the register's value.
4538
4539 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
4540
4541 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4542 (linux_wait_for_event, linux_init_signals): Likewise.
4543
4544 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
4545
4546 * configure.in: Check for stdlib.h.
4547 * configure: Regenerated.
4548 * config.in: Regenerated.
4549
4550 2003-01-04 Andreas Schwab <schwab@suse.de>
4551
4552 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4553
4554 2003-01-02 Andrew Cagney <ac131313@redhat.com>
4555
4556 * Makefile.in: Remove obsolete code.
4557
4558 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
4559
4560 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4561 defined(PT_FPR0_HI).
4562
4563 2002-11-17 Stuart Hughes <seh@zee2.com>
4564
4565 * linux-arm-low.c (arm_num_regs): Increase.
4566 (arm_regmap): Include status register.
4567
4568 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
4569
4570 * linux-low.c (register_addr): Remove incorrect -1 check.
4571
4572 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
4573
4574 * linux-low.c (linux_create_inferior): Call setpgid. Return
4575 the new PID.
4576 (unstopped_p, linux_signal_pid): Remove.
4577 (linux_target_ops): Remove linux_signal_pid.
4578 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4579 global instead of target method.
4580 * target.h (struct target_ops): Remove signal_pid. Update comment
4581 for create_inferior.
4582 * server.c (signal_pid): New variable.
4583 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4584 gdbserver. Set the child to be the foreground process group.
4585 (attach_inferior): Set signal_pid.
4586
4587 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
4588
4589 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4590
4591 2002-08-20 Jim Blandy <jimb@redhat.com>
4592
4593 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4594 default for this.
4595
4596 2002-08-01 Andrew Cagney <cagney@redhat.com>
4597
4598 * Makefile.in: Make chill references obsolete.
4599
4600 2002-07-24 Kevin Buettner <kevinb@redhat.com>
4601
4602 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4603 * configure: Regenerate.
4604 * config.in: Regenerate.
4605
4606 2002-07-09 David O'Brien <obrien@FreeBSD.org>
4607
4608 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4609 (perror_with_name, remote_close, remote_open, expect, play): Static.
4610
4611 2002-07-04 Michal Ludvig <mludvig@suse.cz>
4612
4613 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
4614 byte offsets instead of an array of indexes.
4615 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4616
4617 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
4618
4619 * regcache.c: Add comment.
4620
4621 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
4622
4623 * thread-db.c: New file.
4624 * proc-service.c: New file.
4625 * acinclude.m4: New file.
4626 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4627 proc-service.o, and thread-db.o.
4628 (linux-low.o): Add USE_THREAD_DB.
4629 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4630 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4631 * aclocal.m4: Regenerated.
4632 * config.in: Regenerated.
4633 * configure: Regenerated.
4634 * configure.in: Check for proc_service.h, sys/procfs.h,
4635 thread_db.h, and linux/elf.h headrs.
4636 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4637 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4638 Check for -lthread_db and thread support.
4639 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4640 PowerPC, and SuperH.
4641 * i387-fp.c: Constify arguments.
4642 * i387-fp.h: Likewise.
4643 * inferiors.c: (struct thread_info): Renamed from
4644 `struct inferior_info'. Remove PID member. Use generic inferior
4645 list header. All uses updated.
4646 (inferiors, signal_pid): Removed.
4647 (all_threads): New variable.
4648 (get_thread): Define.
4649 (add_inferior_to_list): New function.
4650 (for_each_inferior): New function.
4651 (change_inferior_id): New function.
4652 (add_inferior): Removed.
4653 (remove_inferior): New function.
4654 (add_thread): New function.
4655 (free_one_thread): New function.
4656 (remove_thread): New function.
4657 (clear_inferiors): Use for_each_inferior and free_one_thread.
4658 (find_inferior): New function.
4659 (find_inferior_id): New function.
4660 (inferior_target_data): Update argument type.
4661 (set_inferior_target_data): Likewise.
4662 (inferior_regcache_data): Likewise.
4663 (set_inferior_regcache_data): Likewise.
4664 * linux-low.c (linux_bp_reinsert): Remove.
4665 (all_processes, stopping_threads, using_thrads)
4666 (struct pending_signals, debug_threads, pid_of): New.
4667 (inferior_pid): Replace with macro.
4668 (struct inferior_linux_data): Remove.
4669 (get_stop_pc, add_process): New functions.
4670 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4671 Use add_process and add_thread.
4672 (linux_attach_lwp): New function, based on old linux_attach. Use
4673 add_process and add_thread. Set stop_expected for new threads.
4674 (linux_attach): New function.
4675 (linux_kill_one_process): New function.
4676 (linux_kill): Kill all LWPs.
4677 (linux_thread_alive): Use find_inferior_id.
4678 (check_removed_breakpoints, status_pending_p): New functions.
4679 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4680 Update. Use WNOHANG. Wait for cloned processes also. Update process
4681 struct for the found process.
4682 (linux_wait_for_event): New function.
4683 (linux_wait): Use it. Support LWPs.
4684 (send_sigstop, wait_for_sigstop, stop_all_processes)
4685 (linux_resume_one_process, linux_continue_one_process): New functions.
4686 (linux_resume): Support LWPs.
4687 (REGISTER_RAW_SIZE): Remove.
4688 (fetch_register): Use register_size instead. Call supply_register.
4689 (usr_store_inferior_registers): Likewise. Call collect_register.
4690 Fix recursive case.
4691 (regsets_fetch_inferior_registers): Improve error message.
4692 (regsets_store_inferior_registers): Add debugging.
4693 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4694 (unstopped_p, linux_signal_pid): New functions.
4695 (linux_target_ops): Add linux_signal_pid.
4696 (linux_init_signals): New function.
4697 (initialize_low): Call it. Initialize using_threads.
4698 * regcache.c (inferior_regcache_data): Add valid
4699 flag.
4700 (get_regcache): Fetch registers lazily. Add fetch argument
4701 and update all callers.
4702 (regcache_invalidate_one, regcache_invalidate): New
4703 functions.
4704 (new_register_cache): Renamed from create_register_cache.
4705 Return the new regcache.
4706 (free_register_cache): Change argument to a void *.
4707 (registers_to_string, registers_from_string): Call get_regcache
4708 with fetch flag set.
4709 (register_data): Make static. Pass fetch flag to get_regcache.
4710 (supply_register): Call get_regcache with fetch flag clear.
4711 (collect_register): Call get_regcache with fetch flag set.
4712 (collect_register_as_string): New function.
4713 * regcache.h: Update.
4714 * remote-utils.c (putpkt): Flush after debug output and use
4715 stderr.
4716 Handle input interrupts while waiting for an ACK.
4717 (input_interrupt): Use signal_pid method.
4718 (getpkt): Flush after debug output and use stderr.
4719 (outreg): Use collect_register_as_string.
4720 (new_thread_notify, dead_thread_notify): New functions.
4721 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4722 and general_thread.
4723 (look_up_one_symbol): Flush after debug output.
4724 * server.c (step_thread, server_waiting): New variables.
4725 (start_inferior): Don't use signal_pid. Update call to mywait.
4726 (attach_inferior): Update call to mywait.
4727 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4728 (main): Don't fetch/store registers explicitly. Use
4729 set_desired_inferior. Support proposed ``Hs'' packet. Update
4730 calls to mywait.
4731 * server.h: Update.
4732 (struct inferior_list, struct_inferior_list_entry): New.
4733 * target.c (set_desired_inferior): New.
4734 (write_inferior_memory): Constify.
4735 (mywait): New function.
4736 * target.h: Update.
4737 (struct target_ops): New signal_pid method.
4738 (mywait): Removed macro, added prototype.
4739
4740 * linux-low.h (regset_func): Removed.
4741 (regset_fill_func, regset_store_func): New.
4742 (enum regset_type): New.
4743 (struct regset_info): Add type field. Use new operation types.
4744 (struct linux_target_ops): stop_pc renamed to get_pc.
4745 Add decr_pc_after_break and breakpoint_at.
4746 (get_process, get_thread_proess, get_process_thread)
4747 (strut process_info, all_processes, linux_attach_lwp)
4748 (thread_db_init): New.
4749
4750 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4751 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4752 (the_low_target): Add new members.
4753 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4754 (i386_store_fpxregset): Constify.
4755 (target_regsets): Add new kind identifier.
4756 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4757 (i386_set_pc): Add debugging.
4758 (i386_breakpoint_at): New function.
4759 (the_low_target): Add new members.
4760 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4761 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4762 (mips_breakpoint_at): New.
4763 (the_low_target): Add new members.
4764 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4765 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4766 (the_low_target): Add new members.
4767 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4768 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4769 (the_low_target): Add new members.
4770 * linux-x86-64-low.c (target_regsets): Add new kind
4771 identifier.
4772
4773 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
4774
4775 From Martin Pool <mbp@samba.org>:
4776 * server.c (gdbserver_usage): New function.
4777 (main): Call it.
4778
4779 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
4780
4781 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4782 stop_at -> stop_pc.
4783
4784 2002-05-04 Andrew Cagney <ac131313@redhat.com>
4785
4786 * Makefile.in: Remove obsolete code.
4787
4788 2002-04-24 Michal Ludvig <mludvig@suse.cz>
4789
4790 * linux-low.c (regsets_fetch_inferior_registers),
4791 (regsets_store_inferior_registers): Removed cast to int from
4792 ptrace() calls.
4793 * regcache.h: Added declaration of struct inferior_info.
4794
4795 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4796
4797 * inferiors.c (struct inferior_info): Add regcache_data.
4798 (add_inferior): Call create_register_cache.
4799 (clear_inferiors): Call free_register_cache.
4800 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4801 * regcache.c (struct inferior_regcache_data): New.
4802 (registers): Remove.
4803 (get_regcache): New function.
4804 (create_register_cache, free_register_cache): New functions.
4805 (set_register_cache): Don't initialize the register cache here.
4806 (registers_to_string, registers_from_string, register_data): Call
4807 get_regcache.
4808 * regcache.h: Add prototypes.
4809 * server.h: Likewise.
4810
4811 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4812
4813 * mem-break.c: New file.
4814 * mem-break.h: New file.
4815 * Makefile.in: Add mem-break.o rule; update server.h
4816 dependencies.
4817 * inferiors.c (struct inferior_info): Add target_data
4818 member.
4819 (clear_inferiors): Free target_data member if set.
4820 (inferior_target_data, set_inferior_target_data): New functions.
4821 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
4822 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
4823 * linux-low.c (linux_bp_reinsert): New variable.
4824 (struct inferior_linux_data): New.
4825 (linux_create_inferior): Use set_inferior_target_data.
4826 (linux_attach): Likewise. Call add_inferior.
4827 (linux_wait_for_one_inferior): New function.
4828 (linux_wait): Call it.
4829 (linux_write_memory): Add const.
4830 (initialize_low): Call set_breakpoint_data.
4831 * linux-low.h (struct linux_target_ops): Add breakpoint
4832 handling members.
4833 * server.c (attach_inferior): Remove extra add_inferior
4834 call.
4835 * server.h: Include mem-break.h. Update inferior.c
4836 prototypes.
4837 * target.c (read_inferior_memory)
4838 (write_inferior_memory): New functions.
4839 * target.h (read_inferior_memory)
4840 (write_inferior_memory): Change macros to prototypes.
4841 (struct target_ops): Update comments. Add const to write_memory
4842 definition.
4843
4844 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
4845
4846 * linux-low.c (usr_store_inferior_registers): Support
4847 registers which are allowed to fail to store.
4848 * linux-low.h (linux_target_ops): Likewise.
4849 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4850 (ppc_cannot_store_register): FPSCR may not be storable.
4851
4852 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4853
4854 * server.h: Include <string.h> if HAVE_STRING_H.
4855 * ChangeLog: Correct paths in last ChangeLog entry.
4856
4857 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4858
4859 * linux-low.h: Remove obsolete prototypes.
4860 (struct linux_target_ops): New.
4861 (extern the_low_target): New.
4862 * linux-low.c (num_regs, regmap): Remove declarations.
4863 (register_addr): Use the_low_target explicitly.
4864 (fetch_register): Likewise.
4865 (usr_fetch_inferior_registers): Likewise.
4866 (usr_store_inferior_registers): Likewise.
4867 * linux-arm-low.c (num_regs): Remove.
4868 (arm_num_regs): Define.
4869 (arm_regmap): Renamed from regmap, made static.
4870 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4871 made static.
4872 (arm_cannot_store_register): Renamed from cannot_store_register,
4873 made static.
4874 (the_low_target): New.
4875 * linux-i386-low.c (num_regs): Remove.
4876 (i386_num_regs): Define.
4877 (i386_regmap): Renamed from regmap, made static.
4878 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4879 made static.
4880 (i386_cannot_store_register): Renamed from cannot_store_register,
4881 made static.
4882 (the_low_target): New.
4883 * linux-ia64-low.c (num_regs): Remove.
4884 (ia64_num_regs): Define.
4885 (ia64_regmap): Renamed from regmap, made static.
4886 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4887 made static.
4888 (ia64_cannot_store_register): Renamed from cannot_store_register,
4889 made static.
4890 (the_low_target): New.
4891 * linux-m68k-low.c (num_regs): Remove.
4892 (m68k_num_regs): Define.
4893 (m68k_regmap): Renamed from regmap, made static.
4894 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4895 made static.
4896 (m68k_cannot_store_register): Renamed from cannot_store_register,
4897 made static.
4898 (the_low_target): New.
4899 * linux-mips-low.c (num_regs): Remove.
4900 (mips_num_regs): Define.
4901 (mips_regmap): Renamed from regmap, made static.
4902 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4903 made static.
4904 (mips_cannot_store_register): Renamed from cannot_store_register,
4905 made static.
4906 (the_low_target): New.
4907 * linux-ppc-low.c (num_regs): Remove.
4908 (ppc_num_regs): Define.
4909 (ppc_regmap): Renamed from regmap, made static.
4910 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4911 made static.
4912 (ppc_cannot_store_register): Renamed from cannot_store_register,
4913 made static.
4914 (the_low_target): New.
4915 * linux-s390-low.c (num_regs): Remove.
4916 (s390_num_regs): Define.
4917 (s390_regmap): Renamed from regmap, made static.
4918 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4919 made static.
4920 (s390_cannot_store_register): Renamed from cannot_store_register,
4921 made static.
4922 (the_low_target): New.
4923 * linux-sh-low.c (num_regs): Remove.
4924 (sh_num_regs): Define.
4925 (sh_regmap): Renamed from regmap, made static.
4926 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4927 made static.
4928 (sh_cannot_store_register): Renamed from cannot_store_register,
4929 made static.
4930 (the_low_target): New.
4931 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4932 (the_low_target): New.
4933
4934 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4935
4936 * Makefile.in: Add stamp-h target.
4937 * configure.in: Create stamp-h.
4938 * configure: Regenerated.
4939
4940 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4941
4942 * inferiors.c: New file.
4943 * target.c: New file.
4944 * target.h: New file.
4945 * Makefile.in: Add target.o and inferiors.o. Update
4946 dependencies.
4947 * linux-low.c (inferior_pid): New static variable,
4948 moved from server.c.
4949 (linux_create_inferior): Renamed from create_inferior.
4950 Call add_inferior. Return 0 on success instead of a PID.
4951 (linux_attach): Renamed from myattach.
4952 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4953 (linux_thread_alive): Renamed from mythread_alive.
4954 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4955 child dies.
4956 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4957 (regsets_store_inferior_registers): Correct error message.
4958 Add missing ``return 0''.
4959 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4960 (linux_store_registers): Renamed from store_inferior_registers.
4961 (linux_read_memory): Renamed from read_inferior_memory.
4962 (linux_write_memory): Renamed from write_inferior_memory.
4963 (linux_target_ops): New structure.
4964 (initialize_low): Call set_target_ops ().
4965 * remote-utils.c (unhexify): New function.
4966 (hexify): New function.
4967 (input_interrupt): Send signals to ``signal_pid''.
4968 * server.c (inferior_pid): Remove.
4969 (start_inferior): Update create_inferior call.
4970 (attach_inferior): Call add_inferior.
4971 (handle_query): New function.
4972 (main): Call handle_query for `q' packets.
4973 * server.h: Include "target.h". Remove obsolete prototypes.
4974 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4975
4976 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4977
4978 * Makefile.in: Add WARN_CFLAGS. Update configury
4979 dependencies.
4980 * configure.in: Check for <string.h>
4981 * configure: Regenerate.
4982 * config.in: Regenerate.
4983 * gdbreplay.c: Include needed system headers.
4984 (remote_open): Remove strchr prototype.
4985 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4986 * regcache.c (supply_register): Change buf argument to const void *.
4987 (supply_register_by_name): Likewise.
4988 (collect_register): Change buf argument to void *.
4989 (collect_register_by_name): Likewise.
4990 * regcache.h: Add missing prototypes.
4991 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4992 * server.c (handle_query): New function.
4993 (attached): New static variable, moved out of main.
4994 (main): Quiet longjmp clobber warnings.
4995 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
4996 * utils.c (error): Remove NORETURN.
4997 (fatal): Likewise.
This page took 0.138482 seconds and 4 git commands to generate.