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