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