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