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