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