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