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