opcodes/
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
c623a6ef
WN
12013-09-16 Will Newton <will.newton@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4 out regs.
5
fb71d39e
PA
62013-09-06 Pedro Alves <palves@redhat.com>
7
8 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
11 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
12 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
14
8e7e9910
PA
152013-09-06 Pedro Alves <palves@redhat.com>
16
17 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
18 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
19
7c3a12ca
PA
202013-09-06 Pedro Alves <palves@redhat.com>
21
22 * linux-amd64-ipa.c: Include tracepoint.h.
23 * linux-i386-ipa.c: Include tracepoint.h.
24
8eb3d7b6
RW
252013-09-06 Ricard Wanderlof <ricardw@axis.com>
26
27 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
28 (ps_get_thread_area): New function.
29
eddddb9d
RW
302013-09-06 Ricard Wanderlof <ricardw@axis.com>
31
32 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
33 (initialize_low_arch): Call init_registers_crisv32 rather than
34 init_register_crisv32.
35
533b0600
PA
362013-09-05 Pedro Alves <palves@redhat.com>
37
38 * server.h (handle_vFile, hostio_last_error_from_errno): Move
39 to ...
40 * hostio.h: ... this new file.
41 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
42 win32-low.c: Include hostio.h.
43
0ce3d3b5
PA
442013-09-05 Pedro Alves <palves@redhat.com>
45
46 * server.h (gdb_client_data, handler_func, callback_handler_func)
47 (delete_file_handler, add_file_handler, append_callback_event)
48 (delete_callback_event, start_event_loop, initialize_event_loop):
49 Move to event-loop.h and include it.
50 * event-loop.h: New file.
51
799cdc37
PA
522013-09-05 Pedro Alves <palves@redhat.com>
53
54 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
55 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
56 (loaded_dll, unloaded_dll): Move to ...
57 * dll.h: ... this new file.
58 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
59
6a6bbd9d
PA
602013-09-05 Pedro Alves <palves@redhat.com>
61
62 * server.h (current_process, get_thread_process, all_processes)
63 (add_inferior_to_list, for_each_inferior, current_inferior)
64 (remove_inferior, add_process, remove_process, find_process_pid)
65 (have_started_inferiors_p, have_attached_inferiors_p)
66 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
67 (clear_inferiors, find_inferior, find_inferior_id)
68 (inferior_target_data, set_inferior_target_data)
69 (inferior_regcache_data, set_inferior_regcache_data): Move to
70 inferiors.h, and include it.
71 * inferiors.h: New file.
72
f699aaba
PA
732013-09-05 Pedro Alves <palves@redhat.com>
74
75 * server.h (struct emit_ops, current_insn_ptr, emit_error):
76 Move ...
77 * ax.h: ... here.
78
c144c7a0
PA
792013-09-05 Pedro Alves <palves@redhat.com>
80
81 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
82 tracepoint.h.
83 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
84 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
85 (handle_tracepoint_general_set, handle_tracepoint_query)
86 (tracepoint_finished_step, tracepoint_was_hit)
87 (release_while_stepping_state_list, current_traceframe)
88 (in_readonly_region, traceframe_read_mem)
89 (fetch_traceframe_registers, traceframe_read_sdata)
90 (traceframe_read_info, struct fast_tpoint_collect_status)
91 (fast_tracepoint_collecting, force_unlock_trace_buffer)
92 (handle_tracepoit_bkpts, initialize_low_tracepoint)
93 (supply_fast_tracepoint_registers)
94 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
95 (ipa_tdesc, claim_trampoline_space)
96 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
97 (agent_mem_read, agent_get_trace_state_variable_value)
98 (agent_set_trace_state_variable_value, agent_tsv_read)
99 (agent_mem_read_string, get_raw_reg_func_addr)
100 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
101 * tracepoint.h: ... this new file.
102
ff42e6ab
PA
1032013-09-05 Pedro Alves <palves@redhat.com>
104
105 * server.h (perror_with_name, error, fatal, warning, paddress)
106 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
107 include it.
108 * utils.h: New file.
109
541af0f4
PA
1102013-09-05 Pedro Alves <palves@redhat.com>
111
112 * server.h (remote_debug, noack_mode, transport_is_reliable)
113 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
114 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
115 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
116 (write_enn, initialize_async_io, enable_async_io)
117 (disable_async_io, check_remote_input_interrupt_request)
118 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
119 (dead_thread_notify, prepare_resume_reply)
120 (decode_address_to_semicolon, decode_address, decode_m_packet)
121 (decode_M_packet, decode_X_packet, decode_xfer_write)
122 (decode_search_memory_packet, unhexify, hexify)
123 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
124 (look_up_one_symbol, relocate_instruction)
125 (monitor_output): Move to remote-utils.h, and include it.
126 * remote-utils.h: New file.
127
eebdf26b
PA
1282013-09-05 Pedro Alves <palves@redhat.com>
129
130 * server.h (_): Delete.
131
3aafd2ff
PA
1322013-09-02 Pedro Alves <palves@redhat.com>
133
134 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
135 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
136 allocated.
137 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
138
cee83bcb
PM
1392013-09-02 Pierre Muller <muller@sourceware.org>
140
141 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
142 or WriteProcessMemory complete successfully and handle
143 ERROR_PARTIAL_COPY error.
144
9a13b2fa
PA
1452013-09-02 Pedro Alves <palves@redhat.com>
146
147 * server.c (gdb_read_memory): Return -1 on traceframe memory read
148 error instead of EIO.
149
602e3198
JK
1502013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
151
152 PR server/15604
153 * linux-low.c: Include filestuff.h.
154 (linux_create_inferior) <pid == 0>: Call close_most_fds.
155 * lynx-low.c: Include filestuff.h.
156 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
157 * server.c: Include filestuff.h.
158 (main): Call notice_open_fds.
159 * spu-low.c: Include filestuff.h.
160 (spu_create_inferior) <pid == 0>: Call close_most_fds.
161
96d7229d
LM
1622013-08-22 Luis Machado <lgustavo@codesourcery.com>
163
164 * Makefile.in: Explain why ../target and ../nat are not
165 listed as include file search paths.
166 (linux-waitpid.o): New object file rule.
167 * configure.srv (srv_native_linux_obj): New variable.
168 Replace all occurrences of linux native object files with
169 $srv_native_linux_obj.
170 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
171 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
172 (linux_enable_event_reporting): Remove declaration.
173 (my_waitpid): Moved to common/linux-waitpid.c.
174 (linux_wait_for_event): Pass ptid when calling
175 linux_enable_event_reporting.
176 (linux_supports_tracefork_flag): Remove.
177 (linux_enable_event_reporting): Likewise.
178 (linux_tracefork_grandchild): Remove.
179 (STACK_SIZE): Moved to common/linux-ptrace.c.
180 (linux_tracefork_child): Remove.
181 (linux_test_for_tracefork): Remove.
182 (linux_look_up_symbols): Call linux_supports_traceclone.
183 (initialize_low): Remove call to linux_test_for_tracefork.
184 * linux-low.h (PTRACE_TYPE_ARG3): Move to
185 common/linux-ptrace.h.
186 (PTRACE_TYPE_ARG4): Likewise.
187 Include linux-ptrace.h.
188
32940073
PA
1892013-08-21 Pedro Alves <palves@redhat.com>
190
191 * config.in: Renegerate.
192
33b60d58 1932013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 194
33b60d58
LM
195 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
196 (SFILES): Remove $(srcdir)/common/target-common.c and
197 add $(srcdir)/target/waitstatus.c.
198 (OBS): Remove target-common.o and add waitstatus.o.
199 (server_h): Remove $(srcdir)/../common/target-common.h and
200 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
201 and $(srcdir)/../target/waitstatus.h.
202 (target-common.o): Remove.
203 (waitstatus.o): New target object file.
204 * target.h: Do not include target-common.h and
205 include target/resume.h, target/wait.h and
206 target/waitstatus.h.
207
b8e1b30e
LM
2082013-08-13 Luis Machado <lgustavo@codesourcery.com>
209
210 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
211 to PTRACE_TYPE_ARG3.
212 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
213 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
214 PTRACE_TYPE_ARG4.
215 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
216 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
217
7a60ad40
YQ
2182013-07-27 Jie Zhang <jie@codesourcery.com>
219 Daniel Jacobowitz <dan@codesourcery.com>
220 Yao Qi <yao@codesourcery.com>
221
222 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
223 (mips-linux-watch.o): New rule.
224 (mips_linux_watch_h): New variable.
225 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
226 srv_tgtobj.
227 * linux-mips-low.c: Include mips-linux-watch.h.
228 (struct arch_process_info, struct arch_lwp_info): New.
229 (update_watch_registers_callback): New function.
230 (mips_linux_new_process, mips_linux_new_thread) New functions.
231 (mips_linux_prepare_to_resume, mips_insert_point): New
232 functions.
233 (mips_remove_point, mips_stopped_by_watchpoint): New
234 functions.
235 (rsp_bp_type_to_target_hw_bp_type): New function.
236 (mips_stopped_data_address): New function.
237 (the_low_target): Add watchpoint support functions.
238
de6f69ad
YQ
2392013-07-27 Yao Qi <yao@codesourcery.com>
240
241 * i386-low.c: Include break-common.h.
242 (enum target_hw_bp_type): Remove.
243
3360c0bf
LM
2442013-07-24 Luis Machado <lgustavo@codesourcery.com>
245
246 * Makefile.in (SFILES): /common/target-common.c.
247 (OBS): Add target-common.o.
248 (server_h): Add $(srcdir)/../common/target-common.h.
249 (target-common.o): New target.
250 * server.c (queue_stop_reply_callback): Free
251 status string after use.
252 * target.c (target_waitstatus_to_string): Remove.
253 * target.h: Include target-common.h.
254 (resume_kind): Likewise.
255 (target_waitkind): Likewise.
256 (target_waitstatus): Likewise.
257 (TARGET_WNOHANG): Likewise.
258
bd885420
YQ
2592013-07-04 Yao Qi <yao@codesourcery.com>
260
261 * Makefile.in (host_alias): Use @host_noncanonical@.
262 (target_alias): Use @target_noncanonical@.
263 * configure.ac: Use ACX_NONCANONICAL_TARGET and
264 ACX_NONCANONICAL_HOST.
265 * configure: Regenerated.
266
267 Revert:
268 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
269
270 * configure.ac (version_host, version_target): Set and AC_SUBST them.
271 * configure: Rebuild.
272 * Makefile.in (version_host, version_target): Get from configure.
273 (version.c): Use $(version_host) and $(version_target).
274
17ef446e
PA
2752013-07-03 Pedro Alves <palves@redhat.com>
276
277 * Makefile.in (config.status): Depend on development.sh.
278 * acinclude.m4: Include libmcheck.m4.
279 * configure: Regenerate.
280
7a9a7487
MG
2812013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
282
283 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
284 attribute inside the parentheses.
285 (winapi_DebugSetProcessKillOnExit): Ditto.
286 (winapi_DebugBreakProcess): Ditto.
287 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 288
49b64de6
MG
2892013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
290
291 * notif.h (notif_event): Add a dummy member to avoid compiler
292 errors.
293
d5749ee7
PA
2942013-07-01 Pedro Alves <palves@redhat.com>
295
296 * hostio.c (HOSTIO_PATH_MAX): Define.
297 (require_filename, handle_open, handle_unlink, handle_readlink):
298 Use it.
299
d8d2a3ee
PA
3002013-07-01 Pedro Alves <palves@redhat.com>
301
302 * server.h: Include "pathmax.h".
303 * linux-low.c: Don't include sys/param.h.
304 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
305 MAXPATHLEN.
306 * win32-low.c: Don't include sys/param.h.
307 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
308
bc7dea8d
PA
3092013-07-01 Pedro Alves <palves@redhat.com>
310
311 * event-loop.c: Don't check HAVE_UNISTD_H before including
312 <unistd.h>.
313 * gdbreplay.c: Likewise.
314 * remote-utils.c: Likewise.
315 * server.c: Likewise.
316 * configure.ac: Don't check for unistd.h.
317 * configure: Regenerate.
318
d6c2da54
TT
3192013-06-28 Tom Tromey <tromey@redhat.com>
320
321 * Makefile.in (version.c): Use version.in, not
322 common/version.in.
323
257b6bec
MG
3242013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
325
326 * configure.ac (version_host, version_target): Set and AC_SUBST them.
327 * configure: Rebuild.
328 * Makefile.in (version_host, version_target): Get from configure.
329 (version.c): Use $(version_host) and $(version_target).
330
86ebe149
DK
3312013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
332
333 Fix trace-status to output user name without trailing colon.
334 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
335
f30aa5af
DK
3362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
337
338 Fix trace-status to output proper start-time and stop-time.
339 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
340 output start time and stop time in hex as gdb expects.
341
28a93511
YQ
3422013-06-26 Pedro Alves <pedro@codesourcery.com>
343
344 * tracepoint.c (build_traceframe_info_xml): Output trace state
345 variables present in the trace buffer.
346
01208463
TT
3472013-06-24 Tom Tromey <tromey@redhat.com>
348
349 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
350 create-version.sh.
351 (version.o): Remove.
352 * gdbreplay.c: Include version.h.
353 (version, host_name): Don't declare.
354 * server.h: Include version.h.
355 (version, host_name): Don't declare.
356
760256f9
PA
3572013-06-12 Pedro Alves <palves@redhat.com>
358
359 * linux-x86-low.c (linux_is_elf64): Delete global.
360 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
361 with local linux_pid_exe_is_elf_64_file use.
362
030031ee
PA
3632013-06-11 Pedro Alves <palves@redhat.com>
364
365 * linux-low.c (regset_disabled, disable_regset): New functions.
366 (regsets_fetch_inferior_registers)
367 (regsets_store_inferior_registers): Use them.
368 (initialize_regsets_info); Don't allocate the disabled_regsets
369 array here.
370 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
371 comment.
372
5da6eb0a
PA
3732013-06-11 Pedro Alves <palves@redhat.com>
374
375 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
376 xmalloc.
377
7e5aaa09
PA
3782013-06-11 Pedro Alves <palves@redhat.com>
379
380 * linux-x86-low.c (initialize_low_arch): Call
381 init_registers_x32_avx_linux.
382
d878444c
JK
3832013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
384
385 Fix compatibility with Android Bionic.
386 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
387 it is not empty.
388
3aee8918
PA
3892013-06-07 Pedro Alves <palves@redhat.com>
390
5f2b57b5 391 PR server/14823
3aee8918
PA
392 * Makefile.in (OBS): Add tdesc.o.
393 (IPA_OBJS): Add tdesc-ipa.o.
394 (tdesc-ipa.o): New rule.
395 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
396 interface.
397 * linux-low.c (new_inferior): Delete.
398 (disabled_regsets, num_regsets): Delete.
399 (linux_add_process): Adjust to set the new per-process
400 new_inferior flag.
401 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
402 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
403 was a stop. When calling arch_setup, switch the current inferior
404 to the thread that got an event.
405 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
406 (regsets_fetch_inferior_registers)
407 (regsets_store_inferior_registers): New regsets_info parameter.
408 Adjust to use it.
409 (linux_register_in_regsets): New regs_info parameter. Adjust to
410 use it.
411 (register_addr, fetch_register, store_register): New usrregs_info
412 parameter. Adjust to use it.
413 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
414 parameter regs_info. Adjust to use it.
415 (linux_fetch_registers): Get the current inferior's regs_info, and
416 adjust to use it.
417 (linux_store_registers): Ditto.
418 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
419 (initialize_low): Don't initialize the target_regsets here. Call
420 initialize_low_arch.
421 * linux-low.h (target_regsets): Delete declaration.
422 (struct regsets_info): New.
423 (struct usrregs_info): New.
424 (struct regs_info): New.
425 (struct process_info_private) <new_inferior>: New field.
426 (struct linux_target_ops): Delete the num_regs, regmap, and
427 regset_bitmap fields. New field regs_info.
428 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
429 * i387-fp.c (num_xmm_registers): Delete.
430 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
431 calls to new interface.
432 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
433 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
434 Infer the number of xmm registers from the regcache's target
435 description.
436 * i387-fp.h (num_xmm_registers): Delete.
437 * inferiors.c (add_thread): Don't install the thread's regcache
438 here.
439 * proc-service.c (gregset_info): Fetch the current inferior's
440 regs_info. Adjust to use it.
441 * regcache.c: Include tdesc.h.
442 (register_bytes, reg_defs, num_registers)
443 (gdbserver_expedite_regs): Delete.
444 (get_thread_regcache): If the thread doesn't have a regcache yet,
445 create one, instead of aborting gdbserver.
446 (regcache_invalidate_one): Rename to ...
447 (regcache_invalidate_thread): ... this.
448 (regcache_invalidate_one): New.
449 (regcache_invalidate): Only invalidate registers of the current
450 process.
451 (init_register_cache): Add target_desc parameter, and use it.
452 (new_register_cache): Ditto. Assert the target description has a
453 non zero registers_size.
454 (regcache_cpy): Add assertions. Adjust.
455 (realloc_register_cache, set_register_cache): Delete.
456 (registers_to_string, registers_from_string): Adjust.
457 (find_register_by_name, find_regno, find_register_by_number)
458 (register_cache_size): Add target_desc parameter, and use it.
459 (free_register_cache_thread, free_register_cache_thread_one)
460 (regcache_release, register_cache_size): New.
461 (register_size): Add target_desc parameter, and use it.
462 (register_data, supply_register, supply_register_zeroed)
463 (supply_regblock, supply_register_by_name, collect_register)
464 (collect_register_as_string, collect_register_by_name): Adjust.
465 * regcache.h (struct target_desc): Forward declare.
466 (struct regcache) <tdesc>: New field.
467 (init_register_cache, new_register_cache): Add target_desc
468 parameter.
469 (regcache_invalidate_thread): Declare.
470 (regcache_invalidate_one): Delete declaration.
471 (regcache_release): Declare.
472 (find_register_by_number, register_cache_size, register_size)
473 (find_regno): Add target_desc parameter.
474 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
475 declarations.
476 * remote-utils.c: Include tdesc.h.
477 (outreg, prepare_resume_reply): Adjust.
478 * server.c: Include tdesc.h.
479 (gdbserver_xmltarget): Delete declaration.
480 (get_features_xml, process_serial_event): Adjust.
481 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
482 declare.
483 (struct process_info) <tdesc>: New field.
484 (ipa_tdesc): Declare.
485 * tdesc.c: New file.
486 * tdesc.h: New file.
487 * tracepoint.c: Include tdesc.h.
488 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
489 (get_context_regcache): Adjust to pass ipa_tdesc down.
490 (do_action_at_tracepoint): Adjust to get the register cache size
491 from the context regcache's description.
492 (traceframe_walk_blocks): Adjust to get the register cache size
493 from the current trace frame's description.
494 (traceframe_get_pc): Adjust to get current trace frame's
495 description and pass it down.
496 (gdb_collect): Adjust to get the register cache size from the
497 IPA's description.
498 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
499 (gdbserver_xmltarget): Delete.
500 (initialize_low_tracepoint): Set the ipa's target description.
501 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
502 (initialize_low_tracepoint): Set the ipa's target description.
503 * linux-x86-low.c: Include tdesc.h.
504 [__x86_64__] (is_64bit_tdesc): New.
505 (ps_get_thread_area, x86_get_thread_area): Use it.
506 (i386_cannot_store_register): Rename to ...
507 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
508 (i386_cannot_fetch_register): Rename to ...
509 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
510 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
511 to new interface.
512 (target_regsets): Rename to ...
513 (x86_regsets): ... this.
514 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
515 interface.
516 (x86_siginfo_fixup): Use is_64bit_tdesc.
517 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
518 (tdesc_x32_avx_linux, tdesc_x32_linux)
519 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
520 Declare.
521 (x86_linux_update_xmltarget): Delete.
522 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
523 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
524 (AMD64_LINUX_USER64_CS): New.
525 (x86_linux_read_description): New, based on
526 x86_linux_update_xmltarget.
527 (same_process_callback): New.
528 (x86_arch_setup_process_callback): New.
529 (x86_linux_update_xmltarget): New.
530 (x86_regsets_info): New.
531 (amd64_linux_regs_info): New.
532 (i386_linux_usrregs_info): New.
533 (i386_linux_regs_info): New.
534 (x86_linux_regs_info): New.
535 (x86_arch_setup): Reimplement.
536 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
537 (x86_emit_ops): Ditto.
538 (the_low_target): Adjust. Install x86_linux_regs_info,
539 x86_cannot_fetch_register, and x86_cannot_store_register.
540 (initialize_low_arch): New.
541 * linux-ia64-low.c (tdesc_ia64): Declare.
542 (ia64_fetch_register): Adjust.
543 (ia64_usrregs_info, regs_info): New globals.
544 (ia64_regs_info): New function.
545 (the_low_target): Adjust.
546 (initialize_low_arch): New function.
547 * linux-sparc-low.c (tdesc_sparc64): Declare.
548 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
549 Adjust.
550 (sparc_arch_setup): New function.
551 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
552 (the_low_target): Adjust.
553 (initialize_low_arch): New function.
554 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
555 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
556 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
557 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
558 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
559 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
560 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
561 (tdesc_powerpc_isa205_vsx64l): Declare.
562 (ppc_cannot_store_register, ppc_collect_ptrace_register)
563 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
564 (ppc_set_pc, ppc_get_hwcap): Adjust.
565 (ppc_usrregs_info): Forward declare.
566 (!__powerpc64__) ppc_regmap_adjusted: New global.
567 (ppc_arch_setup): Adjust to the current process'es target
568 description.
569 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
570 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
571 (ppc_store_evrregset): Adjust.
572 (target_regsets): Rename to ...
573 (ppc_regsets): ... this, and make static.
574 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
575 (ppc_regs_info): New function.
576 (the_low_target): Adjust.
577 (initialize_low_arch): New function.
578 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
579 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
580 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
581 (tdesc_s390x_linux64v2): Declare.
582 (s390_collect_ptrace_register, s390_supply_ptrace_register)
583 (s390_fill_gregset, s390_store_last_break): Adjust.
584 (target_regsets): Rename to ...
585 (s390_regsets): ... this, and make static.
586 (s390_get_pc, s390_set_pc): Adjust.
587 (s390_get_hwcap): New target_desc parameter, and use it.
588 [__s390x__] (have_hwcap_s390_high_gprs): New global.
589 (s390_arch_setup): Adjust to set the current process'es target
590 description. Don't adjust the regmap.
591 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
592 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
593 (regs_info_3264): New globals.
594 (s390_regs_info): New function.
595 (the_low_target): Adjust.
596 (initialize_low_arch): New function.
597 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
598 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
599 [__mips64] (init_registers_mips_linux)
600 (init_registers_mips_dsp_linux): Delete defines.
601 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
602 (have_dsp): New global.
603 (mips_read_description): New, based on mips_arch_setup.
604 (mips_arch_setup): Reimplement.
605 (get_usrregs_info): New function.
606 (mips_cannot_fetch_register, mips_cannot_store_register)
607 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
608 (mips_fill_fpregset, mips_store_fpregset): Adjust.
609 (target_regsets): Rename to ...
610 (mips_regsets): ... this, and make static.
611 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
612 (dsp_regs_info, regs_info): New globals.
613 (mips_regs_info): New function.
614 (the_low_target): Adjust.
615 (initialize_low_arch): New function.
616 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
617 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
618 Declare.
619 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
620 (arm_read_description): New, with bits factored from
621 arm_arch_setup.
622 (arm_arch_setup): Reimplement.
623 (target_regsets): Rename to ...
624 (arm_regsets): ... this, and make static.
625 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
626 (arm_regs_info): New function.
627 (the_low_target): Adjust.
628 (initialize_low_arch): New function.
629 * linux-m68k-low.c (tdesc_m68k): Declare.
630 (target_regsets): Rename to ...
631 (m68k_regsets): ... this, and make static.
632 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
633 (m68k_regs_info): New function.
634 (m68k_arch_setup): New function.
635 (the_low_target): Adjust.
636 (initialize_low_arch): New function.
637 * linux-sh-low.c (tdesc_sharch): Declare.
638 (target_regsets): Rename to ...
639 (sh_regsets): ... this, and make static.
640 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
641 (sh_regs_info, sh_arch_setup): New functions.
642 (the_low_target): Adjust.
643 (initialize_low_arch): New function.
644 * linux-bfin-low.c (tdesc_bfin): Declare.
645 (bfin_arch_setup): New function.
646 (bfin_usrregs_info, regs_info): New globals.
647 (bfin_regs_info): New function.
648 (the_low_target): Adjust.
649 (initialize_low_arch): New function.
650 * linux-cris-low.c (tdesc_cris): Declare.
651 (cris_arch_setup): New function.
652 (cris_usrregs_info, regs_info): New globals.
653 (cris_regs_info): New function.
654 (the_low_target): Adjust.
655 (initialize_low_arch): New function.
656 * linux-cris-low.c (tdesc_crisv32): Declare.
657 (cris_arch_setup): New function.
658 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
659 (cris_regs_info): New function.
660 (the_low_target): Adjust.
661 (initialize_low_arch): New function.
662 * linux-m32r-low.c (tdesc_m32r): Declare.
663 (m32r_arch_setup): New function.
664 (m32r_usrregs_info, regs_info): New globals.
665 (m32r_regs_info): Adjust.
666 (initialize_low_arch): New function.
667 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
668 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
669 (tic6x_usrregs_info): Forward declare.
670 (tic6x_read_description): New function, based on ...
671 (tic6x_arch_setup): ... this. Reimplement.
672 (target_regsets): Rename to ...
673 (tic6x_regsets): ... this, and make static.
674 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
675 (tic6x_regs_info): New function.
676 (the_low_target): Adjust.
677 (initialize_low_arch): New function.
678 * linux-xtensa-low.c (tdesc_xtensa): Declare.
679 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
680 (target_regsets): Rename to ...
681 (xtensa_regsets): ... this, and make static.
682 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
683 globals.
684 (xtensa_arch_setup, xtensa_regs_info): New functions.
685 (the_low_target): Adjust.
686 (initialize_low_arch): New function.
687 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
688 (nios2_arch_setup): Set the current process'es tdesc.
689 (target_regsets): Rename to ...
690 (nios2_regsets): ... this.
691 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
692 (nios2_regs_info): New function.
693 (the_low_target): Adjust.
694 (initialize_low_arch): New function.
a261b8f5
PA
695 * linux-aarch64-low.c (tdesc_aarch64): Declare.
696 (aarch64_arch_setup): Set the current process'es tdesc.
697 (target_regsets): Rename to ...
698 (aarch64_regsets): ... this.
699 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
700 (aarch64_regs_info): New function.
701 (the_low_target): Adjust.
702 (initialize_low_arch): New function.
3aee8918
PA
703 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
704 globals.
705 (target_regsets): Rename to ...
706 (tile_regsets): ... this.
707 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
708 (tile_regs_info): New function.
709 (tile_arch_setup): Set the current process'es tdesc.
710 (the_low_target): Adjust.
711 (initialize_low_arch): New function.
712 * spu-low.c (tdesc_spu): Declare.
713 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
714 * win32-arm-low.c (tdesc_arm): Declare.
715 (arm_arch_setup): New function.
716 (the_low_target): Install arm_arch_setup instead of
717 init_registers_arm.
718 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
719 (init_windows_x86): Rename to ...
720 (i386_arch_setup): ... this. Set `win32_tdesc'.
721 (the_low_target): Adjust.
722 * win32-low.c (win32_tdesc): New global.
723 (child_add_thread): Don't create the thread cache here.
724 (do_initial_child_stuff): Set the new process'es tdesc.
725 * win32-low.h (struct target_desc): Forward declare.
726 (win32_tdesc): Declare.
727 * lynx-i386-low.c (tdesc_i386): Declare global.
728 (lynx_i386_arch_setup): Set `lynx_tdesc'.
729 * lynx-low.c (lynx_tdesc): New global.
730 (lynx_add_process): Set the new process'es tdesc.
731 * lynx-low.h (struct target_desc): Forward declare.
732 (lynx_tdesc): Declare global.
733 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
734 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
735 * nto-low.c (nto_tdesc): New global.
736 (do_attach): Set the new process'es tdesc.
737 * nto-low.h (struct target_desc): Forward declare.
738 (nto_tdesc): Declare.
739 * nto-x86-low.c (tdesc_i386): Declare.
740 (nto_x86_arch_setup): Set `nto_tdesc'.
741
b1fbec62
GB
7422013-06-04 Gary Benson <gbenson@redhat.com>
743
744 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
745 to qSupported response when appropriate.
746 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
747 with nonzero-length annex.
748 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
749 arguments supplied in annex.
750
d1ec4ce7
DE
7512013-05-31 Doug Evans <dje@google.com>
752
ac44adcb 753 PR server/15594
d1ec4ce7
DE
754 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
755 64 bits in 64-cross-32 environment.
756
9b25f2d3
PA
7572013-05-28 Pedro Alves <palves@redhat.com>
758
759 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
760 (aarch64-without-fpu.c): Delete rule.
761 * configure.srv (aarch64*-*-linux*): Remove references to
762 aarch64-without-fpu.o and aarch64-without-fpu.xml.
763 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
764 declaration.
765
6740dc9c
PA
7662013-05-24 Pedro Alves <palves@redhat.com>
767
768 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
769 instead of strchr/decode_address. Error if the range isn't split
770 with a ','. Don't assume there's be a ':' in the action.
771
c2d6af84
PA
7722013-05-23 Yao Qi <yao@codesourcery.com>
773 Pedro Alves <palves@redhat.com>
774
775 * linux-low.c (lwp_in_step_range): New function.
776 (linux_wait_1): If the thread was range stepping and stopped
777 outside the stepping range, report the stop to GDB. Otherwise,
778 continue stepping. Add range stepping debug output.
779 (linux_set_resume_request): Copy the step range from the resume
780 request to the lwp.
781 (linux_supports_range_stepping): New.
782 (linux_target_ops) <supports_range_stepping>: Set to
783 linux_supports_range_stepping.
784 * linux-low.h (struct linux_target_ops)
785 <supports_range_stepping>: New field.
786 (struct lwp_info) <step_range_start, step_range_end>: New fields.
787 * linux-x86-low.c (x86_supports_range_stepping): New.
788 (the_low_target) <supports_range_stepping>: Set to
789 x86_supports_range_stepping.
790 * server.c (handle_v_cont): Handle 'r' action.
791 (handle_v_requests): Append ";r" if the target supports range
792 stepping.
793 * target.h (struct thread_resume) <step_range_start,
794 step_range_end>: New fields.
795 (struct target_ops) <supports_range_stepping>:
796 New field.
797 (target_supports_range_stepping): New macro.
798
58794e1a
JB
7992013-05-17 Joel Brobecker <brobecker@adacore.com>
800
801 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
802 confusion in comment.
803
d631c5a7
JB
8042013-05-17 Joel Brobecker <brobecker@adacore.com>
805
806 * lynx-low.c (struct process_info_private): New type.
807 (lynx_add_process): New function.
808 (lynx_create_inferior, lynx_attach): Replace calls to
809 add_process by calls to lynx_add_process.
810 (lynx_resume): If PTID is null, then try using
811 current_process()->private->last_wait_event_ptid.
812 Add comments.
813 (lynx_clear_inferiors): Delete. The contents of that function
814 has been inlined in lynx_mourn;
815 (lynx_wait_1): Save the ptid in the process's private data.
816 (lynx_mourn): Free the process' private data. Replace call
817 to lynx_clear_inferiors by call to clear_inferiors.
818
96f7a20f
YQ
8192013-05-17 Yao Qi <yao@codesourcery.com>
820
821 * i386-low.c (i386_length_and_rw_bits): Move the comment to
822 the right place.
823
db0dfaa0
LM
8242013-05-16 Luis Machado <lgustavo@codesourcery.com>
825
826 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
827 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
828 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
829 PT_TEXT_END_ADDR guards. Update comments.
830 (linux_target_op) <read_offsets>: Conditionally define to
831 linux_read_offsets if the target is UCLIBC and if it defines
832 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
833
68f5f838
SL
8342013-05-06 Sandra Loosemore <sandra@codesourcery.com>
835 Andrew Jenner <andrew@codesourcery.com>
836
837 * Makefile.in (SFILES): Add linux-nios2-low.c.
838 (clean): Add action to delete nios2-linux.c.
839 (nios2-linux.c): New rule.
840 * configure.srv: Add nios2*-*-linux*.
841 * linux-nios2-low.c: New.
842
1ebff1fd
HAQ
8432013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
844
845 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
846
f6150862
HZ
8472013-04-25 Hui Zhu <hui@codesourcery.com>
848
849 PR gdb/15186
f6150862
HZ
850 * ax.c (ax_printf): Add fflush.
851
614c279d
TT
8522013-04-22 Tom Tromey <tromey@redhat.com>
853
854 * Makefile.in (SFILES): Add filestuff.c.
855 (OBS): Add filestuff.o.
856 (filestuff.o): New target.
857 * config.in, configure: Rebuild.
858 * configure.ac: Check for fdwalk, pipe2.
859
7d4e5717
PA
8602013-04-17 Pedro Alves <palves@redhat.com>
861
862 * configure.ac (USE_THREAD_DB): Delete variable.
863 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
864 Don't AC_SUBST USE_THREAD_DB.
865 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
866 * config.in, configure: Regenerate.
867
d5c93e41
PA
8682013-04-16 Pedro Alves <palves@redhat.com>
869
870 * linux-low.h (struct lwp_info) <thread_known>: Move under
871 the USE_THREAD_DB #ifdef.
872
04f5fe89
PA
8732013-04-16 Pedro Alves <palves@redhat.com>
874
875 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
876 (linux-low.o): Delete rule.
877 * linux-low.h: Always include "gdb_thread_db.h" instead of
878 conditionally including thread_db.h.
879 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
880 HAVE_THREAD_DB_H.
881
480b27bf
JK
8822013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
883
884 * Makefile.in (install-only): Fix make install regression.
885
43662968
JK
8862013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
887
888 Convert man pages to texinfo, new gdbinit.5 texinfo page.
889 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
890 installation.
891 * gdbserver.1: Remove.
892
3e74e146
PA
8932013-03-22 Pedro Alves <palves@redhat.com>
894
895 * linux-low.c (handle_extended_wait): Don't call
896 linux_enable_event_reporting.
897
a8347a2a
TT
8982013-03-15 Tony Theodore <tonyt@logyst.com>
899
900 PR build/9098:
901 * Makefile.in (SHELL): Use @SHELL@.
902
eeb56fa7
SDJ
9032013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
904
905 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
906 compiler warning.
907
4fa7e2ff
JB
9082013-03-13 Joel Brobecker <brobecker@adacore.com>
909
910 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
911 Remove extraneous NULL element.
912
8ddb1965
YQ
9132013-03-13 Yao Qi <yao@codesourcery.com>
914
915 * tracepoint.c (traceframe_read_tsv): Look for the last matched
916 'V' block in trace frame.
917
9accd112
MM
9182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
919
920 * target.h (struct target_ops): Add btrace ops.
921 (target_supports_btrace): New macro.
922 (target_enable_btrace): New macro.
923 (target_disable_btrace): New macro.
924 (target_read_btrace): New macro.
925 * gdbthread.h (struct thread_info): Add btrace field.
926 * server.c: Include btrace-common.h.
927 (handle_btrace_general_set): New function.
928 (handle_btrace_enable): New function.
929 (handle_btrace_disable): New function.
930 (handle_general_set): Call handle_btrace_general_set.
931 (handle_qxfer_btrace): New function.
932 (struct qxfer qxfer_packets[]): Add btrace entry.
933 * inferiors.c (remove_thread): Disable btrace.
934 * linux-low: Include linux-btrace.h.
935 (linux_low_enable_btrace): New function.
936 (linux_low_read_btrace): New function.
937 (linux_target_ops): Add btrace ops.
938 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
939 Add srv_linux_btrace=yes.
940 (x86_64-*-linux*): Add linux-btrace.o.
941 Add srv_linux_btrace=yes.
942 * configure.ac: Define HAVE_LINUX_BTRACE.
943 * config.in: Regenerated.
944 * configure: Regenerated.
945
5cc22e4c
MM
9462013-03-11 Markus Metzger <markus.t.metzger@intel.com>
947
948 * server.c (handle_qxfer): Preserve error message if -3 is
949 returned.
950 (qxfer): Document the -3 return value.
951
7c97f91e
MM
9522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
953
954 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
955 (linux_btrace_h): New variable.
956 (linux-btrace.o): New rule.
957
be9a119c 9582013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
959 Hafiz Abid Qadeer <abidh@codesourcery.com>
960
961 * tracepoint.c (trace_buffer_size): New global.
962 (DEFAULT_TRACE_BUFFER_SIZE): New define.
963 (init_trace_buffer): Change to one-argument function. Allocate
964 trace buffer memory.
965 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
966 handle QTBuffer:size packet.
967 (cmd_bigqtbuffer_size): New function.
968 (initialize_tracepoint): Call init_trace_buffer with
969 DEFAULT_TRACE_BUFFER_SIZE.
970 * server.c (handle_query): Add QTBuffer:size in the
971 supported packets.
972
e64f7499
YQ
9732013-03-07 Yao Qi <yao@codesourcery.com>
974
975 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
976 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
977 of -1.
978 (cmd_qtsp): Adjust condition. Do post increment.
979 Set cur_action and cur_step_action back to 0.
980
f0ae6fc3
PA
9812013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
982
983 PR server/15236
984 * linux-low.c (linux_write_memory): Return early success if LEN is
985 zero.
986
b5b0b0af
CV
9872013-03-05 Corinna Vinschen <vinschen@redhat.de>
988
334ad4a8 989 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 990
589bc927
TT
9912013-02-28 Tom Tromey <tromey@redhat.com>
992
993 * configure.ac: Invoke AC_SYS_LARGEFILE.
994 * configure, config.in: Rebuild.
995
dfe07582
CV
9962013-02-28 Corinna Vinschen <vinschen@redhat.com>
997
998 * win32-low.c: Throughout, fix format strings and casts of
999 printf-like functions to avoid type related warnings on all
1000 platforms.
1001 (get_child_debug_event): Print dwDebugEventCode as hex since
1002 that's how it's usually documented.
1003
736cd585
YQ
10042013-02-28 Yao Qi <yao@codesourcery.com>
1005
1006 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1007 pulongest.
1008
e1f58301
JW
10092013-02-27 Jiong Wang <jiwang@tilera.com>
1010
1011 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1012 (reg-tilegx32.c): New rule.
1013 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1014 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1015 different register info initializer according to elf class.
1016 (init_registers_tilgx32): New function. The tilegx32 register info
1017 initializer.
1018 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1019 (tile_store_gregset): Likewise.
1020
d171ca78
YQ
10212013-02-27 Yao Qi <yao@codesourcery.com>
1022
1023 * server.c (process_point_options): Print debug message when
1024 debug_threads is true.
1025
282bbdf3
YQ
10262013-02-26 Yao Qi <yao@codesourcery.com>
1027
1028 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1029
aca22551
PA
10302013-02-19 Pedro Alves <palves@redhat.com>
1031 Kai Tietz <ktietz@redhat.com>
1032
1033 PR gdb/15161
1034
1035 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1036 instead of strtoul to extract address from packet.
1037 (process_serial_event) <'z'>: Likewise.
1038
4f3cee1c
YQ
10392013-02-18 Yao Qi <yao@codesourcery.com>
1040
1041 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1042
8e1d55a3
PA
10432013-02-14 Pedro Alves <palves@redhat.com>
1044
1045 Plug memory leak.
1046
1047 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1048 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1049
458820da
PA
10502013-02-14 Pedro Alves <palves@redhat.com>
1051
1052 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1053
baea0dae
PA
10542013-02-14 Pedro Alves <palves@redhat.com>
1055
1056 * tracepoint.c (save_string): Delete.
1057 (add_tracepoint_action): Use savestring instead of save_string.
1058
0b1afbb3
PA
10592013-02-12 Pedro Alves <palves@redhat.com>
1060
1061 * linux-xtensa-low.c: Ditto.
1062 * xtensa-xtregs.c: Ditto.
1063
8a4ac37e
PA
10642013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1065
1066 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1067 thread_db.
1068
148de6bb
MS
10692013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1070
1071 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1072 aarch64_num_wp_regs and aarch64_num_bp_regs to
1073 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1074
55fac6e0
MS
10752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1076
1077 * linux-aarch64-low.c (ps_get_thread_area): Replace
1078 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1079
176eb98c
MS
10802013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1081 Marcus Shawcroft <marcus.shawcroft@arm.com>
1082 Nigel Stephens <nigel.stephens@arm.com>
1083 Yufeng Zhang <yufeng.zhang@arm.com>
1084
1085 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1086 (aarch64.c, aarch64-without-fpu.c): New targets.
1087 * configure.srv (aarch64*-*-linux*): New.
1088 * linux-aarch64-low.c: New file.
1089
56f7af9c
MS
10902013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1091
43aaf8b6 1092 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
1093 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1094 (dequeue_one_deferred_signal, linux_resume_one_thread)
1095 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1096 (linux_tracefork_grandchild, linux_test_for_tracefork)
1097 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1098 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1099 where the argument is 0.
1100
60f662b0
YQ
11012013-01-25 Yao Qi <yao@codesourcery.com>
1102
1103 * event-loop.c: Include "queue.h".
1104 (gdb_event_p): New typedef.
1105 (struct gdb_event) <next_event>: Remove.
1106 (event_queue): Change to QUEUE(gdb_event_p).
1107 (async_queue_event): Remove.
1108 (gdb_event_xfree): New.
1109 (initialize_event_loop): New.
1110 (process_event): Use API from QUEUE.
1111 (wait_for_event): Likewise.
1112 * server.c (main): Call initialize_event_loop.
1113 * server.h (initialize_event_loop): Declare.
1114
5ae4861a
YQ
11152013-01-18 Yao Qi <yao@codesourcery.com>
1116
1117 * ax.h (struct eval_agent_expr_context): New.
1118 (gdb_eval_agent_expr): Update declaration.
1119 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1120 TFRAME. Add new argument CTX.
1121 * server.h (struct eval_agent_expr_context): Declare.
1122 (agent_mem_read, agent_tsv_read): Update declaration.
1123 (agent_mem_read_string): Likewise.
1124 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1125 (add_traceframe_block): Add new argument TPOINT.
1126 Increase TPOINT->traceframe_usage.
1127 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1128 eval_tracepoint_agent_expr.
1129 (condition_true_at_tracepoint): Likewise.
1130 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1131 (agent_mem_read_string, agent_tsv_read): Likewise.
1132
85e00e85
YQ
11332013-01-16 Yao Qi <yao@codesourcery.com>
1134
1135 * linux-low.c (linux_resume_one_lwp): Don't check
1136 'lwp->bp_reinsert != 0'.
1137
4039cf45
JB
11382013-01-07 Joel Brobecker <brobecker@adacore.com>
1139 Pedro Alves <palves@redhat.com>
1140
1141 * lynx-low.c (ptrace_request_to_str): Define a temporary
1142 macro and use it to simplify this function's implementation.
1143
9044dee2
JB
11442013-01-07 Joel Brobecker <brobecker@adacore.com>
1145
1146 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1147 sets errno.
1148
e6352c8f
JB
11492013-01-07 Joel Brobecker <brobecker@adacore.com>
1150
1151 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1152
50681a27
JB
11532013-01-07 Joel Brobecker <brobecker@adacore.com>
1154
1155 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1156
3f6e77ef
JB
11572013-01-07 Joel Brobecker <brobecker@adacore.com>
1158
1159 * lynx-low.c (lynx_resume): Use the resume_info parameter
1160 to determine the ptid for the lynx_ptrace call, unless
1161 it is equal to minus_one_ptid, in which case we use the
1162 ptid of the current_inferior.
1163 (lynx_wait_1): After having received a thread create/exit
1164 event, resume the inferior's execution using the signaling
1165 thread's ptid, rather than the old ptid.
1166
7fda33ae
JB
11672013-01-07 Joel Brobecker <brobecker@adacore.com>
1168
1169 * lynx-low.c (lynx_resume): Delete variable ret.
1170
b9786c74
JB
11712013-01-01 Joel Brobecker <brobecker@adacore.com>
1172
1173 * gdbreplay.c (gdbreplay_version): Update copyright year.
1174 * server.c (gdbserver_version): Likewise.
1175
8b93d60f
JB
11762012-12-17 Joel Brobecker <brobecker@adacore.com>
1177
1178 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1179 new thread.
1180
037335a7
JB
11812012-12-17 Joel Brobecker <brobecker@adacore.com>
1182
1183 * lynx-low.c (ptrace_request_to_str): Add handling for
1184 PTRACE_GETTRACESIG.
1185
52d4cbd8
JB
11862012-12-17 Joel Brobecker <brobecker@adacore.com>
1187
1188 * lynx-low.c (lynx_attach): Delete variable new_process.
1189
ab8f6ca9
JB
11902012-12-17 Joel Brobecker <brobecker@adacore.com>
1191
1192 * lynx-low.c (lynx_create_inferior): Delete variable
1193 new_process.
1194
78cbc024
JB
11952012-12-17 Joel Brobecker <brobecker@adacore.com>
1196
1197 * lynx-low.c (ptrace_request_to_str): Do not handle
1198 PTRACE_GETTHREADLIST if this macro does not exist.
1199
14a00470
YQ
12002012-12-15 Yao Qi <yao@codesourcery.com>
1201
1202 * Makefile.in (OBS): Add notif.o.
1203 * notif.c, notif.h: New.
1204 * server.c: Include "notif.h".
1205 (struct vstop_notif) <next>: Remove.
1206 <base>: New field.
1207 (queue_stop_reply): Update.
1208 (push_event, send_next_stop_reply): Remove.
1209 (discard_queued_stop_replies): Update.
1210 (notif_stop): New variable.
1211 (handle_v_stopped): Remove.
1212 (handle_v_requests): Don't call handle_v_stopped. Call
1213 handle_ack_notif instead.
1214 (queue_stop_reply_callback): Call notif_event_enque instead
1215 of queue_stop_reply.
1216 (handle_status): Don't call send_next_stop_reply, call
1217 notif_write_event instead.
1218 (kill_inferior_callback): Likewise.
1219 (detach_or_kill_inferior_callback): Likewise.
1220 (main): Call initialize_notif.
1221 (process_serial_event): Call QUEUE_is_empty.
1222 (handle_target_event): Call notif_push instead of push event.
1223 * server.h (push_event): Remove declaration.
1224
61c125b9
TT
12252012-12-10 Tom Tromey <tromey@redhat.com>
1226
1227 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1228 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1229 macros.
1230 (.c.o): Rewrite.
1231 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1232 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1233 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1234 (amd64-linux-ipa.o, ax.o): Rewrite.
1235 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1236 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1237 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1238 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1239 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1240 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1241 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1242 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1243 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1244 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1245 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1246 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1247 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1248 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1249 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1250 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1251 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1252 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1253 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1254 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1255 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1256 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1257 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1258 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1259 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1260 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1261 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1262 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1263 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1264 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1265 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1266 (reg-tilegx.o): Remove.
1267 (all_object_files): New macro.
1268 Include .deps files.
1269 * aclocal.m4, configure: Rebuild.
1270 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1271 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1272 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1273
e90e9ad9
TT
12742012-12-05 Tom Tromey <tromey@redhat.com>
1275
1276 PR gdb/14917:
1277 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1278
02d403bf 12792012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
1280
1281 * configure.ac: Check for linux/perf_event.h.
1282 * config.in: Regenerated.
1283 * configure: Regenerated.
1284
0270a750
PA
12852012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1286
1287 * hostio.c (handle_readlink): Decrease buffer size
1288 parameter passed to readlink by one byte.
1289
8c29b58e
YQ
12902012-11-26 Yao Qi <yao@codesourcery.com>
1291
1292 * configure.ac (build_warnings): Append '-Wempty-body'.
1293 * configure: Regenerated.
1294 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1295 body.
1296
8bdce1ff
PM
12972012-11-15 Pierre Muller <muller@sourceware.org>
1298
1299 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1300 * config.in: Regenerate.
1301 * configure: Regenerate.
1302 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1303 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1304 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1305 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1306 header.
1307 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1308 instead of <sys/wait.h> header.
1309 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1310
02d403bf 13112012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
1312
1313 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1314 (various make rules): Remove -DGDBSERVER
1315
fbd5db48
YQ
13162012-11-09 Yao Qi <yao@codesourcery.com>
1317
1318 * spu-low.c (current_ptid): Move it to ..
1319 * gdbthread.h: ... here. New.
1320 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1321 * server.c (myresume, process_serial_event): Likewise.
1322 * thread-db.c (thread_db_find_new_threads): Likewise.
1323 * tracepoint.c (run_inferior_command): Likewise.
1324
b3dc46ff
AB
13252012-10-01 Andrew Burgess <aburgess@broadcom.com>
1326
1327 * server.c (handle_search_memory_1): Include access length in
1328 warning message.
1329
07c04788
HPN
13302012-09-05 Michael Brandt <michael.brandt@axis.com>
1331
1332 * linux-crisv32-low.c: Fix compile errors.
1333
918d227b
YQ
13342012-09-04 Yao Qi <yao@codesourcery.com>
1335
1336 * tracepoint.c (cmd_qtsv): Adjust debug message.
1337 Don't check CUR_TPOINT.
1338
18c1b81a
YQ
13392012-08-28 Yao Qi <yao@codesourcery.com>
1340
1341 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1342 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1343 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1344 Remove declarations of xmalloc, xreallloc, xstrdup and
1345 freeargv.
1346 * Makefile.in (libiberty_h): New.
1347 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1348 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1349
dc82f37b
YQ
13502012-08-23 Yao Qi <yao@codesourcery.com>
1351
1352 * server.h: Remove declaration of 'xsnprintf'.
1353
406b1477
KS
13542012-08-22 Keith Seitz <keiths@redhat.com>
1355
1356 * server.h: Include build-gnulib-gbserver/config.h.
1357 * gdbreplay.c: Likewise.
1358
e6712ff1
DE
13592012-08-08 Doug Evans <dje@google.com>
1360
1361 * Makefile.in (SFILES): Add gdb_vecs.c.
1362 (OBS): Add gdb_vecs.o.
1363 (gdb_vecs_h, host_defs_h): New variables.
1364 (thread-db.o): Add $(gdb_vecs_h) dependency.
1365 (gdb_vecs.o): New rule.
1366 * thread-db.c: #include "gdb_vecs.h".
1367 (thread_db_load_search): Use a vector to iterate over path elements.
1368 Handle text appearing after "$pdir".
1369
1370 * configure.ac: Add check for strstr.
1371 * config.in: Regenerate.
1372 * configure: Regenerate.
1373
7c3270ae
UW
13742012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1375
1376 * hostio.c (handle_pread): If pread fails, fall back to attempting
1377 lseek/read.
1378 (handle_pwrite): Likewise for pwrite.
1379
b62e2b27
UW
13802012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1381
1382 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1383 between unsupported TYPE and unimplementable ADDR/LEN combination.
1384 (arm_insert_point): Act on new return value.
1385
78a99e91
PA
13862012-07-31 Pedro Alves <palves@redhat.com>
1387
1388 * server.c (process_point_options): Only skip tokens if we find
1389 one that is unrecognized. Don't treat 'X' specially while
1390 skipping unrecognized tokens.
1391
fcf303ab
UW
13922012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1393
1394 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1395 to 4-byte-align HW breakpoint addresses for Thumb.
1396
7255706c
YQ
13972012-07-27 Yao Qi <yao@codesourcery.com>
1398
1399 PR remote/14161.
1400
1401 * server.h: Declare gdb_agent_about_to_close.
1402 * target.c (kill_inferior): Include "agent.h".
1403 New. Send command 'kill'.
1404 * target.h (kill_inferior): Removed macro.
1405 * tracepoint.c (gdb_agent_about_to_close): New.
1406 (gdb_agent_helper_thread): Handle command 'close'.
1407 Wait endlessly until the inferior stops.
1408 Install gdb_agent_remove_socket to atexit hook.
1409 (agent_socket_name): New static variable.
1410 (gdb_agent_socket_init): Replace local variable 'name' with
1411 'agent_socket_name'.
1412 (gdb_agent_remove_socket): New.
1413
5a3f286f
YQ
14142012-07-27 Yao Qi <yao@codesourcery.com>
1415
1416 * server.c (process_point_options): Stop at 'X' when parsing.
1417
961bd387
ME
14182012-07-19 Michael Eager <eager@eagercon.com>
1419
a261b8f5 1420 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
1421 to hw_execute.
1422 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1423 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1424 hardware breakpoint.
1425
aa7c7447
JK
14262012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1427
1428 * gdbserver/linux-low.c (initialize_low): Call
1429 linux_ptrace_init_warnings.
1430
7f216e7c
DE
14312012-07-02 Doug Evans <dje@google.com>
1432
1433 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1434 pointer to int.
1435
d3ce09f5
SS
14362012-07-02 Stan Shebs <stan@codesourcery.com>
1437
1438 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1439 (ax.o): Add it to build rule.
1440 (ax-ipa.o): Ditto.
1441 (OBS): Add format.o.
1442 (IPA_OBS): Add format.o.
1443 * server.c (handle_query): Claim support for breakpoint commands.
1444 (process_point_options): Add command case.
1445 (process_serial_event): Leave running if there are printfs in
1446 effect.
1447 * mem-break.h (any_persistent_commands): Declare.
1448 (add_breakpoint_commands): Declare.
1449 (gdb_no_commands_at_breakpoint): Declare.
1450 (run_breakpoint_commands): Declare.
1451 * mem-break.c (struct point_command_list): New struct.
1452 (struct breakpoint): New field command_list.
1453 (any_persistent_commands): New function.
1454 (add_commands_to_breakpoint): New function.
1455 (add_breakpoint_commands): New function.
1456 (gdb_no_commands_at_breakpoint): New function.
1457 (run_breakpoint_commands): New function.
1458 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1459 locally.
1460 * ax.c: Include format.h.
1461 (ax_printf): New function.
1462 (gdb_eval_agent_expr): Add printf opcode.
1463
2f8f6aed
YQ
14642012-06-13 Yao Qi <yao@codesourcery.com>
1465
1466 * server.c (start_inferior): Remove duplicated writes to fields
1467 'last_resume_kind' and 'last_status' of 'current_inferior'.
1468
0c9070b3
YQ
14692012-06-12 Yao Qi <yao@codesourcery.com>
1470 Pedro Alves <palves@redhat.com>
1471
1472 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1473 comment.
1474 * server.c (handle_v_cont): Extend comment.
1475
c52daf70
YQ
14762012-06-11 Yao Qi <yao@codesourcery.com>
1477
1478 * linux-low.c (linux_attach): Add 'static'.
1479
d38bbb0a
YQ
14802012-06-06 Yao Qi <yao@codesourcery.com>
1481
1482 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1483
89dc0afd
JK
14842012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1485
1486 Fix gcc -flto compilation warning.
1487 * server.c (main): Make variable multi_mode and attach volatile.
1488
75f62ce7
TJB
14892012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1490
1491 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1492 if the platform doesn't know about it.
1493
65f479b6
PA
14942012-05-30 Jeff Kenton <jkenton@tilera.com>
1495
1496 * Makefile.in (SFILES): Add linux-tile-low.c.
1497 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1498 * configure.srv: Handle tilegx-*-linux*.
1499 * linux-tile-low.c: New file.
1500
0c5bf5a9
JK
15012012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1502
1503 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1504
a493e3e2
PA
15052012-05-24 Pedro Alves <palves@redhat.com>
1506
1507 PR gdb/7205
1508
43aaf8b6 1509 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 1510
2ea28649
PA
15112012-05-24 Pedro Alves <palves@redhat.com>
1512
1513 PR gdb/7205
1514
1515 Replace target_signal with gdb_signal throughout.
1516
8d409d16
MR
15172012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1518
1519 * linux-low.c (linux_store_registers): Avoid the copying sequence
1520 when no data has been retrieved by ptrace.
1521
23512c01
MGD
15222012-05-22 Will Deacon <will.deacon@arm.com>
1523
1524 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1525 Include asm/ptrace.h.
1526 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1527 already defined.
1528
4934b29e
MR
15292012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1530
1531 * linux-low.c (linux_store_registers): Don't re-retrieve data
1532 with ptrace that has already been obtained from /proc. Always
1533 copy any data retrieved with ptrace to the buffer supplied.
1534
bde24c0a
PA
15352012-05-11 Yao Qi <yao@codesourcery.com>
1536 Pedro Alves <palves@redhat.com>
1537
1538 * linux-low.c (enum stopping_threads_kind): New.
1539 (stopping_threads): Change type to `enum stopping_threads_kind'.
1540 (handle_extended_wait): If stopping and suspending threads, leave
1541 the new_lwp suspended too.
1542 (linux_wait_for_event): Adjust.
1543 (stop_all_lwps): Set `stopping_threads' to
1544 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1545 whether we're suspending threads or just stopping them. Assert no
1546 recursion happens.
1547
623b6bdf
YQ
15482012-04-29 Yao Qi <yao@codesourcery.com>
1549
1550 * server.h: Move some code to ...
1551 * gdbthread.h: ... here. New.
1552 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1553 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1554 (nto-low.o, win32-low.o): Likewise.
1555 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1556 * regcache.c, remote-utils.c, server.c: Likewise.
1557 * target.c, tracepoint.c, win32-low.c: Likewise.
1558
f15f9948
TJB
15592012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1560
1561 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1562 (PTRACE_ARG4_TYPE): Likewise.
1563 (PTRACE_XFER_TYPE): Likewise.
1564 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1565 ptrace to PTRACE_ARG3_TYPE.
1566 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1567 (PTRACE_ARG4_TYPE): Likewise.
1568 (PTRACE_XFER_TYPE): Likewise.
1569 (linux_detach_one_lwp): Cast fourth argument of
1570 ptrace to long then PTRACE_ARG4_TYPE.
1571 (regsets_fetch_inferior_registers): Cast third argument of
1572 ptrace to long then PTRACE_ARG3_TYPE.
1573 (regsets_store_inferior_registers): Likewise.
1574
38ea300a
PA
15752012-04-20 Pedro Alves <palves@redhat.com>
1576
1577 * configure: Regenerate.
1578
c971b7fa
PA
15792012-04-19 Pedro Alves <palves@redhat.com>
1580
43aaf8b6 1581 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 1582 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
1583 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1584 (all, install-only, uninstall, clean-info, all-lib, clean): No
1585 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1586 (maintainer-clean realclean distclean): Use subdir_do.
1587 (subdir_do): New.
1588 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 1589 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
1590 * acinclude.m4: Include acx_configure_dir.m4.
1591 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1592 calls. Call AC_PROG_RANLIB. Configure gnulib using
1593 ACX_CONFIGURE_DIR.
1594 (GNULIB): New.
1595 (GNULIB_STDINT_H): Adjust.
1596 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1597 * gdbreplay.c: Include build-gnulib/config.h.
1598 * server.h: Likewise.
1599 * aclocal.m4: Regenerate.
1600 * config.in: Regenerate.
1601 * configure: Regenerate.
c971b7fa 1602
809277f8
PA
16032012-04-19 Pedro Alves <palves@redhat.com>
1604
1605 * Makefile.in (LIBGNU, INCGNU): Adjust.
1606 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1607 (all, install-only, uninstall, clean-info, all-lib, clean)
1608 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1609 * configure.ac: Adjust AC_OUTPUT output.
1610 * aclocal.m4: Regenerate.
1611 * configure: Regenerate.
1612
fd9bb8b8
PA
16132012-04-19 Pedro Alves <palves@redhat.com>
1614
1615 * Makefile.in (generated_files): New.
1616 (server_h): Remove the explicit dependency on config.h, and depend
1617 on $generated_files.
1618
1c298c66
PA
16192012-04-19 Pedro Alves <palves@redhat.com>
1620
1621 * Makefile.in (INCGNU): Add -Ignulib.
1622
57c4b50b
PA
16232012-04-19 Pedro Alves <palves@redhat.com>
1624
1625 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1626 (INCGNU): ... this, and spell out -I here.
1627 (GNULIB_LIB): Rename to ...
1628 (LIBGNU): ... this.
1629 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1630
1030e047
PA
16312012-04-19 Pedro Alves <palves@redhat.com>
1632
1633 * config.in: Regenerate.
1634
447d4319
PA
16352012-04-19 Pedro Alves <palves@redhat.com>
1636
1637 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1638 * server.h (memmem): Remove declaration.
1639 * config.in: Regenerate.
1640 * configure: Regenerate.
1641
aad9eab9
YQ
16422012-04-19 Yao Qi <yao@codesourcery.com>
1643
1644 * Makefile.in (SFILES): Add common/vec.c.
1645 (OBS): Add vec.o.
1646 (vec.o): New rule.
1647
3e10640f
YQ
16482012-04-19 Yao Qi <yao@codesourcery.com>
1649
1650 * remote-utils.c (prepare_resume_reply): Replace with macro
1651 target_core_of_thread.
1652 * server.c (handle_qxfer_threads_proper): Likewise.
1653 * target.h (traget_core_of_thread): New macro.
1654
71622373
PA
16552012-04-18 Pedro Alves <palves@redhat.com>
1656
1657 * aclocal.m4: Regenerate.
1658 * configure: Regenerate.
1659
80d26939
YQ
16602012-04-16 Yao Qi <yao@codesourcery.com>
1661
1662 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1663 duplicated on address.
1664
42476b70
YQ
16652012-04-16 Yao Qi <yao@codesourcery.com>
1666
1667 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1668 (struct tracepoint_action_ops) <send>: New field.
1669 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1670 (agent_expr_send, x_tracepoint_action_send): New.
1671 (l_tracepoint_action_send): New.
1672 (cmd_qtdp): Download and install tracepoint
1673 according to `use_agent'.
1674 (run_inferior_command): Add one more parameter `len'.
1675 Update callers.
1676 (tracepoint_send_agent): New.
1677 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1678
7bc83639
YQ
16792012-04-16 Yao Qi <yao@codesourcery.com>
1680
1681 * tracepoint.c (download_tracepoints): Moved to ...
1682 (cmd_qtstart): ... here.
1683
5f18041e
YQ
16842012-04-14 Yao Qi <yao@codesourcery.com>
1685
1686 * tracepoint.c: Include inttypes.h.
1687 (struct collect_memory_action): Use sized types.
1688 (struct tracepoint): Likewise.
1689 (cmd_qtdp, stop_tracing): Update print specifiers.
1690 (cmd_qtp, response_tracepoint): Likewise.
1691 (collect_data_at_tracepoint): Likewise.
1692 (collect_data_at_step): Likewise.
1693
55a8c076
YQ
16942012-04-14 Yao Qi <yao@codesourcery.com>
1695
1696 Import gnulib module inttypes.
1697 * aclocal.m4, config.in, configure: Regenerated.
1698
dc750257
YQ
16992012-04-14 Yao Qi <yao@codesourcery.com>
1700
1701 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1702 Makefile and config.status at last.
1703
0ab5faf9
YQ
17042012-04-13 Yao Qi <yao@codesourcery.com>
1705
1706 * tracepoint.c: Include stdint.h unconditionally.
1707
18f5fd81
TJB
17082012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1709
1710 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1711 on BFD_HAVE_SYS_PROCFS_TYPE.
1712 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1713 * configure: Regenerate.
1714 * config.in: Likewise.
1715
4d47af5c
L
17162012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1717
1718 * Makefile.in (clean): Also remove x32.c x32-linux.c
1719 x32-avx.c x32-avx-linux.c.
1720 (x32.o): New target.
1721 (x32.c): Likewise.
1722 (x32-linux.o): Likewise.
1723 (x32-linux.c): Likewise.
1724 (x32-avx.o): Likewise.
1725 (x32-avx.c): Likewise.
1726 (x32-avx-linux.o): Likewise.
1727 (x32-avx-linux.c): Likewise.
1728
1729 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1730 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1731 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1732 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1733 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1734 i386/x32-avx-linux.xml.
1735
1736 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1737 (init_registers_x32_avx_linux): Likwise.
1738 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1739 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1740
ecedbe58
PA
17412012-04-13 Pedro Alves <palves@redhat.com>
1742
1743 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1744 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1745 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1746 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1747 the sub-make.
1748
c92b5177
L
17492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1750
1751 * linux-x86-low.c (compat_x32_clock_t): New.
1752 (compat_x32_siginfo_t): Likewise.
1753 (compat_x32_siginfo_from_siginfo): Likewise.
1754 (siginfo_from_compat_x32_siginfo): Likewise.
1755 (linux_is_elf64): Likewise.
1756 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1757 and siginfo_from_compat_x32_siginfo for x32.
1758 (x86_arch_setup): Set linux_is_elf64.
1759
214d508e
L
17602012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1761
1762 PR gdb/13969
1763 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1764 e_machine field.
1765 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1766 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1767 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1768 compatible with process.
1769
c9a1864a
YQ
17702012-04-12 Yao Qi <yao@codesourcery.com>
1771
1772 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1773 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1774 (install-only, install-info, clean): Handle sub dir gnulib.
1775 (all-lib, am--refresh): New targets.
1776 (memmem.o): Remove target.
1777 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1778 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1779 (AC_REPLACE_FUNCS): Remove memmem.
1780 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1781 (AC_OUTPUT): Generate Makefile in gnulib/.
1782 * aclocal.m4, config.in, configure: Regenerated.
1783
367ba2c2
MR
17842012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1785
1786 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1787
9d236627
PA
17882012-04-05 Pedro Alves <palves@redhat.com>
1789
1790 -Werror=strict-aliasing
1791
1792 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1793 pointer.
1794
111217b3
PA
17952012-04-04 Pedro Alves <palves@redhat.com>
1796
1797 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1798 (sparc_store_gregset_from_stack, sparc_store_gregset)
1799 (sparc_breakpoint_at): Fix formatting.
1800
8365dcf5
TJB
18012012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1802
1803 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1804 are available.
1805 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1806 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1807 * config.in: Regenerate.
1808 * configure: Likewise.
1809
689cc2ae
PA
18102012-03-29 Pedro Alves <palves@redhat.com>
1811
1812 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1813 Correct ptrace arguments.
1814
c14dfd32
PA
18152012-03-28 Pedro Alves <palves@redhat.com>
1816
1817 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1818 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1819 (IA64_FR1_REGNUM): New defines.
1820 (ia64_fetch_register): New.
1821 (the_low_target): Install it.
1822 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1823 field.
1824 * linux-low.c (linux_fetch_registers): Try the
1825 the_low_target.fetch_register hook first.
1826
1827 * linux-arm-low.c (the_low_target): Adjust.
1828 * linux-bfin-low.c (the_low_target): Adjust.
1829 * linux-cris-low.c (the_low_target): Adjust.
1830 * linux-crisv32-low.c (the_low_target): Adjust.
1831 * linux-m32r-low.c (the_low_target): Adjust.
1832 * linux-m68k-low.c (the_low_target): Adjust.
1833 * linux-mips-low.c (the_low_target): Adjust.
1834 * linux-ppc-low.c (the_low_target): Adjust.
1835 * linux-s390-low.c (the_low_target): Adjust.
1836 * linux-sh-low.c (the_low_target): Adjust.
1837 * linux-sparc-low.c (the_low_target): Adjust.
1838 * linux-tic6x-low.c (the_low_target): Adjust.
1839 * linux-x86-low.c (the_low_target): Adjust.
1840 * linux-xtensa-low.c (the_low_target): Adjust.
1841
63c88e13
PA
18422012-03-26 Pedro Alves <palves@redhat.com>
1843
1844 * server.c (handle_qxfer_libraries): Don't bail early if
1845 the_target->qxfer_libraries_svr4 is not NULL.
1846
fb723180
PA
18472012-03-26 Pedro Alves <palves@redhat.com>
1848
1849 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1850
0afae3cf
PA
18512012-03-23 Pedro Alves <palves@redhat.com>
1852
1853 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1854 "library-list-svr4" element's start tag when the the DSO list is
1855 empty.
1856
485f1ee4
PA
18572012-03-23 Pedro Alves <palves@redhat.com>
1858
1859 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1860 a variable whose type size is the same as the inferior's pointer
1861 size.
1862
a5362b9a
TS
18632012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1864
1865 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1866 struct siginfo.
1867 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1868 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1869 * linux-low.h: Include <signal.h>.
1870 (struct siginfo): Remove forward declaration.
1871 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1872 struct siginfo.
1873
d226c142
MF
18742012-03-21 Mike Frysinger <vapier@gentoo.org>
1875
1876 * .gitignore: Ignore more files.
1877
122f36ef
PA
18782012-03-19 Pedro Alves <palves@redhat.com>
1879 Jan Kratochvil <jan.kratochvil@redhat.com>
1880
1881 * server.c (cont_thread, general_thread): Add describing comments.
1882 (start_inferior): Clear `cont_thread'.
1883 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1884 of a process.
1885
fc3e5175
YQ
18862012-03-15 Yao Qi <yao@codesourcery.com>
1887
1888 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1889 handling to ...
1890 (cmd_qtdp): ... here.
1891
8d0d92cd
YQ
18922012-03-15 Yao Qi <yao@codesourcery.com>
1893
1894 * tracepoint.c (struct tracepoint_action_ops): New.
1895 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1896 (m_tracepoint_action_download): New.
1897 (r_tracepoint_action_download): New.
1898 (x_tracepoint_action_download): New.
1899 (l_tracepoint_action_download): New.
1900 (add_tracepoint_action): Install `action->ops' according type.
1901 (download_tracepoint_1): Move code `download' function pointer
1902 of various tracepoint_action_ops.
1903
87b0bb13
JK
19042012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1905
1906 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1907 linux_ptrace_attach_warnings.
1908
5f572dec
JK
19092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1910
1911 * Makefile.in (linux-ptrace.o): New.
1912 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1913 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1914 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1915 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1916 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1917 of these targets.
1918 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1919
f4647387
YQ
19202012-03-08 Yao Qi <yao@codesourcery.com>
1921 Pedro Alves <palves@redhat.com>
1922
1923 Fix PR server/13392.
1924 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1925 offset of JMP insn.
1926 * tracepoint.c (remove_tracepoint): New.
1927 (cmd_qtdp): Call remove_tracepoint when failed to install.
1928
9b224c5e
PA
19292012-03-07 Pedro Alves <palves@redhat.com>
1930
1931 * linux-low.c (get_detach_signal): New.
1932 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1933 Pass on pending signals to PTRACE_DETACH. Check the result of the
1934 ptrace call.
1935 * server.c (program_signals, program_signals_p): New.
1936 (handle_general_set): Handle QProgramSignals.
1937 * server.h (program_signals, program_signals_p): Declare.
1938
e237a7e2
JK
19392012-03-05 Pedro Alves <palves@redhat.com>
1940 Jan Kratochvil <jan.kratochvil@redhat.com>
1941
1942 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1943 New comment why.
1944
5808517f
YQ
19452012-03-03 Yao Qi <yao@codesourcery.com>
1946
1947 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1948 agent_look_up_symbols.
1949
58b4daa5
YQ
19502012-03-03 Yao Qi <yao@codesourcery.com>
1951
1952 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1953 (linux-x86-low.o): Likewise.
1954 * server.h: Remove in_process_agent_loaded.
1955 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1956 common/agent.c.
1957 Update callers.
1958
8ffcbaaf
YQ
19592012-03-03 Yao Qi <yao@codesourcery.com>
1960
1961 * tracepoint.c (gdb_agent_capability): New global.
1962 (in_process_agent_loaded_ust): Renamed to
1963 `in_process_agent_supports_ust'.
1964 Update callers.
1965 (in_process_agent_supports_ust): Call agent_capability_check.
1966 (clear_installed_tracepoints): Assert that agent supports
1967 agent.
1968
d1feda86
YQ
19692012-03-03 Yao Qi <yao@codesourcery.com>
1970
1971 * linux-low.c (linux_supports_agent): New.
1972 (linux_target_ops): Initialize field `supports_agent' with
1973 linux_supports_agent.
1974 * target.h (struct target_ops) <supports_agent>: New.
1975 (target_supports_agent): New macro.
1976 * server.c (handle_general_set): Handle packet 'QAgent'.
1977 (handle_query): Send `QAgent+'.
1978 * Makefile.in (server.o): Depends on agent.h.
1979
2fa291ac
YQ
19802012-03-03 Yao Qi <yao@codesourcery.com>
1981
1982 * Makefile.in (OBS): Add agent.o.
1983 Add new rule for agent.o.
1984 Track dependence of tracepoint.c on agent.h.
1985 * tracepoint.c (run_inferior_command_1):
1986 (run_inferior_command): Call agent_run_command.
1987 (gdb_ust_connect_sync_socket): Deleted. Move it to
1988 common/agent.c.
1989 (resume_thread, stop_thread): Likewise.
1990 (gdb_ust_socket_init): Renamed to ...
1991 (gdb_agent_socket_init): ... New.
1992 (gdb_ust_thread): Renamed to ...
1993 (gdb_agent_helper_thread): ... New.
1994 (gdb_ust_init): Move some code to ...
1995 (gdb_agent_init): ... here. New.
1996 [HAVE_UST]: Call gdb_ust_init.
1997 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1998 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1999 * config.in, configure: Regenerated.
2000
05044653
PA
20012012-03-02 Pedro Alves <palves@redhat.com>
2002
2003 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2004 * linux-low.c (struct simple_pid_list): New.
2005 (stopped_pids): New a struct simple_pid_list pointer.
2006 (add_to_pid_list, pull_pid_from_list): New.
2007 (handle_extended_wait): Don't assume the first signal new children
2008 report is SIGSTOP. Adjust call to pull_pid_from_list.
2009 (linux_wait_for_lwp): Adjust.
2010
8d00225b
YQ
20112012-03-02 Yao Qi <yao@codesourcery.com>
2012
2013 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2014 debug log.
2015
19560ba5
YQ
20162012-03-02 Yao Qi <yao@codesourcery.com>
2017
2018 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2019 `stop_pc' and `tpoint'. Update caller.
2020
1faeff08
MR
20212012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
2022
2023 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2024 * linux-low.c (use_linux_regsets): New macro.
2025 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2026 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2027 (linux_register_in_regsets): New function.
2028 (usr_fetch_inferior_registers): Skip registers covered by
2029 regsets.
2030 (usr_store_inferior_registers): Likewise.
2031 (usr_fetch_inferior_registers): New macro.
2032 (usr_store_inferior_registers): Likewise.
2033 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2034 (linux_store_registers): Likewise.
2035 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2036 prototype.
2037 (init_registers_mips64_dsp_linux): Likewise.
2038 (init_registers_mips_linux): New macro.
2039 (init_registers_mips_dsp_linux): Likewise.
2040 (mips_dsp_num_regs): Likewise.
2041 (DSP_BASE, DSP_CONTROL): New fallback macros.
2042 (mips_base_regs): New macro.
2043 (mips_regmap): Use it. Fix the size.
2044 (mips_dsp_regmap): New variable.
2045 (mips_dsp_regset_bitmap): Likewise.
2046 (mips_arch_setup): New function.
2047 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2048 than mips_regmap.
2049 (mips_cannot_store_register): Likewise.
2050 (the_low_target): Update .arch_setup, .num_regs and .regmap
2051 initializers. Add .regset_bitmap initializer.
2052 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2053 initializer.
2054 * linux-bfin-low.c (the_low_target): Likewise.
2055 * linux-cris-low.c (the_low_target): Likewise.
2056 * linux-crisv32-low.c (the_low_target): Likewise.
2057 * linux-ia64-low.c (the_low_target): Likewise.
2058 * linux-m32r-low.c (the_low_target): Likewise.
2059 * linux-m68k-low.c (the_low_target): Likewise.
2060 * linux-ppc-low.c (the_low_target): Likewise.
2061 * linux-s390-low.c (the_low_target): Likewise.
2062 * linux-sh-low.c (the_low_target): Likewise.
2063 * linux-sparc-low.c (the_low_target): Likewise.
2064 * linux-tic6x-low.c (the_low_target): Likewise.
2065 * linux-x86-low.c (the_low_target): Likewise.
2066 * linux-xtensa-low.c (the_low_target): Likewise.
2067 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2068 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2069 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2070 srv_xmlfiles.
2071 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2072 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2073
c03e6ccc
YQ
20742012-02-29 Yao Qi <yao@codesourcery.com>
2075 Pedro Alves <palves@redhat.com>
2076
2077 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2078 `step_over_finished' is true.
2079
644cebc9
PA
20802012-02-27 Pedro Alves <palves@redhat.com>
2081
2082 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2083 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2084
c14d7ab2
PA
20852012-02-27 Pedro Alves <palves@redhat.com>
2086
2087 PR server/9684
2088 * linux-low.c (pid_is_stopped): New.
2089 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2090
412c89dd
LM
20912012-02-25 Luis Machado <lgustavo@codesourcery.com>
2092
2093 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2094 of conditions.
2095
b745defe
MR
20962012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2097
2098 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2099
9f3a5c85
LM
21002012-02-24 Luis Machado <lgustavo@codesourcery>
2101
2102 * server.c (handle_query): Advertise support for target-side
2103 breakpoint condition evaluation.
2104 (process_point_options): New function.
2105 (process_serial_event): When inserting a breakpoint, check for
2106 a target-side condition that should be evaluated.
2107
2108 * mem-break.c: Include regcache.h and ax.h.
2109 (point_cond_list_t): New data structure.
2110 (breakpoint) <cond_list>: New field.
2111 (find_gdb_breakpoint_at): Make non-static.
2112 (delete_gdb_breakpoint_at): Clear any target-side
2113 conditions.
2114 (clear_gdb_breakpoint_conditions): New function.
2115 (add_condition_to_breakpoint): Likewise.
2116 (add_breakpoint_condition): Likewise.
2117 (gdb_condition_true_at_breakpoint): Likewise.
2118 (gdb_breakpoint_here): Return result directly instead
2119 of going through a local variable.
2120
2121 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2122 (clear_gdb_breakpoint_conditions): Likewise.
2123 (add_breakpoint_condition): Likewise.
2124 (gdb_condition_true_at_breakpoint): Likewise.
2125
2126 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2127 (need_step_over_p): Take target-side breakpoint condition into
2128 consideration.
2129
5e1dc496
LM
21302012-02-24 Luis Machado <lgustavo@codesourcery>
2131
2132 * server.h: Include tracepoint.h.
2133 (agent_mem_read, agent_get_trace_state_variable_value,
2134 agent_set_trace_state_variable_value,
2135 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2136 get_set_tsv_func_addr): New prototypes.
2137
2138 * ax.h: New include file.
2139 * ax.c: New source file.
2140
2141 * tracepoint.c: Include ax.h.
2142 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2143 agent_expr, eval_result_type): Move to ax.h.
2144 (parse_agent_expr): Rename to ...
2145 (gdb_parse_agent_expr): ... this, make it non-static and move
2146 to ax.h.
2147 (unparse_agent_expr) Rename to ...
2148 (gdb_unparse_agent_expr): ... this, make it non-static and move
2149 to ax.h.
2150 (eval_agent_expr): Rename to ...
2151 (eval_tracepoint_agent_expr): ... this.
2152 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2153 forward declarations.
2154 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2155 (agent_get_trace_state_variable_value): New function.
2156 (agent_set_trace_state_variable_value): New function.
2157 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2158 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2159 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2160 (condition_true_at_tracepoint): Likewise.
2161 (parse_agent_expr): Rename to ...
2162 (gdb_parse_agent_expr): ... this and move to ax.c.
2163 (unparse_agent_expr): Rename to ...
2164 (gdb_unparse_agent_expr): ... this and move to ax.c.
2165 (gdb_agent_op_name): Move to ax.c.
2166 (eval_agent_expr): Rename to ...
2167 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2168 and move to ax.c.
2169 (eval_tracepoint_agent_expr): New function.
2170 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 2171 non-static.
5e1dc496
LM
2172 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2173 ax.c.
2174 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2175 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2176 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2177 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2178 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2179 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2180 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2181 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2182 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2183 (compile_bytecodes): Remove forward declaration.
2184 (is_goto_target): Move to ax.c.
2185 (compile_bytecodes): Move to ax.c and call
2186 agent_get_trace_state_variable_value (...) and
2187 agent_set_trace_state_variable_value (...).
2188
2189 * Makefile.in: Update ax.c and IPA dependencies.
2190
277e4e52
PA
21912012-02-24 Pedro Alves <palves@redhat.com>
2192
2193 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2194 (cmd_bigqtbuffer_circular): ... this. Only handle
2195 'QTBuffer:circular:'.
2196 (handle_tracepoint_general_set): Adjust.
2197
bf4c19f7
YQ
21982012-02-16 Yao Qi <yao@codesourcery.com>
2199
2200 * inferiors.c: Move code to ...
2201 * dll.c: .... here. New.
2202 * server.h: Declare clear_dlls.
2203 * Makefile.in (SFILES): Add dll.c.
2204 (OBS): Add dll.o
2205 (dll.o): New rule.
2206
d73f2619
YQ
22072012-02-11 Yao Qi <yao@codesourcery.com>
2208
2209 * server.c: (handle_monitor_command): Add a new parameter
2210 `own_buf'.
2211 (handle_query): Update caller.
2212
f8255c2a
JB
22132012-02-09 Joel Brobecker <brobecker@adacore.com>
2214
2215 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2216 * configure, config.in: Regenerate.
2217 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2218 is not defined.
2219
da84f473
PA
22202012-02-02 Pedro Alves <palves@redhat.com>
2221
2222 Try SIGKILL first, then PTRACE_KILL.
2223 * linux-low.c (linux_kill_one_lwp): New.
2224 (linux_kill_one_lwp): Rename to ...
2225 (kill_one_lwp_callback): ... this. Use the new
2226 linux_kill_one_lwp.
2227
e886a173
PA
22282012-02-02 Pedro Alves <palves@redhat.com>
2229
2230 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2231 inferior.
2232
be07f1a2
PA
22332012-01-27 Pedro Alves <palves@redhat.com>
2234
2235 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2236 (elf_64_file_p): Make static.
2237 (linux_pid_exe_is_elf_64_file): New.
2238 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2239 Delete declarations.
2240 (linux_pid_exe_is_elf_64_file): Declare.
2241 * linux-x86-low.c (x86_arch_setup): Use
2242 linux_pid_exe_is_elf_64_file.
2243
d8301ad1
JK
22442012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2245
2246 * linux-low.c (linux_wait_for_event_1): Rename to ...
2247 (linux_wait_for_event): ... here and merge it with former
2248 linux_wait_for_event - new variable wait_ptid, use it.
2249 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2250
01b17894
PA
22512012-01-23 Pedro Alves <palves@redhat.com>
2252
2253 * server.c (main): Avoid yet another case of infinite loop while
2254 detaching/killing after a longjmp.
2255
e825046f
JK
22562012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2257
2258 Code cleanup.
2259 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2260
b9e7b9c3
UW
22612012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2262
2263 * hostio.c (handle_readlink): New function.
2264 (handle_vFile): Call it to handle "vFile:readlink" packets.
2265
901f9912
UW
22662012-01-20 Pedro Alves <palves@redhat.com>
2267 Ulrich Weigand <ulrich.weigand@linaro.org>
2268
2269 * server.c (handle_v_requests): Only support vAttach and vRun to
2270 start multiple processes when in extended protocol mode.
2271
fc1ab1a0
PA
22722012-01-17 Pedro Alves <palves@redhat.com>
2273
2274 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2275 memalign plus mprotect to allocate the scratch buffer.
2276
7d5d4e98
PA
22772012-01-13 Pedro Alves <palves@redhat.com>
2278
2279 * server.c (attach_inferior): Clear `cont_thread'.
2280
f128d5e9
PA
22812012-01-13 Pedro Alves <palves@redhat.com>
2282
2283 * server.c (main): Avoid infinite loop while detaching/killing
2284 after a longjmp.
2285
06db92f0
DE
22862012-01-09 Doug Evans <dje@google.com>
2287
2288 * server.c (start_inferior): Set last_ptid in --wrapper case.
2289
32d92999
YQ
22902012-01-06 Yao Qi <yao@codesourcery.com>
2291
2292 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2293 defined.
2294 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2295
5e0a92a9
YQ
22962012-01-04 Yao Qi <yao@codesourcery.com>
2297
2298 * tracepoint.c (cmd_qtdp): Print debug message
2299 for static tracepoint.
2300
ae639e8c
YQ
23012012-01-04 Yao Qi <yao@codesourcery.com>
2302
2303 * tracepoint.c (trace_vdebug): Differentiate debug message
2304 between gdbserver and IPA.
2305
f72429c5
YQ
23062012-01-03 Yao Qi <yao@codesourcery.com>
2307
2308 * tracepoint.c (tracepoint_was_hit): Don't collect for
2309 static tracepoint.
2310
12c3e59c
JB
23112012-01-02 Joel Brobecker <brobecker@adacore.com>
2312
2313 * terminal.h: Reformat copyright header.
2314
67827812
JB
23152012-01-02 Joel Brobecker <brobecker@adacore.com>
2316
2317 * server.c (gdbserver_version): Update copyright year.
2318 * gdbreplay.c (gdbreplay_version): Likewise.
2319
3e52c33d
JK
23202011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2321
2322 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2323
2324 Revert:
2325 2011-12-18 Hui Zhu <teawater@gmail.com>
2326 * linux-low.c (linux_create_inferior): Save return value to ret.
2327
66f1260e
HZ
23282011-12-18 Hui Zhu <teawater@gmail.com>
2329
2330 * linux-low.c (linux_create_inferior): Save return value to ret.
2331
e77616d7
DE
23322011-12-16 Doug Evans <dje@google.com>
2333
e7b06c57
DE
2334 * linux-low.c (linux_create_inferior): If stdio connection,
2335 redirect stdin from /dev/null, stdout to stderr.
2336 * remote-utils.c (remote_is_stdio): New static global.
2337 (remote_connection_is_stdio): New function.
2338 (remote_prepare): Handle stdio connection.
2339 (remote_open): Ditto.
2340 (remote_close): Don't close stdin for stdio connections.
2341 (read_prim,write_prim): New functions. Replace all calls to
2342 read/write to these.
2343 * server.c (main): Watch for "-" argument. Move call to
2344 remote_prepare before start_inferior.
2345 * server.h (STDIO_CONNECTION_NAME): New macro.
2346 (remote_connection_is_stdio): Declare.
2347
e77616d7
DE
2348 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2349 in debugging output.
2350
82067193
YQ
23512011-12-15 Yao Qi <yao@codesourcery.com>
2352
2353 * tracepoint.c: Include sys/syscall.h.
2354 (gdb_ust_thread): Remove preprocessor conditional.
2355
82bfbe7e
PA
23562011-12-14 Pedro Alves <pedro@codesourcery.com>
2357
2358 * linux-low.c (linux_detach_one_lwp): Call
2359 the_low_target.prepare_to_resume before detaching.
2360
712c6575
YQ
23612011-12-14 Yao Qi <yao@codesourcery.com>
2362
2363 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2364 of write.
2365
d54d1edf
YQ
23662011-12-14 Yao Qi <yao@codesourcery.com>
2367
2368 * i386-low.c (i386_low_stopped_data_address): Initialize local
2369 variable `control'.
2370
6210a125
PA
23712011-12-13 Pedro Alves <pedro@codesourcery.com>
2372
2373 PR remote/13492
2374
2375 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2376 DR_CONTROL unless necessary. Extend comments.
2377 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2378 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2379
2ece8244
YQ
23802011-12-13 Yao Qi <yao@codesourcery.com>
2381
2382 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2383 macros.
2384 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2385
784867a5
JK
23862011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2387
2388 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2389 Print new debug message for such case.
2390
6bf36717
JK
23912011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2392
2393 Fix overlapping memcpy.
2394 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2395 the read_inferior_memory transfer.
2396 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2397 write_inferior_memory transfer.
2398 (set_fast_tracepoint_jump): New variable buf. Use it for the
2399 read_inferior_memory and write_inferior_memory transfers.
2400 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2401 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2402 Use it for the write_inferior_memory transfer.
2403 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2404 buffers.
2405
50275556
MR
24062011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2407
2408 * linux-low.c (fetch_register, store_register): Make code
2409 consistent, fix formatting.
2410
7325beb4
MR
24112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2412
2413 * linux-low.c (usr_store_inferior_registers): Factor out code
2414 to handle individual registers into...
2415 (store_register): ... this new function.
2416
c642a434
UW
24172011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2418
2419 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2420 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2421 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2422 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2423 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2424 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2425 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2426 (srv_xmlfiles): Add new XML files.
2427
2428 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2429 and <sys/uio.h>.
2430 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2431 (init_registers_s390_linux32v1): Add prototype.
2432 (init_registers_s390_linux32v2): Likewise.
2433 (init_registers_s390_linux64v1): Likewise.
2434 (init_registers_s390_linux64v2): Likewise.
2435 (init_registers_s390x_linux64v1): Likewise.
2436 (init_registers_s390x_linux64v2): Likewise.
2437 (s390_num_regs): Increment to 52.
2438 (s390_regmap): Add orig_r2 register.
2439 (s390_num_regs_3264): Increment to 68.
2440 (s390_regmap_3264): Add orig_r2 register.
2441 (s390_collect_ptrace_register): Handle orig_r2 register.
2442 (s390_supply_ptrace_register): Likewise.
2443 (s390_fill_last_break): New function.
2444 (s390_store_last_break): Likewise.
2445 (s390_fill_system_call): New function.
2446 (s390_store_system_call): Likewise.
2447 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2448 register sets.
2449 (s390_check_regset): New function.
2450 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2451 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2452 Update target_regsets for available register sets.
2453
2268b414
JK
24542011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2455 Jan Kratochvil <jan.kratochvil@redhat.com>
2456
2457 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2458 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2459 New.
2460 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2461 * linux-low.h (struct process_info_private): New member r_debug.
2462 * server.c (handle_qxfer_libraries): Call
2463 the_target->qxfer_libraries_svr4.
2464 (handle_qxfer_libraries_svr4): New function.
2465 (qxfer_packets): New entry "libraries-svr4".
2466 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2467 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2468 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2469 PACKET_qXfer_libraries_svr4.
2470
d6db1fab
UW
24712011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2472
2473 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2474 PSW address/mask between 8-byte and 16-byte formats.
2475 (s390_supply_ptrace_register): Likewise.
2476 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2477 basic addressing mode bit.
2478
242f5f1c
SS
24792011-11-24 Stan Shebs <stan@codesourcery.com>
2480
2481 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2482
f196051f
SS
24832011-11-17 Stan Shebs <stan@codesourcery.com>
2484
2485 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2486 (tracing_start_time): New global.
2487 (tracing_stop_time): New global.
2488 (tracing_user_name): New global.
2489 (tracing_notes): New global.
2490 (tracing_stop_note): New global.
2491 (cmd_qtstart): Set traceframe_usage, start_time.
2492 (stop_tracing): Set stop_time.
2493 (cmd_qtstatus): Report additional status.
2494 (cmd_qtp): New function.
2495 (handle_tracepoint_query): Call it.
2496 (cmd_qtnotes): New function.
2497 (handle_tracepoint_general_set): Call it.
2498 (get_timestamp): Rename from tsv_get_timestamp.
2499
405f8e94
SS
25002011-11-14 Stan Shebs <stan@codesourcery.com>
2501 Kwok Cheung Yeung <kcy@codesourcery.com>
2502
2503 * linux-x86-low.c (small_jump_insn): New.
2504 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2505 trampoline and error message, build a trampoline and issue a small
2506 jump instruction to it.
2507 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2508 trampoline and error message.
2509 (x86_get_min_fast_tracepoint_insn_len): New.
2510 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2511 * linux-low.h (struct linux_target_ops): Add arguments to
2512 install_fast_tracepoint_jump_pad operation, add new operation.
2513 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2514 arguments.
2515 (linux_get_min_fast_tracepoint_insn_len): New function.
2516 (linux_target_op): Add new operation.
2517 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2518 (gdb_trampoline_buffer_end): Ditto.
2519 (gdb_trampoline_buffer_error): Ditto.
2520 (struct ipa_sym_addresses): Add fields for new IPA variables.
2521 (symbol_list): Add entries for new IPA variables.
2522 (struct tracepoint): Add fields to hold the address range of the
2523 trampoline used by the tracepoint.
2524 (trampoline_buffer_head): New static variable.
2525 (trampoline_buffer_tail): Ditto.
2526 (claim_trampoline_space): New function.
2527 (have_fast_tracepoint_trampoline_buffer): New function.
2528 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2529 structure.
2530 (install_fast_tracepoint): Ditto, also add error buffer argument.
2531 (cmd_qtminftpilen): New function.
2532 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2533 (fast_tracepoint_from_trampoline_address): New function.
2534 (fast_tracepoint_collecting): Handle trampoline as part of jump
2535 pad space.
2536 (set_trampoline_buffer_space): New function.
2537 (initialize_tracepoint): Initialize new IPA variables.
2538 * target.h (struct target_ops): Add arguments to
2539 install_fast_tracepoint_jump_pad operation, add new
2540 get_min_fast_tracepoint_insn_len operation.
2541 (target_get_min_fast_tracepoint_insn_len): New.
2542 (install_fast_tracepoint_jump_pad): Add arguments.
2543 * server.h (IPA_BUFSIZ): Define.
2544 * linux-i386-ipa.c: Include extra header files.
2545 (initialize_fast_tracepoint_trampoline_buffer): New function.
2546 (initialize_low_tracepoint): Call it.
2547 * server.h (set_trampoline_buffer_space): Declare.
2548 (claim_trampoline_space): Ditto.
2549 (have_fast_tracepoint_trampoline_buffer): Ditto.
2550
1e4d1764
YQ
25512011-11-14 Yao Qi <yao@codesourcery.com>
2552
2553 * server.c (handle_query): Handle InstallInTrace for qSupported.
2554 * tracepoint.c (add_tracepoint): Sort list.
2555 (install_tracepoint, download_tracepoint): New.
2556 (cmd_qtdp): Call them to install and download tracepoints.
2557 (sort_tracepoints): Removed.
2558 (cmd_qtstart): Update.
2559
5c73ff4e
YQ
25602011-11-14 Yao Qi <yao@codesourcery.com>
2561
2562 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2563 * mem-break.h: Declare.
2564 * tracepoint.c (cmd_qtstart): Move some code to ...
2565 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2566 New.
2567 (download_tracepoints): Move some code to ...
2568 (download_tracepoint_1): ... here. New.
2569
86a30030
YQ
25702011-11-08 Yao Qi <yao@codesourcery.com>
2571
2572 * remote-utils.c (relocate_instruction): A comment fix.
2573
8d26e50c
JB
25742011-11-07 Joel Brobecker <brobecker@adacore.com>
2575
2576 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2577 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2578 dr_status_mirror and dr_control_mirror from debug_reg_state.
2579 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2580 (i386_initial_stuff): Remove use of deleted globals.
2581 (i386_get_thread_context, i386_set_thread_context,
2582 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2583 from debug_reg_state.
2584
a59306a3
YQ
25852011-11-05 Yao Qi <yao@codesourcery.com>
2586
2587 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2588 address as TPOINT's.
2589
3065dfb6
SS
25902011-11-02 Stan Shebs <stan@codesourcery.com>
2591
2592 * tracepoint.c (agent_mem_read_string): New function.
2593 (eval_agent_expr): Call it for tracenz.
2594 * server.c (handle_query): Report support for tracenz.
2595
fd0d8c7c
YQ
25962011-11-02 Yao Qi <yao@codesourcery.com>
2597
2598 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2599
609086b1
YQ
26002011-11-02 Yao Qi <yao@codesourcery.com>
2601
2602 * target.h: Fix a typo in comment.
2603
b9fd1791
PA
26042011-10-31 Pedro Alves <pedro@codesourcery.com>
2605
2606 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2607 clobber the breakpoints' shadows with fast tracepoint jumps.
2608 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2609 * target.c (write_inferior_memory): Also pass MYADDR down to
2610 check_mem_write.
2611
03583c20
UW
26122011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2613
2614 * configure.ac: Check support for personality routine.
2615 * configure: Regenerate.
2616 * config.in: Likewise.
2617 * linux-low.c: Include <sys/personality.h>.
2618 Define ADDR_NO_RANDOMIZE if necessary.
2619 (linux_create_inferior): Disable address space randomization when
2620 forking inferior, if requested.
2621 (linux_supports_disable_randomization): New function.
2622 (linux_target_ops): Install it.
2623 * server.h (disable_randomization): Declare.
2624 * server.c (disable_randomization): New global variable.
2625 (handle_general_set): Handle QDisableRandomization.
2626 (handle_query): Likewise for qSupported.
2627 (main): Support --disable-randomization and --no-disable-randomization
2628 command line arguments.
2629 * target.h (struct target_ops): Add supports_disable_randomization.
2630 (target_supports_disable_randomization): New macro.
2631
723b724b
MF
26322011-09-29 Mike Frysinger <vapier@gentoo.org>
2633
2634 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2635 ifdef check.
2636 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2637 [!PT_GETDSBT] (target_loadmap): New definition.
2638 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2639 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2640 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2641 and PT_GETDSBT to LINUX_LOADMAP.
2642 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2643 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2644
55329a5c 26452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
2646
2647 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2648 (arm_linux_hwbp_cap): New static variable.
2649 (arm_linux_get_hwbp_cap): Replace by ...
2650 (arm_linux_init_hwbp_cap): ... this new function.
2651 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2652 (arm_linux_get_hw_watchpoint_count): Likewise.
2653 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2654 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2655 (arm_prepare_to_resume): Use perror_with_name instead of error.
2656
55329a5c 26572011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
2658
2659 * linux-arm-low.c: Include <signal.h>.
2660 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2661 (struct arm_linux_hwbp_cap): New data type.
2662 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2663 (struct arm_linux_hw_breakpoint): New data type.
2664 (MAX_BPTS, MAX_WPTS): Define.
2665 (struct arch_process_info, struct arch_lwp_info): New data types.
2666 (arm_linux_get_hwbp_cap): New function.
2667 (arm_linux_get_hw_breakpoint_count): Likewise.
2668 (arm_linux_get_hw_watchpoint_count): Likewise.
2669 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2670 (arm_hwbp_control_initialize): Likewise.
2671 (arm_hwbp_control_is_enabled): Likewise.
2672 (arm_hwbp_control_is_initialized): Likewise.
2673 (arm_hwbp_control_disable): Likewise.
2674 (arm_linux_hw_breakpoint_equal): Likewise.
2675 (arm_linux_hw_point_initialize): Likewise.
2676 (struct update_registers_data): New data structure.
2677 (update_registers_callback: New function.
2678 (arm_insert_point): Likewise.
2679 (arm_remove_point): Likewise.
2680 (arm_stopped_by_watchpoint): Likewise.
2681 (arm_stopped_data_address): Likewise.
2682 (arm_new_process): Likewise.
2683 (arm_new_thread): Likewise.
2684 (arm_prepare_to_resume): Likewise.
2685 (the_low_target): Register arm_insert_point, arm_remove_point,
2686 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2687 arm_new_thread, and arm_prepare_to_resume.
2688
6b9801d4
SS
26892011-09-15 Stan Shebs <stan@codesourcery.com>
2690
2691 * server.h (struct emit_ops): Add compare-goto fields.
2692 * tracepoint.c (gdb_agent_op_sizes): New table.
2693 (emit_eq_goto): New function.
2694 (emit_ne_goto): New function.
2695 (emit_lt_goto): New function.
2696 (emit_le_goto): New function.
2697 (emit_gt_goto): New function.
2698 (emit_ge_goto): New function.
2699 (is_goto_target): New function.
2700 (compile_bytecodes): Recognize special cases of compare-goto
2701 combinations and call specialized emitters for them.
2702 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2703 (amd64_emit_ne_goto): New function.
2704 (amd64_emit_lt_goto): New function.
2705 (amd64_emit_le_goto): New function.
2706 (amd64_emit_gt_goto): New function.
2707 (amd64_emit_ge_goto): New function.
2708 (amd64_emit_ops): Add the new functions.
2709 (i386_emit_eq_goto): New function.
2710 (i386_emit_ne_goto): New function.
2711 (i386_emit_lt_goto): New function.
2712 (i386_emit_le_goto): New function.
2713 (i386_emit_gt_goto): New function.
2714 (i386_emit_ge_goto): New function.
2715 (i386_emit_ops): Add the new functions.
2716
bf15cbda
SS
27172011-09-08 Stan Shebs <stan@codesourcery.com>
2718
2719 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2720 (i386_emit_epilogue): Restore %ebx.
2721
943ca1dd
JZ
27222011-08-31 Jie Zhang <jzhang918@gmail.com>
2723
2724 * server.c (step_thread): Remove definition.
2725 (process_serial_event): Don't handle Hs.
2726 * server.h (step_thread): Remove declaration.
2727 * target.c (set_desired_inferior): Remove use of step_thread.
2728
e3deef73
LM
27292011-08-24 Luis Machado <lgustavo@codesourcery.com>
2730
2731 * linux-low.c: Include linux-procfs.h.
2732 (linux_attach_lwp_1): Update comments.
2733 (linux_attach): Scan for existing threads when attaching to a
2734 process that is the tgid.
2735 * Makefile.in: Update dependencies.
2736
13da1c97
LM
27372011-08-24 Luis Machado <lgustavo@codesourcery.com>
2738
2739 * configure.srv: Add linux-procfs.o dependencies.
2740
881127c9
YQ
27412011-08-14 Yao Qi <yao@codesourcery.com>
2742
2743 * target.h (struct target_ops): Fix indent.
2744 * win32-low.c (win32_target_ops): Fix comment.
2745
58dbd541
YQ
27462011-08-14 Andrew Jenner <andrew@codesourcery.com>
2747 Yao Qi <yao@codesourcery.com>
2748
2749 * Makefile.in (clean): Remove tic6x-*.c files.
2750 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2751 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2752 (tic6x-c64xp-linux.c): Likewise.
2753 * configure.srv: Add support for tic6x-*-uclinux.
2754 * linux-tic6x-low.c: New.
2755 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2756
78d85199
YQ
27572011-08-14 Andrew Stubbs <ams@codesourcery.com>
2758 Yao Qi <yao@codesourcery.com>
2759
2760 * target.h (struct target_ops): Add read_loadmap.
2761 * linux-low.c (struct target_loadseg): New type.
2762 (struct target_loadmap): New type.
2763 (linux_read_loadmap): New function.
2764 (linux_target_ops): Add linux_read_loadmap.
2765 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
2766 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2767 to NULL.
78d85199 2768
a959a88d
EZ
27692011-08-05 Eli Zaretskii <eliz@gnu.org>
2770
2771 * win32-low.c: Include <stdint.h>.
2772
1ced966e
PA
27732011-07-22 Pedro Alves <pedro@codesourcery.com>
2774
2775 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2776 to the inferior here.
2777 (i386_remove_aligned_watchpoint): Ditto.
2778 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2779 fit part of the watchpoint in the debug registers.
2780 (i386_update_inferior_debug_regs): New.
2781 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2782 registers, and only update the inferior on success.
2783 (i386_low_remove_watchpoint): Ditto.
2784
d26e3629
KY
27852011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2786
2787 * linux-low.c (compare_ints, unique, list_threads, show_process,
2788 linux_core_of_thread): Delete.
2789 (linux_target_ops): Change linux_core_of_thread to
2790 linux_common_core_of_thread.
2791 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2792 * utils.c (malloc_failure): Change type of argument.
2793 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2794 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2795 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2796 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2797 (IPA_OBJS): Add common-utils-ipa.o.
2798 (ptid_h, linux_osdata_h): New macros.
2799 (server_h): Add common/common-utils.h, common/xml-utils.h,
2800 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2801 common/ptid.h.
2802 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2803 ptid.o, buffer.o): New rules.
2804 (linux-low.o): Add common/linux-osdata.h as a dependency.
2805 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2806 * configure.ac: Add AC_HEADER_DIRENT check.
2807 * config.in: Regenerate.
2808 * configure: Regenerate.
2809 * remote-utils.c (xml_escape_text): Delete.
2810 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2811 buffer_xml_printf): Move to common/buffer.c.
2812 * server.c (main): Remove call to initialize_inferiors.
2813 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2814 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2815 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2816 internal_error, gdb_assert, gdb_assert_fail): Delete.
2817 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2818 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2819 common/buffer.h.
2820 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2821 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2822 initialize_inferiors): Delete.
2823
2275a1a7
PA
28242011-07-20 Pedro Alves <pedro@codesourcery.com>
2825
2826 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2827 symbol error.
2828
0a5b1e09
PA
28292011-05-31 Pedro Alves <pedro@codesourcery.com>
2830
2831 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2832 assertion.
2833 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2834
6938fd34
YQ
28352011-05-26 Yao Qi <yao@codesourcery.com>
2836
2837 * Makefile.in (thread-db.o): Track dependence to
2838 common/gdb_thread_db.h.
2839 * thread-db.c: include gdb_thread_db.h from right place.
2840
b481f9e0
TT
28412011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2842
2843 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2844 __FILE__ and __LINE__ to internal_error.
2845
98a5dd13
DE
28462011-05-13 Doug Evans <dje@google.com>
2847
2848 * thread-db.c (try_thread_db_load_from_sdir): New function.
2849 (try_thread_db_load_from_dir): New function.
2850 (thread_db_load_search): Handle $sdir, ignore $pdir.
2851 Remove trying of system directories if search of
2852 libthread-db-search-path fails, that is now done via $sdir.
2853
d248b706
KY
28542011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2855
2856 * server.c (handle_query): Add EnableDisableTracepoints to the list
2857 of supported features.
43aaf8b6 2858 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 2859 tracepoints.
43aaf8b6
PA
2860 (cmd_qtenable_disable): New.
2861 (cmd_qtstart): Install tracepoints even if disabled.
2862 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2863 receiving a QTEnable or QTDisable packet.
2864 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2865 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2866 tracepoints.
2867 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 2868
84e578fb
DE
28692011-05-10 Doug Evans <dje@google.com>
2870
2871 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2872
71f55dd8
DE
28732011-05-04 Doug Evans <dje@google.com>
2874
2875 * linux-low.c (linux_join): Skip process lookup.
2876 * spu-low.c (spu_join): Ditto.
2877 * server.c (join_inferiors_callback): Delete.
2878 (process_serial_event): For 'D' packet (detach) call join_inferior
2879 directly.
2880
4d393d60
JM
28812011-05-04 Joseph Myers <joseph@codesourcery.com>
2882
2883 * README: Don't mention xscale*-*-linux*.
2884 * configure.srv (xscale*-*-linux*): Don't handle target.
2885
b00ad6ff
NF
28862011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2887
2888 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2889 casting pointers.
2890 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2891 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2892 (i386_emit_void_call_2): Likewise.
2893
af96c192
YQ
28942011-04-26 Yao Qi <yao@codesourcery.com>
2895
43aaf8b6
PA
2896 * linux-low.c: Move common macros to linux-ptrace.h.
2897 Include linux-ptrace.h.
af96c192
YQ
2898 * Makefile.in (linux_ptrace_h): New.
2899 (linux-low.o): Depends on linux-ptrace.h.
2900
03f2bd59
JK
29012011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2902
2903 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2904 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2905 (remote_prepare): New function with most of the TCP code from ...
2906 (remote_open): ... here. Detect PORT here unconditionally. Move also
2907 setting transport_is_reliable.
2908 * server.c (run_once): New variable.
2909 (gdbserver_usage): Document it.
2910 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2911 the first run if RUN_ONCE.
2912 * server.h (run_once, remote_prepare): New declarations.
2913
7a9dd1b2
TT
29142011-04-19 Tom Tromey <tromey@redhat.com>
2915
2916 * win32-low.c (handle_load_dll): Remove duplicate "the".
2917
81239425
PM
29182011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2919
2920 Remove support for old Cygwin 1.5 versions.
2921 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2922 function to avoid warning.
2923 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2924 warning.
2925
9e0627f1
PM
29262011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2927
2928 * gdbserver/server.h (Macro _): Define it if not available.
2929
588eebee
MS
29302011-03-14 Michael Snyder <msnyder@vmware.com>
2931
348af9f7 2932 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 2933
43f70d4c
JB
29342011-03-10 Joel Brobecker <brobecker@adacore.com>
2935
2936 * Makefile.in (maintainer-clean realclean distclean): Remove
2937 "make ... subdir_do" command.
2938
348af9f7
MS
29392011-03-10 Michael Snyder <msnyder@vmware.com>
2940
2941 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2942
2943 * server.c (handle_v_run): Free alloced buffer on early return.
2944
e637a4f5
YQ
29452011-03-09 Yao Qi <yao@codesourcery.com>
2946
2947 Revert:
2948 2011-03-04 Yao Qi <yao@codesourcery.com>
2949
2950 * Makefile.in: Remove GNU make feature --directory.
2951
2952 2011-03-05 Yao Qi <yao@codesourcery.com>
2953
2954 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2955 (subdir_do): New make target. Copied from gdb/Makefile.
2956 (maintainer-clean, realclean, distclean, clean): Call corresponding
2957 make targets in common/Makefile.
2958
2959 2011-02-11 Yao Qi <yao@codesourcery.com>
2960
2961 * configure.ac: Call AC_PROG_RANLIB.
2962 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2963 * configure: Regenerate.
2964
e6edda56
JK
29652011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2966
2967 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2968
e5141119
JB
29692011-03-06 Yao Qi <yao@codesourcery.com>
2970
2971 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2972
64794aa4
JB
29732011-03-05 Yao Qi <yao@codesourcery.com>
2974
2975 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2976 (subdir_do): New make target. Copied from gdb/Makefile.
2977 (maintainer-clean, realclean, distclean, clean): Call corresponding
2978 make targets in common/Makefile.
2979
7a762829
YQ
29802011-03-04 Yao Qi <yao@codesourcery.com>
2981
2982 * Makefile.in: Remove GNU make feature --directory.
2983
348af9f7
MS
29842011-03-04 Michael Snyder <msnyder@vmware.com>
2985
2986 * server.c (queue_stop_reply): Call xmalloc not malloc.
2987
29882011-03-02 Michael Snyder <msnyder@vmware.com>
2989
2990 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2991
9f72fee2
MS
29922011-02-28 Michael Snyder <msnyder@vmware.com>
2993
588eebee
MS
2994 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2995 (cmd_qtframe): Ditto.
2996 (cmd_qtbuffer): Ditto.
2997 (cmd_bigqtbuffer): Ditto.
2998
9f72fee2
MS
2999 * utils.c (decimal2str): Initialize 'width' to nine, then
3000 don't mess with it.
3001
8040bd49
UW
30022011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3003
3004 * hostio.c (require_data): Free *data, not data.
3005
7e52cbd0
JK
30062011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3007
3008 * hostio.c (require_data): Use free, not xfree.
3009
9130f83e
MS
30102011-02-27 Michael Snyder <msnyder@vmware.com>
3011
4b812f4e
MS
3012 * server.c (handle_query): Discard unused value.
3013
9130f83e
MS
3014 * hostio.c (require_data): Free malloc memory before returning
3015 error.
3016
69d37113
MS
30172011-02-26 Michael Snyder <msnyder@vmware.com>
3018
3019 * linux-low.c (list_threads): Call closedir for dirent.
3020
35f5825a
MS
30212011-02-27 Michael Snyder <msnyder@vmware.com>
3022
2a589cef
MS
3023 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3024 a case statement falls through.
3025
0adea5f7
MS
3026 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3027
35f5825a
MS
3028 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3029 in comparison.
3030
238f1c74
MS
30312011-02-26 Michael Snyder <msnyder@vmware.com>
3032
3033 * utils.c (decimal2str): Eliminate dead code and dead param.
3034 (pulongest): Drop dead param from call to decimal2str.
3035 (plongest): Ditto.
3036
633ff500
JB
30372011-02-24 Joel Brobecker <brobecker@adacore.com>
3038
3039 Revert the following patch (not approved yet):
3040 2011-02-21 Hui Zhu <teawater@gmail.com>
3041 * tracepoint.c (tp_printf): New function.
3042 (eval_agent_expr): Handle gdb_agent_op_printf.
3043
f9c6ff72
HZ
30442011-02-21 Hui Zhu <teawater@gmail.com>
3045
3046 * tracepoint.c (tp_printf): New function.
3047 (eval_agent_expr): Handle gdb_agent_op_printf.
3048
94d5e490
TT
30492011-02-18 Tom Tromey <tromey@redhat.com>
3050
3051 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3052 (tracepoint.o): Likewise.
3053 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3054 (gdb_agent_op_names): Likewise.
3055
c7f96d2b
TT
30562011-02-18 Tom Tromey <tromey@redhat.com>
3057
3058 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3059 gdb_agent_op_rot>: New constants.
3060 (gdb_agent_op_names): Add pick and roll.
3061 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3062 cases.
3063
0feedb2c
JK
30642011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3065
3066 * aclocal.m4: Regenerated with aclocal-1.11.1.
3067
b3b9301e
PA
30682011-02-14 Pedro Alves <pedro@codesourcery.com>
3069
3070 * server.c (handle_qxfer_traceframe_info): New.
3071 (qxfer_packets): Register "traceframe-info".
3072 (handle_query): Report support for qXfer:traceframe-info:read+.
3073 * tracepoint.c (match_blocktype): New.
3074 (traceframe_find_block_type): Rename to ...
3075 (traceframe_walk_blocks): ... this. Add callback filter argument,
3076 and use it.
3077 (traceframe_find_block_type): New, reimplemented on top of
3078 traceframe_walk_blocks.
3079 (build_traceframe_info_xml): New.
3080 (traceframe_read_info): New.
3081 * server.h (traceframe_read_info): Declare.
3082
4f3e6fb7
YQ
30832011-02-11 Yao Qi <yao@codesourcery.com>
3084
3085 * configure.ac: Call AC_PROG_RANLIB.
3086 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3087 * configure: Regenerate.
3088
764880b7
PA
30892011-02-07 Pedro Alves <pedro@codesourcery.com>
3090
3091 * server.c (gdb_read_memory): Change return semantics to allow
3092 partial transfers.
3093 (handle_search_memory_1): Adjust.
3094 (process_serial_event) <'m' packet>: Handle partial transfers.
3095 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3096
1c79eb8a
PA
30972011-01-28 Pedro Alves <pedro@codesourcery.com>
3098
3099 * regcache.c (init_register_cache): Initialize
3100 regcache->register_status.
3101 (free_register_cache): Release regcache->register_status.
3102 (regcache_cpy): Copy register_status.
3103 (registers_to_string): Print 'x's for unavailable registers.
3104 (supply_register): Mark the register's status valid or
3105 unavailable, depending on whether a buffer was passed in or not.
3106 (supply_register_zeroed): New.
3107 (supply_regblock): Mark the registers' status valid or
3108 unavailable, depending on whether a buffer was passed in or not.
3109 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3110 (struct regcache): New `register_status' field.
3111 (supply_register_zeroed): Declare.
3112 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3113 supply_register_zeroed, rather than passing a NULL buffer to
3114 supply_register.
3115 * tracepoint.c (fetch_traceframe_registers): Update comment.
3116
85724a0e
PA
31172011-01-28 Pedro Alves <pedro@codesourcery.com>
3118
3119 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3120 buffer explicit.
3121
d08aafef
PA
31222011-01-25 Pedro Alves <pedro@codesourcery.com>
3123
3124 * server.h (decode_xfer_write): Change prototype.
3125 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3126 and don't extract the annex here.
3127 * server.c (decode_xfer_read): Remove `annex' parameter,
3128 and don't extract the annex here.
3129 (decode_xfer): New.
3130 (struct qxfer): New.
3131 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3132 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3133 (handle_qxfer_statictrace): New functions, abstracted out from
3134 handle_query, and made to use the struct qxfer interface.
3135 (handle_threads_qxfer_proper): Rename to ...
3136 (handle_qxfer_threads_proper): ... this.
3137 (handle_threads_qxfer): Rename to ...
3138 (handle_qxfer_threads): ... this. Adjust.
3139 (qxfer_packets): New array.
3140 (handle_qxfer): New function.
3141 (handle_query): Use handle_qxfer.
3142
493e2a69
MS
31432011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3144
3145 * gdbreplay.c: Shorten lines of >= 80 columns.
3146 * linux-low.c: Ditto.
3147 * linux-ppc-low.c: Ditto.
3148 * linux-s390-low.c: Ditto.
3149 * linux-sparc-low.c: Ditto.
3150 * linux-x86-low.c: Ditto.
3151 * linux-xtensa-low.c: Ditto.
3152 * mem-break.c: Ditto.
3153 * nto-low.c: Ditto.
3154 * regcache.h: Ditto.
3155 * remote-utils.c: Ditto.
3156 * server.c: Ditto.
3157 * server.h: Ditto.
3158 * thread-db.c: Ditto.
3159 * tracepoint.c: Ditto.
3160 * utils.c: Ditto.
3161 * win32-low.h: Ditto.
3162
44944448
JB
31632011-01-05 Joel Brobecker <brobecker@adacore.com>
3164
3165 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3166 update.
3167
71ce852c
JB
31682011-01-01 Joel Brobecker <brobecker@adacore.com>
3169
3170 * server.c (gdbserver_version): Update copyright year in version
3171 output.
3172 * gdbreplay.c (gdbreplay_version): Ditto.
3173
eb826dc6
MF
31742010-12-29 Jie Zhang <jie.zhang@analog.com>
3175
3176 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3177 * linux-bfin-low.c: New file.
3178 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3179 PT_DATA_ADDR for BFIN targets.
3180 * Makefile.in (SFILES): Add linux-bfin-low.c.
3181 (clean): Remove reg-bfin.c.
3182 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3183 * README: Mention supported Blackfin targets.
3184
39ab222a
MF
31852010-12-23 Mike Frysinger <vapier@gentoo.org>
3186
3187 * .gitignore: New file.
3188
a1f2ce7d
MF
31892010-11-16 Mike Frysinger <vapier@gentoo.org>
3190
3191 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3192
f474844c
JZ
31932010-10-22 Jie Zhang <jie@codesourcery.com>
3194
3195 * Makefile.in: Add FLAGS_TO_PASS variable.
3196 (install): Remove dependency of install-only and recursively
3197 invoke make for install-only.
3198
f1048712
DE
31992010-10-04 Doug Evans <dje@google.com>
3200
3201 * Makefile.in (uninstall): Use $(DESTDIR).
3202
b53a1623
PA
32032010-09-24 Pedro Alves <pedro@codesourcery.com>
3204
e6ee044d
PA
3205 PR gdb/11842
3206
b53a1623
PA
3207 * linux-x86-low.c (compat_siginfo_from_siginfo)
3208 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3209 si_code is < 0. Check for si_code == SI_TIMER before checking for
3210 si_code < 0.
3211
fa1bd1e4
JB
32122010-09-13 Joel Brobecker <brobecker@adacore.com>
3213
3214 * lynx-i386-low.c: New file.
3215 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3216
47fac8f8
JB
32172010-09-13 Joel Brobecker <brobecker@adacore.com>
3218
3219 * lynx-low.c (ptrace_request_to_str): Remove handling for
3220 request values that have been removed in LynxOS 5.x.
3221
1adfc54d
JB
32222010-09-13 Joel Brobecker <brobecker@adacore.com>
3223
3224 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3225 <ptrace.h>
3226
c2a66c29
NS
32272010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3228
3229 * configure.ac: Add --enable-inprocess-agent option.
3230 * configure: Rebuilt.
3231
32fcada3
YQ
32322010-09-06 Yao Qi <yao@codesourcery.com>
3233
3234 * linux-low.c (linux_kill): Remove unused variable.
3235 (linux_stabilize_threads): Likewise.
3236 * server.c (start_inferior): Likewise.
3237 (queue_stop_reply_callback): Likewise.
3238 * tracepoint.c (do_action_at_tracepoint): Likewise.
3239
0cccb683
YQ
32402010-09-06 Yao Qi <yao@codesourcery.com>
3241
3242 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3243 on return.
3244
423ec54c
JK
32452010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3246
3247 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3248
12ac6819
PA
32492010-09-06 Pedro Alves <pedro@codesourcery.com>
3250
3251 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3252 "$(IPA_DEPFILES)".
3253
8ed54b31
JB
32542010-09-01 Joel Brobecker <brobecker@adacore.com>
3255
3256 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3257 gdbserver/lynx-ppc-low.c: New files.
3258 * Makefile.in (lynx_low_h): New variable.
3259 (lynx-low.o, lynx-ppc-low.o): New rules.
3260 * configure.ac: On LynxOS, link with -lnetinet.
3261 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3262 * configure: regenerate.
3263
bb0116a4
JB
32642010-09-01 Joel Brobecker <brobecker@adacore.com>
3265
3266 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3267 * configure.ac: Add check for vasprintf and vsnprintf.
3268 * configure, config.in: Regenerate.
3269 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3270
a778ab81 32712010-09-01 Joel Brobecker <brobecker@adacore.com>
3272
3273 * gdbreplay.c: Move include of alloca.h up, next to include of
3274 malloc.h.
3275 * server.h: Add include of malloc.h.
3276 * mem-break.c: Remove include of malloc.h.
3277 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3278
8b034a19 32792010-09-01 Joel Brobecker <brobecker@adacore.com>
3280
3281 * Makefile.in (memmem.o): Build with -Wno-error.
3282
32832010-09-01 Joel Brobecker <brobecker@adacore.com>
3284
3285 * utils.c (xsnprintf): Make non-static.
3286 * server.h: Add xsnprintf declaration.
3287 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3288 replace calls to snprintf by calls to xsnprintf throughout.
3289
32902010-09-01 Joel Brobecker <brobecker@adacore.com>
3291
3292 * configure.ac: Add configure check for alloca.
3293 * configure, config.in: Regenerate.
3294 * server.h: Include alloca.h if it exists.
3295 * gdbreplay.c: Include alloca.h if it exists.
3296
1a981360
PA
32972010-08-28 Pedro Alves <pedro@codesourcery.com>
3298
3299 * linux-low.c (__SIGRTMIN): Define if not already defined.
3300 (linux_create_inferior): Check for __ANDROID__ rather than
3301 __SIGRTMIN.
3302 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3303 are already deferred.
3304 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3305 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3306 stopped and already has a pending signal to report.
3307 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3308 a pending signal to report or is moving out of a jump pad.
3309 (linux_init_signals): Check for __ANDROID__ rather than
3310 __SIGRTMIN.
3311
b4d51a55
PA
33122010-08-28 Pedro Alves <pedro@codesourcery.com>
3313
3314 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3315 debug_threads check. Avoid a linear search when not doing debug
3316 output.
3317
ec48365d
PA
33182010-08-27 Pedro Alves <pedro@codesourcery.com>
3319
3320 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3321 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3322 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3323 (process_event): Change local fd's type to gdb_fildes_t.
3324 (create_file_handler): Adjust prototype.
3325 (delete_file_handler): Adjust prototype.
3326 (handle_file_event): Adjust prototype. Use pfildes.
3327 (create_file_event): Adjsut prototype.
3328 * remote-utils.c (remote_desc, listen_desc): Change type to
3329 gdb_fildes_t.
3330 * server.h: New gdb_fildes_t typedef.
3331 [USE_WIN32API]: Include winsock2.h.
3332 (delete_file_handler, add_file_handler): Adjust prototypes.
3333 (pfildes): Declare.
3334 * utils.c (pfildes): New.
3335
854d88f0
PA
33362010-08-27 Pedro Alves <pedro@codesourcery.com>
3337
3338 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3339 * configure: Regenerate.
3340
0146f85b
PA
33412010-08-27 Pedro Alves <pedro@codesourcery.com>
3342
3343 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3344 (linux_done_accessing_memory): ... this.
3345 (linux_target_ops): Adjust.
3346 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3347 * nto-low.c (nto_target_ops): Adjust comment.
3348 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3349 * spu-low.c (spu_target_ops): Adjust comment.
3350 * target.h (target_ops): Rename unprepare_to_access_memory field
3351 to done_accessing_memory.
3352 (unprepare_to_access_memory): Rename to ...
3353 (done_accessing_memory): ... this.
3354
90d74c30
PA
33552010-08-26 Pedro Alves <pedro@codesourcery.com>
3356
3357 * linux-low.c (linux_prepare_to_access_memory): New.
3358 (linux_unprepare_to_access_memory): New.
3359 (linux_target_ops): Install them.
3360 * server.c (read_memory): Rename to ...
3361 (gdb_read_memory): ... this. Use
3362 prepare_to_access_memory/prepare_to_access_memory.
3363 (write_memory): Rename to ...
3364 (gdb_write_memory): ... this. Use
3365 prepare_to_access_memory/prepare_to_access_memory.
3366 (handle_search_memory_1): Adjust.
3367 (process_serial_event): Adjust.
3368 * target.h (struct target_ops): New fields
3369 prepare_to_access_memory and unprepare_to_access_memory.
3370 (prepare_to_access_memory, unprepare_to_access_memory): New.
3371 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3372 prepare_to_access_memory/prepare_to_access_memory.
3373 * nto-low.c (nto_target_ops): Adjust.
3374 * spu-low.c (spu_target_ops): Adjust.
3375 * win32-low.c (win32_target_ops): Adjust.
3376
fd467969
PA
33772010-08-26 Pedro Alves <pedro@codesourcery.com>
3378
3379 * Makefile.in (WARN_CFLAGS): Get it from configure.
3380 (WERROR_CFLAGS): New.
3381 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3382 * configure.ac: Introduce --enable-werror, which adds -Werror to
3383 the compiler command line. Enabled by default. Disable with
3384 --disable-werror. Add -Wdeclaration-after-statement
3385 Wpointer-arith and -Wformat-nonliteral to warning flags.
3386 * configure: Regenerate.
3387
331e2f5f
PA
33882010-08-26 Pedro Alves <pedro@codesourcery.com>
3389
3390 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3391
e581f2b4
PA
33922010-08-26 Pedro Alves <pedro@codesourcery.com>
3393
3394 * gdbreplay.c (remote_error): New.
3395 (gdbchar): New.
3396 (expect): Use gdbchar. Check for error reading from GDB.
3397 Clarify sync error output.
3398 (play): Check for errors writing to GDB.
3399 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3400 * remote-utils.c (getpkt): Check for errors writing to the remote
3401 descriptor.
3402
3c11dd79
PA
34032010-08-25 Pedro Alves <pedro@codesourcery.com>
3404
3405 * linux-low.c (linux_wait_1): Move non-debugging code out of
3406 `debug_threads' control.
3407
d20a8ad9
PA
34082010-08-25 Pedro Alves <pedro@codesourcery.com>
3409
3410 * linux-low.c (linux_wait_1): Don't set last_status here.
3411 * server.c (push_event, queue_stop_reply_callback): Assert we're
3412 not pushing a TARGET_WAITKIND_IGNORE event.
3413 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3414 (myresume, handle_target_event): Set the thread's last_resume_kind
3415 and last_status from the target returned status.
3416
964e4306
PA
34172010-08-25 Pedro Alves <pedro@codesourcery.com>
3418
3419 PR threads/10729
3420
3421 * linux-x86-low.c (update_debug_registers_callback): New.
3422 (i386_dr_low_set_addr): Use it.
3423 (i386_dr_low_get_addr): New.
3424 (i386_dr_low_set_control): Use update_debug_registers_callback.
3425 (i386_dr_low_get_control): New.
3426 (i386_dr_low_get_status): Adjust.
3427 * linux-low.c (linux_stop_lwp): New.
3428 * linux-low.h (linux_stop_lwp): Declare.
3429
3430 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3431 argument instead of a i386_debug_reg_state.
3432 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3433 a i386_debug_reg_state.
3434 (i386_insert_aligned_watchpoint): Adjust.
3435 (i386_remove_aligned_watchpoint): Adjust.
3436 (i386_low_stopped_data_address): Read the debug registers from the
3437 inferior instead of from the mirrors.
3438 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3439 (i386_dr_low_get_addr): Declare.
3440 (i386_dr_low_get_control): Declare.
3441 (i386_dr_low_get_status): Change prototype.
3442
3443 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3444 (i386_dr_low_get_addr): New.
3445 (i386_dr_low_get_control): New.
3446 (i386_dr_low_get_status): Adjust prototype. Return
3447 dr_status_mirror.
3448 (i386_initial_stuff): Clear dr_status_mirror and
3449 dr_control_mirror.
3450 (i386_get_thread_context): Adjust.
3451 (i386_set_thread_context): Adjust.
3452 (i386_thread_added): Adjust.
3453
5f21a75b
PA
34542010-08-24 Pedro Alves <pedro@codesourcery.com>
3455
3456 * linux-low.h (linux_thread_area): Delete declaration.
3457
3e4c1235
TS
34582010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3459
3460 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3461 after its termination.
3462
1971b033
PA
34632010-08-09 Pedro Alves <pedro@codesourcery.com>
3464
3465 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3466 (gdb_wants_all_stopped): Delete.
3467 (linux_wait_1): Don't call them.
3468 * server.c (handle_v_cont): Tag all threads as want-stopped.
3469 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3470 stopped as "client-wants-stopped".
3471
310444ac
PA
34722010-07-31 Pedro Alves <pedro@codesourcery.com>
3473
3474 * Makefile.in (signals_h): New.
3475 (server_h): Depend on it.
3476 (server.o): Don't depend on $(signals_def).
3477 (signals.o): Depend on $(signals_def).
3478
a19cae16
JK
34792010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3480
3481 * Makefile.in (signals_def): New.
3482 (server_h): Append include/gdb/signals.h and signals_def.
3483 (server.o): Append signals_def.
3484
30d50328
JK
34852010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3486
3487 * server.c (handle_target_event): Use target_signal_to_host for
3488 resume_info.sig initialization.
3489 * target.h (struct thread_resume) <sig>: New comment.
3490
5c3216e2
OS
34912010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3492
c6f46ca0
OS
3493 * server.c (handle_query): strcpy() the returned string from paddress()
3494 instead of sprintf().
5c3216e2
OS
3495 * utils.c (paddress): Return phex_nz().
3496
6bd31874
JB
34972010-07-07 Joel Brobecker <brobecker@adacore.com>
3498
3499 * server.c (handle_v_cont): Call mourn_inferior if process
3500 just exited.
3501 (myresume): Likewise.
3502
0fb4aa4b
PA
35032010-07-01 Pedro Alves <pedro@codesourcery.com>
3504
3505 Static tracepoints, and integration with UST.
3506
3507 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3508 * mem-break.c (uninsert_all_breakpoints)
3509 (reinsert_all_breakpoints): New.
3510 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3511 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3512 (gdb_agent_ust_loaded, helper_thread_id)
3513 (gdb_agent_helper_thread_id): New macros.
3514 (struct ipa_sym_addresses): Add addr_ust_loaded,
3515 addr_helper_thread_id, addr_cmd_buf.
3516 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3517 (in_process_agent_loaded_ust): New.
3518 (write_e_ust_not_loaded): New.
3519 (maybe_write_ipa_ust_not_loaded): New.
3520 (struct collect_static_trace_data_action): New.
3521 (enum tracepoint_type) <static_tracepoint>: New.
3522 (struct tracepoint) <handle>: Mention static tracepoints.
3523 (struct static_tracepoint_ctx): New.
3524 (CMD_BUF_SIZE): New.
3525 (add_tracepoint_action): Handle static tracepoint actions.
3526 (unprobe_marker_at): New.
3527 (clear_installed_tracepoints): Handle static tracepoints.
3528 (cmd_qtdp): Handle static tracepoints.
3529 (probe_marker_at): New.
3530 (cmd_qtstart): Handle static tracepoints.
3531 (response_tracepoint): Handle static tracepoints.
3532 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3533 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3534 (get_context_regcache): Handle static tracepoints.
3535 (do_action_at_tracepoint): Handle static tracepoint actions.
3536 (traceframe_find_block_type): Handle static trace data blocks.
3537 (traceframe_read_sdata): New.
3538 (download_tracepoints): Download static tracepoint actions.
3539 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3540 (GDB_PROBE_NAME): New.
3541 (ust_ops): New.
3542 (GET_UST_SYM): New.
3543 (USTF): New.
3544 (dlsym_ust): New.
3545 (ust_marker_to_static_tracepoint): New.
3546 (gdb_probe): New.
3547 (collect_ust_data_at_tracepoint): New.
3548 (gdb_ust_probe): New.
3549 (UNIX_PATH_MAX, SOCK_DIR): New.
3550 (gdb_ust_connect_sync_socket): New.
3551 (resume_thread, stop_thread): New.
3552 (run_inferior_command): New.
3553 (init_named_socket): New.
3554 (gdb_ust_socket_init): New.
3555 (cstr_to_hexstr): New.
3556 (next_st): New.
3557 (first_marker, next_marker): New.
3558 (response_ust_marker): New.
3559 (cmd_qtfstm, cmd_qtsstm): New.
3560 (unprobe_marker_at, probe_marker_at): New.
3561 (cmd_qtstmat, gdb_ust_thread): New.
3562 (gdb_ust_init): New.
3563 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3564 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3565 (ST_REGENTRY): New.
3566 (x86_64_st_collect_regmap): New.
3567 (X86_64_NUM_ST_COLLECT_GREGS): New.
3568 (AMD64_RIP_REGNUM): New.
3569 (supply_static_tracepoint_registers): New.
3570 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3571 (ST_REGENTRY): New.
3572 (i386_st_collect_regmap): New.
3573 (i386_NUM_ST_COLLECT_GREGS): New.
3574 (supply_static_tracepoint_registers): New.
3575 * server.c (handle_query): Handle qXfer:statictrace:read.
3576 <qSupported>: Report support for StaticTracepoints, and
3577 qXfer:statictrace:read features.
3578 * server.h (traceframe_read_sdata)
3579 (supply_static_tracepoint_registers): Declare.
3580 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3581 (unpack_varlen_hex): Include in IPA build.
3582 * Makefile.in (ustlibs, ustinc): New.
3583 (IPA_OBJS): Add remote-utils-ipa.o.
3584 ($(IPA_LIB)): Link -ldl and -lpthread.
3585 (UST_CFLAGS): New.
3586 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3587 * config.in, configure: Regenerate.
3588
9e4344e5
PA
35892010-06-20 Ian Lance Taylor <iant@google.com>
3590 Pedro Alves <pedro@codesourcery.com>
3591
3592 * linux-x86-low.c (always_true): Delete.
3593 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3594 trying to fool the compiler with always_true.
3595
c6beb2cb
PA
35962010-06-20 Pedro Alves <pedro@codesourcery.com>
3597
3598 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3599 conditions in gdbserver.
3600
d2ed6730
UW
36012010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3602
3603 * spu-low.c (spu_read_memory): Wrap around local store limit.
3604 (spu_write_memory): Likewise.
3605
4e29fb54
PA
36062010-06-15 Pedro Alves <pedro@codesourcery.com>
3607
3608 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3609 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3610 LONGEST uses.
3611 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3612 uses.
3613 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3614 uses with LONGEST uses.
3615
6a271cae
PA
36162010-06-14 Stan Shebs <stan@codesourcery.com>
3617 Pedro Alves <pedro@codesourcery.com>
3618
3619 Bytecode compiler.
3620
3621 * linux-x86-low.c: Include limits.h.
3622 (add_insns): New.
3623 (always_true): New.
3624 (EMIT_ASM): New.
3625 (EMIT_ASM32): New.
3626 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3627 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3628 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3629 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3630 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3631 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3632 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3633 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3634 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3635 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3636 (amd64_emit_void_call_2): New.
3637 (amd64_emit_ops): New.
3638 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3639 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3640 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3641 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3642 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3643 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3644 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3645 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3646 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3647 (i386_emit_stack_adjust, i386_emit_int_call_1)
3648 (i386_emit_void_call_2): New.
3649 (i386_emit_ops): New.
3650 (x86_emit_ops): New.
3651 (the_low_target): Install x86_emit_ops.
3652 * server.h (struct emit_ops): New.
3653 (get_raw_reg_func_addr): Declare.
3654 (current_insn_ptr, emit_error): Declare.
3655 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3656 (set_trace_state_variable_value): New defines.
3657 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3658 addr_get_trace_state_variable_value and
3659 addr_set_trace_state_variable_value.
3660 (symbol_list): New fields for get_raw_reg,
3661 get_trace_state_variable_value and set_trace_state_variable_value.
3662 (condfn): New typedef.
3663 (struct tracepoint): New field `compiled_cond'.
3664 (do_action_at_tracepoint): Clear compiled_cond.
3665 (get_trace_state_variable_value, set_trace_state_variable_value):
3666 Export in the IPA.
3667 (condition_true_at_tracepoint): If there's a compiled condition,
3668 run that.
3669 (current_insn_ptr, emit_error): New globals.
3670 (struct bytecode_address): New.
3671 (get_raw_reg_func_addr): New.
3672 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3673 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3674 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3675 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3676 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3677 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3678 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3679 (compile_tracepoint_condition, compile_bytecodes): New.
3680 * target.h (emit_ops): Forward declare.
3681 (struct target_ops): New field emit_ops.
3682 (target_emit_ops): New.
3683 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3684 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3685 * linux-low.c (linux_emit_ops): New.
3686 (linux_target_ops): Install it.
3687 * linux-low.h (struct linux_target_ops): New field emit_ops.
3688
92b72907
UW
36892010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3690
3691 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3692 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3693
fa593d66
PA
36942010-06-01 Pedro Alves <pedro@codesourcery.com>
3695 Stan Shebs <stan@codesourcery.com>
3696
3697 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3698 (all): Depend on $(extra_libraries).
3699 (install-only): Install the IPA.
3700 (IPA_OBJS, IPA_LIB): New.
3701 (clean): Remove the IPA lib.
3702 (IPAGENT_CFLAGS): New.
3703 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3704 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3705 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3706 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3707 * configure.ac: Check for atomic builtins support in the compiler.
3708 (IPA_DEPFILES, extra_libraries): Define.
3709 * configure.srv (ipa_obj): Add description.
3710 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3711 (i[34567]86-*-linux*): Set ipa_obj.
3712 (x86_64-*-linux*): Set ipa_obj.
3713 * linux-low.c (stabilizing_threads): New.
3714 (supports_fast_tracepoints): New.
3715 (linux_detach): Stabilize threads before detaching.
3716 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3717 the lwp is either not stabilizing, or is moving out of a jump pad.
3718 (linux_fast_tracepoint_collecting): New.
3719 (maybe_move_out_of_jump_pad): New.
3720 (enqueue_one_deferred_signal): New.
3721 (dequeue_one_deferred_signal): New.
3722 (linux_wait_for_event_1): If moving out of a jump pad, defer
3723 pending signals to later.
3724 (linux_stabilize_threads): New.
3725 (linux_wait_1): Check if threads need moving out of jump pads, and
3726 do it if so.
3727 (stuck_in_jump_pad_callback): New.
3728 (move_out_of_jump_pad_callback): New.
3729 (lwp_running): New.
3730 (linux_resume_one_lwp): Handle moving out of jump pads.
3731 (linux_set_resume_request): Dequeue deferred signals.
3732 (need_step_over_p): Also step over fast tracepoint jumps.
3733 (start_step_over): Also uninsert fast tracepoint jumps.
3734 (finish_step_over): Also reinsert fast tracepoint jumps.
3735 (linux_install_fast_tracepoint_jump): New.
3736 (linux_target_ops): Install linux_stabilize_threads and
3737 linux_install_fast_tracepoint_jump_pad.
3738 * linux-low.h (linux_target_ops) <get_thread_area,
3739 install_fast_tracepoint_jump_pad>: New fields.
3740 (struct lwp_info) <collecting_fast_tracepoint,
3741 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3742 (linux_get_thread_area): Declare.
3743 * linux-x86-low.c (jump_insn): New.
3744 (x86_get_thread_area): New.
3745 (append_insns): New.
3746 (push_opcode): New.
3747 (amd64_install_fast_tracepoint_jump_pad): New.
3748 (i386_install_fast_tracepoint_jump_pad): New.
3749 (x86_install_fast_tracepoint_jump_pad): New.
3750 (the_low_target): Install x86_get_thread_area and
3751 x86_install_fast_tracepoint_jump_pad.
3752 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3753 (struct fast_tracepoint_jump): New.
3754 (fast_tracepoint_jump_insn): New.
3755 (fast_tracepoint_jump_shadow): New.
3756 (find_fast_tracepoint_jump_at): New.
3757 (fast_tracepoint_jump_here): New.
3758 (delete_fast_tracepoint_jump): New.
3759 (set_fast_tracepoint_jump): New.
3760 (uninsert_fast_tracepoint_jumps_at): New.
3761 (reinsert_fast_tracepoint_jumps_at): New.
3762 (set_breakpoint_at): Use write_inferior_memory.
3763 (uninsert_raw_breakpoint): Use write_inferior_memory.
3764 (check_mem_read): Mask out fast tracepoint jumps.
3765 (check_mem_write): Mask out fast tracepoint jumps.
3766 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3767 (set_fast_tracepoint_jump): Declare.
3768 (delete_fast_tracepoint_jump)
3769 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3770 (reinsert_fast_tracepoint_jumps_at): Declare.
3771 * regcache.c: Don't compile many functions when building the
3772 in-process agent library.
3773 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3774 the register buffer in the heap.
3775 (free_register_cache): If the register buffer isn't owned by the
3776 regcache, don't free it.
3777 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3778 pre-existing register caches.
3779 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3780 type.
3781 (convert_ascii_to_int): : Constify `from' parameter type.
3782 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3783 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3784 the needed buffer in-place.
3785 (relocate_instruction): New.
3786 * server.c (handle_query) <qSymbols>: If the target supports
3787 tracepoints, give it a chance of looking up symbols. Report
3788 support for fast tracepoints.
3789 (handle_status): Stabilize threads.
3790 (process_serial_event): Adjust.
3791 * server.h (struct fast_tracepoint_jump): Forward declare.
3792 (struct process_info) <fast_tracepoint_jumps>: New field.
3793 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3794 (decode_X_packet, decode_M_packet): Adjust.
3795 (relocate_instruction): Declare.
3796 (in_process_agent_loaded): Declare.
3797 (tracepoint_look_up_symbols): Declare.
3798 (struct fast_tpoint_collect_status): Declare.
3799 (fast_tracepoint_collecting): Declare.
3800 (force_unlock_trace_buffer): Declare.
3801 (handle_tracepoint_bkpts): Declare.
3802 (initialize_low_tracepoint)
3803 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3804 * target.h (struct target_ops) <stabilize_threads,
3805 install_fast_tracepoint_jump_pad>: New fields.
3806 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3807 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3808 [HAVE_STDINT_H]: Include stdint.h.
3809 (trace_debug_1): Rename to ...
3810 (trace_vdebug): ... this.
3811 (trace_debug): Rename to ...
3812 (trace_debug_1): ... this. Add `level' parameter.
3813 (trace_debug): New.
3814 (ATTR_USED, ATTR_NOINLINE): New.
3815 (IP_AGENT_EXPORT): New.
3816 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3817 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3818 (about_to_request_buffer_space, trace_buffer_is_full)
3819 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3820 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3821 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3822 (traceframe_write_count, traceframes_created)
3823 (trace_state_variables)
3824 New renaming defines.
3825 (struct ipa_sym_addresses): New.
3826 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3827 (symbol_list): New.
3828 (ipa_sym_addrs): New.
3829 (all_tracepoint_symbols_looked_up): New.
3830 (in_process_agent_loaded): New.
3831 (write_e_ipa_not_loaded): New.
3832 (maybe_write_ipa_not_loaded): New.
3833 (tracepoint_look_up_symbols): New.
3834 (debug_threads) [IN_PROCESS_AGENT]: New.
3835 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3836 (UNKNOWN_SIDE_EFFECTS): New.
3837 (stop_tracing): New.
3838 (flush_trace_buffer): New.
3839 (stop_tracing_bkpt): New.
3840 (flush_trace_buffer_bkpt): New.
3841 (read_inferior_integer): New.
3842 (read_inferior_uinteger): New.
3843 (read_inferior_data_pointer): New.
3844 (write_inferior_data_pointer): New.
3845 (write_inferior_integer): New.
3846 (write_inferior_uinteger): New.
3847 (struct collect_static_trace_data_action): Delete.
3848 (enum tracepoint_type): New.
3849 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
3850 <actions_str, step_actions, step_actions_str>: Only include in
3851 GDBserver.
fa593d66
PA
3852 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3853 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3854 (tracepoints): Use IP_AGENT_EXPORT.
3855 (last_tracepoint): Don't include in the IPA.
3856 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3857 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3858 (alloced_trace_state_variables): New.
3859 (trace_state_variables): Use IP_AGENT_EXPORT.
3860 (traceframe_t): Delete unused variable.
3861 (circular_trace_buffer): Don't include in the IPA.
3862 (trace_buffer_start): Delete.
3863 (struct trace_buffer_control): New.
3864 (trace_buffer_free): Delete.
3865 (struct ipa_trace_buffer_control): New.
3866 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3867 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3868 New.
3869 (trace_buffer_ctrl): New.
3870 (TRACE_BUFFER_CTRL_CURR): New.
3871 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3872 Reimplement as macros.
3873 (trace_buffer_wrap): Delete.
3874 (traceframe_write_count, traceframe_read_count)
3875 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3876 (struct tracepoint_hit_ctx) <type>: New field.
3877 (struct fast_tracepoint_ctx): New.
3878 (memory_barrier): New.
3879 (cmpxchg): New.
3880 (record_tracepoint_error): Update atomically in the IPA.
3881 (clear_inferior_trace_buffer): New.
3882 (about_to_request_buffer_space): New.
3883 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3884 updating the same buffer.
3885 (add_tracepoint): Default the tracepoint's type to trap
3886 tracepoint, and orig_size to -1.
3887 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3888 internal variables.
3889 (create_trace_state_variable): New parameter `gdb'. Handle it.
3890 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3891 (cmd_qtdp): Handle fast tracepoints.
3892 (cmd_qtdv): Adjust.
3893 (max_jump_pad_size): New.
3894 (gdb_jump_pad_head): New.
3895 (get_jump_space_head): New.
3896 (claim_jump_space): New.
3897 (sort_tracepoints): New.
3898 (MAX_JUMP_SIZE): New.
3899 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3900 IPA.
3901 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3902 support. Upload fast traceframes, and delete internal IPA
3903 breakpoints.
3904 (stop_tracing_handler): New.
3905 (flush_trace_buffer_handler): New.
3906 (cmd_qtstop): Upload fast tracepoints.
3907 (response_tracepoint): Handle fast tracepoints.
3908 (tracepoint_finished_step): Upload fast traceframes. Set the
3909 tracepoint hit context's tracepoint type.
3910 (handle_tracepoint_bkpts): New.
3911 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3912 type. Add comment about fast tracepoints.
3913 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3914 non-existing action_str field.
3915 (get_context_regcache): Handle fast tracepoints.
3916 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3917 to the regcache.
3918 (fast_tracepoint_from_jump_pad_address): New.
3919 (fast_tracepoint_from_ipa_tpoint_address): New.
3920 (collecting_t): New.
3921 (force_unlock_trace_buffer): New.
3922 (fast_tracepoint_collecting): New.
3923 (collecting): New.
3924 (gdb_collect): New.
3925 (write_inferior_data_ptr): New.
3926 (target_tp_heap): New.
3927 (target_malloc): New.
3928 (download_agent_expr): New.
3929 (UALIGN): New.
3930 (download_tracepoints): New.
3931 (download_trace_state_variables): New.
3932 (upload_fast_traceframes): New.
3933 (IPA_FIRST_TRACEFRAME): New.
3934 (IPA_NEXT_TRACEFRAME_1): New.
3935 (IPA_NEXT_TRACEFRAME): New.
3936 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3937 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3938 (gdb_jump_pad_buffer_end): New.
3939 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3940 (initialize_tracepoint): Adjust.
3941 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3942 buffer. Initialize the low module.
3943 * utils.c (PREFIX, TOOLNAME): New.
3944 (malloc_failure): Use PREFIX.
3945 (error): In the IPA, an error causes an exit.
3946 (fatal, warning): Use PREFIX.
3947 (internal_error): Use TOOLNAME.
3948 (NUMCELLS): Increase to 10.
3949 * configure, config.in: Regenerate.
3950
d149dd1d
PA
39512010-06-01 Pedro Alves <pedro@codesourcery.com>
3952
3953 * server.c (handle_query) <qSupported>: Do two passes over the
3954 qSupported string to avoid nesting strtok.
3955
f6528abd
JK
39562010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3957
3958 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3959 (CDEPS): New.
3960 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3961 -Wl,--dynamic-list.
3962 * configure: Regenerate.
3963 * proc-service.list: New.
3964
ca2a87a0
JK
39652010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3966
3967 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3968 New comment.
3969
363a6e9f
OS
39702010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3971
3972 * gdbreplay.c (remote_open): Check error return from socket() call by
3973 its equality to -1 not by it being negative.
3974 * remote-utils.c (remote_open): Likewise.
3975
d23b6cb1
PA
39762010-05-23 Pedro Alves <pedro@codesourcery.com>
3977
3978 * config.h: Regenerate.
3979
28d3cf85
MK
39802010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3981
3982 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3983 doesn't provide PTRACE_GET_THREAD_AREA.
3984
fea36a59
MK
39852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3986
3987 * linux-m68k-low.c: Include <asm/ptrace.h>
3988 (ps_get_thread_area): Implement.
3989
24b066ba
DE
39902010-05-03 Doug Evans <dje@google.com>
3991
3992 * event-loop.c (struct callback_event): New struct.
3993 (callback_list): New global.
3994 (append_callback_event, delete_callback_event): New functions.
3995 (process_callback): New function.
3996 (start_event_loop): Call it.
3997 * remote-utils.c (NOT_SCHEDULED): Define.
3998 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3999 moved out of readchar.
4000 (readchar): Rewrite. Call reschedule before returning.
4001 (reset_readchar): New function.
4002 (remote_close): Call it.
4003 (process_remaining, reschedule): New functions.
4004 * server.h (callback_handler_func): New typedef.
4005 (append_callback_event, delete_callback_event): Declare.
4006
9836d6ea
PA
40072010-05-03 Pedro Alves <pedro@codesourcery.com>
4008
4009 * proc-service.c (ps_pglobal_lookup): Use
4010 thread_db_look_up_one_symbol.
4011 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4012 parameter. Use it instead of all_symbols_looked_up.
4013 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4014 field.
4015 (all_symbols_looked_up): Don't declare.
4016 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4017 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4018 field.
4019 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4020 Set all_symbols_looked_up here.
4021 (thread_db_look_up_one_symbol): New.
4022 (thread_db_get_tls_address): Adjust.
4023 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4024 thread_db object on the heap, and tentatively set it in the
4025 process structure.
4026 (thread_db_init): Don't set all_symbols_looked_up here.
4027 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4028
7984d532
PA
40292010-05-03 Pedro Alves <pedro@codesourcery.com>
4030
4031 * linux-low.c (linux_kill, linux_detach): Adjust.
4032 (status_pending_p_callback): Remove redundant statement. Check
4033 for !TARGET_WAITIKIND_IGNORE, instead of
4034 TARGET_WAITKIND_STOPPED.
4035 (handle_tracepoints): Make sure LWP is locked. Adjust.
4036 (linux_wait_for_event_1): Adjust.
4037 (linux_cancel_breakpoints): New.
4038 (unsuspend_one_lwp): New.
4039 (unsuspend_all_lwps): New.
4040 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4041 (send_sigstop_callback): Change return type to int, add new
4042 `except' parameter and handle it.
4043 (suspend_and_send_sigstop_callback): New.
4044 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4045 pass them down. If SUSPEND, also increment the lwp's suspend
4046 count.
4047 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4048 (need_step_over_p): Don't consider suspended LWPs.
4049 (start_step_over): Adjust.
4050 (proceed_one_lwp): Change return type to int, add new `except'
4051 parameter and handle it.
4052 (unsuspend_and_proceed_one_lwp): New.
4053 (proceed_all_lwps): Use find_inferior instead of
4054 for_each_inferior.
4055 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4056 also decrement the suspend count of LWPs. Pass `except' down,
4057 instead of hacking its suspend count.
4058 (linux_pause_all): Add `freeze' parameter. Adjust.
4059 (linux_unpause_all): New.
4060 (linux_target_ops): Install linux_unpause_all.
4061 * server.c (handle_status): Adjust.
4062 * target.h (struct target_ops): New fields `unpause_all' and
4063 `cancel_breakpoints'. Add new parameter to `pause_all'.
4064 (pause_all): Add new `freeze' parameter.
4065 (unpause_all): New.
4066 (cancel_breakpoints): New.
4067 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4068 cancel breakpoints.
4069 (cmd_qtstart): Pause threads.
4070 (stop_tracing): Pause threads, and cancel breakpoints.
4071 * win32-low.c (win32_target_ops): Adjust.
4072
e471f25b
PA
40732010-05-03 Pedro Alves <pedro@codesourcery.com>
4074
4075 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4076 the inferior right away from here...
4077 (linux_wait_1): ... to here, and adjust to check the thread's
4078 last_resume_kind instead of the lwp's step or stop_expected flags.
4079
1915ef4f
PA
40802010-05-02 Pedro Alves <pedro@codesourcery.com>
4081
4082 * README: Use consistent `GDB' and `GDBserver' spellings.
4083
f9e39928
PA
40842010-05-02 Pedro Alves <pedro@codesourcery.com>
4085
4086 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4087 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4088 (linux_detach_one_lwp): Assume the lwp is stopped.
4089 (any_thread_of): Delete.
4090 (linux_detach): Stop all lwps here. Don't blindly delete all
4091 breakpoints.
4092 (delete_lwp_callback): New.
4093 (linux_mourn): Delete all lwps of the process that is gone.
4094 (linux_wait_1): Don't delete the last lwp of the process here.
4095 * mem-break.h (mark_breakpoints_out): Declare.
4096 * mem-break.c (mark_breakpoints_out): New.
4097 (free_all_breakpoints): Use it.
4098 * server.c (handle_target_event): If the process is gone, mark
4099 breakpoints out.
4100 * thread-db.c (struct thread_db) <create_bp>: New field.
4101 (thread_db_enable_reporting): Fix prototype. Store a thread event
4102 breakpoint reference in the thread_db struct.
4103 (thread_db_load_search): Clear the thread_db object.
4104 (try_thread_db_load_1): Ditto.
4105 (switch_to_process): New.
4106 (disable_thread_event_reporting): Use it.
4107 (remove_thread_event_breakpoints): New.
4108 (thread_db_detach, thread_db_mourn): Use it.
4109
1e7fc18c
PA
41102010-05-01 Pedro Alves <pedro@codesourcery.com>
4111
4112 * linux-low.c (linux_enable_event_reporting): New.
4113 (linux_wait_for_event_1, handle_extended_wait): Use it.
4114
02fc4de7
PA
41152010-04-30 Pedro Alves <pedro@codesourcery.com>
4116
4117 * linux-low.c (linux_kill_one_lwp, linux_kill)
4118 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4119 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4120 SIGSTOP even if the LWP is stopped.
4121 (send_sigstop_callback): New.
4122 (stop_all_lwps): Use send_sigstop_callback instead.
4123 (linux_resume_one_thread): Adjust.
4124 (proceed_one_lwp): Still proceed an LWP that the client has
4125 requested to stop, if we haven't reported it as stopped yet. Make
4126 sure that LWPs the client want stopped, have a pending SIGSTOP.
4127
bc3b5632
DE
41282010-04-26 Doug Evans <dje@google.com>
4129
ae1ada35
DE
4130 * server.c (handle_general_set): Make static.
4131
bc3b5632
DE
4132 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4133 Print received char after testing for error/eof instead of before.
4134 (input_interrupt): Tweak comment.
4135
65730243
DE
41362010-04-23 Doug Evans <dje@google.com>
4137
4138 * server.c (start_inferior): Print inferior argv if --debug.
4139
a8ae7dc0
AR
41402010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4141
4142 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4143 * nto-x86-low.c: Include server.h
4144
1c07cc19
PM
41452010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4146
4147 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4148 be consistent with other sources of this directory.
4149 (init_registers_amd64): Correct name of source file of this function
4150 in the comment.
4151
e0a61e09
PM
41522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4153
4154 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4155 64-bit executables.
4156
54709339
PM
41572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4158
4159 * win32-i386-low.c: Add 64-bit support.
4160 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4161 (init_registers_amd64): Declare.
4162 (mappings): Add 64-bit version of array.
4163 (init_windows_x86): New function.
4164 (the_low_target): Change init_arch field to init_windows_x86.
4165
e8f0053d
PM
41662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4167
4168 * win32-low.c: Adapt to support also 64-bit architecture.
4169 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4170 (get_image_name): Use SIZE_T type for local variable `done'.
4171 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4172 (toolhelp_get_dll_name): Idem.
4173 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4174 Use uintptr_t typecast to avoid warning.
4175 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4176 (handle_exception): Use phex_nz to avoid warning.
4177 (win32_wait): Remove unused local variable `process'.
4178
c481e77e
PM
41792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4180
4181 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4182 `amd64-avx.o'.
4183
12ea4b69
PM
41842010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4185
4186 * configure.ac: Use `ws2_32' library for srv_mingw.
4187 * configure: Regenerate.
4188 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4189 * remote-utils.c: Likewise.
4190
f6d1620c
L
41912010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4192
4193 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4194 if __x86_64__ is defined.
4195
8e642873
PM
41962010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4197
4198 * configure: Regenerate.
4199
711e434b
PM
42002010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4201
4202 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4203 * target.h (target_ops): New get_tib_address field.
4204 * win32-low.h (win32_thread_info): Add thread_local_base field.
4205 * win32-low.c (child_add_thread): Add tlb argument.
4206 Set thread_local_base field to TLB.
4207 (get_child_debug_event): Adapt to child_add_thread change.
4208 (win32_get_tib_address): New function.
4209 (win32_target_ops): Set get_tib_address field to
4210 win32_get_tib_address.
4211 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4212
505106cd
PA
42132010-04-12 Pedro Alves <pedro@codesourcery.com>
4214
505106cd
PA
4215 * linux-low.c (linux_mourn): Also remove the process.
4216 * server.c (handle_target_event): Don't remove the process here.
4217 * nto-low.c (nto_mourn): New.
4218 (nto_target_ops): Install it.
4219 * spu-low.c (spu_mourn): New.
4220 (spu_target_ops): Install it.
4221 * win32-low.c (win32_mourn): New.
4222 (win32_target_ops): Install it.
4223
e8470a06
PA
42242010-04-12 Pedro Alves <pedro@codesourcery.com>
4225
4226 * server.h (buffer_xml_printf): Remove redundant `;'.
4227
45ba0d02
PA
42282010-04-12 Pedro Alves <pedro@codesourcery.com>
4229
4230 * regcache.c (set_register_cache): Invalidate regcaches before
4231 changing the register cache layout.
4232 (regcache_invalidate_one): Allow a NULL regcache.
4233 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4234 regcaches before changing the register cache layout or the target
4235 regsets.
4236
59e04013
L
42372010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4238
4239 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4240 variable warning on Linux/x86-64.
4241
8336d594
PA
42422010-04-11 Pedro Alves <pedro@codesourcery.com>
4243
4244 GDBserver disconnected tracing support.
4245
4246 * linux-low.c (linux_remove_process): Delete.
4247 (add_lwp): Don't set last_resume_kind here.
4248 (linux_kill): Use `mourn'.
4249 (linux_detach): Use `thread_db_detach', and `mourn'.
4250 (linux_mourn): New.
4251 (linux_attach_lwp_1): Adjust comment.
4252 (linux_attach): last_resume_kind moved the thread_info; adjust.
4253 (status_pending_p_callback): Adjust.
4254 (linux_wait_for_event_1): Adjust.
4255 (count_events_callback, select_singlestep_lwp_callback)
4256 (select_event_lwp_callback, cancel_breakpoints_callback)
4257 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4258 (proceed_one_lwp): Adjust.
4259 (linux_async): Add debug output.
4260 (linux_thread_stopped): New.
4261 (linux_pause_all): New.
4262 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4263 linux_pause_all.
4264 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4265 (thread_db_free): Delete declaration.
4266 (thread_db_detach, thread_db_mourn): Declare.
4267 * thread-db.c (thread_db_init): Use thread_db_mourn.
4268 (thread_db_free): Delete, split in two.
4269 (disable_thread_event_reporting): New.
4270 (thread_db_detach): New.
4271 (thread_db_mourn): New.
4272
4273 * server.h (struct thread_info) <last_resume_kind>: New field.
4274 <attached>: Add comment.
4275 <gdb_detached>: New field.
4276 (handler_func): Change return type to int.
4277 (handle_serial_event, handle_target_event): Ditto.
4278 (gdb_connected): Declare.
4279 (tracing): Delete.
4280 (disconnected_tracing): Declare.
4281 (stop_tracing): Declare.
4282
4283 * server.c (handle_query) <qSupported>: Report support for
4284 disconnected tracing.
4285 (queue_stop_reply_callback): Account for running threads.
4286 (gdb_wants_thread_stopped): New.
4287 (gdb_wants_all_threads_stopped): New.
4288 (gdb_reattached_process): New.
4289 (handle_status): Clear the `gdb_detached' flag of all processes.
4290 In all-stop, stop all threads.
4291 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4292 (process_serial_event): If the remote connection breaks, or if an
4293 exit was forced with "monitor exit", force an event loop exit.
4294 Handle disconnected tracing on detach.
4295 (handle_serial_event): Adjust.
4296 (handle_target_event): If GDB isn't connected, forward events back
4297 to the inferior, unless the last process exited, in which case,
4298 exit gdbserver. Adjust interface.
4299
4300 * remote-utils.c (remote_open): Don't block in accept. Instead
4301 register an event loop source on the listen socket file
4302 descriptor. Refactor bits into ...
4303 (listen_desc): ... this new global.
4304 (gdb_connected): ... this new function.
4305 (enable_async_notification): ... this new function.
4306 (handle_accept_event): ... this new function.
4307 (remote_close): Clear remote_desc.
4308
4309 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4310
4311 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4312 New fields.
4313 (mourn_inferior): Define.
4314 (target_process_qsupported): Avoid the dangling else problem.
4315 (thread_stopped): Define.
4316 (pause_all): Define.
4317 (target_waitstatus_to_string): Declare.
4318 * target.c (target_waitstatus_to_string): New.
4319
4320 * tracepoint.c (tracing): Make extern.
4321 (disconnected_tracing): New.
4322 (stop_tracing): Make extern. Handle tracing stops due to GDB
4323 disconnecting.
4324 (cmd_qtdisconnected): New.
4325 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4326 (handle_tracepoint_general_set): Handle QTDisconnected.
4327
4328 * event-loop.c (event_handler_func): Change return type to int.
4329 (process_event): Bail out if the event handler wants the event
4330 loop to stop.
4331 (handle_file_event): Ditto.
4332 (start_event_loop): Bail out if the event handler wants the event
4333 loop to stop.
4334
4335 * nto-low.c (nto_target_ops): Adjust.
4336 * spu-low.c (spu_wait): Don't remove the process here.
4337 (spu_target_ops): Adjust.
4338 * win32-low.c (win32_wait): Don't remove the process here.
4339 (win32_target_ops): Adjust.
4340
5d267c4c
PA
43412010-04-11 Pedro Alves <pedro@codesourcery.com>
4342
4343 * regcache.c (realloc_register_cache): Invalidate inferior's
4344 regcache before recreating it.
4345
623ccd72
PA
43462010-04-09 Pedro Alves <pedro@codesourcery.com>
4347
4348 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4349
219f2f23
PA
43502010-04-09 Stan Shebs <stan@codesourcery.com>
4351 Pedro Alves <pedro@codesourcery.com>
4352
4353 * server.h (LONGEST): New.
4354 (struct thread_info) <while_stepping>: New field.
4355 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4356 Declare.
4357 (initialize_tracepoint, handle_tracepoint_general_set)
4358 (handle_tracepoint_query, tracepoint_finished_step)
4359 (tracepoint_was_hit, release_while_stepping_state_list):
4360 (current_traceframe): Declare.
4361 * server.c (handle_general_set): Handle tracepoint packets.
4362 (read_memory): New.
4363 (write_memory): New.
4364 (handle_search_memory_1): Use read_memory.
4365 (handle_query): Report support for conditional tracepoints, trace
4366 state variables, and tracepoint sources. Handle tracepoint
4367 queries.
4368 (main): Initialize the tracepoints module.
4369 (process_serial_event): Handle traceframe reads/writes.
4370
4371 * linux-low.c (handle_tracepoints): New.
4372 (linux_wait_1): Call it.
4373 (linux_resume_one_lwp): Handle while-stepping.
4374 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4375 (linux_target_ops): Install them.
4376 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4377 New field.
4378 * linux-x86-low.c (x86_supports_tracepoints): New.
4379 (the_low_target). Install it.
4380
4381 * mem-break.h (delete_breakpoint): Declare.
4382 * mem-break.c (delete_breakpoint): Make external.
4383
4384 * target.h (struct target_ops): Add `supports_tracepoints',
4385 `read_pc', and `write_pc' fields.
4386 (target_supports_tracepoints): Define.
4387 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4388 (phex_nz): New.
4389
4390 * regcache.h (struct regcache) <registers_owned>: New field.
4391 (init_register_cache, regcache_cpy): Declare.
4392 (regcache_read_pc, regcache_write_pc): Declare.
4393 (register_cache_size): Declare.
4394 (supply_regblock): Declare.
4395 * regcache.c (init_register_cache): New.
4396 (new_register_cache): Use it.
4397 (regcache_cpy): New.
4398 (register_cache_size): New.
4399 (supply_regblock): New.
4400 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 4401
219f2f23
PA
4402 * tracepoint.c: New.
4403
4404 * Makefile.in (OBS): Add tracepoint.o.
4405 (tracepoint.o): New rule.
4406
3a13a53b
L
44072010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4408
4409 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4410 (i386-mmx.o): New.
4411 (i386-mmx.c): Likewise.
4412 (i386-mmx-linux.o): Likewise.
4413 (i386-mmx-linux.c): Likewise.
4414
4415 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4416 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4417 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4418 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4419
4420 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4421 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4422 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4423
1570b33e
L
44242010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4425
4426 * Makefile.in (clean): Updated.
4427 (i386-avx.o): New.
4428 (i386-avx.c): Likewise.
4429 (i386-avx-linux.o): Likewise.
4430 (i386-avx-linux.c): Likewise.
4431 (amd64-avx.o): Likewise.
4432 (amd64-avx.c): Likewise.
4433 (amd64-avx-linux.o): Likewise.
4434 (amd64-avx-linux.c): Likewise.
4435
4436 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4437 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4438 (srv_amd64_regobj): Add amd64-avx.o.
4439 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4440 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4441 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4442 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4443 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4444 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4445 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4446
4447 * i387-fp.c: Include "i386-xstate.h".
4448 (i387_xsave): New.
4449 (i387_cache_to_xsave): Likewise.
4450 (i387_xsave_to_cache): Likewise.
4451 (x86_xcr0): Likewise.
4452
4453 * i387-fp.h (i387_cache_to_xsave): Likewise.
4454 (i387_xsave_to_cache): Likewise.
4455 (x86_xcr0): Likewise.
4456
4457 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4458 * linux-crisv32-low.c (target_regsets): Likewise.
4459 * linux-m68k-low.c (target_regsets): Likewise.
4460 * linux-mips-low.c (target_regsets): Likewise.
4461 * linux-ppc-low.c (target_regsets): Likewise.
4462 * linux-s390-low.c (target_regsets): Likewise.
4463 * linux-sh-low.c (target_regsets): Likewise.
4464 * linux-sparc-low.c (target_regsets): Likewise.
4465 * linux-xtensa-low.c (target_regsets): Likewise.
4466
4467 * linux-low.c: Include <sys/uio.h>.
4468 (regsets_fetch_inferior_registers): Support nt_type.
4469 (regsets_store_inferior_registers): Likewise.
4470 (linux_process_qsupported): New.
4471 (linux_target_ops): Add linux_process_qsupported.
4472
4473 * linux-low.h (regset_info): Add nt_type.
4474 (linux_target_ops): Add process_qsupported.
4475
4476 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4477 and <sys/uio.h>.
4478 (init_registers_i386_avx_linux): New.
4479 (init_registers_amd64_avx_linux): Likewise.
4480 (xmltarget_i386_linux_no_xml): Likewise.
4481 (xmltarget_amd64_linux_no_xml): Likewise.
4482 (PTRACE_GETREGSET): Likewise.
4483 (PTRACE_SETREGSET): Likewise.
4484 (x86_fill_xstateregset): Likewise.
4485 (x86_store_xstateregset): Likewise.
4486 (use_xml): Likewise.
4487 (x86_linux_update_xmltarget): Likewise.
4488 (x86_linux_process_qsupported): Likewise.
4489 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4490 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4491 init_registers_i386_linux here. Call
4492 x86_linux_update_xmltarget.
4493 (the_low_target): Add x86_linux_process_qsupported.
4494
4495 * server.c (handle_query): Call target_process_qsupported.
4496
4497 * target.h (target_ops): Add process_qsupported.
4498 (target_process_qsupported): New.
4499
fc7238bb
PA
45002010-04-03 Pedro Alves <pedro@codesourcery.com>
4501
4502 * inferiors.c (add_thread): Set last_status kind to
4503 TARGET_WAITKIND_IGNORE.
4504 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4505 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4506 (linux_wait_1): Move `thread' local definition to block that uses
4507 it. Don't NULL initialize `event_child'.
4508 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4509 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4510 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4511
bdabb078
PA
45122010-04-01 Pedro Alves <pedro@codesourcery.com>
4513
4514 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4515 an extended waitstatus, or by a watchpoint.
4516 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4517 thread was stepping or has been stopped by a watchpoint.
4518
d3bbe7a0
PA
45192010-04-01 Pedro Alves <pedro@codesourcery.com>
4520
4521 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4522 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4523 of another, then delete the previous, and validate all
4524 breakpoints.
4525 (validate_inserted_breakpoint): New.
4526 (delete_disabled_breakpoints): New.
4527 (validate_breakpoints): New.
4528 (check_mem_read): Validate breakpoints before trusting their
4529 shadow. Delete disabled breakpoints.
4530 (check_mem_write): Validate breakpoints before trusting they
4531 should be inserted. Delete disabled breakpoints.
4532 * mem-break.h (validate_breakpoints):
4533 * server.c (handle_query): Validate breakpoints when we see a
4534 qSymbol query.
4535
8b07ae33
PA
45362010-04-01 Pedro Alves <pedro@codesourcery.com>
4537
4538 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4539 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4540 if we could tell there's a GDB breakpoint at stop_pc.
4541 (need_step_over_p): Don't do a step over if we find a GDB
4542 breakpoint at the resume PC.
4543
4544 * mem-break.c (struct raw_breakpoint): New.
4545 (enum bkpt_type): New type `gdb_breakpoint'.
4546 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4547 fields. New field `raw'.
4548 (find_raw_breakpoint_at): New.
4549 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4550 breakpoint instead.
4551 (set_breakpoint_at): Adjust.
4552 (delete_raw_breakpoint): New.
4553 (release_breakpoint): New.
4554 (delete_breakpoint): Rename to...
4555 (delete_breakpoint_1): ... this. Add proc parameter. Use
4556 release_breakpoint. Return ENOENT.
4557 (delete_breakpoint): Reimplement.
4558 (find_breakpoint_at): Delete.
4559 (find_gdb_breakpoint_at): New.
4560 (delete_breakpoint_at): Delete.
4561 (set_gdb_breakpoint_at): New.
4562 (delete_gdb_breakpoint_at): New.
4563 (gdb_breakpoint_here): New.
4564 (set_reinsert_breakpoint): Use release_breakpoint.
4565 (uninsert_breakpoint): Rename to ...
4566 (uninsert_raw_breakpoint): ... this.
4567 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4568 (reinsert_raw_breakpoint): Change parameter type to
4569 raw_breakpoint.
4570 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4571 instead.
4572 (check_breakpoints): Adjust. Use release_breakpoint.
4573 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4574 (breakpoint_inserted_here): Ditto.
4575 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4576 Don't trust the breakpoint's shadow if it is not inserted.
4577 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4578 (delete_all_breakpoints): Adjust.
4579 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4580 use delete_breakpoint_1.
4581
4582 * mem-break.h (breakpoints_supported): Delete declaration.
4583 (set_gdb_breakpoint_at): Declare.
4584 (gdb_breakpoint_here): Declare.
4585 (delete_breakpoint_at): Delete.
4586 (delete_gdb_breakpoint_at): Declare.
4587
4588 * server.h (struct raw_breakpoint): Forward declare.
4589 (struct process_info): New field `raw_breakpoints'.
4590
4591 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4592 breakpoints.
4593
6bf5e0ba
PA
45942010-03-24 Pedro Alves <pedro@codesourcery.com>
4595
4596 * linux-low.c (status_pending_p_callback): Fix comment.
4597 (linux_wait_for_event_1): Move most of the internal breakpoint
4598 handling from here...
4599 (linux_wait_1): ... to here.
4600 (count_events_callback): New.
4601 (select_singlestep_lwp_callback): New.
4602 (select_event_lwp_callback): New.
4603 (cancel_breakpoints_callback): New.
4604 (select_event_lwp): New.
4605 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4606 priority to all LWPs that have had events that should be reported
4607 to the client. Cancel breakpoints when about to reporting the
4608 event to the client, not while stopping lwps. No longer cancel
4609 finished single-steps here.
4610 (cancel_finished_single_step): Delete.
4611 (cancel_finished_single_steps): Delete.
4612
414a389f
PA
46132010-03-24 Pedro Alves <pedro@codesourcery.com>
4614
4615 * mem-break.c (enum bkpt_type): New.
4616 (struct breakpoint): New field `type'.
4617 (set_breakpoint_at): Change return type to struct breakpoint
4618 pointer. Set type to `other_breakpoint' by default.
4619 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4620 in the breakpoint list.
4621 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4622 (reinsert_breakpoint): Rename to ...
4623 (reinsert_raw_breakpoint): ... this.
4624 (reinsert_breakpoints_at): Adjust.
4625 * mem-break.h (struct breakpoint): Declare.
4626 (set_breakpoint_at): Change return type to struct breakpoint
4627 pointer.
4628
2280c721
PA
46292010-03-24 Pedro Alves <pedro@codesourcery.com>
4630
4631 * server.c (handle_query): Assign, not compare.
4632
d50171e4
PA
46332010-03-24 Pedro Alves <pedro@codesourcery.com>
4634
4635 Teach linux gdbserver to step-over-breakpoints.
4636
4637 * linux-low.c (can_hardware_single_step): New.
4638 (supports_breakpoints): New.
4639 (handle_extended_wait): If stopping threads, read the stop pc of
4640 the new cloned LWP.
4641 (get_pc): New.
4642 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4643 low target doesn't support retrieving the PC.
4644 (add_lwp): Set last_resume_kind to resume_continue.
4645 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4646 (linux_attach): Don't clear stop_expected. Set the lwp's
4647 last_resume_kind to resume_stop.
4648 (linux_detach_one_lwp): Don't check for removed breakpoints.
4649 (check_removed_breakpoint): Delete.
4650 (status_pending_p): Rename to ...
4651 (status_pending_p_callback): ... this. Don't check for removed
4652 breakpoints. Don't consider threads that are stopped from GDB's
4653 perspective.
4654 (linux_wait_for_lwp): Always read the stop_pc here.
4655 (cancel_breakpoint): New.
4656 (step_over_bkpt): New global.
4657 (linux_wait_for_event_1): Implement stepping over breakpoints.
4658 (gdb_wants_lwp_stopped): New.
4659 (gdb_wants_all_stopped): New.
4660 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4661 single-step traps here. Store the thread's last reported target
4662 wait status.
4663 (send_sigstop): Don't clear stop_expected. Always set it,
4664 instead.
4665 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4666 (cancel_finished_single_step): New.
4667 (cancel_finished_single_steps): New.
4668 (wait_for_sigstop): Don't cancel finished single-step traps here.
4669 (linux_resume_one_lwp): Don't check for removed breakpoints.
4670 Don't set `step' on non-hardware step archs.
4671 (linux_set_resume_request): Ignore resume_stop requests if already
4672 stopping or stopped. Set the lwp's last_resume_kind.
4673 (resume_status_pending_p): Don't check for removed breakpoints.
4674 (need_step_over_p): New.
4675 (start_step_over): New.
4676 (finish_step_over): New.
4677 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4678 requests. Clear the thread's last reported target waitstatus.
4679 Don't use the `suspended' flag. Don't consider pending breakpoints.
4680 (linux_resume): Start a step-over if necessary.
4681 (proceed_one_lwp): New.
4682 (proceed_all_lwps): New.
4683 (unstop_all_lwps): New.
4684 * linux-low.h (struct lwp_info): Rewrite comment for the
4685 `suspended' flag. Add the `stop_pc' field. Delete the
4686 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4687 Add `'last_resume_kind' and `need_step_over' fields.
4688 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4689 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4690 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4691 (set_raw_breakpoint_at): New.
4692 (set_breakpoint_at): Rewrite to use it.
4693 (reinsert_breakpoint_handler): Delete.
4694 (set_reinsert_breakpoint): New.
4695 (reinsert_breakpoint_by_bp): Delete.
4696 (delete_reinsert_breakpoints): New.
4697 (uninsert_breakpoint): Rewrite.
4698 (uninsert_breakpoints_at): New.
4699 (reinsert_breakpoint): Rewrite.
4700 (reinsert_breakpoints_at): New.
4701 (check_breakpoints): Rewrite.
4702 (breakpoint_here): New.
4703 (breakpoint_inserted_here): New.
4704 (check_mem_read): Adjust.
4705 * mem-break.h (breakpoints_supported, breakpoint_here)
4706 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4707 (reinsert_breakpoint_by_bp): Delete declaration.
4708 (delete_reinsert_breakpoints): Declare.
4709 (reinsert_breakpoint): Delete declaration.
4710 (reinsert_breakpoints_at): Declare.
4711 (uninsert_breakpoint): Delete declaration.
4712 (uninsert_breakpoints_at): Declare.
4713 (check_breakpoints): Adjust prototype.
4714 * server.h: Adjust include order.
4715 (struct thread_info): Declare here. Add a `last_status' field.
4716
30ba68cb
MS
47172010-03-23 Michael Snyder <msnyder@vmware.com>
4718
4719 * server.c (crc32): New function.
4720 (handle_query): Add handling for 'qCRC:' request.
4721
b9a881c2
PA
47222010-03-23 Pedro Alves <pedro@codesourcery.com>
4723
4724 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4725 lwp had been stopped by a watchpoint.
4726
e92d13d5
PA
47272010-03-16 Pedro Alves <pedro@codesourcery.com>
4728
4729 * server.h (internal_error): Declare.
4730 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4731 * utils.c (internal_error): New function.
4732
64daa791
AS
47332010-03-15 Andreas Schwab <schwab@redhat.com>
4734
4735 * configure.srv: Fix typo setting srv_regobj.
4736
f52cd8cd
PA
47372010-03-15 Pedro Alves <pedro@codesourcery.com>
4738
4739 * linux-low.c (fetch_register): Avoid passing a non string literal
4740 format to `error'.
4741 (usr_store_inferior_registers): Ditto.
4742
93ae6fdc
PA
47432010-03-14 Pedro Alves <pedro@codesourcery.com>
4744
4745 * linux-low.c (linux_write_memory): Bail out early if peeking
4746 memory failed.
4747
c3adc08c
PA
47482010-03-14 Pedro Alves <pedro@codesourcery.com>
4749
4750 * linux-low.h (struct lwp_info): New fields
4751 `stopped_by_watchpoint' and `stopped_data_address'.
4752 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4753 here, and cache them in the lwp object.
4754 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4755 directly.
4756 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4757 field.
4758 (linux_stopped_by_watchpoint): Rewrite.
4759 (linux_stopped_data_address): Rewrite.
4760
bce522a2
PA
47612010-03-06 Simo Melenius <simo.melenius@iki.fi>
4762
4763 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4764 switching the current inferior, not before.
4765
90884b2b
L
47662010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4767
4768 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4769 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4770 i386-linux.c and amd64-linux.c.
4771 (reg-i386.o): Removed.
4772 (reg-i386.c): Likewise.
4773 (reg-i386-linux.o): Likewise.
4774 (reg-i386-linux.c): Likewise.
4775 (reg-x86-64.o): Likewise.
4776 (reg-x86-64.c): Likewise.
4777 (reg-x86-64-linux.o): Likewise.
4778 (reg-x86-64-linux.c): Likewise.
4779 (i386.o): New.
4780 (i386.c): Likewise.
4781 (i386-linux.o): Likewise.
4782 (i386-linux.c): Likewise.
4783 (amd64.o): Likewise.
4784 (amd64.c): Likewise.
4785 (amd64-linux.o): Likewise.
4786 (amd64-linux.c): Likewise.
4787
4788 * configure.srv (srv_i386_regobj): New.
4789 (srv_i386_linux_regobj): Likewise.
4790 (srv_amd64_regobj): Likewise.
4791 (srv_amd64_linux_regobj): Likewise.
4792 (srv_i386_32bit_xmlfiles): Likewise.
4793 (srv_i386_64bit_xmlfiles): Likewise.
4794 (srv_i386_xmlfiles): Likewise.
4795 (srv_amd64_xmlfiles): Likewise.
4796 (srv_i386_linux_xmlfiles): Likewise.
4797 (srv_amd64_linux_xmlfiles): Likewise.
4798 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4799 srv_xmlfiles to $srv_i386_xmlfiles.
4800 (i[34567]86-*-mingw32ce*): Likewise.
4801 (i[34567]86-*-mingw*): Likewise.
4802 (i[34567]86-*-nto*): Likewise.
4803 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4804 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4805 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4806 (x86_64-*-linux*): Likewise.
4807
4808 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4809 (init_registers_amd64_linux): New.
4810 (x86_arch_setup): Replace init_registers_x86_64_linux with
4811 init_registers_amd64_linux.
4812
193f13e6
MK
48132010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4814
4815 * configure.ac: Check for libdl. If it is not available link against
4816 static libthread_db.
4817 * configure: Regenerate.
4818
85d721b8
PA
48192010-02-22 Pedro Alves <pedro@codesourcery.com>
4820
4821 PR9605
4822
4823 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4824 handing a read watchpoint.
4825 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4826
6076632b
DE
48272010-02-12 Doug Evans <dje@google.com>
4828
4829 * linux-low.c (linux_supports_tracefork_flag): Document.
4830 (linux_look_up_symbols): Add comment.
4831
3327ccf7
L
48322010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4833
4834 * regcache.c (supply_register): Clear regcache if buf is NULL.
4835
0718675c 48362010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 4837 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
4838
4839 * inferiors.c (find_inferior): Add function documentation.
4840 (unloaded_dll): Handle the case where the unloaded dll has not
4841 been previously registered in the dll list.
4842
177321bd
DJ
48432010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4844
4845 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4846 (thumb2_breakpoint): New.
4847 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4848
2b009048
DJ
48492010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4850
4851 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4852 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4853 breakpoints.
4854
3be029c7
PA
48552010-01-21 Pedro Alves <pedro@codesourcery.com>
4856
4857 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4858
18f5de3b
JK
48592010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4860
4861 * linux-s390-low.c (s390_collect_ptrace_register)
4862 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4863
3743bb4f
DE
48642010-01-21 Doug Evans <dje@google.com>
4865
14ce3065
DE
4866 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4867 (PTRACE_ARG4_TYPE): New macro.
4868 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4869 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4870 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4871 (usr_store_inferior_registers): Ditto.
4872 (linux_read_memory, linux_write_memory): Ditto.
4873 (linux_test_for_tracefork): Ditto.
4874
3743bb4f
DE
4875 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4876 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4877
8b315be5
PA
48782010-01-21 Pedro Alves <pedro@codesourcery.com>
4879
4880 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4881 target.
4882
85492558
PA
48832010-01-21 Pedro Alves <pedro@codesourcery.com>
4884
4885 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4886 prototype to take a regcache. Adjust.
4887
442ea881
PA
48882010-01-20 Pedro Alves <pedro@codesourcery.com>
4889
4890 * regcache.h (struct thread_info): Forward declare.
4891 (struct regcache): New.
4892 (new_register_cache): Adjust prototype.
4893 (get_thread_regcache): Declare.
4894 (free_register_cache): Adjust prototype.
4895 (registers_to_string, registers_from_string): Ditto.
4896 (supply_register, supply_register_by_name, collect_register)
4897 (collect_register_as_string, collect_register_by_name): Ditto.
4898 * regcache.c (struct inferior_regcache_data): Delete.
4899 (get_regcache): Rename to ...
4900 (get_thread_regcache): ... this. Adjust. Switch inferior before
4901 fetching registers.
4902 (regcache_invalidate_one): Adjust.
4903 (regcache_invalidate): Fix prototype.
4904 (new_register_cache): Return the new register cache.
4905 (free_register_cache): Change prototype.
4906 (realloc_register_cache): Adjust.
4907 (registers_to_string): Change prototype to take a regcache. Adjust.
4908 (registers_from_string): Ditto.
4909 (register_data): Ditto.
4910 (supply_register): Ditto.
4911 (supply_register_by_name): Ditto.
4912 (collect_register): Ditto.
4913 (collect_register_as_string): Ditto.
4914 (collect_register_by_name): Ditto.
4915 * server.c (process_serial_event): Adjust.
4916 * linux-low.h (regset_fill_func, regset_store_func): Change
4917 prototype.
4918 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4919 Change prototype.
4920 * linux-low.c (get_stop_pc): Adjust.
4921 (check_removed_breakpoint): Adjust.
4922 (linux_wait_for_event): Adjust.
4923 (linux_resume_one_lwp): Adjust.
4924 (fetch_register): Add regcache parameter. Adjust.
4925 (usr_store_inferior_registers): Ditto.
4926 (regsets_fetch_inferior_registers): Ditto.
4927 (regsets_store_inferior_registers): Ditto.
4928 (linux_fetch_registers, linux_store_registers): Ditto.
4929 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4930 regcache. Adjust.
43aaf8b6
PA
4931 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4932 Ditto.
442ea881
PA
4933 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4934 prototype to take a regcache.
4935 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4936 * remote-utils.c (convert_ascii_to_int, outreg)
4937 (prepare_resume_reply): Change prototype to take a regcache.
4938 Adjust.
4939 * target.h (struct target_ops) <fetch_registers, store_registers>:
4940 Change prototype to take a regcache.
4941 (fetch_inferior_registers, store_inferior_registers): Change
4942 prototype to take a regcache. Adjust.
4943 * proc-service.c (ps_lgetregs): Adjust.
4944 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4945 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4946 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4947 take a regcache. Adjust.
4948 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4949 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4950 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4951 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4952 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4953 (cris_cannot_fetch_register):
4954 (cris_breakpoint_at): Change prototype to take a regcache.
4955 Adjust.
4956 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4957 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4958 to take a regcache. Adjust.
4959 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4960 Adjust.
4961 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4962 take a regcache. Adjust.
4963 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4964 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4965 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4966 * linux-mips-low.c (mips_get_pc):
4967 (mips_set_pc): Change prototype to take a regcache. Adjust.
4968 (mips_reinsert_addr): Adjust.
4969 (mips_collect_register): Change prototype to take a regcache.
4970 Adjust.
4971 (mips_supply_register):
4972 (mips_collect_register_32bit, mips_supply_register_32bit)
4973 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4974 (mips_store_fpregset): Ditto.
43aaf8b6
PA
4975 * linux-ppc-low.c (ppc_supply_ptrace_register)
4976 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
4977 (parse_spufs_run): Adjust.
4978 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4979 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4980 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4981 take a regcache. Adjust.
4982 * linux-s390-low.c (s390_collect_ptrace_register)
4983 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4984 (s390_set_pc): Change prototype to take a regcache. Adjust.
4985 (s390_arch_setup): Adjust.
4986 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4987 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4988 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4989 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4990 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4991 regcache. Adjust.
4992 (sparc_breakpoint_at): Adjust.
4993 * linux-xtensa-low.c (xtensa_fill_gregset):
4994 (xtensa_store_gregset):
4995 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4996 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4997 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4998 prototype to take a regcache. Adjust.
4999 * win32-arm-low.c (arm_fetch_inferior_register)
5000 (arm_store_inferior_register): Change prototype to take a
5001 regcache. Adjust.
5002 * win32-i386-low.c (i386_fetch_inferior_register)
5003 (i386_store_inferior_register): Change prototype to take a
5004 regcache. Adjust.
5005 * win32-low.c (child_fetch_inferior_registers)
5006 (child_store_inferior_registers): Change prototype to take a
5007 regcache. Adjust.
5008 (win32_wait): Adjust.
5009 (win32_fetch_inferior_registers): Change prototype to take a
5010 regcache. Adjust.
5011 (win32_store_inferior_registers): Adjust.
5012 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5013 store_inferior_register>: Change prototype to take a regcache.
5014
60c3d7b0
DE
50152010-01-20 Doug Evans <dje@google.com>
5016
5017 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5018 #ifdef.
5019 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 5020 (W_STOPCODE): Provide definition if missing.
60c3d7b0 5021
dc146f7c
VP
50222010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5023
5024 * linux-low.c (linux_core_of_thread): New.
5025 (compare_ints, show_process, list_threads): New.
5026 (linux_qxfer_osdata): Report threads and cores.
5027 (linux_target_op): Register linux_core_of_thread.
5028 * remote-utils.c (prepare_resume_reply): Report the core.
5029 (buffer_xml_printf): Support %d specifier.
5030 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5031 New.
5032 (handle_query): Handle qXfer:threads. Announce availability
5033 thereof.
5034 * target.h (struct target_ops): New field core_of_thread.
5035
7803799a
UW
50362010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5037
5038 * Makefile.in (clean): Remove new generated files.
5039 (reg-s390.o, reg-s390.c): Remove rules.
5040 (reg-s390x.o, reg-s390x.c): Likewise.
5041 (s390-linux32.o, s390-linux32.c): Add rules.
5042 (s390-linux64.o, s390-linux64.c): Likewise.
5043 (s390x-linux64.o, s390x-linux64.c): Likewise.
5044 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5045 * linux-s390-low.c: Include <elf.h>.
5046 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5047 (init_registers_s390): Remove prototype.
5048 (init_registers_s390x): Likewise.
5049 (init_registers_s390_linux32): Add prototype.
5050 (init_registers_s390_linux64): Likewise.
5051 (init_registers_s390x_linux64): Likewise.
5052 (s390_num_regs_3264): New define.
5053 (s390_regmap_3264): New global variable.
5054 (s390_cannot_fetch_register): Remove obsolete check.
5055 (s390_cannot_store_register): Likewise.
5056 (s390_collect_ptrace_register): Handle upper/lower register halves.
5057 (s390_supply_ptrace_register): Likewise.
5058 (s390_fill_gregset): Update to register number changes.
5059 (s390_get_hwcap): New routine.
5060 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5061 Install appropriate regmap and register set.
5062
6e7ffa39
JB
50632010-01-01 Joel Brobecker <brobecker@adacore.com>
5064
5065 * server.c (gdbserver_version): Update copyright year to 2010.
5066 * gdbreplay.c (gdbreplay_version): Likewise.
5067
957f3f49
DE
50682009-12-28 Doug Evans <dje@google.com>
5069
5070 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5071 elf/external.h. Include <elf.h> instead but only if necessary.
5072
ca5c370d
PA
50732009-12-28 Pedro Alves <pedro@codesourcery.com>
5074
5075 * linux-low.c (linux_remove_process): Remove `detaching'
5076 parameter. Don't release/detach from thread_db here.
5077 (linux_kill): Release/detach from thread_db here, ...
5078 (linux_detach): ... and here, before actually detaching.
5079 (linux_wait_1): ... and here, when a process exits.
5080 * thread-db.c (any_thread_of): New.
5081 (thread_db_free): Switch the current inferior to a thread of the
5082 passed in process.
5083
4ee62156
DE
50842009-12-21 Doug Evans <dje@google.com>
5085
d90e6a88
DE
5086 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5087
c5f62d5f
DE
5088 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5089 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5090 warning ifndef __NR_tkill. Move setting of errno there too.
5091 Delete unnecessary resetting of errno after syscall.
5092 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5093
10e86dd7
DE
5094 * configure.ac: Check for dladdr.
5095 * config.in: Regenerate.
5096 * configure: Regenerate.
5097 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5098 (try_thread_db_load): Update.
5099
4ee62156
DE
5100 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5101
00f515da
DE
51022009-12-18 Doug Evans <dje@google.com>
5103
e9464885
DE
5104 * event-loop.c: Include unistd.h if it exists.
5105
07d4f67e
DE
5106 * linux-low.c (my_waitpid): Move definition away from being in
5107 between linux_tracefork_child/linux_test_for_tracefork.
5108
00f515da
DE
5109 * gdb_proc_service.h (psaddr_t): Fix type.
5110 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5111 signature to match glibc.
5112
1de1badb
DE
51132009-12-16 Doug Evans <dje@google.com>
5114
5115 * linux-low.c (linux_read_memory): Fix argument to read.
5116
aeeb81d1
PA
51172009-11-26 Pedro Alves <pedro@codesourcery.com>
5118
5119 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5120 events, don't leave current_inferior pointing at null.
5121
10357975
PA
51222009-11-26 Pedro Alves <pedro@codesourcery.com>
5123
5124 * win32-low.c (LOG): Delete.
5125 (OUTMSG): Output to stderr.
5126 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5127 on compile time LOG macro.
5128 (win32_wait): Fix debug output.
5129
cf6e3471
PA
51302009-11-26 Pedro Alves <pedro@codesourcery.com>
5131
5132 * win32-low.c (win32_add_one_solib): If the dll name is
5133 "ntdll.dll", prepend the system directory to the dll path.
5134
0c85e18e
MK
51352009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5136
5137 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5138
9ac544ce 51392009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 5140 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
5141
5142 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5143 * configure.ac: Check for __mcoldfire__ and set
5144 gdb_cv_m68k_is_coldfire.
5145 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5146 reg-cf.o and reg-m68k.o.
5147 * configure: Regenerated.
5148
fd7dd3e6
PA
51492009-11-16 Pedro Alves <pedro@codesourcery.com>
5150
5151 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5152 Pass it to thread_db_free.
5153 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5154 proper `detaching' argument to linux_remove_process.
5155 * linux-low.h (thread_db_free): Add `detaching' parameter.
5156 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5157 to thread_db_free.
5158 (thread_db_free): Add `detaching' parameter. Only
5159 call td_ta_clear_event if detaching from process.
5160
75aa492e
MK
51612009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5162
5163 * thread-db.c (thread_db_free): Fix typo.
5164
21e1bee4
PP
51652009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5166
5167 PR gdb/10838
5168 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5169
8838b45e
NS
51702009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5171
5172 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5173 with an i686 compiler.
5174 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5175 needed.
5176 * configure: Rebuilt.
5177
8a35fb51
SL
51782009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5179
5180 PR gdb/10783
5181
5182 * server.c (handle_search_memory_1): Correct read_addr initialization
5183 in loop for searching subsequent chunks.
5184
96f15937
PP
51852009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5186
5187 * configure.ac: New --with-libthread-db option.
5188 * thread-db.c: Allow direct dependence on libthread_db.
5189 (thread_db_free): Adjust.
5190 * config.in: Regenerate.
5191 * configure: Likewise.
889bf7c5 5192
5f7d1694
PP
51932009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5194
5195 PR gdb/10757
5196 * thread-db.c (attach_thread): New function.
5197 (maybe_attach_thread): Return success/failure.
5198 (find_new_threads_callback): Adjust.
889bf7c5
PA
5199 (thread_db_find_new_threads): Loop until no new threads.
5200
88e3b899
PA
52012009-10-13 Pedro Alves <pedro@codesourcery.com>
5202
5203 * proc-service.c (ps_lgetregs): Formatting.
5204
cdbfd419
PP
52052009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5206
5207 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5208 * configure.ac: Adjust.
5209 * linux-low.h (struct process_info_private): Move members to struct
5210 thread_db.
5211 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5212 * linux-low.c (linux_remove_process): Adjust.
5213 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5214 * server.c (handle_query): Move code ...
5215 (handle_monitor_command): ... here. New function.
5216 * target.h (struct target_ops): New member.
5217 * thread-db.c (struct thread_db): New.
5218 (libthread_db_search_path): New variable.
5219 (thread_db_create_event, thread_db_enable_reporting)
5220 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5221 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5222 (try_thread_db_load_1, dladdr_to_soname): New functions.
5223 (try_thread_db_load, thread_db_load_search): New functions.
5224 (thread_db_init): Search for libthread_db.
5225 (thread_db_free): New function.
5226 (thread_db_handle_monitor_command): Likewise.
5227 * config.in: Regenerate.
5228 * configure: Regenerate.
889bf7c5 5229
4168d2d6
UW
52302009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5231
5232 * spu-low.c (spu_kill): Wait for inferior to terminate.
5233 Call clear_inferiors.
5234 (spu_detach): Call clear_inferiors.
5235
81ecdfbb
RW
52362009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5237
5238 * aclocal.m4: Regenerate.
5239 * config.in: Likewise.
5240 * configure: Likewise.
5241
0b9ff2c0
UW
52422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5243
5244 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5245 (parse_spufs_run): New function.
5246 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5247 (ppc_breakpoint_at): Handle SPU breakpoints.
5248
efcbbd14
UW
52492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5250
5251 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5252 (SPUFS_MAGIC): Define.
5253 (spu_enumerate_spu_ids): New function.
5254 (linux_qxfer_spu): New function.
5255 (linux_target_ops): Install linux_qxfer_spu.
5256
f4d9bade
UW
52572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5258
5259 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5260 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5261 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5262 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5263 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5264 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5265 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5266 (init_registers_powerpc_cell32l): Add prototype.
5267 (init_registers_powerpc_cell64l): Likewise.
5268 (ppc_arch_setup): Detect Cell/B.E. architecture.
5269
96e946ca
RW
52702009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5271
5272 * Makefile.in (datarootdir): New variable.
5273
58d6951d
DJ
52742009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5275
5276 * linux-low.c (linux_write_memory): Update debugging output.
5277 * Makefile.in (clean): Add new descriptions.
5278 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5279 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5280 * configure.srv: Add new files for arm*-*-linux*.
5281 * linux-arm-low.c: Add new declarations.
5282 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5283 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5284 (HWCAP_VFPv3D16): New.
5285 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5286 instead of __IWMMXT__.
5287 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5288 (arm_arch_setup): New.
5289 (target_regsets): Remove #ifdef. Add VFP regset.
5290 (the_low_target): Use arm_arch_setup.
5291
12b42a12
DJ
52922009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5293
5294 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5295 the main thread again.
5296
ac8c974e
AR
52972009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5298
5299 Adding Neutrino gdbserver.
5300 * configure: Regenerated.
5301 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5302 * configure.srv (i[34567]86-*-nto*): New target.
5303 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5304 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5305 (nto_comctrl) [__QNX__]: New function.
5306 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5307
4424e0c3 53082009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
5309
5310 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5311 srv_tgtobj.
5312
912cf4ba
PA
53132009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5314 Pedro Alves <pedro@codesourcery.com>
5315
5316 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5317 don't support CONTEXT_EXTENDED_REGISTERS.
5318 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5319 (the_low_target): Install them.
5320 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5321 failing with ERROR_PIPE_NOT_CONNECTED.
5322
aa5ca48f
DE
53232009-06-30 Doug Evans <dje@google.com>
5324 Pierre Muller <muller@ics.u-strasbg.fr>
5325
5326 Add h/w watchpoint support to x86-linux, win32-i386.
5327 * Makefile.in (SFILES): Add i386-low.c
5328 (i386_low_h): Define.
5329 (i386-low.o): Add dependencies.
5330 (linux-x86-low.o): Add i386-low.h dependency.
5331 (win32-i386-low.o): Ditto.
5332 * i386-low.c: New file.
5333 * i386-low.h: New file.
5334 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5335 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5336 * linux-low.c (linux_add_process): Initialize arch_private.
5337 (linux_remove_process): Free arch_private.
5338 (add_lwp): Initialize arch_private.
5339 (delete_lwp): Free arch_private.
5340 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5341 provided.
5342 * linux-low.h (process_info_private): New member arch_private.
5343 (lwp_info): New member arch_private.
5344 (linux_target_ops): New members new_process, new_thread,
5345 prepare_to_resume.
5346 (ptid_of): New macro.
5347 * linux-x86-low.c: Include stddef.h, i386-low.h.
5348 (arch_process_info): New struct.
5349 (arch_lwp_info): New struct.
5350 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5351 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5352 (i386_dr_low_get_status): New function.
5353 (x86_insert_point, x86_remove_point): New functions.
5354 (x86_stopped_by_watchpoint): New function.
5355 (x86_stopped_data_address): New function.
5356 (x86_linux_new_process, x86_linux_new_thread): New functions.
5357 (x86_linux_prepare_to_resume): New function.
5358 (the_low_target): Add entries for insert_point, remove_point,
5359 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5360 prepare_to_resume.
5361 * server.c (debug_hw_points): New global.
5362 (monitor_show_help): Document set debug-hw-points.
5363 (handle_query): Process "set debug-hw-points".
5364 * server.h (debug_hw_points): Declare.
5365 (paddress): Declare.
5366 * utils.c (NUMCELLS, CELLSIZE): New macros.
5367 (get_sell, xsnprintf, paddress): New functions.
5368 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5369 remove_point, stopped_by_watchpoint, stopped_data_address.
5370 * win32-i386-low.c: Include i386-low.h.
5371 (debug_reg_state): Replaces dr.
5372 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5373 (i386_dr_low_get_status): New function.
5374 (i386_insert_point, i386_remove_point): New functions.
5375 (i386_stopped_by_watchpoint): New function.
5376 (i386_stopped_data_address): New function.
5377 (i386_initial_stuff): Update.
5378 (get_thread_context,set_thread_context,i386_thread_added): Update.
5379 (the_low_target): Add entries for insert_point,
5380 remove_point, stopped_by_watchpoint, stopped_data_address.
5381 * win32-low.c (win32_insert_watchpoint): New function.
5382 (win32_remove_watchpoint): New function.
5383 (win32_stopped_by_watchpoint): New function.
5384 (win32_stopped_data_address): New function.
5385 (win32_target_ops): Add entries for insert_watchpoint,
5386 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5387 * win32-low.h (win32_target_ops): New members insert_point,
5388 remove_point, stopped_by_watchpoint, stopped_data_address.
5389
d993e290
PA
53902009-06-25 Pedro Alves <pedro@codesourcery.com>
5391
5392 * server.c (process_serial_event): Re-return unsupported, not
5393 error, if the type isn't recognized. Re-allow supporting only
5394 insert or remove packets. Also call require_running for
5395 breakpoints. Add missing break statement to default case. Tidy.
5396 * target.h (struct target_ops): Rename insert_watchpoint to
5397 insert_point, and remove_watchpoint to remove_point.
5398
5399 * linux-low.h (struct linux_target_ops): Likewise.
5400 * linux-low.c (linux_insert_watchpoint): Rename to ...
5401 (linux_insert_point): ... this. Adjust.
5402 (linux_remove_watchpoint): Rename to ...
5403 (linux_remove_point): ... this. Adjust.
5404 (linux_target_ops): Adjust.
5405 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5406 (cris_insert_point): ... this.
5407 (cris_remove_watchpoint): Rename to ...
5408 (cris_remove_point): ... this.
5409 (the_low_target): Adjust.
5410
0f54c268
PM
54112009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5412
5413 * server.c (handle_v_kill): Pass signal_pid to
5414 kill_inferior if multi_process is zero.
5415
c6314022
AR
54162009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5417
5418 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5419 * target.h (target_ops): Comment for *_watchpoint to make it clear
5420 the functions can get types '0' and '1'.
5421
4463ce24
AR
54222009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5423
5424 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5425 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5426 * regcache.c (get_regcache): Likewise.
5427 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5428 * win32-low.c (child_fetch_inferior_registers): Remove check for
5429 regno 0.
5430
cf8fd78b
PA
54312009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5432 Pedro Alves <pedro@codesourcery.com>
5433
5434 * target.h (struct target_ops) <supports_multi_process>: New
5435 callback.
5436 (target_supports_multi_process): New.
5437 * server.c (handle_query): Even if GDB reports support, only
5438 enable multi-process if the target also supports it. Report
5439 multi-process support only if the target backend supports it.
5440 * linux-low.c (linux_supports_multi_process): New function.
5441 (linux_target_ops): Install it as target_supports_multi_process
5442 callback.
5443
47c0c975
DE
54442009-05-24 Doug Evans <dje@google.com>
5445
e09875d4
DE
5446 Global renaming of find_thread_pid to find_thread_ptid.
5447 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5448 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5449 All callers updated.
5450
e27d73f6
DE
5451 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5452 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5453 directly.
5454
47c0c975
DE
5455 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5456 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5457 (linux_resume_one_lwp): Ditto.
5458
2acc282a
DE
54592009-05-23 Doug Evans <dje@google.com>
5460
5461 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5462 from struct inferior_list_entry * to struct lwp_info *.
5463 All callers updated.
5464
9f1036c1
DE
54652009-05-13 Doug Evans <dje@google.com>
5466
5467 * linux-x86-low.c: Don't include assert.h.
5468 (x86_siginfo_fixup): Use fatal, not assert.
5469 (x86_arch_setup): Fix comment.
5470
d0722149
DE
54712009-05-12 Doug Evans <dje@google.com>
5472
5473 Biarch support for i386/amd64 gdbserver.
5474 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5475 Add linux-x86-low.c.
5476 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5477 (linux-x86-low.o): Add.
5478 * linux-x86-64-low.c: Delete.
5479 * linux-i386-low.c: Delete.
5480 * linux-x86-low.c: New file.
5481 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5482 linux-x86-low.o.
5483 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5484 linux-x86-low.o.
5485 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5486 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5487 (linux_child_pid_to_exec_file): New function.
5488 (elf_64_header_p, elf_64_file_p): New functions.
5489 (siginfo_fixup): New function.
5490 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5491 give target a chance to convert layout.
5492 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5493 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5494
fdeb2a12
DE
54952009-05-07 Doug Evans <dje@google.com>
5496
5497 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5498 (regsets_store_inferior_registers): Ditto.
5499
a6dbe5df
PA
55002009-05-06 Pedro Alves <pedro@codesourcery.com>
5501
5502 PR server/10048
5503
5504 * linux-low.c (must_set_ptrace_flags): Delete.
5505 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5506 of the global.
5507 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5508 `lwp->must_set_ptrace_flags' instead.
ba42693b 5509 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
5510 (linux_wait_1): ... not here.
5511
5091eb23
DE
55122009-04-30 Doug Evans <dje@google.com>
5513
9f767825
DE
5514 * inferiors.c (started_inferior_callback): New function.
5515 (attached_inferior_callback): New function.
5516 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5517 * server.c (print_started_pid, print_attached_pid): New functions.
5518 (detach_or_kill_for_exit): New function.
5519 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5520 * server.h (have_started_inferiors_p): Declare.
5521 (have_attached_inferiors_p): Declare.
5522
5091eb23
DE
5523 * inferiors.c (remove_process): Fix memory leak, free process.
5524 * linux-low.c (linux_remove_process): New function.
5525 (linux_kill): Call it instead of remove_process.
5526 (linux_detach, linux_wait_1): Ditto.
5527
155c8968
PA
55282009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5529
5530 * configure.srv: Add x86 Windows CE target.
5531
7fe519cb
UW
55322009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5533
5534 * inferiors.c (get_thread_process): Make global.
5535 * server.h (get_thread_process): Add prototype.
5536 * thread-db.c (find_one_thread): Use get_thread_process
5537 instead of current_process.
5538 (thread_db_get_tls_address): Do not crash if called when
5539 thread layer is not yet initialized.
5540
5472f405
UW
55412009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5542
5543 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5544 * spu-low.c (current_tid): Rename to ...
5545 (current_ptid): ... this.
5546 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5547 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5548 ptid_get_lwp (current_ptid) instead of current_tid.
5549 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5550 instead of current_tid. Use find_process_pid to verify pid
5551 argument is valid. Pass proper argument to remove_process.
5552 (spu_thread_alive): Compare current_ptid instead of current_tid.
5553 (spu_resume): Likewise.
5554
55ac2b99
PA
55552009-04-02 Pedro Alves <pedro@codesourcery.com>
5556
5557 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5558 variable.
5559
95954743
PA
55602009-04-01 Pedro Alves <pedro@codesourcery.com>
5561
5562 Implement the multiprocess extensions, and add linux multiprocess
5563 support.
5564
5565 * server.h (ULONGEST): Declare.
5566 (struct ptid, ptid_t): New.
5567 (minus_one_ptid, null_ptid): Declare.
5568 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5569 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5570 (struct inferior_list_entry): Change `id' type from unsigned from
5571 to ptid_t.
5572 (struct sym_cache, struct breakpoint, struct
5573 process_info_private): Forward declare.
5574 (struct process_info): Declare.
5575 (current_process): Declare.
5576 (all_processes): Declare.
5577 (initialize_inferiors): Declare.
5578 (add_thread): Adjust to use ptid_t.
5579 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5580 (add_process, remove_process, find_thread_pid): Declare.
5581 (find_inferior_id): Adjust to use ptid_t.
5582 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5583 (multi_process): Declare.
5584 (push_event): Adjust to use ptid_t.
5585 (read_ptid, write_ptid): Declare.
5586 (prepare_resume_reply): Adjust to use ptid_t.
5587 (clear_symbol_cache): Declare.
5588 * inferiors.c (all_processes): New.
5589 (null_ptid, minus_one_ptid): New.
5590 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5591 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5592 (add_thread): Change unsigned long to ptid. Remove gdb_id
5593 parameter. Adjust.
5594 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5595 (gdb_id_to_thread): Rename to ...
5596 (find_thread_pid): ... this. Change unsigned long to ptid.
5597 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5598 (loaded_dll, pull_pid_from_list): Adjust.
5599 (add_process, remove_process, find_process_pid)
5600 (get_thread_process, current_process, initialize_inferiors): New.
5601 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5602 (struct target_waitstatus) <related_pid>: Ditto.
5603 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5604 return type to int.
5605 (struct target_ops) <join>: Add `pid' argument.
5606 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5607 (struct target_ops) <wait>: Add `ptid' field. Change return type
5608 to ptid.
5609 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5610 (mywait): Add `ptid' argument. Change return type to ptid_t.
5611 (target_pid_to_str): Declare.
5612 * target.c (set_desired_inferior): Adjust to use ptids.
5613 (mywait): Add new `ptid' argument. Adjust.
5614 (target_pid_to_str): New.
5615 * mem-break.h (free_all_breakpoints): Declare.
5616 * mem-break.c (breakpoints): Delelete.
5617 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5618 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5619 to use per-process breakpoint list.
5620 (free_all_breakpoints): New.
5621 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5622 (symbol_cache, all_symbols_looked_up): Delete.
5623 (hexchars): New.
5624 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5625 read_ptid): New.
5626 (prepare_resume_reply): Change ptid argument's type from unsigned
5627 long to ptid_t. Adjust. Implement W;process and X;process.
5628 (free_sym_cache, clear_symbol_cache): New.
5629 (look_up_one_symbol): Adjust to per-process symbol cache. *
5630 * server.c (cont_thread, general_thread, step_thread): Change type
5631 to ptid_t.
5632 (attached): Delete.
5633 (multi_process): New.
5634 (last_ptid): Change type to ptid_t.
5635 (struct vstop_notif) <ptid>: Change type to ptid_t.
5636 (queue_stop_reply, push_event): Change `ptid' argument's type to
5637 ptid_t.
5638 (discard_queued_stop_replies): Add `pid' argument.
5639 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5640 changes. Don't reference the `attached' global.
5641 (attach_inferior): Adjust to mywait interface changes.
5642 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5643 features. Handle and report "multiprocess+". Handle
5644 "qAttached:PID".
5645 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5646 changes.
5647 (handle_v_kill): New.
5648 (handle_v_stopped): Adjust to use target_pid_to_str.
5649 (handle_v_requests): Allow multiple attaches and runs when
5650 multiprocess extensions are in effect. Handle "vKill".
5651 (myresume): Adjust to use ptids.
5652 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5653 (handle_status): Adjust to discard_queued_stop_replies interface
5654 change.
5655 (first_thread_of, kill_inferior_callback)
5656 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5657 (main): Call initialize_inferiors. Adjust to use ptids, killing
5658 and detaching from all inferiors. Handle multiprocess packet
5659 variants.
5660 * linux-low.h: Include gdb_proc_service.h.
5661 (struct process_info_private): New.
5662 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5663 <lwpid_of>: Use ptid_get_lwp.
5664 (get_lwp_thread): Adjust.
5665 (struct lwp_info): Add `dead' member.
5666 (find_lwp_pid): Declare.
5667 * linux-low.c (thread_db_active): Delete.
5668 (new_inferior): Adjust comment.
5669 (inferior_pid): Delete.
5670 (linux_add_process): New.
5671 (handle_extended_wait): Adjust.
5672 (add_lwp): Change unsigned long to ptid.
5673 (linux_create_inferior): Add process to processes table. Adjust
5674 to use ptids. Don't set new_inferior here.
5675 (linux_attach_lwp): Rename to ...
5676 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5677 it. Adjust to use ptids.
5678 (linux_attach_lwp): New.
5679 (linux_attach): Add process to processes table. Don't set
5680 new_inferior here.
5681 (struct counter): New.
5682 (second_thread_of_pid_p, last_thread_of_process_p): New.
5683 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5684 multiple processes.
5685 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5686 processes. Remove process from process table.
5687 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5688 to multiple processes.
5689 (any_thread_of): New.
5690 (linux_detach): Add `pid' argument, and handle it. Remove process
5691 from processes table.
5692 (linux_join): Add `pid' argument. Handle it.
5693 (linux_thread_alive): Change unsighed long argument to ptid_t.
5694 Consider dead lwps as not being alive.
5695 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5696 threads we're not interested in.
5697 (same_lwp, find_lwp_pid): New.
5698 (linux_wait_for_lwp): Change `pid' argument's type from int to
5699 ptid_t. Adjust.
5700 (linux_wait_for_event): Rename to ...
5701 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5702 from int to ptid_t. Adjust.
5703 (linux_wait_for_event): New.
5704 (linux_wait_1): Add `ptid' argument. Change return type to
5705 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5706 that exit from the process table.
5707 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5708 Adjust.
5709 (mark_lwp_dead): New.
5710 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5711 stopping all threads, mark its main lwp as dead.
5712 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5713 ptids.
5714 (fetch_register, usr_store_inferior_registers)
5715 (regsets_fetch_inferior_registers)
5716 (regsets_store_inferior_registers, linux_read_memory)
5717 (linux_write_memory): Inline `inferior_pid'.
5718 (linux_look_up_symbols): Adjust to use per-process
5719 `thread_db_active'.
5720 (linux_request_interrupt): Adjust to use ptids.
5721 (linux_read_auxv): Inline `inferior_pid'.
5722 (initialize_low): Don't reference thread_db_active.
5723 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5724 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5725 (ps_getpid): Return the pid of the current inferior.
5726 * thread-db.c (proc_handle, thread_agent): Delete.
5727 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5728 per-process data.
5729 (find_one_thread): Change argument type to ptid_t. Adjust to
5730 per-process data.
5731 (maybe_attach_thread): Adjust to per-process data and ptids.
5732 (thread_db_find_new_threads): Ditto.
5733 (thread_db_init): Ditto.
5734 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5735 processes table. Adjust to use ptids.
5736 (spu_kill, spu_detach): Adjust interface. Remove process from
5737 processes table.
5738 (spu_join, spu_thread_alive): Adjust interface.
5739 (spu_wait): Adjust interface. Remove process from processes
5740 table. Adjust to use ptids.
5741 * win32-low.c (current_inferior_tid): Delete.
5742 (current_inferior_ptid): New.
5743 (debug_event_ptid): New.
5744 (thread_rec): Take a ptid. Adjust.
5745 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5746 (child_delete_thread): Ditto.
5747 (do_initial_child_stuff): Add `attached' argument. Add process to
5748 processes table.
5749 (child_fetch_inferior_registers, child_store_inferior_registers):
5750 Adjust.
5751 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5752 (win32_attach): Pass 1 to do_initial_child_stuff.
5753 (win32_kill): Adjust interface. Remove process from processes
5754 table.
5755 (win32_detach): Ditto.
5756 (win32_join): Adjust interface.
5757 (win32_thread_alive): Take a ptid.
5758 (win32_resume): Adjust to use ptids.
5759 (get_child_debug_event): Ditto.
5760 (win32_wait): Adjust interface. Remove exiting process from
5761 processes table.
5762
bd99dc85
PA
57632009-04-01 Pedro Alves <pedro@codesourcery.com>
5764
5765 Non-stop mode support.
5766
5767 * server.h (non_stop): Declare.
5768 (gdb_client_data, handler_func): Declare.
5769 (delete_file_handler, add_file_handler, start_event_loop):
5770 Declare.
5771 (handle_serial_event, handle_target_event, push_event)
5772 (putpkt_notif): Declare.
5773 * target.h (enum resume_kind): New.
5774 (struct thread_resume): Replace `step' field by `kind' field.
5775 (TARGET_WNOHANG): Define.
5776 (struct target_ops) <wait>: Add `options' argument.
5777 <supports_non_stop, async, start_non_stop>: New fields.
5778 (target_supports_non_stop, target_async): New.
5779 (start_non_stop): Declare.
5780 (mywait): Add `options' argument.
5781 * target.c (mywait): Add `options' argument. Print child exit
5782 notifications here.
5783 (start_non_stop): New.
5784 * server.c (non_stop, own_buf, mem_buf): New globals.
5785 (struct vstop_notif): New.
5786 (notif_queue): New global.
5787 (queue_stop_reply, push_event, discard_queued_stop_replies)
5788 (send_next_stop_reply): New.
5789 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5790 interface changes.
5791 (attach_inferior): In non-stop mode, don't wait for the target
5792 here.
5793 (handle_general_set): Handle QNonStop.
5794 (handle_query): When handling qC, return the current general
5795 thread, instead of the first thread of the list.
5796 (handle_query): If the backend supports non-stop mode, include
5797 QNonStop+ in the qSupported query response.
5798 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5799 and non-stop mode.
5800 (handle_v_attach, handle_v_run): Handle non-stop mode.
5801 (handle_v_stopped): New.
5802 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5803 (myresume): Adjust to use resume_kind. Handle non-stop.
5804 (queue_stop_reply_callback): New.
5805 (handle_status): Handle non-stop mode.
5806 (main): Clear non_stop flag on reconnection. Use the event-loop.
5807 Refactor serial protocol handling from here ...
5808 (process_serial_event): ... to this new function. When GDB
5809 selects any thread, select one here. In non-stop mode, wait until
5810 GDB acks all pending events before exiting.
5811 (handle_serial_event, handle_target_event): New.
5812 * remote-utils.c (remote_open): Install remote_desc in the event
5813 loop.
5814 (remote_close): Remove remote_desc from the event loop.
5815 (putpkt_binary): Rename to...
5816 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5817 (putpkt_binary): New as wrapper around putpkt_binary_1.
5818 (putpkt_notif): New.
5819 (prepare_resume_reply): In non-stop mode, don't change the
5820 general_thread.
5821 * event-loop.c: New.
5822 * Makefile.in (OBJ): Add event-loop.o.
5823 (event-loop.o): New rule.
5824
5825 * linux-low.h (pid_of): Moved here.
5826 (lwpid_of): New.
5827 (get_lwp_thread): Use lwpid_of.
5828 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5829 * linux-low.c (pid_of): Delete.
5830 (inferior_pid): Use lwpid_of.
5831 (linux_event_pipe): New.
5832 (target_is_async_p): New.
5833 (delete_lwp): New.
5834 (handle_extended_wait): Use lwpid_of.
5835 (add_lwp): Don't set lwpid field.
5836 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5837 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5838 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5839 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5840 first. Adjust to linux_wait_for_event interface changes. Use
5841 lwpid_of.
5842 (linux_detach): Don't delete the main lwp here.
5843 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5844 (status_pending_p): Don't consider explicitly suspended lwps.
5845 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5846 pointer. Add OPTIONS argument. Change return type to int. Use
5847 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5848 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5849 pointer. Add status pointer argument. Return a pid instead of a
5850 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5851 changes. In non-stop mode, don't switch to a random thread.
5852 (linux_wait): Rename to...
5853 (linux_wait_1): ... this. Add target_options argument, and handle
5854 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5855 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5856 clean exit and signal exit code. Don't stop all threads in
5857 non-stop mode. In all-stop mode, only stop all threads when
5858 reporting a stop to GDB. Handle explicit thread stop requests.
5859 (async_file_flush, async_file_mark): New.
5860 (linux_wait): New.
5861 (send_sigstop): Use lwpid_of.
5862 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5863 interface changes. In non-stop mode, don't switch to a random
5864 thread.
5865 (linux_resume_one_lwp): Use lwpid_of.
5866 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5867 (linux_resume_one_thread): ... this. Handle resume_stop. In
5868 non-stop mode, don't look for pending flag in all threads.
5869 (resume_status_pending_p): Don't consider explicitly suspended
5870 threads.
5871 (my_waitpid): Reimplement. Emulate __WALL.
5872 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5873 Use lwpid_of.
5874 (sigchld_handler, linux_supports_non_stop, linux_async)
5875 (linux_start_non_stop): New.
5876 (linux_target_ops): Register linux_supports_non_stop, linux_async
5877 and linux_start_non_stop.
5878 (initialize_low): Install SIGCHLD handler.
5879 * thread-db.c (thread_db_create_event, find_one_thread)
5880 (thread_db_get_tls_address): Use lwpid_of.
5881 * win32-low.c (win32_detach): Adjust to use resume_kind.
5882 (win32_wait): Add `options' argument.
5883 * spu-low.c (spu_resume): Adjust to use resume_kind.
5884 (spu_wait): Add `options' argument.
5885
5b1c542e
PA
58862009-04-01 Pedro Alves <pedro@codesourcery.com>
5887
5888 Decouple target code from remote protocol.
5889
5890 * target.h (enum target_waitkind): New.
5891 (struct target_waitstatus): New.
5892 (struct target_ops) <wait>: Return an unsigned long. Take a
5893 target_waitstatus pointer instead of a char pointer.
5894 (mywait): Likewise.
5895 * target.c (mywait): Change prototype to return an unsigned long.
5896 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5897 * server.h (thread_from_wait, old_thread_from_wait): Delete
5898 declarations.
5899 (prepare_resume_reply): Change prototype to take a
5900 target_waitstatus.
5901 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5902 (last_status, last_ptid): New.
5903 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5904 pid instead of a signal.
5905 (attach_inferior): Remove "status" and "signal" parameters.
5906 Adjust.
5907 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5908 not as an address.
5909 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5910 (handle_v_requests, myresume): Remove "status" and "signal"
5911 parameters. Adjust.
5912 (handle_status): New.
5913 (main): Delete local `status'. Adjust.
5914 * remote-utils.c: Include target.h.
5915 (prepare_resume_reply): Change prototype to take a
5916 target_waitstatus. Adjust.
5917
5918 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5919 interface.
5920 * spu-low.c (spu_wait): Adjust.
5921 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5922 Delete.
5923 (win32_wait): Adjust.
5924
2bd7c093
PA
59252009-04-01 Pedro Alves <pedro@codesourcery.com>
5926
5927 * target.h (struct thread_resume): Delete leave_stopped member.
5928 (struct target_ops): Add a `n' argument to the `resume' callback.
5929 * server.c (start_inferior): Adjust.
5930 (handle_v_cont, myresume): Adjust.
5931 * linux-low.c (check_removed_breakpoint): Adjust to resume
5932 interface change, and to removed leave_stopped field.
5933 (resume_ptr): Delete.
5934 (struct thread_resume_array): New.
5935 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5936 resume interface change.
5937 (linux_continue_one_thread, linux_queue_one_thread)
5938 (resume_status_pending_p): Check if the resume field is NULL
5939 instead of checking the leave_stopped member.
5940 (linux_resume): Adjust to the target resume interface change.
5941 * spu-low.c (spu_resume): Adjust to the target resume interface
5942 change.
5943 * win32-low.c (win32_detach, win32_resume): Ditto.
5944
c35fafde
PA
59452009-04-01 Pedro Alves <pedro@codesourcery.com>
5946
5947 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5948 flag.
5949 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5950 pending.
5951 (linux_continue_one_thread): Only preserve the stepping flag if
5952 there's a pending breakpoint.
5953
0a59d50b
PA
59542009-03-31 Pedro Alves <pedro@codesourcery.com>
5955
5956 * server.c (main): After the inferior having exited, call
5957 remote_close before exiting gdbserver.
5958
f04c6d38
TJB
59592009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5960
5961 Fix size of FPSCR in Power 7 processors.
5962 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5963 (PPC_FEATURE_HAS_DFP): New #define.
5964 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5965 size of the FPSCR.
5966
78e5cee6
PA
59672009-03-23 Pedro Alves <pedro@codesourcery.com>
5968
5969 * server.c (handle_query) Whitespace and formatting.
5970
1b3f6016
PA
59712009-03-22 Pedro Alves <pedro@codesourcery.com>
5972
5973 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5974 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5975 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5976 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5977 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5978 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5979 Makefile.in, configure.ac: Fix whitespace throughout.
5980 * configure: Regenerate.
5981
a07b2135
PA
59822009-03-22 Pedro Alves <pedro@codesourcery.com>
5983
5984 * inferiors.c (find_inferior): Make it safe for the callback
5985 function to delete the currently iterated inferior.
5986
67cc2626
PA
59872009-03-22 Pedro Alves <pedro@codesourcery.com>
5988
5989 * Makefile.in (linuw_low_h): Move higher.
5990 (thread-db.o): Depend on $(linux_low_h).
5991
54a0b537
PA
59922009-03-17 Pedro Alves <pedro@codesourcery.com>
5993
5994 Rename "process" to "lwp" throughout.
5995
5996 * linux-low.c (all_processes): Rename to...
5997 (all_lwps): ... this.
5998 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5999 (add_process): Rename to ...
6000 (add_lwp): ... this. Adjust.
6001 (linux_create_inferior): Adjust.
6002 (linux_attach_lwp): Adjust.
6003 (linux_attach): Adjust.
6004 (linux_kill_one_process): Rename to ...
6005 (linux_kill_one_lwp): ... this. Adjust.
6006 (linux_kill): Adjust.
6007 (linux_detach_one_process): Rename to ...
6008 (linux_detach_one_lwp): ... this. Adjust.
6009 (linux_detach): Adjust.
6010 (check_removed_breakpoint): Adjust.
6011 (status_pending_p): Adjust.
6012 (linux_wait_for_process): Rename to ...
6013 (linux_wait_for_lwp): ... this. Adjust.
6014 (linux_wait_for_event): Adjust.
6015 (send_sigstop): Adjust.
6016 (wait_for_sigstop): Adjust.
6017 (stop_all_processes): Rename to ...
6018 (stop_all_lwps): ... this.
6019 (linux_resume_one_process): Rename to ...
6020 (linux_resume_one_lwp): ... this. Adjust.
6021 (linux_set_resume_request, linux_continue_one_thread)
6022 (linux_queue_one_thread, resume_status_pending_p)
6023 (usr_store_inferior_registers, regsets_store_inferior_registers)
6024 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6025 Adjust.
6026 * linux-low.h (get_process): Rename to ...
6027 (get_lwp): ... this. Adjust.
6028 (get_thread_process): Rename to ...
6029 (get_thread_lwp): ... this. Adjust.
6030 (get_process_thread): Rename to ...
6031 (get_lwp_thread): ... this. Adjust.
6032 (struct process_info): Rename to ...
6033 (struct lwp_info): ... this.
6034 (all_processes): Rename to ...
6035 (all_lwps): ... this.
6036 * proc-service.c (ps_lgetregs): Adjust.
6037 * thread-db.c (thread_db_create_event, find_one_thread)
6038 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6039
0b16c5cf
PA
60402009-03-14 Pedro Alves <pedro@codesourcery.com>
6041
6042 * server.c (handle_query): Handle "qAttached".
6043
32de4b9d
NS
60442009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6045
6046 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6047 GPLv3, update license URL.
6048
2aecd87f
DE
60492009-03-01 Doug Evans <dje@google.com>
6050
93efd302 6051 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
6052 (server_h): Add gdb_signals.h.
6053 (signals.o): Update.
6054 * server.h (target_signal_from_host,target_signal_to_host_p)
6055 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6056
86b1f9c5
PM
60572009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6058
6059 * remote-utils.c (getpkt): Also generate remote-debug
6060 information if noack_mode is set.
6061
4aa995e1
PA
60622009-02-06 Pedro Alves <pedro@codesourcery.com>
6063
6064 * server.c (handle_query): Report qXfer:siginfo:read and
6065 qXfer:siginfo:write as supported and handle them.
6066 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6067 * linux-low.c (linux_xfer_siginfo): New.
6068 (linux_target_ops): Set it.
6069
62709adf
PA
60702009-01-26 Pedro Alves <pedro@codesourcery.com>
6071
6072 * server.c (gdbserver_usage): Mention --remote-debug.
6073 (main): Accept '--remote-debug' switch.
6074
aef93bd7
DE
60752009-01-18 Doug Evans <dje@google.com>
6076
6077 * regcache.c (new_register_cache): No need to check result of xcalloc.
6078 * server.c (handle_search_memory): Back out calls to xmalloc,
6079 result is checked and error is returned to user upon failure.
6080 (handle_query): Ditto. Add more checks for result of malloc.
6081 (handle_v_cont): Check result of malloc, report error back to
6082 user upon failure.
6083 (handle_v_run): Ditto. Call freeargv.
6084 * server.h (freeargv): Declare.
6085 * utils.c (freeargv): New fn.
6086
54363045
DE
60872009-01-15 Doug Evans <dje@google.com>
6088
f626972c
DE
6089 * gdbreplay.c (perror_with_name): Make arg const char *.
6090 * server.h (target_signal_to_name): Make return type const char *.
0842e787 6091 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 6092 * utils.c (perror_with_name): Make arg const char *.
54363045 6093
18aae699
PA
60942009-01-14 Pedro Alves <pedro@codesourcery.com>
6095
6096 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6097 when handling a EXIT_PROCESS_DEBUG_EVENT.
6098
ff703abe
JB
60992009-01-06 Joel Brobecker <brobecker@adacore.com>
6100
6101 * gdbreplay.c (gdbreplay_version): Update copyright year.
6102 * server.c (gdbserver_version): Likewise.
6103
f21cc1a2 61042009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
6105
6106 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 6107 (handle_extended_wait): Improve comment.
0e21c1ec 6108
bca929d3
DE
61092008-12-13 Doug Evans <dje@google.com>
6110
6111 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6112 * server.h (ATTR_MALLOC): New macro.
6113 (xmalloc,xcalloc,xstrdup): Declare.
6114 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6115 * inferiors.c: Ditto.
6116 * linux-low.c: Ditto.
6117 * mem-break.c: Ditto.
6118 * regcache.c: Ditto.
6119 * remote-utils.c: Ditto.
6120 * server.c: Ditto.
6121 * target.c: Ditto.
6122 * win32-low.c: Ditto.
6123
97438e3f
DE
61242008-12-12 Doug Evans <dje@google.com>
6125
896c7fbb
DE
6126 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6127 in debugging printf.
6128
97438e3f
DE
6129 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6130
e3b886f8
DE
61312008-12-09 Doug Evans <dje@google.com>
6132
6133 * linux-low.h (struct process_info): Delete member tid, unused.
6134 * thread-db.c (find_one_thread): Update.
6135 (maybe_attach_thread): Update.
6136
07e059b5
VP
61372008-12-02 Pedro Alves <pedro@codesourcery.com>
6138
889bf7c5
PA
6139 * target.h (struct target_ops): Add qxfer_osdata member.
6140 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6141 and dirent.h.
6142 (linux_qxfer_osdata): New functions.
6143 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6144 callback.
6145 * server.c (handle_query): Handle "qXfer:osdata:read:".
6146 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6147 (buffer_xml_printf): New functions.
6148 * server.h (struct buffer): New.
6149 (buffer_grow_str, buffer_grow_str0): New macros.
6150 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6151 (buffer_xml_printf): Declare.
07e059b5 6152
4cab47ab
DE
61532008-11-24 Doug Evans <dje@google.com>
6154
6155 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6156
f142445f
DJ
61572008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6158
6159 * server.c (handle_v_run): Always use the supplied argument list.
6160
d0107bb6 61612008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 6162
d0107bb6
BW
6163 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6164 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 6165
2c4ad781
TJB
61662008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6167
6168 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6169 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6170 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6171 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6172 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6173 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6174 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6175 XML target descriptions.
6176 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6177 when inferior is running on an ISA 2.05 or later processor. Add
6178 special case to return offset for full 64-bit slot of FPSCR when
6179 in 32-bits.
6180
dfb64f85
DJ
61812008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6182
6183 * Makefile.in (SFILES, clean): Added sparc64 files.
6184 (reg-sparc64.o, reg-sparc64.c): New.
6185 * configure.srv (sparc*-*-linux*): New configuration.
6186 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6187 syscall arguments for SPARC.
6188 (regsets_store_inferior_registers): Likewise.
6189 * linux-sparc-low.c: New file.
6190
66b6e1dd
DE
61912008-10-21 Doug Evans <dje@google.com>
6192
6193 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6194 (READLINE_DIR,READLINE_DEP): Delete.
6195 (INTERNAL_CFLAGS): Update.
6196 (LINTFLAGS): Update.
6197
9b710a42
PA
61982008-10-10 Pedro Alves <pedro@codesourcery.com>
6199
6200 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6201 whole argv from the last run, not just argv[0].
6202
5822d809
PA
62032008-09-08 Pedro Alves <pedro@codesourcery.com>
6204
6205 * regcache.c (new_register_cache): Return NULL if the register
6206 cache size isn't known yet.
6207 (free_register_cache): Avoid dereferencing a NULL regcache.
6208
74aac56f
DJ
62092008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6210
6211 * configure.srv: Merge MIPS and MIPS64.
6212
400b20f5
MR
62132008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6214
6215 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6216
677c5bb1
LM
62172008-08-18 Luis Machado <luisgpm@br.ibm.com>
6218
6219 * Makefile.in: Add required vsx dependencies.
6220
6221 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6222 Declare init_registers_powerpc_vsx32l.
6223 Declare init_registers_powerpc_vsx64l.
6224 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6225 (ppc_arch_setup): Check for VSX in hwcap.
6226 (ppc_fill_vsxregset): New function.
6227 (ppc_store_vsxregset): New function.
6228 Add new VSX entry in regset_info target_regsets.
6229
6230 * configure.srv: Add new VSX dependencies.
6231
a6f3e723
SL
62322008-08-12 Pedro Alves <pedro@codesourcery.com>
6233
6234 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6235 (remote_open): Set or clear transport_is_reliable.
6236 (putpkt_binary): Don't expect acks in noack mode.
6237 (getpkt): Don't send ack/nac in noack mode.
6238 * server.c (handle_general_set): Handle QStartNoAckMode.
6239 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6240 qSupported.
6241 (main): Reset noack_mode on every connection.
6242 * server.h (noack_mode): Declare.
6243
a417dc56
RW
62442008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6245
6246 * Makefile.in (GDBREPLAY_OBS): New variable.
6247 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6248
3221518c
UW
62492008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6250 Daniel Jacobowitz <dan@codesourcery.com>
6251
6252 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6253 (usr_store_inferior_registers): Likewise.
6254 (regsets_store_inferior_registers): Likewise.
6255
ec56be1b
PA
62562008-07-31 Rolf Jansen <rj@surtec.com>
6257 Pedro Alves <pedro@codesourcery.com>
6258
6259 * configure.ac: Check for memmem declaration.
6260 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6261 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6262 (disable_packet_qfThreadInfo): Unconditionally compile.
6263 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6264 * configure, config.in: Regenerate.
6265
2fe5e3ff
DE
62662008-07-28 Doug Kwan <dougkwan@google.com>
6267
6268 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6269 (linux_write_memory): Remove declaration of errno.
6270
836acd6d
UW
62712008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6272
6273 * linux-low.c (handle_extended_wait): Do not use "status"
6274 variable uninitialized.
6275
aeba519e
PA
62762008-07-07 Pedro Alves <pedro@codesourcery.com>
6277
6278 * server.c (handle_v_attach): Inhibit reporting dll changes.
6279
db42f210
PA
62802008-06-27 Pedro Alves <pedro@codesourcery.com>
6281
6282 * remote-utils.c (prepare_resume_reply): If requested, don't
6283 output "thread:TID" in the T stop reply.
6284
6285 * server.c (disable_packet_vCont, disable_packet_Tthread)
6286 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6287 (handle_query): If requested, disable support for qC, qfThreadInfo
6288 and qsThreadInfo.
6289 (handle_v_requests): If requested, disable support for vCont.
6290 (gdbserver_show_disableable): New.
6291 (main): Handle --disable-packet and --disable-packet=LIST.
6292
6293 * server.h (disable_packet_vCont, disable_packet_Tthread)
6294 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6295
8e4c5421
CD
62962008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6297
6298 * server.c (gdbserver_usage): Mention --version.
6299
6e23a804
DJ
63002008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6301
6302 * Makefile.in (gdbreplay.o): New rule.
6303
90aa6a40
JM
63042008-06-06 Joseph Myers <joseph@codesourcery.com>
6305
6306 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6307 message, not gdbserver.
6308
c16158bc 63092008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
6310 Nathan Sidwell <nathan@codesourcery.com>
6311 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
6312
6313 * acinclude.m4: Include ../../config/acx.m4.
6314 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6315 * configure, config.in: Regenerate.
6316 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6317 * server.c (gdbserver_version): Print PKGVERSION.
6318 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6319 (main): Adjust gdbserver_usage calls.
6320 * gdbreplay.c (version, host_name): Add declarations.
6321 (gdbreplay_version, gdbreplay_usage): New.
6322 (main): Accept --version and --help options.
6323
aeb75bf5
DJ
63242008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6325
6326 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6327 (arm_breakpoint_at): Handle Thumb.
6328 (the_low_target): Add comment.
6329
76b233dd
UW
63302008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6331
6332 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6333
08388c79
DE
63342008-05-09 Doug Evans <dje@google.com>
6335
a3c83fae
DE
6336 * server.h (decode_search_memory_packet): Declare.
6337 * remote-utils.c (decode_search_memory_packet): New fn.
6338 * server.c (handle_search_memory_1): New fn.
08388c79
DE
6339 (handle_search_memory): New fn.
6340 (handle_query): Process qSearch:memory packets.
6341
bb9c3d36
UW
63422008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6343
6344 * regcache.c (registers_length): Remove.
6345 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6346 full register packet.
6347 * regcache.h (registers_length): Remove prototype.
6348 * server.h (PBUFSIZ): Define to 16384.
6349
7284e1be
UW
63502008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6351
6352 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6353 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6354 powerpc-64l.o, and powerpc-altivec64l.o.
6355 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6356 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6357 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6358 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6359 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6360 to srv_xmlfiles.
6361
6362 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6363 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6364 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6365 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6366 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6367 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6368 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6369 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6370 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6371 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6372 (clean): Update.
6373
6374 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6375 (init_registers_powerpc_32l): ... this new prototype.
6376 (init_registers_powerpc_32): Remove, replace by ...
6377 (init_registers_powerpc_altivec32l): ... this new prototype.
6378 (init_registers_powerpc_e500): Remove, replace by ...
6379 (init_registers_powerpc_e500l): ... this new prototype.
6380 (init_registers_ppc64): Remove, replace by ...
6381 (init_registers_powerpc_64l): ... this new prototype.
6382 (init_registers_powerpc_64): Remove, replace by ...
6383 (init_registers_powerpc_altivec64l): ... this new prototype.
6384 (ppc_num_regs): Set to 73.
6385 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6386 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6387 (ppc_cannot_store_register): Handle orig_r3 and trap.
6388 (ppc_arch_setup): Update init_registers_... calls.
6389 (ppc_fill_gregset): Handle orig_r3 and trap.
6390
6391 * inferiors.c (clear_inferiors): Reset current_inferior.
6392
fdc59709
PB
63932008-04-23 Paolo Bonzini <bonzini@gnu.org>
6394
889bf7c5
PA
6395 * acinclude.m4: Add override.m4.
6396 * configure: Regenerate.
fdc59709 6397
c9b2f845
UW
63982008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6399
6400 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6401 initial call to init_register_ppc64.
6402
550512b8
UW
64032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6404
43aaf8b6
PA
6405 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6406 single powerpc*-*-linux* case.
550512b8
UW
6407 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6408
b6430ec3
UW
64092008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6410
6411 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 6412 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
6413 from reg_xmlfiles.
6414 * linux-ppc-low.c: Include <elf.h>.
6415 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6416 (ppc_hwcap): New global variable.
6417 (ppc_regmap): Remove __SPE__ #ifdef sections.
6418 (ppc_regmap_e500): New global variable.
6419 (ppc_cannot_store_register): Update __SPE__ special case.
6420 (ppc_get_hwcap): New function.
6421 (ppc_arch_setup): Use it to determine whether inferior supports
6422 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6423 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6424 Do not access registers if target does not support AltiVec.
6425 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6426 Do not access registers if target does not support SPE.
6427 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6428
52fa2412
UW
64292008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6430
6431 * linux-low.c (disabled_regsets, num_regsets): New.
6432 (use_regsets_p): Delete.
6433 (linux_wait_for_process): Clear disabled_regsets.
6434 (regsets_fetch_inferior_registers): Check and set it.
6435 (regsets_store_inferior_registers): Likewise.
6436 (linux_fetch_registers, linux_store_registers): Do not use
6437 use_regsets_p.
6438 (initialize_low): Allocate disabled_regsets.
6439
e28b3332
DJ
64402008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6441
6442 * Makefile.in (LIBOBJS): New.
6443 (OBS): Use LIBOBJS.
6444 (memmem.o): New rule.
6445 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6446 * configure: Regenerated.
6447
4536995d
UW
64482008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6449
6450 * server.c (handle_query): Never return "unsupported" for
6451 qXfer:features:read queries.
6452
221c031f
UW
64532008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6454
6455 * server.c (get_features_xml): Fix inverted condition.
6456 (handle_query): Always support qXfer:feature:read.
6457
ccd213ac
DJ
64582008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6459
6460 * server.c (wrapper_argv): New.
6461 (start_inferior): Handle wrapper_argv. If set, expect an extra
6462 trap.
6463 (gdbserver_usage): Document --wrapper.
6464 (main): Parse --wrapper.
6465
6fe305f7
UW
64662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6467
6468 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6469 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6470 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6471 (ppc_set_pc): Likewise.
6472 (ppc_arch_setup): New function.
6473 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6474 of collect_register.
889bf7c5 6475 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 6476
5b0a002e
UW
64772008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6478
6479 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6480 instead of linux-ppc64-low.o.
6481 * linux-ppc64-low.c: Remove file.
6482 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6483 (linux-ppc64-low.o): Remove rule.
6484
6485 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6486 (init_registers_powerpc_64): Likewise.
6487 (ppc_regmap): Conditionally define depending on __powerpc64__.
6488 (ppc_cannot_store_register): Do not special-case "fpscr" when
6489 compiled on __powerpc64__.
6490 (ppc_collect_ptrace_register): New function.
6491 (ppc_supply_ptrace_register): New function.
6492 (ppc_breakpoint): Change type to "unsigned int".
6493 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6494 (the_low_target): Conditionally provide initializers for the
889bf7c5 6495 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
6496 collect_ptrace_register and supply_ptrace_register members.
6497
9b4b61c8
UW
64982008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6499
6500 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6501 * server.c (gdbserver_xmltarget): Define.
6502 (get_features_xml): Use it to replace "target.xml" and arch_string.
6503
6504 * configure.srv: Remove srv_xmltarget. Add XML files that were
6505 mentioned there to srv_xmlfiles instead. Remove conditional tests
6506 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6507 srv_xmlfiles and srv_regobj to include all possible choices.
6508 * configure.ac (srv_xmltarget): Remove.
6509 (srv_xmlfiles): Do not add "target.xml".
6510 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6511 checks for supplementary target information.
6512 * configure: Regenerate.
6513 * Makefile.in (XML_TARGET): Remove.
6514 (target.xml): Remove rule.
6515 (clean): Do not clean up target.xml.
6516 (.PRECIOUS): Do not mention target.xml.
6517
6518 * target.h (struct target_ops): Remove arch_string member.
6519 * linux-low.c (linux_arch_string): Remove.
6520 (linux_target_ops): Remove arch_string initializer.
6521 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6522 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6523 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6524 * spu-low.c (spu_arch_string): Remove.
6525 (spu_target_ops): Remove arch_string initializer.
6526 * win32-low.c (win32_arch_string): Remove.
6527 (win32_target_ops): Remove arch_string initializer.
6528 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6529 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6530 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6531
ee1a7ae4
UW
65322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6533
6534 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6535 by collect_ptrace_register and supply_ptrace_register hooks.
6536 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6537 instead of checking for the_low_target.left_pad_xfer.
6538 (usr_store_inferior_registers): Use collect_ptrace_register callback
6539 instead of checking for the_low_target.left_pad_xfer.
6540
6541 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6542 (s390_supply_ptrace_register): Likewise.
6543 (s390_fill_gregset): Call s390_collect_ptrace_register.
6544 (the_low_target): Update.
6545
6546 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6547 (ppc_supply_ptrace_register): Likewise.
6548 (the_low_target): Update.
6549
6550 * linux-i386-low.c (the_low_target): Update.
6551 * linux-x86-64-low.c (the_low_target): Update.
6552
d61ddec4
UW
65532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6554
6555 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6556 reg-s390.o and reg-s390x.o.
6557
6558 * linux-low.c (new_inferior): New global variable.
6559 (linux_create_inferior, linux_attach): Set it.
6560 (linux_wait_for_process): Call the_low_target.arch_setup after the
6561 target has stopped for the first time.
6562 (initialize_low): Do not call the_low_target.arch_setup.
6563
6564 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6565 (s390_set_pc): Likewise.
6566 (s390_arch_setup): New function.
6567 (the_low_target): Use s390_arch_setup as arch_setup routine.
6568
6569 * regcache.c (realloc_register_cache): New function.
6570 (set_register_cache): Call it for each existing regcache.
6571
d05b4ac3
UW
65722008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6573
6574 * server.h (init_registers): Remove prototype.
6575
6576 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6577 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6578 instead of init_registers ().
6579 * linux-arm-low.c (init_registers_arm): Add prototype.
6580 (init_registers_arm_with_iwmmxt): Likewise.
6581 (the_low_target): Add initializer for arch_setup field.
6582 * linux-cris-low.c (init_registers_cris): Add prototype.
6583 (the_low_target): Add initializer for arch_setup field.
6584 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6585 (the_low_target): Add initializer for arch_setup field.
6586 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6587 (the_low_target): Add initializer for arch_setup field.
6588 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6589 (the_low_target): Add initializer for arch_setup field.
6590 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6591 (the_low_target): Add initializer for arch_setup field.
6592 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6593 (the_low_target): Add initializer for arch_setup field.
6594 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6595 (init_registers_mips64_linux): Likewise.
6596 (the_low_target): Add initializer for arch_setup field.
6597 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6598 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6599 (the_low_target): Add initializer for arch_setup field.
6600 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6601 (init_registers_powerpc_64): Likewise.
6602 (the_low_target): Add initializer for arch_setup field.
6603 * linux-s390-low.c (init_registers_s390): Add prototype.
6604 (init_registers_s390x): Likewise.
6605 (the_low_target): Add initializer for arch_setup field.
6606 * linux-sh-low.c (init_registers_sh): Add prototype.
6607 (the_low_target): Add initializer for arch_setup field.
6608 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6609 (the_low_target): Add initializer for arch_setup field.
6610 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6611 (the_low_target): Add initializer for arch_setup field.
6612
6613 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6614 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6615 instead of init_registers ().
6616 * win32-arm-low.c (init_registers_arm): Add prototype.
6617 (the_low_target): Add initializer for arch_setup field.
6618 * win32-i386-low.c (init_registers_i386): Add prototype.
6619 (the_low_target): Add initializer for arch_setup field.
6620
6621 * spu-low.c (init_registers_spu): Add prototype.
6622 (initialize_low): Call initialie_registers_spu () instead of
6623 initialize_registers ().
6624
fd96d250
PA
66252008-02-19 Pedro Alves <pedro@codesourcery.com>
6626
6627 * server.c (handle_v_requests): When handling the vRun and vAttach
6628 packets, if already debugging a process, don't kill it. Return an
6629 error instead.
6630
d41b6bb4
DJ
66312008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6632
6633 * server.c (handle_query): Correct length check.
6634
5ac588cf
PA
66352008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6636
6637 * win32-low.c (do_initial_child_stuff): Add process handle
6638 parameter. Set current_process_handle and current_process_id from the
6639 parameters. Clear globals.
6640 (win32_create_inferior): Don't set current_process_handle and
6641 current_process_id here. Instead pass them on the call to
6642 do_initial_child_stuff.
6643 (win32_attach): Likewise.
6644 (win32_clear_inferiors): New.
6645 (win32_kill): Don't close the current process handle or the
6646 current thread handle here. Instead call win32_clear_inferiors.
6647 (win32_detach): Don't open a new handle to the process. Call
6648 win32_clear_inferiors.
6649 (win32_join): Don't rely on current_process_handle; open a new
6650 handle using the process id.
6651 (win32_wait): Call win32_clear_inferiors when the inferior process
6652 has exited.
6653
ecd7ecbc
DJ
66542008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6655
6656 * server.c (monitor_show_help): Add "exit".
6657
1525d545
MG
66582008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6659
ecd7ecbc 6660 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
6661 (clean): Add reg-xtensa.c.
6662 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
6663 * configure.srv (xtensa*-*-linux*) New target.
6664 * linux-xtensa-low.c: New.
6665 * xtensa-xtregs.c: New.
1525d545 6666
59a016f0
PA
66672008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6668
6669 * hostio.c: Don't include errno.h.
6670 (errno_to_fileio_errno): Move to hostio-errno.
6671 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6672 error number outputting to the target->hostio_last_error callback.
6673 (hostio_packet_error): Use FILEIO_EINVAL directly.
6674 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6675 calls to hostio_error.
6676 * hostio-errno.c: New.
6677 * server.h (hostio_last_error_from_errno): Declare.
6678 * target.h (target_ops): Add hostio_last_error member.
6679 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6680 as hostio_last_error handler.
889bf7c5 6681 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
6682 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6683 (wince_hostio_last_error): New functions.
6684 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6685 as hostio_last_error handler.
6686 (win32_target_ops) [!_WIN32_WCE]: Register
6687 hostio_last_error_from_errno as hostio_last_error handler.
6688 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6689 (hostio-errno.o): New rule.
6690 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6691 * configure.srv (srv_hostio_err_objs): New variable. Default to
6692 hostio-errno.o.
6693 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6694 * configure: Regenerate.
6695
2d717e4f
DJ
66962008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6697
6698 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6699 (linux_kill, linux_detach): Clean up the process list.
6700 * remote-utils.c (remote_open): Improve port number parsing.
6701 (putpkt_binary, input_interrupt): Only send interrupts if the target
6702 is running.
6703 * server.c (extended_protocol): Make static.
6704 (attached): Define earlier.
6705 (exit_requested, response_needed, program_argv): New variables.
6706 (target_running): New.
6707 (start_inferior): Clear attached here.
6708 (attach_inferior): Set attached here.
6709 (require_running): Define.
6710 (handle_query): Use require_running and target_running. Implement
6711 "monitor exit".
6712 (handle_v_attach, handle_v_run): New.
6713 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6714 (gdbserver_usage): Update.
6715 (main): Redo argument parsing. Handle --debug and --multi. Handle
6716 --attach along with other options or after the port. Save
6717 program_argv. Support no initial program. Resynchronize
6718 communication with GDB after an error. Handle "monitor exit".
6719 Use require_running and target_running. Always allow the extended
6720 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6721 restart in extended mode.
6722 * README: Refer to the GDB manual. Update --attach usage.
6723
7407e2de
AS
67242007-12-20 Andreas Schwab <schwab@suse.de>
6725
6726 * linux-low.c (STACK_SIZE): Define.
6727 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6728 (linux_test_for_tracefork): Likewise.
6729
b65d95c5
DJ
67302007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6731
6732 * linux-low.c (linux_wait_for_event): Update messages. Do not
6733 reinsert auto-delete breakpoints.
6734 * mem-break.c (struct breakpoint): Change return type of handler to
6735 int.
6736 (set_breakpoint_at): Update handler type.
6737 (reinsert_breakpoint_handler): Return 1 instead of calling
6738 delete_breakpoint.
6739 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6740 setting a new one.
6741 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6742 * mem-break.h (set_breakpoint_at): Update handler type.
6743 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6744 * win32-low.c (auto_delete_breakpoint): New.
6745 (get_child_debug_event): Use it.
6746
4e799345
DJ
67472007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6748
6749 * configure.ac: Check for pread and pwrite.
6750 * hostio.c (handle_pread): Fall back to lseek and read.
6751 (handle_pwrite): Fall back to lseek and write.
6752 * config.in, configure: Regenerated.
6753
27524b67
DJ
67542007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6755
6756 * server.c (myresume): Add own_buf argument.
6757 (main): Update calls.
6758
a20d5e98
DJ
67592007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6760
6761 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6762 * remote-utils.c (remote_open): Do not call disable_async_io.
6763 (block_async_io): Delete.
6764 (unblock_async_io): Make static.
6765 (initialize_async_io): New.
6766 * server.c (handle_v_cont): Handle async I/O here.
6767 (myresume): Likewise. Move other common resume tasks here...
6768 (main): ... from here. Call initialize_async_io. Disable async
6769 I/O before the main loop.
6770 * server.h (initialize_async_io): Declare.
6771 (block_async_io, unblock_async_io): Delete prototypes.
6772 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6773
b79d787e
DJ
67742007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6775
6776 * remote-utils.c (readchar): Allow binary data in received messages.
6777
d97903b2
PA
67782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6779
6780 * win32-low.c (attaching): New global.
6781 (win32_create_inferior): Clear the `attaching' global.
6782 (win32_attach): Set the `attaching' global.
6783 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6784 attaching. Only set a breakpoint at the entry point if not
6785 attaching.
6786
311de423
PA
67872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6788
6789 * server.c (main): Don't report dll events on the initial
6790 connection on attaches.
6791
6c2d16d2
PA
67922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6793
6794 * server.c (main): Relax numerical bases supported for the pid of
6795 the --attach command line argument.
6796
5ca906e6
PA
67972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6798
6799 * win32-low.c (win32_attach): Call OpenProcess before
6800 DebugActiveProcess, not after. Add last error output to error
6801 call.
6802
9c6c8194
PA
68032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6804
6805 * win32-low.c (win32_get_thread_context)
6806 (win32_set_thread_context): New functions.
6807 (thread_rec): Use win32_get_thread_context.
6808 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6809 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6810 field.
6811
4d5d1aaa
PA
68122007-12-03 Leo Zayas
6813 Pedro Alves <pedro_alves@portugalmail.pt>
6814
6815 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6816 global variables.
6817 (child_add_thread): Minor cleanup.
6818 (child_continue): Resume artificially suspended threads before
6819 calling ContinueDebugEvent.
6820 (suspend_one_thread): New.
6821 (fake_breakpoint_event): New.
6822 (get_child_debug_event): Change return type to int. Check here if
6823 gdb sent an interrupt request. If a soft interrupt was requested,
6824 fake a breakpoint event. Return 0 if there is no event to handle,
6825 and 1 otherwise.
6826 (win32_wait): Don't check here if gdb sent an interrupt request.
6827 Ensure there is a valid event to handle.
6828 (win32_request_interrupt): Add soft interruption method as last
6829 resort.
6830
c436e841
PA
68312007-12-03 Leo Zayas
6832 Pedro Alves <pedro_alves@portugalmail.pt>
6833
6834 * win32-low.h (win32_thread_info): Add descriptions to the
6835 structure members. Replace `suspend_count' counter by a
6836 `suspended' flag.
6837 * win32-low.c (thread_rec): Update condition of when to get the
6838 context from the inferior. Rely on ContextFlags being set if it
6839 has already been retrieved. Only suspend the inferior thread if
6840 we haven't already. Warn if that fails.
6841 (continue_one_thread): s/suspend_count/suspended/. Only call
6842 ResumeThread once. Warn if that fails.
6843
e7b5fa67
PA
68442007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6845
6846 * win32-low.c (win32_wait): Don't read from the inferior when it
6847 has already exited.
6848
a385171d
PA
68492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6850
6851 * Makefile.in (win32_low_h): New variable.
6852 (win32-low.o): Add dependency on $(win32_low_h).
6853 (win32-arm-low.o, win32-i386-low.o): New rules.
6854
f80c84b3
DJ
68552007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6856
6857 * hostio.c: Correct copyright year.
6858
a6b151f1
DJ
68592007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6860
6861 * Makefile.in (OBS): Add hostio.o.
6862 (hostio.o): New rule.
6863 * server.h (handle_vFile): Declare.
6864 * hostio.c: New file.
6865 * server.c (handle_v_requests): Take packet_len and new_packet_len
6866 for binary packets. Call handle_vFile.
6867 (main): Update call to handle_v_requests.
6868
f9387fc3
DJ
68692007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6870
6871 * linux-low.c: Include <sched.h>.
6872
51c2684e
DJ
68732007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6874
6875 * linux-low.c (linux_tracefork_grandchild): New.
6876 (linux_tracefork_child): Use clone.
6877 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6878
75f83163
JB
68792007-10-31 Joel Brobecker <brobecker@adacore.com>
6880
6881 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6882
da5898ce
DJ
68832007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6884
6885 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6886
24a09b5f
DJ
68872007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6888
6889 * inferiors.c (change_inferior_id): Delete.
6890 (add_pid_to_list, pull_pid_from_list): New.
6891 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6892 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6893 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6894 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6895 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6896 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6897 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6898 (using_threads): Always set to 1.
6899 (handle_extended_wait): New.
6900 (add_process): Do not set TID.
6901 (linux_create_inferior): Set must_set_ptrace_flags.
6902 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6903 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6904 (linux_thread_alive): Rename TID argument to LWPID.
6905 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6906 (linux_wait_for_event): Do not use TID or check using_threads. Update
6907 call to dead_thread_notify. Call handle_extended_wait.
6908 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6909 (send_sigstop): Delete sigstop_sent.
6910 (wait_for_sigstop): Avoid TID.
6911 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6912 (linux_test_for_tracefork): New.
6913 (linux_lookup_signals): Use thread_db_active and
6914 linux_supports_tracefork_flag.
6915 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6916 * linux-low.h (get_process_thread): Avoid TID.
6917 (struct process_ifo): Move thread_known and tid to the end. Remove
6918 sigstop_sent.
6919 (linux_attach_lwp, thread_db_init): Update prototypes.
6920 * server.h (change_inferior_id): Delete prototype.
6921 (add_pid_to_list, pull_pid_from_list): New prototypes.
6922 * thread-db.c (thread_db_use_events): New.
6923 (find_first_thread): Rename to...
6924 (find_one_thread): ...this. Update callers and messages. Do not
6925 call fatal. Check thread_db_use_events. Do not call
6926 change_inferior_id or new_thread_notify.
6927 (maybe_attach_thread): Update. Do not call new_thread_notify.
6928 (thread_db_init): Set thread_db_use_events. Check use_events.
6929 * utils.c (fatal, warning): Correct message prefix.
6930
30ed0a8f
DJ
69312007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6932
6933 * Makefile.in (clean): Remove new files.
6934 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6935 (powerpc-64.o, powerpc-64.c): New rules.
6936 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6937 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6938 with SPE.
6939 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6940 SPE targets.
6941 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6942 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6943 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6944 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6945 (target_regsets): Add AltiVec and SPE register sets.
6946 * configure.ac: Check for AltiVec and SPE.
6947 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6948 (ppc_fill_vrregset, ppc_store_vrregset): New.
6949 (target_regsets): Add AltiVec register set.
6950 * configure: Regenerated.
6951
fd462a61
DJ
69522007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6953
6954 * linux-low.c (O_LARGEFILE): Define.
6955 (linux_read_memory): Use /proc/PID/mem.
6956 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6957 * configure, config.in: Regenerated.
6958
69f223ed
DJ
69592007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6960
6961 * linux-low.c (linux_wait_for_event): Do not pass signals while
6962 single-stepping.
6963
aec18585
PA
69642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6965
6966 * win32-low.c (create_process): New.
6967 (win32_create_inferior): Use create_process instead of
6968 CreateProcess. If create_process failed retry appending an ".exe"
6969 suffix. Store the GetLastError result immediatelly after
6970 create_process calls and use it on the call to error.
6971
34d86ddd
PA
69722007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6973
6974 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6975
5a0e3bd0
JB
69762007-08-23 Joel Brobecker <brobecker@adacore.com>
6977
6978 * configure.ac: Switch license to GPLv3.
6979
f88c79e6
MS
69802007-08-01 Michael Snyder <msnyder@access-company.com>
6981
6982 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6983
6b3d9b83
PA
69842007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6985
6986 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6987 typedef.
6988 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6989 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6990 CloseToolhelp32Snapshot.
6991 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6992 CloseToolhelp32Snapshot.
6993
c588c53c
MS
69942007-07-27 Michael Snyder <michael.snyder@access-company.com>
6995
6996 * server.c (main): Check for inferior exit before main loop.
6997
aa0403d9
PA
69982007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6999
7000 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7001 instead of on tmp_desc.
7002
255e7678
DJ
70032007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7004 Daniel Jacobowitz <dan@codesourcery.com>
7005
7006 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7007 (add_thread): Minor cleanups.
7008 (clear_inferiors): Move lower in the file. Clear the DLL
7009 list.
7010 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7011 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7012 (xml_escape_text): New.
7013 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7014 for qSupported.
7015 (handle_v_cont): Report errors.
7016 (gdbserver_version): Update.
7017 (main): Correct size of own_buf. Do not report initial DLL events.
7018 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7019 (unloaded_dll, xml_escape_text): New.
7020 * win32-low.c (enum target_waitkind): Update comments.
7021 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7022 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7023 (win32_EnumProcessModules, win32_GetModuleInformation)
7024 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7025 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7026 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7027 (win32_Module32First, win32_Module32Next, load_toolhelp)
7028 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7029 (get_child_debug_event): Handle DLL events.
7030 (win32_wait): Likewise.
7031
0d37add9
DJ
70322007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7033
7034 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7035 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7036
45e2715e
PA
70372007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7038
7039 * win32-low.c (handle_output_debug_string): Ignore event if not
7040 waiting.
7041
c5674cf1
PA
70422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7043
7044 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7045
2bbe3cc1
DJ
70462007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7047
7048 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7049
ae13219e
DJ
70502007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7051
7052 * inferiors.c (change_inferior_id): Add comment.
7053 * linux-low.c (check_removed_breakpoint): Add an early
7054 prototype. Improve debug output.
7055 (linux_attach): Doc update.
7056 (linux_detach_one_process, linux_detach): Clean up before releasing
7057 each process.
7058 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7059 * linux-low.h (struct process_info): Doc improvement.
7060 * mem-break.c (delete_all_breakpoints): New.
7061 * mem-break.h (delete_all_breakpoints): New prototype.
7062 * thread-db.c (find_first_thread): New.
7063 (thread_db_create_event): Call it instead of
7064 thread_db_find_new_threads. Clean up unused variables.
7065 (maybe_attach_thread): Remove first thread handling.
7066 (thread_db_find_new_threads): Use find_first_thread.
7067 (thread_db_get_tls_address): Likewise.
7068
4105de34
DJ
70692007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7070
7071 * thread-db.c (thread_db_find_new_threads): Add prototype.
7072 (thread_db_create_event): Check for the main thread before adding
7073 a new thread.
7074 (maybe_attach_thread): Only enable event reporting if TID == 0.
7075 (thread_db_get_tls_address): Check for new threads.
7076
2b876972
DJ
70772007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7078
7079 * linux-low.c (linux_create_inferior): Try execv before execvp.
7080 * spu-low.c (spu_create_inferior): Likewise.
7081
7a245884
DJ
70822007-06-13 Mike Frysinger <vapier@gentoo.org>
7083
7084 * linux-low.c (linux_create_inferior): Change execv to execvp.
7085 * spu-low.c (spu_create_inferior): Likewies.
7086
117ce543
DJ
70872007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7088
7089 * Makefile.in (clean): Clean new files instead of deleted ones.
7090 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7091 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7092 rules.
7093 * configure.srv: Specify XML files and new regformats for MIPS and
7094 MIPS64 GNU/Linux.
7095 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7096 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7097 an entry for the restart register.
7098 (mips_cannot_fetch_register, mips_cannot_store_register)
7099 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7100 register names to match the XML descriptions.
7101 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7102 restart register instead of $0.
7103
0e7f50da
UW
71042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7105 Markus Deuling <deuling@de.ibm.com>
7106
7107 * remote-utils.c (decode_xfer_write): New function.
7108 * server.h (decode_xfer_write): Add prototype.
7109 * server.c (handle_query): Add PACKET_LEN argument. Support
7110 qXfer:spu:read and qXfer:spu:write packets.
7111 (main): Pass packet_len to handle_query.
7112 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7113 * target.h (target_ops): Add qxfer_spu.
7114
374c1d38
UW
71152007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7116
7117 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7118 accessing non-seekable spufs files.
7119
bb63802a
UW
71202007-05-16 Markus Deuling <deuling@de.ibm.com>
7121
889bf7c5 7122 * server.c (handle_query): Add reply for qC packet.
bb63802a 7123
7390519e
PA
71242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7125 Leo Zayas <lerele@champenstudios@com>
7126
7127 * server.h (check_remote_input_interrupt_request): New function.
7128 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7129 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7130 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7131 (check_remote_input_interrupt_request): New function.
7132 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 7133 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
7134 winapi_GenerateConsoleCtrlEvent): New typedefs.
7135 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7136 to 250 ms.
7137 (win32_wait): Check for remote interrupt request
7138 with check_remote_input_interrupt_request.
7139 (win32_request_interrupt): New function.
7140 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7141
34b34921
PA
71422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7143
7144 * win32-low.c (debug_registers_changed,
7145 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7146 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7147 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7148 (thread_rec): Get context using the low target.
7149 (child_add_thread): Call thread_added on the low target,
7150 which does the same thing.
7151 (regptr): Delete.
7152 (do_initial_child_stuff): Remove debug registers references.
7153 Set context using the low target. Resume threads after
7154 setting the contexts.
7155 (child_continue): Remove dead variable. Remove debug
7156 registers references.
7157 (child_fetch_inferior_registers): Go through the low target.
7158 (do_child_store_inferior_registers): Remove.
7159 (child_store_inferior_registers): Go through the low target.
7160 (win32_resume): Remove debug registers references.
7161 Set context using the low target.
7162 (handle_exception): Change return type to void. Don't record
7163 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7164 first chance exception.
889bf7c5 7165 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
7166 goto loop. Always return after waiting for debug event.
7167 (win32_wait): Convert to switch statement. Handle spurious
7168 events.
7169
7170 * win32-i386-low.c (debug_registers_changed,
7171 debug_registers_used): New.
7172 (initial_stuff): Rename to ...
7173 (i386_initial_stuff): ... this. Clear debug registers
7174 state variables.
7175 (store_debug_registers): Delete.
7176 (i386_get_thread_context): New.
7177 (load_debug_registers): Delete.
7178 (i386_set_thread_context): New.
7179 (i386_thread_added): New.
7180 (single_step): Rename to ...
7181 (i386_single_step): ... this.
7182 (do_fetch_inferior_registers): Rename to ...
7183 (i386_fetch_inferior_register): ... this.
7184 (i386_store_inferior_register): New.
7185 (the_low_target): Adapt to new interface.
7186
7187 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7188 (arm_get_thread_context): New.
7189 (arm_set_thread_context): New.
7190 (regptr): New.
7191 (do_fetch_inferior_registers): Rename to ...
7192 (arm_fetch_inferior_register): ... this.
7193 (arm_store_inferior_register): New.
7194 (arm_wince_breakpoint): Reimplement as unsigned long.
7195 (arm_wince_breakpoint_len): Define.
7196 (the_low_target): Adapt to new interface.
7197
7198 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7199 load_debug_registers. Add get_thread_context, set_thread_context,
7200 thread_added and store_inferior_register. Rename
7201 fetch_inferior_registers to fetch_inferior_register.
7202 (regptr): Remove declaration.
7203
dd6953e1
PA
72042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7205
7206 * linux-low.c (linux_detach): Change return type to int. Return 0.
7207 * spu-low.c (spu_detach): Likewise.
7208
444d6139
PA
72092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7210
7211 * target.h (target_ops): Change return type of detach to int.
7212 Add join.
7213 (join_inferior): New.
7214 * server.c (main): Don't skip detach support on mingw32.
7215 If the inferior doesn't support detaching return error.
7216 Call join_inferior instead of using waitpid.
7217 * linux-low.c (linux_join): New.
7218 (linux_target_op): Add linux_join.
7219 * spu-low.c (spu_join): New.
7220 (spu_target_ops): Add spu_join.
7221 * win32-low.c (win32_detach): Adapt to new interface.
7222 Reopen current_process_handle before detaching. Issue a child
7223 resume before detaching.
7224 (win32_join): New.
7225 (win32_target_op): Add win32_join.
7226
1d5315fe
PA
72272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7228
7229 * win32-low.c (win32-attach): Fix return value.
7230 * target.h (target_ops): Describe ATTACH return values.
7231
bf914831
PA
72322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7233
7234 * win32-low.c (GETPROCADDRESS): Define.
7235 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7236 (winapi_DebugSetProcessKillOnExit): Likewise.
7237 (win32_create_inferior): Force usage of ansi CreateProcessA.
7238 (win32_attach): Use GETPROCADDRESS.
7239 (win32_detach): Likewise.
7240
f72f3e60
PA
72412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7242
7243 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7244
ed50f18f
PA
72452007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7246
7247 * win32-low.c: Commit leftover changes from 2007-03-29.
7248
0c2ead7e
DJ
72492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7250
7251 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7252 fields short instead of int. Add explicit padding.
7253 (i387_cache_to_fsave): Remove unnecessary casts.
7254 (i387_fsave_to_cache): Doc fix.
7255 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7256
73725ff3
DJ
72572007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7258
7259 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7260 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7261
d99f33d8
PA
72622007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7263
7264 * configure.srv (arm*-*-mingw32ce*): Move near the other
7265 arm targets.
7266
68070c10
PA
72672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7268
2482afc6 7269 * configure.ac: Add errno checking.
68070c10
PA
7270 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7271 sys/file.h and malloc.h.
7272 (AC_CHECK_DECLS): Add perror.
7273 (srv_mingwce): Handle.
2482afc6 7274 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
7275 win32-i386-low.o to srv_tgtobj.
7276 (i[34567]86-*-mingw*): Likewise.
7277 (arm*-*-mingw32ce*): Add case.
7278 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7279 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7280 [__MINGW32CE__] (strerror): New function.
7281 [__MINGW32CE__] (errno): Define to GetLastError.
7282 [__MINGW32CE__] (COUNTOF): New macro.
7283 (remote_open): Remove extra close call.
7284 * mem-break.c (delete_breakpoint_at): New function.
7285 * mem-break.h (delete_breakpoint_at): Declare.
7286 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7287 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7288 [USE_WIN32API] (read, write): Add char* casts.
7289 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7290 * server.h: Include wincecompat.h on Windows CE.
7291 [HAVE_ERRNO_H]: Check.
7292 (perror): Declare if not declared.
7293 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7294 (perror_with_name): Remove errno declaration.
7295 * wincecompat.h: New.
7296 * wincecompat.c: New.
7297 * win32-low.h: New.
7298 * win32-arm-low.c: New.
7299 * win32-i386-low.c: New.
7300 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7301 (OUTMSG2): Make it safe.
7302 (_T): New macro.
7303 (COUNTOF): New macro.
7304 (NUM_REGS): Get it from the low target.
7305 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7306 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7307 (thread_rec): Let low target handle debug registers.
7308 (child_add_thread): Likewise.
7309 (child_init_thread_list): Likewise.
7310 (continue_one_thread): Likewise.
7311 (regptr): New.
7312 (do_child_fetch_inferior_registers): Move to ...
7313 * win32-i386-low.c: ... here, and rename to ...
7314 (do_fetch_inferior_registers): ... this.
889bf7c5 7315 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
7316 Go through the low target.
7317 (do_child_store_inferior_registers): Use regptr.
7318 (strwinerror): New function.
7319 (win32_create_inferior): Handle Windows CE.
7320 Use strwinerror instead of strerror on Windows error
7321 codes. Add program to the error output.
7322 Don't close the main thread handle on Windows CE.
7323 (win32_attach): Use coredll.dll on Windows CE.
7324 (win32_kill): Close current process and current
7325 thread handles.
7326 (win32_detach): Use coredll.dll on Windows CE.
7327 (win32_resume): Let low target handle debug registers, and
7328 step request.
7329 (handle_exception): Add/Remove initial breakpoint. Avoid
7330 non-existant WSTOPSIG on Windows CE.
7331 (win32_read_inferior_memory): Cast to remove warning.
7332 (win32_arch_string): Go through the low target.
7333 (initialize_low): Call set_breakpoint_data with the low
7334 target's breakpoint.
7335 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7336 FOP_REGNUM, mappings): Move to ...
7337 * win32-i386-low.c: ... here.
7338 * win32-low.c (win32_thread_info): Move to ...
7339 * win32-low.h: ... here.
7340 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7341 win32-arm-low.c and wincecompat.c.
7342 (all:): Add $EXEEXT.
7343 (install-only:): Likewise.
7344 (gdbserver:): Likewise.
7345 (gdbreplay:): Likewise.
7346 * config.in: Regenerate.
7347 * configure: Regenerate.
7348
41093d81
PA
73492007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7350
7351 * win32-low.c: Rename typedef thread_info to
7352 win32_thread_info throughout.
7353
544afa54
PA
73542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7355
7356 * win32-i386-low.c: Rename to ...
7357 * win32-low.c: ... this.
7358 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7359 * Makefile.in: Likewise.
7360
bce7165d
PA
73612007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7362
7363 * remote-utils.c (monitor_output): Constify msg parameter.
7364 * server.h (monitor_output): Likewise.
7365 * win32-i386-low.c (handle_output_debug_string): New.
7366 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7367 handle_output_debug_string.
7368 (get_child_debug_event): Likewise.
7369
506c7aa0
DJ
73702007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7371
7372 * server.c (main): Correct strtoul check.
7373
42c81e2a
DJ
73742007-03-27 Jon Ringle <jon@ringle.org>
7375
7376 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7377
9453113a
DJ
73782007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7379
7380 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7381
64a69107
DJ
73822007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7383
7384 * terminal.h: Check HAVE_SGTTY_H.
7385
73862007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
7387
7388 * remote-utils.c (remote_open): Print out the assigned port number.
7389
c74d0ad8
DJ
73902007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7391
7392 * remote-utils.c (monitor_output): New function.
7393 * server.c (debug_threads): Define here.
7394 (monitor_show_help): New function.
7395 (handle_query): Handle qRcmd.
7396 (main): Do not handle 'd' packet.
7397 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7398 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7399 of debug_threads.
7400
de7c3b4a
PA
74012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7402
7403 * Makefile.in (EXEEXT): New.
7404 (clean): Use $(EXEEXT).
7405
ef57601b
PA
74062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7407
7408 * target.h (target_ops): Rename send_signal to request_interrupt,
7409 and remove enum target_signal parameter.
7410 * linux-low.c (linux_request_interrupt): Rename from
7411 linux_send_signal, and always send SIGINT.
7412 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7413 and always send SIGINT.
7414 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7415 of send_signal.
7416 (input_interrupt): Likewise.
7417
820f2bda
PA
74182007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7419
7420 * server.c (get_features_xml): Check if target implemented
7421 arch_string.
7422 * win32-i386-low.c (win32_arch_string): New.
7423 (win32_target_ops): Add win32_arch_string as arch_string member.
7424
ab39bf24
UW
74252007-02-22 Markus Deuling <deuling@de.ibm.com>
7426
7427 * spu-low.c (spu_arch_string): New.
7428 (spu_target_ops): Add spu_arch_string.
7429
61ff6e04
DJ
74302007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7431
7432 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7433 * configure.ac: Do not check for terminal.h.
7434 * configure, config.in: Regenerated.
7435
fb1e4ffc
DJ
74362007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7437
7438 * Makefile.in (OBS): Add $(XML_BUILTIN).
7439 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7440 (clean): Update.
7441 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7442 (arm-with-iwmmxt.c): New.
7443 * config.in, configure: Regenerate.
7444 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7445 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7446 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7447 (arm*-*-linux*): Add iWMMXt and regset support.
7448 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7449 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7450 (arm_store_wmmxregset, target_regsets): New.
7451 * server.c (get_features_xml): Take annex argument. Check builtin
7452 XML documents.
7453 (handle_query): Handle multiple annexes.
7454
0f48aa01
DJ
74552007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7456
7457 * remote-utils.c [USE_WIN32API] (read, write): Define.
7458 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7459 write.
7460
23181151
DJ
74612007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7462
7463 * linux-i386-low.c (the_low_target): Set arch_string.
7464 * linux-x86-64-low.c (the_low_target): Likewise.
7465 * linux-low.c (linux_arch_string): New.
7466 (linux_target_ops): Add it.
7467 * linux-low.h (struct linux_target_ops): Add arch_string.
7468 * server.c (write_qxfer_response): Use const void * for DATA.
7469 (get_features_xml): New.
7470 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7471 * target.h (struct target_ops): Add arch_string method.
7472
9d606399
DJ
74732007-01-03 Denis Pilat <denis.pilat@st.com>
7474 Daniel Jacobowitz <dan@codesourcery.com>
7475
7476 * linux-low.c (linux_kill): Handle being called with no threads.
7477 * win32-i386-low.c (win32_kill): Likewise.
7478 (get_child_debug_event): Clear current_process_handle.
7479
74802006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
7481 Daniel Jacobowitz <dan@codesourcery.com>
7482
7483 * remote-utils.c (remote_open): Check the type of specified
7484 serial port devices before opening them.
7485 * server.c (main): Kill the inferior if an error occurs during
7486 the first remote_open.
7487
a5e13d24
DJ
74882006-12-05 Markus Deuling <deuling@de.ibm.com>
7489
7490 * README: Update supported targets.
7491
186947f7
DJ
74922006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7493
7494 * Makefile.in (clean): Remove reg-mips64.c.
7495 (reg-mips64.c, reg-mips64.o): New rules.
7496 * configure.srv: Handle mips64. Include regset support for mips.
7497 * linux-mips-low.c (union mips_register): New.
7498 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7499 (mips_breakpoint, mips_breakpoint_at): Use int.
7500 (mips_collect_register, mips_supply_register)
7501 (mips_collect_register_32bit, mips_supply_register_32bit)
7502 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7503 (mips_store_fpregset, target_regsets): New.
7504 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7505
a13e2c95
UW
75062006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7507
7508 * configure.srv: Add target "spu*-*-*".
7509 * Makefile.in (clean): Remove reg-spu.c.
7510 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7511 * spu-low.c: New file.
7512
cb7283db
DJ
75132006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7514
7515 * configure.ac: Correct td_thr_tls_get_addr test.
7516 * configure: Regenerated.
7517
89be2091
DJ
75182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7519
7520 * linux-low.c (linux_wait_for_event): Reformat. Use the
7521 pass_signals array.
7522 * remote-utils.c (decode_address_to_semicolon): New.
7523 * server.c (pass_signals, handle_general_set): New.
7524 (handle_query): Mention QPassSignals for qSupported.
7525 (main): Call handle_general_set.
7526 * server.h (pass_signals, decode_address_to_semicolon): New.
7527
000ef4f0
DJ
75282006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7529
7530 * server.c (handle_query): Correct error handling for read_auxv.
7531
b7149293
UW
75322005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7533
7534 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7535 and srv_linux_thread_db to yes.
7536 * linux-s390-low.c (s390_fill_gregset): New function.
7537 (target_regsets): Define data structure.
7538
dae5f5cf
DJ
75392006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7540
7541 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7542 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7543 * config.in, configure: Regenerated.
7544 * inferiors.c (gdb_id_to_thread): New function.
7545 (gdb_id_to_thread_id): Use it.
7546 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7547 * linux-low.h (struct process_info): Add th member.
7548 (thread_db_get_tls_address): New prototype.
7549 * remote-utils.c (decode_address): Make non-static.
7550 * server.c (handle_query): Handle qGetTLSAddr.
7551 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7552 * target.h (struct target_ops): Add get_tls_address.
7553 * thread-db.c (maybe_attach_thread): Save the thread handle.
7554 (thread_db_get_tls_address): New.
7555
32ca6d61
DJ
75562006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7557
7558 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7559 (linux_resume_one_process): Take a siginfo_t *. Update all
7560 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7561 (struct pending_signals): Add a siginfo_t.
7562 (linux_wait_for_process): Always set last_status.
7563 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7564 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7565 * linux-low.h (struct process_info): Add last_status.
7566
5ffff7c1
DJ
75672006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7568
7569 * remote-utils.c (try_rle): New function.
7570 (putpkt_binary): Use it.
7571
8695c747
DJ
75722006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7573
7574 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7575 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7576 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7577 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7578 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7579 point registers.
7580
290fadea
RS
75812006-08-08 Richard Sandiford <richard@codesourcery.com>
7582
7583 * server.c (terminal_fd): New variable.
7584 (old_foreground_pgrp): Likewise.
7585 (restore_old_foreground_pgrp): New function.
7586 (start_inferior): Record the terminal file descriptor in terminal_fd
7587 and its original foreground group in old_foreground_pgrp. Register
7588 restore_old_foreground_pgrp with atexit().
7589
9f2e1e63
DJ
75902006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7591
7592 * server.c (handle_query): Correct qPart to qXfer.
7593
b80864fb
DJ
75942006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7595
7596 * configure.ac: Check for more headers which are missing on
7597 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7598 * configure.srv: Add Cygwin and mingw32.
7599 * remote-utils.c: Don't include headers unconditionally which
7600 are missing on mingw32. Include <winsock.h> for mingw32.
7601 (remote_open): Adjust for mingw32 support. Flush
7602 standard error after writing to it.
7603 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7604 (unblock_async_io, enable_async_io, disable_async_io)
7605 (readchar, getpkt): Update for Winsock support.
7606 (prepare_resume_reply): Expect a protocol signal number.
7607 * server.c: Disable <sys/wait.h> on mingw32.
7608 (start_inferior): Adjust for mingw32 support. Flush
7609 standard error after writing to it.
7610 (attach_inferior): Likewise. Use protocol signal
7611 numbers.
7612 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7613 and names.
7614 * win32-i386-low.c: New file.
7615 * Makefile.in (XM_CLIBS): Set.
7616 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7617 (win32-i386-low.o): New dependency rule.
7618 * linux-low.c (linux_wait): Use target signal numbers.
7619 * target.h (struct target_ops): Doc fix.
7620 * server.h (target_signal_to_name): New prototype.
7621 * gdbreplay.c: Don't include headers unconditionally which
7622 are missing on mingw32. Include <winsock.h> for mingw32.
7623 (remote_close, remote_open): Adjust for Winsock support.
7624 * configure, config.in: Regenerated.
7625
0876f84a
DJ
76262006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7627
7628 * server.c (decode_xfer_read, write_qxfer_response): New.
7629 (handle_query): Take a packet length argument. Handle
7630 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7631 the qSupported response.
7632 (main): Update call to handle_query.
7633
01f9e8fa
DJ
76342006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7635
7636 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7637 (putpkt_binary): Renamed from putpkt and adjusted for binary
7638 data.
7639 (putpkt): New wrapper for putpkt_binary.
7640 (readchar): Don't mask off the high bit.
7641 (decode_X_packet): New function.
7642 * server.c (main): Call putpkt_binary if a handler sets the packet
7643 length. Save the length of the incoming packet. Handle 'X'.
7644 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7645
be2a5f71
DJ
76462006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7647
7648 * server.c (handle_query): Handle qSupported.
7649
ea025f5f
DJ
76502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7651
7652 * remote-utils.c (all_symbols_looked_up): New variable.
7653 (look_up_one_symbol): Check it.
7654 * server.h (look_up_one_symbol): New declaration.
7655 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7656
9308fc88
DJ
76572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7658
7659 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 7660 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
7661 (PTRACE_GET_THREAD_AREA): Define.
7662 (ps_get_thread_area): New function.
7663
52fb6437
NS
76642006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7665
7666 * configure.srv (m68k*-*-uclinux*): New target.
7667 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7668 (linux_resume_one_process): Remove extraneous cast.
7669 (linux_read_offsets): New.
7670 (linux_target_op): Add linux_read_offsets on mmuless systems.
7671 * server.c (handle_query): Add qOffsets logic.
7672 * target.h (struct target_ops): Add read_offsets.
7673
21b0f40c
DJ
76742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7675
7676 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7677 (PTRACE_GET_THREAD_AREA): Define.
7678 (ps_get_thread_area): New function.
7679 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7680 (linux-x86-64-low.o): Update.
7681
0050a760
DJ
76822006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7683
7684 * configure.ac: Remove checks for prfpregset_t.
7685 * gdb_proc_service.h: New file.
7686 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7687 new "gdb_proc_service.h".
7688 * proc-service.c: Likewise.
7689 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7690 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7691 * Makefile.in (gdb_proc_service_h): Updated.
7692 * configure, config.in: Regenerated.
7693
b92a518e
DJ
76942006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7695
7696 * remote-utils.c (prepare_resume_reply): Move declaration
7697 of gdb_id_from_wait to the top of the block.
7698
545587ee
DJ
76992006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7700
7701 * linux-low.c (regsets_store_inferior_registers): Read the regset
7702 from the target before filling it.
7703
9db87ebd
DJ
77042006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7705
7706 * server.c (attach_inferior): Return SIGTRAP for a successful
7707 attach.
7708
dd24457d
DJ
77092006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7710
7711 * Makefile.in (OBS): Add version.o.
7712 (STAGESTUFF): Delete.
7713 (version.o): Add dependencies.
7714 (version.c): Replace rule.
7715 (clean): Remove version.c.
7716 * server.c (gdbserver_version): New.
7717 (gdbserver_usage): Use printf.
7718 (main): Handle --version and --help.
7719 * server.h (version, host_name): Add declarations.
7720
6f0f660e
EZ
77212005-12-23 Eli Zaretskii <eliz@gnu.org>
7722
889bf7c5
PA
7723 * linux-arm-low.c:
7724 * linux-arm-low.c:
7725 * inferiors.c:
7726 * i387-fp.h:
7727 * i387-fp.c:
7728 * gdbreplay.c:
7729 * regcache.c:
7730 * proc-service.c:
7731 * mem-break.h:
7732 * mem-break.c:
7733 * linux-x86-64-low.c:
7734 * linux-sh-low.c:
7735 * linux-s390-low.c:
7736 * linux-ppc64-low.c:
7737 * linux-ppc-low.c:
7738 * linux-mips-low.c:
7739 * linux-m68k-low.c:
7740 * linux-m32r-low.c:
7741 * linux-low.h:
7742 * linux-low.c:
7743 * linux-ia64-low.c:
7744 * linux-i386-low.c:
7745 * linux-crisv32-low.c:
7746 * thread-db.c:
7747 * terminal.h:
7748 * target.h:
7749 * target.c:
7750 * server.h:
7751 * server.c:
7752 * remote-utils.c:
7753 * regcache.h:
7754 * utils.c:
7755 * Makefile.in:
7756 * configure.ac:
6f0f660e
EZ
7757 * gdbserver.1: Add (C) after Copyright. Update the FSF
7758 address.
7759
9d1fb177
DJ
77602005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7761
7762 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7763 (arm_breakpoint_at): Recognize both breakpoints.
7764 (the_low_target): Use the correct breakpoint instruction.
7765
011a70c2
DJ
77662005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7767
7768 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7769 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7770 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7771 (the_low_target): Update.
7772
7fb85e41
AS
77732005-10-25 Andreas Schwab <schwab@suse.de>
7774
7775 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7776
7777 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7778 (ia64_num_regs): Reduce to 462.
7779
3db0444b
DJ
77802005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7781
7782 * acinclude.m4: Correct quoting.
7783 * aclocal.m4: Regenerated.
7784
7785 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7786 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7787 (thread_db_init): Call thread_db_err_str.
7788 * configure.ac: Check for TD_VERSION.
7789 * config.in, configure: Regenerated.
7790
bee0189a
DJ
77912005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7792
7793 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7794
e9d25b98
DJ
77952005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7796
7797 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7798 is not available. Define HAVE_PTRACE_GETREGS if it is.
7799 * config.in, configure: Regenerated.
7800 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7801 * linux-i386-low.c, linux-m68k-low.c: Update to use
7802 HAVE_PTRACE_GETREGS.
7803 * linux-low.c (regsets_fetch_inferior_registers)
7804 (regsets_store_inferior_registers): Only return 0 if we processed
7805 GENERAL_REGS.
7806 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7807 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7808
a06660f7
DJ
78092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7810
7811 * inferiors.c (struct thread_info): Add gdb_id.
7812 (add_thread): Add gdb_id argument.
7813 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7814 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7815 calls to add_thread.
7816 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7817 * server.c (handle_query): Use thread_to_gdb_id.
7818 (handle_v_cont, main): Use gdb_id_to_thread_id.
7819 * server.h (add_thread): Update prototype.
7820 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7821 prototypes.
7822
5a1f5858
DJ
78232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7824
7825 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7826 left-padded registers.
7827 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7828 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7829
e122f1f5
SE
78302005-07-01 Steve Ellcey <sje@cup.hp.com>
7831
7832 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7833 * configure: Regenerate.
7834 * config.in: Regenerate.
7835 * server.h (NEED_DECLARATION_STRERROR):
7836 Replace with !HAVE_DECL_STRERROR.
7837
d592fa2f
DJ
78382005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7839
7840 * linux-low.c (linux_wait, linux_send_signal): Don't test
7841 an unsigned long variable for > 0 if it could be MAX_ULONG.
7842 * server.c (myresume): Likewise.
7843 * target.c (set_desired_inferior): Likewise.
7844
ccbd4912
MK
78452005-06-13 Mark Kettenis <kettenis@gnu.org>
7846
7847 * configure.ac: Simplify and improve check for socklen_t.
7848 * configure, config.in: Regenerate.
7849
f450004a
DJ
78502005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7851
7852 * acconfig.h: Remove.
7853 * configure.ac: Add a test for socklen_t. Use three-argument
7854 AC_DEFINE throughout.
7855 * config.in: Regenerated using autoheader 2.59.
7856 * configure: Regenerated.
7857
7858 * gdbreplay.c (socklen_t): Provide a default.
7859 (remote_open): Use socklen_t.
7860 * remote-utils.c (socklen_t): Provide a default.
7861 (remote_open): Use socklen_t.
7862 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7863 unsigned char.
7864
7865 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7866 char for buffers.
7867 * linux-low.c (linux_read_memory, linux_write_memory)
7868 (linux_read_auxv): Likewise.
7869 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7870 (check_mem_write): Likewise.
7871 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7872 Likewise.
7873 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7874 (registers_from_string, register_data): Likewise.
7875 * server.c (handle_query, main): Likewise.
7876 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7877 (decode_M_packet): Likewise.
7878 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7879 * target.h (struct target_ops): Update read_memory, write_memory,
7880 and read_auxv.
7881 (read_inferior_memory, write_inferior_memory): Update.
7882 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7883 to unsigned char *.
7884 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7885 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7886 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7887 linux-s390-low.c, linux-sh-low.c: Update for changes in
7888 read_inferior_memory and the_low_target->breakpoint.
7889
eee84df1
DJ
78902005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7891
7892 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7893 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7894 * configure.srv: Add powerpc64-*-linux*.
7895 * linux-ppc64-low.c: New file.
7896
45b134e5
OF
78972005-05-23 Orjan Friberg <orjanf@axis.com>
7898
7899 * linux-cris-low.c: New file with support for CRIS.
7900 * linux-crisv32-low.c: Ditto for CRISv32.
7901 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7902 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 7903 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
7904 reg-crisv32.o, and reg-crisv32.c to make rules.
7905 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7906 recognized targets.
7907
48d93c75
UW
79082005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7909
7910 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7911 of sizeof (PTRACE_XFER_TYPE).
7912 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7913
e013ee27
OF
79142005-05-12 Orjan Friberg <orjanf@axis.com>
7915
889bf7c5 7916 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
7917 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7918 pointers for hardware watchpoint support.
7919 * linux-low.h (struct linux_target_ops): Ditto.
7920 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7921 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7922 to linux_target_ops.
7923 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7924 reply packet.
7925 * server.c (main): Recognize 'Z' and 'z' packets.
7926
b0ded00b
UW
79272005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7928
7929 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7930 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7931 (the_low_target): Add new members.
7932
8643e2ad
DJ
79332005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7934
7935 * proc-service.c (ps_lgetregs): Search all_processes instead of
7936 all_threads.
7937
fc620387
DJ
79382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7939
7940 * server.c (start_inferior): Change return type to int.
7941 (attach_inferior): Change sigptr to int *.
7942 (handle_v_cont, handle_v_requests): Change signal to int *.
7943 (main): Change signal to int.
7944
79452005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
7946
7947 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7948 * configure.srv: Add m32r*-*-linux*.
7949 * linux-m32r-low.c: New file.
7950
e0e76420
DJ
79512005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7952
7953 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7954
a1928bad
DJ
79552005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7956
7957 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7958 Take unsigned long arguments for PIDs.
7959 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7960 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7961 (wait_for_sigstop, linux_resume_one_process)
7962 (regsets_fetch_inferior_registers, linux_send_signal)
7963 (linux_read_auxv): Likewise. Update the types of variables holding
7964 PIDs. Update format string specifiers.
7965 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7966 * remote-utils.c (prepare_resume_reply): Likewise.
7967 * server.c (cont_thread, general_thread, step_thread)
7968 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7969 unsigned long.
7970 (handle_query): Update format specifiers.
7971 (handle_v_cont, main): Use strtoul for thread IDs.
7972 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7973 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7974 (general_thread, step_thread, thread_from_wait)
7975 (old_thread_from_wait): Update.
7976 * target.h (struct thread_resume): Use unsigned long for THREAD.
7977 (struct target_ops): Use unsigned long for arguments to attach and
7978 thread_alive.
7979
dcdb98d2
DJ
79802005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7981
7982 * acinclude.m4: Include bfd/bfd.m4 directly.
7983 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7984 <agriffis@toolchain.org>.
7985 * aclocal.m4, configure: Regenerated.
7986
bec39cab
AC
79872005-01-07 Andrew Cagney <cagney@gnu.org>
7988
7989 * configure.ac: Rename configure.in, require autoconf 2.59.
7990 * configure: Re-generate.
7991
434c4c77
DJ
79922004-12-08 Daniel Jacobowitz <dan@debian.org>
7993
7994 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7995 LIBS when finished.
7996 * aclocal.m4: Regenerated.
7997 * configure: Regenerated.
7998
db1d3e1b
AS
79992004-11-21 Andreas Schwab <schwab@suse.de>
8000
8001 * linux-m68k-low.c (m68k_num_gregs): Define.
8002 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8003 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8004 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8005 (m68k_breakpoint_at): New. Add to the_low_target.
8006
8007 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8008 srv_linux_thread_db to yes.
8009
43360365
JB
80102004-10-20 Joel Brobecker <brobecker@gnat.com>
8011
8012 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8013 (ARCH_SET_FS): Likewise.
8014 (ARCH_GET_FS): Likewise.
8015 (ARCH_GET_GS): Likewise.
8016
fd500816
DJ
80172004-10-16 Daniel Jacobowitz <dan@debian.org>
8018
8019 * linux-i386-low.c (ps_get_thread_area): New.
8020 * linux-x86-64-low.c (ps_get_thread_area): New.
8021 * linux-low.c: Include <sys/syscall.h>.
8022 (linux_kill_one_process): Don't kill the first thread here.
8023 (linux_kill): Kill the first thread here.
8024 (kill_lwp): New function.
8025 (send_sigstop, linux_send_signal): Use it.
8026 * proc-service.c: Clean up #ifdefs.
8027 (fpregset_info): Delete.
8028 (ps_lgetregs): Update and enable implementation.
8029 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8030 implementations.
8031 * remote-utils.c (struct sym_cache, symbol_cache): New.
8032 (input_interrupt): Print a clearer message.
8033 (async_io_enabled): New variable.
8034 (enable_async_io, disable_async_io): Use it. Update comments.
8035 (look_up_one_symbol): Use the symbol cache.
8036 * thread-db.c (thread_db_look_up_symbols): New function.
8037 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8038
f6de3c42
DJ
80392004-10-16 Daniel Jacobowitz <dan@debian.org>
8040
8041 * configure.in: Test for -rdynamic.
8042 * configure: Regenerated.
8043 * Makefile (INTERNAL_LDFLAGS): New.
8044 (gdbserver, gdbreplay): Use it.
8045
2c0fc042
AC
80462004-09-02 Andrew Cagney <cagney@gnu.org>
8047
8048 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8049
075b3282
DJ
80502004-03-23 Daniel Jacobowitz <drow@mvista.com>
8051
8052 * linux-low.c (linux_wait): Clear all_processes list also.
8053
fa6a77dc
DJ
80542004-03-12 Daniel Jacobowitz <drow@mvista.com>
8055
8056 * linux-low.c: Include <errno.h>. Remove extern declaration of
8057 errno.
8058
6d782a97
DJ
80592004-03-12 Daniel Jacobowitz <drow@mvista.com>
8060
8061 * gdbreplay.c, server.h, utils.c: Update copyright years.
8062
3a7fb99b
DJ
80632004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8064
8065 * server.c (main): Print child status or termination signal from
8066 variable 'signal', not 'sig'.
8067
c3e735a6
DJ
80682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8069
8070 * linux-low.c (linux_read_memory): Change return type to
8071 int. Check for and return error from ptrace().
8072 * target.c (read_inferior_memory): Change return type to int. Pass
8073 back return status from the_target->read_memory().
8074 * target.h (struct target_ops): Adapt *read_memory() prototype.
8075 Update comment.
8076 (read_inferior_memory): Adapt prototype.
8077 * server.c (main): Return an error packet if
8078 read_inferior_memory() returns an error.
8079
a59d1c82
DJ
80802004-03-04 Daniel Jacobowitz <drow@mvista.com>
8081
8082 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8083 Unify with other clean targets.
8084
dc3f8883
DJ
80852004-02-29 Daniel Jacobowitz <drow@mvista.com>
8086
8087 * server.c (handle_v_cont): Call set_desired_inferior.
8088
89a208da
DJ
80892004-02-29 Daniel Jacobowitz <drow@mvista.com>
8090
8091 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8092
62ea82f5
DJ
80932004-02-29 Daniel Jacobowitz <drow@mvista.com>
8094
8095 * linux-low.c (linux_wait): Unblock async I/O.
8096 (linux_resume): Block and enable async I/O.
8097 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8098 * server.h (block_async_io, unblock_async_io): Add prototypes.
8099
6910d122
DJ
81002004-02-29 Daniel Jacobowitz <drow@mvista.com>
8101
8102 * remote-utils.c (remote_open): Print a status notice after
8103 opening a TCP port.
8104 * server.c (attach_inferior): Print a status notice after
8105 attaching.
8106
81072004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
8108
8109 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8110
c89dc5d4
DJ
81112004-02-26 Daniel Jacobowitz <drow@mvista.com>
8112
8113 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8114 error packet.
8115 * server.c, target.h: Update copyright years.
8116
4b8dad4a
RM
81172004-02-25 Roland McGrath <roland@redhat.com>
8118
8119 * target.h (struct target_ops): New member `read_auxv'.
8120 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8121 * linux-low.c (linux_read_auxv): New function.
8122 (linux_target_ops): Initialize `read_auxv' member to that.
8123
d7446758
JB
81242004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8125
8126 Committed by Jim Blandy <jimb@redhat.com>.
8127
8128 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 8129 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
8130 instead of GPR_SIZE to distiguish s390 and s390x targets.
8131
5544ad89
DJ
81322004-01-31 Daniel Jacobowitz <drow@mvista.com>
8133
8134 * linux-low.c: Update copyright year.
8135 (check_removed_breakpoint): Clear pending_is_breakpoint.
8136 (linux_set_resume_request, linux_queue_one_thread)
8137 (resume_status_pending_p): New functions.
8138 (linux_continue_one_thread): Use process->resume.
8139 (linux_resume): Only resume threads if there are no pending events.
8140 * linux-low.h (struct process_info): Add resume request
8141 pointer.
8142
2a68b70e
DJ
81432004-01-30 Daniel Jacobowitz <drow@mvista.com>
8144
8145 * regcache.c (new_register_cache): Clear the allocated register
8146 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8147
64386c31
DJ
81482003-10-13 Daniel Jacobowitz <drow@mvista.com>
8149
8150 * linux-low.c (linux_resume): Take a struct thread_resume *
8151 argument.
8152 (linux_wait): Update call.
8153 (resume_ptr): New static variable.
8154 (linux_continue_one_thread): Renamed from
8155 linux_continue_one_process. Use resume_ptr.
8156 (linux_resume): Use linux_continue_one_thread.
8157 * server.c (handle_v_cont, handle_v_requests): New functions.
8158 (myresume): New function.
8159 (main): Handle 'v' case.
8160 * target.h (struct thread_resume): New type.
8161 (struct target_ops): Change argument of "resume" to struct
8162 thread_resume *.
8163 (myresume): Delete macro.
8164
c938e9b0
L
81652003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8166
8167 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8168 (uninstall): Support DESTDIR.
8169
7f313d07
BC
8170Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8171
8172 * configure.srv: Add xscale*linux copy of arm*linux entry.
8173
3b2fc2ea
DJ
81742003-07-24 Daniel Jacobowitz <drow@mvista.com>
8175
8176 * linux-arm-low.c (arm_reinsert_addr): New function.
8177 (the_low_target): Add arm_reinsert_addr.
8178
1c0a559e
MK
81792003-07-08 Mark Kettenis <kettenis@gnu.org>
8180
8181 * mem-break.c: Remove whitespace at end of file.
8182
43d5792c
DJ
81832003-06-28 Daniel Jacobowitz <drow@mvista.com>
8184
8185 * configure.in: Check whether we need to prototype strerror.
8186 * server.h: Optionally prototype strerror.
8187 * gdbreplay.c (perror_with_name): Use strerror.
8188 * linux-low.c (linux_attach_lwp): Use strerror.
8189 * utils.c (perror_with_name): Use strerror.
8190 * config.in, configure: Regenerated.
8191
c8a86edf
DJ
81922003-06-28 Daniel Jacobowitz <drow@mvista.com>
8193
8194 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8195 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8196
73d37363
DJ
81972003-06-20 Daniel Jacobowitz <drow@mvista.com>
8198
8199 * Makefile.in (SFILES): Update.
8200 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8201 low-sun3.c: Remove files.
8202
6ad8ae5c
DJ
82032003-06-17 Daniel Jacobowitz <drow@mvista.com>
8204
8205 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8206 (linux_detach_one_process, linux_detach): New functions.
8207 (linux_target_ops): Add linux_detach.
8208 * server.c (main): Handle 'D' packet.
8209 * target.h (struct target_ops): Add "detach" member.
8210 (detach_inferior): Define.
8211
1581182a
MK
82122003-06-13 Mark Kettenis <kettenis@gnu.org>
8213
8214 From Kelley Cook <kelleycook@wideopenwest.com>:
8215 * configure.srv: Accept i[34567]86 variants.
8216
e5379b03
DJ
82172003-06-05 Daniel Jacobowitz <drow@mvista.com>
8218
8219 * linux-low.c (linux_wait_for_event): Correct comment typos.
8220 (linux_resume_one_process): Call check_removed_breakpoint.
8221 (linux_send_signal): New function.
8222 (linux_target_ops): Add linux_send_signal.
8223 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8224 of kill.
8225 * target.h (struct target_ops): Add send_signal.
8226
2ff29de4
JB
82272003-05-29 Jim Blandy <jimb@redhat.com>
8228
8229 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8230 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8231 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8232 away part of the register's value.
8233
254787d4
DJ
82342003-03-26 Daniel Jacobowitz <drow@mvista.com>
8235
8236 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8237 (linux_wait_for_event, linux_init_signals): Likewise.
8238
94e10508
DJ
82392003-03-17 Daniel Jacobowitz <drow@mvista.com>
8240
8241 * configure.in: Check for stdlib.h.
8242 * configure: Regenerated.
8243 * config.in: Regenerated.
8244
4c0711e0
DJ
82452003-01-04 Andreas Schwab <schwab@suse.de>
8246
8247 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8248
ef66e766
AC
82492003-01-02 Andrew Cagney <ac131313@redhat.com>
8250
8251 * Makefile.in: Remove obsolete code.
8252
a1358604
DJ
82532002-11-20 Daniel Jacobowitz <drow@mvista.com>
8254
8255 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8256 defined(PT_FPR0_HI).
8257
23ce3b1c
DJ
82582002-11-17 Stuart Hughes <seh@zee2.com>
8259
8260 * linux-arm-low.c (arm_num_regs): Increase.
8261 (arm_regmap): Include status register.
8262
82632002-11-17 Daniel Jacobowitz <drow@mvista.com>
8264
8265 * linux-low.c (register_addr): Remove incorrect -1 check.
8266
a9fa9f7d
DJ
82672002-08-29 Daniel Jacobowitz <drow@mvista.com>
8268
8269 * linux-low.c (linux_create_inferior): Call setpgid. Return
8270 the new PID.
8271 (unstopped_p, linux_signal_pid): Remove.
8272 (linux_target_ops): Remove linux_signal_pid.
8273 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8274 global instead of target method.
8275 * target.h (struct target_ops): Remove signal_pid. Update comment
8276 for create_inferior.
8277 * server.c (signal_pid): New variable.
8278 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 8279 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
8280 (attach_inferior): Set signal_pid.
8281
17574093
DJ
82822002-08-23 Daniel Jacobowitz <drow@mvista.com>
8283
8284 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8285
82862002-08-20 Jim Blandy <jimb@redhat.com>
8287
8288 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8289 default for this.
8290
82912002-08-01 Andrew Cagney <cagney@redhat.com>
8292
8293 * Makefile.in: Make chill references obsolete.
8294
82952002-07-24 Kevin Buettner <kevinb@redhat.com>
8296
8297 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8298 * configure: Regenerate.
8299 * config.in: Regenerate.
8300
83012002-07-09 David O'Brien <obrien@FreeBSD.org>
8302
8303 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8304 (perror_with_name, remote_close, remote_open, expect, play): Static.
8305
83062002-07-04 Michal Ludvig <mludvig@suse.cz>
8307
4b8dad4a 8308 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
8309 byte offsets instead of an array of indexes.
8310 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8311
83122002-06-13 Daniel Jacobowitz <drow@mvista.com>
8313
8314 * regcache.c: Add comment.
8315
83162002-06-11 Daniel Jacobowitz <drow@mvista.com>
8317
8318 * thread-db.c: New file.
8319 * proc-service.c: New file.
8320 * acinclude.m4: New file.
8321 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8322 proc-service.o, and thread-db.o.
8323 (linux-low.o): Add USE_THREAD_DB.
8324 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8325 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8326 * aclocal.m4: Regenerated.
8327 * config.in: Regenerated.
8328 * configure: Regenerated.
8329 * configure.in: Check for proc_service.h, sys/procfs.h,
8330 thread_db.h, and linux/elf.h headrs.
8331 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8332 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8333 Check for -lthread_db and thread support.
8334 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8335 PowerPC, and SuperH.
8336 * i387-fp.c: Constify arguments.
8337 * i387-fp.h: Likewise.
8338 * inferiors.c: (struct thread_info): Renamed from
8339 `struct inferior_info'. Remove PID member. Use generic inferior
8340 list header. All uses updated.
8341 (inferiors, signal_pid): Removed.
8342 (all_threads): New variable.
8343 (get_thread): Define.
8344 (add_inferior_to_list): New function.
8345 (for_each_inferior): New function.
8346 (change_inferior_id): New function.
8347 (add_inferior): Removed.
8348 (remove_inferior): New function.
8349 (add_thread): New function.
8350 (free_one_thread): New function.
8351 (remove_thread): New function.
8352 (clear_inferiors): Use for_each_inferior and free_one_thread.
8353 (find_inferior): New function.
8354 (find_inferior_id): New function.
8355 (inferior_target_data): Update argument type.
8356 (set_inferior_target_data): Likewise.
8357 (inferior_regcache_data): Likewise.
8358 (set_inferior_regcache_data): Likewise.
8359 * linux-low.c (linux_bp_reinsert): Remove.
8360 (all_processes, stopping_threads, using_thrads)
8361 (struct pending_signals, debug_threads, pid_of): New.
8362 (inferior_pid): Replace with macro.
8363 (struct inferior_linux_data): Remove.
8364 (get_stop_pc, add_process): New functions.
8365 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8366 Use add_process and add_thread.
8367 (linux_attach_lwp): New function, based on old linux_attach. Use
8368 add_process and add_thread. Set stop_expected for new threads.
8369 (linux_attach): New function.
8370 (linux_kill_one_process): New function.
8371 (linux_kill): Kill all LWPs.
8372 (linux_thread_alive): Use find_inferior_id.
8373 (check_removed_breakpoints, status_pending_p): New functions.
8374 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8375 Update. Use WNOHANG. Wait for cloned processes also. Update process
8376 struct for the found process.
8377 (linux_wait_for_event): New function.
8378 (linux_wait): Use it. Support LWPs.
8379 (send_sigstop, wait_for_sigstop, stop_all_processes)
8380 (linux_resume_one_process, linux_continue_one_process): New functions.
8381 (linux_resume): Support LWPs.
8382 (REGISTER_RAW_SIZE): Remove.
8383 (fetch_register): Use register_size instead. Call supply_register.
8384 (usr_store_inferior_registers): Likewise. Call collect_register.
8385 Fix recursive case.
8386 (regsets_fetch_inferior_registers): Improve error message.
8387 (regsets_store_inferior_registers): Add debugging.
8388 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8389 (unstopped_p, linux_signal_pid): New functions.
8390 (linux_target_ops): Add linux_signal_pid.
8391 (linux_init_signals): New function.
8392 (initialize_low): Call it. Initialize using_threads.
8393 * regcache.c (inferior_regcache_data): Add valid
8394 flag.
8395 (get_regcache): Fetch registers lazily. Add fetch argument
8396 and update all callers.
8397 (regcache_invalidate_one, regcache_invalidate): New
8398 functions.
8399 (new_register_cache): Renamed from create_register_cache.
8400 Return the new regcache.
8401 (free_register_cache): Change argument to a void *.
8402 (registers_to_string, registers_from_string): Call get_regcache
8403 with fetch flag set.
8404 (register_data): Make static. Pass fetch flag to get_regcache.
8405 (supply_register): Call get_regcache with fetch flag clear.
8406 (collect_register): Call get_regcache with fetch flag set.
8407 (collect_register_as_string): New function.
8408 * regcache.h: Update.
8409 * remote-utils.c (putpkt): Flush after debug output and use
8410 stderr.
8411 Handle input interrupts while waiting for an ACK.
8412 (input_interrupt): Use signal_pid method.
8413 (getpkt): Flush after debug output and use stderr.
8414 (outreg): Use collect_register_as_string.
8415 (new_thread_notify, dead_thread_notify): New functions.
8416 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8417 and general_thread.
8418 (look_up_one_symbol): Flush after debug output.
8419 * server.c (step_thread, server_waiting): New variables.
8420 (start_inferior): Don't use signal_pid. Update call to mywait.
8421 (attach_inferior): Update call to mywait.
8422 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8423 (main): Don't fetch/store registers explicitly. Use
8424 set_desired_inferior. Support proposed ``Hs'' packet. Update
8425 calls to mywait.
8426 * server.h: Update.
8427 (struct inferior_list, struct_inferior_list_entry): New.
8428 * target.c (set_desired_inferior): New.
8429 (write_inferior_memory): Constify.
8430 (mywait): New function.
8431 * target.h: Update.
8432 (struct target_ops): New signal_pid method.
8433 (mywait): Removed macro, added prototype.
8434
8435 * linux-low.h (regset_func): Removed.
8436 (regset_fill_func, regset_store_func): New.
8437 (enum regset_type): New.
8438 (struct regset_info): Add type field. Use new operation types.
8439 (struct linux_target_ops): stop_pc renamed to get_pc.
8440 Add decr_pc_after_break and breakpoint_at.
8441 (get_process, get_thread_proess, get_process_thread)
8442 (strut process_info, all_processes, linux_attach_lwp)
8443 (thread_db_init): New.
8444
8445 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8446 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8447 (the_low_target): Add new members.
8448 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8449 (i386_store_fpxregset): Constify.
8450 (target_regsets): Add new kind identifier.
8451 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8452 (i386_set_pc): Add debugging.
8453 (i386_breakpoint_at): New function.
8454 (the_low_target): Add new members.
8455 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8456 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8457 (mips_breakpoint_at): New.
8458 (the_low_target): Add new members.
8459 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8460 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8461 (the_low_target): Add new members.
8462 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8463 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8464 (the_low_target): Add new members.
8465 * linux-x86-64-low.c (target_regsets): Add new kind
8466 identifier.
8467
84682002-05-15 Daniel Jacobowitz <drow@mvista.com>
8469
8470 From Martin Pool <mbp@samba.org>:
8471 * server.c (gdbserver_usage): New function.
8472 (main): Call it.
8473
84742002-05-14 Daniel Jacobowitz <drow@mvista.com>
8475
8476 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8477 stop_at -> stop_pc.
8478
84792002-05-04 Andrew Cagney <ac131313@redhat.com>
8480
8481 * Makefile.in: Remove obsolete code.
8482
84832002-04-24 Michal Ludvig <mludvig@suse.cz>
8484
8485 * linux-low.c (regsets_fetch_inferior_registers),
8486 (regsets_store_inferior_registers): Removed cast to int from
8487 ptrace() calls.
8488 * regcache.h: Added declaration of struct inferior_info.
8489
84902002-04-20 Daniel Jacobowitz <drow@mvista.com>
8491
8492 * inferiors.c (struct inferior_info): Add regcache_data.
8493 (add_inferior): Call create_register_cache.
8494 (clear_inferiors): Call free_register_cache.
8495 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8496 * regcache.c (struct inferior_regcache_data): New.
8497 (registers): Remove.
8498 (get_regcache): New function.
8499 (create_register_cache, free_register_cache): New functions.
8500 (set_register_cache): Don't initialize the register cache here.
8501 (registers_to_string, registers_from_string, register_data): Call
8502 get_regcache.
8503 * regcache.h: Add prototypes.
8504 * server.h: Likewise.
8505
85062002-04-20 Daniel Jacobowitz <drow@mvista.com>
8507
8508 * mem-break.c: New file.
8509 * mem-break.h: New file.
8510 * Makefile.in: Add mem-break.o rule; update server.h
8511 dependencies.
8512 * inferiors.c (struct inferior_info): Add target_data
8513 member.
8514 (clear_inferiors): Free target_data member if set.
8515 (inferior_target_data, set_inferior_target_data): New functions.
8516 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8517 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8518 * linux-low.c (linux_bp_reinsert): New variable.
8519 (struct inferior_linux_data): New.
8520 (linux_create_inferior): Use set_inferior_target_data.
8521 (linux_attach): Likewise. Call add_inferior.
8522 (linux_wait_for_one_inferior): New function.
8523 (linux_wait): Call it.
8524 (linux_write_memory): Add const.
8525 (initialize_low): Call set_breakpoint_data.
8526 * linux-low.h (struct linux_target_ops): Add breakpoint
8527 handling members.
8528 * server.c (attach_inferior): Remove extra add_inferior
8529 call.
8530 * server.h: Include mem-break.h. Update inferior.c
8531 prototypes.
8532 * target.c (read_inferior_memory)
8533 (write_inferior_memory): New functions.
8534 * target.h (read_inferior_memory)
8535 (write_inferior_memory): Change macros to prototypes.
8536 (struct target_ops): Update comments. Add const to write_memory
8537 definition.
8538
85392002-04-11 Daniel Jacobowitz <drow@mvista.com>
8540
8541 * linux-low.c (usr_store_inferior_registers): Support
8542 registers which are allowed to fail to store.
8543 * linux-low.h (linux_target_ops): Likewise.
8544 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8545 (ppc_cannot_store_register): FPSCR may not be storable.
8546
85472002-04-09 Daniel Jacobowitz <drow@mvista.com>
8548
8549 * server.h: Include <string.h> if HAVE_STRING_H.
8550 * ChangeLog: Correct paths in last ChangeLog entry.
8551
85522002-04-09 Daniel Jacobowitz <drow@mvista.com>
8553
8554 * linux-low.h: Remove obsolete prototypes.
8555 (struct linux_target_ops): New.
8556 (extern the_low_target): New.
8557 * linux-low.c (num_regs, regmap): Remove declarations.
8558 (register_addr): Use the_low_target explicitly.
8559 (fetch_register): Likewise.
8560 (usr_fetch_inferior_registers): Likewise.
8561 (usr_store_inferior_registers): Likewise.
8562 * linux-arm-low.c (num_regs): Remove.
8563 (arm_num_regs): Define.
8564 (arm_regmap): Renamed from regmap, made static.
8565 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8566 made static.
8567 (arm_cannot_store_register): Renamed from cannot_store_register,
8568 made static.
8569 (the_low_target): New.
8570 * linux-i386-low.c (num_regs): Remove.
8571 (i386_num_regs): Define.
8572 (i386_regmap): Renamed from regmap, made static.
8573 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8574 made static.
8575 (i386_cannot_store_register): Renamed from cannot_store_register,
8576 made static.
8577 (the_low_target): New.
8578 * linux-ia64-low.c (num_regs): Remove.
8579 (ia64_num_regs): Define.
8580 (ia64_regmap): Renamed from regmap, made static.
8581 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8582 made static.
8583 (ia64_cannot_store_register): Renamed from cannot_store_register,
8584 made static.
8585 (the_low_target): New.
8586 * linux-m68k-low.c (num_regs): Remove.
8587 (m68k_num_regs): Define.
8588 (m68k_regmap): Renamed from regmap, made static.
8589 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8590 made static.
8591 (m68k_cannot_store_register): Renamed from cannot_store_register,
8592 made static.
8593 (the_low_target): New.
8594 * linux-mips-low.c (num_regs): Remove.
8595 (mips_num_regs): Define.
8596 (mips_regmap): Renamed from regmap, made static.
8597 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8598 made static.
8599 (mips_cannot_store_register): Renamed from cannot_store_register,
8600 made static.
8601 (the_low_target): New.
8602 * linux-ppc-low.c (num_regs): Remove.
8603 (ppc_num_regs): Define.
8604 (ppc_regmap): Renamed from regmap, made static.
8605 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8606 made static.
8607 (ppc_cannot_store_register): Renamed from cannot_store_register,
8608 made static.
8609 (the_low_target): New.
8610 * linux-s390-low.c (num_regs): Remove.
8611 (s390_num_regs): Define.
8612 (s390_regmap): Renamed from regmap, made static.
8613 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8614 made static.
8615 (s390_cannot_store_register): Renamed from cannot_store_register,
8616 made static.
8617 (the_low_target): New.
8618 * linux-sh-low.c (num_regs): Remove.
8619 (sh_num_regs): Define.
8620 (sh_regmap): Renamed from regmap, made static.
8621 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8622 made static.
8623 (sh_cannot_store_register): Renamed from cannot_store_register,
8624 made static.
8625 (the_low_target): New.
8626 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8627 (the_low_target): New.
8628
86292002-04-09 Daniel Jacobowitz <drow@mvista.com>
8630
8631 * Makefile.in: Add stamp-h target.
8632 * configure.in: Create stamp-h.
8633 * configure: Regenerated.
8634
86352002-04-09 Daniel Jacobowitz <drow@mvista.com>
8636
8637 * inferiors.c: New file.
8638 * target.c: New file.
8639 * target.h: New file.
8640 * Makefile.in: Add target.o and inferiors.o. Update
8641 dependencies.
8642 * linux-low.c (inferior_pid): New static variable,
8643 moved from server.c.
8644 (linux_create_inferior): Renamed from create_inferior.
8645 Call add_inferior. Return 0 on success instead of a PID.
8646 (linux_attach): Renamed from myattach.
8647 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8648 (linux_thread_alive): Renamed from mythread_alive.
8649 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8650 child dies.
8651 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8652 (regsets_store_inferior_registers): Correct error message.
8653 Add missing ``return 0''.
8654 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8655 (linux_store_registers): Renamed from store_inferior_registers.
8656 (linux_read_memory): Renamed from read_inferior_memory.
8657 (linux_write_memory): Renamed from write_inferior_memory.
8658 (linux_target_ops): New structure.
8659 (initialize_low): Call set_target_ops ().
8660 * remote-utils.c (unhexify): New function.
8661 (hexify): New function.
8662 (input_interrupt): Send signals to ``signal_pid''.
8663 * server.c (inferior_pid): Remove.
8664 (start_inferior): Update create_inferior call.
8665 (attach_inferior): Call add_inferior.
8666 (handle_query): New function.
8667 (main): Call handle_query for `q' packets.
8668 * server.h: Include "target.h". Remove obsolete prototypes.
8669 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8670
86712002-04-09 Daniel Jacobowitz <drow@mvista.com>
8672
8673 * Makefile.in: Add WARN_CFLAGS. Update configury
8674 dependencies.
8675 * configure.in: Check for <string.h>
8676 * configure: Regenerate.
8677 * config.in: Regenerate.
8678 * gdbreplay.c: Include needed system headers.
8679 (remote_open): Remove strchr prototype.
8680 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8681 * regcache.c (supply_register): Change buf argument to const void *.
8682 (supply_register_by_name): Likewise.
8683 (collect_register): Change buf argument to void *.
8684 (collect_register_by_name): Likewise.
8685 * regcache.h: Add missing prototypes.
8686 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8687 * server.c (handle_query): New function.
8688 (attached): New static variable, moved out of main.
8689 (main): Quiet longjmp clobber warnings.
8690 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8691 * utils.c (error): Remove NORETURN.
8692 (fatal): Likewise.
This page took 1.267172 seconds and 4 git commands to generate.