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