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