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