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