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