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