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