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