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