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