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