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