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