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