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