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