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