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