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