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